* dispnew.c (window_change_signal): Don't try to get the size of a
[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 ;;
a078d6e5 2462 m68k-*-netbsd*) machine=m68k ;;
ba4481b5
DL
2463 esac
2464 ;;
2465
2466 ## OpenBSD ports
2467 *-*-openbsd* )
2468 opsys=openbsd
2469 case "${canonical}" in
2470 alpha*-*-openbsd*) machine=alpha ;;
85410b02 2471 arm-*-openbsd*) machine=arm ;;
85410b02 2472 i386-*-openbsd*) machine=intel386 ;;
85410b02 2473 powerpc-*-openbsd*) machine=macppc ;;
85410b02
CY
2474 sparc*-*-openbsd*) machine=sparc ;;
2475 vax-*-openbsd*) machine=vax ;;
2476 x86_64-*-openbsd*) machine=amdx86-64 ;;
8bff6137 2477 hppa-*-openbsd*) machine=hp800 ;;
ba4481b5
DL
2478 esac
2479 ;;
2480
10a3b1a1
EZ
2481 ## LynxOS ports
2482 *-*-lynxos* )
2483 opsys=lynxos
2484 case "${canonical}" in
2485 i[3456]86-*-lynxos*) machine=intel386 ;;
2486 powerpc-*-lynxos*) machine=powerpc ;;
2487 esac
2488 ;;
2489
ba4481b5
DL
2490 alpha*-*-linux-gnu* )
2491 machine=alpha opsys=gnu-linux
2492 ;;
2493
c4bb2108
DL
2494 arm*-*-linux-gnu* )
2495 machine=arm opsys=gnu-linux
2496 ;;
2497
040c474e
CY
2498 ## Apple Darwin / Mac OS X
2499 *-apple-darwin* )
2500 case "${canonical}" in
2501 i[3456]86-* ) machine=intel386 ;;
40dde9d1 2502 powerpc-* ) machine=macppc ;;
040c474e
CY
2503 * ) unported=yes ;;
2504 esac
2505 opsys=darwin
2506 # Define CPP as follows to make autoconf work correctly.
2507 CPP="${CC-cc} -E -no-cpp-precomp"
2508 # Use fink packages if available.
2509 if test -d /sw/include && test -d /sw/lib; then
2510 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2511 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2512 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2513 fi
2514 ;;
2515
6fbb6db1 2516 ## HP 9000 series 700 and 800, running HP/UX
6fbb6db1
GM
2517 hppa*-hp-hpux10.2* )
2518 machine=hp800 opsys=hpux10-20
2519 ;;
6fbb6db1
GM
2520 hppa*-hp-hpux1[1-9]* )
2521 machine=hp800 opsys=hpux11
2522 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2523 ;;
2524
409d9577
GM
2525 hppa*-*-linux-gnu* )
2526 machine=hp800 opsys=gnu-linux
2527 ;;
2528
ba4481b5 2529 ## IBM machines
55597d70 2530 s390-*-linux-gnu* )
138f0859
GM
2531 machine=ibms390 opsys=gnu-linux
2532 ;;
bcdb1378
EZ
2533 s390x-*-linux-gnu* )
2534 machine=ibms390x opsys=gnu-linux
2535 ;;
ba4481b5
DL
2536 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2537 machine=ibmrs6000 opsys=aix4-2
2538 ;;
67bf991b
CY
2539 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2540 machine=ibmrs6000 opsys=aix4-2
2541 ;;
55597d70 2542 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2543 machine=ibmrs6000 opsys=aix4-2
2544 ;;
26a42dac
DN
2545 rs6000-ibm-aix5* | powerpc-ibm-aix6* )
2546 machine=ibmrs6000 opsys=aix4-2
2547 ;;
ba4481b5 2548
c76e04a8
GM
2549 ## Macintosh PowerPC
2550 powerpc*-*-linux-gnu* )
2551 machine=macppc opsys=gnu-linux
2552 ;;
2553
ba4481b5 2554 ## Silicon Graphics machines
ba4481b5 2555 ## Iris 4D
ba4481b5
DL
2556 mips-sgi-irix6.5 )
2557 machine=iris4d opsys=irix6-5
946173ad
DL
2558 # Without defining _LANGUAGE_C, things get masked out in the headers
2559 # so that, for instance, grepping for `free' in stdlib.h fails and
2560 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2561 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2562 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5 2563 ;;
ba4481b5 2564
ba4481b5
DL
2565 ## Suns
2566 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2567 machine=sparc opsys=gnu-linux
2568 ;;
2569
176fe5fc 2570 *-sun-solaris* \
7c54c0a0
DN
2571 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* \
2572 | x86_64-*-solaris2* | x86_64-*-sunos5* \
2573 | powerpc*-*-solaris2* | rs6000-*-solaris2*)
ba4481b5 2574 case "${canonical}" in
ba4481b5 2575 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2576 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2577 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2578 sparc* ) machine=sparc ;;
2579 * ) unported=yes ;;
2580 esac
2581 case "${canonical}" in
ba4481b5
DL
2582 *-sunos5.3* | *-solaris2.3* )
2583 opsys=sol2-3
2584 NON_GNU_CPP=/usr/ccs/lib/cpp
2585 ;;
2586 *-sunos5.4* | *-solaris2.4* )
2587 opsys=sol2-4
2588 NON_GNU_CPP=/usr/ccs/lib/cpp
2589 RANLIB="ar -ts"
2590 ;;
2591 *-sunos5.5* | *-solaris2.5* )
2592 opsys=sol2-5
2593 NON_GNU_CPP=/usr/ccs/lib/cpp
2594 RANLIB="ar -ts"
2595 ;;
8e967cf7
MR
2596 *-sunos5.6* | *-solaris2.6* )
2597 opsys=sol2-6
2598 NON_GNU_CPP=/usr/ccs/lib/cpp
2599 RANLIB="ar -ts"
2600 ;;
2194ea1c 2601 *-sunos5.[7-9]* | *-solaris2.[7-9]* )
9e71690e 2602 opsys=sol2-6
089a966d
GM
2603 emacs_check_sunpro_c=yes
2604 NON_GNU_CPP=/usr/ccs/lib/cpp
6623890a 2605 ;;
9b3362b8
DN
2606 *-sunos5* | *-solaris* )
2607 opsys=sol2-10
2608 emacs_check_sunpro_c=yes
2609 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5 2610 ;;
ba4481b5
DL
2611 esac
2612 ## Watch out for a compiler that we know will not work.
2613 case "${canonical}" in
2614 *-solaris* | *-sunos5* )
2615 if [ "x$CC" = x/usr/ucb/cc ]; then
2616 ## /usr/ucb/cc doesn't work;
2617 ## we should find some other compiler that does work.
2618 unset CC
2619 fi
2620 ;;
2621 *) ;;
2622 esac
2623 ;;
ba4481b5 2624
ba4481b5
DL
2625 ## Vaxen.
2626 vax-dec-* )
2627 machine=vax
2628 case "${canonical}" in
ba4481b5
DL
2629 *-vms* ) opsys=vms ;;
2630 * ) unported=yes
2631 esac
2632 ;;
2633
f4988be7
GM
2634 ## IA-64
2635 ia64*-*-linux* )
2636 machine=ia64 opsys=gnu-linux
2637 ;;
2638
ba4481b5
DL
2639 ## Intel 386 machines where we don't care about the manufacturer
2640 i[3456]86-*-* )
2641 machine=intel386
2642 case "${canonical}" in
c60ee5e7 2643 *-cygwin ) opsys=cygwin ;;
eae54018 2644 *-darwin* ) opsys=darwin
23fd4483
ST
2645 CPP="${CC-cc} -E -no-cpp-precomp"
2646 ;;
ba4481b5 2647 *-linux-gnu* ) opsys=gnu-linux ;;
ba4481b5 2648 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2649 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2650 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5
DL
2651 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2652 esac
2653 ;;
2654
2655 ## m68k Linux-based GNU system
2656 m68k-*-linux-gnu* )
2657 machine=m68k opsys=gnu-linux
2658 ;;
2659
2660 ## Mips Linux-based GNU system
8bff6137
GM
2661 mips-*-linux-gnu* | mipsel-*-linux-gnu* \
2662 | mips64-*-linux-gnu* | mips64el-*-linux-gnu* )
ba4481b5
DL
2663 machine=mips opsys=gnu-linux
2664 ;;
2665
598a2813
AS
2666 ## AMD x86-64 Linux-based GNU system
2667 x86_64-*-linux-gnu* )
24b01ec4 2668 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2669 ;;
2670
94218e27 2671 ## Tensilica Xtensa Linux-based GNU system
8dd59f01 2672 xtensa*-*-linux-gnu* )
94218e27
DN
2673 machine=xtensa opsys=gnu-linux
2674 ;;
2675
fac5dc61
DN
2676 ## SuperH Linux-based GNU system
2677 sh[34]*-*-linux-gnu* )
2678 machine=sh3 opsys=gnu-linux
2679 ;;
2680
ba4481b5
DL
2681 * )
2682 unported=yes
2683 ;;
2684esac
2685
2686### If the code above didn't choose an operating system, just choose
2687### an operating system based on the configuration name. You really
2688### only want to use this when you have no idea what the right
2689### operating system is; if you know what operating systems a machine
2690### runs, it's cleaner to make it explicit in the case statement
2691### above.
2692if test x"${opsys}" = x; then
2693 case "${canonical}" in
2694 *-gnu* ) opsys=gnu ;;
ba4481b5 2695 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2696 *-sysv5uw* ) opsys=unixware ;;
2697 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2698 *-sysv4.1* | *-sysvr4.1* )
2699 NON_GNU_CPP=/usr/lib/cpp
2700 opsys=usg5-4 ;;
2701 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2702 if [ x$NON_GNU_CPP = x ]; then
2703 if [ -f /usr/ccs/lib/cpp ]; then
2704 NON_GNU_CPP=/usr/ccs/lib/cpp
2705 else
2706 NON_GNU_CPP=/lib/cpp
2707 fi
2708 fi
2709 opsys=usg5-4-2 ;;
2710 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2711 * )
2712 unported=yes
2713 ;;
2714 esac
2715fi
2716
c0d27fcc 2717
22044edf 2718
ba4481b5 2719if test $unported = yes; then
c0d27fcc 2720 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2721Check \`etc/MACHINES' for recognized configuration names." >&5
2722echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2723Check \`etc/MACHINES' for recognized configuration names." >&2;}
2724 { (exit 1); exit 1; }; }
ba4481b5
DL
2725fi
2726
2727machfile="m/${machine}.h"
2728opsysfile="s/${opsys}.h"
2729
c0d27fcc 2730
ba4481b5
DL
2731#### Choose a compiler.
2732test -n "$CC" && cc_specified=yes
2733
2734# Save the value of CFLAGS that the user specified.
2735SPECIFIED_CFLAGS="$CFLAGS"
2736
503d2be0
AS
2737ac_ext=c
2738ac_cpp='$CPP $CPPFLAGS'
2739ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2740ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2741ac_compiler_gnu=$ac_cv_c_compiler_gnu
2742if test -n "$ac_tool_prefix"; then
2743 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2744set dummy ${ac_tool_prefix}gcc; ac_word=$2
ca81d7a0
JD
2745{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2746echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2747if test "${ac_cv_prog_CC+set}" = set; then
2748 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2749else
2750 if test -n "$CC"; then
2751 ac_cv_prog_CC="$CC" # Let the user override the test.
2752else
c0d27fcc
MR
2753as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2754for as_dir in $PATH
2755do
2756 IFS=$as_save_IFS
2757 test -z "$as_dir" && as_dir=.
2758 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2759 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2760 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2761 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2762 break 2
2763 fi
2764done
503d2be0 2765done
ca81d7a0 2766IFS=$as_save_IFS
503d2be0 2767
ba4481b5
DL
2768fi
2769fi
503d2be0 2770CC=$ac_cv_prog_CC
ba4481b5 2771if test -n "$CC"; then
ca81d7a0
JD
2772 { echo "$as_me:$LINENO: result: $CC" >&5
2773echo "${ECHO_T}$CC" >&6; }
503d2be0 2774else
ca81d7a0
JD
2775 { echo "$as_me:$LINENO: result: no" >&5
2776echo "${ECHO_T}no" >&6; }
503d2be0
AS
2777fi
2778
ca81d7a0 2779
503d2be0
AS
2780fi
2781if test -z "$ac_cv_prog_CC"; then
2782 ac_ct_CC=$CC
2783 # Extract the first word of "gcc", so it can be a program name with args.
2784set dummy gcc; ac_word=$2
ca81d7a0
JD
2785{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2786echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2787if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2788 echo $ECHO_N "(cached) $ECHO_C" >&6
2789else
2790 if test -n "$ac_ct_CC"; then
2791 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2792else
c0d27fcc
MR
2793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2794for as_dir in $PATH
2795do
2796 IFS=$as_save_IFS
2797 test -z "$as_dir" && as_dir=.
2798 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2799 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2800 ac_cv_prog_ac_ct_CC="gcc"
2801 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2802 break 2
2803 fi
2804done
503d2be0 2805done
ca81d7a0 2806IFS=$as_save_IFS
503d2be0
AS
2807
2808fi
2809fi
2810ac_ct_CC=$ac_cv_prog_ac_ct_CC
2811if test -n "$ac_ct_CC"; then
ca81d7a0
JD
2812 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2813echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 2814else
ca81d7a0
JD
2815 { echo "$as_me:$LINENO: result: no" >&5
2816echo "${ECHO_T}no" >&6; }
503d2be0
AS
2817fi
2818
ca81d7a0
JD
2819 if test "x$ac_ct_CC" = x; then
2820 CC=""
2821 else
2822 case $cross_compiling:$ac_tool_warned in
2823yes:)
2824{ echo "$as_me:$LINENO: 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." >&5
2827echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2828whose name does not start with the host triplet. If you think this
2829configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2830ac_tool_warned=yes ;;
2831esac
2832 CC=$ac_ct_CC
2833 fi
503d2be0
AS
2834else
2835 CC="$ac_cv_prog_CC"
ba4481b5
DL
2836fi
2837
2838if test -z "$CC"; then
ca81d7a0
JD
2839 if test -n "$ac_tool_prefix"; then
2840 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 2841set dummy ${ac_tool_prefix}cc; ac_word=$2
ca81d7a0
JD
2842{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2843echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2844if test "${ac_cv_prog_CC+set}" = set; then
2845 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2846else
2847 if test -n "$CC"; then
2848 ac_cv_prog_CC="$CC" # Let the user override the test.
2849else
c0d27fcc
MR
2850as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2851for as_dir in $PATH
2852do
2853 IFS=$as_save_IFS
2854 test -z "$as_dir" && as_dir=.
2855 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2856 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2857 ac_cv_prog_CC="${ac_tool_prefix}cc"
2858 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2859 break 2
2860 fi
2861done
503d2be0 2862done
ca81d7a0 2863IFS=$as_save_IFS
503d2be0
AS
2864
2865fi
2866fi
2867CC=$ac_cv_prog_CC
2868if test -n "$CC"; then
ca81d7a0
JD
2869 { echo "$as_me:$LINENO: result: $CC" >&5
2870echo "${ECHO_T}$CC" >&6; }
503d2be0 2871else
ca81d7a0
JD
2872 { echo "$as_me:$LINENO: result: no" >&5
2873echo "${ECHO_T}no" >&6; }
503d2be0
AS
2874fi
2875
503d2be0 2876
ca81d7a0 2877 fi
503d2be0
AS
2878fi
2879if test -z "$CC"; then
2880 # Extract the first word of "cc", so it can be a program name with args.
2881set dummy cc; ac_word=$2
ca81d7a0
JD
2882{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2883echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2884if test "${ac_cv_prog_CC+set}" = set; then
2885 echo $ECHO_N "(cached) $ECHO_C" >&6
2886else
2887 if test -n "$CC"; then
2888 ac_cv_prog_CC="$CC" # Let the user override the test.
2889else
2890 ac_prog_rejected=no
c0d27fcc
MR
2891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2892for as_dir in $PATH
2893do
2894 IFS=$as_save_IFS
2895 test -z "$as_dir" && as_dir=.
2896 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2897 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2898 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2899 ac_prog_rejected=yes
2900 continue
2901 fi
2902 ac_cv_prog_CC="cc"
2903 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2904 break 2
2905 fi
2906done
503d2be0 2907done
ca81d7a0 2908IFS=$as_save_IFS
503d2be0 2909
ba4481b5
DL
2910if test $ac_prog_rejected = yes; then
2911 # We found a bogon in the path, so make sure we never use it.
2912 set dummy $ac_cv_prog_CC
2913 shift
503d2be0 2914 if test $# != 0; then
ba4481b5
DL
2915 # We chose a different compiler from the bogus one.
2916 # However, it has the same basename, so the bogon will be chosen
2917 # first if we set CC to just the basename; use the full file name.
2918 shift
6bae0ccf 2919 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2920 fi
2921fi
2922fi
2923fi
503d2be0 2924CC=$ac_cv_prog_CC
ba4481b5 2925if test -n "$CC"; then
ca81d7a0
JD
2926 { echo "$as_me:$LINENO: result: $CC" >&5
2927echo "${ECHO_T}$CC" >&6; }
ba4481b5 2928else
ca81d7a0
JD
2929 { echo "$as_me:$LINENO: result: no" >&5
2930echo "${ECHO_T}no" >&6; }
ba4481b5
DL
2931fi
2932
ca81d7a0 2933
503d2be0
AS
2934fi
2935if test -z "$CC"; then
2936 if test -n "$ac_tool_prefix"; then
ca81d7a0 2937 for ac_prog in cl.exe
503d2be0
AS
2938 do
2939 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2940set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ca81d7a0
JD
2941{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2942echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2943if test "${ac_cv_prog_CC+set}" = set; then
2944 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2945else
2946 if test -n "$CC"; then
2947 ac_cv_prog_CC="$CC" # Let the user override the test.
2948else
c0d27fcc
MR
2949as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2950for as_dir in $PATH
2951do
2952 IFS=$as_save_IFS
2953 test -z "$as_dir" && as_dir=.
2954 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2955 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2956 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2957 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2958 break 2
2959 fi
2960done
503d2be0 2961done
ca81d7a0 2962IFS=$as_save_IFS
503d2be0 2963
c4bb2108
DL
2964fi
2965fi
503d2be0 2966CC=$ac_cv_prog_CC
c4bb2108 2967if test -n "$CC"; then
ca81d7a0
JD
2968 { echo "$as_me:$LINENO: result: $CC" >&5
2969echo "${ECHO_T}$CC" >&6; }
c4bb2108 2970else
ca81d7a0
JD
2971 { echo "$as_me:$LINENO: result: no" >&5
2972echo "${ECHO_T}no" >&6; }
503d2be0
AS
2973fi
2974
ca81d7a0 2975
503d2be0
AS
2976 test -n "$CC" && break
2977 done
2978fi
2979if test -z "$CC"; then
2980 ac_ct_CC=$CC
ca81d7a0 2981 for ac_prog in cl.exe
503d2be0
AS
2982do
2983 # Extract the first word of "$ac_prog", so it can be a program name with args.
2984set dummy $ac_prog; ac_word=$2
ca81d7a0
JD
2985{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2986echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2987if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2988 echo $ECHO_N "(cached) $ECHO_C" >&6
2989else
2990 if test -n "$ac_ct_CC"; then
2991 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2992else
c0d27fcc
MR
2993as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2994for as_dir in $PATH
2995do
2996 IFS=$as_save_IFS
2997 test -z "$as_dir" && as_dir=.
2998 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2999 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3000 ac_cv_prog_ac_ct_CC="$ac_prog"
3001 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3002 break 2
3003 fi
3004done
503d2be0 3005done
ca81d7a0 3006IFS=$as_save_IFS
503d2be0 3007
c4bb2108 3008fi
503d2be0
AS
3009fi
3010ac_ct_CC=$ac_cv_prog_ac_ct_CC
3011if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3012 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3013echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 3014else
ca81d7a0
JD
3015 { echo "$as_me:$LINENO: result: no" >&5
3016echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3017fi
3018
ca81d7a0 3019
503d2be0
AS
3020 test -n "$ac_ct_CC" && break
3021done
ba4481b5 3022
ca81d7a0
JD
3023 if test "x$ac_ct_CC" = x; then
3024 CC=""
3025 else
3026 case $cross_compiling:$ac_tool_warned in
3027yes:)
3028{ echo "$as_me:$LINENO: 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." >&5
3031echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3032whose name does not start with the host triplet. If you think this
3033configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3034ac_tool_warned=yes ;;
3035esac
3036 CC=$ac_ct_CC
3037 fi
503d2be0
AS
3038fi
3039
3040fi
ba4481b5 3041
c0d27fcc 3042
19650fd6
AS
3043test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3044See \`config.log' for more details." >&5
3045echo "$as_me: error: no acceptable C compiler found in \$PATH
3046See \`config.log' for more details." >&2;}
503d2be0 3047 { (exit 1); exit 1; }; }
c4bb2108 3048
503d2be0 3049# Provide some information about the compiler.
ca81d7a0 3050echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3051ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3052{ (ac_try="$ac_compiler --version >&5"
3053case "(($ac_try" in
3054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3055 *) ac_try_echo=$ac_try;;
3056esac
3057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3058 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3059 ac_status=$?
c0d27fcc 3060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3061 (exit $ac_status); }
ca81d7a0
JD
3062{ (ac_try="$ac_compiler -v >&5"
3063case "(($ac_try" in
3064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3065 *) ac_try_echo=$ac_try;;
3066esac
3067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3068 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3069 ac_status=$?
c0d27fcc 3070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3071 (exit $ac_status); }
ca81d7a0
JD
3072{ (ac_try="$ac_compiler -V >&5"
3073case "(($ac_try" in
3074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3075 *) ac_try_echo=$ac_try;;
3076esac
3077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3078 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3079 ac_status=$?
c0d27fcc 3080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3081 (exit $ac_status); }
3082
3083cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3084/* confdefs.h. */
3085_ACEOF
3086cat confdefs.h >>conftest.$ac_ext
3087cat >>conftest.$ac_ext <<_ACEOF
3088/* end confdefs.h. */
c4bb2108 3089
503d2be0
AS
3090int
3091main ()
3092{
3093
3094 ;
3095 return 0;
3096}
3097_ACEOF
3098ac_clean_files_save=$ac_clean_files
19650fd6 3099ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3100# Try to create an executable without -o first, disregard a.out.
3101# It will help us diagnose broken compilers, and finding out an intuition
3102# of exeext.
ca81d7a0
JD
3103{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3104echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3105ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ca81d7a0
JD
3106#
3107# List of possible output files, starting from the most likely.
3108# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3109# only as a last resort. b.out is created by i960 compilers.
3110ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3111#
3112# The IRIX 6 linker writes into existing files which may not be
3113# executable, retaining their permissions. Remove them first so a
3114# subsequent execution test works.
3115ac_rmfiles=
3116for ac_file in $ac_files
3117do
3118 case $ac_file in
3119 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3120 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3121 esac
3122done
3123rm -f $ac_rmfiles
3124
3125if { (ac_try="$ac_link_default"
3126case "(($ac_try" in
3127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3128 *) ac_try_echo=$ac_try;;
3129esac
3130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3131 (eval "$ac_link_default") 2>&5
503d2be0 3132 ac_status=$?
c0d27fcc 3133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3134 (exit $ac_status); }; then
ca81d7a0
JD
3135 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3136# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3137# in a Makefile. We should not override ac_cv_exeext if it was cached,
3138# so that the user can short-circuit this test for compilers unknown to
3139# Autoconf.
f053c89f 3140for ac_file in $ac_files ''
19650fd6 3141do
6bae0ccf 3142 test -f "$ac_file" || continue
503d2be0 3143 case $ac_file in
ca81d7a0 3144 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3145 ;;
19650fd6 3146 [ab].out )
edfaf76d
LK
3147 # We found the default executable, but exeext='' is most
3148 # certainly right.
3149 break;;
19650fd6 3150 *.* )
ca81d7a0
JD
3151 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3152 then :; else
3153 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3154 fi
3155 # We set ac_cv_exeext here because the later test for it is not
3156 # safe: cross compilers may not add the suffix if given an `-o'
3157 # argument, so we may need to know it at that point already.
3158 # Even if this section looks crufty: it has the advantage of
3159 # actually working.
edfaf76d 3160 break;;
19650fd6 3161 * )
edfaf76d 3162 break;;
503d2be0
AS
3163 esac
3164done
ca81d7a0
JD
3165test "$ac_cv_exeext" = no && ac_cv_exeext=
3166
503d2be0 3167else
f053c89f
CY
3168 ac_file=''
3169fi
3170
3171{ echo "$as_me:$LINENO: result: $ac_file" >&5
3172echo "${ECHO_T}$ac_file" >&6; }
3173if test -z "$ac_file"; then
503d2be0 3174 echo "$as_me: failed program was:" >&5
19650fd6
AS
3175sed 's/^/| /' conftest.$ac_ext >&5
3176
6bae0ccf 3177{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3178See \`config.log' for more details." >&5
6bae0ccf 3179echo "$as_me: error: C compiler cannot create executables
19650fd6 3180See \`config.log' for more details." >&2;}
503d2be0
AS
3181 { (exit 77); exit 77; }; }
3182fi
3183
3184ac_exeext=$ac_cv_exeext
503d2be0 3185
ca81d7a0 3186# Check that the compiler produces executables we can run. If not, either
503d2be0 3187# the compiler is broken, or we cross compile.
ca81d7a0
JD
3188{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3189echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3190# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3191# If not cross compiling, check that we can run a simple program.
3192if test "$cross_compiling" != yes; then
3193 if { ac_try='./$ac_file'
ca81d7a0
JD
3194 { (case "(($ac_try" in
3195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3196 *) ac_try_echo=$ac_try;;
3197esac
3198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3199 (eval "$ac_try") 2>&5
503d2be0 3200 ac_status=$?
c0d27fcc 3201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3202 (exit $ac_status); }; }; then
3203 cross_compiling=no
ba4481b5 3204 else
503d2be0
AS
3205 if test "$cross_compiling" = maybe; then
3206 cross_compiling=yes
3207 else
c0d27fcc 3208 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3209If you meant to cross compile, use \`--host'.
3210See \`config.log' for more details." >&5
503d2be0 3211echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3212If you meant to cross compile, use \`--host'.
3213See \`config.log' for more details." >&2;}
503d2be0
AS
3214 { (exit 1); exit 1; }; }
3215 fi
ba4481b5 3216 fi
503d2be0 3217fi
ca81d7a0
JD
3218{ echo "$as_me:$LINENO: result: yes" >&5
3219echo "${ECHO_T}yes" >&6; }
503d2be0 3220
19650fd6 3221rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3222ac_clean_files=$ac_clean_files_save
ca81d7a0 3223# Check that the compiler produces executables we can run. If not, either
503d2be0 3224# the compiler is broken, or we cross compile.
ca81d7a0
JD
3225{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3226echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3227{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3228echo "${ECHO_T}$cross_compiling" >&6; }
3229
3230{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3231echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3232if { (ac_try="$ac_link"
3233case "(($ac_try" in
3234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3235 *) ac_try_echo=$ac_try;;
3236esac
3237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3238 (eval "$ac_link") 2>&5
503d2be0 3239 ac_status=$?
c0d27fcc 3240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3241 (exit $ac_status); }; then
3242 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3243# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3244# work properly (i.e., refer to `conftest.exe'), while it won't with
3245# `rm'.
6bae0ccf
DL
3246for ac_file in conftest.exe conftest conftest.*; do
3247 test -f "$ac_file" || continue
503d2be0 3248 case $ac_file in
ca81d7a0 3249 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3250 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3251 break;;
503d2be0
AS
3252 * ) break;;
3253 esac
3254done
ba4481b5 3255else
19650fd6
AS
3256 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3257See \`config.log' for more details." >&5
3258echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3259See \`config.log' for more details." >&2;}
503d2be0 3260 { (exit 1); exit 1; }; }
ba4481b5 3261fi
ba4481b5 3262
503d2be0 3263rm -f conftest$ac_cv_exeext
ca81d7a0
JD
3264{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3265echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3266
503d2be0
AS
3267rm -f conftest.$ac_ext
3268EXEEXT=$ac_cv_exeext
3269ac_exeext=$EXEEXT
ca81d7a0
JD
3270{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3271echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3272if test "${ac_cv_objext+set}" = set; then
3273 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3274else
503d2be0 3275 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3276/* confdefs.h. */
3277_ACEOF
3278cat confdefs.h >>conftest.$ac_ext
3279cat >>conftest.$ac_ext <<_ACEOF
3280/* end confdefs.h. */
ba4481b5 3281
503d2be0
AS
3282int
3283main ()
3284{
ba4481b5 3285
503d2be0
AS
3286 ;
3287 return 0;
3288}
3289_ACEOF
3290rm -f conftest.o conftest.obj
ca81d7a0
JD
3291if { (ac_try="$ac_compile"
3292case "(($ac_try" in
3293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3294 *) ac_try_echo=$ac_try;;
3295esac
3296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3297 (eval "$ac_compile") 2>&5
503d2be0 3298 ac_status=$?
c0d27fcc 3299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3300 (exit $ac_status); }; then
ca81d7a0
JD
3301 for ac_file in conftest.o conftest.obj conftest.*; do
3302 test -f "$ac_file" || continue;
503d2be0 3303 case $ac_file in
ca81d7a0 3304 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3305 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3306 break;;
3307 esac
3308done
c4bb2108 3309else
503d2be0 3310 echo "$as_me: failed program was:" >&5
19650fd6
AS
3311sed 's/^/| /' conftest.$ac_ext >&5
3312
3313{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3314See \`config.log' for more details." >&5
3315echo "$as_me: error: cannot compute suffix of object files: cannot compile
3316See \`config.log' for more details." >&2;}
503d2be0 3317 { (exit 1); exit 1; }; }
c4bb2108
DL
3318fi
3319
503d2be0
AS
3320rm -f conftest.$ac_cv_objext conftest.$ac_ext
3321fi
ca81d7a0
JD
3322{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3323echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3324OBJEXT=$ac_cv_objext
3325ac_objext=$OBJEXT
ca81d7a0
JD
3326{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3327echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3328if test "${ac_cv_c_compiler_gnu+set}" = set; then
3329 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3330else
503d2be0 3331 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3332/* confdefs.h. */
3333_ACEOF
3334cat confdefs.h >>conftest.$ac_ext
3335cat >>conftest.$ac_ext <<_ACEOF
3336/* end confdefs.h. */
503d2be0
AS
3337
3338int
3339main ()
3340{
3341#ifndef __GNUC__
3342 choke me
3343#endif
3344
3345 ;
3346 return 0;
3347}
3348_ACEOF
3349rm -f conftest.$ac_objext
ca81d7a0
JD
3350if { (ac_try="$ac_compile"
3351case "(($ac_try" in
3352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3353 *) ac_try_echo=$ac_try;;
3354esac
3355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3356 (eval "$ac_compile") 2>conftest.er1
503d2be0 3357 ac_status=$?
edfaf76d
LK
3358 grep -v '^ *+' conftest.er1 >conftest.err
3359 rm -f conftest.er1
3360 cat conftest.err >&5
c0d27fcc 3361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3362 (exit $ac_status); } && {
3363 test -z "$ac_c_werror_flag" ||
3364 test ! -s conftest.err
3365 } && test -s conftest.$ac_objext; then
503d2be0
AS
3366 ac_compiler_gnu=yes
3367else
3368 echo "$as_me: failed program was:" >&5
19650fd6
AS
3369sed 's/^/| /' conftest.$ac_ext >&5
3370
ca81d7a0 3371 ac_compiler_gnu=no
503d2be0 3372fi
ca81d7a0
JD
3373
3374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3375ac_cv_c_compiler_gnu=$ac_compiler_gnu
3376
3377fi
ca81d7a0
JD
3378{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3379echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3380GCC=`test $ac_compiler_gnu = yes && echo yes`
3381ac_test_CFLAGS=${CFLAGS+set}
3382ac_save_CFLAGS=$CFLAGS
ca81d7a0
JD
3383{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3384echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3385if test "${ac_cv_prog_cc_g+set}" = set; then
3386 echo $ECHO_N "(cached) $ECHO_C" >&6
3387else
ca81d7a0
JD
3388 ac_save_c_werror_flag=$ac_c_werror_flag
3389 ac_c_werror_flag=yes
3390 ac_cv_prog_cc_g=no
3391 CFLAGS="-g"
3392 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3393/* confdefs.h. */
3394_ACEOF
3395cat confdefs.h >>conftest.$ac_ext
3396cat >>conftest.$ac_ext <<_ACEOF
3397/* end confdefs.h. */
503d2be0
AS
3398
3399int
3400main ()
3401{
3402
3403 ;
3404 return 0;
3405}
3406_ACEOF
3407rm -f conftest.$ac_objext
ca81d7a0
JD
3408if { (ac_try="$ac_compile"
3409case "(($ac_try" in
3410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3411 *) ac_try_echo=$ac_try;;
3412esac
3413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3414 (eval "$ac_compile") 2>conftest.er1
503d2be0 3415 ac_status=$?
edfaf76d
LK
3416 grep -v '^ *+' conftest.er1 >conftest.err
3417 rm -f conftest.er1
3418 cat conftest.err >&5
c0d27fcc 3419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3420 (exit $ac_status); } && {
3421 test -z "$ac_c_werror_flag" ||
3422 test ! -s conftest.err
3423 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3424 ac_cv_prog_cc_g=yes
3425else
503d2be0 3426 echo "$as_me: failed program was:" >&5
19650fd6
AS
3427sed 's/^/| /' conftest.$ac_ext >&5
3428
ca81d7a0
JD
3429 CFLAGS=""
3430 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3431/* confdefs.h. */
3432_ACEOF
3433cat confdefs.h >>conftest.$ac_ext
3434cat >>conftest.$ac_ext <<_ACEOF
3435/* end confdefs.h. */
edfaf76d 3436
6bae0ccf
DL
3437int
3438main ()
3439{
ca81d7a0 3440
6bae0ccf
DL
3441 ;
3442 return 0;
3443}
3444_ACEOF
ca81d7a0
JD
3445rm -f conftest.$ac_objext
3446if { (ac_try="$ac_compile"
3447case "(($ac_try" in
3448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3449 *) ac_try_echo=$ac_try;;
3450esac
3451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3452 (eval "$ac_compile") 2>conftest.er1
edfaf76d 3453 ac_status=$?
edfaf76d
LK
3454 grep -v '^ *+' conftest.er1 >conftest.err
3455 rm -f conftest.er1
3456 cat conftest.err >&5
edfaf76d 3457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3458 (exit $ac_status); } && {
3459 test -z "$ac_c_werror_flag" ||
3460 test ! -s conftest.err
3461 } && test -s conftest.$ac_objext; then
ca81d7a0 3462 :
6bae0ccf
DL
3463else
3464 echo "$as_me: failed program was:" >&5
19650fd6
AS
3465sed 's/^/| /' conftest.$ac_ext >&5
3466
ca81d7a0
JD
3467 ac_c_werror_flag=$ac_save_c_werror_flag
3468 CFLAGS="-g"
3469 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 3470/* confdefs.h. */
19650fd6
AS
3471_ACEOF
3472cat confdefs.h >>conftest.$ac_ext
3473cat >>conftest.$ac_ext <<_ACEOF
3474/* end confdefs.h. */
ca81d7a0 3475
503d2be0
AS
3476int
3477main ()
3478{
ca81d7a0 3479
503d2be0
AS
3480 ;
3481 return 0;
3482}
3483_ACEOF
3484rm -f conftest.$ac_objext
ca81d7a0
JD
3485if { (ac_try="$ac_compile"
3486case "(($ac_try" in
3487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3488 *) ac_try_echo=$ac_try;;
3489esac
3490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3491 (eval "$ac_compile") 2>conftest.er1
503d2be0 3492 ac_status=$?
edfaf76d
LK
3493 grep -v '^ *+' conftest.er1 >conftest.err
3494 rm -f conftest.er1
3495 cat conftest.err >&5
c0d27fcc 3496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3497 (exit $ac_status); } && {
3498 test -z "$ac_c_werror_flag" ||
3499 test ! -s conftest.err
3500 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3501 ac_cv_prog_cc_g=yes
3502else
503d2be0 3503 echo "$as_me: failed program was:" >&5
19650fd6
AS
3504sed 's/^/| /' conftest.$ac_ext >&5
3505
ca81d7a0 3506
ba4481b5 3507fi
ca81d7a0
JD
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
3513fi
3514
3515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3516 ac_c_werror_flag=$ac_save_c_werror_flag
ba4481b5 3517fi
ca81d7a0
JD
3518{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3519echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
c4bb2108 3520if test "$ac_test_CFLAGS" = set; then
503d2be0 3521 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3522elif test $ac_cv_prog_cc_g = yes; then
3523 if test "$GCC" = yes; then
ba4481b5
DL
3524 CFLAGS="-g -O2"
3525 else
c4bb2108 3526 CFLAGS="-g"
ba4481b5 3527 fi
22afa6e8 3528else
c4bb2108
DL
3529 if test "$GCC" = yes; then
3530 CFLAGS="-O2"
3531 else
3532 CFLAGS=
3533 fi
ba4481b5 3534fi
ca81d7a0
JD
3535{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3536echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3537if test "${ac_cv_prog_cc_c89+set}" = set; then
6bae0ccf
DL
3538 echo $ECHO_N "(cached) $ECHO_C" >&6
3539else
ca81d7a0 3540 ac_cv_prog_cc_c89=no
6bae0ccf
DL
3541ac_save_CC=$CC
3542cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3543/* confdefs.h. */
3544_ACEOF
3545cat confdefs.h >>conftest.$ac_ext
3546cat >>conftest.$ac_ext <<_ACEOF
3547/* end confdefs.h. */
6bae0ccf
DL
3548#include <stdarg.h>
3549#include <stdio.h>
3550#include <sys/types.h>
3551#include <sys/stat.h>
3552/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3553struct buf { int x; };
3554FILE * (*rcsopen) (struct buf *, struct stat *, int);
3555static char *e (p, i)
3556 char **p;
3557 int i;
3558{
3559 return p[i];
3560}
3561static char *f (char * (*g) (char **, int), char **p, ...)
3562{
3563 char *s;
3564 va_list v;
3565 va_start (v,p);
3566 s = g (p, va_arg (v,int));
3567 va_end (v);
3568 return s;
3569}
edfaf76d
LK
3570
3571/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3572 function prototypes and stuff, but not '\xHH' hex character constants.
3573 These don't provoke an error unfortunately, instead are silently treated
ca81d7a0 3574 as 'x'. The following induces an error, until -std is added to get
edfaf76d
LK
3575 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3576 array size at least. It's necessary to write '\x00'==0 to get something
ca81d7a0 3577 that's true only with -std. */
edfaf76d
LK
3578int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3579
ca81d7a0
JD
3580/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3581 inside strings and character constants. */
3582#define FOO(x) 'x'
3583int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3584
6bae0ccf
DL
3585int test (int i, double x);
3586struct s1 {int (*f) (int a);};
3587struct s2 {int (*f) (double a);};
3588int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3589int argc;
3590char **argv;
3591int
3592main ()
3593{
3594return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3595 ;
3596 return 0;
3597}
3598_ACEOF
ca81d7a0
JD
3599for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3600 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6bae0ccf
DL
3601do
3602 CC="$ac_save_CC $ac_arg"
3603 rm -f conftest.$ac_objext
ca81d7a0
JD
3604if { (ac_try="$ac_compile"
3605case "(($ac_try" in
3606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3607 *) ac_try_echo=$ac_try;;
3608esac
3609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3610 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3611 ac_status=$?
edfaf76d
LK
3612 grep -v '^ *+' conftest.er1 >conftest.err
3613 rm -f conftest.er1
3614 cat conftest.err >&5
6bae0ccf 3615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3616 (exit $ac_status); } && {
3617 test -z "$ac_c_werror_flag" ||
3618 test ! -s conftest.err
3619 } && test -s conftest.$ac_objext; then
ca81d7a0 3620 ac_cv_prog_cc_c89=$ac_arg
6bae0ccf
DL
3621else
3622 echo "$as_me: failed program was:" >&5
19650fd6
AS
3623sed 's/^/| /' conftest.$ac_ext >&5
3624
ca81d7a0 3625
6bae0ccf 3626fi
ca81d7a0
JD
3627
3628rm -f core conftest.err conftest.$ac_objext
3629 test "x$ac_cv_prog_cc_c89" != "xno" && break
6bae0ccf 3630done
ca81d7a0 3631rm -f conftest.$ac_ext
6bae0ccf
DL
3632CC=$ac_save_CC
3633
3634fi
ca81d7a0
JD
3635# AC_CACHE_VAL
3636case "x$ac_cv_prog_cc_c89" in
3637 x)
3638 { echo "$as_me:$LINENO: result: none needed" >&5
3639echo "${ECHO_T}none needed" >&6; } ;;
3640 xno)
3641 { echo "$as_me:$LINENO: result: unsupported" >&5
3642echo "${ECHO_T}unsupported" >&6; } ;;
6bae0ccf 3643 *)
ca81d7a0
JD
3644 CC="$CC $ac_cv_prog_cc_c89"
3645 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3646echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
6bae0ccf
DL
3647esac
3648
19650fd6 3649
503d2be0
AS
3650ac_ext=c
3651ac_cpp='$CPP $CPPFLAGS'
3652ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3653ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3654ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3655
c0d27fcc 3656
ba4481b5
DL
3657# On Suns, sometimes $CPP names a directory.
3658if test -n "$CPP" && test -d "$CPP"; then
3659 CPP=
3660fi
3661
089a966d
GM
3662## If not using gcc, and on Solaris, and no CPP specified, see if
3663## using a Sun compiler, which needs -Xs to prevent whitespace.
3664if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
3665 test x"$CPP" = x; then
3666 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
3667echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
3668
3669if test "${emacs_cv_sunpro_c+set}" = set; then
3670 echo $ECHO_N "(cached) $ECHO_C" >&6
3671else
3672 cat >conftest.$ac_ext <<_ACEOF
3673/* confdefs.h. */
3674_ACEOF
3675cat confdefs.h >>conftest.$ac_ext
3676cat >>conftest.$ac_ext <<_ACEOF
3677/* end confdefs.h. */
3678
3679int
3680main ()
3681{
3682#ifndef __SUNPRO_C
3683fail;
3684#endif
3685
3686 ;
3687 return 0;
3688}
3689_ACEOF
3690rm -f conftest.$ac_objext conftest$ac_exeext
3691if { (ac_try="$ac_link"
3692case "(($ac_try" in
3693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3694 *) ac_try_echo=$ac_try;;
3695esac
3696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3697 (eval "$ac_link") 2>conftest.er1
3698 ac_status=$?
3699 grep -v '^ *+' conftest.er1 >conftest.err
3700 rm -f conftest.er1
3701 cat conftest.err >&5
3702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3703 (exit $ac_status); } && {
3704 test -z "$ac_c_werror_flag" ||
3705 test ! -s conftest.err
3706 } && test -s conftest$ac_exeext &&
3707 $as_test_x conftest$ac_exeext; then
3708 emacs_cv_sunpro_c=yes
3709else
3710 echo "$as_me: failed program was:" >&5
3711sed 's/^/| /' conftest.$ac_ext >&5
3712
3713 emacs_cv_sunpro_c=no
3714fi
3715
3716rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3717 conftest$ac_exeext conftest.$ac_ext
3718fi
3719
3720 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
3721echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
3722
3723 if test x"$emacs_cv_sunpro_c" = xyes; then
3724 NON_GNU_CPP="$CC -E -Xs"
3725 fi
3726fi
3727
ba4481b5
DL
3728#### Some systems specify a CPP to use unless we are using GCC.
3729#### Now that we know whether we are using GCC, we can decide whether
3730#### to use that one.
3731if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3732then
3733 CPP="$NON_GNU_CPP"
3734fi
3735
3736#### Some systems specify a CC to use unless we are using GCC.
3737#### Now that we know whether we are using GCC, we can decide whether
3738#### to use that one.
3739if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3740 test x$cc_specified != xyes
3741then
3742 CC="$NON_GNU_CC"
3743fi
3744
3745if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3746then
3747 CC="$CC $GCC_TEST_OPTIONS"
3748fi
3749
3750if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3751then
3752 CC="$CC $NON_GCC_TEST_OPTIONS"
3753fi
3754
a51f4969
SM
3755
3756cat >>confdefs.h <<\_ACEOF
3757#define _GNU_SOURCE 1
3758_ACEOF
3759
3760
e143ad11
AS
3761ac_ext=c
3762ac_cpp='$CPP $CPPFLAGS'
3763ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3764ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3765ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
3766{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3767echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
3768# On Suns, sometimes $CPP names a directory.
3769if test -n "$CPP" && test -d "$CPP"; then
3770 CPP=
3771fi
3772if test -z "$CPP"; then
3773 if test "${ac_cv_prog_CPP+set}" = set; then
3774 echo $ECHO_N "(cached) $ECHO_C" >&6
3775else
3776 # Double quotes because CPP needs to be expanded
3777 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3778 do
3779 ac_preproc_ok=false
3780for ac_c_preproc_warn_flag in '' yes
3781do
3782 # Use a header file that comes with gcc, so configuring glibc
3783 # with a fresh cross-compiler works.
3784 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3785 # <limits.h> exists even on freestanding compilers.
3786 # On the NeXT, cc -E runs the code through the compiler's parser,
3787 # not just through cpp. "Syntax error" is here to catch this case.
3788 cat >conftest.$ac_ext <<_ACEOF
3789/* confdefs.h. */
3790_ACEOF
3791cat confdefs.h >>conftest.$ac_ext
3792cat >>conftest.$ac_ext <<_ACEOF
3793/* end confdefs.h. */
3794#ifdef __STDC__
3795# include <limits.h>
3796#else
3797# include <assert.h>
3798#endif
3799 Syntax error
3800_ACEOF
ca81d7a0
JD
3801if { (ac_try="$ac_cpp conftest.$ac_ext"
3802case "(($ac_try" in
3803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3804 *) ac_try_echo=$ac_try;;
3805esac
3806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3807 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3808 ac_status=$?
3809 grep -v '^ *+' conftest.er1 >conftest.err
3810 rm -f conftest.er1
3811 cat conftest.err >&5
3812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3813 (exit $ac_status); } >/dev/null && {
3814 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3815 test ! -s conftest.err
3816 }; then
e143ad11
AS
3817 :
3818else
3819 echo "$as_me: failed program was:" >&5
3820sed 's/^/| /' conftest.$ac_ext >&5
3821
3822 # Broken: fails on valid input.
3823continue
3824fi
ca81d7a0 3825
e143ad11
AS
3826rm -f conftest.err conftest.$ac_ext
3827
ca81d7a0 3828 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3829 # can be detected and how.
3830 cat >conftest.$ac_ext <<_ACEOF
3831/* confdefs.h. */
3832_ACEOF
3833cat confdefs.h >>conftest.$ac_ext
3834cat >>conftest.$ac_ext <<_ACEOF
3835/* end confdefs.h. */
3836#include <ac_nonexistent.h>
3837_ACEOF
ca81d7a0
JD
3838if { (ac_try="$ac_cpp conftest.$ac_ext"
3839case "(($ac_try" in
3840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3841 *) ac_try_echo=$ac_try;;
3842esac
3843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3844 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3845 ac_status=$?
3846 grep -v '^ *+' conftest.er1 >conftest.err
3847 rm -f conftest.er1
3848 cat conftest.err >&5
3849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3850 (exit $ac_status); } >/dev/null && {
3851 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3852 test ! -s conftest.err
3853 }; then
e143ad11
AS
3854 # Broken: success on invalid input.
3855continue
3856else
3857 echo "$as_me: failed program was:" >&5
3858sed 's/^/| /' conftest.$ac_ext >&5
3859
3860 # Passes both tests.
3861ac_preproc_ok=:
3862break
3863fi
ca81d7a0 3864
e143ad11
AS
3865rm -f conftest.err conftest.$ac_ext
3866
3867done
3868# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3869rm -f conftest.err conftest.$ac_ext
3870if $ac_preproc_ok; then
3871 break
3872fi
3873
3874 done
3875 ac_cv_prog_CPP=$CPP
3876
3877fi
3878 CPP=$ac_cv_prog_CPP
3879else
3880 ac_cv_prog_CPP=$CPP
3881fi
ca81d7a0
JD
3882{ echo "$as_me:$LINENO: result: $CPP" >&5
3883echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
3884ac_preproc_ok=false
3885for ac_c_preproc_warn_flag in '' yes
3886do
3887 # Use a header file that comes with gcc, so configuring glibc
3888 # with a fresh cross-compiler works.
3889 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3890 # <limits.h> exists even on freestanding compilers.
3891 # On the NeXT, cc -E runs the code through the compiler's parser,
3892 # not just through cpp. "Syntax error" is here to catch this case.
3893 cat >conftest.$ac_ext <<_ACEOF
3894/* confdefs.h. */
3895_ACEOF
3896cat confdefs.h >>conftest.$ac_ext
3897cat >>conftest.$ac_ext <<_ACEOF
3898/* end confdefs.h. */
3899#ifdef __STDC__
3900# include <limits.h>
3901#else
3902# include <assert.h>
3903#endif
3904 Syntax error
3905_ACEOF
ca81d7a0
JD
3906if { (ac_try="$ac_cpp conftest.$ac_ext"
3907case "(($ac_try" in
3908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3909 *) ac_try_echo=$ac_try;;
3910esac
3911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3912 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3913 ac_status=$?
3914 grep -v '^ *+' conftest.er1 >conftest.err
3915 rm -f conftest.er1
3916 cat conftest.err >&5
3917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3918 (exit $ac_status); } >/dev/null && {
3919 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3920 test ! -s conftest.err
3921 }; then
e143ad11
AS
3922 :
3923else
3924 echo "$as_me: failed program was:" >&5
3925sed 's/^/| /' conftest.$ac_ext >&5
3926
3927 # Broken: fails on valid input.
3928continue
3929fi
ca81d7a0 3930
e143ad11
AS
3931rm -f conftest.err conftest.$ac_ext
3932
ca81d7a0 3933 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3934 # can be detected and how.
3935 cat >conftest.$ac_ext <<_ACEOF
3936/* confdefs.h. */
3937_ACEOF
3938cat confdefs.h >>conftest.$ac_ext
3939cat >>conftest.$ac_ext <<_ACEOF
3940/* end confdefs.h. */
3941#include <ac_nonexistent.h>
3942_ACEOF
ca81d7a0
JD
3943if { (ac_try="$ac_cpp conftest.$ac_ext"
3944case "(($ac_try" in
3945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3946 *) ac_try_echo=$ac_try;;
3947esac
3948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3949 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3950 ac_status=$?
3951 grep -v '^ *+' conftest.er1 >conftest.err
3952 rm -f conftest.er1
3953 cat conftest.err >&5
3954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3955 (exit $ac_status); } >/dev/null && {
3956 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3957 test ! -s conftest.err
3958 }; then
e143ad11
AS
3959 # Broken: success on invalid input.
3960continue
3961else
3962 echo "$as_me: failed program was:" >&5
3963sed 's/^/| /' conftest.$ac_ext >&5
3964
3965 # Passes both tests.
3966ac_preproc_ok=:
3967break
3968fi
ca81d7a0 3969
e143ad11
AS
3970rm -f conftest.err conftest.$ac_ext
3971
3972done
3973# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3974rm -f conftest.err conftest.$ac_ext
3975if $ac_preproc_ok; then
3976 :
3977else
3978 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3979See \`config.log' for more details." >&5
3980echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3981See \`config.log' for more details." >&2;}
3982 { (exit 1); exit 1; }; }
3983fi
3984
3985ac_ext=c
3986ac_cpp='$CPP $CPPFLAGS'
3987ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3988ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3989ac_compiler_gnu=$ac_cv_c_compiler_gnu
3990
3991
ca81d7a0
JD
3992{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3993echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3994if test "${ac_cv_path_GREP+set}" = set; then
3995 echo $ECHO_N "(cached) $ECHO_C" >&6
3996else
3997 # Extract the first word of "grep ggrep" to use in msg output
3998if test -z "$GREP"; then
3999set dummy grep ggrep; ac_prog_name=$2
4000if test "${ac_cv_path_GREP+set}" = set; then
4001 echo $ECHO_N "(cached) $ECHO_C" >&6
4002else
4003 ac_path_GREP_found=false
4004# Loop through the user's path and test for each of PROGNAME-LIST
4005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4006for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4007do
4008 IFS=$as_save_IFS
4009 test -z "$as_dir" && as_dir=.
4010 for ac_prog in grep ggrep; do
4011 for ac_exec_ext in '' $ac_executable_extensions; do
4012 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4013 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
ca81d7a0
JD
4014 # Check for GNU ac_path_GREP and select it if it is found.
4015 # Check for GNU $ac_path_GREP
4016case `"$ac_path_GREP" --version 2>&1` in
4017*GNU*)
4018 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4019*)
4020 ac_count=0
4021 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4022 while :
4023 do
4024 cat "conftest.in" "conftest.in" >"conftest.tmp"
4025 mv "conftest.tmp" "conftest.in"
4026 cp "conftest.in" "conftest.nl"
4027 echo 'GREP' >> "conftest.nl"
4028 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4029 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4030 ac_count=`expr $ac_count + 1`
4031 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4032 # Best one so far, save it but keep looking for a better one
4033 ac_cv_path_GREP="$ac_path_GREP"
4034 ac_path_GREP_max=$ac_count
4035 fi
4036 # 10*(2^10) chars as input seems more than enough
4037 test $ac_count -gt 10 && break
4038 done
4039 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4040esac
4041
4042
4043 $ac_path_GREP_found && break 3
4044 done
4045done
4046
4047done
4048IFS=$as_save_IFS
4049
4050
4051fi
4052
4053GREP="$ac_cv_path_GREP"
4054if test -z "$GREP"; then
4055 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4056echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4057 { (exit 1); exit 1; }; }
4058fi
4059
4060else
4061 ac_cv_path_GREP=$GREP
4062fi
4063
4064
4065fi
4066{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4067echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4068 GREP="$ac_cv_path_GREP"
4069
4070
4071{ echo "$as_me:$LINENO: checking for egrep" >&5
4072echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4073if test "${ac_cv_path_EGREP+set}" = set; then
e143ad11
AS
4074 echo $ECHO_N "(cached) $ECHO_C" >&6
4075else
ca81d7a0
JD
4076 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4077 then ac_cv_path_EGREP="$GREP -E"
4078 else
4079 # Extract the first word of "egrep" to use in msg output
4080if test -z "$EGREP"; then
4081set dummy egrep; ac_prog_name=$2
4082if test "${ac_cv_path_EGREP+set}" = set; then
4083 echo $ECHO_N "(cached) $ECHO_C" >&6
4084else
4085 ac_path_EGREP_found=false
4086# Loop through the user's path and test for each of PROGNAME-LIST
4087as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4088for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4089do
4090 IFS=$as_save_IFS
4091 test -z "$as_dir" && as_dir=.
4092 for ac_prog in egrep; do
4093 for ac_exec_ext in '' $ac_executable_extensions; do
4094 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4095 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
ca81d7a0
JD
4096 # Check for GNU ac_path_EGREP and select it if it is found.
4097 # Check for GNU $ac_path_EGREP
4098case `"$ac_path_EGREP" --version 2>&1` in
4099*GNU*)
4100 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4101*)
4102 ac_count=0
4103 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4104 while :
4105 do
4106 cat "conftest.in" "conftest.in" >"conftest.tmp"
4107 mv "conftest.tmp" "conftest.in"
4108 cp "conftest.in" "conftest.nl"
4109 echo 'EGREP' >> "conftest.nl"
4110 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4111 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4112 ac_count=`expr $ac_count + 1`
4113 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4114 # Best one so far, save it but keep looking for a better one
4115 ac_cv_path_EGREP="$ac_path_EGREP"
4116 ac_path_EGREP_max=$ac_count
e143ad11 4117 fi
ca81d7a0
JD
4118 # 10*(2^10) chars as input seems more than enough
4119 test $ac_count -gt 10 && break
4120 done
4121 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4122esac
4123
4124
4125 $ac_path_EGREP_found && break 3
4126 done
4127done
4128
4129done
4130IFS=$as_save_IFS
4131
4132
e143ad11 4133fi
e143ad11 4134
ca81d7a0
JD
4135EGREP="$ac_cv_path_EGREP"
4136if test -z "$EGREP"; then
4137 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4138echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4139 { (exit 1); exit 1; }; }
4140fi
e143ad11 4141
ca81d7a0
JD
4142else
4143 ac_cv_path_EGREP=$EGREP
4144fi
e143ad11 4145
ca81d7a0
JD
4146
4147 fi
8eeae1c9 4148fi
ca81d7a0
JD
4149{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4150echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4151 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4152
4153
4154
ca81d7a0
JD
4155{ echo "$as_me:$LINENO: checking for AIX" >&5
4156echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4157cat >conftest.$ac_ext <<_ACEOF
4158/* confdefs.h. */
4159_ACEOF
4160cat confdefs.h >>conftest.$ac_ext
4161cat >>conftest.$ac_ext <<_ACEOF
4162/* end confdefs.h. */
4163#ifdef _AIX
4164 yes
4165#endif
4166
4167_ACEOF
4168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4169 $EGREP "yes" >/dev/null 2>&1; then
ca81d7a0
JD
4170 { echo "$as_me:$LINENO: result: yes" >&5
4171echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4172cat >>confdefs.h <<\_ACEOF
4173#define _ALL_SOURCE 1
4174_ACEOF
4175
4176else
ca81d7a0
JD
4177 { echo "$as_me:$LINENO: result: no" >&5
4178echo "${ECHO_T}no" >&6; }
e143ad11 4179fi
a51f4969
SM
4180rm -f conftest*
4181
4182
4183{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4184echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4185if test "${ac_cv_header_stdc+set}" = set; then
4186 echo $ECHO_N "(cached) $ECHO_C" >&6
4187else
4188 cat >conftest.$ac_ext <<_ACEOF
4189/* confdefs.h. */
4190_ACEOF
4191cat confdefs.h >>conftest.$ac_ext
4192cat >>conftest.$ac_ext <<_ACEOF
4193/* end confdefs.h. */
4194#include <stdlib.h>
4195#include <stdarg.h>
4196#include <string.h>
4197#include <float.h>
4198
4199int
4200main ()
4201{
4202
4203 ;
4204 return 0;
4205}
4206_ACEOF
4207rm -f conftest.$ac_objext
4208if { (ac_try="$ac_compile"
4209case "(($ac_try" in
4210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4211 *) ac_try_echo=$ac_try;;
4212esac
4213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4214 (eval "$ac_compile") 2>conftest.er1
4215 ac_status=$?
4216 grep -v '^ *+' conftest.er1 >conftest.err
4217 rm -f conftest.er1
4218 cat conftest.err >&5
4219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4220 (exit $ac_status); } && {
4221 test -z "$ac_c_werror_flag" ||
4222 test ! -s conftest.err
4223 } && test -s conftest.$ac_objext; then
4224 ac_cv_header_stdc=yes
4225else
4226 echo "$as_me: failed program was:" >&5
4227sed 's/^/| /' conftest.$ac_ext >&5
4228
4229 ac_cv_header_stdc=no
4230fi
4231
4232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4233
4234if test $ac_cv_header_stdc = yes; then
4235 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4236 cat >conftest.$ac_ext <<_ACEOF
4237/* confdefs.h. */
4238_ACEOF
4239cat confdefs.h >>conftest.$ac_ext
4240cat >>conftest.$ac_ext <<_ACEOF
4241/* end confdefs.h. */
4242#include <string.h>
4243
4244_ACEOF
4245if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4246 $EGREP "memchr" >/dev/null 2>&1; then
4247 :
4248else
4249 ac_cv_header_stdc=no
4250fi
4251rm -f conftest*
4252
4253fi
4254
4255if test $ac_cv_header_stdc = yes; then
4256 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4257 cat >conftest.$ac_ext <<_ACEOF
4258/* confdefs.h. */
4259_ACEOF
4260cat confdefs.h >>conftest.$ac_ext
4261cat >>conftest.$ac_ext <<_ACEOF
4262/* end confdefs.h. */
4263#include <stdlib.h>
4264
4265_ACEOF
4266if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4267 $EGREP "free" >/dev/null 2>&1; then
4268 :
4269else
4270 ac_cv_header_stdc=no
4271fi
4272rm -f conftest*
4273
4274fi
4275
4276if test $ac_cv_header_stdc = yes; then
4277 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4278 if test "$cross_compiling" = yes; then
4279 :
4280else
4281 cat >conftest.$ac_ext <<_ACEOF
4282/* confdefs.h. */
4283_ACEOF
4284cat confdefs.h >>conftest.$ac_ext
4285cat >>conftest.$ac_ext <<_ACEOF
4286/* end confdefs.h. */
4287#include <ctype.h>
4288#include <stdlib.h>
4289#if ((' ' & 0x0FF) == 0x020)
4290# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4291# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4292#else
4293# define ISLOWER(c) \
4294 (('a' <= (c) && (c) <= 'i') \
4295 || ('j' <= (c) && (c) <= 'r') \
4296 || ('s' <= (c) && (c) <= 'z'))
4297# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4298#endif
4299
4300#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4301int
4302main ()
4303{
4304 int i;
4305 for (i = 0; i < 256; i++)
4306 if (XOR (islower (i), ISLOWER (i))
4307 || toupper (i) != TOUPPER (i))
4308 return 2;
4309 return 0;
4310}
4311_ACEOF
4312rm -f conftest$ac_exeext
4313if { (ac_try="$ac_link"
4314case "(($ac_try" in
4315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4316 *) ac_try_echo=$ac_try;;
4317esac
4318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4319 (eval "$ac_link") 2>&5
4320 ac_status=$?
4321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4322 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4323 { (case "(($ac_try" in
4324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4325 *) ac_try_echo=$ac_try;;
4326esac
4327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4328 (eval "$ac_try") 2>&5
4329 ac_status=$?
4330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4331 (exit $ac_status); }; }; then
4332 :
4333else
4334 echo "$as_me: program exited with status $ac_status" >&5
4335echo "$as_me: failed program was:" >&5
4336sed 's/^/| /' conftest.$ac_ext >&5
4337
4338( exit $ac_status )
4339ac_cv_header_stdc=no
4340fi
4341rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4342fi
4343
4344
4345fi
4346fi
4347{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4348echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4349if test $ac_cv_header_stdc = yes; then
4350
4351cat >>confdefs.h <<\_ACEOF
4352#define STDC_HEADERS 1
4353_ACEOF
4354
4355fi
4356
4357# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4368 inttypes.h stdint.h unistd.h
4369do
4370as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4371{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4372echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4373if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4374 echo $ECHO_N "(cached) $ECHO_C" >&6
4375else
4376 cat >conftest.$ac_ext <<_ACEOF
4377/* confdefs.h. */
4378_ACEOF
4379cat confdefs.h >>conftest.$ac_ext
4380cat >>conftest.$ac_ext <<_ACEOF
4381/* end confdefs.h. */
4382$ac_includes_default
4383
4384#include <$ac_header>
4385_ACEOF
4386rm -f conftest.$ac_objext
4387if { (ac_try="$ac_compile"
4388case "(($ac_try" in
4389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4390 *) ac_try_echo=$ac_try;;
4391esac
4392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4393 (eval "$ac_compile") 2>conftest.er1
4394 ac_status=$?
4395 grep -v '^ *+' conftest.er1 >conftest.err
4396 rm -f conftest.er1
4397 cat conftest.err >&5
4398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4399 (exit $ac_status); } && {
4400 test -z "$ac_c_werror_flag" ||
4401 test ! -s conftest.err
4402 } && test -s conftest.$ac_objext; then
4403 eval "$as_ac_Header=yes"
4404else
4405 echo "$as_me: failed program was:" >&5
4406sed 's/^/| /' conftest.$ac_ext >&5
4407
4408 eval "$as_ac_Header=no"
4409fi
4410
4411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4412fi
4413ac_res=`eval echo '${'$as_ac_Header'}'`
4414 { echo "$as_me:$LINENO: result: $ac_res" >&5
4415echo "${ECHO_T}$ac_res" >&6; }
4416if test `eval echo '${'$as_ac_Header'}'` = yes; then
4417 cat >>confdefs.h <<_ACEOF
4418#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4419_ACEOF
4420
4421fi
4422
4423done
4424
4425
4426if test "${ac_cv_header_minix_config_h+set}" = set; then
4427 { echo "$as_me:$LINENO: checking for minix/config.h" >&5
4428echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4429if test "${ac_cv_header_minix_config_h+set}" = set; then
4430 echo $ECHO_N "(cached) $ECHO_C" >&6
4431fi
4432{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4433echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
4434else
4435 # Is the header compilable?
4436{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4437echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; }
4438cat >conftest.$ac_ext <<_ACEOF
4439/* confdefs.h. */
4440_ACEOF
4441cat confdefs.h >>conftest.$ac_ext
4442cat >>conftest.$ac_ext <<_ACEOF
4443/* end confdefs.h. */
4444$ac_includes_default
4445#include <minix/config.h>
4446_ACEOF
4447rm -f conftest.$ac_objext
4448if { (ac_try="$ac_compile"
4449case "(($ac_try" in
4450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4451 *) ac_try_echo=$ac_try;;
4452esac
4453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4454 (eval "$ac_compile") 2>conftest.er1
4455 ac_status=$?
4456 grep -v '^ *+' conftest.er1 >conftest.err
4457 rm -f conftest.er1
4458 cat conftest.err >&5
4459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4460 (exit $ac_status); } && {
4461 test -z "$ac_c_werror_flag" ||
4462 test ! -s conftest.err
4463 } && test -s conftest.$ac_objext; then
4464 ac_header_compiler=yes
4465else
4466 echo "$as_me: failed program was:" >&5
4467sed 's/^/| /' conftest.$ac_ext >&5
4468
4469 ac_header_compiler=no
4470fi
4471
4472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4473{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4474echo "${ECHO_T}$ac_header_compiler" >&6; }
4475
4476# Is the header present?
4477{ echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4478echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; }
4479cat >conftest.$ac_ext <<_ACEOF
4480/* confdefs.h. */
4481_ACEOF
4482cat confdefs.h >>conftest.$ac_ext
4483cat >>conftest.$ac_ext <<_ACEOF
4484/* end confdefs.h. */
4485#include <minix/config.h>
4486_ACEOF
4487if { (ac_try="$ac_cpp conftest.$ac_ext"
4488case "(($ac_try" in
4489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4490 *) ac_try_echo=$ac_try;;
4491esac
4492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4493 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4494 ac_status=$?
4495 grep -v '^ *+' conftest.er1 >conftest.err
4496 rm -f conftest.er1
4497 cat conftest.err >&5
4498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4499 (exit $ac_status); } >/dev/null && {
4500 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4501 test ! -s conftest.err
4502 }; then
4503 ac_header_preproc=yes
4504else
4505 echo "$as_me: failed program was:" >&5
4506sed 's/^/| /' conftest.$ac_ext >&5
4507
4508 ac_header_preproc=no
4509fi
4510
4511rm -f conftest.err conftest.$ac_ext
4512{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4513echo "${ECHO_T}$ac_header_preproc" >&6; }
4514
4515# So? What about this header?
4516case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4517 yes:no: )
4518 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4519echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4520 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4521echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
4522 ac_header_preproc=yes
4523 ;;
4524 no:yes:* )
4525 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4526echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4527 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4528echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4529 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4530echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4531 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4532echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4533 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4534echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4535 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4536echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
4537
4538 ;;
4539esac
4540{ echo "$as_me:$LINENO: checking for minix/config.h" >&5
4541echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4542if test "${ac_cv_header_minix_config_h+set}" = set; then
4543 echo $ECHO_N "(cached) $ECHO_C" >&6
4544else
4545 ac_cv_header_minix_config_h=$ac_header_preproc
4546fi
4547{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4548echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
4549
4550fi
4551if test $ac_cv_header_minix_config_h = yes; then
4552 MINIX=yes
4553else
4554 MINIX=
4555fi
4556
4557
4558if test "$MINIX" = yes; then
4559
4560cat >>confdefs.h <<\_ACEOF
4561#define _POSIX_SOURCE 1
4562_ACEOF
4563
4564
4565cat >>confdefs.h <<\_ACEOF
4566#define _POSIX_1_SOURCE 2
4567_ACEOF
4568
4569
4570cat >>confdefs.h <<\_ACEOF
4571#define _MINIX 1
4572_ACEOF
4573
4574fi
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586 { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4587echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; }
4588if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
4589 echo $ECHO_N "(cached) $ECHO_C" >&6
4590else
4591 cat >conftest.$ac_ext <<_ACEOF
4592/* confdefs.h. */
4593_ACEOF
4594cat confdefs.h >>conftest.$ac_ext
4595cat >>conftest.$ac_ext <<_ACEOF
4596/* end confdefs.h. */
4597
4598# define __EXTENSIONS__ 1
4599 $ac_includes_default
4600int
4601main ()
4602{
4603
4604 ;
4605 return 0;
4606}
4607_ACEOF
4608rm -f conftest.$ac_objext
4609if { (ac_try="$ac_compile"
4610case "(($ac_try" in
4611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4612 *) ac_try_echo=$ac_try;;
4613esac
4614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4615 (eval "$ac_compile") 2>conftest.er1
4616 ac_status=$?
4617 grep -v '^ *+' conftest.er1 >conftest.err
4618 rm -f conftest.er1
4619 cat conftest.err >&5
4620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4621 (exit $ac_status); } && {
4622 test -z "$ac_c_werror_flag" ||
4623 test ! -s conftest.err
4624 } && test -s conftest.$ac_objext; then
4625 ac_cv_safe_to_define___extensions__=yes
4626else
4627 echo "$as_me: failed program was:" >&5
4628sed 's/^/| /' conftest.$ac_ext >&5
4629
4630 ac_cv_safe_to_define___extensions__=no
4631fi
e143ad11 4632
a51f4969
SM
4633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4634fi
4635{ echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4636echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; }
4637 test $ac_cv_safe_to_define___extensions__ = yes &&
4638 cat >>confdefs.h <<\_ACEOF
4639#define __EXTENSIONS__ 1
4640_ACEOF
e143ad11 4641
a51f4969
SM
4642 cat >>confdefs.h <<\_ACEOF
4643#define _POSIX_PTHREAD_SEMANTICS 1
4644_ACEOF
e143ad11 4645
a51f4969
SM
4646 cat >>confdefs.h <<\_ACEOF
4647#define _TANDEM_SOURCE 1
e143ad11
AS
4648_ACEOF
4649
4650
4651
01abe918 4652### Use -Wno-pointer-sign if the compiler supports it
ca81d7a0
JD
4653{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4654echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4655SAVE_CFLAGS="$CFLAGS"
4656CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4657cat >conftest.$ac_ext <<_ACEOF
4658/* confdefs.h. */
4659_ACEOF
4660cat confdefs.h >>conftest.$ac_ext
4661cat >>conftest.$ac_ext <<_ACEOF
4662/* end confdefs.h. */
4663
4664int
4665main ()
4666{
4667
4668 ;
4669 return 0;
4670}
4671_ACEOF
4672rm -f conftest.$ac_objext
ca81d7a0
JD
4673if { (ac_try="$ac_compile"
4674case "(($ac_try" in
4675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4676 *) ac_try_echo=$ac_try;;
4677esac
4678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4679 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4680 ac_status=$?
4681 grep -v '^ *+' conftest.er1 >conftest.err
4682 rm -f conftest.er1
4683 cat conftest.err >&5
4684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4685 (exit $ac_status); } && {
4686 test -z "$ac_c_werror_flag" ||
4687 test ! -s conftest.err
4688 } && test -s conftest.$ac_objext; then
01abe918
CY
4689 has_option=yes
4690else
4691 echo "$as_me: failed program was:" >&5
4692sed 's/^/| /' conftest.$ac_ext >&5
4693
ca81d7a0 4694 has_option=no
01abe918 4695fi
ca81d7a0
JD
4696
4697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4698if test $has_option = yes; then
4699 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4700fi
ca81d7a0
JD
4701{ echo "$as_me:$LINENO: result: $has_option" >&5
4702echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4703CFLAGS="$SAVE_CFLAGS"
4704unset has_option
4705unset SAVE_CFLAGS
4706
6a3a24fa 4707#### Some other nice autoconf tests.
ba4481b5 4708
ca81d7a0
JD
4709{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4710echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4711LN_S=$as_ln_s
4712if test "$LN_S" = "ln -s"; then
ca81d7a0
JD
4713 { echo "$as_me:$LINENO: result: yes" >&5
4714echo "${ECHO_T}yes" >&6; }
ba4481b5 4715else
ca81d7a0
JD
4716 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4717echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4718fi
4719
503d2be0
AS
4720ac_ext=c
4721ac_cpp='$CPP $CPPFLAGS'
4722ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4723ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4724ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4725{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4726echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4727# On Suns, sometimes $CPP names a directory.
4728if test -n "$CPP" && test -d "$CPP"; then
4729 CPP=
4730fi
4731if test -z "$CPP"; then
503d2be0
AS
4732 if test "${ac_cv_prog_CPP+set}" = set; then
4733 echo $ECHO_N "(cached) $ECHO_C" >&6
4734else
4735 # Double quotes because CPP needs to be expanded
4736 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4737 do
4738 ac_preproc_ok=false
4739for ac_c_preproc_warn_flag in '' yes
4740do
4741 # Use a header file that comes with gcc, so configuring glibc
4742 # with a fresh cross-compiler works.
19650fd6
AS
4743 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4744 # <limits.h> exists even on freestanding compilers.
ba4481b5 4745 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4746 # not just through cpp. "Syntax error" is here to catch this case.
4747 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4748/* confdefs.h. */
4749_ACEOF
4750cat confdefs.h >>conftest.$ac_ext
4751cat >>conftest.$ac_ext <<_ACEOF
4752/* end confdefs.h. */
4753#ifdef __STDC__
4754# include <limits.h>
4755#else
4756# include <assert.h>
4757#endif
edfaf76d 4758 Syntax error
503d2be0 4759_ACEOF
ca81d7a0
JD
4760if { (ac_try="$ac_cpp conftest.$ac_ext"
4761case "(($ac_try" in
4762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4763 *) ac_try_echo=$ac_try;;
4764esac
4765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4766 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4767 ac_status=$?
6bae0ccf 4768 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4769 rm -f conftest.er1
4770 cat conftest.err >&5
c0d27fcc 4771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4772 (exit $ac_status); } >/dev/null && {
4773 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4774 test ! -s conftest.err
4775 }; then
ba4481b5
DL
4776 :
4777else
503d2be0 4778 echo "$as_me: failed program was:" >&5
19650fd6
AS
4779sed 's/^/| /' conftest.$ac_ext >&5
4780
503d2be0
AS
4781 # Broken: fails on valid input.
4782continue
4783fi
ca81d7a0 4784
503d2be0
AS
4785rm -f conftest.err conftest.$ac_ext
4786
ca81d7a0 4787 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4788 # can be detected and how.
4789 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4790/* confdefs.h. */
4791_ACEOF
4792cat confdefs.h >>conftest.$ac_ext
4793cat >>conftest.$ac_ext <<_ACEOF
4794/* end confdefs.h. */
503d2be0
AS
4795#include <ac_nonexistent.h>
4796_ACEOF
ca81d7a0
JD
4797if { (ac_try="$ac_cpp conftest.$ac_ext"
4798case "(($ac_try" in
4799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4800 *) ac_try_echo=$ac_try;;
4801esac
4802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4803 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4804 ac_status=$?
6bae0ccf 4805 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4806 rm -f conftest.er1
4807 cat conftest.err >&5
c0d27fcc 4808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4809 (exit $ac_status); } >/dev/null && {
4810 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4811 test ! -s conftest.err
4812 }; then
503d2be0
AS
4813 # Broken: success on invalid input.
4814continue
c4bb2108 4815else
503d2be0 4816 echo "$as_me: failed program was:" >&5
19650fd6
AS
4817sed 's/^/| /' conftest.$ac_ext >&5
4818
503d2be0
AS
4819 # Passes both tests.
4820ac_preproc_ok=:
4821break
4822fi
ca81d7a0 4823
503d2be0
AS
4824rm -f conftest.err conftest.$ac_ext
4825
4826done
4827# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4828rm -f conftest.err conftest.$ac_ext
4829if $ac_preproc_ok; then
4830 break
4831fi
4832
4833 done
4834 ac_cv_prog_CPP=$CPP
4835
4836fi
4837 CPP=$ac_cv_prog_CPP
4838else
4839 ac_cv_prog_CPP=$CPP
4840fi
ca81d7a0
JD
4841{ echo "$as_me:$LINENO: result: $CPP" >&5
4842echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4843ac_preproc_ok=false
4844for ac_c_preproc_warn_flag in '' yes
4845do
4846 # Use a header file that comes with gcc, so configuring glibc
4847 # with a fresh cross-compiler works.
19650fd6
AS
4848 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4849 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4850 # On the NeXT, cc -E runs the code through the compiler's parser,
4851 # not just through cpp. "Syntax error" is here to catch this case.
4852 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4853/* confdefs.h. */
4854_ACEOF
4855cat confdefs.h >>conftest.$ac_ext
4856cat >>conftest.$ac_ext <<_ACEOF
4857/* end confdefs.h. */
4858#ifdef __STDC__
4859# include <limits.h>
4860#else
4861# include <assert.h>
4862#endif
edfaf76d 4863 Syntax error
503d2be0 4864_ACEOF
ca81d7a0
JD
4865if { (ac_try="$ac_cpp conftest.$ac_ext"
4866case "(($ac_try" in
4867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4868 *) ac_try_echo=$ac_try;;
4869esac
4870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4871 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4872 ac_status=$?
6bae0ccf 4873 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4874 rm -f conftest.er1
4875 cat conftest.err >&5
c0d27fcc 4876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4877 (exit $ac_status); } >/dev/null && {
4878 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4879 test ! -s conftest.err
4880 }; then
ba4481b5
DL
4881 :
4882else
503d2be0 4883 echo "$as_me: failed program was:" >&5
19650fd6
AS
4884sed 's/^/| /' conftest.$ac_ext >&5
4885
503d2be0
AS
4886 # Broken: fails on valid input.
4887continue
4888fi
ca81d7a0 4889
503d2be0
AS
4890rm -f conftest.err conftest.$ac_ext
4891
ca81d7a0 4892 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4893 # can be detected and how.
4894 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4895/* confdefs.h. */
4896_ACEOF
4897cat confdefs.h >>conftest.$ac_ext
4898cat >>conftest.$ac_ext <<_ACEOF
4899/* end confdefs.h. */
503d2be0
AS
4900#include <ac_nonexistent.h>
4901_ACEOF
ca81d7a0
JD
4902if { (ac_try="$ac_cpp conftest.$ac_ext"
4903case "(($ac_try" in
4904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4905 *) ac_try_echo=$ac_try;;
4906esac
4907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4908 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4909 ac_status=$?
6bae0ccf 4910 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4911 rm -f conftest.er1
4912 cat conftest.err >&5
c0d27fcc 4913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4914 (exit $ac_status); } >/dev/null && {
4915 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4916 test ! -s conftest.err
4917 }; then
503d2be0
AS
4918 # Broken: success on invalid input.
4919continue
4920else
4921 echo "$as_me: failed program was:" >&5
19650fd6
AS
4922sed 's/^/| /' conftest.$ac_ext >&5
4923
503d2be0
AS
4924 # Passes both tests.
4925ac_preproc_ok=:
4926break
ba4481b5 4927fi
ca81d7a0 4928
503d2be0
AS
4929rm -f conftest.err conftest.$ac_ext
4930
4931done
4932# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4933rm -f conftest.err conftest.$ac_ext
4934if $ac_preproc_ok; then
4935 :
ba4481b5 4936else
19650fd6
AS
4937 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4938See \`config.log' for more details." >&5
4939echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4940See \`config.log' for more details." >&2;}
503d2be0 4941 { (exit 1); exit 1; }; }
ba4481b5 4942fi
503d2be0
AS
4943
4944ac_ext=c
4945ac_cpp='$CPP $CPPFLAGS'
4946ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4947ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4948ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4949
4950# Find a good install program. We prefer a C program (faster),
4951# so one script is as good as another. But avoid the broken or
4952# incompatible versions:
4953# SysV /etc/install, /usr/sbin/install
4954# SunOS /usr/etc/install
4955# IRIX /sbin/install
4956# AIX /bin/install
503d2be0 4957# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4958# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4959# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4960# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4961# OS/2's system install, which has a completely different semantic
ba4481b5 4962# ./install, which can be erroneously created by make from ./install.sh.
ca81d7a0
JD
4963{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4964echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 4965if test -z "$INSTALL"; then
503d2be0
AS
4966if test "${ac_cv_path_install+set}" = set; then
4967 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4968else
c0d27fcc
MR
4969 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4970for as_dir in $PATH
4971do
4972 IFS=$as_save_IFS
4973 test -z "$as_dir" && as_dir=.
4974 # Account for people who put trailing slashes in PATH elements.
4975case $as_dir/ in
4976 ./ | .// | /cC/* | \
4977 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4978 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4979 /usr/ucb/* ) ;;
4980 *)
4981 # OSF1 and SCO ODT 3.0 have their own names for install.
4982 # Don't use installbsd from OSF since it installs stuff as root
4983 # by default.
4984 for ac_prog in ginstall scoinst install; do
4985 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4986 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4987 if test $ac_prog = install &&
4988 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4989 # AIX install. It has an incompatible calling convention.
4990 :
4991 elif test $ac_prog = install &&
4992 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4993 # program-specific install script used by HP pwplus--don't use.
4994 :
4995 else
4996 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4997 break 3
4998 fi
4999 fi
ba4481b5 5000 done
c0d27fcc
MR
5001 done
5002 ;;
5003esac
5004done
ca81d7a0 5005IFS=$as_save_IFS
c0d27fcc 5006
ba4481b5
DL
5007
5008fi
5009 if test "${ac_cv_path_install+set}" = set; then
503d2be0 5010 INSTALL=$ac_cv_path_install
ba4481b5 5011 else
ca81d7a0
JD
5012 # As a last resort, use the slow shell script. Don't cache a
5013 # value for INSTALL within a source directory, because that will
ba4481b5 5014 # break other packages using the cache if that directory is
ca81d7a0 5015 # removed, or if the value is a relative name.
503d2be0 5016 INSTALL=$ac_install_sh
ba4481b5
DL
5017 fi
5018fi
ca81d7a0
JD
5019{ echo "$as_me:$LINENO: result: $INSTALL" >&5
5020echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
5021
5022# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5023# It thinks the first close brace ends the variable substitution.
5024test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5025
503d2be0 5026test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 5027
ba4481b5
DL
5028test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5029
c0d27fcc
MR
5030if test "x$RANLIB" = x; then
5031 if test -n "$ac_tool_prefix"; then
5032 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5033set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ca81d7a0
JD
5034{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5035echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5036if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 5037 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5038else
5039 if test -n "$RANLIB"; then
5040 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5041else
c0d27fcc
MR
5042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5043for as_dir in $PATH
5044do
5045 IFS=$as_save_IFS
5046 test -z "$as_dir" && as_dir=.
5047 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5048 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5049 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5050 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5051 break 2
5052 fi
5053done
503d2be0 5054done
ca81d7a0 5055IFS=$as_save_IFS
503d2be0 5056
7397acc4
DL
5057fi
5058fi
503d2be0 5059RANLIB=$ac_cv_prog_RANLIB
7397acc4 5060if test -n "$RANLIB"; then
ca81d7a0
JD
5061 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5062echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5063else
ca81d7a0
JD
5064 { echo "$as_me:$LINENO: result: no" >&5
5065echo "${ECHO_T}no" >&6; }
503d2be0
AS
5066fi
5067
ca81d7a0 5068
503d2be0
AS
5069fi
5070if test -z "$ac_cv_prog_RANLIB"; then
5071 ac_ct_RANLIB=$RANLIB
5072 # Extract the first word of "ranlib", so it can be a program name with args.
5073set dummy ranlib; ac_word=$2
ca81d7a0
JD
5074{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5075echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5076if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5077 echo $ECHO_N "(cached) $ECHO_C" >&6
5078else
5079 if test -n "$ac_ct_RANLIB"; then
5080 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5081else
c0d27fcc
MR
5082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5083for as_dir in $PATH
5084do
5085 IFS=$as_save_IFS
5086 test -z "$as_dir" && as_dir=.
5087 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5088 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5089 ac_cv_prog_ac_ct_RANLIB="ranlib"
5090 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5091 break 2
5092 fi
5093done
503d2be0 5094done
ca81d7a0 5095IFS=$as_save_IFS
503d2be0 5096
503d2be0
AS
5097fi
5098fi
5099ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5100if test -n "$ac_ct_RANLIB"; then
ca81d7a0
JD
5101 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5102echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5103else
ca81d7a0
JD
5104 { echo "$as_me:$LINENO: result: no" >&5
5105echo "${ECHO_T}no" >&6; }
503d2be0
AS
5106fi
5107
ca81d7a0
JD
5108 if test "x$ac_ct_RANLIB" = x; then
5109 RANLIB=":"
5110 else
5111 case $cross_compiling:$ac_tool_warned in
5112yes:)
5113{ echo "$as_me:$LINENO: 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." >&5
5116echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5117whose name does not start with the host triplet. If you think this
5118configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5119ac_tool_warned=yes ;;
5120esac
5121 RANLIB=$ac_ct_RANLIB
5122 fi
7397acc4 5123else
503d2be0 5124 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5125fi
5126
5127fi
9e71690e
DK
5128# Extract the first word of "install-info", so it can be a program name with args.
5129set dummy install-info; ac_word=$2
ca81d7a0
JD
5130{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5131echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5132if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5133 echo $ECHO_N "(cached) $ECHO_C" >&6
5134else
5135 case $INSTALL_INFO in
5136 [\\/]* | ?:[\\/]*)
5137 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5138 ;;
5139 *)
5140 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5141for as_dir in $PATH
5142do
5143 IFS=$as_save_IFS
5144 test -z "$as_dir" && as_dir=.
5145 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5146 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5147 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5148 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5149 break 2
5150 fi
5151done
5152done
ca81d7a0 5153IFS=$as_save_IFS
9e71690e
DK
5154
5155 ;;
5156esac
5157fi
5158INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5159if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5160 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5161echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5162else
ca81d7a0
JD
5163 { echo "$as_me:$LINENO: result: no" >&5
5164echo "${ECHO_T}no" >&6; }
9e71690e
DK
5165fi
5166
ca81d7a0 5167
9e71690e
DK
5168# Extract the first word of "install-info", so it can be a program name with args.
5169set dummy install-info; ac_word=$2
ca81d7a0
JD
5170{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5171echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5172if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5173 echo $ECHO_N "(cached) $ECHO_C" >&6
5174else
5175 case $INSTALL_INFO in
5176 [\\/]* | ?:[\\/]*)
5177 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5178 ;;
5179 *)
5180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5181for as_dir in /usr/sbin
5182do
5183 IFS=$as_save_IFS
5184 test -z "$as_dir" && as_dir=.
5185 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5186 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5187 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5188 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5189 break 2
5190 fi
5191done
5192done
ca81d7a0 5193IFS=$as_save_IFS
9e71690e
DK
5194
5195 ;;
5196esac
5197fi
5198INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5199if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5200 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5201echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5202else
ca81d7a0
JD
5203 { echo "$as_me:$LINENO: result: no" >&5
5204echo "${ECHO_T}no" >&6; }
9e71690e
DK
5205fi
5206
ca81d7a0 5207
9e71690e
DK
5208# Extract the first word of "install-info", so it can be a program name with args.
5209set dummy install-info; ac_word=$2
ca81d7a0
JD
5210{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5211echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5212if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5213 echo $ECHO_N "(cached) $ECHO_C" >&6
5214else
5215 case $INSTALL_INFO in
5216 [\\/]* | ?:[\\/]*)
5217 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5218 ;;
5219 *)
5220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5221for as_dir in /sbin
5222do
5223 IFS=$as_save_IFS
5224 test -z "$as_dir" && as_dir=.
5225 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5226 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5227 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5228 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5229 break 2
5230 fi
5231done
5232done
ca81d7a0 5233IFS=$as_save_IFS
9e71690e
DK
5234
5235 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5236 ;;
5237esac
5238fi
5239INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5240if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5241 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5242echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5243else
ca81d7a0
JD
5244 { echo "$as_me:$LINENO: result: no" >&5
5245echo "${ECHO_T}no" >&6; }
9e71690e
DK
5246fi
5247
ca81d7a0 5248
8ae52ca6
RF
5249# Extract the first word of "gzip", so it can be a program name with args.
5250set dummy gzip; ac_word=$2
ca81d7a0
JD
5251{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5252echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5253if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5254 echo $ECHO_N "(cached) $ECHO_C" >&6
5255else
46e35e9f 5256 case $GZIP_PROG in
8ae52ca6 5257 [\\/]* | ?:[\\/]*)
46e35e9f 5258 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5259 ;;
5260 *)
5261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5262for as_dir in $PATH
5263do
5264 IFS=$as_save_IFS
5265 test -z "$as_dir" && as_dir=.
5266 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5267 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5268 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5269 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5270 break 2
5271 fi
5272done
5273done
ca81d7a0 5274IFS=$as_save_IFS
8ae52ca6
RF
5275
5276 ;;
5277esac
5278fi
46e35e9f 5279GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5280if test -n "$GZIP_PROG"; then
ca81d7a0
JD
5281 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5282echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5283else
ca81d7a0
JD
5284 { echo "$as_me:$LINENO: result: no" >&5
5285echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5286fi
5287
ba4481b5 5288
c0d27fcc 5289
ca81d7a0 5290
1bb9a689
MB
5291## Need makeinfo >= 4.6 (?) to build the manuals.
5292# Extract the first word of "makeinfo", so it can be a program name with args.
5293set dummy makeinfo; ac_word=$2
5294{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5295echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5296if test "${ac_cv_path_MAKEINFO+set}" = set; then
5297 echo $ECHO_N "(cached) $ECHO_C" >&6
5298else
5299 case $MAKEINFO in
5300 [\\/]* | ?:[\\/]*)
5301 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5302 ;;
5303 *)
5304 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5305for as_dir in $PATH
5306do
5307 IFS=$as_save_IFS
5308 test -z "$as_dir" && as_dir=.
5309 for ac_exec_ext in '' $ac_executable_extensions; do
5310 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5311 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5312 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5313 break 2
5314 fi
5315done
5316done
5317IFS=$as_save_IFS
5318
5319 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5320 ;;
5321esac
5322fi
5323MAKEINFO=$ac_cv_path_MAKEINFO
5324if test -n "$MAKEINFO"; then
5325 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5326echo "${ECHO_T}$MAKEINFO" >&6; }
5327else
5328 { echo "$as_me:$LINENO: result: no" >&5
5329echo "${ECHO_T}no" >&6; }
5330fi
5331
5332
5333if test "$MAKEINFO" != "no" && \
d4840f44 5334 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
5335 MAKEINFO=no
5336fi
5337
e1b89931
GM
5338## Makeinfo is unusual. For a released Emacs, the manuals are
5339## pre-built, and not deleted by the normal clean rules. makeinfo is
5340## therefore in the category of "special tools" not normally required, which
5341## configure does not have to check for (eg autoconf itself).
5342## In a CVS checkout on the other hand, the manuals are not included.
5343## So makeinfo is a requirement to build from CVS, and configure
5344## should test for it as it does for any other build requirement.
5345## We use the presence of $srcdir/info/emacs to distinguish a release,
5346## with pre-built manuals, from a CVS checkout.
5347if test "$MAKEINFO" = "no"; then
5348 if test "x${with_makeinfo}" = "xno"; then
5349 MAKEINFO=off
5350 elif ! test -e $srcdir/info/emacs; then
5351 { { echo "$as_me:$LINENO: error: You do not seem to have makeinfo >= 4.6, and your
5352source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5353Either install a suitable version of makeinfo, or re-run configure
e1b89931
GM
5354with the \`--without-makeinfo' option to build without the manuals. " >&5
5355echo "$as_me: error: You do not seem to have makeinfo >= 4.6, and your
5356source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5357Either install a suitable version of makeinfo, or re-run configure
e1b89931 5358with the \`--without-makeinfo' option to build without the manuals. " >&2;}
1bb9a689 5359 { (exit 1); exit 1; }; }
e1b89931 5360 fi
921fbdf0 5361fi
1bb9a689
MB
5362
5363
8e967cf7
MR
5364if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5365then
5366 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5367fi
5368
5369if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5370then
5371 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5372fi
5373
c0d27fcc 5374
fe239f0f 5375late_LDFLAGS=$LDFLAGS
4af002d6 5376if test "$GCC" = yes; then
fe239f0f
AS
5377 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5378else
5379 LDFLAGS="$LDFLAGS -znocombreloc"
5380fi
5381
ca81d7a0
JD
5382{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5383echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5384cat >conftest.$ac_ext <<_ACEOF
5385main(){return 0;}
5386_ACEOF
5387rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5388if { (ac_try="$ac_link"
5389case "(($ac_try" in
5390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5391 *) ac_try_echo=$ac_try;;
5392esac
5393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5394 (eval "$ac_link") 2>conftest.er1
fe239f0f 5395 ac_status=$?
edfaf76d
LK
5396 grep -v '^ *+' conftest.er1 >conftest.err
5397 rm -f conftest.er1
5398 cat conftest.err >&5
fe239f0f 5399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5400 (exit $ac_status); } && {
5401 test -z "$ac_c_werror_flag" ||
5402 test ! -s conftest.err
5403 } && test -s conftest$ac_exeext &&
5404 $as_test_x conftest$ac_exeext; then
ca81d7a0
JD
5405 { echo "$as_me:$LINENO: result: yes" >&5
5406echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5407else
5408 echo "$as_me: failed program was:" >&5
5409sed 's/^/| /' conftest.$ac_ext >&5
5410
ca81d7a0
JD
5411 LDFLAGS=$late_LDFLAGS
5412 { echo "$as_me:$LINENO: result: no" >&5
5413echo "${ECHO_T}no" >&6; }
fe239f0f 5414fi
ca81d7a0 5415
f053c89f 5416rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5417 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5418
3b33a005
DL
5419#### Extract some information from the operating system and machine files.
5420
c0d27fcc 5421{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5422 - which libraries the lib-src programs will want, and
503d2be0
AS
5423 - whether the GNU malloc routines are usable..." >&5
5424echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5425 - which libraries the lib-src programs will want, and
503d2be0 5426 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5427
5428### First figure out CFLAGS (which we use for running the compiler here)
5429### and REAL_CFLAGS (which we use for real compilation).
5430### The two are the same except on a few systems, where they are made
5431### different to work around various lossages. For example,
5432### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5433### as implying static linking.
5434
5435### If the CFLAGS env var is specified, we use that value
5436### instead of the default.
5437
5438### It's not important that this name contain the PID; you can't run
5439### two configures in the same directory and have anything work
5440### anyway.
5441tempcname="conftest.c"
5442
5443echo '
5444#include "'${srcdir}'/src/'${opsysfile}'"
5445#include "'${srcdir}'/src/'${machfile}'"
5446#ifndef LIBS_MACHINE
5447#define LIBS_MACHINE
5448#endif
5449#ifndef LIBS_SYSTEM
5450#define LIBS_SYSTEM
5451#endif
5452#ifndef C_SWITCH_SYSTEM
5453#define C_SWITCH_SYSTEM
5454#endif
5455#ifndef C_SWITCH_MACHINE
5456#define C_SWITCH_MACHINE
5457#endif
5458configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5459configure___ c_switch_system=C_SWITCH_SYSTEM
5460configure___ c_switch_machine=C_SWITCH_MACHINE
5461
5462#ifndef LIB_X11_LIB
5463#define LIB_X11_LIB -lX11
5464#endif
5465
3b33a005
DL
5466#ifndef LIBX11_SYSTEM
5467#define LIBX11_SYSTEM
5468#endif
9d2818d6 5469configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
3b33a005
DL
5470
5471#ifdef UNEXEC
5472configure___ unexec=UNEXEC
5473#else
5474configure___ unexec=unexec.o
5475#endif
5476
5477#ifdef SYSTEM_MALLOC
5478configure___ system_malloc=yes
5479#else
5480configure___ system_malloc=no
5481#endif
5482
ef9e4345
GM
5483#ifdef USE_MMAP_FOR_BUFFERS
5484configure___ use_mmap_for_buffers=yes
73b77ee5 5485#else
ef9e4345 5486configure___ use_mmap_for_buffers=no
73b77ee5
GM
5487#endif
5488
3b33a005
DL
5489#ifndef C_DEBUG_SWITCH
5490#define C_DEBUG_SWITCH -g
5491#endif
5492
5493#ifndef C_OPTIMIZE_SWITCH
5494#ifdef __GNUC__
5495#define C_OPTIMIZE_SWITCH -O2
5496#else
5497#define C_OPTIMIZE_SWITCH -O
5498#endif
5499#endif
5500
01abe918
CY
5501#ifndef C_WARNINGS_SWITCH
5502#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5503#endif
5504
3b33a005
DL
5505#ifndef LD_SWITCH_MACHINE
5506#define LD_SWITCH_MACHINE
5507#endif
5508
5509#ifndef LD_SWITCH_SYSTEM
5510#define LD_SWITCH_SYSTEM
5511#endif
5512
5513#ifndef LD_SWITCH_X_SITE_AUX
5514#define LD_SWITCH_X_SITE_AUX
503d2be0 5515#endif
3b33a005
DL
5516
5517configure___ ld_switch_system=LD_SWITCH_SYSTEM
5518configure___ ld_switch_machine=LD_SWITCH_MACHINE
5519
5520#ifdef THIS_IS_CONFIGURE
5521
5522/* Get the CFLAGS for tests in configure. */
5523#ifdef __GNUC__
5524configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5525#else
5526configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5527#endif
5528
5529#else /* not THIS_IS_CONFIGURE */
5530
5531/* Get the CFLAGS for real compilation. */
5532#ifdef __GNUC__
01abe918 5533configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5534#else
5535configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5536#endif
5537
5538#endif /* not THIS_IS_CONFIGURE */
5539' > ${tempcname}
5540
5541# The value of CPP is a quoted variable reference, so we need to do this
5542# to get its actual value...
5543CPP=`eval "echo $CPP"`
5544eval `${CPP} -Isrc ${tempcname} \
5545 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5546if test "x$SPECIFIED_CFLAGS" = x; then
5547 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5548 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5549else
5550 REAL_CFLAGS="$CFLAGS"
5551fi
5552rm ${tempcname}
5553
5554ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5555
5556### Make sure subsequent tests use flags consistent with the build flags.
5557
5558if test x"${OVERRIDE_CPPFLAGS}" != x; then
5559 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5560else
5561 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5562fi
5563
6bae0ccf
DL
5564
5565
ca81d7a0 5566# Check whether --enable-largefile was given.
f4988be7 5567if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5568 enableval=$enable_largefile;
5569fi
f4988be7 5570
503d2be0 5571if test "$enable_largefile" != no; then
f4988be7 5572
ca81d7a0
JD
5573 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5574echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5575if test "${ac_cv_sys_largefile_CC+set}" = set; then
5576 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5577else
f4988be7 5578 ac_cv_sys_largefile_CC=no
503d2be0
AS
5579 if test "$GCC" != yes; then
5580 ac_save_CC=$CC
5581 while :; do
ca81d7a0
JD
5582 # IRIX 6.2 and later do not support large files by default,
5583 # so use the C compiler's -n32 option if that helps.
edfaf76d 5584 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5585/* confdefs.h. */
5586_ACEOF
5587cat confdefs.h >>conftest.$ac_ext
5588cat >>conftest.$ac_ext <<_ACEOF
5589/* end confdefs.h. */
f4988be7 5590#include <sys/types.h>
503d2be0
AS
5591 /* Check that off_t can represent 2**63 - 1 correctly.
5592 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5593 since some C++ compilers masquerading as C compilers
5594 incorrectly reject 9223372036854775807. */
5595#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5596 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5597 && LARGE_OFF_T % 2147483647 == 1)
5598 ? 1 : -1];
5599int
5600main ()
5601{
f4988be7 5602
503d2be0
AS
5603 ;
5604 return 0;
5605}
5606_ACEOF
ca81d7a0
JD
5607 rm -f conftest.$ac_objext
5608if { (ac_try="$ac_compile"
5609case "(($ac_try" in
5610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5611 *) ac_try_echo=$ac_try;;
5612esac
5613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5614 (eval "$ac_compile") 2>conftest.er1
503d2be0 5615 ac_status=$?
edfaf76d
LK
5616 grep -v '^ *+' conftest.er1 >conftest.err
5617 rm -f conftest.er1
5618 cat conftest.err >&5
c0d27fcc 5619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5620 (exit $ac_status); } && {
5621 test -z "$ac_c_werror_flag" ||
5622 test ! -s conftest.err
5623 } && test -s conftest.$ac_objext; then
503d2be0 5624 break
b192d653 5625else
503d2be0 5626 echo "$as_me: failed program was:" >&5
19650fd6
AS
5627sed 's/^/| /' conftest.$ac_ext >&5
5628
ca81d7a0 5629
503d2be0 5630fi
ca81d7a0
JD
5631
5632rm -f core conftest.err conftest.$ac_objext
5633 CC="$CC -n32"
5634 rm -f conftest.$ac_objext
5635if { (ac_try="$ac_compile"
5636case "(($ac_try" in
5637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5638 *) ac_try_echo=$ac_try;;
5639esac
5640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5641 (eval "$ac_compile") 2>conftest.er1
503d2be0 5642 ac_status=$?
edfaf76d
LK
5643 grep -v '^ *+' conftest.er1 >conftest.err
5644 rm -f conftest.er1
5645 cat conftest.err >&5
c0d27fcc 5646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5647 (exit $ac_status); } && {
5648 test -z "$ac_c_werror_flag" ||
5649 test ! -s conftest.err
5650 } && test -s conftest.$ac_objext; then
503d2be0
AS
5651 ac_cv_sys_largefile_CC=' -n32'; break
5652else
5653 echo "$as_me: failed program was:" >&5
19650fd6
AS
5654sed 's/^/| /' conftest.$ac_ext >&5
5655
ca81d7a0 5656
503d2be0 5657fi
ca81d7a0
JD
5658
5659rm -f core conftest.err conftest.$ac_objext
edfaf76d 5660 break
503d2be0
AS
5661 done
5662 CC=$ac_save_CC
5663 rm -f conftest.$ac_ext
5664 fi
b192d653 5665fi
ca81d7a0
JD
5666{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5667echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5668 if test "$ac_cv_sys_largefile_CC" != no; then
5669 CC=$CC$ac_cv_sys_largefile_CC
5670 fi
b192d653 5671
ca81d7a0
JD
5672 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5673echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5674if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5675 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5676else
503d2be0 5677 while :; do
503d2be0 5678 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5679/* confdefs.h. */
5680_ACEOF
5681cat confdefs.h >>conftest.$ac_ext
5682cat >>conftest.$ac_ext <<_ACEOF
5683/* end confdefs.h. */
f4988be7 5684#include <sys/types.h>
503d2be0
AS
5685 /* Check that off_t can represent 2**63 - 1 correctly.
5686 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5687 since some C++ compilers masquerading as C compilers
5688 incorrectly reject 9223372036854775807. */
5689#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5690 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5691 && LARGE_OFF_T % 2147483647 == 1)
5692 ? 1 : -1];
5693int
5694main ()
5695{
f4988be7 5696
503d2be0
AS
5697 ;
5698 return 0;
5699}
5700_ACEOF
5701rm -f conftest.$ac_objext
ca81d7a0
JD
5702if { (ac_try="$ac_compile"
5703case "(($ac_try" in
5704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5705 *) ac_try_echo=$ac_try;;
5706esac
5707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5708 (eval "$ac_compile") 2>conftest.er1
503d2be0 5709 ac_status=$?
edfaf76d
LK
5710 grep -v '^ *+' conftest.er1 >conftest.err
5711 rm -f conftest.er1
5712 cat conftest.err >&5
c0d27fcc 5713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5714 (exit $ac_status); } && {
5715 test -z "$ac_c_werror_flag" ||
5716 test ! -s conftest.err
5717 } && test -s conftest.$ac_objext; then
5718 ac_cv_sys_file_offset_bits=no; break
f4988be7 5719else
503d2be0 5720 echo "$as_me: failed program was:" >&5
19650fd6
AS
5721sed 's/^/| /' conftest.$ac_ext >&5
5722
ca81d7a0 5723
503d2be0 5724fi
ca81d7a0
JD
5725
5726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5727 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5728/* confdefs.h. */
5729_ACEOF
5730cat confdefs.h >>conftest.$ac_ext
5731cat >>conftest.$ac_ext <<_ACEOF
5732/* end confdefs.h. */
f4988be7
GM
5733#define _FILE_OFFSET_BITS 64
5734#include <sys/types.h>
503d2be0
AS
5735 /* Check that off_t can represent 2**63 - 1 correctly.
5736 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5737 since some C++ compilers masquerading as C compilers
5738 incorrectly reject 9223372036854775807. */
5739#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5740 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5741 && LARGE_OFF_T % 2147483647 == 1)
5742 ? 1 : -1];
5743int
5744main ()
5745{
5746
5747 ;
5748 return 0;
5749}
5750_ACEOF
5751rm -f conftest.$ac_objext
ca81d7a0
JD
5752if { (ac_try="$ac_compile"
5753case "(($ac_try" in
5754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5755 *) ac_try_echo=$ac_try;;
5756esac
5757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5758 (eval "$ac_compile") 2>conftest.er1
503d2be0 5759 ac_status=$?
edfaf76d
LK
5760 grep -v '^ *+' conftest.er1 >conftest.err
5761 rm -f conftest.er1
5762 cat conftest.err >&5
c0d27fcc 5763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5764 (exit $ac_status); } && {
5765 test -z "$ac_c_werror_flag" ||
5766 test ! -s conftest.err
5767 } && test -s conftest.$ac_objext; then
503d2be0
AS
5768 ac_cv_sys_file_offset_bits=64; break
5769else
5770 echo "$as_me: failed program was:" >&5
19650fd6
AS
5771sed 's/^/| /' conftest.$ac_ext >&5
5772
ca81d7a0 5773
503d2be0 5774fi
ca81d7a0
JD
5775
5776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5777 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5778 break
5779done
ba4481b5 5780fi
ca81d7a0
JD
5781{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5782echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5783case $ac_cv_sys_file_offset_bits in #(
5784 no | unknown) ;;
5785 *)
c0d27fcc 5786cat >>confdefs.h <<_ACEOF
f4988be7 5787#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5788_ACEOF
f053c89f
CY
5789;;
5790esac
503d2be0 5791rm -f conftest*
f053c89f
CY
5792 if test $ac_cv_sys_file_offset_bits = unknown; then
5793 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
ca81d7a0 5794echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5795if test "${ac_cv_sys_large_files+set}" = set; then
5796 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5797else
503d2be0 5798 while :; do
503d2be0 5799 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5800/* confdefs.h. */
5801_ACEOF
5802cat confdefs.h >>conftest.$ac_ext
5803cat >>conftest.$ac_ext <<_ACEOF
5804/* end confdefs.h. */
503d2be0
AS
5805#include <sys/types.h>
5806 /* Check that off_t can represent 2**63 - 1 correctly.
5807 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5808 since some C++ compilers masquerading as C compilers
5809 incorrectly reject 9223372036854775807. */
5810#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5811 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5812 && LARGE_OFF_T % 2147483647 == 1)
5813 ? 1 : -1];
5814int
5815main ()
5816{
ba4481b5 5817
503d2be0
AS
5818 ;
5819 return 0;
5820}
5821_ACEOF
5822rm -f conftest.$ac_objext
ca81d7a0
JD
5823if { (ac_try="$ac_compile"
5824case "(($ac_try" in
5825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5826 *) ac_try_echo=$ac_try;;
5827esac
5828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5829 (eval "$ac_compile") 2>conftest.er1
503d2be0 5830 ac_status=$?
edfaf76d
LK
5831 grep -v '^ *+' conftest.er1 >conftest.err
5832 rm -f conftest.er1
5833 cat conftest.err >&5
c0d27fcc 5834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5835 (exit $ac_status); } && {
5836 test -z "$ac_c_werror_flag" ||
5837 test ! -s conftest.err
5838 } && test -s conftest.$ac_objext; then
5839 ac_cv_sys_large_files=no; break
ba4481b5 5840else
503d2be0 5841 echo "$as_me: failed program was:" >&5
19650fd6
AS
5842sed 's/^/| /' conftest.$ac_ext >&5
5843
ca81d7a0 5844
503d2be0 5845fi
ca81d7a0
JD
5846
5847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5848 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5849/* confdefs.h. */
5850_ACEOF
5851cat confdefs.h >>conftest.$ac_ext
5852cat >>conftest.$ac_ext <<_ACEOF
5853/* end confdefs.h. */
f4988be7 5854#define _LARGE_FILES 1
503d2be0
AS
5855#include <sys/types.h>
5856 /* Check that off_t can represent 2**63 - 1 correctly.
5857 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5858 since some C++ compilers masquerading as C compilers
5859 incorrectly reject 9223372036854775807. */
5860#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5861 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5862 && LARGE_OFF_T % 2147483647 == 1)
5863 ? 1 : -1];
5864int
5865main ()
5866{
f4988be7 5867
503d2be0
AS
5868 ;
5869 return 0;
5870}
5871_ACEOF
5872rm -f conftest.$ac_objext
ca81d7a0
JD
5873if { (ac_try="$ac_compile"
5874case "(($ac_try" in
5875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5876 *) ac_try_echo=$ac_try;;
5877esac
5878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5879 (eval "$ac_compile") 2>conftest.er1
503d2be0 5880 ac_status=$?
edfaf76d
LK
5881 grep -v '^ *+' conftest.er1 >conftest.err
5882 rm -f conftest.er1
5883 cat conftest.err >&5
c0d27fcc 5884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5885 (exit $ac_status); } && {
5886 test -z "$ac_c_werror_flag" ||
5887 test ! -s conftest.err
5888 } && test -s conftest.$ac_objext; then
503d2be0
AS
5889 ac_cv_sys_large_files=1; break
5890else
5891 echo "$as_me: failed program was:" >&5
19650fd6
AS
5892sed 's/^/| /' conftest.$ac_ext >&5
5893
ca81d7a0 5894
503d2be0 5895fi
ca81d7a0
JD
5896
5897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5898 ac_cv_sys_large_files=unknown
503d2be0
AS
5899 break
5900done
ba4481b5 5901fi
ca81d7a0
JD
5902{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5903echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5904case $ac_cv_sys_large_files in #(
5905 no | unknown) ;;
5906 *)
c0d27fcc 5907cat >>confdefs.h <<_ACEOF
f4988be7 5908#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5909_ACEOF
f053c89f
CY
5910;;
5911esac
503d2be0 5912rm -f conftest*
f053c89f 5913 fi
503d2be0 5914fi
ba4481b5 5915
c0d27fcc 5916
439f58ee 5917
55e6d9b2 5918### The standard library on x86-64 and s390x GNU/Linux distributions can
bc5d9888 5919### be located in either /usr/lib64 or /usr/lib.
076f0c7d
GM
5920### In some rare cases, /usr/lib64 exists but does not contain the
5921### relevant files (bug#1287). Hence test for crtn.o.
bc5d9888 5922case "${canonical}" in
55e6d9b2 5923 x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
076f0c7d 5924 if test -e /usr/lib64/crtn.o; then
bc5d9888
CY
5925
5926cat >>confdefs.h <<\_ACEOF
55e6d9b2 5927#define HAVE_LIB64_DIR 1
bc5d9888
CY
5928_ACEOF
5929
5930fi
5931esac
5932
439f58ee
JD
5933
5934
5935
2c9dccc9
PJ
5936if test "${with_sound}" != "no"; then
5937 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
5938
5939
5940
5941for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5942do
5943as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
5944if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5945 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5946echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5947if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
5948 echo $ECHO_N "(cached) $ECHO_C" >&6
5949fi
ca81d7a0
JD
5950ac_res=`eval echo '${'$as_ac_Header'}'`
5951 { echo "$as_me:$LINENO: result: $ac_res" >&5
5952echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
5953else
5954 # Is the header compilable?
ca81d7a0
JD
5955{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5956echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 5957cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5958/* confdefs.h. */
5959_ACEOF
5960cat confdefs.h >>conftest.$ac_ext
5961cat >>conftest.$ac_ext <<_ACEOF
5962/* end confdefs.h. */
c0d27fcc 5963$ac_includes_default
98418dba 5964#include <$ac_header>
503d2be0 5965_ACEOF
c0d27fcc 5966rm -f conftest.$ac_objext
ca81d7a0
JD
5967if { (ac_try="$ac_compile"
5968case "(($ac_try" in
5969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5970 *) ac_try_echo=$ac_try;;
5971esac
5972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5973 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 5974 ac_status=$?
edfaf76d
LK
5975 grep -v '^ *+' conftest.er1 >conftest.err
5976 rm -f conftest.er1
5977 cat conftest.err >&5
c0d27fcc 5978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5979 (exit $ac_status); } && {
5980 test -z "$ac_c_werror_flag" ||
5981 test ! -s conftest.err
5982 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5983 ac_header_compiler=yes
5984else
5985 echo "$as_me: failed program was:" >&5
19650fd6
AS
5986sed 's/^/| /' conftest.$ac_ext >&5
5987
ca81d7a0 5988 ac_header_compiler=no
c0d27fcc 5989fi
ca81d7a0
JD
5990
5991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5992{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5993echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
5994
5995# Is the header present?
ca81d7a0
JD
5996{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5997echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 5998cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5999/* confdefs.h. */
6000_ACEOF
6001cat confdefs.h >>conftest.$ac_ext
6002cat >>conftest.$ac_ext <<_ACEOF
6003/* end confdefs.h. */
c0d27fcc
MR
6004#include <$ac_header>
6005_ACEOF
ca81d7a0
JD
6006if { (ac_try="$ac_cpp conftest.$ac_ext"
6007case "(($ac_try" in
6008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6009 *) ac_try_echo=$ac_try;;
6010esac
6011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6012 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6013 ac_status=$?
6bae0ccf 6014 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6015 rm -f conftest.er1
6016 cat conftest.err >&5
c0d27fcc 6017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6018 (exit $ac_status); } >/dev/null && {
6019 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6020 test ! -s conftest.err
6021 }; then
c0d27fcc 6022 ac_header_preproc=yes
f4988be7 6023else
503d2be0 6024 echo "$as_me: failed program was:" >&5
19650fd6
AS
6025sed 's/^/| /' conftest.$ac_ext >&5
6026
c0d27fcc 6027 ac_header_preproc=no
f4988be7 6028fi
ca81d7a0 6029
98418dba 6030rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6031{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6032echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6033
6034# So? What about this header?
edfaf76d
LK
6035case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6036 yes:no: )
c0d27fcc
MR
6037 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6038echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6039 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6040echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6041 ac_header_preproc=yes
19650fd6 6042 ;;
edfaf76d 6043 no:yes:* )
c0d27fcc
MR
6044 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6045echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6046 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6047echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6048 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6049echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6050 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6051echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6052 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6053echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6054 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6055echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6056
19650fd6 6057 ;;
c0d27fcc 6058esac
ca81d7a0
JD
6059{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6060echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6061if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6062 echo $ECHO_N "(cached) $ECHO_C" >&6
6063else
edfaf76d 6064 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6065fi
ca81d7a0
JD
6066ac_res=`eval echo '${'$as_ac_Header'}'`
6067 { echo "$as_me:$LINENO: result: $ac_res" >&5
6068echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6069
6070fi
98418dba 6071if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6072 cat >>confdefs.h <<_ACEOF
98418dba 6073#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6074_ACEOF
f4988be7
GM
6075
6076fi
c0d27fcc 6077
98418dba
CW
6078done
6079
6080 # Emulation library used on NetBSD.
ca81d7a0
JD
6081 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6082echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6083if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6084 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6085else
98418dba
CW
6086 ac_check_lib_save_LIBS=$LIBS
6087LIBS="-lossaudio $LIBS"
6088cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6089/* confdefs.h. */
6090_ACEOF
6091cat confdefs.h >>conftest.$ac_ext
6092cat >>conftest.$ac_ext <<_ACEOF
6093/* end confdefs.h. */
98418dba 6094
ca81d7a0
JD
6095/* Override any GCC internal prototype to avoid an error.
6096 Use char because int might match the return type of a GCC
6097 builtin and then its argument prototype would still apply. */
98418dba
CW
6098#ifdef __cplusplus
6099extern "C"
f4988be7 6100#endif
98418dba 6101char _oss_ioctl ();
503d2be0
AS
6102int
6103main ()
6104{
ca81d7a0 6105return _oss_ioctl ();
503d2be0
AS
6106 ;
6107 return 0;
6108}
6109_ACEOF
98418dba 6110rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6111if { (ac_try="$ac_link"
6112case "(($ac_try" in
6113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6114 *) ac_try_echo=$ac_try;;
6115esac
6116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6117 (eval "$ac_link") 2>conftest.er1
503d2be0 6118 ac_status=$?
edfaf76d
LK
6119 grep -v '^ *+' conftest.er1 >conftest.err
6120 rm -f conftest.er1
6121 cat conftest.err >&5
c0d27fcc 6122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6123 (exit $ac_status); } && {
6124 test -z "$ac_c_werror_flag" ||
6125 test ! -s conftest.err
6126 } && test -s conftest$ac_exeext &&
6127 $as_test_x conftest$ac_exeext; then
98418dba 6128 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6129else
503d2be0 6130 echo "$as_me: failed program was:" >&5
19650fd6
AS
6131sed 's/^/| /' conftest.$ac_ext >&5
6132
ca81d7a0 6133 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6134fi
ca81d7a0 6135
f053c89f 6136rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6137 conftest$ac_exeext conftest.$ac_ext
98418dba 6138LIBS=$ac_check_lib_save_LIBS
f4988be7 6139fi
ca81d7a0
JD
6140{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6141echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6142if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6143 LIBSOUND=-lossaudio
6144else
6145 LIBSOUND=
6146fi
6147
c0d27fcc 6148
439f58ee
JD
6149
6150 ALSA_REQUIRED=1.0.0
6151 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
439f58ee
JD
6152
6153 succeeded=no
6154
00b9c927 6155 # Extract the first word of "pkg-config", so it can be a program name with args.
439f58ee 6156set dummy pkg-config; ac_word=$2
ca81d7a0
JD
6157{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6158echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6159if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6160 echo $ECHO_N "(cached) $ECHO_C" >&6
6161else
6162 case $PKG_CONFIG in
6163 [\\/]* | ?:[\\/]*)
6164 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6165 ;;
6166 *)
6167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6168for as_dir in $PATH
6169do
6170 IFS=$as_save_IFS
6171 test -z "$as_dir" && as_dir=.
6172 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6173 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6174 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6175 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6176 break 2
6177 fi
6178done
6179done
ca81d7a0 6180IFS=$as_save_IFS
439f58ee
JD
6181
6182 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6183 ;;
6184esac
6185fi
6186PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6187if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
6188 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6189echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6190else
ca81d7a0
JD
6191 { echo "$as_me:$LINENO: result: no" >&5
6192echo "${ECHO_T}no" >&6; }
439f58ee
JD
6193fi
6194
ca81d7a0 6195
439f58ee
JD
6196
6197 if test "$PKG_CONFIG" = "no" ; then
6198 HAVE_ALSA=no
6199 else
6200 PKG_CONFIG_MIN_VERSION=0.9.0
6201 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
6202 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6203echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6204
67db6aa2 6205 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ca81d7a0
JD
6206 { echo "$as_me:$LINENO: result: yes" >&5
6207echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6208 succeeded=yes
6209
ca81d7a0
JD
6210 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6211echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6212 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6213 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6214echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6215
ca81d7a0
JD
6216 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6217echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6218 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6219 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6220echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6221 else
ca81d7a0
JD
6222 { echo "$as_me:$LINENO: result: no" >&5
6223echo "${ECHO_T}no" >&6; }
439f58ee
JD
6224 ALSA_CFLAGS=""
6225 ALSA_LIBS=""
6226 ## If we have a custom action on failure, don't print errors, but
6227 ## do set a variable so people can do so.
6228 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6229
6230 fi
6231
6232
6233
6234 else
6235 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6236 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6237 fi
6238 fi
6239
6240 if test $succeeded = yes; then
6241 HAVE_ALSA=yes
6242 else
6243 HAVE_ALSA=no
6244 fi
6245
6246 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6247 SAVE_CFLAGS="$CFLAGS"
6248 SAVE_LDFLAGS="$LDFLAGS"
6249 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6250 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6251 cat >conftest.$ac_ext <<_ACEOF
6252/* confdefs.h. */
6253_ACEOF
6254cat confdefs.h >>conftest.$ac_ext
6255cat >>conftest.$ac_ext <<_ACEOF
6256/* end confdefs.h. */
6257#include <asoundlib.h>
6258int
6259main ()
6260{
6261snd_lib_error_set_handler (0);
6262 ;
6263 return 0;
6264}
6265_ACEOF
6266rm -f conftest.$ac_objext
6267if { (ac_try="$ac_compile"
6268case "(($ac_try" in
6269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6270 *) ac_try_echo=$ac_try;;
6271esac
6272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6273 (eval "$ac_compile") 2>conftest.er1
6274 ac_status=$?
6275 grep -v '^ *+' conftest.er1 >conftest.err
6276 rm -f conftest.er1
6277 cat conftest.err >&5
6278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6279 (exit $ac_status); } && {
6280 test -z "$ac_c_werror_flag" ||
6281 test ! -s conftest.err
6282 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6283 emacs_alsa_normal=yes
6284else
6285 echo "$as_me: failed program was:" >&5
6286sed 's/^/| /' conftest.$ac_ext >&5
6287
6288 emacs_alsa_normal=no
6289fi
6290
6291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6292 if test "$emacs_alsa_normal" != yes; then
6293 cat >conftest.$ac_ext <<_ACEOF
6294/* confdefs.h. */
6295_ACEOF
6296cat confdefs.h >>conftest.$ac_ext
6297cat >>conftest.$ac_ext <<_ACEOF
6298/* end confdefs.h. */
6299#include <alsa/asoundlib.h>
6300int
6301main ()
6302{
6303snd_lib_error_set_handler (0);
6304 ;
6305 return 0;
6306}
6307_ACEOF
6308rm -f conftest.$ac_objext
6309if { (ac_try="$ac_compile"
6310case "(($ac_try" in
6311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6312 *) ac_try_echo=$ac_try;;
6313esac
6314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6315 (eval "$ac_compile") 2>conftest.er1
6316 ac_status=$?
6317 grep -v '^ *+' conftest.er1 >conftest.err
6318 rm -f conftest.er1
6319 cat conftest.err >&5
6320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6321 (exit $ac_status); } && {
6322 test -z "$ac_c_werror_flag" ||
6323 test ! -s conftest.err
6324 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6325 emacs_alsa_subdir=yes
6326else
6327 echo "$as_me: failed program was:" >&5
6328sed 's/^/| /' conftest.$ac_ext >&5
6329
6330 emacs_alsa_subdir=no
6331fi
6332
6333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6334 if test "$emacs_alsa_subdir" != yes; then
6335 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6336echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6337 { (exit 1); exit 1; }; }
6338 fi
6339 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6340 fi
6341
6342 CFLAGS="$SAVE_CFLAGS"
6343 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6344 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6345 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6346
6347cat >>confdefs.h <<\_ACEOF
6348#define HAVE_ALSA 1
6349_ACEOF
6350
6351 fi
6352
f4988be7 6353fi
c0d27fcc
MR
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
22044edf
DL
6372
6373
973a76b1 6374
cffcede7 6375
551ffc27 6376
226e2359 6377
c0d27fcc 6378
f4988be7 6379
98418dba
CW
6380for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6381 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6382 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6383 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6384 sys/utsname.h pwd.h
98418dba
CW
6385do
6386as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6387if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6388 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6389echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6390if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6391 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6392fi
ca81d7a0
JD
6393ac_res=`eval echo '${'$as_ac_Header'}'`
6394 { echo "$as_me:$LINENO: result: $ac_res" >&5
6395echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6396else
c0d27fcc 6397 # Is the header compilable?
ca81d7a0
JD
6398{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6399echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6400cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6401/* confdefs.h. */
6402_ACEOF
6403cat confdefs.h >>conftest.$ac_ext
6404cat >>conftest.$ac_ext <<_ACEOF
6405/* end confdefs.h. */
c0d27fcc
MR
6406$ac_includes_default
6407#include <$ac_header>
6408_ACEOF
6409rm -f conftest.$ac_objext
ca81d7a0
JD
6410if { (ac_try="$ac_compile"
6411case "(($ac_try" in
6412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6413 *) ac_try_echo=$ac_try;;
6414esac
6415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6416 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6417 ac_status=$?
edfaf76d
LK
6418 grep -v '^ *+' conftest.er1 >conftest.err
6419 rm -f conftest.er1
6420 cat conftest.err >&5
c0d27fcc 6421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6422 (exit $ac_status); } && {
6423 test -z "$ac_c_werror_flag" ||
6424 test ! -s conftest.err
6425 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6426 ac_header_compiler=yes
6427else
6428 echo "$as_me: failed program was:" >&5
19650fd6
AS
6429sed 's/^/| /' conftest.$ac_ext >&5
6430
ca81d7a0 6431 ac_header_compiler=no
c0d27fcc 6432fi
ca81d7a0
JD
6433
6434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6435{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6436echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6437
6438# Is the header present?
ca81d7a0
JD
6439{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6440echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6441cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6442/* confdefs.h. */
6443_ACEOF
6444cat confdefs.h >>conftest.$ac_ext
6445cat >>conftest.$ac_ext <<_ACEOF
6446/* end confdefs.h. */
98418dba 6447#include <$ac_header>
503d2be0 6448_ACEOF
ca81d7a0
JD
6449if { (ac_try="$ac_cpp conftest.$ac_ext"
6450case "(($ac_try" in
6451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6452 *) ac_try_echo=$ac_try;;
6453esac
6454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6455 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6456 ac_status=$?
6bae0ccf 6457 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6458 rm -f conftest.er1
6459 cat conftest.err >&5
c0d27fcc 6460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6461 (exit $ac_status); } >/dev/null && {
6462 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6463 test ! -s conftest.err
6464 }; then
c0d27fcc 6465 ac_header_preproc=yes
34ec9ebe 6466else
503d2be0 6467 echo "$as_me: failed program was:" >&5
19650fd6
AS
6468sed 's/^/| /' conftest.$ac_ext >&5
6469
c0d27fcc 6470 ac_header_preproc=no
34ec9ebe 6471fi
ca81d7a0 6472
98418dba 6473rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6474{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6475echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6476
6477# So? What about this header?
edfaf76d
LK
6478case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6479 yes:no: )
c0d27fcc
MR
6480 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6481echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6482 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6483echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6484 ac_header_preproc=yes
19650fd6 6485 ;;
edfaf76d 6486 no:yes:* )
c0d27fcc
MR
6487 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6488echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6489 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6490echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6491 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6492echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6493 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6494echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6495 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6496echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6497 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6498echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6499
19650fd6 6500 ;;
c0d27fcc 6501esac
ca81d7a0
JD
6502{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6503echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6504if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6505 echo $ECHO_N "(cached) $ECHO_C" >&6
6506else
edfaf76d 6507 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6508fi
ca81d7a0
JD
6509ac_res=`eval echo '${'$as_ac_Header'}'`
6510 { echo "$as_me:$LINENO: result: $ac_res" >&5
6511echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6512
6513fi
98418dba 6514if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6515 cat >>confdefs.h <<_ACEOF
98418dba 6516#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6517_ACEOF
34ec9ebe 6518
98418dba 6519fi
c0d27fcc 6520
98418dba
CW
6521done
6522
22044edf 6523
ca81d7a0
JD
6524{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6525echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6526cat >conftest.$ac_ext <<_ACEOF
6527/* confdefs.h. */
6528_ACEOF
6529cat confdefs.h >>conftest.$ac_ext
6530cat >>conftest.$ac_ext <<_ACEOF
6531/* end confdefs.h. */
6532#include <sys/personality.h>
6533int
6534main ()
6535{
6536personality (PER_LINUX32)
6537 ;
6538 return 0;
6539}
6540_ACEOF
6541rm -f conftest.$ac_objext
ca81d7a0
JD
6542if { (ac_try="$ac_compile"
6543case "(($ac_try" in
6544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6545 *) ac_try_echo=$ac_try;;
6546esac
6547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6548 (eval "$ac_compile") 2>conftest.er1
f17e308a 6549 ac_status=$?
edfaf76d
LK
6550 grep -v '^ *+' conftest.er1 >conftest.err
6551 rm -f conftest.er1
6552 cat conftest.err >&5
f17e308a 6553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6554 (exit $ac_status); } && {
6555 test -z "$ac_c_werror_flag" ||
6556 test ! -s conftest.err
6557 } && test -s conftest.$ac_objext; then
f17e308a
JD
6558 emacs_cv_personality_linux32=yes
6559else
6560 echo "$as_me: failed program was:" >&5
6561sed 's/^/| /' conftest.$ac_ext >&5
6562
ca81d7a0 6563 emacs_cv_personality_linux32=no
f17e308a 6564fi
ca81d7a0
JD
6565
6566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6567{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6568echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6569
6570if test $emacs_cv_personality_linux32 = yes; then
6571
6572cat >>confdefs.h <<\_ACEOF
6573#define HAVE_PERSONALITY_LINUX32 1
6574_ACEOF
6575
6576fi
6577
6578
22044edf
DL
6579for ac_header in term.h
6580do
6581as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6582{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6583echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6584if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6585 echo $ECHO_N "(cached) $ECHO_C" >&6
6586else
6587 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6588/* confdefs.h. */
6589_ACEOF
6590cat confdefs.h >>conftest.$ac_ext
6591cat >>conftest.$ac_ext <<_ACEOF
6592/* end confdefs.h. */
22044edf
DL
6593#include <$ac_header>
6594_ACEOF
ca81d7a0
JD
6595if { (ac_try="$ac_cpp conftest.$ac_ext"
6596case "(($ac_try" in
6597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6598 *) ac_try_echo=$ac_try;;
6599esac
6600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6601 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6602 ac_status=$?
6603 grep -v '^ *+' conftest.er1 >conftest.err
6604 rm -f conftest.er1
6605 cat conftest.err >&5
6606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6607 (exit $ac_status); } >/dev/null && {
6608 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6609 test ! -s conftest.err
6610 }; then
22044edf
DL
6611 eval "$as_ac_Header=yes"
6612else
6613 echo "$as_me: failed program was:" >&5
19650fd6
AS
6614sed 's/^/| /' conftest.$ac_ext >&5
6615
22044edf
DL
6616 eval "$as_ac_Header=no"
6617fi
ca81d7a0 6618
22044edf
DL
6619rm -f conftest.err conftest.$ac_ext
6620fi
ca81d7a0
JD
6621ac_res=`eval echo '${'$as_ac_Header'}'`
6622 { echo "$as_me:$LINENO: result: $ac_res" >&5
6623echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6624if test `eval echo '${'$as_ac_Header'}'` = yes; then
6625 cat >>confdefs.h <<_ACEOF
6626#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6627_ACEOF
6628
6629fi
6630
6631done
6632
ca81d7a0
JD
6633{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6634echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6635if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6636 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6637else
503d2be0 6638 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6639/* confdefs.h. */
6640_ACEOF
6641cat confdefs.h >>conftest.$ac_ext
6642cat >>conftest.$ac_ext <<_ACEOF
6643/* end confdefs.h. */
98418dba
CW
6644#include <stdlib.h>
6645#include <stdarg.h>
6646#include <string.h>
6647#include <float.h>
6648
19650fd6
AS
6649int
6650main ()
6651{
6652
6653 ;
6654 return 0;
6655}
98418dba 6656_ACEOF
19650fd6 6657rm -f conftest.$ac_objext
ca81d7a0
JD
6658if { (ac_try="$ac_compile"
6659case "(($ac_try" in
6660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6661 *) ac_try_echo=$ac_try;;
6662esac
6663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6664 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6665 ac_status=$?
edfaf76d
LK
6666 grep -v '^ *+' conftest.er1 >conftest.err
6667 rm -f conftest.er1
6668 cat conftest.err >&5
cd958eb3 6669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6670 (exit $ac_status); } && {
6671 test -z "$ac_c_werror_flag" ||
6672 test ! -s conftest.err
6673 } && test -s conftest.$ac_objext; then
98418dba 6674 ac_cv_header_stdc=yes
ba4481b5 6675else
503d2be0 6676 echo "$as_me: failed program was:" >&5
19650fd6
AS
6677sed 's/^/| /' conftest.$ac_ext >&5
6678
ca81d7a0 6679 ac_cv_header_stdc=no
ba4481b5 6680fi
ca81d7a0
JD
6681
6682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6683
6684if test $ac_cv_header_stdc = yes; then
6685 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6686 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6687/* confdefs.h. */
6688_ACEOF
6689cat confdefs.h >>conftest.$ac_ext
6690cat >>conftest.$ac_ext <<_ACEOF
6691/* end confdefs.h. */
98418dba
CW
6692#include <string.h>
6693
6694_ACEOF
6695if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6696 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6697 :
6698else
6699 ac_cv_header_stdc=no
ba4481b5 6700fi
98418dba 6701rm -f conftest*
ba4481b5
DL
6702
6703fi
6704
98418dba
CW
6705if test $ac_cv_header_stdc = yes; then
6706 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6707 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6708/* confdefs.h. */
6709_ACEOF
6710cat confdefs.h >>conftest.$ac_ext
6711cat >>conftest.$ac_ext <<_ACEOF
6712/* end confdefs.h. */
98418dba
CW
6713#include <stdlib.h>
6714
6715_ACEOF
6716if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6717 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6718 :
6719else
6720 ac_cv_header_stdc=no
6721fi
6722rm -f conftest*
6723
6724fi
6725
6726if test $ac_cv_header_stdc = yes; then
6727 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6728 if test "$cross_compiling" = yes; then
6729 :
d42122a3 6730else
503d2be0 6731 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6732/* confdefs.h. */
6733_ACEOF
6734cat confdefs.h >>conftest.$ac_ext
6735cat >>conftest.$ac_ext <<_ACEOF
6736/* end confdefs.h. */
98418dba 6737#include <ctype.h>
ca81d7a0 6738#include <stdlib.h>
98418dba
CW
6739#if ((' ' & 0x0FF) == 0x020)
6740# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6741# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6742#else
19650fd6 6743# define ISLOWER(c) \
edfaf76d
LK
6744 (('a' <= (c) && (c) <= 'i') \
6745 || ('j' <= (c) && (c) <= 'r') \
6746 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6747# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6748#endif
6749
6750#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6751int
6752main ()
6753{
98418dba
CW
6754 int i;
6755 for (i = 0; i < 256; i++)
6756 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6757 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6758 return 2;
6759 return 0;
503d2be0
AS
6760}
6761_ACEOF
98418dba 6762rm -f conftest$ac_exeext
ca81d7a0
JD
6763if { (ac_try="$ac_link"
6764case "(($ac_try" in
6765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6766 *) ac_try_echo=$ac_try;;
6767esac
6768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6769 (eval "$ac_link") 2>&5
503d2be0 6770 ac_status=$?
c0d27fcc 6771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6772 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6773 { (case "(($ac_try" in
6774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6775 *) ac_try_echo=$ac_try;;
6776esac
6777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6778 (eval "$ac_try") 2>&5
503d2be0 6779 ac_status=$?
c0d27fcc 6780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6781 (exit $ac_status); }; }; then
98418dba 6782 :
d42122a3 6783else
98418dba
CW
6784 echo "$as_me: program exited with status $ac_status" >&5
6785echo "$as_me: failed program was:" >&5
19650fd6
AS
6786sed 's/^/| /' conftest.$ac_ext >&5
6787
c0d27fcc 6788( exit $ac_status )
98418dba 6789ac_cv_header_stdc=no
d42122a3 6790fi
ca81d7a0 6791rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6792fi
ca81d7a0
JD
6793
6794
98418dba
CW
6795fi
6796fi
ca81d7a0
JD
6797{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6798echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
6799if test $ac_cv_header_stdc = yes; then
6800
c0d27fcc 6801cat >>confdefs.h <<\_ACEOF
98418dba 6802#define STDC_HEADERS 1
c0d27fcc 6803_ACEOF
d42122a3
DL
6804
6805fi
6806
ca81d7a0
JD
6807{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
6808echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 6809if test "${ac_cv_header_time+set}" = set; then
503d2be0 6810 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6811else
503d2be0 6812 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6813/* confdefs.h. */
6814_ACEOF
6815cat confdefs.h >>conftest.$ac_ext
6816cat >>conftest.$ac_ext <<_ACEOF
6817/* end confdefs.h. */
ba4481b5 6818#include <sys/types.h>
98418dba 6819#include <sys/time.h>
ba4481b5 6820#include <time.h>
503d2be0
AS
6821
6822int
6823main ()
6824{
98418dba
CW
6825if ((struct tm *) 0)
6826return 0;
503d2be0
AS
6827 ;
6828 return 0;
6829}
6830_ACEOF
6831rm -f conftest.$ac_objext
ca81d7a0
JD
6832if { (ac_try="$ac_compile"
6833case "(($ac_try" in
6834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6835 *) ac_try_echo=$ac_try;;
6836esac
6837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6838 (eval "$ac_compile") 2>conftest.er1
503d2be0 6839 ac_status=$?
edfaf76d
LK
6840 grep -v '^ *+' conftest.er1 >conftest.err
6841 rm -f conftest.er1
6842 cat conftest.err >&5
c0d27fcc 6843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6844 (exit $ac_status); } && {
6845 test -z "$ac_c_werror_flag" ||
6846 test ! -s conftest.err
6847 } && test -s conftest.$ac_objext; then
98418dba 6848 ac_cv_header_time=yes
ba4481b5 6849else
503d2be0 6850 echo "$as_me: failed program was:" >&5
19650fd6
AS
6851sed 's/^/| /' conftest.$ac_ext >&5
6852
ca81d7a0 6853 ac_cv_header_time=no
ba4481b5 6854fi
ca81d7a0
JD
6855
6856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6857fi
ca81d7a0
JD
6858{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
6859echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 6860if test $ac_cv_header_time = yes; then
503d2be0 6861
c0d27fcc 6862cat >>confdefs.h <<\_ACEOF
98418dba 6863#define TIME_WITH_SYS_TIME 1
c0d27fcc 6864_ACEOF
ba4481b5
DL
6865
6866fi
6867
ca81d7a0
JD
6868{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6869echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 6870if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 6871 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6872else
503d2be0 6873 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6874/* confdefs.h. */
6875_ACEOF
6876cat confdefs.h >>conftest.$ac_ext
6877cat >>conftest.$ac_ext <<_ACEOF
6878/* end confdefs.h. */
cd958eb3
MB
6879$ac_includes_default
6880int
6881main ()
6882{
6883#ifndef sys_siglist
f053c89f 6884 (void) sys_siglist;
98418dba 6885#endif
503d2be0 6886
cd958eb3
MB
6887 ;
6888 return 0;
6889}
6890_ACEOF
6891rm -f conftest.$ac_objext
ca81d7a0
JD
6892if { (ac_try="$ac_compile"
6893case "(($ac_try" in
6894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6895 *) ac_try_echo=$ac_try;;
6896esac
6897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6898 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6899 ac_status=$?
edfaf76d
LK
6900 grep -v '^ *+' conftest.er1 >conftest.err
6901 rm -f conftest.er1
6902 cat conftest.err >&5
cd958eb3 6903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6904 (exit $ac_status); } && {
6905 test -z "$ac_c_werror_flag" ||
6906 test ! -s conftest.err
6907 } && test -s conftest.$ac_objext; then
cd958eb3
MB
6908 ac_cv_have_decl_sys_siglist=yes
6909else
6910 echo "$as_me: failed program was:" >&5
19650fd6
AS
6911sed 's/^/| /' conftest.$ac_ext >&5
6912
ca81d7a0 6913 ac_cv_have_decl_sys_siglist=no
cd958eb3 6914fi
ca81d7a0
JD
6915
6916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 6917fi
ca81d7a0
JD
6918{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
6919echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
6920if test $ac_cv_have_decl_sys_siglist = yes; then
6921
6922cat >>confdefs.h <<_ACEOF
6923#define HAVE_DECL_SYS_SIGLIST 1
6924_ACEOF
6925
6926
6927else
6928 cat >>confdefs.h <<_ACEOF
6929#define HAVE_DECL_SYS_SIGLIST 0
6930_ACEOF
6931
6932
6933fi
6934
6935
6936if test $ac_cv_have_decl_sys_siglist != yes; then
6937 # For Tru64, at least:
ca81d7a0
JD
6938 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
6939echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
6940if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
6941 echo $ECHO_N "(cached) $ECHO_C" >&6
6942else
6943 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6944/* confdefs.h. */
6945_ACEOF
6946cat confdefs.h >>conftest.$ac_ext
6947cat >>conftest.$ac_ext <<_ACEOF
6948/* end confdefs.h. */
cd958eb3 6949$ac_includes_default
503d2be0
AS
6950int
6951main ()
6952{
cd958eb3 6953#ifndef __sys_siglist
f053c89f 6954 (void) __sys_siglist;
cd958eb3
MB
6955#endif
6956
503d2be0
AS
6957 ;
6958 return 0;
6959}
6960_ACEOF
6961rm -f conftest.$ac_objext
ca81d7a0
JD
6962if { (ac_try="$ac_compile"
6963case "(($ac_try" in
6964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6965 *) ac_try_echo=$ac_try;;
6966esac
6967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6968 (eval "$ac_compile") 2>conftest.er1
503d2be0 6969 ac_status=$?
edfaf76d
LK
6970 grep -v '^ *+' conftest.er1 >conftest.err
6971 rm -f conftest.er1
6972 cat conftest.err >&5
c0d27fcc 6973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6974 (exit $ac_status); } && {
6975 test -z "$ac_c_werror_flag" ||
6976 test ! -s conftest.err
6977 } && test -s conftest.$ac_objext; then
cd958eb3 6978 ac_cv_have_decl___sys_siglist=yes
ba4481b5 6979else
503d2be0 6980 echo "$as_me: failed program was:" >&5
19650fd6
AS
6981sed 's/^/| /' conftest.$ac_ext >&5
6982
ca81d7a0 6983 ac_cv_have_decl___sys_siglist=no
ba4481b5 6984fi
ca81d7a0
JD
6985
6986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6987fi
ca81d7a0
JD
6988{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
6989echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 6990if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 6991
cd958eb3
MB
6992cat >>confdefs.h <<_ACEOF
6993#define HAVE_DECL___SYS_SIGLIST 1
6994_ACEOF
6995
6996
6997else
6998 cat >>confdefs.h <<_ACEOF
6999#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 7000_ACEOF
503d2be0 7001
cd958eb3 7002
ba4481b5
DL
7003fi
7004
cd958eb3
MB
7005
7006 if test $ac_cv_have_decl___sys_siglist = yes; then
7007
7008cat >>confdefs.h <<\_ACEOF
7009#define sys_siglist __sys_siglist
7010_ACEOF
7011
7012 fi
7013fi
ca81d7a0
JD
7014{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7015echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 7016if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 7017 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7018else
503d2be0 7019 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7020/* confdefs.h. */
7021_ACEOF
7022cat confdefs.h >>conftest.$ac_ext
7023cat >>conftest.$ac_ext <<_ACEOF
7024/* end confdefs.h. */
98418dba
CW
7025#include <sys/types.h>
7026#include <sys/wait.h>
7027#ifndef WEXITSTATUS
ca81d7a0 7028# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7029#endif
7030#ifndef WIFEXITED
7031# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7032#endif
503d2be0
AS
7033
7034int
7035main ()
7036{
98418dba
CW
7037 int s;
7038 wait (&s);
7039 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7040 ;
7041 return 0;
7042}
7043_ACEOF
98418dba 7044rm -f conftest.$ac_objext
ca81d7a0
JD
7045if { (ac_try="$ac_compile"
7046case "(($ac_try" in
7047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7048 *) ac_try_echo=$ac_try;;
7049esac
7050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7051 (eval "$ac_compile") 2>conftest.er1
503d2be0 7052 ac_status=$?
edfaf76d
LK
7053 grep -v '^ *+' conftest.er1 >conftest.err
7054 rm -f conftest.er1
7055 cat conftest.err >&5
c0d27fcc 7056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7057 (exit $ac_status); } && {
7058 test -z "$ac_c_werror_flag" ||
7059 test ! -s conftest.err
7060 } && test -s conftest.$ac_objext; then
98418dba 7061 ac_cv_header_sys_wait_h=yes
ba4481b5 7062else
503d2be0 7063 echo "$as_me: failed program was:" >&5
19650fd6
AS
7064sed 's/^/| /' conftest.$ac_ext >&5
7065
ca81d7a0 7066 ac_cv_header_sys_wait_h=no
ba4481b5 7067fi
ca81d7a0
JD
7068
7069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7070fi
ca81d7a0
JD
7071{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7072echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7073if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7074
c0d27fcc 7075cat >>confdefs.h <<\_ACEOF
98418dba 7076#define HAVE_SYS_WAIT_H 1
c0d27fcc 7077_ACEOF
ba4481b5 7078
ba4481b5
DL
7079fi
7080
c0d27fcc 7081
ca81d7a0
JD
7082{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7083echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7084if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7085 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7086else
503d2be0 7087 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7088/* confdefs.h. */
7089_ACEOF
7090cat confdefs.h >>conftest.$ac_ext
7091cat >>conftest.$ac_ext <<_ACEOF
7092/* end confdefs.h. */
98418dba
CW
7093#ifdef TIME_WITH_SYS_TIME
7094#include <sys/time.h>
7095#include <time.h>
7096#else
7097#ifdef HAVE_SYS_TIME_H
7098#include <sys/time.h>
7099#else
1113b624 7100#include <time.h>
98418dba
CW
7101#endif
7102#endif
7103#ifdef HAVE_UTIME_H
7104#include <utime.h>
7105#endif
503d2be0
AS
7106int
7107main ()
7108{
98418dba 7109static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7110 ;
7111 return 0;
7112}
7113_ACEOF
98418dba 7114rm -f conftest.$ac_objext
ca81d7a0
JD
7115if { (ac_try="$ac_compile"
7116case "(($ac_try" in
7117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7118 *) ac_try_echo=$ac_try;;
7119esac
7120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7121 (eval "$ac_compile") 2>conftest.er1
503d2be0 7122 ac_status=$?
edfaf76d
LK
7123 grep -v '^ *+' conftest.er1 >conftest.err
7124 rm -f conftest.er1
7125 cat conftest.err >&5
c0d27fcc 7126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7127 (exit $ac_status); } && {
7128 test -z "$ac_c_werror_flag" ||
7129 test ! -s conftest.err
7130 } && test -s conftest.$ac_objext; then
98418dba 7131 emacs_cv_struct_utimbuf=yes
1113b624 7132else
503d2be0 7133 echo "$as_me: failed program was:" >&5
19650fd6
AS
7134sed 's/^/| /' conftest.$ac_ext >&5
7135
ca81d7a0 7136 emacs_cv_struct_utimbuf=no
1113b624 7137fi
ca81d7a0
JD
7138
7139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7140fi
ca81d7a0
JD
7141{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7142echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7143if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7144
c0d27fcc 7145cat >>confdefs.h <<\_ACEOF
98418dba 7146#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7147_ACEOF
1113b624
PE
7148
7149fi
ba4481b5 7150
ca81d7a0
JD
7151{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7152echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7153if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7154 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7155else
98418dba 7156 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7157/* confdefs.h. */
7158_ACEOF
7159cat confdefs.h >>conftest.$ac_ext
7160cat >>conftest.$ac_ext <<_ACEOF
7161/* end confdefs.h. */
7397acc4 7162#include <sys/types.h>
98418dba 7163#include <signal.h>
98418dba 7164
503d2be0
AS
7165int
7166main ()
7167{
ca81d7a0 7168return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7169 ;
7170 return 0;
7171}
7172_ACEOF
98418dba 7173rm -f conftest.$ac_objext
ca81d7a0
JD
7174if { (ac_try="$ac_compile"
7175case "(($ac_try" in
7176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7177 *) ac_try_echo=$ac_try;;
7178esac
7179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7180 (eval "$ac_compile") 2>conftest.er1
503d2be0 7181 ac_status=$?
edfaf76d
LK
7182 grep -v '^ *+' conftest.er1 >conftest.err
7183 rm -f conftest.er1
7184 cat conftest.err >&5
c0d27fcc 7185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7186 (exit $ac_status); } && {
7187 test -z "$ac_c_werror_flag" ||
7188 test ! -s conftest.err
7189 } && test -s conftest.$ac_objext; then
ca81d7a0 7190 ac_cv_type_signal=int
503d2be0
AS
7191else
7192 echo "$as_me: failed program was:" >&5
19650fd6
AS
7193sed 's/^/| /' conftest.$ac_ext >&5
7194
ca81d7a0 7195 ac_cv_type_signal=void
503d2be0 7196fi
ca81d7a0
JD
7197
7198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7199fi
ca81d7a0
JD
7200{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7201echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7202
c0d27fcc 7203cat >>confdefs.h <<_ACEOF
98418dba 7204#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7205_ACEOF
7206
503d2be0 7207
c0d27fcc 7208
ca81d7a0
JD
7209{ echo "$as_me:$LINENO: checking for speed_t" >&5
7210echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7211if test "${emacs_cv_speed_t+set}" = set; then
7212 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7213else
98418dba 7214 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7215/* confdefs.h. */
7216_ACEOF
7217cat confdefs.h >>conftest.$ac_ext
7218cat >>conftest.$ac_ext <<_ACEOF
7219/* end confdefs.h. */
98418dba 7220#include <termios.h>
98418dba
CW
7221int
7222main ()
7223{
7224speed_t x = 1;
7225 ;
7226 return 0;
7227}
7228_ACEOF
7229rm -f conftest.$ac_objext
ca81d7a0
JD
7230if { (ac_try="$ac_compile"
7231case "(($ac_try" in
7232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7233 *) ac_try_echo=$ac_try;;
7234esac
7235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7236 (eval "$ac_compile") 2>conftest.er1
98418dba 7237 ac_status=$?
edfaf76d
LK
7238 grep -v '^ *+' conftest.er1 >conftest.err
7239 rm -f conftest.er1
7240 cat conftest.err >&5
c0d27fcc 7241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7242 (exit $ac_status); } && {
7243 test -z "$ac_c_werror_flag" ||
7244 test ! -s conftest.err
7245 } && test -s conftest.$ac_objext; then
98418dba
CW
7246 emacs_cv_speed_t=yes
7247else
7248 echo "$as_me: failed program was:" >&5
19650fd6
AS
7249sed 's/^/| /' conftest.$ac_ext >&5
7250
ca81d7a0 7251 emacs_cv_speed_t=no
98418dba 7252fi
ca81d7a0
JD
7253
7254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7255fi
ca81d7a0
JD
7256{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7257echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7258if test $emacs_cv_speed_t = yes; then
b936fae4 7259
c0d27fcc 7260cat >>confdefs.h <<\_ACEOF
98418dba 7261#define HAVE_SPEED_T 1
c0d27fcc 7262_ACEOF
98418dba 7263
7397acc4
DL
7264fi
7265
ca81d7a0
JD
7266{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7267echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7268if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7269 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7270else
503d2be0 7271 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7272/* confdefs.h. */
7273_ACEOF
7274cat confdefs.h >>conftest.$ac_ext
7275cat >>conftest.$ac_ext <<_ACEOF
7276/* end confdefs.h. */
98418dba
CW
7277#ifdef TIME_WITH_SYS_TIME
7278#include <sys/time.h>
7279#include <time.h>
7280#else
7281#ifdef HAVE_SYS_TIME_H
7282#include <sys/time.h>
7283#else
7284#include <time.h>
7285#endif
7286#endif
503d2be0
AS
7287int
7288main ()
7289{
98418dba 7290static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7291 ;
7292 return 0;
7293}
7294_ACEOF
7295rm -f conftest.$ac_objext
ca81d7a0
JD
7296if { (ac_try="$ac_compile"
7297case "(($ac_try" in
7298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7299 *) ac_try_echo=$ac_try;;
7300esac
7301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7302 (eval "$ac_compile") 2>conftest.er1
503d2be0 7303 ac_status=$?
edfaf76d
LK
7304 grep -v '^ *+' conftest.er1 >conftest.err
7305 rm -f conftest.er1
7306 cat conftest.err >&5
c0d27fcc 7307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7308 (exit $ac_status); } && {
7309 test -z "$ac_c_werror_flag" ||
7310 test ! -s conftest.err
7311 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7312 emacs_cv_struct_timeval=yes
7313else
503d2be0 7314 echo "$as_me: failed program was:" >&5
19650fd6
AS
7315sed 's/^/| /' conftest.$ac_ext >&5
7316
ca81d7a0 7317 emacs_cv_struct_timeval=no
7397acc4 7318fi
ca81d7a0
JD
7319
7320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7321fi
ca81d7a0
JD
7322{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7323echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7324HAVE_TIMEVAL=$emacs_cv_struct_timeval
7325if test $emacs_cv_struct_timeval = yes; then
b936fae4 7326
c0d27fcc 7327cat >>confdefs.h <<\_ACEOF
98418dba 7328#define HAVE_TIMEVAL 1
c0d27fcc 7329_ACEOF
7397acc4
DL
7330
7331fi
7332
ca81d7a0
JD
7333{ echo "$as_me:$LINENO: checking for struct exception" >&5
7334echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7335if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7336 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7337else
503d2be0 7338 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7339/* confdefs.h. */
7340_ACEOF
7341cat confdefs.h >>conftest.$ac_ext
7342cat >>conftest.$ac_ext <<_ACEOF
7343/* end confdefs.h. */
98418dba 7344#include <math.h>
503d2be0
AS
7345int
7346main ()
7347{
98418dba 7348static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7349 ;
7350 return 0;
ba4481b5 7351}
503d2be0
AS
7352_ACEOF
7353rm -f conftest.$ac_objext
ca81d7a0
JD
7354if { (ac_try="$ac_compile"
7355case "(($ac_try" in
7356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7357 *) ac_try_echo=$ac_try;;
7358esac
7359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7360 (eval "$ac_compile") 2>conftest.er1
503d2be0 7361 ac_status=$?
edfaf76d
LK
7362 grep -v '^ *+' conftest.er1 >conftest.err
7363 rm -f conftest.er1
7364 cat conftest.err >&5
c0d27fcc 7365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7366 (exit $ac_status); } && {
7367 test -z "$ac_c_werror_flag" ||
7368 test ! -s conftest.err
7369 } && test -s conftest.$ac_objext; then
98418dba 7370 emacs_cv_struct_exception=yes
ba4481b5 7371else
503d2be0 7372 echo "$as_me: failed program was:" >&5
19650fd6
AS
7373sed 's/^/| /' conftest.$ac_ext >&5
7374
ca81d7a0 7375 emacs_cv_struct_exception=no
ba4481b5 7376fi
ca81d7a0
JD
7377
7378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7379fi
ca81d7a0
JD
7380{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7381echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7382HAVE_EXCEPTION=$emacs_cv_struct_exception
7383if test $emacs_cv_struct_exception != yes; then
b936fae4 7384
c0d27fcc 7385cat >>confdefs.h <<\_ACEOF
98418dba 7386#define NO_MATHERR 1
c0d27fcc 7387_ACEOF
ba4481b5
DL
7388
7389fi
7390
7862d3a8
AS
7391
7392for ac_header in sys/socket.h
7393do
7394as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7395if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7396 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7397echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7398if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7399 echo $ECHO_N "(cached) $ECHO_C" >&6
7400fi
ca81d7a0
JD
7401ac_res=`eval echo '${'$as_ac_Header'}'`
7402 { echo "$as_me:$LINENO: result: $ac_res" >&5
7403echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7404else
7405 # Is the header compilable?
ca81d7a0
JD
7406{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7407echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7408cat >conftest.$ac_ext <<_ACEOF
7409/* confdefs.h. */
7410_ACEOF
7411cat confdefs.h >>conftest.$ac_ext
7412cat >>conftest.$ac_ext <<_ACEOF
7413/* end confdefs.h. */
7414$ac_includes_default
7415#include <$ac_header>
7416_ACEOF
7417rm -f conftest.$ac_objext
ca81d7a0
JD
7418if { (ac_try="$ac_compile"
7419case "(($ac_try" in
7420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7421 *) ac_try_echo=$ac_try;;
7422esac
7423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7424 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7425 ac_status=$?
edfaf76d
LK
7426 grep -v '^ *+' conftest.er1 >conftest.err
7427 rm -f conftest.er1
7428 cat conftest.err >&5
7862d3a8 7429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7430 (exit $ac_status); } && {
7431 test -z "$ac_c_werror_flag" ||
7432 test ! -s conftest.err
7433 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7434 ac_header_compiler=yes
7435else
7436 echo "$as_me: failed program was:" >&5
7437sed 's/^/| /' conftest.$ac_ext >&5
7438
ca81d7a0 7439 ac_header_compiler=no
7862d3a8 7440fi
ca81d7a0
JD
7441
7442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7443{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7444echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7445
7446# Is the header present?
ca81d7a0
JD
7447{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7448echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7449cat >conftest.$ac_ext <<_ACEOF
7450/* confdefs.h. */
7451_ACEOF
7452cat confdefs.h >>conftest.$ac_ext
7453cat >>conftest.$ac_ext <<_ACEOF
7454/* end confdefs.h. */
7455#include <$ac_header>
7456_ACEOF
ca81d7a0
JD
7457if { (ac_try="$ac_cpp conftest.$ac_ext"
7458case "(($ac_try" in
7459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7460 *) ac_try_echo=$ac_try;;
7461esac
7462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7463 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7464 ac_status=$?
7465 grep -v '^ *+' conftest.er1 >conftest.err
7466 rm -f conftest.er1
7467 cat conftest.err >&5
7468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7469 (exit $ac_status); } >/dev/null && {
7470 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7471 test ! -s conftest.err
7472 }; then
7862d3a8
AS
7473 ac_header_preproc=yes
7474else
7475 echo "$as_me: failed program was:" >&5
7476sed 's/^/| /' conftest.$ac_ext >&5
7477
7478 ac_header_preproc=no
7479fi
ca81d7a0 7480
7862d3a8 7481rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
7482{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7483echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7484
7485# So? What about this header?
edfaf76d
LK
7486case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7487 yes:no: )
7862d3a8
AS
7488 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7489echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7490 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7491echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7492 ac_header_preproc=yes
7862d3a8 7493 ;;
edfaf76d 7494 no:yes:* )
7862d3a8
AS
7495 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7496echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7497 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7498echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7499 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7500echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7501 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7502echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7503 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7504echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7505 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7506echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7507
7862d3a8
AS
7508 ;;
7509esac
ca81d7a0
JD
7510{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7511echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7512if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7513 echo $ECHO_N "(cached) $ECHO_C" >&6
7514else
edfaf76d 7515 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7516fi
ca81d7a0
JD
7517ac_res=`eval echo '${'$as_ac_Header'}'`
7518 { echo "$as_me:$LINENO: result: $ac_res" >&5
7519echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7520
7521fi
7522if test `eval echo '${'$as_ac_Header'}'` = yes; then
7523 cat >>confdefs.h <<_ACEOF
7524#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7525_ACEOF
7526
7527fi
7528
7529done
7530
7531
7532for ac_header in net/if.h
7533do
7534as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7535{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7536echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7537if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7538 echo $ECHO_N "(cached) $ECHO_C" >&6
7539else
7540 cat >conftest.$ac_ext <<_ACEOF
7541/* confdefs.h. */
7542_ACEOF
7543cat confdefs.h >>conftest.$ac_ext
7544cat >>conftest.$ac_ext <<_ACEOF
7545/* end confdefs.h. */
7546$ac_includes_default
7547#if HAVE_SYS_SOCKET_H
7548#include <sys/socket.h>
7549#endif
7550
7551#include <$ac_header>
7552_ACEOF
7553rm -f conftest.$ac_objext
ca81d7a0
JD
7554if { (ac_try="$ac_compile"
7555case "(($ac_try" in
7556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7557 *) ac_try_echo=$ac_try;;
7558esac
7559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7560 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7561 ac_status=$?
edfaf76d
LK
7562 grep -v '^ *+' conftest.er1 >conftest.err
7563 rm -f conftest.er1
7564 cat conftest.err >&5
7862d3a8 7565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7566 (exit $ac_status); } && {
7567 test -z "$ac_c_werror_flag" ||
7568 test ! -s conftest.err
7569 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7570 eval "$as_ac_Header=yes"
7571else
7572 echo "$as_me: failed program was:" >&5
7573sed 's/^/| /' conftest.$ac_ext >&5
7574
ca81d7a0 7575 eval "$as_ac_Header=no"
7862d3a8 7576fi
ca81d7a0
JD
7577
7578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7579fi
ca81d7a0
JD
7580ac_res=`eval echo '${'$as_ac_Header'}'`
7581 { echo "$as_me:$LINENO: result: $ac_res" >&5
7582echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7583if test `eval echo '${'$as_ac_Header'}'` = yes; then
7584 cat >>confdefs.h <<_ACEOF
7585#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7586_ACEOF
7587
7588fi
7589
7590done
7591
7592
ca81d7a0
JD
7593{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7594echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7595if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7596 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7597else
503d2be0 7598 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7599/* confdefs.h. */
7600_ACEOF
7601cat confdefs.h >>conftest.$ac_ext
7602cat >>conftest.$ac_ext <<_ACEOF
7603/* end confdefs.h. */
98418dba
CW
7604#include <sys/types.h>
7605#include <time.h>
7397acc4 7606
503d2be0
AS
7607int
7608main ()
7609{
f053c89f
CY
7610struct tm tm;
7611 int *p = &tm.tm_sec;
7612 return !p;
503d2be0
AS
7613 ;
7614 return 0;
7615}
7616_ACEOF
7617rm -f conftest.$ac_objext
ca81d7a0
JD
7618if { (ac_try="$ac_compile"
7619case "(($ac_try" in
7620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7621 *) ac_try_echo=$ac_try;;
7622esac
7623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7624 (eval "$ac_compile") 2>conftest.er1
503d2be0 7625 ac_status=$?
edfaf76d
LK
7626 grep -v '^ *+' conftest.er1 >conftest.err
7627 rm -f conftest.er1
7628 cat conftest.err >&5
c0d27fcc 7629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7630 (exit $ac_status); } && {
7631 test -z "$ac_c_werror_flag" ||
7632 test ! -s conftest.err
7633 } && test -s conftest.$ac_objext; then
35996d22
AS
7634 ac_cv_struct_tm=time.h
7635else
503d2be0 7636 echo "$as_me: failed program was:" >&5
19650fd6
AS
7637sed 's/^/| /' conftest.$ac_ext >&5
7638
ca81d7a0 7639 ac_cv_struct_tm=sys/time.h
7397acc4 7640fi
ca81d7a0
JD
7641
7642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7643fi
ca81d7a0
JD
7644{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7645echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7646if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7647
c0d27fcc 7648cat >>confdefs.h <<\_ACEOF
98418dba 7649#define TM_IN_SYS_TIME 1
c0d27fcc 7650_ACEOF
7397acc4
DL
7651
7652fi
ba4481b5 7653
ca81d7a0
JD
7654{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7655echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7656if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7657 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7658else
98418dba 7659 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7660/* confdefs.h. */
7661_ACEOF
7662cat confdefs.h >>conftest.$ac_ext
7663cat >>conftest.$ac_ext <<_ACEOF
7664/* end confdefs.h. */
98418dba
CW
7665#include <sys/types.h>
7666#include <$ac_cv_struct_tm>
ba4481b5 7667
c0d27fcc 7668
98418dba
CW
7669int
7670main ()
7671{
7672static struct tm ac_aggr;
7673if (ac_aggr.tm_zone)
7674return 0;
7675 ;
7676 return 0;
7677}
7678_ACEOF
7679rm -f conftest.$ac_objext
ca81d7a0
JD
7680if { (ac_try="$ac_compile"
7681case "(($ac_try" in
7682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7683 *) ac_try_echo=$ac_try;;
7684esac
7685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7686 (eval "$ac_compile") 2>conftest.er1
98418dba 7687 ac_status=$?
edfaf76d
LK
7688 grep -v '^ *+' conftest.er1 >conftest.err
7689 rm -f conftest.er1
7690 cat conftest.err >&5
c0d27fcc 7691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7692 (exit $ac_status); } && {
7693 test -z "$ac_c_werror_flag" ||
7694 test ! -s conftest.err
7695 } && test -s conftest.$ac_objext; then
98418dba 7696 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7697else
98418dba 7698 echo "$as_me: failed program was:" >&5
19650fd6
AS
7699sed 's/^/| /' conftest.$ac_ext >&5
7700
ca81d7a0 7701 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7702/* confdefs.h. */
7703_ACEOF
7704cat confdefs.h >>conftest.$ac_ext
7705cat >>conftest.$ac_ext <<_ACEOF
7706/* end confdefs.h. */
6bae0ccf
DL
7707#include <sys/types.h>
7708#include <$ac_cv_struct_tm>
7709
7710
7711int
7712main ()
7713{
7714static struct tm ac_aggr;
7715if (sizeof ac_aggr.tm_zone)
7716return 0;
7717 ;
7718 return 0;
7719}
7720_ACEOF
7721rm -f conftest.$ac_objext
ca81d7a0
JD
7722if { (ac_try="$ac_compile"
7723case "(($ac_try" in
7724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7725 *) ac_try_echo=$ac_try;;
7726esac
7727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7728 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7729 ac_status=$?
edfaf76d
LK
7730 grep -v '^ *+' conftest.er1 >conftest.err
7731 rm -f conftest.er1
7732 cat conftest.err >&5
6bae0ccf 7733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7734 (exit $ac_status); } && {
7735 test -z "$ac_c_werror_flag" ||
7736 test ! -s conftest.err
7737 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7738 ac_cv_member_struct_tm_tm_zone=yes
7739else
7740 echo "$as_me: failed program was:" >&5
19650fd6
AS
7741sed 's/^/| /' conftest.$ac_ext >&5
7742
ca81d7a0 7743 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7744fi
ca81d7a0
JD
7745
7746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7747fi
ca81d7a0
JD
7748
7749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7750fi
ca81d7a0
JD
7751{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7752echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 7753if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7754
c0d27fcc 7755cat >>confdefs.h <<_ACEOF
98418dba 7756#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7757_ACEOF
7758
ba4481b5 7759
98418dba 7760fi
ba4481b5 7761
98418dba 7762if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7763
c0d27fcc 7764cat >>confdefs.h <<\_ACEOF
98418dba 7765#define HAVE_TM_ZONE 1
c0d27fcc 7766_ACEOF
ba4481b5 7767
ba4481b5 7768else
ca81d7a0
JD
7769 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7770echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
7771if test "${ac_cv_have_decl_tzname+set}" = set; then
503d2be0 7772 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7773else
98418dba 7774 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7775/* confdefs.h. */
7776_ACEOF
7777cat confdefs.h >>conftest.$ac_ext
7778cat >>conftest.$ac_ext <<_ACEOF
7779/* end confdefs.h. */
98418dba 7780#include <time.h>
98418dba 7781
98418dba
CW
7782int
7783main ()
7784{
ca81d7a0 7785#ifndef tzname
f053c89f 7786 (void) tzname;
ca81d7a0
JD
7787#endif
7788
6bae0ccf
DL
7789 ;
7790 return 0;
7791}
7792_ACEOF
7793rm -f conftest.$ac_objext
ca81d7a0
JD
7794if { (ac_try="$ac_compile"
7795case "(($ac_try" in
7796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7797 *) ac_try_echo=$ac_try;;
7798esac
7799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7800 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7801 ac_status=$?
edfaf76d
LK
7802 grep -v '^ *+' conftest.er1 >conftest.err
7803 rm -f conftest.er1
7804 cat conftest.err >&5
6bae0ccf 7805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7806 (exit $ac_status); } && {
7807 test -z "$ac_c_werror_flag" ||
7808 test ! -s conftest.err
7809 } && test -s conftest.$ac_objext; then
ca81d7a0 7810 ac_cv_have_decl_tzname=yes
6bae0ccf
DL
7811else
7812 echo "$as_me: failed program was:" >&5
19650fd6
AS
7813sed 's/^/| /' conftest.$ac_ext >&5
7814
ca81d7a0 7815 ac_cv_have_decl_tzname=no
ba4481b5 7816fi
ca81d7a0
JD
7817
7818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7819fi
ca81d7a0
JD
7820{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
7821echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
7822if test $ac_cv_have_decl_tzname = yes; then
503d2be0 7823
c0d27fcc 7824cat >>confdefs.h <<_ACEOF
ca81d7a0 7825#define HAVE_DECL_TZNAME 1
c0d27fcc
MR
7826_ACEOF
7827
ba4481b5 7828
ca81d7a0
JD
7829else
7830 cat >>confdefs.h <<_ACEOF
7831#define HAVE_DECL_TZNAME 0
7832_ACEOF
ba4481b5 7833
ba4481b5 7834
98418dba 7835fi
ba4481b5 7836
ca81d7a0
JD
7837
7838 { echo "$as_me:$LINENO: checking for tzname" >&5
7839echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
98418dba 7840if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 7841 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7842else
98418dba 7843 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7844/* confdefs.h. */
7845_ACEOF
7846cat confdefs.h >>conftest.$ac_ext
7847cat >>conftest.$ac_ext <<_ACEOF
7848/* end confdefs.h. */
98418dba 7849#include <time.h>
ca81d7a0
JD
7850#if !HAVE_DECL_TZNAME
7851extern char *tzname[];
98418dba
CW
7852#endif
7853
98418dba
CW
7854int
7855main ()
7856{
ca81d7a0 7857return tzname[0][0];
98418dba
CW
7858 ;
7859 return 0;
7860}
7861_ACEOF
7862rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
7863if { (ac_try="$ac_link"
7864case "(($ac_try" in
7865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7866 *) ac_try_echo=$ac_try;;
7867esac
7868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7869 (eval "$ac_link") 2>conftest.er1
98418dba 7870 ac_status=$?
edfaf76d
LK
7871 grep -v '^ *+' conftest.er1 >conftest.err
7872 rm -f conftest.er1
7873 cat conftest.err >&5
c0d27fcc 7874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7875 (exit $ac_status); } && {
7876 test -z "$ac_c_werror_flag" ||
7877 test ! -s conftest.err
7878 } && test -s conftest$ac_exeext &&
7879 $as_test_x conftest$ac_exeext; then
98418dba
CW
7880 ac_cv_var_tzname=yes
7881else
7882 echo "$as_me: failed program was:" >&5
19650fd6
AS
7883sed 's/^/| /' conftest.$ac_ext >&5
7884
ca81d7a0 7885 ac_cv_var_tzname=no
ba4481b5 7886fi
6bae0ccf 7887
f053c89f 7888rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 7889 conftest$ac_exeext conftest.$ac_ext
98418dba 7890fi
ca81d7a0
JD
7891{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
7892echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
98418dba 7893 if test $ac_cv_var_tzname = yes; then
ba4481b5 7894
c0d27fcc 7895cat >>confdefs.h <<\_ACEOF
98418dba 7896#define HAVE_TZNAME 1
c0d27fcc 7897_ACEOF
503d2be0 7898
98418dba
CW
7899 fi
7900fi
503d2be0 7901
ca81d7a0
JD
7902{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
7903echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
b936fae4 7904if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
7905 echo $ECHO_N "(cached) $ECHO_C" >&6
7906else
7907 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7908/* confdefs.h. */
7909_ACEOF
7910cat confdefs.h >>conftest.$ac_ext
7911cat >>conftest.$ac_ext <<_ACEOF
7912/* end confdefs.h. */
98418dba 7913#include <time.h>
b936fae4 7914
98418dba
CW
7915int
7916main ()
7917{
b936fae4
AS
7918static struct tm ac_aggr;
7919if (ac_aggr.tm_gmtoff)
7920return 0;
98418dba
CW
7921 ;
7922 return 0;
7923}
7924_ACEOF
b936fae4 7925rm -f conftest.$ac_objext
ca81d7a0
JD
7926if { (ac_try="$ac_compile"
7927case "(($ac_try" in
7928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7929 *) ac_try_echo=$ac_try;;
7930esac
7931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7932 (eval "$ac_compile") 2>conftest.er1
98418dba 7933 ac_status=$?
edfaf76d
LK
7934 grep -v '^ *+' conftest.er1 >conftest.err
7935 rm -f conftest.er1
7936 cat conftest.err >&5
c0d27fcc 7937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7938 (exit $ac_status); } && {
7939 test -z "$ac_c_werror_flag" ||
7940 test ! -s conftest.err
7941 } && test -s conftest.$ac_objext; then
b936fae4 7942 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
7943else
7944 echo "$as_me: failed program was:" >&5
19650fd6
AS
7945sed 's/^/| /' conftest.$ac_ext >&5
7946
ca81d7a0 7947 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7948/* confdefs.h. */
7949_ACEOF
7950cat confdefs.h >>conftest.$ac_ext
7951cat >>conftest.$ac_ext <<_ACEOF
7952/* end confdefs.h. */
6bae0ccf
DL
7953#include <time.h>
7954
8799b3e4
CW
7955int
7956main ()
7957{
6bae0ccf
DL
7958static struct tm ac_aggr;
7959if (sizeof ac_aggr.tm_gmtoff)
7960return 0;
8799b3e4
CW
7961 ;
7962 return 0;
7963}
7964_ACEOF
6bae0ccf 7965rm -f conftest.$ac_objext
ca81d7a0
JD
7966if { (ac_try="$ac_compile"
7967case "(($ac_try" in
7968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7969 *) ac_try_echo=$ac_try;;
7970esac
7971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7972 (eval "$ac_compile") 2>conftest.er1
8799b3e4 7973 ac_status=$?
edfaf76d
LK
7974 grep -v '^ *+' conftest.er1 >conftest.err
7975 rm -f conftest.er1
7976 cat conftest.err >&5
c0d27fcc 7977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7978 (exit $ac_status); } && {
7979 test -z "$ac_c_werror_flag" ||
7980 test ! -s conftest.err
7981 } && test -s conftest.$ac_objext; then
6bae0ccf 7982 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
7983else
7984 echo "$as_me: failed program was:" >&5
19650fd6
AS
7985sed 's/^/| /' conftest.$ac_ext >&5
7986
ca81d7a0 7987 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 7988fi
ca81d7a0
JD
7989
7990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7991fi
ca81d7a0
JD
7992
7993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 7994fi
ca81d7a0
JD
7995{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
7996echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
7997if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
7998
7999cat >>confdefs.h <<\_ACEOF
8000#define HAVE_TM_GMTOFF 1
8001_ACEOF
8002
8003fi
8004
ca81d7a0
JD
8005{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
8006echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
8007if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
8008 echo $ECHO_N "(cached) $ECHO_C" >&6
8009else
8010 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8011/* confdefs.h. */
8012_ACEOF
8013cat confdefs.h >>conftest.$ac_ext
8014cat >>conftest.$ac_ext <<_ACEOF
8015/* end confdefs.h. */
7862d3a8
AS
8016$ac_includes_default
8017#if HAVE_SYS_SOCKET_H
8018#include <sys/socket.h>
8019#endif
8020#if HAVE_NET_IF_H
96f3a036 8021#include <net/if.h>
7862d3a8 8022#endif
96f3a036
DL
8023
8024int
8025main ()
8026{
8027static struct ifreq ac_aggr;
8028if (ac_aggr.ifr_flags)
8029return 0;
8030 ;
8031 return 0;
8032}
8033_ACEOF
8034rm -f conftest.$ac_objext
ca81d7a0
JD
8035if { (ac_try="$ac_compile"
8036case "(($ac_try" in
8037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8038 *) ac_try_echo=$ac_try;;
8039esac
8040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8041 (eval "$ac_compile") 2>conftest.er1
96f3a036 8042 ac_status=$?
edfaf76d
LK
8043 grep -v '^ *+' conftest.er1 >conftest.err
8044 rm -f conftest.er1
8045 cat conftest.err >&5
96f3a036 8046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8047 (exit $ac_status); } && {
8048 test -z "$ac_c_werror_flag" ||
8049 test ! -s conftest.err
8050 } && test -s conftest.$ac_objext; then
96f3a036
DL
8051 ac_cv_member_struct_ifreq_ifr_flags=yes
8052else
8053 echo "$as_me: failed program was:" >&5
8054sed 's/^/| /' conftest.$ac_ext >&5
8055
ca81d7a0 8056 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8057/* confdefs.h. */
8058_ACEOF
8059cat confdefs.h >>conftest.$ac_ext
8060cat >>conftest.$ac_ext <<_ACEOF
8061/* end confdefs.h. */
7862d3a8
AS
8062$ac_includes_default
8063#if HAVE_SYS_SOCKET_H
8064#include <sys/socket.h>
8065#endif
8066#if HAVE_NET_IF_H
96f3a036 8067#include <net/if.h>
7862d3a8 8068#endif
96f3a036
DL
8069
8070int
8071main ()
8072{
8073static struct ifreq ac_aggr;
8074if (sizeof ac_aggr.ifr_flags)
8075return 0;
8076 ;
8077 return 0;
8078}
8079_ACEOF
8080rm -f conftest.$ac_objext
ca81d7a0
JD
8081if { (ac_try="$ac_compile"
8082case "(($ac_try" in
8083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8084 *) ac_try_echo=$ac_try;;
8085esac
8086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8087 (eval "$ac_compile") 2>conftest.er1
96f3a036 8088 ac_status=$?
edfaf76d
LK
8089 grep -v '^ *+' conftest.er1 >conftest.err
8090 rm -f conftest.er1
8091 cat conftest.err >&5
96f3a036 8092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8093 (exit $ac_status); } && {
8094 test -z "$ac_c_werror_flag" ||
8095 test ! -s conftest.err
8096 } && test -s conftest.$ac_objext; then
96f3a036
DL
8097 ac_cv_member_struct_ifreq_ifr_flags=yes
8098else
8099 echo "$as_me: failed program was:" >&5
8100sed 's/^/| /' conftest.$ac_ext >&5
8101
ca81d7a0 8102 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8103fi
ca81d7a0
JD
8104
8105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8106fi
ca81d7a0
JD
8107
8108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8109fi
ca81d7a0
JD
8110{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8111echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8112if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8113
8114cat >>confdefs.h <<_ACEOF
8115#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8116_ACEOF
8117
8118
8119fi
ca81d7a0
JD
8120{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8121echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8122if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8123 echo $ECHO_N "(cached) $ECHO_C" >&6
8124else
8125 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8126/* confdefs.h. */
8127_ACEOF
8128cat confdefs.h >>conftest.$ac_ext
8129cat >>conftest.$ac_ext <<_ACEOF
8130/* end confdefs.h. */
7862d3a8
AS
8131$ac_includes_default
8132#if HAVE_SYS_SOCKET_H
8133#include <sys/socket.h>
8134#endif
8135#if HAVE_NET_IF_H
96f3a036 8136#include <net/if.h>
7862d3a8 8137#endif
96f3a036
DL
8138
8139int
8140main ()
8141{
8142static struct ifreq ac_aggr;
8143if (ac_aggr.ifr_hwaddr)
8144return 0;
8145 ;
8146 return 0;
8147}
8148_ACEOF
8149rm -f conftest.$ac_objext
ca81d7a0
JD
8150if { (ac_try="$ac_compile"
8151case "(($ac_try" in
8152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8153 *) ac_try_echo=$ac_try;;
8154esac
8155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8156 (eval "$ac_compile") 2>conftest.er1
96f3a036 8157 ac_status=$?
edfaf76d
LK
8158 grep -v '^ *+' conftest.er1 >conftest.err
8159 rm -f conftest.er1
8160 cat conftest.err >&5
96f3a036 8161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8162 (exit $ac_status); } && {
8163 test -z "$ac_c_werror_flag" ||
8164 test ! -s conftest.err
8165 } && test -s conftest.$ac_objext; then
96f3a036
DL
8166 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8167else
8168 echo "$as_me: failed program was:" >&5
8169sed 's/^/| /' conftest.$ac_ext >&5
8170
ca81d7a0 8171 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8172/* confdefs.h. */
8173_ACEOF
8174cat confdefs.h >>conftest.$ac_ext
8175cat >>conftest.$ac_ext <<_ACEOF
8176/* end confdefs.h. */
7862d3a8
AS
8177$ac_includes_default
8178#if HAVE_SYS_SOCKET_H
8179#include <sys/socket.h>
8180#endif
8181#if HAVE_NET_IF_H
96f3a036 8182#include <net/if.h>
7862d3a8 8183#endif
96f3a036
DL
8184
8185int
8186main ()
8187{
8188static struct ifreq ac_aggr;
8189if (sizeof ac_aggr.ifr_hwaddr)
8190return 0;
8191 ;
8192 return 0;
8193}
8194_ACEOF
8195rm -f conftest.$ac_objext
ca81d7a0
JD
8196if { (ac_try="$ac_compile"
8197case "(($ac_try" in
8198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8199 *) ac_try_echo=$ac_try;;
8200esac
8201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8202 (eval "$ac_compile") 2>conftest.er1
96f3a036 8203 ac_status=$?
edfaf76d
LK
8204 grep -v '^ *+' conftest.er1 >conftest.err
8205 rm -f conftest.er1
8206 cat conftest.err >&5
96f3a036 8207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8208 (exit $ac_status); } && {
8209 test -z "$ac_c_werror_flag" ||
8210 test ! -s conftest.err
8211 } && test -s conftest.$ac_objext; then
96f3a036
DL
8212 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8213else
8214 echo "$as_me: failed program was:" >&5
8215sed 's/^/| /' conftest.$ac_ext >&5
8216
ca81d7a0 8217 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8218fi
ca81d7a0
JD
8219
8220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8221fi
ca81d7a0
JD
8222
8223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8224fi
ca81d7a0
JD
8225{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8226echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8227if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8228
8229cat >>confdefs.h <<_ACEOF
8230#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8231_ACEOF
8232
8233
8234fi
ca81d7a0
JD
8235{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8236echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8237if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8238 echo $ECHO_N "(cached) $ECHO_C" >&6
8239else
8240 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8241/* confdefs.h. */
8242_ACEOF
8243cat confdefs.h >>conftest.$ac_ext
8244cat >>conftest.$ac_ext <<_ACEOF
8245/* end confdefs.h. */
7862d3a8
AS
8246$ac_includes_default
8247#if HAVE_SYS_SOCKET_H
8248#include <sys/socket.h>
8249#endif
8250#if HAVE_NET_IF_H
96f3a036 8251#include <net/if.h>
7862d3a8 8252#endif
96f3a036
DL
8253
8254int
8255main ()
8256{
8257static struct ifreq ac_aggr;
8258if (ac_aggr.ifr_netmask)
8259return 0;
8260 ;
8261 return 0;
8262}
8263_ACEOF
8264rm -f conftest.$ac_objext
ca81d7a0
JD
8265if { (ac_try="$ac_compile"
8266case "(($ac_try" in
8267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8268 *) ac_try_echo=$ac_try;;
8269esac
8270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8271 (eval "$ac_compile") 2>conftest.er1
96f3a036 8272 ac_status=$?
edfaf76d
LK
8273 grep -v '^ *+' conftest.er1 >conftest.err
8274 rm -f conftest.er1
8275 cat conftest.err >&5
96f3a036 8276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8277 (exit $ac_status); } && {
8278 test -z "$ac_c_werror_flag" ||
8279 test ! -s conftest.err
8280 } && test -s conftest.$ac_objext; then
96f3a036
DL
8281 ac_cv_member_struct_ifreq_ifr_netmask=yes
8282else
8283 echo "$as_me: failed program was:" >&5
8284sed 's/^/| /' conftest.$ac_ext >&5
8285
ca81d7a0 8286 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8287/* confdefs.h. */
8288_ACEOF
8289cat confdefs.h >>conftest.$ac_ext
8290cat >>conftest.$ac_ext <<_ACEOF
8291/* end confdefs.h. */
7862d3a8
AS
8292$ac_includes_default
8293#if HAVE_SYS_SOCKET_H
8294#include <sys/socket.h>
8295#endif
8296#if HAVE_NET_IF_H
96f3a036 8297#include <net/if.h>
7862d3a8 8298#endif
96f3a036
DL
8299
8300int
8301main ()
8302{
8303static struct ifreq ac_aggr;
8304if (sizeof ac_aggr.ifr_netmask)
8305return 0;
8306 ;
8307 return 0;
8308}
8309_ACEOF
8310rm -f conftest.$ac_objext
ca81d7a0
JD
8311if { (ac_try="$ac_compile"
8312case "(($ac_try" in
8313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8314 *) ac_try_echo=$ac_try;;
8315esac
8316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8317 (eval "$ac_compile") 2>conftest.er1
96f3a036 8318 ac_status=$?
edfaf76d
LK
8319 grep -v '^ *+' conftest.er1 >conftest.err
8320 rm -f conftest.er1
8321 cat conftest.err >&5
96f3a036 8322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8323 (exit $ac_status); } && {
8324 test -z "$ac_c_werror_flag" ||
8325 test ! -s conftest.err
8326 } && test -s conftest.$ac_objext; then
96f3a036
DL
8327 ac_cv_member_struct_ifreq_ifr_netmask=yes
8328else
8329 echo "$as_me: failed program was:" >&5
8330sed 's/^/| /' conftest.$ac_ext >&5
8331
ca81d7a0 8332 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8333fi
ca81d7a0
JD
8334
8335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8336fi
ca81d7a0
JD
8337
8338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8339fi
ca81d7a0
JD
8340{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8341echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8342if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8343
8344cat >>confdefs.h <<_ACEOF
8345#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8346_ACEOF
8347
8348
8349fi
ca81d7a0
JD
8350{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8351echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8352if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8353 echo $ECHO_N "(cached) $ECHO_C" >&6
8354else
8355 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8356/* confdefs.h. */
8357_ACEOF
8358cat confdefs.h >>conftest.$ac_ext
8359cat >>conftest.$ac_ext <<_ACEOF
8360/* end confdefs.h. */
7862d3a8
AS
8361$ac_includes_default
8362#if HAVE_SYS_SOCKET_H
8363#include <sys/socket.h>
8364#endif
8365#if HAVE_NET_IF_H
96f3a036 8366#include <net/if.h>
7862d3a8 8367#endif
96f3a036
DL
8368
8369int
8370main ()
8371{
8372static struct ifreq ac_aggr;
8373if (ac_aggr.ifr_broadaddr)
8374return 0;
8375 ;
8376 return 0;
8377}
8378_ACEOF
8379rm -f conftest.$ac_objext
ca81d7a0
JD
8380if { (ac_try="$ac_compile"
8381case "(($ac_try" in
8382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8383 *) ac_try_echo=$ac_try;;
8384esac
8385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8386 (eval "$ac_compile") 2>conftest.er1
96f3a036 8387 ac_status=$?
edfaf76d
LK
8388 grep -v '^ *+' conftest.er1 >conftest.err
8389 rm -f conftest.er1
8390 cat conftest.err >&5
96f3a036 8391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8392 (exit $ac_status); } && {
8393 test -z "$ac_c_werror_flag" ||
8394 test ! -s conftest.err
8395 } && test -s conftest.$ac_objext; then
96f3a036
DL
8396 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8397else
8398 echo "$as_me: failed program was:" >&5
8399sed 's/^/| /' conftest.$ac_ext >&5
8400
ca81d7a0 8401 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8402/* confdefs.h. */
8403_ACEOF
8404cat confdefs.h >>conftest.$ac_ext
8405cat >>conftest.$ac_ext <<_ACEOF
8406/* end confdefs.h. */
7862d3a8
AS
8407$ac_includes_default
8408#if HAVE_SYS_SOCKET_H
8409#include <sys/socket.h>
8410#endif
8411#if HAVE_NET_IF_H
96f3a036 8412#include <net/if.h>
7862d3a8 8413#endif
96f3a036
DL
8414
8415int
8416main ()
8417{
8418static struct ifreq ac_aggr;
8419if (sizeof ac_aggr.ifr_broadaddr)
8420return 0;
8421 ;
8422 return 0;
8423}
8424_ACEOF
8425rm -f conftest.$ac_objext
ca81d7a0
JD
8426if { (ac_try="$ac_compile"
8427case "(($ac_try" in
8428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8429 *) ac_try_echo=$ac_try;;
8430esac
8431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8432 (eval "$ac_compile") 2>conftest.er1
96f3a036 8433 ac_status=$?
edfaf76d
LK
8434 grep -v '^ *+' conftest.er1 >conftest.err
8435 rm -f conftest.er1
8436 cat conftest.err >&5
96f3a036 8437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8438 (exit $ac_status); } && {
8439 test -z "$ac_c_werror_flag" ||
8440 test ! -s conftest.err
8441 } && test -s conftest.$ac_objext; then
96f3a036
DL
8442 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8443else
8444 echo "$as_me: failed program was:" >&5
8445sed 's/^/| /' conftest.$ac_ext >&5
8446
ca81d7a0 8447 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8448fi
ca81d7a0
JD
8449
8450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8451fi
ca81d7a0
JD
8452
8453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8454fi
ca81d7a0
JD
8455{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8456echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8457if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8458
8459cat >>confdefs.h <<_ACEOF
8460#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8461_ACEOF
8462
8463
8464fi
ca81d7a0
JD
8465{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8466echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8467if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8468 echo $ECHO_N "(cached) $ECHO_C" >&6
8469else
8470 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8471/* confdefs.h. */
8472_ACEOF
8473cat confdefs.h >>conftest.$ac_ext
8474cat >>conftest.$ac_ext <<_ACEOF
8475/* end confdefs.h. */
7862d3a8
AS
8476$ac_includes_default
8477#if HAVE_SYS_SOCKET_H
8478#include <sys/socket.h>
8479#endif
8480#if HAVE_NET_IF_H
96f3a036 8481#include <net/if.h>
7862d3a8 8482#endif
96f3a036
DL
8483
8484int
8485main ()
8486{
8487static struct ifreq ac_aggr;
8488if (ac_aggr.ifr_addr)
8489return 0;
8490 ;
8491 return 0;
8492}
8493_ACEOF
8494rm -f conftest.$ac_objext
ca81d7a0
JD
8495if { (ac_try="$ac_compile"
8496case "(($ac_try" in
8497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8498 *) ac_try_echo=$ac_try;;
8499esac
8500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8501 (eval "$ac_compile") 2>conftest.er1
96f3a036 8502 ac_status=$?
edfaf76d
LK
8503 grep -v '^ *+' conftest.er1 >conftest.err
8504 rm -f conftest.er1
8505 cat conftest.err >&5
96f3a036 8506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8507 (exit $ac_status); } && {
8508 test -z "$ac_c_werror_flag" ||
8509 test ! -s conftest.err
8510 } && test -s conftest.$ac_objext; then
96f3a036
DL
8511 ac_cv_member_struct_ifreq_ifr_addr=yes
8512else
8513 echo "$as_me: failed program was:" >&5
8514sed 's/^/| /' conftest.$ac_ext >&5
8515
ca81d7a0 8516 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8517/* confdefs.h. */
8518_ACEOF
8519cat confdefs.h >>conftest.$ac_ext
8520cat >>conftest.$ac_ext <<_ACEOF
8521/* end confdefs.h. */
7862d3a8
AS
8522$ac_includes_default
8523#if HAVE_SYS_SOCKET_H
8524#include <sys/socket.h>
8525#endif
8526#if HAVE_NET_IF_H
96f3a036 8527#include <net/if.h>
7862d3a8 8528#endif
96f3a036
DL
8529
8530int
8531main ()
8532{
8533static struct ifreq ac_aggr;
8534if (sizeof ac_aggr.ifr_addr)
8535return 0;
8536 ;
8537 return 0;
8538}
8539_ACEOF
8540rm -f conftest.$ac_objext
ca81d7a0
JD
8541if { (ac_try="$ac_compile"
8542case "(($ac_try" in
8543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8544 *) ac_try_echo=$ac_try;;
8545esac
8546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8547 (eval "$ac_compile") 2>conftest.er1
96f3a036 8548 ac_status=$?
edfaf76d
LK
8549 grep -v '^ *+' conftest.er1 >conftest.err
8550 rm -f conftest.er1
8551 cat conftest.err >&5
96f3a036 8552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8553 (exit $ac_status); } && {
8554 test -z "$ac_c_werror_flag" ||
8555 test ! -s conftest.err
8556 } && test -s conftest.$ac_objext; then
96f3a036
DL
8557 ac_cv_member_struct_ifreq_ifr_addr=yes
8558else
8559 echo "$as_me: failed program was:" >&5
8560sed 's/^/| /' conftest.$ac_ext >&5
8561
ca81d7a0 8562 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8563fi
ca81d7a0
JD
8564
8565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8566fi
ca81d7a0
JD
8567
8568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8569fi
ca81d7a0
JD
8570{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8571echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8572if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8573
8574cat >>confdefs.h <<_ACEOF
8575#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8576_ACEOF
8577
8578
8579fi
8580
8799b3e4 8581
8799b3e4 8582
ca81d7a0
JD
8583{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8584echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8585if test "$ac_cv_prog_cc_c89" != no; then
8586 { echo "$as_me:$LINENO: result: yes" >&5
8587echo "${ECHO_T}yes" >&6; }
98418dba 8588
c0d27fcc 8589cat >>confdefs.h <<\_ACEOF
98418dba 8590#define PROTOTYPES 1
c0d27fcc
MR
8591_ACEOF
8592
8593
8594cat >>confdefs.h <<\_ACEOF
8595#define __PROTOTYPES 1
8596_ACEOF
98418dba
CW
8597
8598else
ca81d7a0
JD
8599 { echo "$as_me:$LINENO: result: no" >&5
8600echo "${ECHO_T}no" >&6; }
98418dba
CW
8601fi
8602
ca81d7a0
JD
8603{ echo "$as_me:$LINENO: checking for working volatile" >&5
8604echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8605if test "${ac_cv_c_volatile+set}" = set; then
8606 echo $ECHO_N "(cached) $ECHO_C" >&6
8607else
8608 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8609/* confdefs.h. */
8610_ACEOF
8611cat confdefs.h >>conftest.$ac_ext
8612cat >>conftest.$ac_ext <<_ACEOF
8613/* end confdefs.h. */
98418dba 8614
98418dba
CW
8615int
8616main ()
8617{
8618
8619volatile int x;
ca81d7a0
JD
8620int * volatile y = (int *) 0;
8621return !x && !y;
98418dba
CW
8622 ;
8623 return 0;
8624}
8625_ACEOF
8626rm -f conftest.$ac_objext
ca81d7a0
JD
8627if { (ac_try="$ac_compile"
8628case "(($ac_try" in
8629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8630 *) ac_try_echo=$ac_try;;
8631esac
8632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8633 (eval "$ac_compile") 2>conftest.er1
98418dba 8634 ac_status=$?
edfaf76d
LK
8635 grep -v '^ *+' conftest.er1 >conftest.err
8636 rm -f conftest.er1
8637 cat conftest.err >&5
c0d27fcc 8638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8639 (exit $ac_status); } && {
8640 test -z "$ac_c_werror_flag" ||
8641 test ! -s conftest.err
8642 } && test -s conftest.$ac_objext; then
98418dba
CW
8643 ac_cv_c_volatile=yes
8644else
8645 echo "$as_me: failed program was:" >&5
19650fd6
AS
8646sed 's/^/| /' conftest.$ac_ext >&5
8647
ca81d7a0 8648 ac_cv_c_volatile=no
98418dba 8649fi
ca81d7a0
JD
8650
8651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8652fi
ca81d7a0
JD
8653{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8654echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8655if test $ac_cv_c_volatile = no; then
8656
c0d27fcc 8657cat >>confdefs.h <<\_ACEOF
98418dba 8658#define volatile
c0d27fcc 8659_ACEOF
98418dba
CW
8660
8661fi
8662
ca81d7a0
JD
8663{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8664echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8665if test "${ac_cv_c_const+set}" = set; then
8666 echo $ECHO_N "(cached) $ECHO_C" >&6
8667else
8668 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8669/* confdefs.h. */
8670_ACEOF
8671cat confdefs.h >>conftest.$ac_ext
8672cat >>conftest.$ac_ext <<_ACEOF
8673/* end confdefs.h. */
98418dba 8674
98418dba
CW
8675int
8676main ()
8677{
8678/* FIXME: Include the comments suggested by Paul. */
8679#ifndef __cplusplus
8680 /* Ultrix mips cc rejects this. */
8681 typedef int charset[2];
f053c89f 8682 const charset cs;
98418dba 8683 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
8684 char const *const *pcpcc;
8685 char **ppc;
98418dba
CW
8686 /* NEC SVR4.0.2 mips cc rejects this. */
8687 struct point {int x, y;};
8688 static struct point const zero = {0,0};
8689 /* AIX XL C 1.02.0.0 rejects this.
8690 It does not let you subtract one const X* pointer from another in
8691 an arm of an if-expression whose if-part is not a constant
8692 expression */
8693 const char *g = "string";
f053c89f 8694 pcpcc = &g + (g ? g-g : 0);
98418dba 8695 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
8696 ++pcpcc;
8697 ppc = (char**) pcpcc;
8698 pcpcc = (char const *const *) ppc;
98418dba
CW
8699 { /* SCO 3.2v4 cc rejects this. */
8700 char *t;
8701 char const *s = 0 ? (char *) 0 : (char const *) 0;
8702
8703 *t++ = 0;
ca81d7a0 8704 if (s) return 0;
98418dba
CW
8705 }
8706 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8707 int x[] = {25, 17};
8708 const int *foo = &x[0];
8709 ++foo;
8710 }
8711 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8712 typedef const int *iptr;
8713 iptr p = 0;
8714 ++p;
8715 }
8716 { /* AIX XL C 1.02.0.0 rejects this saying
8717 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8718 struct s { int j; const int *ap[3]; };
8719 struct s *b; b->j = 5;
8720 }
8721 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8722 const int foo = 10;
ca81d7a0 8723 if (!foo) return 0;
98418dba 8724 }
f053c89f 8725 return !cs[0] && !zero.x;
98418dba
CW
8726#endif
8727
8728 ;
8729 return 0;
8730}
8731_ACEOF
8732rm -f conftest.$ac_objext
ca81d7a0
JD
8733if { (ac_try="$ac_compile"
8734case "(($ac_try" in
8735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8736 *) ac_try_echo=$ac_try;;
8737esac
8738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8739 (eval "$ac_compile") 2>conftest.er1
98418dba 8740 ac_status=$?
edfaf76d
LK
8741 grep -v '^ *+' conftest.er1 >conftest.err
8742 rm -f conftest.er1
8743 cat conftest.err >&5
c0d27fcc 8744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8745 (exit $ac_status); } && {
8746 test -z "$ac_c_werror_flag" ||
8747 test ! -s conftest.err
8748 } && test -s conftest.$ac_objext; then
98418dba
CW
8749 ac_cv_c_const=yes
8750else
8751 echo "$as_me: failed program was:" >&5
19650fd6
AS
8752sed 's/^/| /' conftest.$ac_ext >&5
8753
ca81d7a0 8754 ac_cv_c_const=no
98418dba 8755fi
ca81d7a0
JD
8756
8757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8758fi
ca81d7a0
JD
8759{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8760echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8761if test $ac_cv_c_const = no; then
8762
c0d27fcc 8763cat >>confdefs.h <<\_ACEOF
98418dba 8764#define const
c0d27fcc 8765_ACEOF
98418dba
CW
8766
8767fi
8768
ca81d7a0
JD
8769{ echo "$as_me:$LINENO: checking for void * support" >&5
8770echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
8771if test "${emacs_cv_void_star+set}" = set; then
8772 echo $ECHO_N "(cached) $ECHO_C" >&6
8773else
8774 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8775/* confdefs.h. */
8776_ACEOF
8777cat confdefs.h >>conftest.$ac_ext
8778cat >>conftest.$ac_ext <<_ACEOF
8779/* end confdefs.h. */
98418dba 8780
98418dba
CW
8781int
8782main ()
8783{
8784void * foo;
8785 ;
8786 return 0;
8787}
8788_ACEOF
8789rm -f conftest.$ac_objext
ca81d7a0
JD
8790if { (ac_try="$ac_compile"
8791case "(($ac_try" in
8792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8793 *) ac_try_echo=$ac_try;;
8794esac
8795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8796 (eval "$ac_compile") 2>conftest.er1
98418dba 8797 ac_status=$?
edfaf76d
LK
8798 grep -v '^ *+' conftest.er1 >conftest.err
8799 rm -f conftest.er1
8800 cat conftest.err >&5
c0d27fcc 8801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8802 (exit $ac_status); } && {
8803 test -z "$ac_c_werror_flag" ||
8804 test ! -s conftest.err
8805 } && test -s conftest.$ac_objext; then
98418dba
CW
8806 emacs_cv_void_star=yes
8807else
8808 echo "$as_me: failed program was:" >&5
19650fd6
AS
8809sed 's/^/| /' conftest.$ac_ext >&5
8810
ca81d7a0 8811 emacs_cv_void_star=no
98418dba 8812fi
ca81d7a0
JD
8813
8814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8815fi
ca81d7a0
JD
8816{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
8817echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 8818if test $emacs_cv_void_star = yes; then
c0d27fcc 8819 cat >>confdefs.h <<\_ACEOF
98418dba 8820#define POINTER_TYPE void
c0d27fcc 8821_ACEOF
98418dba
CW
8822
8823else
c0d27fcc 8824 cat >>confdefs.h <<\_ACEOF
98418dba 8825#define POINTER_TYPE char
c0d27fcc 8826_ACEOF
98418dba
CW
8827
8828fi
8829
c0d27fcc 8830
4494a266
JD
8831
8832
cd958eb3 8833
ca81d7a0
JD
8834{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8835echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
8836set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
8837if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
8838 echo $ECHO_N "(cached) $ECHO_C" >&6
8839else
c0d27fcc 8840 cat >conftest.make <<\_ACEOF
ca81d7a0 8841SHELL = /bin/sh
98418dba 8842all:
ca81d7a0 8843 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 8844_ACEOF
98418dba 8845# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8846case `${MAKE-make} -f conftest.make 2>/dev/null` in
8847 *@@@%%%=?*=@@@%%%*)
8848 eval ac_cv_prog_make_${ac_make}_set=yes;;
8849 *)
8850 eval ac_cv_prog_make_${ac_make}_set=no;;
8851esac
98418dba
CW
8852rm -f conftest.make
8853fi
ca81d7a0
JD
8854if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
8855 { echo "$as_me:$LINENO: result: yes" >&5
8856echo "${ECHO_T}yes" >&6; }
98418dba
CW
8857 SET_MAKE=
8858else
ca81d7a0
JD
8859 { echo "$as_me:$LINENO: result: no" >&5
8860echo "${ECHO_T}no" >&6; }
98418dba
CW
8861 SET_MAKE="MAKE=${MAKE-make}"
8862fi
8863
c0d27fcc 8864
ca81d7a0
JD
8865{ echo "$as_me:$LINENO: checking for long file names" >&5
8866echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
8867if test "${ac_cv_sys_long_file_names+set}" = set; then
8868 echo $ECHO_N "(cached) $ECHO_C" >&6
8869else
8870 ac_cv_sys_long_file_names=yes
8871# Test for long file names in all the places we know might matter:
8872# . the current directory, where building will happen
8873# $prefix/lib where we will be installing things
8874# $exec_prefix/lib likewise
98418dba 8875# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
8876# /tmp where it might want to write temporary files
8877# /var/tmp likewise
8878# /usr/tmp likewise
ca81d7a0
JD
8879for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8880 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8881 # in the usual case where exec_prefix is '${prefix}'.
8882 case $ac_dir in #(
8883 . | /* | ?:[\\/]*) ;; #(
8884 *) continue;;
8885 esac
8886 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 8887 ac_xdir=$ac_dir/cf$$
ca81d7a0 8888 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
8889 ac_tf1=$ac_xdir/conftest9012345
8890 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 8891 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 8892 ac_cv_sys_long_file_names=no
ca81d7a0
JD
8893 rm -f -r "$ac_xdir" 2>/dev/null
8894 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
8895done
8896fi
ca81d7a0
JD
8897{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
8898echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
8899if test $ac_cv_sys_long_file_names = yes; then
8900
c0d27fcc 8901cat >>confdefs.h <<\_ACEOF
98418dba 8902#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8903_ACEOF
98418dba
CW
8904
8905fi
8906
c0d27fcc 8907
98418dba
CW
8908#### Choose a window system.
8909
ca81d7a0
JD
8910{ echo "$as_me:$LINENO: checking for X" >&5
8911echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 8912
c0d27fcc 8913
ca81d7a0 8914# Check whether --with-x was given.
98418dba 8915if test "${with_x+set}" = set; then
ca81d7a0
JD
8916 withval=$with_x;
8917fi
98418dba 8918
98418dba
CW
8919# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8920if test "x$with_x" = xno; then
8921 # The user explicitly disabled X.
8922 have_x=disabled
8923else
ca81d7a0
JD
8924 case $x_includes,$x_libraries in #(
8925 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
8926echo "$as_me: error: Cannot use X directory names containing '" >&2;}
8927 { (exit 1); exit 1; }; };; #(
8928 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
8929 echo $ECHO_N "(cached) $ECHO_C" >&6
8930else
8931 # One or both of the vars are not set, and there is no cached value.
8932ac_x_includes=no ac_x_libraries=no
ca81d7a0 8933rm -f -r conftest.dir
98418dba
CW
8934if mkdir conftest.dir; then
8935 cd conftest.dir
c0d27fcc 8936 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
8937incroot:
8938 @echo incroot='${INCROOT}'
8939usrlibdir:
8940 @echo usrlibdir='${USRLIBDIR}'
8941libdir:
8942 @echo libdir='${LIBDIR}'
8943_ACEOF
8944 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 8945 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8946 for ac_var in incroot usrlibdir libdir; do
8947 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8948 done
98418dba
CW
8949 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8950 for ac_extension in a so sl; do
ca81d7a0
JD
8951 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8952 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 8953 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
8954 fi
8955 done
8956 # Screen out bogus values from the imake configuration. They are
8957 # bogus both because they are the default anyway, and because
8958 # using them would break gcc on systems where it needs fixed includes.
8959 case $ac_im_incroot in
ca81d7a0 8960 /usr/include) ac_x_includes= ;;
98418dba
CW
8961 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8962 esac
8963 case $ac_im_usrlibdir in
8964 /usr/lib | /lib) ;;
8965 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8966 esac
8967 fi
8968 cd ..
ca81d7a0 8969 rm -f -r conftest.dir
98418dba
CW
8970fi
8971
8972# Standard set of common directories for X headers.
8973# Check X11 before X11Rn because it is often a symlink to the current release.
8974ac_x_header_dirs='
8975/usr/X11/include
8976/usr/X11R6/include
8977/usr/X11R5/include
8978/usr/X11R4/include
8979
8980/usr/include/X11
8981/usr/include/X11R6
8982/usr/include/X11R5
8983/usr/include/X11R4
8984
8985/usr/local/X11/include
8986/usr/local/X11R6/include
8987/usr/local/X11R5/include
8988/usr/local/X11R4/include
8989
8990/usr/local/include/X11
8991/usr/local/include/X11R6
8992/usr/local/include/X11R5
8993/usr/local/include/X11R4
8994
8995/usr/X386/include
8996/usr/x386/include
8997/usr/XFree86/include/X11
8998
8999/usr/include
9000/usr/local/include
9001/usr/unsupported/include
9002/usr/athena/include
9003/usr/local/x11r5/include
9004/usr/lpp/Xamples/include
9005
9006/usr/openwin/include
9007/usr/openwin/share/include'
9008
9009if test "$ac_x_includes" = no; then
ca81d7a0 9010 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
9011 # First, try using that file with no special directory specified.
9012 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9013/* confdefs.h. */
9014_ACEOF
9015cat confdefs.h >>conftest.$ac_ext
9016cat >>conftest.$ac_ext <<_ACEOF
9017/* end confdefs.h. */
ca81d7a0 9018#include <X11/Xlib.h>
98418dba 9019_ACEOF
ca81d7a0
JD
9020if { (ac_try="$ac_cpp conftest.$ac_ext"
9021case "(($ac_try" in
9022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9023 *) ac_try_echo=$ac_try;;
9024esac
9025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9026 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9027 ac_status=$?
6bae0ccf 9028 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9029 rm -f conftest.er1
9030 cat conftest.err >&5
c0d27fcc 9031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9032 (exit $ac_status); } >/dev/null && {
9033 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9034 test ! -s conftest.err
9035 }; then
98418dba
CW
9036 # We can compile using X headers with no special include directory.
9037ac_x_includes=
9038else
9039 echo "$as_me: failed program was:" >&5
19650fd6
AS
9040sed 's/^/| /' conftest.$ac_ext >&5
9041
98418dba 9042 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 9043 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9044 ac_x_includes=$ac_dir
9045 break
9046 fi
9047done
9048fi
ca81d7a0 9049
98418dba
CW
9050rm -f conftest.err conftest.$ac_ext
9051fi # $ac_x_includes = no
9052
9053if test "$ac_x_libraries" = no; then
9054 # Check for the libraries.
9055 # See if we find them without any special options.
9056 # Don't add to $LIBS permanently.
9057 ac_save_LIBS=$LIBS
f053c89f 9058 LIBS="-lX11 $LIBS"
98418dba 9059 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9060/* confdefs.h. */
9061_ACEOF
9062cat confdefs.h >>conftest.$ac_ext
9063cat >>conftest.$ac_ext <<_ACEOF
9064/* end confdefs.h. */
ca81d7a0 9065#include <X11/Xlib.h>
98418dba
CW
9066int
9067main ()
9068{
ca81d7a0 9069XrmInitialize ()
98418dba
CW
9070 ;
9071 return 0;
9072}
9073_ACEOF
9074rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9075if { (ac_try="$ac_link"
9076case "(($ac_try" in
9077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9078 *) ac_try_echo=$ac_try;;
9079esac
9080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9081 (eval "$ac_link") 2>conftest.er1
98418dba 9082 ac_status=$?
edfaf76d
LK
9083 grep -v '^ *+' conftest.er1 >conftest.err
9084 rm -f conftest.er1
9085 cat conftest.err >&5
c0d27fcc 9086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9087 (exit $ac_status); } && {
9088 test -z "$ac_c_werror_flag" ||
9089 test ! -s conftest.err
9090 } && test -s conftest$ac_exeext &&
9091 $as_test_x conftest$ac_exeext; then
98418dba
CW
9092 LIBS=$ac_save_LIBS
9093# We can link X programs with no special library path.
9094ac_x_libraries=
9095else
9096 echo "$as_me: failed program was:" >&5
19650fd6
AS
9097sed 's/^/| /' conftest.$ac_ext >&5
9098
ca81d7a0 9099 LIBS=$ac_save_LIBS
98418dba
CW
9100for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9101do
9102 # Don't even attempt the hair of trying to link an X program!
9103 for ac_extension in a so sl; do
f053c89f 9104 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9105 ac_x_libraries=$ac_dir
9106 break 2
9107 fi
9108 done
9109done
9110fi
ca81d7a0 9111
f053c89f 9112rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9113 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9114fi # $ac_x_libraries = no
9115
ca81d7a0
JD
9116case $ac_x_includes,$ac_x_libraries in #(
9117 no,* | *,no | *\'*)
9118 # Didn't find X, or a directory has "'" in its name.
9119 ac_cv_have_x="have_x=no";; #(
9120 *)
9121 # Record where we found X for the cache.
9122 ac_cv_have_x="have_x=yes\
9123 ac_x_includes='$ac_x_includes'\
9124 ac_x_libraries='$ac_x_libraries'"
9125esac
98418dba 9126fi
ca81d7a0
JD
9127;; #(
9128 *) have_x=yes;;
9129 esac
98418dba
CW
9130 eval "$ac_cv_have_x"
9131fi # $with_x != no
9132
9133if test "$have_x" != yes; then
ca81d7a0
JD
9134 { echo "$as_me:$LINENO: result: $have_x" >&5
9135echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9136 no_x=yes
9137else
9138 # If each of the values was on the command line, it overrides each guess.
9139 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9140 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9141 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9142 ac_cv_have_x="have_x=yes\
9143 ac_x_includes='$x_includes'\
9144 ac_x_libraries='$x_libraries'"
9145 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9146echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9147fi
9148
9149if test "$no_x" = yes; then
9150 window_system=none
9151else
9152 window_system=x11
9153fi
9154
a8cd2496
GM
9155## Workaround for bug in autoconf <= 2.62.
9156## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
9157## No need to do anything special for these standard directories.
921fbdf0 9158## This is an experiment, take it out if it causes problems.
a8cd2496
GM
9159if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
9160
9161 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
9162
9163fi
9164
92d1ccf4
AS
9165if test "${x_libraries}" != NONE; then
9166 if test -n "${x_libraries}"; then
9167 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9168 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9169 fi
98418dba 9170 x_default_search_path=""
92d1ccf4
AS
9171 x_search_path=${x_libraries}
9172 if test -z "${x_search_path}"; then
9173 x_search_path=/usr/lib
9174 fi
9175 for x_library in `echo ${x_search_path}: | \
9176 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9177 x_search_path="\
9178${x_library}/X11/%L/%T/%N%C%S:\
9179${x_library}/X11/%l/%T/%N%C%S:\
9180${x_library}/X11/%T/%N%C%S:\
9181${x_library}/X11/%L/%T/%N%S:\
9182${x_library}/X11/%l/%T/%N%S:\
9183${x_library}/X11/%T/%N%S"
9184 if test x"${x_default_search_path}" = x; then
9185 x_default_search_path=${x_search_path}
9186 else
9187 x_default_search_path="${x_search_path}:${x_default_search_path}"
9188 fi
9189 done
9190fi
9191if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9192 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9193fi
9194
9195if test x"${x_includes}" = x; then
9196 bitmapdir=/usr/include/X11/bitmaps
9197else
9198 # accumulate include directories that have X11 bitmap subdirectories
9199 bmd_acc="dummyval"
9200 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9201 if test -d "${bmd}/X11/bitmaps"; then
9202 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9203 fi
9204 if test -d "${bmd}/bitmaps"; then
9205 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9206 fi
9207 done
9208 if test ${bmd_acc} != "dummyval"; then
9209 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9210 fi
9211fi
9212
edfda783 9213HAVE_NS=no
ff1095d1
AR
9214NS_IMPL_COCOA=no
9215NS_IMPL_GNUSTEP=no
edfda783
AR
9216tmp_CPPFLAGS="$CPPFLAGS"
9217tmp_CFLAGS="$CFLAGS"
9218CPPFLAGS="$CPPFLAGS -x objective-c"
9219CFLAGS="$CFLAGS -x objective-c"
9220if test "${with_ns}" != no; then
9221 if test "${opsys}" = darwin; then
ff1095d1 9222 NS_IMPL_COCOA=yes
06b62770
AR
9223 ns_appdir=`pwd`/nextstep/Emacs.app
9224 ns_appbindir=`pwd`/nextstep/Emacs.app/Contents/MacOS
9225 ns_appresdir=`pwd`/nextstep/Emacs.app/Contents/Resources
9226 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
ecd43cb9 9227 elif test -f $GNUSTEP_CONFIG_FILE; then
ff1095d1 9228 NS_IMPL_GNUSTEP=yes
06b62770
AR
9229 ns_appdir=`pwd`/nextstep/Emacs.app
9230 ns_appbindir=`pwd`/nextstep/Emacs.app
9231 ns_appresdir=`pwd`/nextstep/Emacs.app/Resources
9232 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
ecd43cb9
GM
9233 GNUSTEP_MAKEFILES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_MAKEFILES)"
9234 GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
9235 GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
edfda783
AR
9236 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9237 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9238 REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9239 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
9240 fi
9241 if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9242 { echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
9243echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
9244if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9245 echo $ECHO_N "(cached) $ECHO_C" >&6
9246fi
9247{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
9248echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
9249else
9250 # Is the header compilable?
9251{ echo "$as_me:$LINENO: checking AppKit/AppKit.h usability" >&5
9252echo $ECHO_N "checking AppKit/AppKit.h usability... $ECHO_C" >&6; }
9253cat >conftest.$ac_ext <<_ACEOF
9254/* confdefs.h. */
9255_ACEOF
9256cat confdefs.h >>conftest.$ac_ext
9257cat >>conftest.$ac_ext <<_ACEOF
9258/* end confdefs.h. */
9259$ac_includes_default
9260#include <AppKit/AppKit.h>
9261_ACEOF
9262rm -f conftest.$ac_objext
9263if { (ac_try="$ac_compile"
9264case "(($ac_try" in
9265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9266 *) ac_try_echo=$ac_try;;
9267esac
9268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9269 (eval "$ac_compile") 2>conftest.er1
9270 ac_status=$?
9271 grep -v '^ *+' conftest.er1 >conftest.err
9272 rm -f conftest.er1
9273 cat conftest.err >&5
9274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9275 (exit $ac_status); } && {
9276 test -z "$ac_c_werror_flag" ||
9277 test ! -s conftest.err
9278 } && test -s conftest.$ac_objext; then
9279 ac_header_compiler=yes
9280else
9281 echo "$as_me: failed program was:" >&5
9282sed 's/^/| /' conftest.$ac_ext >&5
9283
9284 ac_header_compiler=no
9285fi
9286
9287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9288{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9289echo "${ECHO_T}$ac_header_compiler" >&6; }
9290
9291# Is the header present?
9292{ echo "$as_me:$LINENO: checking AppKit/AppKit.h presence" >&5
9293echo $ECHO_N "checking AppKit/AppKit.h presence... $ECHO_C" >&6; }
9294cat >conftest.$ac_ext <<_ACEOF
9295/* confdefs.h. */
9296_ACEOF
9297cat confdefs.h >>conftest.$ac_ext
9298cat >>conftest.$ac_ext <<_ACEOF
9299/* end confdefs.h. */
9300#include <AppKit/AppKit.h>
9301_ACEOF
9302if { (ac_try="$ac_cpp conftest.$ac_ext"
9303case "(($ac_try" in
9304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9305 *) ac_try_echo=$ac_try;;
9306esac
9307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9308 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9309 ac_status=$?
9310 grep -v '^ *+' conftest.er1 >conftest.err
9311 rm -f conftest.er1
9312 cat conftest.err >&5
9313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9314 (exit $ac_status); } >/dev/null && {
9315 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9316 test ! -s conftest.err
9317 }; then
9318 ac_header_preproc=yes
9319else
9320 echo "$as_me: failed program was:" >&5
9321sed 's/^/| /' conftest.$ac_ext >&5
9322
9323 ac_header_preproc=no
9324fi
9325
9326rm -f conftest.err conftest.$ac_ext
9327{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9328echo "${ECHO_T}$ac_header_preproc" >&6; }
9329
9330# So? What about this header?
9331case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9332 yes:no: )
9333 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&5
9334echo "$as_me: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9335 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&5
9336echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&2;}
9337 ac_header_preproc=yes
9338 ;;
9339 no:yes:* )
9340 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&5
9341echo "$as_me: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&2;}
9342 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: check for missing prerequisite headers?" >&5
9343echo "$as_me: WARNING: AppKit/AppKit.h: check for missing prerequisite headers?" >&2;}
9344 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&5
9345echo "$as_me: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&2;}
9346 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: section \"Present But Cannot Be Compiled\"" >&5
9347echo "$as_me: WARNING: AppKit/AppKit.h: section \"Present But Cannot Be Compiled\"" >&2;}
9348 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&5
9349echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&2;}
9350 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&5
9351echo "$as_me: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&2;}
9352
9353 ;;
9354esac
9355{ echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
9356echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
9357if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9358 echo $ECHO_N "(cached) $ECHO_C" >&6
9359else
9360 ac_cv_header_AppKit_AppKit_h=$ac_header_preproc
9361fi
9362{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
9363echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
9364
9365fi
9366if test $ac_cv_header_AppKit_AppKit_h = yes; then
9367 HAVE_NS=yes
ecd43cb9
GM
9368else
9369 { { echo "$as_me:$LINENO: error: \`--with-ns' was specified, but the include
9370 files are missing or cannot be compiled." >&5
9371echo "$as_me: error: \`--with-ns' was specified, but the include
9372 files are missing or cannot be compiled." >&2;}
9373 { (exit 1); exit 1; }; }
edfda783
AR
9374fi
9375
9376
d5e2f8fe 9377 NS_HAVE_NSINTEGER=yes
519c4a9a
CY
9378 cat >conftest.$ac_ext <<_ACEOF
9379/* confdefs.h. */
9380_ACEOF
9381cat confdefs.h >>conftest.$ac_ext
9382cat >>conftest.$ac_ext <<_ACEOF
9383/* end confdefs.h. */
9384#include <Foundation/NSObjCRuntime.h>
9385int
9386main ()
9387{
9388NSInteger i;
9389 ;
9390 return 0;
9391}
9392_ACEOF
9393rm -f conftest.$ac_objext
9394if { (ac_try="$ac_compile"
9395case "(($ac_try" in
9396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9397 *) ac_try_echo=$ac_try;;
9398esac
9399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9400 (eval "$ac_compile") 2>conftest.er1
9401 ac_status=$?
9402 grep -v '^ *+' conftest.er1 >conftest.err
9403 rm -f conftest.er1
9404 cat conftest.err >&5
9405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9406 (exit $ac_status); } && {
9407 test -z "$ac_c_werror_flag" ||
9408 test ! -s conftest.err
9409 } && test -s conftest.$ac_objext; then
d5e2f8fe 9410 ns_have_nsinteger=yes
519c4a9a
CY
9411else
9412 echo "$as_me: failed program was:" >&5
9413sed 's/^/| /' conftest.$ac_ext >&5
9414
d5e2f8fe 9415 ns_have_nsinteger=no
519c4a9a
CY
9416fi
9417
9418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
d5e2f8fe
AR
9419 if test $ns_have_nsinteger = no; then
9420 NS_HAVE_NSINTEGER=no
519c4a9a 9421 fi
edfda783
AR
9422fi
9423if test "${HAVE_NS}" = yes; then
9424 window_system=nextstep
9425 with_xft=no
9426 with_freetype=no
06b62770
AR
9427 # set up packaging dirs
9428 exec_prefix=${ns_appbindir}
9429 libexecdir=${ns_appbindir}/libexec
9430 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9431 prefix=${ns_appresdir}
9432 fi
edfda783
AR
9433fi
9434CFLAGS="$tmp_CFLAGS"
9435CPPFLAGS="$tmp_CPPFLAGS"
9436
1d4d5604
YM
9437case "${window_system}" in
9438 x11 )
9439 HAVE_X_WINDOWS=yes
9440 HAVE_X11=yes
9441 case "${with_x_toolkit}" in
9442 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9443 motif ) USE_X_TOOLKIT=MOTIF ;;
9444 gtk ) with_gtk=yes
9445 USE_X_TOOLKIT=none ;;
9446 no ) USE_X_TOOLKIT=none ;;
9d2818d6 9447 * ) USE_X_TOOLKIT=maybe ;;
1d4d5604
YM
9448 esac
9449 ;;
9e2a2647 9450 nextstep | none )
1d4d5604
YM
9451 HAVE_X_WINDOWS=no
9452 HAVE_X11=no
9453 USE_X_TOOLKIT=none
9454 ;;
9455esac
9456
cfe440b8
JD
9457if test "$window_system" = none && test "X$with_x" != "Xno"; then
9458 # Extract the first word of "X", so it can be a program name with args.
9459set dummy X; ac_word=$2
9460{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9461echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9462if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
9463 echo $ECHO_N "(cached) $ECHO_C" >&6
9464else
9465 if test -n "$HAVE_XSERVER"; then
9466 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9467else
9468as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9469for as_dir in $PATH
9470do
9471 IFS=$as_save_IFS
9472 test -z "$as_dir" && as_dir=.
9473 for ac_exec_ext in '' $ac_executable_extensions; do
9474 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9475 ac_cv_prog_HAVE_XSERVER="true"
9476 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9477 break 2
9478 fi
9479done
9480done
9481IFS=$as_save_IFS
9482
9483 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9484fi
9485fi
9486HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9487if test -n "$HAVE_XSERVER"; then
9488 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9489echo "${ECHO_T}$HAVE_XSERVER" >&6; }
9490else
9491 { echo "$as_me:$LINENO: result: no" >&5
9492echo "${ECHO_T}no" >&6; }
9493fi
9494
9495
9496 if test "$HAVE_XSERVER" = true ||
9497 test -n "$DISPLAY" ||
9498 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9499 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9500were found. You should install the relevant development files for X
9501and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9502sure you have development files for image handling, i.e.
9503tiff, gif, jpeg, png and xpm.
9504If you are sure you want Emacs compiled without X window support, pass
9505 --without-x
9506to configure." >&5
9507echo "$as_me: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9508were found. You should install the relevant development files for X
9509and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9510sure you have development files for image handling, i.e.
9511tiff, gif, jpeg, png and xpm.
9512If you are sure you want Emacs compiled without X window support, pass
9513 --without-x
9514to configure." >&2;}
9515 { (exit 1); exit 1; }; }
9516 fi
9517fi
9518
1d4d5604
YM
9519### If we're using X11, we should use the X menu package.
9520HAVE_MENUS=no
9521case ${HAVE_X11} in
9522 yes ) HAVE_MENUS=yes ;;
9523esac
9524
98418dba
CW
9525# Do the opsystem or machine files prohibit the use of the GNU malloc?
9526# Assume not, until told otherwise.
9527GNU_MALLOC=yes
9528doug_lea_malloc=yes
ca81d7a0
JD
9529{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9530echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9531if test "${ac_cv_func_malloc_get_state+set}" = set; then
9532 echo $ECHO_N "(cached) $ECHO_C" >&6
9533else
9534 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9535/* confdefs.h. */
9536_ACEOF
9537cat confdefs.h >>conftest.$ac_ext
9538cat >>conftest.$ac_ext <<_ACEOF
9539/* end confdefs.h. */
edfaf76d
LK
9540/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9541 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9542#define malloc_get_state innocuous_malloc_get_state
9543
98418dba 9544/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9545 which can conflict with char malloc_get_state (); below.
9546 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9547 <limits.h> exists even on freestanding compilers. */
edfaf76d 9548
19650fd6
AS
9549#ifdef __STDC__
9550# include <limits.h>
9551#else
9552# include <assert.h>
9553#endif
edfaf76d
LK
9554
9555#undef malloc_get_state
9556
ca81d7a0
JD
9557/* Override any GCC internal prototype to avoid an error.
9558 Use char because int might match the return type of a GCC
9559 builtin and then its argument prototype would still apply. */
98418dba
CW
9560#ifdef __cplusplus
9561extern "C"
9562#endif
98418dba 9563char malloc_get_state ();
98418dba
CW
9564/* The GNU C library defines this for functions which it implements
9565 to always fail with ENOSYS. Some functions are actually named
9566 something starting with __ and the normal name is an alias. */
ca81d7a0 9567#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9568choke me
98418dba
CW
9569#endif
9570
19650fd6
AS
9571int
9572main ()
9573{
ca81d7a0 9574return malloc_get_state ();
98418dba
CW
9575 ;
9576 return 0;
9577}
9578_ACEOF
9579rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9580if { (ac_try="$ac_link"
9581case "(($ac_try" in
9582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9583 *) ac_try_echo=$ac_try;;
9584esac
9585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9586 (eval "$ac_link") 2>conftest.er1
98418dba 9587 ac_status=$?
edfaf76d
LK
9588 grep -v '^ *+' conftest.er1 >conftest.err
9589 rm -f conftest.er1
9590 cat conftest.err >&5
c0d27fcc 9591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9592 (exit $ac_status); } && {
9593 test -z "$ac_c_werror_flag" ||
9594 test ! -s conftest.err
9595 } && test -s conftest$ac_exeext &&
9596 $as_test_x conftest$ac_exeext; then
98418dba
CW
9597 ac_cv_func_malloc_get_state=yes
9598else
9599 echo "$as_me: failed program was:" >&5
19650fd6
AS
9600sed 's/^/| /' conftest.$ac_ext >&5
9601
ca81d7a0 9602 ac_cv_func_malloc_get_state=no
98418dba 9603fi
ca81d7a0 9604
f053c89f 9605rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9606 conftest$ac_exeext conftest.$ac_ext
98418dba 9607fi
ca81d7a0
JD
9608{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9609echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9610if test $ac_cv_func_malloc_get_state = yes; then
9611 :
9612else
9613 doug_lea_malloc=no
9614fi
9615
ca81d7a0
JD
9616{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9617echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9618if test "${ac_cv_func_malloc_set_state+set}" = set; then
9619 echo $ECHO_N "(cached) $ECHO_C" >&6
9620else
9621 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9622/* confdefs.h. */
9623_ACEOF
9624cat confdefs.h >>conftest.$ac_ext
9625cat >>conftest.$ac_ext <<_ACEOF
9626/* end confdefs.h. */
edfaf76d
LK
9627/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9628 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9629#define malloc_set_state innocuous_malloc_set_state
9630
98418dba 9631/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9632 which can conflict with char malloc_set_state (); below.
9633 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9634 <limits.h> exists even on freestanding compilers. */
edfaf76d 9635
19650fd6
AS
9636#ifdef __STDC__
9637# include <limits.h>
9638#else
9639# include <assert.h>
9640#endif
edfaf76d
LK
9641
9642#undef malloc_set_state
9643
ca81d7a0
JD
9644/* Override any GCC internal prototype to avoid an error.
9645 Use char because int might match the return type of a GCC
9646 builtin and then its argument prototype would still apply. */
98418dba
CW
9647#ifdef __cplusplus
9648extern "C"
9649#endif
98418dba 9650char malloc_set_state ();
98418dba
CW
9651/* The GNU C library defines this for functions which it implements
9652 to always fail with ENOSYS. Some functions are actually named
9653 something starting with __ and the normal name is an alias. */
ca81d7a0 9654#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9655choke me
98418dba
CW
9656#endif
9657
19650fd6
AS
9658int
9659main ()
9660{
ca81d7a0 9661return malloc_set_state ();
98418dba
CW
9662 ;
9663 return 0;
9664}
9665_ACEOF
9666rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9667if { (ac_try="$ac_link"
9668case "(($ac_try" in
9669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9670 *) ac_try_echo=$ac_try;;
9671esac
9672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9673 (eval "$ac_link") 2>conftest.er1
98418dba 9674 ac_status=$?
edfaf76d
LK
9675 grep -v '^ *+' conftest.er1 >conftest.err
9676 rm -f conftest.er1
9677 cat conftest.err >&5
c0d27fcc 9678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9679 (exit $ac_status); } && {
9680 test -z "$ac_c_werror_flag" ||
9681 test ! -s conftest.err
9682 } && test -s conftest$ac_exeext &&
9683 $as_test_x conftest$ac_exeext; then
98418dba
CW
9684 ac_cv_func_malloc_set_state=yes
9685else
9686 echo "$as_me: failed program was:" >&5
19650fd6
AS
9687sed 's/^/| /' conftest.$ac_ext >&5
9688
ca81d7a0 9689 ac_cv_func_malloc_set_state=no
98418dba 9690fi
ca81d7a0 9691
f053c89f 9692rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9693 conftest$ac_exeext conftest.$ac_ext
98418dba 9694fi
ca81d7a0
JD
9695{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9696echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9697if test $ac_cv_func_malloc_set_state = yes; then
9698 :
9699else
9700 doug_lea_malloc=no
9701fi
9702
ca81d7a0
JD
9703{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9704echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9705if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9706 echo $ECHO_N "(cached) $ECHO_C" >&6
9707else
9708 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9709/* confdefs.h. */
9710_ACEOF
9711cat confdefs.h >>conftest.$ac_ext
9712cat >>conftest.$ac_ext <<_ACEOF
9713/* end confdefs.h. */
98418dba 9714extern void (* __after_morecore_hook)();
98418dba
CW
9715int
9716main ()
9717{
9718__after_morecore_hook = 0
9719 ;
9720 return 0;
9721}
9722_ACEOF
9723rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9724if { (ac_try="$ac_link"
9725case "(($ac_try" in
9726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9727 *) ac_try_echo=$ac_try;;
9728esac
9729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9730 (eval "$ac_link") 2>conftest.er1
98418dba 9731 ac_status=$?
edfaf76d
LK
9732 grep -v '^ *+' conftest.er1 >conftest.err
9733 rm -f conftest.er1
9734 cat conftest.err >&5
c0d27fcc 9735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9736 (exit $ac_status); } && {
9737 test -z "$ac_c_werror_flag" ||
9738 test ! -s conftest.err
9739 } && test -s conftest$ac_exeext &&
9740 $as_test_x conftest$ac_exeext; then
98418dba
CW
9741 emacs_cv_var___after_morecore_hook=yes
9742else
9743 echo "$as_me: failed program was:" >&5
19650fd6
AS
9744sed 's/^/| /' conftest.$ac_ext >&5
9745
ca81d7a0 9746 emacs_cv_var___after_morecore_hook=no
98418dba 9747fi
ca81d7a0 9748
f053c89f 9749rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9750 conftest$ac_exeext conftest.$ac_ext
98418dba 9751fi
ca81d7a0
JD
9752{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9753echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9754if test $emacs_cv_var___after_morecore_hook = no; then
9755 doug_lea_malloc=no
9756fi
9757if test "${system_malloc}" = "yes"; then
9758 GNU_MALLOC=no
9759 GNU_MALLOC_reason="
9760 (The GNU allocators don't work with this system configuration.)"
9761fi
9762if test "$doug_lea_malloc" = "yes" ; then
9763 if test "$GNU_MALLOC" = yes ; then
9764 GNU_MALLOC_reason="
9765 (Using Doug Lea's new malloc from the GNU C Library.)"
9766 fi
b936fae4 9767
c0d27fcc 9768cat >>confdefs.h <<\_ACEOF
98418dba 9769#define DOUG_LEA_MALLOC 1
c0d27fcc 9770_ACEOF
98418dba
CW
9771
9772fi
9773
9774if test x"${REL_ALLOC}" = x; then
9775 REL_ALLOC=${GNU_MALLOC}
9776fi
9777
9778
c0d27fcc
MR
9779
9780
9781for ac_header in stdlib.h unistd.h
98418dba
CW
9782do
9783as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
9784if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9785 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9786echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9787if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 9788 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9789fi
ca81d7a0
JD
9790ac_res=`eval echo '${'$as_ac_Header'}'`
9791 { echo "$as_me:$LINENO: result: $ac_res" >&5
9792echo "${ECHO_T}$ac_res" >&6; }
98418dba 9793else
c0d27fcc 9794 # Is the header compilable?
ca81d7a0
JD
9795{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9796echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9797cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9798/* confdefs.h. */
9799_ACEOF
9800cat confdefs.h >>conftest.$ac_ext
9801cat >>conftest.$ac_ext <<_ACEOF
9802/* end confdefs.h. */
98418dba
CW
9803$ac_includes_default
9804#include <$ac_header>
9805_ACEOF
9806rm -f conftest.$ac_objext
ca81d7a0
JD
9807if { (ac_try="$ac_compile"
9808case "(($ac_try" in
9809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9810 *) ac_try_echo=$ac_try;;
9811esac
9812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9813 (eval "$ac_compile") 2>conftest.er1
98418dba 9814 ac_status=$?
edfaf76d
LK
9815 grep -v '^ *+' conftest.er1 >conftest.err
9816 rm -f conftest.er1
9817 cat conftest.err >&5
c0d27fcc 9818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9819 (exit $ac_status); } && {
9820 test -z "$ac_c_werror_flag" ||
9821 test ! -s conftest.err
9822 } && test -s conftest.$ac_objext; then
c0d27fcc 9823 ac_header_compiler=yes
98418dba
CW
9824else
9825 echo "$as_me: failed program was:" >&5
19650fd6
AS
9826sed 's/^/| /' conftest.$ac_ext >&5
9827
ca81d7a0 9828 ac_header_compiler=no
98418dba 9829fi
ca81d7a0
JD
9830
9831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9832{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9833echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9834
c0d27fcc 9835# Is the header present?
ca81d7a0
JD
9836{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9837echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9838cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9839/* confdefs.h. */
9840_ACEOF
9841cat confdefs.h >>conftest.$ac_ext
9842cat >>conftest.$ac_ext <<_ACEOF
9843/* end confdefs.h. */
98418dba
CW
9844#include <$ac_header>
9845_ACEOF
ca81d7a0
JD
9846if { (ac_try="$ac_cpp conftest.$ac_ext"
9847case "(($ac_try" in
9848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9849 *) ac_try_echo=$ac_try;;
9850esac
9851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9852 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9853 ac_status=$?
6bae0ccf 9854 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9855 rm -f conftest.er1
9856 cat conftest.err >&5
c0d27fcc 9857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9858 (exit $ac_status); } >/dev/null && {
9859 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9860 test ! -s conftest.err
9861 }; then
c0d27fcc 9862 ac_header_preproc=yes
98418dba
CW
9863else
9864 echo "$as_me: failed program was:" >&5
19650fd6
AS
9865sed 's/^/| /' conftest.$ac_ext >&5
9866
c0d27fcc 9867 ac_header_preproc=no
98418dba 9868fi
ca81d7a0 9869
98418dba 9870rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9871{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9872echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
9873
9874# So? What about this header?
edfaf76d
LK
9875case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9876 yes:no: )
c0d27fcc
MR
9877 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9878echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9879 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9880echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9881 ac_header_preproc=yes
9882 ;;
9883 no:yes:* )
9884 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9885echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9886 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9887echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9888 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9889echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9890 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9891echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9892 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9893echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9894 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9895echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9896
19650fd6 9897 ;;
c0d27fcc 9898esac
ca81d7a0
JD
9899{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9900echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9901if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
9902 echo $ECHO_N "(cached) $ECHO_C" >&6
9903else
edfaf76d 9904 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9905fi
ca81d7a0
JD
9906ac_res=`eval echo '${'$as_ac_Header'}'`
9907 { echo "$as_me:$LINENO: result: $ac_res" >&5
9908echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
9909
9910fi
98418dba 9911if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9912 cat >>confdefs.h <<_ACEOF
98418dba 9913#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9914_ACEOF
98418dba
CW
9915
9916fi
c0d27fcc 9917
98418dba
CW
9918done
9919
c0d27fcc 9920
98418dba
CW
9921for ac_func in getpagesize
9922do
9923as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
9924{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9925echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9926if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9927 echo $ECHO_N "(cached) $ECHO_C" >&6
9928else
9929 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9930/* confdefs.h. */
9931_ACEOF
9932cat confdefs.h >>conftest.$ac_ext
9933cat >>conftest.$ac_ext <<_ACEOF
9934/* end confdefs.h. */
edfaf76d
LK
9935/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9936 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9937#define $ac_func innocuous_$ac_func
9938
98418dba 9939/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9940 which can conflict with char $ac_func (); below.
9941 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9942 <limits.h> exists even on freestanding compilers. */
edfaf76d 9943
19650fd6
AS
9944#ifdef __STDC__
9945# include <limits.h>
9946#else
9947# include <assert.h>
9948#endif
edfaf76d
LK
9949
9950#undef $ac_func
9951
ca81d7a0
JD
9952/* Override any GCC internal prototype to avoid an error.
9953 Use char because int might match the return type of a GCC
9954 builtin and then its argument prototype would still apply. */
98418dba
CW
9955#ifdef __cplusplus
9956extern "C"
9957#endif
98418dba 9958char $ac_func ();
98418dba
CW
9959/* The GNU C library defines this for functions which it implements
9960 to always fail with ENOSYS. Some functions are actually named
9961 something starting with __ and the normal name is an alias. */
ca81d7a0 9962#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 9963choke me
98418dba
CW
9964#endif
9965
19650fd6
AS
9966int
9967main ()
9968{
ca81d7a0 9969return $ac_func ();
98418dba
CW
9970 ;
9971 return 0;
9972}
9973_ACEOF
9974rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9975if { (ac_try="$ac_link"
9976case "(($ac_try" in
9977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9978 *) ac_try_echo=$ac_try;;
9979esac
9980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9981 (eval "$ac_link") 2>conftest.er1
98418dba 9982 ac_status=$?
edfaf76d
LK
9983 grep -v '^ *+' conftest.er1 >conftest.err
9984 rm -f conftest.er1
9985 cat conftest.err >&5
c0d27fcc 9986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9987 (exit $ac_status); } && {
9988 test -z "$ac_c_werror_flag" ||
9989 test ! -s conftest.err
9990 } && test -s conftest$ac_exeext &&
9991 $as_test_x conftest$ac_exeext; then
98418dba
CW
9992 eval "$as_ac_var=yes"
9993else
9994 echo "$as_me: failed program was:" >&5
19650fd6
AS
9995sed 's/^/| /' conftest.$ac_ext >&5
9996
ca81d7a0 9997 eval "$as_ac_var=no"
98418dba 9998fi
ca81d7a0 9999
f053c89f 10000rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10001 conftest$ac_exeext conftest.$ac_ext
98418dba 10002fi
ca81d7a0
JD
10003ac_res=`eval echo '${'$as_ac_var'}'`
10004 { echo "$as_me:$LINENO: result: $ac_res" >&5
10005echo "${ECHO_T}$ac_res" >&6; }
98418dba 10006if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10007 cat >>confdefs.h <<_ACEOF
98418dba 10008#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10009_ACEOF
98418dba
CW
10010
10011fi
10012done
10013
ca81d7a0
JD
10014{ echo "$as_me:$LINENO: checking for working mmap" >&5
10015echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
10016if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
10017 echo $ECHO_N "(cached) $ECHO_C" >&6
10018else
10019 if test "$cross_compiling" = yes; then
10020 ac_cv_func_mmap_fixed_mapped=no
10021else
10022 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10023/* confdefs.h. */
10024_ACEOF
10025cat confdefs.h >>conftest.$ac_ext
10026cat >>conftest.$ac_ext <<_ACEOF
10027/* end confdefs.h. */
98418dba 10028$ac_includes_default
c0d27fcc
MR
10029/* malloc might have been renamed as rpl_malloc. */
10030#undef malloc
10031
98418dba
CW
10032/* Thanks to Mike Haertel and Jim Avera for this test.
10033 Here is a matrix of mmap possibilities:
10034 mmap private not fixed
10035 mmap private fixed at somewhere currently unmapped
10036 mmap private fixed at somewhere already mapped
10037 mmap shared not fixed
10038 mmap shared fixed at somewhere currently unmapped
10039 mmap shared fixed at somewhere already mapped
10040 For private mappings, we should verify that changes cannot be read()
10041 back from the file, nor mmap's back from the file at a different
10042 address. (There have been systems where private was not correctly
10043 implemented like the infamous i386 svr4.0, and systems where the
10044 VM page cache was not coherent with the file system buffer cache
10045 like early versions of FreeBSD and possibly contemporary NetBSD.)
10046 For shared mappings, we should conversely verify that changes get
c0d27fcc 10047 propagated back to all the places they're supposed to be.
98418dba
CW
10048
10049 Grep wants private fixed already mapped.
10050 The main things grep needs to know about mmap are:
10051 * does it exist and is it safe to write into the mmap'd area
10052 * how to use it (BSD variants) */
10053
10054#include <fcntl.h>
10055#include <sys/mman.h>
10056
f053c89f 10057#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10058char *malloc ();
10059#endif
10060
10061/* This mess was copied from the GNU getpagesize.h. */
f053c89f 10062#ifndef HAVE_GETPAGESIZE
98418dba 10063/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 10064# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10065# define HAVE_SYS_PARAM_H 1
10066# endif
10067
10068# ifdef _SC_PAGESIZE
10069# define getpagesize() sysconf(_SC_PAGESIZE)
10070# else /* no _SC_PAGESIZE */
f053c89f 10071# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10072# include <sys/param.h>
10073# ifdef EXEC_PAGESIZE
10074# define getpagesize() EXEC_PAGESIZE
10075# else /* no EXEC_PAGESIZE */
10076# ifdef NBPG
10077# define getpagesize() NBPG * CLSIZE
10078# ifndef CLSIZE
10079# define CLSIZE 1
10080# endif /* no CLSIZE */
10081# else /* no NBPG */
10082# ifdef NBPC
10083# define getpagesize() NBPC
10084# else /* no NBPC */
10085# ifdef PAGESIZE
10086# define getpagesize() PAGESIZE
10087# endif /* PAGESIZE */
10088# endif /* no NBPC */
10089# endif /* no NBPG */
10090# endif /* no EXEC_PAGESIZE */
10091# else /* no HAVE_SYS_PARAM_H */
10092# define getpagesize() 8192 /* punt totally */
10093# endif /* no HAVE_SYS_PARAM_H */
10094# endif /* no _SC_PAGESIZE */
10095
10096#endif /* no HAVE_GETPAGESIZE */
10097
10098int
10099main ()
10100{
10101 char *data, *data2, *data3;
10102 int i, pagesize;
10103 int fd;
10104
10105 pagesize = getpagesize ();
10106
10107 /* First, make a file with some known garbage in it. */
10108 data = (char *) malloc (pagesize);
10109 if (!data)
ca81d7a0 10110 return 1;
98418dba
CW
10111 for (i = 0; i < pagesize; ++i)
10112 *(data + i) = rand ();
10113 umask (0);
10114 fd = creat ("conftest.mmap", 0600);
10115 if (fd < 0)
ca81d7a0 10116 return 1;
98418dba 10117 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 10118 return 1;
98418dba
CW
10119 close (fd);
10120
10121 /* Next, try to mmap the file at a fixed address which already has
10122 something else allocated at it. If we can, also make sure that
10123 we see the same garbage. */
10124 fd = open ("conftest.mmap", O_RDWR);
10125 if (fd < 0)
ca81d7a0 10126 return 1;
98418dba
CW
10127 data2 = (char *) malloc (2 * pagesize);
10128 if (!data2)
ca81d7a0
JD
10129 return 1;
10130 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10131 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10132 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 10133 return 1;
98418dba
CW
10134 for (i = 0; i < pagesize; ++i)
10135 if (*(data + i) != *(data2 + i))
ca81d7a0 10136 return 1;
98418dba
CW
10137
10138 /* Finally, make sure that changes to the mapped area do not
10139 percolate back to the file as seen by read(). (This is a bug on
10140 some variants of i386 svr4.0.) */
10141 for (i = 0; i < pagesize; ++i)
10142 *(data2 + i) = *(data2 + i) + 1;
10143 data3 = (char *) malloc (pagesize);
10144 if (!data3)
ca81d7a0 10145 return 1;
98418dba 10146 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 10147 return 1;
98418dba
CW
10148 for (i = 0; i < pagesize; ++i)
10149 if (*(data + i) != *(data3 + i))
ca81d7a0 10150 return 1;
98418dba 10151 close (fd);
ca81d7a0 10152 return 0;
98418dba
CW
10153}
10154_ACEOF
10155rm -f conftest$ac_exeext
ca81d7a0
JD
10156if { (ac_try="$ac_link"
10157case "(($ac_try" in
10158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10159 *) ac_try_echo=$ac_try;;
10160esac
10161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10162 (eval "$ac_link") 2>&5
98418dba 10163 ac_status=$?
c0d27fcc 10164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10165 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
10166 { (case "(($ac_try" in
10167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10168 *) ac_try_echo=$ac_try;;
10169esac
10170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10171 (eval "$ac_try") 2>&5
98418dba 10172 ac_status=$?
c0d27fcc 10173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10174 (exit $ac_status); }; }; then
10175 ac_cv_func_mmap_fixed_mapped=yes
10176else
10177 echo "$as_me: program exited with status $ac_status" >&5
10178echo "$as_me: failed program was:" >&5
19650fd6
AS
10179sed 's/^/| /' conftest.$ac_ext >&5
10180
c0d27fcc 10181( exit $ac_status )
98418dba
CW
10182ac_cv_func_mmap_fixed_mapped=no
10183fi
ca81d7a0 10184rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10185fi
ca81d7a0
JD
10186
10187
98418dba 10188fi
ca81d7a0
JD
10189{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10190echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10191if test $ac_cv_func_mmap_fixed_mapped = yes; then
10192
c0d27fcc 10193cat >>confdefs.h <<\_ACEOF
98418dba 10194#define HAVE_MMAP 1
c0d27fcc 10195_ACEOF
98418dba
CW
10196
10197fi
10198rm -f conftest.mmap
10199
10200if test $use_mmap_for_buffers = yes; then
10201 REL_ALLOC=no
10202fi
10203
10204LIBS="$libsrc_libs $LIBS"
10205
c0d27fcc 10206
ca81d7a0
JD
10207{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10208echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10209if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10210 echo $ECHO_N "(cached) $ECHO_C" >&6
10211else
10212 ac_check_lib_save_LIBS=$LIBS
10213LIBS="-ldnet $LIBS"
10214cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10215/* confdefs.h. */
10216_ACEOF
10217cat confdefs.h >>conftest.$ac_ext
10218cat >>conftest.$ac_ext <<_ACEOF
10219/* end confdefs.h. */
98418dba 10220
ca81d7a0
JD
10221/* Override any GCC internal prototype to avoid an error.
10222 Use char because int might match the return type of a GCC
10223 builtin and then its argument prototype would still apply. */
98418dba
CW
10224#ifdef __cplusplus
10225extern "C"
10226#endif
98418dba 10227char dnet_ntoa ();
98418dba
CW
10228int
10229main ()
10230{
ca81d7a0 10231return dnet_ntoa ();
98418dba
CW
10232 ;
10233 return 0;
10234}
10235_ACEOF
10236rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10237if { (ac_try="$ac_link"
10238case "(($ac_try" in
10239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10240 *) ac_try_echo=$ac_try;;
10241esac
10242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10243 (eval "$ac_link") 2>conftest.er1
98418dba 10244 ac_status=$?
edfaf76d
LK
10245 grep -v '^ *+' conftest.er1 >conftest.err
10246 rm -f conftest.er1
10247 cat conftest.err >&5
c0d27fcc 10248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10249 (exit $ac_status); } && {
10250 test -z "$ac_c_werror_flag" ||
10251 test ! -s conftest.err
10252 } && test -s conftest$ac_exeext &&
10253 $as_test_x conftest$ac_exeext; then
98418dba
CW
10254 ac_cv_lib_dnet_dnet_ntoa=yes
10255else
10256 echo "$as_me: failed program was:" >&5
19650fd6
AS
10257sed 's/^/| /' conftest.$ac_ext >&5
10258
ca81d7a0 10259 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10260fi
ca81d7a0 10261
f053c89f 10262rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10263 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10264LIBS=$ac_check_lib_save_LIBS
10265fi
ca81d7a0
JD
10266{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10267echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10268if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10269 cat >>confdefs.h <<_ACEOF
98418dba 10270#define HAVE_LIBDNET 1
c0d27fcc 10271_ACEOF
98418dba
CW
10272
10273 LIBS="-ldnet $LIBS"
10274
10275fi
10276
c0d27fcc 10277
ca81d7a0
JD
10278{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10279echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10280if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10281 echo $ECHO_N "(cached) $ECHO_C" >&6
10282else
10283 ac_check_lib_save_LIBS=$LIBS
10284LIBS="-lXbsd $LIBS"
10285cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10286/* confdefs.h. */
10287_ACEOF
10288cat confdefs.h >>conftest.$ac_ext
10289cat >>conftest.$ac_ext <<_ACEOF
10290/* end confdefs.h. */
98418dba 10291
c0d27fcc 10292
98418dba
CW
10293int
10294main ()
10295{
ca81d7a0 10296return main ();
98418dba
CW
10297 ;
10298 return 0;
10299}
10300_ACEOF
10301rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10302if { (ac_try="$ac_link"
10303case "(($ac_try" in
10304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10305 *) ac_try_echo=$ac_try;;
10306esac
10307eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10308 (eval "$ac_link") 2>conftest.er1
98418dba 10309 ac_status=$?
edfaf76d
LK
10310 grep -v '^ *+' conftest.er1 >conftest.err
10311 rm -f conftest.er1
10312 cat conftest.err >&5
c0d27fcc 10313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10314 (exit $ac_status); } && {
10315 test -z "$ac_c_werror_flag" ||
10316 test ! -s conftest.err
10317 } && test -s conftest$ac_exeext &&
10318 $as_test_x conftest$ac_exeext; then
98418dba
CW
10319 ac_cv_lib_Xbsd_main=yes
10320else
10321 echo "$as_me: failed program was:" >&5
19650fd6
AS
10322sed 's/^/| /' conftest.$ac_ext >&5
10323
ca81d7a0 10324 ac_cv_lib_Xbsd_main=no
98418dba 10325fi
ca81d7a0 10326
f053c89f 10327rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10328 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10329LIBS=$ac_check_lib_save_LIBS
10330fi
ca81d7a0
JD
10331{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10332echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10333if test $ac_cv_lib_Xbsd_main = yes; then
10334 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10335fi
10336
c0d27fcc
MR
10337
10338
ca81d7a0
JD
10339{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10340echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10341if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10342 echo $ECHO_N "(cached) $ECHO_C" >&6
10343else
10344 ac_check_lib_save_LIBS=$LIBS
10345LIBS="-lpthreads $LIBS"
10346cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10347/* confdefs.h. */
10348_ACEOF
10349cat confdefs.h >>conftest.$ac_ext
10350cat >>conftest.$ac_ext <<_ACEOF
10351/* end confdefs.h. */
98418dba 10352
ca81d7a0
JD
10353/* Override any GCC internal prototype to avoid an error.
10354 Use char because int might match the return type of a GCC
10355 builtin and then its argument prototype would still apply. */
98418dba
CW
10356#ifdef __cplusplus
10357extern "C"
10358#endif
98418dba 10359char cma_open ();
98418dba
CW
10360int
10361main ()
10362{
ca81d7a0 10363return cma_open ();
98418dba
CW
10364 ;
10365 return 0;
10366}
10367_ACEOF
10368rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10369if { (ac_try="$ac_link"
10370case "(($ac_try" in
10371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10372 *) ac_try_echo=$ac_try;;
10373esac
10374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10375 (eval "$ac_link") 2>conftest.er1
98418dba 10376 ac_status=$?
edfaf76d
LK
10377 grep -v '^ *+' conftest.er1 >conftest.err
10378 rm -f conftest.er1
10379 cat conftest.err >&5
c0d27fcc 10380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10381 (exit $ac_status); } && {
10382 test -z "$ac_c_werror_flag" ||
10383 test ! -s conftest.err
10384 } && test -s conftest$ac_exeext &&
10385 $as_test_x conftest$ac_exeext; then
98418dba
CW
10386 ac_cv_lib_pthreads_cma_open=yes
10387else
10388 echo "$as_me: failed program was:" >&5
19650fd6
AS
10389sed 's/^/| /' conftest.$ac_ext >&5
10390
ca81d7a0 10391 ac_cv_lib_pthreads_cma_open=no
98418dba 10392fi
ca81d7a0 10393
f053c89f 10394rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10395 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10396LIBS=$ac_check_lib_save_LIBS
10397fi
ca81d7a0
JD
10398{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10399echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10400if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10401 cat >>confdefs.h <<_ACEOF
98418dba 10402#define HAVE_LIBPTHREADS 1
c0d27fcc 10403_ACEOF
98418dba
CW
10404
10405 LIBS="-lpthreads $LIBS"
10406
10407fi
10408
c0d27fcc 10409
55597d70
DL
10410
10411case ${host_os} in
10412aix*)
ca81d7a0
JD
10413 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10414echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10415if test "${gdb_cv_bigtoc+set}" = set; then
10416 echo $ECHO_N "(cached) $ECHO_C" >&6
10417else
10418
10419 case $GCC in
10420 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10421 *) gdb_cv_bigtoc=-bbigtoc ;;
10422 esac
10423
10424 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10425 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10426/* confdefs.h. */
10427_ACEOF
10428cat confdefs.h >>conftest.$ac_ext
10429cat >>conftest.$ac_ext <<_ACEOF
10430/* end confdefs.h. */
55597d70
DL
10431
10432int
10433main ()
10434{
10435int i;
10436 ;
10437 return 0;
10438}
10439_ACEOF
10440rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10441if { (ac_try="$ac_link"
10442case "(($ac_try" in
10443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10444 *) ac_try_echo=$ac_try;;
10445esac
10446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10447 (eval "$ac_link") 2>conftest.er1
55597d70 10448 ac_status=$?
edfaf76d
LK
10449 grep -v '^ *+' conftest.er1 >conftest.err
10450 rm -f conftest.er1
10451 cat conftest.err >&5
55597d70 10452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10453 (exit $ac_status); } && {
10454 test -z "$ac_c_werror_flag" ||
10455 test ! -s conftest.err
10456 } && test -s conftest$ac_exeext &&
10457 $as_test_x conftest$ac_exeext; then
55597d70
DL
10458 :
10459else
10460 echo "$as_me: failed program was:" >&5
19650fd6
AS
10461sed 's/^/| /' conftest.$ac_ext >&5
10462
ca81d7a0 10463 gdb_cv_bigtoc=
55597d70 10464fi
ca81d7a0 10465
f053c89f 10466rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10467 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10468
10469fi
ca81d7a0
JD
10470{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10471echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10472 ;;
10473esac
10474
ae1a998c
RS
10475# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10476# used for the tests that follow. We set them back to REAL_CFLAGS and
10477# REAL_CPPFLAGS later on.
98418dba
CW
10478
10479REAL_CPPFLAGS="$CPPFLAGS"
10480
10481if test "${HAVE_X11}" = "yes"; then
10482 DEFS="$C_SWITCH_X_SITE $DEFS"
10483 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10484 LIBS="$LIBX $LIBS"
10485 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10486 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10487
10488 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10489 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10490 # but it's more convenient here to set LD_RUN_PATH
10491 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10492 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10493 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10494 export LD_RUN_PATH
10495 fi
10496
10497 if test "${opsys}" = "gnu-linux"; then
ca81d7a0
JD
10498 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10499echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10500 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10501/* confdefs.h. */
10502_ACEOF
10503cat confdefs.h >>conftest.$ac_ext
10504cat >>conftest.$ac_ext <<_ACEOF
10505/* end confdefs.h. */
98418dba 10506
98418dba
CW
10507int
10508main ()
10509{
10510XOpenDisplay ("foo");
10511 ;
10512 return 0;
10513}
10514_ACEOF
10515rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10516if { (ac_try="$ac_link"
10517case "(($ac_try" in
10518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10519 *) ac_try_echo=$ac_try;;
10520esac
10521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10522 (eval "$ac_link") 2>conftest.er1
98418dba 10523 ac_status=$?
edfaf76d
LK
10524 grep -v '^ *+' conftest.er1 >conftest.err
10525 rm -f conftest.er1
10526 cat conftest.err >&5
c0d27fcc 10527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10528 (exit $ac_status); } && {
10529 test -z "$ac_c_werror_flag" ||
10530 test ! -s conftest.err
10531 } && test -s conftest$ac_exeext &&
10532 $as_test_x conftest$ac_exeext; then
35996d22 10533 xlinux_first_failure=no
98418dba
CW
10534else
10535 echo "$as_me: failed program was:" >&5
19650fd6
AS
10536sed 's/^/| /' conftest.$ac_ext >&5
10537
ca81d7a0 10538 xlinux_first_failure=yes
98418dba 10539fi
ca81d7a0 10540
f053c89f 10541rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10542 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10543 if test "${xlinux_first_failure}" = "yes"; then
10544 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10545 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10546 OLD_CPPFLAGS="$CPPFLAGS"
10547 OLD_LIBS="$LIBS"
10548 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10549 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10550 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10551 LIBS="$LIBS -b i486-linuxaout"
10552 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10553/* confdefs.h. */
10554_ACEOF
10555cat confdefs.h >>conftest.$ac_ext
10556cat >>conftest.$ac_ext <<_ACEOF
10557/* end confdefs.h. */
98418dba 10558
98418dba
CW
10559int
10560main ()
10561{
10562XOpenDisplay ("foo");
10563 ;
10564 return 0;
10565}
10566_ACEOF
10567rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10568if { (ac_try="$ac_link"
10569case "(($ac_try" in
10570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10571 *) ac_try_echo=$ac_try;;
10572esac
10573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10574 (eval "$ac_link") 2>conftest.er1
98418dba 10575 ac_status=$?
edfaf76d
LK
10576 grep -v '^ *+' conftest.er1 >conftest.err
10577 rm -f conftest.er1
10578 cat conftest.err >&5
c0d27fcc 10579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10580 (exit $ac_status); } && {
10581 test -z "$ac_c_werror_flag" ||
10582 test ! -s conftest.err
10583 } && test -s conftest$ac_exeext &&
10584 $as_test_x conftest$ac_exeext; then
98418dba
CW
10585 xlinux_second_failure=no
10586else
10587 echo "$as_me: failed program was:" >&5
19650fd6
AS
10588sed 's/^/| /' conftest.$ac_ext >&5
10589
ca81d7a0 10590 xlinux_second_failure=yes
98418dba 10591fi
ca81d7a0 10592
f053c89f 10593rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10594 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10595 if test "${xlinux_second_failure}" = "yes"; then
10596 # If we get the same failure with -b, there is no use adding -b.
10597 # So take it out. This plays safe.
10598 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10599 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10600 CPPFLAGS="$OLD_CPPFLAGS"
10601 LIBS="$OLD_LIBS"
ca81d7a0
JD
10602 { echo "$as_me:$LINENO: result: no" >&5
10603echo "${ECHO_T}no" >&6; }
98418dba 10604 else
ca81d7a0
JD
10605 { echo "$as_me:$LINENO: result: yes" >&5
10606echo "${ECHO_T}yes" >&6; }
98418dba
CW
10607 fi
10608 else
ca81d7a0
JD
10609 { echo "$as_me:$LINENO: result: no" >&5
10610echo "${ECHO_T}no" >&6; }
98418dba
CW
10611 fi
10612 fi
10613
10614 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10615 # header files included from there.
ca81d7a0
JD
10616 { echo "$as_me:$LINENO: checking for Xkb" >&5
10617echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10618 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10619/* confdefs.h. */
10620_ACEOF
10621cat confdefs.h >>conftest.$ac_ext
10622cat >>conftest.$ac_ext <<_ACEOF
10623/* end confdefs.h. */
98418dba
CW
10624#include <X11/Xlib.h>
10625#include <X11/XKBlib.h>
98418dba
CW
10626int
10627main ()
10628{
10629XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10630 ;
10631 return 0;
10632}
10633_ACEOF
10634rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10635if { (ac_try="$ac_link"
10636case "(($ac_try" in
10637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10638 *) ac_try_echo=$ac_try;;
10639esac
10640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10641 (eval "$ac_link") 2>conftest.er1
98418dba 10642 ac_status=$?
edfaf76d
LK
10643 grep -v '^ *+' conftest.er1 >conftest.err
10644 rm -f conftest.er1
10645 cat conftest.err >&5
c0d27fcc 10646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10647 (exit $ac_status); } && {
10648 test -z "$ac_c_werror_flag" ||
10649 test ! -s conftest.err
10650 } && test -s conftest$ac_exeext &&
10651 $as_test_x conftest$ac_exeext; then
98418dba
CW
10652 emacs_xkb=yes
10653else
10654 echo "$as_me: failed program was:" >&5
19650fd6
AS
10655sed 's/^/| /' conftest.$ac_ext >&5
10656
ca81d7a0 10657 emacs_xkb=no
98418dba 10658fi
ca81d7a0 10659
f053c89f 10660rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10661 conftest$ac_exeext conftest.$ac_ext
ca81d7a0
JD
10662 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10663echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10664 if test $emacs_xkb = yes; then
b936fae4 10665
c0d27fcc 10666cat >>confdefs.h <<\_ACEOF
98418dba 10667#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10668_ACEOF
98418dba
CW
10669
10670 fi
10671
c0d27fcc
MR
10672
10673
10674
10675
98418dba
CW
10676for ac_func in XrmSetDatabase XScreenResourceString \
10677XScreenNumberOfScreen XSetWMProtocols
10678do
10679as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10680{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10681echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10682if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10683 echo $ECHO_N "(cached) $ECHO_C" >&6
10684else
10685 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10686/* confdefs.h. */
10687_ACEOF
10688cat confdefs.h >>conftest.$ac_ext
10689cat >>conftest.$ac_ext <<_ACEOF
10690/* end confdefs.h. */
edfaf76d
LK
10691/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10692 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10693#define $ac_func innocuous_$ac_func
10694
98418dba 10695/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10696 which can conflict with char $ac_func (); below.
10697 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10698 <limits.h> exists even on freestanding compilers. */
edfaf76d 10699
19650fd6
AS
10700#ifdef __STDC__
10701# include <limits.h>
10702#else
10703# include <assert.h>
10704#endif
edfaf76d
LK
10705
10706#undef $ac_func
10707
ca81d7a0
JD
10708/* Override any GCC internal prototype to avoid an error.
10709 Use char because int might match the return type of a GCC
10710 builtin and then its argument prototype would still apply. */
98418dba
CW
10711#ifdef __cplusplus
10712extern "C"
10713#endif
98418dba 10714char $ac_func ();
98418dba
CW
10715/* The GNU C library defines this for functions which it implements
10716 to always fail with ENOSYS. Some functions are actually named
10717 something starting with __ and the normal name is an alias. */
ca81d7a0 10718#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10719choke me
98418dba
CW
10720#endif
10721
19650fd6
AS
10722int
10723main ()
10724{
ca81d7a0 10725return $ac_func ();
98418dba
CW
10726 ;
10727 return 0;
10728}
10729_ACEOF
10730rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10731if { (ac_try="$ac_link"
10732case "(($ac_try" in
10733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10734 *) ac_try_echo=$ac_try;;
10735esac
10736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10737 (eval "$ac_link") 2>conftest.er1
98418dba 10738 ac_status=$?
edfaf76d
LK
10739 grep -v '^ *+' conftest.er1 >conftest.err
10740 rm -f conftest.er1
10741 cat conftest.err >&5
c0d27fcc 10742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10743 (exit $ac_status); } && {
10744 test -z "$ac_c_werror_flag" ||
10745 test ! -s conftest.err
10746 } && test -s conftest$ac_exeext &&
10747 $as_test_x conftest$ac_exeext; then
98418dba
CW
10748 eval "$as_ac_var=yes"
10749else
10750 echo "$as_me: failed program was:" >&5
19650fd6
AS
10751sed 's/^/| /' conftest.$ac_ext >&5
10752
ca81d7a0 10753 eval "$as_ac_var=no"
98418dba 10754fi
ca81d7a0 10755
f053c89f 10756rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10757 conftest$ac_exeext conftest.$ac_ext
98418dba 10758fi
ca81d7a0
JD
10759ac_res=`eval echo '${'$as_ac_var'}'`
10760 { echo "$as_me:$LINENO: result: $ac_res" >&5
10761echo "${ECHO_T}$ac_res" >&6; }
98418dba 10762if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10763 cat >>confdefs.h <<_ACEOF
98418dba 10764#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10765_ACEOF
98418dba
CW
10766
10767fi
10768done
10769
10770fi
10771
10772if test "${window_system}" = "x11"; then
ca81d7a0
JD
10773 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10774echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
10775 if test "${emacs_cv_x11_version_6+set}" = set; then
10776 echo $ECHO_N "(cached) $ECHO_C" >&6
10777else
10778 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10779/* confdefs.h. */
10780_ACEOF
10781cat confdefs.h >>conftest.$ac_ext
10782cat >>conftest.$ac_ext <<_ACEOF
10783/* end confdefs.h. */
98418dba 10784#include <X11/Xlib.h>
98418dba
CW
10785int
10786main ()
10787{
10788#if XlibSpecificationRelease < 6
10789fail;
10790#endif
10791
10792 ;
10793 return 0;
10794}
10795_ACEOF
10796rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10797if { (ac_try="$ac_link"
10798case "(($ac_try" in
10799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10800 *) ac_try_echo=$ac_try;;
10801esac
10802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10803 (eval "$ac_link") 2>conftest.er1
98418dba 10804 ac_status=$?
edfaf76d
LK
10805 grep -v '^ *+' conftest.er1 >conftest.err
10806 rm -f conftest.er1
10807 cat conftest.err >&5
c0d27fcc 10808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10809 (exit $ac_status); } && {
10810 test -z "$ac_c_werror_flag" ||
10811 test ! -s conftest.err
10812 } && test -s conftest$ac_exeext &&
10813 $as_test_x conftest$ac_exeext; then
98418dba
CW
10814 emacs_cv_x11_version_6=yes
10815else
10816 echo "$as_me: failed program was:" >&5
19650fd6
AS
10817sed 's/^/| /' conftest.$ac_ext >&5
10818
ca81d7a0 10819 emacs_cv_x11_version_6=no
98418dba 10820fi
ca81d7a0 10821
f053c89f 10822rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10823 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10824fi
10825
10826 if test $emacs_cv_x11_version_6 = yes; then
ca81d7a0
JD
10827 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10828echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10829
c0d27fcc 10830cat >>confdefs.h <<\_ACEOF
98418dba 10831#define HAVE_X11R6 1
c0d27fcc 10832_ACEOF
98418dba
CW
10833
10834 else
ca81d7a0
JD
10835 { echo "$as_me:$LINENO: result: before 6" >&5
10836echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10837 fi
10838fi
10839
98418dba 10840
0cfc0546
GM
10841### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10842HAVE_RSVG=no
8bff6137 10843if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes"; then
0cfc0546 10844 if test "${with_rsvg}" != "no"; then
0cfc0546
GM
10845 RSVG_REQUIRED=2.0.0
10846 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10847
10848
10849 succeeded=no
10850
00b9c927 10851 # Extract the first word of "pkg-config", so it can be a program name with args.
0cfc0546
GM
10852set dummy pkg-config; ac_word=$2
10853{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10854echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
10855if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10856 echo $ECHO_N "(cached) $ECHO_C" >&6
10857else
10858 case $PKG_CONFIG in
10859 [\\/]* | ?:[\\/]*)
10860 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10861 ;;
10862 *)
10863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10864for as_dir in $PATH
10865do
10866 IFS=$as_save_IFS
10867 test -z "$as_dir" && as_dir=.
10868 for ac_exec_ext in '' $ac_executable_extensions; do
10869 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10870 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10871 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10872 break 2
10873 fi
10874done
10875done
10876IFS=$as_save_IFS
10877
10878 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10879 ;;
10880esac
10881fi
10882PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10883if test -n "$PKG_CONFIG"; then
10884 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10885echo "${ECHO_T}$PKG_CONFIG" >&6; }
10886else
10887 { echo "$as_me:$LINENO: result: no" >&5
10888echo "${ECHO_T}no" >&6; }
10889fi
10890
10891
0cfc0546
GM
10892
10893 if test "$PKG_CONFIG" = "no" ; then
10894 :
10895 else
10896 PKG_CONFIG_MIN_VERSION=0.9.0
10897 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10898 { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
10899echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
10900
10901 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
10902 { echo "$as_me:$LINENO: result: yes" >&5
10903echo "${ECHO_T}yes" >&6; }
10904 succeeded=yes
10905
10906 { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
10907echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
10908 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10909 { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
10910echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
10911
10912 { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
10913echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
10914 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10915 { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
10916echo "${ECHO_T}$RSVG_LIBS" >&6; }
10917 else
10918 { echo "$as_me:$LINENO: result: no" >&5
10919echo "${ECHO_T}no" >&6; }
10920 RSVG_CFLAGS=""
10921 RSVG_LIBS=""
10922 ## If we have a custom action on failure, don't print errors, but
10923 ## do set a variable so people can do so.
10924 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
10925
10926 fi
10927
10928
10929
10930 else
10931 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10932 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10933 fi
10934 fi
10935
10936 if test $succeeded = yes; then
10937 :
10938 else
10939 :
10940 fi
10941
10942
10943
10944
10945 if test ".${RSVG_CFLAGS}" != "."; then
10946 HAVE_RSVG=yes
10947
10948cat >>confdefs.h <<\_ACEOF
10949#define HAVE_RSVG 1
10950_ACEOF
10951
10952 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10953 LIBS="$RSVG_LIBS $LIBS"
10954 fi
10955 fi
10956fi
10957
10958
488dd4c4 10959HAVE_GTK=no
9d2818d6 10960if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
787eb67d
JD
10961 GLIB_REQUIRED=2.6
10962 GTK_REQUIRED=2.6
488dd4c4
JD
10963 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10964
488dd4c4
JD
10965
10966 succeeded=no
10967
00b9c927 10968 # Extract the first word of "pkg-config", so it can be a program name with args.
488dd4c4 10969set dummy pkg-config; ac_word=$2
ca81d7a0
JD
10970{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10971echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
10972if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10973 echo $ECHO_N "(cached) $ECHO_C" >&6
10974else
10975 case $PKG_CONFIG in
10976 [\\/]* | ?:[\\/]*)
10977 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10978 ;;
10979 *)
10980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10981for as_dir in $PATH
10982do
10983 IFS=$as_save_IFS
10984 test -z "$as_dir" && as_dir=.
10985 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 10986 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
10987 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10988 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10989 break 2
10990 fi
10991done
10992done
ca81d7a0 10993IFS=$as_save_IFS
488dd4c4
JD
10994
10995 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10996 ;;
10997esac
10998fi
10999PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 11000if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
11001 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11002echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 11003else
ca81d7a0
JD
11004 { echo "$as_me:$LINENO: result: no" >&5
11005echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11006fi
11007
ca81d7a0 11008
488dd4c4
JD
11009
11010 if test "$PKG_CONFIG" = "no" ; then
089a966d 11011 pkg_check_gtk=no
488dd4c4
JD
11012 else
11013 PKG_CONFIG_MIN_VERSION=0.9.0
11014 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
11015 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
11016echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 11017
67db6aa2 11018 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
ca81d7a0
JD
11019 { echo "$as_me:$LINENO: result: yes" >&5
11020echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
11021 succeeded=yes
11022
ca81d7a0
JD
11023 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
11024echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 11025 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11026 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
11027echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 11028
ca81d7a0
JD
11029 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
11030echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 11031 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11032 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
11033echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 11034 else
ca81d7a0
JD
11035 { echo "$as_me:$LINENO: result: no" >&5
11036echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11037 GTK_CFLAGS=""
11038 GTK_LIBS=""
11039 ## If we have a custom action on failure, don't print errors, but
11040 ## do set a variable so people can do so.
11041 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 11042
488dd4c4
JD
11043 fi
11044
11045
11046
11047 else
11048 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11049 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11050 fi
11051 fi
11052
11053 if test $succeeded = yes; then
089a966d 11054 pkg_check_gtk=yes
488dd4c4 11055 else
089a966d
GM
11056 pkg_check_gtk=no
11057 fi
11058
11059 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
11060 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
11061echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
11062 { (exit 1); exit 1; }; }
11063 fi
089a966d
GM
11064fi
11065
11066
11067if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
11068
11069
11070
11071 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11072 CFLAGS="$CFLAGS $GTK_CFLAGS"
11073 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11074 GTK_COMPILES=no
57669b57 11075
8eeae1c9 11076for ac_func in gtk_main
57669b57
JD
11077do
11078as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11079{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11080echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11081if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11082 echo $ECHO_N "(cached) $ECHO_C" >&6
11083else
11084 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11085/* confdefs.h. */
11086_ACEOF
11087cat confdefs.h >>conftest.$ac_ext
11088cat >>conftest.$ac_ext <<_ACEOF
11089/* end confdefs.h. */
edfaf76d
LK
11090/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11091 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11092#define $ac_func innocuous_$ac_func
11093
57669b57
JD
11094/* System header to define __stub macros and hopefully few prototypes,
11095 which can conflict with char $ac_func (); below.
11096 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11097 <limits.h> exists even on freestanding compilers. */
edfaf76d 11098
57669b57
JD
11099#ifdef __STDC__
11100# include <limits.h>
11101#else
11102# include <assert.h>
11103#endif
edfaf76d
LK
11104
11105#undef $ac_func
11106
ca81d7a0
JD
11107/* Override any GCC internal prototype to avoid an error.
11108 Use char because int might match the return type of a GCC
11109 builtin and then its argument prototype would still apply. */
57669b57
JD
11110#ifdef __cplusplus
11111extern "C"
57669b57 11112#endif
57669b57
JD
11113char $ac_func ();
11114/* The GNU C library defines this for functions which it implements
11115 to always fail with ENOSYS. Some functions are actually named
11116 something starting with __ and the normal name is an alias. */
ca81d7a0 11117#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11118choke me
57669b57
JD
11119#endif
11120
11121int
11122main ()
11123{
ca81d7a0 11124return $ac_func ();
57669b57
JD
11125 ;
11126 return 0;
11127}
11128_ACEOF
11129rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11130if { (ac_try="$ac_link"
11131case "(($ac_try" in
11132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11133 *) ac_try_echo=$ac_try;;
11134esac
11135eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11136 (eval "$ac_link") 2>conftest.er1
57669b57 11137 ac_status=$?
edfaf76d
LK
11138 grep -v '^ *+' conftest.er1 >conftest.err
11139 rm -f conftest.er1
11140 cat conftest.err >&5
57669b57 11141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11142 (exit $ac_status); } && {
11143 test -z "$ac_c_werror_flag" ||
11144 test ! -s conftest.err
11145 } && test -s conftest$ac_exeext &&
11146 $as_test_x conftest$ac_exeext; then
57669b57
JD
11147 eval "$as_ac_var=yes"
11148else
11149 echo "$as_me: failed program was:" >&5
11150sed 's/^/| /' conftest.$ac_ext >&5
11151
ca81d7a0 11152 eval "$as_ac_var=no"
57669b57 11153fi
ca81d7a0 11154
f053c89f 11155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11156 conftest$ac_exeext conftest.$ac_ext
57669b57 11157fi
ca81d7a0
JD
11158ac_res=`eval echo '${'$as_ac_var'}'`
11159 { echo "$as_me:$LINENO: result: $ac_res" >&5
11160echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11161if test `eval echo '${'$as_ac_var'}'` = yes; then
11162 cat >>confdefs.h <<_ACEOF
11163#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11164_ACEOF
8eeae1c9 11165 GTK_COMPILES=yes
57669b57
JD
11166fi
11167done
11168
8eeae1c9 11169 if test "${GTK_COMPILES}" != "yes"; then
089a966d
GM
11170 if test "$USE_X_TOOLKIT" != "maybe"; then
11171 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
8eeae1c9
JD
11172echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11173 { (exit 1); exit 1; }; };
089a966d
GM
11174 fi
11175 else
11176 HAVE_GTK=yes
488dd4c4
JD
11177
11178cat >>confdefs.h <<\_ACEOF
a51f4969 11179#define USE_GTK 1
488dd4c4
JD
11180_ACEOF
11181
089a966d 11182 USE_X_TOOLKIT=none
f60c93db
JD
11183 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
11184 :
11185 else
11186 { echo "$as_me:$LINENO: WARNING: Your version of Gtk+ will have problems with
11187 closing open displays. This is no problem if you just use
11188 one display, but if you use more than one and close one of them
11189 Emacs may crash." >&5
11190echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11191 closing open displays. This is no problem if you just use
11192 one display, but if you use more than one and close one of them
11193 Emacs may crash." >&2;}
11194 sleep 3
11195 fi
089a966d
GM
11196 fi
11197
11198fi
11199
11200
11201if test "${HAVE_GTK}" = "yes"; then
488dd4c4 11202
d0a80c21
JD
11203 if test "$with_toolkit_scroll_bars" != no; then
11204 with_toolkit_scroll_bars=yes
11205 fi
57669b57
JD
11206
11207 HAVE_GTK_MULTIDISPLAY=no
11208
11209for ac_func in gdk_display_open
11210do
11211as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11212{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11213echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11214if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11215 echo $ECHO_N "(cached) $ECHO_C" >&6
11216else
11217 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11218/* confdefs.h. */
11219_ACEOF
11220cat confdefs.h >>conftest.$ac_ext
11221cat >>conftest.$ac_ext <<_ACEOF
11222/* end confdefs.h. */
edfaf76d
LK
11223/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11224 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11225#define $ac_func innocuous_$ac_func
11226
57669b57
JD
11227/* System header to define __stub macros and hopefully few prototypes,
11228 which can conflict with char $ac_func (); below.
11229 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11230 <limits.h> exists even on freestanding compilers. */
edfaf76d 11231
57669b57
JD
11232#ifdef __STDC__
11233# include <limits.h>
11234#else
11235# include <assert.h>
11236#endif
edfaf76d
LK
11237
11238#undef $ac_func
11239
ca81d7a0
JD
11240/* Override any GCC internal prototype to avoid an error.
11241 Use char because int might match the return type of a GCC
11242 builtin and then its argument prototype would still apply. */
57669b57
JD
11243#ifdef __cplusplus
11244extern "C"
57669b57 11245#endif
57669b57
JD
11246char $ac_func ();
11247/* The GNU C library defines this for functions which it implements
11248 to always fail with ENOSYS. Some functions are actually named
11249 something starting with __ and the normal name is an alias. */
ca81d7a0 11250#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11251choke me
57669b57
JD
11252#endif
11253
11254int
11255main ()
11256{
ca81d7a0 11257return $ac_func ();
57669b57
JD
11258 ;
11259 return 0;
11260}
11261_ACEOF
11262rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11263if { (ac_try="$ac_link"
11264case "(($ac_try" in
11265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11266 *) ac_try_echo=$ac_try;;
11267esac
11268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11269 (eval "$ac_link") 2>conftest.er1
57669b57 11270 ac_status=$?
edfaf76d
LK
11271 grep -v '^ *+' conftest.er1 >conftest.err
11272 rm -f conftest.er1
11273 cat conftest.err >&5
57669b57 11274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11275 (exit $ac_status); } && {
11276 test -z "$ac_c_werror_flag" ||
11277 test ! -s conftest.err
11278 } && test -s conftest$ac_exeext &&
11279 $as_test_x conftest$ac_exeext; then
57669b57
JD
11280 eval "$as_ac_var=yes"
11281else
11282 echo "$as_me: failed program was:" >&5
11283sed 's/^/| /' conftest.$ac_ext >&5
11284
ca81d7a0 11285 eval "$as_ac_var=no"
57669b57 11286fi
ca81d7a0 11287
f053c89f 11288rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11289 conftest$ac_exeext conftest.$ac_ext
57669b57 11290fi
ca81d7a0
JD
11291ac_res=`eval echo '${'$as_ac_var'}'`
11292 { echo "$as_me:$LINENO: result: $ac_res" >&5
11293echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11294if test `eval echo '${'$as_ac_var'}'` = yes; then
11295 cat >>confdefs.h <<_ACEOF
11296#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11297_ACEOF
11298 HAVE_GTK_MULTIDISPLAY=yes
11299fi
11300done
11301
11302 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11303
11304cat >>confdefs.h <<\_ACEOF
11305#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
11306_ACEOF
11307
11308 fi
57669b57 11309
572a3cc2
JD
11310 HAVE_GTK_FILE_SELECTION=no
11311
11312for ac_func in gtk_file_selection_new
11313do
11314as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11315{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11316echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11317if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11318 echo $ECHO_N "(cached) $ECHO_C" >&6
11319else
11320 cat >conftest.$ac_ext <<_ACEOF
11321/* confdefs.h. */
11322_ACEOF
11323cat confdefs.h >>conftest.$ac_ext
11324cat >>conftest.$ac_ext <<_ACEOF
11325/* end confdefs.h. */
edfaf76d
LK
11326/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11327 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11328#define $ac_func innocuous_$ac_func
11329
572a3cc2
JD
11330/* System header to define __stub macros and hopefully few prototypes,
11331 which can conflict with char $ac_func (); below.
11332 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11333 <limits.h> exists even on freestanding compilers. */
edfaf76d 11334
572a3cc2
JD
11335#ifdef __STDC__
11336# include <limits.h>
11337#else
11338# include <assert.h>
11339#endif
edfaf76d
LK
11340
11341#undef $ac_func
11342
ca81d7a0
JD
11343/* Override any GCC internal prototype to avoid an error.
11344 Use char because int might match the return type of a GCC
11345 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11346#ifdef __cplusplus
11347extern "C"
572a3cc2 11348#endif
572a3cc2
JD
11349char $ac_func ();
11350/* The GNU C library defines this for functions which it implements
11351 to always fail with ENOSYS. Some functions are actually named
11352 something starting with __ and the normal name is an alias. */
ca81d7a0 11353#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11354choke me
572a3cc2
JD
11355#endif
11356
11357int
11358main ()
11359{
ca81d7a0 11360return $ac_func ();
572a3cc2
JD
11361 ;
11362 return 0;
11363}
11364_ACEOF
11365rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11366if { (ac_try="$ac_link"
11367case "(($ac_try" in
11368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11369 *) ac_try_echo=$ac_try;;
11370esac
11371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11372 (eval "$ac_link") 2>conftest.er1
572a3cc2 11373 ac_status=$?
edfaf76d
LK
11374 grep -v '^ *+' conftest.er1 >conftest.err
11375 rm -f conftest.er1
11376 cat conftest.err >&5
572a3cc2 11377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11378 (exit $ac_status); } && {
11379 test -z "$ac_c_werror_flag" ||
11380 test ! -s conftest.err
11381 } && test -s conftest$ac_exeext &&
11382 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11383 eval "$as_ac_var=yes"
11384else
11385 echo "$as_me: failed program was:" >&5
11386sed 's/^/| /' conftest.$ac_ext >&5
11387
ca81d7a0 11388 eval "$as_ac_var=no"
572a3cc2 11389fi
ca81d7a0 11390
f053c89f 11391rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11392 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11393fi
ca81d7a0
JD
11394ac_res=`eval echo '${'$as_ac_var'}'`
11395 { echo "$as_me:$LINENO: result: $ac_res" >&5
11396echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11397if test `eval echo '${'$as_ac_var'}'` = yes; then
11398 cat >>confdefs.h <<_ACEOF
11399#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11400_ACEOF
11401 HAVE_GTK_FILE_SELECTION=yes
11402fi
11403done
11404
11405
11406 HAVE_GTK_FILE_CHOOSER=no
11407
11408for ac_func in gtk_file_chooser_dialog_new
11409do
11410as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11411{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11412echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11413if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11414 echo $ECHO_N "(cached) $ECHO_C" >&6
11415else
11416 cat >conftest.$ac_ext <<_ACEOF
11417/* confdefs.h. */
11418_ACEOF
11419cat confdefs.h >>conftest.$ac_ext
11420cat >>conftest.$ac_ext <<_ACEOF
11421/* end confdefs.h. */
edfaf76d
LK
11422/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11423 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11424#define $ac_func innocuous_$ac_func
11425
572a3cc2
JD
11426/* System header to define __stub macros and hopefully few prototypes,
11427 which can conflict with char $ac_func (); below.
11428 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11429 <limits.h> exists even on freestanding compilers. */
edfaf76d 11430
572a3cc2
JD
11431#ifdef __STDC__
11432# include <limits.h>
11433#else
11434# include <assert.h>
11435#endif
edfaf76d
LK
11436
11437#undef $ac_func
11438
ca81d7a0
JD
11439/* Override any GCC internal prototype to avoid an error.
11440 Use char because int might match the return type of a GCC
11441 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11442#ifdef __cplusplus
11443extern "C"
572a3cc2 11444#endif
572a3cc2
JD
11445char $ac_func ();
11446/* The GNU C library defines this for functions which it implements
11447 to always fail with ENOSYS. Some functions are actually named
11448 something starting with __ and the normal name is an alias. */
ca81d7a0 11449#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11450choke me
572a3cc2
JD
11451#endif
11452
11453int
11454main ()
11455{
ca81d7a0 11456return $ac_func ();
572a3cc2
JD
11457 ;
11458 return 0;
11459}
11460_ACEOF
11461rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11462if { (ac_try="$ac_link"
11463case "(($ac_try" in
11464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11465 *) ac_try_echo=$ac_try;;
11466esac
11467eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11468 (eval "$ac_link") 2>conftest.er1
572a3cc2 11469 ac_status=$?
edfaf76d
LK
11470 grep -v '^ *+' conftest.er1 >conftest.err
11471 rm -f conftest.er1
11472 cat conftest.err >&5
572a3cc2 11473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11474 (exit $ac_status); } && {
11475 test -z "$ac_c_werror_flag" ||
11476 test ! -s conftest.err
11477 } && test -s conftest$ac_exeext &&
11478 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11479 eval "$as_ac_var=yes"
11480else
11481 echo "$as_me: failed program was:" >&5
11482sed 's/^/| /' conftest.$ac_ext >&5
11483
ca81d7a0 11484 eval "$as_ac_var=no"
572a3cc2 11485fi
ca81d7a0 11486
f053c89f 11487rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11488 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11489fi
ca81d7a0
JD
11490ac_res=`eval echo '${'$as_ac_var'}'`
11491 { echo "$as_me:$LINENO: result: $ac_res" >&5
11492echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11493if test `eval echo '${'$as_ac_var'}'` = yes; then
11494 cat >>confdefs.h <<_ACEOF
11495#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11496_ACEOF
11497 HAVE_GTK_FILE_CHOOSER=yes
11498fi
11499done
11500
11501
11502 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11503 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11504
11505cat >>confdefs.h <<\_ACEOF
11506#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
11507_ACEOF
11508
b8bdffbe
JD
11509 fi
11510
11511 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11512 HAVE_GTK_AND_PTHREAD=no
11513
11514for ac_header in pthread.h
11515do
11516as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
11517if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11518 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11519echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11520if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11521 echo $ECHO_N "(cached) $ECHO_C" >&6
11522fi
ca81d7a0
JD
11523ac_res=`eval echo '${'$as_ac_Header'}'`
11524 { echo "$as_me:$LINENO: result: $ac_res" >&5
11525echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11526else
11527 # Is the header compilable?
ca81d7a0
JD
11528{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11529echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
b8bdffbe
JD
11530cat >conftest.$ac_ext <<_ACEOF
11531/* confdefs.h. */
11532_ACEOF
11533cat confdefs.h >>conftest.$ac_ext
11534cat >>conftest.$ac_ext <<_ACEOF
11535/* end confdefs.h. */
11536$ac_includes_default
11537#include <$ac_header>
11538_ACEOF
11539rm -f conftest.$ac_objext
ca81d7a0
JD
11540if { (ac_try="$ac_compile"
11541case "(($ac_try" in
11542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11543 *) ac_try_echo=$ac_try;;
11544esac
11545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11546 (eval "$ac_compile") 2>conftest.er1
b8bdffbe 11547 ac_status=$?
edfaf76d
LK
11548 grep -v '^ *+' conftest.er1 >conftest.err
11549 rm -f conftest.er1
11550 cat conftest.err >&5
b8bdffbe 11551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11552 (exit $ac_status); } && {
11553 test -z "$ac_c_werror_flag" ||
11554 test ! -s conftest.err
11555 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11556 ac_header_compiler=yes
11557else
11558 echo "$as_me: failed program was:" >&5
11559sed 's/^/| /' conftest.$ac_ext >&5
11560
ca81d7a0 11561 ac_header_compiler=no
b8bdffbe 11562fi
ca81d7a0
JD
11563
11564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11565{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11566echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11567
11568# Is the header present?
ca81d7a0
JD
11569{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11570echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11571cat >conftest.$ac_ext <<_ACEOF
11572/* confdefs.h. */
11573_ACEOF
11574cat confdefs.h >>conftest.$ac_ext
11575cat >>conftest.$ac_ext <<_ACEOF
11576/* end confdefs.h. */
11577#include <$ac_header>
11578_ACEOF
ca81d7a0
JD
11579if { (ac_try="$ac_cpp conftest.$ac_ext"
11580case "(($ac_try" in
11581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11582 *) ac_try_echo=$ac_try;;
11583esac
11584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11585 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11586 ac_status=$?
11587 grep -v '^ *+' conftest.er1 >conftest.err
11588 rm -f conftest.er1
11589 cat conftest.err >&5
11590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11591 (exit $ac_status); } >/dev/null && {
11592 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11593 test ! -s conftest.err
11594 }; then
b8bdffbe
JD
11595 ac_header_preproc=yes
11596else
11597 echo "$as_me: failed program was:" >&5
11598sed 's/^/| /' conftest.$ac_ext >&5
11599
11600 ac_header_preproc=no
11601fi
ca81d7a0 11602
b8bdffbe 11603rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
11604{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11605echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11606
11607# So? What about this header?
edfaf76d
LK
11608case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11609 yes:no: )
b8bdffbe
JD
11610 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11611echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11612 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11613echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11614 ac_header_preproc=yes
b8bdffbe 11615 ;;
edfaf76d 11616 no:yes:* )
b8bdffbe
JD
11617 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11618echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11619 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11620echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11621 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11622echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11623 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11624echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11625 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11626echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11627 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11628echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11629
b8bdffbe
JD
11630 ;;
11631esac
ca81d7a0
JD
11632{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11633echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11634if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11635 echo $ECHO_N "(cached) $ECHO_C" >&6
11636else
edfaf76d 11637 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11638fi
ca81d7a0
JD
11639ac_res=`eval echo '${'$as_ac_Header'}'`
11640 { echo "$as_me:$LINENO: result: $ac_res" >&5
11641echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11642
11643fi
11644if test `eval echo '${'$as_ac_Header'}'` = yes; then
11645 cat >>confdefs.h <<_ACEOF
11646#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11647_ACEOF
11648
11649fi
11650
11651done
11652
11653 if test "$ac_cv_header_pthread_h"; then
ca81d7a0
JD
11654 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11655echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11656if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11657 echo $ECHO_N "(cached) $ECHO_C" >&6
11658else
11659 ac_check_lib_save_LIBS=$LIBS
11660LIBS="-lpthread $LIBS"
11661cat >conftest.$ac_ext <<_ACEOF
11662/* confdefs.h. */
11663_ACEOF
11664cat confdefs.h >>conftest.$ac_ext
11665cat >>conftest.$ac_ext <<_ACEOF
11666/* end confdefs.h. */
11667
ca81d7a0
JD
11668/* Override any GCC internal prototype to avoid an error.
11669 Use char because int might match the return type of a GCC
11670 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11671#ifdef __cplusplus
11672extern "C"
11673#endif
b8bdffbe
JD
11674char pthread_self ();
11675int
11676main ()
11677{
ca81d7a0 11678return pthread_self ();
b8bdffbe
JD
11679 ;
11680 return 0;
11681}
11682_ACEOF
11683rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11684if { (ac_try="$ac_link"
11685case "(($ac_try" in
11686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11687 *) ac_try_echo=$ac_try;;
11688esac
11689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11690 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11691 ac_status=$?
edfaf76d
LK
11692 grep -v '^ *+' conftest.er1 >conftest.err
11693 rm -f conftest.er1
11694 cat conftest.err >&5
b8bdffbe 11695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11696 (exit $ac_status); } && {
11697 test -z "$ac_c_werror_flag" ||
11698 test ! -s conftest.err
11699 } && test -s conftest$ac_exeext &&
11700 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11701 ac_cv_lib_pthread_pthread_self=yes
11702else
11703 echo "$as_me: failed program was:" >&5
11704sed 's/^/| /' conftest.$ac_ext >&5
11705
ca81d7a0 11706 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11707fi
ca81d7a0 11708
f053c89f 11709rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11710 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11711LIBS=$ac_check_lib_save_LIBS
11712fi
ca81d7a0
JD
11713{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11714echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11715if test $ac_cv_lib_pthread_pthread_self = yes; then
11716 HAVE_GTK_AND_PTHREAD=yes
11717fi
11718
11719 fi
11720 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
846d1b3e
JD
11721 case "${canonical}" in
11722 *-hpux*) ;;
11723 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
11724 esac
b8bdffbe
JD
11725
11726cat >>confdefs.h <<\_ACEOF
11727#define HAVE_GTK_AND_PTHREAD 1
11728_ACEOF
11729
11730 fi
57669b57 11731 fi
488dd4c4
JD
11732fi
11733
131e4133
MA
11734HAVE_DBUS=no
11735if test "${with_dbus}" = "yes"; then
cffe4909
MH
11736
11737 succeeded=no
11738
00b9c927 11739 # Extract the first word of "pkg-config", so it can be a program name with args.
cffe4909
MH
11740set dummy pkg-config; ac_word=$2
11741{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11742echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11743if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
131e4133
MA
11744 echo $ECHO_N "(cached) $ECHO_C" >&6
11745else
cffe4909
MH
11746 case $PKG_CONFIG in
11747 [\\/]* | ?:[\\/]*)
11748 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11749 ;;
11750 *)
11751 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11752for as_dir in $PATH
11753do
11754 IFS=$as_save_IFS
11755 test -z "$as_dir" && as_dir=.
11756 for ac_exec_ext in '' $ac_executable_extensions; do
11757 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11758 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11759 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11760 break 2
11761 fi
11762done
11763done
11764IFS=$as_save_IFS
131e4133 11765
cffe4909
MH
11766 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11767 ;;
131e4133 11768esac
cffe4909
MH
11769fi
11770PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11771if test -n "$PKG_CONFIG"; then
11772 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11773echo "${ECHO_T}$PKG_CONFIG" >&6; }
131e4133 11774else
cffe4909
MH
11775 { echo "$as_me:$LINENO: result: no" >&5
11776echo "${ECHO_T}no" >&6; }
131e4133
MA
11777fi
11778
cffe4909 11779
cffe4909
MH
11780
11781 if test "$PKG_CONFIG" = "no" ; then
11782 HAVE_DBUS=no
11783 else
11784 PKG_CONFIG_MIN_VERSION=0.9.0
11785 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11786 { echo "$as_me:$LINENO: checking for dbus-1 >= 1.0" >&5
11787echo $ECHO_N "checking for dbus-1 >= 1.0... $ECHO_C" >&6; }
11788
11789 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
11790 { echo "$as_me:$LINENO: result: yes" >&5
11791echo "${ECHO_T}yes" >&6; }
11792 succeeded=yes
11793
11794 { echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5
11795echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6; }
11796 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11797 { echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5
11798echo "${ECHO_T}$DBUS_CFLAGS" >&6; }
11799
11800 { echo "$as_me:$LINENO: checking DBUS_LIBS" >&5
11801echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6; }
11802 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11803 { echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5
11804echo "${ECHO_T}$DBUS_LIBS" >&6; }
11805 else
11806 { echo "$as_me:$LINENO: result: no" >&5
11807echo "${ECHO_T}no" >&6; }
11808 DBUS_CFLAGS=""
11809 DBUS_LIBS=""
11810 ## If we have a custom action on failure, don't print errors, but
11811 ## do set a variable so people can do so.
11812 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
11813
11814 fi
11815
11816
11817
11818 else
11819 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11820 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11821 fi
11822 fi
11823
11824 if test $succeeded = yes; then
11825 HAVE_DBUS=yes
11826 else
11827 HAVE_DBUS=no
11828 fi
131e4133
MA
11829
11830 if test "$HAVE_DBUS" = yes; then
11831
11832cat >>confdefs.h <<\_ACEOF
11833#define HAVE_DBUS 1
11834_ACEOF
11835
131e4133
MA
11836 fi
11837fi
11838
b3615392 11839HAVE_XAW3D=no
991a7602 11840if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
f23d76bd
MB
11841 if test "$with_xaw3d" != no; then
11842 { echo "$as_me:$LINENO: checking for xaw3d" >&5
b3615392 11843echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
f23d76bd 11844 if test "${emacs_cv_xaw3d+set}" = set; then
98418dba
CW
11845 echo $ECHO_N "(cached) $ECHO_C" >&6
11846else
11847 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11848/* confdefs.h. */
11849_ACEOF
11850cat confdefs.h >>conftest.$ac_ext
11851cat >>conftest.$ac_ext <<_ACEOF
11852/* end confdefs.h. */
98418dba
CW
11853
11854#include <X11/Intrinsic.h>
b3615392 11855#include <X11/Xaw3d/Simple.h>
98418dba
CW
11856int
11857main ()
11858{
11859
11860 ;
11861 return 0;
11862}
11863_ACEOF
11864rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11865if { (ac_try="$ac_link"
11866case "(($ac_try" in
11867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11868 *) ac_try_echo=$ac_try;;
11869esac
11870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11871 (eval "$ac_link") 2>conftest.er1
98418dba 11872 ac_status=$?
edfaf76d
LK
11873 grep -v '^ *+' conftest.er1 >conftest.err
11874 rm -f conftest.er1
11875 cat conftest.err >&5
c0d27fcc 11876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11877 (exit $ac_status); } && {
11878 test -z "$ac_c_werror_flag" ||
11879 test ! -s conftest.err
11880 } && test -s conftest$ac_exeext &&
11881 $as_test_x conftest$ac_exeext; then
b3615392 11882 emacs_cv_xaw3d=yes
98418dba
CW
11883else
11884 echo "$as_me: failed program was:" >&5
19650fd6
AS
11885sed 's/^/| /' conftest.$ac_ext >&5
11886
b3615392 11887 emacs_cv_xaw3d=no
98418dba 11888fi
ca81d7a0 11889
f053c89f 11890rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11891 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11892fi
11893
9d89ffd0 11894 else
f23d76bd 11895 emacs_cv_xaw3d=no
9d89ffd0 11896 fi
f23d76bd
MB
11897 if test $emacs_cv_xaw3d = yes; then
11898 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 11899echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11900 USE_X_TOOLKIT=LUCID
11901 HAVE_XAW3D=yes
9d89ffd0 11902
b3615392
MB
11903cat >>confdefs.h <<\_ACEOF
11904#define HAVE_XAW3D 1
11905_ACEOF
9d89ffd0 11906
f23d76bd
MB
11907 else
11908 { echo "$as_me:$LINENO: result: no" >&5
9d89ffd0 11909echo "${ECHO_T}no" >&6; }
f23d76bd 11910 { echo "$as_me:$LINENO: checking for libXaw" >&5
b3615392 11911echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
f23d76bd 11912 if test "${emacs_cv_xaw+set}" = set; then
9d89ffd0 11913 echo $ECHO_N "(cached) $ECHO_C" >&6
9d89ffd0 11914else
b3615392 11915 cat >conftest.$ac_ext <<_ACEOF
9d89ffd0
JD
11916/* confdefs.h. */
11917_ACEOF
11918cat confdefs.h >>conftest.$ac_ext
11919cat >>conftest.$ac_ext <<_ACEOF
11920/* end confdefs.h. */
b3615392
MB
11921
11922#include <X11/Intrinsic.h>
11923#include <X11/Xaw/Simple.h>
11924int
11925main ()
11926{
11927
11928 ;
11929 return 0;
11930}
9d89ffd0 11931_ACEOF
b3615392
MB
11932rm -f conftest.$ac_objext conftest$ac_exeext
11933if { (ac_try="$ac_link"
9d89ffd0
JD
11934case "(($ac_try" in
11935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11936 *) ac_try_echo=$ac_try;;
11937esac
11938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
b3615392 11939 (eval "$ac_link") 2>conftest.er1
9d89ffd0
JD
11940 ac_status=$?
11941 grep -v '^ *+' conftest.er1 >conftest.err
11942 rm -f conftest.er1
11943 cat conftest.err >&5
11944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11945 (exit $ac_status); } && {
11946 test -z "$ac_c_werror_flag" ||
11947 test ! -s conftest.err
b3615392
MB
11948 } && test -s conftest$ac_exeext &&
11949 $as_test_x conftest$ac_exeext; then
11950 emacs_cv_xaw=yes
9d89ffd0
JD
11951else
11952 echo "$as_me: failed program was:" >&5
11953sed 's/^/| /' conftest.$ac_ext >&5
11954
b3615392 11955 emacs_cv_xaw=no
9d89ffd0
JD
11956fi
11957
b3615392
MB
11958rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11959 conftest$ac_exeext conftest.$ac_ext
11960fi
9d89ffd0 11961
f23d76bd
MB
11962 if test $emacs_cv_xaw = yes; then
11963 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 11964echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11965 USE_X_TOOLKIT=LUCID
11966 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11967 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
991a7602
MB
11968echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
11969 { (exit 1); exit 1; }; }
f23d76bd
MB
11970 else
11971 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
b3615392 11972echo "${ECHO_T}no; do not use toolkit by default" >&6; }
f23d76bd 11973 USE_X_TOOLKIT=none
98418dba 11974 fi
98418dba
CW
11975 fi
11976fi
11977
11978X_TOOLKIT_TYPE=$USE_X_TOOLKIT
11979
11980if test "${USE_X_TOOLKIT}" != "none"; then
ca81d7a0
JD
11981 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
11982echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
11983 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
11984 echo $ECHO_N "(cached) $ECHO_C" >&6
11985else
11986 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11987/* confdefs.h. */
11988_ACEOF
11989cat confdefs.h >>conftest.$ac_ext
11990cat >>conftest.$ac_ext <<_ACEOF
11991/* end confdefs.h. */
98418dba 11992#include <X11/Intrinsic.h>
98418dba
CW
11993int
11994main ()
11995{
11996#if XtSpecificationRelease < 6
11997fail;
11998#endif
11999
12000 ;
12001 return 0;
12002}
12003_ACEOF
12004rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12005if { (ac_try="$ac_link"
12006case "(($ac_try" in
12007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12008 *) ac_try_echo=$ac_try;;
12009esac
12010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12011 (eval "$ac_link") 2>conftest.er1
98418dba 12012 ac_status=$?
edfaf76d
LK
12013 grep -v '^ *+' conftest.er1 >conftest.err
12014 rm -f conftest.er1
12015 cat conftest.err >&5
c0d27fcc 12016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12017 (exit $ac_status); } && {
12018 test -z "$ac_c_werror_flag" ||
12019 test ! -s conftest.err
12020 } && test -s conftest$ac_exeext &&
12021 $as_test_x conftest$ac_exeext; then
98418dba
CW
12022 emacs_cv_x11_toolkit_version_6=yes
12023else
12024 echo "$as_me: failed program was:" >&5
19650fd6
AS
12025sed 's/^/| /' conftest.$ac_ext >&5
12026
ca81d7a0 12027 emacs_cv_x11_toolkit_version_6=no
98418dba 12028fi
ca81d7a0 12029
f053c89f 12030rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12031 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12032fi
12033
12034 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12035 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ca81d7a0
JD
12036 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12037echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12038
c0d27fcc 12039cat >>confdefs.h <<\_ACEOF
98418dba 12040#define HAVE_X11XTR6 1
c0d27fcc 12041_ACEOF
98418dba
CW
12042
12043 else
ca81d7a0
JD
12044 { echo "$as_me:$LINENO: result: before 6" >&5
12045echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12046 fi
12047
12048 OLDLIBS="$LIBS"
12049 if test x$HAVE_X11XTR6 = xyes; then
12050 LIBS="-lXt -lSM -lICE $LIBS"
12051 else
12052 LIBS="-lXt $LIBS"
12053 fi
12054
ca81d7a0
JD
12055{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12056echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
12057if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
12058 echo $ECHO_N "(cached) $ECHO_C" >&6
12059else
12060 ac_check_lib_save_LIBS=$LIBS
12061LIBS="-lXmu $LIBS"
12062cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12063/* confdefs.h. */
12064_ACEOF
12065cat confdefs.h >>conftest.$ac_ext
12066cat >>conftest.$ac_ext <<_ACEOF
12067/* end confdefs.h. */
98418dba 12068
ca81d7a0
JD
12069/* Override any GCC internal prototype to avoid an error.
12070 Use char because int might match the return type of a GCC
12071 builtin and then its argument prototype would still apply. */
98418dba
CW
12072#ifdef __cplusplus
12073extern "C"
12074#endif
98418dba 12075char XmuConvertStandardSelection ();
98418dba
CW
12076int
12077main ()
12078{
ca81d7a0 12079return XmuConvertStandardSelection ();
98418dba
CW
12080 ;
12081 return 0;
12082}
12083_ACEOF
12084rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12085if { (ac_try="$ac_link"
12086case "(($ac_try" in
12087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12088 *) ac_try_echo=$ac_try;;
12089esac
12090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12091 (eval "$ac_link") 2>conftest.er1
98418dba 12092 ac_status=$?
edfaf76d
LK
12093 grep -v '^ *+' conftest.er1 >conftest.err
12094 rm -f conftest.er1
12095 cat conftest.err >&5
c0d27fcc 12096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12097 (exit $ac_status); } && {
12098 test -z "$ac_c_werror_flag" ||
12099 test ! -s conftest.err
12100 } && test -s conftest$ac_exeext &&
12101 $as_test_x conftest$ac_exeext; then
98418dba
CW
12102 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12103else
12104 echo "$as_me: failed program was:" >&5
19650fd6
AS
12105sed 's/^/| /' conftest.$ac_ext >&5
12106
ca81d7a0 12107 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12108fi
ca81d7a0 12109
f053c89f 12110rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12111 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12112LIBS=$ac_check_lib_save_LIBS
12113fi
ca81d7a0
JD
12114{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12115echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 12116if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12117 cat >>confdefs.h <<_ACEOF
98418dba 12118#define HAVE_LIBXMU 1
c0d27fcc 12119_ACEOF
98418dba
CW
12120
12121 LIBS="-lXmu $LIBS"
12122
12123fi
12124
12125 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12126fi
12127
12128# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12129if test "${HAVE_X11}" = "yes"; then
12130 if test "${USE_X_TOOLKIT}" != "none"; then
12131
ca81d7a0
JD
12132{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12133echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12134if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12135 echo $ECHO_N "(cached) $ECHO_C" >&6
12136else
12137 ac_check_lib_save_LIBS=$LIBS
12138LIBS="-lXext $LIBS"
12139cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12140/* confdefs.h. */
12141_ACEOF
12142cat confdefs.h >>conftest.$ac_ext
12143cat >>conftest.$ac_ext <<_ACEOF
12144/* end confdefs.h. */
98418dba 12145
ca81d7a0
JD
12146/* Override any GCC internal prototype to avoid an error.
12147 Use char because int might match the return type of a GCC
12148 builtin and then its argument prototype would still apply. */
98418dba
CW
12149#ifdef __cplusplus
12150extern "C"
12151#endif
98418dba 12152char XShapeQueryExtension ();
98418dba
CW
12153int
12154main ()
12155{
ca81d7a0 12156return XShapeQueryExtension ();
98418dba
CW
12157 ;
12158 return 0;
12159}
12160_ACEOF
12161rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12162if { (ac_try="$ac_link"
12163case "(($ac_try" in
12164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12165 *) ac_try_echo=$ac_try;;
12166esac
12167eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12168 (eval "$ac_link") 2>conftest.er1
98418dba 12169 ac_status=$?
edfaf76d
LK
12170 grep -v '^ *+' conftest.er1 >conftest.err
12171 rm -f conftest.er1
12172 cat conftest.err >&5
c0d27fcc 12173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12174 (exit $ac_status); } && {
12175 test -z "$ac_c_werror_flag" ||
12176 test ! -s conftest.err
12177 } && test -s conftest$ac_exeext &&
12178 $as_test_x conftest$ac_exeext; then
98418dba
CW
12179 ac_cv_lib_Xext_XShapeQueryExtension=yes
12180else
12181 echo "$as_me: failed program was:" >&5
19650fd6
AS
12182sed 's/^/| /' conftest.$ac_ext >&5
12183
ca81d7a0 12184 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12185fi
ca81d7a0 12186
f053c89f 12187rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12188 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12189LIBS=$ac_check_lib_save_LIBS
12190fi
ca81d7a0
JD
12191{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12192echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12193if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12194 cat >>confdefs.h <<_ACEOF
98418dba 12195#define HAVE_LIBXEXT 1
c0d27fcc 12196_ACEOF
98418dba
CW
12197
12198 LIBS="-lXext $LIBS"
12199
12200fi
12201
12202 fi
12203fi
12204
12205if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ca81d7a0
JD
12206 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12207echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12208if test "${emacs_cv_motif_version_2_1+set}" = set; then
12209 echo $ECHO_N "(cached) $ECHO_C" >&6
12210else
12211 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12212/* confdefs.h. */
12213_ACEOF
12214cat confdefs.h >>conftest.$ac_ext
12215cat >>conftest.$ac_ext <<_ACEOF
12216/* end confdefs.h. */
98418dba 12217#include <Xm/Xm.h>
98418dba
CW
12218int
12219main ()
12220{
12221#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12222int x = 5;
12223#else
12224Motif version prior to 2.1.
12225#endif
12226 ;
12227 return 0;
12228}
12229_ACEOF
12230rm -f conftest.$ac_objext
ca81d7a0
JD
12231if { (ac_try="$ac_compile"
12232case "(($ac_try" in
12233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12234 *) ac_try_echo=$ac_try;;
12235esac
12236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12237 (eval "$ac_compile") 2>conftest.er1
98418dba 12238 ac_status=$?
edfaf76d
LK
12239 grep -v '^ *+' conftest.er1 >conftest.err
12240 rm -f conftest.er1
12241 cat conftest.err >&5
c0d27fcc 12242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12243 (exit $ac_status); } && {
12244 test -z "$ac_c_werror_flag" ||
12245 test ! -s conftest.err
12246 } && test -s conftest.$ac_objext; then
98418dba
CW
12247 emacs_cv_motif_version_2_1=yes
12248else
12249 echo "$as_me: failed program was:" >&5
19650fd6
AS
12250sed 's/^/| /' conftest.$ac_ext >&5
12251
ca81d7a0 12252 emacs_cv_motif_version_2_1=no
98418dba 12253fi
ca81d7a0
JD
12254
12255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12256fi
ca81d7a0
JD
12257{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12258echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12259 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12260 if test $emacs_cv_motif_version_2_1 = yes; then
12261 HAVE_LIBXP=no
b936fae4 12262
c0d27fcc 12263cat >>confdefs.h <<\_ACEOF
98418dba 12264#define HAVE_MOTIF_2_1 1
c0d27fcc 12265_ACEOF
98418dba 12266
ca81d7a0
JD
12267 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12268echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12269if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12270 echo $ECHO_N "(cached) $ECHO_C" >&6
12271else
12272 ac_check_lib_save_LIBS=$LIBS
12273LIBS="-lXp $LIBS"
12274cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12275/* confdefs.h. */
12276_ACEOF
12277cat confdefs.h >>conftest.$ac_ext
12278cat >>conftest.$ac_ext <<_ACEOF
12279/* end confdefs.h. */
98418dba 12280
ca81d7a0
JD
12281/* Override any GCC internal prototype to avoid an error.
12282 Use char because int might match the return type of a GCC
12283 builtin and then its argument prototype would still apply. */
98418dba
CW
12284#ifdef __cplusplus
12285extern "C"
12286#endif
98418dba 12287char XpCreateContext ();
98418dba
CW
12288int
12289main ()
12290{
ca81d7a0 12291return XpCreateContext ();
98418dba
CW
12292 ;
12293 return 0;
12294}
12295_ACEOF
12296rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12297if { (ac_try="$ac_link"
12298case "(($ac_try" in
12299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12300 *) ac_try_echo=$ac_try;;
12301esac
12302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12303 (eval "$ac_link") 2>conftest.er1
98418dba 12304 ac_status=$?
edfaf76d
LK
12305 grep -v '^ *+' conftest.er1 >conftest.err
12306 rm -f conftest.er1
12307 cat conftest.err >&5
c0d27fcc 12308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12309 (exit $ac_status); } && {
12310 test -z "$ac_c_werror_flag" ||
12311 test ! -s conftest.err
12312 } && test -s conftest$ac_exeext &&
12313 $as_test_x conftest$ac_exeext; then
98418dba
CW
12314 ac_cv_lib_Xp_XpCreateContext=yes
12315else
12316 echo "$as_me: failed program was:" >&5
19650fd6
AS
12317sed 's/^/| /' conftest.$ac_ext >&5
12318
ca81d7a0 12319 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12320fi
ca81d7a0 12321
f053c89f 12322rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12323 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12324LIBS=$ac_check_lib_save_LIBS
12325fi
ca81d7a0
JD
12326{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12327echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12328if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12329 HAVE_LIBXP=yes
12330fi
503d2be0 12331
98418dba 12332 if test ${HAVE_LIBXP} = yes; then
b936fae4 12333
c0d27fcc 12334cat >>confdefs.h <<\_ACEOF
98418dba 12335#define HAVE_LIBXP 1
c0d27fcc 12336_ACEOF
503d2be0 12337
98418dba 12338 fi
4693dbc9 12339 else
ca81d7a0
JD
12340 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12341echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12342if test "${emacs_cv_lesstif+set}" = set; then
12343 echo $ECHO_N "(cached) $ECHO_C" >&6
12344else
12345 # We put this in CFLAGS temporarily to precede other -I options
12346 # that might be in CFLAGS temporarily.
12347 # We put this in CPPFLAGS where it precedes the other -I options.
12348 OLD_CPPFLAGS=$CPPFLAGS
12349 OLD_CFLAGS=$CFLAGS
12350 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12351 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12352 cat >conftest.$ac_ext <<_ACEOF
12353/* confdefs.h. */
12354_ACEOF
12355cat confdefs.h >>conftest.$ac_ext
12356cat >>conftest.$ac_ext <<_ACEOF
12357/* end confdefs.h. */
12358#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12359int
12360main ()
12361{
12362int x = 5;
12363 ;
12364 return 0;
12365}
12366_ACEOF
12367rm -f conftest.$ac_objext
ca81d7a0
JD
12368if { (ac_try="$ac_compile"
12369case "(($ac_try" in
12370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12371 *) ac_try_echo=$ac_try;;
12372esac
12373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12374 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12375 ac_status=$?
edfaf76d
LK
12376 grep -v '^ *+' conftest.er1 >conftest.err
12377 rm -f conftest.er1
12378 cat conftest.err >&5
4693dbc9 12379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12380 (exit $ac_status); } && {
12381 test -z "$ac_c_werror_flag" ||
12382 test ! -s conftest.err
12383 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12384 emacs_cv_lesstif=yes
12385else
12386 echo "$as_me: failed program was:" >&5
12387sed 's/^/| /' conftest.$ac_ext >&5
12388
ca81d7a0 12389 emacs_cv_lesstif=no
4693dbc9 12390fi
ca81d7a0
JD
12391
12392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12393fi
ca81d7a0
JD
12394{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12395echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12396 if test $emacs_cv_lesstif = yes; then
12397 # Make sure this -I option remains in CPPFLAGS after it is set
12398 # back to REAL_CPPFLAGS.
12399 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12400 # have those other -I options anyway. Ultimately, having this
12401 # directory ultimately in CPPFLAGS will be enough.
12402 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12403 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12404 else
12405 CFLAGS=$OLD_CFLAGS
12406 CPPFLAGS=$OLD_CPPFLAGS
12407 fi
98418dba
CW
12408 fi
12409fi
12410
c0d27fcc
MR
12411
12412
98418dba
CW
12413USE_TOOLKIT_SCROLL_BARS=no
12414if test "${with_toolkit_scroll_bars}" != "no"; then
12415 if test "${USE_X_TOOLKIT}" != "none"; then
12416 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12417 cat >>confdefs.h <<\_ACEOF
98418dba 12418#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12419_ACEOF
98418dba
CW
12420
12421 HAVE_XAW3D=no
12422 USE_TOOLKIT_SCROLL_BARS=yes
12423 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12424 cat >>confdefs.h <<\_ACEOF
98418dba 12425#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12426_ACEOF
98418dba
CW
12427
12428 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12429 fi
488dd4c4
JD
12430 elif test "${HAVE_GTK}" = "yes"; then
12431 cat >>confdefs.h <<\_ACEOF
12432#define USE_TOOLKIT_SCROLL_BARS 1
edfda783
AR
12433_ACEOF
12434
12435 USE_TOOLKIT_SCROLL_BARS=yes
12436 elif test "${HAVE_NS}" = "yes"; then
12437 cat >>confdefs.h <<\_ACEOF
12438#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12439_ACEOF
12440
12441 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12442 fi
12443fi
12444
abd39b57 12445cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12446/* confdefs.h. */
12447_ACEOF
12448cat confdefs.h >>conftest.$ac_ext
12449cat >>conftest.$ac_ext <<_ACEOF
12450/* end confdefs.h. */
12451
12452 #include <X11/Xlib.h>
12453 #include <X11/Xresource.h>
12454int
12455main ()
12456{
12457XIMProc callback;
12458 ;
12459 return 0;
12460}
12461_ACEOF
12462rm -f conftest.$ac_objext
ca81d7a0
JD
12463if { (ac_try="$ac_compile"
12464case "(($ac_try" in
12465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12466 *) ac_try_echo=$ac_try;;
12467esac
12468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12469 (eval "$ac_compile") 2>conftest.er1
abd39b57 12470 ac_status=$?
edfaf76d
LK
12471 grep -v '^ *+' conftest.er1 >conftest.err
12472 rm -f conftest.er1
12473 cat conftest.err >&5
abd39b57 12474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12475 (exit $ac_status); } && {
12476 test -z "$ac_c_werror_flag" ||
12477 test ! -s conftest.err
12478 } && test -s conftest.$ac_objext; then
abd39b57
AC
12479 HAVE_XIM=yes
12480
12481cat >>confdefs.h <<\_ACEOF
12482#define HAVE_XIM 1
12483_ACEOF
12484
12485else
12486 echo "$as_me: failed program was:" >&5
12487sed 's/^/| /' conftest.$ac_ext >&5
12488
ca81d7a0 12489 HAVE_XIM=no
abd39b57 12490fi
ca81d7a0
JD
12491
12492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12493
c0d27fcc 12494
98418dba 12495if test "${with_xim}" != "no"; then
b936fae4 12496
c0d27fcc 12497cat >>confdefs.h <<\_ACEOF
98418dba 12498#define USE_XIM 1
c0d27fcc 12499_ACEOF
98418dba 12500
793fa0d7 12501fi
abd39b57
AC
12502
12503
12504if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12505 late_CFLAGS=$CFLAGS
12506 if test "$GCC" = yes; then
12507 CFLAGS="$CFLAGS --pedantic-errors"
12508 fi
cffcede7 12509 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12510/* confdefs.h. */
12511_ACEOF
12512cat confdefs.h >>conftest.$ac_ext
12513cat >>conftest.$ac_ext <<_ACEOF
12514/* end confdefs.h. */
cffcede7
JD
12515
12516#include <X11/Xlib.h>
12517#include <X11/Xresource.h>
12518int
12519main ()
12520{
12521Display *display;
12522XrmDatabase db;
12523char *res_name;
12524char *res_class;
12525XIMProc callback;
12526XPointer *client_data;
849d80cf
DL
12527#ifndef __GNUC__
12528/* If we're not using GCC, it's probably not XFree86, and this is
12529 probably right, but we can't use something like --pedantic-errors. */
12530extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12531 char*, XIMProc, XPointer*);
12532#endif
cffcede7
JD
12533(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12534 client_data);
12535 ;
12536 return 0;
12537}
12538_ACEOF
12539rm -f conftest.$ac_objext
ca81d7a0
JD
12540if { (ac_try="$ac_compile"
12541case "(($ac_try" in
12542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12543 *) ac_try_echo=$ac_try;;
12544esac
12545eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12546 (eval "$ac_compile") 2>conftest.er1
cffcede7 12547 ac_status=$?
edfaf76d
LK
12548 grep -v '^ *+' conftest.er1 >conftest.err
12549 rm -f conftest.er1
12550 cat conftest.err >&5
cffcede7 12551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12552 (exit $ac_status); } && {
12553 test -z "$ac_c_werror_flag" ||
12554 test ! -s conftest.err
12555 } && test -s conftest.$ac_objext; then
cffcede7
JD
12556 emacs_cv_arg6_star=yes
12557else
12558 echo "$as_me: failed program was:" >&5
19650fd6
AS
12559sed 's/^/| /' conftest.$ac_ext >&5
12560
ca81d7a0 12561
cffcede7 12562fi
ca81d7a0
JD
12563
12564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12565
12566 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12567 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12568#define XRegisterIMInstantiateCallback_arg6 XPointer*
12569_ACEOF
12570
12571 else
f57bd967 12572 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12573#define XRegisterIMInstantiateCallback_arg6 XPointer
12574_ACEOF
12575
12576 fi
849d80cf 12577 CFLAGS=$late_CFLAGS
45a4b03e
KH
12578fi
12579
77dfeef5 12580### Start of font-backend section.
45a4b03e 12581
44e5501c
GM
12582 succeeded=no
12583
12584 # Extract the first word of "pkg-config", so it can be a program name with args.
12585set dummy pkg-config; ac_word=$2
12586{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12587echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
12588if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12589 echo $ECHO_N "(cached) $ECHO_C" >&6
12590else
12591 case $PKG_CONFIG in
12592 [\\/]* | ?:[\\/]*)
12593 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12594 ;;
12595 *)
12596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12597for as_dir in $PATH
12598do
12599 IFS=$as_save_IFS
12600 test -z "$as_dir" && as_dir=.
12601 for ac_exec_ext in '' $ac_executable_extensions; do
12602 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12603 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12604 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12605 break 2
12606 fi
12607done
12608done
12609IFS=$as_save_IFS
12610
12611 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12612 ;;
12613esac
12614fi
12615PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12616if test -n "$PKG_CONFIG"; then
12617 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12618echo "${ECHO_T}$PKG_CONFIG" >&6; }
12619else
12620 { echo "$as_me:$LINENO: result: no" >&5
12621echo "${ECHO_T}no" >&6; }
12622fi
12623
12624
12625
12626 if test "$PKG_CONFIG" = "no" ; then
12627 HAVE_FC=no
12628 else
12629 PKG_CONFIG_MIN_VERSION=0.9.0
12630 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12631 { echo "$as_me:$LINENO: checking for fontconfig >= 2.2.0" >&5
12632echo $ECHO_N "checking for fontconfig >= 2.2.0... $ECHO_C" >&6; }
12633
12634 if $PKG_CONFIG --exists "fontconfig >= 2.2.0" 2>&5; then
12635 { echo "$as_me:$LINENO: result: yes" >&5
12636echo "${ECHO_T}yes" >&6; }
12637 succeeded=yes
12638
12639 { echo "$as_me:$LINENO: checking FONTCONFIG_CFLAGS" >&5
12640echo $ECHO_N "checking FONTCONFIG_CFLAGS... $ECHO_C" >&6; }
12641 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
12642 { echo "$as_me:$LINENO: result: $FONTCONFIG_CFLAGS" >&5
12643echo "${ECHO_T}$FONTCONFIG_CFLAGS" >&6; }
12644
12645 { echo "$as_me:$LINENO: checking FONTCONFIG_LIBS" >&5
12646echo $ECHO_N "checking FONTCONFIG_LIBS... $ECHO_C" >&6; }
12647 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig >= 2.2.0"|sed -e 's,///*,/,g'`
12648 { echo "$as_me:$LINENO: result: $FONTCONFIG_LIBS" >&5
12649echo "${ECHO_T}$FONTCONFIG_LIBS" >&6; }
12650 else
12651 { echo "$as_me:$LINENO: result: no" >&5
12652echo "${ECHO_T}no" >&6; }
12653 FONTCONFIG_CFLAGS=""
12654 FONTCONFIG_LIBS=""
12655 ## If we have a custom action on failure, don't print errors, but
12656 ## do set a variable so people can do so.
12657 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig >= 2.2.0"`
12658
12659 fi
12660
12661
12662
12663 else
12664 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12665 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12666 fi
12667 fi
12668
12669 if test $succeeded = yes; then
12670 HAVE_FC=yes
12671 else
12672 HAVE_FC=no
12673 fi
12674
12675test "${HAVE_FC}" = "no" && with_freetype=no
12676
b8bdd8c9
KH
12677## Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'.
12678HAVE_XFT=maybe
392b3c3a 12679if test "x${with_freetype}" = "xno" || test "x${with_x}" = "xno"; then
b8bdd8c9
KH
12680 with_xft="no";
12681fi
12682if test "x${with_xft}" != "xno"; then
45a4b03e 12683
45a4b03e
KH
12684
12685 succeeded=no
12686
d235ca2f 12687 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12688set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12689{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12690echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12691if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12692 echo $ECHO_N "(cached) $ECHO_C" >&6
12693else
12694 case $PKG_CONFIG in
12695 [\\/]* | ?:[\\/]*)
12696 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12697 ;;
12698 *)
12699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12700for as_dir in $PATH
12701do
12702 IFS=$as_save_IFS
12703 test -z "$as_dir" && as_dir=.
12704 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12705 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12706 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12707 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12708 break 2
12709 fi
12710done
12711done
c24fa7dc 12712IFS=$as_save_IFS
45a4b03e
KH
12713
12714 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12715 ;;
12716esac
12717fi
12718PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12719if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
12720 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12721echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12722else
c24fa7dc
MB
12723 { echo "$as_me:$LINENO: result: no" >&5
12724echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12725fi
12726
c24fa7dc 12727
45a4b03e
KH
12728
12729 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12730 HAVE_XFT=no
45a4b03e
KH
12731 else
12732 PKG_CONFIG_MIN_VERSION=0.9.0
12733 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
12734 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
12735echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
45a4b03e 12736
c24fa7dc
MB
12737 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
12738 { echo "$as_me:$LINENO: result: yes" >&5
12739echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12740 succeeded=yes
12741
c24fa7dc
MB
12742 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
12743echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
18c36727 12744 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12745 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
12746echo "${ECHO_T}$XFT_CFLAGS" >&6; }
45a4b03e 12747
c24fa7dc
MB
12748 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
12749echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
18c36727 12750 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12751 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
12752echo "${ECHO_T}$XFT_LIBS" >&6; }
45a4b03e 12753 else
c24fa7dc
MB
12754 { echo "$as_me:$LINENO: result: no" >&5
12755echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12756 XFT_CFLAGS=""
12757 XFT_LIBS=""
12758 ## If we have a custom action on failure, don't print errors, but
12759 ## do set a variable so people can do so.
12760 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12761
12762 fi
12763
12764
12765
12766 else
12767 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12768 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12769 fi
12770 fi
12771
12772 if test $succeeded = yes; then
12773 :
12774 else
12775 HAVE_XFT=no
12776 fi
12777
b8bdd8c9
KH
12778 if test "$HAVE_XFT" != no; then
12779 OLD_CPPFLAGS="$CPPFLAGS"
12780 OLD_CFLAGS="$CFLAGS"
12781 OLD_LIBS="$LIBS"
12782 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12783 CFLAGS="$CFLAGS $XFT_CFLAGS"
12784 LIBS="$XFT_LIBS $LIBS"
12785 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
c24fa7dc
MB
12786 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12787echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12788if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12789 echo $ECHO_N "(cached) $ECHO_C" >&6
12790fi
c24fa7dc
MB
12791{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12792echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12793else
12794 # Is the header compilable?
c24fa7dc
MB
12795{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
12796echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
45a4b03e
KH
12797cat >conftest.$ac_ext <<_ACEOF
12798/* confdefs.h. */
12799_ACEOF
12800cat confdefs.h >>conftest.$ac_ext
12801cat >>conftest.$ac_ext <<_ACEOF
12802/* end confdefs.h. */
12803$ac_includes_default
12804#include <X11/Xft/Xft.h>
12805_ACEOF
12806rm -f conftest.$ac_objext
c24fa7dc
MB
12807if { (ac_try="$ac_compile"
12808case "(($ac_try" in
12809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12810 *) ac_try_echo=$ac_try;;
12811esac
12812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12813 (eval "$ac_compile") 2>conftest.er1
45a4b03e
KH
12814 ac_status=$?
12815 grep -v '^ *+' conftest.er1 >conftest.err
12816 rm -f conftest.er1
12817 cat conftest.err >&5
12818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12819 (exit $ac_status); } && {
12820 test -z "$ac_c_werror_flag" ||
12821 test ! -s conftest.err
12822 } && test -s conftest.$ac_objext; then
45a4b03e
KH
12823 ac_header_compiler=yes
12824else
12825 echo "$as_me: failed program was:" >&5
12826sed 's/^/| /' conftest.$ac_ext >&5
12827
c24fa7dc 12828 ac_header_compiler=no
45a4b03e 12829fi
c24fa7dc
MB
12830
12831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12832{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12833echo "${ECHO_T}$ac_header_compiler" >&6; }
45a4b03e
KH
12834
12835# Is the header present?
c24fa7dc
MB
12836{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
12837echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
45a4b03e
KH
12838cat >conftest.$ac_ext <<_ACEOF
12839/* confdefs.h. */
12840_ACEOF
12841cat confdefs.h >>conftest.$ac_ext
12842cat >>conftest.$ac_ext <<_ACEOF
12843/* end confdefs.h. */
12844#include <X11/Xft/Xft.h>
12845_ACEOF
c24fa7dc
MB
12846if { (ac_try="$ac_cpp conftest.$ac_ext"
12847case "(($ac_try" in
12848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12849 *) ac_try_echo=$ac_try;;
12850esac
12851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12852 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
45a4b03e
KH
12853 ac_status=$?
12854 grep -v '^ *+' conftest.er1 >conftest.err
12855 rm -f conftest.er1
12856 cat conftest.err >&5
12857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12858 (exit $ac_status); } >/dev/null && {
12859 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12860 test ! -s conftest.err
12861 }; then
45a4b03e
KH
12862 ac_header_preproc=yes
12863else
12864 echo "$as_me: failed program was:" >&5
12865sed 's/^/| /' conftest.$ac_ext >&5
12866
12867 ac_header_preproc=no
12868fi
c24fa7dc 12869
45a4b03e 12870rm -f conftest.err conftest.$ac_ext
c24fa7dc
MB
12871{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12872echo "${ECHO_T}$ac_header_preproc" >&6; }
45a4b03e
KH
12873
12874# So? What about this header?
12875case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12876 yes:no: )
12877 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
12878echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12879 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
12880echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
12881 ac_header_preproc=yes
12882 ;;
12883 no:yes:* )
12884 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
12885echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
12886 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
12887echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
12888 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
12889echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
12890 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
12891echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
12892 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
12893echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
12894 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
12895echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
c24fa7dc 12896
45a4b03e
KH
12897 ;;
12898esac
c24fa7dc
MB
12899{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12900echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12901if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12902 echo $ECHO_N "(cached) $ECHO_C" >&6
12903else
12904 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
12905fi
c24fa7dc
MB
12906{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12907echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12908
12909fi
12910if test $ac_cv_header_X11_Xft_Xft_h = yes; then
c24fa7dc
MB
12911 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
12912echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
45a4b03e
KH
12913if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
12914 echo $ECHO_N "(cached) $ECHO_C" >&6
12915else
12916 ac_check_lib_save_LIBS=$LIBS
12917LIBS="-lXft $XFT_LIBS $LIBS"
12918cat >conftest.$ac_ext <<_ACEOF
12919/* confdefs.h. */
12920_ACEOF
12921cat confdefs.h >>conftest.$ac_ext
12922cat >>conftest.$ac_ext <<_ACEOF
12923/* end confdefs.h. */
12924
c24fa7dc
MB
12925/* Override any GCC internal prototype to avoid an error.
12926 Use char because int might match the return type of a GCC
12927 builtin and then its argument prototype would still apply. */
45a4b03e
KH
12928#ifdef __cplusplus
12929extern "C"
12930#endif
45a4b03e
KH
12931char XftFontOpen ();
12932int
12933main ()
12934{
c24fa7dc 12935return XftFontOpen ();
45a4b03e
KH
12936 ;
12937 return 0;
12938}
12939_ACEOF
12940rm -f conftest.$ac_objext conftest$ac_exeext
c24fa7dc
MB
12941if { (ac_try="$ac_link"
12942case "(($ac_try" in
12943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12944 *) ac_try_echo=$ac_try;;
12945esac
12946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12947 (eval "$ac_link") 2>conftest.er1
45a4b03e
KH
12948 ac_status=$?
12949 grep -v '^ *+' conftest.er1 >conftest.err
12950 rm -f conftest.er1
12951 cat conftest.err >&5
12952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12953 (exit $ac_status); } && {
12954 test -z "$ac_c_werror_flag" ||
12955 test ! -s conftest.err
12956 } && test -s conftest$ac_exeext &&
12957 $as_test_x conftest$ac_exeext; then
45a4b03e
KH
12958 ac_cv_lib_Xft_XftFontOpen=yes
12959else
12960 echo "$as_me: failed program was:" >&5
12961sed 's/^/| /' conftest.$ac_ext >&5
12962
c24fa7dc 12963 ac_cv_lib_Xft_XftFontOpen=no
45a4b03e 12964fi
c24fa7dc
MB
12965
12966rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
45a4b03e
KH
12967 conftest$ac_exeext conftest.$ac_ext
12968LIBS=$ac_check_lib_save_LIBS
12969fi
c24fa7dc
MB
12970{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12971echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
45a4b03e
KH
12972if test $ac_cv_lib_Xft_XftFontOpen = yes; then
12973 HAVE_XFT=yes
12974fi
12975
12976fi
12977
12978
12979
b8bdd8c9 12980 if test "${HAVE_XFT}" = "yes"; then
45a4b03e
KH
12981
12982cat >>confdefs.h <<\_ACEOF
12983#define HAVE_XFT 1
12984_ACEOF
12985
12986
b8bdd8c9
KH
12987 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12988 else
12989 CPPFLAGS="$OLD_CPPFLAGS"
12990 CFLAGS="$OLD_CFLAGS"
12991 LIBS="$OLD_LIBS"
12992 fi # "${HAVE_XFT}" = "yes"
12993 fi # "$HAVE_XFT" != no
12994fi # "x${with_xft}" != "xno"
2ee27f27 12995
b8bdd8c9
KH
12996if test "$HAVE_XFT" != "yes"; then
12997 HAVE_XFT=no
12998fi
45a4b03e 12999
b8bdd8c9
KH
13000
13001HAVE_FREETYPE=no
13002### Use -lfreetype if available, unless `--with-freetype=no'.
13003if test "${HAVE_XFT}" = "yes"; then
13004 HAVE_FREETYPE=yes
44e5501c
GM
13005 FONTCONFIG_CFLAGS=
13006 FONTCONFIG_LIBS=
392b3c3a 13007elif test "x${with_freetype}" != "xno" && test "x${with_x}" != "xno"; then
45a4b03e 13008
d235ca2f 13009
45a4b03e
KH
13010 succeeded=no
13011
d235ca2f 13012 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 13013set dummy pkg-config; ac_word=$2
c24fa7dc
MB
13014{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13015echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
13016if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13017 echo $ECHO_N "(cached) $ECHO_C" >&6
13018else
13019 case $PKG_CONFIG in
13020 [\\/]* | ?:[\\/]*)
13021 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13022 ;;
13023 *)
13024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13025for as_dir in $PATH
13026do
13027 IFS=$as_save_IFS
13028 test -z "$as_dir" && as_dir=.
13029 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13030 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
13031 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13032 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13033 break 2
13034 fi
13035done
13036done
c24fa7dc 13037IFS=$as_save_IFS
45a4b03e
KH
13038
13039 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13040 ;;
13041esac
13042fi
13043PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 13044if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
13045 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13046echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13047else
c24fa7dc
MB
13048 { echo "$as_me:$LINENO: result: no" >&5
13049echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13050fi
13051
c24fa7dc 13052
45a4b03e
KH
13053
13054 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 13055 HAVE_FREETYPE=no
45a4b03e
KH
13056 else
13057 PKG_CONFIG_MIN_VERSION=0.9.0
13058 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
13059 { echo "$as_me:$LINENO: checking for freetype2" >&5
13060echo $ECHO_N "checking for freetype2... $ECHO_C" >&6; }
45a4b03e 13061
c24fa7dc
MB
13062 if $PKG_CONFIG --exists "freetype2" 2>&5; then
13063 { echo "$as_me:$LINENO: result: yes" >&5
13064echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
13065 succeeded=yes
13066
c24fa7dc
MB
13067 { echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5
13068echo $ECHO_N "checking FREETYPE_CFLAGS... $ECHO_C" >&6; }
991a7602 13069 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13070 { echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5
13071echo "${ECHO_T}$FREETYPE_CFLAGS" >&6; }
45a4b03e 13072
c24fa7dc
MB
13073 { echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5
13074echo $ECHO_N "checking FREETYPE_LIBS... $ECHO_C" >&6; }
991a7602 13075 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13076 { echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5
13077echo "${ECHO_T}$FREETYPE_LIBS" >&6; }
45a4b03e 13078 else
c24fa7dc
MB
13079 { echo "$as_me:$LINENO: result: no" >&5
13080echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13081 FREETYPE_CFLAGS=""
13082 FREETYPE_LIBS=""
13083 ## If we have a custom action on failure, don't print errors, but
13084 ## do set a variable so people can do so.
13085 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
13086
13087 fi
13088
13089
13090
13091 else
13092 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13093 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13094 fi
13095 fi
13096
13097 if test $succeeded = yes; then
13098 HAVE_FREETYPE=yes
13099 else
13100 HAVE_FREETYPE=no
13101 fi
13102
b8bdd8c9 13103fi
e70b2110 13104
b8bdd8c9
KH
13105HAVE_LIBOTF=no
13106if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
13107
13108cat >>confdefs.h <<\_ACEOF
13109#define HAVE_FREETYPE 1
13110_ACEOF
13111
b8bdd8c9 13112 if test "${with_libotf}" != "no"; then
e70b2110
KH
13113
13114 succeeded=no
13115
d235ca2f 13116 # Extract the first word of "pkg-config", so it can be a program name with args.
e70b2110 13117set dummy pkg-config; ac_word=$2
c24fa7dc
MB
13118{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13119echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e70b2110 13120if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
45a4b03e
KH
13121 echo $ECHO_N "(cached) $ECHO_C" >&6
13122else
e70b2110
KH
13123 case $PKG_CONFIG in
13124 [\\/]* | ?:[\\/]*)
13125 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13126 ;;
13127 *)
13128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45a4b03e
KH
13129for as_dir in $PATH
13130do
13131 IFS=$as_save_IFS
13132 test -z "$as_dir" && as_dir=.
13133 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13134 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e70b2110 13135 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
45a4b03e
KH
13136 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13137 break 2
13138 fi
13139done
13140done
c24fa7dc 13141IFS=$as_save_IFS
45a4b03e 13142
e70b2110
KH
13143 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13144 ;;
13145esac
45a4b03e 13146fi
e70b2110
KH
13147PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13148if test -n "$PKG_CONFIG"; then
13149 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13150echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13151else
c24fa7dc
MB
13152 { echo "$as_me:$LINENO: result: no" >&5
13153echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13154fi
13155
c24fa7dc 13156
45a4b03e 13157
e70b2110 13158 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13159 HAVE_LIBOTF=no
e70b2110
KH
13160 else
13161 PKG_CONFIG_MIN_VERSION=0.9.0
13162 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13163 { echo "$as_me:$LINENO: checking for libotf" >&5
13164echo $ECHO_N "checking for libotf... $ECHO_C" >&6; }
6ed29d7b 13165
e70b2110
KH
13166 if $PKG_CONFIG --exists "libotf" 2>&5; then
13167 { echo "$as_me:$LINENO: result: yes" >&5
13168echo "${ECHO_T}yes" >&6; }
13169 succeeded=yes
6ed29d7b 13170
e70b2110
KH
13171 { echo "$as_me:$LINENO: checking LIBOTF_CFLAGS" >&5
13172echo $ECHO_N "checking LIBOTF_CFLAGS... $ECHO_C" >&6; }
13173 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
13174 { echo "$as_me:$LINENO: result: $LIBOTF_CFLAGS" >&5
13175echo "${ECHO_T}$LIBOTF_CFLAGS" >&6; }
13176
13177 { echo "$as_me:$LINENO: checking LIBOTF_LIBS" >&5
13178echo $ECHO_N "checking LIBOTF_LIBS... $ECHO_C" >&6; }
13179 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
13180 { echo "$as_me:$LINENO: result: $LIBOTF_LIBS" >&5
13181echo "${ECHO_T}$LIBOTF_LIBS" >&6; }
13182 else
13183 { echo "$as_me:$LINENO: result: no" >&5
13184echo "${ECHO_T}no" >&6; }
13185 LIBOTF_CFLAGS=""
13186 LIBOTF_LIBS=""
13187 ## If we have a custom action on failure, don't print errors, but
13188 ## do set a variable so people can do so.
13189 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
6ed29d7b 13190
e70b2110 13191 fi
6ed29d7b 13192
6ed29d7b 13193
6ed29d7b 13194
e70b2110
KH
13195 else
13196 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13197 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13198 fi
13199 fi
13200
13201 if test $succeeded = yes; then
435f8bc5 13202 HAVE_LIBOTF=yes
e70b2110 13203 else
435f8bc5 13204 HAVE_LIBOTF=no
e70b2110
KH
13205 fi
13206
b8bdd8c9 13207 if test "$HAVE_LIBOTF" = "yes"; then
6ed29d7b 13208
45a4b03e
KH
13209cat >>confdefs.h <<\_ACEOF
13210#define HAVE_LIBOTF 1
13211_ACEOF
13212
8bff6137
GM
13213 { echo "$as_me:$LINENO: checking for OTF_get_variation_glyphs in -lotf" >&5
13214echo $ECHO_N "checking for OTF_get_variation_glyphs in -lotf... $ECHO_C" >&6; }
13215if test "${ac_cv_lib_otf_OTF_get_variation_glyphs+set}" = set; then
13216 echo $ECHO_N "(cached) $ECHO_C" >&6
13217else
13218 ac_check_lib_save_LIBS=$LIBS
13219LIBS="-lotf $LIBS"
13220cat >conftest.$ac_ext <<_ACEOF
13221/* confdefs.h. */
13222_ACEOF
13223cat confdefs.h >>conftest.$ac_ext
13224cat >>conftest.$ac_ext <<_ACEOF
13225/* end confdefs.h. */
13226
13227/* Override any GCC internal prototype to avoid an error.
13228 Use char because int might match the return type of a GCC
13229 builtin and then its argument prototype would still apply. */
13230#ifdef __cplusplus
13231extern "C"
13232#endif
13233char OTF_get_variation_glyphs ();
13234int
13235main ()
13236{
13237return OTF_get_variation_glyphs ();
13238 ;
13239 return 0;
13240}
13241_ACEOF
13242rm -f conftest.$ac_objext conftest$ac_exeext
13243if { (ac_try="$ac_link"
13244case "(($ac_try" in
13245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13246 *) ac_try_echo=$ac_try;;
13247esac
13248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13249 (eval "$ac_link") 2>conftest.er1
13250 ac_status=$?
13251 grep -v '^ *+' conftest.er1 >conftest.err
13252 rm -f conftest.er1
13253 cat conftest.err >&5
13254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13255 (exit $ac_status); } && {
13256 test -z "$ac_c_werror_flag" ||
13257 test ! -s conftest.err
13258 } && test -s conftest$ac_exeext &&
13259 $as_test_x conftest$ac_exeext; then
13260 ac_cv_lib_otf_OTF_get_variation_glyphs=yes
13261else
13262 echo "$as_me: failed program was:" >&5
13263sed 's/^/| /' conftest.$ac_ext >&5
13264
13265 ac_cv_lib_otf_OTF_get_variation_glyphs=no
13266fi
13267
13268rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13269 conftest$ac_exeext conftest.$ac_ext
13270LIBS=$ac_check_lib_save_LIBS
13271fi
13272{ echo "$as_me:$LINENO: result: $ac_cv_lib_otf_OTF_get_variation_glyphs" >&5
13273echo "${ECHO_T}$ac_cv_lib_otf_OTF_get_variation_glyphs" >&6; }
13274if test $ac_cv_lib_otf_OTF_get_variation_glyphs = yes; then
13275 HAVE_OTF_GET_VARIATION_GLYPHS=yes
13276else
13277 HAVE_OTF_GET_VARIATION_GLYPHS=no
13278fi
13279
13280 if test "${HAVE_OTF_GET_VARIATION_GLYPHS}" = "yes"; then
13281
13282cat >>confdefs.h <<\_ACEOF
13283#define HAVE_OTF_GET_VARIATION_GLYPHS 1
13284_ACEOF
13285
13286 fi
6ed29d7b 13287 fi
45a4b03e 13288 fi
b8bdd8c9 13289fi
45a4b03e 13290
b8bdd8c9 13291HAVE_M17N_FLT=no
6b0262c1
AS
13292if test "${HAVE_LIBOTF}" = yes; then
13293 if test "${with_m17n_flt}" != "no"; then
7f0942ba
KH
13294
13295 succeeded=no
13296
d235ca2f 13297 # Extract the first word of "pkg-config", so it can be a program name with args.
7f0942ba
KH
13298set dummy pkg-config; ac_word=$2
13299{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13300echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
13301if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13302 echo $ECHO_N "(cached) $ECHO_C" >&6
13303else
13304 case $PKG_CONFIG in
13305 [\\/]* | ?:[\\/]*)
13306 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13307 ;;
13308 *)
13309 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13310for as_dir in $PATH
13311do
13312 IFS=$as_save_IFS
13313 test -z "$as_dir" && as_dir=.
13314 for ac_exec_ext in '' $ac_executable_extensions; do
13315 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13316 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13317 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13318 break 2
13319 fi
13320done
13321done
13322IFS=$as_save_IFS
13323
13324 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13325 ;;
13326esac
13327fi
13328PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13329if test -n "$PKG_CONFIG"; then
13330 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13331echo "${ECHO_T}$PKG_CONFIG" >&6; }
13332else
13333 { echo "$as_me:$LINENO: result: no" >&5
13334echo "${ECHO_T}no" >&6; }
13335fi
13336
13337
7f0942ba
KH
13338
13339 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13340 HAVE_M17N_FLT=no
7f0942ba
KH
13341 else
13342 PKG_CONFIG_MIN_VERSION=0.9.0
13343 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13344 { echo "$as_me:$LINENO: checking for m17n-flt" >&5
13345echo $ECHO_N "checking for m17n-flt... $ECHO_C" >&6; }
13346
13347 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
13348 { echo "$as_me:$LINENO: result: yes" >&5
13349echo "${ECHO_T}yes" >&6; }
13350 succeeded=yes
13351
13352 { echo "$as_me:$LINENO: checking M17N_FLT_CFLAGS" >&5
13353echo $ECHO_N "checking M17N_FLT_CFLAGS... $ECHO_C" >&6; }
13354 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
13355 { echo "$as_me:$LINENO: result: $M17N_FLT_CFLAGS" >&5
13356echo "${ECHO_T}$M17N_FLT_CFLAGS" >&6; }
13357
13358 { echo "$as_me:$LINENO: checking M17N_FLT_LIBS" >&5
13359echo $ECHO_N "checking M17N_FLT_LIBS... $ECHO_C" >&6; }
13360 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
13361 { echo "$as_me:$LINENO: result: $M17N_FLT_LIBS" >&5
13362echo "${ECHO_T}$M17N_FLT_LIBS" >&6; }
13363 else
13364 { echo "$as_me:$LINENO: result: no" >&5
13365echo "${ECHO_T}no" >&6; }
13366 M17N_FLT_CFLAGS=""
13367 M17N_FLT_LIBS=""
13368 ## If we have a custom action on failure, don't print errors, but
13369 ## do set a variable so people can do so.
13370 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
13371
13372 fi
13373
13374
13375
13376 else
13377 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13378 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13379 fi
13380 fi
13381
13382 if test $succeeded = yes; then
435f8bc5 13383 HAVE_M17N_FLT=yes
7f0942ba 13384 else
435f8bc5 13385 HAVE_M17N_FLT=no
7f0942ba
KH
13386 fi
13387
6b0262c1 13388 if test "$HAVE_M17N_FLT" = "yes"; then
7f0942ba
KH
13389
13390cat >>confdefs.h <<\_ACEOF
13391#define HAVE_M17N_FLT 1
13392_ACEOF
13393
6b0262c1 13394 fi
e70b2110 13395 fi
b8bdd8c9 13396fi
e70b2110
KH
13397
13398
13399
13400
13401
13402
13403
7f0942ba
KH
13404
13405
7f0942ba 13406
77dfeef5 13407### End of font-backend section.
98418dba
CW
13408
13409### Use -lXpm if available, unless `--with-xpm=no'.
13410HAVE_XPM=no
13411if test "${HAVE_X11}" = "yes"; then
13412 if test "${with_xpm}" != "no"; then
c0d27fcc 13413 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
4c34eeee
MB
13414 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13415echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
13416if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13417 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13418fi
4c34eeee
MB
13419{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13420echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 13421else
c0d27fcc 13422 # Is the header compilable?
4c34eeee
MB
13423{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
13424echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 13425cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13426/* confdefs.h. */
13427_ACEOF
13428cat confdefs.h >>conftest.$ac_ext
13429cat >>conftest.$ac_ext <<_ACEOF
13430/* end confdefs.h. */
c0d27fcc
MR
13431$ac_includes_default
13432#include <X11/xpm.h>
13433_ACEOF
13434rm -f conftest.$ac_objext
4c34eeee
MB
13435if { (ac_try="$ac_compile"
13436case "(($ac_try" in
13437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13438 *) ac_try_echo=$ac_try;;
13439esac
13440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13441 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13442 ac_status=$?
edfaf76d
LK
13443 grep -v '^ *+' conftest.er1 >conftest.err
13444 rm -f conftest.er1
13445 cat conftest.err >&5
c0d27fcc 13446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13447 (exit $ac_status); } && {
13448 test -z "$ac_c_werror_flag" ||
13449 test ! -s conftest.err
13450 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13451 ac_header_compiler=yes
13452else
13453 echo "$as_me: failed program was:" >&5
19650fd6
AS
13454sed 's/^/| /' conftest.$ac_ext >&5
13455
4c34eeee 13456 ac_header_compiler=no
c0d27fcc 13457fi
4c34eeee
MB
13458
13459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13460{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13461echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13462
13463# Is the header present?
4c34eeee
MB
13464{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
13465echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 13466cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13467/* confdefs.h. */
13468_ACEOF
13469cat confdefs.h >>conftest.$ac_ext
13470cat >>conftest.$ac_ext <<_ACEOF
13471/* end confdefs.h. */
98418dba
CW
13472#include <X11/xpm.h>
13473_ACEOF
4c34eeee
MB
13474if { (ac_try="$ac_cpp conftest.$ac_ext"
13475case "(($ac_try" in
13476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13477 *) ac_try_echo=$ac_try;;
13478esac
13479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13480 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13481 ac_status=$?
6bae0ccf 13482 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13483 rm -f conftest.er1
13484 cat conftest.err >&5
c0d27fcc 13485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13486 (exit $ac_status); } >/dev/null && {
13487 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13488 test ! -s conftest.err
13489 }; then
c0d27fcc 13490 ac_header_preproc=yes
98418dba
CW
13491else
13492 echo "$as_me: failed program was:" >&5
19650fd6
AS
13493sed 's/^/| /' conftest.$ac_ext >&5
13494
c0d27fcc 13495 ac_header_preproc=no
98418dba 13496fi
4c34eeee 13497
98418dba 13498rm -f conftest.err conftest.$ac_ext
4c34eeee
MB
13499{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13500echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13501
13502# So? What about this header?
edfaf76d
LK
13503case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13504 yes:no: )
c0d27fcc
MR
13505 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
13506echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13507 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
13508echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
13509 ac_header_preproc=yes
13510 ;;
13511 no:yes:* )
13512 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
13513echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
13514 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
13515echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
13516 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
13517echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
13518 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
13519echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
13520 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
13521echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13522 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
13523echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
4c34eeee 13524
19650fd6 13525 ;;
c0d27fcc 13526esac
4c34eeee
MB
13527{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13528echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
13529if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13530 echo $ECHO_N "(cached) $ECHO_C" >&6
13531else
13532 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 13533fi
4c34eeee
MB
13534{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13535echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
13536
13537fi
98418dba 13538if test $ac_cv_header_X11_xpm_h = yes; then
4c34eeee
MB
13539 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
13540echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 13541if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 13542 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13543else
98418dba
CW
13544 ac_check_lib_save_LIBS=$LIBS
13545LIBS="-lXpm -lX11 $LIBS"
13546cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13547/* confdefs.h. */
13548_ACEOF
13549cat confdefs.h >>conftest.$ac_ext
13550cat >>conftest.$ac_ext <<_ACEOF
13551/* end confdefs.h. */
98418dba 13552
4c34eeee
MB
13553/* Override any GCC internal prototype to avoid an error.
13554 Use char because int might match the return type of a GCC
13555 builtin and then its argument prototype would still apply. */
503d2be0
AS
13556#ifdef __cplusplus
13557extern "C"
13558#endif
98418dba 13559char XpmReadFileToPixmap ();
503d2be0
AS
13560int
13561main ()
13562{
4c34eeee 13563return XpmReadFileToPixmap ();
503d2be0
AS
13564 ;
13565 return 0;
13566}
13567_ACEOF
13568rm -f conftest.$ac_objext conftest$ac_exeext
4c34eeee
MB
13569if { (ac_try="$ac_link"
13570case "(($ac_try" in
13571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13572 *) ac_try_echo=$ac_try;;
13573esac
13574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13575 (eval "$ac_link") 2>conftest.er1
503d2be0 13576 ac_status=$?
edfaf76d
LK
13577 grep -v '^ *+' conftest.er1 >conftest.err
13578 rm -f conftest.er1
13579 cat conftest.err >&5
c0d27fcc 13580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13581 (exit $ac_status); } && {
13582 test -z "$ac_c_werror_flag" ||
13583 test ! -s conftest.err
13584 } && test -s conftest$ac_exeext &&
13585 $as_test_x conftest$ac_exeext; then
98418dba 13586 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
13587else
13588 echo "$as_me: failed program was:" >&5
19650fd6
AS
13589sed 's/^/| /' conftest.$ac_ext >&5
13590
4c34eeee 13591 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13592fi
4c34eeee
MB
13593
13594rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13595 conftest$ac_exeext conftest.$ac_ext
98418dba 13596LIBS=$ac_check_lib_save_LIBS
503d2be0 13597fi
4c34eeee
MB
13598{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13599echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
13600if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
13601 HAVE_XPM=yes
ba4481b5
DL
13602fi
13603
98418dba
CW
13604fi
13605
c0d27fcc 13606
98418dba 13607 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13608 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13609echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13610 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13611/* confdefs.h. */
13612_ACEOF
13613cat confdefs.h >>conftest.$ac_ext
13614cat >>conftest.$ac_ext <<_ACEOF
13615/* end confdefs.h. */
98418dba
CW
13616#include "X11/xpm.h"
13617#ifndef XpmReturnAllocPixels
13618no_return_alloc_pixels
503d2be0 13619#endif
ba4481b5 13620
98418dba
CW
13621_ACEOF
13622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13623 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13624 HAVE_XPM=no
13625else
13626 HAVE_XPM=yes
13627fi
13628rm -f conftest*
ba4481b5 13629
c0d27fcc 13630
98418dba 13631 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13632 { echo "$as_me:$LINENO: result: yes" >&5
13633echo "${ECHO_T}yes" >&6; }
98418dba 13634 else
4c34eeee
MB
13635 { echo "$as_me:$LINENO: result: no" >&5
13636echo "${ECHO_T}no" >&6; }
98418dba
CW
13637 fi
13638 fi
13639 fi
13640
13641 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13642
c0d27fcc 13643cat >>confdefs.h <<\_ACEOF
98418dba 13644#define HAVE_XPM 1
c0d27fcc 13645_ACEOF
98418dba
CW
13646
13647 fi
13648fi
13649
13650### Use -ljpeg if available, unless `--with-jpeg=no'.
13651HAVE_JPEG=no
13652if test "${HAVE_X11}" = "yes"; then
13653 if test "${with_jpeg}" != "no"; then
c0d27fcc 13654 if test "${ac_cv_header_jerror_h+set}" = set; then
4c34eeee
MB
13655 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13656echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
13657if test "${ac_cv_header_jerror_h+set}" = set; then
13658 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13659fi
ca81d7a0
JD
13660{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13661echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13662else
c0d27fcc 13663 # Is the header compilable?
ca81d7a0
JD
13664{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13665echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13666cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13667/* confdefs.h. */
13668_ACEOF
13669cat confdefs.h >>conftest.$ac_ext
13670cat >>conftest.$ac_ext <<_ACEOF
13671/* end confdefs.h. */
c0d27fcc
MR
13672$ac_includes_default
13673#include <jerror.h>
13674_ACEOF
13675rm -f conftest.$ac_objext
ca81d7a0
JD
13676if { (ac_try="$ac_compile"
13677case "(($ac_try" in
13678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13679 *) ac_try_echo=$ac_try;;
13680esac
13681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13682 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13683 ac_status=$?
edfaf76d
LK
13684 grep -v '^ *+' conftest.er1 >conftest.err
13685 rm -f conftest.er1
13686 cat conftest.err >&5
c0d27fcc 13687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13688 (exit $ac_status); } && {
13689 test -z "$ac_c_werror_flag" ||
13690 test ! -s conftest.err
13691 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13692 ac_header_compiler=yes
13693else
13694 echo "$as_me: failed program was:" >&5
19650fd6
AS
13695sed 's/^/| /' conftest.$ac_ext >&5
13696
ca81d7a0 13697 ac_header_compiler=no
c0d27fcc 13698fi
ca81d7a0
JD
13699
13700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13701{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13702echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13703
13704# Is the header present?
ca81d7a0
JD
13705{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13706echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13707cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13708/* confdefs.h. */
13709_ACEOF
13710cat confdefs.h >>conftest.$ac_ext
13711cat >>conftest.$ac_ext <<_ACEOF
13712/* end confdefs.h. */
98418dba
CW
13713#include <jerror.h>
13714_ACEOF
ca81d7a0
JD
13715if { (ac_try="$ac_cpp conftest.$ac_ext"
13716case "(($ac_try" in
13717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13718 *) ac_try_echo=$ac_try;;
13719esac
13720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13721 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13722 ac_status=$?
6bae0ccf 13723 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13724 rm -f conftest.er1
13725 cat conftest.err >&5
c0d27fcc 13726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13727 (exit $ac_status); } >/dev/null && {
13728 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13729 test ! -s conftest.err
13730 }; then
c0d27fcc 13731 ac_header_preproc=yes
ba4481b5 13732else
98418dba 13733 echo "$as_me: failed program was:" >&5
19650fd6
AS
13734sed 's/^/| /' conftest.$ac_ext >&5
13735
c0d27fcc 13736 ac_header_preproc=no
98418dba 13737fi
ca81d7a0 13738
98418dba 13739rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13740{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13741echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13742
13743# So? What about this header?
edfaf76d
LK
13744case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13745 yes:no: )
c0d27fcc
MR
13746 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13747echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13748 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13749echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13750 ac_header_preproc=yes
19650fd6 13751 ;;
edfaf76d 13752 no:yes:* )
c0d27fcc
MR
13753 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13754echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13755 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13756echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13757 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13758echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13759 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13760echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13761 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13762echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13763 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13764echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13765
19650fd6 13766 ;;
c0d27fcc 13767esac
ca81d7a0
JD
13768{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13769echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13770if test "${ac_cv_header_jerror_h+set}" = set; then
13771 echo $ECHO_N "(cached) $ECHO_C" >&6
13772else
13773 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13774fi
ca81d7a0
JD
13775{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13776echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13777
13778fi
98418dba 13779if test $ac_cv_header_jerror_h = yes; then
ca81d7a0
JD
13780 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13781echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13782if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13783 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13784else
98418dba
CW
13785 ac_check_lib_save_LIBS=$LIBS
13786LIBS="-ljpeg $LIBS"
13787cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13788/* confdefs.h. */
13789_ACEOF
13790cat confdefs.h >>conftest.$ac_ext
13791cat >>conftest.$ac_ext <<_ACEOF
13792/* end confdefs.h. */
98418dba 13793
ca81d7a0
JD
13794/* Override any GCC internal prototype to avoid an error.
13795 Use char because int might match the return type of a GCC
13796 builtin and then its argument prototype would still apply. */
98418dba
CW
13797#ifdef __cplusplus
13798extern "C"
13799#endif
98418dba 13800char jpeg_destroy_compress ();
503d2be0
AS
13801int
13802main ()
13803{
ca81d7a0 13804return jpeg_destroy_compress ();
503d2be0
AS
13805 ;
13806 return 0;
13807}
13808_ACEOF
13809rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13810if { (ac_try="$ac_link"
13811case "(($ac_try" in
13812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13813 *) ac_try_echo=$ac_try;;
13814esac
13815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13816 (eval "$ac_link") 2>conftest.er1
503d2be0 13817 ac_status=$?
edfaf76d
LK
13818 grep -v '^ *+' conftest.er1 >conftest.err
13819 rm -f conftest.er1
13820 cat conftest.err >&5
c0d27fcc 13821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13822 (exit $ac_status); } && {
13823 test -z "$ac_c_werror_flag" ||
13824 test ! -s conftest.err
13825 } && test -s conftest$ac_exeext &&
13826 $as_test_x conftest$ac_exeext; then
98418dba 13827 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13828else
503d2be0 13829 echo "$as_me: failed program was:" >&5
19650fd6
AS
13830sed 's/^/| /' conftest.$ac_ext >&5
13831
ca81d7a0 13832 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13833fi
ca81d7a0 13834
f053c89f 13835rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13836 conftest$ac_exeext conftest.$ac_ext
98418dba 13837LIBS=$ac_check_lib_save_LIBS
ba4481b5 13838fi
ca81d7a0
JD
13839{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13840echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13841if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13842 HAVE_JPEG=yes
ba4481b5 13843fi
98418dba 13844
ba4481b5 13845fi
98418dba 13846
c0d27fcc 13847
ba4481b5 13848 fi
ba4481b5 13849
c0d27fcc 13850
98418dba 13851 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13852 cat >>confdefs.h <<\_ACEOF
98418dba 13853#define HAVE_JPEG 1
c0d27fcc 13854_ACEOF
98418dba
CW
13855
13856 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13857/* confdefs.h. */
13858_ACEOF
13859cat confdefs.h >>conftest.$ac_ext
13860cat >>conftest.$ac_ext <<_ACEOF
13861/* end confdefs.h. */
22044edf 13862#include <jpeglib.h>
98418dba
CW
13863 version=JPEG_LIB_VERSION
13864
13865_ACEOF
13866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13867 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13868 cat >>confdefs.h <<\_ACEOF
98418dba 13869#define HAVE_JPEG 1
c0d27fcc 13870_ACEOF
ba4481b5 13871
98418dba 13872else
c0d27fcc 13873 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13874echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13875 HAVE_JPEG=no
ba4481b5 13876fi
98418dba 13877rm -f conftest*
ba4481b5 13878
98418dba
CW
13879 fi
13880fi
503d2be0 13881
98418dba
CW
13882### Use -lpng if available, unless `--with-png=no'.
13883HAVE_PNG=no
13884if test "${HAVE_X11}" = "yes"; then
13885 if test "${with_png}" != "no"; then
f57bd967
DL
13886 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13887 # in /usr/include/libpng.
13888
13889
13890for ac_header in png.h libpng/png.h
13891do
13892as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
13893if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13894 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13895echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13896if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13897 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13898fi
ca81d7a0
JD
13899ac_res=`eval echo '${'$as_ac_Header'}'`
13900 { echo "$as_me:$LINENO: result: $ac_res" >&5
13901echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13902else
c0d27fcc 13903 # Is the header compilable?
ca81d7a0
JD
13904{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13905echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13906cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13907/* confdefs.h. */
13908_ACEOF
13909cat confdefs.h >>conftest.$ac_ext
13910cat >>conftest.$ac_ext <<_ACEOF
13911/* end confdefs.h. */
c0d27fcc 13912$ac_includes_default
f57bd967 13913#include <$ac_header>
c0d27fcc
MR
13914_ACEOF
13915rm -f conftest.$ac_objext
ca81d7a0
JD
13916if { (ac_try="$ac_compile"
13917case "(($ac_try" in
13918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13919 *) ac_try_echo=$ac_try;;
13920esac
13921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13922 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13923 ac_status=$?
edfaf76d
LK
13924 grep -v '^ *+' conftest.er1 >conftest.err
13925 rm -f conftest.er1
13926 cat conftest.err >&5
c0d27fcc 13927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13928 (exit $ac_status); } && {
13929 test -z "$ac_c_werror_flag" ||
13930 test ! -s conftest.err
13931 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13932 ac_header_compiler=yes
13933else
13934 echo "$as_me: failed program was:" >&5
19650fd6
AS
13935sed 's/^/| /' conftest.$ac_ext >&5
13936
ca81d7a0 13937 ac_header_compiler=no
c0d27fcc 13938fi
ca81d7a0
JD
13939
13940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13941{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13942echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13943
13944# Is the header present?
ca81d7a0
JD
13945{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13946echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13947cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13948/* confdefs.h. */
13949_ACEOF
13950cat confdefs.h >>conftest.$ac_ext
13951cat >>conftest.$ac_ext <<_ACEOF
13952/* end confdefs.h. */
f57bd967 13953#include <$ac_header>
503d2be0 13954_ACEOF
ca81d7a0
JD
13955if { (ac_try="$ac_cpp conftest.$ac_ext"
13956case "(($ac_try" in
13957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13958 *) ac_try_echo=$ac_try;;
13959esac
13960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13961 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13962 ac_status=$?
6bae0ccf 13963 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13964 rm -f conftest.er1
13965 cat conftest.err >&5
c0d27fcc 13966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13967 (exit $ac_status); } >/dev/null && {
13968 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13969 test ! -s conftest.err
13970 }; then
c0d27fcc 13971 ac_header_preproc=yes
503d2be0
AS
13972else
13973 echo "$as_me: failed program was:" >&5
19650fd6
AS
13974sed 's/^/| /' conftest.$ac_ext >&5
13975
c0d27fcc 13976 ac_header_preproc=no
ba4481b5 13977fi
ca81d7a0 13978
503d2be0 13979rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13980{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13981echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13982
13983# So? What about this header?
edfaf76d
LK
13984case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13985 yes:no: )
f57bd967
DL
13986 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13987echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13988 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13989echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13990 ac_header_preproc=yes
19650fd6 13991 ;;
edfaf76d 13992 no:yes:* )
f57bd967
DL
13993 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13994echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13995 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13996echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13997 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13998echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13999 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14000echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 14001 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14002echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14003 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14004echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14005
19650fd6 14006 ;;
c0d27fcc 14007esac
ca81d7a0
JD
14008{ echo "$as_me:$LINENO: checking for $ac_header" >&5
14009echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14010if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
14011 echo $ECHO_N "(cached) $ECHO_C" >&6
14012else
edfaf76d 14013 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 14014fi
ca81d7a0
JD
14015ac_res=`eval echo '${'$as_ac_Header'}'`
14016 { echo "$as_me:$LINENO: result: $ac_res" >&5
14017echo "${ECHO_T}$ac_res" >&6; }
f57bd967 14018
ba4481b5 14019fi
f57bd967
DL
14020if test `eval echo '${'$as_ac_Header'}'` = yes; then
14021 cat >>confdefs.h <<_ACEOF
14022#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14023_ACEOF
c0d27fcc
MR
14024
14025fi
f57bd967
DL
14026
14027done
14028
14029 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
ca81d7a0
JD
14030 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
14031echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 14032if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 14033 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14034else
98418dba
CW
14035 ac_check_lib_save_LIBS=$LIBS
14036LIBS="-lpng -lz -lm $LIBS"
14037cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14038/* confdefs.h. */
14039_ACEOF
14040cat confdefs.h >>conftest.$ac_ext
14041cat >>conftest.$ac_ext <<_ACEOF
14042/* end confdefs.h. */
98418dba 14043
ca81d7a0
JD
14044/* Override any GCC internal prototype to avoid an error.
14045 Use char because int might match the return type of a GCC
14046 builtin and then its argument prototype would still apply. */
503d2be0
AS
14047#ifdef __cplusplus
14048extern "C"
14049#endif
98418dba 14050char png_get_channels ();
503d2be0
AS
14051int
14052main ()
14053{
ca81d7a0 14054return png_get_channels ();
503d2be0
AS
14055 ;
14056 return 0;
14057}
14058_ACEOF
14059rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14060if { (ac_try="$ac_link"
14061case "(($ac_try" in
14062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14063 *) ac_try_echo=$ac_try;;
14064esac
14065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14066 (eval "$ac_link") 2>conftest.er1
503d2be0 14067 ac_status=$?
edfaf76d
LK
14068 grep -v '^ *+' conftest.er1 >conftest.err
14069 rm -f conftest.er1
14070 cat conftest.err >&5
c0d27fcc 14071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14072 (exit $ac_status); } && {
14073 test -z "$ac_c_werror_flag" ||
14074 test ! -s conftest.err
14075 } && test -s conftest$ac_exeext &&
14076 $as_test_x conftest$ac_exeext; then
98418dba 14077 ac_cv_lib_png_png_get_channels=yes
73b77ee5 14078else
98418dba 14079 echo "$as_me: failed program was:" >&5
19650fd6
AS
14080sed 's/^/| /' conftest.$ac_ext >&5
14081
ca81d7a0 14082 ac_cv_lib_png_png_get_channels=no
73b77ee5 14083fi
ca81d7a0 14084
f053c89f 14085rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14086 conftest$ac_exeext conftest.$ac_ext
98418dba 14087LIBS=$ac_check_lib_save_LIBS
73b77ee5 14088fi
ca81d7a0
JD
14089{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
14090echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
14091if test $ac_cv_lib_png_png_get_channels = yes; then
14092 HAVE_PNG=yes
73b77ee5 14093fi
503d2be0 14094
f57bd967 14095 fi
98418dba
CW
14096 fi
14097
14098 if test "${HAVE_PNG}" = "yes"; then
b936fae4 14099
c0d27fcc 14100cat >>confdefs.h <<\_ACEOF
98418dba 14101#define HAVE_PNG 1
c0d27fcc 14102_ACEOF
73b77ee5 14103
98418dba 14104 fi
73b77ee5
GM
14105fi
14106
98418dba
CW
14107### Use -ltiff if available, unless `--with-tiff=no'.
14108HAVE_TIFF=no
14109if test "${HAVE_X11}" = "yes"; then
14110 if test "${with_tiff}" != "no"; then
c0d27fcc 14111 if test "${ac_cv_header_tiffio_h+set}" = set; then
ca81d7a0
JD
14112 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
14113echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
14114if test "${ac_cv_header_tiffio_h+set}" = set; then
14115 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14116fi
ca81d7a0
JD
14117{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14118echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 14119else
c0d27fcc 14120 # Is the header compilable?
ca81d7a0
JD
14121{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
14122echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 14123cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14124/* confdefs.h. */
14125_ACEOF
14126cat confdefs.h >>conftest.$ac_ext
14127cat >>conftest.$ac_ext <<_ACEOF
14128/* end confdefs.h. */
c0d27fcc
MR
14129$ac_includes_default
14130#include <tiffio.h>
14131_ACEOF
14132rm -f conftest.$ac_objext
ca81d7a0
JD
14133if { (ac_try="$ac_compile"
14134case "(($ac_try" in
14135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14136 *) ac_try_echo=$ac_try;;
14137esac
14138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14139 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14140 ac_status=$?
edfaf76d
LK
14141 grep -v '^ *+' conftest.er1 >conftest.err
14142 rm -f conftest.er1
14143 cat conftest.err >&5
c0d27fcc 14144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14145 (exit $ac_status); } && {
14146 test -z "$ac_c_werror_flag" ||
14147 test ! -s conftest.err
14148 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14149 ac_header_compiler=yes
14150else
14151 echo "$as_me: failed program was:" >&5
19650fd6
AS
14152sed 's/^/| /' conftest.$ac_ext >&5
14153
ca81d7a0 14154 ac_header_compiler=no
c0d27fcc 14155fi
ca81d7a0
JD
14156
14157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14158{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14159echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14160
14161# Is the header present?
ca81d7a0
JD
14162{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
14163echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 14164cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14165/* confdefs.h. */
14166_ACEOF
14167cat confdefs.h >>conftest.$ac_ext
14168cat >>conftest.$ac_ext <<_ACEOF
14169/* end confdefs.h. */
98418dba
CW
14170#include <tiffio.h>
14171_ACEOF
ca81d7a0
JD
14172if { (ac_try="$ac_cpp conftest.$ac_ext"
14173case "(($ac_try" in
14174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14175 *) ac_try_echo=$ac_try;;
14176esac
14177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14178 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14179 ac_status=$?
6bae0ccf 14180 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14181 rm -f conftest.er1
14182 cat conftest.err >&5
c0d27fcc 14183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14184 (exit $ac_status); } >/dev/null && {
14185 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14186 test ! -s conftest.err
14187 }; then
c0d27fcc 14188 ac_header_preproc=yes
98418dba
CW
14189else
14190 echo "$as_me: failed program was:" >&5
19650fd6
AS
14191sed 's/^/| /' conftest.$ac_ext >&5
14192
c0d27fcc 14193 ac_header_preproc=no
98418dba 14194fi
ca81d7a0 14195
98418dba 14196rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14197{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14198echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14199
14200# So? What about this header?
edfaf76d
LK
14201case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14202 yes:no: )
c0d27fcc
MR
14203 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
14204echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14205 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
14206echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
14207 ac_header_preproc=yes
19650fd6 14208 ;;
edfaf76d 14209 no:yes:* )
c0d27fcc
MR
14210 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
14211echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14212 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
14213echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
14214 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
14215echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
14216 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
14217echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14218 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 14219echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14220 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
14221echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14222
19650fd6 14223 ;;
c0d27fcc 14224esac
ca81d7a0
JD
14225{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
14226echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
14227if test "${ac_cv_header_tiffio_h+set}" = set; then
14228 echo $ECHO_N "(cached) $ECHO_C" >&6
14229else
14230 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 14231fi
ca81d7a0
JD
14232{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
14233echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
14234
14235fi
98418dba
CW
14236if test $ac_cv_header_tiffio_h = yes; then
14237 tifflibs="-lz -lm"
14238 # At least one tiff package requires the jpeg library.
14239 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
ca81d7a0
JD
14240 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
14241echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 14242if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 14243 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14244else
503d2be0 14245 ac_check_lib_save_LIBS=$LIBS
98418dba 14246LIBS="-ltiff $tifflibs $LIBS"
503d2be0 14247cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14248/* confdefs.h. */
14249_ACEOF
14250cat confdefs.h >>conftest.$ac_ext
14251cat >>conftest.$ac_ext <<_ACEOF
14252/* end confdefs.h. */
503d2be0 14253
ca81d7a0
JD
14254/* Override any GCC internal prototype to avoid an error.
14255 Use char because int might match the return type of a GCC
14256 builtin and then its argument prototype would still apply. */
503d2be0
AS
14257#ifdef __cplusplus
14258extern "C"
14259#endif
98418dba 14260char TIFFGetVersion ();
503d2be0
AS
14261int
14262main ()
14263{
ca81d7a0 14264return TIFFGetVersion ();
503d2be0
AS
14265 ;
14266 return 0;
14267}
14268_ACEOF
14269rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14270if { (ac_try="$ac_link"
14271case "(($ac_try" in
14272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14273 *) ac_try_echo=$ac_try;;
14274esac
14275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14276 (eval "$ac_link") 2>conftest.er1
503d2be0 14277 ac_status=$?
edfaf76d
LK
14278 grep -v '^ *+' conftest.er1 >conftest.err
14279 rm -f conftest.er1
14280 cat conftest.err >&5
c0d27fcc 14281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14282 (exit $ac_status); } && {
14283 test -z "$ac_c_werror_flag" ||
14284 test ! -s conftest.err
14285 } && test -s conftest$ac_exeext &&
14286 $as_test_x conftest$ac_exeext; then
98418dba 14287 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
14288else
14289 echo "$as_me: failed program was:" >&5
19650fd6
AS
14290sed 's/^/| /' conftest.$ac_ext >&5
14291
ca81d7a0 14292 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 14293fi
ca81d7a0 14294
f053c89f 14295rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14296 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14297LIBS=$ac_check_lib_save_LIBS
14298fi
ca81d7a0
JD
14299{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
14300echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
14301if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
14302 HAVE_TIFF=yes
14303fi
14304
14305fi
73b77ee5 14306
c0d27fcc 14307
98418dba
CW
14308 fi
14309
14310 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 14311
c0d27fcc 14312cat >>confdefs.h <<\_ACEOF
98418dba 14313#define HAVE_TIFF 1
c0d27fcc 14314_ACEOF
98418dba
CW
14315
14316 fi
73b77ee5
GM
14317fi
14318
9aeb8aaa 14319### Use -lgif or -lungif if available, unless `--with-gif=no'.
98418dba 14320HAVE_GIF=no
9aeb8aaa
GM
14321if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
14322 if test "${ac_cv_header_gif_lib_h+set}" = set; then
ca81d7a0
JD
14323 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14324echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
14325if test "${ac_cv_header_gif_lib_h+set}" = set; then
14326 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14327fi
ca81d7a0
JD
14328{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14329echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 14330else
c0d27fcc 14331 # Is the header compilable?
ca81d7a0
JD
14332{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
14333echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 14334cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14335/* confdefs.h. */
14336_ACEOF
14337cat confdefs.h >>conftest.$ac_ext
14338cat >>conftest.$ac_ext <<_ACEOF
14339/* end confdefs.h. */
c0d27fcc
MR
14340$ac_includes_default
14341#include <gif_lib.h>
14342_ACEOF
14343rm -f conftest.$ac_objext
ca81d7a0
JD
14344if { (ac_try="$ac_compile"
14345case "(($ac_try" in
14346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14347 *) ac_try_echo=$ac_try;;
14348esac
14349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14350 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14351 ac_status=$?
edfaf76d
LK
14352 grep -v '^ *+' conftest.er1 >conftest.err
14353 rm -f conftest.er1
14354 cat conftest.err >&5
c0d27fcc 14355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14356 (exit $ac_status); } && {
14357 test -z "$ac_c_werror_flag" ||
14358 test ! -s conftest.err
14359 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14360 ac_header_compiler=yes
14361else
14362 echo "$as_me: failed program was:" >&5
19650fd6
AS
14363sed 's/^/| /' conftest.$ac_ext >&5
14364
ca81d7a0 14365 ac_header_compiler=no
c0d27fcc 14366fi
ca81d7a0
JD
14367
14368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14369{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14370echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14371
14372# Is the header present?
ca81d7a0
JD
14373{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
14374echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 14375cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14376/* confdefs.h. */
14377_ACEOF
14378cat confdefs.h >>conftest.$ac_ext
14379cat >>conftest.$ac_ext <<_ACEOF
14380/* end confdefs.h. */
98418dba
CW
14381#include <gif_lib.h>
14382_ACEOF
ca81d7a0
JD
14383if { (ac_try="$ac_cpp conftest.$ac_ext"
14384case "(($ac_try" in
14385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14386 *) ac_try_echo=$ac_try;;
14387esac
14388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14389 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14390 ac_status=$?
6bae0ccf 14391 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14392 rm -f conftest.er1
14393 cat conftest.err >&5
c0d27fcc 14394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14395 (exit $ac_status); } >/dev/null && {
14396 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14397 test ! -s conftest.err
14398 }; then
c0d27fcc 14399 ac_header_preproc=yes
98418dba
CW
14400else
14401 echo "$as_me: failed program was:" >&5
19650fd6
AS
14402sed 's/^/| /' conftest.$ac_ext >&5
14403
c0d27fcc 14404 ac_header_preproc=no
98418dba 14405fi
ca81d7a0 14406
98418dba 14407rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14408{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14409echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14410
14411# So? What about this header?
edfaf76d
LK
14412case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14413 yes:no: )
c0d27fcc
MR
14414 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14415echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14416 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
14417echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
14418 ac_header_preproc=yes
19650fd6 14419 ;;
edfaf76d 14420 no:yes:* )
c0d27fcc
MR
14421 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
14422echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14423 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
14424echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
14425 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
14426echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
14427 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
14428echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14429 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 14430echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14431 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
14432echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14433
19650fd6 14434 ;;
c0d27fcc 14435esac
ca81d7a0
JD
14436{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14437echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14438if test "${ac_cv_header_gif_lib_h+set}" = set; then
14439 echo $ECHO_N "(cached) $ECHO_C" >&6
14440else
14441 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 14442fi
ca81d7a0
JD
14443{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14444echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
14445
14446fi
98418dba
CW
14447if test $ac_cv_header_gif_lib_h = yes; then
14448 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14449# Earlier versions can crash Emacs.
63175cd2
GM
14450 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
14451echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
14452if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
503d2be0 14453 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14454else
503d2be0 14455 ac_check_lib_save_LIBS=$LIBS
63175cd2 14456LIBS="-lgif $LIBS"
503d2be0 14457cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14458/* confdefs.h. */
14459_ACEOF
14460cat confdefs.h >>conftest.$ac_ext
14461cat >>conftest.$ac_ext <<_ACEOF
14462/* end confdefs.h. */
73b77ee5 14463
ca81d7a0
JD
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. */
98418dba
CW
14467#ifdef __cplusplus
14468extern "C"
14469#endif
98418dba 14470char EGifPutExtensionLast ();
503d2be0
AS
14471int
14472main ()
14473{
ca81d7a0 14474return EGifPutExtensionLast ();
503d2be0
AS
14475 ;
14476 return 0;
14477}
14478_ACEOF
14479rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
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
503d2be0 14487 ac_status=$?
edfaf76d
LK
14488 grep -v '^ *+' conftest.er1 >conftest.err
14489 rm -f conftest.er1
14490 cat conftest.err >&5
c0d27fcc 14491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
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_gif_EGifPutExtensionLast=yes
35996d22 14498else
98418dba 14499 echo "$as_me: failed program was:" >&5
19650fd6
AS
14500sed 's/^/| /' conftest.$ac_ext >&5
14501
63175cd2 14502 ac_cv_lib_gif_EGifPutExtensionLast=no
98418dba 14503fi
ca81d7a0 14504
f053c89f 14505rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14506 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14507LIBS=$ac_check_lib_save_LIBS
14508fi
63175cd2
GM
14509{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14510echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14511if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
98418dba 14512 HAVE_GIF=yes
9aeb8aaa 14513else
63175cd2 14514 try_libungif=yes
98418dba
CW
14515fi
14516
14517fi
14518
c0d27fcc 14519
9aeb8aaa
GM
14520
14521 if test "$HAVE_GIF" = yes; then
63175cd2 14522 ac_gif_lib_name="-lgif"
9aeb8aaa
GM
14523 fi
14524
63175cd2
GM
14525# If gif_lib.h but no libgif, try libungif.
14526 if test x"$try_libungif" = xyes; then
14527 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
14528echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
14529if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
9aeb8aaa
GM
14530 echo $ECHO_N "(cached) $ECHO_C" >&6
14531else
14532 ac_check_lib_save_LIBS=$LIBS
63175cd2 14533LIBS="-lungif $LIBS"
9aeb8aaa
GM
14534cat >conftest.$ac_ext <<_ACEOF
14535/* confdefs.h. */
14536_ACEOF
14537cat confdefs.h >>conftest.$ac_ext
14538cat >>conftest.$ac_ext <<_ACEOF
14539/* end confdefs.h. */
14540
14541/* Override any GCC internal prototype to avoid an error.
14542 Use char because int might match the return type of a GCC
14543 builtin and then its argument prototype would still apply. */
14544#ifdef __cplusplus
14545extern "C"
14546#endif
14547char EGifPutExtensionLast ();
14548int
14549main ()
14550{
14551return EGifPutExtensionLast ();
14552 ;
14553 return 0;
14554}
14555_ACEOF
14556rm -f conftest.$ac_objext conftest$ac_exeext
14557if { (ac_try="$ac_link"
14558case "(($ac_try" in
14559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14560 *) ac_try_echo=$ac_try;;
14561esac
14562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14563 (eval "$ac_link") 2>conftest.er1
14564 ac_status=$?
14565 grep -v '^ *+' conftest.er1 >conftest.err
14566 rm -f conftest.er1
14567 cat conftest.err >&5
14568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14569 (exit $ac_status); } && {
14570 test -z "$ac_c_werror_flag" ||
14571 test ! -s conftest.err
14572 } && test -s conftest$ac_exeext &&
14573 $as_test_x conftest$ac_exeext; then
63175cd2 14574 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9aeb8aaa
GM
14575else
14576 echo "$as_me: failed program was:" >&5
14577sed 's/^/| /' conftest.$ac_ext >&5
14578
63175cd2 14579 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba
CW
14580fi
14581
9aeb8aaa
GM
14582rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14583 conftest$ac_exeext conftest.$ac_ext
14584LIBS=$ac_check_lib_save_LIBS
14585fi
63175cd2
GM
14586{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14587echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14588if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9aeb8aaa 14589 HAVE_GIF=yes
98418dba
CW
14590fi
14591
c0d27fcc 14592
9aeb8aaa
GM
14593 if test "$HAVE_GIF" = yes; then
14594
14595cat >>confdefs.h <<\_ACEOF
63175cd2 14596#define LIBGIF -lungif
9aeb8aaa
GM
14597_ACEOF
14598
63175cd2 14599 ac_gif_lib_name="-lungif"
9aeb8aaa 14600 fi
98418dba
CW
14601 fi
14602
14603 if test "${HAVE_GIF}" = "yes"; then
b936fae4 14604
c0d27fcc 14605cat >>confdefs.h <<\_ACEOF
98418dba 14606#define HAVE_GIF 1
c0d27fcc 14607_ACEOF
98418dba
CW
14608
14609 fi
14610fi
14611
5afbeb22
JD
14612if test "${HAVE_X11}" = "yes"; then
14613 MISSING=""
14614 WITH_NO=""
14615 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14616 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14617 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14618 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14619 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14620 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14621 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14622 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14623 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14624 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14625
14626 if test "X${MISSING}" != X; then
1bb9a689 14627 { { echo "$as_me:$LINENO: error: The following required libraries were not found:
5afbeb22 14628 $MISSING
86e73516 14629Maybe some development libraries/packages are missing?
5afbeb22
JD
14630If you don't want to link with them give
14631 $WITH_NO
14632as options to configure" >&5
1bb9a689 14633echo "$as_me: error: The following required libraries were not found:
5afbeb22 14634 $MISSING
86e73516 14635Maybe some development libraries/packages are missing?
5afbeb22
JD
14636If you don't want to link with them give
14637 $WITH_NO
14638as options to configure" >&2;}
86e73516 14639 { (exit 1); exit 1; }; }
98418dba
CW
14640 fi
14641fi
14642
79011b82
NR
14643### Use -lgpm if available, unless `--with-gpm=no'.
14644HAVE_GPM=no
14645if test "${with_gpm}" != "no"; then
14646 if test "${ac_cv_header_gpm_h+set}" = set; then
14647 { echo "$as_me:$LINENO: checking for gpm.h" >&5
14648echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14649if test "${ac_cv_header_gpm_h+set}" = set; then
14650 echo $ECHO_N "(cached) $ECHO_C" >&6
14651fi
14652{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14653echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14654else
14655 # Is the header compilable?
14656{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
14657echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
14658cat >conftest.$ac_ext <<_ACEOF
14659/* confdefs.h. */
14660_ACEOF
14661cat confdefs.h >>conftest.$ac_ext
14662cat >>conftest.$ac_ext <<_ACEOF
14663/* end confdefs.h. */
14664$ac_includes_default
14665#include <gpm.h>
14666_ACEOF
14667rm -f conftest.$ac_objext
14668if { (ac_try="$ac_compile"
14669case "(($ac_try" in
14670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14671 *) ac_try_echo=$ac_try;;
14672esac
14673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14674 (eval "$ac_compile") 2>conftest.er1
14675 ac_status=$?
14676 grep -v '^ *+' conftest.er1 >conftest.err
14677 rm -f conftest.er1
14678 cat conftest.err >&5
14679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14680 (exit $ac_status); } && {
14681 test -z "$ac_c_werror_flag" ||
14682 test ! -s conftest.err
14683 } && test -s conftest.$ac_objext; then
14684 ac_header_compiler=yes
14685else
14686 echo "$as_me: failed program was:" >&5
14687sed 's/^/| /' conftest.$ac_ext >&5
14688
14689 ac_header_compiler=no
14690fi
14691
14692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14693{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14694echo "${ECHO_T}$ac_header_compiler" >&6; }
14695
14696# Is the header present?
14697{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
14698echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
14699cat >conftest.$ac_ext <<_ACEOF
14700/* confdefs.h. */
14701_ACEOF
14702cat confdefs.h >>conftest.$ac_ext
14703cat >>conftest.$ac_ext <<_ACEOF
14704/* end confdefs.h. */
14705#include <gpm.h>
14706_ACEOF
14707if { (ac_try="$ac_cpp conftest.$ac_ext"
14708case "(($ac_try" in
14709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14710 *) ac_try_echo=$ac_try;;
14711esac
14712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14713 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14714 ac_status=$?
14715 grep -v '^ *+' conftest.er1 >conftest.err
14716 rm -f conftest.er1
14717 cat conftest.err >&5
14718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14719 (exit $ac_status); } >/dev/null && {
14720 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14721 test ! -s conftest.err
14722 }; then
14723 ac_header_preproc=yes
14724else
14725 echo "$as_me: failed program was:" >&5
14726sed 's/^/| /' conftest.$ac_ext >&5
14727
14728 ac_header_preproc=no
14729fi
14730
14731rm -f conftest.err conftest.$ac_ext
14732{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14733echo "${ECHO_T}$ac_header_preproc" >&6; }
14734
14735# So? What about this header?
14736case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14737 yes:no: )
14738 { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14739echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14740 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
14741echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
14742 ac_header_preproc=yes
14743 ;;
14744 no:yes:* )
14745 { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
14746echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
14747 { echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
14748echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
14749 { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
14750echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
14751 { echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
14752echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
14753 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
14754echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
14755 { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
14756echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
14757
14758 ;;
14759esac
14760{ echo "$as_me:$LINENO: checking for gpm.h" >&5
14761echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14762if test "${ac_cv_header_gpm_h+set}" = set; then
14763 echo $ECHO_N "(cached) $ECHO_C" >&6
14764else
14765 ac_cv_header_gpm_h=$ac_header_preproc
14766fi
14767{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14768echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14769
14770fi
14771if test $ac_cv_header_gpm_h = yes; then
14772 { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
14773echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
14774if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
14775 echo $ECHO_N "(cached) $ECHO_C" >&6
14776else
14777 ac_check_lib_save_LIBS=$LIBS
14778LIBS="-lgpm $LIBS"
14779cat >conftest.$ac_ext <<_ACEOF
14780/* confdefs.h. */
14781_ACEOF
14782cat confdefs.h >>conftest.$ac_ext
14783cat >>conftest.$ac_ext <<_ACEOF
14784/* end confdefs.h. */
14785
14786/* Override any GCC internal prototype to avoid an error.
14787 Use char because int might match the return type of a GCC
14788 builtin and then its argument prototype would still apply. */
14789#ifdef __cplusplus
14790extern "C"
14791#endif
14792char Gpm_Open ();
14793int
14794main ()
14795{
14796return Gpm_Open ();
14797 ;
14798 return 0;
14799}
14800_ACEOF
14801rm -f conftest.$ac_objext conftest$ac_exeext
14802if { (ac_try="$ac_link"
14803case "(($ac_try" in
14804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14805 *) ac_try_echo=$ac_try;;
14806esac
14807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14808 (eval "$ac_link") 2>conftest.er1
14809 ac_status=$?
14810 grep -v '^ *+' conftest.er1 >conftest.err
14811 rm -f conftest.er1
14812 cat conftest.err >&5
14813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14814 (exit $ac_status); } && {
14815 test -z "$ac_c_werror_flag" ||
14816 test ! -s conftest.err
14817 } && test -s conftest$ac_exeext &&
14818 $as_test_x conftest$ac_exeext; then
14819 ac_cv_lib_gpm_Gpm_Open=yes
14820else
14821 echo "$as_me: failed program was:" >&5
14822sed 's/^/| /' conftest.$ac_ext >&5
14823
14824 ac_cv_lib_gpm_Gpm_Open=no
14825fi
14826
14827rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14828 conftest$ac_exeext conftest.$ac_ext
14829LIBS=$ac_check_lib_save_LIBS
14830fi
14831{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14832echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
14833if test $ac_cv_lib_gpm_Gpm_Open = yes; then
14834 HAVE_GPM=yes
14835fi
14836
14837fi
14838
14839
14840fi
14841
14842if test "${HAVE_GPM}" = "yes"; then
14843
14844cat >>confdefs.h <<\_ACEOF
14845#define HAVE_GPM 1
14846_ACEOF
14847
14848fi
14849
cef11da2 14850if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
ca81d7a0
JD
14851 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14852echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14853if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14854 echo $ECHO_N "(cached) $ECHO_C" >&6
14855fi
ca81d7a0
JD
14856{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14857echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14858else
14859 # Is the header compilable?
ca81d7a0
JD
14860{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
14861echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
14862cat >conftest.$ac_ext <<_ACEOF
14863/* confdefs.h. */
14864_ACEOF
14865cat confdefs.h >>conftest.$ac_ext
14866cat >>conftest.$ac_ext <<_ACEOF
14867/* end confdefs.h. */
14868$ac_includes_default
14869#include <malloc/malloc.h>
14870_ACEOF
14871rm -f conftest.$ac_objext
ca81d7a0
JD
14872if { (ac_try="$ac_compile"
14873case "(($ac_try" in
14874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14875 *) ac_try_echo=$ac_try;;
14876esac
14877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14878 (eval "$ac_compile") 2>conftest.er1
cef11da2 14879 ac_status=$?
edfaf76d
LK
14880 grep -v '^ *+' conftest.er1 >conftest.err
14881 rm -f conftest.er1
14882 cat conftest.err >&5
cef11da2 14883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
14884 (exit $ac_status); } && {
14885 test -z "$ac_c_werror_flag" ||
14886 test ! -s conftest.err
14887 } && test -s conftest.$ac_objext; then
cef11da2
ST
14888 ac_header_compiler=yes
14889else
14890 echo "$as_me: failed program was:" >&5
14891sed 's/^/| /' conftest.$ac_ext >&5
14892
ca81d7a0 14893 ac_header_compiler=no
cef11da2 14894fi
ca81d7a0
JD
14895
14896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14897{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14898echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14899
14900# Is the header present?
ca81d7a0
JD
14901{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
14902echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
14903cat >conftest.$ac_ext <<_ACEOF
14904/* confdefs.h. */
14905_ACEOF
14906cat confdefs.h >>conftest.$ac_ext
14907cat >>conftest.$ac_ext <<_ACEOF
14908/* end confdefs.h. */
14909#include <malloc/malloc.h>
14910_ACEOF
ca81d7a0
JD
14911if { (ac_try="$ac_cpp conftest.$ac_ext"
14912case "(($ac_try" in
14913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14914 *) ac_try_echo=$ac_try;;
14915esac
14916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14917 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14918 ac_status=$?
14919 grep -v '^ *+' conftest.er1 >conftest.err
14920 rm -f conftest.er1
14921 cat conftest.err >&5
14922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14923 (exit $ac_status); } >/dev/null && {
14924 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14925 test ! -s conftest.err
14926 }; then
cef11da2
ST
14927 ac_header_preproc=yes
14928else
14929 echo "$as_me: failed program was:" >&5
14930sed 's/^/| /' conftest.$ac_ext >&5
14931
14932 ac_header_preproc=no
14933fi
ca81d7a0 14934
cef11da2 14935rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14936{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14937echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14938
14939# So? What about this header?
edfaf76d
LK
14940case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14941 yes:no: )
cef11da2
ST
14942 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14943echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14944 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14945echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
14946 ac_header_preproc=yes
cef11da2 14947 ;;
edfaf76d 14948 no:yes:* )
cef11da2
ST
14949 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14950echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14951 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14952echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14953 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14954echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14955 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14956echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
14957 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14958echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14959 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14960echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14961
cef11da2
ST
14962 ;;
14963esac
ca81d7a0
JD
14964{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14965echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14966if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14967 echo $ECHO_N "(cached) $ECHO_C" >&6
14968else
14969 ac_cv_header_malloc_malloc_h=$ac_header_preproc
7c9e5167 14970fi
ca81d7a0
JD
14971{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14972echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2 14973
7c9e5167 14974fi
cef11da2
ST
14975if test $ac_cv_header_malloc_malloc_h = yes; then
14976
14977cat >>confdefs.h <<\_ACEOF
14978#define HAVE_MALLOC_MALLOC_H 1
14979_ACEOF
14980
7c9e5167
JD
14981fi
14982
cef11da2
ST
14983
14984
edfda783
AR
14985### Use NeXTstep API to implement GUI.
14986if test "${HAVE_NS}" = "yes"; then
14987
14988cat >>confdefs.h <<\_ACEOF
14989#define HAVE_NS 1
14990_ACEOF
14991
ff1095d1 14992 if test "${NS_IMPL_COCOA}" = "yes"; then
edfda783
AR
14993
14994cat >>confdefs.h <<\_ACEOF
14995#define NS_IMPL_COCOA 1
14996_ACEOF
14997
48fad8e8
DN
14998 GNU_OBJC_CFLAGS=
14999 LIB_SRC_EXTRA_INSTALLABLES=mac-fix-env
edfda783
AR
15000 fi
15001 if test "${EN_COCOA_EXPERIMENTAL_CTRL_G}" = "yes"; then
15002
15003cat >>confdefs.h <<\_ACEOF
15004#define COCOA_EXPERIMENTAL_CTRL_G 1
15005_ACEOF
15006
15007 fi
ff1095d1 15008 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
edfda783
AR
15009
15010cat >>confdefs.h <<\_ACEOF
15011#define NS_IMPL_GNUSTEP 1
15012_ACEOF
15013
48fad8e8 15014 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 15015 fi
d5e2f8fe 15016 if test "${NS_HAVE_NSINTEGER}" = "yes"; then
519c4a9a
CY
15017
15018cat >>confdefs.h <<\_ACEOF
d5e2f8fe 15019#define NS_HAVE_NSINTEGER 1
519c4a9a
CY
15020_ACEOF
15021
177cd151
CY
15022 fi
15023 # We also have mouse menus.
edfda783
AR
15024 HAVE_MENUS=yes
15025fi
15026
e0f712ba 15027
98418dba
CW
15028### Use session management (-lSM -lICE) if available
15029HAVE_X_SM=no
15030if test "${HAVE_X11}" = "yes"; then
c0d27fcc 15031 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
ca81d7a0
JD
15032 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15033echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
15034if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
15035 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15036fi
ca81d7a0
JD
15037{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15038echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 15039else
c0d27fcc 15040 # Is the header compilable?
ca81d7a0
JD
15041{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
15042echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 15043cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15044/* confdefs.h. */
15045_ACEOF
15046cat confdefs.h >>conftest.$ac_ext
15047cat >>conftest.$ac_ext <<_ACEOF
15048/* end confdefs.h. */
c0d27fcc
MR
15049$ac_includes_default
15050#include <X11/SM/SMlib.h>
15051_ACEOF
15052rm -f conftest.$ac_objext
ca81d7a0
JD
15053if { (ac_try="$ac_compile"
15054case "(($ac_try" in
15055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15056 *) ac_try_echo=$ac_try;;
15057esac
15058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15059 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15060 ac_status=$?
edfaf76d
LK
15061 grep -v '^ *+' conftest.er1 >conftest.err
15062 rm -f conftest.er1
15063 cat conftest.err >&5
c0d27fcc 15064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15065 (exit $ac_status); } && {
15066 test -z "$ac_c_werror_flag" ||
15067 test ! -s conftest.err
15068 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15069 ac_header_compiler=yes
15070else
15071 echo "$as_me: failed program was:" >&5
19650fd6
AS
15072sed 's/^/| /' conftest.$ac_ext >&5
15073
ca81d7a0 15074 ac_header_compiler=no
c0d27fcc 15075fi
ca81d7a0
JD
15076
15077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15078{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15079echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15080
15081# Is the header present?
ca81d7a0
JD
15082{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
15083echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 15084cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15085/* confdefs.h. */
15086_ACEOF
15087cat confdefs.h >>conftest.$ac_ext
15088cat >>conftest.$ac_ext <<_ACEOF
15089/* end confdefs.h. */
98418dba
CW
15090#include <X11/SM/SMlib.h>
15091_ACEOF
ca81d7a0
JD
15092if { (ac_try="$ac_cpp conftest.$ac_ext"
15093case "(($ac_try" in
15094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15095 *) ac_try_echo=$ac_try;;
15096esac
15097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15098 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 15099 ac_status=$?
6bae0ccf 15100 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15101 rm -f conftest.er1
15102 cat conftest.err >&5
c0d27fcc 15103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15104 (exit $ac_status); } >/dev/null && {
15105 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15106 test ! -s conftest.err
15107 }; then
c0d27fcc 15108 ac_header_preproc=yes
98418dba
CW
15109else
15110 echo "$as_me: failed program was:" >&5
19650fd6
AS
15111sed 's/^/| /' conftest.$ac_ext >&5
15112
c0d27fcc 15113 ac_header_preproc=no
98418dba 15114fi
ca81d7a0 15115
98418dba 15116rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15117{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15118echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15119
15120# So? What about this header?
edfaf76d
LK
15121case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15122 yes:no: )
c0d27fcc
MR
15123 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15124echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15125 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
15126echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
15127 ac_header_preproc=yes
19650fd6 15128 ;;
edfaf76d 15129 no:yes:* )
c0d27fcc
MR
15130 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
15131echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15132 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
15133echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
15134 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
15135echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
15136 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
15137echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15138 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 15139echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15140 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
15141echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15142
19650fd6 15143 ;;
c0d27fcc 15144esac
ca81d7a0
JD
15145{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15146echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
15147if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
15148 echo $ECHO_N "(cached) $ECHO_C" >&6
15149else
15150 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 15151fi
ca81d7a0
JD
15152{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15153echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
15154
15155fi
98418dba 15156if test $ac_cv_header_X11_SM_SMlib_h = yes; then
ca81d7a0
JD
15157 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
15158echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 15159if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 15160 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15161else
503d2be0 15162 ac_check_lib_save_LIBS=$LIBS
1660500f 15163LIBS="-lSM -lICE $LIBS"
503d2be0 15164cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15165/* confdefs.h. */
15166_ACEOF
15167cat confdefs.h >>conftest.$ac_ext
15168cat >>conftest.$ac_ext <<_ACEOF
15169/* end confdefs.h. */
503d2be0 15170
ca81d7a0
JD
15171/* Override any GCC internal prototype to avoid an error.
15172 Use char because int might match the return type of a GCC
15173 builtin and then its argument prototype would still apply. */
503d2be0
AS
15174#ifdef __cplusplus
15175extern "C"
15176#endif
98418dba 15177char SmcOpenConnection ();
503d2be0
AS
15178int
15179main ()
15180{
ca81d7a0 15181return SmcOpenConnection ();
503d2be0
AS
15182 ;
15183 return 0;
15184}
15185_ACEOF
15186rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15187if { (ac_try="$ac_link"
15188case "(($ac_try" in
15189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15190 *) ac_try_echo=$ac_try;;
15191esac
15192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15193 (eval "$ac_link") 2>conftest.er1
503d2be0 15194 ac_status=$?
edfaf76d
LK
15195 grep -v '^ *+' conftest.er1 >conftest.err
15196 rm -f conftest.er1
15197 cat conftest.err >&5
c0d27fcc 15198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15199 (exit $ac_status); } && {
15200 test -z "$ac_c_werror_flag" ||
15201 test ! -s conftest.err
15202 } && test -s conftest$ac_exeext &&
15203 $as_test_x conftest$ac_exeext; then
98418dba 15204 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
15205else
15206 echo "$as_me: failed program was:" >&5
19650fd6
AS
15207sed 's/^/| /' conftest.$ac_ext >&5
15208
ca81d7a0 15209 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 15210fi
ca81d7a0 15211
f053c89f 15212rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15213 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15214LIBS=$ac_check_lib_save_LIBS
15215fi
ca81d7a0
JD
15216{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
15217echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
15218if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
15219 HAVE_X_SM=yes
73b77ee5
GM
15220fi
15221
73b77ee5 15222fi
73b77ee5 15223
c0d27fcc
MR
15224
15225
98418dba 15226 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 15227
c0d27fcc 15228cat >>confdefs.h <<\_ACEOF
98418dba 15229#define HAVE_X_SM 1
c0d27fcc 15230_ACEOF
73b77ee5 15231
98418dba
CW
15232 case "$LIBS" in
15233 *-lSM*) ;;
15234 *) LIBS="-lSM -lICE $LIBS" ;;
15235 esac
73b77ee5 15236 fi
98418dba 15237fi
73b77ee5 15238
98418dba 15239# If netdb.h doesn't declare h_errno, we must declare it by hand.
ca81d7a0
JD
15240{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
15241echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
15242if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
15243 echo $ECHO_N "(cached) $ECHO_C" >&6
15244else
15245 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15246/* confdefs.h. */
15247_ACEOF
15248cat confdefs.h >>conftest.$ac_ext
15249cat >>conftest.$ac_ext <<_ACEOF
15250/* end confdefs.h. */
98418dba 15251#include <netdb.h>
503d2be0
AS
15252int
15253main ()
15254{
98418dba 15255return h_errno;
503d2be0
AS
15256 ;
15257 return 0;
15258}
15259_ACEOF
15260rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15261if { (ac_try="$ac_link"
15262case "(($ac_try" in
15263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15264 *) ac_try_echo=$ac_try;;
15265esac
15266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15267 (eval "$ac_link") 2>conftest.er1
503d2be0 15268 ac_status=$?
edfaf76d
LK
15269 grep -v '^ *+' conftest.er1 >conftest.err
15270 rm -f conftest.er1
15271 cat conftest.err >&5
c0d27fcc 15272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15273 (exit $ac_status); } && {
15274 test -z "$ac_c_werror_flag" ||
15275 test ! -s conftest.err
15276 } && test -s conftest$ac_exeext &&
15277 $as_test_x conftest$ac_exeext; then
98418dba 15278 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 15279else
503d2be0 15280 echo "$as_me: failed program was:" >&5
19650fd6
AS
15281sed 's/^/| /' conftest.$ac_ext >&5
15282
ca81d7a0 15283 emacs_cv_netdb_declares_h_errno=no
73b77ee5 15284fi
ca81d7a0 15285
f053c89f 15286rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15287 conftest$ac_exeext conftest.$ac_ext
98418dba 15288fi
ca81d7a0
JD
15289{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
15290echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 15291if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 15292
c0d27fcc 15293cat >>confdefs.h <<\_ACEOF
98418dba 15294#define HAVE_H_ERRNO 1
c0d27fcc 15295_ACEOF
73b77ee5 15296
98418dba
CW
15297fi
15298
15299# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15300# for constant arguments. Useless!
ca81d7a0
JD
15301{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
15302echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
15303if test "${ac_cv_working_alloca_h+set}" = set; then
15304 echo $ECHO_N "(cached) $ECHO_C" >&6
15305else
15306 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15307/* confdefs.h. */
15308_ACEOF
15309cat confdefs.h >>conftest.$ac_ext
15310cat >>conftest.$ac_ext <<_ACEOF
15311/* end confdefs.h. */
98418dba 15312#include <alloca.h>
503d2be0
AS
15313int
15314main ()
15315{
98418dba 15316char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 15317 if (p) return 0;
503d2be0
AS
15318 ;
15319 return 0;
15320}
15321_ACEOF
15322rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15323if { (ac_try="$ac_link"
15324case "(($ac_try" in
15325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15326 *) ac_try_echo=$ac_try;;
15327esac
15328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15329 (eval "$ac_link") 2>conftest.er1
503d2be0 15330 ac_status=$?
edfaf76d
LK
15331 grep -v '^ *+' conftest.er1 >conftest.err
15332 rm -f conftest.er1
15333 cat conftest.err >&5
c0d27fcc 15334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15335 (exit $ac_status); } && {
15336 test -z "$ac_c_werror_flag" ||
15337 test ! -s conftest.err
15338 } && test -s conftest$ac_exeext &&
15339 $as_test_x conftest$ac_exeext; then
98418dba 15340 ac_cv_working_alloca_h=yes
73b77ee5 15341else
503d2be0 15342 echo "$as_me: failed program was:" >&5
19650fd6
AS
15343sed 's/^/| /' conftest.$ac_ext >&5
15344
ca81d7a0 15345 ac_cv_working_alloca_h=no
73b77ee5 15346fi
ca81d7a0 15347
f053c89f 15348rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15349 conftest$ac_exeext conftest.$ac_ext
98418dba 15350fi
ca81d7a0
JD
15351{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
15352echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 15353if test $ac_cv_working_alloca_h = yes; then
73b77ee5 15354
c0d27fcc 15355cat >>confdefs.h <<\_ACEOF
98418dba 15356#define HAVE_ALLOCA_H 1
c0d27fcc 15357_ACEOF
98418dba
CW
15358
15359fi
15360
ca81d7a0
JD
15361{ echo "$as_me:$LINENO: checking for alloca" >&5
15362echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
15363if test "${ac_cv_func_alloca_works+set}" = set; then
15364 echo $ECHO_N "(cached) $ECHO_C" >&6
15365else
503d2be0 15366 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15367/* confdefs.h. */
15368_ACEOF
15369cat confdefs.h >>conftest.$ac_ext
15370cat >>conftest.$ac_ext <<_ACEOF
15371/* end confdefs.h. */
98418dba
CW
15372#ifdef __GNUC__
15373# define alloca __builtin_alloca
15374#else
15375# ifdef _MSC_VER
15376# include <malloc.h>
15377# define alloca _alloca
15378# else
f053c89f 15379# ifdef HAVE_ALLOCA_H
98418dba
CW
15380# include <alloca.h>
15381# else
15382# ifdef _AIX
15383 #pragma alloca
15384# else
15385# ifndef alloca /* predefined by HP cc +Olibcalls */
15386char *alloca ();
15387# endif
15388# endif
15389# endif
15390# endif
15391#endif
15392
503d2be0
AS
15393int
15394main ()
15395{
98418dba 15396char *p = (char *) alloca (1);
ca81d7a0 15397 if (p) return 0;
503d2be0
AS
15398 ;
15399 return 0;
15400}
15401_ACEOF
15402rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15403if { (ac_try="$ac_link"
15404case "(($ac_try" in
15405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15406 *) ac_try_echo=$ac_try;;
15407esac
15408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15409 (eval "$ac_link") 2>conftest.er1
503d2be0 15410 ac_status=$?
edfaf76d
LK
15411 grep -v '^ *+' conftest.er1 >conftest.err
15412 rm -f conftest.er1
15413 cat conftest.err >&5
c0d27fcc 15414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15415 (exit $ac_status); } && {
15416 test -z "$ac_c_werror_flag" ||
15417 test ! -s conftest.err
15418 } && test -s conftest$ac_exeext &&
15419 $as_test_x conftest$ac_exeext; then
98418dba 15420 ac_cv_func_alloca_works=yes
ac95a621 15421else
503d2be0 15422 echo "$as_me: failed program was:" >&5
19650fd6
AS
15423sed 's/^/| /' conftest.$ac_ext >&5
15424
ca81d7a0 15425 ac_cv_func_alloca_works=no
ac95a621 15426fi
ca81d7a0 15427
f053c89f 15428rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15429 conftest$ac_exeext conftest.$ac_ext
98418dba 15430fi
ca81d7a0
JD
15431{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
15432echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 15433
98418dba
CW
15434if test $ac_cv_func_alloca_works = yes; then
15435
c0d27fcc 15436cat >>confdefs.h <<\_ACEOF
98418dba 15437#define HAVE_ALLOCA 1
c0d27fcc 15438_ACEOF
98418dba
CW
15439
15440else
15441 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15442# that cause trouble. Some versions do not even contain alloca or
15443# contain a buggy version. If you still want to use their alloca,
15444# use ar to extract alloca.o from them instead of compiling alloca.c.
15445
ca81d7a0 15446ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 15447
c0d27fcc 15448cat >>confdefs.h <<\_ACEOF
98418dba 15449#define C_ALLOCA 1
c0d27fcc 15450_ACEOF
98418dba 15451
c0d27fcc 15452
ca81d7a0
JD
15453{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
15454echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
15455if test "${ac_cv_os_cray+set}" = set; then
15456 echo $ECHO_N "(cached) $ECHO_C" >&6
15457else
15458 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15459/* confdefs.h. */
15460_ACEOF
15461cat confdefs.h >>conftest.$ac_ext
15462cat >>conftest.$ac_ext <<_ACEOF
15463/* end confdefs.h. */
ca81d7a0 15464#if defined CRAY && ! defined CRAY2
98418dba
CW
15465webecray
15466#else
15467wenotbecray
15468#endif
15469
15470_ACEOF
15471if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 15472 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
15473 ac_cv_os_cray=yes
15474else
15475 ac_cv_os_cray=no
15476fi
15477rm -f conftest*
ac95a621 15478
98418dba 15479fi
ca81d7a0
JD
15480{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
15481echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
15482if test $ac_cv_os_cray = yes; then
15483 for ac_func in _getb67 GETB67 getb67; do
15484 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15485{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15486echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15487if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15488 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15489else
503d2be0 15490 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15491/* confdefs.h. */
15492_ACEOF
15493cat confdefs.h >>conftest.$ac_ext
15494cat >>conftest.$ac_ext <<_ACEOF
15495/* end confdefs.h. */
edfaf76d
LK
15496/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15497 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15498#define $ac_func innocuous_$ac_func
15499
73b77ee5 15500/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15501 which can conflict with char $ac_func (); below.
15502 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15503 <limits.h> exists even on freestanding compilers. */
edfaf76d 15504
19650fd6
AS
15505#ifdef __STDC__
15506# include <limits.h>
15507#else
15508# include <assert.h>
15509#endif
edfaf76d
LK
15510
15511#undef $ac_func
15512
ca81d7a0
JD
15513/* Override any GCC internal prototype to avoid an error.
15514 Use char because int might match the return type of a GCC
15515 builtin and then its argument prototype would still apply. */
503d2be0
AS
15516#ifdef __cplusplus
15517extern "C"
15518#endif
503d2be0 15519char $ac_func ();
73b77ee5
GM
15520/* The GNU C library defines this for functions which it implements
15521 to always fail with ENOSYS. Some functions are actually named
15522 something starting with __ and the normal name is an alias. */
ca81d7a0 15523#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 15524choke me
73b77ee5
GM
15525#endif
15526
19650fd6
AS
15527int
15528main ()
15529{
ca81d7a0 15530return $ac_func ();
503d2be0
AS
15531 ;
15532 return 0;
15533}
15534_ACEOF
15535rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15536if { (ac_try="$ac_link"
15537case "(($ac_try" in
15538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15539 *) ac_try_echo=$ac_try;;
15540esac
15541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15542 (eval "$ac_link") 2>conftest.er1
503d2be0 15543 ac_status=$?
edfaf76d
LK
15544 grep -v '^ *+' conftest.er1 >conftest.err
15545 rm -f conftest.er1
15546 cat conftest.err >&5
c0d27fcc 15547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15548 (exit $ac_status); } && {
15549 test -z "$ac_c_werror_flag" ||
15550 test ! -s conftest.err
15551 } && test -s conftest$ac_exeext &&
15552 $as_test_x conftest$ac_exeext; then
503d2be0
AS
15553 eval "$as_ac_var=yes"
15554else
15555 echo "$as_me: failed program was:" >&5
19650fd6
AS
15556sed 's/^/| /' conftest.$ac_ext >&5
15557
ca81d7a0 15558 eval "$as_ac_var=no"
503d2be0 15559fi
ca81d7a0 15560
f053c89f 15561rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15562 conftest$ac_exeext conftest.$ac_ext
503d2be0 15563fi
ca81d7a0
JD
15564ac_res=`eval echo '${'$as_ac_var'}'`
15565 { echo "$as_me:$LINENO: result: $ac_res" >&5
15566echo "${ECHO_T}$ac_res" >&6; }
503d2be0 15567if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 15568
c0d27fcc 15569cat >>confdefs.h <<_ACEOF
98418dba 15570#define CRAY_STACKSEG_END $ac_func
c0d27fcc 15571_ACEOF
98418dba
CW
15572
15573 break
73b77ee5 15574fi
73b77ee5 15575
98418dba 15576 done
73b77ee5
GM
15577fi
15578
ca81d7a0
JD
15579{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
15580echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 15581if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 15582 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15583else
15584 if test "$cross_compiling" = yes; then
15585 ac_cv_c_stack_direction=0
73b77ee5 15586else
503d2be0 15587 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15588/* confdefs.h. */
15589_ACEOF
15590cat confdefs.h >>conftest.$ac_ext
15591cat >>conftest.$ac_ext <<_ACEOF
15592/* end confdefs.h. */
ca81d7a0 15593$ac_includes_default
503d2be0 15594int
98418dba 15595find_stack_direction ()
503d2be0 15596{
98418dba
CW
15597 static char *addr = 0;
15598 auto char dummy;
15599 if (addr == 0)
15600 {
15601 addr = &dummy;
15602 return find_stack_direction ();
15603 }
73b77ee5 15604 else
98418dba
CW
15605 return (&dummy > addr) ? 1 : -1;
15606}
ba4481b5 15607
503d2be0
AS
15608int
15609main ()
15610{
ca81d7a0 15611 return find_stack_direction () < 0;
503d2be0
AS
15612}
15613_ACEOF
98418dba 15614rm -f conftest$ac_exeext
ca81d7a0
JD
15615if { (ac_try="$ac_link"
15616case "(($ac_try" in
15617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15618 *) ac_try_echo=$ac_try;;
15619esac
15620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15621 (eval "$ac_link") 2>&5
503d2be0 15622 ac_status=$?
c0d27fcc 15623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15624 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
15625 { (case "(($ac_try" in
15626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15627 *) ac_try_echo=$ac_try;;
15628esac
15629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15630 (eval "$ac_try") 2>&5
503d2be0 15631 ac_status=$?
c0d27fcc 15632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15633 (exit $ac_status); }; }; then
98418dba 15634 ac_cv_c_stack_direction=1
ba4481b5 15635else
98418dba
CW
15636 echo "$as_me: program exited with status $ac_status" >&5
15637echo "$as_me: failed program was:" >&5
19650fd6
AS
15638sed 's/^/| /' conftest.$ac_ext >&5
15639
c0d27fcc 15640( exit $ac_status )
98418dba 15641ac_cv_c_stack_direction=-1
ba4481b5 15642fi
ca81d7a0 15643rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 15644fi
ca81d7a0
JD
15645
15646
98418dba 15647fi
ca81d7a0
JD
15648{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
15649echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 15650
c0d27fcc 15651cat >>confdefs.h <<_ACEOF
98418dba 15652#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
15653_ACEOF
15654
ba4481b5 15655
ba4481b5
DL
15656fi
15657
c0d27fcc 15658
611adb3e
GM
15659if test x"$ac_cv_func_alloca_works" != xyes; then
15660 { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
15661echo "$as_me: error: a system implementation of alloca is required " >&2;}
15662 { (exit 1); exit 1; }; }
15663fi
15664
98418dba
CW
15665# fmod, logb, and frexp are found in -lm on most systems.
15666# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
15667
ca81d7a0
JD
15668{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
15669echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 15670if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 15671 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15672else
98418dba
CW
15673 ac_check_lib_save_LIBS=$LIBS
15674LIBS="-lm $LIBS"
15675cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15676/* confdefs.h. */
15677_ACEOF
15678cat confdefs.h >>conftest.$ac_ext
15679cat >>conftest.$ac_ext <<_ACEOF
15680/* end confdefs.h. */
ba4481b5 15681
ca81d7a0
JD
15682/* Override any GCC internal prototype to avoid an error.
15683 Use char because int might match the return type of a GCC
15684 builtin and then its argument prototype would still apply. */
98418dba
CW
15685#ifdef __cplusplus
15686extern "C"
15687#endif
98418dba 15688char sqrt ();
503d2be0
AS
15689int
15690main ()
15691{
ca81d7a0 15692return sqrt ();
503d2be0
AS
15693 ;
15694 return 0;
15695}
15696_ACEOF
15697rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15698if { (ac_try="$ac_link"
15699case "(($ac_try" in
15700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15701 *) ac_try_echo=$ac_try;;
15702esac
15703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15704 (eval "$ac_link") 2>conftest.er1
503d2be0 15705 ac_status=$?
edfaf76d
LK
15706 grep -v '^ *+' conftest.er1 >conftest.err
15707 rm -f conftest.er1
15708 cat conftest.err >&5
c0d27fcc 15709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15710 (exit $ac_status); } && {
15711 test -z "$ac_c_werror_flag" ||
15712 test ! -s conftest.err
15713 } && test -s conftest$ac_exeext &&
15714 $as_test_x conftest$ac_exeext; then
98418dba 15715 ac_cv_lib_m_sqrt=yes
ba4481b5 15716else
503d2be0 15717 echo "$as_me: failed program was:" >&5
19650fd6
AS
15718sed 's/^/| /' conftest.$ac_ext >&5
15719
ca81d7a0 15720 ac_cv_lib_m_sqrt=no
ba4481b5 15721fi
ca81d7a0 15722
f053c89f 15723rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15724 conftest$ac_exeext conftest.$ac_ext
98418dba 15725LIBS=$ac_check_lib_save_LIBS
ba4481b5 15726fi
ca81d7a0
JD
15727{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
15728echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 15729if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 15730 cat >>confdefs.h <<_ACEOF
98418dba 15731#define HAVE_LIBM 1
c0d27fcc 15732_ACEOF
98418dba
CW
15733
15734 LIBS="-lm $LIBS"
ba4481b5 15735
ba4481b5
DL
15736fi
15737
c0d27fcc 15738
55597d70
DL
15739# Check for mail-locking functions in a "mail" library. Probably this should
15740# have the same check as for liblockfile below.
98418dba 15741
ca81d7a0
JD
15742{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
15743echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 15744if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 15745 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15746else
98418dba
CW
15747 ac_check_lib_save_LIBS=$LIBS
15748LIBS="-lmail $LIBS"
15749cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15750/* confdefs.h. */
15751_ACEOF
15752cat confdefs.h >>conftest.$ac_ext
15753cat >>conftest.$ac_ext <<_ACEOF
15754/* end confdefs.h. */
98418dba 15755
ca81d7a0
JD
15756/* Override any GCC internal prototype to avoid an error.
15757 Use char because int might match the return type of a GCC
15758 builtin and then its argument prototype would still apply. */
98418dba
CW
15759#ifdef __cplusplus
15760extern "C"
15761#endif
98418dba 15762char maillock ();
503d2be0
AS
15763int
15764main ()
15765{
ca81d7a0 15766return maillock ();
503d2be0
AS
15767 ;
15768 return 0;
15769}
15770_ACEOF
15771rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15772if { (ac_try="$ac_link"
15773case "(($ac_try" in
15774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15775 *) ac_try_echo=$ac_try;;
15776esac
15777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15778 (eval "$ac_link") 2>conftest.er1
503d2be0 15779 ac_status=$?
edfaf76d
LK
15780 grep -v '^ *+' conftest.er1 >conftest.err
15781 rm -f conftest.er1
15782 cat conftest.err >&5
c0d27fcc 15783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15784 (exit $ac_status); } && {
15785 test -z "$ac_c_werror_flag" ||
15786 test ! -s conftest.err
15787 } && test -s conftest$ac_exeext &&
15788 $as_test_x conftest$ac_exeext; then
98418dba 15789 ac_cv_lib_mail_maillock=yes
ba4481b5 15790else
503d2be0 15791 echo "$as_me: failed program was:" >&5
19650fd6
AS
15792sed 's/^/| /' conftest.$ac_ext >&5
15793
ca81d7a0 15794 ac_cv_lib_mail_maillock=no
ba4481b5 15795fi
ca81d7a0 15796
f053c89f 15797rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15798 conftest$ac_exeext conftest.$ac_ext
98418dba 15799LIBS=$ac_check_lib_save_LIBS
ba4481b5 15800fi
ca81d7a0
JD
15801{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15802echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 15803if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15804 cat >>confdefs.h <<_ACEOF
98418dba 15805#define HAVE_LIBMAIL 1
c0d27fcc 15806_ACEOF
ba4481b5 15807
98418dba 15808 LIBS="-lmail $LIBS"
ba4481b5 15809
98418dba 15810fi
ba4481b5 15811
c0d27fcc 15812
ca81d7a0
JD
15813{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15814echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15815if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 15816 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15817else
503d2be0 15818 ac_check_lib_save_LIBS=$LIBS
98418dba 15819LIBS="-llockfile $LIBS"
503d2be0 15820cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15821/* confdefs.h. */
15822_ACEOF
15823cat confdefs.h >>conftest.$ac_ext
15824cat >>conftest.$ac_ext <<_ACEOF
15825/* end confdefs.h. */
503d2be0 15826
ca81d7a0
JD
15827/* Override any GCC internal prototype to avoid an error.
15828 Use char because int might match the return type of a GCC
15829 builtin and then its argument prototype would still apply. */
503d2be0
AS
15830#ifdef __cplusplus
15831extern "C"
15832#endif
98418dba 15833char maillock ();
503d2be0
AS
15834int
15835main ()
15836{
ca81d7a0 15837return maillock ();
503d2be0
AS
15838 ;
15839 return 0;
15840}
15841_ACEOF
15842rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15843if { (ac_try="$ac_link"
15844case "(($ac_try" in
15845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15846 *) ac_try_echo=$ac_try;;
15847esac
15848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15849 (eval "$ac_link") 2>conftest.er1
503d2be0 15850 ac_status=$?
edfaf76d
LK
15851 grep -v '^ *+' conftest.er1 >conftest.err
15852 rm -f conftest.er1
15853 cat conftest.err >&5
c0d27fcc 15854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15855 (exit $ac_status); } && {
15856 test -z "$ac_c_werror_flag" ||
15857 test ! -s conftest.err
15858 } && test -s conftest$ac_exeext &&
15859 $as_test_x conftest$ac_exeext; then
98418dba 15860 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
15861else
15862 echo "$as_me: failed program was:" >&5
19650fd6
AS
15863sed 's/^/| /' conftest.$ac_ext >&5
15864
ca81d7a0 15865 ac_cv_lib_lockfile_maillock=no
98418dba 15866fi
ca81d7a0 15867
f053c89f 15868rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15869 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15870LIBS=$ac_check_lib_save_LIBS
15871fi
ca81d7a0
JD
15872{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
15873echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 15874if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 15875 cat >>confdefs.h <<_ACEOF
98418dba 15876#define HAVE_LIBLOCKFILE 1
c0d27fcc 15877_ACEOF
98418dba
CW
15878
15879 LIBS="-llockfile $LIBS"
15880
15881fi
15882
15883# If we have the shared liblockfile, assume we must use it for mail
15884# locking (e.g. Debian). If we couldn't link against liblockfile
15885# (no liblockfile.a installed), ensure that we don't need to.
15886if test "$ac_cv_lib_lockfile_maillock" = no; then
15887 # Extract the first word of "liblockfile.so", so it can be a program name with args.
15888set dummy liblockfile.so; ac_word=$2
ca81d7a0
JD
15889{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15890echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
15891if test "${ac_cv_prog_liblockfile+set}" = set; then
15892 echo $ECHO_N "(cached) $ECHO_C" >&6
15893else
15894 if test -n "$liblockfile"; then
15895 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
15896else
c0d27fcc 15897as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
15898as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
15899for as_dir in $as_dummy
c0d27fcc
MR
15900do
15901 IFS=$as_save_IFS
15902 test -z "$as_dir" && as_dir=.
15903 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 15904 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
15905 ac_cv_prog_liblockfile="yes"
15906 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15907 break 2
15908 fi
15909done
98418dba 15910done
ca81d7a0 15911IFS=$as_save_IFS
98418dba
CW
15912
15913 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 15914fi
503d2be0 15915fi
98418dba
CW
15916liblockfile=$ac_cv_prog_liblockfile
15917if test -n "$liblockfile"; then
ca81d7a0
JD
15918 { echo "$as_me:$LINENO: result: $liblockfile" >&5
15919echo "${ECHO_T}$liblockfile" >&6; }
98418dba 15920else
ca81d7a0
JD
15921 { echo "$as_me:$LINENO: result: no" >&5
15922echo "${ECHO_T}no" >&6; }
ba4481b5
DL
15923fi
15924
ca81d7a0 15925
98418dba 15926 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 15927 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
15928This probably means that movemail could lose mail.
15929There may be a \`development' package to install containing liblockfile." >&5
15930echo "$as_me: error: Shared liblockfile found but can't link against it.
15931This probably means that movemail could lose mail.
15932There may be a \`development' package to install containing liblockfile." >&2;}
15933 { (exit 1); exit 1; }; }
98418dba 15934 else :
55597d70 15935 fi
98418dba 15936fi
503d2be0 15937
98418dba
CW
15938for ac_func in touchlock
15939do
15940as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15941{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15942echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15943if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15944 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 15945else
98418dba 15946 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15947/* confdefs.h. */
15948_ACEOF
15949cat confdefs.h >>conftest.$ac_ext
15950cat >>conftest.$ac_ext <<_ACEOF
15951/* end confdefs.h. */
edfaf76d
LK
15952/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15953 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15954#define $ac_func innocuous_$ac_func
15955
98418dba 15956/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15957 which can conflict with char $ac_func (); below.
15958 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15959 <limits.h> exists even on freestanding compilers. */
edfaf76d 15960
19650fd6
AS
15961#ifdef __STDC__
15962# include <limits.h>
15963#else
15964# include <assert.h>
15965#endif
edfaf76d
LK
15966
15967#undef $ac_func
15968
ca81d7a0
JD
15969/* Override any GCC internal prototype to avoid an error.
15970 Use char because int might match the return type of a GCC
15971 builtin and then its argument prototype would still apply. */
503d2be0
AS
15972#ifdef __cplusplus
15973extern "C"
15974#endif
98418dba 15975char $ac_func ();
98418dba
CW
15976/* The GNU C library defines this for functions which it implements
15977 to always fail with ENOSYS. Some functions are actually named
15978 something starting with __ and the normal name is an alias. */
ca81d7a0 15979#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15980choke me
cd958eb3
MB
15981#endif
15982
19650fd6
AS
15983int
15984main ()
15985{
ca81d7a0 15986return $ac_func ();
503d2be0
AS
15987 ;
15988 return 0;
15989}
15990_ACEOF
15991rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15992if { (ac_try="$ac_link"
15993case "(($ac_try" in
15994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15995 *) ac_try_echo=$ac_try;;
15996esac
15997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15998 (eval "$ac_link") 2>conftest.er1
503d2be0 15999 ac_status=$?
edfaf76d
LK
16000 grep -v '^ *+' conftest.er1 >conftest.err
16001 rm -f conftest.er1
16002 cat conftest.err >&5
c0d27fcc 16003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16004 (exit $ac_status); } && {
16005 test -z "$ac_c_werror_flag" ||
16006 test ! -s conftest.err
16007 } && test -s conftest$ac_exeext &&
16008 $as_test_x conftest$ac_exeext; then
98418dba 16009 eval "$as_ac_var=yes"
503d2be0
AS
16010else
16011 echo "$as_me: failed program was:" >&5
19650fd6
AS
16012sed 's/^/| /' conftest.$ac_ext >&5
16013
ca81d7a0 16014 eval "$as_ac_var=no"
503d2be0 16015fi
ca81d7a0 16016
f053c89f 16017rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16018 conftest$ac_exeext conftest.$ac_ext
503d2be0 16019fi
ca81d7a0
JD
16020ac_res=`eval echo '${'$as_ac_var'}'`
16021 { echo "$as_me:$LINENO: result: $ac_res" >&5
16022echo "${ECHO_T}$ac_res" >&6; }
98418dba 16023if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16024 cat >>confdefs.h <<_ACEOF
98418dba 16025#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16026_ACEOF
457b792c 16027
457b792c 16028fi
98418dba 16029done
457b792c 16030
c0d27fcc 16031
98418dba
CW
16032for ac_header in maillock.h
16033do
16034as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16035if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16036 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16037echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16038if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16039 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16040fi
ca81d7a0
JD
16041ac_res=`eval echo '${'$as_ac_Header'}'`
16042 { echo "$as_me:$LINENO: result: $ac_res" >&5
16043echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 16044else
c0d27fcc 16045 # Is the header compilable?
ca81d7a0
JD
16046{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16047echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16048cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16049/* confdefs.h. */
16050_ACEOF
16051cat confdefs.h >>conftest.$ac_ext
16052cat >>conftest.$ac_ext <<_ACEOF
16053/* end confdefs.h. */
c0d27fcc
MR
16054$ac_includes_default
16055#include <$ac_header>
16056_ACEOF
16057rm -f conftest.$ac_objext
ca81d7a0
JD
16058if { (ac_try="$ac_compile"
16059case "(($ac_try" in
16060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16061 *) ac_try_echo=$ac_try;;
16062esac
16063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16064 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16065 ac_status=$?
edfaf76d
LK
16066 grep -v '^ *+' conftest.er1 >conftest.err
16067 rm -f conftest.er1
16068 cat conftest.err >&5
c0d27fcc 16069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16070 (exit $ac_status); } && {
16071 test -z "$ac_c_werror_flag" ||
16072 test ! -s conftest.err
16073 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16074 ac_header_compiler=yes
16075else
16076 echo "$as_me: failed program was:" >&5
19650fd6
AS
16077sed 's/^/| /' conftest.$ac_ext >&5
16078
ca81d7a0 16079 ac_header_compiler=no
c0d27fcc 16080fi
ca81d7a0
JD
16081
16082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16083{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16084echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16085
16086# Is the header present?
ca81d7a0
JD
16087{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16088echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16089cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16090/* confdefs.h. */
16091_ACEOF
16092cat confdefs.h >>conftest.$ac_ext
16093cat >>conftest.$ac_ext <<_ACEOF
16094/* end confdefs.h. */
98418dba 16095#include <$ac_header>
503d2be0 16096_ACEOF
ca81d7a0
JD
16097if { (ac_try="$ac_cpp conftest.$ac_ext"
16098case "(($ac_try" in
16099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16100 *) ac_try_echo=$ac_try;;
16101esac
16102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16103 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16104 ac_status=$?
6bae0ccf 16105 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16106 rm -f conftest.er1
16107 cat conftest.err >&5
c0d27fcc 16108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16109 (exit $ac_status); } >/dev/null && {
16110 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16111 test ! -s conftest.err
16112 }; then
c0d27fcc 16113 ac_header_preproc=yes
98418dba
CW
16114else
16115 echo "$as_me: failed program was:" >&5
19650fd6
AS
16116sed 's/^/| /' conftest.$ac_ext >&5
16117
c0d27fcc 16118 ac_header_preproc=no
503d2be0 16119fi
ca81d7a0 16120
98418dba 16121rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16122{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16123echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16124
16125# So? What about this header?
edfaf76d
LK
16126case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16127 yes:no: )
c0d27fcc
MR
16128 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16129echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16130 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16131echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16132 ac_header_preproc=yes
19650fd6 16133 ;;
edfaf76d 16134 no:yes:* )
c0d27fcc
MR
16135 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16136echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16137 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16138echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16139 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16140echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16141 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16142echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16143 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16144echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16145 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16146echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16147
19650fd6 16148 ;;
c0d27fcc 16149esac
ca81d7a0
JD
16150{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16151echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16152if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16153 echo $ECHO_N "(cached) $ECHO_C" >&6
16154else
edfaf76d 16155 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16156fi
ca81d7a0
JD
16157ac_res=`eval echo '${'$as_ac_Header'}'`
16158 { echo "$as_me:$LINENO: result: $ac_res" >&5
16159echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16160
16161fi
98418dba 16162if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16163 cat >>confdefs.h <<_ACEOF
98418dba 16164#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16165_ACEOF
48d4b120 16166
ba4481b5 16167fi
c0d27fcc 16168
98418dba
CW
16169done
16170
c0d27fcc
MR
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
22044edf
DL
16226
16227
c0d27fcc 16228
b0e44248
RB
16229
16230
973a76b1
DL
16231
16232
16233
cd958eb3 16234
25ca0bca 16235
ea92fc9f 16236
2d3c36ae
SM
16237
16238
e2fcf543 16239
5acf240e 16240
c0d27fcc
MR
16241
16242
98418dba 16243for ac_func in gethostname getdomainname dup2 \
e2fcf543 16244rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
bc3512d0 16245random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
98418dba 16246strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
5acf240e 16247utimes getrlimit setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
16248__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
16249sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 16250gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
2d3c36ae
SM
16251memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
16252cfmakeraw cfsetspeed
98418dba
CW
16253do
16254as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16255{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16256echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16257if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16258 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16259else
503d2be0 16260 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16261/* confdefs.h. */
16262_ACEOF
16263cat confdefs.h >>conftest.$ac_ext
16264cat >>conftest.$ac_ext <<_ACEOF
16265/* end confdefs.h. */
edfaf76d
LK
16266/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16267 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16268#define $ac_func innocuous_$ac_func
16269
98418dba 16270/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16271 which can conflict with char $ac_func (); below.
16272 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16273 <limits.h> exists even on freestanding compilers. */
edfaf76d 16274
19650fd6
AS
16275#ifdef __STDC__
16276# include <limits.h>
16277#else
16278# include <assert.h>
16279#endif
edfaf76d
LK
16280
16281#undef $ac_func
16282
ca81d7a0
JD
16283/* Override any GCC internal prototype to avoid an error.
16284 Use char because int might match the return type of a GCC
16285 builtin and then its argument prototype would still apply. */
503d2be0
AS
16286#ifdef __cplusplus
16287extern "C"
16288#endif
98418dba 16289char $ac_func ();
98418dba
CW
16290/* The GNU C library defines this for functions which it implements
16291 to always fail with ENOSYS. Some functions are actually named
16292 something starting with __ and the normal name is an alias. */
ca81d7a0 16293#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16294choke me
98418dba
CW
16295#endif
16296
19650fd6
AS
16297int
16298main ()
16299{
ca81d7a0 16300return $ac_func ();
503d2be0
AS
16301 ;
16302 return 0;
16303}
16304_ACEOF
16305rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16306if { (ac_try="$ac_link"
16307case "(($ac_try" in
16308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16309 *) ac_try_echo=$ac_try;;
16310esac
16311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16312 (eval "$ac_link") 2>conftest.er1
503d2be0 16313 ac_status=$?
edfaf76d
LK
16314 grep -v '^ *+' conftest.er1 >conftest.err
16315 rm -f conftest.er1
16316 cat conftest.err >&5
c0d27fcc 16317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16318 (exit $ac_status); } && {
16319 test -z "$ac_c_werror_flag" ||
16320 test ! -s conftest.err
16321 } && test -s conftest$ac_exeext &&
16322 $as_test_x conftest$ac_exeext; then
98418dba 16323 eval "$as_ac_var=yes"
503d2be0
AS
16324else
16325 echo "$as_me: failed program was:" >&5
19650fd6
AS
16326sed 's/^/| /' conftest.$ac_ext >&5
16327
ca81d7a0 16328 eval "$as_ac_var=no"
503d2be0 16329fi
ca81d7a0 16330
f053c89f 16331rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16332 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16333fi
ca81d7a0
JD
16334ac_res=`eval echo '${'$as_ac_var'}'`
16335 { echo "$as_me:$LINENO: result: $ac_res" >&5
16336echo "${ECHO_T}$ac_res" >&6; }
98418dba 16337if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16338 cat >>confdefs.h <<_ACEOF
98418dba 16339#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16340_ACEOF
ba4481b5 16341
ba4481b5 16342fi
98418dba 16343done
ba4481b5 16344
c0d27fcc
MR
16345
16346
98418dba
CW
16347for ac_header in sys/un.h
16348do
16349as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16350if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16351 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16352echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16353if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 16354 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16355fi
ca81d7a0
JD
16356ac_res=`eval echo '${'$as_ac_Header'}'`
16357 { echo "$as_me:$LINENO: result: $ac_res" >&5
16358echo "${ECHO_T}$ac_res" >&6; }
98418dba 16359else
c0d27fcc 16360 # Is the header compilable?
ca81d7a0
JD
16361{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16362echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16363cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16364/* confdefs.h. */
16365_ACEOF
16366cat confdefs.h >>conftest.$ac_ext
16367cat >>conftest.$ac_ext <<_ACEOF
16368/* end confdefs.h. */
c0d27fcc
MR
16369$ac_includes_default
16370#include <$ac_header>
16371_ACEOF
16372rm -f conftest.$ac_objext
ca81d7a0
JD
16373if { (ac_try="$ac_compile"
16374case "(($ac_try" in
16375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16376 *) ac_try_echo=$ac_try;;
16377esac
16378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16379 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16380 ac_status=$?
edfaf76d
LK
16381 grep -v '^ *+' conftest.er1 >conftest.err
16382 rm -f conftest.er1
16383 cat conftest.err >&5
c0d27fcc 16384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
16385 (exit $ac_status); } && {
16386 test -z "$ac_c_werror_flag" ||
16387 test ! -s conftest.err
16388 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16389 ac_header_compiler=yes
16390else
16391 echo "$as_me: failed program was:" >&5
19650fd6
AS
16392sed 's/^/| /' conftest.$ac_ext >&5
16393
ca81d7a0 16394 ac_header_compiler=no
c0d27fcc 16395fi
ca81d7a0
JD
16396
16397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16398{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16399echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16400
16401# Is the header present?
ca81d7a0
JD
16402{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16403echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16404cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16405/* confdefs.h. */
16406_ACEOF
16407cat confdefs.h >>conftest.$ac_ext
16408cat >>conftest.$ac_ext <<_ACEOF
16409/* end confdefs.h. */
98418dba 16410#include <$ac_header>
503d2be0 16411_ACEOF
ca81d7a0
JD
16412if { (ac_try="$ac_cpp conftest.$ac_ext"
16413case "(($ac_try" in
16414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16415 *) ac_try_echo=$ac_try;;
16416esac
16417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16418 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16419 ac_status=$?
6bae0ccf 16420 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16421 rm -f conftest.er1
16422 cat conftest.err >&5
c0d27fcc 16423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16424 (exit $ac_status); } >/dev/null && {
16425 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16426 test ! -s conftest.err
16427 }; then
c0d27fcc 16428 ac_header_preproc=yes
ba4481b5 16429else
503d2be0 16430 echo "$as_me: failed program was:" >&5
19650fd6
AS
16431sed 's/^/| /' conftest.$ac_ext >&5
16432
c0d27fcc 16433 ac_header_preproc=no
ba4481b5 16434fi
ca81d7a0 16435
503d2be0 16436rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16437{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16438echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16439
16440# So? What about this header?
edfaf76d
LK
16441case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16442 yes:no: )
c0d27fcc
MR
16443 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16444echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16445 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16446echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16447 ac_header_preproc=yes
19650fd6 16448 ;;
edfaf76d 16449 no:yes:* )
c0d27fcc
MR
16450 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16451echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16452 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16453echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16454 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16455echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16456 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16457echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16458 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16459echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16460 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16461echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16462
19650fd6 16463 ;;
c0d27fcc 16464esac
ca81d7a0
JD
16465{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16466echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16467if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16468 echo $ECHO_N "(cached) $ECHO_C" >&6
16469else
edfaf76d 16470 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16471fi
ca81d7a0
JD
16472ac_res=`eval echo '${'$as_ac_Header'}'`
16473 { echo "$as_me:$LINENO: result: $ac_res" >&5
16474echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16475
16476fi
925c2f3f 16477if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16478 cat >>confdefs.h <<_ACEOF
925c2f3f 16479#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16480_ACEOF
503d2be0 16481
925c2f3f 16482fi
c0d27fcc 16483
925c2f3f
EZ
16484done
16485
c0d27fcc
MR
16486
16487
16488
edfaf76d 16489
f053c89f
CY
16490
16491for ac_header in $ac_header_list
925c2f3f
EZ
16492do
16493as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16494if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16495 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16496echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16497if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 16498 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16499fi
ca81d7a0
JD
16500ac_res=`eval echo '${'$as_ac_Header'}'`
16501 { echo "$as_me:$LINENO: result: $ac_res" >&5
16502echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 16503else
c0d27fcc 16504 # Is the header compilable?
ca81d7a0
JD
16505{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16506echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16507cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16508/* confdefs.h. */
16509_ACEOF
16510cat confdefs.h >>conftest.$ac_ext
16511cat >>conftest.$ac_ext <<_ACEOF
16512/* end confdefs.h. */
c0d27fcc
MR
16513$ac_includes_default
16514#include <$ac_header>
16515_ACEOF
16516rm -f conftest.$ac_objext
ca81d7a0
JD
16517if { (ac_try="$ac_compile"
16518case "(($ac_try" in
16519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16520 *) ac_try_echo=$ac_try;;
16521esac
16522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16523 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16524 ac_status=$?
edfaf76d
LK
16525 grep -v '^ *+' conftest.er1 >conftest.err
16526 rm -f conftest.er1
16527 cat conftest.err >&5
c0d27fcc 16528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16529 (exit $ac_status); } && {
16530 test -z "$ac_c_werror_flag" ||
16531 test ! -s conftest.err
16532 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16533 ac_header_compiler=yes
16534else
16535 echo "$as_me: failed program was:" >&5
19650fd6
AS
16536sed 's/^/| /' conftest.$ac_ext >&5
16537
ca81d7a0 16538 ac_header_compiler=no
c0d27fcc 16539fi
ca81d7a0
JD
16540
16541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16542{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16543echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16544
16545# Is the header present?
ca81d7a0
JD
16546{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16547echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16548cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16549/* confdefs.h. */
16550_ACEOF
16551cat confdefs.h >>conftest.$ac_ext
16552cat >>conftest.$ac_ext <<_ACEOF
16553/* end confdefs.h. */
98418dba 16554#include <$ac_header>
503d2be0 16555_ACEOF
ca81d7a0
JD
16556if { (ac_try="$ac_cpp conftest.$ac_ext"
16557case "(($ac_try" in
16558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16559 *) ac_try_echo=$ac_try;;
16560esac
16561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16562 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16563 ac_status=$?
6bae0ccf 16564 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16565 rm -f conftest.er1
16566 cat conftest.err >&5
c0d27fcc 16567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16568 (exit $ac_status); } >/dev/null && {
16569 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16570 test ! -s conftest.err
16571 }; then
c0d27fcc 16572 ac_header_preproc=yes
98418dba
CW
16573else
16574 echo "$as_me: failed program was:" >&5
19650fd6
AS
16575sed 's/^/| /' conftest.$ac_ext >&5
16576
c0d27fcc 16577 ac_header_preproc=no
98418dba 16578fi
ca81d7a0 16579
98418dba 16580rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16581{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16582echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16583
16584# So? What about this header?
edfaf76d
LK
16585case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16586 yes:no: )
c0d27fcc
MR
16587 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16588echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16589 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16590echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16591 ac_header_preproc=yes
19650fd6 16592 ;;
edfaf76d 16593 no:yes:* )
c0d27fcc
MR
16594 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16595echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16596 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16597echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16598 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16599echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16600 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16601echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16602 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16603echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16604 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16605echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16606
19650fd6 16607 ;;
c0d27fcc 16608esac
ca81d7a0
JD
16609{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16610echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16611if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16612 echo $ECHO_N "(cached) $ECHO_C" >&6
16613else
edfaf76d 16614 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 16615fi
ca81d7a0
JD
16616ac_res=`eval echo '${'$as_ac_Header'}'`
16617 { echo "$as_me:$LINENO: result: $ac_res" >&5
16618echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16619
16620fi
98418dba 16621if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16622 cat >>confdefs.h <<_ACEOF
98418dba 16623#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16624_ACEOF
98418dba
CW
16625
16626fi
c0d27fcc 16627
98418dba
CW
16628done
16629
c0d27fcc 16630
f053c89f
CY
16631
16632
16633
16634
16635
16636
16637
16638for ac_func in $ac_func_list
98418dba
CW
16639do
16640as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16641{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16642echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16643if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16644 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16645else
98418dba 16646 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16647/* confdefs.h. */
16648_ACEOF
16649cat confdefs.h >>conftest.$ac_ext
16650cat >>conftest.$ac_ext <<_ACEOF
16651/* end confdefs.h. */
edfaf76d
LK
16652/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16653 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16654#define $ac_func innocuous_$ac_func
16655
98418dba 16656/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16657 which can conflict with char $ac_func (); below.
16658 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16659 <limits.h> exists even on freestanding compilers. */
edfaf76d 16660
19650fd6
AS
16661#ifdef __STDC__
16662# include <limits.h>
16663#else
16664# include <assert.h>
16665#endif
edfaf76d
LK
16666
16667#undef $ac_func
16668
ca81d7a0
JD
16669/* Override any GCC internal prototype to avoid an error.
16670 Use char because int might match the return type of a GCC
16671 builtin and then its argument prototype would still apply. */
503d2be0
AS
16672#ifdef __cplusplus
16673extern "C"
16674#endif
98418dba 16675char $ac_func ();
98418dba
CW
16676/* The GNU C library defines this for functions which it implements
16677 to always fail with ENOSYS. Some functions are actually named
16678 something starting with __ and the normal name is an alias. */
ca81d7a0 16679#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16680choke me
98418dba
CW
16681#endif
16682
19650fd6
AS
16683int
16684main ()
16685{
ca81d7a0 16686return $ac_func ();
503d2be0
AS
16687 ;
16688 return 0;
16689}
16690_ACEOF
16691rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16692if { (ac_try="$ac_link"
16693case "(($ac_try" in
16694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16695 *) ac_try_echo=$ac_try;;
16696esac
16697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16698 (eval "$ac_link") 2>conftest.er1
503d2be0 16699 ac_status=$?
edfaf76d
LK
16700 grep -v '^ *+' conftest.er1 >conftest.err
16701 rm -f conftest.er1
16702 cat conftest.err >&5
c0d27fcc 16703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16704 (exit $ac_status); } && {
16705 test -z "$ac_c_werror_flag" ||
16706 test ! -s conftest.err
16707 } && test -s conftest$ac_exeext &&
16708 $as_test_x conftest$ac_exeext; then
98418dba 16709 eval "$as_ac_var=yes"
503d2be0
AS
16710else
16711 echo "$as_me: failed program was:" >&5
19650fd6
AS
16712sed 's/^/| /' conftest.$ac_ext >&5
16713
ca81d7a0 16714 eval "$as_ac_var=no"
503d2be0 16715fi
ca81d7a0 16716
f053c89f 16717rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16718 conftest$ac_exeext conftest.$ac_ext
ffe36136 16719fi
ca81d7a0
JD
16720ac_res=`eval echo '${'$as_ac_var'}'`
16721 { echo "$as_me:$LINENO: result: $ac_res" >&5
16722echo "${ECHO_T}$ac_res" >&6; }
98418dba 16723if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16724 cat >>confdefs.h <<_ACEOF
98418dba 16725#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16726_ACEOF
ffe36136 16727
ba4481b5 16728fi
98418dba 16729done
ba4481b5 16730
f053c89f
CY
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
ca81d7a0
JD
16747{ echo "$as_me:$LINENO: checking for working mktime" >&5
16748echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
16749if test "${ac_cv_func_working_mktime+set}" = set; then
16750 echo $ECHO_N "(cached) $ECHO_C" >&6
16751else
16752 if test "$cross_compiling" = yes; then
16753 ac_cv_func_working_mktime=no
16754else
16755 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16756/* confdefs.h. */
16757_ACEOF
16758cat confdefs.h >>conftest.$ac_ext
16759cat >>conftest.$ac_ext <<_ACEOF
16760/* end confdefs.h. */
98418dba 16761/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 16762#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16763# include <sys/time.h>
16764# include <time.h>
16765#else
f053c89f 16766# ifdef HAVE_SYS_TIME_H
98418dba
CW
16767# include <sys/time.h>
16768# else
16769# include <time.h>
16770# endif
16771#endif
ba4481b5 16772
8801ee60 16773#include <limits.h>
f053c89f 16774#include <stdlib.h>
edfaf76d 16775
f053c89f 16776#ifdef HAVE_UNISTD_H
98418dba
CW
16777# include <unistd.h>
16778#endif
ba4481b5 16779
f053c89f 16780#ifndef HAVE_ALARM
98418dba
CW
16781# define alarm(X) /* empty */
16782#endif
df645f7c 16783
98418dba
CW
16784/* Work around redefinition to rpl_putenv by other config tests. */
16785#undef putenv
df645f7c 16786
98418dba 16787static time_t time_t_max;
edfaf76d 16788static time_t time_t_min;
df645f7c 16789
98418dba 16790/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16791static char *tz_strings[] = {
16792 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16793 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16794};
16795#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16796
ca81d7a0 16797/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16798 Based on a problem report from Andreas Jaeger. */
ca81d7a0 16799static int
98418dba
CW
16800spring_forward_gap ()
16801{
16802 /* glibc (up to about 1998-10-07) failed this test. */
16803 struct tm tm;
16804
16805 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16806 instead of "TZ=America/Vancouver" in order to detect the bug even
16807 on systems that don't support the Olson extension, or don't have the
16808 full zoneinfo tables installed. */
16809 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16810
16811 tm.tm_year = 98;
16812 tm.tm_mon = 3;
16813 tm.tm_mday = 5;
16814 tm.tm_hour = 2;
16815 tm.tm_min = 0;
16816 tm.tm_sec = 0;
16817 tm.tm_isdst = -1;
ca81d7a0 16818 return mktime (&tm) != (time_t) -1;
98418dba
CW
16819}
16820
ca81d7a0 16821static int
edfaf76d 16822mktime_test1 (now)
98418dba
CW
16823 time_t now;
16824{
16825 struct tm *lt;
ca81d7a0 16826 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16827}
16828
ca81d7a0 16829static int
edfaf76d
LK
16830mktime_test (now)
16831 time_t now;
16832{
ca81d7a0
JD
16833 return (mktime_test1 (now)
16834 && mktime_test1 ((time_t) (time_t_max - now))
16835 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16836}
16837
ca81d7a0 16838static int
98418dba
CW
16839irix_6_4_bug ()
16840{
16841 /* Based on code from Ariel Faigon. */
16842 struct tm tm;
16843 tm.tm_year = 96;
16844 tm.tm_mon = 3;
16845 tm.tm_mday = 0;
16846 tm.tm_hour = 0;
16847 tm.tm_min = 0;
16848 tm.tm_sec = 0;
16849 tm.tm_isdst = -1;
16850 mktime (&tm);
ca81d7a0 16851 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16852}
16853
ca81d7a0 16854static int
98418dba
CW
16855bigtime_test (j)
16856 int j;
16857{
16858 struct tm tm;
16859 time_t now;
16860 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16861 now = mktime (&tm);
16862 if (now != (time_t) -1)
16863 {
16864 struct tm *lt = localtime (&now);
16865 if (! (lt
16866 && lt->tm_year == tm.tm_year
16867 && lt->tm_mon == tm.tm_mon
16868 && lt->tm_mday == tm.tm_mday
16869 && lt->tm_hour == tm.tm_hour
16870 && lt->tm_min == tm.tm_min
16871 && lt->tm_sec == tm.tm_sec
16872 && lt->tm_yday == tm.tm_yday
16873 && lt->tm_wday == tm.tm_wday
16874 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16875 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 16876 return 0;
98418dba 16877 }
ca81d7a0 16878 return 1;
98418dba
CW
16879}
16880
f053c89f
CY
16881static int
16882year_2050_test ()
16883{
16884 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16885 ignoring leap seconds. */
16886 unsigned long int answer = 2527315200UL;
16887
16888 struct tm tm;
16889 time_t t;
16890 tm.tm_year = 2050 - 1900;
16891 tm.tm_mon = 2 - 1;
16892 tm.tm_mday = 1;
16893 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16894 tm.tm_isdst = -1;
16895
16896 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16897 instead of "TZ=America/Vancouver" in order to detect the bug even
16898 on systems that don't support the Olson extension, or don't have the
16899 full zoneinfo tables installed. */
16900 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16901
16902 t = mktime (&tm);
16903
16904 /* Check that the result is either a failure, or close enough
16905 to the correct answer that we can assume the discrepancy is
16906 due to leap seconds. */
16907 return (t == (time_t) -1
16908 || (0 < t && answer - 120 <= t && t <= answer + 120));
98418dba
CW
16909}
16910
16911int
16912main ()
16913{
16914 time_t t, delta;
16915 int i, j;
16916
16917 /* This test makes some buggy mktime implementations loop.
16918 Give up after 60 seconds; a mktime slower than that
16919 isn't worth using anyway. */
16920 alarm (60);
16921
8801ee60
RF
16922 for (;;)
16923 {
16924 t = (time_t_max << 1) + 1;
16925 if (t <= time_t_max)
16926 break;
16927 time_t_max = t;
16928 }
16929 time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
16930
98418dba
CW
16931 delta = time_t_max / 997; /* a suitable prime number */
16932 for (i = 0; i < N_STRINGS; i++)
16933 {
16934 if (tz_strings[i])
16935 putenv (tz_strings[i]);
503d2be0 16936
98418dba 16937 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
16938 if (! mktime_test (t))
16939 return 1;
16940 if (! (mktime_test ((time_t) 1)
16941 && mktime_test ((time_t) (60 * 60))
16942 && mktime_test ((time_t) (60 * 60 * 24))))
16943 return 1;
98418dba 16944
8801ee60 16945 for (j = 1; ; j <<= 1)
ca81d7a0
JD
16946 if (! bigtime_test (j))
16947 return 1;
8801ee60
RF
16948 else if (INT_MAX / 2 < j)
16949 break;
16950 if (! bigtime_test (INT_MAX))
ca81d7a0 16951 return 1;
98418dba 16952 }
f053c89f 16953 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
16954}
16955_ACEOF
98418dba 16956rm -f conftest$ac_exeext
ca81d7a0
JD
16957if { (ac_try="$ac_link"
16958case "(($ac_try" in
16959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16960 *) ac_try_echo=$ac_try;;
16961esac
16962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16963 (eval "$ac_link") 2>&5
503d2be0 16964 ac_status=$?
c0d27fcc 16965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 16966 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
16967 { (case "(($ac_try" in
16968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16969 *) ac_try_echo=$ac_try;;
16970esac
16971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16972 (eval "$ac_try") 2>&5
503d2be0 16973 ac_status=$?
c0d27fcc 16974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16975 (exit $ac_status); }; }; then
98418dba 16976 ac_cv_func_working_mktime=yes
503d2be0 16977else
98418dba
CW
16978 echo "$as_me: program exited with status $ac_status" >&5
16979echo "$as_me: failed program was:" >&5
19650fd6
AS
16980sed 's/^/| /' conftest.$ac_ext >&5
16981
c0d27fcc 16982( exit $ac_status )
98418dba 16983ac_cv_func_working_mktime=no
503d2be0 16984fi
ca81d7a0 16985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 16986fi
ca81d7a0
JD
16987
16988
ba4481b5 16989fi
ca81d7a0
JD
16990{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
16991echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 16992if test $ac_cv_func_working_mktime = no; then
ca81d7a0 16993 case " $LIBOBJS " in
edfaf76d 16994 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
16995 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
16996 ;;
edfaf76d
LK
16997esac
16998
ba4481b5
DL
16999fi
17000
98418dba 17001if test "$ac_cv_func_working_mktime" = no; then
b936fae4 17002
c0d27fcc 17003cat >>confdefs.h <<\_ACEOF
98418dba 17004#define BROKEN_MKTIME 1
c0d27fcc 17005_ACEOF
ba4481b5 17006
ba4481b5 17007fi
503d2be0 17008
98418dba
CW
17009ac_have_func=no # yes means we've found a way to get the load average.
17010
6bae0ccf
DL
17011# Make sure getloadavg.c is where it belongs, at configure-time.
17012test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
17013 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
17014echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
17015 { (exit 1); exit 1; }; }
17016
98418dba
CW
17017ac_save_LIBS=$LIBS
17018
17019# Check for getloadavg, but be sure not to touch the cache variable.
ca81d7a0
JD
17020({ echo "$as_me:$LINENO: checking for getloadavg" >&5
17021echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 17022if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 17023 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17024else
503d2be0 17025 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17026/* confdefs.h. */
17027_ACEOF
17028cat confdefs.h >>conftest.$ac_ext
17029cat >>conftest.$ac_ext <<_ACEOF
17030/* end confdefs.h. */
edfaf76d
LK
17031/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
17032 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17033#define getloadavg innocuous_getloadavg
17034
98418dba 17035/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17036 which can conflict with char getloadavg (); below.
17037 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17038 <limits.h> exists even on freestanding compilers. */
edfaf76d 17039
19650fd6
AS
17040#ifdef __STDC__
17041# include <limits.h>
17042#else
17043# include <assert.h>
17044#endif
edfaf76d
LK
17045
17046#undef getloadavg
17047
ca81d7a0
JD
17048/* Override any GCC internal prototype to avoid an error.
17049 Use char because int might match the return type of a GCC
17050 builtin and then its argument prototype would still apply. */
503d2be0
AS
17051#ifdef __cplusplus
17052extern "C"
17053#endif
98418dba 17054char getloadavg ();
98418dba
CW
17055/* The GNU C library defines this for functions which it implements
17056 to always fail with ENOSYS. Some functions are actually named
17057 something starting with __ and the normal name is an alias. */
ca81d7a0 17058#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 17059choke me
cd958eb3
MB
17060#endif
17061
19650fd6
AS
17062int
17063main ()
17064{
ca81d7a0 17065return getloadavg ();
503d2be0
AS
17066 ;
17067 return 0;
17068}
17069_ACEOF
17070rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17071if { (ac_try="$ac_link"
17072case "(($ac_try" in
17073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17074 *) ac_try_echo=$ac_try;;
17075esac
17076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17077 (eval "$ac_link") 2>conftest.er1
503d2be0 17078 ac_status=$?
edfaf76d
LK
17079 grep -v '^ *+' conftest.er1 >conftest.err
17080 rm -f conftest.er1
17081 cat conftest.err >&5
c0d27fcc 17082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17083 (exit $ac_status); } && {
17084 test -z "$ac_c_werror_flag" ||
17085 test ! -s conftest.err
17086 } && test -s conftest$ac_exeext &&
17087 $as_test_x conftest$ac_exeext; then
98418dba 17088 ac_cv_func_getloadavg=yes
503d2be0
AS
17089else
17090 echo "$as_me: failed program was:" >&5
19650fd6
AS
17091sed 's/^/| /' conftest.$ac_ext >&5
17092
ca81d7a0 17093 ac_cv_func_getloadavg=no
503d2be0 17094fi
ca81d7a0 17095
f053c89f 17096rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17097 conftest$ac_exeext conftest.$ac_ext
ba4481b5 17098fi
ca81d7a0
JD
17099{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
17100echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
17101if test $ac_cv_func_getloadavg = yes; then
17102 exit 0
17103else
17104 exit 1
ba4481b5 17105fi
98418dba 17106) && ac_have_func=yes
ba4481b5 17107
98418dba 17108# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 17109
98418dba
CW
17110for ac_func in pstat_getdynamic
17111do
17112as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17113{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17114echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17115if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17116 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17117else
503d2be0 17118 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17119/* confdefs.h. */
17120_ACEOF
17121cat confdefs.h >>conftest.$ac_ext
17122cat >>conftest.$ac_ext <<_ACEOF
17123/* end confdefs.h. */
edfaf76d
LK
17124/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17125 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17126#define $ac_func innocuous_$ac_func
17127
98418dba 17128/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17129 which can conflict with char $ac_func (); below.
17130 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17131 <limits.h> exists even on freestanding compilers. */
edfaf76d 17132
19650fd6
AS
17133#ifdef __STDC__
17134# include <limits.h>
17135#else
17136# include <assert.h>
17137#endif
edfaf76d
LK
17138
17139#undef $ac_func
17140
ca81d7a0
JD
17141/* Override any GCC internal prototype to avoid an error.
17142 Use char because int might match the return type of a GCC
17143 builtin and then its argument prototype would still apply. */
503d2be0
AS
17144#ifdef __cplusplus
17145extern "C"
17146#endif
98418dba 17147char $ac_func ();
98418dba
CW
17148/* The GNU C library defines this for functions which it implements
17149 to always fail with ENOSYS. Some functions are actually named
17150 something starting with __ and the normal name is an alias. */
ca81d7a0 17151#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 17152choke me
98418dba
CW
17153#endif
17154
19650fd6
AS
17155int
17156main ()
17157{
ca81d7a0 17158return $ac_func ();
98418dba
CW
17159 ;
17160 return 0;
17161}
f21fadcc 17162_ACEOF
98418dba 17163rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17164if { (ac_try="$ac_link"
17165case "(($ac_try" in
17166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17167 *) ac_try_echo=$ac_try;;
17168esac
17169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17170 (eval "$ac_link") 2>conftest.er1
f21fadcc 17171 ac_status=$?
edfaf76d
LK
17172 grep -v '^ *+' conftest.er1 >conftest.err
17173 rm -f conftest.er1
17174 cat conftest.err >&5
c0d27fcc 17175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17176 (exit $ac_status); } && {
17177 test -z "$ac_c_werror_flag" ||
17178 test ! -s conftest.err
17179 } && test -s conftest$ac_exeext &&
17180 $as_test_x conftest$ac_exeext; then
98418dba 17181 eval "$as_ac_var=yes"
f21fadcc
JD
17182else
17183 echo "$as_me: failed program was:" >&5
19650fd6
AS
17184sed 's/^/| /' conftest.$ac_ext >&5
17185
ca81d7a0 17186 eval "$as_ac_var=no"
f21fadcc 17187fi
ca81d7a0 17188
f053c89f 17189rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17190 conftest$ac_exeext conftest.$ac_ext
f21fadcc 17191fi
ca81d7a0
JD
17192ac_res=`eval echo '${'$as_ac_var'}'`
17193 { echo "$as_me:$LINENO: result: $ac_res" >&5
17194echo "${ECHO_T}$ac_res" >&6; }
98418dba 17195if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17196 cat >>confdefs.h <<_ACEOF
98418dba 17197#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17198_ACEOF
98418dba
CW
17199
17200fi
17201done
17202
c0d27fcc 17203
98418dba
CW
17204# Solaris has libkstat which does not require root.
17205
ca81d7a0
JD
17206{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
17207echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 17208if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
17209 echo $ECHO_N "(cached) $ECHO_C" >&6
17210else
17211 ac_check_lib_save_LIBS=$LIBS
98418dba 17212LIBS="-lkstat $LIBS"
f21fadcc 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. */
f21fadcc 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. */
f21fadcc
JD
17223#ifdef __cplusplus
17224extern "C"
17225#endif
98418dba 17226char kstat_open ();
f21fadcc
JD
17227int
17228main ()
17229{
ca81d7a0 17230return kstat_open ();
f21fadcc
JD
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
f21fadcc 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
f053c89f
CY
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_kstat_kstat_open=yes
f21fadcc
JD
17254else
17255 echo "$as_me: failed program was:" >&5
19650fd6
AS
17256sed 's/^/| /' conftest.$ac_ext >&5
17257
ca81d7a0 17258 ac_cv_lib_kstat_kstat_open=no
f21fadcc 17259fi
ca81d7a0 17260
f053c89f 17261rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17262 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
17263LIBS=$ac_check_lib_save_LIBS
17264fi
ca81d7a0
JD
17265{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
17266echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 17267if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 17268 cat >>confdefs.h <<_ACEOF
98418dba 17269#define HAVE_LIBKSTAT 1
c0d27fcc 17270_ACEOF
f21fadcc 17271
98418dba 17272 LIBS="-lkstat $LIBS"
f21fadcc 17273
f21fadcc
JD
17274fi
17275
98418dba
CW
17276test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
17277
17278# Some systems with -lutil have (and need) -lkvm as well, some do not.
17279# On Solaris, -lkvm requires nlist from -lelf, so check that first
17280# to get the right answer into the cache.
17281# For kstat on solaris, we need libelf to force the definition of SVR4 below.
17282if test $ac_have_func = no; then
ca81d7a0
JD
17283 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
17284echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 17285if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 17286 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17287else
98418dba
CW
17288 ac_check_lib_save_LIBS=$LIBS
17289LIBS="-lelf $LIBS"
17290cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17291/* confdefs.h. */
17292_ACEOF
17293cat confdefs.h >>conftest.$ac_ext
17294cat >>conftest.$ac_ext <<_ACEOF
17295/* end confdefs.h. */
98418dba 17296
ca81d7a0
JD
17297/* Override any GCC internal prototype to avoid an error.
17298 Use char because int might match the return type of a GCC
17299 builtin and then its argument prototype would still apply. */
98418dba
CW
17300#ifdef __cplusplus
17301extern "C"
17302#endif
98418dba 17303char elf_begin ();
503d2be0
AS
17304int
17305main ()
17306{
ca81d7a0 17307return elf_begin ();
503d2be0
AS
17308 ;
17309 return 0;
17310}
17311_ACEOF
17312rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17313if { (ac_try="$ac_link"
17314case "(($ac_try" in
17315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17316 *) ac_try_echo=$ac_try;;
17317esac
17318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17319 (eval "$ac_link") 2>conftest.er1
503d2be0 17320 ac_status=$?
edfaf76d
LK
17321 grep -v '^ *+' conftest.er1 >conftest.err
17322 rm -f conftest.er1
17323 cat conftest.err >&5
c0d27fcc 17324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17325 (exit $ac_status); } && {
17326 test -z "$ac_c_werror_flag" ||
17327 test ! -s conftest.err
17328 } && test -s conftest$ac_exeext &&
17329 $as_test_x conftest$ac_exeext; then
98418dba 17330 ac_cv_lib_elf_elf_begin=yes
ba4481b5 17331else
503d2be0 17332 echo "$as_me: failed program was:" >&5
19650fd6
AS
17333sed 's/^/| /' conftest.$ac_ext >&5
17334
ca81d7a0 17335 ac_cv_lib_elf_elf_begin=no
ba4481b5 17336fi
ca81d7a0 17337
f053c89f 17338rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17339 conftest$ac_exeext conftest.$ac_ext
98418dba 17340LIBS=$ac_check_lib_save_LIBS
ba4481b5 17341fi
ca81d7a0
JD
17342{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
17343echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
17344if test $ac_cv_lib_elf_elf_begin = yes; then
17345 LIBS="-lelf $LIBS"
ba4481b5
DL
17346fi
17347
98418dba
CW
17348fi
17349if test $ac_have_func = no; then
ca81d7a0
JD
17350 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
17351echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 17352if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 17353 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17354else
98418dba
CW
17355 ac_check_lib_save_LIBS=$LIBS
17356LIBS="-lkvm $LIBS"
17357cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17358/* confdefs.h. */
17359_ACEOF
17360cat confdefs.h >>conftest.$ac_ext
17361cat >>conftest.$ac_ext <<_ACEOF
17362/* end confdefs.h. */
98418dba 17363
ca81d7a0
JD
17364/* Override any GCC internal prototype to avoid an error.
17365 Use char because int might match the return type of a GCC
17366 builtin and then its argument prototype would still apply. */
98418dba
CW
17367#ifdef __cplusplus
17368extern "C"
17369#endif
98418dba 17370char kvm_open ();
503d2be0
AS
17371int
17372main ()
17373{
ca81d7a0 17374return kvm_open ();
503d2be0
AS
17375 ;
17376 return 0;
17377}
17378_ACEOF
17379rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17380if { (ac_try="$ac_link"
17381case "(($ac_try" in
17382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17383 *) ac_try_echo=$ac_try;;
17384esac
17385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17386 (eval "$ac_link") 2>conftest.er1
503d2be0 17387 ac_status=$?
edfaf76d
LK
17388 grep -v '^ *+' conftest.er1 >conftest.err
17389 rm -f conftest.er1
17390 cat conftest.err >&5
c0d27fcc 17391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17392 (exit $ac_status); } && {
17393 test -z "$ac_c_werror_flag" ||
17394 test ! -s conftest.err
17395 } && test -s conftest$ac_exeext &&
17396 $as_test_x conftest$ac_exeext; then
98418dba 17397 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
17398else
17399 echo "$as_me: failed program was:" >&5
19650fd6
AS
17400sed 's/^/| /' conftest.$ac_ext >&5
17401
ca81d7a0 17402 ac_cv_lib_kvm_kvm_open=no
503d2be0 17403fi
ca81d7a0 17404
f053c89f 17405rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17406 conftest$ac_exeext conftest.$ac_ext
98418dba 17407LIBS=$ac_check_lib_save_LIBS
503d2be0 17408fi
ca81d7a0
JD
17409{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
17410echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
17411if test $ac_cv_lib_kvm_kvm_open = yes; then
17412 LIBS="-lkvm $LIBS"
ba4481b5
DL
17413fi
17414
98418dba 17415 # Check for the 4.4BSD definition of getloadavg.
ca81d7a0
JD
17416 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
17417echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 17418if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 17419 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17420else
98418dba
CW
17421 ac_check_lib_save_LIBS=$LIBS
17422LIBS="-lutil $LIBS"
17423cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17424/* confdefs.h. */
17425_ACEOF
17426cat confdefs.h >>conftest.$ac_ext
17427cat >>conftest.$ac_ext <<_ACEOF
17428/* end confdefs.h. */
98418dba 17429
ca81d7a0
JD
17430/* Override any GCC internal prototype to avoid an error.
17431 Use char because int might match the return type of a GCC
17432 builtin and then its argument prototype would still apply. */
98418dba
CW
17433#ifdef __cplusplus
17434extern "C"
17435#endif
98418dba 17436char getloadavg ();
503d2be0
AS
17437int
17438main ()
17439{
ca81d7a0 17440return getloadavg ();
503d2be0
AS
17441 ;
17442 return 0;
17443}
17444_ACEOF
17445rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17446if { (ac_try="$ac_link"
17447case "(($ac_try" in
17448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17449 *) ac_try_echo=$ac_try;;
17450esac
17451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17452 (eval "$ac_link") 2>conftest.er1
503d2be0 17453 ac_status=$?
edfaf76d
LK
17454 grep -v '^ *+' conftest.er1 >conftest.err
17455 rm -f conftest.er1
17456 cat conftest.err >&5
c0d27fcc 17457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17458 (exit $ac_status); } && {
17459 test -z "$ac_c_werror_flag" ||
17460 test ! -s conftest.err
17461 } && test -s conftest$ac_exeext &&
17462 $as_test_x conftest$ac_exeext; then
35996d22
AS
17463 ac_cv_lib_util_getloadavg=yes
17464else
503d2be0 17465 echo "$as_me: failed program was:" >&5
19650fd6
AS
17466sed 's/^/| /' conftest.$ac_ext >&5
17467
ca81d7a0 17468 ac_cv_lib_util_getloadavg=no
ba4481b5 17469fi
ca81d7a0 17470
f053c89f 17471rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17472 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17473LIBS=$ac_check_lib_save_LIBS
17474fi
ca81d7a0
JD
17475{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
17476echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
17477if test $ac_cv_lib_util_getloadavg = yes; then
17478 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 17479fi
503d2be0 17480
98418dba 17481fi
ba4481b5 17482
98418dba
CW
17483if test $ac_have_func = no; then
17484 # There is a commonly available library for RS/6000 AIX.
17485 # Since it is not a standard part of AIX, it might be installed locally.
17486 ac_getloadavg_LIBS=$LIBS
17487 LIBS="-L/usr/local/lib $LIBS"
ca81d7a0
JD
17488 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
17489echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 17490if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 17491 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17492else
98418dba
CW
17493 ac_check_lib_save_LIBS=$LIBS
17494LIBS="-lgetloadavg $LIBS"
17495cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17496/* confdefs.h. */
17497_ACEOF
17498cat confdefs.h >>conftest.$ac_ext
17499cat >>conftest.$ac_ext <<_ACEOF
17500/* end confdefs.h. */
ba4481b5 17501
ca81d7a0
JD
17502/* Override any GCC internal prototype to avoid an error.
17503 Use char because int might match the return type of a GCC
17504 builtin and then its argument prototype would still apply. */
98418dba
CW
17505#ifdef __cplusplus
17506extern "C"
17507#endif
98418dba 17508char getloadavg ();
98418dba
CW
17509int
17510main ()
17511{
ca81d7a0 17512return getloadavg ();
98418dba
CW
17513 ;
17514 return 0;
17515}
503d2be0 17516_ACEOF
98418dba 17517rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17518if { (ac_try="$ac_link"
17519case "(($ac_try" in
17520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17521 *) ac_try_echo=$ac_try;;
17522esac
17523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17524 (eval "$ac_link") 2>conftest.er1
98418dba 17525 ac_status=$?
edfaf76d
LK
17526 grep -v '^ *+' conftest.er1 >conftest.err
17527 rm -f conftest.er1
17528 cat conftest.err >&5
c0d27fcc 17529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17530 (exit $ac_status); } && {
17531 test -z "$ac_c_werror_flag" ||
17532 test ! -s conftest.err
17533 } && test -s conftest$ac_exeext &&
17534 $as_test_x conftest$ac_exeext; then
98418dba 17535 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 17536else
98418dba 17537 echo "$as_me: failed program was:" >&5
19650fd6
AS
17538sed 's/^/| /' conftest.$ac_ext >&5
17539
ca81d7a0 17540 ac_cv_lib_getloadavg_getloadavg=no
98418dba 17541fi
ca81d7a0 17542
f053c89f 17543rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17544 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17545LIBS=$ac_check_lib_save_LIBS
17546fi
ca81d7a0
JD
17547{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
17548echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
17549if test $ac_cv_lib_getloadavg_getloadavg = yes; then
17550 LIBS="-lgetloadavg $LIBS"
17551else
17552 LIBS=$ac_getloadavg_LIBS
ba4481b5 17553fi
ba4481b5
DL
17554
17555fi
98418dba
CW
17556
17557# Make sure it is really in the library, if we think we found it,
17558# otherwise set up the replacement function.
17559
17560for ac_func in getloadavg
17561do
17562as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17563{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17564echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17565if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17566 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17567else
503d2be0 17568 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17569/* confdefs.h. */
17570_ACEOF
17571cat confdefs.h >>conftest.$ac_ext
17572cat >>conftest.$ac_ext <<_ACEOF
17573/* end confdefs.h. */
edfaf76d
LK
17574/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17575 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17576#define $ac_func innocuous_$ac_func
17577
ba4481b5 17578/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17579 which can conflict with char $ac_func (); below.
17580 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17581 <limits.h> exists even on freestanding compilers. */
edfaf76d 17582
19650fd6
AS
17583#ifdef __STDC__
17584# include <limits.h>
17585#else
17586# include <assert.h>
17587#endif
edfaf76d
LK
17588
17589#undef $ac_func
17590
ca81d7a0
JD
17591/* Override any GCC internal prototype to avoid an error.
17592 Use char because int might match the return type of a GCC
17593 builtin and then its argument prototype would still apply. */
503d2be0
AS
17594#ifdef __cplusplus
17595extern "C"
17596#endif
503d2be0 17597char $ac_func ();
ba4481b5
DL
17598/* The GNU C library defines this for functions which it implements
17599 to always fail with ENOSYS. Some functions are actually named
17600 something starting with __ and the normal name is an alias. */
ca81d7a0 17601#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17602choke me
cd958eb3
MB
17603#endif
17604
19650fd6
AS
17605int
17606main ()
17607{
ca81d7a0 17608return $ac_func ();
503d2be0
AS
17609 ;
17610 return 0;
17611}
17612_ACEOF
17613rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17614if { (ac_try="$ac_link"
17615case "(($ac_try" in
17616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17617 *) ac_try_echo=$ac_try;;
17618esac
17619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17620 (eval "$ac_link") 2>conftest.er1
503d2be0 17621 ac_status=$?
edfaf76d
LK
17622 grep -v '^ *+' conftest.er1 >conftest.err
17623 rm -f conftest.er1
17624 cat conftest.err >&5
c0d27fcc 17625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17626 (exit $ac_status); } && {
17627 test -z "$ac_c_werror_flag" ||
17628 test ! -s conftest.err
17629 } && test -s conftest$ac_exeext &&
17630 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17631 eval "$as_ac_var=yes"
17632else
17633 echo "$as_me: failed program was:" >&5
19650fd6
AS
17634sed 's/^/| /' conftest.$ac_ext >&5
17635
ca81d7a0 17636 eval "$as_ac_var=no"
503d2be0 17637fi
ca81d7a0 17638
f053c89f 17639rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17640 conftest$ac_exeext conftest.$ac_ext
503d2be0 17641fi
ca81d7a0
JD
17642ac_res=`eval echo '${'$as_ac_var'}'`
17643 { echo "$as_me:$LINENO: result: $ac_res" >&5
17644echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17645if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17646 cat >>confdefs.h <<_ACEOF
98418dba 17647#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17648_ACEOF
503d2be0 17649
98418dba 17650else
ca81d7a0 17651 case " $LIBOBJS " in
edfaf76d 17652 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
17653 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
17654 ;;
edfaf76d
LK
17655esac
17656
ba4481b5 17657
c0d27fcc 17658cat >>confdefs.h <<\_ACEOF
98418dba 17659#define C_GETLOADAVG 1
c0d27fcc 17660_ACEOF
ba4481b5 17661
98418dba
CW
17662# Figure out what our getloadavg.c needs.
17663ac_have_func=no
c0d27fcc 17664if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
ca81d7a0
JD
17665 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17666echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 17667if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 17668 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17669fi
ca81d7a0
JD
17670{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17671echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 17672else
c0d27fcc 17673 # Is the header compilable?
ca81d7a0
JD
17674{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
17675echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 17676cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17677/* confdefs.h. */
17678_ACEOF
17679cat confdefs.h >>conftest.$ac_ext
17680cat >>conftest.$ac_ext <<_ACEOF
17681/* end confdefs.h. */
c0d27fcc
MR
17682$ac_includes_default
17683#include <sys/dg_sys_info.h>
17684_ACEOF
17685rm -f conftest.$ac_objext
ca81d7a0
JD
17686if { (ac_try="$ac_compile"
17687case "(($ac_try" in
17688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17689 *) ac_try_echo=$ac_try;;
17690esac
17691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17692 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17693 ac_status=$?
edfaf76d
LK
17694 grep -v '^ *+' conftest.er1 >conftest.err
17695 rm -f conftest.er1
17696 cat conftest.err >&5
c0d27fcc 17697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17698 (exit $ac_status); } && {
17699 test -z "$ac_c_werror_flag" ||
17700 test ! -s conftest.err
17701 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17702 ac_header_compiler=yes
17703else
17704 echo "$as_me: failed program was:" >&5
19650fd6
AS
17705sed 's/^/| /' conftest.$ac_ext >&5
17706
ca81d7a0 17707 ac_header_compiler=no
c0d27fcc 17708fi
ca81d7a0
JD
17709
17710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17711{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17712echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17713
17714# Is the header present?
ca81d7a0
JD
17715{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
17716echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 17717cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17718/* confdefs.h. */
17719_ACEOF
17720cat confdefs.h >>conftest.$ac_ext
17721cat >>conftest.$ac_ext <<_ACEOF
17722/* end confdefs.h. */
98418dba
CW
17723#include <sys/dg_sys_info.h>
17724_ACEOF
ca81d7a0
JD
17725if { (ac_try="$ac_cpp conftest.$ac_ext"
17726case "(($ac_try" in
17727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17728 *) ac_try_echo=$ac_try;;
17729esac
17730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17731 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17732 ac_status=$?
6bae0ccf 17733 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17734 rm -f conftest.er1
17735 cat conftest.err >&5
c0d27fcc 17736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17737 (exit $ac_status); } >/dev/null && {
17738 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17739 test ! -s conftest.err
17740 }; then
c0d27fcc 17741 ac_header_preproc=yes
98418dba
CW
17742else
17743 echo "$as_me: failed program was:" >&5
19650fd6
AS
17744sed 's/^/| /' conftest.$ac_ext >&5
17745
c0d27fcc 17746 ac_header_preproc=no
ba4481b5 17747fi
ca81d7a0 17748
98418dba 17749rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17750{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17751echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17752
17753# So? What about this header?
edfaf76d
LK
17754case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17755 yes:no: )
c0d27fcc
MR
17756 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17757echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17758 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17759echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
17760 ac_header_preproc=yes
19650fd6 17761 ;;
edfaf76d 17762 no:yes:* )
c0d27fcc
MR
17763 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17764echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17765 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17766echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17767 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17768echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17769 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17770echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17771 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 17772echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17773 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17774echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17775
19650fd6 17776 ;;
c0d27fcc 17777esac
ca81d7a0
JD
17778{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17779echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
17780if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
17781 echo $ECHO_N "(cached) $ECHO_C" >&6
17782else
17783 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17784fi
ca81d7a0
JD
17785{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17786echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17787
17788fi
98418dba
CW
17789if test $ac_cv_header_sys_dg_sys_info_h = yes; then
17790 ac_have_func=yes
ba4481b5 17791
c0d27fcc 17792cat >>confdefs.h <<\_ACEOF
98418dba 17793#define DGUX 1
c0d27fcc
MR
17794_ACEOF
17795
503d2be0 17796
ca81d7a0
JD
17797{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17798echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17799if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 17800 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17801else
503d2be0 17802 ac_check_lib_save_LIBS=$LIBS
98418dba 17803LIBS="-ldgc $LIBS"
503d2be0 17804cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17805/* confdefs.h. */
17806_ACEOF
17807cat confdefs.h >>conftest.$ac_ext
17808cat >>conftest.$ac_ext <<_ACEOF
17809/* end confdefs.h. */
503d2be0 17810
ca81d7a0
JD
17811/* Override any GCC internal prototype to avoid an error.
17812 Use char because int might match the return type of a GCC
17813 builtin and then its argument prototype would still apply. */
503d2be0
AS
17814#ifdef __cplusplus
17815extern "C"
17816#endif
98418dba 17817char dg_sys_info ();
503d2be0
AS
17818int
17819main ()
17820{
ca81d7a0 17821return dg_sys_info ();
503d2be0
AS
17822 ;
17823 return 0;
17824}
17825_ACEOF
17826rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17827if { (ac_try="$ac_link"
17828case "(($ac_try" in
17829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17830 *) ac_try_echo=$ac_try;;
17831esac
17832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17833 (eval "$ac_link") 2>conftest.er1
503d2be0 17834 ac_status=$?
edfaf76d
LK
17835 grep -v '^ *+' conftest.er1 >conftest.err
17836 rm -f conftest.er1
17837 cat conftest.err >&5
c0d27fcc 17838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17839 (exit $ac_status); } && {
17840 test -z "$ac_c_werror_flag" ||
17841 test ! -s conftest.err
17842 } && test -s conftest$ac_exeext &&
17843 $as_test_x conftest$ac_exeext; then
98418dba 17844 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
17845else
17846 echo "$as_me: failed program was:" >&5
19650fd6
AS
17847sed 's/^/| /' conftest.$ac_ext >&5
17848
ca81d7a0 17849 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17850fi
ca81d7a0 17851
f053c89f 17852rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17853 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17854LIBS=$ac_check_lib_save_LIBS
17855fi
ca81d7a0
JD
17856{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17857echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 17858if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17859 cat >>confdefs.h <<_ACEOF
98418dba 17860#define HAVE_LIBDGC 1
c0d27fcc 17861_ACEOF
ba4481b5 17862
98418dba 17863 LIBS="-ldgc $LIBS"
ba4481b5 17864
ba4481b5
DL
17865fi
17866
98418dba 17867fi
503d2be0 17868
c0d27fcc
MR
17869
17870
17871if test "${ac_cv_header_locale_h+set}" = set; then
ca81d7a0
JD
17872 { echo "$as_me:$LINENO: checking for locale.h" >&5
17873echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 17874if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 17875 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17876fi
ca81d7a0
JD
17877{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17878echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 17879else
c0d27fcc 17880 # Is the header compilable?
ca81d7a0
JD
17881{ echo "$as_me:$LINENO: checking locale.h usability" >&5
17882echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 17883cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17884/* confdefs.h. */
17885_ACEOF
17886cat confdefs.h >>conftest.$ac_ext
17887cat >>conftest.$ac_ext <<_ACEOF
17888/* end confdefs.h. */
c0d27fcc
MR
17889$ac_includes_default
17890#include <locale.h>
17891_ACEOF
17892rm -f conftest.$ac_objext
ca81d7a0
JD
17893if { (ac_try="$ac_compile"
17894case "(($ac_try" in
17895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17896 *) ac_try_echo=$ac_try;;
17897esac
17898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17899 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17900 ac_status=$?
edfaf76d
LK
17901 grep -v '^ *+' conftest.er1 >conftest.err
17902 rm -f conftest.er1
17903 cat conftest.err >&5
c0d27fcc 17904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17905 (exit $ac_status); } && {
17906 test -z "$ac_c_werror_flag" ||
17907 test ! -s conftest.err
17908 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17909 ac_header_compiler=yes
17910else
17911 echo "$as_me: failed program was:" >&5
19650fd6
AS
17912sed 's/^/| /' conftest.$ac_ext >&5
17913
ca81d7a0 17914 ac_header_compiler=no
c0d27fcc 17915fi
ca81d7a0
JD
17916
17917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17918{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17919echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17920
17921# Is the header present?
ca81d7a0
JD
17922{ echo "$as_me:$LINENO: checking locale.h presence" >&5
17923echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 17924cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17925/* confdefs.h. */
17926_ACEOF
17927cat confdefs.h >>conftest.$ac_ext
17928cat >>conftest.$ac_ext <<_ACEOF
17929/* end confdefs.h. */
98418dba 17930#include <locale.h>
503d2be0 17931_ACEOF
ca81d7a0
JD
17932if { (ac_try="$ac_cpp conftest.$ac_ext"
17933case "(($ac_try" in
17934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17935 *) ac_try_echo=$ac_try;;
17936esac
17937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17938 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17939 ac_status=$?
6bae0ccf 17940 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17941 rm -f conftest.er1
17942 cat conftest.err >&5
c0d27fcc 17943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17944 (exit $ac_status); } >/dev/null && {
17945 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17946 test ! -s conftest.err
17947 }; then
c0d27fcc 17948 ac_header_preproc=yes
98418dba
CW
17949else
17950 echo "$as_me: failed program was:" >&5
19650fd6
AS
17951sed 's/^/| /' conftest.$ac_ext >&5
17952
c0d27fcc 17953 ac_header_preproc=no
ba4481b5 17954fi
ca81d7a0 17955
98418dba 17956rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17957{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17958echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17959
17960# So? What about this header?
edfaf76d
LK
17961case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17962 yes:no: )
c0d27fcc
MR
17963 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
17964echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17965 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
17966echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
17967 ac_header_preproc=yes
19650fd6 17968 ;;
edfaf76d 17969 no:yes:* )
c0d27fcc
MR
17970 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
17971echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17972 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
17973echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
17974 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
17975echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
17976 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
17977echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17978 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 17979echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17980 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
17981echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17982
19650fd6 17983 ;;
c0d27fcc 17984esac
ca81d7a0
JD
17985{ echo "$as_me:$LINENO: checking for locale.h" >&5
17986echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
17987if test "${ac_cv_header_locale_h+set}" = set; then
17988 echo $ECHO_N "(cached) $ECHO_C" >&6
17989else
17990 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 17991fi
ca81d7a0
JD
17992{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17993echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 17994
c0d27fcc
MR
17995fi
17996
17997
17998
98418dba 17999for ac_func in setlocale
ba4481b5 18000do
503d2be0 18001as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18002{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18003echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18004if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 18005 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18006else
503d2be0 18007 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18008/* confdefs.h. */
18009_ACEOF
18010cat confdefs.h >>conftest.$ac_ext
18011cat >>conftest.$ac_ext <<_ACEOF
18012/* end confdefs.h. */
edfaf76d
LK
18013/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18014 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18015#define $ac_func innocuous_$ac_func
18016
ba4481b5 18017/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18018 which can conflict with char $ac_func (); below.
18019 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18020 <limits.h> exists even on freestanding compilers. */
edfaf76d 18021
19650fd6
AS
18022#ifdef __STDC__
18023# include <limits.h>
18024#else
18025# include <assert.h>
18026#endif
edfaf76d
LK
18027
18028#undef $ac_func
18029
ca81d7a0
JD
18030/* Override any GCC internal prototype to avoid an error.
18031 Use char because int might match the return type of a GCC
18032 builtin and then its argument prototype would still apply. */
503d2be0
AS
18033#ifdef __cplusplus
18034extern "C"
18035#endif
503d2be0 18036char $ac_func ();
ba4481b5
DL
18037/* The GNU C library defines this for functions which it implements
18038 to always fail with ENOSYS. Some functions are actually named
18039 something starting with __ and the normal name is an alias. */
ca81d7a0 18040#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 18041choke me
ba4481b5
DL
18042#endif
18043
19650fd6
AS
18044int
18045main ()
18046{
ca81d7a0 18047return $ac_func ();
503d2be0
AS
18048 ;
18049 return 0;
18050}
18051_ACEOF
18052rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18053if { (ac_try="$ac_link"
18054case "(($ac_try" in
18055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18056 *) ac_try_echo=$ac_try;;
18057esac
18058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18059 (eval "$ac_link") 2>conftest.er1
503d2be0 18060 ac_status=$?
edfaf76d
LK
18061 grep -v '^ *+' conftest.er1 >conftest.err
18062 rm -f conftest.er1
18063 cat conftest.err >&5
c0d27fcc 18064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18065 (exit $ac_status); } && {
18066 test -z "$ac_c_werror_flag" ||
18067 test ! -s conftest.err
18068 } && test -s conftest$ac_exeext &&
18069 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18070 eval "$as_ac_var=yes"
18071else
18072 echo "$as_me: failed program was:" >&5
19650fd6
AS
18073sed 's/^/| /' conftest.$ac_ext >&5
18074
ca81d7a0 18075 eval "$as_ac_var=no"
503d2be0 18076fi
ca81d7a0 18077
f053c89f 18078rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18079 conftest$ac_exeext conftest.$ac_ext
503d2be0 18080fi
ca81d7a0
JD
18081ac_res=`eval echo '${'$as_ac_var'}'`
18082 { echo "$as_me:$LINENO: result: $ac_res" >&5
18083echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18084if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18085 cat >>confdefs.h <<_ACEOF
503d2be0 18086#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18087_ACEOF
ba4481b5 18088
ba4481b5
DL
18089fi
18090done
18091
c0d27fcc 18092
98418dba
CW
18093# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
18094# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
18095# Irix 4.0.5F has the header but not the library.
18096if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
18097 ac_have_func=yes
18098
c0d27fcc 18099cat >>confdefs.h <<\_ACEOF
98418dba 18100#define SVR4 1
c0d27fcc 18101_ACEOF
98418dba
CW
18102
18103fi
18104
18105if test $ac_have_func = no; then
c0d27fcc 18106 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
ca81d7a0
JD
18107 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18108echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 18109if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 18110 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18111fi
ca81d7a0
JD
18112{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18113echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 18114else
c0d27fcc 18115 # Is the header compilable?
ca81d7a0
JD
18116{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
18117echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18118cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18119/* confdefs.h. */
18120_ACEOF
18121cat confdefs.h >>conftest.$ac_ext
18122cat >>conftest.$ac_ext <<_ACEOF
18123/* end confdefs.h. */
c0d27fcc
MR
18124$ac_includes_default
18125#include <inq_stats/cpustats.h>
18126_ACEOF
18127rm -f conftest.$ac_objext
ca81d7a0
JD
18128if { (ac_try="$ac_compile"
18129case "(($ac_try" in
18130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18131 *) ac_try_echo=$ac_try;;
18132esac
18133eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18134 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18135 ac_status=$?
edfaf76d
LK
18136 grep -v '^ *+' conftest.er1 >conftest.err
18137 rm -f conftest.er1
18138 cat conftest.err >&5
c0d27fcc 18139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18140 (exit $ac_status); } && {
18141 test -z "$ac_c_werror_flag" ||
18142 test ! -s conftest.err
18143 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18144 ac_header_compiler=yes
18145else
18146 echo "$as_me: failed program was:" >&5
19650fd6
AS
18147sed 's/^/| /' conftest.$ac_ext >&5
18148
ca81d7a0 18149 ac_header_compiler=no
c0d27fcc 18150fi
ca81d7a0
JD
18151
18152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18153{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18154echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18155
18156# Is the header present?
ca81d7a0
JD
18157{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
18158echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18159cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18160/* confdefs.h. */
18161_ACEOF
18162cat confdefs.h >>conftest.$ac_ext
18163cat >>conftest.$ac_ext <<_ACEOF
18164/* end confdefs.h. */
98418dba 18165#include <inq_stats/cpustats.h>
503d2be0 18166_ACEOF
ca81d7a0
JD
18167if { (ac_try="$ac_cpp conftest.$ac_ext"
18168case "(($ac_try" in
18169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18170 *) ac_try_echo=$ac_try;;
18171esac
18172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18173 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18174 ac_status=$?
6bae0ccf 18175 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18176 rm -f conftest.er1
18177 cat conftest.err >&5
c0d27fcc 18178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18179 (exit $ac_status); } >/dev/null && {
18180 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18181 test ! -s conftest.err
18182 }; then
c0d27fcc 18183 ac_header_preproc=yes
503d2be0
AS
18184else
18185 echo "$as_me: failed program was:" >&5
19650fd6
AS
18186sed 's/^/| /' conftest.$ac_ext >&5
18187
c0d27fcc 18188 ac_header_preproc=no
ba4481b5 18189fi
ca81d7a0 18190
503d2be0 18191rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18192{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18193echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18194
18195# So? What about this header?
edfaf76d
LK
18196case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18197 yes:no: )
c0d27fcc
MR
18198 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18199echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18200 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
18201echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
18202 ac_header_preproc=yes
19650fd6 18203 ;;
edfaf76d 18204 no:yes:* )
c0d27fcc
MR
18205 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
18206echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18207 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
18208echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
18209 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
18210echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
18211 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18212echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18213 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18214echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18215 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
18216echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18217
19650fd6 18218 ;;
c0d27fcc 18219esac
ca81d7a0
JD
18220{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18221echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18222if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
18223 echo $ECHO_N "(cached) $ECHO_C" >&6
18224else
18225 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 18226fi
ca81d7a0
JD
18227{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18228echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
18229
18230fi
98418dba
CW
18231if test $ac_cv_header_inq_stats_cpustats_h = yes; then
18232 ac_have_func=yes
ba4481b5 18233
c0d27fcc 18234cat >>confdefs.h <<\_ACEOF
98418dba 18235#define UMAX 1
c0d27fcc 18236_ACEOF
98418dba 18237
c0d27fcc
MR
18238
18239cat >>confdefs.h <<\_ACEOF
98418dba 18240#define UMAX4_3 1
c0d27fcc 18241_ACEOF
98418dba
CW
18242
18243fi
18244
c0d27fcc 18245
98418dba
CW
18246fi
18247
18248if test $ac_have_func = no; then
c0d27fcc 18249 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
ca81d7a0
JD
18250 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18251echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 18252if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 18253 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18254fi
ca81d7a0
JD
18255{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18256echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 18257else
c0d27fcc 18258 # Is the header compilable?
ca81d7a0
JD
18259{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
18260echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18261cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18262/* confdefs.h. */
18263_ACEOF
18264cat confdefs.h >>conftest.$ac_ext
18265cat >>conftest.$ac_ext <<_ACEOF
18266/* end confdefs.h. */
c0d27fcc
MR
18267$ac_includes_default
18268#include <sys/cpustats.h>
18269_ACEOF
18270rm -f conftest.$ac_objext
ca81d7a0
JD
18271if { (ac_try="$ac_compile"
18272case "(($ac_try" in
18273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18274 *) ac_try_echo=$ac_try;;
18275esac
18276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18277 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18278 ac_status=$?
edfaf76d
LK
18279 grep -v '^ *+' conftest.er1 >conftest.err
18280 rm -f conftest.er1
18281 cat conftest.err >&5
c0d27fcc 18282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18283 (exit $ac_status); } && {
18284 test -z "$ac_c_werror_flag" ||
18285 test ! -s conftest.err
18286 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18287 ac_header_compiler=yes
18288else
18289 echo "$as_me: failed program was:" >&5
19650fd6
AS
18290sed 's/^/| /' conftest.$ac_ext >&5
18291
ca81d7a0 18292 ac_header_compiler=no
c0d27fcc 18293fi
ca81d7a0
JD
18294
18295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18296{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18297echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18298
18299# Is the header present?
ca81d7a0
JD
18300{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
18301echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18302cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18303/* confdefs.h. */
18304_ACEOF
18305cat confdefs.h >>conftest.$ac_ext
18306cat >>conftest.$ac_ext <<_ACEOF
18307/* end confdefs.h. */
98418dba
CW
18308#include <sys/cpustats.h>
18309_ACEOF
ca81d7a0
JD
18310if { (ac_try="$ac_cpp conftest.$ac_ext"
18311case "(($ac_try" in
18312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18313 *) ac_try_echo=$ac_try;;
18314esac
18315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18316 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 18317 ac_status=$?
6bae0ccf 18318 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18319 rm -f conftest.er1
18320 cat conftest.err >&5
c0d27fcc 18321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18322 (exit $ac_status); } >/dev/null && {
18323 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18324 test ! -s conftest.err
18325 }; then
c0d27fcc 18326 ac_header_preproc=yes
98418dba
CW
18327else
18328 echo "$as_me: failed program was:" >&5
19650fd6
AS
18329sed 's/^/| /' conftest.$ac_ext >&5
18330
c0d27fcc 18331 ac_header_preproc=no
98418dba 18332fi
ca81d7a0 18333
98418dba 18334rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18335{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18336echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18337
18338# So? What about this header?
edfaf76d
LK
18339case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18340 yes:no: )
c0d27fcc
MR
18341 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18342echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18343 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
18344echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
18345 ac_header_preproc=yes
19650fd6 18346 ;;
edfaf76d 18347 no:yes:* )
c0d27fcc
MR
18348 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
18349echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18350 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
18351echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
18352 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
18353echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
18354 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18355echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18356 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18357echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18358 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
18359echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18360
19650fd6 18361 ;;
c0d27fcc 18362esac
ca81d7a0
JD
18363{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18364echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18365if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
18366 echo $ECHO_N "(cached) $ECHO_C" >&6
18367else
18368 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 18369fi
ca81d7a0
JD
18370{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18371echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
18372
18373fi
98418dba 18374if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 18375 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 18376#define UMAX 1
c0d27fcc 18377_ACEOF
ba4481b5 18378
98418dba
CW
18379fi
18380
c0d27fcc 18381
98418dba
CW
18382fi
18383
18384if test $ac_have_func = no; then
18385
18386for ac_header in mach/mach.h
2c9dccc9
PJ
18387do
18388as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18389if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18390 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18391echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18392if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 18393 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18394fi
ca81d7a0
JD
18395ac_res=`eval echo '${'$as_ac_Header'}'`
18396 { echo "$as_me:$LINENO: result: $ac_res" >&5
18397echo "${ECHO_T}$ac_res" >&6; }
98418dba 18398else
c0d27fcc 18399 # Is the header compilable?
ca81d7a0
JD
18400{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18401echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18402cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18403/* confdefs.h. */
18404_ACEOF
18405cat confdefs.h >>conftest.$ac_ext
18406cat >>conftest.$ac_ext <<_ACEOF
18407/* end confdefs.h. */
c0d27fcc
MR
18408$ac_includes_default
18409#include <$ac_header>
18410_ACEOF
18411rm -f conftest.$ac_objext
ca81d7a0
JD
18412if { (ac_try="$ac_compile"
18413case "(($ac_try" in
18414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18415 *) ac_try_echo=$ac_try;;
18416esac
18417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18418 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18419 ac_status=$?
edfaf76d
LK
18420 grep -v '^ *+' conftest.er1 >conftest.err
18421 rm -f conftest.er1
18422 cat conftest.err >&5
c0d27fcc 18423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18424 (exit $ac_status); } && {
18425 test -z "$ac_c_werror_flag" ||
18426 test ! -s conftest.err
18427 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18428 ac_header_compiler=yes
18429else
18430 echo "$as_me: failed program was:" >&5
19650fd6
AS
18431sed 's/^/| /' conftest.$ac_ext >&5
18432
ca81d7a0 18433 ac_header_compiler=no
c0d27fcc 18434fi
ca81d7a0
JD
18435
18436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18437{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18438echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18439
18440# Is the header present?
ca81d7a0
JD
18441{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18442echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18443cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18444/* confdefs.h. */
18445_ACEOF
18446cat confdefs.h >>conftest.$ac_ext
18447cat >>conftest.$ac_ext <<_ACEOF
18448/* end confdefs.h. */
2c9dccc9
PJ
18449#include <$ac_header>
18450_ACEOF
ca81d7a0
JD
18451if { (ac_try="$ac_cpp conftest.$ac_ext"
18452case "(($ac_try" in
18453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18454 *) ac_try_echo=$ac_try;;
18455esac
18456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18457 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 18458 ac_status=$?
6bae0ccf 18459 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
18460 rm -f conftest.er1
18461 cat conftest.err >&5
c0d27fcc 18462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18463 (exit $ac_status); } >/dev/null && {
18464 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18465 test ! -s conftest.err
18466 }; then
c0d27fcc
MR
18467 ac_header_preproc=yes
18468else
18469 echo "$as_me: failed program was:" >&5
19650fd6
AS
18470sed 's/^/| /' conftest.$ac_ext >&5
18471
c0d27fcc
MR
18472 ac_header_preproc=no
18473fi
ca81d7a0 18474
c0d27fcc 18475rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18476{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18477echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18478
18479# So? What about this header?
edfaf76d
LK
18480case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18481 yes:no: )
c0d27fcc
MR
18482 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18483echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18484 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18485echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18486 ac_header_preproc=yes
19650fd6 18487 ;;
edfaf76d 18488 no:yes:* )
c0d27fcc
MR
18489 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18490echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18491 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18492echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18493 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18494echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18495 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18496echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18497 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18498echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18499 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18500echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18501
19650fd6 18502 ;;
c0d27fcc 18503esac
ca81d7a0
JD
18504{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18505echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18506if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18507 echo $ECHO_N "(cached) $ECHO_C" >&6
18508else
edfaf76d 18509 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 18510fi
ca81d7a0
JD
18511ac_res=`eval echo '${'$as_ac_Header'}'`
18512 { echo "$as_me:$LINENO: result: $ac_res" >&5
18513echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18514
18515fi
18516if test `eval echo '${'$as_ac_Header'}'` = yes; then
18517 cat >>confdefs.h <<_ACEOF
18518#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18519_ACEOF
18520
18521fi
18522
18523done
18524
18525fi
18526
18527
18528for ac_header in nlist.h
18529do
18530as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18531if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18532 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18533echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18534if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18535 echo $ECHO_N "(cached) $ECHO_C" >&6
18536fi
ca81d7a0
JD
18537ac_res=`eval echo '${'$as_ac_Header'}'`
18538 { echo "$as_me:$LINENO: result: $ac_res" >&5
18539echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18540else
18541 # Is the header compilable?
ca81d7a0
JD
18542{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18543echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18544cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18545/* confdefs.h. */
18546_ACEOF
18547cat confdefs.h >>conftest.$ac_ext
18548cat >>conftest.$ac_ext <<_ACEOF
18549/* end confdefs.h. */
c0d27fcc
MR
18550$ac_includes_default
18551#include <$ac_header>
18552_ACEOF
18553rm -f conftest.$ac_objext
ca81d7a0
JD
18554if { (ac_try="$ac_compile"
18555case "(($ac_try" in
18556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18557 *) ac_try_echo=$ac_try;;
18558esac
18559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18560 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18561 ac_status=$?
edfaf76d
LK
18562 grep -v '^ *+' conftest.er1 >conftest.err
18563 rm -f conftest.er1
18564 cat conftest.err >&5
c0d27fcc 18565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18566 (exit $ac_status); } && {
18567 test -z "$ac_c_werror_flag" ||
18568 test ! -s conftest.err
18569 } && test -s conftest.$ac_objext; then
c0d27fcc 18570 ac_header_compiler=yes
2c9dccc9
PJ
18571else
18572 echo "$as_me: failed program was:" >&5
19650fd6
AS
18573sed 's/^/| /' conftest.$ac_ext >&5
18574
ca81d7a0 18575 ac_header_compiler=no
98418dba 18576fi
ca81d7a0
JD
18577
18578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18579{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18580echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 18581
c0d27fcc 18582# Is the header present?
ca81d7a0
JD
18583{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18584echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18585cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18586/* confdefs.h. */
18587_ACEOF
18588cat confdefs.h >>conftest.$ac_ext
18589cat >>conftest.$ac_ext <<_ACEOF
18590/* end confdefs.h. */
503d2be0
AS
18591#include <$ac_header>
18592_ACEOF
ca81d7a0
JD
18593if { (ac_try="$ac_cpp conftest.$ac_ext"
18594case "(($ac_try" in
18595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18596 *) ac_try_echo=$ac_try;;
18597esac
18598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18599 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18600 ac_status=$?
6bae0ccf 18601 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18602 rm -f conftest.er1
18603 cat conftest.err >&5
c0d27fcc 18604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18605 (exit $ac_status); } >/dev/null && {
18606 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18607 test ! -s conftest.err
18608 }; then
c0d27fcc 18609 ac_header_preproc=yes
503d2be0
AS
18610else
18611 echo "$as_me: failed program was:" >&5
19650fd6
AS
18612sed 's/^/| /' conftest.$ac_ext >&5
18613
c0d27fcc 18614 ac_header_preproc=no
b5de8dc0 18615fi
ca81d7a0 18616
503d2be0 18617rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18618{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18619echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18620
18621# So? What about this header?
edfaf76d
LK
18622case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18623 yes:no: )
c0d27fcc
MR
18624 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18625echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18626 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18627echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18628 ac_header_preproc=yes
19650fd6 18629 ;;
edfaf76d 18630 no:yes:* )
c0d27fcc
MR
18631 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18632echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18633 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18634echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18635 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18636echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18637 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18638echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18639 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18640echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18641 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18642echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18643
19650fd6 18644 ;;
c0d27fcc 18645esac
ca81d7a0
JD
18646{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18647echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18648if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18649 echo $ECHO_N "(cached) $ECHO_C" >&6
18650else
edfaf76d 18651 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 18652fi
ca81d7a0
JD
18653ac_res=`eval echo '${'$as_ac_Header'}'`
18654 { echo "$as_me:$LINENO: result: $ac_res" >&5
18655echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18656
18657fi
98418dba 18658if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18659 cat >>confdefs.h <<_ACEOF
98418dba 18660#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18661_ACEOF
ca81d7a0
JD
18662 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
18663echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 18664if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 18665 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 18666else
503d2be0 18667 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18668/* confdefs.h. */
18669_ACEOF
18670cat confdefs.h >>conftest.$ac_ext
18671cat >>conftest.$ac_ext <<_ACEOF
18672/* end confdefs.h. */
98418dba 18673#include <nlist.h>
b5de8dc0 18674
503d2be0
AS
18675int
18676main ()
18677{
98418dba
CW
18678static struct nlist ac_aggr;
18679if (ac_aggr.n_un.n_name)
18680return 0;
503d2be0
AS
18681 ;
18682 return 0;
18683}
18684_ACEOF
98418dba 18685rm -f conftest.$ac_objext
ca81d7a0
JD
18686if { (ac_try="$ac_compile"
18687case "(($ac_try" in
18688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18689 *) ac_try_echo=$ac_try;;
18690esac
18691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18692 (eval "$ac_compile") 2>conftest.er1
503d2be0 18693 ac_status=$?
edfaf76d
LK
18694 grep -v '^ *+' conftest.er1 >conftest.err
18695 rm -f conftest.er1
18696 cat conftest.err >&5
c0d27fcc 18697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18698 (exit $ac_status); } && {
18699 test -z "$ac_c_werror_flag" ||
18700 test ! -s conftest.err
18701 } && test -s conftest.$ac_objext; then
edfaf76d 18702 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
18703else
18704 echo "$as_me: failed program was:" >&5
19650fd6
AS
18705sed 's/^/| /' conftest.$ac_ext >&5
18706
ca81d7a0 18707 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18708/* confdefs.h. */
18709_ACEOF
18710cat confdefs.h >>conftest.$ac_ext
18711cat >>conftest.$ac_ext <<_ACEOF
18712/* end confdefs.h. */
6bae0ccf
DL
18713#include <nlist.h>
18714
18715int
18716main ()
18717{
18718static struct nlist ac_aggr;
18719if (sizeof ac_aggr.n_un.n_name)
18720return 0;
18721 ;
18722 return 0;
18723}
18724_ACEOF
18725rm -f conftest.$ac_objext
ca81d7a0
JD
18726if { (ac_try="$ac_compile"
18727case "(($ac_try" in
18728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18729 *) ac_try_echo=$ac_try;;
18730esac
18731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18732 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 18733 ac_status=$?
edfaf76d
LK
18734 grep -v '^ *+' conftest.er1 >conftest.err
18735 rm -f conftest.er1
18736 cat conftest.err >&5
6bae0ccf 18737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
18738 (exit $ac_status); } && {
18739 test -z "$ac_c_werror_flag" ||
18740 test ! -s conftest.err
18741 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
18742 ac_cv_member_struct_nlist_n_un_n_name=yes
18743else
18744 echo "$as_me: failed program was:" >&5
19650fd6
AS
18745sed 's/^/| /' conftest.$ac_ext >&5
18746
ca81d7a0 18747 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 18748fi
ca81d7a0
JD
18749
18750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 18751fi
ca81d7a0
JD
18752
18753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 18754fi
ca81d7a0
JD
18755{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
18756echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 18757if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18758
c0d27fcc 18759cat >>confdefs.h <<_ACEOF
98418dba 18760#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18761_ACEOF
b5de8dc0 18762
c0d27fcc
MR
18763
18764cat >>confdefs.h <<\_ACEOF
98418dba 18765#define NLIST_NAME_UNION 1
c0d27fcc 18766_ACEOF
b5de8dc0 18767
98418dba 18768fi
b5de8dc0 18769
c0d27fcc 18770
98418dba 18771fi
c0d27fcc 18772
98418dba 18773done
b5de8dc0 18774
98418dba
CW
18775fi
18776done
b5de8dc0 18777
c0d27fcc 18778
98418dba 18779# Some definitions of getloadavg require that the program be installed setgid.
ca81d7a0
JD
18780{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18781echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
18782if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
18783 echo $ECHO_N "(cached) $ECHO_C" >&6
18784else
18785 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18786/* confdefs.h. */
18787_ACEOF
18788cat confdefs.h >>conftest.$ac_ext
18789cat >>conftest.$ac_ext <<_ACEOF
18790/* end confdefs.h. */
6bae0ccf 18791#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18792#ifdef LDAV_PRIVILEGED
18793Yowza Am I SETGID yet
18794#endif
18795_ACEOF
18796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18797 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18798 ac_cv_func_getloadavg_setgid=yes
18799else
18800 ac_cv_func_getloadavg_setgid=no
18801fi
18802rm -f conftest*
b5de8dc0 18803
98418dba 18804fi
ca81d7a0
JD
18805{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18806echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18807if test $ac_cv_func_getloadavg_setgid = yes; then
18808 NEED_SETGID=true
b5de8dc0 18809
c0d27fcc 18810cat >>confdefs.h <<\_ACEOF
98418dba 18811#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18812_ACEOF
98418dba 18813
b5de8dc0 18814else
98418dba 18815 NEED_SETGID=false
b5de8dc0 18816fi
98418dba
CW
18817
18818if test $ac_cv_func_getloadavg_setgid = yes; then
ca81d7a0
JD
18819 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18820echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
18821if test "${ac_cv_group_kmem+set}" = set; then
18822 echo $ECHO_N "(cached) $ECHO_C" >&6
18823else
18824 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18825 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18826 # If we got an error (system does not support symlinks), try without -L.
18827 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
18828 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18829 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18830 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18831 / /s/.* //;p;'`
18832
b5de8dc0 18833fi
ca81d7a0
JD
18834{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18835echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18836 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18837fi
98418dba
CW
18838if test "x$ac_save_LIBS" = x; then
18839 GETLOADAVG_LIBS=$LIBS
18840else
18841 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18842fi
98418dba 18843LIBS=$ac_save_LIBS
b5de8dc0 18844
c0d27fcc
MR
18845
18846
ca81d7a0
JD
18847{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18848echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18849if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 18850 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18851else
b936fae4 18852 while :; do
503d2be0 18853 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18854/* confdefs.h. */
18855_ACEOF
18856cat confdefs.h >>conftest.$ac_ext
18857cat >>conftest.$ac_ext <<_ACEOF
18858/* end confdefs.h. */
ecd43cb9
GM
18859#include <sys/types.h> /* for off_t */
18860 #include <stdio.h>
503d2be0
AS
18861int
18862main ()
18863{
ecd43cb9
GM
18864int (*fp) (FILE *, off_t, int) = fseeko;
18865 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
b936fae4
AS
18866 ;
18867 return 0;
18868}
18869_ACEOF
f053c89f
CY
18870rm -f conftest.$ac_objext conftest$ac_exeext
18871if { (ac_try="$ac_link"
ca81d7a0
JD
18872case "(($ac_try" in
18873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18874 *) ac_try_echo=$ac_try;;
18875esac
18876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18877 (eval "$ac_link") 2>conftest.er1
b936fae4 18878 ac_status=$?
edfaf76d
LK
18879 grep -v '^ *+' conftest.er1 >conftest.err
18880 rm -f conftest.er1
18881 cat conftest.err >&5
c0d27fcc 18882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18883 (exit $ac_status); } && {
18884 test -z "$ac_c_werror_flag" ||
18885 test ! -s conftest.err
18886 } && test -s conftest$ac_exeext &&
18887 $as_test_x conftest$ac_exeext; then
18888 ac_cv_sys_largefile_source=no; break
b936fae4
AS
18889else
18890 echo "$as_me: failed program was:" >&5
19650fd6
AS
18891sed 's/^/| /' conftest.$ac_ext >&5
18892
ca81d7a0 18893
b936fae4 18894fi
ca81d7a0 18895
f053c89f
CY
18896rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18897 conftest$ac_exeext conftest.$ac_ext
b936fae4 18898 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18899/* confdefs.h. */
18900_ACEOF
18901cat confdefs.h >>conftest.$ac_ext
18902cat >>conftest.$ac_ext <<_ACEOF
18903/* end confdefs.h. */
b936fae4 18904#define _LARGEFILE_SOURCE 1
ecd43cb9
GM
18905#include <sys/types.h> /* for off_t */
18906 #include <stdio.h>
b936fae4
AS
18907int
18908main ()
18909{
ecd43cb9
GM
18910int (*fp) (FILE *, off_t, int) = fseeko;
18911 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
b936fae4
AS
18912 ;
18913 return 0;
18914}
18915_ACEOF
f053c89f
CY
18916rm -f conftest.$ac_objext conftest$ac_exeext
18917if { (ac_try="$ac_link"
ca81d7a0
JD
18918case "(($ac_try" in
18919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18920 *) ac_try_echo=$ac_try;;
18921esac
18922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18923 (eval "$ac_link") 2>conftest.er1
b936fae4 18924 ac_status=$?
edfaf76d
LK
18925 grep -v '^ *+' conftest.er1 >conftest.err
18926 rm -f conftest.er1
18927 cat conftest.err >&5
c0d27fcc 18928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18929 (exit $ac_status); } && {
18930 test -z "$ac_c_werror_flag" ||
18931 test ! -s conftest.err
18932 } && test -s conftest$ac_exeext &&
18933 $as_test_x conftest$ac_exeext; then
b936fae4
AS
18934 ac_cv_sys_largefile_source=1; break
18935else
18936 echo "$as_me: failed program was:" >&5
19650fd6
AS
18937sed 's/^/| /' conftest.$ac_ext >&5
18938
ca81d7a0 18939
b936fae4 18940fi
ca81d7a0 18941
f053c89f
CY
18942rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18943 conftest$ac_exeext conftest.$ac_ext
18944 ac_cv_sys_largefile_source=unknown
b936fae4
AS
18945 break
18946done
18947fi
ca81d7a0
JD
18948{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18949echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
18950case $ac_cv_sys_largefile_source in #(
18951 no | unknown) ;;
18952 *)
c0d27fcc 18953cat >>confdefs.h <<_ACEOF
b936fae4 18954#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 18955_ACEOF
f053c89f
CY
18956;;
18957esac
b936fae4 18958rm -f conftest*
4c343001 18959
b936fae4
AS
18960# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18961# in glibc 2.1.3, but that breaks too many other things.
18962# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c24fa7dc 18963if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 18964
c0d27fcc 18965cat >>confdefs.h <<\_ACEOF
b936fae4 18966#define HAVE_FSEEKO 1
c0d27fcc 18967_ACEOF
b936fae4 18968
4c343001
DL
18969fi
18970
c0d27fcc 18971
52dbaac8
PE
18972# Configure getopt.
18973# getopt.m4 serial 10
18974
18975# The getopt module assume you want GNU getopt, with getopt_long etc,
18976# rather than vanilla POSIX getopt. This means your your code should
18977# always include <getopt.h> for the getopt prototypes.
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989# Prerequisites of lib/getopt*.
18990
18991
18992
10a3b1a1 18993
52dbaac8
PE
18994 GETOPT_H=
18995
18996for ac_header in getopt.h
18997do
18998as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18999if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19000 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19001echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19002if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19003 echo $ECHO_N "(cached) $ECHO_C" >&6
19004fi
ca81d7a0
JD
19005ac_res=`eval echo '${'$as_ac_Header'}'`
19006 { echo "$as_me:$LINENO: result: $ac_res" >&5
19007echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19008else
19009 # Is the header compilable?
ca81d7a0
JD
19010{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
19011echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
19012cat >conftest.$ac_ext <<_ACEOF
19013/* confdefs.h. */
19014_ACEOF
19015cat confdefs.h >>conftest.$ac_ext
19016cat >>conftest.$ac_ext <<_ACEOF
19017/* end confdefs.h. */
19018$ac_includes_default
19019#include <$ac_header>
19020_ACEOF
19021rm -f conftest.$ac_objext
ca81d7a0
JD
19022if { (ac_try="$ac_compile"
19023case "(($ac_try" in
19024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19025 *) ac_try_echo=$ac_try;;
19026esac
19027eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19028 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19029 ac_status=$?
19030 grep -v '^ *+' conftest.er1 >conftest.err
19031 rm -f conftest.er1
19032 cat conftest.err >&5
19033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19034 (exit $ac_status); } && {
19035 test -z "$ac_c_werror_flag" ||
19036 test ! -s conftest.err
19037 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19038 ac_header_compiler=yes
19039else
19040 echo "$as_me: failed program was:" >&5
19041sed 's/^/| /' conftest.$ac_ext >&5
19042
ca81d7a0 19043 ac_header_compiler=no
52dbaac8 19044fi
ca81d7a0
JD
19045
19046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19047{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19048echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
19049
19050# Is the header present?
ca81d7a0
JD
19051{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
19052echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
19053cat >conftest.$ac_ext <<_ACEOF
19054/* confdefs.h. */
19055_ACEOF
19056cat confdefs.h >>conftest.$ac_ext
19057cat >>conftest.$ac_ext <<_ACEOF
19058/* end confdefs.h. */
19059#include <$ac_header>
19060_ACEOF
ca81d7a0
JD
19061if { (ac_try="$ac_cpp conftest.$ac_ext"
19062case "(($ac_try" in
19063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19064 *) ac_try_echo=$ac_try;;
19065esac
19066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19067 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
19068 ac_status=$?
19069 grep -v '^ *+' conftest.er1 >conftest.err
19070 rm -f conftest.er1
19071 cat conftest.err >&5
19072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19073 (exit $ac_status); } >/dev/null && {
19074 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19075 test ! -s conftest.err
19076 }; then
52dbaac8
PE
19077 ac_header_preproc=yes
19078else
19079 echo "$as_me: failed program was:" >&5
19080sed 's/^/| /' conftest.$ac_ext >&5
19081
19082 ac_header_preproc=no
19083fi
ca81d7a0 19084
52dbaac8 19085rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
19086{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19087echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
19088
19089# So? What about this header?
19090case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19091 yes:no: )
19092 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19093echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19094 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19095echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19096 ac_header_preproc=yes
19097 ;;
19098 no:yes:* )
19099 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19100echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19101 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19102echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19103 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19104echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19105 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19106echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
19107 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19108echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19109 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19110echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 19111
52dbaac8
PE
19112 ;;
19113esac
ca81d7a0
JD
19114{ echo "$as_me:$LINENO: checking for $ac_header" >&5
19115echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19116if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19117 echo $ECHO_N "(cached) $ECHO_C" >&6
19118else
19119 eval "$as_ac_Header=\$ac_header_preproc"
19120fi
ca81d7a0
JD
19121ac_res=`eval echo '${'$as_ac_Header'}'`
19122 { echo "$as_me:$LINENO: result: $ac_res" >&5
19123echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19124
19125fi
19126if test `eval echo '${'$as_ac_Header'}'` = yes; then
19127 cat >>confdefs.h <<_ACEOF
19128#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19129_ACEOF
19130
19131else
19132 GETOPT_H=getopt.h
19133fi
19134
19135done
19136
19137 if test -z "$GETOPT_H"; then
19138
19139for ac_func in getopt_long_only
19140do
19141as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19142{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19143echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19144if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19145 echo $ECHO_N "(cached) $ECHO_C" >&6
19146else
19147 cat >conftest.$ac_ext <<_ACEOF
19148/* confdefs.h. */
19149_ACEOF
19150cat confdefs.h >>conftest.$ac_ext
19151cat >>conftest.$ac_ext <<_ACEOF
19152/* end confdefs.h. */
19153/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19154 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19155#define $ac_func innocuous_$ac_func
19156
19157/* System header to define __stub macros and hopefully few prototypes,
19158 which can conflict with char $ac_func (); below.
19159 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19160 <limits.h> exists even on freestanding compilers. */
19161
19162#ifdef __STDC__
19163# include <limits.h>
19164#else
19165# include <assert.h>
19166#endif
19167
19168#undef $ac_func
19169
ca81d7a0
JD
19170/* Override any GCC internal prototype to avoid an error.
19171 Use char because int might match the return type of a GCC
19172 builtin and then its argument prototype would still apply. */
52dbaac8
PE
19173#ifdef __cplusplus
19174extern "C"
52dbaac8 19175#endif
52dbaac8
PE
19176char $ac_func ();
19177/* The GNU C library defines this for functions which it implements
19178 to always fail with ENOSYS. Some functions are actually named
19179 something starting with __ and the normal name is an alias. */
ca81d7a0 19180#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 19181choke me
52dbaac8
PE
19182#endif
19183
19184int
19185main ()
19186{
ca81d7a0 19187return $ac_func ();
52dbaac8
PE
19188 ;
19189 return 0;
19190}
19191_ACEOF
19192rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19193if { (ac_try="$ac_link"
19194case "(($ac_try" in
19195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19196 *) ac_try_echo=$ac_try;;
19197esac
19198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19199 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
19200 ac_status=$?
19201 grep -v '^ *+' conftest.er1 >conftest.err
19202 rm -f conftest.er1
19203 cat conftest.err >&5
19204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19205 (exit $ac_status); } && {
19206 test -z "$ac_c_werror_flag" ||
19207 test ! -s conftest.err
19208 } && test -s conftest$ac_exeext &&
19209 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
19210 eval "$as_ac_var=yes"
19211else
19212 echo "$as_me: failed program was:" >&5
19213sed 's/^/| /' conftest.$ac_ext >&5
19214
ca81d7a0 19215 eval "$as_ac_var=no"
52dbaac8 19216fi
ca81d7a0 19217
f053c89f 19218rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
19219 conftest$ac_exeext conftest.$ac_ext
19220fi
ca81d7a0
JD
19221ac_res=`eval echo '${'$as_ac_var'}'`
19222 { echo "$as_me:$LINENO: result: $ac_res" >&5
19223echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19224if test `eval echo '${'$as_ac_var'}'` = yes; then
19225 cat >>confdefs.h <<_ACEOF
19226#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19227_ACEOF
19228
19229else
19230 GETOPT_H=getopt.h
19231fi
19232done
19233
19234 fi
19235
19236 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19237 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
19238echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
19239if test "${ac_cv_have_decl_optreset+set}" = set; then
19240 echo $ECHO_N "(cached) $ECHO_C" >&6
19241else
19242 cat >conftest.$ac_ext <<_ACEOF
19243/* confdefs.h. */
19244_ACEOF
19245cat confdefs.h >>conftest.$ac_ext
19246cat >>conftest.$ac_ext <<_ACEOF
19247/* end confdefs.h. */
19248#include <getopt.h>
19249
19250int
19251main ()
19252{
19253#ifndef optreset
f053c89f 19254 (void) optreset;
52dbaac8
PE
19255#endif
19256
19257 ;
19258 return 0;
19259}
19260_ACEOF
19261rm -f conftest.$ac_objext
ca81d7a0
JD
19262if { (ac_try="$ac_compile"
19263case "(($ac_try" in
19264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19265 *) ac_try_echo=$ac_try;;
19266esac
19267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19268 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19269 ac_status=$?
19270 grep -v '^ *+' conftest.er1 >conftest.err
19271 rm -f conftest.er1
19272 cat conftest.err >&5
19273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19274 (exit $ac_status); } && {
19275 test -z "$ac_c_werror_flag" ||
19276 test ! -s conftest.err
19277 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19278 ac_cv_have_decl_optreset=yes
19279else
19280 echo "$as_me: failed program was:" >&5
19281sed 's/^/| /' conftest.$ac_ext >&5
19282
ca81d7a0 19283 ac_cv_have_decl_optreset=no
52dbaac8 19284fi
ca81d7a0
JD
19285
19286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19287fi
ca81d7a0
JD
19288{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
19289echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
19290if test $ac_cv_have_decl_optreset = yes; then
19291 GETOPT_H=getopt.h
19292fi
19293
19294 fi
19295
19296 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19297 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
19298echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
19299if test "${gl_cv_func_gnu_getopt+set}" = set; then
19300 echo $ECHO_N "(cached) $ECHO_C" >&6
19301else
19302 if test "$cross_compiling" = yes; then
ca81d7a0
JD
19303 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
19304echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
19305if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
19306 echo $ECHO_N "(cached) $ECHO_C" >&6
19307else
19308 cat >conftest.$ac_ext <<_ACEOF
19309/* confdefs.h. */
19310_ACEOF
19311cat confdefs.h >>conftest.$ac_ext
19312cat >>conftest.$ac_ext <<_ACEOF
19313/* end confdefs.h. */
19314#include <getopt.h>
19315
19316int
19317main ()
19318{
19319#ifndef getopt_clip
f053c89f 19320 (void) getopt_clip;
52dbaac8
PE
19321#endif
19322
19323 ;
19324 return 0;
19325}
19326_ACEOF
19327rm -f conftest.$ac_objext
ca81d7a0
JD
19328if { (ac_try="$ac_compile"
19329case "(($ac_try" in
19330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19331 *) ac_try_echo=$ac_try;;
19332esac
19333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19334 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19335 ac_status=$?
19336 grep -v '^ *+' conftest.er1 >conftest.err
19337 rm -f conftest.er1
19338 cat conftest.err >&5
19339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19340 (exit $ac_status); } && {
19341 test -z "$ac_c_werror_flag" ||
19342 test ! -s conftest.err
19343 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19344 ac_cv_have_decl_getopt_clip=yes
19345else
19346 echo "$as_me: failed program was:" >&5
19347sed 's/^/| /' conftest.$ac_ext >&5
19348
ca81d7a0 19349 ac_cv_have_decl_getopt_clip=no
52dbaac8 19350fi
ca81d7a0
JD
19351
19352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19353fi
ca81d7a0
JD
19354{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
19355echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
19356if test $ac_cv_have_decl_getopt_clip = yes; then
19357 gl_cv_func_gnu_getopt=no
19358else
19359 gl_cv_func_gnu_getopt=yes
19360fi
19361
19362else
19363 cat >conftest.$ac_ext <<_ACEOF
19364/* confdefs.h. */
19365_ACEOF
19366cat confdefs.h >>conftest.$ac_ext
19367cat >>conftest.$ac_ext <<_ACEOF
19368/* end confdefs.h. */
19369#include <getopt.h>
19370int
19371main ()
19372{
19373
19374 char *myargv[3];
19375 myargv[0] = "conftest";
19376 myargv[1] = "-+";
19377 myargv[2] = 0;
19378 return getopt (2, myargv, "+a") != '?';
19379
19380 ;
19381 return 0;
19382}
19383_ACEOF
19384rm -f conftest$ac_exeext
ca81d7a0
JD
19385if { (ac_try="$ac_link"
19386case "(($ac_try" in
19387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19388 *) ac_try_echo=$ac_try;;
19389esac
19390eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19391 (eval "$ac_link") 2>&5
52dbaac8
PE
19392 ac_status=$?
19393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19394 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
19395 { (case "(($ac_try" in
19396 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19397 *) ac_try_echo=$ac_try;;
19398esac
19399eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19400 (eval "$ac_try") 2>&5
52dbaac8
PE
19401 ac_status=$?
19402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19403 (exit $ac_status); }; }; then
19404 gl_cv_func_gnu_getopt=yes
19405else
19406 echo "$as_me: program exited with status $ac_status" >&5
19407echo "$as_me: failed program was:" >&5
19408sed 's/^/| /' conftest.$ac_ext >&5
19409
19410( exit $ac_status )
19411gl_cv_func_gnu_getopt=no
19412fi
ca81d7a0 19413rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 19414fi
ca81d7a0
JD
19415
19416
52dbaac8 19417fi
ca81d7a0
JD
19418{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
19419echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
19420 if test "$gl_cv_func_gnu_getopt" = "no"; then
19421 GETOPT_H=getopt.h
19422 fi
19423 fi
19424
19425
19426
19427 if test -n "$GETOPT_H"; then
19428
19429
19430 GETOPT_H=getopt.h
19431
19432cat >>confdefs.h <<\_ACEOF
19433#define __GETOPT_PREFIX rpl_
19434_ACEOF
19435
19436
19437
19438 :
19439 GETOPTOBJS='getopt.o getopt1.o'
19440
19441fi
19442
19443
19444
19445
ca81d7a0
JD
19446{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
19447echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
19448if test "${ac_cv_func_getpgrp_void+set}" = set; then
19449 echo $ECHO_N "(cached) $ECHO_C" >&6
19450else
19451 # Use it with a single arg.
19452cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19453/* confdefs.h. */
19454_ACEOF
19455cat confdefs.h >>conftest.$ac_ext
19456cat >>conftest.$ac_ext <<_ACEOF
19457/* end confdefs.h. */
cd958eb3
MB
19458$ac_includes_default
19459int
19460main ()
19461{
19462getpgrp (0);
19463 ;
19464 return 0;
19465}
19466_ACEOF
19467rm -f conftest.$ac_objext
ca81d7a0
JD
19468if { (ac_try="$ac_compile"
19469case "(($ac_try" in
19470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19471 *) ac_try_echo=$ac_try;;
19472esac
19473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19474 (eval "$ac_compile") 2>conftest.er1
cd958eb3 19475 ac_status=$?
edfaf76d
LK
19476 grep -v '^ *+' conftest.er1 >conftest.err
19477 rm -f conftest.er1
19478 cat conftest.err >&5
cd958eb3 19479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19480 (exit $ac_status); } && {
19481 test -z "$ac_c_werror_flag" ||
19482 test ! -s conftest.err
19483 } && test -s conftest.$ac_objext; then
cd958eb3
MB
19484 ac_cv_func_getpgrp_void=no
19485else
19486 echo "$as_me: failed program was:" >&5
19650fd6
AS
19487sed 's/^/| /' conftest.$ac_ext >&5
19488
ca81d7a0 19489 ac_cv_func_getpgrp_void=yes
cd958eb3 19490fi
ca81d7a0
JD
19491
19492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
19493
19494fi
ca81d7a0
JD
19495{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
19496echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
19497if test $ac_cv_func_getpgrp_void = yes; then
19498
19499cat >>confdefs.h <<\_ACEOF
19500#define GETPGRP_VOID 1
19501_ACEOF
19502
19503fi
19504
19505
973a76b1
DL
19506
19507for ac_func in strftime
19508do
19509as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19510{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19511echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19512if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
19513 echo $ECHO_N "(cached) $ECHO_C" >&6
19514else
19515 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19516/* confdefs.h. */
19517_ACEOF
19518cat confdefs.h >>conftest.$ac_ext
19519cat >>conftest.$ac_ext <<_ACEOF
19520/* end confdefs.h. */
edfaf76d
LK
19521/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19522 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19523#define $ac_func innocuous_$ac_func
19524
973a76b1 19525/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19526 which can conflict with char $ac_func (); below.
19527 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19528 <limits.h> exists even on freestanding compilers. */
edfaf76d 19529
19650fd6
AS
19530#ifdef __STDC__
19531# include <limits.h>
19532#else
19533# include <assert.h>
19534#endif
edfaf76d
LK
19535
19536#undef $ac_func
19537
ca81d7a0
JD
19538/* Override any GCC internal prototype to avoid an error.
19539 Use char because int might match the return type of a GCC
19540 builtin and then its argument prototype would still apply. */
973a76b1
DL
19541#ifdef __cplusplus
19542extern "C"
973a76b1 19543#endif
973a76b1
DL
19544char $ac_func ();
19545/* The GNU C library defines this for functions which it implements
19546 to always fail with ENOSYS. Some functions are actually named
19547 something starting with __ and the normal name is an alias. */
ca81d7a0 19548#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 19549choke me
973a76b1
DL
19550#endif
19551
19650fd6
AS
19552int
19553main ()
19554{
ca81d7a0 19555return $ac_func ();
973a76b1
DL
19556 ;
19557 return 0;
19558}
19559_ACEOF
19560rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19561if { (ac_try="$ac_link"
19562case "(($ac_try" in
19563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19564 *) ac_try_echo=$ac_try;;
19565esac
19566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19567 (eval "$ac_link") 2>conftest.er1
973a76b1 19568 ac_status=$?
edfaf76d
LK
19569 grep -v '^ *+' conftest.er1 >conftest.err
19570 rm -f conftest.er1
19571 cat conftest.err >&5
973a76b1 19572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19573 (exit $ac_status); } && {
19574 test -z "$ac_c_werror_flag" ||
19575 test ! -s conftest.err
19576 } && test -s conftest$ac_exeext &&
19577 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19578 eval "$as_ac_var=yes"
19579else
19580 echo "$as_me: failed program was:" >&5
19650fd6
AS
19581sed 's/^/| /' conftest.$ac_ext >&5
19582
ca81d7a0 19583 eval "$as_ac_var=no"
973a76b1 19584fi
ca81d7a0 19585
f053c89f 19586rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19587 conftest$ac_exeext conftest.$ac_ext
973a76b1 19588fi
ca81d7a0
JD
19589ac_res=`eval echo '${'$as_ac_var'}'`
19590 { echo "$as_me:$LINENO: result: $ac_res" >&5
19591echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
19592if test `eval echo '${'$as_ac_var'}'` = yes; then
19593 cat >>confdefs.h <<_ACEOF
19594#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19595_ACEOF
19596
19597else
19598 # strftime is in -lintl on SCO UNIX.
ca81d7a0
JD
19599{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
19600echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
19601if test "${ac_cv_lib_intl_strftime+set}" = set; then
19602 echo $ECHO_N "(cached) $ECHO_C" >&6
19603else
19604 ac_check_lib_save_LIBS=$LIBS
19605LIBS="-lintl $LIBS"
19606cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19607/* confdefs.h. */
19608_ACEOF
19609cat confdefs.h >>conftest.$ac_ext
19610cat >>conftest.$ac_ext <<_ACEOF
19611/* end confdefs.h. */
973a76b1 19612
ca81d7a0
JD
19613/* Override any GCC internal prototype to avoid an error.
19614 Use char because int might match the return type of a GCC
19615 builtin and then its argument prototype would still apply. */
973a76b1
DL
19616#ifdef __cplusplus
19617extern "C"
19618#endif
973a76b1
DL
19619char strftime ();
19620int
19621main ()
19622{
ca81d7a0 19623return strftime ();
973a76b1
DL
19624 ;
19625 return 0;
19626}
19627_ACEOF
19628rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19629if { (ac_try="$ac_link"
19630case "(($ac_try" in
19631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19632 *) ac_try_echo=$ac_try;;
19633esac
19634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19635 (eval "$ac_link") 2>conftest.er1
973a76b1 19636 ac_status=$?
edfaf76d
LK
19637 grep -v '^ *+' conftest.er1 >conftest.err
19638 rm -f conftest.er1
19639 cat conftest.err >&5
973a76b1 19640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19641 (exit $ac_status); } && {
19642 test -z "$ac_c_werror_flag" ||
19643 test ! -s conftest.err
19644 } && test -s conftest$ac_exeext &&
19645 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19646 ac_cv_lib_intl_strftime=yes
19647else
19648 echo "$as_me: failed program was:" >&5
19650fd6
AS
19649sed 's/^/| /' conftest.$ac_ext >&5
19650
ca81d7a0 19651 ac_cv_lib_intl_strftime=no
973a76b1 19652fi
ca81d7a0 19653
f053c89f 19654rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19655 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19656LIBS=$ac_check_lib_save_LIBS
19657fi
ca81d7a0
JD
19658{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
19659echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
19660if test $ac_cv_lib_intl_strftime = yes; then
19661 cat >>confdefs.h <<\_ACEOF
19662#define HAVE_STRFTIME 1
19663_ACEOF
19664
19665LIBS="-lintl $LIBS"
19666fi
19667
19668fi
19669done
19670
19671
b936fae4
AS
19672# UNIX98 PTYs.
19673
19674for ac_func in grantpt
503d2be0
AS
19675do
19676as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19677{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19678echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19679if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19680 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19681else
503d2be0 19682 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19683/* confdefs.h. */
19684_ACEOF
19685cat confdefs.h >>conftest.$ac_ext
19686cat >>conftest.$ac_ext <<_ACEOF
19687/* end confdefs.h. */
edfaf76d
LK
19688/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19689 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19690#define $ac_func innocuous_$ac_func
19691
503d2be0 19692/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19693 which can conflict with char $ac_func (); below.
19694 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19695 <limits.h> exists even on freestanding compilers. */
edfaf76d 19696
19650fd6
AS
19697#ifdef __STDC__
19698# include <limits.h>
19699#else
19700# include <assert.h>
19701#endif
edfaf76d
LK
19702
19703#undef $ac_func
19704
ca81d7a0
JD
19705/* Override any GCC internal prototype to avoid an error.
19706 Use char because int might match the return type of a GCC
19707 builtin and then its argument prototype would still apply. */
503d2be0
AS
19708#ifdef __cplusplus
19709extern "C"
19710#endif
503d2be0 19711char $ac_func ();
503d2be0
AS
19712/* The GNU C library defines this for functions which it implements
19713 to always fail with ENOSYS. Some functions are actually named
19714 something starting with __ and the normal name is an alias. */
ca81d7a0 19715#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 19716choke me
503d2be0 19717#endif
4c343001 19718
19650fd6
AS
19719int
19720main ()
19721{
ca81d7a0 19722return $ac_func ();
503d2be0
AS
19723 ;
19724 return 0;
19725}
19726_ACEOF
19727rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19728if { (ac_try="$ac_link"
19729case "(($ac_try" in
19730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19731 *) ac_try_echo=$ac_try;;
19732esac
19733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19734 (eval "$ac_link") 2>conftest.er1
503d2be0 19735 ac_status=$?
edfaf76d
LK
19736 grep -v '^ *+' conftest.er1 >conftest.err
19737 rm -f conftest.er1
19738 cat conftest.err >&5
c0d27fcc 19739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19740 (exit $ac_status); } && {
19741 test -z "$ac_c_werror_flag" ||
19742 test ! -s conftest.err
19743 } && test -s conftest$ac_exeext &&
19744 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19745 eval "$as_ac_var=yes"
19746else
19747 echo "$as_me: failed program was:" >&5
19650fd6
AS
19748sed 's/^/| /' conftest.$ac_ext >&5
19749
ca81d7a0 19750 eval "$as_ac_var=no"
503d2be0 19751fi
ca81d7a0 19752
f053c89f 19753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19754 conftest$ac_exeext conftest.$ac_ext
503d2be0 19755fi
ca81d7a0
JD
19756ac_res=`eval echo '${'$as_ac_var'}'`
19757 { echo "$as_me:$LINENO: result: $ac_res" >&5
19758echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19759if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19760 cat >>confdefs.h <<_ACEOF
503d2be0 19761#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19762_ACEOF
4c343001
DL
19763
19764fi
503d2be0
AS
19765done
19766
c0d27fcc 19767
b936fae4 19768# PTY-related GNU extensions.
4c343001 19769
b936fae4
AS
19770for ac_func in getpt
19771do
19772as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19773{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19774echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19775if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19776 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19777else
b936fae4 19778 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19779/* confdefs.h. */
19780_ACEOF
19781cat confdefs.h >>conftest.$ac_ext
19782cat >>conftest.$ac_ext <<_ACEOF
19783/* end confdefs.h. */
edfaf76d
LK
19784/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19785 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19786#define $ac_func innocuous_$ac_func
19787
087121cc 19788/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19789 which can conflict with char $ac_func (); below.
19790 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19791 <limits.h> exists even on freestanding compilers. */
edfaf76d 19792
19650fd6
AS
19793#ifdef __STDC__
19794# include <limits.h>
19795#else
19796# include <assert.h>
19797#endif
edfaf76d
LK
19798
19799#undef $ac_func
19800
ca81d7a0
JD
19801/* Override any GCC internal prototype to avoid an error.
19802 Use char because int might match the return type of a GCC
19803 builtin and then its argument prototype would still apply. */
503d2be0
AS
19804#ifdef __cplusplus
19805extern "C"
19806#endif
503d2be0 19807char $ac_func ();
087121cc
GM
19808/* The GNU C library defines this for functions which it implements
19809 to always fail with ENOSYS. Some functions are actually named
19810 something starting with __ and the normal name is an alias. */
ca81d7a0 19811#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19812choke me
087121cc
GM
19813#endif
19814
19650fd6
AS
19815int
19816main ()
19817{
ca81d7a0 19818return $ac_func ();
503d2be0
AS
19819 ;
19820 return 0;
19821}
19822_ACEOF
19823rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19824if { (ac_try="$ac_link"
19825case "(($ac_try" in
19826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19827 *) ac_try_echo=$ac_try;;
19828esac
19829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19830 (eval "$ac_link") 2>conftest.er1
503d2be0 19831 ac_status=$?
edfaf76d
LK
19832 grep -v '^ *+' conftest.er1 >conftest.err
19833 rm -f conftest.er1
19834 cat conftest.err >&5
c0d27fcc 19835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19836 (exit $ac_status); } && {
19837 test -z "$ac_c_werror_flag" ||
19838 test ! -s conftest.err
19839 } && test -s conftest$ac_exeext &&
19840 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19841 eval "$as_ac_var=yes"
19842else
19843 echo "$as_me: failed program was:" >&5
19650fd6
AS
19844sed 's/^/| /' conftest.$ac_ext >&5
19845
ca81d7a0 19846 eval "$as_ac_var=no"
503d2be0 19847fi
ca81d7a0 19848
f053c89f 19849rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19850 conftest$ac_exeext conftest.$ac_ext
503d2be0 19851fi
ca81d7a0
JD
19852ac_res=`eval echo '${'$as_ac_var'}'`
19853 { echo "$as_me:$LINENO: result: $ac_res" >&5
19854echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19855if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19856 cat >>confdefs.h <<_ACEOF
503d2be0 19857#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19858_ACEOF
087121cc 19859
087121cc
GM
19860fi
19861done
19862
c0d27fcc 19863
ba4481b5
DL
19864# Check this now, so that we will NOT find the above functions in ncurses.
19865# That is because we have not set up to link ncurses in lib-src.
19866# It's better to believe a function is not available
19867# than to expect to find it in ncurses.
503d2be0 19868
ca81d7a0
JD
19869{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
19870echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
19871if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
19872 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19873else
503d2be0 19874 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19875LIBS="-lncurses $LIBS"
503d2be0 19876cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19877/* confdefs.h. */
19878_ACEOF
19879cat confdefs.h >>conftest.$ac_ext
19880cat >>conftest.$ac_ext <<_ACEOF
19881/* end confdefs.h. */
503d2be0 19882
ca81d7a0
JD
19883/* Override any GCC internal prototype to avoid an error.
19884 Use char because int might match the return type of a GCC
19885 builtin and then its argument prototype would still apply. */
503d2be0
AS
19886#ifdef __cplusplus
19887extern "C"
19888#endif
503d2be0
AS
19889char tparm ();
19890int
19891main ()
19892{
ca81d7a0 19893return tparm ();
503d2be0
AS
19894 ;
19895 return 0;
19896}
19897_ACEOF
19898rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19899if { (ac_try="$ac_link"
19900case "(($ac_try" in
19901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19902 *) ac_try_echo=$ac_try;;
19903esac
19904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19905 (eval "$ac_link") 2>conftest.er1
503d2be0 19906 ac_status=$?
edfaf76d
LK
19907 grep -v '^ *+' conftest.er1 >conftest.err
19908 rm -f conftest.er1
19909 cat conftest.err >&5
c0d27fcc 19910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19911 (exit $ac_status); } && {
19912 test -z "$ac_c_werror_flag" ||
19913 test ! -s conftest.err
19914 } && test -s conftest$ac_exeext &&
19915 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19916 ac_cv_lib_ncurses_tparm=yes
19917else
19918 echo "$as_me: failed program was:" >&5
19650fd6
AS
19919sed 's/^/| /' conftest.$ac_ext >&5
19920
ca81d7a0 19921 ac_cv_lib_ncurses_tparm=no
503d2be0 19922fi
ca81d7a0 19923
f053c89f 19924rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19925 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19926LIBS=$ac_check_lib_save_LIBS
19927fi
ca81d7a0
JD
19928{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
19929echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 19930if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 19931 cat >>confdefs.h <<_ACEOF
503d2be0 19932#define HAVE_LIBNCURSES 1
c0d27fcc 19933_ACEOF
ba4481b5
DL
19934
19935 LIBS="-lncurses $LIBS"
19936
ba4481b5
DL
19937fi
19938
c0d27fcc 19939
bc3512d0
CY
19940# Do we have res_init, for detecting changes in /etc/resolv.conf?
19941
19942resolv=no
074767f2 19943cat >conftest.$ac_ext <<_ACEOF
bc3512d0
CY
19944/* confdefs.h. */
19945_ACEOF
19946cat confdefs.h >>conftest.$ac_ext
19947cat >>conftest.$ac_ext <<_ACEOF
19948/* end confdefs.h. */
074767f2
AS
19949#include <netinet/in.h>
19950#include <arpa/nameser.h>
19951#include <resolv.h>
bc3512d0
CY
19952int
19953main ()
19954{
074767f2 19955return res_init();
bc3512d0
CY
19956 ;
19957 return 0;
19958}
19959_ACEOF
19960rm -f conftest.$ac_objext conftest$ac_exeext
19961if { (ac_try="$ac_link"
19962case "(($ac_try" in
19963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19964 *) ac_try_echo=$ac_try;;
19965esac
19966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19967 (eval "$ac_link") 2>conftest.er1
19968 ac_status=$?
19969 grep -v '^ *+' conftest.er1 >conftest.err
19970 rm -f conftest.er1
19971 cat conftest.err >&5
19972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19973 (exit $ac_status); } && {
19974 test -z "$ac_c_werror_flag" ||
19975 test ! -s conftest.err
19976 } && test -s conftest$ac_exeext &&
19977 $as_test_x conftest$ac_exeext; then
074767f2 19978 have_res_init=yes
bc3512d0
CY
19979else
19980 echo "$as_me: failed program was:" >&5
19981sed 's/^/| /' conftest.$ac_ext >&5
19982
074767f2 19983 have_res_init=no
bc3512d0
CY
19984fi
19985
19986rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19987 conftest$ac_exeext conftest.$ac_ext
bc3512d0
CY
19988if test "$have_res_init" = no; then
19989 OLIBS="$LIBS"
19990 LIBS="$LIBS -lresolv"
19991 { echo "$as_me:$LINENO: checking for res_init with -lresolv" >&5
19992echo $ECHO_N "checking for res_init with -lresolv... $ECHO_C" >&6; }
19993 cat >conftest.$ac_ext <<_ACEOF
19994/* confdefs.h. */
19995_ACEOF
19996cat confdefs.h >>conftest.$ac_ext
19997cat >>conftest.$ac_ext <<_ACEOF
19998/* end confdefs.h. */
19999#include <netinet/in.h>
20000#include <arpa/nameser.h>
20001#include <resolv.h>
20002int
20003main ()
20004{
074767f2 20005return res_init();
bc3512d0
CY
20006 ;
20007 return 0;
20008}
20009_ACEOF
20010rm -f conftest.$ac_objext conftest$ac_exeext
20011if { (ac_try="$ac_link"
20012case "(($ac_try" in
20013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20014 *) ac_try_echo=$ac_try;;
20015esac
20016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20017 (eval "$ac_link") 2>conftest.er1
20018 ac_status=$?
20019 grep -v '^ *+' conftest.er1 >conftest.err
20020 rm -f conftest.er1
20021 cat conftest.err >&5
20022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20023 (exit $ac_status); } && {
20024 test -z "$ac_c_werror_flag" ||
20025 test ! -s conftest.err
20026 } && test -s conftest$ac_exeext &&
20027 $as_test_x conftest$ac_exeext; then
20028 have_res_init=yes
20029else
20030 echo "$as_me: failed program was:" >&5
20031sed 's/^/| /' conftest.$ac_ext >&5
20032
20033 have_res_init=no
20034fi
20035
20036rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20037 conftest$ac_exeext conftest.$ac_ext
20038 { echo "$as_me:$LINENO: result: $have_res_init" >&5
20039echo "${ECHO_T}$have_res_init" >&6; }
20040 if test "$have_res_init" = yes ; then
20041 resolv=yes
20042 fi
20043 LIBS="$OLIBS"
20044fi
20045
20046if test "$have_res_init" = yes; then
20047
20048cat >>confdefs.h <<\_ACEOF
20049#define HAVE_RES_INIT 1
20050_ACEOF
20051
20052fi
20053
84e70f78 20054# Do we need the Hesiod library to provide the support routines?
ff1095d1 20055if test "$with_hesiod" != no ; then
84e70f78 20056 # Don't set $LIBS here -- see comments above.
ca81d7a0
JD
20057 { echo "$as_me:$LINENO: checking for res_send" >&5
20058echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
20059if test "${ac_cv_func_res_send+set}" = set; then
20060 echo $ECHO_N "(cached) $ECHO_C" >&6
20061else
20062 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20063/* confdefs.h. */
20064_ACEOF
20065cat confdefs.h >>conftest.$ac_ext
20066cat >>conftest.$ac_ext <<_ACEOF
20067/* end confdefs.h. */
edfaf76d
LK
20068/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
20069 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20070#define res_send innocuous_res_send
20071
84e70f78 20072/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20073 which can conflict with char res_send (); below.
20074 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20075 <limits.h> exists even on freestanding compilers. */
edfaf76d 20076
19650fd6
AS
20077#ifdef __STDC__
20078# include <limits.h>
20079#else
20080# include <assert.h>
20081#endif
edfaf76d
LK
20082
20083#undef res_send
20084
ca81d7a0
JD
20085/* Override any GCC internal prototype to avoid an error.
20086 Use char because int might match the return type of a GCC
20087 builtin and then its argument prototype would still apply. */
84e70f78
KR
20088#ifdef __cplusplus
20089extern "C"
20090#endif
84e70f78 20091char res_send ();
84e70f78
KR
20092/* The GNU C library defines this for functions which it implements
20093 to always fail with ENOSYS. Some functions are actually named
20094 something starting with __ and the normal name is an alias. */
ca81d7a0 20095#if defined __stub_res_send || defined __stub___res_send
84e70f78 20096choke me
cd958eb3
MB
20097#endif
20098
19650fd6
AS
20099int
20100main ()
20101{
ca81d7a0 20102return res_send ();
84e70f78
KR
20103 ;
20104 return 0;
20105}
20106_ACEOF
20107rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20108if { (ac_try="$ac_link"
20109case "(($ac_try" in
20110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20111 *) ac_try_echo=$ac_try;;
20112esac
20113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20114 (eval "$ac_link") 2>conftest.er1
84e70f78 20115 ac_status=$?
edfaf76d
LK
20116 grep -v '^ *+' conftest.er1 >conftest.err
20117 rm -f conftest.er1
20118 cat conftest.err >&5
c0d27fcc 20119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20120 (exit $ac_status); } && {
20121 test -z "$ac_c_werror_flag" ||
20122 test ! -s conftest.err
20123 } && test -s conftest$ac_exeext &&
20124 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20125 ac_cv_func_res_send=yes
20126else
20127 echo "$as_me: failed program was:" >&5
19650fd6
AS
20128sed 's/^/| /' conftest.$ac_ext >&5
20129
ca81d7a0 20130 ac_cv_func_res_send=no
84e70f78 20131fi
ca81d7a0 20132
f053c89f 20133rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20134 conftest$ac_exeext conftest.$ac_ext
84e70f78 20135fi
ca81d7a0
JD
20136{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
20137echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
20138if test $ac_cv_func_res_send = yes; then
20139 :
20140else
ca81d7a0
JD
20141 { echo "$as_me:$LINENO: checking for __res_send" >&5
20142echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
20143if test "${ac_cv_func___res_send+set}" = set; then
20144 echo $ECHO_N "(cached) $ECHO_C" >&6
20145else
20146 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20147/* confdefs.h. */
20148_ACEOF
20149cat confdefs.h >>conftest.$ac_ext
20150cat >>conftest.$ac_ext <<_ACEOF
20151/* end confdefs.h. */
edfaf76d
LK
20152/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
20153 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20154#define __res_send innocuous___res_send
20155
84e70f78 20156/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20157 which can conflict with char __res_send (); below.
20158 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20159 <limits.h> exists even on freestanding compilers. */
edfaf76d 20160
19650fd6
AS
20161#ifdef __STDC__
20162# include <limits.h>
20163#else
20164# include <assert.h>
20165#endif
edfaf76d
LK
20166
20167#undef __res_send
20168
ca81d7a0
JD
20169/* Override any GCC internal prototype to avoid an error.
20170 Use char because int might match the return type of a GCC
20171 builtin and then its argument prototype would still apply. */
84e70f78
KR
20172#ifdef __cplusplus
20173extern "C"
20174#endif
84e70f78 20175char __res_send ();
84e70f78
KR
20176/* The GNU C library defines this for functions which it implements
20177 to always fail with ENOSYS. Some functions are actually named
20178 something starting with __ and the normal name is an alias. */
ca81d7a0 20179#if defined __stub___res_send || defined __stub_____res_send
84e70f78 20180choke me
84e70f78
KR
20181#endif
20182
19650fd6
AS
20183int
20184main ()
20185{
ca81d7a0 20186return __res_send ();
84e70f78
KR
20187 ;
20188 return 0;
20189}
20190_ACEOF
20191rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20192if { (ac_try="$ac_link"
20193case "(($ac_try" in
20194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20195 *) ac_try_echo=$ac_try;;
20196esac
20197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20198 (eval "$ac_link") 2>conftest.er1
84e70f78 20199 ac_status=$?
edfaf76d
LK
20200 grep -v '^ *+' conftest.er1 >conftest.err
20201 rm -f conftest.er1
20202 cat conftest.err >&5
c0d27fcc 20203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20204 (exit $ac_status); } && {
20205 test -z "$ac_c_werror_flag" ||
20206 test ! -s conftest.err
20207 } && test -s conftest$ac_exeext &&
20208 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20209 ac_cv_func___res_send=yes
20210else
20211 echo "$as_me: failed program was:" >&5
19650fd6
AS
20212sed 's/^/| /' conftest.$ac_ext >&5
20213
ca81d7a0 20214 ac_cv_func___res_send=no
84e70f78 20215fi
ca81d7a0 20216
f053c89f 20217rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20218 conftest$ac_exeext conftest.$ac_ext
84e70f78 20219fi
ca81d7a0
JD
20220{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
20221echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
20222if test $ac_cv_func___res_send = yes; then
20223 :
20224else
ca81d7a0
JD
20225 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
20226echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20227if test "${ac_cv_lib_resolv_res_send+set}" = set; then
20228 echo $ECHO_N "(cached) $ECHO_C" >&6
20229else
20230 ac_check_lib_save_LIBS=$LIBS
20231LIBS="-lresolv $LIBS"
20232cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20233/* confdefs.h. */
20234_ACEOF
20235cat confdefs.h >>conftest.$ac_ext
20236cat >>conftest.$ac_ext <<_ACEOF
20237/* end confdefs.h. */
84e70f78 20238
ca81d7a0
JD
20239/* Override any GCC internal prototype to avoid an error.
20240 Use char because int might match the return type of a GCC
20241 builtin and then its argument prototype would still apply. */
84e70f78
KR
20242#ifdef __cplusplus
20243extern "C"
20244#endif
84e70f78
KR
20245char res_send ();
20246int
20247main ()
20248{
ca81d7a0 20249return res_send ();
84e70f78
KR
20250 ;
20251 return 0;
20252}
20253_ACEOF
20254rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20255if { (ac_try="$ac_link"
20256case "(($ac_try" in
20257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20258 *) ac_try_echo=$ac_try;;
20259esac
20260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20261 (eval "$ac_link") 2>conftest.er1
84e70f78 20262 ac_status=$?
edfaf76d
LK
20263 grep -v '^ *+' conftest.er1 >conftest.err
20264 rm -f conftest.er1
20265 cat conftest.err >&5
c0d27fcc 20266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20267 (exit $ac_status); } && {
20268 test -z "$ac_c_werror_flag" ||
20269 test ! -s conftest.err
20270 } && test -s conftest$ac_exeext &&
20271 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20272 ac_cv_lib_resolv_res_send=yes
20273else
20274 echo "$as_me: failed program was:" >&5
19650fd6
AS
20275sed 's/^/| /' conftest.$ac_ext >&5
20276
ca81d7a0 20277 ac_cv_lib_resolv_res_send=no
84e70f78 20278fi
ca81d7a0 20279
f053c89f 20280rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20281 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20282LIBS=$ac_check_lib_save_LIBS
20283fi
ca81d7a0
JD
20284{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
20285echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
20286if test $ac_cv_lib_resolv_res_send = yes; then
20287 resolv=yes
20288else
ca81d7a0
JD
20289 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
20290echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20291if test "${ac_cv_lib_resolv___res_send+set}" = set; then
20292 echo $ECHO_N "(cached) $ECHO_C" >&6
20293else
20294 ac_check_lib_save_LIBS=$LIBS
20295LIBS="-lresolv $LIBS"
20296cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20297/* confdefs.h. */
20298_ACEOF
20299cat confdefs.h >>conftest.$ac_ext
20300cat >>conftest.$ac_ext <<_ACEOF
20301/* end confdefs.h. */
84e70f78 20302
ca81d7a0
JD
20303/* Override any GCC internal prototype to avoid an error.
20304 Use char because int might match the return type of a GCC
20305 builtin and then its argument prototype would still apply. */
84e70f78
KR
20306#ifdef __cplusplus
20307extern "C"
20308#endif
84e70f78
KR
20309char __res_send ();
20310int
20311main ()
20312{
ca81d7a0 20313return __res_send ();
84e70f78
KR
20314 ;
20315 return 0;
20316}
20317_ACEOF
20318rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20319if { (ac_try="$ac_link"
20320case "(($ac_try" in
20321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20322 *) ac_try_echo=$ac_try;;
20323esac
20324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20325 (eval "$ac_link") 2>conftest.er1
84e70f78 20326 ac_status=$?
edfaf76d
LK
20327 grep -v '^ *+' conftest.er1 >conftest.err
20328 rm -f conftest.er1
20329 cat conftest.err >&5
c0d27fcc 20330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20331 (exit $ac_status); } && {
20332 test -z "$ac_c_werror_flag" ||
20333 test ! -s conftest.err
20334 } && test -s conftest$ac_exeext &&
20335 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20336 ac_cv_lib_resolv___res_send=yes
20337else
20338 echo "$as_me: failed program was:" >&5
19650fd6
AS
20339sed 's/^/| /' conftest.$ac_ext >&5
20340
ca81d7a0 20341 ac_cv_lib_resolv___res_send=no
84e70f78 20342fi
ca81d7a0 20343
f053c89f 20344rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20345 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20346LIBS=$ac_check_lib_save_LIBS
20347fi
ca81d7a0
JD
20348{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
20349echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
20350if test $ac_cv_lib_resolv___res_send = yes; then
20351 resolv=yes
20352fi
20353
20354fi
20355
20356fi
20357
20358fi
20359
20360 if test "$resolv" = yes ; then
20361 RESOLVLIB=-lresolv
84e70f78
KR
20362 else
20363 RESOLVLIB=
20364 fi
ca81d7a0
JD
20365 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
20366echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
20367if test "${ac_cv_func_hes_getmailhost+set}" = set; then
20368 echo $ECHO_N "(cached) $ECHO_C" >&6
20369else
20370 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20371/* confdefs.h. */
20372_ACEOF
20373cat confdefs.h >>conftest.$ac_ext
20374cat >>conftest.$ac_ext <<_ACEOF
20375/* end confdefs.h. */
edfaf76d
LK
20376/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
20377 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20378#define hes_getmailhost innocuous_hes_getmailhost
20379
84e70f78 20380/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20381 which can conflict with char hes_getmailhost (); below.
20382 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20383 <limits.h> exists even on freestanding compilers. */
edfaf76d 20384
19650fd6
AS
20385#ifdef __STDC__
20386# include <limits.h>
20387#else
20388# include <assert.h>
20389#endif
edfaf76d
LK
20390
20391#undef hes_getmailhost
20392
ca81d7a0
JD
20393/* Override any GCC internal prototype to avoid an error.
20394 Use char because int might match the return type of a GCC
20395 builtin and then its argument prototype would still apply. */
84e70f78
KR
20396#ifdef __cplusplus
20397extern "C"
20398#endif
84e70f78 20399char hes_getmailhost ();
84e70f78
KR
20400/* The GNU C library defines this for functions which it implements
20401 to always fail with ENOSYS. Some functions are actually named
20402 something starting with __ and the normal name is an alias. */
ca81d7a0 20403#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 20404choke me
cd958eb3
MB
20405#endif
20406
19650fd6
AS
20407int
20408main ()
20409{
ca81d7a0 20410return hes_getmailhost ();
84e70f78
KR
20411 ;
20412 return 0;
20413}
20414_ACEOF
20415rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20416if { (ac_try="$ac_link"
20417case "(($ac_try" in
20418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20419 *) ac_try_echo=$ac_try;;
20420esac
20421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20422 (eval "$ac_link") 2>conftest.er1
84e70f78 20423 ac_status=$?
edfaf76d
LK
20424 grep -v '^ *+' conftest.er1 >conftest.err
20425 rm -f conftest.er1
20426 cat conftest.err >&5
c0d27fcc 20427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20428 (exit $ac_status); } && {
20429 test -z "$ac_c_werror_flag" ||
20430 test ! -s conftest.err
20431 } && test -s conftest$ac_exeext &&
20432 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20433 ac_cv_func_hes_getmailhost=yes
20434else
20435 echo "$as_me: failed program was:" >&5
19650fd6
AS
20436sed 's/^/| /' conftest.$ac_ext >&5
20437
ca81d7a0 20438 ac_cv_func_hes_getmailhost=no
84e70f78 20439fi
ca81d7a0 20440
f053c89f 20441rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20442 conftest$ac_exeext conftest.$ac_ext
84e70f78 20443fi
ca81d7a0
JD
20444{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
20445echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
20446if test $ac_cv_func_hes_getmailhost = yes; then
20447 :
20448else
ca81d7a0
JD
20449 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
20450echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
20451if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
20452 echo $ECHO_N "(cached) $ECHO_C" >&6
20453else
20454 ac_check_lib_save_LIBS=$LIBS
20455LIBS="-lhesiod $RESOLVLIB $LIBS"
20456cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20457/* confdefs.h. */
20458_ACEOF
20459cat confdefs.h >>conftest.$ac_ext
20460cat >>conftest.$ac_ext <<_ACEOF
20461/* end confdefs.h. */
84e70f78 20462
ca81d7a0
JD
20463/* Override any GCC internal prototype to avoid an error.
20464 Use char because int might match the return type of a GCC
20465 builtin and then its argument prototype would still apply. */
84e70f78
KR
20466#ifdef __cplusplus
20467extern "C"
20468#endif
84e70f78
KR
20469char hes_getmailhost ();
20470int
20471main ()
20472{
ca81d7a0 20473return hes_getmailhost ();
84e70f78
KR
20474 ;
20475 return 0;
20476}
20477_ACEOF
20478rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20479if { (ac_try="$ac_link"
20480case "(($ac_try" in
20481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20482 *) ac_try_echo=$ac_try;;
20483esac
20484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20485 (eval "$ac_link") 2>conftest.er1
84e70f78 20486 ac_status=$?
edfaf76d
LK
20487 grep -v '^ *+' conftest.er1 >conftest.err
20488 rm -f conftest.er1
20489 cat conftest.err >&5
c0d27fcc 20490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20491 (exit $ac_status); } && {
20492 test -z "$ac_c_werror_flag" ||
20493 test ! -s conftest.err
20494 } && test -s conftest$ac_exeext &&
20495 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20496 ac_cv_lib_hesiod_hes_getmailhost=yes
20497else
20498 echo "$as_me: failed program was:" >&5
19650fd6
AS
20499sed 's/^/| /' conftest.$ac_ext >&5
20500
ca81d7a0 20501 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 20502fi
ca81d7a0 20503
f053c89f 20504rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20505 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20506LIBS=$ac_check_lib_save_LIBS
20507fi
ca81d7a0
JD
20508{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
20509echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 20510if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 20511
c0d27fcc 20512cat >>confdefs.h <<\_ACEOF
84e70f78 20513#define HAVE_LIBHESIOD 1
c0d27fcc 20514_ACEOF
84e70f78
KR
20515
20516else
20517 :
20518fi
20519
20520fi
20521
20522fi
20523
bc3512d0
CY
20524# Do we need libresolv (due to res_init or Hesiod)?
20525if test "$resolv" = yes ; then
20526
20527cat >>confdefs.h <<\_ACEOF
20528#define HAVE_LIBRESOLV 1
20529_ACEOF
20530
20531fi
20532
a21616bd 20533# These tell us which Kerberos-related libraries to use.
ff1095d1 20534if test "${with_kerberos}" != no; then
503d2be0 20535
ca81d7a0
JD
20536{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
20537echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
20538if test "${ac_cv_lib_com_err_com_err+set}" = set; then
20539 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20540else
503d2be0 20541 ac_check_lib_save_LIBS=$LIBS
a21616bd 20542LIBS="-lcom_err $LIBS"
503d2be0 20543cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20544/* confdefs.h. */
20545_ACEOF
20546cat confdefs.h >>conftest.$ac_ext
20547cat >>conftest.$ac_ext <<_ACEOF
20548/* end confdefs.h. */
503d2be0 20549
ca81d7a0
JD
20550/* Override any GCC internal prototype to avoid an error.
20551 Use char because int might match the return type of a GCC
20552 builtin and then its argument prototype would still apply. */
503d2be0
AS
20553#ifdef __cplusplus
20554extern "C"
20555#endif
503d2be0
AS
20556char com_err ();
20557int
20558main ()
20559{
ca81d7a0 20560return com_err ();
503d2be0
AS
20561 ;
20562 return 0;
20563}
20564_ACEOF
20565rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20566if { (ac_try="$ac_link"
20567case "(($ac_try" in
20568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20569 *) ac_try_echo=$ac_try;;
20570esac
20571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20572 (eval "$ac_link") 2>conftest.er1
503d2be0 20573 ac_status=$?
edfaf76d
LK
20574 grep -v '^ *+' conftest.er1 >conftest.err
20575 rm -f conftest.er1
20576 cat conftest.err >&5
c0d27fcc 20577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20578 (exit $ac_status); } && {
20579 test -z "$ac_c_werror_flag" ||
20580 test ! -s conftest.err
20581 } && test -s conftest$ac_exeext &&
20582 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20583 ac_cv_lib_com_err_com_err=yes
20584else
20585 echo "$as_me: failed program was:" >&5
19650fd6
AS
20586sed 's/^/| /' conftest.$ac_ext >&5
20587
ca81d7a0 20588 ac_cv_lib_com_err_com_err=no
503d2be0 20589fi
ca81d7a0 20590
f053c89f 20591rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20592 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20593LIBS=$ac_check_lib_save_LIBS
20594fi
ca81d7a0
JD
20595{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
20596echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 20597if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 20598 cat >>confdefs.h <<_ACEOF
503d2be0 20599#define HAVE_LIBCOM_ERR 1
c0d27fcc 20600_ACEOF
a21616bd
KR
20601
20602 LIBS="-lcom_err $LIBS"
20603
a21616bd
KR
20604fi
20605
c0d27fcc 20606
ca81d7a0
JD
20607{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
20608echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
20609if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
20610 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20611else
503d2be0 20612 ac_check_lib_save_LIBS=$LIBS
a21616bd 20613LIBS="-lk5crypto $LIBS"
503d2be0 20614cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20615/* confdefs.h. */
20616_ACEOF
20617cat confdefs.h >>conftest.$ac_ext
20618cat >>conftest.$ac_ext <<_ACEOF
20619/* end confdefs.h. */
503d2be0 20620
ca81d7a0
JD
20621/* Override any GCC internal prototype to avoid an error.
20622 Use char because int might match the return type of a GCC
20623 builtin and then its argument prototype would still apply. */
503d2be0
AS
20624#ifdef __cplusplus
20625extern "C"
20626#endif
503d2be0
AS
20627char mit_des_cbc_encrypt ();
20628int
20629main ()
20630{
ca81d7a0 20631return mit_des_cbc_encrypt ();
503d2be0
AS
20632 ;
20633 return 0;
20634}
20635_ACEOF
20636rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20637if { (ac_try="$ac_link"
20638case "(($ac_try" in
20639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20640 *) ac_try_echo=$ac_try;;
20641esac
20642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20643 (eval "$ac_link") 2>conftest.er1
503d2be0 20644 ac_status=$?
edfaf76d
LK
20645 grep -v '^ *+' conftest.er1 >conftest.err
20646 rm -f conftest.er1
20647 cat conftest.err >&5
c0d27fcc 20648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20649 (exit $ac_status); } && {
20650 test -z "$ac_c_werror_flag" ||
20651 test ! -s conftest.err
20652 } && test -s conftest$ac_exeext &&
20653 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20654 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
20655else
20656 echo "$as_me: failed program was:" >&5
19650fd6
AS
20657sed 's/^/| /' conftest.$ac_ext >&5
20658
ca81d7a0 20659 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 20660fi
ca81d7a0 20661
f053c89f 20662rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20663 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20664LIBS=$ac_check_lib_save_LIBS
20665fi
ca81d7a0
JD
20666{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
20667echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20668if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20669 cat >>confdefs.h <<_ACEOF
503d2be0 20670#define HAVE_LIBK5CRYPTO 1
c0d27fcc 20671_ACEOF
a21616bd
KR
20672
20673 LIBS="-lk5crypto $LIBS"
20674
a21616bd
KR
20675fi
20676
c0d27fcc 20677
ca81d7a0
JD
20678{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
20679echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
20680if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
20681 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20682else
503d2be0 20683 ac_check_lib_save_LIBS=$LIBS
a21616bd 20684LIBS="-lcrypto $LIBS"
503d2be0 20685cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20686/* confdefs.h. */
20687_ACEOF
20688cat confdefs.h >>conftest.$ac_ext
20689cat >>conftest.$ac_ext <<_ACEOF
20690/* end confdefs.h. */
503d2be0 20691
ca81d7a0
JD
20692/* Override any GCC internal prototype to avoid an error.
20693 Use char because int might match the return type of a GCC
20694 builtin and then its argument prototype would still apply. */
503d2be0
AS
20695#ifdef __cplusplus
20696extern "C"
20697#endif
503d2be0
AS
20698char mit_des_cbc_encrypt ();
20699int
20700main ()
20701{
ca81d7a0 20702return mit_des_cbc_encrypt ();
503d2be0
AS
20703 ;
20704 return 0;
20705}
20706_ACEOF
20707rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20708if { (ac_try="$ac_link"
20709case "(($ac_try" in
20710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20711 *) ac_try_echo=$ac_try;;
20712esac
20713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20714 (eval "$ac_link") 2>conftest.er1
503d2be0 20715 ac_status=$?
edfaf76d
LK
20716 grep -v '^ *+' conftest.er1 >conftest.err
20717 rm -f conftest.er1
20718 cat conftest.err >&5
c0d27fcc 20719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20720 (exit $ac_status); } && {
20721 test -z "$ac_c_werror_flag" ||
20722 test ! -s conftest.err
20723 } && test -s conftest$ac_exeext &&
20724 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20725 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
20726else
20727 echo "$as_me: failed program was:" >&5
19650fd6
AS
20728sed 's/^/| /' conftest.$ac_ext >&5
20729
ca81d7a0 20730 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 20731fi
ca81d7a0 20732
f053c89f 20733rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20734 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20735LIBS=$ac_check_lib_save_LIBS
20736fi
ca81d7a0
JD
20737{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
20738echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20739if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20740 cat >>confdefs.h <<_ACEOF
503d2be0 20741#define HAVE_LIBCRYPTO 1
c0d27fcc 20742_ACEOF
a21616bd
KR
20743
20744 LIBS="-lcrypto $LIBS"
20745
a21616bd
KR
20746fi
20747
c0d27fcc 20748
ca81d7a0
JD
20749{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
20750echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
20751if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
20752 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20753else
503d2be0 20754 ac_check_lib_save_LIBS=$LIBS
a21616bd 20755LIBS="-lkrb5 $LIBS"
503d2be0 20756cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20757/* confdefs.h. */
20758_ACEOF
20759cat confdefs.h >>conftest.$ac_ext
20760cat >>conftest.$ac_ext <<_ACEOF
20761/* end confdefs.h. */
a21616bd 20762
ca81d7a0
JD
20763/* Override any GCC internal prototype to avoid an error.
20764 Use char because int might match the return type of a GCC
20765 builtin and then its argument prototype would still apply. */
503d2be0
AS
20766#ifdef __cplusplus
20767extern "C"
20768#endif
503d2be0
AS
20769char krb5_init_context ();
20770int
20771main ()
20772{
ca81d7a0 20773return krb5_init_context ();
503d2be0
AS
20774 ;
20775 return 0;
20776}
20777_ACEOF
20778rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20779if { (ac_try="$ac_link"
20780case "(($ac_try" in
20781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20782 *) ac_try_echo=$ac_try;;
20783esac
20784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20785 (eval "$ac_link") 2>conftest.er1
503d2be0 20786 ac_status=$?
edfaf76d
LK
20787 grep -v '^ *+' conftest.er1 >conftest.err
20788 rm -f conftest.er1
20789 cat conftest.err >&5
c0d27fcc 20790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20791 (exit $ac_status); } && {
20792 test -z "$ac_c_werror_flag" ||
20793 test ! -s conftest.err
20794 } && test -s conftest$ac_exeext &&
20795 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20796 ac_cv_lib_krb5_krb5_init_context=yes
20797else
20798 echo "$as_me: failed program was:" >&5
19650fd6
AS
20799sed 's/^/| /' conftest.$ac_ext >&5
20800
ca81d7a0 20801 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20802fi
ca81d7a0 20803
f053c89f 20804rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20805 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20806LIBS=$ac_check_lib_save_LIBS
20807fi
ca81d7a0
JD
20808{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20809echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 20810if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20811 cat >>confdefs.h <<_ACEOF
503d2be0 20812#define HAVE_LIBKRB5 1
c0d27fcc 20813_ACEOF
a21616bd
KR
20814
20815 LIBS="-lkrb5 $LIBS"
20816
a21616bd
KR
20817fi
20818
ff1095d1 20819 if test "${with_kerberos5}" = no; then
503d2be0 20820
ca81d7a0
JD
20821{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20822echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
20823if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
20824 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20825else
503d2be0 20826 ac_check_lib_save_LIBS=$LIBS
a21616bd 20827LIBS="-ldes425 $LIBS"
503d2be0 20828cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20829/* confdefs.h. */
20830_ACEOF
20831cat confdefs.h >>conftest.$ac_ext
20832cat >>conftest.$ac_ext <<_ACEOF
20833/* end confdefs.h. */
503d2be0 20834
ca81d7a0
JD
20835/* Override any GCC internal prototype to avoid an error.
20836 Use char because int might match the return type of a GCC
20837 builtin and then its argument prototype would still apply. */
503d2be0
AS
20838#ifdef __cplusplus
20839extern "C"
20840#endif
503d2be0
AS
20841char des_cbc_encrypt ();
20842int
20843main ()
20844{
ca81d7a0 20845return des_cbc_encrypt ();
503d2be0
AS
20846 ;
20847 return 0;
20848}
20849_ACEOF
20850rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20851if { (ac_try="$ac_link"
20852case "(($ac_try" in
20853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20854 *) ac_try_echo=$ac_try;;
20855esac
20856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20857 (eval "$ac_link") 2>conftest.er1
503d2be0 20858 ac_status=$?
edfaf76d
LK
20859 grep -v '^ *+' conftest.er1 >conftest.err
20860 rm -f conftest.er1
20861 cat conftest.err >&5
c0d27fcc 20862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20863 (exit $ac_status); } && {
20864 test -z "$ac_c_werror_flag" ||
20865 test ! -s conftest.err
20866 } && test -s conftest$ac_exeext &&
20867 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20868 ac_cv_lib_des425_des_cbc_encrypt=yes
20869else
20870 echo "$as_me: failed program was:" >&5
19650fd6
AS
20871sed 's/^/| /' conftest.$ac_ext >&5
20872
ca81d7a0 20873 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 20874fi
ca81d7a0 20875
f053c89f 20876rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20877 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20878LIBS=$ac_check_lib_save_LIBS
20879fi
ca81d7a0
JD
20880{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
20881echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 20882if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 20883 cat >>confdefs.h <<_ACEOF
503d2be0 20884#define HAVE_LIBDES425 1
c0d27fcc 20885_ACEOF
a21616bd
KR
20886
20887 LIBS="-ldes425 $LIBS"
20888
20889else
503d2be0 20890
ca81d7a0
JD
20891{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
20892echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
20893if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
20894 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20895else
503d2be0 20896 ac_check_lib_save_LIBS=$LIBS
a21616bd 20897LIBS="-ldes $LIBS"
503d2be0 20898cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20899/* confdefs.h. */
20900_ACEOF
20901cat confdefs.h >>conftest.$ac_ext
20902cat >>conftest.$ac_ext <<_ACEOF
20903/* end confdefs.h. */
503d2be0 20904
ca81d7a0
JD
20905/* Override any GCC internal prototype to avoid an error.
20906 Use char because int might match the return type of a GCC
20907 builtin and then its argument prototype would still apply. */
503d2be0
AS
20908#ifdef __cplusplus
20909extern "C"
20910#endif
503d2be0
AS
20911char des_cbc_encrypt ();
20912int
20913main ()
20914{
ca81d7a0 20915return des_cbc_encrypt ();
503d2be0
AS
20916 ;
20917 return 0;
20918}
20919_ACEOF
20920rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20921if { (ac_try="$ac_link"
20922case "(($ac_try" in
20923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20924 *) ac_try_echo=$ac_try;;
20925esac
20926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20927 (eval "$ac_link") 2>conftest.er1
503d2be0 20928 ac_status=$?
edfaf76d
LK
20929 grep -v '^ *+' conftest.er1 >conftest.err
20930 rm -f conftest.er1
20931 cat conftest.err >&5
c0d27fcc 20932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20933 (exit $ac_status); } && {
20934 test -z "$ac_c_werror_flag" ||
20935 test ! -s conftest.err
20936 } && test -s conftest$ac_exeext &&
20937 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20938 ac_cv_lib_des_des_cbc_encrypt=yes
20939else
20940 echo "$as_me: failed program was:" >&5
19650fd6
AS
20941sed 's/^/| /' conftest.$ac_ext >&5
20942
ca81d7a0 20943 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 20944fi
ca81d7a0 20945
f053c89f 20946rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20947 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20948LIBS=$ac_check_lib_save_LIBS
20949fi
ca81d7a0
JD
20950{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
20951echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 20952if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 20953 cat >>confdefs.h <<_ACEOF
503d2be0 20954#define HAVE_LIBDES 1
c0d27fcc 20955_ACEOF
a21616bd
KR
20956
20957 LIBS="-ldes $LIBS"
20958
a21616bd
KR
20959fi
20960
20961fi
20962
c0d27fcc 20963
ca81d7a0
JD
20964{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
20965echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
20966if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
20967 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20968else
503d2be0 20969 ac_check_lib_save_LIBS=$LIBS
a21616bd 20970LIBS="-lkrb4 $LIBS"
503d2be0 20971cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20972/* confdefs.h. */
20973_ACEOF
20974cat confdefs.h >>conftest.$ac_ext
20975cat >>conftest.$ac_ext <<_ACEOF
20976/* end confdefs.h. */
503d2be0 20977
ca81d7a0
JD
20978/* Override any GCC internal prototype to avoid an error.
20979 Use char because int might match the return type of a GCC
20980 builtin and then its argument prototype would still apply. */
503d2be0
AS
20981#ifdef __cplusplus
20982extern "C"
20983#endif
503d2be0
AS
20984char krb_get_cred ();
20985int
20986main ()
20987{
f053c89f 20988return krb_get_cred ();
503d2be0
AS
20989 ;
20990 return 0;
20991}
20992_ACEOF
20993rm -f conftest.$ac_objext conftest$ac_exeext
f053c89f
CY
20994if { (ac_try="$ac_link"
20995case "(($ac_try" in
ca81d7a0
JD
20996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20997 *) ac_try_echo=$ac_try;;
20998esac
20999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 21000 (eval "$ac_link") 2>conftest.er1
503d2be0 21001 ac_status=$?
edfaf76d
LK
21002 grep -v '^ *+' conftest.er1 >conftest.err
21003 rm -f conftest.er1
21004 cat conftest.err >&5
c0d27fcc 21005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21006 (exit $ac_status); } && {
21007 test -z "$ac_c_werror_flag" ||
21008 test ! -s conftest.err
21009 } && test -s conftest$ac_exeext &&
21010 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21011 ac_cv_lib_krb4_krb_get_cred=yes
21012else
21013 echo "$as_me: failed program was:" >&5
19650fd6
AS
21014sed 's/^/| /' conftest.$ac_ext >&5
21015
ca81d7a0 21016 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 21017fi
ca81d7a0 21018
f053c89f 21019rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21020 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21021LIBS=$ac_check_lib_save_LIBS
21022fi
ca81d7a0
JD
21023{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
21024echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 21025if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 21026 cat >>confdefs.h <<_ACEOF
503d2be0 21027#define HAVE_LIBKRB4 1
c0d27fcc 21028_ACEOF
a21616bd
KR
21029
21030 LIBS="-lkrb4 $LIBS"
21031
21032else
503d2be0 21033
ca81d7a0
JD
21034{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
21035echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
21036if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
21037 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21038else
503d2be0 21039 ac_check_lib_save_LIBS=$LIBS
a21616bd 21040LIBS="-lkrb $LIBS"
503d2be0 21041cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21042/* confdefs.h. */
21043_ACEOF
21044cat confdefs.h >>conftest.$ac_ext
21045cat >>conftest.$ac_ext <<_ACEOF
21046/* end confdefs.h. */
503d2be0 21047
ca81d7a0
JD
21048/* Override any GCC internal prototype to avoid an error.
21049 Use char because int might match the return type of a GCC
21050 builtin and then its argument prototype would still apply. */
503d2be0
AS
21051#ifdef __cplusplus
21052extern "C"
21053#endif
503d2be0
AS
21054char krb_get_cred ();
21055int
21056main ()
21057{
ca81d7a0 21058return krb_get_cred ();
503d2be0
AS
21059 ;
21060 return 0;
21061}
21062_ACEOF
21063rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21064if { (ac_try="$ac_link"
21065case "(($ac_try" in
21066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21067 *) ac_try_echo=$ac_try;;
21068esac
21069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21070 (eval "$ac_link") 2>conftest.er1
503d2be0 21071 ac_status=$?
edfaf76d
LK
21072 grep -v '^ *+' conftest.er1 >conftest.err
21073 rm -f conftest.er1
21074 cat conftest.err >&5
c0d27fcc 21075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21076 (exit $ac_status); } && {
21077 test -z "$ac_c_werror_flag" ||
21078 test ! -s conftest.err
21079 } && test -s conftest$ac_exeext &&
21080 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21081 ac_cv_lib_krb_krb_get_cred=yes
21082else
21083 echo "$as_me: failed program was:" >&5
19650fd6
AS
21084sed 's/^/| /' conftest.$ac_ext >&5
21085
ca81d7a0 21086 ac_cv_lib_krb_krb_get_cred=no
503d2be0 21087fi
ca81d7a0 21088
f053c89f 21089rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21090 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21091LIBS=$ac_check_lib_save_LIBS
21092fi
ca81d7a0
JD
21093{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
21094echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 21095if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 21096 cat >>confdefs.h <<_ACEOF
503d2be0 21097#define HAVE_LIBKRB 1
c0d27fcc 21098_ACEOF
a21616bd
KR
21099
21100 LIBS="-lkrb $LIBS"
21101
a21616bd
KR
21102fi
21103
21104fi
21105
21106 fi
21107
ff1095d1 21108 if test "${with_kerberos5}" != no; then
503d2be0
AS
21109
21110for ac_header in krb5.h
a21616bd 21111do
503d2be0 21112as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21113if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21114 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21115echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21116if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21117 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21118fi
ca81d7a0
JD
21119ac_res=`eval echo '${'$as_ac_Header'}'`
21120 { echo "$as_me:$LINENO: result: $ac_res" >&5
21121echo "${ECHO_T}$ac_res" >&6; }
98418dba 21122else
c0d27fcc 21123 # Is the header compilable?
ca81d7a0
JD
21124{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21125echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21126cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21127/* confdefs.h. */
21128_ACEOF
21129cat confdefs.h >>conftest.$ac_ext
21130cat >>conftest.$ac_ext <<_ACEOF
21131/* end confdefs.h. */
c0d27fcc
MR
21132$ac_includes_default
21133#include <$ac_header>
21134_ACEOF
21135rm -f conftest.$ac_objext
ca81d7a0
JD
21136if { (ac_try="$ac_compile"
21137case "(($ac_try" in
21138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21139 *) ac_try_echo=$ac_try;;
21140esac
21141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21142 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21143 ac_status=$?
edfaf76d
LK
21144 grep -v '^ *+' conftest.er1 >conftest.err
21145 rm -f conftest.er1
21146 cat conftest.err >&5
c0d27fcc 21147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21148 (exit $ac_status); } && {
21149 test -z "$ac_c_werror_flag" ||
21150 test ! -s conftest.err
21151 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21152 ac_header_compiler=yes
21153else
21154 echo "$as_me: failed program was:" >&5
19650fd6
AS
21155sed 's/^/| /' conftest.$ac_ext >&5
21156
ca81d7a0 21157 ac_header_compiler=no
c0d27fcc 21158fi
ca81d7a0
JD
21159
21160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21161{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21162echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21163
21164# Is the header present?
ca81d7a0
JD
21165{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21166echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21167cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21168/* confdefs.h. */
21169_ACEOF
21170cat confdefs.h >>conftest.$ac_ext
21171cat >>conftest.$ac_ext <<_ACEOF
21172/* end confdefs.h. */
503d2be0
AS
21173#include <$ac_header>
21174_ACEOF
ca81d7a0
JD
21175if { (ac_try="$ac_cpp conftest.$ac_ext"
21176case "(($ac_try" in
21177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21178 *) ac_try_echo=$ac_try;;
21179esac
21180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21181 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21182 ac_status=$?
6bae0ccf 21183 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21184 rm -f conftest.er1
21185 cat conftest.err >&5
c0d27fcc 21186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21187 (exit $ac_status); } >/dev/null && {
21188 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21189 test ! -s conftest.err
21190 }; then
c0d27fcc 21191 ac_header_preproc=yes
503d2be0
AS
21192else
21193 echo "$as_me: failed program was:" >&5
19650fd6
AS
21194sed 's/^/| /' conftest.$ac_ext >&5
21195
c0d27fcc 21196 ac_header_preproc=no
a21616bd 21197fi
ca81d7a0 21198
503d2be0 21199rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21200{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21201echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21202
21203# So? What about this header?
edfaf76d
LK
21204case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21205 yes:no: )
c0d27fcc
MR
21206 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21207echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21208 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21209echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21210 ac_header_preproc=yes
19650fd6 21211 ;;
edfaf76d 21212 no:yes:* )
c0d27fcc
MR
21213 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21214echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21215 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21216echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21217 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21218echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21219 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21220echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21221 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21222echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21223 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21224echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21225
19650fd6 21226 ;;
c0d27fcc 21227esac
ca81d7a0
JD
21228{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21229echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21230if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21231 echo $ECHO_N "(cached) $ECHO_C" >&6
21232else
edfaf76d 21233 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21234fi
ca81d7a0
JD
21235ac_res=`eval echo '${'$as_ac_Header'}'`
21236 { echo "$as_me:$LINENO: result: $ac_res" >&5
21237echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21238
21239fi
503d2be0 21240if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21241 cat >>confdefs.h <<_ACEOF
503d2be0 21242#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21243_ACEOF
21287a21
CY
21244 { echo "$as_me:$LINENO: checking for krb5_error.text" >&5
21245echo $ECHO_N "checking for krb5_error.text... $ECHO_C" >&6; }
21246if test "${ac_cv_member_krb5_error_text+set}" = set; then
21247 echo $ECHO_N "(cached) $ECHO_C" >&6
21248else
21249 cat >conftest.$ac_ext <<_ACEOF
21250/* confdefs.h. */
21251_ACEOF
21252cat confdefs.h >>conftest.$ac_ext
21253cat >>conftest.$ac_ext <<_ACEOF
21254/* end confdefs.h. */
21255#include <krb5.h>
21256
21257int
21258main ()
21259{
21260static krb5_error ac_aggr;
21261if (ac_aggr.text)
21262return 0;
21263 ;
21264 return 0;
21265}
21266_ACEOF
21267rm -f conftest.$ac_objext
21268if { (ac_try="$ac_compile"
21269case "(($ac_try" in
21270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21271 *) ac_try_echo=$ac_try;;
21272esac
21273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21274 (eval "$ac_compile") 2>conftest.er1
21275 ac_status=$?
21276 grep -v '^ *+' conftest.er1 >conftest.err
21277 rm -f conftest.er1
21278 cat conftest.err >&5
21279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21280 (exit $ac_status); } && {
21281 test -z "$ac_c_werror_flag" ||
21282 test ! -s conftest.err
21283 } && test -s conftest.$ac_objext; then
21284 ac_cv_member_krb5_error_text=yes
21285else
21286 echo "$as_me: failed program was:" >&5
21287sed 's/^/| /' conftest.$ac_ext >&5
21288
21289 cat >conftest.$ac_ext <<_ACEOF
21290/* confdefs.h. */
21291_ACEOF
21292cat confdefs.h >>conftest.$ac_ext
21293cat >>conftest.$ac_ext <<_ACEOF
21294/* end confdefs.h. */
21295#include <krb5.h>
21296
21297int
21298main ()
21299{
21300static krb5_error ac_aggr;
21301if (sizeof ac_aggr.text)
21302return 0;
21303 ;
21304 return 0;
21305}
21306_ACEOF
21307rm -f conftest.$ac_objext
21308if { (ac_try="$ac_compile"
21309case "(($ac_try" in
21310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21311 *) ac_try_echo=$ac_try;;
21312esac
21313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21314 (eval "$ac_compile") 2>conftest.er1
21315 ac_status=$?
21316 grep -v '^ *+' conftest.er1 >conftest.err
21317 rm -f conftest.er1
21318 cat conftest.err >&5
21319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21320 (exit $ac_status); } && {
21321 test -z "$ac_c_werror_flag" ||
21322 test ! -s conftest.err
21323 } && test -s conftest.$ac_objext; then
21324 ac_cv_member_krb5_error_text=yes
21325else
21326 echo "$as_me: failed program was:" >&5
21327sed 's/^/| /' conftest.$ac_ext >&5
21328
21329 ac_cv_member_krb5_error_text=no
21330fi
21331
21332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21333fi
21334
21335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21336fi
21337{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_text" >&5
21338echo "${ECHO_T}$ac_cv_member_krb5_error_text" >&6; }
21339if test $ac_cv_member_krb5_error_text = yes; then
21340
21341cat >>confdefs.h <<_ACEOF
21342#define HAVE_KRB5_ERROR_TEXT 1
21343_ACEOF
21344
21345
21346fi
21347{ echo "$as_me:$LINENO: checking for krb5_error.e_text" >&5
21348echo $ECHO_N "checking for krb5_error.e_text... $ECHO_C" >&6; }
21349if test "${ac_cv_member_krb5_error_e_text+set}" = set; then
21350 echo $ECHO_N "(cached) $ECHO_C" >&6
21351else
21352 cat >conftest.$ac_ext <<_ACEOF
21353/* confdefs.h. */
21354_ACEOF
21355cat confdefs.h >>conftest.$ac_ext
21356cat >>conftest.$ac_ext <<_ACEOF
21357/* end confdefs.h. */
21358#include <krb5.h>
21359
21360int
21361main ()
21362{
21363static krb5_error ac_aggr;
21364if (ac_aggr.e_text)
21365return 0;
21366 ;
21367 return 0;
21368}
21369_ACEOF
21370rm -f conftest.$ac_objext
21371if { (ac_try="$ac_compile"
21372case "(($ac_try" in
21373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21374 *) ac_try_echo=$ac_try;;
21375esac
21376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21377 (eval "$ac_compile") 2>conftest.er1
21378 ac_status=$?
21379 grep -v '^ *+' conftest.er1 >conftest.err
21380 rm -f conftest.er1
21381 cat conftest.err >&5
21382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21383 (exit $ac_status); } && {
21384 test -z "$ac_c_werror_flag" ||
21385 test ! -s conftest.err
21386 } && test -s conftest.$ac_objext; then
21387 ac_cv_member_krb5_error_e_text=yes
21388else
21389 echo "$as_me: failed program was:" >&5
21390sed 's/^/| /' conftest.$ac_ext >&5
21391
21392 cat >conftest.$ac_ext <<_ACEOF
21393/* confdefs.h. */
21394_ACEOF
21395cat confdefs.h >>conftest.$ac_ext
21396cat >>conftest.$ac_ext <<_ACEOF
21397/* end confdefs.h. */
21398#include <krb5.h>
21399
21400int
21401main ()
21402{
21403static krb5_error ac_aggr;
21404if (sizeof ac_aggr.e_text)
21405return 0;
21406 ;
21407 return 0;
21408}
21409_ACEOF
21410rm -f conftest.$ac_objext
21411if { (ac_try="$ac_compile"
21412case "(($ac_try" in
21413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21414 *) ac_try_echo=$ac_try;;
21415esac
21416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21417 (eval "$ac_compile") 2>conftest.er1
21418 ac_status=$?
21419 grep -v '^ *+' conftest.er1 >conftest.err
21420 rm -f conftest.er1
21421 cat conftest.err >&5
21422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21423 (exit $ac_status); } && {
21424 test -z "$ac_c_werror_flag" ||
21425 test ! -s conftest.err
21426 } && test -s conftest.$ac_objext; then
21427 ac_cv_member_krb5_error_e_text=yes
21428else
21429 echo "$as_me: failed program was:" >&5
21430sed 's/^/| /' conftest.$ac_ext >&5
21431
21432 ac_cv_member_krb5_error_e_text=no
21433fi
21434
21435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21436fi
21437
21438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21439fi
21440{ echo "$as_me:$LINENO: result: $ac_cv_member_krb5_error_e_text" >&5
21441echo "${ECHO_T}$ac_cv_member_krb5_error_e_text" >&6; }
21442if test $ac_cv_member_krb5_error_e_text = yes; then
21443
21444cat >>confdefs.h <<_ACEOF
21445#define HAVE_KRB5_ERROR_E_TEXT 1
21446_ACEOF
21447
21448
21449fi
503d2be0 21450
a21616bd 21451fi
c0d27fcc 21452
a21616bd
KR
21453done
21454
21455 else
503d2be0
AS
21456
21457for ac_header in des.h
a21616bd 21458do
503d2be0 21459as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21460if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21461 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21462echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21463if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21464 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21465fi
ca81d7a0
JD
21466ac_res=`eval echo '${'$as_ac_Header'}'`
21467 { echo "$as_me:$LINENO: result: $ac_res" >&5
21468echo "${ECHO_T}$ac_res" >&6; }
98418dba 21469else
c0d27fcc 21470 # Is the header compilable?
ca81d7a0
JD
21471{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21472echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21473cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21474/* confdefs.h. */
21475_ACEOF
21476cat confdefs.h >>conftest.$ac_ext
21477cat >>conftest.$ac_ext <<_ACEOF
21478/* end confdefs.h. */
c0d27fcc
MR
21479$ac_includes_default
21480#include <$ac_header>
21481_ACEOF
21482rm -f conftest.$ac_objext
ca81d7a0
JD
21483if { (ac_try="$ac_compile"
21484case "(($ac_try" in
21485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21486 *) ac_try_echo=$ac_try;;
21487esac
21488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21489 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21490 ac_status=$?
edfaf76d
LK
21491 grep -v '^ *+' conftest.er1 >conftest.err
21492 rm -f conftest.er1
21493 cat conftest.err >&5
c0d27fcc 21494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21495 (exit $ac_status); } && {
21496 test -z "$ac_c_werror_flag" ||
21497 test ! -s conftest.err
21498 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21499 ac_header_compiler=yes
21500else
21501 echo "$as_me: failed program was:" >&5
19650fd6
AS
21502sed 's/^/| /' conftest.$ac_ext >&5
21503
ca81d7a0 21504 ac_header_compiler=no
c0d27fcc 21505fi
ca81d7a0
JD
21506
21507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21508{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21509echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21510
21511# Is the header present?
ca81d7a0
JD
21512{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21513echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21514cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21515/* confdefs.h. */
21516_ACEOF
21517cat confdefs.h >>conftest.$ac_ext
21518cat >>conftest.$ac_ext <<_ACEOF
21519/* end confdefs.h. */
503d2be0
AS
21520#include <$ac_header>
21521_ACEOF
ca81d7a0
JD
21522if { (ac_try="$ac_cpp conftest.$ac_ext"
21523case "(($ac_try" in
21524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21525 *) ac_try_echo=$ac_try;;
21526esac
21527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21528 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21529 ac_status=$?
6bae0ccf 21530 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21531 rm -f conftest.er1
21532 cat conftest.err >&5
c0d27fcc 21533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21534 (exit $ac_status); } >/dev/null && {
21535 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21536 test ! -s conftest.err
21537 }; then
c0d27fcc 21538 ac_header_preproc=yes
503d2be0
AS
21539else
21540 echo "$as_me: failed program was:" >&5
19650fd6
AS
21541sed 's/^/| /' conftest.$ac_ext >&5
21542
c0d27fcc 21543 ac_header_preproc=no
a21616bd 21544fi
ca81d7a0 21545
503d2be0 21546rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21547{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21548echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21549
21550# So? What about this header?
edfaf76d
LK
21551case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21552 yes:no: )
c0d27fcc
MR
21553 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21554echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21555 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21556echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21557 ac_header_preproc=yes
19650fd6 21558 ;;
edfaf76d 21559 no:yes:* )
c0d27fcc
MR
21560 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21561echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21562 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21563echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21564 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21565echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21566 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21567echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21568 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21569echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21570 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21571echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21572
19650fd6 21573 ;;
c0d27fcc 21574esac
ca81d7a0
JD
21575{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21576echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21577if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21578 echo $ECHO_N "(cached) $ECHO_C" >&6
21579else
edfaf76d 21580 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21581fi
ca81d7a0
JD
21582ac_res=`eval echo '${'$as_ac_Header'}'`
21583 { echo "$as_me:$LINENO: result: $ac_res" >&5
21584echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21585
21586fi
503d2be0 21587if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21588 cat >>confdefs.h <<_ACEOF
503d2be0 21589#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21590_ACEOF
503d2be0 21591
a21616bd 21592else
503d2be0
AS
21593
21594for ac_header in kerberosIV/des.h
a21616bd 21595do
503d2be0 21596as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21597if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21598 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21599echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21600if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21601 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21602fi
ca81d7a0
JD
21603ac_res=`eval echo '${'$as_ac_Header'}'`
21604 { echo "$as_me:$LINENO: result: $ac_res" >&5
21605echo "${ECHO_T}$ac_res" >&6; }
98418dba 21606else
c0d27fcc 21607 # Is the header compilable?
ca81d7a0
JD
21608{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21609echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21610cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21611/* confdefs.h. */
21612_ACEOF
21613cat confdefs.h >>conftest.$ac_ext
21614cat >>conftest.$ac_ext <<_ACEOF
21615/* end confdefs.h. */
c0d27fcc
MR
21616$ac_includes_default
21617#include <$ac_header>
21618_ACEOF
21619rm -f conftest.$ac_objext
ca81d7a0
JD
21620if { (ac_try="$ac_compile"
21621case "(($ac_try" in
21622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21623 *) ac_try_echo=$ac_try;;
21624esac
21625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21626 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21627 ac_status=$?
edfaf76d
LK
21628 grep -v '^ *+' conftest.er1 >conftest.err
21629 rm -f conftest.er1
21630 cat conftest.err >&5
c0d27fcc 21631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21632 (exit $ac_status); } && {
21633 test -z "$ac_c_werror_flag" ||
21634 test ! -s conftest.err
21635 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21636 ac_header_compiler=yes
21637else
21638 echo "$as_me: failed program was:" >&5
19650fd6
AS
21639sed 's/^/| /' conftest.$ac_ext >&5
21640
ca81d7a0 21641 ac_header_compiler=no
c0d27fcc 21642fi
ca81d7a0
JD
21643
21644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21645{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21646echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21647
21648# Is the header present?
ca81d7a0
JD
21649{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21650echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21651cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21652/* confdefs.h. */
21653_ACEOF
21654cat confdefs.h >>conftest.$ac_ext
21655cat >>conftest.$ac_ext <<_ACEOF
21656/* end confdefs.h. */
503d2be0
AS
21657#include <$ac_header>
21658_ACEOF
ca81d7a0
JD
21659if { (ac_try="$ac_cpp conftest.$ac_ext"
21660case "(($ac_try" in
21661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21662 *) ac_try_echo=$ac_try;;
21663esac
21664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21665 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21666 ac_status=$?
6bae0ccf 21667 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21668 rm -f conftest.er1
21669 cat conftest.err >&5
c0d27fcc 21670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21671 (exit $ac_status); } >/dev/null && {
21672 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21673 test ! -s conftest.err
21674 }; then
c0d27fcc 21675 ac_header_preproc=yes
503d2be0
AS
21676else
21677 echo "$as_me: failed program was:" >&5
19650fd6
AS
21678sed 's/^/| /' conftest.$ac_ext >&5
21679
c0d27fcc 21680 ac_header_preproc=no
a21616bd 21681fi
ca81d7a0 21682
503d2be0 21683rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21684{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21685echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21686
21687# So? What about this header?
edfaf76d
LK
21688case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21689 yes:no: )
c0d27fcc
MR
21690 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21691echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21692 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21693echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21694 ac_header_preproc=yes
19650fd6 21695 ;;
edfaf76d 21696 no:yes:* )
c0d27fcc
MR
21697 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21698echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21699 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21700echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21701 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21702echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21703 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21704echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21705 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21706echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21707 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21708echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21709
19650fd6 21710 ;;
c0d27fcc 21711esac
ca81d7a0
JD
21712{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21713echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21714if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21715 echo $ECHO_N "(cached) $ECHO_C" >&6
21716else
edfaf76d 21717 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21718fi
ca81d7a0
JD
21719ac_res=`eval echo '${'$as_ac_Header'}'`
21720 { echo "$as_me:$LINENO: result: $ac_res" >&5
21721echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21722
21723fi
503d2be0 21724if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21725 cat >>confdefs.h <<_ACEOF
503d2be0 21726#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21727_ACEOF
503d2be0 21728
a21616bd 21729else
503d2be0
AS
21730
21731for ac_header in kerberos/des.h
a21616bd 21732do
503d2be0 21733as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21734if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21735 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21736echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21737if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21738 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21739fi
ca81d7a0
JD
21740ac_res=`eval echo '${'$as_ac_Header'}'`
21741 { echo "$as_me:$LINENO: result: $ac_res" >&5
21742echo "${ECHO_T}$ac_res" >&6; }
98418dba 21743else
c0d27fcc 21744 # Is the header compilable?
ca81d7a0
JD
21745{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21746echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21747cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21748/* confdefs.h. */
21749_ACEOF
21750cat confdefs.h >>conftest.$ac_ext
21751cat >>conftest.$ac_ext <<_ACEOF
21752/* end confdefs.h. */
c0d27fcc
MR
21753$ac_includes_default
21754#include <$ac_header>
21755_ACEOF
21756rm -f conftest.$ac_objext
ca81d7a0
JD
21757if { (ac_try="$ac_compile"
21758case "(($ac_try" in
21759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21760 *) ac_try_echo=$ac_try;;
21761esac
21762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21763 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21764 ac_status=$?
edfaf76d
LK
21765 grep -v '^ *+' conftest.er1 >conftest.err
21766 rm -f conftest.er1
21767 cat conftest.err >&5
c0d27fcc 21768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21769 (exit $ac_status); } && {
21770 test -z "$ac_c_werror_flag" ||
21771 test ! -s conftest.err
21772 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21773 ac_header_compiler=yes
21774else
21775 echo "$as_me: failed program was:" >&5
19650fd6
AS
21776sed 's/^/| /' conftest.$ac_ext >&5
21777
ca81d7a0 21778 ac_header_compiler=no
c0d27fcc 21779fi
ca81d7a0
JD
21780
21781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21782{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21783echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21784
21785# Is the header present?
ca81d7a0
JD
21786{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21787echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21788cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21789/* confdefs.h. */
21790_ACEOF
21791cat confdefs.h >>conftest.$ac_ext
21792cat >>conftest.$ac_ext <<_ACEOF
21793/* end confdefs.h. */
503d2be0
AS
21794#include <$ac_header>
21795_ACEOF
ca81d7a0
JD
21796if { (ac_try="$ac_cpp conftest.$ac_ext"
21797case "(($ac_try" in
21798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21799 *) ac_try_echo=$ac_try;;
21800esac
21801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21802 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21803 ac_status=$?
6bae0ccf 21804 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21805 rm -f conftest.er1
21806 cat conftest.err >&5
c0d27fcc 21807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21808 (exit $ac_status); } >/dev/null && {
21809 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21810 test ! -s conftest.err
21811 }; then
c0d27fcc 21812 ac_header_preproc=yes
503d2be0
AS
21813else
21814 echo "$as_me: failed program was:" >&5
19650fd6
AS
21815sed 's/^/| /' conftest.$ac_ext >&5
21816
c0d27fcc 21817 ac_header_preproc=no
a21616bd 21818fi
ca81d7a0 21819
503d2be0 21820rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21821{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21822echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21823
21824# So? What about this header?
edfaf76d
LK
21825case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21826 yes:no: )
c0d27fcc
MR
21827 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21828echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21829 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21830echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21831 ac_header_preproc=yes
19650fd6 21832 ;;
edfaf76d 21833 no:yes:* )
c0d27fcc
MR
21834 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21835echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21836 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21837echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21838 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21839echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21840 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21841echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21842 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21843echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21844 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21845echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21846
19650fd6 21847 ;;
c0d27fcc 21848esac
ca81d7a0
JD
21849{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21850echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21851if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21852 echo $ECHO_N "(cached) $ECHO_C" >&6
21853else
edfaf76d 21854 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21855fi
ca81d7a0
JD
21856ac_res=`eval echo '${'$as_ac_Header'}'`
21857 { echo "$as_me:$LINENO: result: $ac_res" >&5
21858echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21859
21860fi
503d2be0 21861if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21862 cat >>confdefs.h <<_ACEOF
503d2be0 21863#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21864_ACEOF
a21616bd
KR
21865
21866fi
c0d27fcc 21867
a21616bd
KR
21868done
21869
98418dba 21870fi
c0d27fcc 21871
925c2f3f
EZ
21872done
21873
98418dba 21874fi
c0d27fcc 21875
925c2f3f 21876done
98418dba 21877
c0d27fcc 21878
925c2f3f
EZ
21879for ac_header in krb.h
21880do
21881as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21882if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21883 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21884echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21885if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 21886 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21887fi
ca81d7a0
JD
21888ac_res=`eval echo '${'$as_ac_Header'}'`
21889 { echo "$as_me:$LINENO: result: $ac_res" >&5
21890echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21891else
21892 # Is the header compilable?
ca81d7a0
JD
21893{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21894echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21895cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21896/* confdefs.h. */
21897_ACEOF
21898cat confdefs.h >>conftest.$ac_ext
21899cat >>conftest.$ac_ext <<_ACEOF
21900/* end confdefs.h. */
c0d27fcc
MR
21901$ac_includes_default
21902#include <$ac_header>
21903_ACEOF
21904rm -f conftest.$ac_objext
ca81d7a0
JD
21905if { (ac_try="$ac_compile"
21906case "(($ac_try" in
21907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21908 *) ac_try_echo=$ac_try;;
21909esac
21910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21911 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21912 ac_status=$?
edfaf76d
LK
21913 grep -v '^ *+' conftest.er1 >conftest.err
21914 rm -f conftest.er1
21915 cat conftest.err >&5
c0d27fcc 21916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21917 (exit $ac_status); } && {
21918 test -z "$ac_c_werror_flag" ||
21919 test ! -s conftest.err
21920 } && test -s conftest.$ac_objext; then
c0d27fcc 21921 ac_header_compiler=yes
925c2f3f 21922else
c0d27fcc 21923 echo "$as_me: failed program was:" >&5
19650fd6
AS
21924sed 's/^/| /' conftest.$ac_ext >&5
21925
ca81d7a0 21926 ac_header_compiler=no
c0d27fcc 21927fi
ca81d7a0
JD
21928
21929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21930{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21931echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21932
21933# Is the header present?
ca81d7a0
JD
21934{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21935echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21936cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21937/* confdefs.h. */
21938_ACEOF
21939cat confdefs.h >>conftest.$ac_ext
21940cat >>conftest.$ac_ext <<_ACEOF
21941/* end confdefs.h. */
503d2be0
AS
21942#include <$ac_header>
21943_ACEOF
ca81d7a0
JD
21944if { (ac_try="$ac_cpp conftest.$ac_ext"
21945case "(($ac_try" in
21946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21947 *) ac_try_echo=$ac_try;;
21948esac
21949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21950 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21951 ac_status=$?
6bae0ccf 21952 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21953 rm -f conftest.er1
21954 cat conftest.err >&5
c0d27fcc 21955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21956 (exit $ac_status); } >/dev/null && {
21957 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21958 test ! -s conftest.err
21959 }; then
c0d27fcc 21960 ac_header_preproc=yes
503d2be0
AS
21961else
21962 echo "$as_me: failed program was:" >&5
19650fd6
AS
21963sed 's/^/| /' conftest.$ac_ext >&5
21964
c0d27fcc 21965 ac_header_preproc=no
a21616bd 21966fi
ca81d7a0 21967
503d2be0 21968rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21969{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21970echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21971
21972# So? What about this header?
edfaf76d
LK
21973case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21974 yes:no: )
c0d27fcc
MR
21975 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21976echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21977 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21978echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21979 ac_header_preproc=yes
19650fd6 21980 ;;
edfaf76d 21981 no:yes:* )
c0d27fcc
MR
21982 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21983echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21984 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21985echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21986 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21987echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21988 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21989echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21990 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21991echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21992 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21993echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21994
19650fd6 21995 ;;
c0d27fcc 21996esac
ca81d7a0
JD
21997{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21998echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21999if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22000 echo $ECHO_N "(cached) $ECHO_C" >&6
22001else
edfaf76d 22002 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22003fi
ca81d7a0
JD
22004ac_res=`eval echo '${'$as_ac_Header'}'`
22005 { echo "$as_me:$LINENO: result: $ac_res" >&5
22006echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22007
22008fi
503d2be0 22009if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22010 cat >>confdefs.h <<_ACEOF
503d2be0 22011#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22012_ACEOF
503d2be0 22013
a21616bd 22014else
503d2be0
AS
22015
22016for ac_header in kerberosIV/krb.h
a21616bd 22017do
503d2be0 22018as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22019if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22020 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22021echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22022if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22023 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22024fi
ca81d7a0
JD
22025ac_res=`eval echo '${'$as_ac_Header'}'`
22026 { echo "$as_me:$LINENO: result: $ac_res" >&5
22027echo "${ECHO_T}$ac_res" >&6; }
98418dba 22028else
c0d27fcc 22029 # Is the header compilable?
ca81d7a0
JD
22030{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22031echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22032cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22033/* confdefs.h. */
22034_ACEOF
22035cat confdefs.h >>conftest.$ac_ext
22036cat >>conftest.$ac_ext <<_ACEOF
22037/* end confdefs.h. */
c0d27fcc
MR
22038$ac_includes_default
22039#include <$ac_header>
22040_ACEOF
22041rm -f conftest.$ac_objext
ca81d7a0
JD
22042if { (ac_try="$ac_compile"
22043case "(($ac_try" in
22044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22045 *) ac_try_echo=$ac_try;;
22046esac
22047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22048 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22049 ac_status=$?
edfaf76d
LK
22050 grep -v '^ *+' conftest.er1 >conftest.err
22051 rm -f conftest.er1
22052 cat conftest.err >&5
c0d27fcc 22053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22054 (exit $ac_status); } && {
22055 test -z "$ac_c_werror_flag" ||
22056 test ! -s conftest.err
22057 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22058 ac_header_compiler=yes
22059else
22060 echo "$as_me: failed program was:" >&5
19650fd6
AS
22061sed 's/^/| /' conftest.$ac_ext >&5
22062
ca81d7a0 22063 ac_header_compiler=no
c0d27fcc 22064fi
ca81d7a0
JD
22065
22066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22067{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22068echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22069
22070# Is the header present?
ca81d7a0
JD
22071{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22072echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22073cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22074/* confdefs.h. */
22075_ACEOF
22076cat confdefs.h >>conftest.$ac_ext
22077cat >>conftest.$ac_ext <<_ACEOF
22078/* end confdefs.h. */
503d2be0
AS
22079#include <$ac_header>
22080_ACEOF
ca81d7a0
JD
22081if { (ac_try="$ac_cpp conftest.$ac_ext"
22082case "(($ac_try" in
22083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22084 *) ac_try_echo=$ac_try;;
22085esac
22086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22087 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22088 ac_status=$?
6bae0ccf 22089 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22090 rm -f conftest.er1
22091 cat conftest.err >&5
c0d27fcc 22092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22093 (exit $ac_status); } >/dev/null && {
22094 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22095 test ! -s conftest.err
22096 }; then
c0d27fcc 22097 ac_header_preproc=yes
503d2be0
AS
22098else
22099 echo "$as_me: failed program was:" >&5
19650fd6
AS
22100sed 's/^/| /' conftest.$ac_ext >&5
22101
c0d27fcc 22102 ac_header_preproc=no
a21616bd 22103fi
ca81d7a0 22104
503d2be0 22105rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22106{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22107echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22108
22109# So? What about this header?
edfaf76d
LK
22110case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22111 yes:no: )
c0d27fcc
MR
22112 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22113echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22114 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22115echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22116 ac_header_preproc=yes
19650fd6 22117 ;;
edfaf76d 22118 no:yes:* )
c0d27fcc
MR
22119 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22120echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22121 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22122echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22123 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22124echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22125 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22126echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22127 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22128echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22129 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22130echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22131
19650fd6 22132 ;;
c0d27fcc 22133esac
ca81d7a0
JD
22134{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22135echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22136if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22137 echo $ECHO_N "(cached) $ECHO_C" >&6
22138else
edfaf76d 22139 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22140fi
ca81d7a0
JD
22141ac_res=`eval echo '${'$as_ac_Header'}'`
22142 { echo "$as_me:$LINENO: result: $ac_res" >&5
22143echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22144
22145fi
503d2be0 22146if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22147 cat >>confdefs.h <<_ACEOF
503d2be0 22148#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22149_ACEOF
503d2be0 22150
a21616bd 22151else
503d2be0
AS
22152
22153for ac_header in kerberos/krb.h
a21616bd 22154do
503d2be0 22155as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22156if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22157 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22158echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22159if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22160 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22161fi
ca81d7a0
JD
22162ac_res=`eval echo '${'$as_ac_Header'}'`
22163 { echo "$as_me:$LINENO: result: $ac_res" >&5
22164echo "${ECHO_T}$ac_res" >&6; }
98418dba 22165else
c0d27fcc 22166 # Is the header compilable?
ca81d7a0
JD
22167{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22168echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22169cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22170/* confdefs.h. */
22171_ACEOF
22172cat confdefs.h >>conftest.$ac_ext
22173cat >>conftest.$ac_ext <<_ACEOF
22174/* end confdefs.h. */
c0d27fcc
MR
22175$ac_includes_default
22176#include <$ac_header>
22177_ACEOF
22178rm -f conftest.$ac_objext
ca81d7a0
JD
22179if { (ac_try="$ac_compile"
22180case "(($ac_try" in
22181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22182 *) ac_try_echo=$ac_try;;
22183esac
22184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22185 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22186 ac_status=$?
edfaf76d
LK
22187 grep -v '^ *+' conftest.er1 >conftest.err
22188 rm -f conftest.er1
22189 cat conftest.err >&5
c0d27fcc 22190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22191 (exit $ac_status); } && {
22192 test -z "$ac_c_werror_flag" ||
22193 test ! -s conftest.err
22194 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22195 ac_header_compiler=yes
22196else
22197 echo "$as_me: failed program was:" >&5
19650fd6
AS
22198sed 's/^/| /' conftest.$ac_ext >&5
22199
ca81d7a0 22200 ac_header_compiler=no
c0d27fcc 22201fi
ca81d7a0
JD
22202
22203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22204{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22205echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22206
22207# Is the header present?
ca81d7a0
JD
22208{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22209echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22210cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22211/* confdefs.h. */
22212_ACEOF
22213cat confdefs.h >>conftest.$ac_ext
22214cat >>conftest.$ac_ext <<_ACEOF
22215/* end confdefs.h. */
503d2be0
AS
22216#include <$ac_header>
22217_ACEOF
ca81d7a0
JD
22218if { (ac_try="$ac_cpp conftest.$ac_ext"
22219case "(($ac_try" in
22220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22221 *) ac_try_echo=$ac_try;;
22222esac
22223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22224 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22225 ac_status=$?
6bae0ccf 22226 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22227 rm -f conftest.er1
22228 cat conftest.err >&5
c0d27fcc 22229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22230 (exit $ac_status); } >/dev/null && {
22231 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22232 test ! -s conftest.err
22233 }; then
c0d27fcc 22234 ac_header_preproc=yes
503d2be0
AS
22235else
22236 echo "$as_me: failed program was:" >&5
19650fd6
AS
22237sed 's/^/| /' conftest.$ac_ext >&5
22238
c0d27fcc 22239 ac_header_preproc=no
a21616bd 22240fi
ca81d7a0 22241
503d2be0 22242rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22243{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22244echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
22245
22246# So? What about this header?
edfaf76d
LK
22247case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22248 yes:no: )
35996d22
AS
22249 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22250echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22251 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22252echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22253 ac_header_preproc=yes
19650fd6 22254 ;;
edfaf76d 22255 no:yes:* )
c0d27fcc
MR
22256 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22257echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22258 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22259echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22260 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22261echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22262 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22263echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22264 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22265echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22266 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22267echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22268
19650fd6 22269 ;;
c0d27fcc 22270esac
ca81d7a0
JD
22271{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22272echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22273if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22274 echo $ECHO_N "(cached) $ECHO_C" >&6
22275else
edfaf76d 22276 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22277fi
ca81d7a0
JD
22278ac_res=`eval echo '${'$as_ac_Header'}'`
22279 { echo "$as_me:$LINENO: result: $ac_res" >&5
22280echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22281
22282fi
503d2be0 22283if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22284 cat >>confdefs.h <<_ACEOF
503d2be0 22285#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22286_ACEOF
503d2be0 22287
a21616bd 22288fi
c0d27fcc 22289
a21616bd
KR
22290done
22291
22292fi
c0d27fcc 22293
a21616bd
KR
22294done
22295
22296fi
c0d27fcc 22297
a21616bd
KR
22298done
22299
22300 fi
503d2be0
AS
22301
22302for ac_header in com_err.h
a21616bd 22303do
503d2be0 22304as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22305if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22306 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22307echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22308if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22309 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22310fi
ca81d7a0
JD
22311ac_res=`eval echo '${'$as_ac_Header'}'`
22312 { echo "$as_me:$LINENO: result: $ac_res" >&5
22313echo "${ECHO_T}$ac_res" >&6; }
98418dba 22314else
c0d27fcc 22315 # Is the header compilable?
ca81d7a0
JD
22316{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22317echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22318cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22319/* confdefs.h. */
22320_ACEOF
22321cat confdefs.h >>conftest.$ac_ext
22322cat >>conftest.$ac_ext <<_ACEOF
22323/* end confdefs.h. */
c0d27fcc
MR
22324$ac_includes_default
22325#include <$ac_header>
22326_ACEOF
22327rm -f conftest.$ac_objext
ca81d7a0
JD
22328if { (ac_try="$ac_compile"
22329case "(($ac_try" in
22330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22331 *) ac_try_echo=$ac_try;;
22332esac
22333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22334 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
22335 ac_status=$?
22336 grep -v '^ *+' conftest.er1 >conftest.err
22337 rm -f conftest.er1
22338 cat conftest.err >&5
22339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22340 (exit $ac_status); } && {
22341 test -z "$ac_c_werror_flag" ||
22342 test ! -s conftest.err
22343 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22344 ac_header_compiler=yes
22345else
22346 echo "$as_me: failed program was:" >&5
19650fd6
AS
22347sed 's/^/| /' conftest.$ac_ext >&5
22348
ca81d7a0 22349 ac_header_compiler=no
c0d27fcc 22350fi
ca81d7a0
JD
22351
22352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22353{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22354echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22355
22356# Is the header present?
ca81d7a0
JD
22357{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22358echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22359cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22360/* confdefs.h. */
22361_ACEOF
22362cat confdefs.h >>conftest.$ac_ext
22363cat >>conftest.$ac_ext <<_ACEOF
22364/* end confdefs.h. */
503d2be0
AS
22365#include <$ac_header>
22366_ACEOF
ca81d7a0
JD
22367if { (ac_try="$ac_cpp conftest.$ac_ext"
22368case "(($ac_try" in
22369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22370 *) ac_try_echo=$ac_try;;
22371esac
22372eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22373 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22374 ac_status=$?
6bae0ccf 22375 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22376 rm -f conftest.er1
22377 cat conftest.err >&5
c0d27fcc 22378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22379 (exit $ac_status); } >/dev/null && {
22380 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22381 test ! -s conftest.err
22382 }; then
c0d27fcc 22383 ac_header_preproc=yes
503d2be0
AS
22384else
22385 echo "$as_me: failed program was:" >&5
19650fd6
AS
22386sed 's/^/| /' conftest.$ac_ext >&5
22387
c0d27fcc 22388 ac_header_preproc=no
a21616bd 22389fi
ca81d7a0 22390
503d2be0 22391rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22392{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22393echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22394
22395# So? What about this header?
edfaf76d
LK
22396case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22397 yes:no: )
c0d27fcc
MR
22398 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22399echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22400 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22401echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22402 ac_header_preproc=yes
19650fd6 22403 ;;
edfaf76d 22404 no:yes:* )
c0d27fcc
MR
22405 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22406echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22407 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22408echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22409 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22410echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22411 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22412echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22413 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22414echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22415 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22416echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22417
19650fd6 22418 ;;
c0d27fcc 22419esac
ca81d7a0
JD
22420{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22421echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22422if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22423 echo $ECHO_N "(cached) $ECHO_C" >&6
22424else
edfaf76d 22425 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22426fi
ca81d7a0
JD
22427ac_res=`eval echo '${'$as_ac_Header'}'`
22428 { echo "$as_me:$LINENO: result: $ac_res" >&5
22429echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22430
22431fi
503d2be0 22432if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22433 cat >>confdefs.h <<_ACEOF
503d2be0 22434#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22435_ACEOF
503d2be0 22436
a21616bd 22437fi
c0d27fcc 22438
a21616bd
KR
22439done
22440
22441fi
22442
ba4481b5
DL
22443# Solaris requires -lintl if you want strerror (which calls dgettext)
22444# to return localized messages.
503d2be0 22445
ca81d7a0
JD
22446{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
22447echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
22448if test "${ac_cv_lib_intl_dgettext+set}" = set; then
22449 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22450else
503d2be0 22451 ac_check_lib_save_LIBS=$LIBS
ba4481b5 22452LIBS="-lintl $LIBS"
503d2be0 22453cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22454/* confdefs.h. */
22455_ACEOF
22456cat confdefs.h >>conftest.$ac_ext
22457cat >>conftest.$ac_ext <<_ACEOF
22458/* end confdefs.h. */
503d2be0 22459
ca81d7a0
JD
22460/* Override any GCC internal prototype to avoid an error.
22461 Use char because int might match the return type of a GCC
22462 builtin and then its argument prototype would still apply. */
503d2be0
AS
22463#ifdef __cplusplus
22464extern "C"
22465#endif
503d2be0
AS
22466char dgettext ();
22467int
22468main ()
22469{
ca81d7a0 22470return dgettext ();
503d2be0
AS
22471 ;
22472 return 0;
22473}
22474_ACEOF
22475rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22476if { (ac_try="$ac_link"
22477case "(($ac_try" in
22478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22479 *) ac_try_echo=$ac_try;;
22480esac
22481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22482 (eval "$ac_link") 2>conftest.er1
503d2be0 22483 ac_status=$?
edfaf76d
LK
22484 grep -v '^ *+' conftest.er1 >conftest.err
22485 rm -f conftest.er1
22486 cat conftest.err >&5
c0d27fcc 22487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22488 (exit $ac_status); } && {
22489 test -z "$ac_c_werror_flag" ||
22490 test ! -s conftest.err
22491 } && test -s conftest$ac_exeext &&
22492 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22493 ac_cv_lib_intl_dgettext=yes
22494else
22495 echo "$as_me: failed program was:" >&5
19650fd6
AS
22496sed 's/^/| /' conftest.$ac_ext >&5
22497
ca81d7a0 22498 ac_cv_lib_intl_dgettext=no
503d2be0 22499fi
ca81d7a0 22500
f053c89f 22501rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22502 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22503LIBS=$ac_check_lib_save_LIBS
22504fi
ca81d7a0
JD
22505{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
22506echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 22507if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 22508 cat >>confdefs.h <<_ACEOF
503d2be0 22509#define HAVE_LIBINTL 1
c0d27fcc 22510_ACEOF
ba4481b5
DL
22511
22512 LIBS="-lintl $LIBS"
22513
ba4481b5
DL
22514fi
22515
c0d27fcc 22516
ca81d7a0
JD
22517{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
22518echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
22519if test "${emacs_cv_localtime_cache+set}" = set; then
22520 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
22521else
22522 if test x$ac_cv_func_tzset = xyes; then
22523if test "$cross_compiling" = yes; then
22524 # If we have tzset, assume the worst when cross-compiling.
22525emacs_cv_localtime_cache=yes
22526else
503d2be0 22527 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22528/* confdefs.h. */
22529_ACEOF
22530cat confdefs.h >>conftest.$ac_ext
22531cat >>conftest.$ac_ext <<_ACEOF
22532/* end confdefs.h. */
ba4481b5 22533#include <time.h>
ba4481b5
DL
22534extern char **environ;
22535unset_TZ ()
22536{
22537 char **from, **to;
22538 for (to = from = environ; (*to = *from); from++)
22539 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
22540 to++;
22541}
22542char TZ_GMT0[] = "TZ=GMT0";
22543char TZ_PST8[] = "TZ=PST8";
22544main()
22545{
22546 time_t now = time ((time_t *) 0);
22547 int hour_GMT0, hour_unset;
22548 if (putenv (TZ_GMT0) != 0)
22549 exit (1);
22550 hour_GMT0 = localtime (&now)->tm_hour;
22551 unset_TZ ();
22552 hour_unset = localtime (&now)->tm_hour;
22553 if (putenv (TZ_PST8) != 0)
22554 exit (1);
22555 if (localtime (&now)->tm_hour == hour_GMT0)
22556 exit (1);
22557 unset_TZ ();
22558 if (localtime (&now)->tm_hour != hour_unset)
22559 exit (1);
22560 exit (0);
22561}
503d2be0
AS
22562_ACEOF
22563rm -f conftest$ac_exeext
ca81d7a0
JD
22564if { (ac_try="$ac_link"
22565case "(($ac_try" in
22566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22567 *) ac_try_echo=$ac_try;;
22568esac
22569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22570 (eval "$ac_link") 2>&5
503d2be0 22571 ac_status=$?
c0d27fcc 22572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22573 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22574 { (case "(($ac_try" in
22575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22576 *) ac_try_echo=$ac_try;;
22577esac
22578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22579 (eval "$ac_try") 2>&5
503d2be0 22580 ac_status=$?
c0d27fcc 22581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22582 (exit $ac_status); }; }; then
ba4481b5
DL
22583 emacs_cv_localtime_cache=no
22584else
503d2be0
AS
22585 echo "$as_me: program exited with status $ac_status" >&5
22586echo "$as_me: failed program was:" >&5
19650fd6
AS
22587sed 's/^/| /' conftest.$ac_ext >&5
22588
c0d27fcc 22589( exit $ac_status )
503d2be0 22590emacs_cv_localtime_cache=yes
ba4481b5 22591fi
ca81d7a0 22592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 22593fi
ca81d7a0
JD
22594
22595
ba4481b5
DL
22596else
22597 # If we lack tzset, report that localtime does not cache TZ,
22598 # since we can't invalidate the cache if we don't have tzset.
22599 emacs_cv_localtime_cache=no
22600fi
22601fi
ca81d7a0
JD
22602{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
22603echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 22604if test $emacs_cv_localtime_cache = yes; then
b936fae4 22605
c0d27fcc 22606cat >>confdefs.h <<\_ACEOF
ba4481b5 22607#define LOCALTIME_CACHE 1
c0d27fcc 22608_ACEOF
ba4481b5
DL
22609
22610fi
22611
22612if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
22613
22614for ac_func in gettimeofday
48d4b120 22615do
503d2be0 22616as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
22617{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22618echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22619if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22620 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 22621else
503d2be0 22622 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22623/* confdefs.h. */
22624_ACEOF
22625cat confdefs.h >>conftest.$ac_ext
22626cat >>conftest.$ac_ext <<_ACEOF
22627/* end confdefs.h. */
edfaf76d
LK
22628/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22629 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22630#define $ac_func innocuous_$ac_func
22631
48d4b120 22632/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22633 which can conflict with char $ac_func (); below.
22634 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22635 <limits.h> exists even on freestanding compilers. */
edfaf76d 22636
19650fd6
AS
22637#ifdef __STDC__
22638# include <limits.h>
22639#else
22640# include <assert.h>
22641#endif
edfaf76d
LK
22642
22643#undef $ac_func
22644
ca81d7a0
JD
22645/* Override any GCC internal prototype to avoid an error.
22646 Use char because int might match the return type of a GCC
22647 builtin and then its argument prototype would still apply. */
503d2be0
AS
22648#ifdef __cplusplus
22649extern "C"
22650#endif
503d2be0 22651char $ac_func ();
48d4b120
DL
22652/* The GNU C library defines this for functions which it implements
22653 to always fail with ENOSYS. Some functions are actually named
22654 something starting with __ and the normal name is an alias. */
ca81d7a0 22655#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 22656choke me
cd958eb3
MB
22657#endif
22658
19650fd6
AS
22659int
22660main ()
22661{
ca81d7a0 22662return $ac_func ();
503d2be0
AS
22663 ;
22664 return 0;
22665}
22666_ACEOF
22667rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22668if { (ac_try="$ac_link"
22669case "(($ac_try" in
22670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22671 *) ac_try_echo=$ac_try;;
22672esac
22673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22674 (eval "$ac_link") 2>conftest.er1
503d2be0 22675 ac_status=$?
edfaf76d
LK
22676 grep -v '^ *+' conftest.er1 >conftest.err
22677 rm -f conftest.er1
22678 cat conftest.err >&5
c0d27fcc 22679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22680 (exit $ac_status); } && {
22681 test -z "$ac_c_werror_flag" ||
22682 test ! -s conftest.err
22683 } && test -s conftest$ac_exeext &&
22684 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22685 eval "$as_ac_var=yes"
22686else
22687 echo "$as_me: failed program was:" >&5
19650fd6
AS
22688sed 's/^/| /' conftest.$ac_ext >&5
22689
ca81d7a0 22690 eval "$as_ac_var=no"
503d2be0 22691fi
ca81d7a0 22692
f053c89f 22693rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22694 conftest$ac_exeext conftest.$ac_ext
503d2be0 22695fi
ca81d7a0
JD
22696ac_res=`eval echo '${'$as_ac_var'}'`
22697 { echo "$as_me:$LINENO: result: $ac_res" >&5
22698echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22699if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22700 cat >>confdefs.h <<_ACEOF
503d2be0 22701#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22702_ACEOF
48d4b120 22703
48d4b120
DL
22704fi
22705done
22706
b936fae4 22707 if test $ac_cv_func_gettimeofday = yes; then
ca81d7a0
JD
22708 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
22709echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
22710if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
22711 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22712else
503d2be0 22713 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22714/* confdefs.h. */
22715_ACEOF
22716cat confdefs.h >>conftest.$ac_ext
22717cat >>conftest.$ac_ext <<_ACEOF
22718/* end confdefs.h. */
ba4481b5 22719
a3f08d9e
DL
22720#ifdef TIME_WITH_SYS_TIME
22721#include <sys/time.h>
22722#include <time.h>
22723#else
22724#ifdef HAVE_SYS_TIME_H
22725#include <sys/time.h>
22726#else
22727#include <time.h>
22728#endif
22729#endif
503d2be0
AS
22730int
22731main ()
22732{
a3f08d9e 22733struct timeval time;
b936fae4 22734 gettimeofday (&time, 0);
503d2be0
AS
22735 ;
22736 return 0;
22737}
22738_ACEOF
22739rm -f conftest.$ac_objext
f053c89f
CY
22740if { (ac_try="$ac_compile"
22741case "(($ac_try" in
ca81d7a0
JD
22742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22743 *) ac_try_echo=$ac_try;;
22744esac
22745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 22746 (eval "$ac_compile") 2>conftest.er1
503d2be0 22747 ac_status=$?
edfaf76d
LK
22748 grep -v '^ *+' conftest.er1 >conftest.err
22749 rm -f conftest.er1
22750 cat conftest.err >&5
c0d27fcc 22751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22752 (exit $ac_status); } && {
22753 test -z "$ac_c_werror_flag" ||
22754 test ! -s conftest.err
22755 } && test -s conftest.$ac_objext; then
ba4481b5
DL
22756 emacs_cv_gettimeofday_two_arguments=yes
22757else
503d2be0 22758 echo "$as_me: failed program was:" >&5
19650fd6
AS
22759sed 's/^/| /' conftest.$ac_ext >&5
22760
ca81d7a0 22761 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 22762fi
ca81d7a0
JD
22763
22764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22765fi
ca81d7a0
JD
22766{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
22767echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
22768 if test $emacs_cv_gettimeofday_two_arguments = no; then
22769
c0d27fcc 22770cat >>confdefs.h <<\_ACEOF
ba4481b5 22771#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 22772_ACEOF
ba4481b5 22773
b936fae4 22774 fi
ba4481b5
DL
22775 fi
22776fi
22777
22778ok_so_far=yes
ca81d7a0
JD
22779{ echo "$as_me:$LINENO: checking for socket" >&5
22780echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
22781if test "${ac_cv_func_socket+set}" = set; then
22782 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22783else
503d2be0 22784 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22785/* confdefs.h. */
22786_ACEOF
22787cat confdefs.h >>conftest.$ac_ext
22788cat >>conftest.$ac_ext <<_ACEOF
22789/* end confdefs.h. */
edfaf76d
LK
22790/* Define socket to an innocuous variant, in case <limits.h> declares socket.
22791 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22792#define socket innocuous_socket
22793
ba4481b5 22794/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22795 which can conflict with char socket (); below.
22796 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22797 <limits.h> exists even on freestanding compilers. */
edfaf76d 22798
19650fd6
AS
22799#ifdef __STDC__
22800# include <limits.h>
22801#else
22802# include <assert.h>
22803#endif
edfaf76d
LK
22804
22805#undef socket
22806
ca81d7a0
JD
22807/* Override any GCC internal prototype to avoid an error.
22808 Use char because int might match the return type of a GCC
22809 builtin and then its argument prototype would still apply. */
503d2be0
AS
22810#ifdef __cplusplus
22811extern "C"
22812#endif
503d2be0 22813char socket ();
ba4481b5
DL
22814/* The GNU C library defines this for functions which it implements
22815 to always fail with ENOSYS. Some functions are actually named
22816 something starting with __ and the normal name is an alias. */
ca81d7a0 22817#if defined __stub_socket || defined __stub___socket
ba4481b5 22818choke me
cd958eb3
MB
22819#endif
22820
19650fd6
AS
22821int
22822main ()
22823{
ca81d7a0 22824return socket ();
503d2be0
AS
22825 ;
22826 return 0;
22827}
22828_ACEOF
22829rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22830if { (ac_try="$ac_link"
22831case "(($ac_try" in
22832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22833 *) ac_try_echo=$ac_try;;
22834esac
22835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22836 (eval "$ac_link") 2>conftest.er1
503d2be0 22837 ac_status=$?
edfaf76d
LK
22838 grep -v '^ *+' conftest.er1 >conftest.err
22839 rm -f conftest.er1
22840 cat conftest.err >&5
c0d27fcc 22841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22842 (exit $ac_status); } && {
22843 test -z "$ac_c_werror_flag" ||
22844 test ! -s conftest.err
22845 } && test -s conftest$ac_exeext &&
22846 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22847 ac_cv_func_socket=yes
22848else
22849 echo "$as_me: failed program was:" >&5
19650fd6
AS
22850sed 's/^/| /' conftest.$ac_ext >&5
22851
ca81d7a0 22852 ac_cv_func_socket=no
503d2be0 22853fi
ca81d7a0 22854
f053c89f 22855rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22856 conftest$ac_exeext conftest.$ac_ext
503d2be0 22857fi
ca81d7a0
JD
22858{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
22859echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 22860if test $ac_cv_func_socket = yes; then
ba4481b5
DL
22861 :
22862else
503d2be0 22863 ok_so_far=no
ba4481b5
DL
22864fi
22865
22866if test $ok_so_far = yes; then
c0d27fcc 22867 if test "${ac_cv_header_netinet_in_h+set}" = set; then
ca81d7a0
JD
22868 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22869echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
22870if test "${ac_cv_header_netinet_in_h+set}" = set; then
22871 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22872fi
ca81d7a0
JD
22873{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22874echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 22875else
c0d27fcc 22876 # Is the header compilable?
ca81d7a0
JD
22877{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
22878echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 22879cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22880/* confdefs.h. */
22881_ACEOF
22882cat confdefs.h >>conftest.$ac_ext
22883cat >>conftest.$ac_ext <<_ACEOF
22884/* end confdefs.h. */
c0d27fcc
MR
22885$ac_includes_default
22886#include <netinet/in.h>
22887_ACEOF
22888rm -f conftest.$ac_objext
ca81d7a0
JD
22889if { (ac_try="$ac_compile"
22890case "(($ac_try" in
22891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22892 *) ac_try_echo=$ac_try;;
22893esac
22894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22895 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22896 ac_status=$?
edfaf76d
LK
22897 grep -v '^ *+' conftest.er1 >conftest.err
22898 rm -f conftest.er1
22899 cat conftest.err >&5
c0d27fcc 22900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
22901 (exit $ac_status); } && {
22902 test -z "$ac_c_werror_flag" ||
22903 test ! -s conftest.err
22904 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22905 ac_header_compiler=yes
22906else
22907 echo "$as_me: failed program was:" >&5
19650fd6
AS
22908sed 's/^/| /' conftest.$ac_ext >&5
22909
ca81d7a0 22910 ac_header_compiler=no
c0d27fcc 22911fi
ca81d7a0
JD
22912
22913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22914{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22915echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22916
22917# Is the header present?
ca81d7a0
JD
22918{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22919echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22920cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22921/* confdefs.h. */
22922_ACEOF
22923cat confdefs.h >>conftest.$ac_ext
22924cat >>conftest.$ac_ext <<_ACEOF
22925/* end confdefs.h. */
ba4481b5 22926#include <netinet/in.h>
503d2be0 22927_ACEOF
ca81d7a0
JD
22928if { (ac_try="$ac_cpp conftest.$ac_ext"
22929case "(($ac_try" in
22930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22931 *) ac_try_echo=$ac_try;;
22932esac
22933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22934 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22935 ac_status=$?
6bae0ccf 22936 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22937 rm -f conftest.er1
22938 cat conftest.err >&5
c0d27fcc 22939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22940 (exit $ac_status); } >/dev/null && {
22941 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22942 test ! -s conftest.err
22943 }; then
c0d27fcc 22944 ac_header_preproc=yes
ba4481b5 22945else
503d2be0 22946 echo "$as_me: failed program was:" >&5
19650fd6
AS
22947sed 's/^/| /' conftest.$ac_ext >&5
22948
c0d27fcc 22949 ac_header_preproc=no
ba4481b5 22950fi
ca81d7a0 22951
503d2be0 22952rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22953{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22954echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22955
22956# So? What about this header?
edfaf76d
LK
22957case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22958 yes:no: )
c0d27fcc
MR
22959 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22960echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22961 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22962echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
22963 ac_header_preproc=yes
19650fd6 22964 ;;
edfaf76d 22965 no:yes:* )
c0d27fcc
MR
22966 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22967echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22968 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22969echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22970 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22971echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22972 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22973echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22974 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 22975echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22976 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22977echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22978
19650fd6 22979 ;;
c0d27fcc 22980esac
ca81d7a0
JD
22981{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22982echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
22983if test "${ac_cv_header_netinet_in_h+set}" = set; then
22984 echo $ECHO_N "(cached) $ECHO_C" >&6
22985else
22986 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22987fi
ca81d7a0
JD
22988{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22989echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22990
22991fi
503d2be0 22992if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22993 :
22994else
503d2be0 22995 ok_so_far=no
ba4481b5
DL
22996fi
22997
c0d27fcc 22998
ba4481b5
DL
22999fi
23000if test $ok_so_far = yes; then
c0d27fcc 23001 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
ca81d7a0
JD
23002 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
23003echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
23004if test "${ac_cv_header_arpa_inet_h+set}" = set; then
23005 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23006fi
ca81d7a0
JD
23007{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
23008echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 23009else
c0d27fcc 23010 # Is the header compilable?
ca81d7a0
JD
23011{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
23012echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 23013cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23014/* confdefs.h. */
23015_ACEOF
23016cat confdefs.h >>conftest.$ac_ext
23017cat >>conftest.$ac_ext <<_ACEOF
23018/* end confdefs.h. */
c0d27fcc
MR
23019$ac_includes_default
23020#include <arpa/inet.h>
23021_ACEOF
23022rm -f conftest.$ac_objext
ca81d7a0
JD
23023if { (ac_try="$ac_compile"
23024case "(($ac_try" in
23025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23026 *) ac_try_echo=$ac_try;;
23027esac
23028eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23029 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23030 ac_status=$?
edfaf76d
LK
23031 grep -v '^ *+' conftest.er1 >conftest.err
23032 rm -f conftest.er1
23033 cat conftest.err >&5
c0d27fcc 23034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23035 (exit $ac_status); } && {
23036 test -z "$ac_c_werror_flag" ||
23037 test ! -s conftest.err
23038 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
23039 ac_header_compiler=yes
23040else
23041 echo "$as_me: failed program was:" >&5
19650fd6
AS
23042sed 's/^/| /' conftest.$ac_ext >&5
23043
ca81d7a0 23044 ac_header_compiler=no
c0d27fcc 23045fi
ca81d7a0
JD
23046
23047rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23048{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23049echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23050
23051# Is the header present?
ca81d7a0
JD
23052{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
23053echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 23054cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23055/* confdefs.h. */
23056_ACEOF
23057cat confdefs.h >>conftest.$ac_ext
23058cat >>conftest.$ac_ext <<_ACEOF
23059/* end confdefs.h. */
ba4481b5 23060#include <arpa/inet.h>
503d2be0 23061_ACEOF
ca81d7a0
JD
23062if { (ac_try="$ac_cpp conftest.$ac_ext"
23063case "(($ac_try" in
23064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23065 *) ac_try_echo=$ac_try;;
23066esac
23067eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23068 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23069 ac_status=$?
6bae0ccf 23070 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23071 rm -f conftest.er1
23072 cat conftest.err >&5
c0d27fcc 23073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23074 (exit $ac_status); } >/dev/null && {
23075 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23076 test ! -s conftest.err
23077 }; then
c0d27fcc 23078 ac_header_preproc=yes
ba4481b5 23079else
503d2be0 23080 echo "$as_me: failed program was:" >&5
19650fd6
AS
23081sed 's/^/| /' conftest.$ac_ext >&5
23082
c0d27fcc 23083 ac_header_preproc=no
ba4481b5 23084fi
ca81d7a0 23085
503d2be0 23086rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23087{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23088echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23089
23090# So? What about this header?
edfaf76d
LK
23091case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23092 yes:no: )
c0d27fcc
MR
23093 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
23094echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23095 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
23096echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
23097 ac_header_preproc=yes
19650fd6 23098 ;;
edfaf76d 23099 no:yes:* )
c0d27fcc
MR
23100 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
23101echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
23102 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
23103echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
23104 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
23105echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
23106 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
23107echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23108 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 23109echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23110 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
23111echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23112
19650fd6 23113 ;;
c0d27fcc 23114esac
ca81d7a0
JD
23115{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
23116echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
23117if test "${ac_cv_header_arpa_inet_h+set}" = set; then
23118 echo $ECHO_N "(cached) $ECHO_C" >&6
23119else
23120 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 23121fi
ca81d7a0
JD
23122{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
23123echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
23124
23125fi
503d2be0 23126if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
23127 :
23128else
503d2be0 23129 ok_so_far=no
ba4481b5
DL
23130fi
23131
c0d27fcc 23132
ba4481b5
DL
23133fi
23134if test $ok_so_far = yes; then
b936fae4 23135
c0d27fcc 23136cat >>confdefs.h <<\_ACEOF
ba4481b5 23137#define HAVE_INET_SOCKETS 1
c0d27fcc 23138_ACEOF
ba4481b5
DL
23139
23140fi
23141
2d2b6695 23142
7862d3a8 23143for ac_header in sys/ioctl.h
2d2b6695
KS
23144do
23145as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23146if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23147 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23148echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23149if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
23150 echo $ECHO_N "(cached) $ECHO_C" >&6
23151fi
ca81d7a0
JD
23152ac_res=`eval echo '${'$as_ac_Header'}'`
23153 { echo "$as_me:$LINENO: result: $ac_res" >&5
23154echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23155else
23156 # Is the header compilable?
ca81d7a0
JD
23157{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23158echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 23159cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23160/* confdefs.h. */
23161_ACEOF
23162cat confdefs.h >>conftest.$ac_ext
23163cat >>conftest.$ac_ext <<_ACEOF
23164/* end confdefs.h. */
23165$ac_includes_default
23166#include <$ac_header>
23167_ACEOF
23168rm -f conftest.$ac_objext
ca81d7a0
JD
23169if { (ac_try="$ac_compile"
23170case "(($ac_try" in
23171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23172 *) ac_try_echo=$ac_try;;
23173esac
23174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23175 (eval "$ac_compile") 2>conftest.er1
2d2b6695 23176 ac_status=$?
edfaf76d
LK
23177 grep -v '^ *+' conftest.er1 >conftest.err
23178 rm -f conftest.er1
23179 cat conftest.err >&5
2d2b6695 23180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23181 (exit $ac_status); } && {
23182 test -z "$ac_c_werror_flag" ||
23183 test ! -s conftest.err
23184 } && test -s conftest.$ac_objext; then
2d2b6695
KS
23185 ac_header_compiler=yes
23186else
23187 echo "$as_me: failed program was:" >&5
23188sed 's/^/| /' conftest.$ac_ext >&5
23189
ca81d7a0 23190 ac_header_compiler=no
2d2b6695 23191fi
ca81d7a0
JD
23192
23193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23194{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23195echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
23196
23197# Is the header present?
ca81d7a0
JD
23198{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23199echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 23200cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23201/* confdefs.h. */
23202_ACEOF
23203cat confdefs.h >>conftest.$ac_ext
23204cat >>conftest.$ac_ext <<_ACEOF
23205/* end confdefs.h. */
23206#include <$ac_header>
23207_ACEOF
ca81d7a0
JD
23208if { (ac_try="$ac_cpp conftest.$ac_ext"
23209case "(($ac_try" in
23210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23211 *) ac_try_echo=$ac_try;;
23212esac
23213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23214 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
23215 ac_status=$?
23216 grep -v '^ *+' conftest.er1 >conftest.err
23217 rm -f conftest.er1
23218 cat conftest.err >&5
23219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23220 (exit $ac_status); } >/dev/null && {
23221 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23222 test ! -s conftest.err
23223 }; then
2d2b6695
KS
23224 ac_header_preproc=yes
23225else
23226 echo "$as_me: failed program was:" >&5
23227sed 's/^/| /' conftest.$ac_ext >&5
23228
23229 ac_header_preproc=no
23230fi
ca81d7a0 23231
2d2b6695 23232rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23233{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23234echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
23235
23236# So? What about this header?
edfaf76d
LK
23237case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23238 yes:no: )
2d2b6695
KS
23239 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23240echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23241 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23242echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23243 ac_header_preproc=yes
2d2b6695 23244 ;;
edfaf76d 23245 no:yes:* )
2d2b6695
KS
23246 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23247echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23248 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23249echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23250 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23251echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23252 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23253echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
23254 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
23255echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23256 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23257echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23258
2d2b6695
KS
23259 ;;
23260esac
ca81d7a0
JD
23261{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23262echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23263if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
23264 echo $ECHO_N "(cached) $ECHO_C" >&6
23265else
edfaf76d 23266 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 23267fi
ca81d7a0
JD
23268ac_res=`eval echo '${'$as_ac_Header'}'`
23269 { echo "$as_me:$LINENO: result: $ac_res" >&5
23270echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23271
23272fi
23273if test `eval echo '${'$as_ac_Header'}'` = yes; then
23274 cat >>confdefs.h <<_ACEOF
23275#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23276_ACEOF
23277
23278fi
23279
23280done
23281
23282
ba4481b5 23283if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 23284
c0d27fcc 23285cat >>confdefs.h <<\_ACEOF
ba4481b5 23286#define HAVE_AIX_SMT_EXP 1
c0d27fcc 23287_ACEOF
ba4481b5
DL
23288
23289fi
23290
ca81d7a0
JD
23291{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
23292echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 23293if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ca81d7a0
JD
23294 { echo "$as_me:$LINENO: result: yes" >&5
23295echo "${ECHO_T}yes" >&6; }
b936fae4 23296
c0d27fcc 23297cat >>confdefs.h <<\_ACEOF
3d9fec71 23298#define HAVE_DEV_PTMX 1
c0d27fcc 23299_ACEOF
3d9fec71
DL
23300
23301else
ca81d7a0
JD
23302 { echo "$as_me:$LINENO: result: no" >&5
23303echo "${ECHO_T}no" >&6; }
3d9fec71
DL
23304fi
23305
ca81d7a0
JD
23306{ echo "$as_me:$LINENO: checking for pid_t" >&5
23307echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
23308if test "${ac_cv_type_pid_t+set}" = set; then
23309 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 23310else
503d2be0 23311 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23312/* confdefs.h. */
23313_ACEOF
23314cat confdefs.h >>conftest.$ac_ext
23315cat >>conftest.$ac_ext <<_ACEOF
23316/* end confdefs.h. */
503d2be0 23317$ac_includes_default
ca81d7a0 23318typedef pid_t ac__type_new_;
503d2be0
AS
23319int
23320main ()
23321{
ca81d7a0 23322if ((ac__type_new_ *) 0)
503d2be0 23323 return 0;
ca81d7a0 23324if (sizeof (ac__type_new_))
503d2be0
AS
23325 return 0;
23326 ;
23327 return 0;
23328}
23329_ACEOF
23330rm -f conftest.$ac_objext
ca81d7a0
JD
23331if { (ac_try="$ac_compile"
23332case "(($ac_try" in
23333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23334 *) ac_try_echo=$ac_try;;
23335esac
23336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23337 (eval "$ac_compile") 2>conftest.er1
503d2be0 23338 ac_status=$?
edfaf76d
LK
23339 grep -v '^ *+' conftest.er1 >conftest.err
23340 rm -f conftest.er1
23341 cat conftest.err >&5
c0d27fcc 23342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23343 (exit $ac_status); } && {
23344 test -z "$ac_c_werror_flag" ||
23345 test ! -s conftest.err
23346 } && test -s conftest.$ac_objext; then
647847ea
DL
23347 ac_cv_type_pid_t=yes
23348else
503d2be0 23349 echo "$as_me: failed program was:" >&5
19650fd6
AS
23350sed 's/^/| /' conftest.$ac_ext >&5
23351
ca81d7a0 23352 ac_cv_type_pid_t=no
647847ea 23353fi
ca81d7a0
JD
23354
23355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 23356fi
ca81d7a0
JD
23357{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
23358echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
23359if test $ac_cv_type_pid_t = yes; then
23360 :
23361else
23362
c0d27fcc 23363cat >>confdefs.h <<_ACEOF
647847ea 23364#define pid_t int
c0d27fcc 23365_ACEOF
647847ea
DL
23366
23367fi
23368
c0d27fcc 23369
ca81d7a0 23370for ac_header in vfork.h
503d2be0
AS
23371do
23372as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23373if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23374 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23375echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23376if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23377 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23378fi
ca81d7a0
JD
23379ac_res=`eval echo '${'$as_ac_Header'}'`
23380 { echo "$as_me:$LINENO: result: $ac_res" >&5
23381echo "${ECHO_T}$ac_res" >&6; }
98418dba 23382else
c0d27fcc 23383 # Is the header compilable?
ca81d7a0
JD
23384{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23385echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 23386cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23387/* confdefs.h. */
23388_ACEOF
23389cat confdefs.h >>conftest.$ac_ext
23390cat >>conftest.$ac_ext <<_ACEOF
23391/* end confdefs.h. */
c0d27fcc
MR
23392$ac_includes_default
23393#include <$ac_header>
23394_ACEOF
23395rm -f conftest.$ac_objext
ca81d7a0
JD
23396if { (ac_try="$ac_compile"
23397case "(($ac_try" in
23398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23399 *) ac_try_echo=$ac_try;;
23400esac
23401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23402 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23403 ac_status=$?
edfaf76d
LK
23404 grep -v '^ *+' conftest.er1 >conftest.err
23405 rm -f conftest.er1
23406 cat conftest.err >&5
c0d27fcc 23407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23408 (exit $ac_status); } && {
23409 test -z "$ac_c_werror_flag" ||
23410 test ! -s conftest.err
23411 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
23412 ac_header_compiler=yes
23413else
23414 echo "$as_me: failed program was:" >&5
19650fd6
AS
23415sed 's/^/| /' conftest.$ac_ext >&5
23416
ca81d7a0 23417 ac_header_compiler=no
c0d27fcc 23418fi
ca81d7a0
JD
23419
23420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23421{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23422echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23423
23424# Is the header present?
ca81d7a0
JD
23425{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23426echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 23427cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23428/* confdefs.h. */
23429_ACEOF
23430cat confdefs.h >>conftest.$ac_ext
23431cat >>conftest.$ac_ext <<_ACEOF
23432/* end confdefs.h. */
503d2be0
AS
23433#include <$ac_header>
23434_ACEOF
ca81d7a0
JD
23435if { (ac_try="$ac_cpp conftest.$ac_ext"
23436case "(($ac_try" in
23437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23438 *) ac_try_echo=$ac_try;;
23439esac
23440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23441 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23442 ac_status=$?
6bae0ccf 23443 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23444 rm -f conftest.er1
23445 cat conftest.err >&5
c0d27fcc 23446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23447 (exit $ac_status); } >/dev/null && {
23448 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23449 test ! -s conftest.err
23450 }; then
c0d27fcc 23451 ac_header_preproc=yes
647847ea 23452else
503d2be0 23453 echo "$as_me: failed program was:" >&5
19650fd6
AS
23454sed 's/^/| /' conftest.$ac_ext >&5
23455
c0d27fcc 23456 ac_header_preproc=no
647847ea 23457fi
ca81d7a0 23458
503d2be0 23459rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23460{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23461echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23462
23463# So? What about this header?
edfaf76d
LK
23464case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23465 yes:no: )
c0d27fcc
MR
23466 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23467echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23468 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23469echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23470 ac_header_preproc=yes
19650fd6 23471 ;;
edfaf76d 23472 no:yes:* )
c0d27fcc
MR
23473 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23474echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23475 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23476echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23477 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23478echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23479 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23480echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23481 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 23482echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23483 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23484echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23485
19650fd6 23486 ;;
c0d27fcc 23487esac
ca81d7a0
JD
23488{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23489echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23490if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
23491 echo $ECHO_N "(cached) $ECHO_C" >&6
23492else
edfaf76d 23493 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 23494fi
ca81d7a0
JD
23495ac_res=`eval echo '${'$as_ac_Header'}'`
23496 { echo "$as_me:$LINENO: result: $ac_res" >&5
23497echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23498
23499fi
503d2be0 23500if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23501 cat >>confdefs.h <<_ACEOF
503d2be0 23502#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23503_ACEOF
647847ea 23504
73b77ee5 23505fi
c0d27fcc 23506
503d2be0 23507done
73b77ee5 23508
c0d27fcc
MR
23509
23510
503d2be0
AS
23511for ac_func in fork vfork
23512do
23513as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
23514{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23515echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23516if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23517 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23518else
503d2be0 23519 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23520/* confdefs.h. */
23521_ACEOF
23522cat confdefs.h >>conftest.$ac_ext
23523cat >>conftest.$ac_ext <<_ACEOF
23524/* end confdefs.h. */
edfaf76d
LK
23525/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23526 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23527#define $ac_func innocuous_$ac_func
23528
fa0b693c 23529/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
23530 which can conflict with char $ac_func (); below.
23531 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23532 <limits.h> exists even on freestanding compilers. */
edfaf76d 23533
19650fd6
AS
23534#ifdef __STDC__
23535# include <limits.h>
23536#else
23537# include <assert.h>
23538#endif
edfaf76d
LK
23539
23540#undef $ac_func
23541
ca81d7a0
JD
23542/* Override any GCC internal prototype to avoid an error.
23543 Use char because int might match the return type of a GCC
23544 builtin and then its argument prototype would still apply. */
503d2be0
AS
23545#ifdef __cplusplus
23546extern "C"
23547#endif
503d2be0 23548char $ac_func ();
fa0b693c
GM
23549/* The GNU C library defines this for functions which it implements
23550 to always fail with ENOSYS. Some functions are actually named
23551 something starting with __ and the normal name is an alias. */
ca81d7a0 23552#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 23553choke me
fa0b693c
GM
23554#endif
23555
19650fd6
AS
23556int
23557main ()
23558{
ca81d7a0 23559return $ac_func ();
503d2be0
AS
23560 ;
23561 return 0;
23562}
23563_ACEOF
23564rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23565if { (ac_try="$ac_link"
23566case "(($ac_try" in
23567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23568 *) ac_try_echo=$ac_try;;
23569esac
23570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23571 (eval "$ac_link") 2>conftest.er1
503d2be0 23572 ac_status=$?
edfaf76d
LK
23573 grep -v '^ *+' conftest.er1 >conftest.err
23574 rm -f conftest.er1
23575 cat conftest.err >&5
c0d27fcc 23576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23577 (exit $ac_status); } && {
23578 test -z "$ac_c_werror_flag" ||
23579 test ! -s conftest.err
23580 } && test -s conftest$ac_exeext &&
23581 $as_test_x conftest$ac_exeext; then
503d2be0
AS
23582 eval "$as_ac_var=yes"
23583else
23584 echo "$as_me: failed program was:" >&5
19650fd6
AS
23585sed 's/^/| /' conftest.$ac_ext >&5
23586
ca81d7a0 23587 eval "$as_ac_var=no"
503d2be0 23588fi
ca81d7a0 23589
f053c89f 23590rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23591 conftest$ac_exeext conftest.$ac_ext
503d2be0 23592fi
ca81d7a0
JD
23593ac_res=`eval echo '${'$as_ac_var'}'`
23594 { echo "$as_me:$LINENO: result: $ac_res" >&5
23595echo "${ECHO_T}$ac_res" >&6; }
503d2be0 23596if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 23597 cat >>confdefs.h <<_ACEOF
503d2be0 23598#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 23599_ACEOF
503d2be0 23600
fa0b693c 23601fi
503d2be0 23602done
fa0b693c 23603
503d2be0 23604if test "x$ac_cv_func_fork" = xyes; then
ca81d7a0
JD
23605 { echo "$as_me:$LINENO: checking for working fork" >&5
23606echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
23607if test "${ac_cv_func_fork_works+set}" = set; then
23608 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23609else
503d2be0
AS
23610 if test "$cross_compiling" = yes; then
23611 ac_cv_func_fork_works=cross
23612else
23613 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
23614/* confdefs.h. */
23615_ACEOF
23616cat confdefs.h >>conftest.$ac_ext
23617cat >>conftest.$ac_ext <<_ACEOF
23618/* end confdefs.h. */
23619$ac_includes_default
23620int
23621main ()
23622{
23623
23624 /* By Ruediger Kuhlmann. */
23625 return fork () < 0;
23626
23627 ;
23628 return 0;
23629}
503d2be0
AS
23630_ACEOF
23631rm -f conftest$ac_exeext
ca81d7a0
JD
23632if { (ac_try="$ac_link"
23633case "(($ac_try" in
23634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23635 *) ac_try_echo=$ac_try;;
23636esac
23637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23638 (eval "$ac_link") 2>&5
503d2be0 23639 ac_status=$?
c0d27fcc 23640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23641 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23642 { (case "(($ac_try" in
23643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23644 *) ac_try_echo=$ac_try;;
23645esac
23646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23647 (eval "$ac_try") 2>&5
503d2be0 23648 ac_status=$?
c0d27fcc 23649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23650 (exit $ac_status); }; }; then
23651 ac_cv_func_fork_works=yes
23652else
23653 echo "$as_me: program exited with status $ac_status" >&5
23654echo "$as_me: failed program was:" >&5
19650fd6
AS
23655sed 's/^/| /' conftest.$ac_ext >&5
23656
c0d27fcc 23657( exit $ac_status )
503d2be0
AS
23658ac_cv_func_fork_works=no
23659fi
ca81d7a0 23660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 23661fi
ca81d7a0
JD
23662
23663
503d2be0 23664fi
ca81d7a0
JD
23665{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
23666echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 23667
6bae0ccf
DL
23668else
23669 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
23670fi
23671if test "x$ac_cv_func_fork_works" = xcross; then
23672 case $host in
23673 *-*-amigaos* | *-*-msdosdjgpp*)
23674 # Override, as these systems have only a dummy fork() stub
23675 ac_cv_func_fork_works=no
23676 ;;
23677 *)
23678 ac_cv_func_fork_works=yes
23679 ;;
23680 esac
c0d27fcc
MR
23681 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23682echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 23683fi
73b77ee5 23684ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 23685if test "x$ac_cv_func_vfork" = xyes; then
ca81d7a0
JD
23686 { echo "$as_me:$LINENO: checking for working vfork" >&5
23687echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
23688if test "${ac_cv_func_vfork_works+set}" = set; then
23689 echo $ECHO_N "(cached) $ECHO_C" >&6
23690else
23691 if test "$cross_compiling" = yes; then
23692 ac_cv_func_vfork_works=cross
fa0b693c 23693else
503d2be0 23694 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23695/* confdefs.h. */
23696_ACEOF
23697cat confdefs.h >>conftest.$ac_ext
23698cat >>conftest.$ac_ext <<_ACEOF
23699/* end confdefs.h. */
73b77ee5 23700/* Thanks to Paul Eggert for this test. */
ca81d7a0 23701$ac_includes_default
19650fd6 23702#include <sys/wait.h>
f053c89f 23703#ifdef HAVE_VFORK_H
503d2be0 23704# include <vfork.h>
73b77ee5
GM
23705#endif
23706/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
23707 argument registers are propagated back to the parent. The compiler
23708 is told about this with #include <vfork.h>, but some compilers
23709 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
23710 static variable whose address is put into a register that is
23711 clobbered by the vfork. */
19650fd6 23712static void
fa0b693c 23713#ifdef __cplusplus
73b77ee5 23714sparc_address_test (int arg)
503d2be0 23715# else
73b77ee5 23716sparc_address_test (arg) int arg;
fa0b693c 23717#endif
fa0b693c 23718{
73b77ee5
GM
23719 static pid_t child;
23720 if (!child) {
23721 child = vfork ();
23722 if (child < 0) {
23723 perror ("vfork");
23724 _exit(2);
23725 }
23726 if (!child) {
23727 arg = getpid();
23728 write(-1, "", 0);
23729 _exit (arg);
23730 }
23731 }
23732}
503d2be0
AS
23733
23734int
23735main ()
23736{
73b77ee5
GM
23737 pid_t parent = getpid ();
23738 pid_t child;
fa0b693c 23739
19650fd6 23740 sparc_address_test (0);
fa0b693c 23741
73b77ee5 23742 child = vfork ();
fa0b693c 23743
73b77ee5 23744 if (child == 0) {
503d2be0
AS
23745 /* Here is another test for sparc vfork register problems. This
23746 test uses lots of local variables, at least as many local
23747 variables as main has allocated so far including compiler
23748 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
23749 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
23750 reuse the register of parent for one of the local variables,
23751 since it will think that parent can't possibly be used any more
23752 in this routine. Assigning to the local variable will thus
23753 munge parent in the parent process. */
73b77ee5
GM
23754 pid_t
23755 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23756 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23757 /* Convince the compiler that p..p7 are live; otherwise, it might
23758 use the same hardware register for all 8 local variables. */
23759 if (p != p1 || p != p2 || p != p3 || p != p4
23760 || p != p5 || p != p6 || p != p7)
23761 _exit(1);
fa0b693c 23762
503d2be0
AS
23763 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23764 from child file descriptors. If the child closes a descriptor
23765 before it execs or exits, this munges the parent's descriptor
23766 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
23767 _exit(close(fileno(stdout)) != 0);
23768 } else {
23769 int status;
23770 struct stat st;
23771
23772 while (wait(&status) != child)
23773 ;
ca81d7a0 23774 return (
73b77ee5
GM
23775 /* Was there some problem with vforking? */
23776 child < 0
23777
23778 /* Did the child fail? (This shouldn't happen.) */
23779 || status
23780
23781 /* Did the vfork/compiler bug occur? */
23782 || parent != getpid()
fa0b693c 23783
73b77ee5
GM
23784 /* Did the file descriptor bug occur? */
23785 || fstat(fileno(stdout), &st) != 0
23786 );
23787 }
23788}
503d2be0
AS
23789_ACEOF
23790rm -f conftest$ac_exeext
ca81d7a0
JD
23791if { (ac_try="$ac_link"
23792case "(($ac_try" in
23793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23794 *) ac_try_echo=$ac_try;;
23795esac
23796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23797 (eval "$ac_link") 2>&5
503d2be0 23798 ac_status=$?
c0d27fcc 23799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23800 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23801 { (case "(($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_try") 2>&5
503d2be0 23807 ac_status=$?
c0d27fcc 23808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23809 (exit $ac_status); }; }; then
73b77ee5 23810 ac_cv_func_vfork_works=yes
fa0b693c 23811else
503d2be0
AS
23812 echo "$as_me: program exited with status $ac_status" >&5
23813echo "$as_me: failed program was:" >&5
19650fd6
AS
23814sed 's/^/| /' conftest.$ac_ext >&5
23815
c0d27fcc 23816( exit $ac_status )
503d2be0
AS
23817ac_cv_func_vfork_works=no
23818fi
ca81d7a0 23819rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 23820fi
ca81d7a0
JD
23821
23822
fa0b693c 23823fi
ca81d7a0
JD
23824{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
23825echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 23826
503d2be0
AS
23827fi;
23828if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 23829 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
23830 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23831echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
23832fi
23833
503d2be0
AS
23834if test "x$ac_cv_func_vfork_works" = xyes; then
23835
c0d27fcc 23836cat >>confdefs.h <<\_ACEOF
503d2be0 23837#define HAVE_WORKING_VFORK 1
c0d27fcc 23838_ACEOF
503d2be0
AS
23839
23840else
23841
c0d27fcc 23842cat >>confdefs.h <<\_ACEOF
73b77ee5 23843#define vfork fork
c0d27fcc 23844_ACEOF
fa0b693c
GM
23845
23846fi
503d2be0
AS
23847if test "x$ac_cv_func_fork_works" = xyes; then
23848
c0d27fcc 23849cat >>confdefs.h <<\_ACEOF
503d2be0 23850#define HAVE_WORKING_FORK 1
c0d27fcc 23851_ACEOF
fa0b693c 23852
503d2be0 23853fi
647847ea 23854
c0d27fcc 23855
ca81d7a0
JD
23856{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
23857echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
23858if test "${emacs_cv_langinfo_codeset+set}" = set; then
23859 echo $ECHO_N "(cached) $ECHO_C" >&6
23860else
23861 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23862/* confdefs.h. */
23863_ACEOF
23864cat confdefs.h >>conftest.$ac_ext
23865cat >>conftest.$ac_ext <<_ACEOF
23866/* end confdefs.h. */
6a3a24fa
JD
23867#include <langinfo.h>
23868int
23869main ()
23870{
23871char* cs = nl_langinfo(CODESET);
23872 ;
23873 return 0;
23874}
23875_ACEOF
23876rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23877if { (ac_try="$ac_link"
23878case "(($ac_try" in
23879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23880 *) ac_try_echo=$ac_try;;
23881esac
23882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23883 (eval "$ac_link") 2>conftest.er1
6a3a24fa 23884 ac_status=$?
edfaf76d
LK
23885 grep -v '^ *+' conftest.er1 >conftest.err
23886 rm -f conftest.er1
23887 cat conftest.err >&5
6a3a24fa 23888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23889 (exit $ac_status); } && {
23890 test -z "$ac_c_werror_flag" ||
23891 test ! -s conftest.err
23892 } && test -s conftest$ac_exeext &&
23893 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23894 emacs_cv_langinfo_codeset=yes
23895else
23896 echo "$as_me: failed program was:" >&5
19650fd6
AS
23897sed 's/^/| /' conftest.$ac_ext >&5
23898
ca81d7a0 23899 emacs_cv_langinfo_codeset=no
6a3a24fa 23900fi
ca81d7a0 23901
f053c89f 23902rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23903 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23904
23905fi
ca81d7a0
JD
23906{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23907echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23908if test $emacs_cv_langinfo_codeset = yes; then
23909
23910cat >>confdefs.h <<\_ACEOF
23911#define HAVE_LANGINFO_CODESET 1
23912_ACEOF
23913
23914fi
23915
ca81d7a0
JD
23916{ echo "$as_me:$LINENO: checking for size_t" >&5
23917echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
23918if test "${ac_cv_type_size_t+set}" = set; then
23919 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23920else
503d2be0 23921 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23922/* confdefs.h. */
23923_ACEOF
23924cat confdefs.h >>conftest.$ac_ext
23925cat >>conftest.$ac_ext <<_ACEOF
23926/* end confdefs.h. */
503d2be0 23927$ac_includes_default
ca81d7a0 23928typedef size_t ac__type_new_;
503d2be0
AS
23929int
23930main ()
23931{
ca81d7a0 23932if ((ac__type_new_ *) 0)
503d2be0 23933 return 0;
ca81d7a0 23934if (sizeof (ac__type_new_))
503d2be0
AS
23935 return 0;
23936 ;
23937 return 0;
23938}
23939_ACEOF
23940rm -f conftest.$ac_objext
ca81d7a0
JD
23941if { (ac_try="$ac_compile"
23942case "(($ac_try" in
23943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23944 *) ac_try_echo=$ac_try;;
23945esac
23946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23947 (eval "$ac_compile") 2>conftest.er1
503d2be0 23948 ac_status=$?
edfaf76d
LK
23949 grep -v '^ *+' conftest.er1 >conftest.err
23950 rm -f conftest.er1
23951 cat conftest.err >&5
c0d27fcc 23952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23953 (exit $ac_status); } && {
23954 test -z "$ac_c_werror_flag" ||
23955 test ! -s conftest.err
23956 } && test -s conftest.$ac_objext; then
8730a8da
DL
23957 ac_cv_type_size_t=yes
23958else
503d2be0 23959 echo "$as_me: failed program was:" >&5
19650fd6
AS
23960sed 's/^/| /' conftest.$ac_ext >&5
23961
ca81d7a0 23962 ac_cv_type_size_t=no
8730a8da 23963fi
ca81d7a0
JD
23964
23965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 23966fi
ca81d7a0
JD
23967{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23968echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 23969if test $ac_cv_type_size_t = yes; then
503d2be0 23970
c0d27fcc
MR
23971cat >>confdefs.h <<_ACEOF
23972#define HAVE_SIZE_T 1
23973_ACEOF
23974
8730a8da
DL
23975
23976fi
23977
c0d27fcc 23978
ca81d7a0
JD
23979{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23980echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
23981if test "${ac_cv_type_mbstate_t+set}" = set; then
23982 echo $ECHO_N "(cached) $ECHO_C" >&6
23983else
23984 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23985/* confdefs.h. */
23986_ACEOF
23987cat confdefs.h >>conftest.$ac_ext
23988cat >>conftest.$ac_ext <<_ACEOF
23989/* end confdefs.h. */
973a76b1
DL
23990$ac_includes_default
23991# include <wchar.h>
23992int
23993main ()
23994{
23995mbstate_t x; return sizeof x;
23996 ;
23997 return 0;
23998}
23999_ACEOF
24000rm -f conftest.$ac_objext
ca81d7a0
JD
24001if { (ac_try="$ac_compile"
24002case "(($ac_try" in
24003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24004 *) ac_try_echo=$ac_try;;
24005esac
24006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24007 (eval "$ac_compile") 2>conftest.er1
973a76b1 24008 ac_status=$?
edfaf76d
LK
24009 grep -v '^ *+' conftest.er1 >conftest.err
24010 rm -f conftest.er1
24011 cat conftest.err >&5
973a76b1 24012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
24013 (exit $ac_status); } && {
24014 test -z "$ac_c_werror_flag" ||
24015 test ! -s conftest.err
24016 } && test -s conftest.$ac_objext; then
973a76b1
DL
24017 ac_cv_type_mbstate_t=yes
24018else
24019 echo "$as_me: failed program was:" >&5
19650fd6
AS
24020sed 's/^/| /' conftest.$ac_ext >&5
24021
ca81d7a0 24022 ac_cv_type_mbstate_t=no
973a76b1 24023fi
ca81d7a0
JD
24024
24025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 24026fi
ca81d7a0
JD
24027{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
24028echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
24029 if test $ac_cv_type_mbstate_t = yes; then
24030
24031cat >>confdefs.h <<\_ACEOF
24032#define HAVE_MBSTATE_T 1
24033_ACEOF
24034
24035 else
24036
24037cat >>confdefs.h <<\_ACEOF
24038#define mbstate_t int
24039_ACEOF
24040
24041 fi
24042
ca81d7a0
JD
24043{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
24044echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
24045if test "${emacs_cv_c_restrict+set}" = set; then
24046 echo $ECHO_N "(cached) $ECHO_C" >&6
24047else
24048 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24049/* confdefs.h. */
24050_ACEOF
24051cat confdefs.h >>conftest.$ac_ext
24052cat >>conftest.$ac_ext <<_ACEOF
24053/* end confdefs.h. */
22044edf
DL
24054void fred (int *restrict x);
24055int
24056main ()
24057{
b936fae4 24058
22044edf
DL
24059 ;
24060 return 0;
24061}
c0d27fcc 24062_ACEOF
22044edf 24063rm -f conftest.$ac_objext
ca81d7a0
JD
24064if { (ac_try="$ac_compile"
24065case "(($ac_try" in
24066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24067 *) ac_try_echo=$ac_try;;
24068esac
24069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24070 (eval "$ac_compile") 2>conftest.er1
22044edf 24071 ac_status=$?
edfaf76d
LK
24072 grep -v '^ *+' conftest.er1 >conftest.err
24073 rm -f conftest.er1
24074 cat conftest.err >&5
22044edf 24075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24076 (exit $ac_status); } && {
24077 test -z "$ac_c_werror_flag" ||
24078 test ! -s conftest.err
24079 } && test -s conftest.$ac_objext; then
22044edf
DL
24080 emacs_cv_c_restrict=yes
24081else
24082 echo "$as_me: failed program was:" >&5
19650fd6
AS
24083sed 's/^/| /' conftest.$ac_ext >&5
24084
ca81d7a0 24085 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24086/* confdefs.h. */
24087_ACEOF
24088cat confdefs.h >>conftest.$ac_ext
24089cat >>conftest.$ac_ext <<_ACEOF
24090/* end confdefs.h. */
22044edf
DL
24091void fred (int *__restrict x);
24092int
24093main ()
24094{
c0d27fcc 24095
22044edf
DL
24096 ;
24097 return 0;
24098}
c0d27fcc 24099_ACEOF
22044edf 24100rm -f conftest.$ac_objext
ca81d7a0
JD
24101if { (ac_try="$ac_compile"
24102case "(($ac_try" in
24103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24104 *) ac_try_echo=$ac_try;;
24105esac
24106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24107 (eval "$ac_compile") 2>conftest.er1
22044edf 24108 ac_status=$?
edfaf76d
LK
24109 grep -v '^ *+' conftest.er1 >conftest.err
24110 rm -f conftest.er1
24111 cat conftest.err >&5
22044edf 24112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24113 (exit $ac_status); } && {
24114 test -z "$ac_c_werror_flag" ||
24115 test ! -s conftest.err
24116 } && test -s conftest.$ac_objext; then
22044edf
DL
24117 emacs_cv_c_restrict=__restrict
24118else
24119 echo "$as_me: failed program was:" >&5
19650fd6
AS
24120sed 's/^/| /' conftest.$ac_ext >&5
24121
ca81d7a0 24122 emacs_cv_c_restrict=no
ba4481b5 24123fi
ca81d7a0
JD
24124
24125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24126fi
ca81d7a0
JD
24127
24128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24129fi
ca81d7a0
JD
24130{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
24131echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
24132case "$emacs_cv_c_restrict" in
24133 yes) emacs_restrict=restrict;;
24134 no) emacs_restrict="";;
24135 *) emacs_restrict="$emacs_cv_c_restrict";;
24136esac
24137if test "$emacs_restrict" != __restrict; then
b936fae4 24138
22044edf
DL
24139cat >>confdefs.h <<_ACEOF
24140#define __restrict $emacs_restrict
c0d27fcc 24141_ACEOF
ba4481b5
DL
24142
24143fi
ba4481b5 24144
ca81d7a0
JD
24145{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
24146echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
24147if test "${emacs_cv_c_restrict_arr+set}" = set; then
24148 echo $ECHO_N "(cached) $ECHO_C" >&6
24149else
24150 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24151/* confdefs.h. */
24152_ACEOF
24153cat confdefs.h >>conftest.$ac_ext
24154cat >>conftest.$ac_ext <<_ACEOF
24155/* end confdefs.h. */
22044edf
DL
24156void fred (int x[__restrict]);
24157int
24158main ()
24159{
b936fae4 24160
22044edf
DL
24161 ;
24162 return 0;
24163}
c0d27fcc 24164_ACEOF
22044edf 24165rm -f conftest.$ac_objext
ca81d7a0
JD
24166if { (ac_try="$ac_compile"
24167case "(($ac_try" in
24168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24169 *) ac_try_echo=$ac_try;;
24170esac
24171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24172 (eval "$ac_compile") 2>conftest.er1
22044edf 24173 ac_status=$?
edfaf76d
LK
24174 grep -v '^ *+' conftest.er1 >conftest.err
24175 rm -f conftest.er1
24176 cat conftest.err >&5
22044edf 24177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24178 (exit $ac_status); } && {
24179 test -z "$ac_c_werror_flag" ||
24180 test ! -s conftest.err
24181 } && test -s conftest.$ac_objext; then
22044edf
DL
24182 emacs_cv_c_restrict_arr=yes
24183else
24184 echo "$as_me: failed program was:" >&5
19650fd6
AS
24185sed 's/^/| /' conftest.$ac_ext >&5
24186
ca81d7a0 24187 emacs_cv_c_restrict_arr=no
ba4481b5 24188fi
ca81d7a0
JD
24189
24190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 24191fi
ca81d7a0
JD
24192{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
24193echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 24194if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 24195
c0d27fcc 24196cat >>confdefs.h <<\_ACEOF
22044edf 24197#define __restrict_arr __restrict
c0d27fcc 24198_ACEOF
ba4481b5 24199
ba4481b5
DL
24200fi
24201
c0d27fcc 24202
c0d27fcc 24203
22044edf
DL
24204# Set up the CFLAGS for real compilation, so we can substitute it.
24205CFLAGS="$REAL_CFLAGS"
24206CPPFLAGS="$REAL_CPPFLAGS"
24207
24208#### Find out which version of Emacs this is.
24209version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
24210 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
24211if test x"${version}" = x; then
24212 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
24213echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
24214 { (exit 1); exit 1; }; }
24215fi
24216
24217### Specify what sort of things we'll be editing into Makefile and config.h.
24218### Use configuration here uncanonicalized to avoid exceeding size limits.
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
6a3a24fa 24251
06b62770
AR
24252
24253
24254
48fad8e8
DN
24255
24256
5e159d07
CY
24257
24258
edfda783 24259
22044edf
DL
24260
24261
24262cat >>confdefs.h <<_ACEOF
24263#define EMACS_CONFIGURATION "${canonical}"
24264_ACEOF
24265
24266
24267cat >>confdefs.h <<_ACEOF
24268#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
24269_ACEOF
24270
24271
24272cat >>confdefs.h <<_ACEOF
24273#define config_machfile "${machfile}"
24274_ACEOF
24275
24276
24277cat >>confdefs.h <<_ACEOF
24278#define config_opsysfile "${opsysfile}"
24279_ACEOF
24280
24281
24282cat >>confdefs.h <<_ACEOF
24283#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
24284_ACEOF
24285
24286
24287cat >>confdefs.h <<_ACEOF
24288#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
24289_ACEOF
24290
24291
24292cat >>confdefs.h <<_ACEOF
24293#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
24294_ACEOF
24295
24296
24297cat >>confdefs.h <<_ACEOF
24298#define UNEXEC_SRC ${UNEXEC_SRC}
24299_ACEOF
24300
24301
24302if test "${HAVE_X_WINDOWS}" = "yes" ; then
24303
24304cat >>confdefs.h <<\_ACEOF
24305#define HAVE_X_WINDOWS 1
24306_ACEOF
24307
24308fi
24309if test "${USE_X_TOOLKIT}" != "none" ; then
24310
24311cat >>confdefs.h <<\_ACEOF
24312#define USE_X_TOOLKIT 1
24313_ACEOF
24314
39dd4d52 24315 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5
SM
24316
24317cat >>confdefs.h <<\_ACEOF
24318#define USE_LUCID 1
24319_ACEOF
24320
39dd4d52 24321 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5
SM
24322
24323cat >>confdefs.h <<\_ACEOF
24324#define USE_MOTIF 1
24325_ACEOF
24326
24327 fi
22044edf
DL
24328fi
24329if test "${HAVE_X11}" = "yes" ; then
24330
24331cat >>confdefs.h <<\_ACEOF
24332#define HAVE_X11 1
24333_ACEOF
24334
22044edf
DL
24335fi
24336if test "${HAVE_MENUS}" = "yes" ; then
24337
24338cat >>confdefs.h <<\_ACEOF
24339#define HAVE_MENUS 1
24340_ACEOF
24341
24342fi
24343if test "${GNU_MALLOC}" = "yes" ; then
24344
24345cat >>confdefs.h <<\_ACEOF
24346#define GNU_MALLOC 1
24347_ACEOF
24348
24349fi
24350if test "${REL_ALLOC}" = "yes" ; then
24351
24352cat >>confdefs.h <<\_ACEOF
24353#define REL_ALLOC 1
24354_ACEOF
24355
24356fi
24357
24358
24359
c0d27fcc
MR
24360
24361
5afbeb22 24362
ba4481b5 24363#### Report on what we decided to do.
488dd4c4
JD
24364#### Report GTK as a toolkit, even if it doesn't use Xt.
24365#### It makes printing result more understandable as using GTK sets
24366#### toolkit_scroll_bars to yes by default.
24367if test "${HAVE_GTK}" = "yes"; then
24368 USE_X_TOOLKIT=GTK
24369fi
24370
ba4481b5
DL
24371echo "
24372Configured for \`${canonical}'.
24373
24374 Where should the build process find the source code? ${srcdir}
24375 What operating system and machine description files should Emacs use?
24376 \`${opsysfile}' and \`${machfile}'
24377 What compiler should emacs be built with? ${CC} ${CFLAGS}
24378 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 24379 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 24380 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 24381 What window system should Emacs use? ${window_system}
8e967cf7 24382 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
24383
24384if test -n "${x_includes}"; then
24385echo " Where do we find X Windows header files? ${x_includes}"
24386else
24387echo " Where do we find X Windows header files? Standard dirs"
24388fi
24389if test -n "${x_libraries}"; then
24390echo " Where do we find X Windows libraries? ${x_libraries}"
24391else
24392echo " Where do we find X Windows libraries? Standard dirs"
24393fi
24394
24395echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
24396echo " Does Emacs use -lXpm? ${HAVE_XPM}"
24397echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
24398echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 24399echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 24400echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 24401echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 24402echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 24403echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
2ee27f27 24404
edfda783
AR
24405echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
24406echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
24407echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
24408echo " Does Emacs use -lxft? ${HAVE_XFT}"
24409
8d87199b 24410echo " Does Emacs use toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
ba4481b5
DL
24411echo
24412
d0098f13
JD
24413if test $USE_XASSERTS = yes; then
24414 echo " Compiling with asserts turned on."
d0098f13 24415 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 24416fi
05cf15c6 24417
ca34d75a
JD
24418echo
24419
a2d3b5bd
JD
24420if test "$USE_X_TOOLKIT" = GTK; then
24421 case "$canonical" in
24422 *cygwin*)
24423 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
24424 will probably get a crash on startup. If this happens, please use another
24425 toolkit for Emacs. See etc/PROBLEMS for more information."
24426 ;;
24427 esac
24428fi
24429
06b62770
AR
24430if test "$HAVE_NS" = "yes"; then
24431 echo
24432 echo "You must run \"make install\" in order to test the built application.
24433The installed application will go to nextstep/Emacs.app and can be
24434run or moved from there."
24435 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
24436 echo "The application will be fully self-contained."
24437 else
24438 echo "The lisp resources for the application will be installed under ${prefix}.
24439You may need to run \"make install\" with sudo. The application will fail
24440to run if these resources are not installed."
24441 fi
24442 echo
24443fi
24444
131e4133
MA
24445if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
24446 echo "D-Bus integration has been tested for GNU/Linux only."
24447 echo
24448fi
24449
05cf15c6 24450
ba4481b5
DL
24451# Remove any trailing slashes in these variables.
24452test "${prefix}" != NONE &&
24453 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
24454test "${exec_prefix}" != NONE &&
24455 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
24456
8acdcf6f
GM
24457# Now get this: Some word that is part of the ${srcdir} directory name
24458# or the ${configuration} value might, just might, happen to be an
24459# identifier like `sun4' or `i386' or something, and be predefined by
24460# the C preprocessor to some helpful value like 1, or maybe the empty
24461# string. Needless to say consequent macro substitutions are less
24462# than conducive to the makefile finding the correct directory.
24463cpp_undefs="`echo $srcdir $configuration $canonical |
24464 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24465 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"
24466
d0e9bfd2
GM
24467## Check if the C preprocessor will convert `..' to `. .'. If so, set
24468## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
24469## from Makefile.c can correctly provide the arg `-traditional' to the
24470## C preprocessor.
24471
503d2be0 24472cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24473/* confdefs.h. */
24474_ACEOF
24475cat confdefs.h >>conftest.$ac_ext
24476cat >>conftest.$ac_ext <<_ACEOF
24477/* end confdefs.h. */
d0e9bfd2 24478yes..yes
503d2be0 24479_ACEOF
d0e9bfd2 24480if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 24481 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
24482 CPP_NEED_TRADITIONAL=no
24483else
d0e9bfd2
GM
24484 CPP_NEED_TRADITIONAL=yes
24485fi
24486rm -f conftest*
24487
c0d27fcc 24488
f657c21b 24489ac_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
24490
24491ac_config_commands="$ac_config_commands default"
24492
503d2be0 24493cat >confcache <<\_ACEOF
ba4481b5
DL
24494# This file is a shell script that caches the results of configure
24495# tests run on this system so they can be shared between configure
503d2be0
AS
24496# scripts and configure runs, see configure's option --config-cache.
24497# It is not useful on other systems. If it contains results you don't
24498# want to keep, you may remove or edit it.
ba4481b5 24499#
503d2be0
AS
24500# config.status only pays attention to the cache file if you give it
24501# the --recheck option to rerun configure.
ba4481b5 24502#
6bae0ccf 24503# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
24504# loading this file, other *unset* `ac_cv_foo' will be assigned the
24505# following values.
24506
24507_ACEOF
24508
ba4481b5
DL
24509# The following way of writing the cache mishandles newlines in values,
24510# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 24511# So, we kill variables containing newlines.
ba4481b5
DL
24512# Ultrix sh set writes to stderr and can't be redirected directly,
24513# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
24514(
24515 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24516 eval ac_val=\$$ac_var
24517 case $ac_val in #(
24518 *${as_nl}*)
24519 case $ac_var in #(
24520 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24521echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24522 esac
24523 case $ac_var in #(
24524 _ | IFS | as_nl) ;; #(
24525 *) $as_unset $ac_var ;;
24526 esac ;;
24527 esac
24528 done
24529
503d2be0 24530 (set) 2>&1 |
ca81d7a0
JD
24531 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24532 *${as_nl}ac_space=\ *)
503d2be0
AS
24533 # `set' does not quote correctly, so add quotes (double-quote
24534 # substitution turns \\\\ into \\, and sed turns \\ into \).
24535 sed -n \
edfaf76d
LK
24536 "s/'/'\\\\''/g;
24537 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 24538 ;; #(
503d2be0
AS
24539 *)
24540 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 24541 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 24542 ;;
ca81d7a0
JD
24543 esac |
24544 sort
24545) |
503d2be0 24546 sed '
ca81d7a0 24547 /^ac_cv_env_/b end
503d2be0 24548 t clear
ca81d7a0 24549 :clear
503d2be0
AS
24550 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24551 t end
ca81d7a0
JD
24552 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24553 :end' >>confcache
24554if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24555 if test -w "$cache_file"; then
24556 test "x$cache_file" != "x/dev/null" &&
24557 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24558echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 24559 cat confcache >$cache_file
ba4481b5 24560 else
ca81d7a0
JD
24561 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24562echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
24563 fi
24564fi
24565rm -f confcache
24566
ba4481b5
DL
24567test "x$prefix" = xNONE && prefix=$ac_default_prefix
24568# Let make expand exec_prefix.
24569test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24570
ba4481b5
DL
24571DEFS=-DHAVE_CONFIG_H
24572
6bae0ccf
DL
24573ac_libobjs=
24574ac_ltlibobjs=
24575for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24576 # 1. Remove the extension, and $U if already installed.
ca81d7a0
JD
24577 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24578 ac_i=`echo "$ac_i" | sed "$ac_script"`
24579 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24580 # will be set to the directory where LIBOBJS objects are built.
24581 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24582 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
24583done
24584LIBOBJS=$ac_libobjs
24585
24586LTLIBOBJS=$ac_ltlibobjs
24587
24588
c0d27fcc 24589
ba4481b5 24590: ${CONFIG_STATUS=./config.status}
503d2be0
AS
24591ac_clean_files_save=$ac_clean_files
24592ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 24593{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
24594echo "$as_me: creating $CONFIG_STATUS" >&6;}
24595cat >$CONFIG_STATUS <<_ACEOF
24596#! $SHELL
c0d27fcc 24597# Generated by $as_me.
ba4481b5 24598# Run this file to recreate the current configuration.
ba4481b5 24599# Compiler output produced by configure, useful for debugging
503d2be0 24600# configure, is in config.log if it exists.
ba4481b5 24601
503d2be0 24602debug=false
19650fd6
AS
24603ac_cs_recheck=false
24604ac_cs_silent=false
503d2be0 24605SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
24606_ACEOF
24607
24608cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
24609## --------------------- ##
24610## M4sh Initialization. ##
24611## --------------------- ##
24612
f053c89f
CY
24613# Be more Bourne compatible
24614DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
24615if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24616 emulate sh
24617 NULLCMD=:
6bae0ccf
DL
24618 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24619 # is contrary to our usage. Disable this feature.
24620 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
24621 setopt NO_GLOB_SUBST
24622else
f053c89f
CY
24623 case `(set -o) 2>/dev/null` in
24624 *posix*) set -o posix ;;
24625esac
24626
503d2be0 24627fi
f053c89f
CY
24628
24629
503d2be0 24630
ca81d7a0
JD
24631
24632# PATH needs CR
24633# Avoid depending upon Character Ranges.
24634as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24635as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24636as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24637as_cr_digits='0123456789'
24638as_cr_alnum=$as_cr_Letters$as_cr_digits
24639
24640# The user is always right.
24641if test "${PATH_SEPARATOR+set}" != set; then
24642 echo "#! /bin/sh" >conf$$.sh
24643 echo "exit 0" >>conf$$.sh
24644 chmod +x conf$$.sh
24645 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24646 PATH_SEPARATOR=';'
24647 else
24648 PATH_SEPARATOR=:
24649 fi
24650 rm -f conf$$.sh
503d2be0
AS
24651fi
24652
c0d27fcc 24653# Support unset when possible.
edfaf76d 24654if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
24655 as_unset=unset
24656else
24657 as_unset=false
24658fi
24659
6bae0ccf 24660
ca81d7a0
JD
24661# IFS
24662# We need space, tab and new line, in precisely that order. Quoting is
24663# there to prevent editors from complaining about space-tab.
24664# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24665# splitting by setting IFS to empty value.)
24666as_nl='
24667'
24668IFS=" "" $as_nl"
24669
24670# Find who we are. Look in the path if we contain no directory separator.
24671case $0 in
24672 *[\\/]* ) as_myself=$0 ;;
24673 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24674for as_dir in $PATH
24675do
24676 IFS=$as_save_IFS
24677 test -z "$as_dir" && as_dir=.
24678 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24679done
24680IFS=$as_save_IFS
24681
24682 ;;
24683esac
24684# We did not find ourselves, most probably we were run as `sh COMMAND'
24685# in which case we are not to be found in the path.
24686if test "x$as_myself" = x; then
24687 as_myself=$0
24688fi
24689if test ! -f "$as_myself"; then
24690 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24691 { (exit 1); exit 1; }
24692fi
24693
6bae0ccf 24694# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
24695for as_var in ENV MAIL MAILPATH
24696do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24697done
6bae0ccf
DL
24698PS1='$ '
24699PS2='> '
24700PS4='+ '
24701
24702# NLS nuisances.
19650fd6
AS
24703for as_var in \
24704 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24705 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24706 LC_TELEPHONE LC_TIME
6bae0ccf 24707do
edfaf76d 24708 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
24709 eval $as_var=C; export $as_var
24710 else
ca81d7a0 24711 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
24712 fi
24713done
24714
24715# Required to use basename.
ca81d7a0
JD
24716if expr a : '\(a\)' >/dev/null 2>&1 &&
24717 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
24718 as_expr=expr
24719else
24720 as_expr=false
24721fi
24722
ca81d7a0 24723if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
24724 as_basename=basename
24725else
24726 as_basename=false
24727fi
c0d27fcc
MR
24728
24729
503d2be0 24730# Name of the executable.
ca81d7a0 24731as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
24732$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24733 X"$0" : 'X\(//\)$' \| \
ca81d7a0 24734 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 24735echo X/"$0" |
ca81d7a0
JD
24736 sed '/^.*\/\([^/][^/]*\)\/*$/{
24737 s//\1/
24738 q
24739 }
24740 /^X\/\(\/\/\)$/{
24741 s//\1/
24742 q
24743 }
24744 /^X\/\(\/\).*/{
24745 s//\1/
24746 q
24747 }
24748 s/.*/./; q'`
c0d27fcc 24749
ca81d7a0
JD
24750# CDPATH.
24751$as_unset CDPATH
c0d27fcc
MR
24752
24753
c0d27fcc 24754
c0d27fcc 24755 as_lineno_1=$LINENO
c0d27fcc 24756 as_lineno_2=$LINENO
c0d27fcc 24757 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 24758 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
24759
24760 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24761 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
24762 # line-number line after each line using $LINENO; the second 'sed'
24763 # does the real work. The second script uses 'N' to pair each
24764 # line-number line with the line containing $LINENO, and appends
24765 # trailing '-' during substitution so that $LINENO is not a special
24766 # case at line end.
c0d27fcc 24767 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
24768 # scripts with optimization help from Paolo Bonzini. Blame Lee
24769 # E. McMahon (1931-1989) for sed's syntax. :-)
24770 sed -n '
24771 p
24772 /[$]LINENO/=
24773 ' <$as_myself |
c0d27fcc 24774 sed '
ca81d7a0
JD
24775 s/[$]LINENO.*/&-/
24776 t lineno
24777 b
24778 :lineno
c0d27fcc 24779 N
ca81d7a0
JD
24780 :loop
24781 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 24782 t loop
ca81d7a0 24783 s/-\n.*//
c0d27fcc 24784 ' >$as_me.lineno &&
ca81d7a0
JD
24785 chmod +x "$as_me.lineno" ||
24786 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
24787 { (exit 1); exit 1; }; }
24788
24789 # Don't try to exec as it changes $[0], causing all sort of problems
24790 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
24791 # original and so on. Autoconf is especially sensitive to this).
24792 . "./$as_me.lineno"
c0d27fcc
MR
24793 # Exit status is that of the last command.
24794 exit
24795}
24796
24797
ca81d7a0
JD
24798if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24799 as_dirname=dirname
24800else
24801 as_dirname=false
24802fi
24803
24804ECHO_C= ECHO_N= ECHO_T=
24805case `echo -n x` in
24806-n*)
24807 case `echo 'x\c'` in
24808 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24809 *) ECHO_C='\c';;
24810 esac;;
24811*)
24812 ECHO_N='-n';;
c0d27fcc 24813esac
503d2be0 24814
ca81d7a0
JD
24815if expr a : '\(a\)' >/dev/null 2>&1 &&
24816 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
24817 as_expr=expr
24818else
24819 as_expr=false
24820fi
24821
24822rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
24823if test -d conf$$.dir; then
24824 rm -f conf$$.dir/conf$$.file
24825else
24826 rm -f conf$$.dir
24827 mkdir conf$$.dir
24828fi
503d2be0
AS
24829echo >conf$$.file
24830if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
24831 as_ln_s='ln -s'
24832 # ... but there are two gotchas:
24833 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24834 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24835 # In both cases, we have to default to `cp -p'.
24836 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 24837 as_ln_s='cp -p'
503d2be0
AS
24838elif ln conf$$.file conf$$ 2>/dev/null; then
24839 as_ln_s=ln
24840else
24841 as_ln_s='cp -p'
24842fi
ca81d7a0
JD
24843rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24844rmdir conf$$.dir 2>/dev/null
503d2be0 24845
6bae0ccf
DL
24846if mkdir -p . 2>/dev/null; then
24847 as_mkdir_p=:
24848else
edfaf76d 24849 test -d ./-p && rmdir ./-p
6bae0ccf
DL
24850 as_mkdir_p=false
24851fi
24852
f053c89f
CY
24853if test -x / >/dev/null 2>&1; then
24854 as_test_x='test -x'
ca81d7a0 24855else
f053c89f
CY
24856 if ls -dL / >/dev/null 2>&1; then
24857 as_ls_L_option=L
24858 else
24859 as_ls_L_option=
24860 fi
24861 as_test_x='
24862 eval sh -c '\''
24863 if test -d "$1"; then
24864 test -d "$1/.";
24865 else
24866 case $1 in
24867 -*)set "./$1";;
24868 esac;
24869 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24870 ???[sx]*):;;*)false;;esac;fi
24871 '\'' sh
24872 '
ca81d7a0 24873fi
f053c89f 24874as_executable_p=$as_test_x
503d2be0 24875
c0d27fcc 24876# Sed expression to map a string onto a valid CPP name.
edfaf76d 24877as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
24878
24879# Sed expression to map a string onto a valid variable name.
edfaf76d 24880as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 24881
503d2be0 24882
503d2be0
AS
24883exec 6>&1
24884
ca81d7a0 24885# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 24886# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
24887# values after options handling.
24888ac_log="
5d374ce1 24889This file was extended by emacs $as_me 23.0.60, which was
f053c89f 24890generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
24891
24892 CONFIG_FILES = $CONFIG_FILES
24893 CONFIG_HEADERS = $CONFIG_HEADERS
24894 CONFIG_LINKS = $CONFIG_LINKS
24895 CONFIG_COMMANDS = $CONFIG_COMMANDS
24896 $ $0 $@
24897
ca81d7a0
JD
24898on `(hostname || uname -n) 2>/dev/null | sed 1q`
24899"
24900
503d2be0
AS
24901_ACEOF
24902
ca81d7a0 24903cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24904# Files that config.status was made for.
ca81d7a0
JD
24905config_files="$ac_config_files"
24906config_headers="$ac_config_headers"
24907config_commands="$ac_config_commands"
503d2be0 24908
ca81d7a0 24909_ACEOF
503d2be0 24910
c0d27fcc 24911cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24912ac_cs_usage="\
24913\`$as_me' instantiates files from templates according to the
24914current configuration.
24915
24916Usage: $0 [OPTIONS] [FILE]...
24917
24918 -h, --help print this help, then exit
f053c89f 24919 -V, --version print version number and configuration settings, then exit
19650fd6 24920 -q, --quiet do not print progress messages
503d2be0
AS
24921 -d, --debug don't remove temporary files
24922 --recheck update $as_me by reconfiguring in the same conditions
24923 --file=FILE[:TEMPLATE]
edfaf76d 24924 instantiate the configuration file FILE
503d2be0 24925 --header=FILE[:TEMPLATE]
edfaf76d 24926 instantiate the configuration header FILE
503d2be0
AS
24927
24928Configuration files:
24929$config_files
24930
24931Configuration headers:
24932$config_headers
24933
24934Configuration commands:
24935$config_commands
24936
24937Report bugs to <bug-autoconf@gnu.org>."
503d2be0 24938
ca81d7a0 24939_ACEOF
c0d27fcc 24940cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24941ac_cs_version="\\
5d374ce1 24942emacs config.status 23.0.60
f053c89f 24943configured by $0, generated by GNU Autoconf 2.61,
ca81d7a0 24944 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24945
ca81d7a0 24946Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24947This config.status script is free software; the Free Software Foundation
24948gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
24949
24950ac_pwd='$ac_pwd'
24951srcdir='$srcdir'
24952INSTALL='$INSTALL'
c0d27fcc 24953_ACEOF
503d2be0 24954
c0d27fcc 24955cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24956# If no file are specified by the user, then we need to provide default
24957# value. By we need to know if files were specified by the user.
24958ac_need_defaults=:
24959while test $# != 0
ba4481b5 24960do
503d2be0
AS
24961 case $1 in
24962 --*=*)
ca81d7a0
JD
24963 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24964 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24965 ac_shift=:
24966 ;;
ca81d7a0 24967 *)
6bae0ccf
DL
24968 ac_option=$1
24969 ac_optarg=$2
24970 ac_shift=shift
503d2be0 24971 ;;
503d2be0
AS
24972 esac
24973
6bae0ccf 24974 case $ac_option in
503d2be0 24975 # Handling of the options.
19650fd6
AS
24976 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24977 ac_cs_recheck=: ;;
ca81d7a0
JD
24978 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24979 echo "$ac_cs_version"; exit ;;
24980 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24981 debug=: ;;
24982 --file | --fil | --fi | --f )
6bae0ccf
DL
24983 $ac_shift
24984 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24985 ac_need_defaults=false;;
24986 --header | --heade | --head | --hea )
6bae0ccf
DL
24987 $ac_shift
24988 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24989 ac_need_defaults=false;;
ca81d7a0
JD
24990 --he | --h)
24991 # Conflict between --help and --header
24992 { echo "$as_me: error: ambiguous option: $1
24993Try \`$0 --help' for more information." >&2
24994 { (exit 1); exit 1; }; };;
24995 --help | --hel | -h )
24996 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
24997 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24998 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24999 ac_cs_silent=: ;;
503d2be0
AS
25000
25001 # This is an error.
ca81d7a0
JD
25002 -*) { echo "$as_me: error: unrecognized option: $1
25003Try \`$0 --help' for more information." >&2
503d2be0
AS
25004 { (exit 1); exit 1; }; } ;;
25005
ca81d7a0
JD
25006 *) ac_config_targets="$ac_config_targets $1"
25007 ac_need_defaults=false ;;
503d2be0 25008
ba4481b5 25009 esac
503d2be0 25010 shift
ba4481b5
DL
25011done
25012
19650fd6
AS
25013ac_configure_extra_args=
25014
25015if $ac_cs_silent; then
25016 exec 6>/dev/null
25017 ac_configure_extra_args="$ac_configure_extra_args --silent"
25018fi
25019
25020_ACEOF
25021cat >>$CONFIG_STATUS <<_ACEOF
25022if \$ac_cs_recheck; then
ca81d7a0
JD
25023 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
25024 CONFIG_SHELL=$SHELL
25025 export CONFIG_SHELL
25026 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
25027fi
25028
503d2be0 25029_ACEOF
ca81d7a0
JD
25030cat >>$CONFIG_STATUS <<\_ACEOF
25031exec 5>>config.log
25032{
25033 echo
25034 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25035## Running $as_me. ##
25036_ASBOX
25037 echo "$ac_log"
25038} >&5
ba4481b5 25039
ca81d7a0 25040_ACEOF
c0d27fcc 25041cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 25042#
ca81d7a0 25043# INIT-COMMANDS
503d2be0 25044#
8acdcf6f 25045GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS" cpp_undefs="$cpp_undefs"
503d2be0 25046
c0d27fcc
MR
25047_ACEOF
25048
c0d27fcc 25049cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25050
25051# Handling of arguments.
503d2be0
AS
25052for ac_config_target in $ac_config_targets
25053do
ca81d7a0
JD
25054 case $ac_config_target in
25055 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
25056 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25057 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
25058 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
25059 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
25060 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
25061 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
25062 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
ca81d7a0 25063 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 25064 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 25065 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
25066 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
25067 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25068
c0d27fcc 25069 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
25070echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25071 { (exit 1); exit 1; }; };;
25072 esac
ba4481b5 25073done
503d2be0 25074
ca81d7a0 25075
503d2be0
AS
25076# If the user did not use the arguments to specify the items to instantiate,
25077# then the envvar interface is used. Set only those that are not.
25078# We use the long form for the default assignment because of an extremely
25079# bizarre bug on SunOS 4.1.3.
25080if $ac_need_defaults; then
25081 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25082 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25083 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 25084fi
503d2be0 25085
19650fd6 25086# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 25087# simply because there is no reason against having it here, and in addition,
19650fd6 25088# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
25089# Hook for its removal unless debugging.
25090# Note that there is a small window in which the directory will not be cleaned:
25091# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
25092$debug ||
25093{
ca81d7a0
JD
25094 tmp=
25095 trap 'exit_status=$?
25096 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25097' 0
503d2be0
AS
25098 trap '{ (exit 1); exit 1; }' 1 2 13 15
25099}
503d2be0 25100# Create a (secure) tmp directory for tmp files.
19650fd6 25101
503d2be0 25102{
ca81d7a0 25103 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
25104 test -n "$tmp" && test -d "$tmp"
25105} ||
25106{
ca81d7a0
JD
25107 tmp=./conf$$-$RANDOM
25108 (umask 077 && mkdir "$tmp")
503d2be0
AS
25109} ||
25110{
19650fd6 25111 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
25112 { (exit 1); exit 1; }
25113}
25114
503d2be0 25115#
ca81d7a0 25116# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
25117#
25118
25119# No need to generate the scripts if there are no CONFIG_FILES.
25120# This happens for instance when ./config.status config.h
ca81d7a0
JD
25121if test -n "$CONFIG_FILES"; then
25122
25123_ACEOF
25124
25125
25126
25127ac_delim='%!_!# '
25128for ac_last_try in false false false false false :; do
25129 cat >conf$$subs.sed <<_ACEOF
25130SHELL!$SHELL$ac_delim
25131PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25132PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25133PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25134PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25135PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25136PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25137exec_prefix!$exec_prefix$ac_delim
25138prefix!$prefix$ac_delim
25139program_transform_name!$program_transform_name$ac_delim
25140bindir!$bindir$ac_delim
25141sbindir!$sbindir$ac_delim
25142libexecdir!$libexecdir$ac_delim
25143datarootdir!$datarootdir$ac_delim
25144datadir!$datadir$ac_delim
25145sysconfdir!$sysconfdir$ac_delim
25146sharedstatedir!$sharedstatedir$ac_delim
25147localstatedir!$localstatedir$ac_delim
25148includedir!$includedir$ac_delim
25149oldincludedir!$oldincludedir$ac_delim
25150docdir!$docdir$ac_delim
25151infodir!$infodir$ac_delim
25152htmldir!$htmldir$ac_delim
25153dvidir!$dvidir$ac_delim
25154pdfdir!$pdfdir$ac_delim
25155psdir!$psdir$ac_delim
25156libdir!$libdir$ac_delim
25157localedir!$localedir$ac_delim
25158mandir!$mandir$ac_delim
25159DEFS!$DEFS$ac_delim
25160ECHO_C!$ECHO_C$ac_delim
25161ECHO_N!$ECHO_N$ac_delim
25162ECHO_T!$ECHO_T$ac_delim
25163LIBS!$LIBS$ac_delim
25164build_alias!$build_alias$ac_delim
25165host_alias!$host_alias$ac_delim
25166target_alias!$target_alias$ac_delim
25167MAINT!$MAINT$ac_delim
25168build!$build$ac_delim
25169build_cpu!$build_cpu$ac_delim
25170build_vendor!$build_vendor$ac_delim
25171build_os!$build_os$ac_delim
25172host!$host$ac_delim
25173host_cpu!$host_cpu$ac_delim
25174host_vendor!$host_vendor$ac_delim
25175host_os!$host_os$ac_delim
25176CC!$CC$ac_delim
25177CFLAGS!$CFLAGS$ac_delim
25178LDFLAGS!$LDFLAGS$ac_delim
25179CPPFLAGS!$CPPFLAGS$ac_delim
25180ac_ct_CC!$ac_ct_CC$ac_delim
25181EXEEXT!$EXEEXT$ac_delim
25182OBJEXT!$OBJEXT$ac_delim
25183CPP!$CPP$ac_delim
25184GREP!$GREP$ac_delim
25185EGREP!$EGREP$ac_delim
25186LN_S!$LN_S$ac_delim
25187INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25188INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25189INSTALL_DATA!$INSTALL_DATA$ac_delim
25190RANLIB!$RANLIB$ac_delim
25191INSTALL_INFO!$INSTALL_INFO$ac_delim
25192GZIP_PROG!$GZIP_PROG$ac_delim
1bb9a689 25193MAKEINFO!$MAKEINFO$ac_delim
ca81d7a0
JD
25194LIBSOUND!$LIBSOUND$ac_delim
25195PKG_CONFIG!$PKG_CONFIG$ac_delim
25196ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
25197ALSA_LIBS!$ALSA_LIBS$ac_delim
25198CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
25199SET_MAKE!$SET_MAKE$ac_delim
25200XMKMF!$XMKMF$ac_delim
cfe440b8 25201HAVE_XSERVER!$HAVE_XSERVER$ac_delim
0cfc0546
GM
25202RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
25203RSVG_LIBS!$RSVG_LIBS$ac_delim
ca81d7a0
JD
25204GTK_CFLAGS!$GTK_CFLAGS$ac_delim
25205GTK_LIBS!$GTK_LIBS$ac_delim
131e4133
MA
25206DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
25207DBUS_LIBS!$DBUS_LIBS$ac_delim
44e5501c
GM
25208FONTCONFIG_CFLAGS!$FONTCONFIG_CFLAGS$ac_delim
25209FONTCONFIG_LIBS!$FONTCONFIG_LIBS$ac_delim
c24fa7dc
MB
25210XFT_CFLAGS!$XFT_CFLAGS$ac_delim
25211XFT_LIBS!$XFT_LIBS$ac_delim
25212FREETYPE_CFLAGS!$FREETYPE_CFLAGS$ac_delim
25213FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim
c24fa7dc
MB
25214LIBOTF_CFLAGS!$LIBOTF_CFLAGS$ac_delim
25215LIBOTF_LIBS!$LIBOTF_LIBS$ac_delim
7f0942ba
KH
25216M17N_FLT_CFLAGS!$M17N_FLT_CFLAGS$ac_delim
25217M17N_FLT_LIBS!$M17N_FLT_LIBS$ac_delim
ca81d7a0
JD
25218ALLOCA!$ALLOCA$ac_delim
25219liblockfile!$liblockfile$ac_delim
25220LIBOBJS!$LIBOBJS$ac_delim
25221NEED_SETGID!$NEED_SETGID$ac_delim
25222KMEM_GROUP!$KMEM_GROUP$ac_delim
25223GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
25224GETOPT_H!$GETOPT_H$ac_delim
25225GETOPTOBJS!$GETOPTOBJS$ac_delim
e70b2110 25226version!$version$ac_delim
ca81d7a0
JD
25227_ACEOF
25228
25229 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25230 break
25231 elif $ac_last_try; then
25232 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25233echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25234 { (exit 1); exit 1; }; }
25235 else
25236 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8eeae1c9 25237 fi
ca81d7a0
JD
25238done
25239
25240ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25241if test -n "$ac_eof"; then
25242 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25243 ac_eof=`expr $ac_eof + 1`
25244fi
503d2be0 25245
c0d27fcc 25246cat >>$CONFIG_STATUS <<_ACEOF
ca81d7a0
JD
25247cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25248/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25249_ACEOF
25250sed '
25251s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25252s/^/s,@/; s/!/@,|#_!!_#|/
25253:n
25254t n
25255s/'"$ac_delim"'$/,g/; t
25256s/$/\\/; p
25257N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25258' >>$CONFIG_STATUS <conf$$subs.sed
25259rm -f conf$$subs.sed
25260cat >>$CONFIG_STATUS <<_ACEOF
25261CEOF$ac_eof
25262_ACEOF
503d2be0 25263
ca81d7a0
JD
25264
25265ac_delim='%!_!# '
25266for ac_last_try in false false false false false :; do
25267 cat >conf$$subs.sed <<_ACEOF
0bd50841 25268configuration!$configuration$ac_delim
7f0942ba
KH
25269canonical!$canonical$ac_delim
25270srcdir!$srcdir$ac_delim
1bb9a689
MB
25271lispdir!$lispdir$ac_delim
25272locallisppath!$locallisppath$ac_delim
25273lisppath!$lisppath$ac_delim
9bdeb5e9
MB
25274x_default_search_path!$x_default_search_path$ac_delim
25275etcdir!$etcdir$ac_delim
25276archlibdir!$archlibdir$ac_delim
25277bitmapdir!$bitmapdir$ac_delim
25278gamedir!$gamedir$ac_delim
25279gameuser!$gameuser$ac_delim
25280c_switch_system!$c_switch_system$ac_delim
c24fa7dc
MB
25281c_switch_machine!$c_switch_machine$ac_delim
25282LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
25283LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
ca81d7a0
JD
25284C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
25285X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
25286machfile!$machfile$ac_delim
25287opsysfile!$opsysfile$ac_delim
edfda783 25288ns_appdir!$ns_appdir$ac_delim
06b62770
AR
25289ns_appbindir!$ns_appbindir$ac_delim
25290ns_appresdir!$ns_appresdir$ac_delim
25291ns_appsrc!$ns_appsrc$ac_delim
facfbbbd 25292GNUSTEP_MAKEFILES!$GNUSTEP_MAKEFILES$ac_delim
5e159d07
CY
25293GNUSTEP_SYSTEM_HEADERS!$GNUSTEP_SYSTEM_HEADERS$ac_delim
25294GNUSTEP_SYSTEM_LIBRARIES!$GNUSTEP_SYSTEM_LIBRARIES$ac_delim
48fad8e8
DN
25295GNU_OBJC_CFLAGS!$GNU_OBJC_CFLAGS$ac_delim
25296LIB_SRC_EXTRA_INSTALLABLES!$LIB_SRC_EXTRA_INSTALLABLES$ac_delim
ca81d7a0
JD
25297LTLIBOBJS!$LTLIBOBJS$ac_delim
25298_ACEOF
503d2be0 25299
5e159d07 25300 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 30; then
c24fa7dc
MB
25301 break
25302 elif $ac_last_try; then
25303 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25304echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25305 { (exit 1); exit 1; }; }
25306 else
25307 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 25308 fi
ca81d7a0
JD
25309done
25310
25311ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25312if test -n "$ac_eof"; then
25313 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25314 ac_eof=`expr $ac_eof + 1`
25315fi
ba4481b5 25316
ca81d7a0
JD
25317cat >>$CONFIG_STATUS <<_ACEOF
25318cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25319/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25320_ACEOF
25321sed '
25322s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25323s/^/s,@/; s/!/@,|#_!!_#|/
25324:n
25325t n
25326s/'"$ac_delim"'$/,g/; t
25327s/$/\\/; p
25328N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25329' >>$CONFIG_STATUS <conf$$subs.sed
25330rm -f conf$$subs.sed
25331cat >>$CONFIG_STATUS <<_ACEOF
25332:end
25333s/|#_!!_#|//g
25334CEOF$ac_eof
c0d27fcc 25335_ACEOF
ca81d7a0
JD
25336
25337
25338# VPATH may cause trouble with some makes, so we remove $(srcdir),
25339# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25340# trailing colons and then remove the whole line if VPATH becomes empty
25341# (actually we leave an empty line to preserve line numbers).
25342if test "x$srcdir" = x.; then
25343 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25344s/:*\$(srcdir):*/:/
25345s/:*\${srcdir}:*/:/
25346s/:*@srcdir@:*/:/
25347s/^\([^=]*=[ ]*\):*/\1/
25348s/:*$//
25349s/^[^=]*=[ ]*$//
25350}'
25351fi
25352
c0d27fcc 25353cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25354fi # test -n "$CONFIG_FILES"
25355
25356
25357for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
25358do
25359 case $ac_tag in
25360 :[FHLC]) ac_mode=$ac_tag; continue;;
25361 esac
25362 case $ac_mode$ac_tag in
25363 :[FHL]*:*);;
25364 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25365echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25366 { (exit 1); exit 1; }; };;
25367 :[FH]-) ac_tag=-:-;;
25368 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25369 esac
25370 ac_save_IFS=$IFS
25371 IFS=:
25372 set x $ac_tag
25373 IFS=$ac_save_IFS
25374 shift
25375 ac_file=$1
25376 shift
25377
25378 case $ac_mode in
25379 :L) ac_source=$1;;
25380 :[FH])
25381 ac_file_inputs=
25382 for ac_f
25383 do
25384 case $ac_f in
25385 -) ac_f="$tmp/stdin";;
25386 *) # Look for the file first in the build tree, then in the source tree
25387 # (if the path is not absolute). The absolute path cannot be DOS-style,
25388 # because $ac_f cannot contain `:'.
25389 test -f "$ac_f" ||
25390 case $ac_f in
25391 [\\/$]*) false;;
25392 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25393 esac ||
25394 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25395echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25396 { (exit 1); exit 1; }; };;
25397 esac
25398 ac_file_inputs="$ac_file_inputs $ac_f"
25399 done
25400
25401 # Let's still pretend it is `configure' which instantiates (i.e., don't
25402 # use $as_me), people would be surprised to read:
25403 # /* config.h. Generated by config.status. */
25404 configure_input="Generated from "`IFS=:
25405 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25406 if test x"$ac_file" != x-; then
25407 configure_input="$ac_file. $configure_input"
25408 { echo "$as_me:$LINENO: creating $ac_file" >&5
25409echo "$as_me: creating $ac_file" >&6;}
25410 fi
25411
25412 case $ac_tag in
25413 *:-:* | *:-) cat >"$tmp/stdin";;
25414 esac
25415 ;;
ba4481b5
DL
25416 esac
25417
ca81d7a0 25418 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 25419$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25420 X"$ac_file" : 'X\(//\)[^/]' \| \
25421 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 25422 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 25423echo X"$ac_file" |
ca81d7a0
JD
25424 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25425 s//\1/
25426 q
25427 }
25428 /^X\(\/\/\)[^/].*/{
25429 s//\1/
25430 q
25431 }
25432 /^X\(\/\/\)$/{
25433 s//\1/
25434 q
25435 }
25436 /^X\(\/\).*/{
25437 s//\1/
25438 q
25439 }
25440 s/.*/./; q'`
25441 { as_dir="$ac_dir"
25442 case $as_dir in #(
25443 -*) as_dir=./$as_dir;;
25444 esac
25445 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 25446 as_dirs=
ca81d7a0
JD
25447 while :; do
25448 case $as_dir in #(
25449 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25450 *) as_qdir=$as_dir;;
25451 esac
25452 as_dirs="'$as_qdir' $as_dirs"
25453 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 25454$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25455 X"$as_dir" : 'X\(//\)[^/]' \| \
25456 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 25457 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 25458echo X"$as_dir" |
ca81d7a0
JD
25459 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25460 s//\1/
25461 q
25462 }
25463 /^X\(\/\/\)[^/].*/{
25464 s//\1/
25465 q
25466 }
25467 /^X\(\/\/\)$/{
25468 s//\1/
25469 q
25470 }
25471 /^X\(\/\).*/{
25472 s//\1/
25473 q
25474 }
25475 s/.*/./; q'`
25476 test -d "$as_dir" && break
6bae0ccf 25477 done
ca81d7a0
JD
25478 test -z "$as_dirs" || eval "mkdir $as_dirs"
25479 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25480echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 25481 { (exit 1); exit 1; }; }; }
c0d27fcc 25482 ac_builddir=.
98418dba 25483
ca81d7a0
JD
25484case "$ac_dir" in
25485.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25486*)
c0d27fcc 25487 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
25488 # A ".." for each directory in $ac_dir_suffix.
25489 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25490 case $ac_top_builddir_sub in
25491 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25492 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25493 esac ;;
25494esac
25495ac_abs_top_builddir=$ac_pwd
25496ac_abs_builddir=$ac_pwd$ac_dir_suffix
25497# for backward compatibility:
25498ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
25499
25500case $srcdir in
ca81d7a0 25501 .) # We are building in place.
c0d27fcc 25502 ac_srcdir=.
ca81d7a0
JD
25503 ac_top_srcdir=$ac_top_builddir_sub
25504 ac_abs_top_srcdir=$ac_pwd ;;
25505 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 25506 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
25507 ac_top_srcdir=$srcdir
25508 ac_abs_top_srcdir=$srcdir ;;
25509 *) # Relative name.
25510 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25511 ac_top_srcdir=$ac_top_build_prefix$srcdir
25512 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 25513esac
ca81d7a0 25514ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 25515
c0d27fcc 25516
ca81d7a0
JD
25517 case $ac_mode in
25518 :F)
25519 #
25520 # CONFIG_FILE
25521 #
ba4481b5 25522
503d2be0
AS
25523 case $INSTALL in
25524 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 25525 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 25526 esac
ca81d7a0 25527_ACEOF
ba4481b5 25528
ca81d7a0
JD
25529cat >>$CONFIG_STATUS <<\_ACEOF
25530# If the template does not know about datarootdir, expand it.
25531# FIXME: This hack should be removed a few years after 2.60.
25532ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 25533
ca81d7a0
JD
25534case `sed -n '/datarootdir/ {
25535 p
25536 q
25537}
25538/@datadir@/p
25539/@docdir@/p
25540/@infodir@/p
25541/@localedir@/p
25542/@mandir@/p
25543' $ac_file_inputs` in
25544*datarootdir*) ac_datarootdir_seen=yes;;
25545*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25546 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25547echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 25548_ACEOF
ca81d7a0
JD
25549cat >>$CONFIG_STATUS <<_ACEOF
25550 ac_datarootdir_hack='
25551 s&@datadir@&$datadir&g
25552 s&@docdir@&$docdir&g
25553 s&@infodir@&$infodir&g
25554 s&@localedir@&$localedir&g
25555 s&@mandir@&$mandir&g
25556 s&\\\${datarootdir}&$datarootdir&g' ;;
25557esac
c0d27fcc 25558_ACEOF
ca81d7a0
JD
25559
25560# Neutralize VPATH when `$srcdir' = `.'.
25561# Shell code in configure.ac might set extrasub.
25562# FIXME: do we really want to maintain this feature?
c0d27fcc 25563cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
25564 sed "$ac_vpsub
25565$extrasub
c0d27fcc
MR
25566_ACEOF
25567cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
25568:t
25569/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ca81d7a0
JD
25570s&@configure_input@&$configure_input&;t t
25571s&@top_builddir@&$ac_top_builddir_sub&;t t
25572s&@srcdir@&$ac_srcdir&;t t
25573s&@abs_srcdir@&$ac_abs_srcdir&;t t
25574s&@top_srcdir@&$ac_top_srcdir&;t t
25575s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25576s&@builddir@&$ac_builddir&;t t
25577s&@abs_builddir@&$ac_abs_builddir&;t t
25578s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25579s&@INSTALL@&$ac_INSTALL&;t t
25580$ac_datarootdir_hack
25581" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
25582
25583test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25584 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25585 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25586 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25587which seems to be undefined. Please make sure it is defined." >&5
25588echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25589which seems to be undefined. Please make sure it is defined." >&2;}
25590
25591 rm -f "$tmp/stdin"
503d2be0 25592 case $ac_file in
ca81d7a0
JD
25593 -) cat "$tmp/out"; rm -f "$tmp/out";;
25594 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 25595 esac
ca81d7a0
JD
25596 ;;
25597 :H)
25598 #
25599 # CONFIG_HEADER
25600 #
25601_ACEOF
25602
25603# Transform confdefs.h into a sed script `conftest.defines', that
25604# substitutes the proper values into config.h.in to produce config.h.
25605rm -f conftest.defines conftest.tail
25606# First, append a space to every undef/define line, to ease matching.
25607echo 's/$/ /' >conftest.defines
25608# Then, protect against being on the right side of a sed subst, or in
25609# an unquoted here document, in config.status. If some macros were
25610# called several times there might be several #defines for the same
25611# symbol, which is useless. But do not sort them, since the last
25612# AC_DEFINE must be honored.
25613ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25614# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25615# NAME is the cpp macro being defined, VALUE is the value it is being given.
25616# PARAMS is the parameter list in the macro definition--in most cases, it's
25617# just an empty string.
25618ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25619ac_dB='\\)[ (].*,\\1define\\2'
25620ac_dC=' '
25621ac_dD=' ,'
25622
25623uniq confdefs.h |
25624 sed -n '
25625 t rset
25626 :rset
25627 s/^[ ]*#[ ]*define[ ][ ]*//
25628 t ok
25629 d
25630 :ok
25631 s/[\\&,]/\\&/g
25632 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25633 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25634 ' >>conftest.defines
25635
25636# Remove the space that was appended to ease matching.
25637# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
25638# example, in the case of _POSIX_SOURCE, which is predefined and required
25639# on some systems where configure will not decide to define it.
ca81d7a0
JD
25640# (The regexp can be short, since the line contains either #define or #undef.)
25641echo 's/ $//
25642s,^[ #]*u.*,/* & */,' >>conftest.defines
25643
25644# Break up conftest.defines:
25645ac_max_sed_lines=50
25646
25647# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25648# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25649# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25650# et cetera.
25651ac_in='$ac_file_inputs'
25652ac_out='"$tmp/out1"'
25653ac_nxt='"$tmp/out2"'
25654
25655while :
503d2be0 25656do
ca81d7a0
JD
25657 # Write a here document:
25658 cat >>$CONFIG_STATUS <<_ACEOF
25659 # First, check the format of the line:
25660 cat >"\$tmp/defines.sed" <<\\CEOF
25661/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25662/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25663b
25664:def
25665_ACEOF
25666 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 25667 echo 'CEOF
ca81d7a0
JD
25668 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25669 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25670 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25671 grep . conftest.tail >/dev/null || break
503d2be0
AS
25672 rm -f conftest.defines
25673 mv conftest.tail conftest.defines
25674done
ca81d7a0 25675rm -f conftest.defines conftest.tail
503d2be0 25676
ca81d7a0 25677echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 25678cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 25679 if test x"$ac_file" != x-; then
ca81d7a0
JD
25680 echo "/* $configure_input */" >"$tmp/config.h"
25681 cat "$ac_result" >>"$tmp/config.h"
25682 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 25683 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
25684echo "$as_me: $ac_file is unchanged" >&6;}
25685 else
503d2be0 25686 rm -f $ac_file
ca81d7a0 25687 mv "$tmp/config.h" $ac_file
ba4481b5 25688 fi
503d2be0 25689 else
ca81d7a0
JD
25690 echo "/* $configure_input */"
25691 cat "$ac_result"
ba4481b5 25692 fi
ca81d7a0
JD
25693 rm -f "$tmp/out12"
25694 ;;
edfaf76d 25695
ca81d7a0
JD
25696 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
25697echo "$as_me: executing $ac_file commands" >&6;}
25698 ;;
25699 esac
ba4481b5 25700
c0d27fcc 25701
ca81d7a0
JD
25702 case $ac_file$ac_mode in
25703 "default":C)
ba4481b5
DL
25704
25705### Make the necessary directories, if they don't exist.
25706for dir in etc lisp ; do
25707 test -d ${dir} || mkdir ${dir}
25708done
25709
25710# Build src/Makefile from ${srcdir}/src/Makefile.c
25711# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
25712# This must be done after src/config.h is built, since we rely on that file.
25713
ba4481b5 25714echo creating src/epaths.h
4aa6b955 25715${MAKE-make} epaths-force
ba4481b5 25716
1c203d4c
DL
25717# As of 2000-11-19, newest development versions of GNU cpp preprocess
25718# `..' to `. .' unless invoked with -traditional
25719
d0e9bfd2 25720if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
25721 CPPFLAGS="$CPPFLAGS -traditional"
25722fi
25723
ba4481b5
DL
25724echo creating lib-src/Makefile
25725( cd lib-src
25726 rm -f junk.c junk1.c junk2.c
25727 sed -e '/start of cpp stuff/q' \
25728 < Makefile.c > junk1.c
25729 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25730 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25731 < Makefile.c > junk.c
8acdcf6f 25732 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25733 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25734 cat junk1.c junk2.c > Makefile.new
25735 rm -f junk.c junk1.c junk2.c
25736 chmod 444 Makefile.new
25737 mv -f Makefile.new Makefile
25738)
25739
25740echo creating src/Makefile
25741( cd src
25742 rm -f junk.c junk1.c junk2.c
25743 sed -e '/start of cpp stuff/q' \
25744 < Makefile.c > junk1.c
25745 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25746 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25747 < Makefile.c > junk.c
8acdcf6f 25748 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25749 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25750 cat junk1.c junk2.c > Makefile.new
25751 rm -f junk.c junk1.c junk2.c
25752 chmod 444 Makefile.new
25753 mv -f Makefile.new Makefile
25754)
25755
503d2be0 25756if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 25757 echo creating src/.gdbinit
503d2be0 25758 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
25759fi
25760
503d2be0 25761 ;;
ca81d7a0 25762
503d2be0 25763 esac
ca81d7a0 25764done # for ac_tag
503d2be0 25765
ba4481b5 25766
503d2be0 25767{ (exit 0); exit 0; }
c0d27fcc 25768_ACEOF
ba4481b5 25769chmod +x $CONFIG_STATUS
503d2be0
AS
25770ac_clean_files=$ac_clean_files_save
25771
c0d27fcc 25772
503d2be0
AS
25773# configure is writing to config.log, and then calls config.status.
25774# config.status does its own redirection, appending to config.log.
25775# Unfortunately, on DOS this fails, as config.log is still kept open
25776# by configure, so config.status won't be able to write to it; its
25777# output is simply discarded. So we exec the FD to /dev/null,
25778# effectively closing config.log, so it can be properly (re)opened and
25779# appended to by config.status. When coming back to configure, we
25780# need to make the FD available again.
25781if test "$no_create" != yes; then
25782 ac_cs_success=:
19650fd6
AS
25783 ac_config_status_args=
25784 test "$silent" = yes &&
25785 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 25786 exec 5>/dev/null
19650fd6 25787 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
25788 exec 5>>config.log
25789 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25790 # would make configure fail if this is the last instruction.
25791 $ac_cs_success || { (exit 1); exit 1; }
25792fi
f5f47add 25793
c0d27fcc 25794