(x_set_menu_bar_lines, x_set_tool_bar_lines): Remove
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
5d374ce1 3# Generated by GNU Autoconf 2.61 for emacs 23.0.60.
ba4481b5 4#
ca81d7a0
JD
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
ba4481b5
DL
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
c0d27fcc
MR
9## --------------------- ##
10## M4sh Initialization. ##
11## --------------------- ##
503d2be0 12
f053c89f
CY
13# Be more Bourne compatible
14DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16 emulate sh
17 NULLCMD=:
6bae0ccf
DL
18 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19 # is contrary to our usage. Disable this feature.
20 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
21 setopt NO_GLOB_SUBST
22else
f053c89f
CY
23 case `(set -o) 2>/dev/null` in
24 *posix*) set -o posix ;;
25esac
26
503d2be0 27fi
f053c89f
CY
28
29
503d2be0 30
ca81d7a0
JD
31
32# PATH needs CR
33# Avoid depending upon Character Ranges.
34as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37as_cr_digits='0123456789'
38as_cr_alnum=$as_cr_Letters$as_cr_digits
39
40# The user is always right.
41if test "${PATH_SEPARATOR+set}" != set; then
42 echo "#! /bin/sh" >conf$$.sh
43 echo "exit 0" >>conf$$.sh
44 chmod +x conf$$.sh
45 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
46 PATH_SEPARATOR=';'
47 else
48 PATH_SEPARATOR=:
49 fi
50 rm -f conf$$.sh
503d2be0
AS
51fi
52
c0d27fcc 53# Support unset when possible.
edfaf76d 54if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
55 as_unset=unset
56else
57 as_unset=false
58fi
59
6bae0ccf 60
ca81d7a0
JD
61# IFS
62# We need space, tab and new line, in precisely that order. Quoting is
63# there to prevent editors from complaining about space-tab.
64# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65# splitting by setting IFS to empty value.)
66as_nl='
67'
68IFS=" "" $as_nl"
69
70# Find who we are. Look in the path if we contain no directory separator.
71case $0 in
72 *[\\/]* ) as_myself=$0 ;;
73 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
74for as_dir in $PATH
75do
76 IFS=$as_save_IFS
77 test -z "$as_dir" && as_dir=.
78 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
79done
80IFS=$as_save_IFS
81
82 ;;
83esac
84# We did not find ourselves, most probably we were run as `sh COMMAND'
85# in which case we are not to be found in the path.
86if test "x$as_myself" = x; then
87 as_myself=$0
88fi
89if test ! -f "$as_myself"; then
90 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
91 { (exit 1); exit 1; }
92fi
93
6bae0ccf 94# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
95for as_var in ENV MAIL MAILPATH
96do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
97done
6bae0ccf
DL
98PS1='$ '
99PS2='> '
100PS4='+ '
101
102# NLS nuisances.
19650fd6
AS
103for as_var in \
104 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
105 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
106 LC_TELEPHONE LC_TIME
6bae0ccf 107do
edfaf76d 108 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
109 eval $as_var=C; export $as_var
110 else
ca81d7a0 111 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
112 fi
113done
114
115# Required to use basename.
ca81d7a0
JD
116if expr a : '\(a\)' >/dev/null 2>&1 &&
117 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
118 as_expr=expr
119else
120 as_expr=false
121fi
122
ca81d7a0 123if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
124 as_basename=basename
125else
126 as_basename=false
127fi
c0d27fcc
MR
128
129
503d2be0 130# Name of the executable.
ca81d7a0 131as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
132$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133 X"$0" : 'X\(//\)$' \| \
ca81d7a0 134 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 135echo X/"$0" |
ca81d7a0
JD
136 sed '/^.*\/\([^/][^/]*\)\/*$/{
137 s//\1/
138 q
139 }
140 /^X\/\(\/\/\)$/{
141 s//\1/
142 q
143 }
144 /^X\/\(\/\).*/{
145 s//\1/
146 q
147 }
148 s/.*/./; q'`
c0d27fcc 149
ca81d7a0
JD
150# CDPATH.
151$as_unset CDPATH
6bae0ccf 152
c0d27fcc 153
ca81d7a0
JD
154if test "x$CONFIG_SHELL" = x; then
155 if (eval ":") 2>/dev/null; then
156 as_have_required=yes
157else
158 as_have_required=no
c0d27fcc
MR
159fi
160
ca81d7a0
JD
161 if test $as_have_required = yes && (eval ":
162(as_func_return () {
163 (exit \$1)
164}
165as_func_success () {
166 as_func_return 0
167}
168as_func_failure () {
169 as_func_return 1
170}
171as_func_ret_success () {
172 return 0
173}
174as_func_ret_failure () {
175 return 1
176}
c0d27fcc 177
ca81d7a0
JD
178exitcode=0
179if as_func_success; then
180 :
181else
182 exitcode=1
183 echo as_func_success failed.
184fi
c0d27fcc 185
ca81d7a0
JD
186if as_func_failure; then
187 exitcode=1
188 echo as_func_failure succeeded.
189fi
190
191if as_func_ret_success; then
192 :
193else
194 exitcode=1
195 echo as_func_ret_success failed.
196fi
197
198if as_func_ret_failure; then
199 exitcode=1
200 echo as_func_ret_failure succeeded.
201fi
202
203if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
204 :
205else
206 exitcode=1
207 echo positional parameters were not saved.
208fi
209
210test \$exitcode = 0) || { (exit 1); exit 1; }
211
212(
213 as_lineno_1=\$LINENO
214 as_lineno_2=\$LINENO
215 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
216 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
217") 2> /dev/null; then
218 :
219else
220 as_candidate_shells=
c0d27fcc
MR
221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
222for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
223do
224 IFS=$as_save_IFS
225 test -z "$as_dir" && as_dir=.
ca81d7a0 226 case $as_dir in
c0d27fcc 227 /*)
ca81d7a0
JD
228 for as_base in sh bash ksh sh5; do
229 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
230 done;;
231 esac
232done
233IFS=$as_save_IFS
234
235
236 for as_shell in $as_candidate_shells $SHELL; do
237 # Try only shells that exist, to save several forks.
238 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
239 { ("$as_shell") 2> /dev/null <<\_ASEOF
ca81d7a0
JD
240if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241 emulate sh
242 NULLCMD=:
243 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244 # is contrary to our usage. Disable this feature.
245 alias -g '${1+"$@"}'='"$@"'
246 setopt NO_GLOB_SUBST
247else
f053c89f
CY
248 case `(set -o) 2>/dev/null` in
249 *posix*) set -o posix ;;
250esac
251
ca81d7a0 252fi
f053c89f 253
ca81d7a0
JD
254
255:
256_ASEOF
257}; then
258 CONFIG_SHELL=$as_shell
259 as_have_required=yes
260 if { "$as_shell" 2> /dev/null <<\_ASEOF
ca81d7a0
JD
261if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262 emulate sh
263 NULLCMD=:
264 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
265 # is contrary to our usage. Disable this feature.
266 alias -g '${1+"$@"}'='"$@"'
267 setopt NO_GLOB_SUBST
268else
f053c89f
CY
269 case `(set -o) 2>/dev/null` in
270 *posix*) set -o posix ;;
271esac
272
ca81d7a0 273fi
f053c89f 274
ca81d7a0
JD
275
276:
277(as_func_return () {
278 (exit $1)
279}
280as_func_success () {
281 as_func_return 0
282}
283as_func_failure () {
284 as_func_return 1
285}
286as_func_ret_success () {
287 return 0
288}
289as_func_ret_failure () {
290 return 1
291}
292
293exitcode=0
294if as_func_success; then
295 :
296else
297 exitcode=1
298 echo as_func_success failed.
299fi
300
301if as_func_failure; then
302 exitcode=1
303 echo as_func_failure succeeded.
304fi
305
306if as_func_ret_success; then
307 :
308else
309 exitcode=1
310 echo as_func_ret_success failed.
311fi
312
313if as_func_ret_failure; then
314 exitcode=1
315 echo as_func_ret_failure succeeded.
316fi
317
318if ( set x; as_func_ret_success y && test x = "$1" ); then
319 :
320else
321 exitcode=1
322 echo positional parameters were not saved.
323fi
324
325test $exitcode = 0) || { (exit 1); exit 1; }
326
327(
c0d27fcc
MR
328 as_lineno_1=$LINENO
329 as_lineno_2=$LINENO
c0d27fcc 330 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0
JD
331 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
332
333_ASEOF
334}; then
335 break
336fi
337
338fi
339
340 done
341
342 if test "x$CONFIG_SHELL" != x; then
343 for as_var in BASH_ENV ENV
344 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
345 done
346 export CONFIG_SHELL
347 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
348fi
349
350
351 if test $as_have_required = no; then
352 echo This script requires a shell more modern than all the
353 echo shells that I found on your system. Please install a
354 echo modern shell, or manually run the script under such a
355 echo shell if you do have one.
356 { (exit 1); exit 1; }
357fi
358
359
360fi
361
362fi
363
364
365
366(eval "as_func_return () {
367 (exit \$1)
368}
369as_func_success () {
370 as_func_return 0
371}
372as_func_failure () {
373 as_func_return 1
374}
375as_func_ret_success () {
376 return 0
377}
378as_func_ret_failure () {
379 return 1
380}
381
382exitcode=0
383if as_func_success; then
384 :
385else
386 exitcode=1
387 echo as_func_success failed.
388fi
389
390if as_func_failure; then
391 exitcode=1
392 echo as_func_failure succeeded.
393fi
394
395if as_func_ret_success; then
396 :
397else
398 exitcode=1
399 echo as_func_ret_success failed.
400fi
401
402if as_func_ret_failure; then
403 exitcode=1
404 echo as_func_ret_failure succeeded.
405fi
406
407if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
408 :
409else
410 exitcode=1
411 echo positional parameters were not saved.
412fi
413
414test \$exitcode = 0") || {
554b610f
MB
415 echo No shell found that supports shell functions.
416 echo Please tell autoconf@gnu.org about your system,
417 echo including any error possibly output before this
418 echo message
ca81d7a0
JD
419}
420
421
422
423 as_lineno_1=$LINENO
424 as_lineno_2=$LINENO
425 test "x$as_lineno_1" != "x$as_lineno_2" &&
426 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
427
428 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
429 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
430 # line-number line after each line using $LINENO; the second 'sed'
431 # does the real work. The second script uses 'N' to pair each
432 # line-number line with the line containing $LINENO, and appends
433 # trailing '-' during substitution so that $LINENO is not a special
434 # case at line end.
c0d27fcc 435 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
436 # scripts with optimization help from Paolo Bonzini. Blame Lee
437 # E. McMahon (1931-1989) for sed's syntax. :-)
438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
c0d27fcc 442 sed '
ca81d7a0
JD
443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
c0d27fcc 447 N
ca81d7a0
JD
448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 450 t loop
ca81d7a0 451 s/-\n.*//
c0d27fcc 452 ' >$as_me.lineno &&
ca81d7a0 453 chmod +x "$as_me.lineno" ||
c0d27fcc
MR
454 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
455 { (exit 1); exit 1; }; }
456
457 # Don't try to exec as it changes $[0], causing all sort of problems
458 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
459 # original and so on. Autoconf is especially sensitive to this).
460 . "./$as_me.lineno"
c0d27fcc
MR
461 # Exit status is that of the last command.
462 exit
463}
464
465
ca81d7a0
JD
466if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
467 as_dirname=dirname
468else
469 as_dirname=false
470fi
471
472ECHO_C= ECHO_N= ECHO_T=
473case `echo -n x` in
474-n*)
475 case `echo 'x\c'` in
476 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
477 *) ECHO_C='\c';;
478 esac;;
479*)
480 ECHO_N='-n';;
c0d27fcc 481esac
503d2be0 482
ca81d7a0
JD
483if expr a : '\(a\)' >/dev/null 2>&1 &&
484 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
485 as_expr=expr
486else
487 as_expr=false
488fi
489
490rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
491if test -d conf$$.dir; then
492 rm -f conf$$.dir/conf$$.file
493else
494 rm -f conf$$.dir
495 mkdir conf$$.dir
496fi
503d2be0
AS
497echo >conf$$.file
498if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
499 as_ln_s='ln -s'
500 # ... but there are two gotchas:
501 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
502 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
503 # In both cases, we have to default to `cp -p'.
504 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 505 as_ln_s='cp -p'
503d2be0
AS
506elif ln conf$$.file conf$$ 2>/dev/null; then
507 as_ln_s=ln
508else
509 as_ln_s='cp -p'
510fi
ca81d7a0
JD
511rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
512rmdir conf$$.dir 2>/dev/null
503d2be0 513
6bae0ccf
DL
514if mkdir -p . 2>/dev/null; then
515 as_mkdir_p=:
516else
edfaf76d 517 test -d ./-p && rmdir ./-p
6bae0ccf
DL
518 as_mkdir_p=false
519fi
520
f053c89f
CY
521if test -x / >/dev/null 2>&1; then
522 as_test_x='test -x'
ca81d7a0 523else
f053c89f
CY
524 if ls -dL / >/dev/null 2>&1; then
525 as_ls_L_option=L
526 else
527 as_ls_L_option=
528 fi
529 as_test_x='
530 eval sh -c '\''
531 if test -d "$1"; then
532 test -d "$1/.";
533 else
534 case $1 in
535 -*)set "./$1";;
536 esac;
537 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
538 ???[sx]*):;;*)false;;esac;fi
539 '\'' sh
540 '
ca81d7a0 541fi
f053c89f 542as_executable_p=$as_test_x
503d2be0 543
c0d27fcc 544# Sed expression to map a string onto a valid CPP name.
edfaf76d 545as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
546
547# Sed expression to map a string onto a valid variable name.
edfaf76d 548as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 549
503d2be0 550
c0d27fcc 551
ca81d7a0 552exec 7<&0 </dev/null 6>&1
503d2be0
AS
553
554# Name of the host.
555# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
556# so uname gets run too.
557ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
558
503d2be0
AS
559#
560# Initializations.
561#
ba4481b5 562ac_default_prefix=/usr/local
ca81d7a0 563ac_clean_files=
6bae0ccf 564ac_config_libobj_dir=.
ca81d7a0 565LIBOBJS=
503d2be0
AS
566cross_compiling=no
567subdirs=
c0d27fcc
MR
568MFLAGS=
569MAKEFLAGS=
503d2be0
AS
570SHELL=${CONFIG_SHELL-/bin/sh}
571
c0d27fcc 572# Identity of this package.
9cf8f393
JD
573PACKAGE_NAME='emacs'
574PACKAGE_TARNAME='emacs'
5d374ce1
AS
575PACKAGE_VERSION='23.0.60'
576PACKAGE_STRING='emacs 23.0.60'
9cf8f393 577PACKAGE_BUGREPORT=''
c0d27fcc 578
503d2be0
AS
579ac_unique_file="src/lisp.h"
580# Factoring default headers for most tests.
581ac_includes_default="\
582#include <stdio.h>
f053c89f 583#ifdef HAVE_SYS_TYPES_H
503d2be0
AS
584# include <sys/types.h>
585#endif
f053c89f 586#ifdef HAVE_SYS_STAT_H
503d2be0
AS
587# include <sys/stat.h>
588#endif
f053c89f 589#ifdef STDC_HEADERS
503d2be0
AS
590# include <stdlib.h>
591# include <stddef.h>
592#else
f053c89f 593# ifdef HAVE_STDLIB_H
503d2be0
AS
594# include <stdlib.h>
595# endif
596#endif
f053c89f
CY
597#ifdef HAVE_STRING_H
598# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
503d2be0
AS
599# include <memory.h>
600# endif
601# include <string.h>
602#endif
f053c89f 603#ifdef HAVE_STRINGS_H
503d2be0
AS
604# include <strings.h>
605#endif
f053c89f 606#ifdef HAVE_INTTYPES_H
503d2be0 607# include <inttypes.h>
503d2be0 608#endif
f053c89f 609#ifdef HAVE_STDINT_H
ca81d7a0 610# include <stdint.h>
503d2be0 611#endif
f053c89f 612#ifdef HAVE_UNISTD_H
503d2be0
AS
613# include <unistd.h>
614#endif"
ba4481b5 615
a51f4969 616ac_config_libobj_dir=src
c24fa7dc
MB
617ac_header_list=
618ac_func_list=
619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656MAINT
657build
658build_cpu
659build_vendor
660build_os
661host
662host_cpu
663host_vendor
664host_os
665CC
666CFLAGS
667LDFLAGS
668CPPFLAGS
669ac_ct_CC
670EXEEXT
671OBJEXT
672CPP
673GREP
674EGREP
675LN_S
676INSTALL_PROGRAM
677INSTALL_SCRIPT
678INSTALL_DATA
679RANLIB
680INSTALL_INFO
681GZIP_PROG
1bb9a689 682MAKEINFO
c24fa7dc
MB
683LIBSOUND
684PKG_CONFIG
685ALSA_CFLAGS
686ALSA_LIBS
c24fa7dc
MB
687CFLAGS_SOUND
688SET_MAKE
689XMKMF
cfe440b8 690HAVE_XSERVER
0cfc0546
GM
691RSVG_CFLAGS
692RSVG_LIBS
c24fa7dc
MB
693GTK_CFLAGS
694GTK_LIBS
131e4133
MA
695DBUS_CFLAGS
696DBUS_LIBS
c24fa7dc
MB
697XFT_CFLAGS
698XFT_LIBS
699FREETYPE_CFLAGS
700FREETYPE_LIBS
701FONTCONFIG_CFLAGS
702FONTCONFIG_LIBS
c24fa7dc
MB
703LIBOTF_CFLAGS
704LIBOTF_LIBS
7f0942ba
KH
705M17N_FLT_CFLAGS
706M17N_FLT_LIBS
c24fa7dc
MB
707ALLOCA
708liblockfile
709LIBOBJS
710NEED_SETGID
711KMEM_GROUP
712GETLOADAVG_LIBS
713GETOPT_H
714GETOPTOBJS
715version
716configuration
717canonical
718srcdir
719lispdir
720locallisppath
721lisppath
722x_default_search_path
723etcdir
724archlibdir
725bitmapdir
726gamedir
727gameuser
728c_switch_system
729c_switch_machine
730LD_SWITCH_X_SITE
731LD_SWITCH_X_SITE_AUX
732C_SWITCH_X_SITE
733X_TOOLKIT_TYPE
734machfile
735opsysfile
736carbon_appdir
edfda783 737ns_appdir
06b62770
AR
738ns_appbindir
739ns_appresdir
740ns_appsrc
facfbbbd 741GNUSTEP_MAKEFILES
c24fa7dc 742LTLIBOBJS'
6bae0ccf 743ac_subst_files=''
ca81d7a0
JD
744 ac_precious_vars='build_alias
745host_alias
746target_alias
747CC
748CFLAGS
749LDFLAGS
f053c89f 750LIBS
ca81d7a0
JD
751CPPFLAGS
752CPP
753XMKMF'
754
c0d27fcc 755
ba4481b5 756# Initialize some variables set by options.
503d2be0
AS
757ac_init_help=
758ac_init_version=false
ba4481b5
DL
759# The variables have the same names as the options, with
760# dashes changed to underlines.
503d2be0 761cache_file=/dev/null
ba4481b5 762exec_prefix=NONE
ba4481b5 763no_create=
ba4481b5
DL
764no_recursion=
765prefix=NONE
766program_prefix=NONE
767program_suffix=NONE
768program_transform_name=s,x,x,
769silent=
770site=
771srcdir=
ba4481b5
DL
772verbose=
773x_includes=NONE
774x_libraries=NONE
503d2be0
AS
775
776# Installation directory options.
777# These are left unexpanded so users can "make install exec_prefix=/foo"
778# and all the variables that are supposed to be based on exec_prefix
779# by default will actually change.
780# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 781# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
782bindir='${exec_prefix}/bin'
783sbindir='${exec_prefix}/sbin'
784libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
785datarootdir='${prefix}/share'
786datadir='${datarootdir}'
ba4481b5
DL
787sysconfdir='${prefix}/etc'
788sharedstatedir='${prefix}/com'
789localstatedir='${prefix}/var'
ba4481b5
DL
790includedir='${prefix}/include'
791oldincludedir='/usr/include'
9cf8f393 792docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
ca81d7a0
JD
793infodir='${datarootdir}/info'
794htmldir='${docdir}'
795dvidir='${docdir}'
796pdfdir='${docdir}'
797psdir='${docdir}'
798libdir='${exec_prefix}/lib'
799localedir='${datarootdir}/locale'
800mandir='${datarootdir}/man'
ba4481b5 801
ba4481b5 802ac_prev=
ca81d7a0 803ac_dashdash=
ba4481b5
DL
804for ac_option
805do
ba4481b5
DL
806 # If the previous option needs an argument, assign it.
807 if test -n "$ac_prev"; then
ca81d7a0 808 eval $ac_prev=\$ac_option
ba4481b5
DL
809 ac_prev=
810 continue
811 fi
812
ca81d7a0
JD
813 case $ac_option in
814 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
815 *) ac_optarg=yes ;;
816 esac
ba4481b5
DL
817
818 # Accept the important Cygnus configure options, so we can diagnose typos.
819
ca81d7a0
JD
820 case $ac_dashdash$ac_option in
821 --)
822 ac_dashdash=yes ;;
ba4481b5
DL
823
824 -bindir | --bindir | --bindi | --bind | --bin | --bi)
825 ac_prev=bindir ;;
826 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 827 bindir=$ac_optarg ;;
ba4481b5
DL
828
829 -build | --build | --buil | --bui | --bu)
503d2be0 830 ac_prev=build_alias ;;
ba4481b5 831 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 832 build_alias=$ac_optarg ;;
ba4481b5
DL
833
834 -cache-file | --cache-file | --cache-fil | --cache-fi \
835 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
836 ac_prev=cache_file ;;
837 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
838 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
839 cache_file=$ac_optarg ;;
840
841 --config-cache | -C)
842 cache_file=config.cache ;;
ba4481b5 843
ca81d7a0 844 -datadir | --datadir | --datadi | --datad)
ba4481b5 845 ac_prev=datadir ;;
ca81d7a0 846 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 847 datadir=$ac_optarg ;;
ba4481b5 848
ca81d7a0
JD
849 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
850 | --dataroo | --dataro | --datar)
851 ac_prev=datarootdir ;;
852 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
853 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
854 datarootdir=$ac_optarg ;;
855
ba4481b5 856 -disable-* | --disable-*)
503d2be0 857 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 858 # Reject names that are not valid shell variable names.
f053c89f 859 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
860 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
861 { (exit 1); exit 1; }; }
f053c89f 862 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0
JD
863 eval enable_$ac_feature=no ;;
864
865 -docdir | --docdir | --docdi | --doc | --do)
866 ac_prev=docdir ;;
867 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
868 docdir=$ac_optarg ;;
869
870 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
871 ac_prev=dvidir ;;
872 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
873 dvidir=$ac_optarg ;;
ba4481b5
DL
874
875 -enable-* | --enable-*)
503d2be0 876 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 877 # Reject names that are not valid shell variable names.
f053c89f 878 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
879 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
880 { (exit 1); exit 1; }; }
f053c89f 881 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0 882 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
883
884 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
885 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
886 | --exec | --exe | --ex)
887 ac_prev=exec_prefix ;;
888 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
889 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
890 | --exec=* | --exe=* | --ex=*)
503d2be0 891 exec_prefix=$ac_optarg ;;
ba4481b5
DL
892
893 -gas | --gas | --ga | --g)
894 # Obsolete; use --with-gas.
895 with_gas=yes ;;
896
503d2be0
AS
897 -help | --help | --hel | --he | -h)
898 ac_init_help=long ;;
899 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
900 ac_init_help=recursive ;;
901 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
902 ac_init_help=short ;;
ba4481b5
DL
903
904 -host | --host | --hos | --ho)
503d2be0 905 ac_prev=host_alias ;;
ba4481b5 906 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 907 host_alias=$ac_optarg ;;
ba4481b5 908
ca81d7a0
JD
909 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
910 ac_prev=htmldir ;;
911 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
912 | --ht=*)
913 htmldir=$ac_optarg ;;
914
ba4481b5
DL
915 -includedir | --includedir | --includedi | --included | --include \
916 | --includ | --inclu | --incl | --inc)
917 ac_prev=includedir ;;
918 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
919 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 920 includedir=$ac_optarg ;;
ba4481b5
DL
921
922 -infodir | --infodir | --infodi | --infod | --info | --inf)
923 ac_prev=infodir ;;
924 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 925 infodir=$ac_optarg ;;
ba4481b5
DL
926
927 -libdir | --libdir | --libdi | --libd)
928 ac_prev=libdir ;;
929 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 930 libdir=$ac_optarg ;;
ba4481b5
DL
931
932 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
933 | --libexe | --libex | --libe)
934 ac_prev=libexecdir ;;
935 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
936 | --libexe=* | --libex=* | --libe=*)
503d2be0 937 libexecdir=$ac_optarg ;;
ba4481b5 938
ca81d7a0
JD
939 -localedir | --localedir | --localedi | --localed | --locale)
940 ac_prev=localedir ;;
941 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
942 localedir=$ac_optarg ;;
943
ba4481b5 944 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 945 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
946 ac_prev=localstatedir ;;
947 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 948 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 949 localstatedir=$ac_optarg ;;
ba4481b5
DL
950
951 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
952 ac_prev=mandir ;;
953 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 954 mandir=$ac_optarg ;;
ba4481b5
DL
955
956 -nfp | --nfp | --nf)
957 # Obsolete; use --without-fp.
958 with_fp=no ;;
959
960 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 961 | --no-cr | --no-c | -n)
ba4481b5
DL
962 no_create=yes ;;
963
964 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
965 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
966 no_recursion=yes ;;
967
968 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
969 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
970 | --oldin | --oldi | --old | --ol | --o)
971 ac_prev=oldincludedir ;;
972 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
973 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
974 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 975 oldincludedir=$ac_optarg ;;
ba4481b5
DL
976
977 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
978 ac_prev=prefix ;;
979 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 980 prefix=$ac_optarg ;;
ba4481b5
DL
981
982 -program-prefix | --program-prefix | --program-prefi | --program-pref \
983 | --program-pre | --program-pr | --program-p)
984 ac_prev=program_prefix ;;
985 -program-prefix=* | --program-prefix=* | --program-prefi=* \
986 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 987 program_prefix=$ac_optarg ;;
ba4481b5
DL
988
989 -program-suffix | --program-suffix | --program-suffi | --program-suff \
990 | --program-suf | --program-su | --program-s)
991 ac_prev=program_suffix ;;
992 -program-suffix=* | --program-suffix=* | --program-suffi=* \
993 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 994 program_suffix=$ac_optarg ;;
ba4481b5
DL
995
996 -program-transform-name | --program-transform-name \
997 | --program-transform-nam | --program-transform-na \
998 | --program-transform-n | --program-transform- \
999 | --program-transform | --program-transfor \
1000 | --program-transfo | --program-transf \
1001 | --program-trans | --program-tran \
1002 | --progr-tra | --program-tr | --program-t)
1003 ac_prev=program_transform_name ;;
1004 -program-transform-name=* | --program-transform-name=* \
1005 | --program-transform-nam=* | --program-transform-na=* \
1006 | --program-transform-n=* | --program-transform-=* \
1007 | --program-transform=* | --program-transfor=* \
1008 | --program-transfo=* | --program-transf=* \
1009 | --program-trans=* | --program-tran=* \
1010 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 1011 program_transform_name=$ac_optarg ;;
ba4481b5 1012
ca81d7a0
JD
1013 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1014 ac_prev=pdfdir ;;
1015 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1016 pdfdir=$ac_optarg ;;
1017
1018 -psdir | --psdir | --psdi | --psd | --ps)
1019 ac_prev=psdir ;;
1020 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1021 psdir=$ac_optarg ;;
1022
ba4481b5
DL
1023 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1024 | -silent | --silent | --silen | --sile | --sil)
1025 silent=yes ;;
1026
1027 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1028 ac_prev=sbindir ;;
1029 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1030 | --sbi=* | --sb=*)
503d2be0 1031 sbindir=$ac_optarg ;;
ba4481b5
DL
1032
1033 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1034 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1035 | --sharedst | --shareds | --shared | --share | --shar \
1036 | --sha | --sh)
1037 ac_prev=sharedstatedir ;;
1038 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1039 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1040 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1041 | --sha=* | --sh=*)
503d2be0 1042 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1043
1044 -site | --site | --sit)
1045 ac_prev=site ;;
1046 -site=* | --site=* | --sit=*)
503d2be0 1047 site=$ac_optarg ;;
ba4481b5
DL
1048
1049 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1050 ac_prev=srcdir ;;
1051 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1052 srcdir=$ac_optarg ;;
ba4481b5
DL
1053
1054 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1055 | --syscon | --sysco | --sysc | --sys | --sy)
1056 ac_prev=sysconfdir ;;
1057 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1058 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1059 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1060
1061 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1062 ac_prev=target_alias ;;
ba4481b5 1063 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1064 target_alias=$ac_optarg ;;
ba4481b5
DL
1065
1066 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1067 verbose=yes ;;
1068
503d2be0
AS
1069 -version | --version | --versio | --versi | --vers | -V)
1070 ac_init_version=: ;;
ba4481b5
DL
1071
1072 -with-* | --with-*)
503d2be0 1073 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1074 # Reject names that are not valid shell variable names.
f053c89f 1075 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1076 { echo "$as_me: error: invalid package name: $ac_package" >&2
1077 { (exit 1); exit 1; }; }
f053c89f 1078 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1079 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1080
1081 -without-* | --without-*)
503d2be0 1082 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1083 # Reject names that are not valid shell variable names.
f053c89f 1084 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1085 { echo "$as_me: error: invalid package name: $ac_package" >&2
1086 { (exit 1); exit 1; }; }
f053c89f 1087 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1088 eval with_$ac_package=no ;;
ba4481b5
DL
1089
1090 --x)
1091 # Obsolete; use --with-x.
1092 with_x=yes ;;
1093
1094 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1095 | --x-incl | --x-inc | --x-in | --x-i)
1096 ac_prev=x_includes ;;
1097 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1098 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1099 x_includes=$ac_optarg ;;
ba4481b5
DL
1100
1101 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1102 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1103 ac_prev=x_libraries ;;
1104 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1105 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1106 x_libraries=$ac_optarg ;;
ba4481b5 1107
503d2be0
AS
1108 -*) { echo "$as_me: error: unrecognized option: $ac_option
1109Try \`$0 --help' for more information." >&2
1110 { (exit 1); exit 1; }; }
ba4481b5
DL
1111 ;;
1112
503d2be0
AS
1113 *=*)
1114 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1115 # Reject names that are not valid shell variable names.
1116 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1117 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1118 { (exit 1); exit 1; }; }
ca81d7a0 1119 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1120 export $ac_envvar ;;
1121
ba4481b5 1122 *)
503d2be0
AS
1123 # FIXME: should be removed in autoconf 3.0.
1124 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1125 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1126 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1127 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1128 ;;
1129
1130 esac
1131done
1132
1133if test -n "$ac_prev"; then
503d2be0
AS
1134 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1135 { echo "$as_me: error: missing argument to $ac_option" >&2
1136 { (exit 1); exit 1; }; }
ba4481b5 1137fi
ba4481b5 1138
ca81d7a0
JD
1139# Be sure to have absolute directory names.
1140for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1141 datadir sysconfdir sharedstatedir localstatedir includedir \
1142 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1143 libdir localedir mandir
ba4481b5 1144do
ca81d7a0 1145 eval ac_val=\$$ac_var
503d2be0 1146 case $ac_val in
ca81d7a0
JD
1147 [\\/$]* | ?:[\\/]* ) continue;;
1148 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1149 esac
ca81d7a0
JD
1150 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1151 { (exit 1); exit 1; }; }
ba4481b5
DL
1152done
1153
503d2be0
AS
1154# There might be people who depend on the old broken behavior: `$host'
1155# used to hold the argument of --host etc.
c0d27fcc 1156# FIXME: To remove some day.
503d2be0
AS
1157build=$build_alias
1158host=$host_alias
1159target=$target_alias
1160
c0d27fcc 1161# FIXME: To remove some day.
503d2be0
AS
1162if test "x$host_alias" != x; then
1163 if test "x$build_alias" = x; then
1164 cross_compiling=maybe
1165 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1166 If a cross compiler is detected then cross compile mode will be used." >&2
1167 elif test "x$build_alias" != "x$host_alias"; then
1168 cross_compiling=yes
1169 fi
1170fi
ba4481b5 1171
503d2be0
AS
1172ac_tool_prefix=
1173test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1174
503d2be0 1175test "$silent" = yes && exec 6>/dev/null
ba4481b5 1176
c0d27fcc 1177
ca81d7a0
JD
1178ac_pwd=`pwd` && test -n "$ac_pwd" &&
1179ac_ls_di=`ls -di .` &&
1180ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1181 { echo "$as_me: error: Working directory cannot be determined" >&2
1182 { (exit 1); exit 1; }; }
1183test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1184 { echo "$as_me: error: pwd does not report name of working directory" >&2
1185 { (exit 1); exit 1; }; }
1186
1187
ba4481b5
DL
1188# Find the source files, if location was not specified.
1189if test -z "$srcdir"; then
1190 ac_srcdir_defaulted=yes
ca81d7a0
JD
1191 # Try the directory containing this script, then the parent directory.
1192 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1193$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1194 X"$0" : 'X\(//\)[^/]' \| \
1195 X"$0" : 'X\(//\)$' \| \
ca81d7a0 1196 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1197echo X"$0" |
ca81d7a0
JD
1198 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1199 s//\1/
1200 q
1201 }
1202 /^X\(\/\/\)[^/].*/{
1203 s//\1/
1204 q
1205 }
1206 /^X\(\/\/\)$/{
1207 s//\1/
1208 q
1209 }
1210 /^X\(\/\).*/{
1211 s//\1/
1212 q
1213 }
1214 s/.*/./; q'`
ba4481b5 1215 srcdir=$ac_confdir
ca81d7a0 1216 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1217 srcdir=..
1218 fi
1219else
1220 ac_srcdir_defaulted=no
1221fi
ca81d7a0
JD
1222if test ! -r "$srcdir/$ac_unique_file"; then
1223 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1224 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1225 { (exit 1); exit 1; }; }
ba4481b5 1226fi
ca81d7a0
JD
1227ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1228ac_abs_confdir=`(
1229 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1230 { (exit 1); exit 1; }; }
ca81d7a0
JD
1231 pwd)`
1232# When building in place, set srcdir=.
1233if test "$ac_abs_confdir" = "$ac_pwd"; then
1234 srcdir=.
1235fi
1236# Remove unnecessary trailing slashes from srcdir.
1237# Double slashes in file names in object file debugging info
1238# mess up M-x gdb in Emacs.
1239case $srcdir in
1240*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1241esac
1242for ac_var in $ac_precious_vars; do
1243 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1244 eval ac_env_${ac_var}_value=\$${ac_var}
1245 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1246 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1247done
503d2be0
AS
1248
1249#
1250# Report the --help message.
1251#
1252if test "$ac_init_help" = "long"; then
1253 # Omit some internal or obsolete options to make the list less imposing.
1254 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1255 cat <<_ACEOF
5d374ce1 1256\`configure' configures emacs 23.0.60 to adapt to many kinds of systems.
503d2be0
AS
1257
1258Usage: $0 [OPTION]... [VAR=VALUE]...
1259
1260To assign environment variables (e.g., CC, CFLAGS...), specify them as
1261VAR=VALUE. See below for descriptions of some of the useful variables.
1262
1263Defaults for the options are specified in brackets.
1264
1265Configuration:
1266 -h, --help display this help and exit
1267 --help=short display options specific to this package
1268 --help=recursive display the short help of all the included packages
1269 -V, --version display version information and exit
1270 -q, --quiet, --silent do not print \`checking...' messages
1271 --cache-file=FILE cache test results in FILE [disabled]
1272 -C, --config-cache alias for \`--cache-file=config.cache'
1273 -n, --no-create do not create output files
1274 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1275
503d2be0
AS
1276Installation directories:
1277 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1278 [$ac_default_prefix]
503d2be0 1279 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1280 [PREFIX]
503d2be0
AS
1281
1282By default, \`make install' will install all the files in
1283\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1284an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1285for instance \`--prefix=\$HOME'.
1286
1287For better control, use the options below.
1288
1289Fine tuning of the installation directories:
1290 --bindir=DIR user executables [EPREFIX/bin]
1291 --sbindir=DIR system admin executables [EPREFIX/sbin]
1292 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1293 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1294 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1295 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1296 --libdir=DIR object code libraries [EPREFIX/lib]
1297 --includedir=DIR C header files [PREFIX/include]
1298 --oldincludedir=DIR C header files for non-gcc [/usr/include]
ca81d7a0
JD
1299 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1300 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1301 --infodir=DIR info documentation [DATAROOTDIR/info]
1302 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1303 --mandir=DIR man documentation [DATAROOTDIR/man]
9cf8f393 1304 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
ca81d7a0
JD
1305 --htmldir=DIR html documentation [DOCDIR]
1306 --dvidir=DIR dvi documentation [DOCDIR]
1307 --pdfdir=DIR pdf documentation [DOCDIR]
1308 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1309_ACEOF
503d2be0 1310
c0d27fcc 1311 cat <<\_ACEOF
503d2be0 1312
ba5da88a
PJ
1313Program names:
1314 --program-prefix=PREFIX prepend PREFIX to installed program names
1315 --program-suffix=SUFFIX append SUFFIX to installed program names
1316 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1317
503d2be0
AS
1318X features:
1319 --x-includes=DIR X include files are in DIR
1320 --x-libraries=DIR X library files are in DIR
1321
1322System types:
1323 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1324 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1325_ACEOF
503d2be0
AS
1326fi
1327
1328if test -n "$ac_init_help"; then
9cf8f393 1329 case $ac_init_help in
5d374ce1 1330 short | recursive ) echo "Configuration of emacs 23.0.60:";;
9cf8f393 1331 esac
c0d27fcc 1332 cat <<\_ACEOF
503d2be0
AS
1333
1334Optional Features:
1335 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1336 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
709e90de 1337 --enable-carbon-app[=DIR]
6a3a24fa 1338 specify install directory for Emacs.app on Mac OS X
709e90de 1339 [DIR=/Application]
edfda783 1340 --enable-cocoa-experimental-ctrl-g enable experimental improved ctrl-g recognition
06b62770 1341 --disable-ns-self-contained disable self contained build under NS
d0098f13 1342 --enable-asserts compile code with asserts enabled
709e90de
AS
1343 --enable-maintainer-mode
1344 enable make rules and dependencies not useful (and
1345 sometimes confusing) to the casual installer
9adfabc2
LK
1346 --enable-locallisppath=PATH
1347 directories Emacs should search for lisp files
1348 specific to this site
503d2be0
AS
1349 --disable-largefile omit support for large files
1350
1351Optional Packages:
1352 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1353 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
503d2be0
AS
1354 --without-pop don't support POP mail retrieval with movemail
1355 --with-kerberos support Kerberos-authenticated POP
1356 --with-kerberos5 support Kerberos version 5 authenticated POP
1357 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1358 --without-sound don't compile with sound support
a51f4969 1359 --without-sync-input Process async input synchronously
49adb60f
TTN
1360 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes, lucid, athena,
1361 motif, gtk, no)
c8467c40
GM
1362 --without-xpm don't compile with XPM image support
1363 --without-jpeg don't compile with JPEG image support
1364 --without-tiff don't compile with TIFF image support
1365 --without-gif don't compile with GIF image support
1366 --without-png don't compile with PNG image support
1367 --without-rsvg don't compile with SVG image support
4efcc8d1
MB
1368 --without-freetype don't use Freetype for local font support
1369 --without-xft don't use XFT for anti aliased fonts
d235ca2f
MB
1370 --without-libotf don't use libotf for OpenType font support
1371 --without-m17n-flt don't use m17n-flt for text shaping
503d2be0 1372 --without-toolkit-scroll-bars
cc227489 1373 don't use Motif or Xaw3d scroll bars
c982cf7d 1374 --without-xaw3d don't use Xaw3d
cc227489 1375 --without-xim don't use X11 XIM
2aea825c 1376 --with-carbon use Carbon GUI on Mac OS X. This is unsupported!
edfda783 1377 --with-ns use nextstep (Cocoa or GNUstep) windowing system
c8467c40
GM
1378 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1379 console
b5a922de 1380 --without-dbus don't compile with D-Bus support
921fbdf0 1381 --without-makeinfo don't require makeinfo for building manuals
9d2818d6 1382
00b9c927
MO
1383 --with-pkg-config-prog=PATH
1384 Path to pkg-config for finding GTK and librsvg
503d2be0
AS
1385 --with-x use the X Window System
1386
1387Some influential environment variables:
1388 CC C compiler command
1389 CFLAGS C compiler flags
1390 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1391 nonstandard directory <lib dir>
f053c89f 1392 LIBS libraries to pass to the linker, e.g. -l<library>
ca81d7a0
JD
1393 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1394 you have headers in a nonstandard directory <include dir>
503d2be0 1395 CPP C preprocessor
ca81d7a0 1396 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1397
1398Use these variables to override the choices made by `configure' or to help
1399it to find libraries and programs with nonstandard names/locations.
1400
c0d27fcc 1401_ACEOF
ca81d7a0 1402ac_status=$?
503d2be0
AS
1403fi
1404
1405if test "$ac_init_help" = "recursive"; then
1406 # If there are subdirs, report their specific --help.
c0d27fcc 1407 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
ca81d7a0 1408 test -d "$ac_dir" || continue
c0d27fcc
MR
1409 ac_builddir=.
1410
ca81d7a0
JD
1411case "$ac_dir" in
1412.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1413*)
c0d27fcc 1414 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
1415 # A ".." for each directory in $ac_dir_suffix.
1416 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1417 case $ac_top_builddir_sub in
1418 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1419 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1420 esac ;;
1421esac
1422ac_abs_top_builddir=$ac_pwd
1423ac_abs_builddir=$ac_pwd$ac_dir_suffix
1424# for backward compatibility:
1425ac_top_builddir=$ac_top_build_prefix
503d2be0 1426
c0d27fcc 1427case $srcdir in
ca81d7a0 1428 .) # We are building in place.
c0d27fcc 1429 ac_srcdir=.
ca81d7a0
JD
1430 ac_top_srcdir=$ac_top_builddir_sub
1431 ac_abs_top_srcdir=$ac_pwd ;;
1432 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1433 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1434 ac_top_srcdir=$srcdir
1435 ac_abs_top_srcdir=$srcdir ;;
1436 *) # Relative name.
1437 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1438 ac_top_srcdir=$ac_top_build_prefix$srcdir
1439 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1440esac
ca81d7a0
JD
1441ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1442
1443 cd "$ac_dir" || { ac_status=$?; continue; }
1444 # Check for guested configure.
1445 if test -f "$ac_srcdir/configure.gnu"; then
1446 echo &&
1447 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1448 elif test -f "$ac_srcdir/configure"; then
1449 echo &&
1450 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1451 else
c0d27fcc 1452 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1453 fi || ac_status=$?
1454 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1455 done
1456fi
1457
ca81d7a0 1458test -n "$ac_init_help" && exit $ac_status
503d2be0 1459if $ac_init_version; then
c0d27fcc 1460 cat <<\_ACEOF
5d374ce1 1461emacs configure 23.0.60
f053c89f 1462generated by GNU Autoconf 2.61
503d2be0 1463
ca81d7a0
JD
1464Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14652002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1466This configure script is free software; the Free Software Foundation
1467gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1468_ACEOF
ca81d7a0 1469 exit
503d2be0 1470fi
ca81d7a0 1471cat >config.log <<_ACEOF
503d2be0
AS
1472This file contains any messages produced by compilers while
1473running configure, to aid debugging if configure makes a mistake.
1474
5d374ce1 1475It was created by emacs $as_me 23.0.60, which was
f053c89f 1476generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1477
1478 $ $0 $@
1479
c0d27fcc 1480_ACEOF
ca81d7a0 1481exec 5>>config.log
503d2be0
AS
1482{
1483cat <<_ASUNAME
c0d27fcc
MR
1484## --------- ##
1485## Platform. ##
1486## --------- ##
503d2be0
AS
1487
1488hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1489uname -m = `(uname -m) 2>/dev/null || echo unknown`
1490uname -r = `(uname -r) 2>/dev/null || echo unknown`
1491uname -s = `(uname -s) 2>/dev/null || echo unknown`
1492uname -v = `(uname -v) 2>/dev/null || echo unknown`
1493
1494/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1495/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1496
1497/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1498/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1499/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ca81d7a0 1500/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1501/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1502/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1503/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1504
925c2f3f 1505_ASUNAME
c0d27fcc
MR
1506
1507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1508for as_dir in $PATH
1509do
1510 IFS=$as_save_IFS
1511 test -z "$as_dir" && as_dir=.
1512 echo "PATH: $as_dir"
1513done
ca81d7a0 1514IFS=$as_save_IFS
c0d27fcc 1515
503d2be0
AS
1516} >&5
1517
c0d27fcc
MR
1518cat >&5 <<_ACEOF
1519
1520
1521## ----------- ##
1522## Core tests. ##
1523## ----------- ##
1524
1525_ACEOF
503d2be0 1526
503d2be0
AS
1527
1528# Keep a trace of the command line.
1529# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1530# Strip out --silent because we don't want to record it for future runs.
503d2be0 1531# Also quote any args containing shell meta-characters.
19650fd6 1532# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1533ac_configure_args=
19650fd6
AS
1534ac_configure_args0=
1535ac_configure_args1=
19650fd6
AS
1536ac_must_keep_next=false
1537for ac_pass in 1 2
503d2be0 1538do
19650fd6
AS
1539 for ac_arg
1540 do
1541 case $ac_arg in
1542 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1543 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1544 | -silent | --silent | --silen | --sile | --sil)
1545 continue ;;
ca81d7a0 1546 *\'*)
19650fd6
AS
1547 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1548 esac
1549 case $ac_pass in
1550 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1551 2)
1552 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1553 if test $ac_must_keep_next = true; then
edfaf76d 1554 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1555 else
edfaf76d
LK
1556 case $ac_arg in
1557 *=* | --config-cache | -C | -disable-* | --disable-* \
1558 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1559 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1560 | -with-* | --with-* | -without-* | --without-* | --x)
1561 case "$ac_configure_args0 " in
1562 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1563 esac
1564 ;;
1565 -* ) ac_must_keep_next=true ;;
1566 esac
19650fd6 1567 fi
ca81d7a0 1568 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1569 ;;
1570 esac
1571 done
503d2be0 1572done
19650fd6
AS
1573$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1574$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1575
1576# When interrupted or exit'd, cleanup temporary files, and complete
1577# config.log. We remove comments because anyway the quotes in there
1578# would cause problems or look ugly.
ca81d7a0
JD
1579# WARNING: Use '\'' to represent an apostrophe within the trap.
1580# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1581trap 'exit_status=$?
1582 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1583 {
1584 echo
6bae0ccf 1585
c0d27fcc
MR
1586 cat <<\_ASBOX
1587## ---------------- ##
1588## Cache variables. ##
1589## ---------------- ##
1590_ASBOX
1591 echo
1592 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
1593(
1594 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1595 eval ac_val=\$$ac_var
1596 case $ac_val in #(
1597 *${as_nl}*)
1598 case $ac_var in #(
1599 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1600echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1601 esac
1602 case $ac_var in #(
1603 _ | IFS | as_nl) ;; #(
1604 *) $as_unset $ac_var ;;
1605 esac ;;
1606 esac
1607 done
503d2be0 1608 (set) 2>&1 |
ca81d7a0
JD
1609 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1610 *${as_nl}ac_space=\ *)
503d2be0 1611 sed -n \
ca81d7a0
JD
1612 "s/'\''/'\''\\\\'\'''\''/g;
1613 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1614 ;; #(
503d2be0 1615 *)
ca81d7a0 1616 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1617 ;;
ca81d7a0
JD
1618 esac |
1619 sort
1620)
c0d27fcc 1621 echo
6bae0ccf
DL
1622
1623 cat <<\_ASBOX
1624## ----------------- ##
1625## Output variables. ##
1626## ----------------- ##
1627_ASBOX
1628 echo
1629 for ac_var in $ac_subst_vars
1630 do
ca81d7a0
JD
1631 eval ac_val=\$$ac_var
1632 case $ac_val in
1633 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1634 esac
1635 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1636 done | sort
1637 echo
1638
1639 if test -n "$ac_subst_files"; then
1640 cat <<\_ASBOX
ca81d7a0
JD
1641## ------------------- ##
1642## File substitutions. ##
1643## ------------------- ##
6bae0ccf
DL
1644_ASBOX
1645 echo
1646 for ac_var in $ac_subst_files
1647 do
ca81d7a0
JD
1648 eval ac_val=\$$ac_var
1649 case $ac_val in
1650 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1651 esac
1652 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1653 done | sort
1654 echo
1655 fi
1656
c0d27fcc
MR
1657 if test -s confdefs.h; then
1658 cat <<\_ASBOX
1659## ----------- ##
1660## confdefs.h. ##
1661## ----------- ##
1662_ASBOX
1663 echo
ca81d7a0 1664 cat confdefs.h
c0d27fcc
MR
1665 echo
1666 fi
1667 test "$ac_signal" != 0 &&
1668 echo "$as_me: caught signal $ac_signal"
1669 echo "$as_me: exit $exit_status"
1670 } >&5
ca81d7a0
JD
1671 rm -f core *.core core.conftest.* &&
1672 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1673 exit $exit_status
ca81d7a0 1674' 0
503d2be0
AS
1675for ac_signal in 1 2 13 15; do
1676 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1677done
1678ac_signal=0
1679
1680# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 1681rm -f -r conftest* confdefs.h
ba4481b5 1682
c0d27fcc
MR
1683# Predefined preprocessor variables.
1684
1685cat >>confdefs.h <<_ACEOF
1686#define PACKAGE_NAME "$PACKAGE_NAME"
1687_ACEOF
1688
1689
1690cat >>confdefs.h <<_ACEOF
1691#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1692_ACEOF
1693
1694
1695cat >>confdefs.h <<_ACEOF
1696#define PACKAGE_VERSION "$PACKAGE_VERSION"
1697_ACEOF
1698
1699
1700cat >>confdefs.h <<_ACEOF
1701#define PACKAGE_STRING "$PACKAGE_STRING"
1702_ACEOF
1703
1704
1705cat >>confdefs.h <<_ACEOF
1706#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1707_ACEOF
1708
1709
503d2be0 1710# Let the site file select an alternate cache file if it wants to.
ba4481b5 1711# Prefer explicitly selected file to automatically selected ones.
ca81d7a0
JD
1712if test -n "$CONFIG_SITE"; then
1713 set x "$CONFIG_SITE"
1714elif test "x$prefix" != xNONE; then
1715 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1716else
1717 set x "$ac_default_prefix/share/config.site" \
1718 "$ac_default_prefix/etc/config.site"
ba4481b5 1719fi
ca81d7a0
JD
1720shift
1721for ac_site_file
1722do
ba4481b5 1723 if test -r "$ac_site_file"; then
c0d27fcc 1724 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1725echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1726 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1727 . "$ac_site_file"
1728 fi
1729done
1730
1731if test -r "$cache_file"; then
503d2be0
AS
1732 # Some versions of bash will fail to source /dev/null (special
1733 # files actually), so we avoid doing that.
1734 if test -f "$cache_file"; then
c0d27fcc 1735 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1736echo "$as_me: loading cache $cache_file" >&6;}
1737 case $cache_file in
ca81d7a0
JD
1738 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1739 *) . "./$cache_file";;
503d2be0
AS
1740 esac
1741 fi
ba4481b5 1742else
c0d27fcc 1743 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1744echo "$as_me: creating cache $cache_file" >&6;}
1745 >$cache_file
1746fi
1747
f053c89f
CY
1748ac_header_list="$ac_header_list sys/time.h"
1749ac_header_list="$ac_header_list unistd.h"
1750ac_func_list="$ac_func_list alarm"
503d2be0
AS
1751# Check that the precious variables saved in the cache have kept the same
1752# value.
1753ac_cache_corrupted=false
ca81d7a0 1754for ac_var in $ac_precious_vars; do
503d2be0
AS
1755 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1756 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
1757 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1758 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1759 case $ac_old_set,$ac_new_set in
1760 set,)
c0d27fcc 1761 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1762echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1763 ac_cache_corrupted=: ;;
1764 ,set)
c0d27fcc 1765 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1766echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1767 ac_cache_corrupted=: ;;
1768 ,);;
1769 *)
1770 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1771 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1772echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1773 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1774echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1775 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1776echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1777 ac_cache_corrupted=:
503d2be0
AS
1778 fi;;
1779 esac
c0d27fcc 1780 # Pass precious variables to config.status.
503d2be0
AS
1781 if test "$ac_new_set" = set; then
1782 case $ac_new_val in
ca81d7a0 1783 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1784 *) ac_arg=$ac_var=$ac_new_val ;;
1785 esac
1786 case " $ac_configure_args " in
1787 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1788 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1789 esac
1790 fi
1791done
1792if $ac_cache_corrupted; then
c0d27fcc 1793 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1794echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1795 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1796echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1797 { (exit 1); exit 1; }; }
ba4481b5
DL
1798fi
1799
c0d27fcc
MR
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
9cf8f393
JD
1811
1812
1813
1814
1815
1816
1817
1818
c0d27fcc
MR
1819
1820
1821
1822
1823
ca81d7a0
JD
1824ac_ext=c
1825ac_cpp='$CPP $CPPFLAGS'
1826ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1827ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1828ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 1829
6bae0ccf 1830
ca81d7a0 1831ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1832
c0d27fcc 1833
9fb1ba80 1834
ba5da88a 1835test "$program_prefix" != NONE &&
ca81d7a0 1836 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1837# Use a double $ so make ignores it.
1838test "$program_suffix" != NONE &&
ca81d7a0 1839 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1840# Double any \ or $. echo might interpret backslashes.
1841# By default was `s,x,x', remove it if useless.
1842cat <<\_ACEOF >conftest.sed
1843s/[\\$]/&&/g;s/;s,x,x,$//
1844_ACEOF
1845program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
ca81d7a0 1846rm -f conftest.sed
ba5da88a 1847
c0d27fcc 1848
ba4481b5
DL
1849lispdir='${datadir}/emacs/${version}/lisp'
1850locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1851'${datadir}/emacs/site-lisp'
1852lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1853etcdir='${datadir}/emacs/${version}/etc'
1854archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1855docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1856gamedir='${localstatedir}/games/emacs'
98418dba
CW
1857
1858gameuser=games
1859
c0d27fcc 1860
49adb60f 1861
00b9c927 1862
ca81d7a0 1863# Check whether --with-pop was given.
ba4481b5 1864if test "${with_pop+set}" = set; then
00b9c927 1865 withval=$with_pop;
3d9fec71 1866else
00b9c927
MO
1867 with_pop=yes
1868fi
1869
1870if test "$with_pop" = yes; then
1871 cat >>confdefs.h <<\_ACEOF
3d9fec71 1872#define MAIL_USE_POP 1
c0d27fcc 1873_ACEOF
3d9fec71 1874
ca81d7a0 1875fi
ba4481b5 1876
c0d27fcc 1877
c0d27fcc 1878
ca81d7a0 1879# Check whether --with-kerberos was given.
a21616bd 1880if test "${with_kerberos+set}" = set; then
00b9c927
MO
1881 withval=$with_kerberos;
1882else
1883 with_kerberos=no
1884fi
1885
ff1095d1 1886if test "$with_kerberos" != no; then
54e6585f 1887 cat >>confdefs.h <<\_ACEOF
a21616bd 1888#define KERBEROS 1
c0d27fcc 1889_ACEOF
a21616bd 1890
ca81d7a0 1891fi
c0d27fcc 1892
c0d27fcc 1893
49adb60f 1894
ca81d7a0 1895# Check whether --with-kerberos5 was given.
a21616bd 1896if test "${with_kerberos5+set}" = set; then
00b9c927
MO
1897 withval=$with_kerberos5;
1898else
1899 with_kerberos5=no
1900fi
1901
ff1095d1
AR
1902if test "${with_kerberos5}" != no; then
1903 if test "${with_kerberos}" = no; then
a21616bd 1904 with_kerberos=yes
c0d27fcc 1905 cat >>confdefs.h <<\_ACEOF
a21616bd 1906#define KERBEROS 1
c0d27fcc 1907_ACEOF
a21616bd
KR
1908
1909 fi
b936fae4 1910
c0d27fcc 1911cat >>confdefs.h <<\_ACEOF
a21616bd 1912#define KERBEROS5 1
c0d27fcc 1913_ACEOF
a21616bd 1914
ca81d7a0 1915fi
b936fae4 1916
49adb60f 1917
ca81d7a0
JD
1918# Check whether --with-hesiod was given.
1919if test "${with_hesiod+set}" = set; then
00b9c927
MO
1920 withval=$with_hesiod;
1921else
1922 with_hesiod=no
1923fi
1924
ff1095d1 1925if test "$with_hesiod" != no; then
54e6585f 1926
c0d27fcc 1927cat >>confdefs.h <<\_ACEOF
ba4481b5 1928#define HESIOD 1
c0d27fcc 1929_ACEOF
ba4481b5 1930
ca81d7a0 1931fi
c0d27fcc 1932
c0d27fcc 1933
ca81d7a0 1934# Check whether --with-sound was given.
2c9dccc9 1935if test "${with_sound+set}" = set; then
ca81d7a0 1936 withval=$with_sound;
00b9c927
MO
1937else
1938 with_sound=yes
ca81d7a0 1939fi
2c9dccc9 1940
2c9dccc9 1941
c0d27fcc 1942
a51f4969
SM
1943# Check whether --with-sync-input was given.
1944if test "${with_sync_input+set}" = set; then
1945 withval=$with_sync_input;
1946else
1947 with_sync_input=yes
1948fi
1949
1950if test "$with_sync_input" = yes; then
1951
1952cat >>confdefs.h <<\_ACEOF
1953#define SYNC_INPUT 1
1954_ACEOF
1955
1956fi
1957
1958
ca81d7a0 1959# Check whether --with-x-toolkit was given.
ba4481b5 1960if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1961 withval=$with_x_toolkit; case "${withval}" in
089a966d 1962 y | ye | yes ) val=gtk ;;
ba4481b5
DL
1963 n | no ) val=no ;;
1964 l | lu | luc | luci | lucid ) val=lucid ;;
1965 a | at | ath | athe | athen | athena ) val=athena ;;
1966 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1967 g | gt | gtk ) val=gtk ;;
ba4481b5 1968 * )
29d69661 1969{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1970this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661
JD
1971\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
1972echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1973this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1974\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
503d2be0 1975 { (exit 1); exit 1; }; }
ba4481b5
DL
1976 ;;
1977 esac
1978 with_x_toolkit=$val
1979
ca81d7a0 1980fi
8eeae1c9 1981
ba4481b5 1982
49adb60f 1983
ca81d7a0 1984# Check whether --with-xpm was given.
ba4481b5 1985if test "${with_xpm+set}" = set; then
ca81d7a0 1986 withval=$with_xpm;
00b9c927 1987else
c8467c40 1988 with_xpm=yes
ca81d7a0 1989fi
503d2be0 1990
ba4481b5 1991
ca81d7a0 1992# Check whether --with-jpeg was given.
ba4481b5 1993if test "${with_jpeg+set}" = set; then
ca81d7a0 1994 withval=$with_jpeg;
00b9c927 1995else
c8467c40 1996 with_jpeg=yes
ca81d7a0 1997fi
503d2be0 1998
ba4481b5 1999
ca81d7a0 2000# Check whether --with-tiff was given.
ba4481b5 2001if test "${with_tiff+set}" = set; then
ca81d7a0 2002 withval=$with_tiff;
00b9c927 2003else
c8467c40 2004 with_tiff=yes
ca81d7a0 2005fi
503d2be0 2006
ba4481b5 2007
ca81d7a0 2008# Check whether --with-gif was given.
ba4481b5 2009if test "${with_gif+set}" = set; then
ca81d7a0 2010 withval=$with_gif;
00b9c927 2011else
c8467c40 2012 with_gif=yes
ca81d7a0 2013fi
503d2be0 2014
ba4481b5 2015
ca81d7a0 2016# Check whether --with-png was given.
ba4481b5 2017if test "${with_png+set}" = set; then
ca81d7a0 2018 withval=$with_png;
00b9c927 2019else
c8467c40 2020 with_png=yes
ca81d7a0 2021fi
503d2be0 2022
ba4481b5 2023
0cfc0546
GM
2024# Check whether --with-rsvg was given.
2025if test "${with_rsvg+set}" = set; then
2026 withval=$with_rsvg;
00b9c927 2027else
c8467c40 2028 with_rsvg=yes
0cfc0546
GM
2029fi
2030
2031
c8467c40 2032
c24fa7dc 2033# Check whether --with-freetype was given.
45a4b03e 2034if test "${with_freetype+set}" = set; then
c24fa7dc 2035 withval=$with_freetype;
d235ca2f 2036else
4efcc8d1 2037 with_freetype=yes
c24fa7dc 2038fi
45a4b03e 2039
45a4b03e 2040
c24fa7dc 2041# Check whether --with-xft was given.
45a4b03e 2042if test "${with_xft+set}" = set; then
c24fa7dc 2043 withval=$with_xft;
d235ca2f 2044else
4efcc8d1 2045 with_xft=yes
c24fa7dc 2046fi
45a4b03e 2047
45a4b03e 2048
d235ca2f
MB
2049# Check whether --with-libotf was given.
2050if test "${with_libotf+set}" = set; then
2051 withval=$with_libotf;
2052else
2053 with_libotf=yes
79011b82
NR
2054fi
2055
2056
d235ca2f
MB
2057# Check whether --with-m17n-flt was given.
2058if test "${with_m17n_flt+set}" = set; then
2059 withval=$with_m17n_flt;
2060else
2061 with_m17n_flt=yes
0cfc0546
GM
2062fi
2063
2064
d235ca2f 2065
ca81d7a0 2066# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 2067if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0 2068 withval=$with_toolkit_scroll_bars;
00b9c927
MO
2069else
2070 with_toolkit_scroll_bars=yes
ca81d7a0 2071fi
503d2be0 2072
ba4481b5 2073
e35a28cd
TTN
2074# Check whether --with-xaw3d was given.
2075if test "${with_xaw3d+set}" = set; then
2076 withval=$with_xaw3d;
00b9c927
MO
2077else
2078 with_xaw3d=yes
c982cf7d
JD
2079fi
2080
2081
ca81d7a0 2082# Check whether --with-xim was given.
1d36487c 2083if test "${with_xim+set}" = set; then
ca81d7a0 2084 withval=$with_xim;
00b9c927
MO
2085else
2086 with_xim=yes
ca81d7a0 2087fi
1d36487c 2088
ba4481b5 2089
ca81d7a0 2090# Check whether --with-carbon was given.
e0f712ba 2091if test "${with_carbon+set}" = set; then
ca81d7a0 2092 withval=$with_carbon;
00b9c927 2093else
c8467c40
GM
2094 with_carbon=no
2095fi
2096
2097
edfda783
AR
2098# Check whether --with-ns was given.
2099if test "${with_ns+set}" = set; then
2100 withval=$with_ns;
2101else
2102 with_ns=no
2103fi
2104
2105
c8467c40
GM
2106
2107# Check whether --with-gpm was given.
2108if test "${with_gpm+set}" = set; then
2109 withval=$with_gpm;
2110else
2111 with_gpm=yes
ca81d7a0 2112fi
e0f712ba 2113
49adb60f 2114
131e4133
MA
2115# Check whether --with-dbus was given.
2116if test "${with_dbus+set}" = set; then
2117 withval=$with_dbus;
00b9c927 2118else
b5a922de 2119 with_dbus=yes
131e4133
MA
2120fi
2121
2122
921fbdf0
GM
2123## For the times when you want to build Emacs but don't have
2124## a suitable makeinfo, and can live without the manuals.
2125
2126# Check whether --with-makeinfo was given.
2127if test "${with_makeinfo+set}" = set; then
2128 withval=$with_makeinfo;
2129else
2130 with_makeinfo=yes
2131fi
2132
2133
e70b2110 2134
9d2818d6
DN
2135# Check whether --with-gtk was given.
2136if test "${with_gtk+set}" = set; then
2137 withval=$with_gtk; { { echo "$as_me:$LINENO: error: --with-gtk has been removed. Use --with-x-toolkit to
2138specify a toolkit." >&5
2139echo "$as_me: error: --with-gtk has been removed. Use --with-x-toolkit to
2140specify a toolkit." >&2;}
2141 { (exit 1); exit 1; }; }
2142fi
2143
2144
2145
2146# Check whether --with-gcc was given.
2147if test "${with_gcc+set}" = set; then
2148 withval=$with_gcc; { { echo "$as_me:$LINENO: error: --with-gcc has been removed. Set the \`CC' environment
2149 variable to specify a compiler." >&5
2150echo "$as_me: error: --with-gcc has been removed. Set the \`CC' environment
2151 variable to specify a compiler." >&2;}
2152 { (exit 1); exit 1; }; }
2153fi
2154
2155
2156
00b9c927
MO
2157# Check whether --with-pkg-config-prog was given.
2158if test "${with_pkg_config_prog+set}" = set; then
2159 withval=$with_pkg_config_prog;
e70b2110
KH
2160fi
2161
00b9c927
MO
2162if test "X${with_pkg_config_prog}" != X; then
2163 if test "${with_pkg_config_prog}" != yes; then
2164 PKG_CONFIG="${with_pkg_config_prog}"
2165 fi
2166fi
e70b2110 2167
ca81d7a0 2168# Check whether --enable-carbon-app was given.
6a3a24fa 2169if test "${enable_carbon_app+set}" = set; then
ca81d7a0
JD
2170 enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
2171fi
2172
e0f712ba 2173
edfda783
AR
2174# Check whether --enable-cocoa-experimental-ctrl-g was given.
2175if test "${enable_cocoa_experimental_ctrl_g+set}" = set; then
2176 enableval=$enable_cocoa_experimental_ctrl_g; EN_COCOA_EXPERIMENTAL_CTRL_G=yes
2177else
2178 EN_COCOA_EXPERIMENTAL_CTRL_G=no
2179fi
2180
2181
06b62770
AR
2182# Check whether --enable-ns-self-contained was given.
2183if test "${enable_ns_self_contained+set}" = set; then
2184 enableval=$enable_ns_self_contained; EN_NS_SELF_CONTAINED=no
2185else
2186 EN_NS_SELF_CONTAINED=yes
2187fi
2188
2189
c24fa7dc 2190# Check whether --enable-asserts was given.
d0098f13 2191if test "${enable_asserts+set}" = set; then
ca81d7a0 2192 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
2193else
2194 USE_XASSERTS=no
ca81d7a0 2195fi
8eeae1c9 2196
d0098f13 2197
ca81d7a0 2198# Check whether --enable-maintainer-mode was given.
19650fd6 2199if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 2200 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
2201else
2202 USE_MAINTAINER_MODE=no
ca81d7a0
JD
2203fi
2204
19650fd6
AS
2205if test $USE_MAINTAINER_MODE = yes; then
2206 MAINT=
2207else
2208 MAINT=#
2209fi
2210
2211
ca81d7a0 2212# Check whether --enable-locallisppath was given.
9adfabc2 2213if test "${enable_locallisppath+set}" = set; then
ca81d7a0 2214 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2215 locallisppath=
2216elif test "${enableval}" != "yes"; then
2217 locallisppath=${enableval}
2218fi
ca81d7a0
JD
2219fi
2220
9adfabc2 2221
ba4481b5 2222#### Make srcdir absolute, if it isn't already. It's important to
17494071 2223#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2224#### give you automounter prefixes, which can go away. We do all this
2225#### so Emacs can find its files when run uninstalled.
17494071
GM
2226## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2227unset CDPATH
ba4481b5
DL
2228case "${srcdir}" in
2229 /* ) ;;
2230 . )
2231 ## We may be able to use the $PWD environment variable to make this
2232 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2233 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2234 ## but that tested only for a well-formed and valid PWD,
2235 ## it did not object when PWD was well-formed and valid but just wrong.
2236 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2237 then
2238 srcdir="$PWD"
2239 else
2240 srcdir="`(cd ${srcdir}; pwd)`"
2241 fi
2242 ;;
2243 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2244esac
2245
2246#### Check if the source directory already has a configured system in it.
2247if test `pwd` != `(cd ${srcdir} && pwd)` \
2248 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2249 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2250 as a build directory right now; it has been configured in its own
2251 right. To configure in another directory as well, you MUST
2252 use GNU make. If you do not have GNU make, then you must
2253 now do \`make distclean' in ${srcdir},
2254 and then run $0 again." >&5
2255echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2256 as a build directory right now; it has been configured in its own
2257 right. To configure in another directory as well, you MUST
2258 use GNU make. If you do not have GNU make, then you must
2259 now do \`make distclean' in ${srcdir},
503d2be0 2260 and then run $0 again." >&2;}
ba4481b5
DL
2261fi
2262
2263#### Given the configuration name, set machfile and opsysfile to the
2264#### names of the m/*.h and s/*.h files we should use.
2265
2266### Canonicalize the configuration name.
2267
2268ac_aux_dir=
ca81d7a0
JD
2269for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2270 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2271 ac_aux_dir=$ac_dir
2272 ac_install_sh="$ac_aux_dir/install-sh -c"
2273 break
ca81d7a0 2274 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2275 ac_aux_dir=$ac_dir
2276 ac_install_sh="$ac_aux_dir/install.sh -c"
2277 break
ca81d7a0 2278 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2279 ac_aux_dir=$ac_dir
2280 ac_install_sh="$ac_aux_dir/shtool install -c"
2281 break
ba4481b5
DL
2282 fi
2283done
2284if test -z "$ac_aux_dir"; then
ca81d7a0
JD
2285 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2286echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2287 { (exit 1); exit 1; }; }
ba4481b5 2288fi
ca81d7a0
JD
2289
2290# These three variables are undocumented and unsupported,
2291# and are intended to be withdrawn in a future Autoconf release.
2292# They can cause serious problems if a builder's source tree is in a directory
2293# whose full name contains unusual characters.
2294ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2295ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2296ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2297
ba4481b5
DL
2298
2299# Make sure we can run config.sub.
ca81d7a0
JD
2300$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2301 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2302echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2303 { (exit 1); exit 1; }; }
2304
ca81d7a0
JD
2305{ echo "$as_me:$LINENO: checking build system type" >&5
2306echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2307if test "${ac_cv_build+set}" = set; then
2308 echo $ECHO_N "(cached) $ECHO_C" >&6
2309else
ca81d7a0
JD
2310 ac_build_alias=$build_alias
2311test "x$ac_build_alias" = x &&
2312 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2313test "x$ac_build_alias" = x &&
c0d27fcc 2314 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2315echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2316 { (exit 1); exit 1; }; }
ca81d7a0
JD
2317ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2318 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2319echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2320 { (exit 1); exit 1; }; }
2321
2322fi
ca81d7a0
JD
2323{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2324echo "${ECHO_T}$ac_cv_build" >&6; }
2325case $ac_cv_build in
2326*-*-*) ;;
2327*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2328echo "$as_me: error: invalid value of canonical build" >&2;}
2329 { (exit 1); exit 1; }; };;
2330esac
503d2be0 2331build=$ac_cv_build
ca81d7a0
JD
2332ac_save_IFS=$IFS; IFS='-'
2333set x $ac_cv_build
2334shift
2335build_cpu=$1
2336build_vendor=$2
2337shift; shift
2338# Remember, the first character of IFS is used to create $*,
2339# except with old shells:
2340build_os=$*
2341IFS=$ac_save_IFS
2342case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2343
2344
2345{ echo "$as_me:$LINENO: checking host system type" >&5
2346echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2347if test "${ac_cv_host+set}" = set; then
2348 echo $ECHO_N "(cached) $ECHO_C" >&6
2349else
ca81d7a0
JD
2350 if test "x$host_alias" = x; then
2351 ac_cv_host=$ac_cv_build
2352else
2353 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2354 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2355echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2356 { (exit 1); exit 1; }; }
ca81d7a0 2357fi
503d2be0
AS
2358
2359fi
ca81d7a0
JD
2360{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2361echo "${ECHO_T}$ac_cv_host" >&6; }
2362case $ac_cv_host in
2363*-*-*) ;;
2364*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2365echo "$as_me: error: invalid value of canonical host" >&2;}
2366 { (exit 1); exit 1; }; };;
2367esac
503d2be0 2368host=$ac_cv_host
ca81d7a0
JD
2369ac_save_IFS=$IFS; IFS='-'
2370set x $ac_cv_host
2371shift
2372host_cpu=$1
2373host_vendor=$2
2374shift; shift
2375# Remember, the first character of IFS is used to create $*,
2376# except with old shells:
2377host_os=$*
2378IFS=$ac_save_IFS
2379case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2380
c0d27fcc 2381
ba4481b5 2382canonical=$host
1770dcdc 2383configuration=${host_alias-${build_alias-$host}}
ba4481b5 2384
c0d27fcc 2385
22044edf 2386
ba4481b5
DL
2387### If you add support for a new configuration, add code to this
2388### switch statement to recognize your configuration name and select
2389### the appropriate operating system and machine description files.
2390
2391### You would hope that you could choose an m/*.h file pretty much
2392### based on the machine portion of the configuration name, and an s-
2393### file based on the operating system portion. However, it turns out
2394### that each m/*.h file is pretty manufacturer-specific - for
f2a77c3a
DN
2395### example mips.h is MIPS
2396### So we basically have to have a special case for each
ba4481b5
DL
2397### configuration name.
2398###
2399### As far as handling version numbers on operating systems is
2400### concerned, make sure things will fail in a fixable way. If
2401### /etc/MACHINES doesn't say anything about version numbers, be
2402### prepared to handle anything reasonably. If version numbers
2403### matter, be sure /etc/MACHINES says something about it.
2404###
2405### Eric Raymond says we should accept strings like "sysvr4" to mean
2406### "System V Release 4"; he writes, "The old convention encouraged
2407### confusion between `system' and `release' levels'."
2408
2409machine='' opsys='' unported=no
2410case "${canonical}" in
2411
1096bcc0 2412 ## FreeBSD ports
6b0273cd 2413 *-*-freebsd* )
1096bcc0
GM
2414 opsys=freebsd
2415 case "${canonical}" in
2416 alpha*-*-freebsd*) machine=alpha ;;
ece58427 2417 arm*-*-freebsd*) machine=arm ;;
ec8fcb10 2418 ia64-*-freebsd*) machine=ia64 ;;
ff1095d1 2419 sparc-*-freebsd*) machine=sparc ;;
ec8fcb10
YM
2420 sparc64-*-freebsd*) machine=sparc ;;
2421 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2422 i[3456]86-*-freebsd*) machine=intel386 ;;
6b0273cd 2423 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2424 esac
2425 ;;
2426
1b275743
GM
2427 ## FreeBSD kernel + glibc based userland
2428 *-*-kfreebsd*gnu* )
2429 opsys=gnu-kfreebsd
2430 case "${canonical}" in
2431 alpha*-*-kfreebsd*) machine=alpha ;;
2432 ia64-*-kfreebsd*) machine=ia64 ;;
edfda783 2433 sparc-*-kfreebsd*) machine=sparc ;;
1b275743
GM
2434 sparc64-*-kfreebsd*) machine=sparc ;;
2435 powerpc-*-kfreebsd*) machine=macppc ;;
2436 i[3456]86-*-kfreebsd*) machine=intel386 ;;
2437 amd64-*-kfreebsd*|x86_64-*-kfreebsd*) machine=amdx86-64 ;;
2438 esac
2439 ;;
2440
ba4481b5
DL
2441 ## NetBSD ports
2442 *-*-netbsd* )
2443 opsys=netbsd
dd038e26 2444 if test -f /usr/lib/crti.o; then
f57bd967
DL
2445
2446cat >>confdefs.h <<\_ACEOF
2447#define HAVE_CRTIN
dd038e26
AS
2448_ACEOF
2449
2450 fi
2451
ba4481b5
DL
2452 case "${canonical}" in
2453 alpha*-*-netbsd*) machine=alpha ;;
2454 i[3456]86-*-netbsd*) machine=intel386 ;;
3a64eef5 2455 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2456 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2457 vax-*-netbsd*) machine=vax ;;
2df636f4 2458 arm-*-netbsd*) machine=arm ;;
d54ee7b4
EZ
2459 x86_64-*-netbsd*) machine=amdx86-64 ;;
2460 hppa-*-netbsd*) machine=hp800 ;;
ba4481b5
DL
2461 esac
2462 ;;
2463
2464 ## OpenBSD ports
2465 *-*-openbsd* )
2466 opsys=openbsd
2467 case "${canonical}" in
2468 alpha*-*-openbsd*) machine=alpha ;;
85410b02 2469 arm-*-openbsd*) machine=arm ;;
85410b02 2470 i386-*-openbsd*) machine=intel386 ;;
85410b02 2471 powerpc-*-openbsd*) machine=macppc ;;
85410b02
CY
2472 sparc*-*-openbsd*) machine=sparc ;;
2473 vax-*-openbsd*) machine=vax ;;
2474 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2475 esac
2476 ;;
2477
10a3b1a1
EZ
2478 ## LynxOS ports
2479 *-*-lynxos* )
2480 opsys=lynxos
2481 case "${canonical}" in
2482 i[3456]86-*-lynxos*) machine=intel386 ;;
2483 powerpc-*-lynxos*) machine=powerpc ;;
2484 esac
2485 ;;
2486
ba4481b5
DL
2487 alpha*-*-linux-gnu* )
2488 machine=alpha opsys=gnu-linux
2489 ;;
2490
c4bb2108
DL
2491 arm*-*-linux-gnu* )
2492 machine=arm opsys=gnu-linux
2493 ;;
2494
040c474e
CY
2495 ## Apple Darwin / Mac OS X
2496 *-apple-darwin* )
2497 case "${canonical}" in
2498 i[3456]86-* ) machine=intel386 ;;
40dde9d1 2499 powerpc-* ) machine=macppc ;;
040c474e
CY
2500 * ) unported=yes ;;
2501 esac
2502 opsys=darwin
2503 # Define CPP as follows to make autoconf work correctly.
2504 CPP="${CC-cc} -E -no-cpp-precomp"
2505 # Use fink packages if available.
2506 if test -d /sw/include && test -d /sw/lib; then
2507 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2508 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2509 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2510 fi
2511 ;;
2512
6fbb6db1 2513 ## HP 9000 series 700 and 800, running HP/UX
6fbb6db1
GM
2514 hppa*-hp-hpux10.2* )
2515 machine=hp800 opsys=hpux10-20
2516 ;;
6fbb6db1
GM
2517 hppa*-hp-hpux1[1-9]* )
2518 machine=hp800 opsys=hpux11
2519 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2520 ;;
2521
409d9577
GM
2522 hppa*-*-linux-gnu* )
2523 machine=hp800 opsys=gnu-linux
2524 ;;
2525
ba4481b5 2526 ## IBM machines
55597d70 2527 s390-*-linux-gnu* )
138f0859
GM
2528 machine=ibms390 opsys=gnu-linux
2529 ;;
bcdb1378
EZ
2530 s390x-*-linux-gnu* )
2531 machine=ibms390x opsys=gnu-linux
2532 ;;
ba4481b5
DL
2533 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2534 machine=ibmrs6000 opsys=aix4-2
2535 ;;
67bf991b
CY
2536 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2537 machine=ibmrs6000 opsys=aix4-2
2538 ;;
55597d70 2539 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2540 machine=ibmrs6000 opsys=aix4-2
2541 ;;
26a42dac
DN
2542 rs6000-ibm-aix5* | powerpc-ibm-aix6* )
2543 machine=ibmrs6000 opsys=aix4-2
2544 ;;
ba4481b5 2545
c76e04a8
GM
2546 ## Macintosh PowerPC
2547 powerpc*-*-linux-gnu* )
2548 machine=macppc opsys=gnu-linux
2549 ;;
2550
ba4481b5 2551 ## Silicon Graphics machines
ba4481b5 2552 ## Iris 4D
ba4481b5
DL
2553 mips-sgi-irix6.5 )
2554 machine=iris4d opsys=irix6-5
946173ad
DL
2555 # Without defining _LANGUAGE_C, things get masked out in the headers
2556 # so that, for instance, grepping for `free' in stdlib.h fails and
2557 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2558 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2559 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5 2560 ;;
ba4481b5 2561
ba4481b5
DL
2562 ## Suns
2563 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2564 machine=sparc opsys=gnu-linux
2565 ;;
2566
176fe5fc 2567 *-sun-solaris* \
ba4481b5
DL
2568 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2569 | rs6000-*-solaris2*)
2570 case "${canonical}" in
ba4481b5 2571 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2572 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2573 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2574 sparc* ) machine=sparc ;;
2575 * ) unported=yes ;;
2576 esac
2577 case "${canonical}" in
ba4481b5
DL
2578 *-sunos5.3* | *-solaris2.3* )
2579 opsys=sol2-3
2580 NON_GNU_CPP=/usr/ccs/lib/cpp
2581 ;;
2582 *-sunos5.4* | *-solaris2.4* )
2583 opsys=sol2-4
2584 NON_GNU_CPP=/usr/ccs/lib/cpp
2585 RANLIB="ar -ts"
2586 ;;
2587 *-sunos5.5* | *-solaris2.5* )
2588 opsys=sol2-5
2589 NON_GNU_CPP=/usr/ccs/lib/cpp
2590 RANLIB="ar -ts"
2591 ;;
8e967cf7
MR
2592 *-sunos5.6* | *-solaris2.6* )
2593 opsys=sol2-6
2594 NON_GNU_CPP=/usr/ccs/lib/cpp
2595 RANLIB="ar -ts"
2596 ;;
ba4481b5 2597 *-sunos5* | *-solaris* )
9e71690e 2598 opsys=sol2-6
089a966d
GM
2599 emacs_check_sunpro_c=yes
2600 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5 2601 ;;
ba4481b5
DL
2602 esac
2603 ## Watch out for a compiler that we know will not work.
2604 case "${canonical}" in
2605 *-solaris* | *-sunos5* )
2606 if [ "x$CC" = x/usr/ucb/cc ]; then
2607 ## /usr/ucb/cc doesn't work;
2608 ## we should find some other compiler that does work.
2609 unset CC
2610 fi
2611 ;;
2612 *) ;;
2613 esac
2614 ;;
ba4481b5 2615
ba4481b5
DL
2616 ## Vaxen.
2617 vax-dec-* )
2618 machine=vax
2619 case "${canonical}" in
ba4481b5
DL
2620 *-vms* ) opsys=vms ;;
2621 * ) unported=yes
2622 esac
2623 ;;
2624
f4988be7
GM
2625 ## IA-64
2626 ia64*-*-linux* )
2627 machine=ia64 opsys=gnu-linux
2628 ;;
2629
ba4481b5
DL
2630 ## Intel 386 machines where we don't care about the manufacturer
2631 i[3456]86-*-* )
2632 machine=intel386
2633 case "${canonical}" in
c60ee5e7 2634 *-cygwin ) opsys=cygwin ;;
eae54018 2635 *-darwin* ) opsys=darwin
23fd4483
ST
2636 CPP="${CC-cc} -E -no-cpp-precomp"
2637 ;;
ba4481b5 2638 *-linux-gnu* ) opsys=gnu-linux ;;
ba4481b5 2639 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2640 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2641 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5
DL
2642 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2643 esac
2644 ;;
2645
2646 ## m68k Linux-based GNU system
2647 m68k-*-linux-gnu* )
2648 machine=m68k opsys=gnu-linux
2649 ;;
2650
2651 ## Mips Linux-based GNU system
cd958eb3 2652 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2653 machine=mips opsys=gnu-linux
2654 ;;
2655
598a2813
AS
2656 ## AMD x86-64 Linux-based GNU system
2657 x86_64-*-linux-gnu* )
24b01ec4 2658 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2659 ;;
2660
94218e27 2661 ## Tensilica Xtensa Linux-based GNU system
8dd59f01 2662 xtensa*-*-linux-gnu* )
94218e27
DN
2663 machine=xtensa opsys=gnu-linux
2664 ;;
2665
ba4481b5
DL
2666 * )
2667 unported=yes
2668 ;;
2669esac
2670
2671### If the code above didn't choose an operating system, just choose
2672### an operating system based on the configuration name. You really
2673### only want to use this when you have no idea what the right
2674### operating system is; if you know what operating systems a machine
2675### runs, it's cleaner to make it explicit in the case statement
2676### above.
2677if test x"${opsys}" = x; then
2678 case "${canonical}" in
2679 *-gnu* ) opsys=gnu ;;
ba4481b5 2680 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2681 *-sysv5uw* ) opsys=unixware ;;
2682 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2683 *-sysv4.1* | *-sysvr4.1* )
2684 NON_GNU_CPP=/usr/lib/cpp
2685 opsys=usg5-4 ;;
2686 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2687 if [ x$NON_GNU_CPP = x ]; then
2688 if [ -f /usr/ccs/lib/cpp ]; then
2689 NON_GNU_CPP=/usr/ccs/lib/cpp
2690 else
2691 NON_GNU_CPP=/lib/cpp
2692 fi
2693 fi
2694 opsys=usg5-4-2 ;;
2695 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2696 * )
2697 unported=yes
2698 ;;
2699 esac
2700fi
2701
c0d27fcc 2702
22044edf 2703
ba4481b5 2704if test $unported = yes; then
c0d27fcc 2705 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2706Check \`etc/MACHINES' for recognized configuration names." >&5
2707echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2708Check \`etc/MACHINES' for recognized configuration names." >&2;}
2709 { (exit 1); exit 1; }; }
ba4481b5
DL
2710fi
2711
2712machfile="m/${machine}.h"
2713opsysfile="s/${opsys}.h"
2714
c0d27fcc 2715
ba4481b5
DL
2716#### Choose a compiler.
2717test -n "$CC" && cc_specified=yes
2718
2719# Save the value of CFLAGS that the user specified.
2720SPECIFIED_CFLAGS="$CFLAGS"
2721
503d2be0
AS
2722ac_ext=c
2723ac_cpp='$CPP $CPPFLAGS'
2724ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2725ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2726ac_compiler_gnu=$ac_cv_c_compiler_gnu
2727if test -n "$ac_tool_prefix"; then
2728 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2729set dummy ${ac_tool_prefix}gcc; ac_word=$2
ca81d7a0
JD
2730{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2731echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2732if test "${ac_cv_prog_CC+set}" = set; then
2733 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2734else
2735 if test -n "$CC"; then
2736 ac_cv_prog_CC="$CC" # Let the user override the test.
2737else
c0d27fcc
MR
2738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2739for as_dir in $PATH
2740do
2741 IFS=$as_save_IFS
2742 test -z "$as_dir" && as_dir=.
2743 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2744 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2745 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2746 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2747 break 2
2748 fi
2749done
503d2be0 2750done
ca81d7a0 2751IFS=$as_save_IFS
503d2be0 2752
ba4481b5
DL
2753fi
2754fi
503d2be0 2755CC=$ac_cv_prog_CC
ba4481b5 2756if test -n "$CC"; then
ca81d7a0
JD
2757 { echo "$as_me:$LINENO: result: $CC" >&5
2758echo "${ECHO_T}$CC" >&6; }
503d2be0 2759else
ca81d7a0
JD
2760 { echo "$as_me:$LINENO: result: no" >&5
2761echo "${ECHO_T}no" >&6; }
503d2be0
AS
2762fi
2763
ca81d7a0 2764
503d2be0
AS
2765fi
2766if test -z "$ac_cv_prog_CC"; then
2767 ac_ct_CC=$CC
2768 # Extract the first word of "gcc", so it can be a program name with args.
2769set dummy gcc; ac_word=$2
ca81d7a0
JD
2770{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2771echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2772if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2773 echo $ECHO_N "(cached) $ECHO_C" >&6
2774else
2775 if test -n "$ac_ct_CC"; then
2776 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2777else
c0d27fcc
MR
2778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2779for as_dir in $PATH
2780do
2781 IFS=$as_save_IFS
2782 test -z "$as_dir" && as_dir=.
2783 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2784 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2785 ac_cv_prog_ac_ct_CC="gcc"
2786 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2787 break 2
2788 fi
2789done
503d2be0 2790done
ca81d7a0 2791IFS=$as_save_IFS
503d2be0
AS
2792
2793fi
2794fi
2795ac_ct_CC=$ac_cv_prog_ac_ct_CC
2796if test -n "$ac_ct_CC"; then
ca81d7a0
JD
2797 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2798echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 2799else
ca81d7a0
JD
2800 { echo "$as_me:$LINENO: result: no" >&5
2801echo "${ECHO_T}no" >&6; }
503d2be0
AS
2802fi
2803
ca81d7a0
JD
2804 if test "x$ac_ct_CC" = x; then
2805 CC=""
2806 else
2807 case $cross_compiling:$ac_tool_warned in
2808yes:)
2809{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2810whose name does not start with the host triplet. If you think this
2811configuration is useful to you, please write to autoconf@gnu.org." >&5
2812echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2813whose name does not start with the host triplet. If you think this
2814configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2815ac_tool_warned=yes ;;
2816esac
2817 CC=$ac_ct_CC
2818 fi
503d2be0
AS
2819else
2820 CC="$ac_cv_prog_CC"
ba4481b5
DL
2821fi
2822
2823if test -z "$CC"; then
ca81d7a0
JD
2824 if test -n "$ac_tool_prefix"; then
2825 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 2826set dummy ${ac_tool_prefix}cc; ac_word=$2
ca81d7a0
JD
2827{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2828echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2829if test "${ac_cv_prog_CC+set}" = set; then
2830 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2831else
2832 if test -n "$CC"; then
2833 ac_cv_prog_CC="$CC" # Let the user override the test.
2834else
c0d27fcc
MR
2835as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2836for as_dir in $PATH
2837do
2838 IFS=$as_save_IFS
2839 test -z "$as_dir" && as_dir=.
2840 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2841 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2842 ac_cv_prog_CC="${ac_tool_prefix}cc"
2843 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2844 break 2
2845 fi
2846done
503d2be0 2847done
ca81d7a0 2848IFS=$as_save_IFS
503d2be0
AS
2849
2850fi
2851fi
2852CC=$ac_cv_prog_CC
2853if test -n "$CC"; then
ca81d7a0
JD
2854 { echo "$as_me:$LINENO: result: $CC" >&5
2855echo "${ECHO_T}$CC" >&6; }
503d2be0 2856else
ca81d7a0
JD
2857 { echo "$as_me:$LINENO: result: no" >&5
2858echo "${ECHO_T}no" >&6; }
503d2be0
AS
2859fi
2860
503d2be0 2861
ca81d7a0 2862 fi
503d2be0
AS
2863fi
2864if test -z "$CC"; then
2865 # Extract the first word of "cc", so it can be a program name with args.
2866set dummy cc; ac_word=$2
ca81d7a0
JD
2867{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2868echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2869if test "${ac_cv_prog_CC+set}" = set; then
2870 echo $ECHO_N "(cached) $ECHO_C" >&6
2871else
2872 if test -n "$CC"; then
2873 ac_cv_prog_CC="$CC" # Let the user override the test.
2874else
2875 ac_prog_rejected=no
c0d27fcc
MR
2876as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2877for as_dir in $PATH
2878do
2879 IFS=$as_save_IFS
2880 test -z "$as_dir" && as_dir=.
2881 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2882 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2883 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2884 ac_prog_rejected=yes
2885 continue
2886 fi
2887 ac_cv_prog_CC="cc"
2888 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2889 break 2
2890 fi
2891done
503d2be0 2892done
ca81d7a0 2893IFS=$as_save_IFS
503d2be0 2894
ba4481b5
DL
2895if test $ac_prog_rejected = yes; then
2896 # We found a bogon in the path, so make sure we never use it.
2897 set dummy $ac_cv_prog_CC
2898 shift
503d2be0 2899 if test $# != 0; then
ba4481b5
DL
2900 # We chose a different compiler from the bogus one.
2901 # However, it has the same basename, so the bogon will be chosen
2902 # first if we set CC to just the basename; use the full file name.
2903 shift
6bae0ccf 2904 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2905 fi
2906fi
2907fi
2908fi
503d2be0 2909CC=$ac_cv_prog_CC
ba4481b5 2910if test -n "$CC"; then
ca81d7a0
JD
2911 { echo "$as_me:$LINENO: result: $CC" >&5
2912echo "${ECHO_T}$CC" >&6; }
ba4481b5 2913else
ca81d7a0
JD
2914 { echo "$as_me:$LINENO: result: no" >&5
2915echo "${ECHO_T}no" >&6; }
ba4481b5
DL
2916fi
2917
ca81d7a0 2918
503d2be0
AS
2919fi
2920if test -z "$CC"; then
2921 if test -n "$ac_tool_prefix"; then
ca81d7a0 2922 for ac_prog in cl.exe
503d2be0
AS
2923 do
2924 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2925set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ca81d7a0
JD
2926{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2927echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2928if test "${ac_cv_prog_CC+set}" = set; then
2929 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
2930else
2931 if test -n "$CC"; then
2932 ac_cv_prog_CC="$CC" # Let the user override the test.
2933else
c0d27fcc
MR
2934as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2935for as_dir in $PATH
2936do
2937 IFS=$as_save_IFS
2938 test -z "$as_dir" && as_dir=.
2939 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2940 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2941 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2942 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2943 break 2
2944 fi
2945done
503d2be0 2946done
ca81d7a0 2947IFS=$as_save_IFS
503d2be0 2948
c4bb2108
DL
2949fi
2950fi
503d2be0 2951CC=$ac_cv_prog_CC
c4bb2108 2952if test -n "$CC"; then
ca81d7a0
JD
2953 { echo "$as_me:$LINENO: result: $CC" >&5
2954echo "${ECHO_T}$CC" >&6; }
c4bb2108 2955else
ca81d7a0
JD
2956 { echo "$as_me:$LINENO: result: no" >&5
2957echo "${ECHO_T}no" >&6; }
503d2be0
AS
2958fi
2959
ca81d7a0 2960
503d2be0
AS
2961 test -n "$CC" && break
2962 done
2963fi
2964if test -z "$CC"; then
2965 ac_ct_CC=$CC
ca81d7a0 2966 for ac_prog in cl.exe
503d2be0
AS
2967do
2968 # Extract the first word of "$ac_prog", so it can be a program name with args.
2969set dummy $ac_prog; ac_word=$2
ca81d7a0
JD
2970{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2971echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2972if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2973 echo $ECHO_N "(cached) $ECHO_C" >&6
2974else
2975 if test -n "$ac_ct_CC"; then
2976 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2977else
c0d27fcc
MR
2978as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2979for as_dir in $PATH
2980do
2981 IFS=$as_save_IFS
2982 test -z "$as_dir" && as_dir=.
2983 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2984 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2985 ac_cv_prog_ac_ct_CC="$ac_prog"
2986 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2987 break 2
2988 fi
2989done
503d2be0 2990done
ca81d7a0 2991IFS=$as_save_IFS
503d2be0 2992
c4bb2108 2993fi
503d2be0
AS
2994fi
2995ac_ct_CC=$ac_cv_prog_ac_ct_CC
2996if test -n "$ac_ct_CC"; then
ca81d7a0
JD
2997 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2998echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 2999else
ca81d7a0
JD
3000 { echo "$as_me:$LINENO: result: no" >&5
3001echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3002fi
3003
ca81d7a0 3004
503d2be0
AS
3005 test -n "$ac_ct_CC" && break
3006done
ba4481b5 3007
ca81d7a0
JD
3008 if test "x$ac_ct_CC" = x; then
3009 CC=""
3010 else
3011 case $cross_compiling:$ac_tool_warned in
3012yes:)
3013{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3014whose name does not start with the host triplet. If you think this
3015configuration is useful to you, please write to autoconf@gnu.org." >&5
3016echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3017whose name does not start with the host triplet. If you think this
3018configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3019ac_tool_warned=yes ;;
3020esac
3021 CC=$ac_ct_CC
3022 fi
503d2be0
AS
3023fi
3024
3025fi
ba4481b5 3026
c0d27fcc 3027
19650fd6
AS
3028test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3029See \`config.log' for more details." >&5
3030echo "$as_me: error: no acceptable C compiler found in \$PATH
3031See \`config.log' for more details." >&2;}
503d2be0 3032 { (exit 1); exit 1; }; }
c4bb2108 3033
503d2be0 3034# Provide some information about the compiler.
ca81d7a0 3035echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3036ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3037{ (ac_try="$ac_compiler --version >&5"
3038case "(($ac_try" in
3039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3040 *) ac_try_echo=$ac_try;;
3041esac
3042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3043 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3044 ac_status=$?
c0d27fcc 3045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3046 (exit $ac_status); }
ca81d7a0
JD
3047{ (ac_try="$ac_compiler -v >&5"
3048case "(($ac_try" in
3049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3050 *) ac_try_echo=$ac_try;;
3051esac
3052eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3053 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3054 ac_status=$?
c0d27fcc 3055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3056 (exit $ac_status); }
ca81d7a0
JD
3057{ (ac_try="$ac_compiler -V >&5"
3058case "(($ac_try" in
3059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3060 *) ac_try_echo=$ac_try;;
3061esac
3062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3063 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3064 ac_status=$?
c0d27fcc 3065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3066 (exit $ac_status); }
3067
3068cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3069/* confdefs.h. */
3070_ACEOF
3071cat confdefs.h >>conftest.$ac_ext
3072cat >>conftest.$ac_ext <<_ACEOF
3073/* end confdefs.h. */
c4bb2108 3074
503d2be0
AS
3075int
3076main ()
3077{
3078
3079 ;
3080 return 0;
3081}
3082_ACEOF
3083ac_clean_files_save=$ac_clean_files
19650fd6 3084ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3085# Try to create an executable without -o first, disregard a.out.
3086# It will help us diagnose broken compilers, and finding out an intuition
3087# of exeext.
ca81d7a0
JD
3088{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3089echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3090ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ca81d7a0
JD
3091#
3092# List of possible output files, starting from the most likely.
3093# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3094# only as a last resort. b.out is created by i960 compilers.
3095ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3096#
3097# The IRIX 6 linker writes into existing files which may not be
3098# executable, retaining their permissions. Remove them first so a
3099# subsequent execution test works.
3100ac_rmfiles=
3101for ac_file in $ac_files
3102do
3103 case $ac_file in
3104 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3105 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3106 esac
3107done
3108rm -f $ac_rmfiles
3109
3110if { (ac_try="$ac_link_default"
3111case "(($ac_try" in
3112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3113 *) ac_try_echo=$ac_try;;
3114esac
3115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3116 (eval "$ac_link_default") 2>&5
503d2be0 3117 ac_status=$?
c0d27fcc 3118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3119 (exit $ac_status); }; then
ca81d7a0
JD
3120 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3121# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3122# in a Makefile. We should not override ac_cv_exeext if it was cached,
3123# so that the user can short-circuit this test for compilers unknown to
3124# Autoconf.
f053c89f 3125for ac_file in $ac_files ''
19650fd6 3126do
6bae0ccf 3127 test -f "$ac_file" || continue
503d2be0 3128 case $ac_file in
ca81d7a0 3129 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3130 ;;
19650fd6 3131 [ab].out )
edfaf76d
LK
3132 # We found the default executable, but exeext='' is most
3133 # certainly right.
3134 break;;
19650fd6 3135 *.* )
ca81d7a0
JD
3136 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3137 then :; else
3138 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3139 fi
3140 # We set ac_cv_exeext here because the later test for it is not
3141 # safe: cross compilers may not add the suffix if given an `-o'
3142 # argument, so we may need to know it at that point already.
3143 # Even if this section looks crufty: it has the advantage of
3144 # actually working.
edfaf76d 3145 break;;
19650fd6 3146 * )
edfaf76d 3147 break;;
503d2be0
AS
3148 esac
3149done
ca81d7a0
JD
3150test "$ac_cv_exeext" = no && ac_cv_exeext=
3151
503d2be0 3152else
f053c89f
CY
3153 ac_file=''
3154fi
3155
3156{ echo "$as_me:$LINENO: result: $ac_file" >&5
3157echo "${ECHO_T}$ac_file" >&6; }
3158if test -z "$ac_file"; then
503d2be0 3159 echo "$as_me: failed program was:" >&5
19650fd6
AS
3160sed 's/^/| /' conftest.$ac_ext >&5
3161
6bae0ccf 3162{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3163See \`config.log' for more details." >&5
6bae0ccf 3164echo "$as_me: error: C compiler cannot create executables
19650fd6 3165See \`config.log' for more details." >&2;}
503d2be0
AS
3166 { (exit 77); exit 77; }; }
3167fi
3168
3169ac_exeext=$ac_cv_exeext
503d2be0 3170
ca81d7a0 3171# Check that the compiler produces executables we can run. If not, either
503d2be0 3172# the compiler is broken, or we cross compile.
ca81d7a0
JD
3173{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3174echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3175# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3176# If not cross compiling, check that we can run a simple program.
3177if test "$cross_compiling" != yes; then
3178 if { ac_try='./$ac_file'
ca81d7a0
JD
3179 { (case "(($ac_try" in
3180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3181 *) ac_try_echo=$ac_try;;
3182esac
3183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3184 (eval "$ac_try") 2>&5
503d2be0 3185 ac_status=$?
c0d27fcc 3186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3187 (exit $ac_status); }; }; then
3188 cross_compiling=no
ba4481b5 3189 else
503d2be0
AS
3190 if test "$cross_compiling" = maybe; then
3191 cross_compiling=yes
3192 else
c0d27fcc 3193 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3194If you meant to cross compile, use \`--host'.
3195See \`config.log' for more details." >&5
503d2be0 3196echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3197If you meant to cross compile, use \`--host'.
3198See \`config.log' for more details." >&2;}
503d2be0
AS
3199 { (exit 1); exit 1; }; }
3200 fi
ba4481b5 3201 fi
503d2be0 3202fi
ca81d7a0
JD
3203{ echo "$as_me:$LINENO: result: yes" >&5
3204echo "${ECHO_T}yes" >&6; }
503d2be0 3205
19650fd6 3206rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3207ac_clean_files=$ac_clean_files_save
ca81d7a0 3208# Check that the compiler produces executables we can run. If not, either
503d2be0 3209# the compiler is broken, or we cross compile.
ca81d7a0
JD
3210{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3211echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3212{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3213echo "${ECHO_T}$cross_compiling" >&6; }
3214
3215{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3216echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3217if { (ac_try="$ac_link"
3218case "(($ac_try" in
3219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3220 *) ac_try_echo=$ac_try;;
3221esac
3222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3223 (eval "$ac_link") 2>&5
503d2be0 3224 ac_status=$?
c0d27fcc 3225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3226 (exit $ac_status); }; then
3227 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3228# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3229# work properly (i.e., refer to `conftest.exe'), while it won't with
3230# `rm'.
6bae0ccf
DL
3231for ac_file in conftest.exe conftest conftest.*; do
3232 test -f "$ac_file" || continue
503d2be0 3233 case $ac_file in
ca81d7a0 3234 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3235 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3236 break;;
503d2be0
AS
3237 * ) break;;
3238 esac
3239done
ba4481b5 3240else
19650fd6
AS
3241 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3242See \`config.log' for more details." >&5
3243echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3244See \`config.log' for more details." >&2;}
503d2be0 3245 { (exit 1); exit 1; }; }
ba4481b5 3246fi
ba4481b5 3247
503d2be0 3248rm -f conftest$ac_cv_exeext
ca81d7a0
JD
3249{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3250echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3251
503d2be0
AS
3252rm -f conftest.$ac_ext
3253EXEEXT=$ac_cv_exeext
3254ac_exeext=$EXEEXT
ca81d7a0
JD
3255{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3256echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3257if test "${ac_cv_objext+set}" = set; then
3258 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3259else
503d2be0 3260 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3261/* confdefs.h. */
3262_ACEOF
3263cat confdefs.h >>conftest.$ac_ext
3264cat >>conftest.$ac_ext <<_ACEOF
3265/* end confdefs.h. */
ba4481b5 3266
503d2be0
AS
3267int
3268main ()
3269{
ba4481b5 3270
503d2be0
AS
3271 ;
3272 return 0;
3273}
3274_ACEOF
3275rm -f conftest.o conftest.obj
ca81d7a0
JD
3276if { (ac_try="$ac_compile"
3277case "(($ac_try" in
3278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3279 *) ac_try_echo=$ac_try;;
3280esac
3281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3282 (eval "$ac_compile") 2>&5
503d2be0 3283 ac_status=$?
c0d27fcc 3284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3285 (exit $ac_status); }; then
ca81d7a0
JD
3286 for ac_file in conftest.o conftest.obj conftest.*; do
3287 test -f "$ac_file" || continue;
503d2be0 3288 case $ac_file in
ca81d7a0 3289 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3290 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3291 break;;
3292 esac
3293done
c4bb2108 3294else
503d2be0 3295 echo "$as_me: failed program was:" >&5
19650fd6
AS
3296sed 's/^/| /' conftest.$ac_ext >&5
3297
3298{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3299See \`config.log' for more details." >&5
3300echo "$as_me: error: cannot compute suffix of object files: cannot compile
3301See \`config.log' for more details." >&2;}
503d2be0 3302 { (exit 1); exit 1; }; }
c4bb2108
DL
3303fi
3304
503d2be0
AS
3305rm -f conftest.$ac_cv_objext conftest.$ac_ext
3306fi
ca81d7a0
JD
3307{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3308echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3309OBJEXT=$ac_cv_objext
3310ac_objext=$OBJEXT
ca81d7a0
JD
3311{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3312echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3313if test "${ac_cv_c_compiler_gnu+set}" = set; then
3314 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3315else
503d2be0 3316 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3317/* confdefs.h. */
3318_ACEOF
3319cat confdefs.h >>conftest.$ac_ext
3320cat >>conftest.$ac_ext <<_ACEOF
3321/* end confdefs.h. */
503d2be0
AS
3322
3323int
3324main ()
3325{
3326#ifndef __GNUC__
3327 choke me
3328#endif
3329
3330 ;
3331 return 0;
3332}
3333_ACEOF
3334rm -f conftest.$ac_objext
ca81d7a0
JD
3335if { (ac_try="$ac_compile"
3336case "(($ac_try" in
3337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3338 *) ac_try_echo=$ac_try;;
3339esac
3340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3341 (eval "$ac_compile") 2>conftest.er1
503d2be0 3342 ac_status=$?
edfaf76d
LK
3343 grep -v '^ *+' conftest.er1 >conftest.err
3344 rm -f conftest.er1
3345 cat conftest.err >&5
c0d27fcc 3346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3347 (exit $ac_status); } && {
3348 test -z "$ac_c_werror_flag" ||
3349 test ! -s conftest.err
3350 } && test -s conftest.$ac_objext; then
503d2be0
AS
3351 ac_compiler_gnu=yes
3352else
3353 echo "$as_me: failed program was:" >&5
19650fd6
AS
3354sed 's/^/| /' conftest.$ac_ext >&5
3355
ca81d7a0 3356 ac_compiler_gnu=no
503d2be0 3357fi
ca81d7a0
JD
3358
3359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3360ac_cv_c_compiler_gnu=$ac_compiler_gnu
3361
3362fi
ca81d7a0
JD
3363{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3364echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3365GCC=`test $ac_compiler_gnu = yes && echo yes`
3366ac_test_CFLAGS=${CFLAGS+set}
3367ac_save_CFLAGS=$CFLAGS
ca81d7a0
JD
3368{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3369echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3370if test "${ac_cv_prog_cc_g+set}" = set; then
3371 echo $ECHO_N "(cached) $ECHO_C" >&6
3372else
ca81d7a0
JD
3373 ac_save_c_werror_flag=$ac_c_werror_flag
3374 ac_c_werror_flag=yes
3375 ac_cv_prog_cc_g=no
3376 CFLAGS="-g"
3377 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3378/* confdefs.h. */
3379_ACEOF
3380cat confdefs.h >>conftest.$ac_ext
3381cat >>conftest.$ac_ext <<_ACEOF
3382/* end confdefs.h. */
503d2be0
AS
3383
3384int
3385main ()
3386{
3387
3388 ;
3389 return 0;
3390}
3391_ACEOF
3392rm -f conftest.$ac_objext
ca81d7a0
JD
3393if { (ac_try="$ac_compile"
3394case "(($ac_try" in
3395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3396 *) ac_try_echo=$ac_try;;
3397esac
3398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3399 (eval "$ac_compile") 2>conftest.er1
503d2be0 3400 ac_status=$?
edfaf76d
LK
3401 grep -v '^ *+' conftest.er1 >conftest.err
3402 rm -f conftest.er1
3403 cat conftest.err >&5
c0d27fcc 3404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3405 (exit $ac_status); } && {
3406 test -z "$ac_c_werror_flag" ||
3407 test ! -s conftest.err
3408 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3409 ac_cv_prog_cc_g=yes
3410else
503d2be0 3411 echo "$as_me: failed program was:" >&5
19650fd6
AS
3412sed 's/^/| /' conftest.$ac_ext >&5
3413
ca81d7a0
JD
3414 CFLAGS=""
3415 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3416/* confdefs.h. */
3417_ACEOF
3418cat confdefs.h >>conftest.$ac_ext
3419cat >>conftest.$ac_ext <<_ACEOF
3420/* end confdefs.h. */
edfaf76d 3421
6bae0ccf
DL
3422int
3423main ()
3424{
ca81d7a0 3425
6bae0ccf
DL
3426 ;
3427 return 0;
3428}
3429_ACEOF
ca81d7a0
JD
3430rm -f conftest.$ac_objext
3431if { (ac_try="$ac_compile"
3432case "(($ac_try" in
3433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3434 *) ac_try_echo=$ac_try;;
3435esac
3436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3437 (eval "$ac_compile") 2>conftest.er1
edfaf76d 3438 ac_status=$?
edfaf76d
LK
3439 grep -v '^ *+' conftest.er1 >conftest.err
3440 rm -f conftest.er1
3441 cat conftest.err >&5
edfaf76d 3442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3443 (exit $ac_status); } && {
3444 test -z "$ac_c_werror_flag" ||
3445 test ! -s conftest.err
3446 } && test -s conftest.$ac_objext; then
ca81d7a0 3447 :
6bae0ccf
DL
3448else
3449 echo "$as_me: failed program was:" >&5
19650fd6
AS
3450sed 's/^/| /' conftest.$ac_ext >&5
3451
ca81d7a0
JD
3452 ac_c_werror_flag=$ac_save_c_werror_flag
3453 CFLAGS="-g"
3454 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 3455/* confdefs.h. */
19650fd6
AS
3456_ACEOF
3457cat confdefs.h >>conftest.$ac_ext
3458cat >>conftest.$ac_ext <<_ACEOF
3459/* end confdefs.h. */
ca81d7a0 3460
503d2be0
AS
3461int
3462main ()
3463{
ca81d7a0 3464
503d2be0
AS
3465 ;
3466 return 0;
3467}
3468_ACEOF
3469rm -f conftest.$ac_objext
ca81d7a0
JD
3470if { (ac_try="$ac_compile"
3471case "(($ac_try" in
3472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3473 *) ac_try_echo=$ac_try;;
3474esac
3475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3476 (eval "$ac_compile") 2>conftest.er1
503d2be0 3477 ac_status=$?
edfaf76d
LK
3478 grep -v '^ *+' conftest.er1 >conftest.err
3479 rm -f conftest.er1
3480 cat conftest.err >&5
c0d27fcc 3481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3482 (exit $ac_status); } && {
3483 test -z "$ac_c_werror_flag" ||
3484 test ! -s conftest.err
3485 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3486 ac_cv_prog_cc_g=yes
3487else
503d2be0 3488 echo "$as_me: failed program was:" >&5
19650fd6
AS
3489sed 's/^/| /' conftest.$ac_ext >&5
3490
ca81d7a0 3491
ba4481b5 3492fi
ca81d7a0
JD
3493
3494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3495fi
3496
3497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3498fi
3499
3500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3501 ac_c_werror_flag=$ac_save_c_werror_flag
ba4481b5 3502fi
ca81d7a0
JD
3503{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3504echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
c4bb2108 3505if test "$ac_test_CFLAGS" = set; then
503d2be0 3506 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3507elif test $ac_cv_prog_cc_g = yes; then
3508 if test "$GCC" = yes; then
ba4481b5
DL
3509 CFLAGS="-g -O2"
3510 else
c4bb2108 3511 CFLAGS="-g"
ba4481b5 3512 fi
22afa6e8 3513else
c4bb2108
DL
3514 if test "$GCC" = yes; then
3515 CFLAGS="-O2"
3516 else
3517 CFLAGS=
3518 fi
ba4481b5 3519fi
ca81d7a0
JD
3520{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3521echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3522if test "${ac_cv_prog_cc_c89+set}" = set; then
6bae0ccf
DL
3523 echo $ECHO_N "(cached) $ECHO_C" >&6
3524else
ca81d7a0 3525 ac_cv_prog_cc_c89=no
6bae0ccf
DL
3526ac_save_CC=$CC
3527cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3528/* confdefs.h. */
3529_ACEOF
3530cat confdefs.h >>conftest.$ac_ext
3531cat >>conftest.$ac_ext <<_ACEOF
3532/* end confdefs.h. */
6bae0ccf
DL
3533#include <stdarg.h>
3534#include <stdio.h>
3535#include <sys/types.h>
3536#include <sys/stat.h>
3537/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3538struct buf { int x; };
3539FILE * (*rcsopen) (struct buf *, struct stat *, int);
3540static char *e (p, i)
3541 char **p;
3542 int i;
3543{
3544 return p[i];
3545}
3546static char *f (char * (*g) (char **, int), char **p, ...)
3547{
3548 char *s;
3549 va_list v;
3550 va_start (v,p);
3551 s = g (p, va_arg (v,int));
3552 va_end (v);
3553 return s;
3554}
edfaf76d
LK
3555
3556/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3557 function prototypes and stuff, but not '\xHH' hex character constants.
3558 These don't provoke an error unfortunately, instead are silently treated
ca81d7a0 3559 as 'x'. The following induces an error, until -std is added to get
edfaf76d
LK
3560 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3561 array size at least. It's necessary to write '\x00'==0 to get something
ca81d7a0 3562 that's true only with -std. */
edfaf76d
LK
3563int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3564
ca81d7a0
JD
3565/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3566 inside strings and character constants. */
3567#define FOO(x) 'x'
3568int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3569
6bae0ccf
DL
3570int test (int i, double x);
3571struct s1 {int (*f) (int a);};
3572struct s2 {int (*f) (double a);};
3573int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3574int argc;
3575char **argv;
3576int
3577main ()
3578{
3579return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3580 ;
3581 return 0;
3582}
3583_ACEOF
ca81d7a0
JD
3584for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3585 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6bae0ccf
DL
3586do
3587 CC="$ac_save_CC $ac_arg"
3588 rm -f conftest.$ac_objext
ca81d7a0
JD
3589if { (ac_try="$ac_compile"
3590case "(($ac_try" in
3591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3592 *) ac_try_echo=$ac_try;;
3593esac
3594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3595 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3596 ac_status=$?
edfaf76d
LK
3597 grep -v '^ *+' conftest.er1 >conftest.err
3598 rm -f conftest.er1
3599 cat conftest.err >&5
6bae0ccf 3600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3601 (exit $ac_status); } && {
3602 test -z "$ac_c_werror_flag" ||
3603 test ! -s conftest.err
3604 } && test -s conftest.$ac_objext; then
ca81d7a0 3605 ac_cv_prog_cc_c89=$ac_arg
6bae0ccf
DL
3606else
3607 echo "$as_me: failed program was:" >&5
19650fd6
AS
3608sed 's/^/| /' conftest.$ac_ext >&5
3609
ca81d7a0 3610
6bae0ccf 3611fi
ca81d7a0
JD
3612
3613rm -f core conftest.err conftest.$ac_objext
3614 test "x$ac_cv_prog_cc_c89" != "xno" && break
6bae0ccf 3615done
ca81d7a0 3616rm -f conftest.$ac_ext
6bae0ccf
DL
3617CC=$ac_save_CC
3618
3619fi
ca81d7a0
JD
3620# AC_CACHE_VAL
3621case "x$ac_cv_prog_cc_c89" in
3622 x)
3623 { echo "$as_me:$LINENO: result: none needed" >&5
3624echo "${ECHO_T}none needed" >&6; } ;;
3625 xno)
3626 { echo "$as_me:$LINENO: result: unsupported" >&5
3627echo "${ECHO_T}unsupported" >&6; } ;;
6bae0ccf 3628 *)
ca81d7a0
JD
3629 CC="$CC $ac_cv_prog_cc_c89"
3630 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3631echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
6bae0ccf
DL
3632esac
3633
19650fd6 3634
503d2be0
AS
3635ac_ext=c
3636ac_cpp='$CPP $CPPFLAGS'
3637ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3638ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3639ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3640
c0d27fcc 3641
ba4481b5
DL
3642# On Suns, sometimes $CPP names a directory.
3643if test -n "$CPP" && test -d "$CPP"; then
3644 CPP=
3645fi
3646
089a966d
GM
3647## If not using gcc, and on Solaris, and no CPP specified, see if
3648## using a Sun compiler, which needs -Xs to prevent whitespace.
3649if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
3650 test x"$CPP" = x; then
3651 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
3652echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
3653
3654if test "${emacs_cv_sunpro_c+set}" = set; then
3655 echo $ECHO_N "(cached) $ECHO_C" >&6
3656else
3657 cat >conftest.$ac_ext <<_ACEOF
3658/* confdefs.h. */
3659_ACEOF
3660cat confdefs.h >>conftest.$ac_ext
3661cat >>conftest.$ac_ext <<_ACEOF
3662/* end confdefs.h. */
3663
3664int
3665main ()
3666{
3667#ifndef __SUNPRO_C
3668fail;
3669#endif
3670
3671 ;
3672 return 0;
3673}
3674_ACEOF
3675rm -f conftest.$ac_objext conftest$ac_exeext
3676if { (ac_try="$ac_link"
3677case "(($ac_try" in
3678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3679 *) ac_try_echo=$ac_try;;
3680esac
3681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3682 (eval "$ac_link") 2>conftest.er1
3683 ac_status=$?
3684 grep -v '^ *+' conftest.er1 >conftest.err
3685 rm -f conftest.er1
3686 cat conftest.err >&5
3687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3688 (exit $ac_status); } && {
3689 test -z "$ac_c_werror_flag" ||
3690 test ! -s conftest.err
3691 } && test -s conftest$ac_exeext &&
3692 $as_test_x conftest$ac_exeext; then
3693 emacs_cv_sunpro_c=yes
3694else
3695 echo "$as_me: failed program was:" >&5
3696sed 's/^/| /' conftest.$ac_ext >&5
3697
3698 emacs_cv_sunpro_c=no
3699fi
3700
3701rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3702 conftest$ac_exeext conftest.$ac_ext
3703fi
3704
3705 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
3706echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
3707
3708 if test x"$emacs_cv_sunpro_c" = xyes; then
3709 NON_GNU_CPP="$CC -E -Xs"
3710 fi
3711fi
3712
ba4481b5
DL
3713#### Some systems specify a CPP to use unless we are using GCC.
3714#### Now that we know whether we are using GCC, we can decide whether
3715#### to use that one.
3716if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3717then
3718 CPP="$NON_GNU_CPP"
3719fi
3720
3721#### Some systems specify a CC to use unless we are using GCC.
3722#### Now that we know whether we are using GCC, we can decide whether
3723#### to use that one.
3724if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3725 test x$cc_specified != xyes
3726then
3727 CC="$NON_GNU_CC"
3728fi
3729
3730if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3731then
3732 CC="$CC $GCC_TEST_OPTIONS"
3733fi
3734
3735if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3736then
3737 CC="$CC $NON_GCC_TEST_OPTIONS"
3738fi
3739
a51f4969
SM
3740
3741cat >>confdefs.h <<\_ACEOF
3742#define _GNU_SOURCE 1
3743_ACEOF
3744
3745
e143ad11
AS
3746ac_ext=c
3747ac_cpp='$CPP $CPPFLAGS'
3748ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3749ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3750ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
3751{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3752echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
3753# On Suns, sometimes $CPP names a directory.
3754if test -n "$CPP" && test -d "$CPP"; then
3755 CPP=
3756fi
3757if test -z "$CPP"; then
3758 if test "${ac_cv_prog_CPP+set}" = set; then
3759 echo $ECHO_N "(cached) $ECHO_C" >&6
3760else
3761 # Double quotes because CPP needs to be expanded
3762 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3763 do
3764 ac_preproc_ok=false
3765for ac_c_preproc_warn_flag in '' yes
3766do
3767 # Use a header file that comes with gcc, so configuring glibc
3768 # with a fresh cross-compiler works.
3769 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3770 # <limits.h> exists even on freestanding compilers.
3771 # On the NeXT, cc -E runs the code through the compiler's parser,
3772 # not just through cpp. "Syntax error" is here to catch this case.
3773 cat >conftest.$ac_ext <<_ACEOF
3774/* confdefs.h. */
3775_ACEOF
3776cat confdefs.h >>conftest.$ac_ext
3777cat >>conftest.$ac_ext <<_ACEOF
3778/* end confdefs.h. */
3779#ifdef __STDC__
3780# include <limits.h>
3781#else
3782# include <assert.h>
3783#endif
3784 Syntax error
3785_ACEOF
ca81d7a0
JD
3786if { (ac_try="$ac_cpp conftest.$ac_ext"
3787case "(($ac_try" in
3788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3789 *) ac_try_echo=$ac_try;;
3790esac
3791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3792 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3793 ac_status=$?
3794 grep -v '^ *+' conftest.er1 >conftest.err
3795 rm -f conftest.er1
3796 cat conftest.err >&5
3797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3798 (exit $ac_status); } >/dev/null && {
3799 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3800 test ! -s conftest.err
3801 }; then
e143ad11
AS
3802 :
3803else
3804 echo "$as_me: failed program was:" >&5
3805sed 's/^/| /' conftest.$ac_ext >&5
3806
3807 # Broken: fails on valid input.
3808continue
3809fi
ca81d7a0 3810
e143ad11
AS
3811rm -f conftest.err conftest.$ac_ext
3812
ca81d7a0 3813 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3814 # can be detected and how.
3815 cat >conftest.$ac_ext <<_ACEOF
3816/* confdefs.h. */
3817_ACEOF
3818cat confdefs.h >>conftest.$ac_ext
3819cat >>conftest.$ac_ext <<_ACEOF
3820/* end confdefs.h. */
3821#include <ac_nonexistent.h>
3822_ACEOF
ca81d7a0
JD
3823if { (ac_try="$ac_cpp conftest.$ac_ext"
3824case "(($ac_try" in
3825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3826 *) ac_try_echo=$ac_try;;
3827esac
3828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3829 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3830 ac_status=$?
3831 grep -v '^ *+' conftest.er1 >conftest.err
3832 rm -f conftest.er1
3833 cat conftest.err >&5
3834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3835 (exit $ac_status); } >/dev/null && {
3836 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3837 test ! -s conftest.err
3838 }; then
e143ad11
AS
3839 # Broken: success on invalid input.
3840continue
3841else
3842 echo "$as_me: failed program was:" >&5
3843sed 's/^/| /' conftest.$ac_ext >&5
3844
3845 # Passes both tests.
3846ac_preproc_ok=:
3847break
3848fi
ca81d7a0 3849
e143ad11
AS
3850rm -f conftest.err conftest.$ac_ext
3851
3852done
3853# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3854rm -f conftest.err conftest.$ac_ext
3855if $ac_preproc_ok; then
3856 break
3857fi
3858
3859 done
3860 ac_cv_prog_CPP=$CPP
3861
3862fi
3863 CPP=$ac_cv_prog_CPP
3864else
3865 ac_cv_prog_CPP=$CPP
3866fi
ca81d7a0
JD
3867{ echo "$as_me:$LINENO: result: $CPP" >&5
3868echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
3869ac_preproc_ok=false
3870for ac_c_preproc_warn_flag in '' yes
3871do
3872 # Use a header file that comes with gcc, so configuring glibc
3873 # with a fresh cross-compiler works.
3874 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3875 # <limits.h> exists even on freestanding compilers.
3876 # On the NeXT, cc -E runs the code through the compiler's parser,
3877 # not just through cpp. "Syntax error" is here to catch this case.
3878 cat >conftest.$ac_ext <<_ACEOF
3879/* confdefs.h. */
3880_ACEOF
3881cat confdefs.h >>conftest.$ac_ext
3882cat >>conftest.$ac_ext <<_ACEOF
3883/* end confdefs.h. */
3884#ifdef __STDC__
3885# include <limits.h>
3886#else
3887# include <assert.h>
3888#endif
3889 Syntax error
3890_ACEOF
ca81d7a0
JD
3891if { (ac_try="$ac_cpp conftest.$ac_ext"
3892case "(($ac_try" in
3893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3894 *) ac_try_echo=$ac_try;;
3895esac
3896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3897 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3898 ac_status=$?
3899 grep -v '^ *+' conftest.er1 >conftest.err
3900 rm -f conftest.er1
3901 cat conftest.err >&5
3902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3903 (exit $ac_status); } >/dev/null && {
3904 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3905 test ! -s conftest.err
3906 }; then
e143ad11
AS
3907 :
3908else
3909 echo "$as_me: failed program was:" >&5
3910sed 's/^/| /' conftest.$ac_ext >&5
3911
3912 # Broken: fails on valid input.
3913continue
3914fi
ca81d7a0 3915
e143ad11
AS
3916rm -f conftest.err conftest.$ac_ext
3917
ca81d7a0 3918 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3919 # can be detected and how.
3920 cat >conftest.$ac_ext <<_ACEOF
3921/* confdefs.h. */
3922_ACEOF
3923cat confdefs.h >>conftest.$ac_ext
3924cat >>conftest.$ac_ext <<_ACEOF
3925/* end confdefs.h. */
3926#include <ac_nonexistent.h>
3927_ACEOF
ca81d7a0
JD
3928if { (ac_try="$ac_cpp conftest.$ac_ext"
3929case "(($ac_try" in
3930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3931 *) ac_try_echo=$ac_try;;
3932esac
3933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3934 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3935 ac_status=$?
3936 grep -v '^ *+' conftest.er1 >conftest.err
3937 rm -f conftest.er1
3938 cat conftest.err >&5
3939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3940 (exit $ac_status); } >/dev/null && {
3941 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3942 test ! -s conftest.err
3943 }; then
e143ad11
AS
3944 # Broken: success on invalid input.
3945continue
3946else
3947 echo "$as_me: failed program was:" >&5
3948sed 's/^/| /' conftest.$ac_ext >&5
3949
3950 # Passes both tests.
3951ac_preproc_ok=:
3952break
3953fi
ca81d7a0 3954
e143ad11
AS
3955rm -f conftest.err conftest.$ac_ext
3956
3957done
3958# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3959rm -f conftest.err conftest.$ac_ext
3960if $ac_preproc_ok; then
3961 :
3962else
3963 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3964See \`config.log' for more details." >&5
3965echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3966See \`config.log' for more details." >&2;}
3967 { (exit 1); exit 1; }; }
3968fi
3969
3970ac_ext=c
3971ac_cpp='$CPP $CPPFLAGS'
3972ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3973ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3974ac_compiler_gnu=$ac_cv_c_compiler_gnu
3975
3976
ca81d7a0
JD
3977{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3978echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3979if test "${ac_cv_path_GREP+set}" = set; then
3980 echo $ECHO_N "(cached) $ECHO_C" >&6
3981else
3982 # Extract the first word of "grep ggrep" to use in msg output
3983if test -z "$GREP"; then
3984set dummy grep ggrep; ac_prog_name=$2
3985if test "${ac_cv_path_GREP+set}" = set; then
3986 echo $ECHO_N "(cached) $ECHO_C" >&6
3987else
3988 ac_path_GREP_found=false
3989# Loop through the user's path and test for each of PROGNAME-LIST
3990as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3991for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3992do
3993 IFS=$as_save_IFS
3994 test -z "$as_dir" && as_dir=.
3995 for ac_prog in grep ggrep; do
3996 for ac_exec_ext in '' $ac_executable_extensions; do
3997 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 3998 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
ca81d7a0
JD
3999 # Check for GNU ac_path_GREP and select it if it is found.
4000 # Check for GNU $ac_path_GREP
4001case `"$ac_path_GREP" --version 2>&1` in
4002*GNU*)
4003 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4004*)
4005 ac_count=0
4006 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4007 while :
4008 do
4009 cat "conftest.in" "conftest.in" >"conftest.tmp"
4010 mv "conftest.tmp" "conftest.in"
4011 cp "conftest.in" "conftest.nl"
4012 echo 'GREP' >> "conftest.nl"
4013 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4014 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4015 ac_count=`expr $ac_count + 1`
4016 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4017 # Best one so far, save it but keep looking for a better one
4018 ac_cv_path_GREP="$ac_path_GREP"
4019 ac_path_GREP_max=$ac_count
4020 fi
4021 # 10*(2^10) chars as input seems more than enough
4022 test $ac_count -gt 10 && break
4023 done
4024 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4025esac
4026
4027
4028 $ac_path_GREP_found && break 3
4029 done
4030done
4031
4032done
4033IFS=$as_save_IFS
4034
4035
4036fi
4037
4038GREP="$ac_cv_path_GREP"
4039if test -z "$GREP"; then
4040 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4041echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4042 { (exit 1); exit 1; }; }
4043fi
4044
4045else
4046 ac_cv_path_GREP=$GREP
4047fi
4048
4049
4050fi
4051{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4052echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4053 GREP="$ac_cv_path_GREP"
4054
4055
4056{ echo "$as_me:$LINENO: checking for egrep" >&5
4057echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4058if test "${ac_cv_path_EGREP+set}" = set; then
e143ad11
AS
4059 echo $ECHO_N "(cached) $ECHO_C" >&6
4060else
ca81d7a0
JD
4061 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4062 then ac_cv_path_EGREP="$GREP -E"
4063 else
4064 # Extract the first word of "egrep" to use in msg output
4065if test -z "$EGREP"; then
4066set dummy egrep; ac_prog_name=$2
4067if test "${ac_cv_path_EGREP+set}" = set; then
4068 echo $ECHO_N "(cached) $ECHO_C" >&6
4069else
4070 ac_path_EGREP_found=false
4071# Loop through the user's path and test for each of PROGNAME-LIST
4072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4073for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4074do
4075 IFS=$as_save_IFS
4076 test -z "$as_dir" && as_dir=.
4077 for ac_prog in egrep; do
4078 for ac_exec_ext in '' $ac_executable_extensions; do
4079 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4080 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
ca81d7a0
JD
4081 # Check for GNU ac_path_EGREP and select it if it is found.
4082 # Check for GNU $ac_path_EGREP
4083case `"$ac_path_EGREP" --version 2>&1` in
4084*GNU*)
4085 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4086*)
4087 ac_count=0
4088 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4089 while :
4090 do
4091 cat "conftest.in" "conftest.in" >"conftest.tmp"
4092 mv "conftest.tmp" "conftest.in"
4093 cp "conftest.in" "conftest.nl"
4094 echo 'EGREP' >> "conftest.nl"
4095 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4096 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4097 ac_count=`expr $ac_count + 1`
4098 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4099 # Best one so far, save it but keep looking for a better one
4100 ac_cv_path_EGREP="$ac_path_EGREP"
4101 ac_path_EGREP_max=$ac_count
e143ad11 4102 fi
ca81d7a0
JD
4103 # 10*(2^10) chars as input seems more than enough
4104 test $ac_count -gt 10 && break
4105 done
4106 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4107esac
4108
4109
4110 $ac_path_EGREP_found && break 3
4111 done
4112done
4113
4114done
4115IFS=$as_save_IFS
4116
4117
e143ad11 4118fi
e143ad11 4119
ca81d7a0
JD
4120EGREP="$ac_cv_path_EGREP"
4121if test -z "$EGREP"; then
4122 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4123echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4124 { (exit 1); exit 1; }; }
4125fi
e143ad11 4126
ca81d7a0
JD
4127else
4128 ac_cv_path_EGREP=$EGREP
4129fi
e143ad11 4130
ca81d7a0
JD
4131
4132 fi
8eeae1c9 4133fi
ca81d7a0
JD
4134{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4135echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4136 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4137
4138
4139
ca81d7a0
JD
4140{ echo "$as_me:$LINENO: checking for AIX" >&5
4141echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4142cat >conftest.$ac_ext <<_ACEOF
4143/* confdefs.h. */
4144_ACEOF
4145cat confdefs.h >>conftest.$ac_ext
4146cat >>conftest.$ac_ext <<_ACEOF
4147/* end confdefs.h. */
4148#ifdef _AIX
4149 yes
4150#endif
4151
4152_ACEOF
4153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4154 $EGREP "yes" >/dev/null 2>&1; then
ca81d7a0
JD
4155 { echo "$as_me:$LINENO: result: yes" >&5
4156echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4157cat >>confdefs.h <<\_ACEOF
4158#define _ALL_SOURCE 1
4159_ACEOF
4160
4161else
ca81d7a0
JD
4162 { echo "$as_me:$LINENO: result: no" >&5
4163echo "${ECHO_T}no" >&6; }
e143ad11 4164fi
a51f4969
SM
4165rm -f conftest*
4166
4167
4168{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4169echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
4170if test "${ac_cv_header_stdc+set}" = set; then
4171 echo $ECHO_N "(cached) $ECHO_C" >&6
4172else
4173 cat >conftest.$ac_ext <<_ACEOF
4174/* confdefs.h. */
4175_ACEOF
4176cat confdefs.h >>conftest.$ac_ext
4177cat >>conftest.$ac_ext <<_ACEOF
4178/* end confdefs.h. */
4179#include <stdlib.h>
4180#include <stdarg.h>
4181#include <string.h>
4182#include <float.h>
4183
4184int
4185main ()
4186{
4187
4188 ;
4189 return 0;
4190}
4191_ACEOF
4192rm -f conftest.$ac_objext
4193if { (ac_try="$ac_compile"
4194case "(($ac_try" in
4195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4196 *) ac_try_echo=$ac_try;;
4197esac
4198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4199 (eval "$ac_compile") 2>conftest.er1
4200 ac_status=$?
4201 grep -v '^ *+' conftest.er1 >conftest.err
4202 rm -f conftest.er1
4203 cat conftest.err >&5
4204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4205 (exit $ac_status); } && {
4206 test -z "$ac_c_werror_flag" ||
4207 test ! -s conftest.err
4208 } && test -s conftest.$ac_objext; then
4209 ac_cv_header_stdc=yes
4210else
4211 echo "$as_me: failed program was:" >&5
4212sed 's/^/| /' conftest.$ac_ext >&5
4213
4214 ac_cv_header_stdc=no
4215fi
4216
4217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4218
4219if test $ac_cv_header_stdc = yes; then
4220 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4221 cat >conftest.$ac_ext <<_ACEOF
4222/* confdefs.h. */
4223_ACEOF
4224cat confdefs.h >>conftest.$ac_ext
4225cat >>conftest.$ac_ext <<_ACEOF
4226/* end confdefs.h. */
4227#include <string.h>
4228
4229_ACEOF
4230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4231 $EGREP "memchr" >/dev/null 2>&1; then
4232 :
4233else
4234 ac_cv_header_stdc=no
4235fi
4236rm -f conftest*
4237
4238fi
4239
4240if test $ac_cv_header_stdc = yes; then
4241 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4242 cat >conftest.$ac_ext <<_ACEOF
4243/* confdefs.h. */
4244_ACEOF
4245cat confdefs.h >>conftest.$ac_ext
4246cat >>conftest.$ac_ext <<_ACEOF
4247/* end confdefs.h. */
4248#include <stdlib.h>
4249
4250_ACEOF
4251if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4252 $EGREP "free" >/dev/null 2>&1; then
4253 :
4254else
4255 ac_cv_header_stdc=no
4256fi
4257rm -f conftest*
4258
4259fi
4260
4261if test $ac_cv_header_stdc = yes; then
4262 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4263 if test "$cross_compiling" = yes; then
4264 :
4265else
4266 cat >conftest.$ac_ext <<_ACEOF
4267/* confdefs.h. */
4268_ACEOF
4269cat confdefs.h >>conftest.$ac_ext
4270cat >>conftest.$ac_ext <<_ACEOF
4271/* end confdefs.h. */
4272#include <ctype.h>
4273#include <stdlib.h>
4274#if ((' ' & 0x0FF) == 0x020)
4275# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4276# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4277#else
4278# define ISLOWER(c) \
4279 (('a' <= (c) && (c) <= 'i') \
4280 || ('j' <= (c) && (c) <= 'r') \
4281 || ('s' <= (c) && (c) <= 'z'))
4282# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4283#endif
4284
4285#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4286int
4287main ()
4288{
4289 int i;
4290 for (i = 0; i < 256; i++)
4291 if (XOR (islower (i), ISLOWER (i))
4292 || toupper (i) != TOUPPER (i))
4293 return 2;
4294 return 0;
4295}
4296_ACEOF
4297rm -f conftest$ac_exeext
4298if { (ac_try="$ac_link"
4299case "(($ac_try" in
4300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4301 *) ac_try_echo=$ac_try;;
4302esac
4303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4304 (eval "$ac_link") 2>&5
4305 ac_status=$?
4306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4307 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4308 { (case "(($ac_try" in
4309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4310 *) ac_try_echo=$ac_try;;
4311esac
4312eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4313 (eval "$ac_try") 2>&5
4314 ac_status=$?
4315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4316 (exit $ac_status); }; }; then
4317 :
4318else
4319 echo "$as_me: program exited with status $ac_status" >&5
4320echo "$as_me: failed program was:" >&5
4321sed 's/^/| /' conftest.$ac_ext >&5
4322
4323( exit $ac_status )
4324ac_cv_header_stdc=no
4325fi
4326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4327fi
4328
4329
4330fi
4331fi
4332{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4333echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4334if test $ac_cv_header_stdc = yes; then
4335
4336cat >>confdefs.h <<\_ACEOF
4337#define STDC_HEADERS 1
4338_ACEOF
4339
4340fi
4341
4342# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4353 inttypes.h stdint.h unistd.h
4354do
4355as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4356{ echo "$as_me:$LINENO: checking for $ac_header" >&5
4357echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4358if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4359 echo $ECHO_N "(cached) $ECHO_C" >&6
4360else
4361 cat >conftest.$ac_ext <<_ACEOF
4362/* confdefs.h. */
4363_ACEOF
4364cat confdefs.h >>conftest.$ac_ext
4365cat >>conftest.$ac_ext <<_ACEOF
4366/* end confdefs.h. */
4367$ac_includes_default
4368
4369#include <$ac_header>
4370_ACEOF
4371rm -f conftest.$ac_objext
4372if { (ac_try="$ac_compile"
4373case "(($ac_try" in
4374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4375 *) ac_try_echo=$ac_try;;
4376esac
4377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4378 (eval "$ac_compile") 2>conftest.er1
4379 ac_status=$?
4380 grep -v '^ *+' conftest.er1 >conftest.err
4381 rm -f conftest.er1
4382 cat conftest.err >&5
4383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4384 (exit $ac_status); } && {
4385 test -z "$ac_c_werror_flag" ||
4386 test ! -s conftest.err
4387 } && test -s conftest.$ac_objext; then
4388 eval "$as_ac_Header=yes"
4389else
4390 echo "$as_me: failed program was:" >&5
4391sed 's/^/| /' conftest.$ac_ext >&5
4392
4393 eval "$as_ac_Header=no"
4394fi
4395
4396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4397fi
4398ac_res=`eval echo '${'$as_ac_Header'}'`
4399 { echo "$as_me:$LINENO: result: $ac_res" >&5
4400echo "${ECHO_T}$ac_res" >&6; }
4401if test `eval echo '${'$as_ac_Header'}'` = yes; then
4402 cat >>confdefs.h <<_ACEOF
4403#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4404_ACEOF
4405
4406fi
4407
4408done
4409
4410
4411if test "${ac_cv_header_minix_config_h+set}" = set; then
4412 { echo "$as_me:$LINENO: checking for minix/config.h" >&5
4413echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4414if test "${ac_cv_header_minix_config_h+set}" = set; then
4415 echo $ECHO_N "(cached) $ECHO_C" >&6
4416fi
4417{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4418echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
4419else
4420 # Is the header compilable?
4421{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4422echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; }
4423cat >conftest.$ac_ext <<_ACEOF
4424/* confdefs.h. */
4425_ACEOF
4426cat confdefs.h >>conftest.$ac_ext
4427cat >>conftest.$ac_ext <<_ACEOF
4428/* end confdefs.h. */
4429$ac_includes_default
4430#include <minix/config.h>
4431_ACEOF
4432rm -f conftest.$ac_objext
4433if { (ac_try="$ac_compile"
4434case "(($ac_try" in
4435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4436 *) ac_try_echo=$ac_try;;
4437esac
4438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4439 (eval "$ac_compile") 2>conftest.er1
4440 ac_status=$?
4441 grep -v '^ *+' conftest.er1 >conftest.err
4442 rm -f conftest.er1
4443 cat conftest.err >&5
4444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4445 (exit $ac_status); } && {
4446 test -z "$ac_c_werror_flag" ||
4447 test ! -s conftest.err
4448 } && test -s conftest.$ac_objext; then
4449 ac_header_compiler=yes
4450else
4451 echo "$as_me: failed program was:" >&5
4452sed 's/^/| /' conftest.$ac_ext >&5
4453
4454 ac_header_compiler=no
4455fi
4456
4457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4458{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4459echo "${ECHO_T}$ac_header_compiler" >&6; }
4460
4461# Is the header present?
4462{ echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4463echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; }
4464cat >conftest.$ac_ext <<_ACEOF
4465/* confdefs.h. */
4466_ACEOF
4467cat confdefs.h >>conftest.$ac_ext
4468cat >>conftest.$ac_ext <<_ACEOF
4469/* end confdefs.h. */
4470#include <minix/config.h>
4471_ACEOF
4472if { (ac_try="$ac_cpp conftest.$ac_ext"
4473case "(($ac_try" in
4474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4475 *) ac_try_echo=$ac_try;;
4476esac
4477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4478 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4479 ac_status=$?
4480 grep -v '^ *+' conftest.er1 >conftest.err
4481 rm -f conftest.er1
4482 cat conftest.err >&5
4483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4484 (exit $ac_status); } >/dev/null && {
4485 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4486 test ! -s conftest.err
4487 }; then
4488 ac_header_preproc=yes
4489else
4490 echo "$as_me: failed program was:" >&5
4491sed 's/^/| /' conftest.$ac_ext >&5
4492
4493 ac_header_preproc=no
4494fi
4495
4496rm -f conftest.err conftest.$ac_ext
4497{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4498echo "${ECHO_T}$ac_header_preproc" >&6; }
4499
4500# So? What about this header?
4501case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4502 yes:no: )
4503 { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4504echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4505 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4506echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
4507 ac_header_preproc=yes
4508 ;;
4509 no:yes:* )
4510 { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4511echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4512 { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4513echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4514 { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4515echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4516 { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4517echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4518 { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4519echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4520 { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4521echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
4522
4523 ;;
4524esac
4525{ echo "$as_me:$LINENO: checking for minix/config.h" >&5
4526echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
4527if test "${ac_cv_header_minix_config_h+set}" = set; then
4528 echo $ECHO_N "(cached) $ECHO_C" >&6
4529else
4530 ac_cv_header_minix_config_h=$ac_header_preproc
4531fi
4532{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4533echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
4534
4535fi
4536if test $ac_cv_header_minix_config_h = yes; then
4537 MINIX=yes
4538else
4539 MINIX=
4540fi
4541
4542
4543if test "$MINIX" = yes; then
4544
4545cat >>confdefs.h <<\_ACEOF
4546#define _POSIX_SOURCE 1
4547_ACEOF
4548
4549
4550cat >>confdefs.h <<\_ACEOF
4551#define _POSIX_1_SOURCE 2
4552_ACEOF
4553
4554
4555cat >>confdefs.h <<\_ACEOF
4556#define _MINIX 1
4557_ACEOF
4558
4559fi
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571 { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4572echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; }
4573if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
4574 echo $ECHO_N "(cached) $ECHO_C" >&6
4575else
4576 cat >conftest.$ac_ext <<_ACEOF
4577/* confdefs.h. */
4578_ACEOF
4579cat confdefs.h >>conftest.$ac_ext
4580cat >>conftest.$ac_ext <<_ACEOF
4581/* end confdefs.h. */
4582
4583# define __EXTENSIONS__ 1
4584 $ac_includes_default
4585int
4586main ()
4587{
4588
4589 ;
4590 return 0;
4591}
4592_ACEOF
4593rm -f conftest.$ac_objext
4594if { (ac_try="$ac_compile"
4595case "(($ac_try" in
4596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4597 *) ac_try_echo=$ac_try;;
4598esac
4599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4600 (eval "$ac_compile") 2>conftest.er1
4601 ac_status=$?
4602 grep -v '^ *+' conftest.er1 >conftest.err
4603 rm -f conftest.er1
4604 cat conftest.err >&5
4605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4606 (exit $ac_status); } && {
4607 test -z "$ac_c_werror_flag" ||
4608 test ! -s conftest.err
4609 } && test -s conftest.$ac_objext; then
4610 ac_cv_safe_to_define___extensions__=yes
4611else
4612 echo "$as_me: failed program was:" >&5
4613sed 's/^/| /' conftest.$ac_ext >&5
4614
4615 ac_cv_safe_to_define___extensions__=no
4616fi
e143ad11 4617
a51f4969
SM
4618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4619fi
4620{ echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4621echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; }
4622 test $ac_cv_safe_to_define___extensions__ = yes &&
4623 cat >>confdefs.h <<\_ACEOF
4624#define __EXTENSIONS__ 1
4625_ACEOF
e143ad11 4626
a51f4969
SM
4627 cat >>confdefs.h <<\_ACEOF
4628#define _POSIX_PTHREAD_SEMANTICS 1
4629_ACEOF
e143ad11 4630
a51f4969
SM
4631 cat >>confdefs.h <<\_ACEOF
4632#define _TANDEM_SOURCE 1
e143ad11
AS
4633_ACEOF
4634
4635
4636
01abe918 4637### Use -Wno-pointer-sign if the compiler supports it
ca81d7a0
JD
4638{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4639echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4640SAVE_CFLAGS="$CFLAGS"
4641CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4642cat >conftest.$ac_ext <<_ACEOF
4643/* confdefs.h. */
4644_ACEOF
4645cat confdefs.h >>conftest.$ac_ext
4646cat >>conftest.$ac_ext <<_ACEOF
4647/* end confdefs.h. */
4648
4649int
4650main ()
4651{
4652
4653 ;
4654 return 0;
4655}
4656_ACEOF
4657rm -f conftest.$ac_objext
ca81d7a0
JD
4658if { (ac_try="$ac_compile"
4659case "(($ac_try" in
4660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4661 *) ac_try_echo=$ac_try;;
4662esac
4663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4664 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4665 ac_status=$?
4666 grep -v '^ *+' conftest.er1 >conftest.err
4667 rm -f conftest.er1
4668 cat conftest.err >&5
4669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4670 (exit $ac_status); } && {
4671 test -z "$ac_c_werror_flag" ||
4672 test ! -s conftest.err
4673 } && test -s conftest.$ac_objext; then
01abe918
CY
4674 has_option=yes
4675else
4676 echo "$as_me: failed program was:" >&5
4677sed 's/^/| /' conftest.$ac_ext >&5
4678
ca81d7a0 4679 has_option=no
01abe918 4680fi
ca81d7a0
JD
4681
4682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4683if test $has_option = yes; then
4684 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4685fi
ca81d7a0
JD
4686{ echo "$as_me:$LINENO: result: $has_option" >&5
4687echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4688CFLAGS="$SAVE_CFLAGS"
4689unset has_option
4690unset SAVE_CFLAGS
4691
6a3a24fa 4692#### Some other nice autoconf tests.
ba4481b5 4693
ca81d7a0
JD
4694{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4695echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4696LN_S=$as_ln_s
4697if test "$LN_S" = "ln -s"; then
ca81d7a0
JD
4698 { echo "$as_me:$LINENO: result: yes" >&5
4699echo "${ECHO_T}yes" >&6; }
ba4481b5 4700else
ca81d7a0
JD
4701 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4702echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4703fi
4704
503d2be0
AS
4705ac_ext=c
4706ac_cpp='$CPP $CPPFLAGS'
4707ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4708ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4709ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4710{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4711echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4712# On Suns, sometimes $CPP names a directory.
4713if test -n "$CPP" && test -d "$CPP"; then
4714 CPP=
4715fi
4716if test -z "$CPP"; then
503d2be0
AS
4717 if test "${ac_cv_prog_CPP+set}" = set; then
4718 echo $ECHO_N "(cached) $ECHO_C" >&6
4719else
4720 # Double quotes because CPP needs to be expanded
4721 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4722 do
4723 ac_preproc_ok=false
4724for ac_c_preproc_warn_flag in '' yes
4725do
4726 # Use a header file that comes with gcc, so configuring glibc
4727 # with a fresh cross-compiler works.
19650fd6
AS
4728 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4729 # <limits.h> exists even on freestanding compilers.
ba4481b5 4730 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4731 # not just through cpp. "Syntax error" is here to catch this case.
4732 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4733/* confdefs.h. */
4734_ACEOF
4735cat confdefs.h >>conftest.$ac_ext
4736cat >>conftest.$ac_ext <<_ACEOF
4737/* end confdefs.h. */
4738#ifdef __STDC__
4739# include <limits.h>
4740#else
4741# include <assert.h>
4742#endif
edfaf76d 4743 Syntax error
503d2be0 4744_ACEOF
ca81d7a0
JD
4745if { (ac_try="$ac_cpp conftest.$ac_ext"
4746case "(($ac_try" in
4747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4748 *) ac_try_echo=$ac_try;;
4749esac
4750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4751 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4752 ac_status=$?
6bae0ccf 4753 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4754 rm -f conftest.er1
4755 cat conftest.err >&5
c0d27fcc 4756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4757 (exit $ac_status); } >/dev/null && {
4758 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4759 test ! -s conftest.err
4760 }; then
ba4481b5
DL
4761 :
4762else
503d2be0 4763 echo "$as_me: failed program was:" >&5
19650fd6
AS
4764sed 's/^/| /' conftest.$ac_ext >&5
4765
503d2be0
AS
4766 # Broken: fails on valid input.
4767continue
4768fi
ca81d7a0 4769
503d2be0
AS
4770rm -f conftest.err conftest.$ac_ext
4771
ca81d7a0 4772 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4773 # can be detected and how.
4774 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4775/* confdefs.h. */
4776_ACEOF
4777cat confdefs.h >>conftest.$ac_ext
4778cat >>conftest.$ac_ext <<_ACEOF
4779/* end confdefs.h. */
503d2be0
AS
4780#include <ac_nonexistent.h>
4781_ACEOF
ca81d7a0
JD
4782if { (ac_try="$ac_cpp conftest.$ac_ext"
4783case "(($ac_try" in
4784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4785 *) ac_try_echo=$ac_try;;
4786esac
4787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4788 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4789 ac_status=$?
6bae0ccf 4790 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4791 rm -f conftest.er1
4792 cat conftest.err >&5
c0d27fcc 4793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4794 (exit $ac_status); } >/dev/null && {
4795 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4796 test ! -s conftest.err
4797 }; then
503d2be0
AS
4798 # Broken: success on invalid input.
4799continue
c4bb2108 4800else
503d2be0 4801 echo "$as_me: failed program was:" >&5
19650fd6
AS
4802sed 's/^/| /' conftest.$ac_ext >&5
4803
503d2be0
AS
4804 # Passes both tests.
4805ac_preproc_ok=:
4806break
4807fi
ca81d7a0 4808
503d2be0
AS
4809rm -f conftest.err conftest.$ac_ext
4810
4811done
4812# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4813rm -f conftest.err conftest.$ac_ext
4814if $ac_preproc_ok; then
4815 break
4816fi
4817
4818 done
4819 ac_cv_prog_CPP=$CPP
4820
4821fi
4822 CPP=$ac_cv_prog_CPP
4823else
4824 ac_cv_prog_CPP=$CPP
4825fi
ca81d7a0
JD
4826{ echo "$as_me:$LINENO: result: $CPP" >&5
4827echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4828ac_preproc_ok=false
4829for ac_c_preproc_warn_flag in '' yes
4830do
4831 # Use a header file that comes with gcc, so configuring glibc
4832 # with a fresh cross-compiler works.
19650fd6
AS
4833 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4834 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4835 # On the NeXT, cc -E runs the code through the compiler's parser,
4836 # not just through cpp. "Syntax error" is here to catch this case.
4837 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4838/* confdefs.h. */
4839_ACEOF
4840cat confdefs.h >>conftest.$ac_ext
4841cat >>conftest.$ac_ext <<_ACEOF
4842/* end confdefs.h. */
4843#ifdef __STDC__
4844# include <limits.h>
4845#else
4846# include <assert.h>
4847#endif
edfaf76d 4848 Syntax error
503d2be0 4849_ACEOF
ca81d7a0
JD
4850if { (ac_try="$ac_cpp conftest.$ac_ext"
4851case "(($ac_try" in
4852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4853 *) ac_try_echo=$ac_try;;
4854esac
4855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4856 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4857 ac_status=$?
6bae0ccf 4858 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4859 rm -f conftest.er1
4860 cat conftest.err >&5
c0d27fcc 4861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4862 (exit $ac_status); } >/dev/null && {
4863 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4864 test ! -s conftest.err
4865 }; then
ba4481b5
DL
4866 :
4867else
503d2be0 4868 echo "$as_me: failed program was:" >&5
19650fd6
AS
4869sed 's/^/| /' conftest.$ac_ext >&5
4870
503d2be0
AS
4871 # Broken: fails on valid input.
4872continue
4873fi
ca81d7a0 4874
503d2be0
AS
4875rm -f conftest.err conftest.$ac_ext
4876
ca81d7a0 4877 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4878 # can be detected and how.
4879 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4880/* confdefs.h. */
4881_ACEOF
4882cat confdefs.h >>conftest.$ac_ext
4883cat >>conftest.$ac_ext <<_ACEOF
4884/* end confdefs.h. */
503d2be0
AS
4885#include <ac_nonexistent.h>
4886_ACEOF
ca81d7a0
JD
4887if { (ac_try="$ac_cpp conftest.$ac_ext"
4888case "(($ac_try" in
4889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4890 *) ac_try_echo=$ac_try;;
4891esac
4892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4893 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4894 ac_status=$?
6bae0ccf 4895 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4896 rm -f conftest.er1
4897 cat conftest.err >&5
c0d27fcc 4898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4899 (exit $ac_status); } >/dev/null && {
4900 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4901 test ! -s conftest.err
4902 }; then
503d2be0
AS
4903 # Broken: success on invalid input.
4904continue
4905else
4906 echo "$as_me: failed program was:" >&5
19650fd6
AS
4907sed 's/^/| /' conftest.$ac_ext >&5
4908
503d2be0
AS
4909 # Passes both tests.
4910ac_preproc_ok=:
4911break
ba4481b5 4912fi
ca81d7a0 4913
503d2be0
AS
4914rm -f conftest.err conftest.$ac_ext
4915
4916done
4917# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4918rm -f conftest.err conftest.$ac_ext
4919if $ac_preproc_ok; then
4920 :
ba4481b5 4921else
19650fd6
AS
4922 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4923See \`config.log' for more details." >&5
4924echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4925See \`config.log' for more details." >&2;}
503d2be0 4926 { (exit 1); exit 1; }; }
ba4481b5 4927fi
503d2be0
AS
4928
4929ac_ext=c
4930ac_cpp='$CPP $CPPFLAGS'
4931ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4932ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4933ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4934
4935# Find a good install program. We prefer a C program (faster),
4936# so one script is as good as another. But avoid the broken or
4937# incompatible versions:
4938# SysV /etc/install, /usr/sbin/install
4939# SunOS /usr/etc/install
4940# IRIX /sbin/install
4941# AIX /bin/install
503d2be0 4942# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4943# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4944# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4945# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4946# OS/2's system install, which has a completely different semantic
ba4481b5 4947# ./install, which can be erroneously created by make from ./install.sh.
ca81d7a0
JD
4948{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4949echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 4950if test -z "$INSTALL"; then
503d2be0
AS
4951if test "${ac_cv_path_install+set}" = set; then
4952 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4953else
c0d27fcc
MR
4954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4955for as_dir in $PATH
4956do
4957 IFS=$as_save_IFS
4958 test -z "$as_dir" && as_dir=.
4959 # Account for people who put trailing slashes in PATH elements.
4960case $as_dir/ in
4961 ./ | .// | /cC/* | \
4962 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4963 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4964 /usr/ucb/* ) ;;
4965 *)
4966 # OSF1 and SCO ODT 3.0 have their own names for install.
4967 # Don't use installbsd from OSF since it installs stuff as root
4968 # by default.
4969 for ac_prog in ginstall scoinst install; do
4970 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4971 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4972 if test $ac_prog = install &&
4973 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4974 # AIX install. It has an incompatible calling convention.
4975 :
4976 elif test $ac_prog = install &&
4977 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4978 # program-specific install script used by HP pwplus--don't use.
4979 :
4980 else
4981 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4982 break 3
4983 fi
4984 fi
ba4481b5 4985 done
c0d27fcc
MR
4986 done
4987 ;;
4988esac
4989done
ca81d7a0 4990IFS=$as_save_IFS
c0d27fcc 4991
ba4481b5
DL
4992
4993fi
4994 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4995 INSTALL=$ac_cv_path_install
ba4481b5 4996 else
ca81d7a0
JD
4997 # As a last resort, use the slow shell script. Don't cache a
4998 # value for INSTALL within a source directory, because that will
ba4481b5 4999 # break other packages using the cache if that directory is
ca81d7a0 5000 # removed, or if the value is a relative name.
503d2be0 5001 INSTALL=$ac_install_sh
ba4481b5
DL
5002 fi
5003fi
ca81d7a0
JD
5004{ echo "$as_me:$LINENO: result: $INSTALL" >&5
5005echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
5006
5007# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5008# It thinks the first close brace ends the variable substitution.
5009test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5010
503d2be0 5011test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 5012
ba4481b5
DL
5013test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5014
c0d27fcc
MR
5015if test "x$RANLIB" = x; then
5016 if test -n "$ac_tool_prefix"; then
5017 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5018set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ca81d7a0
JD
5019{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5020echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5021if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 5022 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5023else
5024 if test -n "$RANLIB"; then
5025 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5026else
c0d27fcc
MR
5027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5028for as_dir in $PATH
5029do
5030 IFS=$as_save_IFS
5031 test -z "$as_dir" && as_dir=.
5032 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5033 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5034 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5035 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5036 break 2
5037 fi
5038done
503d2be0 5039done
ca81d7a0 5040IFS=$as_save_IFS
503d2be0 5041
7397acc4
DL
5042fi
5043fi
503d2be0 5044RANLIB=$ac_cv_prog_RANLIB
7397acc4 5045if test -n "$RANLIB"; then
ca81d7a0
JD
5046 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5047echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5048else
ca81d7a0
JD
5049 { echo "$as_me:$LINENO: result: no" >&5
5050echo "${ECHO_T}no" >&6; }
503d2be0
AS
5051fi
5052
ca81d7a0 5053
503d2be0
AS
5054fi
5055if test -z "$ac_cv_prog_RANLIB"; then
5056 ac_ct_RANLIB=$RANLIB
5057 # Extract the first word of "ranlib", so it can be a program name with args.
5058set dummy ranlib; ac_word=$2
ca81d7a0
JD
5059{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5060echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5061if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5062 echo $ECHO_N "(cached) $ECHO_C" >&6
5063else
5064 if test -n "$ac_ct_RANLIB"; then
5065 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5066else
c0d27fcc
MR
5067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5068for as_dir in $PATH
5069do
5070 IFS=$as_save_IFS
5071 test -z "$as_dir" && as_dir=.
5072 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5073 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5074 ac_cv_prog_ac_ct_RANLIB="ranlib"
5075 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5076 break 2
5077 fi
5078done
503d2be0 5079done
ca81d7a0 5080IFS=$as_save_IFS
503d2be0 5081
503d2be0
AS
5082fi
5083fi
5084ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5085if test -n "$ac_ct_RANLIB"; then
ca81d7a0
JD
5086 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5087echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5088else
ca81d7a0
JD
5089 { echo "$as_me:$LINENO: result: no" >&5
5090echo "${ECHO_T}no" >&6; }
503d2be0
AS
5091fi
5092
ca81d7a0
JD
5093 if test "x$ac_ct_RANLIB" = x; then
5094 RANLIB=":"
5095 else
5096 case $cross_compiling:$ac_tool_warned in
5097yes:)
5098{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5099whose name does not start with the host triplet. If you think this
5100configuration is useful to you, please write to autoconf@gnu.org." >&5
5101echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5102whose name does not start with the host triplet. If you think this
5103configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5104ac_tool_warned=yes ;;
5105esac
5106 RANLIB=$ac_ct_RANLIB
5107 fi
7397acc4 5108else
503d2be0 5109 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5110fi
5111
5112fi
9e71690e
DK
5113# Extract the first word of "install-info", so it can be a program name with args.
5114set dummy install-info; ac_word=$2
ca81d7a0
JD
5115{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5116echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5117if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5118 echo $ECHO_N "(cached) $ECHO_C" >&6
5119else
5120 case $INSTALL_INFO in
5121 [\\/]* | ?:[\\/]*)
5122 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5123 ;;
5124 *)
5125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5126for as_dir in $PATH
5127do
5128 IFS=$as_save_IFS
5129 test -z "$as_dir" && as_dir=.
5130 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5131 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5132 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5133 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5134 break 2
5135 fi
5136done
5137done
ca81d7a0 5138IFS=$as_save_IFS
9e71690e
DK
5139
5140 ;;
5141esac
5142fi
5143INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5144if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5145 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5146echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5147else
ca81d7a0
JD
5148 { echo "$as_me:$LINENO: result: no" >&5
5149echo "${ECHO_T}no" >&6; }
9e71690e
DK
5150fi
5151
ca81d7a0 5152
9e71690e
DK
5153# Extract the first word of "install-info", so it can be a program name with args.
5154set dummy install-info; ac_word=$2
ca81d7a0
JD
5155{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5156echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5157if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5158 echo $ECHO_N "(cached) $ECHO_C" >&6
5159else
5160 case $INSTALL_INFO in
5161 [\\/]* | ?:[\\/]*)
5162 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5163 ;;
5164 *)
5165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5166for as_dir in /usr/sbin
5167do
5168 IFS=$as_save_IFS
5169 test -z "$as_dir" && as_dir=.
5170 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5171 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5172 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5173 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5174 break 2
5175 fi
5176done
5177done
ca81d7a0 5178IFS=$as_save_IFS
9e71690e
DK
5179
5180 ;;
5181esac
5182fi
5183INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5184if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5185 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5186echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5187else
ca81d7a0
JD
5188 { echo "$as_me:$LINENO: result: no" >&5
5189echo "${ECHO_T}no" >&6; }
9e71690e
DK
5190fi
5191
ca81d7a0 5192
9e71690e
DK
5193# Extract the first word of "install-info", so it can be a program name with args.
5194set dummy install-info; ac_word=$2
ca81d7a0
JD
5195{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5196echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5197if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5198 echo $ECHO_N "(cached) $ECHO_C" >&6
5199else
5200 case $INSTALL_INFO in
5201 [\\/]* | ?:[\\/]*)
5202 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5203 ;;
5204 *)
5205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5206for as_dir in /sbin
5207do
5208 IFS=$as_save_IFS
5209 test -z "$as_dir" && as_dir=.
5210 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5211 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5212 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5213 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5214 break 2
5215 fi
5216done
5217done
ca81d7a0 5218IFS=$as_save_IFS
9e71690e
DK
5219
5220 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5221 ;;
5222esac
5223fi
5224INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5225if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5226 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5227echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5228else
ca81d7a0
JD
5229 { echo "$as_me:$LINENO: result: no" >&5
5230echo "${ECHO_T}no" >&6; }
9e71690e
DK
5231fi
5232
ca81d7a0 5233
8ae52ca6
RF
5234# Extract the first word of "gzip", so it can be a program name with args.
5235set dummy gzip; ac_word=$2
ca81d7a0
JD
5236{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5237echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5238if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5239 echo $ECHO_N "(cached) $ECHO_C" >&6
5240else
46e35e9f 5241 case $GZIP_PROG in
8ae52ca6 5242 [\\/]* | ?:[\\/]*)
46e35e9f 5243 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5244 ;;
5245 *)
5246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5247for as_dir in $PATH
5248do
5249 IFS=$as_save_IFS
5250 test -z "$as_dir" && as_dir=.
5251 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5252 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5253 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5254 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5255 break 2
5256 fi
5257done
5258done
ca81d7a0 5259IFS=$as_save_IFS
8ae52ca6
RF
5260
5261 ;;
5262esac
5263fi
46e35e9f 5264GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5265if test -n "$GZIP_PROG"; then
ca81d7a0
JD
5266 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5267echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5268else
ca81d7a0
JD
5269 { echo "$as_me:$LINENO: result: no" >&5
5270echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5271fi
5272
ba4481b5 5273
c0d27fcc 5274
ca81d7a0 5275
1bb9a689
MB
5276## Need makeinfo >= 4.6 (?) to build the manuals.
5277# Extract the first word of "makeinfo", so it can be a program name with args.
5278set dummy makeinfo; ac_word=$2
5279{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5280echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5281if test "${ac_cv_path_MAKEINFO+set}" = set; then
5282 echo $ECHO_N "(cached) $ECHO_C" >&6
5283else
5284 case $MAKEINFO in
5285 [\\/]* | ?:[\\/]*)
5286 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5287 ;;
5288 *)
5289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5290for as_dir in $PATH
5291do
5292 IFS=$as_save_IFS
5293 test -z "$as_dir" && as_dir=.
5294 for ac_exec_ext in '' $ac_executable_extensions; do
5295 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5296 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5297 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5298 break 2
5299 fi
5300done
5301done
5302IFS=$as_save_IFS
5303
5304 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5305 ;;
5306esac
5307fi
5308MAKEINFO=$ac_cv_path_MAKEINFO
5309if test -n "$MAKEINFO"; then
5310 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5311echo "${ECHO_T}$MAKEINFO" >&6; }
5312else
5313 { echo "$as_me:$LINENO: result: no" >&5
5314echo "${ECHO_T}no" >&6; }
5315fi
5316
5317
5318if test "$MAKEINFO" != "no" && \
d4840f44 5319 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
5320 MAKEINFO=no
5321fi
5322
e1b89931
GM
5323## Makeinfo is unusual. For a released Emacs, the manuals are
5324## pre-built, and not deleted by the normal clean rules. makeinfo is
5325## therefore in the category of "special tools" not normally required, which
5326## configure does not have to check for (eg autoconf itself).
5327## In a CVS checkout on the other hand, the manuals are not included.
5328## So makeinfo is a requirement to build from CVS, and configure
5329## should test for it as it does for any other build requirement.
5330## We use the presence of $srcdir/info/emacs to distinguish a release,
5331## with pre-built manuals, from a CVS checkout.
5332if test "$MAKEINFO" = "no"; then
5333 if test "x${with_makeinfo}" = "xno"; then
5334 MAKEINFO=off
5335 elif ! test -e $srcdir/info/emacs; then
5336 { { echo "$as_me:$LINENO: error: You do not seem to have makeinfo >= 4.6, and your
5337source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5338Either install a suitable version of makeinfo, or re-run configure
e1b89931
GM
5339with the \`--without-makeinfo' option to build without the manuals. " >&5
5340echo "$as_me: error: You do not seem to have makeinfo >= 4.6, and your
5341source tree does not seem to have pre-built manuals in the \`info' directory.
921fbdf0 5342Either install a suitable version of makeinfo, or re-run configure
e1b89931 5343with the \`--without-makeinfo' option to build without the manuals. " >&2;}
1bb9a689 5344 { (exit 1); exit 1; }; }
e1b89931 5345 fi
921fbdf0 5346fi
1bb9a689
MB
5347
5348
8e967cf7
MR
5349if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5350then
5351 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5352fi
5353
5354if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5355then
5356 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5357fi
5358
c0d27fcc 5359
fe239f0f 5360late_LDFLAGS=$LDFLAGS
4af002d6 5361if test "$GCC" = yes; then
fe239f0f
AS
5362 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5363else
5364 LDFLAGS="$LDFLAGS -znocombreloc"
5365fi
5366
ca81d7a0
JD
5367{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5368echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5369cat >conftest.$ac_ext <<_ACEOF
5370main(){return 0;}
5371_ACEOF
5372rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5373if { (ac_try="$ac_link"
5374case "(($ac_try" in
5375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5376 *) ac_try_echo=$ac_try;;
5377esac
5378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5379 (eval "$ac_link") 2>conftest.er1
fe239f0f 5380 ac_status=$?
edfaf76d
LK
5381 grep -v '^ *+' conftest.er1 >conftest.err
5382 rm -f conftest.er1
5383 cat conftest.err >&5
fe239f0f 5384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5385 (exit $ac_status); } && {
5386 test -z "$ac_c_werror_flag" ||
5387 test ! -s conftest.err
5388 } && test -s conftest$ac_exeext &&
5389 $as_test_x conftest$ac_exeext; then
ca81d7a0
JD
5390 { echo "$as_me:$LINENO: result: yes" >&5
5391echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5392else
5393 echo "$as_me: failed program was:" >&5
5394sed 's/^/| /' conftest.$ac_ext >&5
5395
ca81d7a0
JD
5396 LDFLAGS=$late_LDFLAGS
5397 { echo "$as_me:$LINENO: result: no" >&5
5398echo "${ECHO_T}no" >&6; }
fe239f0f 5399fi
ca81d7a0 5400
f053c89f 5401rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5402 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5403
3b33a005
DL
5404#### Extract some information from the operating system and machine files.
5405
c0d27fcc 5406{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5407 - which libraries the lib-src programs will want, and
503d2be0
AS
5408 - whether the GNU malloc routines are usable..." >&5
5409echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5410 - which libraries the lib-src programs will want, and
503d2be0 5411 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5412
5413### First figure out CFLAGS (which we use for running the compiler here)
5414### and REAL_CFLAGS (which we use for real compilation).
5415### The two are the same except on a few systems, where they are made
5416### different to work around various lossages. For example,
5417### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5418### as implying static linking.
5419
5420### If the CFLAGS env var is specified, we use that value
5421### instead of the default.
5422
5423### It's not important that this name contain the PID; you can't run
5424### two configures in the same directory and have anything work
5425### anyway.
5426tempcname="conftest.c"
5427
5428echo '
5429#include "'${srcdir}'/src/'${opsysfile}'"
5430#include "'${srcdir}'/src/'${machfile}'"
5431#ifndef LIBS_MACHINE
5432#define LIBS_MACHINE
5433#endif
5434#ifndef LIBS_SYSTEM
5435#define LIBS_SYSTEM
5436#endif
5437#ifndef C_SWITCH_SYSTEM
5438#define C_SWITCH_SYSTEM
5439#endif
5440#ifndef C_SWITCH_MACHINE
5441#define C_SWITCH_MACHINE
5442#endif
5443configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5444configure___ c_switch_system=C_SWITCH_SYSTEM
5445configure___ c_switch_machine=C_SWITCH_MACHINE
5446
5447#ifndef LIB_X11_LIB
5448#define LIB_X11_LIB -lX11
5449#endif
5450
3b33a005
DL
5451#ifndef LIBX11_SYSTEM
5452#define LIBX11_SYSTEM
5453#endif
9d2818d6 5454configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
3b33a005
DL
5455
5456#ifdef UNEXEC
5457configure___ unexec=UNEXEC
5458#else
5459configure___ unexec=unexec.o
5460#endif
5461
5462#ifdef SYSTEM_MALLOC
5463configure___ system_malloc=yes
5464#else
5465configure___ system_malloc=no
5466#endif
5467
ef9e4345
GM
5468#ifdef USE_MMAP_FOR_BUFFERS
5469configure___ use_mmap_for_buffers=yes
73b77ee5 5470#else
ef9e4345 5471configure___ use_mmap_for_buffers=no
73b77ee5
GM
5472#endif
5473
3b33a005
DL
5474#ifndef C_DEBUG_SWITCH
5475#define C_DEBUG_SWITCH -g
5476#endif
5477
5478#ifndef C_OPTIMIZE_SWITCH
5479#ifdef __GNUC__
5480#define C_OPTIMIZE_SWITCH -O2
5481#else
5482#define C_OPTIMIZE_SWITCH -O
5483#endif
5484#endif
5485
01abe918
CY
5486#ifndef C_WARNINGS_SWITCH
5487#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5488#endif
5489
3b33a005
DL
5490#ifndef LD_SWITCH_MACHINE
5491#define LD_SWITCH_MACHINE
5492#endif
5493
5494#ifndef LD_SWITCH_SYSTEM
5495#define LD_SWITCH_SYSTEM
5496#endif
5497
5498#ifndef LD_SWITCH_X_SITE_AUX
5499#define LD_SWITCH_X_SITE_AUX
503d2be0 5500#endif
3b33a005
DL
5501
5502configure___ ld_switch_system=LD_SWITCH_SYSTEM
5503configure___ ld_switch_machine=LD_SWITCH_MACHINE
5504
5505#ifdef THIS_IS_CONFIGURE
5506
5507/* Get the CFLAGS for tests in configure. */
5508#ifdef __GNUC__
5509configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5510#else
5511configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5512#endif
5513
5514#else /* not THIS_IS_CONFIGURE */
5515
5516/* Get the CFLAGS for real compilation. */
5517#ifdef __GNUC__
01abe918 5518configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5519#else
5520configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5521#endif
5522
5523#endif /* not THIS_IS_CONFIGURE */
5524' > ${tempcname}
5525
5526# The value of CPP is a quoted variable reference, so we need to do this
5527# to get its actual value...
5528CPP=`eval "echo $CPP"`
5529eval `${CPP} -Isrc ${tempcname} \
5530 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5531if test "x$SPECIFIED_CFLAGS" = x; then
5532 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5533 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5534else
5535 REAL_CFLAGS="$CFLAGS"
5536fi
5537rm ${tempcname}
5538
5539ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5540
5541### Make sure subsequent tests use flags consistent with the build flags.
5542
5543if test x"${OVERRIDE_CPPFLAGS}" != x; then
5544 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5545else
5546 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5547fi
5548
6bae0ccf
DL
5549
5550
ca81d7a0 5551# Check whether --enable-largefile was given.
f4988be7 5552if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5553 enableval=$enable_largefile;
5554fi
f4988be7 5555
503d2be0 5556if test "$enable_largefile" != no; then
f4988be7 5557
ca81d7a0
JD
5558 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5559echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5560if test "${ac_cv_sys_largefile_CC+set}" = set; then
5561 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5562else
f4988be7 5563 ac_cv_sys_largefile_CC=no
503d2be0
AS
5564 if test "$GCC" != yes; then
5565 ac_save_CC=$CC
5566 while :; do
ca81d7a0
JD
5567 # IRIX 6.2 and later do not support large files by default,
5568 # so use the C compiler's -n32 option if that helps.
edfaf76d 5569 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5570/* confdefs.h. */
5571_ACEOF
5572cat confdefs.h >>conftest.$ac_ext
5573cat >>conftest.$ac_ext <<_ACEOF
5574/* end confdefs.h. */
f4988be7 5575#include <sys/types.h>
503d2be0
AS
5576 /* Check that off_t can represent 2**63 - 1 correctly.
5577 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5578 since some C++ compilers masquerading as C compilers
5579 incorrectly reject 9223372036854775807. */
5580#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5581 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5582 && LARGE_OFF_T % 2147483647 == 1)
5583 ? 1 : -1];
5584int
5585main ()
5586{
f4988be7 5587
503d2be0
AS
5588 ;
5589 return 0;
5590}
5591_ACEOF
ca81d7a0
JD
5592 rm -f conftest.$ac_objext
5593if { (ac_try="$ac_compile"
5594case "(($ac_try" in
5595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5596 *) ac_try_echo=$ac_try;;
5597esac
5598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5599 (eval "$ac_compile") 2>conftest.er1
503d2be0 5600 ac_status=$?
edfaf76d
LK
5601 grep -v '^ *+' conftest.er1 >conftest.err
5602 rm -f conftest.er1
5603 cat conftest.err >&5
c0d27fcc 5604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5605 (exit $ac_status); } && {
5606 test -z "$ac_c_werror_flag" ||
5607 test ! -s conftest.err
5608 } && test -s conftest.$ac_objext; then
503d2be0 5609 break
b192d653 5610else
503d2be0 5611 echo "$as_me: failed program was:" >&5
19650fd6
AS
5612sed 's/^/| /' conftest.$ac_ext >&5
5613
ca81d7a0 5614
503d2be0 5615fi
ca81d7a0
JD
5616
5617rm -f core conftest.err conftest.$ac_objext
5618 CC="$CC -n32"
5619 rm -f conftest.$ac_objext
5620if { (ac_try="$ac_compile"
5621case "(($ac_try" in
5622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5623 *) ac_try_echo=$ac_try;;
5624esac
5625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5626 (eval "$ac_compile") 2>conftest.er1
503d2be0 5627 ac_status=$?
edfaf76d
LK
5628 grep -v '^ *+' conftest.er1 >conftest.err
5629 rm -f conftest.er1
5630 cat conftest.err >&5
c0d27fcc 5631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5632 (exit $ac_status); } && {
5633 test -z "$ac_c_werror_flag" ||
5634 test ! -s conftest.err
5635 } && test -s conftest.$ac_objext; then
503d2be0
AS
5636 ac_cv_sys_largefile_CC=' -n32'; break
5637else
5638 echo "$as_me: failed program was:" >&5
19650fd6
AS
5639sed 's/^/| /' conftest.$ac_ext >&5
5640
ca81d7a0 5641
503d2be0 5642fi
ca81d7a0
JD
5643
5644rm -f core conftest.err conftest.$ac_objext
edfaf76d 5645 break
503d2be0
AS
5646 done
5647 CC=$ac_save_CC
5648 rm -f conftest.$ac_ext
5649 fi
b192d653 5650fi
ca81d7a0
JD
5651{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5652echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5653 if test "$ac_cv_sys_largefile_CC" != no; then
5654 CC=$CC$ac_cv_sys_largefile_CC
5655 fi
b192d653 5656
ca81d7a0
JD
5657 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5658echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5659if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5660 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5661else
503d2be0 5662 while :; do
503d2be0 5663 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5664/* confdefs.h. */
5665_ACEOF
5666cat confdefs.h >>conftest.$ac_ext
5667cat >>conftest.$ac_ext <<_ACEOF
5668/* end confdefs.h. */
f4988be7 5669#include <sys/types.h>
503d2be0
AS
5670 /* Check that off_t can represent 2**63 - 1 correctly.
5671 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5672 since some C++ compilers masquerading as C compilers
5673 incorrectly reject 9223372036854775807. */
5674#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5675 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5676 && LARGE_OFF_T % 2147483647 == 1)
5677 ? 1 : -1];
5678int
5679main ()
5680{
f4988be7 5681
503d2be0
AS
5682 ;
5683 return 0;
5684}
5685_ACEOF
5686rm -f conftest.$ac_objext
ca81d7a0
JD
5687if { (ac_try="$ac_compile"
5688case "(($ac_try" in
5689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5690 *) ac_try_echo=$ac_try;;
5691esac
5692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5693 (eval "$ac_compile") 2>conftest.er1
503d2be0 5694 ac_status=$?
edfaf76d
LK
5695 grep -v '^ *+' conftest.er1 >conftest.err
5696 rm -f conftest.er1
5697 cat conftest.err >&5
c0d27fcc 5698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5699 (exit $ac_status); } && {
5700 test -z "$ac_c_werror_flag" ||
5701 test ! -s conftest.err
5702 } && test -s conftest.$ac_objext; then
5703 ac_cv_sys_file_offset_bits=no; break
f4988be7 5704else
503d2be0 5705 echo "$as_me: failed program was:" >&5
19650fd6
AS
5706sed 's/^/| /' conftest.$ac_ext >&5
5707
ca81d7a0 5708
503d2be0 5709fi
ca81d7a0
JD
5710
5711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5712 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5713/* confdefs.h. */
5714_ACEOF
5715cat confdefs.h >>conftest.$ac_ext
5716cat >>conftest.$ac_ext <<_ACEOF
5717/* end confdefs.h. */
f4988be7
GM
5718#define _FILE_OFFSET_BITS 64
5719#include <sys/types.h>
503d2be0
AS
5720 /* Check that off_t can represent 2**63 - 1 correctly.
5721 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5722 since some C++ compilers masquerading as C compilers
5723 incorrectly reject 9223372036854775807. */
5724#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5725 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5726 && LARGE_OFF_T % 2147483647 == 1)
5727 ? 1 : -1];
5728int
5729main ()
5730{
5731
5732 ;
5733 return 0;
5734}
5735_ACEOF
5736rm -f conftest.$ac_objext
ca81d7a0
JD
5737if { (ac_try="$ac_compile"
5738case "(($ac_try" in
5739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5740 *) ac_try_echo=$ac_try;;
5741esac
5742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5743 (eval "$ac_compile") 2>conftest.er1
503d2be0 5744 ac_status=$?
edfaf76d
LK
5745 grep -v '^ *+' conftest.er1 >conftest.err
5746 rm -f conftest.er1
5747 cat conftest.err >&5
c0d27fcc 5748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5749 (exit $ac_status); } && {
5750 test -z "$ac_c_werror_flag" ||
5751 test ! -s conftest.err
5752 } && test -s conftest.$ac_objext; then
503d2be0
AS
5753 ac_cv_sys_file_offset_bits=64; break
5754else
5755 echo "$as_me: failed program was:" >&5
19650fd6
AS
5756sed 's/^/| /' conftest.$ac_ext >&5
5757
ca81d7a0 5758
503d2be0 5759fi
ca81d7a0
JD
5760
5761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5762 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5763 break
5764done
ba4481b5 5765fi
ca81d7a0
JD
5766{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5767echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5768case $ac_cv_sys_file_offset_bits in #(
5769 no | unknown) ;;
5770 *)
c0d27fcc 5771cat >>confdefs.h <<_ACEOF
f4988be7 5772#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5773_ACEOF
f053c89f
CY
5774;;
5775esac
503d2be0 5776rm -f conftest*
f053c89f
CY
5777 if test $ac_cv_sys_file_offset_bits = unknown; then
5778 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
ca81d7a0 5779echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5780if test "${ac_cv_sys_large_files+set}" = set; then
5781 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5782else
503d2be0 5783 while :; do
503d2be0 5784 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5785/* confdefs.h. */
5786_ACEOF
5787cat confdefs.h >>conftest.$ac_ext
5788cat >>conftest.$ac_ext <<_ACEOF
5789/* end confdefs.h. */
503d2be0
AS
5790#include <sys/types.h>
5791 /* Check that off_t can represent 2**63 - 1 correctly.
5792 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5793 since some C++ compilers masquerading as C compilers
5794 incorrectly reject 9223372036854775807. */
5795#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5796 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5797 && LARGE_OFF_T % 2147483647 == 1)
5798 ? 1 : -1];
5799int
5800main ()
5801{
ba4481b5 5802
503d2be0
AS
5803 ;
5804 return 0;
5805}
5806_ACEOF
5807rm -f conftest.$ac_objext
ca81d7a0
JD
5808if { (ac_try="$ac_compile"
5809case "(($ac_try" in
5810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5811 *) ac_try_echo=$ac_try;;
5812esac
5813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5814 (eval "$ac_compile") 2>conftest.er1
503d2be0 5815 ac_status=$?
edfaf76d
LK
5816 grep -v '^ *+' conftest.er1 >conftest.err
5817 rm -f conftest.er1
5818 cat conftest.err >&5
c0d27fcc 5819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5820 (exit $ac_status); } && {
5821 test -z "$ac_c_werror_flag" ||
5822 test ! -s conftest.err
5823 } && test -s conftest.$ac_objext; then
5824 ac_cv_sys_large_files=no; break
ba4481b5 5825else
503d2be0 5826 echo "$as_me: failed program was:" >&5
19650fd6
AS
5827sed 's/^/| /' conftest.$ac_ext >&5
5828
ca81d7a0 5829
503d2be0 5830fi
ca81d7a0
JD
5831
5832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5833 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5834/* confdefs.h. */
5835_ACEOF
5836cat confdefs.h >>conftest.$ac_ext
5837cat >>conftest.$ac_ext <<_ACEOF
5838/* end confdefs.h. */
f4988be7 5839#define _LARGE_FILES 1
503d2be0
AS
5840#include <sys/types.h>
5841 /* Check that off_t can represent 2**63 - 1 correctly.
5842 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5843 since some C++ compilers masquerading as C compilers
5844 incorrectly reject 9223372036854775807. */
5845#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5846 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5847 && LARGE_OFF_T % 2147483647 == 1)
5848 ? 1 : -1];
5849int
5850main ()
5851{
f4988be7 5852
503d2be0
AS
5853 ;
5854 return 0;
5855}
5856_ACEOF
5857rm -f conftest.$ac_objext
ca81d7a0
JD
5858if { (ac_try="$ac_compile"
5859case "(($ac_try" in
5860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5861 *) ac_try_echo=$ac_try;;
5862esac
5863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5864 (eval "$ac_compile") 2>conftest.er1
503d2be0 5865 ac_status=$?
edfaf76d
LK
5866 grep -v '^ *+' conftest.er1 >conftest.err
5867 rm -f conftest.er1
5868 cat conftest.err >&5
c0d27fcc 5869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5870 (exit $ac_status); } && {
5871 test -z "$ac_c_werror_flag" ||
5872 test ! -s conftest.err
5873 } && test -s conftest.$ac_objext; then
503d2be0
AS
5874 ac_cv_sys_large_files=1; break
5875else
5876 echo "$as_me: failed program was:" >&5
19650fd6
AS
5877sed 's/^/| /' conftest.$ac_ext >&5
5878
ca81d7a0 5879
503d2be0 5880fi
ca81d7a0
JD
5881
5882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5883 ac_cv_sys_large_files=unknown
503d2be0
AS
5884 break
5885done
ba4481b5 5886fi
ca81d7a0
JD
5887{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5888echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5889case $ac_cv_sys_large_files in #(
5890 no | unknown) ;;
5891 *)
c0d27fcc 5892cat >>confdefs.h <<_ACEOF
f4988be7 5893#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5894_ACEOF
f053c89f
CY
5895;;
5896esac
503d2be0 5897rm -f conftest*
f053c89f 5898 fi
503d2be0 5899fi
ba4481b5 5900
c0d27fcc 5901
439f58ee 5902
55e6d9b2 5903### The standard library on x86-64 and s390x GNU/Linux distributions can
bc5d9888
CY
5904### be located in either /usr/lib64 or /usr/lib.
5905case "${canonical}" in
55e6d9b2 5906 x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
bc5d9888
CY
5907 if test -d /usr/lib64; then
5908
5909cat >>confdefs.h <<\_ACEOF
55e6d9b2 5910#define HAVE_LIB64_DIR 1
bc5d9888
CY
5911_ACEOF
5912
5913fi
5914esac
5915
439f58ee
JD
5916
5917
5918
2c9dccc9
PJ
5919if test "${with_sound}" != "no"; then
5920 # Sound support for GNU/Linux and the free BSDs.
c0d27fcc
MR
5921
5922
5923
5924for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5925do
5926as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
5927if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5928 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5929echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5930if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
5931 echo $ECHO_N "(cached) $ECHO_C" >&6
5932fi
ca81d7a0
JD
5933ac_res=`eval echo '${'$as_ac_Header'}'`
5934 { echo "$as_me:$LINENO: result: $ac_res" >&5
5935echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
5936else
5937 # Is the header compilable?
ca81d7a0
JD
5938{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5939echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 5940cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5941/* confdefs.h. */
5942_ACEOF
5943cat confdefs.h >>conftest.$ac_ext
5944cat >>conftest.$ac_ext <<_ACEOF
5945/* end confdefs.h. */
c0d27fcc 5946$ac_includes_default
98418dba 5947#include <$ac_header>
503d2be0 5948_ACEOF
c0d27fcc 5949rm -f conftest.$ac_objext
ca81d7a0
JD
5950if { (ac_try="$ac_compile"
5951case "(($ac_try" in
5952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5953 *) ac_try_echo=$ac_try;;
5954esac
5955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5956 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 5957 ac_status=$?
edfaf76d
LK
5958 grep -v '^ *+' conftest.er1 >conftest.err
5959 rm -f conftest.er1
5960 cat conftest.err >&5
c0d27fcc 5961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5962 (exit $ac_status); } && {
5963 test -z "$ac_c_werror_flag" ||
5964 test ! -s conftest.err
5965 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5966 ac_header_compiler=yes
5967else
5968 echo "$as_me: failed program was:" >&5
19650fd6
AS
5969sed 's/^/| /' conftest.$ac_ext >&5
5970
ca81d7a0 5971 ac_header_compiler=no
c0d27fcc 5972fi
ca81d7a0
JD
5973
5974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5975{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5976echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
5977
5978# Is the header present?
ca81d7a0
JD
5979{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5980echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 5981cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5982/* confdefs.h. */
5983_ACEOF
5984cat confdefs.h >>conftest.$ac_ext
5985cat >>conftest.$ac_ext <<_ACEOF
5986/* end confdefs.h. */
c0d27fcc
MR
5987#include <$ac_header>
5988_ACEOF
ca81d7a0
JD
5989if { (ac_try="$ac_cpp conftest.$ac_ext"
5990case "(($ac_try" in
5991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5992 *) ac_try_echo=$ac_try;;
5993esac
5994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5995 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 5996 ac_status=$?
6bae0ccf 5997 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5998 rm -f conftest.er1
5999 cat conftest.err >&5
c0d27fcc 6000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6001 (exit $ac_status); } >/dev/null && {
6002 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6003 test ! -s conftest.err
6004 }; then
c0d27fcc 6005 ac_header_preproc=yes
f4988be7 6006else
503d2be0 6007 echo "$as_me: failed program was:" >&5
19650fd6
AS
6008sed 's/^/| /' conftest.$ac_ext >&5
6009
c0d27fcc 6010 ac_header_preproc=no
f4988be7 6011fi
ca81d7a0 6012
98418dba 6013rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6014{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6015echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6016
6017# So? What about this header?
edfaf76d
LK
6018case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6019 yes:no: )
c0d27fcc
MR
6020 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6021echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6022 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6023echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6024 ac_header_preproc=yes
19650fd6 6025 ;;
edfaf76d 6026 no:yes:* )
c0d27fcc
MR
6027 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6028echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6029 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6030echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6031 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6032echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6033 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6034echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6035 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6036echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6037 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6038echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6039
19650fd6 6040 ;;
c0d27fcc 6041esac
ca81d7a0
JD
6042{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6043echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6044if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6045 echo $ECHO_N "(cached) $ECHO_C" >&6
6046else
edfaf76d 6047 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6048fi
ca81d7a0
JD
6049ac_res=`eval echo '${'$as_ac_Header'}'`
6050 { echo "$as_me:$LINENO: result: $ac_res" >&5
6051echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6052
6053fi
98418dba 6054if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6055 cat >>confdefs.h <<_ACEOF
98418dba 6056#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6057_ACEOF
f4988be7
GM
6058
6059fi
c0d27fcc 6060
98418dba
CW
6061done
6062
6063 # Emulation library used on NetBSD.
ca81d7a0
JD
6064 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6065echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6066if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6067 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6068else
98418dba
CW
6069 ac_check_lib_save_LIBS=$LIBS
6070LIBS="-lossaudio $LIBS"
6071cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6072/* confdefs.h. */
6073_ACEOF
6074cat confdefs.h >>conftest.$ac_ext
6075cat >>conftest.$ac_ext <<_ACEOF
6076/* end confdefs.h. */
98418dba 6077
ca81d7a0
JD
6078/* Override any GCC internal prototype to avoid an error.
6079 Use char because int might match the return type of a GCC
6080 builtin and then its argument prototype would still apply. */
98418dba
CW
6081#ifdef __cplusplus
6082extern "C"
f4988be7 6083#endif
98418dba 6084char _oss_ioctl ();
503d2be0
AS
6085int
6086main ()
6087{
ca81d7a0 6088return _oss_ioctl ();
503d2be0
AS
6089 ;
6090 return 0;
6091}
6092_ACEOF
98418dba 6093rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6094if { (ac_try="$ac_link"
6095case "(($ac_try" in
6096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6097 *) ac_try_echo=$ac_try;;
6098esac
6099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6100 (eval "$ac_link") 2>conftest.er1
503d2be0 6101 ac_status=$?
edfaf76d
LK
6102 grep -v '^ *+' conftest.er1 >conftest.err
6103 rm -f conftest.er1
6104 cat conftest.err >&5
c0d27fcc 6105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6106 (exit $ac_status); } && {
6107 test -z "$ac_c_werror_flag" ||
6108 test ! -s conftest.err
6109 } && test -s conftest$ac_exeext &&
6110 $as_test_x conftest$ac_exeext; then
98418dba 6111 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6112else
503d2be0 6113 echo "$as_me: failed program was:" >&5
19650fd6
AS
6114sed 's/^/| /' conftest.$ac_ext >&5
6115
ca81d7a0 6116 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6117fi
ca81d7a0 6118
f053c89f 6119rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6120 conftest$ac_exeext conftest.$ac_ext
98418dba 6121LIBS=$ac_check_lib_save_LIBS
f4988be7 6122fi
ca81d7a0
JD
6123{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6124echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6125if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6126 LIBSOUND=-lossaudio
6127else
6128 LIBSOUND=
6129fi
6130
c0d27fcc 6131
439f58ee
JD
6132
6133 ALSA_REQUIRED=1.0.0
6134 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
439f58ee
JD
6135
6136 succeeded=no
6137
00b9c927 6138 # Extract the first word of "pkg-config", so it can be a program name with args.
439f58ee 6139set dummy pkg-config; ac_word=$2
ca81d7a0
JD
6140{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6141echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6142if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6143 echo $ECHO_N "(cached) $ECHO_C" >&6
6144else
6145 case $PKG_CONFIG in
6146 [\\/]* | ?:[\\/]*)
6147 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6148 ;;
6149 *)
6150 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6151for as_dir in $PATH
6152do
6153 IFS=$as_save_IFS
6154 test -z "$as_dir" && as_dir=.
6155 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6156 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6157 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6158 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6159 break 2
6160 fi
6161done
6162done
ca81d7a0 6163IFS=$as_save_IFS
439f58ee
JD
6164
6165 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6166 ;;
6167esac
6168fi
6169PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6170if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
6171 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6172echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6173else
ca81d7a0
JD
6174 { echo "$as_me:$LINENO: result: no" >&5
6175echo "${ECHO_T}no" >&6; }
439f58ee
JD
6176fi
6177
ca81d7a0 6178
439f58ee
JD
6179
6180 if test "$PKG_CONFIG" = "no" ; then
6181 HAVE_ALSA=no
6182 else
6183 PKG_CONFIG_MIN_VERSION=0.9.0
6184 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
6185 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6186echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6187
67db6aa2 6188 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ca81d7a0
JD
6189 { echo "$as_me:$LINENO: result: yes" >&5
6190echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6191 succeeded=yes
6192
ca81d7a0
JD
6193 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6194echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6195 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6196 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6197echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6198
ca81d7a0
JD
6199 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6200echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6201 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6202 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6203echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6204 else
ca81d7a0
JD
6205 { echo "$as_me:$LINENO: result: no" >&5
6206echo "${ECHO_T}no" >&6; }
439f58ee
JD
6207 ALSA_CFLAGS=""
6208 ALSA_LIBS=""
6209 ## If we have a custom action on failure, don't print errors, but
6210 ## do set a variable so people can do so.
6211 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6212
6213 fi
6214
6215
6216
6217 else
6218 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6219 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6220 fi
6221 fi
6222
6223 if test $succeeded = yes; then
6224 HAVE_ALSA=yes
6225 else
6226 HAVE_ALSA=no
6227 fi
6228
6229 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6230 SAVE_CFLAGS="$CFLAGS"
6231 SAVE_LDFLAGS="$LDFLAGS"
6232 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6233 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6234 cat >conftest.$ac_ext <<_ACEOF
6235/* confdefs.h. */
6236_ACEOF
6237cat confdefs.h >>conftest.$ac_ext
6238cat >>conftest.$ac_ext <<_ACEOF
6239/* end confdefs.h. */
6240#include <asoundlib.h>
6241int
6242main ()
6243{
6244snd_lib_error_set_handler (0);
6245 ;
6246 return 0;
6247}
6248_ACEOF
6249rm -f conftest.$ac_objext
6250if { (ac_try="$ac_compile"
6251case "(($ac_try" in
6252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6253 *) ac_try_echo=$ac_try;;
6254esac
6255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6256 (eval "$ac_compile") 2>conftest.er1
6257 ac_status=$?
6258 grep -v '^ *+' conftest.er1 >conftest.err
6259 rm -f conftest.er1
6260 cat conftest.err >&5
6261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6262 (exit $ac_status); } && {
6263 test -z "$ac_c_werror_flag" ||
6264 test ! -s conftest.err
6265 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6266 emacs_alsa_normal=yes
6267else
6268 echo "$as_me: failed program was:" >&5
6269sed 's/^/| /' conftest.$ac_ext >&5
6270
6271 emacs_alsa_normal=no
6272fi
6273
6274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6275 if test "$emacs_alsa_normal" != yes; then
6276 cat >conftest.$ac_ext <<_ACEOF
6277/* confdefs.h. */
6278_ACEOF
6279cat confdefs.h >>conftest.$ac_ext
6280cat >>conftest.$ac_ext <<_ACEOF
6281/* end confdefs.h. */
6282#include <alsa/asoundlib.h>
6283int
6284main ()
6285{
6286snd_lib_error_set_handler (0);
6287 ;
6288 return 0;
6289}
6290_ACEOF
6291rm -f conftest.$ac_objext
6292if { (ac_try="$ac_compile"
6293case "(($ac_try" in
6294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6295 *) ac_try_echo=$ac_try;;
6296esac
6297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6298 (eval "$ac_compile") 2>conftest.er1
6299 ac_status=$?
6300 grep -v '^ *+' conftest.er1 >conftest.err
6301 rm -f conftest.er1
6302 cat conftest.err >&5
6303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6304 (exit $ac_status); } && {
6305 test -z "$ac_c_werror_flag" ||
6306 test ! -s conftest.err
6307 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6308 emacs_alsa_subdir=yes
6309else
6310 echo "$as_me: failed program was:" >&5
6311sed 's/^/| /' conftest.$ac_ext >&5
6312
6313 emacs_alsa_subdir=no
6314fi
6315
6316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6317 if test "$emacs_alsa_subdir" != yes; then
6318 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6319echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6320 { (exit 1); exit 1; }; }
6321 fi
6322 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6323 fi
6324
6325 CFLAGS="$SAVE_CFLAGS"
6326 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6327 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6328 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6329
6330cat >>confdefs.h <<\_ACEOF
6331#define HAVE_ALSA 1
6332_ACEOF
6333
6334 fi
6335
f4988be7 6336fi
c0d27fcc
MR
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
22044edf
DL
6355
6356
973a76b1 6357
cffcede7 6358
551ffc27 6359
226e2359 6360
c0d27fcc 6361
f4988be7 6362
98418dba
CW
6363for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6364 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6365 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6366 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6367 sys/utsname.h pwd.h
98418dba
CW
6368do
6369as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6370if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6371 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6372echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6373if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6374 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6375fi
ca81d7a0
JD
6376ac_res=`eval echo '${'$as_ac_Header'}'`
6377 { echo "$as_me:$LINENO: result: $ac_res" >&5
6378echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6379else
c0d27fcc 6380 # Is the header compilable?
ca81d7a0
JD
6381{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6382echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6383cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6384/* confdefs.h. */
6385_ACEOF
6386cat confdefs.h >>conftest.$ac_ext
6387cat >>conftest.$ac_ext <<_ACEOF
6388/* end confdefs.h. */
c0d27fcc
MR
6389$ac_includes_default
6390#include <$ac_header>
6391_ACEOF
6392rm -f conftest.$ac_objext
ca81d7a0
JD
6393if { (ac_try="$ac_compile"
6394case "(($ac_try" in
6395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6396 *) ac_try_echo=$ac_try;;
6397esac
6398eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6399 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6400 ac_status=$?
edfaf76d
LK
6401 grep -v '^ *+' conftest.er1 >conftest.err
6402 rm -f conftest.er1
6403 cat conftest.err >&5
c0d27fcc 6404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6405 (exit $ac_status); } && {
6406 test -z "$ac_c_werror_flag" ||
6407 test ! -s conftest.err
6408 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6409 ac_header_compiler=yes
6410else
6411 echo "$as_me: failed program was:" >&5
19650fd6
AS
6412sed 's/^/| /' conftest.$ac_ext >&5
6413
ca81d7a0 6414 ac_header_compiler=no
c0d27fcc 6415fi
ca81d7a0
JD
6416
6417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6418{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6419echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6420
6421# Is the header present?
ca81d7a0
JD
6422{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6423echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6424cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6425/* confdefs.h. */
6426_ACEOF
6427cat confdefs.h >>conftest.$ac_ext
6428cat >>conftest.$ac_ext <<_ACEOF
6429/* end confdefs.h. */
98418dba 6430#include <$ac_header>
503d2be0 6431_ACEOF
ca81d7a0
JD
6432if { (ac_try="$ac_cpp conftest.$ac_ext"
6433case "(($ac_try" in
6434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6435 *) ac_try_echo=$ac_try;;
6436esac
6437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6438 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6439 ac_status=$?
6bae0ccf 6440 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6441 rm -f conftest.er1
6442 cat conftest.err >&5
c0d27fcc 6443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6444 (exit $ac_status); } >/dev/null && {
6445 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6446 test ! -s conftest.err
6447 }; then
c0d27fcc 6448 ac_header_preproc=yes
34ec9ebe 6449else
503d2be0 6450 echo "$as_me: failed program was:" >&5
19650fd6
AS
6451sed 's/^/| /' conftest.$ac_ext >&5
6452
c0d27fcc 6453 ac_header_preproc=no
34ec9ebe 6454fi
ca81d7a0 6455
98418dba 6456rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6457{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6458echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6459
6460# So? What about this header?
edfaf76d
LK
6461case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6462 yes:no: )
c0d27fcc
MR
6463 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6464echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6465 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6466echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6467 ac_header_preproc=yes
19650fd6 6468 ;;
edfaf76d 6469 no:yes:* )
c0d27fcc
MR
6470 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6471echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6472 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6473echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6474 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6475echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6476 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6477echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6478 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6479echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6480 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6481echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6482
19650fd6 6483 ;;
c0d27fcc 6484esac
ca81d7a0
JD
6485{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6486echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6487if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6488 echo $ECHO_N "(cached) $ECHO_C" >&6
6489else
edfaf76d 6490 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6491fi
ca81d7a0
JD
6492ac_res=`eval echo '${'$as_ac_Header'}'`
6493 { echo "$as_me:$LINENO: result: $ac_res" >&5
6494echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6495
6496fi
98418dba 6497if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6498 cat >>confdefs.h <<_ACEOF
98418dba 6499#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6500_ACEOF
34ec9ebe 6501
98418dba 6502fi
c0d27fcc 6503
98418dba
CW
6504done
6505
22044edf 6506
ca81d7a0
JD
6507{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6508echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6509cat >conftest.$ac_ext <<_ACEOF
6510/* confdefs.h. */
6511_ACEOF
6512cat confdefs.h >>conftest.$ac_ext
6513cat >>conftest.$ac_ext <<_ACEOF
6514/* end confdefs.h. */
6515#include <sys/personality.h>
6516int
6517main ()
6518{
6519personality (PER_LINUX32)
6520 ;
6521 return 0;
6522}
6523_ACEOF
6524rm -f conftest.$ac_objext
ca81d7a0
JD
6525if { (ac_try="$ac_compile"
6526case "(($ac_try" in
6527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6528 *) ac_try_echo=$ac_try;;
6529esac
6530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6531 (eval "$ac_compile") 2>conftest.er1
f17e308a 6532 ac_status=$?
edfaf76d
LK
6533 grep -v '^ *+' conftest.er1 >conftest.err
6534 rm -f conftest.er1
6535 cat conftest.err >&5
f17e308a 6536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6537 (exit $ac_status); } && {
6538 test -z "$ac_c_werror_flag" ||
6539 test ! -s conftest.err
6540 } && test -s conftest.$ac_objext; then
f17e308a
JD
6541 emacs_cv_personality_linux32=yes
6542else
6543 echo "$as_me: failed program was:" >&5
6544sed 's/^/| /' conftest.$ac_ext >&5
6545
ca81d7a0 6546 emacs_cv_personality_linux32=no
f17e308a 6547fi
ca81d7a0
JD
6548
6549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6550{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6551echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6552
6553if test $emacs_cv_personality_linux32 = yes; then
6554
6555cat >>confdefs.h <<\_ACEOF
6556#define HAVE_PERSONALITY_LINUX32 1
6557_ACEOF
6558
6559fi
6560
6561
22044edf
DL
6562for ac_header in term.h
6563do
6564as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6565{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6566echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6567if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6568 echo $ECHO_N "(cached) $ECHO_C" >&6
6569else
6570 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6571/* confdefs.h. */
6572_ACEOF
6573cat confdefs.h >>conftest.$ac_ext
6574cat >>conftest.$ac_ext <<_ACEOF
6575/* end confdefs.h. */
22044edf
DL
6576#include <$ac_header>
6577_ACEOF
ca81d7a0
JD
6578if { (ac_try="$ac_cpp conftest.$ac_ext"
6579case "(($ac_try" in
6580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6581 *) ac_try_echo=$ac_try;;
6582esac
6583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6584 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6585 ac_status=$?
6586 grep -v '^ *+' conftest.er1 >conftest.err
6587 rm -f conftest.er1
6588 cat conftest.err >&5
6589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6590 (exit $ac_status); } >/dev/null && {
6591 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6592 test ! -s conftest.err
6593 }; then
22044edf
DL
6594 eval "$as_ac_Header=yes"
6595else
6596 echo "$as_me: failed program was:" >&5
19650fd6
AS
6597sed 's/^/| /' conftest.$ac_ext >&5
6598
22044edf
DL
6599 eval "$as_ac_Header=no"
6600fi
ca81d7a0 6601
22044edf
DL
6602rm -f conftest.err conftest.$ac_ext
6603fi
ca81d7a0
JD
6604ac_res=`eval echo '${'$as_ac_Header'}'`
6605 { echo "$as_me:$LINENO: result: $ac_res" >&5
6606echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6607if test `eval echo '${'$as_ac_Header'}'` = yes; then
6608 cat >>confdefs.h <<_ACEOF
6609#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6610_ACEOF
6611
6612fi
6613
6614done
6615
ca81d7a0
JD
6616{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6617echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6618if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6619 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6620else
503d2be0 6621 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6622/* confdefs.h. */
6623_ACEOF
6624cat confdefs.h >>conftest.$ac_ext
6625cat >>conftest.$ac_ext <<_ACEOF
6626/* end confdefs.h. */
98418dba
CW
6627#include <stdlib.h>
6628#include <stdarg.h>
6629#include <string.h>
6630#include <float.h>
6631
19650fd6
AS
6632int
6633main ()
6634{
6635
6636 ;
6637 return 0;
6638}
98418dba 6639_ACEOF
19650fd6 6640rm -f conftest.$ac_objext
ca81d7a0
JD
6641if { (ac_try="$ac_compile"
6642case "(($ac_try" in
6643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6644 *) ac_try_echo=$ac_try;;
6645esac
6646eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6647 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6648 ac_status=$?
edfaf76d
LK
6649 grep -v '^ *+' conftest.er1 >conftest.err
6650 rm -f conftest.er1
6651 cat conftest.err >&5
cd958eb3 6652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6653 (exit $ac_status); } && {
6654 test -z "$ac_c_werror_flag" ||
6655 test ! -s conftest.err
6656 } && test -s conftest.$ac_objext; then
98418dba 6657 ac_cv_header_stdc=yes
ba4481b5 6658else
503d2be0 6659 echo "$as_me: failed program was:" >&5
19650fd6
AS
6660sed 's/^/| /' conftest.$ac_ext >&5
6661
ca81d7a0 6662 ac_cv_header_stdc=no
ba4481b5 6663fi
ca81d7a0
JD
6664
6665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6666
6667if test $ac_cv_header_stdc = yes; then
6668 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6669 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6670/* confdefs.h. */
6671_ACEOF
6672cat confdefs.h >>conftest.$ac_ext
6673cat >>conftest.$ac_ext <<_ACEOF
6674/* end confdefs.h. */
98418dba
CW
6675#include <string.h>
6676
6677_ACEOF
6678if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6679 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6680 :
6681else
6682 ac_cv_header_stdc=no
ba4481b5 6683fi
98418dba 6684rm -f conftest*
ba4481b5
DL
6685
6686fi
6687
98418dba
CW
6688if test $ac_cv_header_stdc = yes; then
6689 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6690 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6691/* confdefs.h. */
6692_ACEOF
6693cat confdefs.h >>conftest.$ac_ext
6694cat >>conftest.$ac_ext <<_ACEOF
6695/* end confdefs.h. */
98418dba
CW
6696#include <stdlib.h>
6697
6698_ACEOF
6699if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6700 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6701 :
6702else
6703 ac_cv_header_stdc=no
6704fi
6705rm -f conftest*
6706
6707fi
6708
6709if test $ac_cv_header_stdc = yes; then
6710 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6711 if test "$cross_compiling" = yes; then
6712 :
d42122a3 6713else
503d2be0 6714 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6715/* confdefs.h. */
6716_ACEOF
6717cat confdefs.h >>conftest.$ac_ext
6718cat >>conftest.$ac_ext <<_ACEOF
6719/* end confdefs.h. */
98418dba 6720#include <ctype.h>
ca81d7a0 6721#include <stdlib.h>
98418dba
CW
6722#if ((' ' & 0x0FF) == 0x020)
6723# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6724# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6725#else
19650fd6 6726# define ISLOWER(c) \
edfaf76d
LK
6727 (('a' <= (c) && (c) <= 'i') \
6728 || ('j' <= (c) && (c) <= 'r') \
6729 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6730# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6731#endif
6732
6733#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6734int
6735main ()
6736{
98418dba
CW
6737 int i;
6738 for (i = 0; i < 256; i++)
6739 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6740 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6741 return 2;
6742 return 0;
503d2be0
AS
6743}
6744_ACEOF
98418dba 6745rm -f conftest$ac_exeext
ca81d7a0
JD
6746if { (ac_try="$ac_link"
6747case "(($ac_try" in
6748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6749 *) ac_try_echo=$ac_try;;
6750esac
6751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6752 (eval "$ac_link") 2>&5
503d2be0 6753 ac_status=$?
c0d27fcc 6754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6755 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6756 { (case "(($ac_try" in
6757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6758 *) ac_try_echo=$ac_try;;
6759esac
6760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6761 (eval "$ac_try") 2>&5
503d2be0 6762 ac_status=$?
c0d27fcc 6763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6764 (exit $ac_status); }; }; then
98418dba 6765 :
d42122a3 6766else
98418dba
CW
6767 echo "$as_me: program exited with status $ac_status" >&5
6768echo "$as_me: failed program was:" >&5
19650fd6
AS
6769sed 's/^/| /' conftest.$ac_ext >&5
6770
c0d27fcc 6771( exit $ac_status )
98418dba 6772ac_cv_header_stdc=no
d42122a3 6773fi
ca81d7a0 6774rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6775fi
ca81d7a0
JD
6776
6777
98418dba
CW
6778fi
6779fi
ca81d7a0
JD
6780{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6781echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
6782if test $ac_cv_header_stdc = yes; then
6783
c0d27fcc 6784cat >>confdefs.h <<\_ACEOF
98418dba 6785#define STDC_HEADERS 1
c0d27fcc 6786_ACEOF
d42122a3
DL
6787
6788fi
6789
ca81d7a0
JD
6790{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
6791echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 6792if test "${ac_cv_header_time+set}" = set; then
503d2be0 6793 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6794else
503d2be0 6795 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6796/* confdefs.h. */
6797_ACEOF
6798cat confdefs.h >>conftest.$ac_ext
6799cat >>conftest.$ac_ext <<_ACEOF
6800/* end confdefs.h. */
ba4481b5 6801#include <sys/types.h>
98418dba 6802#include <sys/time.h>
ba4481b5 6803#include <time.h>
503d2be0
AS
6804
6805int
6806main ()
6807{
98418dba
CW
6808if ((struct tm *) 0)
6809return 0;
503d2be0
AS
6810 ;
6811 return 0;
6812}
6813_ACEOF
6814rm -f conftest.$ac_objext
ca81d7a0
JD
6815if { (ac_try="$ac_compile"
6816case "(($ac_try" in
6817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6818 *) ac_try_echo=$ac_try;;
6819esac
6820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6821 (eval "$ac_compile") 2>conftest.er1
503d2be0 6822 ac_status=$?
edfaf76d
LK
6823 grep -v '^ *+' conftest.er1 >conftest.err
6824 rm -f conftest.er1
6825 cat conftest.err >&5
c0d27fcc 6826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6827 (exit $ac_status); } && {
6828 test -z "$ac_c_werror_flag" ||
6829 test ! -s conftest.err
6830 } && test -s conftest.$ac_objext; then
98418dba 6831 ac_cv_header_time=yes
ba4481b5 6832else
503d2be0 6833 echo "$as_me: failed program was:" >&5
19650fd6
AS
6834sed 's/^/| /' conftest.$ac_ext >&5
6835
ca81d7a0 6836 ac_cv_header_time=no
ba4481b5 6837fi
ca81d7a0
JD
6838
6839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6840fi
ca81d7a0
JD
6841{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
6842echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 6843if test $ac_cv_header_time = yes; then
503d2be0 6844
c0d27fcc 6845cat >>confdefs.h <<\_ACEOF
98418dba 6846#define TIME_WITH_SYS_TIME 1
c0d27fcc 6847_ACEOF
ba4481b5
DL
6848
6849fi
6850
ca81d7a0
JD
6851{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6852echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 6853if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 6854 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6855else
503d2be0 6856 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6857/* confdefs.h. */
6858_ACEOF
6859cat confdefs.h >>conftest.$ac_ext
6860cat >>conftest.$ac_ext <<_ACEOF
6861/* end confdefs.h. */
cd958eb3
MB
6862$ac_includes_default
6863int
6864main ()
6865{
6866#ifndef sys_siglist
f053c89f 6867 (void) sys_siglist;
98418dba 6868#endif
503d2be0 6869
cd958eb3
MB
6870 ;
6871 return 0;
6872}
6873_ACEOF
6874rm -f conftest.$ac_objext
ca81d7a0
JD
6875if { (ac_try="$ac_compile"
6876case "(($ac_try" in
6877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6878 *) ac_try_echo=$ac_try;;
6879esac
6880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6881 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6882 ac_status=$?
edfaf76d
LK
6883 grep -v '^ *+' conftest.er1 >conftest.err
6884 rm -f conftest.er1
6885 cat conftest.err >&5
cd958eb3 6886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6887 (exit $ac_status); } && {
6888 test -z "$ac_c_werror_flag" ||
6889 test ! -s conftest.err
6890 } && test -s conftest.$ac_objext; then
cd958eb3
MB
6891 ac_cv_have_decl_sys_siglist=yes
6892else
6893 echo "$as_me: failed program was:" >&5
19650fd6
AS
6894sed 's/^/| /' conftest.$ac_ext >&5
6895
ca81d7a0 6896 ac_cv_have_decl_sys_siglist=no
cd958eb3 6897fi
ca81d7a0
JD
6898
6899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 6900fi
ca81d7a0
JD
6901{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
6902echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
6903if test $ac_cv_have_decl_sys_siglist = yes; then
6904
6905cat >>confdefs.h <<_ACEOF
6906#define HAVE_DECL_SYS_SIGLIST 1
6907_ACEOF
6908
6909
6910else
6911 cat >>confdefs.h <<_ACEOF
6912#define HAVE_DECL_SYS_SIGLIST 0
6913_ACEOF
6914
6915
6916fi
6917
6918
6919if test $ac_cv_have_decl_sys_siglist != yes; then
6920 # For Tru64, at least:
ca81d7a0
JD
6921 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
6922echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
6923if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
6924 echo $ECHO_N "(cached) $ECHO_C" >&6
6925else
6926 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6927/* confdefs.h. */
6928_ACEOF
6929cat confdefs.h >>conftest.$ac_ext
6930cat >>conftest.$ac_ext <<_ACEOF
6931/* end confdefs.h. */
cd958eb3 6932$ac_includes_default
503d2be0
AS
6933int
6934main ()
6935{
cd958eb3 6936#ifndef __sys_siglist
f053c89f 6937 (void) __sys_siglist;
cd958eb3
MB
6938#endif
6939
503d2be0
AS
6940 ;
6941 return 0;
6942}
6943_ACEOF
6944rm -f conftest.$ac_objext
ca81d7a0
JD
6945if { (ac_try="$ac_compile"
6946case "(($ac_try" in
6947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6948 *) ac_try_echo=$ac_try;;
6949esac
6950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6951 (eval "$ac_compile") 2>conftest.er1
503d2be0 6952 ac_status=$?
edfaf76d
LK
6953 grep -v '^ *+' conftest.er1 >conftest.err
6954 rm -f conftest.er1
6955 cat conftest.err >&5
c0d27fcc 6956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6957 (exit $ac_status); } && {
6958 test -z "$ac_c_werror_flag" ||
6959 test ! -s conftest.err
6960 } && test -s conftest.$ac_objext; then
cd958eb3 6961 ac_cv_have_decl___sys_siglist=yes
ba4481b5 6962else
503d2be0 6963 echo "$as_me: failed program was:" >&5
19650fd6
AS
6964sed 's/^/| /' conftest.$ac_ext >&5
6965
ca81d7a0 6966 ac_cv_have_decl___sys_siglist=no
ba4481b5 6967fi
ca81d7a0
JD
6968
6969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6970fi
ca81d7a0
JD
6971{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
6972echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 6973if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 6974
cd958eb3
MB
6975cat >>confdefs.h <<_ACEOF
6976#define HAVE_DECL___SYS_SIGLIST 1
6977_ACEOF
6978
6979
6980else
6981 cat >>confdefs.h <<_ACEOF
6982#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 6983_ACEOF
503d2be0 6984
cd958eb3 6985
ba4481b5
DL
6986fi
6987
cd958eb3
MB
6988
6989 if test $ac_cv_have_decl___sys_siglist = yes; then
6990
6991cat >>confdefs.h <<\_ACEOF
6992#define sys_siglist __sys_siglist
6993_ACEOF
6994
6995 fi
6996fi
ca81d7a0
JD
6997{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
6998echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 6999if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 7000 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7001else
503d2be0 7002 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7003/* confdefs.h. */
7004_ACEOF
7005cat confdefs.h >>conftest.$ac_ext
7006cat >>conftest.$ac_ext <<_ACEOF
7007/* end confdefs.h. */
98418dba
CW
7008#include <sys/types.h>
7009#include <sys/wait.h>
7010#ifndef WEXITSTATUS
ca81d7a0 7011# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7012#endif
7013#ifndef WIFEXITED
7014# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7015#endif
503d2be0
AS
7016
7017int
7018main ()
7019{
98418dba
CW
7020 int s;
7021 wait (&s);
7022 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7023 ;
7024 return 0;
7025}
7026_ACEOF
98418dba 7027rm -f conftest.$ac_objext
ca81d7a0
JD
7028if { (ac_try="$ac_compile"
7029case "(($ac_try" in
7030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7031 *) ac_try_echo=$ac_try;;
7032esac
7033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7034 (eval "$ac_compile") 2>conftest.er1
503d2be0 7035 ac_status=$?
edfaf76d
LK
7036 grep -v '^ *+' conftest.er1 >conftest.err
7037 rm -f conftest.er1
7038 cat conftest.err >&5
c0d27fcc 7039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7040 (exit $ac_status); } && {
7041 test -z "$ac_c_werror_flag" ||
7042 test ! -s conftest.err
7043 } && test -s conftest.$ac_objext; then
98418dba 7044 ac_cv_header_sys_wait_h=yes
ba4481b5 7045else
503d2be0 7046 echo "$as_me: failed program was:" >&5
19650fd6
AS
7047sed 's/^/| /' conftest.$ac_ext >&5
7048
ca81d7a0 7049 ac_cv_header_sys_wait_h=no
ba4481b5 7050fi
ca81d7a0
JD
7051
7052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7053fi
ca81d7a0
JD
7054{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7055echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7056if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7057
c0d27fcc 7058cat >>confdefs.h <<\_ACEOF
98418dba 7059#define HAVE_SYS_WAIT_H 1
c0d27fcc 7060_ACEOF
ba4481b5 7061
ba4481b5
DL
7062fi
7063
c0d27fcc 7064
ca81d7a0
JD
7065{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7066echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7067if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7068 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7069else
503d2be0 7070 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7071/* confdefs.h. */
7072_ACEOF
7073cat confdefs.h >>conftest.$ac_ext
7074cat >>conftest.$ac_ext <<_ACEOF
7075/* end confdefs.h. */
98418dba
CW
7076#ifdef TIME_WITH_SYS_TIME
7077#include <sys/time.h>
7078#include <time.h>
7079#else
7080#ifdef HAVE_SYS_TIME_H
7081#include <sys/time.h>
7082#else
1113b624 7083#include <time.h>
98418dba
CW
7084#endif
7085#endif
7086#ifdef HAVE_UTIME_H
7087#include <utime.h>
7088#endif
503d2be0
AS
7089int
7090main ()
7091{
98418dba 7092static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7093 ;
7094 return 0;
7095}
7096_ACEOF
98418dba 7097rm -f conftest.$ac_objext
ca81d7a0
JD
7098if { (ac_try="$ac_compile"
7099case "(($ac_try" in
7100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7101 *) ac_try_echo=$ac_try;;
7102esac
7103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7104 (eval "$ac_compile") 2>conftest.er1
503d2be0 7105 ac_status=$?
edfaf76d
LK
7106 grep -v '^ *+' conftest.er1 >conftest.err
7107 rm -f conftest.er1
7108 cat conftest.err >&5
c0d27fcc 7109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7110 (exit $ac_status); } && {
7111 test -z "$ac_c_werror_flag" ||
7112 test ! -s conftest.err
7113 } && test -s conftest.$ac_objext; then
98418dba 7114 emacs_cv_struct_utimbuf=yes
1113b624 7115else
503d2be0 7116 echo "$as_me: failed program was:" >&5
19650fd6
AS
7117sed 's/^/| /' conftest.$ac_ext >&5
7118
ca81d7a0 7119 emacs_cv_struct_utimbuf=no
1113b624 7120fi
ca81d7a0
JD
7121
7122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7123fi
ca81d7a0
JD
7124{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7125echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7126if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7127
c0d27fcc 7128cat >>confdefs.h <<\_ACEOF
98418dba 7129#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7130_ACEOF
1113b624
PE
7131
7132fi
ba4481b5 7133
ca81d7a0
JD
7134{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7135echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7136if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7137 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7138else
98418dba 7139 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7140/* confdefs.h. */
7141_ACEOF
7142cat confdefs.h >>conftest.$ac_ext
7143cat >>conftest.$ac_ext <<_ACEOF
7144/* end confdefs.h. */
7397acc4 7145#include <sys/types.h>
98418dba 7146#include <signal.h>
98418dba 7147
503d2be0
AS
7148int
7149main ()
7150{
ca81d7a0 7151return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7152 ;
7153 return 0;
7154}
7155_ACEOF
98418dba 7156rm -f conftest.$ac_objext
ca81d7a0
JD
7157if { (ac_try="$ac_compile"
7158case "(($ac_try" in
7159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7160 *) ac_try_echo=$ac_try;;
7161esac
7162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7163 (eval "$ac_compile") 2>conftest.er1
503d2be0 7164 ac_status=$?
edfaf76d
LK
7165 grep -v '^ *+' conftest.er1 >conftest.err
7166 rm -f conftest.er1
7167 cat conftest.err >&5
c0d27fcc 7168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7169 (exit $ac_status); } && {
7170 test -z "$ac_c_werror_flag" ||
7171 test ! -s conftest.err
7172 } && test -s conftest.$ac_objext; then
ca81d7a0 7173 ac_cv_type_signal=int
503d2be0
AS
7174else
7175 echo "$as_me: failed program was:" >&5
19650fd6
AS
7176sed 's/^/| /' conftest.$ac_ext >&5
7177
ca81d7a0 7178 ac_cv_type_signal=void
503d2be0 7179fi
ca81d7a0
JD
7180
7181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7182fi
ca81d7a0
JD
7183{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7184echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7185
c0d27fcc 7186cat >>confdefs.h <<_ACEOF
98418dba 7187#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7188_ACEOF
7189
503d2be0 7190
c0d27fcc 7191
ca81d7a0
JD
7192{ echo "$as_me:$LINENO: checking for speed_t" >&5
7193echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7194if test "${emacs_cv_speed_t+set}" = set; then
7195 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7196else
98418dba 7197 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7198/* confdefs.h. */
7199_ACEOF
7200cat confdefs.h >>conftest.$ac_ext
7201cat >>conftest.$ac_ext <<_ACEOF
7202/* end confdefs.h. */
98418dba 7203#include <termios.h>
98418dba
CW
7204int
7205main ()
7206{
7207speed_t x = 1;
7208 ;
7209 return 0;
7210}
7211_ACEOF
7212rm -f conftest.$ac_objext
ca81d7a0
JD
7213if { (ac_try="$ac_compile"
7214case "(($ac_try" in
7215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7216 *) ac_try_echo=$ac_try;;
7217esac
7218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7219 (eval "$ac_compile") 2>conftest.er1
98418dba 7220 ac_status=$?
edfaf76d
LK
7221 grep -v '^ *+' conftest.er1 >conftest.err
7222 rm -f conftest.er1
7223 cat conftest.err >&5
c0d27fcc 7224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7225 (exit $ac_status); } && {
7226 test -z "$ac_c_werror_flag" ||
7227 test ! -s conftest.err
7228 } && test -s conftest.$ac_objext; then
98418dba
CW
7229 emacs_cv_speed_t=yes
7230else
7231 echo "$as_me: failed program was:" >&5
19650fd6
AS
7232sed 's/^/| /' conftest.$ac_ext >&5
7233
ca81d7a0 7234 emacs_cv_speed_t=no
98418dba 7235fi
ca81d7a0
JD
7236
7237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7238fi
ca81d7a0
JD
7239{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7240echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7241if test $emacs_cv_speed_t = yes; then
b936fae4 7242
c0d27fcc 7243cat >>confdefs.h <<\_ACEOF
98418dba 7244#define HAVE_SPEED_T 1
c0d27fcc 7245_ACEOF
98418dba 7246
7397acc4
DL
7247fi
7248
ca81d7a0
JD
7249{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7250echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7251if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7252 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7253else
503d2be0 7254 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7255/* confdefs.h. */
7256_ACEOF
7257cat confdefs.h >>conftest.$ac_ext
7258cat >>conftest.$ac_ext <<_ACEOF
7259/* end confdefs.h. */
98418dba
CW
7260#ifdef TIME_WITH_SYS_TIME
7261#include <sys/time.h>
7262#include <time.h>
7263#else
7264#ifdef HAVE_SYS_TIME_H
7265#include <sys/time.h>
7266#else
7267#include <time.h>
7268#endif
7269#endif
503d2be0
AS
7270int
7271main ()
7272{
98418dba 7273static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7274 ;
7275 return 0;
7276}
7277_ACEOF
7278rm -f conftest.$ac_objext
ca81d7a0
JD
7279if { (ac_try="$ac_compile"
7280case "(($ac_try" in
7281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7282 *) ac_try_echo=$ac_try;;
7283esac
7284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7285 (eval "$ac_compile") 2>conftest.er1
503d2be0 7286 ac_status=$?
edfaf76d
LK
7287 grep -v '^ *+' conftest.er1 >conftest.err
7288 rm -f conftest.er1
7289 cat conftest.err >&5
c0d27fcc 7290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7291 (exit $ac_status); } && {
7292 test -z "$ac_c_werror_flag" ||
7293 test ! -s conftest.err
7294 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7295 emacs_cv_struct_timeval=yes
7296else
503d2be0 7297 echo "$as_me: failed program was:" >&5
19650fd6
AS
7298sed 's/^/| /' conftest.$ac_ext >&5
7299
ca81d7a0 7300 emacs_cv_struct_timeval=no
7397acc4 7301fi
ca81d7a0
JD
7302
7303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7304fi
ca81d7a0
JD
7305{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7306echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7307HAVE_TIMEVAL=$emacs_cv_struct_timeval
7308if test $emacs_cv_struct_timeval = yes; then
b936fae4 7309
c0d27fcc 7310cat >>confdefs.h <<\_ACEOF
98418dba 7311#define HAVE_TIMEVAL 1
c0d27fcc 7312_ACEOF
7397acc4
DL
7313
7314fi
7315
ca81d7a0
JD
7316{ echo "$as_me:$LINENO: checking for struct exception" >&5
7317echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7318if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7319 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7320else
503d2be0 7321 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7322/* confdefs.h. */
7323_ACEOF
7324cat confdefs.h >>conftest.$ac_ext
7325cat >>conftest.$ac_ext <<_ACEOF
7326/* end confdefs.h. */
98418dba 7327#include <math.h>
503d2be0
AS
7328int
7329main ()
7330{
98418dba 7331static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7332 ;
7333 return 0;
ba4481b5 7334}
503d2be0
AS
7335_ACEOF
7336rm -f conftest.$ac_objext
ca81d7a0
JD
7337if { (ac_try="$ac_compile"
7338case "(($ac_try" in
7339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7340 *) ac_try_echo=$ac_try;;
7341esac
7342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7343 (eval "$ac_compile") 2>conftest.er1
503d2be0 7344 ac_status=$?
edfaf76d
LK
7345 grep -v '^ *+' conftest.er1 >conftest.err
7346 rm -f conftest.er1
7347 cat conftest.err >&5
c0d27fcc 7348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7349 (exit $ac_status); } && {
7350 test -z "$ac_c_werror_flag" ||
7351 test ! -s conftest.err
7352 } && test -s conftest.$ac_objext; then
98418dba 7353 emacs_cv_struct_exception=yes
ba4481b5 7354else
503d2be0 7355 echo "$as_me: failed program was:" >&5
19650fd6
AS
7356sed 's/^/| /' conftest.$ac_ext >&5
7357
ca81d7a0 7358 emacs_cv_struct_exception=no
ba4481b5 7359fi
ca81d7a0
JD
7360
7361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7362fi
ca81d7a0
JD
7363{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7364echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7365HAVE_EXCEPTION=$emacs_cv_struct_exception
7366if test $emacs_cv_struct_exception != yes; then
b936fae4 7367
c0d27fcc 7368cat >>confdefs.h <<\_ACEOF
98418dba 7369#define NO_MATHERR 1
c0d27fcc 7370_ACEOF
ba4481b5
DL
7371
7372fi
7373
7862d3a8
AS
7374
7375for ac_header in sys/socket.h
7376do
7377as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7378if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7379 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7380echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7381if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7382 echo $ECHO_N "(cached) $ECHO_C" >&6
7383fi
ca81d7a0
JD
7384ac_res=`eval echo '${'$as_ac_Header'}'`
7385 { echo "$as_me:$LINENO: result: $ac_res" >&5
7386echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7387else
7388 # Is the header compilable?
ca81d7a0
JD
7389{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7390echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7391cat >conftest.$ac_ext <<_ACEOF
7392/* confdefs.h. */
7393_ACEOF
7394cat confdefs.h >>conftest.$ac_ext
7395cat >>conftest.$ac_ext <<_ACEOF
7396/* end confdefs.h. */
7397$ac_includes_default
7398#include <$ac_header>
7399_ACEOF
7400rm -f conftest.$ac_objext
ca81d7a0
JD
7401if { (ac_try="$ac_compile"
7402case "(($ac_try" in
7403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7404 *) ac_try_echo=$ac_try;;
7405esac
7406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7407 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7408 ac_status=$?
edfaf76d
LK
7409 grep -v '^ *+' conftest.er1 >conftest.err
7410 rm -f conftest.er1
7411 cat conftest.err >&5
7862d3a8 7412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7413 (exit $ac_status); } && {
7414 test -z "$ac_c_werror_flag" ||
7415 test ! -s conftest.err
7416 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7417 ac_header_compiler=yes
7418else
7419 echo "$as_me: failed program was:" >&5
7420sed 's/^/| /' conftest.$ac_ext >&5
7421
ca81d7a0 7422 ac_header_compiler=no
7862d3a8 7423fi
ca81d7a0
JD
7424
7425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7426{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7427echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7428
7429# Is the header present?
ca81d7a0
JD
7430{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7431echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7432cat >conftest.$ac_ext <<_ACEOF
7433/* confdefs.h. */
7434_ACEOF
7435cat confdefs.h >>conftest.$ac_ext
7436cat >>conftest.$ac_ext <<_ACEOF
7437/* end confdefs.h. */
7438#include <$ac_header>
7439_ACEOF
ca81d7a0
JD
7440if { (ac_try="$ac_cpp conftest.$ac_ext"
7441case "(($ac_try" in
7442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7443 *) ac_try_echo=$ac_try;;
7444esac
7445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7446 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7447 ac_status=$?
7448 grep -v '^ *+' conftest.er1 >conftest.err
7449 rm -f conftest.er1
7450 cat conftest.err >&5
7451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7452 (exit $ac_status); } >/dev/null && {
7453 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7454 test ! -s conftest.err
7455 }; then
7862d3a8
AS
7456 ac_header_preproc=yes
7457else
7458 echo "$as_me: failed program was:" >&5
7459sed 's/^/| /' conftest.$ac_ext >&5
7460
7461 ac_header_preproc=no
7462fi
ca81d7a0 7463
7862d3a8 7464rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
7465{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7466echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7467
7468# So? What about this header?
edfaf76d
LK
7469case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7470 yes:no: )
7862d3a8
AS
7471 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7472echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7473 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7474echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7475 ac_header_preproc=yes
7862d3a8 7476 ;;
edfaf76d 7477 no:yes:* )
7862d3a8
AS
7478 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7479echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7480 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7481echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7482 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7483echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7484 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7485echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7486 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7487echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7488 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7489echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7490
7862d3a8
AS
7491 ;;
7492esac
ca81d7a0
JD
7493{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7494echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7495if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7496 echo $ECHO_N "(cached) $ECHO_C" >&6
7497else
edfaf76d 7498 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7499fi
ca81d7a0
JD
7500ac_res=`eval echo '${'$as_ac_Header'}'`
7501 { echo "$as_me:$LINENO: result: $ac_res" >&5
7502echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7503
7504fi
7505if test `eval echo '${'$as_ac_Header'}'` = yes; then
7506 cat >>confdefs.h <<_ACEOF
7507#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7508_ACEOF
7509
7510fi
7511
7512done
7513
7514
7515for ac_header in net/if.h
7516do
7517as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7518{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7519echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7520if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7521 echo $ECHO_N "(cached) $ECHO_C" >&6
7522else
7523 cat >conftest.$ac_ext <<_ACEOF
7524/* confdefs.h. */
7525_ACEOF
7526cat confdefs.h >>conftest.$ac_ext
7527cat >>conftest.$ac_ext <<_ACEOF
7528/* end confdefs.h. */
7529$ac_includes_default
7530#if HAVE_SYS_SOCKET_H
7531#include <sys/socket.h>
7532#endif
7533
7534#include <$ac_header>
7535_ACEOF
7536rm -f conftest.$ac_objext
ca81d7a0
JD
7537if { (ac_try="$ac_compile"
7538case "(($ac_try" in
7539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7540 *) ac_try_echo=$ac_try;;
7541esac
7542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7543 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7544 ac_status=$?
edfaf76d
LK
7545 grep -v '^ *+' conftest.er1 >conftest.err
7546 rm -f conftest.er1
7547 cat conftest.err >&5
7862d3a8 7548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7549 (exit $ac_status); } && {
7550 test -z "$ac_c_werror_flag" ||
7551 test ! -s conftest.err
7552 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7553 eval "$as_ac_Header=yes"
7554else
7555 echo "$as_me: failed program was:" >&5
7556sed 's/^/| /' conftest.$ac_ext >&5
7557
ca81d7a0 7558 eval "$as_ac_Header=no"
7862d3a8 7559fi
ca81d7a0
JD
7560
7561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7562fi
ca81d7a0
JD
7563ac_res=`eval echo '${'$as_ac_Header'}'`
7564 { echo "$as_me:$LINENO: result: $ac_res" >&5
7565echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7566if test `eval echo '${'$as_ac_Header'}'` = yes; then
7567 cat >>confdefs.h <<_ACEOF
7568#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7569_ACEOF
7570
7571fi
7572
7573done
7574
7575
ca81d7a0
JD
7576{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7577echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7578if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7579 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7580else
503d2be0 7581 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7582/* confdefs.h. */
7583_ACEOF
7584cat confdefs.h >>conftest.$ac_ext
7585cat >>conftest.$ac_ext <<_ACEOF
7586/* end confdefs.h. */
98418dba
CW
7587#include <sys/types.h>
7588#include <time.h>
7397acc4 7589
503d2be0
AS
7590int
7591main ()
7592{
f053c89f
CY
7593struct tm tm;
7594 int *p = &tm.tm_sec;
7595 return !p;
503d2be0
AS
7596 ;
7597 return 0;
7598}
7599_ACEOF
7600rm -f conftest.$ac_objext
ca81d7a0
JD
7601if { (ac_try="$ac_compile"
7602case "(($ac_try" in
7603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7604 *) ac_try_echo=$ac_try;;
7605esac
7606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7607 (eval "$ac_compile") 2>conftest.er1
503d2be0 7608 ac_status=$?
edfaf76d
LK
7609 grep -v '^ *+' conftest.er1 >conftest.err
7610 rm -f conftest.er1
7611 cat conftest.err >&5
c0d27fcc 7612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7613 (exit $ac_status); } && {
7614 test -z "$ac_c_werror_flag" ||
7615 test ! -s conftest.err
7616 } && test -s conftest.$ac_objext; then
35996d22
AS
7617 ac_cv_struct_tm=time.h
7618else
503d2be0 7619 echo "$as_me: failed program was:" >&5
19650fd6
AS
7620sed 's/^/| /' conftest.$ac_ext >&5
7621
ca81d7a0 7622 ac_cv_struct_tm=sys/time.h
7397acc4 7623fi
ca81d7a0
JD
7624
7625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7626fi
ca81d7a0
JD
7627{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7628echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7629if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7630
c0d27fcc 7631cat >>confdefs.h <<\_ACEOF
98418dba 7632#define TM_IN_SYS_TIME 1
c0d27fcc 7633_ACEOF
7397acc4
DL
7634
7635fi
ba4481b5 7636
ca81d7a0
JD
7637{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7638echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7639if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7640 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7641else
98418dba 7642 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7643/* confdefs.h. */
7644_ACEOF
7645cat confdefs.h >>conftest.$ac_ext
7646cat >>conftest.$ac_ext <<_ACEOF
7647/* end confdefs.h. */
98418dba
CW
7648#include <sys/types.h>
7649#include <$ac_cv_struct_tm>
ba4481b5 7650
c0d27fcc 7651
98418dba
CW
7652int
7653main ()
7654{
7655static struct tm ac_aggr;
7656if (ac_aggr.tm_zone)
7657return 0;
7658 ;
7659 return 0;
7660}
7661_ACEOF
7662rm -f conftest.$ac_objext
ca81d7a0
JD
7663if { (ac_try="$ac_compile"
7664case "(($ac_try" in
7665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7666 *) ac_try_echo=$ac_try;;
7667esac
7668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7669 (eval "$ac_compile") 2>conftest.er1
98418dba 7670 ac_status=$?
edfaf76d
LK
7671 grep -v '^ *+' conftest.er1 >conftest.err
7672 rm -f conftest.er1
7673 cat conftest.err >&5
c0d27fcc 7674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7675 (exit $ac_status); } && {
7676 test -z "$ac_c_werror_flag" ||
7677 test ! -s conftest.err
7678 } && test -s conftest.$ac_objext; then
98418dba 7679 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7680else
98418dba 7681 echo "$as_me: failed program was:" >&5
19650fd6
AS
7682sed 's/^/| /' conftest.$ac_ext >&5
7683
ca81d7a0 7684 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7685/* confdefs.h. */
7686_ACEOF
7687cat confdefs.h >>conftest.$ac_ext
7688cat >>conftest.$ac_ext <<_ACEOF
7689/* end confdefs.h. */
6bae0ccf
DL
7690#include <sys/types.h>
7691#include <$ac_cv_struct_tm>
7692
7693
7694int
7695main ()
7696{
7697static struct tm ac_aggr;
7698if (sizeof ac_aggr.tm_zone)
7699return 0;
7700 ;
7701 return 0;
7702}
7703_ACEOF
7704rm -f conftest.$ac_objext
ca81d7a0
JD
7705if { (ac_try="$ac_compile"
7706case "(($ac_try" in
7707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7708 *) ac_try_echo=$ac_try;;
7709esac
7710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7711 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7712 ac_status=$?
edfaf76d
LK
7713 grep -v '^ *+' conftest.er1 >conftest.err
7714 rm -f conftest.er1
7715 cat conftest.err >&5
6bae0ccf 7716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7717 (exit $ac_status); } && {
7718 test -z "$ac_c_werror_flag" ||
7719 test ! -s conftest.err
7720 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7721 ac_cv_member_struct_tm_tm_zone=yes
7722else
7723 echo "$as_me: failed program was:" >&5
19650fd6
AS
7724sed 's/^/| /' conftest.$ac_ext >&5
7725
ca81d7a0 7726 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7727fi
ca81d7a0
JD
7728
7729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7730fi
ca81d7a0
JD
7731
7732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7733fi
ca81d7a0
JD
7734{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7735echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 7736if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7737
c0d27fcc 7738cat >>confdefs.h <<_ACEOF
98418dba 7739#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7740_ACEOF
7741
ba4481b5 7742
98418dba 7743fi
ba4481b5 7744
98418dba 7745if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7746
c0d27fcc 7747cat >>confdefs.h <<\_ACEOF
98418dba 7748#define HAVE_TM_ZONE 1
c0d27fcc 7749_ACEOF
ba4481b5 7750
ba4481b5 7751else
ca81d7a0
JD
7752 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7753echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
7754if test "${ac_cv_have_decl_tzname+set}" = set; then
503d2be0 7755 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7756else
98418dba 7757 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7758/* confdefs.h. */
7759_ACEOF
7760cat confdefs.h >>conftest.$ac_ext
7761cat >>conftest.$ac_ext <<_ACEOF
7762/* end confdefs.h. */
98418dba 7763#include <time.h>
98418dba 7764
98418dba
CW
7765int
7766main ()
7767{
ca81d7a0 7768#ifndef tzname
f053c89f 7769 (void) tzname;
ca81d7a0
JD
7770#endif
7771
6bae0ccf
DL
7772 ;
7773 return 0;
7774}
7775_ACEOF
7776rm -f conftest.$ac_objext
ca81d7a0
JD
7777if { (ac_try="$ac_compile"
7778case "(($ac_try" in
7779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7780 *) ac_try_echo=$ac_try;;
7781esac
7782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7783 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7784 ac_status=$?
edfaf76d
LK
7785 grep -v '^ *+' conftest.er1 >conftest.err
7786 rm -f conftest.er1
7787 cat conftest.err >&5
6bae0ccf 7788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7789 (exit $ac_status); } && {
7790 test -z "$ac_c_werror_flag" ||
7791 test ! -s conftest.err
7792 } && test -s conftest.$ac_objext; then
ca81d7a0 7793 ac_cv_have_decl_tzname=yes
6bae0ccf
DL
7794else
7795 echo "$as_me: failed program was:" >&5
19650fd6
AS
7796sed 's/^/| /' conftest.$ac_ext >&5
7797
ca81d7a0 7798 ac_cv_have_decl_tzname=no
ba4481b5 7799fi
ca81d7a0
JD
7800
7801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7802fi
ca81d7a0
JD
7803{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
7804echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
7805if test $ac_cv_have_decl_tzname = yes; then
503d2be0 7806
c0d27fcc 7807cat >>confdefs.h <<_ACEOF
ca81d7a0 7808#define HAVE_DECL_TZNAME 1
c0d27fcc
MR
7809_ACEOF
7810
ba4481b5 7811
ca81d7a0
JD
7812else
7813 cat >>confdefs.h <<_ACEOF
7814#define HAVE_DECL_TZNAME 0
7815_ACEOF
ba4481b5 7816
ba4481b5 7817
98418dba 7818fi
ba4481b5 7819
ca81d7a0
JD
7820
7821 { echo "$as_me:$LINENO: checking for tzname" >&5
7822echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
98418dba 7823if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 7824 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7825else
98418dba 7826 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7827/* confdefs.h. */
7828_ACEOF
7829cat confdefs.h >>conftest.$ac_ext
7830cat >>conftest.$ac_ext <<_ACEOF
7831/* end confdefs.h. */
98418dba 7832#include <time.h>
ca81d7a0
JD
7833#if !HAVE_DECL_TZNAME
7834extern char *tzname[];
98418dba
CW
7835#endif
7836
98418dba
CW
7837int
7838main ()
7839{
ca81d7a0 7840return tzname[0][0];
98418dba
CW
7841 ;
7842 return 0;
7843}
7844_ACEOF
7845rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
7846if { (ac_try="$ac_link"
7847case "(($ac_try" in
7848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7849 *) ac_try_echo=$ac_try;;
7850esac
7851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7852 (eval "$ac_link") 2>conftest.er1
98418dba 7853 ac_status=$?
edfaf76d
LK
7854 grep -v '^ *+' conftest.er1 >conftest.err
7855 rm -f conftest.er1
7856 cat conftest.err >&5
c0d27fcc 7857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7858 (exit $ac_status); } && {
7859 test -z "$ac_c_werror_flag" ||
7860 test ! -s conftest.err
7861 } && test -s conftest$ac_exeext &&
7862 $as_test_x conftest$ac_exeext; then
98418dba
CW
7863 ac_cv_var_tzname=yes
7864else
7865 echo "$as_me: failed program was:" >&5
19650fd6
AS
7866sed 's/^/| /' conftest.$ac_ext >&5
7867
ca81d7a0 7868 ac_cv_var_tzname=no
ba4481b5 7869fi
6bae0ccf 7870
f053c89f 7871rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 7872 conftest$ac_exeext conftest.$ac_ext
98418dba 7873fi
ca81d7a0
JD
7874{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
7875echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
98418dba 7876 if test $ac_cv_var_tzname = yes; then
ba4481b5 7877
c0d27fcc 7878cat >>confdefs.h <<\_ACEOF
98418dba 7879#define HAVE_TZNAME 1
c0d27fcc 7880_ACEOF
503d2be0 7881
98418dba
CW
7882 fi
7883fi
503d2be0 7884
ca81d7a0
JD
7885{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
7886echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
b936fae4 7887if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
7888 echo $ECHO_N "(cached) $ECHO_C" >&6
7889else
7890 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7891/* confdefs.h. */
7892_ACEOF
7893cat confdefs.h >>conftest.$ac_ext
7894cat >>conftest.$ac_ext <<_ACEOF
7895/* end confdefs.h. */
98418dba 7896#include <time.h>
b936fae4 7897
98418dba
CW
7898int
7899main ()
7900{
b936fae4
AS
7901static struct tm ac_aggr;
7902if (ac_aggr.tm_gmtoff)
7903return 0;
98418dba
CW
7904 ;
7905 return 0;
7906}
7907_ACEOF
b936fae4 7908rm -f conftest.$ac_objext
ca81d7a0
JD
7909if { (ac_try="$ac_compile"
7910case "(($ac_try" in
7911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7912 *) ac_try_echo=$ac_try;;
7913esac
7914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7915 (eval "$ac_compile") 2>conftest.er1
98418dba 7916 ac_status=$?
edfaf76d
LK
7917 grep -v '^ *+' conftest.er1 >conftest.err
7918 rm -f conftest.er1
7919 cat conftest.err >&5
c0d27fcc 7920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7921 (exit $ac_status); } && {
7922 test -z "$ac_c_werror_flag" ||
7923 test ! -s conftest.err
7924 } && test -s conftest.$ac_objext; then
b936fae4 7925 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
7926else
7927 echo "$as_me: failed program was:" >&5
19650fd6
AS
7928sed 's/^/| /' conftest.$ac_ext >&5
7929
ca81d7a0 7930 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7931/* confdefs.h. */
7932_ACEOF
7933cat confdefs.h >>conftest.$ac_ext
7934cat >>conftest.$ac_ext <<_ACEOF
7935/* end confdefs.h. */
6bae0ccf
DL
7936#include <time.h>
7937
8799b3e4
CW
7938int
7939main ()
7940{
6bae0ccf
DL
7941static struct tm ac_aggr;
7942if (sizeof ac_aggr.tm_gmtoff)
7943return 0;
8799b3e4
CW
7944 ;
7945 return 0;
7946}
7947_ACEOF
6bae0ccf 7948rm -f conftest.$ac_objext
ca81d7a0
JD
7949if { (ac_try="$ac_compile"
7950case "(($ac_try" in
7951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7952 *) ac_try_echo=$ac_try;;
7953esac
7954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7955 (eval "$ac_compile") 2>conftest.er1
8799b3e4 7956 ac_status=$?
edfaf76d
LK
7957 grep -v '^ *+' conftest.er1 >conftest.err
7958 rm -f conftest.er1
7959 cat conftest.err >&5
c0d27fcc 7960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7961 (exit $ac_status); } && {
7962 test -z "$ac_c_werror_flag" ||
7963 test ! -s conftest.err
7964 } && test -s conftest.$ac_objext; then
6bae0ccf 7965 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
7966else
7967 echo "$as_me: failed program was:" >&5
19650fd6
AS
7968sed 's/^/| /' conftest.$ac_ext >&5
7969
ca81d7a0 7970 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 7971fi
ca81d7a0
JD
7972
7973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7974fi
ca81d7a0
JD
7975
7976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 7977fi
ca81d7a0
JD
7978{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
7979echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
7980if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
7981
7982cat >>confdefs.h <<\_ACEOF
7983#define HAVE_TM_GMTOFF 1
7984_ACEOF
7985
7986fi
7987
ca81d7a0
JD
7988{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
7989echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
7990if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
7991 echo $ECHO_N "(cached) $ECHO_C" >&6
7992else
7993 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7994/* confdefs.h. */
7995_ACEOF
7996cat confdefs.h >>conftest.$ac_ext
7997cat >>conftest.$ac_ext <<_ACEOF
7998/* end confdefs.h. */
7862d3a8
AS
7999$ac_includes_default
8000#if HAVE_SYS_SOCKET_H
8001#include <sys/socket.h>
8002#endif
8003#if HAVE_NET_IF_H
96f3a036 8004#include <net/if.h>
7862d3a8 8005#endif
96f3a036
DL
8006
8007int
8008main ()
8009{
8010static struct ifreq ac_aggr;
8011if (ac_aggr.ifr_flags)
8012return 0;
8013 ;
8014 return 0;
8015}
8016_ACEOF
8017rm -f conftest.$ac_objext
ca81d7a0
JD
8018if { (ac_try="$ac_compile"
8019case "(($ac_try" in
8020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8021 *) ac_try_echo=$ac_try;;
8022esac
8023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8024 (eval "$ac_compile") 2>conftest.er1
96f3a036 8025 ac_status=$?
edfaf76d
LK
8026 grep -v '^ *+' conftest.er1 >conftest.err
8027 rm -f conftest.er1
8028 cat conftest.err >&5
96f3a036 8029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8030 (exit $ac_status); } && {
8031 test -z "$ac_c_werror_flag" ||
8032 test ! -s conftest.err
8033 } && test -s conftest.$ac_objext; then
96f3a036
DL
8034 ac_cv_member_struct_ifreq_ifr_flags=yes
8035else
8036 echo "$as_me: failed program was:" >&5
8037sed 's/^/| /' conftest.$ac_ext >&5
8038
ca81d7a0 8039 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8040/* confdefs.h. */
8041_ACEOF
8042cat confdefs.h >>conftest.$ac_ext
8043cat >>conftest.$ac_ext <<_ACEOF
8044/* end confdefs.h. */
7862d3a8
AS
8045$ac_includes_default
8046#if HAVE_SYS_SOCKET_H
8047#include <sys/socket.h>
8048#endif
8049#if HAVE_NET_IF_H
96f3a036 8050#include <net/if.h>
7862d3a8 8051#endif
96f3a036
DL
8052
8053int
8054main ()
8055{
8056static struct ifreq ac_aggr;
8057if (sizeof ac_aggr.ifr_flags)
8058return 0;
8059 ;
8060 return 0;
8061}
8062_ACEOF
8063rm -f conftest.$ac_objext
ca81d7a0
JD
8064if { (ac_try="$ac_compile"
8065case "(($ac_try" in
8066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8067 *) ac_try_echo=$ac_try;;
8068esac
8069eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8070 (eval "$ac_compile") 2>conftest.er1
96f3a036 8071 ac_status=$?
edfaf76d
LK
8072 grep -v '^ *+' conftest.er1 >conftest.err
8073 rm -f conftest.er1
8074 cat conftest.err >&5
96f3a036 8075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8076 (exit $ac_status); } && {
8077 test -z "$ac_c_werror_flag" ||
8078 test ! -s conftest.err
8079 } && test -s conftest.$ac_objext; then
96f3a036
DL
8080 ac_cv_member_struct_ifreq_ifr_flags=yes
8081else
8082 echo "$as_me: failed program was:" >&5
8083sed 's/^/| /' conftest.$ac_ext >&5
8084
ca81d7a0 8085 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8086fi
ca81d7a0
JD
8087
8088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8089fi
ca81d7a0
JD
8090
8091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8092fi
ca81d7a0
JD
8093{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8094echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8095if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8096
8097cat >>confdefs.h <<_ACEOF
8098#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8099_ACEOF
8100
8101
8102fi
ca81d7a0
JD
8103{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8104echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8105if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8106 echo $ECHO_N "(cached) $ECHO_C" >&6
8107else
8108 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8109/* confdefs.h. */
8110_ACEOF
8111cat confdefs.h >>conftest.$ac_ext
8112cat >>conftest.$ac_ext <<_ACEOF
8113/* end confdefs.h. */
7862d3a8
AS
8114$ac_includes_default
8115#if HAVE_SYS_SOCKET_H
8116#include <sys/socket.h>
8117#endif
8118#if HAVE_NET_IF_H
96f3a036 8119#include <net/if.h>
7862d3a8 8120#endif
96f3a036
DL
8121
8122int
8123main ()
8124{
8125static struct ifreq ac_aggr;
8126if (ac_aggr.ifr_hwaddr)
8127return 0;
8128 ;
8129 return 0;
8130}
8131_ACEOF
8132rm -f conftest.$ac_objext
ca81d7a0
JD
8133if { (ac_try="$ac_compile"
8134case "(($ac_try" in
8135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8136 *) ac_try_echo=$ac_try;;
8137esac
8138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8139 (eval "$ac_compile") 2>conftest.er1
96f3a036 8140 ac_status=$?
edfaf76d
LK
8141 grep -v '^ *+' conftest.er1 >conftest.err
8142 rm -f conftest.er1
8143 cat conftest.err >&5
96f3a036 8144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8145 (exit $ac_status); } && {
8146 test -z "$ac_c_werror_flag" ||
8147 test ! -s conftest.err
8148 } && test -s conftest.$ac_objext; then
96f3a036
DL
8149 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8150else
8151 echo "$as_me: failed program was:" >&5
8152sed 's/^/| /' conftest.$ac_ext >&5
8153
ca81d7a0 8154 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8155/* confdefs.h. */
8156_ACEOF
8157cat confdefs.h >>conftest.$ac_ext
8158cat >>conftest.$ac_ext <<_ACEOF
8159/* end confdefs.h. */
7862d3a8
AS
8160$ac_includes_default
8161#if HAVE_SYS_SOCKET_H
8162#include <sys/socket.h>
8163#endif
8164#if HAVE_NET_IF_H
96f3a036 8165#include <net/if.h>
7862d3a8 8166#endif
96f3a036
DL
8167
8168int
8169main ()
8170{
8171static struct ifreq ac_aggr;
8172if (sizeof ac_aggr.ifr_hwaddr)
8173return 0;
8174 ;
8175 return 0;
8176}
8177_ACEOF
8178rm -f conftest.$ac_objext
ca81d7a0
JD
8179if { (ac_try="$ac_compile"
8180case "(($ac_try" in
8181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8182 *) ac_try_echo=$ac_try;;
8183esac
8184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8185 (eval "$ac_compile") 2>conftest.er1
96f3a036 8186 ac_status=$?
edfaf76d
LK
8187 grep -v '^ *+' conftest.er1 >conftest.err
8188 rm -f conftest.er1
8189 cat conftest.err >&5
96f3a036 8190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8191 (exit $ac_status); } && {
8192 test -z "$ac_c_werror_flag" ||
8193 test ! -s conftest.err
8194 } && test -s conftest.$ac_objext; then
96f3a036
DL
8195 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8196else
8197 echo "$as_me: failed program was:" >&5
8198sed 's/^/| /' conftest.$ac_ext >&5
8199
ca81d7a0 8200 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8201fi
ca81d7a0
JD
8202
8203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8204fi
ca81d7a0
JD
8205
8206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8207fi
ca81d7a0
JD
8208{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8209echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8210if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8211
8212cat >>confdefs.h <<_ACEOF
8213#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8214_ACEOF
8215
8216
8217fi
ca81d7a0
JD
8218{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8219echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8220if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8221 echo $ECHO_N "(cached) $ECHO_C" >&6
8222else
8223 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8224/* confdefs.h. */
8225_ACEOF
8226cat confdefs.h >>conftest.$ac_ext
8227cat >>conftest.$ac_ext <<_ACEOF
8228/* end confdefs.h. */
7862d3a8
AS
8229$ac_includes_default
8230#if HAVE_SYS_SOCKET_H
8231#include <sys/socket.h>
8232#endif
8233#if HAVE_NET_IF_H
96f3a036 8234#include <net/if.h>
7862d3a8 8235#endif
96f3a036
DL
8236
8237int
8238main ()
8239{
8240static struct ifreq ac_aggr;
8241if (ac_aggr.ifr_netmask)
8242return 0;
8243 ;
8244 return 0;
8245}
8246_ACEOF
8247rm -f conftest.$ac_objext
ca81d7a0
JD
8248if { (ac_try="$ac_compile"
8249case "(($ac_try" in
8250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8251 *) ac_try_echo=$ac_try;;
8252esac
8253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8254 (eval "$ac_compile") 2>conftest.er1
96f3a036 8255 ac_status=$?
edfaf76d
LK
8256 grep -v '^ *+' conftest.er1 >conftest.err
8257 rm -f conftest.er1
8258 cat conftest.err >&5
96f3a036 8259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8260 (exit $ac_status); } && {
8261 test -z "$ac_c_werror_flag" ||
8262 test ! -s conftest.err
8263 } && test -s conftest.$ac_objext; then
96f3a036
DL
8264 ac_cv_member_struct_ifreq_ifr_netmask=yes
8265else
8266 echo "$as_me: failed program was:" >&5
8267sed 's/^/| /' conftest.$ac_ext >&5
8268
ca81d7a0 8269 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8270/* confdefs.h. */
8271_ACEOF
8272cat confdefs.h >>conftest.$ac_ext
8273cat >>conftest.$ac_ext <<_ACEOF
8274/* end confdefs.h. */
7862d3a8
AS
8275$ac_includes_default
8276#if HAVE_SYS_SOCKET_H
8277#include <sys/socket.h>
8278#endif
8279#if HAVE_NET_IF_H
96f3a036 8280#include <net/if.h>
7862d3a8 8281#endif
96f3a036
DL
8282
8283int
8284main ()
8285{
8286static struct ifreq ac_aggr;
8287if (sizeof ac_aggr.ifr_netmask)
8288return 0;
8289 ;
8290 return 0;
8291}
8292_ACEOF
8293rm -f conftest.$ac_objext
ca81d7a0
JD
8294if { (ac_try="$ac_compile"
8295case "(($ac_try" in
8296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8297 *) ac_try_echo=$ac_try;;
8298esac
8299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8300 (eval "$ac_compile") 2>conftest.er1
96f3a036 8301 ac_status=$?
edfaf76d
LK
8302 grep -v '^ *+' conftest.er1 >conftest.err
8303 rm -f conftest.er1
8304 cat conftest.err >&5
96f3a036 8305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8306 (exit $ac_status); } && {
8307 test -z "$ac_c_werror_flag" ||
8308 test ! -s conftest.err
8309 } && test -s conftest.$ac_objext; then
96f3a036
DL
8310 ac_cv_member_struct_ifreq_ifr_netmask=yes
8311else
8312 echo "$as_me: failed program was:" >&5
8313sed 's/^/| /' conftest.$ac_ext >&5
8314
ca81d7a0 8315 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8316fi
ca81d7a0
JD
8317
8318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8319fi
ca81d7a0
JD
8320
8321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8322fi
ca81d7a0
JD
8323{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8324echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8325if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8326
8327cat >>confdefs.h <<_ACEOF
8328#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8329_ACEOF
8330
8331
8332fi
ca81d7a0
JD
8333{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8334echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8335if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8336 echo $ECHO_N "(cached) $ECHO_C" >&6
8337else
8338 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8339/* confdefs.h. */
8340_ACEOF
8341cat confdefs.h >>conftest.$ac_ext
8342cat >>conftest.$ac_ext <<_ACEOF
8343/* end confdefs.h. */
7862d3a8
AS
8344$ac_includes_default
8345#if HAVE_SYS_SOCKET_H
8346#include <sys/socket.h>
8347#endif
8348#if HAVE_NET_IF_H
96f3a036 8349#include <net/if.h>
7862d3a8 8350#endif
96f3a036
DL
8351
8352int
8353main ()
8354{
8355static struct ifreq ac_aggr;
8356if (ac_aggr.ifr_broadaddr)
8357return 0;
8358 ;
8359 return 0;
8360}
8361_ACEOF
8362rm -f conftest.$ac_objext
ca81d7a0
JD
8363if { (ac_try="$ac_compile"
8364case "(($ac_try" in
8365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8366 *) ac_try_echo=$ac_try;;
8367esac
8368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8369 (eval "$ac_compile") 2>conftest.er1
96f3a036 8370 ac_status=$?
edfaf76d
LK
8371 grep -v '^ *+' conftest.er1 >conftest.err
8372 rm -f conftest.er1
8373 cat conftest.err >&5
96f3a036 8374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8375 (exit $ac_status); } && {
8376 test -z "$ac_c_werror_flag" ||
8377 test ! -s conftest.err
8378 } && test -s conftest.$ac_objext; then
96f3a036
DL
8379 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8380else
8381 echo "$as_me: failed program was:" >&5
8382sed 's/^/| /' conftest.$ac_ext >&5
8383
ca81d7a0 8384 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8385/* confdefs.h. */
8386_ACEOF
8387cat confdefs.h >>conftest.$ac_ext
8388cat >>conftest.$ac_ext <<_ACEOF
8389/* end confdefs.h. */
7862d3a8
AS
8390$ac_includes_default
8391#if HAVE_SYS_SOCKET_H
8392#include <sys/socket.h>
8393#endif
8394#if HAVE_NET_IF_H
96f3a036 8395#include <net/if.h>
7862d3a8 8396#endif
96f3a036
DL
8397
8398int
8399main ()
8400{
8401static struct ifreq ac_aggr;
8402if (sizeof ac_aggr.ifr_broadaddr)
8403return 0;
8404 ;
8405 return 0;
8406}
8407_ACEOF
8408rm -f conftest.$ac_objext
ca81d7a0
JD
8409if { (ac_try="$ac_compile"
8410case "(($ac_try" in
8411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8412 *) ac_try_echo=$ac_try;;
8413esac
8414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8415 (eval "$ac_compile") 2>conftest.er1
96f3a036 8416 ac_status=$?
edfaf76d
LK
8417 grep -v '^ *+' conftest.er1 >conftest.err
8418 rm -f conftest.er1
8419 cat conftest.err >&5
96f3a036 8420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8421 (exit $ac_status); } && {
8422 test -z "$ac_c_werror_flag" ||
8423 test ! -s conftest.err
8424 } && test -s conftest.$ac_objext; then
96f3a036
DL
8425 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8426else
8427 echo "$as_me: failed program was:" >&5
8428sed 's/^/| /' conftest.$ac_ext >&5
8429
ca81d7a0 8430 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8431fi
ca81d7a0
JD
8432
8433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8434fi
ca81d7a0
JD
8435
8436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8437fi
ca81d7a0
JD
8438{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8439echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8440if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8441
8442cat >>confdefs.h <<_ACEOF
8443#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8444_ACEOF
8445
8446
8447fi
ca81d7a0
JD
8448{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8449echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8450if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8451 echo $ECHO_N "(cached) $ECHO_C" >&6
8452else
8453 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8454/* confdefs.h. */
8455_ACEOF
8456cat confdefs.h >>conftest.$ac_ext
8457cat >>conftest.$ac_ext <<_ACEOF
8458/* end confdefs.h. */
7862d3a8
AS
8459$ac_includes_default
8460#if HAVE_SYS_SOCKET_H
8461#include <sys/socket.h>
8462#endif
8463#if HAVE_NET_IF_H
96f3a036 8464#include <net/if.h>
7862d3a8 8465#endif
96f3a036
DL
8466
8467int
8468main ()
8469{
8470static struct ifreq ac_aggr;
8471if (ac_aggr.ifr_addr)
8472return 0;
8473 ;
8474 return 0;
8475}
8476_ACEOF
8477rm -f conftest.$ac_objext
ca81d7a0
JD
8478if { (ac_try="$ac_compile"
8479case "(($ac_try" in
8480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8481 *) ac_try_echo=$ac_try;;
8482esac
8483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8484 (eval "$ac_compile") 2>conftest.er1
96f3a036 8485 ac_status=$?
edfaf76d
LK
8486 grep -v '^ *+' conftest.er1 >conftest.err
8487 rm -f conftest.er1
8488 cat conftest.err >&5
96f3a036 8489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8490 (exit $ac_status); } && {
8491 test -z "$ac_c_werror_flag" ||
8492 test ! -s conftest.err
8493 } && test -s conftest.$ac_objext; then
96f3a036
DL
8494 ac_cv_member_struct_ifreq_ifr_addr=yes
8495else
8496 echo "$as_me: failed program was:" >&5
8497sed 's/^/| /' conftest.$ac_ext >&5
8498
ca81d7a0 8499 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8500/* confdefs.h. */
8501_ACEOF
8502cat confdefs.h >>conftest.$ac_ext
8503cat >>conftest.$ac_ext <<_ACEOF
8504/* end confdefs.h. */
7862d3a8
AS
8505$ac_includes_default
8506#if HAVE_SYS_SOCKET_H
8507#include <sys/socket.h>
8508#endif
8509#if HAVE_NET_IF_H
96f3a036 8510#include <net/if.h>
7862d3a8 8511#endif
96f3a036
DL
8512
8513int
8514main ()
8515{
8516static struct ifreq ac_aggr;
8517if (sizeof ac_aggr.ifr_addr)
8518return 0;
8519 ;
8520 return 0;
8521}
8522_ACEOF
8523rm -f conftest.$ac_objext
ca81d7a0
JD
8524if { (ac_try="$ac_compile"
8525case "(($ac_try" in
8526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8527 *) ac_try_echo=$ac_try;;
8528esac
8529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8530 (eval "$ac_compile") 2>conftest.er1
96f3a036 8531 ac_status=$?
edfaf76d
LK
8532 grep -v '^ *+' conftest.er1 >conftest.err
8533 rm -f conftest.er1
8534 cat conftest.err >&5
96f3a036 8535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8536 (exit $ac_status); } && {
8537 test -z "$ac_c_werror_flag" ||
8538 test ! -s conftest.err
8539 } && test -s conftest.$ac_objext; then
96f3a036
DL
8540 ac_cv_member_struct_ifreq_ifr_addr=yes
8541else
8542 echo "$as_me: failed program was:" >&5
8543sed 's/^/| /' conftest.$ac_ext >&5
8544
ca81d7a0 8545 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8546fi
ca81d7a0
JD
8547
8548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8549fi
ca81d7a0
JD
8550
8551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8552fi
ca81d7a0
JD
8553{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8554echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8555if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8556
8557cat >>confdefs.h <<_ACEOF
8558#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8559_ACEOF
8560
8561
8562fi
8563
8799b3e4 8564
8799b3e4 8565
ca81d7a0
JD
8566{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8567echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8568if test "$ac_cv_prog_cc_c89" != no; then
8569 { echo "$as_me:$LINENO: result: yes" >&5
8570echo "${ECHO_T}yes" >&6; }
98418dba 8571
c0d27fcc 8572cat >>confdefs.h <<\_ACEOF
98418dba 8573#define PROTOTYPES 1
c0d27fcc
MR
8574_ACEOF
8575
8576
8577cat >>confdefs.h <<\_ACEOF
8578#define __PROTOTYPES 1
8579_ACEOF
98418dba
CW
8580
8581else
ca81d7a0
JD
8582 { echo "$as_me:$LINENO: result: no" >&5
8583echo "${ECHO_T}no" >&6; }
98418dba
CW
8584fi
8585
ca81d7a0
JD
8586{ echo "$as_me:$LINENO: checking for working volatile" >&5
8587echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8588if test "${ac_cv_c_volatile+set}" = set; then
8589 echo $ECHO_N "(cached) $ECHO_C" >&6
8590else
8591 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8592/* confdefs.h. */
8593_ACEOF
8594cat confdefs.h >>conftest.$ac_ext
8595cat >>conftest.$ac_ext <<_ACEOF
8596/* end confdefs.h. */
98418dba 8597
98418dba
CW
8598int
8599main ()
8600{
8601
8602volatile int x;
ca81d7a0
JD
8603int * volatile y = (int *) 0;
8604return !x && !y;
98418dba
CW
8605 ;
8606 return 0;
8607}
8608_ACEOF
8609rm -f conftest.$ac_objext
ca81d7a0
JD
8610if { (ac_try="$ac_compile"
8611case "(($ac_try" in
8612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8613 *) ac_try_echo=$ac_try;;
8614esac
8615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8616 (eval "$ac_compile") 2>conftest.er1
98418dba 8617 ac_status=$?
edfaf76d
LK
8618 grep -v '^ *+' conftest.er1 >conftest.err
8619 rm -f conftest.er1
8620 cat conftest.err >&5
c0d27fcc 8621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8622 (exit $ac_status); } && {
8623 test -z "$ac_c_werror_flag" ||
8624 test ! -s conftest.err
8625 } && test -s conftest.$ac_objext; then
98418dba
CW
8626 ac_cv_c_volatile=yes
8627else
8628 echo "$as_me: failed program was:" >&5
19650fd6
AS
8629sed 's/^/| /' conftest.$ac_ext >&5
8630
ca81d7a0 8631 ac_cv_c_volatile=no
98418dba 8632fi
ca81d7a0
JD
8633
8634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8635fi
ca81d7a0
JD
8636{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8637echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8638if test $ac_cv_c_volatile = no; then
8639
c0d27fcc 8640cat >>confdefs.h <<\_ACEOF
98418dba 8641#define volatile
c0d27fcc 8642_ACEOF
98418dba
CW
8643
8644fi
8645
ca81d7a0
JD
8646{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8647echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8648if test "${ac_cv_c_const+set}" = set; then
8649 echo $ECHO_N "(cached) $ECHO_C" >&6
8650else
8651 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8652/* confdefs.h. */
8653_ACEOF
8654cat confdefs.h >>conftest.$ac_ext
8655cat >>conftest.$ac_ext <<_ACEOF
8656/* end confdefs.h. */
98418dba 8657
98418dba
CW
8658int
8659main ()
8660{
8661/* FIXME: Include the comments suggested by Paul. */
8662#ifndef __cplusplus
8663 /* Ultrix mips cc rejects this. */
8664 typedef int charset[2];
f053c89f 8665 const charset cs;
98418dba 8666 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
8667 char const *const *pcpcc;
8668 char **ppc;
98418dba
CW
8669 /* NEC SVR4.0.2 mips cc rejects this. */
8670 struct point {int x, y;};
8671 static struct point const zero = {0,0};
8672 /* AIX XL C 1.02.0.0 rejects this.
8673 It does not let you subtract one const X* pointer from another in
8674 an arm of an if-expression whose if-part is not a constant
8675 expression */
8676 const char *g = "string";
f053c89f 8677 pcpcc = &g + (g ? g-g : 0);
98418dba 8678 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
8679 ++pcpcc;
8680 ppc = (char**) pcpcc;
8681 pcpcc = (char const *const *) ppc;
98418dba
CW
8682 { /* SCO 3.2v4 cc rejects this. */
8683 char *t;
8684 char const *s = 0 ? (char *) 0 : (char const *) 0;
8685
8686 *t++ = 0;
ca81d7a0 8687 if (s) return 0;
98418dba
CW
8688 }
8689 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8690 int x[] = {25, 17};
8691 const int *foo = &x[0];
8692 ++foo;
8693 }
8694 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8695 typedef const int *iptr;
8696 iptr p = 0;
8697 ++p;
8698 }
8699 { /* AIX XL C 1.02.0.0 rejects this saying
8700 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8701 struct s { int j; const int *ap[3]; };
8702 struct s *b; b->j = 5;
8703 }
8704 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8705 const int foo = 10;
ca81d7a0 8706 if (!foo) return 0;
98418dba 8707 }
f053c89f 8708 return !cs[0] && !zero.x;
98418dba
CW
8709#endif
8710
8711 ;
8712 return 0;
8713}
8714_ACEOF
8715rm -f conftest.$ac_objext
ca81d7a0
JD
8716if { (ac_try="$ac_compile"
8717case "(($ac_try" in
8718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8719 *) ac_try_echo=$ac_try;;
8720esac
8721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8722 (eval "$ac_compile") 2>conftest.er1
98418dba 8723 ac_status=$?
edfaf76d
LK
8724 grep -v '^ *+' conftest.er1 >conftest.err
8725 rm -f conftest.er1
8726 cat conftest.err >&5
c0d27fcc 8727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8728 (exit $ac_status); } && {
8729 test -z "$ac_c_werror_flag" ||
8730 test ! -s conftest.err
8731 } && test -s conftest.$ac_objext; then
98418dba
CW
8732 ac_cv_c_const=yes
8733else
8734 echo "$as_me: failed program was:" >&5
19650fd6
AS
8735sed 's/^/| /' conftest.$ac_ext >&5
8736
ca81d7a0 8737 ac_cv_c_const=no
98418dba 8738fi
ca81d7a0
JD
8739
8740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8741fi
ca81d7a0
JD
8742{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8743echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8744if test $ac_cv_c_const = no; then
8745
c0d27fcc 8746cat >>confdefs.h <<\_ACEOF
98418dba 8747#define const
c0d27fcc 8748_ACEOF
98418dba
CW
8749
8750fi
8751
ca81d7a0
JD
8752{ echo "$as_me:$LINENO: checking for void * support" >&5
8753echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
8754if test "${emacs_cv_void_star+set}" = set; then
8755 echo $ECHO_N "(cached) $ECHO_C" >&6
8756else
8757 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8758/* confdefs.h. */
8759_ACEOF
8760cat confdefs.h >>conftest.$ac_ext
8761cat >>conftest.$ac_ext <<_ACEOF
8762/* end confdefs.h. */
98418dba 8763
98418dba
CW
8764int
8765main ()
8766{
8767void * foo;
8768 ;
8769 return 0;
8770}
8771_ACEOF
8772rm -f conftest.$ac_objext
ca81d7a0
JD
8773if { (ac_try="$ac_compile"
8774case "(($ac_try" in
8775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8776 *) ac_try_echo=$ac_try;;
8777esac
8778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8779 (eval "$ac_compile") 2>conftest.er1
98418dba 8780 ac_status=$?
edfaf76d
LK
8781 grep -v '^ *+' conftest.er1 >conftest.err
8782 rm -f conftest.er1
8783 cat conftest.err >&5
c0d27fcc 8784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8785 (exit $ac_status); } && {
8786 test -z "$ac_c_werror_flag" ||
8787 test ! -s conftest.err
8788 } && test -s conftest.$ac_objext; then
98418dba
CW
8789 emacs_cv_void_star=yes
8790else
8791 echo "$as_me: failed program was:" >&5
19650fd6
AS
8792sed 's/^/| /' conftest.$ac_ext >&5
8793
ca81d7a0 8794 emacs_cv_void_star=no
98418dba 8795fi
ca81d7a0
JD
8796
8797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8798fi
ca81d7a0
JD
8799{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
8800echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 8801if test $emacs_cv_void_star = yes; then
c0d27fcc 8802 cat >>confdefs.h <<\_ACEOF
98418dba 8803#define POINTER_TYPE void
c0d27fcc 8804_ACEOF
98418dba
CW
8805
8806else
c0d27fcc 8807 cat >>confdefs.h <<\_ACEOF
98418dba 8808#define POINTER_TYPE char
c0d27fcc 8809_ACEOF
98418dba
CW
8810
8811fi
8812
c0d27fcc 8813
4494a266
JD
8814
8815
cd958eb3 8816
ca81d7a0
JD
8817{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8818echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
8819set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
8820if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
8821 echo $ECHO_N "(cached) $ECHO_C" >&6
8822else
c0d27fcc 8823 cat >conftest.make <<\_ACEOF
ca81d7a0 8824SHELL = /bin/sh
98418dba 8825all:
ca81d7a0 8826 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 8827_ACEOF
98418dba 8828# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8829case `${MAKE-make} -f conftest.make 2>/dev/null` in
8830 *@@@%%%=?*=@@@%%%*)
8831 eval ac_cv_prog_make_${ac_make}_set=yes;;
8832 *)
8833 eval ac_cv_prog_make_${ac_make}_set=no;;
8834esac
98418dba
CW
8835rm -f conftest.make
8836fi
ca81d7a0
JD
8837if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
8838 { echo "$as_me:$LINENO: result: yes" >&5
8839echo "${ECHO_T}yes" >&6; }
98418dba
CW
8840 SET_MAKE=
8841else
ca81d7a0
JD
8842 { echo "$as_me:$LINENO: result: no" >&5
8843echo "${ECHO_T}no" >&6; }
98418dba
CW
8844 SET_MAKE="MAKE=${MAKE-make}"
8845fi
8846
c0d27fcc 8847
ca81d7a0
JD
8848{ echo "$as_me:$LINENO: checking for long file names" >&5
8849echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
8850if test "${ac_cv_sys_long_file_names+set}" = set; then
8851 echo $ECHO_N "(cached) $ECHO_C" >&6
8852else
8853 ac_cv_sys_long_file_names=yes
8854# Test for long file names in all the places we know might matter:
8855# . the current directory, where building will happen
8856# $prefix/lib where we will be installing things
8857# $exec_prefix/lib likewise
98418dba 8858# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
8859# /tmp where it might want to write temporary files
8860# /var/tmp likewise
8861# /usr/tmp likewise
ca81d7a0
JD
8862for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8863 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8864 # in the usual case where exec_prefix is '${prefix}'.
8865 case $ac_dir in #(
8866 . | /* | ?:[\\/]*) ;; #(
8867 *) continue;;
8868 esac
8869 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 8870 ac_xdir=$ac_dir/cf$$
ca81d7a0 8871 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
8872 ac_tf1=$ac_xdir/conftest9012345
8873 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 8874 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 8875 ac_cv_sys_long_file_names=no
ca81d7a0
JD
8876 rm -f -r "$ac_xdir" 2>/dev/null
8877 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
8878done
8879fi
ca81d7a0
JD
8880{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
8881echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
8882if test $ac_cv_sys_long_file_names = yes; then
8883
c0d27fcc 8884cat >>confdefs.h <<\_ACEOF
98418dba 8885#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8886_ACEOF
98418dba
CW
8887
8888fi
8889
c0d27fcc 8890
98418dba
CW
8891#### Choose a window system.
8892
ca81d7a0
JD
8893{ echo "$as_me:$LINENO: checking for X" >&5
8894echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 8895
c0d27fcc 8896
ca81d7a0 8897# Check whether --with-x was given.
98418dba 8898if test "${with_x+set}" = set; then
ca81d7a0
JD
8899 withval=$with_x;
8900fi
98418dba 8901
98418dba
CW
8902# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8903if test "x$with_x" = xno; then
8904 # The user explicitly disabled X.
8905 have_x=disabled
8906else
ca81d7a0
JD
8907 case $x_includes,$x_libraries in #(
8908 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
8909echo "$as_me: error: Cannot use X directory names containing '" >&2;}
8910 { (exit 1); exit 1; }; };; #(
8911 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
8912 echo $ECHO_N "(cached) $ECHO_C" >&6
8913else
8914 # One or both of the vars are not set, and there is no cached value.
8915ac_x_includes=no ac_x_libraries=no
ca81d7a0 8916rm -f -r conftest.dir
98418dba
CW
8917if mkdir conftest.dir; then
8918 cd conftest.dir
c0d27fcc 8919 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
8920incroot:
8921 @echo incroot='${INCROOT}'
8922usrlibdir:
8923 @echo usrlibdir='${USRLIBDIR}'
8924libdir:
8925 @echo libdir='${LIBDIR}'
8926_ACEOF
8927 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 8928 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8929 for ac_var in incroot usrlibdir libdir; do
8930 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8931 done
98418dba
CW
8932 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8933 for ac_extension in a so sl; do
ca81d7a0
JD
8934 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8935 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 8936 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
8937 fi
8938 done
8939 # Screen out bogus values from the imake configuration. They are
8940 # bogus both because they are the default anyway, and because
8941 # using them would break gcc on systems where it needs fixed includes.
8942 case $ac_im_incroot in
ca81d7a0 8943 /usr/include) ac_x_includes= ;;
98418dba
CW
8944 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8945 esac
8946 case $ac_im_usrlibdir in
8947 /usr/lib | /lib) ;;
8948 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8949 esac
8950 fi
8951 cd ..
ca81d7a0 8952 rm -f -r conftest.dir
98418dba
CW
8953fi
8954
8955# Standard set of common directories for X headers.
8956# Check X11 before X11Rn because it is often a symlink to the current release.
8957ac_x_header_dirs='
8958/usr/X11/include
8959/usr/X11R6/include
8960/usr/X11R5/include
8961/usr/X11R4/include
8962
8963/usr/include/X11
8964/usr/include/X11R6
8965/usr/include/X11R5
8966/usr/include/X11R4
8967
8968/usr/local/X11/include
8969/usr/local/X11R6/include
8970/usr/local/X11R5/include
8971/usr/local/X11R4/include
8972
8973/usr/local/include/X11
8974/usr/local/include/X11R6
8975/usr/local/include/X11R5
8976/usr/local/include/X11R4
8977
8978/usr/X386/include
8979/usr/x386/include
8980/usr/XFree86/include/X11
8981
8982/usr/include
8983/usr/local/include
8984/usr/unsupported/include
8985/usr/athena/include
8986/usr/local/x11r5/include
8987/usr/lpp/Xamples/include
8988
8989/usr/openwin/include
8990/usr/openwin/share/include'
8991
8992if test "$ac_x_includes" = no; then
ca81d7a0 8993 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
8994 # First, try using that file with no special directory specified.
8995 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8996/* confdefs.h. */
8997_ACEOF
8998cat confdefs.h >>conftest.$ac_ext
8999cat >>conftest.$ac_ext <<_ACEOF
9000/* end confdefs.h. */
ca81d7a0 9001#include <X11/Xlib.h>
98418dba 9002_ACEOF
ca81d7a0
JD
9003if { (ac_try="$ac_cpp conftest.$ac_ext"
9004case "(($ac_try" in
9005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9006 *) ac_try_echo=$ac_try;;
9007esac
9008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9009 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9010 ac_status=$?
6bae0ccf 9011 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9012 rm -f conftest.er1
9013 cat conftest.err >&5
c0d27fcc 9014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9015 (exit $ac_status); } >/dev/null && {
9016 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9017 test ! -s conftest.err
9018 }; then
98418dba
CW
9019 # We can compile using X headers with no special include directory.
9020ac_x_includes=
9021else
9022 echo "$as_me: failed program was:" >&5
19650fd6
AS
9023sed 's/^/| /' conftest.$ac_ext >&5
9024
98418dba 9025 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 9026 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9027 ac_x_includes=$ac_dir
9028 break
9029 fi
9030done
9031fi
ca81d7a0 9032
98418dba
CW
9033rm -f conftest.err conftest.$ac_ext
9034fi # $ac_x_includes = no
9035
9036if test "$ac_x_libraries" = no; then
9037 # Check for the libraries.
9038 # See if we find them without any special options.
9039 # Don't add to $LIBS permanently.
9040 ac_save_LIBS=$LIBS
f053c89f 9041 LIBS="-lX11 $LIBS"
98418dba 9042 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9043/* confdefs.h. */
9044_ACEOF
9045cat confdefs.h >>conftest.$ac_ext
9046cat >>conftest.$ac_ext <<_ACEOF
9047/* end confdefs.h. */
ca81d7a0 9048#include <X11/Xlib.h>
98418dba
CW
9049int
9050main ()
9051{
ca81d7a0 9052XrmInitialize ()
98418dba
CW
9053 ;
9054 return 0;
9055}
9056_ACEOF
9057rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9058if { (ac_try="$ac_link"
9059case "(($ac_try" in
9060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9061 *) ac_try_echo=$ac_try;;
9062esac
9063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9064 (eval "$ac_link") 2>conftest.er1
98418dba 9065 ac_status=$?
edfaf76d
LK
9066 grep -v '^ *+' conftest.er1 >conftest.err
9067 rm -f conftest.er1
9068 cat conftest.err >&5
c0d27fcc 9069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9070 (exit $ac_status); } && {
9071 test -z "$ac_c_werror_flag" ||
9072 test ! -s conftest.err
9073 } && test -s conftest$ac_exeext &&
9074 $as_test_x conftest$ac_exeext; then
98418dba
CW
9075 LIBS=$ac_save_LIBS
9076# We can link X programs with no special library path.
9077ac_x_libraries=
9078else
9079 echo "$as_me: failed program was:" >&5
19650fd6
AS
9080sed 's/^/| /' conftest.$ac_ext >&5
9081
ca81d7a0 9082 LIBS=$ac_save_LIBS
98418dba
CW
9083for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9084do
9085 # Don't even attempt the hair of trying to link an X program!
9086 for ac_extension in a so sl; do
f053c89f 9087 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9088 ac_x_libraries=$ac_dir
9089 break 2
9090 fi
9091 done
9092done
9093fi
ca81d7a0 9094
f053c89f 9095rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9096 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9097fi # $ac_x_libraries = no
9098
ca81d7a0
JD
9099case $ac_x_includes,$ac_x_libraries in #(
9100 no,* | *,no | *\'*)
9101 # Didn't find X, or a directory has "'" in its name.
9102 ac_cv_have_x="have_x=no";; #(
9103 *)
9104 # Record where we found X for the cache.
9105 ac_cv_have_x="have_x=yes\
9106 ac_x_includes='$ac_x_includes'\
9107 ac_x_libraries='$ac_x_libraries'"
9108esac
98418dba 9109fi
ca81d7a0
JD
9110;; #(
9111 *) have_x=yes;;
9112 esac
98418dba
CW
9113 eval "$ac_cv_have_x"
9114fi # $with_x != no
9115
9116if test "$have_x" != yes; then
ca81d7a0
JD
9117 { echo "$as_me:$LINENO: result: $have_x" >&5
9118echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9119 no_x=yes
9120else
9121 # If each of the values was on the command line, it overrides each guess.
9122 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9123 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9124 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9125 ac_cv_have_x="have_x=yes\
9126 ac_x_includes='$x_includes'\
9127 ac_x_libraries='$x_libraries'"
9128 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9129echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9130fi
9131
9132if test "$no_x" = yes; then
9133 window_system=none
9134else
9135 window_system=x11
9136fi
9137
a8cd2496
GM
9138## Workaround for bug in autoconf <= 2.62.
9139## http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01551.html
9140## No need to do anything special for these standard directories.
921fbdf0 9141## This is an experiment, take it out if it causes problems.
a8cd2496
GM
9142if test -n "${x_libraries}" && test x"${x_libraries}" != xNONE; then
9143
9144 x_libraries=`echo :${x_libraries}: | sed -e 's|:/usr/lib64:|:|g' -e 's|:/lib64:|:|g' -e 's|^:||' -e 's|:$||'`
9145
9146fi
9147
92d1ccf4
AS
9148if test "${x_libraries}" != NONE; then
9149 if test -n "${x_libraries}"; then
9150 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9151 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9152 fi
98418dba 9153 x_default_search_path=""
92d1ccf4
AS
9154 x_search_path=${x_libraries}
9155 if test -z "${x_search_path}"; then
9156 x_search_path=/usr/lib
9157 fi
9158 for x_library in `echo ${x_search_path}: | \
9159 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9160 x_search_path="\
9161${x_library}/X11/%L/%T/%N%C%S:\
9162${x_library}/X11/%l/%T/%N%C%S:\
9163${x_library}/X11/%T/%N%C%S:\
9164${x_library}/X11/%L/%T/%N%S:\
9165${x_library}/X11/%l/%T/%N%S:\
9166${x_library}/X11/%T/%N%S"
9167 if test x"${x_default_search_path}" = x; then
9168 x_default_search_path=${x_search_path}
9169 else
9170 x_default_search_path="${x_search_path}:${x_default_search_path}"
9171 fi
9172 done
9173fi
9174if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9175 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9176fi
9177
9178if test x"${x_includes}" = x; then
9179 bitmapdir=/usr/include/X11/bitmaps
9180else
9181 # accumulate include directories that have X11 bitmap subdirectories
9182 bmd_acc="dummyval"
9183 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9184 if test -d "${bmd}/X11/bitmaps"; then
9185 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9186 fi
9187 if test -d "${bmd}/bitmaps"; then
9188 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9189 fi
9190 done
9191 if test ${bmd_acc} != "dummyval"; then
9192 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9193 fi
9194fi
9195
5d6da11e 9196HAVE_CARBON=no
1d4d5604
YM
9197if test "${with_carbon}" != no; then
9198 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
ca81d7a0
JD
9199 { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9200echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9201if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9202 echo $ECHO_N "(cached) $ECHO_C" >&6
9203fi
ca81d7a0
JD
9204{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9205echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9206else
9207 # Is the header compilable?
ca81d7a0
JD
9208{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9209echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
5d6da11e
YM
9210cat >conftest.$ac_ext <<_ACEOF
9211/* confdefs.h. */
9212_ACEOF
9213cat confdefs.h >>conftest.$ac_ext
9214cat >>conftest.$ac_ext <<_ACEOF
9215/* end confdefs.h. */
9216$ac_includes_default
9217#include <Carbon/Carbon.h>
9218_ACEOF
9219rm -f conftest.$ac_objext
ca81d7a0
JD
9220if { (ac_try="$ac_compile"
9221case "(($ac_try" in
9222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9223 *) ac_try_echo=$ac_try;;
9224esac
9225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9226 (eval "$ac_compile") 2>conftest.er1
5d6da11e 9227 ac_status=$?
edfaf76d
LK
9228 grep -v '^ *+' conftest.er1 >conftest.err
9229 rm -f conftest.er1
9230 cat conftest.err >&5
5d6da11e 9231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9232 (exit $ac_status); } && {
9233 test -z "$ac_c_werror_flag" ||
9234 test ! -s conftest.err
9235 } && test -s conftest.$ac_objext; then
5d6da11e
YM
9236 ac_header_compiler=yes
9237else
9238 echo "$as_me: failed program was:" >&5
9239sed 's/^/| /' conftest.$ac_ext >&5
9240
ca81d7a0 9241 ac_header_compiler=no
5d6da11e 9242fi
ca81d7a0
JD
9243
9244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9245{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9246echo "${ECHO_T}$ac_header_compiler" >&6; }
5d6da11e
YM
9247
9248# Is the header present?
ca81d7a0
JD
9249{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9250echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
5d6da11e
YM
9251cat >conftest.$ac_ext <<_ACEOF
9252/* confdefs.h. */
9253_ACEOF
9254cat confdefs.h >>conftest.$ac_ext
9255cat >>conftest.$ac_ext <<_ACEOF
9256/* end confdefs.h. */
9257#include <Carbon/Carbon.h>
9258_ACEOF
ca81d7a0
JD
9259if { (ac_try="$ac_cpp conftest.$ac_ext"
9260case "(($ac_try" in
9261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9262 *) ac_try_echo=$ac_try;;
9263esac
9264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9265 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5d6da11e
YM
9266 ac_status=$?
9267 grep -v '^ *+' conftest.er1 >conftest.err
9268 rm -f conftest.er1
9269 cat conftest.err >&5
9270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9271 (exit $ac_status); } >/dev/null && {
9272 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9273 test ! -s conftest.err
9274 }; then
5d6da11e
YM
9275 ac_header_preproc=yes
9276else
9277 echo "$as_me: failed program was:" >&5
9278sed 's/^/| /' conftest.$ac_ext >&5
9279
9280 ac_header_preproc=no
9281fi
ca81d7a0 9282
5d6da11e 9283rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9284{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9285echo "${ECHO_T}$ac_header_preproc" >&6; }
5d6da11e
YM
9286
9287# So? What about this header?
edfaf76d
LK
9288case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9289 yes:no: )
5d6da11e
YM
9290 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9291echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9292 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
9293echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
9294 ac_header_preproc=yes
5d6da11e 9295 ;;
edfaf76d 9296 no:yes:* )
5d6da11e
YM
9297 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9298echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
9299 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9300echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9301 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
9302echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
9303 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
9304echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
9305 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9306echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9307 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
9308echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9309
5d6da11e
YM
9310 ;;
9311esac
ca81d7a0
JD
9312{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9313echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9314if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9315 echo $ECHO_N "(cached) $ECHO_C" >&6
9316else
9317 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
9318fi
ca81d7a0
JD
9319{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9320echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9321
9322fi
9323if test $ac_cv_header_Carbon_Carbon_h = yes; then
9324 HAVE_CARBON=yes
9325fi
9326
9327
ff1095d1 9328 test "${HAVE_CARBON}" = yes && window_system=mac
1d4d5604
YM
9329fi
9330
edfda783 9331HAVE_NS=no
ff1095d1
AR
9332NS_IMPL_COCOA=no
9333NS_IMPL_GNUSTEP=no
edfda783
AR
9334tmp_CPPFLAGS="$CPPFLAGS"
9335tmp_CFLAGS="$CFLAGS"
9336CPPFLAGS="$CPPFLAGS -x objective-c"
9337CFLAGS="$CFLAGS -x objective-c"
9338if test "${with_ns}" != no; then
9339 if test "${opsys}" = darwin; then
ff1095d1 9340 NS_IMPL_COCOA=yes
06b62770
AR
9341 ns_appdir=`pwd`/nextstep/Emacs.app
9342 ns_appbindir=`pwd`/nextstep/Emacs.app/Contents/MacOS
9343 ns_appresdir=`pwd`/nextstep/Emacs.app/Contents/Resources
9344 ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
edfda783 9345 elif test -f /etc/GNUstep/GNUstep.conf; then
ff1095d1 9346 NS_IMPL_GNUSTEP=yes
06b62770
AR
9347 ns_appdir=`pwd`/nextstep/Emacs.app
9348 ns_appbindir=`pwd`/nextstep/Emacs.app
9349 ns_appresdir=`pwd`/nextstep/Emacs.app/Resources
9350 ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
7a55ab54 9351 GNUSTEP_MAKEFILES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_MAKEFILES)"
edfda783
AR
9352 GNUSTEP_SYSTEM_HEADERS="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_HEADERS)"
9353 GNUSTEP_SYSTEM_LIBRARIES="$(source /etc/GNUstep/GNUstep.conf; echo $GNUSTEP_SYSTEM_LIBRARIES)"
9354 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9355 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9356 REAL_CFLAGS="$REAL_CFLAGS -I${GNUSTEP_SYSTEM_HEADERS}"
9357 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES}"
9358 fi
9359 if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9360 { echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
9361echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
9362if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9363 echo $ECHO_N "(cached) $ECHO_C" >&6
9364fi
9365{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
9366echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
9367else
9368 # Is the header compilable?
9369{ echo "$as_me:$LINENO: checking AppKit/AppKit.h usability" >&5
9370echo $ECHO_N "checking AppKit/AppKit.h usability... $ECHO_C" >&6; }
9371cat >conftest.$ac_ext <<_ACEOF
9372/* confdefs.h. */
9373_ACEOF
9374cat confdefs.h >>conftest.$ac_ext
9375cat >>conftest.$ac_ext <<_ACEOF
9376/* end confdefs.h. */
9377$ac_includes_default
9378#include <AppKit/AppKit.h>
9379_ACEOF
9380rm -f conftest.$ac_objext
9381if { (ac_try="$ac_compile"
9382case "(($ac_try" in
9383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9384 *) ac_try_echo=$ac_try;;
9385esac
9386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9387 (eval "$ac_compile") 2>conftest.er1
9388 ac_status=$?
9389 grep -v '^ *+' conftest.er1 >conftest.err
9390 rm -f conftest.er1
9391 cat conftest.err >&5
9392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9393 (exit $ac_status); } && {
9394 test -z "$ac_c_werror_flag" ||
9395 test ! -s conftest.err
9396 } && test -s conftest.$ac_objext; then
9397 ac_header_compiler=yes
9398else
9399 echo "$as_me: failed program was:" >&5
9400sed 's/^/| /' conftest.$ac_ext >&5
9401
9402 ac_header_compiler=no
9403fi
9404
9405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9406{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9407echo "${ECHO_T}$ac_header_compiler" >&6; }
9408
9409# Is the header present?
9410{ echo "$as_me:$LINENO: checking AppKit/AppKit.h presence" >&5
9411echo $ECHO_N "checking AppKit/AppKit.h presence... $ECHO_C" >&6; }
9412cat >conftest.$ac_ext <<_ACEOF
9413/* confdefs.h. */
9414_ACEOF
9415cat confdefs.h >>conftest.$ac_ext
9416cat >>conftest.$ac_ext <<_ACEOF
9417/* end confdefs.h. */
9418#include <AppKit/AppKit.h>
9419_ACEOF
9420if { (ac_try="$ac_cpp conftest.$ac_ext"
9421case "(($ac_try" in
9422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9423 *) ac_try_echo=$ac_try;;
9424esac
9425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9426 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
9427 ac_status=$?
9428 grep -v '^ *+' conftest.er1 >conftest.err
9429 rm -f conftest.er1
9430 cat conftest.err >&5
9431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9432 (exit $ac_status); } >/dev/null && {
9433 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9434 test ! -s conftest.err
9435 }; then
9436 ac_header_preproc=yes
9437else
9438 echo "$as_me: failed program was:" >&5
9439sed 's/^/| /' conftest.$ac_ext >&5
9440
9441 ac_header_preproc=no
9442fi
9443
9444rm -f conftest.err conftest.$ac_ext
9445{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9446echo "${ECHO_T}$ac_header_preproc" >&6; }
9447
9448# So? What about this header?
9449case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9450 yes:no: )
9451 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&5
9452echo "$as_me: WARNING: AppKit/AppKit.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
9453 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&5
9454echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the compiler's result" >&2;}
9455 ac_header_preproc=yes
9456 ;;
9457 no:yes:* )
9458 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&5
9459echo "$as_me: WARNING: AppKit/AppKit.h: present but cannot be compiled" >&2;}
9460 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: check for missing prerequisite headers?" >&5
9461echo "$as_me: WARNING: AppKit/AppKit.h: check for missing prerequisite headers?" >&2;}
9462 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&5
9463echo "$as_me: WARNING: AppKit/AppKit.h: see the Autoconf documentation" >&2;}
9464 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: section \"Present But Cannot Be Compiled\"" >&5
9465echo "$as_me: WARNING: AppKit/AppKit.h: section \"Present But Cannot Be Compiled\"" >&2;}
9466 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&5
9467echo "$as_me: WARNING: AppKit/AppKit.h: proceeding with the preprocessor's result" >&2;}
9468 { echo "$as_me:$LINENO: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&5
9469echo "$as_me: WARNING: AppKit/AppKit.h: in the future, the compiler will take precedence" >&2;}
9470
9471 ;;
9472esac
9473{ echo "$as_me:$LINENO: checking for AppKit/AppKit.h" >&5
9474echo $ECHO_N "checking for AppKit/AppKit.h... $ECHO_C" >&6; }
9475if test "${ac_cv_header_AppKit_AppKit_h+set}" = set; then
9476 echo $ECHO_N "(cached) $ECHO_C" >&6
9477else
9478 ac_cv_header_AppKit_AppKit_h=$ac_header_preproc
9479fi
9480{ echo "$as_me:$LINENO: result: $ac_cv_header_AppKit_AppKit_h" >&5
9481echo "${ECHO_T}$ac_cv_header_AppKit_AppKit_h" >&6; }
9482
9483fi
9484if test $ac_cv_header_AppKit_AppKit_h = yes; then
9485 HAVE_NS=yes
9486fi
9487
9488
edfda783
AR
9489fi
9490if test "${HAVE_NS}" = yes; then
ff1095d1 9491 test "${window_system}" = mac && HAVE_CARBON=no
edfda783
AR
9492 window_system=nextstep
9493 with_xft=no
9494 with_freetype=no
06b62770
AR
9495 # set up packaging dirs
9496 exec_prefix=${ns_appbindir}
9497 libexecdir=${ns_appbindir}/libexec
9498 if test "${EN_NS_SELF_CONTAINED}" = yes; then
9499 prefix=${ns_appresdir}
9500 fi
edfda783
AR
9501fi
9502CFLAGS="$tmp_CFLAGS"
9503CPPFLAGS="$tmp_CPPFLAGS"
9504
1d4d5604
YM
9505case "${window_system}" in
9506 x11 )
9507 HAVE_X_WINDOWS=yes
9508 HAVE_X11=yes
9509 case "${with_x_toolkit}" in
9510 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9511 motif ) USE_X_TOOLKIT=MOTIF ;;
9512 gtk ) with_gtk=yes
9513 USE_X_TOOLKIT=none ;;
9514 no ) USE_X_TOOLKIT=none ;;
9d2818d6 9515 * ) USE_X_TOOLKIT=maybe ;;
1d4d5604
YM
9516 esac
9517 ;;
edfda783 9518 nextstep | mac | none )
1d4d5604
YM
9519 HAVE_X_WINDOWS=no
9520 HAVE_X11=no
9521 USE_X_TOOLKIT=none
9522 ;;
9523esac
9524
cfe440b8
JD
9525if test "$window_system" = none && test "X$with_x" != "Xno"; then
9526 # Extract the first word of "X", so it can be a program name with args.
9527set dummy X; ac_word=$2
9528{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9529echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9530if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
9531 echo $ECHO_N "(cached) $ECHO_C" >&6
9532else
9533 if test -n "$HAVE_XSERVER"; then
9534 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9535else
9536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9537for as_dir in $PATH
9538do
9539 IFS=$as_save_IFS
9540 test -z "$as_dir" && as_dir=.
9541 for ac_exec_ext in '' $ac_executable_extensions; do
9542 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9543 ac_cv_prog_HAVE_XSERVER="true"
9544 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9545 break 2
9546 fi
9547done
9548done
9549IFS=$as_save_IFS
9550
9551 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9552fi
9553fi
9554HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9555if test -n "$HAVE_XSERVER"; then
9556 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9557echo "${ECHO_T}$HAVE_XSERVER" >&6; }
9558else
9559 { echo "$as_me:$LINENO: result: no" >&5
9560echo "${ECHO_T}no" >&6; }
9561fi
9562
9563
9564 if test "$HAVE_XSERVER" = true ||
9565 test -n "$DISPLAY" ||
9566 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9567 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9568were found. You should install the relevant development files for X
9569and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9570sure you have development files for image handling, i.e.
9571tiff, gif, jpeg, png and xpm.
9572If you are sure you want Emacs compiled without X window support, pass
9573 --without-x
9574to configure." >&5
9575echo "$as_me: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9576were found. You should install the relevant development files for X
9577and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9578sure you have development files for image handling, i.e.
9579tiff, gif, jpeg, png and xpm.
9580If you are sure you want Emacs compiled without X window support, pass
9581 --without-x
9582to configure." >&2;}
9583 { (exit 1); exit 1; }; }
9584 fi
9585fi
9586
1d4d5604
YM
9587### If we're using X11, we should use the X menu package.
9588HAVE_MENUS=no
9589case ${HAVE_X11} in
9590 yes ) HAVE_MENUS=yes ;;
9591esac
9592
98418dba
CW
9593# Do the opsystem or machine files prohibit the use of the GNU malloc?
9594# Assume not, until told otherwise.
9595GNU_MALLOC=yes
9596doug_lea_malloc=yes
ca81d7a0
JD
9597{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9598echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9599if test "${ac_cv_func_malloc_get_state+set}" = set; then
9600 echo $ECHO_N "(cached) $ECHO_C" >&6
9601else
9602 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9603/* confdefs.h. */
9604_ACEOF
9605cat confdefs.h >>conftest.$ac_ext
9606cat >>conftest.$ac_ext <<_ACEOF
9607/* end confdefs.h. */
edfaf76d
LK
9608/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9609 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9610#define malloc_get_state innocuous_malloc_get_state
9611
98418dba 9612/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9613 which can conflict with char malloc_get_state (); below.
9614 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9615 <limits.h> exists even on freestanding compilers. */
edfaf76d 9616
19650fd6
AS
9617#ifdef __STDC__
9618# include <limits.h>
9619#else
9620# include <assert.h>
9621#endif
edfaf76d
LK
9622
9623#undef malloc_get_state
9624
ca81d7a0
JD
9625/* Override any GCC internal prototype to avoid an error.
9626 Use char because int might match the return type of a GCC
9627 builtin and then its argument prototype would still apply. */
98418dba
CW
9628#ifdef __cplusplus
9629extern "C"
9630#endif
98418dba 9631char malloc_get_state ();
98418dba
CW
9632/* The GNU C library defines this for functions which it implements
9633 to always fail with ENOSYS. Some functions are actually named
9634 something starting with __ and the normal name is an alias. */
ca81d7a0 9635#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9636choke me
98418dba
CW
9637#endif
9638
19650fd6
AS
9639int
9640main ()
9641{
ca81d7a0 9642return malloc_get_state ();
98418dba
CW
9643 ;
9644 return 0;
9645}
9646_ACEOF
9647rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9648if { (ac_try="$ac_link"
9649case "(($ac_try" in
9650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9651 *) ac_try_echo=$ac_try;;
9652esac
9653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9654 (eval "$ac_link") 2>conftest.er1
98418dba 9655 ac_status=$?
edfaf76d
LK
9656 grep -v '^ *+' conftest.er1 >conftest.err
9657 rm -f conftest.er1
9658 cat conftest.err >&5
c0d27fcc 9659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9660 (exit $ac_status); } && {
9661 test -z "$ac_c_werror_flag" ||
9662 test ! -s conftest.err
9663 } && test -s conftest$ac_exeext &&
9664 $as_test_x conftest$ac_exeext; then
98418dba
CW
9665 ac_cv_func_malloc_get_state=yes
9666else
9667 echo "$as_me: failed program was:" >&5
19650fd6
AS
9668sed 's/^/| /' conftest.$ac_ext >&5
9669
ca81d7a0 9670 ac_cv_func_malloc_get_state=no
98418dba 9671fi
ca81d7a0 9672
f053c89f 9673rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9674 conftest$ac_exeext conftest.$ac_ext
98418dba 9675fi
ca81d7a0
JD
9676{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9677echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9678if test $ac_cv_func_malloc_get_state = yes; then
9679 :
9680else
9681 doug_lea_malloc=no
9682fi
9683
ca81d7a0
JD
9684{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9685echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9686if test "${ac_cv_func_malloc_set_state+set}" = set; then
9687 echo $ECHO_N "(cached) $ECHO_C" >&6
9688else
9689 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9690/* confdefs.h. */
9691_ACEOF
9692cat confdefs.h >>conftest.$ac_ext
9693cat >>conftest.$ac_ext <<_ACEOF
9694/* end confdefs.h. */
edfaf76d
LK
9695/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9696 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9697#define malloc_set_state innocuous_malloc_set_state
9698
98418dba 9699/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9700 which can conflict with char malloc_set_state (); below.
9701 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9702 <limits.h> exists even on freestanding compilers. */
edfaf76d 9703
19650fd6
AS
9704#ifdef __STDC__
9705# include <limits.h>
9706#else
9707# include <assert.h>
9708#endif
edfaf76d
LK
9709
9710#undef malloc_set_state
9711
ca81d7a0
JD
9712/* Override any GCC internal prototype to avoid an error.
9713 Use char because int might match the return type of a GCC
9714 builtin and then its argument prototype would still apply. */
98418dba
CW
9715#ifdef __cplusplus
9716extern "C"
9717#endif
98418dba 9718char malloc_set_state ();
98418dba
CW
9719/* The GNU C library defines this for functions which it implements
9720 to always fail with ENOSYS. Some functions are actually named
9721 something starting with __ and the normal name is an alias. */
ca81d7a0 9722#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9723choke me
98418dba
CW
9724#endif
9725
19650fd6
AS
9726int
9727main ()
9728{
ca81d7a0 9729return malloc_set_state ();
98418dba
CW
9730 ;
9731 return 0;
9732}
9733_ACEOF
9734rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9735if { (ac_try="$ac_link"
9736case "(($ac_try" in
9737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9738 *) ac_try_echo=$ac_try;;
9739esac
9740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9741 (eval "$ac_link") 2>conftest.er1
98418dba 9742 ac_status=$?
edfaf76d
LK
9743 grep -v '^ *+' conftest.er1 >conftest.err
9744 rm -f conftest.er1
9745 cat conftest.err >&5
c0d27fcc 9746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9747 (exit $ac_status); } && {
9748 test -z "$ac_c_werror_flag" ||
9749 test ! -s conftest.err
9750 } && test -s conftest$ac_exeext &&
9751 $as_test_x conftest$ac_exeext; then
98418dba
CW
9752 ac_cv_func_malloc_set_state=yes
9753else
9754 echo "$as_me: failed program was:" >&5
19650fd6
AS
9755sed 's/^/| /' conftest.$ac_ext >&5
9756
ca81d7a0 9757 ac_cv_func_malloc_set_state=no
98418dba 9758fi
ca81d7a0 9759
f053c89f 9760rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9761 conftest$ac_exeext conftest.$ac_ext
98418dba 9762fi
ca81d7a0
JD
9763{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9764echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9765if test $ac_cv_func_malloc_set_state = yes; then
9766 :
9767else
9768 doug_lea_malloc=no
9769fi
9770
ca81d7a0
JD
9771{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9772echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9773if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9774 echo $ECHO_N "(cached) $ECHO_C" >&6
9775else
9776 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9777/* confdefs.h. */
9778_ACEOF
9779cat confdefs.h >>conftest.$ac_ext
9780cat >>conftest.$ac_ext <<_ACEOF
9781/* end confdefs.h. */
98418dba 9782extern void (* __after_morecore_hook)();
98418dba
CW
9783int
9784main ()
9785{
9786__after_morecore_hook = 0
9787 ;
9788 return 0;
9789}
9790_ACEOF
9791rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9792if { (ac_try="$ac_link"
9793case "(($ac_try" in
9794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9795 *) ac_try_echo=$ac_try;;
9796esac
9797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9798 (eval "$ac_link") 2>conftest.er1
98418dba 9799 ac_status=$?
edfaf76d
LK
9800 grep -v '^ *+' conftest.er1 >conftest.err
9801 rm -f conftest.er1
9802 cat conftest.err >&5
c0d27fcc 9803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9804 (exit $ac_status); } && {
9805 test -z "$ac_c_werror_flag" ||
9806 test ! -s conftest.err
9807 } && test -s conftest$ac_exeext &&
9808 $as_test_x conftest$ac_exeext; then
98418dba
CW
9809 emacs_cv_var___after_morecore_hook=yes
9810else
9811 echo "$as_me: failed program was:" >&5
19650fd6
AS
9812sed 's/^/| /' conftest.$ac_ext >&5
9813
ca81d7a0 9814 emacs_cv_var___after_morecore_hook=no
98418dba 9815fi
ca81d7a0 9816
f053c89f 9817rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9818 conftest$ac_exeext conftest.$ac_ext
98418dba 9819fi
ca81d7a0
JD
9820{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9821echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9822if test $emacs_cv_var___after_morecore_hook = no; then
9823 doug_lea_malloc=no
9824fi
9825if test "${system_malloc}" = "yes"; then
9826 GNU_MALLOC=no
9827 GNU_MALLOC_reason="
9828 (The GNU allocators don't work with this system configuration.)"
9829fi
9830if test "$doug_lea_malloc" = "yes" ; then
9831 if test "$GNU_MALLOC" = yes ; then
9832 GNU_MALLOC_reason="
9833 (Using Doug Lea's new malloc from the GNU C Library.)"
9834 fi
b936fae4 9835
c0d27fcc 9836cat >>confdefs.h <<\_ACEOF
98418dba 9837#define DOUG_LEA_MALLOC 1
c0d27fcc 9838_ACEOF
98418dba
CW
9839
9840fi
9841
9842if test x"${REL_ALLOC}" = x; then
9843 REL_ALLOC=${GNU_MALLOC}
9844fi
9845
9846
c0d27fcc
MR
9847
9848
9849for ac_header in stdlib.h unistd.h
98418dba
CW
9850do
9851as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
9852if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9853 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9854echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9855if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 9856 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9857fi
ca81d7a0
JD
9858ac_res=`eval echo '${'$as_ac_Header'}'`
9859 { echo "$as_me:$LINENO: result: $ac_res" >&5
9860echo "${ECHO_T}$ac_res" >&6; }
98418dba 9861else
c0d27fcc 9862 # Is the header compilable?
ca81d7a0
JD
9863{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9864echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9865cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9866/* confdefs.h. */
9867_ACEOF
9868cat confdefs.h >>conftest.$ac_ext
9869cat >>conftest.$ac_ext <<_ACEOF
9870/* end confdefs.h. */
98418dba
CW
9871$ac_includes_default
9872#include <$ac_header>
9873_ACEOF
9874rm -f conftest.$ac_objext
ca81d7a0
JD
9875if { (ac_try="$ac_compile"
9876case "(($ac_try" in
9877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9878 *) ac_try_echo=$ac_try;;
9879esac
9880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9881 (eval "$ac_compile") 2>conftest.er1
98418dba 9882 ac_status=$?
edfaf76d
LK
9883 grep -v '^ *+' conftest.er1 >conftest.err
9884 rm -f conftest.er1
9885 cat conftest.err >&5
c0d27fcc 9886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9887 (exit $ac_status); } && {
9888 test -z "$ac_c_werror_flag" ||
9889 test ! -s conftest.err
9890 } && test -s conftest.$ac_objext; then
c0d27fcc 9891 ac_header_compiler=yes
98418dba
CW
9892else
9893 echo "$as_me: failed program was:" >&5
19650fd6
AS
9894sed 's/^/| /' conftest.$ac_ext >&5
9895
ca81d7a0 9896 ac_header_compiler=no
98418dba 9897fi
ca81d7a0
JD
9898
9899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9900{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9901echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9902
c0d27fcc 9903# Is the header present?
ca81d7a0
JD
9904{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9905echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9906cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9907/* confdefs.h. */
9908_ACEOF
9909cat confdefs.h >>conftest.$ac_ext
9910cat >>conftest.$ac_ext <<_ACEOF
9911/* end confdefs.h. */
98418dba
CW
9912#include <$ac_header>
9913_ACEOF
ca81d7a0
JD
9914if { (ac_try="$ac_cpp conftest.$ac_ext"
9915case "(($ac_try" in
9916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9917 *) ac_try_echo=$ac_try;;
9918esac
9919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9920 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9921 ac_status=$?
6bae0ccf 9922 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9923 rm -f conftest.er1
9924 cat conftest.err >&5
c0d27fcc 9925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9926 (exit $ac_status); } >/dev/null && {
9927 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9928 test ! -s conftest.err
9929 }; then
c0d27fcc 9930 ac_header_preproc=yes
98418dba
CW
9931else
9932 echo "$as_me: failed program was:" >&5
19650fd6
AS
9933sed 's/^/| /' conftest.$ac_ext >&5
9934
c0d27fcc 9935 ac_header_preproc=no
98418dba 9936fi
ca81d7a0 9937
98418dba 9938rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9939{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9940echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
9941
9942# So? What about this header?
edfaf76d
LK
9943case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9944 yes:no: )
c0d27fcc
MR
9945 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9946echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9947 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9948echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9949 ac_header_preproc=yes
9950 ;;
9951 no:yes:* )
9952 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9953echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9954 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9955echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9956 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9957echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9958 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9959echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9960 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9961echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9962 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9963echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9964
19650fd6 9965 ;;
c0d27fcc 9966esac
ca81d7a0
JD
9967{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9968echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9969if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
9970 echo $ECHO_N "(cached) $ECHO_C" >&6
9971else
edfaf76d 9972 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9973fi
ca81d7a0
JD
9974ac_res=`eval echo '${'$as_ac_Header'}'`
9975 { echo "$as_me:$LINENO: result: $ac_res" >&5
9976echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
9977
9978fi
98418dba 9979if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9980 cat >>confdefs.h <<_ACEOF
98418dba 9981#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9982_ACEOF
98418dba
CW
9983
9984fi
c0d27fcc 9985
98418dba
CW
9986done
9987
c0d27fcc 9988
98418dba
CW
9989for ac_func in getpagesize
9990do
9991as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
9992{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9993echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9994if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9995 echo $ECHO_N "(cached) $ECHO_C" >&6
9996else
9997 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9998/* confdefs.h. */
9999_ACEOF
10000cat confdefs.h >>conftest.$ac_ext
10001cat >>conftest.$ac_ext <<_ACEOF
10002/* end confdefs.h. */
edfaf76d
LK
10003/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10004 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10005#define $ac_func innocuous_$ac_func
10006
98418dba 10007/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10008 which can conflict with char $ac_func (); below.
10009 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10010 <limits.h> exists even on freestanding compilers. */
edfaf76d 10011
19650fd6
AS
10012#ifdef __STDC__
10013# include <limits.h>
10014#else
10015# include <assert.h>
10016#endif
edfaf76d
LK
10017
10018#undef $ac_func
10019
ca81d7a0
JD
10020/* Override any GCC internal prototype to avoid an error.
10021 Use char because int might match the return type of a GCC
10022 builtin and then its argument prototype would still apply. */
98418dba
CW
10023#ifdef __cplusplus
10024extern "C"
10025#endif
98418dba 10026char $ac_func ();
98418dba
CW
10027/* The GNU C library defines this for functions which it implements
10028 to always fail with ENOSYS. Some functions are actually named
10029 something starting with __ and the normal name is an alias. */
ca81d7a0 10030#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10031choke me
98418dba
CW
10032#endif
10033
19650fd6
AS
10034int
10035main ()
10036{
ca81d7a0 10037return $ac_func ();
98418dba
CW
10038 ;
10039 return 0;
10040}
10041_ACEOF
10042rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10043if { (ac_try="$ac_link"
10044case "(($ac_try" in
10045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10046 *) ac_try_echo=$ac_try;;
10047esac
10048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10049 (eval "$ac_link") 2>conftest.er1
98418dba 10050 ac_status=$?
edfaf76d
LK
10051 grep -v '^ *+' conftest.er1 >conftest.err
10052 rm -f conftest.er1
10053 cat conftest.err >&5
c0d27fcc 10054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10055 (exit $ac_status); } && {
10056 test -z "$ac_c_werror_flag" ||
10057 test ! -s conftest.err
10058 } && test -s conftest$ac_exeext &&
10059 $as_test_x conftest$ac_exeext; then
98418dba
CW
10060 eval "$as_ac_var=yes"
10061else
10062 echo "$as_me: failed program was:" >&5
19650fd6
AS
10063sed 's/^/| /' conftest.$ac_ext >&5
10064
ca81d7a0 10065 eval "$as_ac_var=no"
98418dba 10066fi
ca81d7a0 10067
f053c89f 10068rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10069 conftest$ac_exeext conftest.$ac_ext
98418dba 10070fi
ca81d7a0
JD
10071ac_res=`eval echo '${'$as_ac_var'}'`
10072 { echo "$as_me:$LINENO: result: $ac_res" >&5
10073echo "${ECHO_T}$ac_res" >&6; }
98418dba 10074if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10075 cat >>confdefs.h <<_ACEOF
98418dba 10076#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10077_ACEOF
98418dba
CW
10078
10079fi
10080done
10081
ca81d7a0
JD
10082{ echo "$as_me:$LINENO: checking for working mmap" >&5
10083echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
10084if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
10085 echo $ECHO_N "(cached) $ECHO_C" >&6
10086else
10087 if test "$cross_compiling" = yes; then
10088 ac_cv_func_mmap_fixed_mapped=no
10089else
10090 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10091/* confdefs.h. */
10092_ACEOF
10093cat confdefs.h >>conftest.$ac_ext
10094cat >>conftest.$ac_ext <<_ACEOF
10095/* end confdefs.h. */
98418dba 10096$ac_includes_default
c0d27fcc
MR
10097/* malloc might have been renamed as rpl_malloc. */
10098#undef malloc
10099
98418dba
CW
10100/* Thanks to Mike Haertel and Jim Avera for this test.
10101 Here is a matrix of mmap possibilities:
10102 mmap private not fixed
10103 mmap private fixed at somewhere currently unmapped
10104 mmap private fixed at somewhere already mapped
10105 mmap shared not fixed
10106 mmap shared fixed at somewhere currently unmapped
10107 mmap shared fixed at somewhere already mapped
10108 For private mappings, we should verify that changes cannot be read()
10109 back from the file, nor mmap's back from the file at a different
10110 address. (There have been systems where private was not correctly
10111 implemented like the infamous i386 svr4.0, and systems where the
10112 VM page cache was not coherent with the file system buffer cache
10113 like early versions of FreeBSD and possibly contemporary NetBSD.)
10114 For shared mappings, we should conversely verify that changes get
c0d27fcc 10115 propagated back to all the places they're supposed to be.
98418dba
CW
10116
10117 Grep wants private fixed already mapped.
10118 The main things grep needs to know about mmap are:
10119 * does it exist and is it safe to write into the mmap'd area
10120 * how to use it (BSD variants) */
10121
10122#include <fcntl.h>
10123#include <sys/mman.h>
10124
f053c89f 10125#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10126char *malloc ();
10127#endif
10128
10129/* This mess was copied from the GNU getpagesize.h. */
f053c89f 10130#ifndef HAVE_GETPAGESIZE
98418dba 10131/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 10132# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10133# define HAVE_SYS_PARAM_H 1
10134# endif
10135
10136# ifdef _SC_PAGESIZE
10137# define getpagesize() sysconf(_SC_PAGESIZE)
10138# else /* no _SC_PAGESIZE */
f053c89f 10139# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10140# include <sys/param.h>
10141# ifdef EXEC_PAGESIZE
10142# define getpagesize() EXEC_PAGESIZE
10143# else /* no EXEC_PAGESIZE */
10144# ifdef NBPG
10145# define getpagesize() NBPG * CLSIZE
10146# ifndef CLSIZE
10147# define CLSIZE 1
10148# endif /* no CLSIZE */
10149# else /* no NBPG */
10150# ifdef NBPC
10151# define getpagesize() NBPC
10152# else /* no NBPC */
10153# ifdef PAGESIZE
10154# define getpagesize() PAGESIZE
10155# endif /* PAGESIZE */
10156# endif /* no NBPC */
10157# endif /* no NBPG */
10158# endif /* no EXEC_PAGESIZE */
10159# else /* no HAVE_SYS_PARAM_H */
10160# define getpagesize() 8192 /* punt totally */
10161# endif /* no HAVE_SYS_PARAM_H */
10162# endif /* no _SC_PAGESIZE */
10163
10164#endif /* no HAVE_GETPAGESIZE */
10165
10166int
10167main ()
10168{
10169 char *data, *data2, *data3;
10170 int i, pagesize;
10171 int fd;
10172
10173 pagesize = getpagesize ();
10174
10175 /* First, make a file with some known garbage in it. */
10176 data = (char *) malloc (pagesize);
10177 if (!data)
ca81d7a0 10178 return 1;
98418dba
CW
10179 for (i = 0; i < pagesize; ++i)
10180 *(data + i) = rand ();
10181 umask (0);
10182 fd = creat ("conftest.mmap", 0600);
10183 if (fd < 0)
ca81d7a0 10184 return 1;
98418dba 10185 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 10186 return 1;
98418dba
CW
10187 close (fd);
10188
10189 /* Next, try to mmap the file at a fixed address which already has
10190 something else allocated at it. If we can, also make sure that
10191 we see the same garbage. */
10192 fd = open ("conftest.mmap", O_RDWR);
10193 if (fd < 0)
ca81d7a0 10194 return 1;
98418dba
CW
10195 data2 = (char *) malloc (2 * pagesize);
10196 if (!data2)
ca81d7a0
JD
10197 return 1;
10198 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10199 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10200 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 10201 return 1;
98418dba
CW
10202 for (i = 0; i < pagesize; ++i)
10203 if (*(data + i) != *(data2 + i))
ca81d7a0 10204 return 1;
98418dba
CW
10205
10206 /* Finally, make sure that changes to the mapped area do not
10207 percolate back to the file as seen by read(). (This is a bug on
10208 some variants of i386 svr4.0.) */
10209 for (i = 0; i < pagesize; ++i)
10210 *(data2 + i) = *(data2 + i) + 1;
10211 data3 = (char *) malloc (pagesize);
10212 if (!data3)
ca81d7a0 10213 return 1;
98418dba 10214 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 10215 return 1;
98418dba
CW
10216 for (i = 0; i < pagesize; ++i)
10217 if (*(data + i) != *(data3 + i))
ca81d7a0 10218 return 1;
98418dba 10219 close (fd);
ca81d7a0 10220 return 0;
98418dba
CW
10221}
10222_ACEOF
10223rm -f conftest$ac_exeext
ca81d7a0
JD
10224if { (ac_try="$ac_link"
10225case "(($ac_try" in
10226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10227 *) ac_try_echo=$ac_try;;
10228esac
10229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10230 (eval "$ac_link") 2>&5
98418dba 10231 ac_status=$?
c0d27fcc 10232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10233 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
10234 { (case "(($ac_try" in
10235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10236 *) ac_try_echo=$ac_try;;
10237esac
10238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10239 (eval "$ac_try") 2>&5
98418dba 10240 ac_status=$?
c0d27fcc 10241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10242 (exit $ac_status); }; }; then
10243 ac_cv_func_mmap_fixed_mapped=yes
10244else
10245 echo "$as_me: program exited with status $ac_status" >&5
10246echo "$as_me: failed program was:" >&5
19650fd6
AS
10247sed 's/^/| /' conftest.$ac_ext >&5
10248
c0d27fcc 10249( exit $ac_status )
98418dba
CW
10250ac_cv_func_mmap_fixed_mapped=no
10251fi
ca81d7a0 10252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10253fi
ca81d7a0
JD
10254
10255
98418dba 10256fi
ca81d7a0
JD
10257{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10258echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10259if test $ac_cv_func_mmap_fixed_mapped = yes; then
10260
c0d27fcc 10261cat >>confdefs.h <<\_ACEOF
98418dba 10262#define HAVE_MMAP 1
c0d27fcc 10263_ACEOF
98418dba
CW
10264
10265fi
10266rm -f conftest.mmap
10267
10268if test $use_mmap_for_buffers = yes; then
10269 REL_ALLOC=no
10270fi
10271
10272LIBS="$libsrc_libs $LIBS"
10273
c0d27fcc 10274
ca81d7a0
JD
10275{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10276echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10277if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10278 echo $ECHO_N "(cached) $ECHO_C" >&6
10279else
10280 ac_check_lib_save_LIBS=$LIBS
10281LIBS="-ldnet $LIBS"
10282cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10283/* confdefs.h. */
10284_ACEOF
10285cat confdefs.h >>conftest.$ac_ext
10286cat >>conftest.$ac_ext <<_ACEOF
10287/* end confdefs.h. */
98418dba 10288
ca81d7a0
JD
10289/* Override any GCC internal prototype to avoid an error.
10290 Use char because int might match the return type of a GCC
10291 builtin and then its argument prototype would still apply. */
98418dba
CW
10292#ifdef __cplusplus
10293extern "C"
10294#endif
98418dba 10295char dnet_ntoa ();
98418dba
CW
10296int
10297main ()
10298{
ca81d7a0 10299return dnet_ntoa ();
98418dba
CW
10300 ;
10301 return 0;
10302}
10303_ACEOF
10304rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10305if { (ac_try="$ac_link"
10306case "(($ac_try" in
10307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10308 *) ac_try_echo=$ac_try;;
10309esac
10310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10311 (eval "$ac_link") 2>conftest.er1
98418dba 10312 ac_status=$?
edfaf76d
LK
10313 grep -v '^ *+' conftest.er1 >conftest.err
10314 rm -f conftest.er1
10315 cat conftest.err >&5
c0d27fcc 10316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10317 (exit $ac_status); } && {
10318 test -z "$ac_c_werror_flag" ||
10319 test ! -s conftest.err
10320 } && test -s conftest$ac_exeext &&
10321 $as_test_x conftest$ac_exeext; then
98418dba
CW
10322 ac_cv_lib_dnet_dnet_ntoa=yes
10323else
10324 echo "$as_me: failed program was:" >&5
19650fd6
AS
10325sed 's/^/| /' conftest.$ac_ext >&5
10326
ca81d7a0 10327 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10328fi
ca81d7a0 10329
f053c89f 10330rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10331 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10332LIBS=$ac_check_lib_save_LIBS
10333fi
ca81d7a0
JD
10334{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10335echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10336if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10337 cat >>confdefs.h <<_ACEOF
98418dba 10338#define HAVE_LIBDNET 1
c0d27fcc 10339_ACEOF
98418dba
CW
10340
10341 LIBS="-ldnet $LIBS"
10342
10343fi
10344
c0d27fcc 10345
ca81d7a0
JD
10346{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10347echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10348if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10349 echo $ECHO_N "(cached) $ECHO_C" >&6
10350else
10351 ac_check_lib_save_LIBS=$LIBS
10352LIBS="-lXbsd $LIBS"
10353cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10354/* confdefs.h. */
10355_ACEOF
10356cat confdefs.h >>conftest.$ac_ext
10357cat >>conftest.$ac_ext <<_ACEOF
10358/* end confdefs.h. */
98418dba 10359
c0d27fcc 10360
98418dba
CW
10361int
10362main ()
10363{
ca81d7a0 10364return main ();
98418dba
CW
10365 ;
10366 return 0;
10367}
10368_ACEOF
10369rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10370if { (ac_try="$ac_link"
10371case "(($ac_try" in
10372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10373 *) ac_try_echo=$ac_try;;
10374esac
10375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10376 (eval "$ac_link") 2>conftest.er1
98418dba 10377 ac_status=$?
edfaf76d
LK
10378 grep -v '^ *+' conftest.er1 >conftest.err
10379 rm -f conftest.er1
10380 cat conftest.err >&5
c0d27fcc 10381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10382 (exit $ac_status); } && {
10383 test -z "$ac_c_werror_flag" ||
10384 test ! -s conftest.err
10385 } && test -s conftest$ac_exeext &&
10386 $as_test_x conftest$ac_exeext; then
98418dba
CW
10387 ac_cv_lib_Xbsd_main=yes
10388else
10389 echo "$as_me: failed program was:" >&5
19650fd6
AS
10390sed 's/^/| /' conftest.$ac_ext >&5
10391
ca81d7a0 10392 ac_cv_lib_Xbsd_main=no
98418dba 10393fi
ca81d7a0 10394
f053c89f 10395rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10396 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10397LIBS=$ac_check_lib_save_LIBS
10398fi
ca81d7a0
JD
10399{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10400echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10401if test $ac_cv_lib_Xbsd_main = yes; then
10402 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10403fi
10404
c0d27fcc
MR
10405
10406
ca81d7a0
JD
10407{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10408echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10409if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10410 echo $ECHO_N "(cached) $ECHO_C" >&6
10411else
10412 ac_check_lib_save_LIBS=$LIBS
10413LIBS="-lpthreads $LIBS"
10414cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10415/* confdefs.h. */
10416_ACEOF
10417cat confdefs.h >>conftest.$ac_ext
10418cat >>conftest.$ac_ext <<_ACEOF
10419/* end confdefs.h. */
98418dba 10420
ca81d7a0
JD
10421/* Override any GCC internal prototype to avoid an error.
10422 Use char because int might match the return type of a GCC
10423 builtin and then its argument prototype would still apply. */
98418dba
CW
10424#ifdef __cplusplus
10425extern "C"
10426#endif
98418dba 10427char cma_open ();
98418dba
CW
10428int
10429main ()
10430{
ca81d7a0 10431return cma_open ();
98418dba
CW
10432 ;
10433 return 0;
10434}
10435_ACEOF
10436rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10437if { (ac_try="$ac_link"
10438case "(($ac_try" in
10439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10440 *) ac_try_echo=$ac_try;;
10441esac
10442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10443 (eval "$ac_link") 2>conftest.er1
98418dba 10444 ac_status=$?
edfaf76d
LK
10445 grep -v '^ *+' conftest.er1 >conftest.err
10446 rm -f conftest.er1
10447 cat conftest.err >&5
c0d27fcc 10448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10449 (exit $ac_status); } && {
10450 test -z "$ac_c_werror_flag" ||
10451 test ! -s conftest.err
10452 } && test -s conftest$ac_exeext &&
10453 $as_test_x conftest$ac_exeext; then
98418dba
CW
10454 ac_cv_lib_pthreads_cma_open=yes
10455else
10456 echo "$as_me: failed program was:" >&5
19650fd6
AS
10457sed 's/^/| /' conftest.$ac_ext >&5
10458
ca81d7a0 10459 ac_cv_lib_pthreads_cma_open=no
98418dba 10460fi
ca81d7a0 10461
f053c89f 10462rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10463 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10464LIBS=$ac_check_lib_save_LIBS
10465fi
ca81d7a0
JD
10466{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10467echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10468if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10469 cat >>confdefs.h <<_ACEOF
98418dba 10470#define HAVE_LIBPTHREADS 1
c0d27fcc 10471_ACEOF
98418dba
CW
10472
10473 LIBS="-lpthreads $LIBS"
10474
10475fi
10476
c0d27fcc 10477
55597d70
DL
10478
10479case ${host_os} in
10480aix*)
ca81d7a0
JD
10481 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10482echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10483if test "${gdb_cv_bigtoc+set}" = set; then
10484 echo $ECHO_N "(cached) $ECHO_C" >&6
10485else
10486
10487 case $GCC in
10488 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10489 *) gdb_cv_bigtoc=-bbigtoc ;;
10490 esac
10491
10492 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10493 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10494/* confdefs.h. */
10495_ACEOF
10496cat confdefs.h >>conftest.$ac_ext
10497cat >>conftest.$ac_ext <<_ACEOF
10498/* end confdefs.h. */
55597d70
DL
10499
10500int
10501main ()
10502{
10503int i;
10504 ;
10505 return 0;
10506}
10507_ACEOF
10508rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10509if { (ac_try="$ac_link"
10510case "(($ac_try" in
10511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10512 *) ac_try_echo=$ac_try;;
10513esac
10514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10515 (eval "$ac_link") 2>conftest.er1
55597d70 10516 ac_status=$?
edfaf76d
LK
10517 grep -v '^ *+' conftest.er1 >conftest.err
10518 rm -f conftest.er1
10519 cat conftest.err >&5
55597d70 10520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10521 (exit $ac_status); } && {
10522 test -z "$ac_c_werror_flag" ||
10523 test ! -s conftest.err
10524 } && test -s conftest$ac_exeext &&
10525 $as_test_x conftest$ac_exeext; then
55597d70
DL
10526 :
10527else
10528 echo "$as_me: failed program was:" >&5
19650fd6
AS
10529sed 's/^/| /' conftest.$ac_ext >&5
10530
ca81d7a0 10531 gdb_cv_bigtoc=
55597d70 10532fi
ca81d7a0 10533
f053c89f 10534rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10535 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10536
10537fi
ca81d7a0
JD
10538{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10539echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10540 ;;
10541esac
10542
ae1a998c
RS
10543# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10544# used for the tests that follow. We set them back to REAL_CFLAGS and
10545# REAL_CPPFLAGS later on.
98418dba
CW
10546
10547REAL_CPPFLAGS="$CPPFLAGS"
10548
10549if test "${HAVE_X11}" = "yes"; then
10550 DEFS="$C_SWITCH_X_SITE $DEFS"
10551 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10552 LIBS="$LIBX $LIBS"
10553 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10554 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10555
10556 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10557 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10558 # but it's more convenient here to set LD_RUN_PATH
10559 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10560 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10561 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10562 export LD_RUN_PATH
10563 fi
10564
10565 if test "${opsys}" = "gnu-linux"; then
ca81d7a0
JD
10566 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10567echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10568 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10569/* confdefs.h. */
10570_ACEOF
10571cat confdefs.h >>conftest.$ac_ext
10572cat >>conftest.$ac_ext <<_ACEOF
10573/* end confdefs.h. */
98418dba 10574
98418dba
CW
10575int
10576main ()
10577{
10578XOpenDisplay ("foo");
10579 ;
10580 return 0;
10581}
10582_ACEOF
10583rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10584if { (ac_try="$ac_link"
10585case "(($ac_try" in
10586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10587 *) ac_try_echo=$ac_try;;
10588esac
10589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10590 (eval "$ac_link") 2>conftest.er1
98418dba 10591 ac_status=$?
edfaf76d
LK
10592 grep -v '^ *+' conftest.er1 >conftest.err
10593 rm -f conftest.er1
10594 cat conftest.err >&5
c0d27fcc 10595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10596 (exit $ac_status); } && {
10597 test -z "$ac_c_werror_flag" ||
10598 test ! -s conftest.err
10599 } && test -s conftest$ac_exeext &&
10600 $as_test_x conftest$ac_exeext; then
35996d22 10601 xlinux_first_failure=no
98418dba
CW
10602else
10603 echo "$as_me: failed program was:" >&5
19650fd6
AS
10604sed 's/^/| /' conftest.$ac_ext >&5
10605
ca81d7a0 10606 xlinux_first_failure=yes
98418dba 10607fi
ca81d7a0 10608
f053c89f 10609rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10610 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10611 if test "${xlinux_first_failure}" = "yes"; then
10612 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10613 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10614 OLD_CPPFLAGS="$CPPFLAGS"
10615 OLD_LIBS="$LIBS"
10616 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10617 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10618 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10619 LIBS="$LIBS -b i486-linuxaout"
10620 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10621/* confdefs.h. */
10622_ACEOF
10623cat confdefs.h >>conftest.$ac_ext
10624cat >>conftest.$ac_ext <<_ACEOF
10625/* end confdefs.h. */
98418dba 10626
98418dba
CW
10627int
10628main ()
10629{
10630XOpenDisplay ("foo");
10631 ;
10632 return 0;
10633}
10634_ACEOF
10635rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10636if { (ac_try="$ac_link"
10637case "(($ac_try" in
10638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10639 *) ac_try_echo=$ac_try;;
10640esac
10641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10642 (eval "$ac_link") 2>conftest.er1
98418dba 10643 ac_status=$?
edfaf76d
LK
10644 grep -v '^ *+' conftest.er1 >conftest.err
10645 rm -f conftest.er1
10646 cat conftest.err >&5
c0d27fcc 10647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10648 (exit $ac_status); } && {
10649 test -z "$ac_c_werror_flag" ||
10650 test ! -s conftest.err
10651 } && test -s conftest$ac_exeext &&
10652 $as_test_x conftest$ac_exeext; then
98418dba
CW
10653 xlinux_second_failure=no
10654else
10655 echo "$as_me: failed program was:" >&5
19650fd6
AS
10656sed 's/^/| /' conftest.$ac_ext >&5
10657
ca81d7a0 10658 xlinux_second_failure=yes
98418dba 10659fi
ca81d7a0 10660
f053c89f 10661rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10662 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10663 if test "${xlinux_second_failure}" = "yes"; then
10664 # If we get the same failure with -b, there is no use adding -b.
10665 # So take it out. This plays safe.
10666 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10667 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10668 CPPFLAGS="$OLD_CPPFLAGS"
10669 LIBS="$OLD_LIBS"
ca81d7a0
JD
10670 { echo "$as_me:$LINENO: result: no" >&5
10671echo "${ECHO_T}no" >&6; }
98418dba 10672 else
ca81d7a0
JD
10673 { echo "$as_me:$LINENO: result: yes" >&5
10674echo "${ECHO_T}yes" >&6; }
98418dba
CW
10675 fi
10676 else
ca81d7a0
JD
10677 { echo "$as_me:$LINENO: result: no" >&5
10678echo "${ECHO_T}no" >&6; }
98418dba
CW
10679 fi
10680 fi
10681
10682 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10683 # header files included from there.
ca81d7a0
JD
10684 { echo "$as_me:$LINENO: checking for Xkb" >&5
10685echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10686 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10687/* confdefs.h. */
10688_ACEOF
10689cat confdefs.h >>conftest.$ac_ext
10690cat >>conftest.$ac_ext <<_ACEOF
10691/* end confdefs.h. */
98418dba
CW
10692#include <X11/Xlib.h>
10693#include <X11/XKBlib.h>
98418dba
CW
10694int
10695main ()
10696{
10697XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10698 ;
10699 return 0;
10700}
10701_ACEOF
10702rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10703if { (ac_try="$ac_link"
10704case "(($ac_try" in
10705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10706 *) ac_try_echo=$ac_try;;
10707esac
10708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10709 (eval "$ac_link") 2>conftest.er1
98418dba 10710 ac_status=$?
edfaf76d
LK
10711 grep -v '^ *+' conftest.er1 >conftest.err
10712 rm -f conftest.er1
10713 cat conftest.err >&5
c0d27fcc 10714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10715 (exit $ac_status); } && {
10716 test -z "$ac_c_werror_flag" ||
10717 test ! -s conftest.err
10718 } && test -s conftest$ac_exeext &&
10719 $as_test_x conftest$ac_exeext; then
98418dba
CW
10720 emacs_xkb=yes
10721else
10722 echo "$as_me: failed program was:" >&5
19650fd6
AS
10723sed 's/^/| /' conftest.$ac_ext >&5
10724
ca81d7a0 10725 emacs_xkb=no
98418dba 10726fi
ca81d7a0 10727
f053c89f 10728rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10729 conftest$ac_exeext conftest.$ac_ext
ca81d7a0
JD
10730 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10731echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10732 if test $emacs_xkb = yes; then
b936fae4 10733
c0d27fcc 10734cat >>confdefs.h <<\_ACEOF
98418dba 10735#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10736_ACEOF
98418dba
CW
10737
10738 fi
10739
c0d27fcc
MR
10740
10741
10742
10743
98418dba
CW
10744for ac_func in XrmSetDatabase XScreenResourceString \
10745XScreenNumberOfScreen XSetWMProtocols
10746do
10747as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10748{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10749echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10750if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10751 echo $ECHO_N "(cached) $ECHO_C" >&6
10752else
10753 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10754/* confdefs.h. */
10755_ACEOF
10756cat confdefs.h >>conftest.$ac_ext
10757cat >>conftest.$ac_ext <<_ACEOF
10758/* end confdefs.h. */
edfaf76d
LK
10759/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10760 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10761#define $ac_func innocuous_$ac_func
10762
98418dba 10763/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10764 which can conflict with char $ac_func (); below.
10765 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10766 <limits.h> exists even on freestanding compilers. */
edfaf76d 10767
19650fd6
AS
10768#ifdef __STDC__
10769# include <limits.h>
10770#else
10771# include <assert.h>
10772#endif
edfaf76d
LK
10773
10774#undef $ac_func
10775
ca81d7a0
JD
10776/* Override any GCC internal prototype to avoid an error.
10777 Use char because int might match the return type of a GCC
10778 builtin and then its argument prototype would still apply. */
98418dba
CW
10779#ifdef __cplusplus
10780extern "C"
10781#endif
98418dba 10782char $ac_func ();
98418dba
CW
10783/* The GNU C library defines this for functions which it implements
10784 to always fail with ENOSYS. Some functions are actually named
10785 something starting with __ and the normal name is an alias. */
ca81d7a0 10786#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10787choke me
98418dba
CW
10788#endif
10789
19650fd6
AS
10790int
10791main ()
10792{
ca81d7a0 10793return $ac_func ();
98418dba
CW
10794 ;
10795 return 0;
10796}
10797_ACEOF
10798rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10799if { (ac_try="$ac_link"
10800case "(($ac_try" in
10801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10802 *) ac_try_echo=$ac_try;;
10803esac
10804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10805 (eval "$ac_link") 2>conftest.er1
98418dba 10806 ac_status=$?
edfaf76d
LK
10807 grep -v '^ *+' conftest.er1 >conftest.err
10808 rm -f conftest.er1
10809 cat conftest.err >&5
c0d27fcc 10810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10811 (exit $ac_status); } && {
10812 test -z "$ac_c_werror_flag" ||
10813 test ! -s conftest.err
10814 } && test -s conftest$ac_exeext &&
10815 $as_test_x conftest$ac_exeext; then
98418dba
CW
10816 eval "$as_ac_var=yes"
10817else
10818 echo "$as_me: failed program was:" >&5
19650fd6
AS
10819sed 's/^/| /' conftest.$ac_ext >&5
10820
ca81d7a0 10821 eval "$as_ac_var=no"
98418dba 10822fi
ca81d7a0 10823
f053c89f 10824rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10825 conftest$ac_exeext conftest.$ac_ext
98418dba 10826fi
ca81d7a0
JD
10827ac_res=`eval echo '${'$as_ac_var'}'`
10828 { echo "$as_me:$LINENO: result: $ac_res" >&5
10829echo "${ECHO_T}$ac_res" >&6; }
98418dba 10830if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10831 cat >>confdefs.h <<_ACEOF
98418dba 10832#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10833_ACEOF
98418dba
CW
10834
10835fi
10836done
10837
10838fi
10839
10840if test "${window_system}" = "x11"; then
ca81d7a0
JD
10841 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10842echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
10843 if test "${emacs_cv_x11_version_6+set}" = set; then
10844 echo $ECHO_N "(cached) $ECHO_C" >&6
10845else
10846 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10847/* confdefs.h. */
10848_ACEOF
10849cat confdefs.h >>conftest.$ac_ext
10850cat >>conftest.$ac_ext <<_ACEOF
10851/* end confdefs.h. */
98418dba 10852#include <X11/Xlib.h>
98418dba
CW
10853int
10854main ()
10855{
10856#if XlibSpecificationRelease < 6
10857fail;
10858#endif
10859
10860 ;
10861 return 0;
10862}
10863_ACEOF
10864rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10865if { (ac_try="$ac_link"
10866case "(($ac_try" in
10867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10868 *) ac_try_echo=$ac_try;;
10869esac
10870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10871 (eval "$ac_link") 2>conftest.er1
98418dba 10872 ac_status=$?
edfaf76d
LK
10873 grep -v '^ *+' conftest.er1 >conftest.err
10874 rm -f conftest.er1
10875 cat conftest.err >&5
c0d27fcc 10876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10877 (exit $ac_status); } && {
10878 test -z "$ac_c_werror_flag" ||
10879 test ! -s conftest.err
10880 } && test -s conftest$ac_exeext &&
10881 $as_test_x conftest$ac_exeext; then
98418dba
CW
10882 emacs_cv_x11_version_6=yes
10883else
10884 echo "$as_me: failed program was:" >&5
19650fd6
AS
10885sed 's/^/| /' conftest.$ac_ext >&5
10886
ca81d7a0 10887 emacs_cv_x11_version_6=no
98418dba 10888fi
ca81d7a0 10889
f053c89f 10890rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10891 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10892fi
10893
10894 if test $emacs_cv_x11_version_6 = yes; then
ca81d7a0
JD
10895 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10896echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10897
c0d27fcc 10898cat >>confdefs.h <<\_ACEOF
98418dba 10899#define HAVE_X11R6 1
c0d27fcc 10900_ACEOF
98418dba
CW
10901
10902 else
ca81d7a0
JD
10903 { echo "$as_me:$LINENO: result: before 6" >&5
10904echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10905 fi
10906fi
10907
98418dba 10908
0cfc0546
GM
10909### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10910HAVE_RSVG=no
ae0476ed 10911if test "${HAVE_X11}" = "yes" || test "${HAVE_CARBON}" = "yes"; then
0cfc0546 10912 if test "${with_rsvg}" != "no"; then
0cfc0546
GM
10913 RSVG_REQUIRED=2.0.0
10914 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10915
10916
10917 succeeded=no
10918
00b9c927 10919 # Extract the first word of "pkg-config", so it can be a program name with args.
0cfc0546
GM
10920set dummy pkg-config; ac_word=$2
10921{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10922echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
10923if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10924 echo $ECHO_N "(cached) $ECHO_C" >&6
10925else
10926 case $PKG_CONFIG in
10927 [\\/]* | ?:[\\/]*)
10928 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10929 ;;
10930 *)
10931 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10932for as_dir in $PATH
10933do
10934 IFS=$as_save_IFS
10935 test -z "$as_dir" && as_dir=.
10936 for ac_exec_ext in '' $ac_executable_extensions; do
10937 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10938 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10939 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10940 break 2
10941 fi
10942done
10943done
10944IFS=$as_save_IFS
10945
10946 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10947 ;;
10948esac
10949fi
10950PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10951if test -n "$PKG_CONFIG"; then
10952 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10953echo "${ECHO_T}$PKG_CONFIG" >&6; }
10954else
10955 { echo "$as_me:$LINENO: result: no" >&5
10956echo "${ECHO_T}no" >&6; }
10957fi
10958
10959
0cfc0546
GM
10960
10961 if test "$PKG_CONFIG" = "no" ; then
10962 :
10963 else
10964 PKG_CONFIG_MIN_VERSION=0.9.0
10965 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10966 { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
10967echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
10968
10969 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
10970 { echo "$as_me:$LINENO: result: yes" >&5
10971echo "${ECHO_T}yes" >&6; }
10972 succeeded=yes
10973
10974 { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
10975echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
10976 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10977 { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
10978echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
10979
10980 { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
10981echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
10982 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10983 { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
10984echo "${ECHO_T}$RSVG_LIBS" >&6; }
10985 else
10986 { echo "$as_me:$LINENO: result: no" >&5
10987echo "${ECHO_T}no" >&6; }
10988 RSVG_CFLAGS=""
10989 RSVG_LIBS=""
10990 ## If we have a custom action on failure, don't print errors, but
10991 ## do set a variable so people can do so.
10992 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
10993
10994 fi
10995
10996
10997
10998 else
10999 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11000 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11001 fi
11002 fi
11003
11004 if test $succeeded = yes; then
11005 :
11006 else
11007 :
11008 fi
11009
11010
11011
11012
11013 if test ".${RSVG_CFLAGS}" != "."; then
11014 HAVE_RSVG=yes
11015
11016cat >>confdefs.h <<\_ACEOF
11017#define HAVE_RSVG 1
11018_ACEOF
11019
11020 CFLAGS="$CFLAGS $RSVG_CFLAGS"
11021 LIBS="$RSVG_LIBS $LIBS"
11022 fi
11023 fi
11024fi
11025
11026
488dd4c4 11027HAVE_GTK=no
9d2818d6 11028if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
787eb67d
JD
11029 GLIB_REQUIRED=2.6
11030 GTK_REQUIRED=2.6
488dd4c4
JD
11031 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11032
488dd4c4
JD
11033
11034 succeeded=no
11035
00b9c927 11036 # Extract the first word of "pkg-config", so it can be a program name with args.
488dd4c4 11037set dummy pkg-config; ac_word=$2
ca81d7a0
JD
11038{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11039echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
11040if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11041 echo $ECHO_N "(cached) $ECHO_C" >&6
11042else
11043 case $PKG_CONFIG in
11044 [\\/]* | ?:[\\/]*)
11045 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11046 ;;
11047 *)
11048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11049for as_dir in $PATH
11050do
11051 IFS=$as_save_IFS
11052 test -z "$as_dir" && as_dir=.
11053 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 11054 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
11055 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11056 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11057 break 2
11058 fi
11059done
11060done
ca81d7a0 11061IFS=$as_save_IFS
488dd4c4
JD
11062
11063 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11064 ;;
11065esac
11066fi
11067PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 11068if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
11069 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11070echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 11071else
ca81d7a0
JD
11072 { echo "$as_me:$LINENO: result: no" >&5
11073echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11074fi
11075
ca81d7a0 11076
488dd4c4
JD
11077
11078 if test "$PKG_CONFIG" = "no" ; then
089a966d 11079 pkg_check_gtk=no
488dd4c4
JD
11080 else
11081 PKG_CONFIG_MIN_VERSION=0.9.0
11082 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
11083 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
11084echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 11085
67db6aa2 11086 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
ca81d7a0
JD
11087 { echo "$as_me:$LINENO: result: yes" >&5
11088echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
11089 succeeded=yes
11090
ca81d7a0
JD
11091 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
11092echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 11093 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11094 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
11095echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 11096
ca81d7a0
JD
11097 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
11098echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 11099 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11100 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
11101echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 11102 else
ca81d7a0
JD
11103 { echo "$as_me:$LINENO: result: no" >&5
11104echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11105 GTK_CFLAGS=""
11106 GTK_LIBS=""
11107 ## If we have a custom action on failure, don't print errors, but
11108 ## do set a variable so people can do so.
11109 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 11110
488dd4c4
JD
11111 fi
11112
11113
11114
11115 else
11116 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11117 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11118 fi
11119 fi
11120
11121 if test $succeeded = yes; then
089a966d 11122 pkg_check_gtk=yes
488dd4c4 11123 else
089a966d
GM
11124 pkg_check_gtk=no
11125 fi
11126
11127 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
11128 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
11129echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
11130 { (exit 1); exit 1; }; }
11131 fi
089a966d
GM
11132fi
11133
11134
11135if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
11136
11137
11138
11139 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11140 CFLAGS="$CFLAGS $GTK_CFLAGS"
11141 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11142 GTK_COMPILES=no
57669b57 11143
8eeae1c9 11144for ac_func in gtk_main
57669b57
JD
11145do
11146as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11147{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11148echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11149if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11150 echo $ECHO_N "(cached) $ECHO_C" >&6
11151else
11152 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11153/* confdefs.h. */
11154_ACEOF
11155cat confdefs.h >>conftest.$ac_ext
11156cat >>conftest.$ac_ext <<_ACEOF
11157/* end confdefs.h. */
edfaf76d
LK
11158/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11159 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11160#define $ac_func innocuous_$ac_func
11161
57669b57
JD
11162/* System header to define __stub macros and hopefully few prototypes,
11163 which can conflict with char $ac_func (); below.
11164 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11165 <limits.h> exists even on freestanding compilers. */
edfaf76d 11166
57669b57
JD
11167#ifdef __STDC__
11168# include <limits.h>
11169#else
11170# include <assert.h>
11171#endif
edfaf76d
LK
11172
11173#undef $ac_func
11174
ca81d7a0
JD
11175/* Override any GCC internal prototype to avoid an error.
11176 Use char because int might match the return type of a GCC
11177 builtin and then its argument prototype would still apply. */
57669b57
JD
11178#ifdef __cplusplus
11179extern "C"
57669b57 11180#endif
57669b57
JD
11181char $ac_func ();
11182/* The GNU C library defines this for functions which it implements
11183 to always fail with ENOSYS. Some functions are actually named
11184 something starting with __ and the normal name is an alias. */
ca81d7a0 11185#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11186choke me
57669b57
JD
11187#endif
11188
11189int
11190main ()
11191{
ca81d7a0 11192return $ac_func ();
57669b57
JD
11193 ;
11194 return 0;
11195}
11196_ACEOF
11197rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11198if { (ac_try="$ac_link"
11199case "(($ac_try" in
11200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11201 *) ac_try_echo=$ac_try;;
11202esac
11203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11204 (eval "$ac_link") 2>conftest.er1
57669b57 11205 ac_status=$?
edfaf76d
LK
11206 grep -v '^ *+' conftest.er1 >conftest.err
11207 rm -f conftest.er1
11208 cat conftest.err >&5
57669b57 11209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11210 (exit $ac_status); } && {
11211 test -z "$ac_c_werror_flag" ||
11212 test ! -s conftest.err
11213 } && test -s conftest$ac_exeext &&
11214 $as_test_x conftest$ac_exeext; then
57669b57
JD
11215 eval "$as_ac_var=yes"
11216else
11217 echo "$as_me: failed program was:" >&5
11218sed 's/^/| /' conftest.$ac_ext >&5
11219
ca81d7a0 11220 eval "$as_ac_var=no"
57669b57 11221fi
ca81d7a0 11222
f053c89f 11223rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11224 conftest$ac_exeext conftest.$ac_ext
57669b57 11225fi
ca81d7a0
JD
11226ac_res=`eval echo '${'$as_ac_var'}'`
11227 { echo "$as_me:$LINENO: result: $ac_res" >&5
11228echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11229if test `eval echo '${'$as_ac_var'}'` = yes; then
11230 cat >>confdefs.h <<_ACEOF
11231#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11232_ACEOF
8eeae1c9 11233 GTK_COMPILES=yes
57669b57
JD
11234fi
11235done
11236
8eeae1c9 11237 if test "${GTK_COMPILES}" != "yes"; then
089a966d
GM
11238 if test "$USE_X_TOOLKIT" != "maybe"; then
11239 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
8eeae1c9
JD
11240echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11241 { (exit 1); exit 1; }; };
089a966d
GM
11242 fi
11243 else
11244 HAVE_GTK=yes
488dd4c4
JD
11245
11246cat >>confdefs.h <<\_ACEOF
a51f4969 11247#define USE_GTK 1
488dd4c4
JD
11248_ACEOF
11249
089a966d 11250 USE_X_TOOLKIT=none
f60c93db
JD
11251 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
11252 :
11253 else
11254 { echo "$as_me:$LINENO: WARNING: Your version of Gtk+ will have problems with
11255 closing open displays. This is no problem if you just use
11256 one display, but if you use more than one and close one of them
11257 Emacs may crash." >&5
11258echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11259 closing open displays. This is no problem if you just use
11260 one display, but if you use more than one and close one of them
11261 Emacs may crash." >&2;}
11262 sleep 3
11263 fi
089a966d
GM
11264 fi
11265
11266fi
11267
11268
11269if test "${HAVE_GTK}" = "yes"; then
488dd4c4 11270
d0a80c21
JD
11271 if test "$with_toolkit_scroll_bars" != no; then
11272 with_toolkit_scroll_bars=yes
11273 fi
57669b57
JD
11274
11275 HAVE_GTK_MULTIDISPLAY=no
11276
11277for ac_func in gdk_display_open
11278do
11279as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11280{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11281echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11282if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11283 echo $ECHO_N "(cached) $ECHO_C" >&6
11284else
11285 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11286/* confdefs.h. */
11287_ACEOF
11288cat confdefs.h >>conftest.$ac_ext
11289cat >>conftest.$ac_ext <<_ACEOF
11290/* end confdefs.h. */
edfaf76d
LK
11291/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11292 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11293#define $ac_func innocuous_$ac_func
11294
57669b57
JD
11295/* System header to define __stub macros and hopefully few prototypes,
11296 which can conflict with char $ac_func (); below.
11297 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11298 <limits.h> exists even on freestanding compilers. */
edfaf76d 11299
57669b57
JD
11300#ifdef __STDC__
11301# include <limits.h>
11302#else
11303# include <assert.h>
11304#endif
edfaf76d
LK
11305
11306#undef $ac_func
11307
ca81d7a0
JD
11308/* Override any GCC internal prototype to avoid an error.
11309 Use char because int might match the return type of a GCC
11310 builtin and then its argument prototype would still apply. */
57669b57
JD
11311#ifdef __cplusplus
11312extern "C"
57669b57 11313#endif
57669b57
JD
11314char $ac_func ();
11315/* The GNU C library defines this for functions which it implements
11316 to always fail with ENOSYS. Some functions are actually named
11317 something starting with __ and the normal name is an alias. */
ca81d7a0 11318#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11319choke me
57669b57
JD
11320#endif
11321
11322int
11323main ()
11324{
ca81d7a0 11325return $ac_func ();
57669b57
JD
11326 ;
11327 return 0;
11328}
11329_ACEOF
11330rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11331if { (ac_try="$ac_link"
11332case "(($ac_try" in
11333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11334 *) ac_try_echo=$ac_try;;
11335esac
11336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11337 (eval "$ac_link") 2>conftest.er1
57669b57 11338 ac_status=$?
edfaf76d
LK
11339 grep -v '^ *+' conftest.er1 >conftest.err
11340 rm -f conftest.er1
11341 cat conftest.err >&5
57669b57 11342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11343 (exit $ac_status); } && {
11344 test -z "$ac_c_werror_flag" ||
11345 test ! -s conftest.err
11346 } && test -s conftest$ac_exeext &&
11347 $as_test_x conftest$ac_exeext; then
57669b57
JD
11348 eval "$as_ac_var=yes"
11349else
11350 echo "$as_me: failed program was:" >&5
11351sed 's/^/| /' conftest.$ac_ext >&5
11352
ca81d7a0 11353 eval "$as_ac_var=no"
57669b57 11354fi
ca81d7a0 11355
f053c89f 11356rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11357 conftest$ac_exeext conftest.$ac_ext
57669b57 11358fi
ca81d7a0
JD
11359ac_res=`eval echo '${'$as_ac_var'}'`
11360 { echo "$as_me:$LINENO: result: $ac_res" >&5
11361echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11362if test `eval echo '${'$as_ac_var'}'` = yes; then
11363 cat >>confdefs.h <<_ACEOF
11364#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11365_ACEOF
11366 HAVE_GTK_MULTIDISPLAY=yes
11367fi
11368done
11369
11370 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11371
11372cat >>confdefs.h <<\_ACEOF
11373#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
11374_ACEOF
11375
11376 fi
57669b57 11377
572a3cc2
JD
11378 HAVE_GTK_FILE_SELECTION=no
11379
11380for ac_func in gtk_file_selection_new
11381do
11382as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11383{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11384echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11385if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11386 echo $ECHO_N "(cached) $ECHO_C" >&6
11387else
11388 cat >conftest.$ac_ext <<_ACEOF
11389/* confdefs.h. */
11390_ACEOF
11391cat confdefs.h >>conftest.$ac_ext
11392cat >>conftest.$ac_ext <<_ACEOF
11393/* end confdefs.h. */
edfaf76d
LK
11394/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11395 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11396#define $ac_func innocuous_$ac_func
11397
572a3cc2
JD
11398/* System header to define __stub macros and hopefully few prototypes,
11399 which can conflict with char $ac_func (); below.
11400 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11401 <limits.h> exists even on freestanding compilers. */
edfaf76d 11402
572a3cc2
JD
11403#ifdef __STDC__
11404# include <limits.h>
11405#else
11406# include <assert.h>
11407#endif
edfaf76d
LK
11408
11409#undef $ac_func
11410
ca81d7a0
JD
11411/* Override any GCC internal prototype to avoid an error.
11412 Use char because int might match the return type of a GCC
11413 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11414#ifdef __cplusplus
11415extern "C"
572a3cc2 11416#endif
572a3cc2
JD
11417char $ac_func ();
11418/* The GNU C library defines this for functions which it implements
11419 to always fail with ENOSYS. Some functions are actually named
11420 something starting with __ and the normal name is an alias. */
ca81d7a0 11421#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11422choke me
572a3cc2
JD
11423#endif
11424
11425int
11426main ()
11427{
ca81d7a0 11428return $ac_func ();
572a3cc2
JD
11429 ;
11430 return 0;
11431}
11432_ACEOF
11433rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11434if { (ac_try="$ac_link"
11435case "(($ac_try" in
11436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11437 *) ac_try_echo=$ac_try;;
11438esac
11439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11440 (eval "$ac_link") 2>conftest.er1
572a3cc2 11441 ac_status=$?
edfaf76d
LK
11442 grep -v '^ *+' conftest.er1 >conftest.err
11443 rm -f conftest.er1
11444 cat conftest.err >&5
572a3cc2 11445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11446 (exit $ac_status); } && {
11447 test -z "$ac_c_werror_flag" ||
11448 test ! -s conftest.err
11449 } && test -s conftest$ac_exeext &&
11450 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11451 eval "$as_ac_var=yes"
11452else
11453 echo "$as_me: failed program was:" >&5
11454sed 's/^/| /' conftest.$ac_ext >&5
11455
ca81d7a0 11456 eval "$as_ac_var=no"
572a3cc2 11457fi
ca81d7a0 11458
f053c89f 11459rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11460 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11461fi
ca81d7a0
JD
11462ac_res=`eval echo '${'$as_ac_var'}'`
11463 { echo "$as_me:$LINENO: result: $ac_res" >&5
11464echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11465if test `eval echo '${'$as_ac_var'}'` = yes; then
11466 cat >>confdefs.h <<_ACEOF
11467#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11468_ACEOF
11469 HAVE_GTK_FILE_SELECTION=yes
11470fi
11471done
11472
11473
11474 HAVE_GTK_FILE_CHOOSER=no
11475
11476for ac_func in gtk_file_chooser_dialog_new
11477do
11478as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11479{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11480echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11481if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11482 echo $ECHO_N "(cached) $ECHO_C" >&6
11483else
11484 cat >conftest.$ac_ext <<_ACEOF
11485/* confdefs.h. */
11486_ACEOF
11487cat confdefs.h >>conftest.$ac_ext
11488cat >>conftest.$ac_ext <<_ACEOF
11489/* end confdefs.h. */
edfaf76d
LK
11490/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11491 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11492#define $ac_func innocuous_$ac_func
11493
572a3cc2
JD
11494/* System header to define __stub macros and hopefully few prototypes,
11495 which can conflict with char $ac_func (); below.
11496 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11497 <limits.h> exists even on freestanding compilers. */
edfaf76d 11498
572a3cc2
JD
11499#ifdef __STDC__
11500# include <limits.h>
11501#else
11502# include <assert.h>
11503#endif
edfaf76d
LK
11504
11505#undef $ac_func
11506
ca81d7a0
JD
11507/* Override any GCC internal prototype to avoid an error.
11508 Use char because int might match the return type of a GCC
11509 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11510#ifdef __cplusplus
11511extern "C"
572a3cc2 11512#endif
572a3cc2
JD
11513char $ac_func ();
11514/* The GNU C library defines this for functions which it implements
11515 to always fail with ENOSYS. Some functions are actually named
11516 something starting with __ and the normal name is an alias. */
ca81d7a0 11517#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11518choke me
572a3cc2
JD
11519#endif
11520
11521int
11522main ()
11523{
ca81d7a0 11524return $ac_func ();
572a3cc2
JD
11525 ;
11526 return 0;
11527}
11528_ACEOF
11529rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11530if { (ac_try="$ac_link"
11531case "(($ac_try" in
11532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11533 *) ac_try_echo=$ac_try;;
11534esac
11535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11536 (eval "$ac_link") 2>conftest.er1
572a3cc2 11537 ac_status=$?
edfaf76d
LK
11538 grep -v '^ *+' conftest.er1 >conftest.err
11539 rm -f conftest.er1
11540 cat conftest.err >&5
572a3cc2 11541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11542 (exit $ac_status); } && {
11543 test -z "$ac_c_werror_flag" ||
11544 test ! -s conftest.err
11545 } && test -s conftest$ac_exeext &&
11546 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11547 eval "$as_ac_var=yes"
11548else
11549 echo "$as_me: failed program was:" >&5
11550sed 's/^/| /' conftest.$ac_ext >&5
11551
ca81d7a0 11552 eval "$as_ac_var=no"
572a3cc2 11553fi
ca81d7a0 11554
f053c89f 11555rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11556 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11557fi
ca81d7a0
JD
11558ac_res=`eval echo '${'$as_ac_var'}'`
11559 { echo "$as_me:$LINENO: result: $ac_res" >&5
11560echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11561if test `eval echo '${'$as_ac_var'}'` = yes; then
11562 cat >>confdefs.h <<_ACEOF
11563#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11564_ACEOF
11565 HAVE_GTK_FILE_CHOOSER=yes
11566fi
11567done
11568
11569
11570 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11571 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11572
11573cat >>confdefs.h <<\_ACEOF
11574#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
11575_ACEOF
11576
b8bdffbe
JD
11577 fi
11578
11579 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11580 HAVE_GTK_AND_PTHREAD=no
11581
11582for ac_header in pthread.h
11583do
11584as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
11585if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11586 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11587echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11588if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11589 echo $ECHO_N "(cached) $ECHO_C" >&6
11590fi
ca81d7a0
JD
11591ac_res=`eval echo '${'$as_ac_Header'}'`
11592 { echo "$as_me:$LINENO: result: $ac_res" >&5
11593echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11594else
11595 # Is the header compilable?
ca81d7a0
JD
11596{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11597echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
b8bdffbe
JD
11598cat >conftest.$ac_ext <<_ACEOF
11599/* confdefs.h. */
11600_ACEOF
11601cat confdefs.h >>conftest.$ac_ext
11602cat >>conftest.$ac_ext <<_ACEOF
11603/* end confdefs.h. */
11604$ac_includes_default
11605#include <$ac_header>
11606_ACEOF
11607rm -f conftest.$ac_objext
ca81d7a0
JD
11608if { (ac_try="$ac_compile"
11609case "(($ac_try" in
11610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11611 *) ac_try_echo=$ac_try;;
11612esac
11613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11614 (eval "$ac_compile") 2>conftest.er1
b8bdffbe 11615 ac_status=$?
edfaf76d
LK
11616 grep -v '^ *+' conftest.er1 >conftest.err
11617 rm -f conftest.er1
11618 cat conftest.err >&5
b8bdffbe 11619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11620 (exit $ac_status); } && {
11621 test -z "$ac_c_werror_flag" ||
11622 test ! -s conftest.err
11623 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11624 ac_header_compiler=yes
11625else
11626 echo "$as_me: failed program was:" >&5
11627sed 's/^/| /' conftest.$ac_ext >&5
11628
ca81d7a0 11629 ac_header_compiler=no
b8bdffbe 11630fi
ca81d7a0
JD
11631
11632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11633{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11634echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11635
11636# Is the header present?
ca81d7a0
JD
11637{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11638echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11639cat >conftest.$ac_ext <<_ACEOF
11640/* confdefs.h. */
11641_ACEOF
11642cat confdefs.h >>conftest.$ac_ext
11643cat >>conftest.$ac_ext <<_ACEOF
11644/* end confdefs.h. */
11645#include <$ac_header>
11646_ACEOF
ca81d7a0
JD
11647if { (ac_try="$ac_cpp conftest.$ac_ext"
11648case "(($ac_try" in
11649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11650 *) ac_try_echo=$ac_try;;
11651esac
11652eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11653 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11654 ac_status=$?
11655 grep -v '^ *+' conftest.er1 >conftest.err
11656 rm -f conftest.er1
11657 cat conftest.err >&5
11658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11659 (exit $ac_status); } >/dev/null && {
11660 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11661 test ! -s conftest.err
11662 }; then
b8bdffbe
JD
11663 ac_header_preproc=yes
11664else
11665 echo "$as_me: failed program was:" >&5
11666sed 's/^/| /' conftest.$ac_ext >&5
11667
11668 ac_header_preproc=no
11669fi
ca81d7a0 11670
b8bdffbe 11671rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
11672{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11673echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11674
11675# So? What about this header?
edfaf76d
LK
11676case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11677 yes:no: )
b8bdffbe
JD
11678 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11679echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11680 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11681echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11682 ac_header_preproc=yes
b8bdffbe 11683 ;;
edfaf76d 11684 no:yes:* )
b8bdffbe
JD
11685 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11686echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11687 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11688echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11689 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11690echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11691 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11692echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11693 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11694echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11695 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11696echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11697
b8bdffbe
JD
11698 ;;
11699esac
ca81d7a0
JD
11700{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11701echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11702if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11703 echo $ECHO_N "(cached) $ECHO_C" >&6
11704else
edfaf76d 11705 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11706fi
ca81d7a0
JD
11707ac_res=`eval echo '${'$as_ac_Header'}'`
11708 { echo "$as_me:$LINENO: result: $ac_res" >&5
11709echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11710
11711fi
11712if test `eval echo '${'$as_ac_Header'}'` = yes; then
11713 cat >>confdefs.h <<_ACEOF
11714#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11715_ACEOF
11716
11717fi
11718
11719done
11720
11721 if test "$ac_cv_header_pthread_h"; then
ca81d7a0
JD
11722 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11723echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11724if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11725 echo $ECHO_N "(cached) $ECHO_C" >&6
11726else
11727 ac_check_lib_save_LIBS=$LIBS
11728LIBS="-lpthread $LIBS"
11729cat >conftest.$ac_ext <<_ACEOF
11730/* confdefs.h. */
11731_ACEOF
11732cat confdefs.h >>conftest.$ac_ext
11733cat >>conftest.$ac_ext <<_ACEOF
11734/* end confdefs.h. */
11735
ca81d7a0
JD
11736/* Override any GCC internal prototype to avoid an error.
11737 Use char because int might match the return type of a GCC
11738 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11739#ifdef __cplusplus
11740extern "C"
11741#endif
b8bdffbe
JD
11742char pthread_self ();
11743int
11744main ()
11745{
ca81d7a0 11746return pthread_self ();
b8bdffbe
JD
11747 ;
11748 return 0;
11749}
11750_ACEOF
11751rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11752if { (ac_try="$ac_link"
11753case "(($ac_try" in
11754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11755 *) ac_try_echo=$ac_try;;
11756esac
11757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11758 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11759 ac_status=$?
edfaf76d
LK
11760 grep -v '^ *+' conftest.er1 >conftest.err
11761 rm -f conftest.er1
11762 cat conftest.err >&5
b8bdffbe 11763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11764 (exit $ac_status); } && {
11765 test -z "$ac_c_werror_flag" ||
11766 test ! -s conftest.err
11767 } && test -s conftest$ac_exeext &&
11768 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11769 ac_cv_lib_pthread_pthread_self=yes
11770else
11771 echo "$as_me: failed program was:" >&5
11772sed 's/^/| /' conftest.$ac_ext >&5
11773
ca81d7a0 11774 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11775fi
ca81d7a0 11776
f053c89f 11777rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11778 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11779LIBS=$ac_check_lib_save_LIBS
11780fi
ca81d7a0
JD
11781{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11782echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11783if test $ac_cv_lib_pthread_pthread_self = yes; then
11784 HAVE_GTK_AND_PTHREAD=yes
11785fi
11786
11787 fi
11788 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
846d1b3e
JD
11789 case "${canonical}" in
11790 *-hpux*) ;;
11791 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
11792 esac
b8bdffbe
JD
11793
11794cat >>confdefs.h <<\_ACEOF
11795#define HAVE_GTK_AND_PTHREAD 1
11796_ACEOF
11797
11798 fi
57669b57 11799 fi
488dd4c4
JD
11800fi
11801
131e4133
MA
11802HAVE_DBUS=no
11803if test "${with_dbus}" = "yes"; then
cffe4909
MH
11804
11805 succeeded=no
11806
00b9c927 11807 # Extract the first word of "pkg-config", so it can be a program name with args.
cffe4909
MH
11808set dummy pkg-config; ac_word=$2
11809{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11810echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11811if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
131e4133
MA
11812 echo $ECHO_N "(cached) $ECHO_C" >&6
11813else
cffe4909
MH
11814 case $PKG_CONFIG in
11815 [\\/]* | ?:[\\/]*)
11816 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11817 ;;
11818 *)
11819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11820for as_dir in $PATH
11821do
11822 IFS=$as_save_IFS
11823 test -z "$as_dir" && as_dir=.
11824 for ac_exec_ext in '' $ac_executable_extensions; do
11825 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11826 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11827 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11828 break 2
11829 fi
11830done
11831done
11832IFS=$as_save_IFS
131e4133 11833
cffe4909
MH
11834 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11835 ;;
131e4133 11836esac
cffe4909
MH
11837fi
11838PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11839if test -n "$PKG_CONFIG"; then
11840 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11841echo "${ECHO_T}$PKG_CONFIG" >&6; }
131e4133 11842else
cffe4909
MH
11843 { echo "$as_me:$LINENO: result: no" >&5
11844echo "${ECHO_T}no" >&6; }
131e4133
MA
11845fi
11846
cffe4909 11847
cffe4909
MH
11848
11849 if test "$PKG_CONFIG" = "no" ; then
11850 HAVE_DBUS=no
11851 else
11852 PKG_CONFIG_MIN_VERSION=0.9.0
11853 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11854 { echo "$as_me:$LINENO: checking for dbus-1 >= 1.0" >&5
11855echo $ECHO_N "checking for dbus-1 >= 1.0... $ECHO_C" >&6; }
11856
11857 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
11858 { echo "$as_me:$LINENO: result: yes" >&5
11859echo "${ECHO_T}yes" >&6; }
11860 succeeded=yes
11861
11862 { echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5
11863echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6; }
11864 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11865 { echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5
11866echo "${ECHO_T}$DBUS_CFLAGS" >&6; }
11867
11868 { echo "$as_me:$LINENO: checking DBUS_LIBS" >&5
11869echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6; }
11870 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11871 { echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5
11872echo "${ECHO_T}$DBUS_LIBS" >&6; }
11873 else
11874 { echo "$as_me:$LINENO: result: no" >&5
11875echo "${ECHO_T}no" >&6; }
11876 DBUS_CFLAGS=""
11877 DBUS_LIBS=""
11878 ## If we have a custom action on failure, don't print errors, but
11879 ## do set a variable so people can do so.
11880 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
11881
11882 fi
11883
11884
11885
11886 else
11887 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11888 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11889 fi
11890 fi
11891
11892 if test $succeeded = yes; then
11893 HAVE_DBUS=yes
11894 else
11895 HAVE_DBUS=no
11896 fi
131e4133
MA
11897
11898 if test "$HAVE_DBUS" = yes; then
11899
11900cat >>confdefs.h <<\_ACEOF
11901#define HAVE_DBUS 1
11902_ACEOF
11903
131e4133
MA
11904 fi
11905fi
11906
b3615392 11907HAVE_XAW3D=no
991a7602 11908if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
f23d76bd
MB
11909 if test "$with_xaw3d" != no; then
11910 { echo "$as_me:$LINENO: checking for xaw3d" >&5
b3615392 11911echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
f23d76bd 11912 if test "${emacs_cv_xaw3d+set}" = set; then
98418dba
CW
11913 echo $ECHO_N "(cached) $ECHO_C" >&6
11914else
11915 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11916/* confdefs.h. */
11917_ACEOF
11918cat confdefs.h >>conftest.$ac_ext
11919cat >>conftest.$ac_ext <<_ACEOF
11920/* end confdefs.h. */
98418dba
CW
11921
11922#include <X11/Intrinsic.h>
b3615392 11923#include <X11/Xaw3d/Simple.h>
98418dba
CW
11924int
11925main ()
11926{
11927
11928 ;
11929 return 0;
11930}
11931_ACEOF
11932rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11933if { (ac_try="$ac_link"
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
11939 (eval "$ac_link") 2>conftest.er1
98418dba 11940 ac_status=$?
edfaf76d
LK
11941 grep -v '^ *+' conftest.er1 >conftest.err
11942 rm -f conftest.er1
11943 cat conftest.err >&5
c0d27fcc 11944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11945 (exit $ac_status); } && {
11946 test -z "$ac_c_werror_flag" ||
11947 test ! -s conftest.err
11948 } && test -s conftest$ac_exeext &&
11949 $as_test_x conftest$ac_exeext; then
b3615392 11950 emacs_cv_xaw3d=yes
98418dba
CW
11951else
11952 echo "$as_me: failed program was:" >&5
19650fd6
AS
11953sed 's/^/| /' conftest.$ac_ext >&5
11954
b3615392 11955 emacs_cv_xaw3d=no
98418dba 11956fi
ca81d7a0 11957
f053c89f 11958rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11959 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11960fi
11961
9d89ffd0 11962 else
f23d76bd 11963 emacs_cv_xaw3d=no
9d89ffd0 11964 fi
f23d76bd
MB
11965 if test $emacs_cv_xaw3d = yes; then
11966 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 11967echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11968 USE_X_TOOLKIT=LUCID
11969 HAVE_XAW3D=yes
9d89ffd0 11970
b3615392
MB
11971cat >>confdefs.h <<\_ACEOF
11972#define HAVE_XAW3D 1
11973_ACEOF
9d89ffd0 11974
f23d76bd
MB
11975 else
11976 { echo "$as_me:$LINENO: result: no" >&5
9d89ffd0 11977echo "${ECHO_T}no" >&6; }
f23d76bd 11978 { echo "$as_me:$LINENO: checking for libXaw" >&5
b3615392 11979echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
f23d76bd 11980 if test "${emacs_cv_xaw+set}" = set; then
9d89ffd0 11981 echo $ECHO_N "(cached) $ECHO_C" >&6
9d89ffd0 11982else
b3615392 11983 cat >conftest.$ac_ext <<_ACEOF
9d89ffd0
JD
11984/* confdefs.h. */
11985_ACEOF
11986cat confdefs.h >>conftest.$ac_ext
11987cat >>conftest.$ac_ext <<_ACEOF
11988/* end confdefs.h. */
b3615392
MB
11989
11990#include <X11/Intrinsic.h>
11991#include <X11/Xaw/Simple.h>
11992int
11993main ()
11994{
11995
11996 ;
11997 return 0;
11998}
9d89ffd0 11999_ACEOF
b3615392
MB
12000rm -f conftest.$ac_objext conftest$ac_exeext
12001if { (ac_try="$ac_link"
9d89ffd0
JD
12002case "(($ac_try" in
12003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12004 *) ac_try_echo=$ac_try;;
12005esac
12006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
b3615392 12007 (eval "$ac_link") 2>conftest.er1
9d89ffd0
JD
12008 ac_status=$?
12009 grep -v '^ *+' conftest.er1 >conftest.err
12010 rm -f conftest.er1
12011 cat conftest.err >&5
12012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12013 (exit $ac_status); } && {
12014 test -z "$ac_c_werror_flag" ||
12015 test ! -s conftest.err
b3615392
MB
12016 } && test -s conftest$ac_exeext &&
12017 $as_test_x conftest$ac_exeext; then
12018 emacs_cv_xaw=yes
9d89ffd0
JD
12019else
12020 echo "$as_me: failed program was:" >&5
12021sed 's/^/| /' conftest.$ac_ext >&5
12022
b3615392 12023 emacs_cv_xaw=no
9d89ffd0
JD
12024fi
12025
b3615392
MB
12026rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12027 conftest$ac_exeext conftest.$ac_ext
12028fi
9d89ffd0 12029
f23d76bd
MB
12030 if test $emacs_cv_xaw = yes; then
12031 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 12032echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
12033 USE_X_TOOLKIT=LUCID
12034 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
12035 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
991a7602
MB
12036echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
12037 { (exit 1); exit 1; }; }
f23d76bd
MB
12038 else
12039 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
b3615392 12040echo "${ECHO_T}no; do not use toolkit by default" >&6; }
f23d76bd 12041 USE_X_TOOLKIT=none
98418dba 12042 fi
98418dba
CW
12043 fi
12044fi
12045
12046X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12047
12048if test "${USE_X_TOOLKIT}" != "none"; then
ca81d7a0
JD
12049 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
12050echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
12051 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
12052 echo $ECHO_N "(cached) $ECHO_C" >&6
12053else
12054 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12055/* confdefs.h. */
12056_ACEOF
12057cat confdefs.h >>conftest.$ac_ext
12058cat >>conftest.$ac_ext <<_ACEOF
12059/* end confdefs.h. */
98418dba 12060#include <X11/Intrinsic.h>
98418dba
CW
12061int
12062main ()
12063{
12064#if XtSpecificationRelease < 6
12065fail;
12066#endif
12067
12068 ;
12069 return 0;
12070}
12071_ACEOF
12072rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12073if { (ac_try="$ac_link"
12074case "(($ac_try" in
12075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12076 *) ac_try_echo=$ac_try;;
12077esac
12078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12079 (eval "$ac_link") 2>conftest.er1
98418dba 12080 ac_status=$?
edfaf76d
LK
12081 grep -v '^ *+' conftest.er1 >conftest.err
12082 rm -f conftest.er1
12083 cat conftest.err >&5
c0d27fcc 12084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12085 (exit $ac_status); } && {
12086 test -z "$ac_c_werror_flag" ||
12087 test ! -s conftest.err
12088 } && test -s conftest$ac_exeext &&
12089 $as_test_x conftest$ac_exeext; then
98418dba
CW
12090 emacs_cv_x11_toolkit_version_6=yes
12091else
12092 echo "$as_me: failed program was:" >&5
19650fd6
AS
12093sed 's/^/| /' conftest.$ac_ext >&5
12094
ca81d7a0 12095 emacs_cv_x11_toolkit_version_6=no
98418dba 12096fi
ca81d7a0 12097
f053c89f 12098rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12099 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12100fi
12101
12102 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12103 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ca81d7a0
JD
12104 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12105echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12106
c0d27fcc 12107cat >>confdefs.h <<\_ACEOF
98418dba 12108#define HAVE_X11XTR6 1
c0d27fcc 12109_ACEOF
98418dba
CW
12110
12111 else
ca81d7a0
JD
12112 { echo "$as_me:$LINENO: result: before 6" >&5
12113echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12114 fi
12115
12116 OLDLIBS="$LIBS"
12117 if test x$HAVE_X11XTR6 = xyes; then
12118 LIBS="-lXt -lSM -lICE $LIBS"
12119 else
12120 LIBS="-lXt $LIBS"
12121 fi
12122
ca81d7a0
JD
12123{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12124echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
12125if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
12126 echo $ECHO_N "(cached) $ECHO_C" >&6
12127else
12128 ac_check_lib_save_LIBS=$LIBS
12129LIBS="-lXmu $LIBS"
12130cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12131/* confdefs.h. */
12132_ACEOF
12133cat confdefs.h >>conftest.$ac_ext
12134cat >>conftest.$ac_ext <<_ACEOF
12135/* end confdefs.h. */
98418dba 12136
ca81d7a0
JD
12137/* Override any GCC internal prototype to avoid an error.
12138 Use char because int might match the return type of a GCC
12139 builtin and then its argument prototype would still apply. */
98418dba
CW
12140#ifdef __cplusplus
12141extern "C"
12142#endif
98418dba 12143char XmuConvertStandardSelection ();
98418dba
CW
12144int
12145main ()
12146{
ca81d7a0 12147return XmuConvertStandardSelection ();
98418dba
CW
12148 ;
12149 return 0;
12150}
12151_ACEOF
12152rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12153if { (ac_try="$ac_link"
12154case "(($ac_try" in
12155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12156 *) ac_try_echo=$ac_try;;
12157esac
12158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12159 (eval "$ac_link") 2>conftest.er1
98418dba 12160 ac_status=$?
edfaf76d
LK
12161 grep -v '^ *+' conftest.er1 >conftest.err
12162 rm -f conftest.er1
12163 cat conftest.err >&5
c0d27fcc 12164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12165 (exit $ac_status); } && {
12166 test -z "$ac_c_werror_flag" ||
12167 test ! -s conftest.err
12168 } && test -s conftest$ac_exeext &&
12169 $as_test_x conftest$ac_exeext; then
98418dba
CW
12170 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12171else
12172 echo "$as_me: failed program was:" >&5
19650fd6
AS
12173sed 's/^/| /' conftest.$ac_ext >&5
12174
ca81d7a0 12175 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12176fi
ca81d7a0 12177
f053c89f 12178rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12179 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12180LIBS=$ac_check_lib_save_LIBS
12181fi
ca81d7a0
JD
12182{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12183echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 12184if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12185 cat >>confdefs.h <<_ACEOF
98418dba 12186#define HAVE_LIBXMU 1
c0d27fcc 12187_ACEOF
98418dba
CW
12188
12189 LIBS="-lXmu $LIBS"
12190
12191fi
12192
12193 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12194fi
12195
12196# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12197if test "${HAVE_X11}" = "yes"; then
12198 if test "${USE_X_TOOLKIT}" != "none"; then
12199
ca81d7a0
JD
12200{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12201echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12202if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12203 echo $ECHO_N "(cached) $ECHO_C" >&6
12204else
12205 ac_check_lib_save_LIBS=$LIBS
12206LIBS="-lXext $LIBS"
12207cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12208/* confdefs.h. */
12209_ACEOF
12210cat confdefs.h >>conftest.$ac_ext
12211cat >>conftest.$ac_ext <<_ACEOF
12212/* end confdefs.h. */
98418dba 12213
ca81d7a0
JD
12214/* Override any GCC internal prototype to avoid an error.
12215 Use char because int might match the return type of a GCC
12216 builtin and then its argument prototype would still apply. */
98418dba
CW
12217#ifdef __cplusplus
12218extern "C"
12219#endif
98418dba 12220char XShapeQueryExtension ();
98418dba
CW
12221int
12222main ()
12223{
ca81d7a0 12224return XShapeQueryExtension ();
98418dba
CW
12225 ;
12226 return 0;
12227}
12228_ACEOF
12229rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12230if { (ac_try="$ac_link"
12231case "(($ac_try" in
12232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12233 *) ac_try_echo=$ac_try;;
12234esac
12235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12236 (eval "$ac_link") 2>conftest.er1
98418dba 12237 ac_status=$?
edfaf76d
LK
12238 grep -v '^ *+' conftest.er1 >conftest.err
12239 rm -f conftest.er1
12240 cat conftest.err >&5
c0d27fcc 12241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12242 (exit $ac_status); } && {
12243 test -z "$ac_c_werror_flag" ||
12244 test ! -s conftest.err
12245 } && test -s conftest$ac_exeext &&
12246 $as_test_x conftest$ac_exeext; then
98418dba
CW
12247 ac_cv_lib_Xext_XShapeQueryExtension=yes
12248else
12249 echo "$as_me: failed program was:" >&5
19650fd6
AS
12250sed 's/^/| /' conftest.$ac_ext >&5
12251
ca81d7a0 12252 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12253fi
ca81d7a0 12254
f053c89f 12255rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12256 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12257LIBS=$ac_check_lib_save_LIBS
12258fi
ca81d7a0
JD
12259{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12260echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12261if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12262 cat >>confdefs.h <<_ACEOF
98418dba 12263#define HAVE_LIBXEXT 1
c0d27fcc 12264_ACEOF
98418dba
CW
12265
12266 LIBS="-lXext $LIBS"
12267
12268fi
12269
12270 fi
12271fi
12272
12273if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ca81d7a0
JD
12274 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12275echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12276if test "${emacs_cv_motif_version_2_1+set}" = set; then
12277 echo $ECHO_N "(cached) $ECHO_C" >&6
12278else
12279 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12280/* confdefs.h. */
12281_ACEOF
12282cat confdefs.h >>conftest.$ac_ext
12283cat >>conftest.$ac_ext <<_ACEOF
12284/* end confdefs.h. */
98418dba 12285#include <Xm/Xm.h>
98418dba
CW
12286int
12287main ()
12288{
12289#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12290int x = 5;
12291#else
12292Motif version prior to 2.1.
12293#endif
12294 ;
12295 return 0;
12296}
12297_ACEOF
12298rm -f conftest.$ac_objext
ca81d7a0
JD
12299if { (ac_try="$ac_compile"
12300case "(($ac_try" in
12301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12302 *) ac_try_echo=$ac_try;;
12303esac
12304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12305 (eval "$ac_compile") 2>conftest.er1
98418dba 12306 ac_status=$?
edfaf76d
LK
12307 grep -v '^ *+' conftest.er1 >conftest.err
12308 rm -f conftest.er1
12309 cat conftest.err >&5
c0d27fcc 12310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12311 (exit $ac_status); } && {
12312 test -z "$ac_c_werror_flag" ||
12313 test ! -s conftest.err
12314 } && test -s conftest.$ac_objext; then
98418dba
CW
12315 emacs_cv_motif_version_2_1=yes
12316else
12317 echo "$as_me: failed program was:" >&5
19650fd6
AS
12318sed 's/^/| /' conftest.$ac_ext >&5
12319
ca81d7a0 12320 emacs_cv_motif_version_2_1=no
98418dba 12321fi
ca81d7a0
JD
12322
12323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12324fi
ca81d7a0
JD
12325{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12326echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12327 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12328 if test $emacs_cv_motif_version_2_1 = yes; then
12329 HAVE_LIBXP=no
b936fae4 12330
c0d27fcc 12331cat >>confdefs.h <<\_ACEOF
98418dba 12332#define HAVE_MOTIF_2_1 1
c0d27fcc 12333_ACEOF
98418dba 12334
ca81d7a0
JD
12335 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12336echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12337if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12338 echo $ECHO_N "(cached) $ECHO_C" >&6
12339else
12340 ac_check_lib_save_LIBS=$LIBS
12341LIBS="-lXp $LIBS"
12342cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12343/* confdefs.h. */
12344_ACEOF
12345cat confdefs.h >>conftest.$ac_ext
12346cat >>conftest.$ac_ext <<_ACEOF
12347/* end confdefs.h. */
98418dba 12348
ca81d7a0
JD
12349/* Override any GCC internal prototype to avoid an error.
12350 Use char because int might match the return type of a GCC
12351 builtin and then its argument prototype would still apply. */
98418dba
CW
12352#ifdef __cplusplus
12353extern "C"
12354#endif
98418dba 12355char XpCreateContext ();
98418dba
CW
12356int
12357main ()
12358{
ca81d7a0 12359return XpCreateContext ();
98418dba
CW
12360 ;
12361 return 0;
12362}
12363_ACEOF
12364rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12365if { (ac_try="$ac_link"
12366case "(($ac_try" in
12367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12368 *) ac_try_echo=$ac_try;;
12369esac
12370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12371 (eval "$ac_link") 2>conftest.er1
98418dba 12372 ac_status=$?
edfaf76d
LK
12373 grep -v '^ *+' conftest.er1 >conftest.err
12374 rm -f conftest.er1
12375 cat conftest.err >&5
c0d27fcc 12376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12377 (exit $ac_status); } && {
12378 test -z "$ac_c_werror_flag" ||
12379 test ! -s conftest.err
12380 } && test -s conftest$ac_exeext &&
12381 $as_test_x conftest$ac_exeext; then
98418dba
CW
12382 ac_cv_lib_Xp_XpCreateContext=yes
12383else
12384 echo "$as_me: failed program was:" >&5
19650fd6
AS
12385sed 's/^/| /' conftest.$ac_ext >&5
12386
ca81d7a0 12387 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12388fi
ca81d7a0 12389
f053c89f 12390rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12391 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12392LIBS=$ac_check_lib_save_LIBS
12393fi
ca81d7a0
JD
12394{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12395echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12396if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12397 HAVE_LIBXP=yes
12398fi
503d2be0 12399
98418dba 12400 if test ${HAVE_LIBXP} = yes; then
b936fae4 12401
c0d27fcc 12402cat >>confdefs.h <<\_ACEOF
98418dba 12403#define HAVE_LIBXP 1
c0d27fcc 12404_ACEOF
503d2be0 12405
98418dba 12406 fi
4693dbc9 12407 else
ca81d7a0
JD
12408 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12409echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12410if test "${emacs_cv_lesstif+set}" = set; then
12411 echo $ECHO_N "(cached) $ECHO_C" >&6
12412else
12413 # We put this in CFLAGS temporarily to precede other -I options
12414 # that might be in CFLAGS temporarily.
12415 # We put this in CPPFLAGS where it precedes the other -I options.
12416 OLD_CPPFLAGS=$CPPFLAGS
12417 OLD_CFLAGS=$CFLAGS
12418 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12419 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12420 cat >conftest.$ac_ext <<_ACEOF
12421/* confdefs.h. */
12422_ACEOF
12423cat confdefs.h >>conftest.$ac_ext
12424cat >>conftest.$ac_ext <<_ACEOF
12425/* end confdefs.h. */
12426#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12427int
12428main ()
12429{
12430int x = 5;
12431 ;
12432 return 0;
12433}
12434_ACEOF
12435rm -f conftest.$ac_objext
ca81d7a0
JD
12436if { (ac_try="$ac_compile"
12437case "(($ac_try" in
12438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12439 *) ac_try_echo=$ac_try;;
12440esac
12441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12442 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12443 ac_status=$?
edfaf76d
LK
12444 grep -v '^ *+' conftest.er1 >conftest.err
12445 rm -f conftest.er1
12446 cat conftest.err >&5
4693dbc9 12447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12448 (exit $ac_status); } && {
12449 test -z "$ac_c_werror_flag" ||
12450 test ! -s conftest.err
12451 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12452 emacs_cv_lesstif=yes
12453else
12454 echo "$as_me: failed program was:" >&5
12455sed 's/^/| /' conftest.$ac_ext >&5
12456
ca81d7a0 12457 emacs_cv_lesstif=no
4693dbc9 12458fi
ca81d7a0
JD
12459
12460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12461fi
ca81d7a0
JD
12462{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12463echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12464 if test $emacs_cv_lesstif = yes; then
12465 # Make sure this -I option remains in CPPFLAGS after it is set
12466 # back to REAL_CPPFLAGS.
12467 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12468 # have those other -I options anyway. Ultimately, having this
12469 # directory ultimately in CPPFLAGS will be enough.
12470 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12471 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12472 else
12473 CFLAGS=$OLD_CFLAGS
12474 CPPFLAGS=$OLD_CPPFLAGS
12475 fi
98418dba
CW
12476 fi
12477fi
12478
c0d27fcc
MR
12479
12480
98418dba
CW
12481USE_TOOLKIT_SCROLL_BARS=no
12482if test "${with_toolkit_scroll_bars}" != "no"; then
12483 if test "${USE_X_TOOLKIT}" != "none"; then
12484 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12485 cat >>confdefs.h <<\_ACEOF
98418dba 12486#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12487_ACEOF
98418dba
CW
12488
12489 HAVE_XAW3D=no
12490 USE_TOOLKIT_SCROLL_BARS=yes
12491 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12492 cat >>confdefs.h <<\_ACEOF
98418dba 12493#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12494_ACEOF
98418dba
CW
12495
12496 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12497 fi
488dd4c4
JD
12498 elif test "${HAVE_GTK}" = "yes"; then
12499 cat >>confdefs.h <<\_ACEOF
12500#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
12501_ACEOF
12502
12503 USE_TOOLKIT_SCROLL_BARS=yes
12504 elif test "${HAVE_CARBON}" = "yes"; then
12505 cat >>confdefs.h <<\_ACEOF
12506#define USE_TOOLKIT_SCROLL_BARS 1
edfda783
AR
12507_ACEOF
12508
12509 USE_TOOLKIT_SCROLL_BARS=yes
12510 elif test "${HAVE_NS}" = "yes"; then
12511 cat >>confdefs.h <<\_ACEOF
12512#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12513_ACEOF
12514
12515 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12516 fi
12517fi
12518
abd39b57 12519cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12520/* confdefs.h. */
12521_ACEOF
12522cat confdefs.h >>conftest.$ac_ext
12523cat >>conftest.$ac_ext <<_ACEOF
12524/* end confdefs.h. */
12525
12526 #include <X11/Xlib.h>
12527 #include <X11/Xresource.h>
12528int
12529main ()
12530{
12531XIMProc callback;
12532 ;
12533 return 0;
12534}
12535_ACEOF
12536rm -f conftest.$ac_objext
ca81d7a0
JD
12537if { (ac_try="$ac_compile"
12538case "(($ac_try" in
12539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12540 *) ac_try_echo=$ac_try;;
12541esac
12542eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12543 (eval "$ac_compile") 2>conftest.er1
abd39b57 12544 ac_status=$?
edfaf76d
LK
12545 grep -v '^ *+' conftest.er1 >conftest.err
12546 rm -f conftest.er1
12547 cat conftest.err >&5
abd39b57 12548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12549 (exit $ac_status); } && {
12550 test -z "$ac_c_werror_flag" ||
12551 test ! -s conftest.err
12552 } && test -s conftest.$ac_objext; then
abd39b57
AC
12553 HAVE_XIM=yes
12554
12555cat >>confdefs.h <<\_ACEOF
12556#define HAVE_XIM 1
12557_ACEOF
12558
12559else
12560 echo "$as_me: failed program was:" >&5
12561sed 's/^/| /' conftest.$ac_ext >&5
12562
ca81d7a0 12563 HAVE_XIM=no
abd39b57 12564fi
ca81d7a0
JD
12565
12566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12567
c0d27fcc 12568
98418dba 12569if test "${with_xim}" != "no"; then
b936fae4 12570
c0d27fcc 12571cat >>confdefs.h <<\_ACEOF
98418dba 12572#define USE_XIM 1
c0d27fcc 12573_ACEOF
98418dba 12574
793fa0d7 12575fi
abd39b57
AC
12576
12577
12578if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12579 late_CFLAGS=$CFLAGS
12580 if test "$GCC" = yes; then
12581 CFLAGS="$CFLAGS --pedantic-errors"
12582 fi
cffcede7 12583 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12584/* confdefs.h. */
12585_ACEOF
12586cat confdefs.h >>conftest.$ac_ext
12587cat >>conftest.$ac_ext <<_ACEOF
12588/* end confdefs.h. */
cffcede7
JD
12589
12590#include <X11/Xlib.h>
12591#include <X11/Xresource.h>
12592int
12593main ()
12594{
12595Display *display;
12596XrmDatabase db;
12597char *res_name;
12598char *res_class;
12599XIMProc callback;
12600XPointer *client_data;
849d80cf
DL
12601#ifndef __GNUC__
12602/* If we're not using GCC, it's probably not XFree86, and this is
12603 probably right, but we can't use something like --pedantic-errors. */
12604extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12605 char*, XIMProc, XPointer*);
12606#endif
cffcede7
JD
12607(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12608 client_data);
12609 ;
12610 return 0;
12611}
12612_ACEOF
12613rm -f conftest.$ac_objext
ca81d7a0
JD
12614if { (ac_try="$ac_compile"
12615case "(($ac_try" in
12616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12617 *) ac_try_echo=$ac_try;;
12618esac
12619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12620 (eval "$ac_compile") 2>conftest.er1
cffcede7 12621 ac_status=$?
edfaf76d
LK
12622 grep -v '^ *+' conftest.er1 >conftest.err
12623 rm -f conftest.er1
12624 cat conftest.err >&5
cffcede7 12625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12626 (exit $ac_status); } && {
12627 test -z "$ac_c_werror_flag" ||
12628 test ! -s conftest.err
12629 } && test -s conftest.$ac_objext; then
cffcede7
JD
12630 emacs_cv_arg6_star=yes
12631else
12632 echo "$as_me: failed program was:" >&5
19650fd6
AS
12633sed 's/^/| /' conftest.$ac_ext >&5
12634
ca81d7a0 12635
cffcede7 12636fi
ca81d7a0
JD
12637
12638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12639
12640 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12641 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12642#define XRegisterIMInstantiateCallback_arg6 XPointer*
12643_ACEOF
12644
12645 else
f57bd967 12646 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12647#define XRegisterIMInstantiateCallback_arg6 XPointer
12648_ACEOF
12649
12650 fi
849d80cf 12651 CFLAGS=$late_CFLAGS
45a4b03e
KH
12652fi
12653
77dfeef5 12654### Start of font-backend section.
45a4b03e 12655
b8bdd8c9
KH
12656## Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'.
12657HAVE_XFT=maybe
12658if test "x${with_freetype}" = "xno"; then
12659 with_xft="no";
12660fi
12661if test "x${with_xft}" != "xno"; then
45a4b03e 12662
45a4b03e
KH
12663
12664 succeeded=no
12665
d235ca2f 12666 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12667set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12668{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12669echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12670if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12671 echo $ECHO_N "(cached) $ECHO_C" >&6
12672else
12673 case $PKG_CONFIG in
12674 [\\/]* | ?:[\\/]*)
12675 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12676 ;;
12677 *)
12678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12679for as_dir in $PATH
12680do
12681 IFS=$as_save_IFS
12682 test -z "$as_dir" && as_dir=.
12683 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12684 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12685 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12686 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12687 break 2
12688 fi
12689done
12690done
c24fa7dc 12691IFS=$as_save_IFS
45a4b03e
KH
12692
12693 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12694 ;;
12695esac
12696fi
12697PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12698if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
12699 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12700echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12701else
c24fa7dc
MB
12702 { echo "$as_me:$LINENO: result: no" >&5
12703echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12704fi
12705
c24fa7dc 12706
45a4b03e
KH
12707
12708 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12709 HAVE_XFT=no
45a4b03e
KH
12710 else
12711 PKG_CONFIG_MIN_VERSION=0.9.0
12712 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
12713 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
12714echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
45a4b03e 12715
c24fa7dc
MB
12716 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
12717 { echo "$as_me:$LINENO: result: yes" >&5
12718echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12719 succeeded=yes
12720
c24fa7dc
MB
12721 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
12722echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
18c36727 12723 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12724 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
12725echo "${ECHO_T}$XFT_CFLAGS" >&6; }
45a4b03e 12726
c24fa7dc
MB
12727 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
12728echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
18c36727 12729 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12730 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
12731echo "${ECHO_T}$XFT_LIBS" >&6; }
45a4b03e 12732 else
c24fa7dc
MB
12733 { echo "$as_me:$LINENO: result: no" >&5
12734echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12735 XFT_CFLAGS=""
12736 XFT_LIBS=""
12737 ## If we have a custom action on failure, don't print errors, but
12738 ## do set a variable so people can do so.
12739 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12740
12741 fi
12742
12743
12744
12745 else
12746 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12747 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12748 fi
12749 fi
12750
12751 if test $succeeded = yes; then
12752 :
12753 else
12754 HAVE_XFT=no
12755 fi
12756
b8bdd8c9
KH
12757 if test "$HAVE_XFT" != no; then
12758 OLD_CPPFLAGS="$CPPFLAGS"
12759 OLD_CFLAGS="$CFLAGS"
12760 OLD_LIBS="$LIBS"
12761 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12762 CFLAGS="$CFLAGS $XFT_CFLAGS"
12763 LIBS="$XFT_LIBS $LIBS"
12764 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
c24fa7dc
MB
12765 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12766echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12767if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12768 echo $ECHO_N "(cached) $ECHO_C" >&6
12769fi
c24fa7dc
MB
12770{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12771echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12772else
12773 # Is the header compilable?
c24fa7dc
MB
12774{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
12775echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
45a4b03e
KH
12776cat >conftest.$ac_ext <<_ACEOF
12777/* confdefs.h. */
12778_ACEOF
12779cat confdefs.h >>conftest.$ac_ext
12780cat >>conftest.$ac_ext <<_ACEOF
12781/* end confdefs.h. */
12782$ac_includes_default
12783#include <X11/Xft/Xft.h>
12784_ACEOF
12785rm -f conftest.$ac_objext
c24fa7dc
MB
12786if { (ac_try="$ac_compile"
12787case "(($ac_try" in
12788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12789 *) ac_try_echo=$ac_try;;
12790esac
12791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12792 (eval "$ac_compile") 2>conftest.er1
45a4b03e
KH
12793 ac_status=$?
12794 grep -v '^ *+' conftest.er1 >conftest.err
12795 rm -f conftest.er1
12796 cat conftest.err >&5
12797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12798 (exit $ac_status); } && {
12799 test -z "$ac_c_werror_flag" ||
12800 test ! -s conftest.err
12801 } && test -s conftest.$ac_objext; then
45a4b03e
KH
12802 ac_header_compiler=yes
12803else
12804 echo "$as_me: failed program was:" >&5
12805sed 's/^/| /' conftest.$ac_ext >&5
12806
c24fa7dc 12807 ac_header_compiler=no
45a4b03e 12808fi
c24fa7dc
MB
12809
12810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12811{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12812echo "${ECHO_T}$ac_header_compiler" >&6; }
45a4b03e
KH
12813
12814# Is the header present?
c24fa7dc
MB
12815{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
12816echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
45a4b03e
KH
12817cat >conftest.$ac_ext <<_ACEOF
12818/* confdefs.h. */
12819_ACEOF
12820cat confdefs.h >>conftest.$ac_ext
12821cat >>conftest.$ac_ext <<_ACEOF
12822/* end confdefs.h. */
12823#include <X11/Xft/Xft.h>
12824_ACEOF
c24fa7dc
MB
12825if { (ac_try="$ac_cpp conftest.$ac_ext"
12826case "(($ac_try" in
12827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12828 *) ac_try_echo=$ac_try;;
12829esac
12830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12831 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
45a4b03e
KH
12832 ac_status=$?
12833 grep -v '^ *+' conftest.er1 >conftest.err
12834 rm -f conftest.er1
12835 cat conftest.err >&5
12836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12837 (exit $ac_status); } >/dev/null && {
12838 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12839 test ! -s conftest.err
12840 }; then
45a4b03e
KH
12841 ac_header_preproc=yes
12842else
12843 echo "$as_me: failed program was:" >&5
12844sed 's/^/| /' conftest.$ac_ext >&5
12845
12846 ac_header_preproc=no
12847fi
c24fa7dc 12848
45a4b03e 12849rm -f conftest.err conftest.$ac_ext
c24fa7dc
MB
12850{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12851echo "${ECHO_T}$ac_header_preproc" >&6; }
45a4b03e
KH
12852
12853# So? What about this header?
12854case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12855 yes:no: )
12856 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
12857echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12858 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
12859echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
12860 ac_header_preproc=yes
12861 ;;
12862 no:yes:* )
12863 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
12864echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
12865 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
12866echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
12867 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
12868echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
12869 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
12870echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
12871 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
12872echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
12873 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
12874echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
c24fa7dc 12875
45a4b03e
KH
12876 ;;
12877esac
c24fa7dc
MB
12878{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12879echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12880if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12881 echo $ECHO_N "(cached) $ECHO_C" >&6
12882else
12883 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
12884fi
c24fa7dc
MB
12885{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12886echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12887
12888fi
12889if test $ac_cv_header_X11_Xft_Xft_h = yes; then
c24fa7dc
MB
12890 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
12891echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
45a4b03e
KH
12892if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
12893 echo $ECHO_N "(cached) $ECHO_C" >&6
12894else
12895 ac_check_lib_save_LIBS=$LIBS
12896LIBS="-lXft $XFT_LIBS $LIBS"
12897cat >conftest.$ac_ext <<_ACEOF
12898/* confdefs.h. */
12899_ACEOF
12900cat confdefs.h >>conftest.$ac_ext
12901cat >>conftest.$ac_ext <<_ACEOF
12902/* end confdefs.h. */
12903
c24fa7dc
MB
12904/* Override any GCC internal prototype to avoid an error.
12905 Use char because int might match the return type of a GCC
12906 builtin and then its argument prototype would still apply. */
45a4b03e
KH
12907#ifdef __cplusplus
12908extern "C"
12909#endif
45a4b03e
KH
12910char XftFontOpen ();
12911int
12912main ()
12913{
c24fa7dc 12914return XftFontOpen ();
45a4b03e
KH
12915 ;
12916 return 0;
12917}
12918_ACEOF
12919rm -f conftest.$ac_objext conftest$ac_exeext
c24fa7dc
MB
12920if { (ac_try="$ac_link"
12921case "(($ac_try" in
12922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12923 *) ac_try_echo=$ac_try;;
12924esac
12925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12926 (eval "$ac_link") 2>conftest.er1
45a4b03e
KH
12927 ac_status=$?
12928 grep -v '^ *+' conftest.er1 >conftest.err
12929 rm -f conftest.er1
12930 cat conftest.err >&5
12931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12932 (exit $ac_status); } && {
12933 test -z "$ac_c_werror_flag" ||
12934 test ! -s conftest.err
12935 } && test -s conftest$ac_exeext &&
12936 $as_test_x conftest$ac_exeext; then
45a4b03e
KH
12937 ac_cv_lib_Xft_XftFontOpen=yes
12938else
12939 echo "$as_me: failed program was:" >&5
12940sed 's/^/| /' conftest.$ac_ext >&5
12941
c24fa7dc 12942 ac_cv_lib_Xft_XftFontOpen=no
45a4b03e 12943fi
c24fa7dc
MB
12944
12945rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
45a4b03e
KH
12946 conftest$ac_exeext conftest.$ac_ext
12947LIBS=$ac_check_lib_save_LIBS
12948fi
c24fa7dc
MB
12949{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12950echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
45a4b03e
KH
12951if test $ac_cv_lib_Xft_XftFontOpen = yes; then
12952 HAVE_XFT=yes
12953fi
12954
12955fi
12956
12957
12958
b8bdd8c9 12959 if test "${HAVE_XFT}" = "yes"; then
45a4b03e
KH
12960
12961cat >>confdefs.h <<\_ACEOF
12962#define HAVE_XFT 1
12963_ACEOF
12964
12965
b8bdd8c9
KH
12966 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12967 else
12968 CPPFLAGS="$OLD_CPPFLAGS"
12969 CFLAGS="$OLD_CFLAGS"
12970 LIBS="$OLD_LIBS"
12971 fi # "${HAVE_XFT}" = "yes"
12972 fi # "$HAVE_XFT" != no
12973fi # "x${with_xft}" != "xno"
2ee27f27 12974
b8bdd8c9
KH
12975if test "$HAVE_XFT" != "yes"; then
12976 HAVE_XFT=no
12977fi
45a4b03e 12978
b8bdd8c9
KH
12979
12980HAVE_FREETYPE=no
12981### Use -lfreetype if available, unless `--with-freetype=no'.
12982if test "${HAVE_XFT}" = "yes"; then
12983 HAVE_FREETYPE=yes
12984elif test "x${with_freetype}" != "xno"; then
45a4b03e 12985
d235ca2f 12986
45a4b03e
KH
12987 succeeded=no
12988
d235ca2f 12989 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12990set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12991{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12992echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12993if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12994 echo $ECHO_N "(cached) $ECHO_C" >&6
12995else
12996 case $PKG_CONFIG in
12997 [\\/]* | ?:[\\/]*)
12998 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12999 ;;
13000 *)
13001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13002for as_dir in $PATH
13003do
13004 IFS=$as_save_IFS
13005 test -z "$as_dir" && as_dir=.
13006 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13007 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
13008 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13009 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13010 break 2
13011 fi
13012done
13013done
c24fa7dc 13014IFS=$as_save_IFS
45a4b03e
KH
13015
13016 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13017 ;;
13018esac
13019fi
13020PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 13021if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
13022 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13023echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13024else
c24fa7dc
MB
13025 { echo "$as_me:$LINENO: result: no" >&5
13026echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13027fi
13028
c24fa7dc 13029
45a4b03e
KH
13030
13031 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 13032 HAVE_FREETYPE=no
45a4b03e
KH
13033 else
13034 PKG_CONFIG_MIN_VERSION=0.9.0
13035 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
13036 { echo "$as_me:$LINENO: checking for freetype2" >&5
13037echo $ECHO_N "checking for freetype2... $ECHO_C" >&6; }
45a4b03e 13038
c24fa7dc
MB
13039 if $PKG_CONFIG --exists "freetype2" 2>&5; then
13040 { echo "$as_me:$LINENO: result: yes" >&5
13041echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
13042 succeeded=yes
13043
c24fa7dc
MB
13044 { echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5
13045echo $ECHO_N "checking FREETYPE_CFLAGS... $ECHO_C" >&6; }
991a7602 13046 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13047 { echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5
13048echo "${ECHO_T}$FREETYPE_CFLAGS" >&6; }
45a4b03e 13049
c24fa7dc
MB
13050 { echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5
13051echo $ECHO_N "checking FREETYPE_LIBS... $ECHO_C" >&6; }
991a7602 13052 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13053 { echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5
13054echo "${ECHO_T}$FREETYPE_LIBS" >&6; }
45a4b03e 13055 else
c24fa7dc
MB
13056 { echo "$as_me:$LINENO: result: no" >&5
13057echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13058 FREETYPE_CFLAGS=""
13059 FREETYPE_LIBS=""
13060 ## If we have a custom action on failure, don't print errors, but
13061 ## do set a variable so people can do so.
13062 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
13063
13064 fi
13065
13066
13067
13068 else
13069 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13070 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13071 fi
13072 fi
13073
13074 if test $succeeded = yes; then
13075 HAVE_FREETYPE=yes
13076 else
13077 HAVE_FREETYPE=no
13078 fi
13079
b8bdd8c9 13080 if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
13081
13082 succeeded=no
13083
d235ca2f 13084 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 13085set dummy pkg-config; ac_word=$2
c24fa7dc
MB
13086{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13087echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
13088if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13089 echo $ECHO_N "(cached) $ECHO_C" >&6
13090else
13091 case $PKG_CONFIG in
13092 [\\/]* | ?:[\\/]*)
13093 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13094 ;;
13095 *)
13096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13097for as_dir in $PATH
13098do
13099 IFS=$as_save_IFS
13100 test -z "$as_dir" && as_dir=.
13101 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13102 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
13103 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13104 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13105 break 2
13106 fi
13107done
13108done
c24fa7dc 13109IFS=$as_save_IFS
45a4b03e
KH
13110
13111 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13112 ;;
13113esac
13114fi
13115PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 13116if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
13117 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13118echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13119else
c24fa7dc
MB
13120 { echo "$as_me:$LINENO: result: no" >&5
13121echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13122fi
13123
c24fa7dc 13124
45a4b03e
KH
13125
13126 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 13127 HAVE_FC=no
45a4b03e
KH
13128 else
13129 PKG_CONFIG_MIN_VERSION=0.9.0
13130 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
13131 { echo "$as_me:$LINENO: checking for fontconfig" >&5
13132echo $ECHO_N "checking for fontconfig... $ECHO_C" >&6; }
45a4b03e 13133
c24fa7dc
MB
13134 if $PKG_CONFIG --exists "fontconfig" 2>&5; then
13135 { echo "$as_me:$LINENO: result: yes" >&5
13136echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
13137 succeeded=yes
13138
c24fa7dc
MB
13139 { echo "$as_me:$LINENO: checking FONTCONFIG_CFLAGS" >&5
13140echo $ECHO_N "checking FONTCONFIG_CFLAGS... $ECHO_C" >&6; }
991a7602 13141 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13142 { echo "$as_me:$LINENO: result: $FONTCONFIG_CFLAGS" >&5
13143echo "${ECHO_T}$FONTCONFIG_CFLAGS" >&6; }
45a4b03e 13144
c24fa7dc
MB
13145 { echo "$as_me:$LINENO: checking FONTCONFIG_LIBS" >&5
13146echo $ECHO_N "checking FONTCONFIG_LIBS... $ECHO_C" >&6; }
991a7602 13147 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig"|sed -e 's,///*,/,g'`
c24fa7dc
MB
13148 { echo "$as_me:$LINENO: result: $FONTCONFIG_LIBS" >&5
13149echo "${ECHO_T}$FONTCONFIG_LIBS" >&6; }
45a4b03e 13150 else
c24fa7dc
MB
13151 { echo "$as_me:$LINENO: result: no" >&5
13152echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13153 FONTCONFIG_CFLAGS=""
13154 FONTCONFIG_LIBS=""
13155 ## If we have a custom action on failure, don't print errors, but
13156 ## do set a variable so people can do so.
13157 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig"`
13158
13159 fi
13160
13161
13162
13163 else
13164 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13165 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13166 fi
13167 fi
13168
13169 if test $succeeded = yes; then
13170 HAVE_FC=yes
13171 else
13172 HAVE_FC=no
13173 fi
13174
b8bdd8c9
KH
13175 if test "${HAVE_FC}" = "no"; then
13176 HAVE_FREETYPE=no
45a4b03e
KH
13177 fi
13178 fi
b8bdd8c9 13179fi
e70b2110 13180
b8bdd8c9
KH
13181HAVE_LIBOTF=no
13182if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
13183
13184cat >>confdefs.h <<\_ACEOF
13185#define HAVE_FREETYPE 1
13186_ACEOF
13187
b8bdd8c9 13188 if test "${with_libotf}" != "no"; then
e70b2110
KH
13189
13190 succeeded=no
13191
d235ca2f 13192 # Extract the first word of "pkg-config", so it can be a program name with args.
e70b2110 13193set dummy pkg-config; ac_word=$2
c24fa7dc
MB
13194{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13195echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e70b2110 13196if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
45a4b03e
KH
13197 echo $ECHO_N "(cached) $ECHO_C" >&6
13198else
e70b2110
KH
13199 case $PKG_CONFIG in
13200 [\\/]* | ?:[\\/]*)
13201 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13202 ;;
13203 *)
13204 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45a4b03e
KH
13205for as_dir in $PATH
13206do
13207 IFS=$as_save_IFS
13208 test -z "$as_dir" && as_dir=.
13209 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 13210 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e70b2110 13211 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
45a4b03e
KH
13212 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13213 break 2
13214 fi
13215done
13216done
c24fa7dc 13217IFS=$as_save_IFS
45a4b03e 13218
e70b2110
KH
13219 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13220 ;;
13221esac
45a4b03e 13222fi
e70b2110
KH
13223PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13224if test -n "$PKG_CONFIG"; then
13225 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13226echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 13227else
c24fa7dc
MB
13228 { echo "$as_me:$LINENO: result: no" >&5
13229echo "${ECHO_T}no" >&6; }
45a4b03e
KH
13230fi
13231
c24fa7dc 13232
45a4b03e 13233
e70b2110 13234 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13235 HAVE_LIBOTF=no
e70b2110
KH
13236 else
13237 PKG_CONFIG_MIN_VERSION=0.9.0
13238 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13239 { echo "$as_me:$LINENO: checking for libotf" >&5
13240echo $ECHO_N "checking for libotf... $ECHO_C" >&6; }
6ed29d7b 13241
e70b2110
KH
13242 if $PKG_CONFIG --exists "libotf" 2>&5; then
13243 { echo "$as_me:$LINENO: result: yes" >&5
13244echo "${ECHO_T}yes" >&6; }
13245 succeeded=yes
6ed29d7b 13246
e70b2110
KH
13247 { echo "$as_me:$LINENO: checking LIBOTF_CFLAGS" >&5
13248echo $ECHO_N "checking LIBOTF_CFLAGS... $ECHO_C" >&6; }
13249 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
13250 { echo "$as_me:$LINENO: result: $LIBOTF_CFLAGS" >&5
13251echo "${ECHO_T}$LIBOTF_CFLAGS" >&6; }
13252
13253 { echo "$as_me:$LINENO: checking LIBOTF_LIBS" >&5
13254echo $ECHO_N "checking LIBOTF_LIBS... $ECHO_C" >&6; }
13255 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
13256 { echo "$as_me:$LINENO: result: $LIBOTF_LIBS" >&5
13257echo "${ECHO_T}$LIBOTF_LIBS" >&6; }
13258 else
13259 { echo "$as_me:$LINENO: result: no" >&5
13260echo "${ECHO_T}no" >&6; }
13261 LIBOTF_CFLAGS=""
13262 LIBOTF_LIBS=""
13263 ## If we have a custom action on failure, don't print errors, but
13264 ## do set a variable so people can do so.
13265 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
6ed29d7b 13266
e70b2110 13267 fi
6ed29d7b 13268
6ed29d7b 13269
6ed29d7b 13270
e70b2110
KH
13271 else
13272 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13273 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13274 fi
13275 fi
13276
13277 if test $succeeded = yes; then
435f8bc5 13278 HAVE_LIBOTF=yes
e70b2110 13279 else
435f8bc5 13280 HAVE_LIBOTF=no
e70b2110
KH
13281 fi
13282
b8bdd8c9 13283 if test "$HAVE_LIBOTF" = "yes"; then
6ed29d7b 13284
45a4b03e
KH
13285cat >>confdefs.h <<\_ACEOF
13286#define HAVE_LIBOTF 1
13287_ACEOF
13288
6ed29d7b 13289 fi
45a4b03e 13290 fi
b8bdd8c9 13291fi
45a4b03e 13292
b8bdd8c9
KH
13293HAVE_M17N_FLT=no
13294if test "${with_m17n_flt}" != "no"; then
7f0942ba
KH
13295
13296 succeeded=no
13297
d235ca2f 13298 # Extract the first word of "pkg-config", so it can be a program name with args.
7f0942ba
KH
13299set dummy pkg-config; ac_word=$2
13300{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13301echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
13302if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13303 echo $ECHO_N "(cached) $ECHO_C" >&6
13304else
13305 case $PKG_CONFIG in
13306 [\\/]* | ?:[\\/]*)
13307 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13308 ;;
13309 *)
13310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13311for as_dir in $PATH
13312do
13313 IFS=$as_save_IFS
13314 test -z "$as_dir" && as_dir=.
13315 for ac_exec_ext in '' $ac_executable_extensions; do
13316 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13317 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13318 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13319 break 2
13320 fi
13321done
13322done
13323IFS=$as_save_IFS
13324
13325 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13326 ;;
13327esac
13328fi
13329PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13330if test -n "$PKG_CONFIG"; then
13331 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13332echo "${ECHO_T}$PKG_CONFIG" >&6; }
13333else
13334 { echo "$as_me:$LINENO: result: no" >&5
13335echo "${ECHO_T}no" >&6; }
13336fi
13337
13338
7f0942ba
KH
13339
13340 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13341 HAVE_M17N_FLT=no
7f0942ba
KH
13342 else
13343 PKG_CONFIG_MIN_VERSION=0.9.0
13344 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13345 { echo "$as_me:$LINENO: checking for m17n-flt" >&5
13346echo $ECHO_N "checking for m17n-flt... $ECHO_C" >&6; }
13347
13348 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
13349 { echo "$as_me:$LINENO: result: yes" >&5
13350echo "${ECHO_T}yes" >&6; }
13351 succeeded=yes
13352
13353 { echo "$as_me:$LINENO: checking M17N_FLT_CFLAGS" >&5
13354echo $ECHO_N "checking M17N_FLT_CFLAGS... $ECHO_C" >&6; }
13355 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
13356 { echo "$as_me:$LINENO: result: $M17N_FLT_CFLAGS" >&5
13357echo "${ECHO_T}$M17N_FLT_CFLAGS" >&6; }
13358
13359 { echo "$as_me:$LINENO: checking M17N_FLT_LIBS" >&5
13360echo $ECHO_N "checking M17N_FLT_LIBS... $ECHO_C" >&6; }
13361 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
13362 { echo "$as_me:$LINENO: result: $M17N_FLT_LIBS" >&5
13363echo "${ECHO_T}$M17N_FLT_LIBS" >&6; }
13364 else
13365 { echo "$as_me:$LINENO: result: no" >&5
13366echo "${ECHO_T}no" >&6; }
13367 M17N_FLT_CFLAGS=""
13368 M17N_FLT_LIBS=""
13369 ## If we have a custom action on failure, don't print errors, but
13370 ## do set a variable so people can do so.
13371 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
13372
13373 fi
13374
13375
13376
13377 else
13378 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13379 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13380 fi
13381 fi
13382
13383 if test $succeeded = yes; then
435f8bc5 13384 HAVE_M17N_FLT=yes
7f0942ba 13385 else
435f8bc5 13386 HAVE_M17N_FLT=no
7f0942ba
KH
13387 fi
13388
b8bdd8c9 13389 if test "$HAVE_M17N_FLT" = "yes"; then
7f0942ba
KH
13390
13391cat >>confdefs.h <<\_ACEOF
13392#define HAVE_M17N_FLT 1
13393_ACEOF
13394
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
5d6da11e 14985### Use Mac OS X Carbon API to implement GUI.
e0f712ba 14986if test "${HAVE_CARBON}" = "yes"; then
7c9e5167
JD
14987
14988cat >>confdefs.h <<\_ACEOF
e0f712ba 14989#define HAVE_CARBON 1
7c9e5167
JD
14990_ACEOF
14991
dbdbca09
YM
14992
14993for ac_header in AvailabilityMacros.h
14994do
14995as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14996if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14997 { echo "$as_me:$LINENO: checking for $ac_header" >&5
14998echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14999if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15000 echo $ECHO_N "(cached) $ECHO_C" >&6
15001fi
15002ac_res=`eval echo '${'$as_ac_Header'}'`
15003 { echo "$as_me:$LINENO: result: $ac_res" >&5
15004echo "${ECHO_T}$ac_res" >&6; }
15005else
15006 # Is the header compilable?
15007{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15008echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
15009cat >conftest.$ac_ext <<_ACEOF
15010/* confdefs.h. */
15011_ACEOF
15012cat confdefs.h >>conftest.$ac_ext
15013cat >>conftest.$ac_ext <<_ACEOF
15014/* end confdefs.h. */
15015$ac_includes_default
15016#include <$ac_header>
15017_ACEOF
15018rm -f conftest.$ac_objext
15019if { (ac_try="$ac_compile"
15020case "(($ac_try" in
15021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15022 *) ac_try_echo=$ac_try;;
15023esac
15024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15025 (eval "$ac_compile") 2>conftest.er1
15026 ac_status=$?
15027 grep -v '^ *+' conftest.er1 >conftest.err
15028 rm -f conftest.er1
15029 cat conftest.err >&5
15030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15031 (exit $ac_status); } && {
15032 test -z "$ac_c_werror_flag" ||
15033 test ! -s conftest.err
15034 } && test -s conftest.$ac_objext; then
15035 ac_header_compiler=yes
15036else
15037 echo "$as_me: failed program was:" >&5
15038sed 's/^/| /' conftest.$ac_ext >&5
15039
15040 ac_header_compiler=no
15041fi
15042
15043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15044{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15045echo "${ECHO_T}$ac_header_compiler" >&6; }
15046
15047# Is the header present?
15048{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15049echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
15050cat >conftest.$ac_ext <<_ACEOF
15051/* confdefs.h. */
15052_ACEOF
15053cat confdefs.h >>conftest.$ac_ext
15054cat >>conftest.$ac_ext <<_ACEOF
15055/* end confdefs.h. */
15056#include <$ac_header>
15057_ACEOF
15058if { (ac_try="$ac_cpp conftest.$ac_ext"
15059case "(($ac_try" in
15060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15061 *) ac_try_echo=$ac_try;;
15062esac
15063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15064 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
15065 ac_status=$?
15066 grep -v '^ *+' conftest.er1 >conftest.err
15067 rm -f conftest.er1
15068 cat conftest.err >&5
15069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15070 (exit $ac_status); } >/dev/null && {
15071 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15072 test ! -s conftest.err
15073 }; then
15074 ac_header_preproc=yes
15075else
15076 echo "$as_me: failed program was:" >&5
15077sed 's/^/| /' conftest.$ac_ext >&5
15078
15079 ac_header_preproc=no
15080fi
15081
15082rm -f conftest.err conftest.$ac_ext
15083{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15084echo "${ECHO_T}$ac_header_preproc" >&6; }
15085
15086# So? What about this header?
15087case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15088 yes:no: )
15089 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15090echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
15091 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15092echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15093 ac_header_preproc=yes
15094 ;;
15095 no:yes:* )
15096 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15097echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
15098 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15099echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15100 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15101echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15102 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15103echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
15104 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
15105echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
15106 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15107echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
15108
15109 ;;
15110esac
15111{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15112echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15113if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15114 echo $ECHO_N "(cached) $ECHO_C" >&6
15115else
15116 eval "$as_ac_Header=\$ac_header_preproc"
15117fi
15118ac_res=`eval echo '${'$as_ac_Header'}'`
15119 { echo "$as_me:$LINENO: result: $ac_res" >&5
15120echo "${ECHO_T}$ac_res" >&6; }
15121
15122fi
15123if test `eval echo '${'$as_ac_Header'}'` = yes; then
15124 cat >>confdefs.h <<_ACEOF
15125#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15126_ACEOF
15127
15128fi
15129
15130done
15131
6a3a24fa
JD
15132 ## Specify the install directory
15133 carbon_appdir=
15134 if test "${carbon_appdir_x}" != ""; then
15135 case ${carbon_appdir_x} in
15136 y | ye | yes) carbon_appdir=/Applications ;;
15137 * ) carbon_appdir=${carbon_appdir_x} ;;
15138 esac
7c9e5167 15139 fi
8f417b3b
AS
15140 # We also have mouse menus.
15141 HAVE_MENUS=yes
e0f712ba 15142fi
edfda783
AR
15143### Use NeXTstep API to implement GUI.
15144if test "${HAVE_NS}" = "yes"; then
15145
15146cat >>confdefs.h <<\_ACEOF
15147#define HAVE_NS 1
15148_ACEOF
15149
ff1095d1 15150 if test "${NS_IMPL_COCOA}" = "yes"; then
edfda783
AR
15151
15152cat >>confdefs.h <<\_ACEOF
15153#define NS_IMPL_COCOA 1
15154_ACEOF
15155
15156 fi
15157 if test "${EN_COCOA_EXPERIMENTAL_CTRL_G}" = "yes"; then
15158
15159cat >>confdefs.h <<\_ACEOF
15160#define COCOA_EXPERIMENTAL_CTRL_G 1
15161_ACEOF
15162
15163 fi
ff1095d1 15164 if test "${NS_IMPL_GNUSTEP}" = "yes"; then
edfda783
AR
15165
15166cat >>confdefs.h <<\_ACEOF
15167#define NS_IMPL_GNUSTEP 1
15168_ACEOF
15169
15170 fi
15171 # We also have mouse menus.
15172 HAVE_MENUS=yes
15173fi
15174
e0f712ba 15175
98418dba
CW
15176### Use session management (-lSM -lICE) if available
15177HAVE_X_SM=no
15178if test "${HAVE_X11}" = "yes"; then
c0d27fcc 15179 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
ca81d7a0
JD
15180 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15181echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
15182if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
15183 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15184fi
ca81d7a0
JD
15185{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15186echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 15187else
c0d27fcc 15188 # Is the header compilable?
ca81d7a0
JD
15189{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
15190echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 15191cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15192/* confdefs.h. */
15193_ACEOF
15194cat confdefs.h >>conftest.$ac_ext
15195cat >>conftest.$ac_ext <<_ACEOF
15196/* end confdefs.h. */
c0d27fcc
MR
15197$ac_includes_default
15198#include <X11/SM/SMlib.h>
15199_ACEOF
15200rm -f conftest.$ac_objext
ca81d7a0
JD
15201if { (ac_try="$ac_compile"
15202case "(($ac_try" in
15203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15204 *) ac_try_echo=$ac_try;;
15205esac
15206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15207 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15208 ac_status=$?
edfaf76d
LK
15209 grep -v '^ *+' conftest.er1 >conftest.err
15210 rm -f conftest.er1
15211 cat conftest.err >&5
c0d27fcc 15212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15213 (exit $ac_status); } && {
15214 test -z "$ac_c_werror_flag" ||
15215 test ! -s conftest.err
15216 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15217 ac_header_compiler=yes
15218else
15219 echo "$as_me: failed program was:" >&5
19650fd6
AS
15220sed 's/^/| /' conftest.$ac_ext >&5
15221
ca81d7a0 15222 ac_header_compiler=no
c0d27fcc 15223fi
ca81d7a0
JD
15224
15225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15226{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15227echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15228
15229# Is the header present?
ca81d7a0
JD
15230{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
15231echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 15232cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15233/* confdefs.h. */
15234_ACEOF
15235cat confdefs.h >>conftest.$ac_ext
15236cat >>conftest.$ac_ext <<_ACEOF
15237/* end confdefs.h. */
98418dba
CW
15238#include <X11/SM/SMlib.h>
15239_ACEOF
ca81d7a0
JD
15240if { (ac_try="$ac_cpp conftest.$ac_ext"
15241case "(($ac_try" in
15242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15243 *) ac_try_echo=$ac_try;;
15244esac
15245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15246 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 15247 ac_status=$?
6bae0ccf 15248 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15249 rm -f conftest.er1
15250 cat conftest.err >&5
c0d27fcc 15251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15252 (exit $ac_status); } >/dev/null && {
15253 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15254 test ! -s conftest.err
15255 }; then
c0d27fcc 15256 ac_header_preproc=yes
98418dba
CW
15257else
15258 echo "$as_me: failed program was:" >&5
19650fd6
AS
15259sed 's/^/| /' conftest.$ac_ext >&5
15260
c0d27fcc 15261 ac_header_preproc=no
98418dba 15262fi
ca81d7a0 15263
98418dba 15264rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15265{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15266echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15267
15268# So? What about this header?
edfaf76d
LK
15269case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15270 yes:no: )
c0d27fcc
MR
15271 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
15272echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15273 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
15274echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
15275 ac_header_preproc=yes
19650fd6 15276 ;;
edfaf76d 15277 no:yes:* )
c0d27fcc
MR
15278 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
15279echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
15280 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
15281echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
15282 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
15283echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
15284 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
15285echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15286 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 15287echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15288 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
15289echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15290
19650fd6 15291 ;;
c0d27fcc 15292esac
ca81d7a0
JD
15293{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
15294echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
15295if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
15296 echo $ECHO_N "(cached) $ECHO_C" >&6
15297else
15298 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 15299fi
ca81d7a0
JD
15300{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
15301echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
15302
15303fi
98418dba 15304if test $ac_cv_header_X11_SM_SMlib_h = yes; then
ca81d7a0
JD
15305 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
15306echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 15307if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 15308 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15309else
503d2be0 15310 ac_check_lib_save_LIBS=$LIBS
1660500f 15311LIBS="-lSM -lICE $LIBS"
503d2be0 15312cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15313/* confdefs.h. */
15314_ACEOF
15315cat confdefs.h >>conftest.$ac_ext
15316cat >>conftest.$ac_ext <<_ACEOF
15317/* end confdefs.h. */
503d2be0 15318
ca81d7a0
JD
15319/* Override any GCC internal prototype to avoid an error.
15320 Use char because int might match the return type of a GCC
15321 builtin and then its argument prototype would still apply. */
503d2be0
AS
15322#ifdef __cplusplus
15323extern "C"
15324#endif
98418dba 15325char SmcOpenConnection ();
503d2be0
AS
15326int
15327main ()
15328{
ca81d7a0 15329return SmcOpenConnection ();
503d2be0
AS
15330 ;
15331 return 0;
15332}
15333_ACEOF
15334rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15335if { (ac_try="$ac_link"
15336case "(($ac_try" in
15337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15338 *) ac_try_echo=$ac_try;;
15339esac
15340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15341 (eval "$ac_link") 2>conftest.er1
503d2be0 15342 ac_status=$?
edfaf76d
LK
15343 grep -v '^ *+' conftest.er1 >conftest.err
15344 rm -f conftest.er1
15345 cat conftest.err >&5
c0d27fcc 15346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15347 (exit $ac_status); } && {
15348 test -z "$ac_c_werror_flag" ||
15349 test ! -s conftest.err
15350 } && test -s conftest$ac_exeext &&
15351 $as_test_x conftest$ac_exeext; then
98418dba 15352 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
15353else
15354 echo "$as_me: failed program was:" >&5
19650fd6
AS
15355sed 's/^/| /' conftest.$ac_ext >&5
15356
ca81d7a0 15357 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 15358fi
ca81d7a0 15359
f053c89f 15360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15361 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
15362LIBS=$ac_check_lib_save_LIBS
15363fi
ca81d7a0
JD
15364{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
15365echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
15366if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
15367 HAVE_X_SM=yes
73b77ee5
GM
15368fi
15369
73b77ee5 15370fi
73b77ee5 15371
c0d27fcc
MR
15372
15373
98418dba 15374 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 15375
c0d27fcc 15376cat >>confdefs.h <<\_ACEOF
98418dba 15377#define HAVE_X_SM 1
c0d27fcc 15378_ACEOF
73b77ee5 15379
98418dba
CW
15380 case "$LIBS" in
15381 *-lSM*) ;;
15382 *) LIBS="-lSM -lICE $LIBS" ;;
15383 esac
73b77ee5 15384 fi
98418dba 15385fi
73b77ee5 15386
98418dba 15387# If netdb.h doesn't declare h_errno, we must declare it by hand.
ca81d7a0
JD
15388{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
15389echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
15390if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
15391 echo $ECHO_N "(cached) $ECHO_C" >&6
15392else
15393 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15394/* confdefs.h. */
15395_ACEOF
15396cat confdefs.h >>conftest.$ac_ext
15397cat >>conftest.$ac_ext <<_ACEOF
15398/* end confdefs.h. */
98418dba 15399#include <netdb.h>
503d2be0
AS
15400int
15401main ()
15402{
98418dba 15403return h_errno;
503d2be0
AS
15404 ;
15405 return 0;
15406}
15407_ACEOF
15408rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15409if { (ac_try="$ac_link"
15410case "(($ac_try" in
15411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15412 *) ac_try_echo=$ac_try;;
15413esac
15414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15415 (eval "$ac_link") 2>conftest.er1
503d2be0 15416 ac_status=$?
edfaf76d
LK
15417 grep -v '^ *+' conftest.er1 >conftest.err
15418 rm -f conftest.er1
15419 cat conftest.err >&5
c0d27fcc 15420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15421 (exit $ac_status); } && {
15422 test -z "$ac_c_werror_flag" ||
15423 test ! -s conftest.err
15424 } && test -s conftest$ac_exeext &&
15425 $as_test_x conftest$ac_exeext; then
98418dba 15426 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 15427else
503d2be0 15428 echo "$as_me: failed program was:" >&5
19650fd6
AS
15429sed 's/^/| /' conftest.$ac_ext >&5
15430
ca81d7a0 15431 emacs_cv_netdb_declares_h_errno=no
73b77ee5 15432fi
ca81d7a0 15433
f053c89f 15434rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15435 conftest$ac_exeext conftest.$ac_ext
98418dba 15436fi
ca81d7a0
JD
15437{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
15438echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 15439if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 15440
c0d27fcc 15441cat >>confdefs.h <<\_ACEOF
98418dba 15442#define HAVE_H_ERRNO 1
c0d27fcc 15443_ACEOF
73b77ee5 15444
98418dba
CW
15445fi
15446
15447# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15448# for constant arguments. Useless!
ca81d7a0
JD
15449{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
15450echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
15451if test "${ac_cv_working_alloca_h+set}" = set; then
15452 echo $ECHO_N "(cached) $ECHO_C" >&6
15453else
15454 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15455/* confdefs.h. */
15456_ACEOF
15457cat confdefs.h >>conftest.$ac_ext
15458cat >>conftest.$ac_ext <<_ACEOF
15459/* end confdefs.h. */
98418dba 15460#include <alloca.h>
503d2be0
AS
15461int
15462main ()
15463{
98418dba 15464char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 15465 if (p) return 0;
503d2be0
AS
15466 ;
15467 return 0;
15468}
15469_ACEOF
15470rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15471if { (ac_try="$ac_link"
15472case "(($ac_try" in
15473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15474 *) ac_try_echo=$ac_try;;
15475esac
15476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15477 (eval "$ac_link") 2>conftest.er1
503d2be0 15478 ac_status=$?
edfaf76d
LK
15479 grep -v '^ *+' conftest.er1 >conftest.err
15480 rm -f conftest.er1
15481 cat conftest.err >&5
c0d27fcc 15482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15483 (exit $ac_status); } && {
15484 test -z "$ac_c_werror_flag" ||
15485 test ! -s conftest.err
15486 } && test -s conftest$ac_exeext &&
15487 $as_test_x conftest$ac_exeext; then
98418dba 15488 ac_cv_working_alloca_h=yes
73b77ee5 15489else
503d2be0 15490 echo "$as_me: failed program was:" >&5
19650fd6
AS
15491sed 's/^/| /' conftest.$ac_ext >&5
15492
ca81d7a0 15493 ac_cv_working_alloca_h=no
73b77ee5 15494fi
ca81d7a0 15495
f053c89f 15496rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15497 conftest$ac_exeext conftest.$ac_ext
98418dba 15498fi
ca81d7a0
JD
15499{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
15500echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 15501if test $ac_cv_working_alloca_h = yes; then
73b77ee5 15502
c0d27fcc 15503cat >>confdefs.h <<\_ACEOF
98418dba 15504#define HAVE_ALLOCA_H 1
c0d27fcc 15505_ACEOF
98418dba
CW
15506
15507fi
15508
ca81d7a0
JD
15509{ echo "$as_me:$LINENO: checking for alloca" >&5
15510echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
15511if test "${ac_cv_func_alloca_works+set}" = set; then
15512 echo $ECHO_N "(cached) $ECHO_C" >&6
15513else
503d2be0 15514 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15515/* confdefs.h. */
15516_ACEOF
15517cat confdefs.h >>conftest.$ac_ext
15518cat >>conftest.$ac_ext <<_ACEOF
15519/* end confdefs.h. */
98418dba
CW
15520#ifdef __GNUC__
15521# define alloca __builtin_alloca
15522#else
15523# ifdef _MSC_VER
15524# include <malloc.h>
15525# define alloca _alloca
15526# else
f053c89f 15527# ifdef HAVE_ALLOCA_H
98418dba
CW
15528# include <alloca.h>
15529# else
15530# ifdef _AIX
15531 #pragma alloca
15532# else
15533# ifndef alloca /* predefined by HP cc +Olibcalls */
15534char *alloca ();
15535# endif
15536# endif
15537# endif
15538# endif
15539#endif
15540
503d2be0
AS
15541int
15542main ()
15543{
98418dba 15544char *p = (char *) alloca (1);
ca81d7a0 15545 if (p) return 0;
503d2be0
AS
15546 ;
15547 return 0;
15548}
15549_ACEOF
15550rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15551if { (ac_try="$ac_link"
15552case "(($ac_try" in
15553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15554 *) ac_try_echo=$ac_try;;
15555esac
15556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15557 (eval "$ac_link") 2>conftest.er1
503d2be0 15558 ac_status=$?
edfaf76d
LK
15559 grep -v '^ *+' conftest.er1 >conftest.err
15560 rm -f conftest.er1
15561 cat conftest.err >&5
c0d27fcc 15562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15563 (exit $ac_status); } && {
15564 test -z "$ac_c_werror_flag" ||
15565 test ! -s conftest.err
15566 } && test -s conftest$ac_exeext &&
15567 $as_test_x conftest$ac_exeext; then
98418dba 15568 ac_cv_func_alloca_works=yes
ac95a621 15569else
503d2be0 15570 echo "$as_me: failed program was:" >&5
19650fd6
AS
15571sed 's/^/| /' conftest.$ac_ext >&5
15572
ca81d7a0 15573 ac_cv_func_alloca_works=no
ac95a621 15574fi
ca81d7a0 15575
f053c89f 15576rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15577 conftest$ac_exeext conftest.$ac_ext
98418dba 15578fi
ca81d7a0
JD
15579{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
15580echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 15581
98418dba
CW
15582if test $ac_cv_func_alloca_works = yes; then
15583
c0d27fcc 15584cat >>confdefs.h <<\_ACEOF
98418dba 15585#define HAVE_ALLOCA 1
c0d27fcc 15586_ACEOF
98418dba
CW
15587
15588else
15589 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15590# that cause trouble. Some versions do not even contain alloca or
15591# contain a buggy version. If you still want to use their alloca,
15592# use ar to extract alloca.o from them instead of compiling alloca.c.
15593
ca81d7a0 15594ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 15595
c0d27fcc 15596cat >>confdefs.h <<\_ACEOF
98418dba 15597#define C_ALLOCA 1
c0d27fcc 15598_ACEOF
98418dba 15599
c0d27fcc 15600
ca81d7a0
JD
15601{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
15602echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
15603if test "${ac_cv_os_cray+set}" = set; then
15604 echo $ECHO_N "(cached) $ECHO_C" >&6
15605else
15606 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15607/* confdefs.h. */
15608_ACEOF
15609cat confdefs.h >>conftest.$ac_ext
15610cat >>conftest.$ac_ext <<_ACEOF
15611/* end confdefs.h. */
ca81d7a0 15612#if defined CRAY && ! defined CRAY2
98418dba
CW
15613webecray
15614#else
15615wenotbecray
15616#endif
15617
15618_ACEOF
15619if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 15620 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
15621 ac_cv_os_cray=yes
15622else
15623 ac_cv_os_cray=no
15624fi
15625rm -f conftest*
ac95a621 15626
98418dba 15627fi
ca81d7a0
JD
15628{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
15629echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
15630if test $ac_cv_os_cray = yes; then
15631 for ac_func in _getb67 GETB67 getb67; do
15632 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15633{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15634echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15635if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15636 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15637else
503d2be0 15638 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15639/* confdefs.h. */
15640_ACEOF
15641cat confdefs.h >>conftest.$ac_ext
15642cat >>conftest.$ac_ext <<_ACEOF
15643/* end confdefs.h. */
edfaf76d
LK
15644/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15645 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15646#define $ac_func innocuous_$ac_func
15647
73b77ee5 15648/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15649 which can conflict with char $ac_func (); below.
15650 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15651 <limits.h> exists even on freestanding compilers. */
edfaf76d 15652
19650fd6
AS
15653#ifdef __STDC__
15654# include <limits.h>
15655#else
15656# include <assert.h>
15657#endif
edfaf76d
LK
15658
15659#undef $ac_func
15660
ca81d7a0
JD
15661/* Override any GCC internal prototype to avoid an error.
15662 Use char because int might match the return type of a GCC
15663 builtin and then its argument prototype would still apply. */
503d2be0
AS
15664#ifdef __cplusplus
15665extern "C"
15666#endif
503d2be0 15667char $ac_func ();
73b77ee5
GM
15668/* The GNU C library defines this for functions which it implements
15669 to always fail with ENOSYS. Some functions are actually named
15670 something starting with __ and the normal name is an alias. */
ca81d7a0 15671#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 15672choke me
73b77ee5
GM
15673#endif
15674
19650fd6
AS
15675int
15676main ()
15677{
ca81d7a0 15678return $ac_func ();
503d2be0
AS
15679 ;
15680 return 0;
15681}
15682_ACEOF
15683rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15684if { (ac_try="$ac_link"
15685case "(($ac_try" in
15686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15687 *) ac_try_echo=$ac_try;;
15688esac
15689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15690 (eval "$ac_link") 2>conftest.er1
503d2be0 15691 ac_status=$?
edfaf76d
LK
15692 grep -v '^ *+' conftest.er1 >conftest.err
15693 rm -f conftest.er1
15694 cat conftest.err >&5
c0d27fcc 15695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15696 (exit $ac_status); } && {
15697 test -z "$ac_c_werror_flag" ||
15698 test ! -s conftest.err
15699 } && test -s conftest$ac_exeext &&
15700 $as_test_x conftest$ac_exeext; then
503d2be0
AS
15701 eval "$as_ac_var=yes"
15702else
15703 echo "$as_me: failed program was:" >&5
19650fd6
AS
15704sed 's/^/| /' conftest.$ac_ext >&5
15705
ca81d7a0 15706 eval "$as_ac_var=no"
503d2be0 15707fi
ca81d7a0 15708
f053c89f 15709rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15710 conftest$ac_exeext conftest.$ac_ext
503d2be0 15711fi
ca81d7a0
JD
15712ac_res=`eval echo '${'$as_ac_var'}'`
15713 { echo "$as_me:$LINENO: result: $ac_res" >&5
15714echo "${ECHO_T}$ac_res" >&6; }
503d2be0 15715if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 15716
c0d27fcc 15717cat >>confdefs.h <<_ACEOF
98418dba 15718#define CRAY_STACKSEG_END $ac_func
c0d27fcc 15719_ACEOF
98418dba
CW
15720
15721 break
73b77ee5 15722fi
73b77ee5 15723
98418dba 15724 done
73b77ee5
GM
15725fi
15726
ca81d7a0
JD
15727{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
15728echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 15729if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 15730 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15731else
15732 if test "$cross_compiling" = yes; then
15733 ac_cv_c_stack_direction=0
73b77ee5 15734else
503d2be0 15735 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15736/* confdefs.h. */
15737_ACEOF
15738cat confdefs.h >>conftest.$ac_ext
15739cat >>conftest.$ac_ext <<_ACEOF
15740/* end confdefs.h. */
ca81d7a0 15741$ac_includes_default
503d2be0 15742int
98418dba 15743find_stack_direction ()
503d2be0 15744{
98418dba
CW
15745 static char *addr = 0;
15746 auto char dummy;
15747 if (addr == 0)
15748 {
15749 addr = &dummy;
15750 return find_stack_direction ();
15751 }
73b77ee5 15752 else
98418dba
CW
15753 return (&dummy > addr) ? 1 : -1;
15754}
ba4481b5 15755
503d2be0
AS
15756int
15757main ()
15758{
ca81d7a0 15759 return find_stack_direction () < 0;
503d2be0
AS
15760}
15761_ACEOF
98418dba 15762rm -f conftest$ac_exeext
ca81d7a0
JD
15763if { (ac_try="$ac_link"
15764case "(($ac_try" in
15765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15766 *) ac_try_echo=$ac_try;;
15767esac
15768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15769 (eval "$ac_link") 2>&5
503d2be0 15770 ac_status=$?
c0d27fcc 15771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15772 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
15773 { (case "(($ac_try" in
15774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15775 *) ac_try_echo=$ac_try;;
15776esac
15777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15778 (eval "$ac_try") 2>&5
503d2be0 15779 ac_status=$?
c0d27fcc 15780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15781 (exit $ac_status); }; }; then
98418dba 15782 ac_cv_c_stack_direction=1
ba4481b5 15783else
98418dba
CW
15784 echo "$as_me: program exited with status $ac_status" >&5
15785echo "$as_me: failed program was:" >&5
19650fd6
AS
15786sed 's/^/| /' conftest.$ac_ext >&5
15787
c0d27fcc 15788( exit $ac_status )
98418dba 15789ac_cv_c_stack_direction=-1
ba4481b5 15790fi
ca81d7a0 15791rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 15792fi
ca81d7a0
JD
15793
15794
98418dba 15795fi
ca81d7a0
JD
15796{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
15797echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 15798
c0d27fcc 15799cat >>confdefs.h <<_ACEOF
98418dba 15800#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
15801_ACEOF
15802
ba4481b5 15803
ba4481b5
DL
15804fi
15805
c0d27fcc 15806
611adb3e
GM
15807if test x"$ac_cv_func_alloca_works" != xyes; then
15808 { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
15809echo "$as_me: error: a system implementation of alloca is required " >&2;}
15810 { (exit 1); exit 1; }; }
15811fi
15812
98418dba
CW
15813# fmod, logb, and frexp are found in -lm on most systems.
15814# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
15815
ca81d7a0
JD
15816{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
15817echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 15818if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 15819 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15820else
98418dba
CW
15821 ac_check_lib_save_LIBS=$LIBS
15822LIBS="-lm $LIBS"
15823cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15824/* confdefs.h. */
15825_ACEOF
15826cat confdefs.h >>conftest.$ac_ext
15827cat >>conftest.$ac_ext <<_ACEOF
15828/* end confdefs.h. */
ba4481b5 15829
ca81d7a0
JD
15830/* Override any GCC internal prototype to avoid an error.
15831 Use char because int might match the return type of a GCC
15832 builtin and then its argument prototype would still apply. */
98418dba
CW
15833#ifdef __cplusplus
15834extern "C"
15835#endif
98418dba 15836char sqrt ();
503d2be0
AS
15837int
15838main ()
15839{
ca81d7a0 15840return sqrt ();
503d2be0
AS
15841 ;
15842 return 0;
15843}
15844_ACEOF
15845rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15846if { (ac_try="$ac_link"
15847case "(($ac_try" in
15848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15849 *) ac_try_echo=$ac_try;;
15850esac
15851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15852 (eval "$ac_link") 2>conftest.er1
503d2be0 15853 ac_status=$?
edfaf76d
LK
15854 grep -v '^ *+' conftest.er1 >conftest.err
15855 rm -f conftest.er1
15856 cat conftest.err >&5
c0d27fcc 15857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15858 (exit $ac_status); } && {
15859 test -z "$ac_c_werror_flag" ||
15860 test ! -s conftest.err
15861 } && test -s conftest$ac_exeext &&
15862 $as_test_x conftest$ac_exeext; then
98418dba 15863 ac_cv_lib_m_sqrt=yes
ba4481b5 15864else
503d2be0 15865 echo "$as_me: failed program was:" >&5
19650fd6
AS
15866sed 's/^/| /' conftest.$ac_ext >&5
15867
ca81d7a0 15868 ac_cv_lib_m_sqrt=no
ba4481b5 15869fi
ca81d7a0 15870
f053c89f 15871rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15872 conftest$ac_exeext conftest.$ac_ext
98418dba 15873LIBS=$ac_check_lib_save_LIBS
ba4481b5 15874fi
ca81d7a0
JD
15875{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
15876echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 15877if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 15878 cat >>confdefs.h <<_ACEOF
98418dba 15879#define HAVE_LIBM 1
c0d27fcc 15880_ACEOF
98418dba
CW
15881
15882 LIBS="-lm $LIBS"
ba4481b5 15883
ba4481b5
DL
15884fi
15885
c0d27fcc 15886
55597d70
DL
15887# Check for mail-locking functions in a "mail" library. Probably this should
15888# have the same check as for liblockfile below.
98418dba 15889
ca81d7a0
JD
15890{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
15891echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 15892if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 15893 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15894else
98418dba
CW
15895 ac_check_lib_save_LIBS=$LIBS
15896LIBS="-lmail $LIBS"
15897cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15898/* confdefs.h. */
15899_ACEOF
15900cat confdefs.h >>conftest.$ac_ext
15901cat >>conftest.$ac_ext <<_ACEOF
15902/* end confdefs.h. */
98418dba 15903
ca81d7a0
JD
15904/* Override any GCC internal prototype to avoid an error.
15905 Use char because int might match the return type of a GCC
15906 builtin and then its argument prototype would still apply. */
98418dba
CW
15907#ifdef __cplusplus
15908extern "C"
15909#endif
98418dba 15910char maillock ();
503d2be0
AS
15911int
15912main ()
15913{
ca81d7a0 15914return maillock ();
503d2be0
AS
15915 ;
15916 return 0;
15917}
15918_ACEOF
15919rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15920if { (ac_try="$ac_link"
15921case "(($ac_try" in
15922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15923 *) ac_try_echo=$ac_try;;
15924esac
15925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15926 (eval "$ac_link") 2>conftest.er1
503d2be0 15927 ac_status=$?
edfaf76d
LK
15928 grep -v '^ *+' conftest.er1 >conftest.err
15929 rm -f conftest.er1
15930 cat conftest.err >&5
c0d27fcc 15931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15932 (exit $ac_status); } && {
15933 test -z "$ac_c_werror_flag" ||
15934 test ! -s conftest.err
15935 } && test -s conftest$ac_exeext &&
15936 $as_test_x conftest$ac_exeext; then
98418dba 15937 ac_cv_lib_mail_maillock=yes
ba4481b5 15938else
503d2be0 15939 echo "$as_me: failed program was:" >&5
19650fd6
AS
15940sed 's/^/| /' conftest.$ac_ext >&5
15941
ca81d7a0 15942 ac_cv_lib_mail_maillock=no
ba4481b5 15943fi
ca81d7a0 15944
f053c89f 15945rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15946 conftest$ac_exeext conftest.$ac_ext
98418dba 15947LIBS=$ac_check_lib_save_LIBS
ba4481b5 15948fi
ca81d7a0
JD
15949{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15950echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 15951if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15952 cat >>confdefs.h <<_ACEOF
98418dba 15953#define HAVE_LIBMAIL 1
c0d27fcc 15954_ACEOF
ba4481b5 15955
98418dba 15956 LIBS="-lmail $LIBS"
ba4481b5 15957
98418dba 15958fi
ba4481b5 15959
c0d27fcc 15960
ca81d7a0
JD
15961{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15962echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15963if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 15964 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15965else
503d2be0 15966 ac_check_lib_save_LIBS=$LIBS
98418dba 15967LIBS="-llockfile $LIBS"
503d2be0 15968cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15969/* confdefs.h. */
15970_ACEOF
15971cat confdefs.h >>conftest.$ac_ext
15972cat >>conftest.$ac_ext <<_ACEOF
15973/* end confdefs.h. */
503d2be0 15974
ca81d7a0
JD
15975/* Override any GCC internal prototype to avoid an error.
15976 Use char because int might match the return type of a GCC
15977 builtin and then its argument prototype would still apply. */
503d2be0
AS
15978#ifdef __cplusplus
15979extern "C"
15980#endif
98418dba 15981char maillock ();
503d2be0
AS
15982int
15983main ()
15984{
ca81d7a0 15985return maillock ();
503d2be0
AS
15986 ;
15987 return 0;
15988}
15989_ACEOF
15990rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15991if { (ac_try="$ac_link"
15992case "(($ac_try" in
15993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15994 *) ac_try_echo=$ac_try;;
15995esac
15996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15997 (eval "$ac_link") 2>conftest.er1
503d2be0 15998 ac_status=$?
edfaf76d
LK
15999 grep -v '^ *+' conftest.er1 >conftest.err
16000 rm -f conftest.er1
16001 cat conftest.err >&5
c0d27fcc 16002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16003 (exit $ac_status); } && {
16004 test -z "$ac_c_werror_flag" ||
16005 test ! -s conftest.err
16006 } && test -s conftest$ac_exeext &&
16007 $as_test_x conftest$ac_exeext; then
98418dba 16008 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
16009else
16010 echo "$as_me: failed program was:" >&5
19650fd6
AS
16011sed 's/^/| /' conftest.$ac_ext >&5
16012
ca81d7a0 16013 ac_cv_lib_lockfile_maillock=no
98418dba 16014fi
ca81d7a0 16015
f053c89f 16016rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16017 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
16018LIBS=$ac_check_lib_save_LIBS
16019fi
ca81d7a0
JD
16020{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
16021echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 16022if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 16023 cat >>confdefs.h <<_ACEOF
98418dba 16024#define HAVE_LIBLOCKFILE 1
c0d27fcc 16025_ACEOF
98418dba
CW
16026
16027 LIBS="-llockfile $LIBS"
16028
16029fi
16030
16031# If we have the shared liblockfile, assume we must use it for mail
16032# locking (e.g. Debian). If we couldn't link against liblockfile
16033# (no liblockfile.a installed), ensure that we don't need to.
16034if test "$ac_cv_lib_lockfile_maillock" = no; then
16035 # Extract the first word of "liblockfile.so", so it can be a program name with args.
16036set dummy liblockfile.so; ac_word=$2
ca81d7a0
JD
16037{ echo "$as_me:$LINENO: checking for $ac_word" >&5
16038echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
16039if test "${ac_cv_prog_liblockfile+set}" = set; then
16040 echo $ECHO_N "(cached) $ECHO_C" >&6
16041else
16042 if test -n "$liblockfile"; then
16043 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
16044else
c0d27fcc 16045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
16046as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
16047for as_dir in $as_dummy
c0d27fcc
MR
16048do
16049 IFS=$as_save_IFS
16050 test -z "$as_dir" && as_dir=.
16051 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 16052 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
16053 ac_cv_prog_liblockfile="yes"
16054 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
16055 break 2
16056 fi
16057done
98418dba 16058done
ca81d7a0 16059IFS=$as_save_IFS
98418dba
CW
16060
16061 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 16062fi
503d2be0 16063fi
98418dba
CW
16064liblockfile=$ac_cv_prog_liblockfile
16065if test -n "$liblockfile"; then
ca81d7a0
JD
16066 { echo "$as_me:$LINENO: result: $liblockfile" >&5
16067echo "${ECHO_T}$liblockfile" >&6; }
98418dba 16068else
ca81d7a0
JD
16069 { echo "$as_me:$LINENO: result: no" >&5
16070echo "${ECHO_T}no" >&6; }
ba4481b5
DL
16071fi
16072
ca81d7a0 16073
98418dba 16074 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 16075 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
16076This probably means that movemail could lose mail.
16077There may be a \`development' package to install containing liblockfile." >&5
16078echo "$as_me: error: Shared liblockfile found but can't link against it.
16079This probably means that movemail could lose mail.
16080There may be a \`development' package to install containing liblockfile." >&2;}
16081 { (exit 1); exit 1; }; }
98418dba 16082 else :
55597d70 16083 fi
98418dba 16084fi
503d2be0 16085
98418dba
CW
16086for ac_func in touchlock
16087do
16088as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16089{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16090echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16091if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16092 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 16093else
98418dba 16094 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16095/* confdefs.h. */
16096_ACEOF
16097cat confdefs.h >>conftest.$ac_ext
16098cat >>conftest.$ac_ext <<_ACEOF
16099/* end confdefs.h. */
edfaf76d
LK
16100/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16101 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16102#define $ac_func innocuous_$ac_func
16103
98418dba 16104/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16105 which can conflict with char $ac_func (); below.
16106 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16107 <limits.h> exists even on freestanding compilers. */
edfaf76d 16108
19650fd6
AS
16109#ifdef __STDC__
16110# include <limits.h>
16111#else
16112# include <assert.h>
16113#endif
edfaf76d
LK
16114
16115#undef $ac_func
16116
ca81d7a0
JD
16117/* Override any GCC internal prototype to avoid an error.
16118 Use char because int might match the return type of a GCC
16119 builtin and then its argument prototype would still apply. */
503d2be0
AS
16120#ifdef __cplusplus
16121extern "C"
16122#endif
98418dba 16123char $ac_func ();
98418dba
CW
16124/* The GNU C library defines this for functions which it implements
16125 to always fail with ENOSYS. Some functions are actually named
16126 something starting with __ and the normal name is an alias. */
ca81d7a0 16127#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16128choke me
cd958eb3
MB
16129#endif
16130
19650fd6
AS
16131int
16132main ()
16133{
ca81d7a0 16134return $ac_func ();
503d2be0
AS
16135 ;
16136 return 0;
16137}
16138_ACEOF
16139rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16140if { (ac_try="$ac_link"
16141case "(($ac_try" in
16142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16143 *) ac_try_echo=$ac_try;;
16144esac
16145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16146 (eval "$ac_link") 2>conftest.er1
503d2be0 16147 ac_status=$?
edfaf76d
LK
16148 grep -v '^ *+' conftest.er1 >conftest.err
16149 rm -f conftest.er1
16150 cat conftest.err >&5
c0d27fcc 16151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16152 (exit $ac_status); } && {
16153 test -z "$ac_c_werror_flag" ||
16154 test ! -s conftest.err
16155 } && test -s conftest$ac_exeext &&
16156 $as_test_x conftest$ac_exeext; then
98418dba 16157 eval "$as_ac_var=yes"
503d2be0
AS
16158else
16159 echo "$as_me: failed program was:" >&5
19650fd6
AS
16160sed 's/^/| /' conftest.$ac_ext >&5
16161
ca81d7a0 16162 eval "$as_ac_var=no"
503d2be0 16163fi
ca81d7a0 16164
f053c89f 16165rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16166 conftest$ac_exeext conftest.$ac_ext
503d2be0 16167fi
ca81d7a0
JD
16168ac_res=`eval echo '${'$as_ac_var'}'`
16169 { echo "$as_me:$LINENO: result: $ac_res" >&5
16170echo "${ECHO_T}$ac_res" >&6; }
98418dba 16171if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16172 cat >>confdefs.h <<_ACEOF
98418dba 16173#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16174_ACEOF
457b792c 16175
457b792c 16176fi
98418dba 16177done
457b792c 16178
c0d27fcc 16179
98418dba
CW
16180for ac_header in maillock.h
16181do
16182as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16183if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16184 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16185echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16186if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16187 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16188fi
ca81d7a0
JD
16189ac_res=`eval echo '${'$as_ac_Header'}'`
16190 { echo "$as_me:$LINENO: result: $ac_res" >&5
16191echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 16192else
c0d27fcc 16193 # Is the header compilable?
ca81d7a0
JD
16194{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16195echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16196cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16197/* confdefs.h. */
16198_ACEOF
16199cat confdefs.h >>conftest.$ac_ext
16200cat >>conftest.$ac_ext <<_ACEOF
16201/* end confdefs.h. */
c0d27fcc
MR
16202$ac_includes_default
16203#include <$ac_header>
16204_ACEOF
16205rm -f conftest.$ac_objext
ca81d7a0
JD
16206if { (ac_try="$ac_compile"
16207case "(($ac_try" in
16208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16209 *) ac_try_echo=$ac_try;;
16210esac
16211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16212 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16213 ac_status=$?
edfaf76d
LK
16214 grep -v '^ *+' conftest.er1 >conftest.err
16215 rm -f conftest.er1
16216 cat conftest.err >&5
c0d27fcc 16217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16218 (exit $ac_status); } && {
16219 test -z "$ac_c_werror_flag" ||
16220 test ! -s conftest.err
16221 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16222 ac_header_compiler=yes
16223else
16224 echo "$as_me: failed program was:" >&5
19650fd6
AS
16225sed 's/^/| /' conftest.$ac_ext >&5
16226
ca81d7a0 16227 ac_header_compiler=no
c0d27fcc 16228fi
ca81d7a0
JD
16229
16230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16231{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16232echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16233
16234# Is the header present?
ca81d7a0
JD
16235{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16236echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16237cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16238/* confdefs.h. */
16239_ACEOF
16240cat confdefs.h >>conftest.$ac_ext
16241cat >>conftest.$ac_ext <<_ACEOF
16242/* end confdefs.h. */
98418dba 16243#include <$ac_header>
503d2be0 16244_ACEOF
ca81d7a0
JD
16245if { (ac_try="$ac_cpp conftest.$ac_ext"
16246case "(($ac_try" in
16247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16248 *) ac_try_echo=$ac_try;;
16249esac
16250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16251 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16252 ac_status=$?
6bae0ccf 16253 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16254 rm -f conftest.er1
16255 cat conftest.err >&5
c0d27fcc 16256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16257 (exit $ac_status); } >/dev/null && {
16258 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16259 test ! -s conftest.err
16260 }; then
c0d27fcc 16261 ac_header_preproc=yes
98418dba
CW
16262else
16263 echo "$as_me: failed program was:" >&5
19650fd6
AS
16264sed 's/^/| /' conftest.$ac_ext >&5
16265
c0d27fcc 16266 ac_header_preproc=no
503d2be0 16267fi
ca81d7a0 16268
98418dba 16269rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16270{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16271echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16272
16273# So? What about this header?
edfaf76d
LK
16274case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16275 yes:no: )
c0d27fcc
MR
16276 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16277echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16278 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16279echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16280 ac_header_preproc=yes
19650fd6 16281 ;;
edfaf76d 16282 no:yes:* )
c0d27fcc
MR
16283 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16284echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16285 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16286echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16287 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16288echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16289 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16290echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16291 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16292echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16293 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16294echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16295
19650fd6 16296 ;;
c0d27fcc 16297esac
ca81d7a0
JD
16298{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16299echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16300if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16301 echo $ECHO_N "(cached) $ECHO_C" >&6
16302else
edfaf76d 16303 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16304fi
ca81d7a0
JD
16305ac_res=`eval echo '${'$as_ac_Header'}'`
16306 { echo "$as_me:$LINENO: result: $ac_res" >&5
16307echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16308
16309fi
98418dba 16310if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16311 cat >>confdefs.h <<_ACEOF
98418dba 16312#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16313_ACEOF
48d4b120 16314
ba4481b5 16315fi
c0d27fcc 16316
98418dba
CW
16317done
16318
c0d27fcc
MR
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
22044edf
DL
16374
16375
c0d27fcc 16376
b0e44248
RB
16377
16378
973a76b1
DL
16379
16380
16381
cd958eb3 16382
25ca0bca 16383
ea92fc9f 16384
2d3c36ae
SM
16385
16386
e2fcf543 16387
c0d27fcc
MR
16388
16389
98418dba 16390for ac_func in gethostname getdomainname dup2 \
e2fcf543 16391rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
bc3512d0 16392random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
98418dba 16393strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 16394utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
16395__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
16396sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 16397gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
2d3c36ae
SM
16398memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign \
16399cfmakeraw cfsetspeed
98418dba
CW
16400do
16401as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16402{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16403echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16404if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16405 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16406else
503d2be0 16407 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16408/* confdefs.h. */
16409_ACEOF
16410cat confdefs.h >>conftest.$ac_ext
16411cat >>conftest.$ac_ext <<_ACEOF
16412/* end confdefs.h. */
edfaf76d
LK
16413/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16414 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16415#define $ac_func innocuous_$ac_func
16416
98418dba 16417/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16418 which can conflict with char $ac_func (); below.
16419 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16420 <limits.h> exists even on freestanding compilers. */
edfaf76d 16421
19650fd6
AS
16422#ifdef __STDC__
16423# include <limits.h>
16424#else
16425# include <assert.h>
16426#endif
edfaf76d
LK
16427
16428#undef $ac_func
16429
ca81d7a0
JD
16430/* Override any GCC internal prototype to avoid an error.
16431 Use char because int might match the return type of a GCC
16432 builtin and then its argument prototype would still apply. */
503d2be0
AS
16433#ifdef __cplusplus
16434extern "C"
16435#endif
98418dba 16436char $ac_func ();
98418dba
CW
16437/* The GNU C library defines this for functions which it implements
16438 to always fail with ENOSYS. Some functions are actually named
16439 something starting with __ and the normal name is an alias. */
ca81d7a0 16440#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16441choke me
98418dba
CW
16442#endif
16443
19650fd6
AS
16444int
16445main ()
16446{
ca81d7a0 16447return $ac_func ();
503d2be0
AS
16448 ;
16449 return 0;
16450}
16451_ACEOF
16452rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16453if { (ac_try="$ac_link"
16454case "(($ac_try" in
16455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16456 *) ac_try_echo=$ac_try;;
16457esac
16458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16459 (eval "$ac_link") 2>conftest.er1
503d2be0 16460 ac_status=$?
edfaf76d
LK
16461 grep -v '^ *+' conftest.er1 >conftest.err
16462 rm -f conftest.er1
16463 cat conftest.err >&5
c0d27fcc 16464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16465 (exit $ac_status); } && {
16466 test -z "$ac_c_werror_flag" ||
16467 test ! -s conftest.err
16468 } && test -s conftest$ac_exeext &&
16469 $as_test_x conftest$ac_exeext; then
98418dba 16470 eval "$as_ac_var=yes"
503d2be0
AS
16471else
16472 echo "$as_me: failed program was:" >&5
19650fd6
AS
16473sed 's/^/| /' conftest.$ac_ext >&5
16474
ca81d7a0 16475 eval "$as_ac_var=no"
503d2be0 16476fi
ca81d7a0 16477
f053c89f 16478rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16479 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16480fi
ca81d7a0
JD
16481ac_res=`eval echo '${'$as_ac_var'}'`
16482 { echo "$as_me:$LINENO: result: $ac_res" >&5
16483echo "${ECHO_T}$ac_res" >&6; }
98418dba 16484if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16485 cat >>confdefs.h <<_ACEOF
98418dba 16486#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16487_ACEOF
ba4481b5 16488
ba4481b5 16489fi
98418dba 16490done
ba4481b5 16491
c0d27fcc
MR
16492
16493
98418dba
CW
16494for ac_header in sys/un.h
16495do
16496as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16497if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16498 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16499echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16500if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 16501 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16502fi
ca81d7a0
JD
16503ac_res=`eval echo '${'$as_ac_Header'}'`
16504 { echo "$as_me:$LINENO: result: $ac_res" >&5
16505echo "${ECHO_T}$ac_res" >&6; }
98418dba 16506else
c0d27fcc 16507 # Is the header compilable?
ca81d7a0
JD
16508{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16509echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16510cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16511/* confdefs.h. */
16512_ACEOF
16513cat confdefs.h >>conftest.$ac_ext
16514cat >>conftest.$ac_ext <<_ACEOF
16515/* end confdefs.h. */
c0d27fcc
MR
16516$ac_includes_default
16517#include <$ac_header>
16518_ACEOF
16519rm -f conftest.$ac_objext
ca81d7a0
JD
16520if { (ac_try="$ac_compile"
16521case "(($ac_try" in
16522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16523 *) ac_try_echo=$ac_try;;
16524esac
16525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16526 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16527 ac_status=$?
edfaf76d
LK
16528 grep -v '^ *+' conftest.er1 >conftest.err
16529 rm -f conftest.er1
16530 cat conftest.err >&5
c0d27fcc 16531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
16532 (exit $ac_status); } && {
16533 test -z "$ac_c_werror_flag" ||
16534 test ! -s conftest.err
16535 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16536 ac_header_compiler=yes
16537else
16538 echo "$as_me: failed program was:" >&5
19650fd6
AS
16539sed 's/^/| /' conftest.$ac_ext >&5
16540
ca81d7a0 16541 ac_header_compiler=no
c0d27fcc 16542fi
ca81d7a0
JD
16543
16544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16545{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16546echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16547
16548# Is the header present?
ca81d7a0
JD
16549{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16550echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16551cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16552/* confdefs.h. */
16553_ACEOF
16554cat confdefs.h >>conftest.$ac_ext
16555cat >>conftest.$ac_ext <<_ACEOF
16556/* end confdefs.h. */
98418dba 16557#include <$ac_header>
503d2be0 16558_ACEOF
ca81d7a0
JD
16559if { (ac_try="$ac_cpp conftest.$ac_ext"
16560case "(($ac_try" in
16561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16562 *) ac_try_echo=$ac_try;;
16563esac
16564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16565 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16566 ac_status=$?
6bae0ccf 16567 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16568 rm -f conftest.er1
16569 cat conftest.err >&5
c0d27fcc 16570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16571 (exit $ac_status); } >/dev/null && {
16572 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16573 test ! -s conftest.err
16574 }; then
c0d27fcc 16575 ac_header_preproc=yes
ba4481b5 16576else
503d2be0 16577 echo "$as_me: failed program was:" >&5
19650fd6
AS
16578sed 's/^/| /' conftest.$ac_ext >&5
16579
c0d27fcc 16580 ac_header_preproc=no
ba4481b5 16581fi
ca81d7a0 16582
503d2be0 16583rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16584{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16585echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16586
16587# So? What about this header?
edfaf76d
LK
16588case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16589 yes:no: )
c0d27fcc
MR
16590 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16591echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16592 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16593echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16594 ac_header_preproc=yes
19650fd6 16595 ;;
edfaf76d 16596 no:yes:* )
c0d27fcc
MR
16597 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16598echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16599 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16600echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16601 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16602echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16603 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16604echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16605 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16606echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16607 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16608echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16609
19650fd6 16610 ;;
c0d27fcc 16611esac
ca81d7a0
JD
16612{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16613echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16614if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16615 echo $ECHO_N "(cached) $ECHO_C" >&6
16616else
edfaf76d 16617 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16618fi
ca81d7a0
JD
16619ac_res=`eval echo '${'$as_ac_Header'}'`
16620 { echo "$as_me:$LINENO: result: $ac_res" >&5
16621echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16622
16623fi
925c2f3f 16624if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16625 cat >>confdefs.h <<_ACEOF
925c2f3f 16626#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16627_ACEOF
503d2be0 16628
925c2f3f 16629fi
c0d27fcc 16630
925c2f3f
EZ
16631done
16632
c0d27fcc
MR
16633
16634
16635
edfaf76d 16636
f053c89f
CY
16637
16638for ac_header in $ac_header_list
925c2f3f
EZ
16639do
16640as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16641if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16642 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16643echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16644if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 16645 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16646fi
ca81d7a0
JD
16647ac_res=`eval echo '${'$as_ac_Header'}'`
16648 { echo "$as_me:$LINENO: result: $ac_res" >&5
16649echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 16650else
c0d27fcc 16651 # Is the header compilable?
ca81d7a0
JD
16652{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16653echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16654cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16655/* confdefs.h. */
16656_ACEOF
16657cat confdefs.h >>conftest.$ac_ext
16658cat >>conftest.$ac_ext <<_ACEOF
16659/* end confdefs.h. */
c0d27fcc
MR
16660$ac_includes_default
16661#include <$ac_header>
16662_ACEOF
16663rm -f conftest.$ac_objext
ca81d7a0
JD
16664if { (ac_try="$ac_compile"
16665case "(($ac_try" in
16666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16667 *) ac_try_echo=$ac_try;;
16668esac
16669eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16670 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16671 ac_status=$?
edfaf76d
LK
16672 grep -v '^ *+' conftest.er1 >conftest.err
16673 rm -f conftest.er1
16674 cat conftest.err >&5
c0d27fcc 16675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16676 (exit $ac_status); } && {
16677 test -z "$ac_c_werror_flag" ||
16678 test ! -s conftest.err
16679 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16680 ac_header_compiler=yes
16681else
16682 echo "$as_me: failed program was:" >&5
19650fd6
AS
16683sed 's/^/| /' conftest.$ac_ext >&5
16684
ca81d7a0 16685 ac_header_compiler=no
c0d27fcc 16686fi
ca81d7a0
JD
16687
16688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16689{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16690echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16691
16692# Is the header present?
ca81d7a0
JD
16693{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16694echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16695cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16696/* confdefs.h. */
16697_ACEOF
16698cat confdefs.h >>conftest.$ac_ext
16699cat >>conftest.$ac_ext <<_ACEOF
16700/* end confdefs.h. */
98418dba 16701#include <$ac_header>
503d2be0 16702_ACEOF
ca81d7a0
JD
16703if { (ac_try="$ac_cpp conftest.$ac_ext"
16704case "(($ac_try" in
16705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16706 *) ac_try_echo=$ac_try;;
16707esac
16708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16709 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16710 ac_status=$?
6bae0ccf 16711 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16712 rm -f conftest.er1
16713 cat conftest.err >&5
c0d27fcc 16714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16715 (exit $ac_status); } >/dev/null && {
16716 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16717 test ! -s conftest.err
16718 }; then
c0d27fcc 16719 ac_header_preproc=yes
98418dba
CW
16720else
16721 echo "$as_me: failed program was:" >&5
19650fd6
AS
16722sed 's/^/| /' conftest.$ac_ext >&5
16723
c0d27fcc 16724 ac_header_preproc=no
98418dba 16725fi
ca81d7a0 16726
98418dba 16727rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16728{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16729echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16730
16731# So? What about this header?
edfaf76d
LK
16732case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16733 yes:no: )
c0d27fcc
MR
16734 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16735echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16736 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16737echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16738 ac_header_preproc=yes
19650fd6 16739 ;;
edfaf76d 16740 no:yes:* )
c0d27fcc
MR
16741 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16742echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16743 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16744echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16745 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16746echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16747 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16748echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16749 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16750echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16751 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16752echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16753
19650fd6 16754 ;;
c0d27fcc 16755esac
ca81d7a0
JD
16756{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16757echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16758if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16759 echo $ECHO_N "(cached) $ECHO_C" >&6
16760else
edfaf76d 16761 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 16762fi
ca81d7a0
JD
16763ac_res=`eval echo '${'$as_ac_Header'}'`
16764 { echo "$as_me:$LINENO: result: $ac_res" >&5
16765echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16766
16767fi
98418dba 16768if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16769 cat >>confdefs.h <<_ACEOF
98418dba 16770#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16771_ACEOF
98418dba
CW
16772
16773fi
c0d27fcc 16774
98418dba
CW
16775done
16776
c0d27fcc 16777
f053c89f
CY
16778
16779
16780
16781
16782
16783
16784
16785for ac_func in $ac_func_list
98418dba
CW
16786do
16787as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16788{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16789echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16790if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16791 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16792else
98418dba 16793 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16794/* confdefs.h. */
16795_ACEOF
16796cat confdefs.h >>conftest.$ac_ext
16797cat >>conftest.$ac_ext <<_ACEOF
16798/* end confdefs.h. */
edfaf76d
LK
16799/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16800 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16801#define $ac_func innocuous_$ac_func
16802
98418dba 16803/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16804 which can conflict with char $ac_func (); below.
16805 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16806 <limits.h> exists even on freestanding compilers. */
edfaf76d 16807
19650fd6
AS
16808#ifdef __STDC__
16809# include <limits.h>
16810#else
16811# include <assert.h>
16812#endif
edfaf76d
LK
16813
16814#undef $ac_func
16815
ca81d7a0
JD
16816/* Override any GCC internal prototype to avoid an error.
16817 Use char because int might match the return type of a GCC
16818 builtin and then its argument prototype would still apply. */
503d2be0
AS
16819#ifdef __cplusplus
16820extern "C"
16821#endif
98418dba 16822char $ac_func ();
98418dba
CW
16823/* The GNU C library defines this for functions which it implements
16824 to always fail with ENOSYS. Some functions are actually named
16825 something starting with __ and the normal name is an alias. */
ca81d7a0 16826#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16827choke me
98418dba
CW
16828#endif
16829
19650fd6
AS
16830int
16831main ()
16832{
ca81d7a0 16833return $ac_func ();
503d2be0
AS
16834 ;
16835 return 0;
16836}
16837_ACEOF
16838rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16839if { (ac_try="$ac_link"
16840case "(($ac_try" in
16841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16842 *) ac_try_echo=$ac_try;;
16843esac
16844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16845 (eval "$ac_link") 2>conftest.er1
503d2be0 16846 ac_status=$?
edfaf76d
LK
16847 grep -v '^ *+' conftest.er1 >conftest.err
16848 rm -f conftest.er1
16849 cat conftest.err >&5
c0d27fcc 16850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16851 (exit $ac_status); } && {
16852 test -z "$ac_c_werror_flag" ||
16853 test ! -s conftest.err
16854 } && test -s conftest$ac_exeext &&
16855 $as_test_x conftest$ac_exeext; then
98418dba 16856 eval "$as_ac_var=yes"
503d2be0
AS
16857else
16858 echo "$as_me: failed program was:" >&5
19650fd6
AS
16859sed 's/^/| /' conftest.$ac_ext >&5
16860
ca81d7a0 16861 eval "$as_ac_var=no"
503d2be0 16862fi
ca81d7a0 16863
f053c89f 16864rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16865 conftest$ac_exeext conftest.$ac_ext
ffe36136 16866fi
ca81d7a0
JD
16867ac_res=`eval echo '${'$as_ac_var'}'`
16868 { echo "$as_me:$LINENO: result: $ac_res" >&5
16869echo "${ECHO_T}$ac_res" >&6; }
98418dba 16870if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16871 cat >>confdefs.h <<_ACEOF
98418dba 16872#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16873_ACEOF
ffe36136 16874
ba4481b5 16875fi
98418dba 16876done
ba4481b5 16877
f053c89f
CY
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
ca81d7a0
JD
16894{ echo "$as_me:$LINENO: checking for working mktime" >&5
16895echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
16896if test "${ac_cv_func_working_mktime+set}" = set; then
16897 echo $ECHO_N "(cached) $ECHO_C" >&6
16898else
16899 if test "$cross_compiling" = yes; then
16900 ac_cv_func_working_mktime=no
16901else
16902 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16903/* confdefs.h. */
16904_ACEOF
16905cat confdefs.h >>conftest.$ac_ext
16906cat >>conftest.$ac_ext <<_ACEOF
16907/* end confdefs.h. */
98418dba 16908/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 16909#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16910# include <sys/time.h>
16911# include <time.h>
16912#else
f053c89f 16913# ifdef HAVE_SYS_TIME_H
98418dba
CW
16914# include <sys/time.h>
16915# else
16916# include <time.h>
16917# endif
16918#endif
ba4481b5 16919
f053c89f 16920#include <stdlib.h>
edfaf76d 16921
f053c89f 16922#ifdef HAVE_UNISTD_H
98418dba
CW
16923# include <unistd.h>
16924#endif
ba4481b5 16925
f053c89f 16926#ifndef HAVE_ALARM
98418dba
CW
16927# define alarm(X) /* empty */
16928#endif
df645f7c 16929
98418dba
CW
16930/* Work around redefinition to rpl_putenv by other config tests. */
16931#undef putenv
df645f7c 16932
98418dba 16933static time_t time_t_max;
edfaf76d 16934static time_t time_t_min;
df645f7c 16935
98418dba 16936/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16937static char *tz_strings[] = {
16938 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16939 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16940};
16941#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16942
ca81d7a0 16943/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16944 Based on a problem report from Andreas Jaeger. */
ca81d7a0 16945static int
98418dba
CW
16946spring_forward_gap ()
16947{
16948 /* glibc (up to about 1998-10-07) failed this test. */
16949 struct tm tm;
16950
16951 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16952 instead of "TZ=America/Vancouver" in order to detect the bug even
16953 on systems that don't support the Olson extension, or don't have the
16954 full zoneinfo tables installed. */
16955 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16956
16957 tm.tm_year = 98;
16958 tm.tm_mon = 3;
16959 tm.tm_mday = 5;
16960 tm.tm_hour = 2;
16961 tm.tm_min = 0;
16962 tm.tm_sec = 0;
16963 tm.tm_isdst = -1;
ca81d7a0 16964 return mktime (&tm) != (time_t) -1;
98418dba
CW
16965}
16966
ca81d7a0 16967static int
edfaf76d 16968mktime_test1 (now)
98418dba
CW
16969 time_t now;
16970{
16971 struct tm *lt;
ca81d7a0 16972 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16973}
16974
ca81d7a0 16975static int
edfaf76d
LK
16976mktime_test (now)
16977 time_t now;
16978{
ca81d7a0
JD
16979 return (mktime_test1 (now)
16980 && mktime_test1 ((time_t) (time_t_max - now))
16981 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16982}
16983
ca81d7a0 16984static int
98418dba
CW
16985irix_6_4_bug ()
16986{
16987 /* Based on code from Ariel Faigon. */
16988 struct tm tm;
16989 tm.tm_year = 96;
16990 tm.tm_mon = 3;
16991 tm.tm_mday = 0;
16992 tm.tm_hour = 0;
16993 tm.tm_min = 0;
16994 tm.tm_sec = 0;
16995 tm.tm_isdst = -1;
16996 mktime (&tm);
ca81d7a0 16997 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16998}
16999
ca81d7a0 17000static int
98418dba
CW
17001bigtime_test (j)
17002 int j;
17003{
17004 struct tm tm;
17005 time_t now;
17006 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
17007 now = mktime (&tm);
17008 if (now != (time_t) -1)
17009 {
17010 struct tm *lt = localtime (&now);
17011 if (! (lt
17012 && lt->tm_year == tm.tm_year
17013 && lt->tm_mon == tm.tm_mon
17014 && lt->tm_mday == tm.tm_mday
17015 && lt->tm_hour == tm.tm_hour
17016 && lt->tm_min == tm.tm_min
17017 && lt->tm_sec == tm.tm_sec
17018 && lt->tm_yday == tm.tm_yday
17019 && lt->tm_wday == tm.tm_wday
17020 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
17021 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 17022 return 0;
98418dba 17023 }
ca81d7a0 17024 return 1;
98418dba
CW
17025}
17026
f053c89f
CY
17027static int
17028year_2050_test ()
17029{
17030 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
17031 ignoring leap seconds. */
17032 unsigned long int answer = 2527315200UL;
17033
17034 struct tm tm;
17035 time_t t;
17036 tm.tm_year = 2050 - 1900;
17037 tm.tm_mon = 2 - 1;
17038 tm.tm_mday = 1;
17039 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
17040 tm.tm_isdst = -1;
17041
17042 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
17043 instead of "TZ=America/Vancouver" in order to detect the bug even
17044 on systems that don't support the Olson extension, or don't have the
17045 full zoneinfo tables installed. */
17046 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
17047
17048 t = mktime (&tm);
17049
17050 /* Check that the result is either a failure, or close enough
17051 to the correct answer that we can assume the discrepancy is
17052 due to leap seconds. */
17053 return (t == (time_t) -1
17054 || (0 < t && answer - 120 <= t && t <= answer + 120));
98418dba
CW
17055}
17056
17057int
17058main ()
17059{
17060 time_t t, delta;
17061 int i, j;
17062
17063 /* This test makes some buggy mktime implementations loop.
17064 Give up after 60 seconds; a mktime slower than that
17065 isn't worth using anyway. */
17066 alarm (60);
17067
06b62770
AR
17068 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
17069 continue;
17070 time_t_max--;
17071 if ((time_t) -1 < 0)
17072 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
17073 continue;
98418dba
CW
17074 delta = time_t_max / 997; /* a suitable prime number */
17075 for (i = 0; i < N_STRINGS; i++)
17076 {
17077 if (tz_strings[i])
17078 putenv (tz_strings[i]);
503d2be0 17079
98418dba 17080 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
17081 if (! mktime_test (t))
17082 return 1;
17083 if (! (mktime_test ((time_t) 1)
17084 && mktime_test ((time_t) (60 * 60))
17085 && mktime_test ((time_t) (60 * 60 * 24))))
17086 return 1;
98418dba 17087
06b62770 17088 for (j = 1; 0 < j; j *= 2)
ca81d7a0
JD
17089 if (! bigtime_test (j))
17090 return 1;
06b62770 17091 if (! bigtime_test (j - 1))
ca81d7a0 17092 return 1;
98418dba 17093 }
f053c89f 17094 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
17095}
17096_ACEOF
98418dba 17097rm -f conftest$ac_exeext
ca81d7a0
JD
17098if { (ac_try="$ac_link"
17099case "(($ac_try" in
17100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17101 *) ac_try_echo=$ac_try;;
17102esac
17103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17104 (eval "$ac_link") 2>&5
503d2be0 17105 ac_status=$?
c0d27fcc 17106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 17107 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
17108 { (case "(($ac_try" in
17109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17110 *) ac_try_echo=$ac_try;;
17111esac
17112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17113 (eval "$ac_try") 2>&5
503d2be0 17114 ac_status=$?
c0d27fcc 17115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 17116 (exit $ac_status); }; }; then
98418dba 17117 ac_cv_func_working_mktime=yes
503d2be0 17118else
98418dba
CW
17119 echo "$as_me: program exited with status $ac_status" >&5
17120echo "$as_me: failed program was:" >&5
19650fd6
AS
17121sed 's/^/| /' conftest.$ac_ext >&5
17122
c0d27fcc 17123( exit $ac_status )
98418dba 17124ac_cv_func_working_mktime=no
503d2be0 17125fi
ca81d7a0 17126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 17127fi
ca81d7a0
JD
17128
17129
ba4481b5 17130fi
ca81d7a0
JD
17131{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
17132echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 17133if test $ac_cv_func_working_mktime = no; then
ca81d7a0 17134 case " $LIBOBJS " in
edfaf76d 17135 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
17136 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
17137 ;;
edfaf76d
LK
17138esac
17139
ba4481b5
DL
17140fi
17141
98418dba 17142if test "$ac_cv_func_working_mktime" = no; then
b936fae4 17143
c0d27fcc 17144cat >>confdefs.h <<\_ACEOF
98418dba 17145#define BROKEN_MKTIME 1
c0d27fcc 17146_ACEOF
ba4481b5 17147
ba4481b5 17148fi
503d2be0 17149
98418dba
CW
17150ac_have_func=no # yes means we've found a way to get the load average.
17151
6bae0ccf
DL
17152# Make sure getloadavg.c is where it belongs, at configure-time.
17153test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
17154 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
17155echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
17156 { (exit 1); exit 1; }; }
17157
98418dba
CW
17158ac_save_LIBS=$LIBS
17159
17160# Check for getloadavg, but be sure not to touch the cache variable.
ca81d7a0
JD
17161({ echo "$as_me:$LINENO: checking for getloadavg" >&5
17162echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 17163if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 17164 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17165else
503d2be0 17166 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17167/* confdefs.h. */
17168_ACEOF
17169cat confdefs.h >>conftest.$ac_ext
17170cat >>conftest.$ac_ext <<_ACEOF
17171/* end confdefs.h. */
edfaf76d
LK
17172/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
17173 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17174#define getloadavg innocuous_getloadavg
17175
98418dba 17176/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17177 which can conflict with char getloadavg (); below.
17178 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17179 <limits.h> exists even on freestanding compilers. */
edfaf76d 17180
19650fd6
AS
17181#ifdef __STDC__
17182# include <limits.h>
17183#else
17184# include <assert.h>
17185#endif
edfaf76d
LK
17186
17187#undef getloadavg
17188
ca81d7a0
JD
17189/* Override any GCC internal prototype to avoid an error.
17190 Use char because int might match the return type of a GCC
17191 builtin and then its argument prototype would still apply. */
503d2be0
AS
17192#ifdef __cplusplus
17193extern "C"
17194#endif
98418dba 17195char getloadavg ();
98418dba
CW
17196/* The GNU C library defines this for functions which it implements
17197 to always fail with ENOSYS. Some functions are actually named
17198 something starting with __ and the normal name is an alias. */
ca81d7a0 17199#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 17200choke me
cd958eb3
MB
17201#endif
17202
19650fd6
AS
17203int
17204main ()
17205{
ca81d7a0 17206return getloadavg ();
503d2be0
AS
17207 ;
17208 return 0;
17209}
17210_ACEOF
17211rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17212if { (ac_try="$ac_link"
17213case "(($ac_try" in
17214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17215 *) ac_try_echo=$ac_try;;
17216esac
17217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17218 (eval "$ac_link") 2>conftest.er1
503d2be0 17219 ac_status=$?
edfaf76d
LK
17220 grep -v '^ *+' conftest.er1 >conftest.err
17221 rm -f conftest.er1
17222 cat conftest.err >&5
c0d27fcc 17223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17224 (exit $ac_status); } && {
17225 test -z "$ac_c_werror_flag" ||
17226 test ! -s conftest.err
17227 } && test -s conftest$ac_exeext &&
17228 $as_test_x conftest$ac_exeext; then
98418dba 17229 ac_cv_func_getloadavg=yes
503d2be0
AS
17230else
17231 echo "$as_me: failed program was:" >&5
19650fd6
AS
17232sed 's/^/| /' conftest.$ac_ext >&5
17233
ca81d7a0 17234 ac_cv_func_getloadavg=no
503d2be0 17235fi
ca81d7a0 17236
f053c89f 17237rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17238 conftest$ac_exeext conftest.$ac_ext
ba4481b5 17239fi
ca81d7a0
JD
17240{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
17241echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
17242if test $ac_cv_func_getloadavg = yes; then
17243 exit 0
17244else
17245 exit 1
ba4481b5 17246fi
98418dba 17247) && ac_have_func=yes
ba4481b5 17248
98418dba 17249# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 17250
98418dba
CW
17251for ac_func in pstat_getdynamic
17252do
17253as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17254{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17255echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17256if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17257 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17258else
503d2be0 17259 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17260/* confdefs.h. */
17261_ACEOF
17262cat confdefs.h >>conftest.$ac_ext
17263cat >>conftest.$ac_ext <<_ACEOF
17264/* end confdefs.h. */
edfaf76d
LK
17265/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17266 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17267#define $ac_func innocuous_$ac_func
17268
98418dba 17269/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17270 which can conflict with char $ac_func (); below.
17271 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17272 <limits.h> exists even on freestanding compilers. */
edfaf76d 17273
19650fd6
AS
17274#ifdef __STDC__
17275# include <limits.h>
17276#else
17277# include <assert.h>
17278#endif
edfaf76d
LK
17279
17280#undef $ac_func
17281
ca81d7a0
JD
17282/* Override any GCC internal prototype to avoid an error.
17283 Use char because int might match the return type of a GCC
17284 builtin and then its argument prototype would still apply. */
503d2be0
AS
17285#ifdef __cplusplus
17286extern "C"
17287#endif
98418dba 17288char $ac_func ();
98418dba
CW
17289/* The GNU C library defines this for functions which it implements
17290 to always fail with ENOSYS. Some functions are actually named
17291 something starting with __ and the normal name is an alias. */
ca81d7a0 17292#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 17293choke me
98418dba
CW
17294#endif
17295
19650fd6
AS
17296int
17297main ()
17298{
ca81d7a0 17299return $ac_func ();
98418dba
CW
17300 ;
17301 return 0;
17302}
f21fadcc 17303_ACEOF
98418dba 17304rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17305if { (ac_try="$ac_link"
17306case "(($ac_try" in
17307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17308 *) ac_try_echo=$ac_try;;
17309esac
17310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17311 (eval "$ac_link") 2>conftest.er1
f21fadcc 17312 ac_status=$?
edfaf76d
LK
17313 grep -v '^ *+' conftest.er1 >conftest.err
17314 rm -f conftest.er1
17315 cat conftest.err >&5
c0d27fcc 17316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17317 (exit $ac_status); } && {
17318 test -z "$ac_c_werror_flag" ||
17319 test ! -s conftest.err
17320 } && test -s conftest$ac_exeext &&
17321 $as_test_x conftest$ac_exeext; then
98418dba 17322 eval "$as_ac_var=yes"
f21fadcc
JD
17323else
17324 echo "$as_me: failed program was:" >&5
19650fd6
AS
17325sed 's/^/| /' conftest.$ac_ext >&5
17326
ca81d7a0 17327 eval "$as_ac_var=no"
f21fadcc 17328fi
ca81d7a0 17329
f053c89f 17330rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17331 conftest$ac_exeext conftest.$ac_ext
f21fadcc 17332fi
ca81d7a0
JD
17333ac_res=`eval echo '${'$as_ac_var'}'`
17334 { echo "$as_me:$LINENO: result: $ac_res" >&5
17335echo "${ECHO_T}$ac_res" >&6; }
98418dba 17336if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17337 cat >>confdefs.h <<_ACEOF
98418dba 17338#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17339_ACEOF
98418dba
CW
17340
17341fi
17342done
17343
c0d27fcc 17344
98418dba
CW
17345# Solaris has libkstat which does not require root.
17346
ca81d7a0
JD
17347{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
17348echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 17349if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
17350 echo $ECHO_N "(cached) $ECHO_C" >&6
17351else
17352 ac_check_lib_save_LIBS=$LIBS
98418dba 17353LIBS="-lkstat $LIBS"
f21fadcc 17354cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17355/* confdefs.h. */
17356_ACEOF
17357cat confdefs.h >>conftest.$ac_ext
17358cat >>conftest.$ac_ext <<_ACEOF
17359/* end confdefs.h. */
f21fadcc 17360
ca81d7a0
JD
17361/* Override any GCC internal prototype to avoid an error.
17362 Use char because int might match the return type of a GCC
17363 builtin and then its argument prototype would still apply. */
f21fadcc
JD
17364#ifdef __cplusplus
17365extern "C"
17366#endif
98418dba 17367char kstat_open ();
f21fadcc
JD
17368int
17369main ()
17370{
ca81d7a0 17371return kstat_open ();
f21fadcc
JD
17372 ;
17373 return 0;
17374}
17375_ACEOF
17376rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17377if { (ac_try="$ac_link"
17378case "(($ac_try" in
17379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17380 *) ac_try_echo=$ac_try;;
17381esac
17382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17383 (eval "$ac_link") 2>conftest.er1
f21fadcc 17384 ac_status=$?
edfaf76d
LK
17385 grep -v '^ *+' conftest.er1 >conftest.err
17386 rm -f conftest.er1
17387 cat conftest.err >&5
c0d27fcc 17388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17389 (exit $ac_status); } && {
17390 test -z "$ac_c_werror_flag" ||
17391 test ! -s conftest.err
17392 } && test -s conftest$ac_exeext &&
17393 $as_test_x conftest$ac_exeext; then
98418dba 17394 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
17395else
17396 echo "$as_me: failed program was:" >&5
19650fd6
AS
17397sed 's/^/| /' conftest.$ac_ext >&5
17398
ca81d7a0 17399 ac_cv_lib_kstat_kstat_open=no
f21fadcc 17400fi
ca81d7a0 17401
f053c89f 17402rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17403 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
17404LIBS=$ac_check_lib_save_LIBS
17405fi
ca81d7a0
JD
17406{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
17407echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 17408if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 17409 cat >>confdefs.h <<_ACEOF
98418dba 17410#define HAVE_LIBKSTAT 1
c0d27fcc 17411_ACEOF
f21fadcc 17412
98418dba 17413 LIBS="-lkstat $LIBS"
f21fadcc 17414
f21fadcc
JD
17415fi
17416
98418dba
CW
17417test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
17418
17419# Some systems with -lutil have (and need) -lkvm as well, some do not.
17420# On Solaris, -lkvm requires nlist from -lelf, so check that first
17421# to get the right answer into the cache.
17422# For kstat on solaris, we need libelf to force the definition of SVR4 below.
17423if test $ac_have_func = no; then
ca81d7a0
JD
17424 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
17425echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 17426if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 17427 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17428else
98418dba
CW
17429 ac_check_lib_save_LIBS=$LIBS
17430LIBS="-lelf $LIBS"
17431cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17432/* confdefs.h. */
17433_ACEOF
17434cat confdefs.h >>conftest.$ac_ext
17435cat >>conftest.$ac_ext <<_ACEOF
17436/* end confdefs.h. */
98418dba 17437
ca81d7a0
JD
17438/* Override any GCC internal prototype to avoid an error.
17439 Use char because int might match the return type of a GCC
17440 builtin and then its argument prototype would still apply. */
98418dba
CW
17441#ifdef __cplusplus
17442extern "C"
17443#endif
98418dba 17444char elf_begin ();
503d2be0
AS
17445int
17446main ()
17447{
ca81d7a0 17448return elf_begin ();
503d2be0
AS
17449 ;
17450 return 0;
17451}
17452_ACEOF
17453rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17454if { (ac_try="$ac_link"
17455case "(($ac_try" in
17456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17457 *) ac_try_echo=$ac_try;;
17458esac
17459eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17460 (eval "$ac_link") 2>conftest.er1
503d2be0 17461 ac_status=$?
edfaf76d
LK
17462 grep -v '^ *+' conftest.er1 >conftest.err
17463 rm -f conftest.er1
17464 cat conftest.err >&5
c0d27fcc 17465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17466 (exit $ac_status); } && {
17467 test -z "$ac_c_werror_flag" ||
17468 test ! -s conftest.err
17469 } && test -s conftest$ac_exeext &&
17470 $as_test_x conftest$ac_exeext; then
98418dba 17471 ac_cv_lib_elf_elf_begin=yes
ba4481b5 17472else
503d2be0 17473 echo "$as_me: failed program was:" >&5
19650fd6
AS
17474sed 's/^/| /' conftest.$ac_ext >&5
17475
ca81d7a0 17476 ac_cv_lib_elf_elf_begin=no
ba4481b5 17477fi
ca81d7a0 17478
f053c89f 17479rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17480 conftest$ac_exeext conftest.$ac_ext
98418dba 17481LIBS=$ac_check_lib_save_LIBS
ba4481b5 17482fi
ca81d7a0
JD
17483{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
17484echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
17485if test $ac_cv_lib_elf_elf_begin = yes; then
17486 LIBS="-lelf $LIBS"
ba4481b5
DL
17487fi
17488
98418dba
CW
17489fi
17490if test $ac_have_func = no; then
ca81d7a0
JD
17491 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
17492echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 17493if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 17494 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17495else
98418dba
CW
17496 ac_check_lib_save_LIBS=$LIBS
17497LIBS="-lkvm $LIBS"
17498cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17499/* confdefs.h. */
17500_ACEOF
17501cat confdefs.h >>conftest.$ac_ext
17502cat >>conftest.$ac_ext <<_ACEOF
17503/* end confdefs.h. */
98418dba 17504
ca81d7a0
JD
17505/* Override any GCC internal prototype to avoid an error.
17506 Use char because int might match the return type of a GCC
17507 builtin and then its argument prototype would still apply. */
98418dba
CW
17508#ifdef __cplusplus
17509extern "C"
17510#endif
98418dba 17511char kvm_open ();
503d2be0
AS
17512int
17513main ()
17514{
ca81d7a0 17515return kvm_open ();
503d2be0
AS
17516 ;
17517 return 0;
17518}
17519_ACEOF
17520rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17521if { (ac_try="$ac_link"
17522case "(($ac_try" in
17523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17524 *) ac_try_echo=$ac_try;;
17525esac
17526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17527 (eval "$ac_link") 2>conftest.er1
503d2be0 17528 ac_status=$?
edfaf76d
LK
17529 grep -v '^ *+' conftest.er1 >conftest.err
17530 rm -f conftest.er1
17531 cat conftest.err >&5
c0d27fcc 17532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17533 (exit $ac_status); } && {
17534 test -z "$ac_c_werror_flag" ||
17535 test ! -s conftest.err
17536 } && test -s conftest$ac_exeext &&
17537 $as_test_x conftest$ac_exeext; then
98418dba 17538 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
17539else
17540 echo "$as_me: failed program was:" >&5
19650fd6
AS
17541sed 's/^/| /' conftest.$ac_ext >&5
17542
ca81d7a0 17543 ac_cv_lib_kvm_kvm_open=no
503d2be0 17544fi
ca81d7a0 17545
f053c89f 17546rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17547 conftest$ac_exeext conftest.$ac_ext
98418dba 17548LIBS=$ac_check_lib_save_LIBS
503d2be0 17549fi
ca81d7a0
JD
17550{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
17551echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
17552if test $ac_cv_lib_kvm_kvm_open = yes; then
17553 LIBS="-lkvm $LIBS"
ba4481b5
DL
17554fi
17555
98418dba 17556 # Check for the 4.4BSD definition of getloadavg.
ca81d7a0
JD
17557 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
17558echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 17559if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 17560 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17561else
98418dba
CW
17562 ac_check_lib_save_LIBS=$LIBS
17563LIBS="-lutil $LIBS"
17564cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17565/* confdefs.h. */
17566_ACEOF
17567cat confdefs.h >>conftest.$ac_ext
17568cat >>conftest.$ac_ext <<_ACEOF
17569/* end confdefs.h. */
98418dba 17570
ca81d7a0
JD
17571/* Override any GCC internal prototype to avoid an error.
17572 Use char because int might match the return type of a GCC
17573 builtin and then its argument prototype would still apply. */
98418dba
CW
17574#ifdef __cplusplus
17575extern "C"
17576#endif
98418dba 17577char getloadavg ();
503d2be0
AS
17578int
17579main ()
17580{
ca81d7a0 17581return getloadavg ();
503d2be0
AS
17582 ;
17583 return 0;
17584}
17585_ACEOF
17586rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17587if { (ac_try="$ac_link"
17588case "(($ac_try" in
17589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17590 *) ac_try_echo=$ac_try;;
17591esac
17592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17593 (eval "$ac_link") 2>conftest.er1
503d2be0 17594 ac_status=$?
edfaf76d
LK
17595 grep -v '^ *+' conftest.er1 >conftest.err
17596 rm -f conftest.er1
17597 cat conftest.err >&5
c0d27fcc 17598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17599 (exit $ac_status); } && {
17600 test -z "$ac_c_werror_flag" ||
17601 test ! -s conftest.err
17602 } && test -s conftest$ac_exeext &&
17603 $as_test_x conftest$ac_exeext; then
35996d22
AS
17604 ac_cv_lib_util_getloadavg=yes
17605else
503d2be0 17606 echo "$as_me: failed program was:" >&5
19650fd6
AS
17607sed 's/^/| /' conftest.$ac_ext >&5
17608
ca81d7a0 17609 ac_cv_lib_util_getloadavg=no
ba4481b5 17610fi
ca81d7a0 17611
f053c89f 17612rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17613 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17614LIBS=$ac_check_lib_save_LIBS
17615fi
ca81d7a0
JD
17616{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
17617echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
17618if test $ac_cv_lib_util_getloadavg = yes; then
17619 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 17620fi
503d2be0 17621
98418dba 17622fi
ba4481b5 17623
98418dba
CW
17624if test $ac_have_func = no; then
17625 # There is a commonly available library for RS/6000 AIX.
17626 # Since it is not a standard part of AIX, it might be installed locally.
17627 ac_getloadavg_LIBS=$LIBS
17628 LIBS="-L/usr/local/lib $LIBS"
ca81d7a0
JD
17629 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
17630echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 17631if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 17632 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17633else
98418dba
CW
17634 ac_check_lib_save_LIBS=$LIBS
17635LIBS="-lgetloadavg $LIBS"
17636cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17637/* confdefs.h. */
17638_ACEOF
17639cat confdefs.h >>conftest.$ac_ext
17640cat >>conftest.$ac_ext <<_ACEOF
17641/* end confdefs.h. */
ba4481b5 17642
ca81d7a0
JD
17643/* Override any GCC internal prototype to avoid an error.
17644 Use char because int might match the return type of a GCC
17645 builtin and then its argument prototype would still apply. */
98418dba
CW
17646#ifdef __cplusplus
17647extern "C"
17648#endif
98418dba 17649char getloadavg ();
98418dba
CW
17650int
17651main ()
17652{
ca81d7a0 17653return getloadavg ();
98418dba
CW
17654 ;
17655 return 0;
17656}
503d2be0 17657_ACEOF
98418dba 17658rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17659if { (ac_try="$ac_link"
17660case "(($ac_try" in
17661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17662 *) ac_try_echo=$ac_try;;
17663esac
17664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17665 (eval "$ac_link") 2>conftest.er1
98418dba 17666 ac_status=$?
edfaf76d
LK
17667 grep -v '^ *+' conftest.er1 >conftest.err
17668 rm -f conftest.er1
17669 cat conftest.err >&5
c0d27fcc 17670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17671 (exit $ac_status); } && {
17672 test -z "$ac_c_werror_flag" ||
17673 test ! -s conftest.err
17674 } && test -s conftest$ac_exeext &&
17675 $as_test_x conftest$ac_exeext; then
98418dba 17676 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 17677else
98418dba 17678 echo "$as_me: failed program was:" >&5
19650fd6
AS
17679sed 's/^/| /' conftest.$ac_ext >&5
17680
ca81d7a0 17681 ac_cv_lib_getloadavg_getloadavg=no
98418dba 17682fi
ca81d7a0 17683
f053c89f 17684rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17685 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17686LIBS=$ac_check_lib_save_LIBS
17687fi
ca81d7a0
JD
17688{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
17689echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
17690if test $ac_cv_lib_getloadavg_getloadavg = yes; then
17691 LIBS="-lgetloadavg $LIBS"
17692else
17693 LIBS=$ac_getloadavg_LIBS
ba4481b5 17694fi
ba4481b5
DL
17695
17696fi
98418dba
CW
17697
17698# Make sure it is really in the library, if we think we found it,
17699# otherwise set up the replacement function.
17700
17701for ac_func in getloadavg
17702do
17703as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17704{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17705echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17706if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17707 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17708else
503d2be0 17709 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17710/* confdefs.h. */
17711_ACEOF
17712cat confdefs.h >>conftest.$ac_ext
17713cat >>conftest.$ac_ext <<_ACEOF
17714/* end confdefs.h. */
edfaf76d
LK
17715/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17716 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17717#define $ac_func innocuous_$ac_func
17718
ba4481b5 17719/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17720 which can conflict with char $ac_func (); below.
17721 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17722 <limits.h> exists even on freestanding compilers. */
edfaf76d 17723
19650fd6
AS
17724#ifdef __STDC__
17725# include <limits.h>
17726#else
17727# include <assert.h>
17728#endif
edfaf76d
LK
17729
17730#undef $ac_func
17731
ca81d7a0
JD
17732/* Override any GCC internal prototype to avoid an error.
17733 Use char because int might match the return type of a GCC
17734 builtin and then its argument prototype would still apply. */
503d2be0
AS
17735#ifdef __cplusplus
17736extern "C"
17737#endif
503d2be0 17738char $ac_func ();
ba4481b5
DL
17739/* The GNU C library defines this for functions which it implements
17740 to always fail with ENOSYS. Some functions are actually named
17741 something starting with __ and the normal name is an alias. */
ca81d7a0 17742#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17743choke me
cd958eb3
MB
17744#endif
17745
19650fd6
AS
17746int
17747main ()
17748{
ca81d7a0 17749return $ac_func ();
503d2be0
AS
17750 ;
17751 return 0;
17752}
17753_ACEOF
17754rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17755if { (ac_try="$ac_link"
17756case "(($ac_try" in
17757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17758 *) ac_try_echo=$ac_try;;
17759esac
17760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17761 (eval "$ac_link") 2>conftest.er1
503d2be0 17762 ac_status=$?
edfaf76d
LK
17763 grep -v '^ *+' conftest.er1 >conftest.err
17764 rm -f conftest.er1
17765 cat conftest.err >&5
c0d27fcc 17766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17767 (exit $ac_status); } && {
17768 test -z "$ac_c_werror_flag" ||
17769 test ! -s conftest.err
17770 } && test -s conftest$ac_exeext &&
17771 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17772 eval "$as_ac_var=yes"
17773else
17774 echo "$as_me: failed program was:" >&5
19650fd6
AS
17775sed 's/^/| /' conftest.$ac_ext >&5
17776
ca81d7a0 17777 eval "$as_ac_var=no"
503d2be0 17778fi
ca81d7a0 17779
f053c89f 17780rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17781 conftest$ac_exeext conftest.$ac_ext
503d2be0 17782fi
ca81d7a0
JD
17783ac_res=`eval echo '${'$as_ac_var'}'`
17784 { echo "$as_me:$LINENO: result: $ac_res" >&5
17785echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17786if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17787 cat >>confdefs.h <<_ACEOF
98418dba 17788#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17789_ACEOF
503d2be0 17790
98418dba 17791else
ca81d7a0 17792 case " $LIBOBJS " in
edfaf76d 17793 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
17794 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
17795 ;;
edfaf76d
LK
17796esac
17797
ba4481b5 17798
c0d27fcc 17799cat >>confdefs.h <<\_ACEOF
98418dba 17800#define C_GETLOADAVG 1
c0d27fcc 17801_ACEOF
ba4481b5 17802
98418dba
CW
17803# Figure out what our getloadavg.c needs.
17804ac_have_func=no
c0d27fcc 17805if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
ca81d7a0
JD
17806 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17807echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 17808if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 17809 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17810fi
ca81d7a0
JD
17811{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17812echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 17813else
c0d27fcc 17814 # Is the header compilable?
ca81d7a0
JD
17815{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
17816echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 17817cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17818/* confdefs.h. */
17819_ACEOF
17820cat confdefs.h >>conftest.$ac_ext
17821cat >>conftest.$ac_ext <<_ACEOF
17822/* end confdefs.h. */
c0d27fcc
MR
17823$ac_includes_default
17824#include <sys/dg_sys_info.h>
17825_ACEOF
17826rm -f conftest.$ac_objext
ca81d7a0
JD
17827if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
c0d27fcc 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_objext; then
c0d27fcc
MR
17843 ac_header_compiler=yes
17844else
17845 echo "$as_me: failed program was:" >&5
19650fd6
AS
17846sed 's/^/| /' conftest.$ac_ext >&5
17847
ca81d7a0 17848 ac_header_compiler=no
c0d27fcc 17849fi
ca81d7a0
JD
17850
17851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17852{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17853echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17854
17855# Is the header present?
ca81d7a0
JD
17856{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
17857echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 17858cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17859/* confdefs.h. */
17860_ACEOF
17861cat confdefs.h >>conftest.$ac_ext
17862cat >>conftest.$ac_ext <<_ACEOF
17863/* end confdefs.h. */
98418dba
CW
17864#include <sys/dg_sys_info.h>
17865_ACEOF
ca81d7a0
JD
17866if { (ac_try="$ac_cpp conftest.$ac_ext"
17867case "(($ac_try" in
17868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17869 *) ac_try_echo=$ac_try;;
17870esac
17871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17872 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17873 ac_status=$?
6bae0ccf 17874 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17875 rm -f conftest.er1
17876 cat conftest.err >&5
c0d27fcc 17877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17878 (exit $ac_status); } >/dev/null && {
17879 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17880 test ! -s conftest.err
17881 }; then
c0d27fcc 17882 ac_header_preproc=yes
98418dba
CW
17883else
17884 echo "$as_me: failed program was:" >&5
19650fd6
AS
17885sed 's/^/| /' conftest.$ac_ext >&5
17886
c0d27fcc 17887 ac_header_preproc=no
ba4481b5 17888fi
ca81d7a0 17889
98418dba 17890rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17891{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17892echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17893
17894# So? What about this header?
edfaf76d
LK
17895case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17896 yes:no: )
c0d27fcc
MR
17897 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17898echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17899 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17900echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
17901 ac_header_preproc=yes
19650fd6 17902 ;;
edfaf76d 17903 no:yes:* )
c0d27fcc
MR
17904 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17905echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17906 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17907echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17908 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17909echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17910 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17911echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17912 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 17913echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17914 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17915echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17916
19650fd6 17917 ;;
c0d27fcc 17918esac
ca81d7a0
JD
17919{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17920echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
17921if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
17922 echo $ECHO_N "(cached) $ECHO_C" >&6
17923else
17924 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17925fi
ca81d7a0
JD
17926{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17927echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17928
17929fi
98418dba
CW
17930if test $ac_cv_header_sys_dg_sys_info_h = yes; then
17931 ac_have_func=yes
ba4481b5 17932
c0d27fcc 17933cat >>confdefs.h <<\_ACEOF
98418dba 17934#define DGUX 1
c0d27fcc
MR
17935_ACEOF
17936
503d2be0 17937
ca81d7a0
JD
17938{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17939echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17940if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 17941 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17942else
503d2be0 17943 ac_check_lib_save_LIBS=$LIBS
98418dba 17944LIBS="-ldgc $LIBS"
503d2be0 17945cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17946/* confdefs.h. */
17947_ACEOF
17948cat confdefs.h >>conftest.$ac_ext
17949cat >>conftest.$ac_ext <<_ACEOF
17950/* end confdefs.h. */
503d2be0 17951
ca81d7a0
JD
17952/* Override any GCC internal prototype to avoid an error.
17953 Use char because int might match the return type of a GCC
17954 builtin and then its argument prototype would still apply. */
503d2be0
AS
17955#ifdef __cplusplus
17956extern "C"
17957#endif
98418dba 17958char dg_sys_info ();
503d2be0
AS
17959int
17960main ()
17961{
ca81d7a0 17962return dg_sys_info ();
503d2be0
AS
17963 ;
17964 return 0;
17965}
17966_ACEOF
17967rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17968if { (ac_try="$ac_link"
17969case "(($ac_try" in
17970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17971 *) ac_try_echo=$ac_try;;
17972esac
17973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17974 (eval "$ac_link") 2>conftest.er1
503d2be0 17975 ac_status=$?
edfaf76d
LK
17976 grep -v '^ *+' conftest.er1 >conftest.err
17977 rm -f conftest.er1
17978 cat conftest.err >&5
c0d27fcc 17979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17980 (exit $ac_status); } && {
17981 test -z "$ac_c_werror_flag" ||
17982 test ! -s conftest.err
17983 } && test -s conftest$ac_exeext &&
17984 $as_test_x conftest$ac_exeext; then
98418dba 17985 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
17986else
17987 echo "$as_me: failed program was:" >&5
19650fd6
AS
17988sed 's/^/| /' conftest.$ac_ext >&5
17989
ca81d7a0 17990 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17991fi
ca81d7a0 17992
f053c89f 17993rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17994 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17995LIBS=$ac_check_lib_save_LIBS
17996fi
ca81d7a0
JD
17997{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17998echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 17999if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 18000 cat >>confdefs.h <<_ACEOF
98418dba 18001#define HAVE_LIBDGC 1
c0d27fcc 18002_ACEOF
ba4481b5 18003
98418dba 18004 LIBS="-ldgc $LIBS"
ba4481b5 18005
ba4481b5
DL
18006fi
18007
98418dba 18008fi
503d2be0 18009
c0d27fcc
MR
18010
18011
18012if test "${ac_cv_header_locale_h+set}" = set; then
ca81d7a0
JD
18013 { echo "$as_me:$LINENO: checking for locale.h" >&5
18014echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 18015if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 18016 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18017fi
ca81d7a0
JD
18018{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
18019echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 18020else
c0d27fcc 18021 # Is the header compilable?
ca81d7a0
JD
18022{ echo "$as_me:$LINENO: checking locale.h usability" >&5
18023echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 18024cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18025/* confdefs.h. */
18026_ACEOF
18027cat confdefs.h >>conftest.$ac_ext
18028cat >>conftest.$ac_ext <<_ACEOF
18029/* end confdefs.h. */
c0d27fcc
MR
18030$ac_includes_default
18031#include <locale.h>
18032_ACEOF
18033rm -f conftest.$ac_objext
ca81d7a0
JD
18034if { (ac_try="$ac_compile"
18035case "(($ac_try" in
18036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18037 *) ac_try_echo=$ac_try;;
18038esac
18039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18040 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18041 ac_status=$?
edfaf76d
LK
18042 grep -v '^ *+' conftest.er1 >conftest.err
18043 rm -f conftest.er1
18044 cat conftest.err >&5
c0d27fcc 18045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18046 (exit $ac_status); } && {
18047 test -z "$ac_c_werror_flag" ||
18048 test ! -s conftest.err
18049 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18050 ac_header_compiler=yes
18051else
18052 echo "$as_me: failed program was:" >&5
19650fd6
AS
18053sed 's/^/| /' conftest.$ac_ext >&5
18054
ca81d7a0 18055 ac_header_compiler=no
c0d27fcc 18056fi
ca81d7a0
JD
18057
18058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18059{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18060echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18061
18062# Is the header present?
ca81d7a0
JD
18063{ echo "$as_me:$LINENO: checking locale.h presence" >&5
18064echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 18065cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18066/* confdefs.h. */
18067_ACEOF
18068cat confdefs.h >>conftest.$ac_ext
18069cat >>conftest.$ac_ext <<_ACEOF
18070/* end confdefs.h. */
98418dba 18071#include <locale.h>
503d2be0 18072_ACEOF
ca81d7a0
JD
18073if { (ac_try="$ac_cpp conftest.$ac_ext"
18074case "(($ac_try" in
18075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18076 *) ac_try_echo=$ac_try;;
18077esac
18078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18079 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18080 ac_status=$?
6bae0ccf 18081 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18082 rm -f conftest.er1
18083 cat conftest.err >&5
c0d27fcc 18084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18085 (exit $ac_status); } >/dev/null && {
18086 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18087 test ! -s conftest.err
18088 }; then
c0d27fcc 18089 ac_header_preproc=yes
98418dba
CW
18090else
18091 echo "$as_me: failed program was:" >&5
19650fd6
AS
18092sed 's/^/| /' conftest.$ac_ext >&5
18093
c0d27fcc 18094 ac_header_preproc=no
ba4481b5 18095fi
ca81d7a0 18096
98418dba 18097rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18098{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18099echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18100
18101# So? What about this header?
edfaf76d
LK
18102case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18103 yes:no: )
c0d27fcc
MR
18104 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
18105echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18106 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
18107echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
18108 ac_header_preproc=yes
19650fd6 18109 ;;
edfaf76d 18110 no:yes:* )
c0d27fcc
MR
18111 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
18112echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18113 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
18114echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
18115 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
18116echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
18117 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
18118echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18119 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 18120echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18121 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
18122echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18123
19650fd6 18124 ;;
c0d27fcc 18125esac
ca81d7a0
JD
18126{ echo "$as_me:$LINENO: checking for locale.h" >&5
18127echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
18128if test "${ac_cv_header_locale_h+set}" = set; then
18129 echo $ECHO_N "(cached) $ECHO_C" >&6
18130else
18131 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 18132fi
ca81d7a0
JD
18133{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
18134echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 18135
c0d27fcc
MR
18136fi
18137
18138
18139
98418dba 18140for ac_func in setlocale
ba4481b5 18141do
503d2be0 18142as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18143{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18144echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18145if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 18146 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18147else
503d2be0 18148 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18149/* confdefs.h. */
18150_ACEOF
18151cat confdefs.h >>conftest.$ac_ext
18152cat >>conftest.$ac_ext <<_ACEOF
18153/* end confdefs.h. */
edfaf76d
LK
18154/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18155 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18156#define $ac_func innocuous_$ac_func
18157
ba4481b5 18158/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18159 which can conflict with char $ac_func (); below.
18160 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18161 <limits.h> exists even on freestanding compilers. */
edfaf76d 18162
19650fd6
AS
18163#ifdef __STDC__
18164# include <limits.h>
18165#else
18166# include <assert.h>
18167#endif
edfaf76d
LK
18168
18169#undef $ac_func
18170
ca81d7a0
JD
18171/* Override any GCC internal prototype to avoid an error.
18172 Use char because int might match the return type of a GCC
18173 builtin and then its argument prototype would still apply. */
503d2be0
AS
18174#ifdef __cplusplus
18175extern "C"
18176#endif
503d2be0 18177char $ac_func ();
ba4481b5
DL
18178/* The GNU C library defines this for functions which it implements
18179 to always fail with ENOSYS. Some functions are actually named
18180 something starting with __ and the normal name is an alias. */
ca81d7a0 18181#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 18182choke me
ba4481b5
DL
18183#endif
18184
19650fd6
AS
18185int
18186main ()
18187{
ca81d7a0 18188return $ac_func ();
503d2be0
AS
18189 ;
18190 return 0;
18191}
18192_ACEOF
18193rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18194if { (ac_try="$ac_link"
18195case "(($ac_try" in
18196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18197 *) ac_try_echo=$ac_try;;
18198esac
18199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18200 (eval "$ac_link") 2>conftest.er1
503d2be0 18201 ac_status=$?
edfaf76d
LK
18202 grep -v '^ *+' conftest.er1 >conftest.err
18203 rm -f conftest.er1
18204 cat conftest.err >&5
c0d27fcc 18205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18206 (exit $ac_status); } && {
18207 test -z "$ac_c_werror_flag" ||
18208 test ! -s conftest.err
18209 } && test -s conftest$ac_exeext &&
18210 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18211 eval "$as_ac_var=yes"
18212else
18213 echo "$as_me: failed program was:" >&5
19650fd6
AS
18214sed 's/^/| /' conftest.$ac_ext >&5
18215
ca81d7a0 18216 eval "$as_ac_var=no"
503d2be0 18217fi
ca81d7a0 18218
f053c89f 18219rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18220 conftest$ac_exeext conftest.$ac_ext
503d2be0 18221fi
ca81d7a0
JD
18222ac_res=`eval echo '${'$as_ac_var'}'`
18223 { echo "$as_me:$LINENO: result: $ac_res" >&5
18224echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18225if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18226 cat >>confdefs.h <<_ACEOF
503d2be0 18227#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18228_ACEOF
ba4481b5 18229
ba4481b5
DL
18230fi
18231done
18232
c0d27fcc 18233
98418dba
CW
18234# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
18235# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
18236# Irix 4.0.5F has the header but not the library.
18237if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
18238 ac_have_func=yes
18239
c0d27fcc 18240cat >>confdefs.h <<\_ACEOF
98418dba 18241#define SVR4 1
c0d27fcc 18242_ACEOF
98418dba
CW
18243
18244fi
18245
18246if test $ac_have_func = no; then
c0d27fcc 18247 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
ca81d7a0
JD
18248 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18249echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 18250if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 18251 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18252fi
ca81d7a0
JD
18253{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18254echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 18255else
c0d27fcc 18256 # Is the header compilable?
ca81d7a0
JD
18257{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
18258echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 18259cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18260/* confdefs.h. */
18261_ACEOF
18262cat confdefs.h >>conftest.$ac_ext
18263cat >>conftest.$ac_ext <<_ACEOF
18264/* end confdefs.h. */
c0d27fcc
MR
18265$ac_includes_default
18266#include <inq_stats/cpustats.h>
18267_ACEOF
18268rm -f conftest.$ac_objext
ca81d7a0
JD
18269if { (ac_try="$ac_compile"
18270case "(($ac_try" in
18271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18272 *) ac_try_echo=$ac_try;;
18273esac
18274eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18275 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18276 ac_status=$?
edfaf76d
LK
18277 grep -v '^ *+' conftest.er1 >conftest.err
18278 rm -f conftest.er1
18279 cat conftest.err >&5
c0d27fcc 18280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18281 (exit $ac_status); } && {
18282 test -z "$ac_c_werror_flag" ||
18283 test ! -s conftest.err
18284 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18285 ac_header_compiler=yes
18286else
18287 echo "$as_me: failed program was:" >&5
19650fd6
AS
18288sed 's/^/| /' conftest.$ac_ext >&5
18289
ca81d7a0 18290 ac_header_compiler=no
c0d27fcc 18291fi
ca81d7a0
JD
18292
18293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18294{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18295echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18296
18297# Is the header present?
ca81d7a0
JD
18298{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
18299echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18300cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18301/* confdefs.h. */
18302_ACEOF
18303cat confdefs.h >>conftest.$ac_ext
18304cat >>conftest.$ac_ext <<_ACEOF
18305/* end confdefs.h. */
98418dba 18306#include <inq_stats/cpustats.h>
503d2be0 18307_ACEOF
ca81d7a0
JD
18308if { (ac_try="$ac_cpp conftest.$ac_ext"
18309case "(($ac_try" in
18310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18311 *) ac_try_echo=$ac_try;;
18312esac
18313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18314 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18315 ac_status=$?
6bae0ccf 18316 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18317 rm -f conftest.er1
18318 cat conftest.err >&5
c0d27fcc 18319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18320 (exit $ac_status); } >/dev/null && {
18321 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18322 test ! -s conftest.err
18323 }; then
c0d27fcc 18324 ac_header_preproc=yes
503d2be0
AS
18325else
18326 echo "$as_me: failed program was:" >&5
19650fd6
AS
18327sed 's/^/| /' conftest.$ac_ext >&5
18328
c0d27fcc 18329 ac_header_preproc=no
ba4481b5 18330fi
ca81d7a0 18331
503d2be0 18332rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18333{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18334echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18335
18336# So? What about this header?
edfaf76d
LK
18337case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18338 yes:no: )
c0d27fcc
MR
18339 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18340echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18341 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
18342echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
18343 ac_header_preproc=yes
19650fd6 18344 ;;
edfaf76d 18345 no:yes:* )
c0d27fcc
MR
18346 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
18347echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18348 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
18349echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
18350 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
18351echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
18352 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18353echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18354 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18355echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18356 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
18357echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18358
19650fd6 18359 ;;
c0d27fcc 18360esac
ca81d7a0
JD
18361{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
18362echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18363if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
18364 echo $ECHO_N "(cached) $ECHO_C" >&6
18365else
18366 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 18367fi
ca81d7a0
JD
18368{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
18369echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
18370
18371fi
98418dba
CW
18372if test $ac_cv_header_inq_stats_cpustats_h = yes; then
18373 ac_have_func=yes
ba4481b5 18374
c0d27fcc 18375cat >>confdefs.h <<\_ACEOF
98418dba 18376#define UMAX 1
c0d27fcc 18377_ACEOF
98418dba 18378
c0d27fcc
MR
18379
18380cat >>confdefs.h <<\_ACEOF
98418dba 18381#define UMAX4_3 1
c0d27fcc 18382_ACEOF
98418dba
CW
18383
18384fi
18385
c0d27fcc 18386
98418dba
CW
18387fi
18388
18389if test $ac_have_func = no; then
c0d27fcc 18390 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
ca81d7a0
JD
18391 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18392echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 18393if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 18394 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18395fi
ca81d7a0
JD
18396{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18397echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 18398else
c0d27fcc 18399 # Is the header compilable?
ca81d7a0
JD
18400{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
18401echo $ECHO_N "checking sys/cpustats.h 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 <sys/cpustats.h>
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 sys/cpustats.h presence" >&5
18442echo $ECHO_N "checking sys/cpustats.h 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. */
98418dba
CW
18449#include <sys/cpustats.h>
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
98418dba 18458 ac_status=$?
6bae0ccf 18459 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
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 18467 ac_header_preproc=yes
98418dba
CW
18468else
18469 echo "$as_me: failed program was:" >&5
19650fd6
AS
18470sed 's/^/| /' conftest.$ac_ext >&5
18471
c0d27fcc 18472 ac_header_preproc=no
98418dba 18473fi
ca81d7a0 18474
98418dba 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: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18483echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18484 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
18485echo "$as_me: WARNING: sys/cpustats.h: 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: sys/cpustats.h: present but cannot be compiled" >&5
18490echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18491 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
18492echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
18493 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
18494echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
18495 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18496echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18497 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18498echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18499 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
18500echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18501
19650fd6 18502 ;;
c0d27fcc 18503esac
ca81d7a0
JD
18504{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18505echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18506if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
18507 echo $ECHO_N "(cached) $ECHO_C" >&6
18508else
18509 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 18510fi
ca81d7a0
JD
18511{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18512echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
18513
18514fi
98418dba 18515if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 18516 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 18517#define UMAX 1
c0d27fcc 18518_ACEOF
ba4481b5 18519
98418dba
CW
18520fi
18521
c0d27fcc 18522
98418dba
CW
18523fi
18524
18525if test $ac_have_func = no; then
18526
18527for ac_header in mach/mach.h
2c9dccc9
PJ
18528do
18529as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18530if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18531 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18532echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18533if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 18534 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18535fi
ca81d7a0
JD
18536ac_res=`eval echo '${'$as_ac_Header'}'`
18537 { echo "$as_me:$LINENO: result: $ac_res" >&5
18538echo "${ECHO_T}$ac_res" >&6; }
98418dba 18539else
c0d27fcc 18540 # Is the header compilable?
ca81d7a0
JD
18541{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18542echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18543cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18544/* confdefs.h. */
18545_ACEOF
18546cat confdefs.h >>conftest.$ac_ext
18547cat >>conftest.$ac_ext <<_ACEOF
18548/* end confdefs.h. */
c0d27fcc
MR
18549$ac_includes_default
18550#include <$ac_header>
18551_ACEOF
18552rm -f conftest.$ac_objext
ca81d7a0
JD
18553if { (ac_try="$ac_compile"
18554case "(($ac_try" in
18555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18556 *) ac_try_echo=$ac_try;;
18557esac
18558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18559 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18560 ac_status=$?
edfaf76d
LK
18561 grep -v '^ *+' conftest.er1 >conftest.err
18562 rm -f conftest.er1
18563 cat conftest.err >&5
c0d27fcc 18564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18565 (exit $ac_status); } && {
18566 test -z "$ac_c_werror_flag" ||
18567 test ! -s conftest.err
18568 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18569 ac_header_compiler=yes
18570else
18571 echo "$as_me: failed program was:" >&5
19650fd6
AS
18572sed 's/^/| /' conftest.$ac_ext >&5
18573
ca81d7a0 18574 ac_header_compiler=no
c0d27fcc 18575fi
ca81d7a0
JD
18576
18577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18578{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18579echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18580
18581# Is the header present?
ca81d7a0
JD
18582{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18583echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18584cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18585/* confdefs.h. */
18586_ACEOF
18587cat confdefs.h >>conftest.$ac_ext
18588cat >>conftest.$ac_ext <<_ACEOF
18589/* end confdefs.h. */
2c9dccc9
PJ
18590#include <$ac_header>
18591_ACEOF
ca81d7a0
JD
18592if { (ac_try="$ac_cpp conftest.$ac_ext"
18593case "(($ac_try" in
18594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18595 *) ac_try_echo=$ac_try;;
18596esac
18597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18598 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 18599 ac_status=$?
6bae0ccf 18600 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
18601 rm -f conftest.er1
18602 cat conftest.err >&5
c0d27fcc 18603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18604 (exit $ac_status); } >/dev/null && {
18605 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18606 test ! -s conftest.err
18607 }; then
c0d27fcc
MR
18608 ac_header_preproc=yes
18609else
18610 echo "$as_me: failed program was:" >&5
19650fd6
AS
18611sed 's/^/| /' conftest.$ac_ext >&5
18612
c0d27fcc
MR
18613 ac_header_preproc=no
18614fi
ca81d7a0 18615
c0d27fcc 18616rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18617{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18618echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18619
18620# So? What about this header?
edfaf76d
LK
18621case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18622 yes:no: )
c0d27fcc
MR
18623 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18624echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18625 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18626echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18627 ac_header_preproc=yes
19650fd6 18628 ;;
edfaf76d 18629 no:yes:* )
c0d27fcc
MR
18630 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18631echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18632 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18633echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18634 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18635echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18636 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18637echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18638 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18639echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18640 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18641echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18642
19650fd6 18643 ;;
c0d27fcc 18644esac
ca81d7a0
JD
18645{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18646echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18647if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18648 echo $ECHO_N "(cached) $ECHO_C" >&6
18649else
edfaf76d 18650 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 18651fi
ca81d7a0
JD
18652ac_res=`eval echo '${'$as_ac_Header'}'`
18653 { echo "$as_me:$LINENO: result: $ac_res" >&5
18654echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18655
18656fi
18657if test `eval echo '${'$as_ac_Header'}'` = yes; then
18658 cat >>confdefs.h <<_ACEOF
18659#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18660_ACEOF
18661
18662fi
18663
18664done
18665
18666fi
18667
18668
18669for ac_header in nlist.h
18670do
18671as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18672if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18673 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18674echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18675if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18676 echo $ECHO_N "(cached) $ECHO_C" >&6
18677fi
ca81d7a0
JD
18678ac_res=`eval echo '${'$as_ac_Header'}'`
18679 { echo "$as_me:$LINENO: result: $ac_res" >&5
18680echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18681else
18682 # Is the header compilable?
ca81d7a0
JD
18683{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18684echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18685cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18686/* confdefs.h. */
18687_ACEOF
18688cat confdefs.h >>conftest.$ac_ext
18689cat >>conftest.$ac_ext <<_ACEOF
18690/* end confdefs.h. */
c0d27fcc
MR
18691$ac_includes_default
18692#include <$ac_header>
18693_ACEOF
18694rm -f conftest.$ac_objext
ca81d7a0
JD
18695if { (ac_try="$ac_compile"
18696case "(($ac_try" in
18697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18698 *) ac_try_echo=$ac_try;;
18699esac
18700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18701 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18702 ac_status=$?
edfaf76d
LK
18703 grep -v '^ *+' conftest.er1 >conftest.err
18704 rm -f conftest.er1
18705 cat conftest.err >&5
c0d27fcc 18706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18707 (exit $ac_status); } && {
18708 test -z "$ac_c_werror_flag" ||
18709 test ! -s conftest.err
18710 } && test -s conftest.$ac_objext; then
c0d27fcc 18711 ac_header_compiler=yes
2c9dccc9
PJ
18712else
18713 echo "$as_me: failed program was:" >&5
19650fd6
AS
18714sed 's/^/| /' conftest.$ac_ext >&5
18715
ca81d7a0 18716 ac_header_compiler=no
98418dba 18717fi
ca81d7a0
JD
18718
18719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18720{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18721echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 18722
c0d27fcc 18723# Is the header present?
ca81d7a0
JD
18724{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18725echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18726cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18727/* confdefs.h. */
18728_ACEOF
18729cat confdefs.h >>conftest.$ac_ext
18730cat >>conftest.$ac_ext <<_ACEOF
18731/* end confdefs.h. */
503d2be0
AS
18732#include <$ac_header>
18733_ACEOF
ca81d7a0
JD
18734if { (ac_try="$ac_cpp conftest.$ac_ext"
18735case "(($ac_try" in
18736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18737 *) ac_try_echo=$ac_try;;
18738esac
18739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18740 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18741 ac_status=$?
6bae0ccf 18742 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18743 rm -f conftest.er1
18744 cat conftest.err >&5
c0d27fcc 18745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18746 (exit $ac_status); } >/dev/null && {
18747 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18748 test ! -s conftest.err
18749 }; then
c0d27fcc 18750 ac_header_preproc=yes
503d2be0
AS
18751else
18752 echo "$as_me: failed program was:" >&5
19650fd6
AS
18753sed 's/^/| /' conftest.$ac_ext >&5
18754
c0d27fcc 18755 ac_header_preproc=no
b5de8dc0 18756fi
ca81d7a0 18757
503d2be0 18758rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18759{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18760echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18761
18762# So? What about this header?
edfaf76d
LK
18763case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18764 yes:no: )
c0d27fcc
MR
18765 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18766echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18767 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18768echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18769 ac_header_preproc=yes
19650fd6 18770 ;;
edfaf76d 18771 no:yes:* )
c0d27fcc
MR
18772 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18773echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18774 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18775echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18776 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18777echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18778 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18779echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18780 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18781echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18782 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18783echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18784
19650fd6 18785 ;;
c0d27fcc 18786esac
ca81d7a0
JD
18787{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18788echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18789if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18790 echo $ECHO_N "(cached) $ECHO_C" >&6
18791else
edfaf76d 18792 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 18793fi
ca81d7a0
JD
18794ac_res=`eval echo '${'$as_ac_Header'}'`
18795 { echo "$as_me:$LINENO: result: $ac_res" >&5
18796echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18797
18798fi
98418dba 18799if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18800 cat >>confdefs.h <<_ACEOF
98418dba 18801#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18802_ACEOF
ca81d7a0
JD
18803 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
18804echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 18805if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 18806 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 18807else
503d2be0 18808 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18809/* confdefs.h. */
18810_ACEOF
18811cat confdefs.h >>conftest.$ac_ext
18812cat >>conftest.$ac_ext <<_ACEOF
18813/* end confdefs.h. */
98418dba 18814#include <nlist.h>
b5de8dc0 18815
503d2be0
AS
18816int
18817main ()
18818{
98418dba
CW
18819static struct nlist ac_aggr;
18820if (ac_aggr.n_un.n_name)
18821return 0;
503d2be0
AS
18822 ;
18823 return 0;
18824}
18825_ACEOF
98418dba 18826rm -f conftest.$ac_objext
ca81d7a0
JD
18827if { (ac_try="$ac_compile"
18828case "(($ac_try" in
18829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18830 *) ac_try_echo=$ac_try;;
18831esac
18832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18833 (eval "$ac_compile") 2>conftest.er1
503d2be0 18834 ac_status=$?
edfaf76d
LK
18835 grep -v '^ *+' conftest.er1 >conftest.err
18836 rm -f conftest.er1
18837 cat conftest.err >&5
c0d27fcc 18838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18839 (exit $ac_status); } && {
18840 test -z "$ac_c_werror_flag" ||
18841 test ! -s conftest.err
18842 } && test -s conftest.$ac_objext; then
edfaf76d 18843 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
18844else
18845 echo "$as_me: failed program was:" >&5
19650fd6
AS
18846sed 's/^/| /' conftest.$ac_ext >&5
18847
ca81d7a0 18848 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18849/* confdefs.h. */
18850_ACEOF
18851cat confdefs.h >>conftest.$ac_ext
18852cat >>conftest.$ac_ext <<_ACEOF
18853/* end confdefs.h. */
6bae0ccf
DL
18854#include <nlist.h>
18855
18856int
18857main ()
18858{
18859static struct nlist ac_aggr;
18860if (sizeof ac_aggr.n_un.n_name)
18861return 0;
18862 ;
18863 return 0;
18864}
18865_ACEOF
18866rm -f conftest.$ac_objext
ca81d7a0
JD
18867if { (ac_try="$ac_compile"
18868case "(($ac_try" in
18869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18870 *) ac_try_echo=$ac_try;;
18871esac
18872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18873 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 18874 ac_status=$?
edfaf76d
LK
18875 grep -v '^ *+' conftest.er1 >conftest.err
18876 rm -f conftest.er1
18877 cat conftest.err >&5
6bae0ccf 18878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
18879 (exit $ac_status); } && {
18880 test -z "$ac_c_werror_flag" ||
18881 test ! -s conftest.err
18882 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
18883 ac_cv_member_struct_nlist_n_un_n_name=yes
18884else
18885 echo "$as_me: failed program was:" >&5
19650fd6
AS
18886sed 's/^/| /' conftest.$ac_ext >&5
18887
ca81d7a0 18888 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 18889fi
ca81d7a0
JD
18890
18891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 18892fi
ca81d7a0
JD
18893
18894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 18895fi
ca81d7a0
JD
18896{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
18897echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 18898if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18899
c0d27fcc 18900cat >>confdefs.h <<_ACEOF
98418dba 18901#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18902_ACEOF
b5de8dc0 18903
c0d27fcc
MR
18904
18905cat >>confdefs.h <<\_ACEOF
98418dba 18906#define NLIST_NAME_UNION 1
c0d27fcc 18907_ACEOF
b5de8dc0 18908
98418dba 18909fi
b5de8dc0 18910
c0d27fcc 18911
98418dba 18912fi
c0d27fcc 18913
98418dba 18914done
b5de8dc0 18915
98418dba
CW
18916fi
18917done
b5de8dc0 18918
c0d27fcc 18919
98418dba 18920# Some definitions of getloadavg require that the program be installed setgid.
ca81d7a0
JD
18921{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18922echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
18923if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
18924 echo $ECHO_N "(cached) $ECHO_C" >&6
18925else
18926 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18927/* confdefs.h. */
18928_ACEOF
18929cat confdefs.h >>conftest.$ac_ext
18930cat >>conftest.$ac_ext <<_ACEOF
18931/* end confdefs.h. */
6bae0ccf 18932#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18933#ifdef LDAV_PRIVILEGED
18934Yowza Am I SETGID yet
18935#endif
18936_ACEOF
18937if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18938 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18939 ac_cv_func_getloadavg_setgid=yes
18940else
18941 ac_cv_func_getloadavg_setgid=no
18942fi
18943rm -f conftest*
b5de8dc0 18944
98418dba 18945fi
ca81d7a0
JD
18946{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18947echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18948if test $ac_cv_func_getloadavg_setgid = yes; then
18949 NEED_SETGID=true
b5de8dc0 18950
c0d27fcc 18951cat >>confdefs.h <<\_ACEOF
98418dba 18952#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18953_ACEOF
98418dba 18954
b5de8dc0 18955else
98418dba 18956 NEED_SETGID=false
b5de8dc0 18957fi
98418dba
CW
18958
18959if test $ac_cv_func_getloadavg_setgid = yes; then
ca81d7a0
JD
18960 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18961echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
18962if test "${ac_cv_group_kmem+set}" = set; then
18963 echo $ECHO_N "(cached) $ECHO_C" >&6
18964else
18965 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18966 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18967 # If we got an error (system does not support symlinks), try without -L.
18968 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
18969 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18970 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18971 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18972 / /s/.* //;p;'`
18973
b5de8dc0 18974fi
ca81d7a0
JD
18975{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18976echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18977 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18978fi
98418dba
CW
18979if test "x$ac_save_LIBS" = x; then
18980 GETLOADAVG_LIBS=$LIBS
18981else
18982 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18983fi
98418dba 18984LIBS=$ac_save_LIBS
b5de8dc0 18985
c0d27fcc
MR
18986
18987
ca81d7a0
JD
18988{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18989echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18990if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 18991 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18992else
b936fae4 18993 while :; do
503d2be0 18994 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18995/* confdefs.h. */
18996_ACEOF
18997cat confdefs.h >>conftest.$ac_ext
18998cat >>conftest.$ac_ext <<_ACEOF
18999/* end confdefs.h. */
06b62770 19000#include <stdio.h>
503d2be0
AS
19001int
19002main ()
19003{
06b62770 19004return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
19005 ;
19006 return 0;
19007}
19008_ACEOF
f053c89f
CY
19009rm -f conftest.$ac_objext conftest$ac_exeext
19010if { (ac_try="$ac_link"
ca81d7a0
JD
19011case "(($ac_try" in
19012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19013 *) ac_try_echo=$ac_try;;
19014esac
19015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19016 (eval "$ac_link") 2>conftest.er1
b936fae4 19017 ac_status=$?
edfaf76d
LK
19018 grep -v '^ *+' conftest.er1 >conftest.err
19019 rm -f conftest.er1
19020 cat conftest.err >&5
c0d27fcc 19021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19022 (exit $ac_status); } && {
19023 test -z "$ac_c_werror_flag" ||
19024 test ! -s conftest.err
19025 } && test -s conftest$ac_exeext &&
19026 $as_test_x conftest$ac_exeext; then
19027 ac_cv_sys_largefile_source=no; break
b936fae4
AS
19028else
19029 echo "$as_me: failed program was:" >&5
19650fd6
AS
19030sed 's/^/| /' conftest.$ac_ext >&5
19031
ca81d7a0 19032
b936fae4 19033fi
ca81d7a0 19034
f053c89f
CY
19035rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19036 conftest$ac_exeext conftest.$ac_ext
b936fae4 19037 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19038/* confdefs.h. */
19039_ACEOF
19040cat confdefs.h >>conftest.$ac_ext
19041cat >>conftest.$ac_ext <<_ACEOF
19042/* end confdefs.h. */
b936fae4 19043#define _LARGEFILE_SOURCE 1
06b62770 19044#include <stdio.h>
b936fae4
AS
19045int
19046main ()
19047{
06b62770 19048return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
19049 ;
19050 return 0;
19051}
19052_ACEOF
f053c89f
CY
19053rm -f conftest.$ac_objext conftest$ac_exeext
19054if { (ac_try="$ac_link"
ca81d7a0
JD
19055case "(($ac_try" in
19056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19057 *) ac_try_echo=$ac_try;;
19058esac
19059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19060 (eval "$ac_link") 2>conftest.er1
b936fae4 19061 ac_status=$?
edfaf76d
LK
19062 grep -v '^ *+' conftest.er1 >conftest.err
19063 rm -f conftest.er1
19064 cat conftest.err >&5
c0d27fcc 19065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19066 (exit $ac_status); } && {
19067 test -z "$ac_c_werror_flag" ||
19068 test ! -s conftest.err
19069 } && test -s conftest$ac_exeext &&
19070 $as_test_x conftest$ac_exeext; then
b936fae4
AS
19071 ac_cv_sys_largefile_source=1; break
19072else
19073 echo "$as_me: failed program was:" >&5
19650fd6
AS
19074sed 's/^/| /' conftest.$ac_ext >&5
19075
ca81d7a0 19076
b936fae4 19077fi
ca81d7a0 19078
f053c89f
CY
19079rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19080 conftest$ac_exeext conftest.$ac_ext
19081 ac_cv_sys_largefile_source=unknown
b936fae4
AS
19082 break
19083done
19084fi
ca81d7a0
JD
19085{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
19086echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
19087case $ac_cv_sys_largefile_source in #(
19088 no | unknown) ;;
19089 *)
c0d27fcc 19090cat >>confdefs.h <<_ACEOF
b936fae4 19091#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 19092_ACEOF
f053c89f
CY
19093;;
19094esac
b936fae4 19095rm -f conftest*
4c343001 19096
b936fae4
AS
19097# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
19098# in glibc 2.1.3, but that breaks too many other things.
19099# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c24fa7dc 19100if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 19101
c0d27fcc 19102cat >>confdefs.h <<\_ACEOF
b936fae4 19103#define HAVE_FSEEKO 1
c0d27fcc 19104_ACEOF
b936fae4 19105
4c343001
DL
19106fi
19107
c0d27fcc 19108
52dbaac8
PE
19109# Configure getopt.
19110# getopt.m4 serial 10
19111
19112# The getopt module assume you want GNU getopt, with getopt_long etc,
19113# rather than vanilla POSIX getopt. This means your your code should
19114# always include <getopt.h> for the getopt prototypes.
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126# Prerequisites of lib/getopt*.
19127
19128
19129
10a3b1a1 19130
52dbaac8
PE
19131 GETOPT_H=
19132
19133for ac_header in getopt.h
19134do
19135as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
19136if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19137 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19138echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19139if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19140 echo $ECHO_N "(cached) $ECHO_C" >&6
19141fi
ca81d7a0
JD
19142ac_res=`eval echo '${'$as_ac_Header'}'`
19143 { echo "$as_me:$LINENO: result: $ac_res" >&5
19144echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19145else
19146 # Is the header compilable?
ca81d7a0
JD
19147{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
19148echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
19149cat >conftest.$ac_ext <<_ACEOF
19150/* confdefs.h. */
19151_ACEOF
19152cat confdefs.h >>conftest.$ac_ext
19153cat >>conftest.$ac_ext <<_ACEOF
19154/* end confdefs.h. */
19155$ac_includes_default
19156#include <$ac_header>
19157_ACEOF
19158rm -f conftest.$ac_objext
ca81d7a0
JD
19159if { (ac_try="$ac_compile"
19160case "(($ac_try" in
19161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19162 *) ac_try_echo=$ac_try;;
19163esac
19164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19165 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19166 ac_status=$?
19167 grep -v '^ *+' conftest.er1 >conftest.err
19168 rm -f conftest.er1
19169 cat conftest.err >&5
19170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19171 (exit $ac_status); } && {
19172 test -z "$ac_c_werror_flag" ||
19173 test ! -s conftest.err
19174 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19175 ac_header_compiler=yes
19176else
19177 echo "$as_me: failed program was:" >&5
19178sed 's/^/| /' conftest.$ac_ext >&5
19179
ca81d7a0 19180 ac_header_compiler=no
52dbaac8 19181fi
ca81d7a0
JD
19182
19183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19184{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19185echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
19186
19187# Is the header present?
ca81d7a0
JD
19188{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
19189echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
19190cat >conftest.$ac_ext <<_ACEOF
19191/* confdefs.h. */
19192_ACEOF
19193cat confdefs.h >>conftest.$ac_ext
19194cat >>conftest.$ac_ext <<_ACEOF
19195/* end confdefs.h. */
19196#include <$ac_header>
19197_ACEOF
ca81d7a0
JD
19198if { (ac_try="$ac_cpp conftest.$ac_ext"
19199case "(($ac_try" in
19200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19201 *) ac_try_echo=$ac_try;;
19202esac
19203eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19204 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
19205 ac_status=$?
19206 grep -v '^ *+' conftest.er1 >conftest.err
19207 rm -f conftest.er1
19208 cat conftest.err >&5
19209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19210 (exit $ac_status); } >/dev/null && {
19211 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19212 test ! -s conftest.err
19213 }; then
52dbaac8
PE
19214 ac_header_preproc=yes
19215else
19216 echo "$as_me: failed program was:" >&5
19217sed 's/^/| /' conftest.$ac_ext >&5
19218
19219 ac_header_preproc=no
19220fi
ca81d7a0 19221
52dbaac8 19222rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
19223{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19224echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
19225
19226# So? What about this header?
19227case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19228 yes:no: )
19229 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19230echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
19231 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19232echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19233 ac_header_preproc=yes
19234 ;;
19235 no:yes:* )
19236 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19237echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
19238 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19239echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19240 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19241echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19242 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19243echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
19244 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19245echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
19246 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19247echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 19248
52dbaac8
PE
19249 ;;
19250esac
ca81d7a0
JD
19251{ echo "$as_me:$LINENO: checking for $ac_header" >&5
19252echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19253if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19254 echo $ECHO_N "(cached) $ECHO_C" >&6
19255else
19256 eval "$as_ac_Header=\$ac_header_preproc"
19257fi
ca81d7a0
JD
19258ac_res=`eval echo '${'$as_ac_Header'}'`
19259 { echo "$as_me:$LINENO: result: $ac_res" >&5
19260echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19261
19262fi
19263if test `eval echo '${'$as_ac_Header'}'` = yes; then
19264 cat >>confdefs.h <<_ACEOF
19265#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19266_ACEOF
19267
19268else
19269 GETOPT_H=getopt.h
19270fi
19271
19272done
19273
19274 if test -z "$GETOPT_H"; then
19275
19276for ac_func in getopt_long_only
19277do
19278as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19279{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19280echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19281if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
19282 echo $ECHO_N "(cached) $ECHO_C" >&6
19283else
19284 cat >conftest.$ac_ext <<_ACEOF
19285/* confdefs.h. */
19286_ACEOF
19287cat confdefs.h >>conftest.$ac_ext
19288cat >>conftest.$ac_ext <<_ACEOF
19289/* end confdefs.h. */
19290/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19291 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19292#define $ac_func innocuous_$ac_func
19293
19294/* System header to define __stub macros and hopefully few prototypes,
19295 which can conflict with char $ac_func (); below.
19296 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19297 <limits.h> exists even on freestanding compilers. */
19298
19299#ifdef __STDC__
19300# include <limits.h>
19301#else
19302# include <assert.h>
19303#endif
19304
19305#undef $ac_func
19306
ca81d7a0
JD
19307/* Override any GCC internal prototype to avoid an error.
19308 Use char because int might match the return type of a GCC
19309 builtin and then its argument prototype would still apply. */
52dbaac8
PE
19310#ifdef __cplusplus
19311extern "C"
52dbaac8 19312#endif
52dbaac8
PE
19313char $ac_func ();
19314/* The GNU C library defines this for functions which it implements
19315 to always fail with ENOSYS. Some functions are actually named
19316 something starting with __ and the normal name is an alias. */
ca81d7a0 19317#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 19318choke me
52dbaac8
PE
19319#endif
19320
19321int
19322main ()
19323{
ca81d7a0 19324return $ac_func ();
52dbaac8
PE
19325 ;
19326 return 0;
19327}
19328_ACEOF
19329rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19330if { (ac_try="$ac_link"
19331case "(($ac_try" in
19332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19333 *) ac_try_echo=$ac_try;;
19334esac
19335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19336 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
19337 ac_status=$?
19338 grep -v '^ *+' conftest.er1 >conftest.err
19339 rm -f conftest.er1
19340 cat conftest.err >&5
19341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19342 (exit $ac_status); } && {
19343 test -z "$ac_c_werror_flag" ||
19344 test ! -s conftest.err
19345 } && test -s conftest$ac_exeext &&
19346 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
19347 eval "$as_ac_var=yes"
19348else
19349 echo "$as_me: failed program was:" >&5
19350sed 's/^/| /' conftest.$ac_ext >&5
19351
ca81d7a0 19352 eval "$as_ac_var=no"
52dbaac8 19353fi
ca81d7a0 19354
f053c89f 19355rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
19356 conftest$ac_exeext conftest.$ac_ext
19357fi
ca81d7a0
JD
19358ac_res=`eval echo '${'$as_ac_var'}'`
19359 { echo "$as_me:$LINENO: result: $ac_res" >&5
19360echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
19361if test `eval echo '${'$as_ac_var'}'` = yes; then
19362 cat >>confdefs.h <<_ACEOF
19363#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19364_ACEOF
19365
19366else
19367 GETOPT_H=getopt.h
19368fi
19369done
19370
19371 fi
19372
19373 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19374 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
19375echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
19376if test "${ac_cv_have_decl_optreset+set}" = set; then
19377 echo $ECHO_N "(cached) $ECHO_C" >&6
19378else
19379 cat >conftest.$ac_ext <<_ACEOF
19380/* confdefs.h. */
19381_ACEOF
19382cat confdefs.h >>conftest.$ac_ext
19383cat >>conftest.$ac_ext <<_ACEOF
19384/* end confdefs.h. */
19385#include <getopt.h>
19386
19387int
19388main ()
19389{
19390#ifndef optreset
f053c89f 19391 (void) optreset;
52dbaac8
PE
19392#endif
19393
19394 ;
19395 return 0;
19396}
19397_ACEOF
19398rm -f conftest.$ac_objext
ca81d7a0
JD
19399if { (ac_try="$ac_compile"
19400case "(($ac_try" in
19401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19402 *) ac_try_echo=$ac_try;;
19403esac
19404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19405 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19406 ac_status=$?
19407 grep -v '^ *+' conftest.er1 >conftest.err
19408 rm -f conftest.er1
19409 cat conftest.err >&5
19410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19411 (exit $ac_status); } && {
19412 test -z "$ac_c_werror_flag" ||
19413 test ! -s conftest.err
19414 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19415 ac_cv_have_decl_optreset=yes
19416else
19417 echo "$as_me: failed program was:" >&5
19418sed 's/^/| /' conftest.$ac_ext >&5
19419
ca81d7a0 19420 ac_cv_have_decl_optreset=no
52dbaac8 19421fi
ca81d7a0
JD
19422
19423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19424fi
ca81d7a0
JD
19425{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
19426echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
19427if test $ac_cv_have_decl_optreset = yes; then
19428 GETOPT_H=getopt.h
19429fi
19430
19431 fi
19432
19433 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19434 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
19435echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
19436if test "${gl_cv_func_gnu_getopt+set}" = set; then
19437 echo $ECHO_N "(cached) $ECHO_C" >&6
19438else
19439 if test "$cross_compiling" = yes; then
ca81d7a0
JD
19440 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
19441echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
19442if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
19443 echo $ECHO_N "(cached) $ECHO_C" >&6
19444else
19445 cat >conftest.$ac_ext <<_ACEOF
19446/* confdefs.h. */
19447_ACEOF
19448cat confdefs.h >>conftest.$ac_ext
19449cat >>conftest.$ac_ext <<_ACEOF
19450/* end confdefs.h. */
19451#include <getopt.h>
19452
19453int
19454main ()
19455{
19456#ifndef getopt_clip
f053c89f 19457 (void) getopt_clip;
52dbaac8
PE
19458#endif
19459
19460 ;
19461 return 0;
19462}
19463_ACEOF
19464rm -f conftest.$ac_objext
ca81d7a0
JD
19465if { (ac_try="$ac_compile"
19466case "(($ac_try" in
19467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19468 *) ac_try_echo=$ac_try;;
19469esac
19470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19471 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19472 ac_status=$?
19473 grep -v '^ *+' conftest.er1 >conftest.err
19474 rm -f conftest.er1
19475 cat conftest.err >&5
19476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19477 (exit $ac_status); } && {
19478 test -z "$ac_c_werror_flag" ||
19479 test ! -s conftest.err
19480 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19481 ac_cv_have_decl_getopt_clip=yes
19482else
19483 echo "$as_me: failed program was:" >&5
19484sed 's/^/| /' conftest.$ac_ext >&5
19485
ca81d7a0 19486 ac_cv_have_decl_getopt_clip=no
52dbaac8 19487fi
ca81d7a0
JD
19488
19489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19490fi
ca81d7a0
JD
19491{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
19492echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
19493if test $ac_cv_have_decl_getopt_clip = yes; then
19494 gl_cv_func_gnu_getopt=no
19495else
19496 gl_cv_func_gnu_getopt=yes
19497fi
19498
19499else
19500 cat >conftest.$ac_ext <<_ACEOF
19501/* confdefs.h. */
19502_ACEOF
19503cat confdefs.h >>conftest.$ac_ext
19504cat >>conftest.$ac_ext <<_ACEOF
19505/* end confdefs.h. */
19506#include <getopt.h>
19507int
19508main ()
19509{
19510
19511 char *myargv[3];
19512 myargv[0] = "conftest";
19513 myargv[1] = "-+";
19514 myargv[2] = 0;
19515 return getopt (2, myargv, "+a") != '?';
19516
19517 ;
19518 return 0;
19519}
19520_ACEOF
19521rm -f conftest$ac_exeext
ca81d7a0
JD
19522if { (ac_try="$ac_link"
19523case "(($ac_try" in
19524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19525 *) ac_try_echo=$ac_try;;
19526esac
19527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19528 (eval "$ac_link") 2>&5
52dbaac8
PE
19529 ac_status=$?
19530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19531 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
19532 { (case "(($ac_try" in
19533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19534 *) ac_try_echo=$ac_try;;
19535esac
19536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19537 (eval "$ac_try") 2>&5
52dbaac8
PE
19538 ac_status=$?
19539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19540 (exit $ac_status); }; }; then
19541 gl_cv_func_gnu_getopt=yes
19542else
19543 echo "$as_me: program exited with status $ac_status" >&5
19544echo "$as_me: failed program was:" >&5
19545sed 's/^/| /' conftest.$ac_ext >&5
19546
19547( exit $ac_status )
19548gl_cv_func_gnu_getopt=no
19549fi
ca81d7a0 19550rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 19551fi
ca81d7a0
JD
19552
19553
52dbaac8 19554fi
ca81d7a0
JD
19555{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
19556echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
19557 if test "$gl_cv_func_gnu_getopt" = "no"; then
19558 GETOPT_H=getopt.h
19559 fi
19560 fi
19561
19562
19563
19564 if test -n "$GETOPT_H"; then
19565
19566
19567 GETOPT_H=getopt.h
19568
19569cat >>confdefs.h <<\_ACEOF
19570#define __GETOPT_PREFIX rpl_
19571_ACEOF
19572
19573
19574
19575 :
19576 GETOPTOBJS='getopt.o getopt1.o'
19577
19578fi
19579
19580
19581
19582
ca81d7a0
JD
19583{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
19584echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
19585if test "${ac_cv_func_getpgrp_void+set}" = set; then
19586 echo $ECHO_N "(cached) $ECHO_C" >&6
19587else
19588 # Use it with a single arg.
19589cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19590/* confdefs.h. */
19591_ACEOF
19592cat confdefs.h >>conftest.$ac_ext
19593cat >>conftest.$ac_ext <<_ACEOF
19594/* end confdefs.h. */
cd958eb3
MB
19595$ac_includes_default
19596int
19597main ()
19598{
19599getpgrp (0);
19600 ;
19601 return 0;
19602}
19603_ACEOF
19604rm -f conftest.$ac_objext
ca81d7a0
JD
19605if { (ac_try="$ac_compile"
19606case "(($ac_try" in
19607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19608 *) ac_try_echo=$ac_try;;
19609esac
19610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19611 (eval "$ac_compile") 2>conftest.er1
cd958eb3 19612 ac_status=$?
edfaf76d
LK
19613 grep -v '^ *+' conftest.er1 >conftest.err
19614 rm -f conftest.er1
19615 cat conftest.err >&5
cd958eb3 19616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19617 (exit $ac_status); } && {
19618 test -z "$ac_c_werror_flag" ||
19619 test ! -s conftest.err
19620 } && test -s conftest.$ac_objext; then
cd958eb3
MB
19621 ac_cv_func_getpgrp_void=no
19622else
19623 echo "$as_me: failed program was:" >&5
19650fd6
AS
19624sed 's/^/| /' conftest.$ac_ext >&5
19625
ca81d7a0 19626 ac_cv_func_getpgrp_void=yes
cd958eb3 19627fi
ca81d7a0
JD
19628
19629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
19630
19631fi
ca81d7a0
JD
19632{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
19633echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
19634if test $ac_cv_func_getpgrp_void = yes; then
19635
19636cat >>confdefs.h <<\_ACEOF
19637#define GETPGRP_VOID 1
19638_ACEOF
19639
19640fi
19641
19642
973a76b1
DL
19643
19644for ac_func in strftime
19645do
19646as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19647{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19648echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19649if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
19650 echo $ECHO_N "(cached) $ECHO_C" >&6
19651else
19652 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19653/* confdefs.h. */
19654_ACEOF
19655cat confdefs.h >>conftest.$ac_ext
19656cat >>conftest.$ac_ext <<_ACEOF
19657/* end confdefs.h. */
edfaf76d
LK
19658/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19659 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19660#define $ac_func innocuous_$ac_func
19661
973a76b1 19662/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19663 which can conflict with char $ac_func (); below.
19664 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19665 <limits.h> exists even on freestanding compilers. */
edfaf76d 19666
19650fd6
AS
19667#ifdef __STDC__
19668# include <limits.h>
19669#else
19670# include <assert.h>
19671#endif
edfaf76d
LK
19672
19673#undef $ac_func
19674
ca81d7a0
JD
19675/* Override any GCC internal prototype to avoid an error.
19676 Use char because int might match the return type of a GCC
19677 builtin and then its argument prototype would still apply. */
973a76b1
DL
19678#ifdef __cplusplus
19679extern "C"
973a76b1 19680#endif
973a76b1
DL
19681char $ac_func ();
19682/* The GNU C library defines this for functions which it implements
19683 to always fail with ENOSYS. Some functions are actually named
19684 something starting with __ and the normal name is an alias. */
ca81d7a0 19685#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 19686choke me
973a76b1
DL
19687#endif
19688
19650fd6
AS
19689int
19690main ()
19691{
ca81d7a0 19692return $ac_func ();
973a76b1
DL
19693 ;
19694 return 0;
19695}
19696_ACEOF
19697rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19698if { (ac_try="$ac_link"
19699case "(($ac_try" in
19700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19701 *) ac_try_echo=$ac_try;;
19702esac
19703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19704 (eval "$ac_link") 2>conftest.er1
973a76b1 19705 ac_status=$?
edfaf76d
LK
19706 grep -v '^ *+' conftest.er1 >conftest.err
19707 rm -f conftest.er1
19708 cat conftest.err >&5
973a76b1 19709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19710 (exit $ac_status); } && {
19711 test -z "$ac_c_werror_flag" ||
19712 test ! -s conftest.err
19713 } && test -s conftest$ac_exeext &&
19714 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19715 eval "$as_ac_var=yes"
19716else
19717 echo "$as_me: failed program was:" >&5
19650fd6
AS
19718sed 's/^/| /' conftest.$ac_ext >&5
19719
ca81d7a0 19720 eval "$as_ac_var=no"
973a76b1 19721fi
ca81d7a0 19722
f053c89f 19723rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19724 conftest$ac_exeext conftest.$ac_ext
973a76b1 19725fi
ca81d7a0
JD
19726ac_res=`eval echo '${'$as_ac_var'}'`
19727 { echo "$as_me:$LINENO: result: $ac_res" >&5
19728echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
19729if test `eval echo '${'$as_ac_var'}'` = yes; then
19730 cat >>confdefs.h <<_ACEOF
19731#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19732_ACEOF
19733
19734else
19735 # strftime is in -lintl on SCO UNIX.
ca81d7a0
JD
19736{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
19737echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
19738if test "${ac_cv_lib_intl_strftime+set}" = set; then
19739 echo $ECHO_N "(cached) $ECHO_C" >&6
19740else
19741 ac_check_lib_save_LIBS=$LIBS
19742LIBS="-lintl $LIBS"
19743cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19744/* confdefs.h. */
19745_ACEOF
19746cat confdefs.h >>conftest.$ac_ext
19747cat >>conftest.$ac_ext <<_ACEOF
19748/* end confdefs.h. */
973a76b1 19749
ca81d7a0
JD
19750/* Override any GCC internal prototype to avoid an error.
19751 Use char because int might match the return type of a GCC
19752 builtin and then its argument prototype would still apply. */
973a76b1
DL
19753#ifdef __cplusplus
19754extern "C"
19755#endif
973a76b1
DL
19756char strftime ();
19757int
19758main ()
19759{
ca81d7a0 19760return strftime ();
973a76b1
DL
19761 ;
19762 return 0;
19763}
19764_ACEOF
19765rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19766if { (ac_try="$ac_link"
19767case "(($ac_try" in
19768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19769 *) ac_try_echo=$ac_try;;
19770esac
19771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19772 (eval "$ac_link") 2>conftest.er1
973a76b1 19773 ac_status=$?
edfaf76d
LK
19774 grep -v '^ *+' conftest.er1 >conftest.err
19775 rm -f conftest.er1
19776 cat conftest.err >&5
973a76b1 19777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19778 (exit $ac_status); } && {
19779 test -z "$ac_c_werror_flag" ||
19780 test ! -s conftest.err
19781 } && test -s conftest$ac_exeext &&
19782 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19783 ac_cv_lib_intl_strftime=yes
19784else
19785 echo "$as_me: failed program was:" >&5
19650fd6
AS
19786sed 's/^/| /' conftest.$ac_ext >&5
19787
ca81d7a0 19788 ac_cv_lib_intl_strftime=no
973a76b1 19789fi
ca81d7a0 19790
f053c89f 19791rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19792 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19793LIBS=$ac_check_lib_save_LIBS
19794fi
ca81d7a0
JD
19795{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
19796echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
19797if test $ac_cv_lib_intl_strftime = yes; then
19798 cat >>confdefs.h <<\_ACEOF
19799#define HAVE_STRFTIME 1
19800_ACEOF
19801
19802LIBS="-lintl $LIBS"
19803fi
19804
19805fi
19806done
19807
19808
b936fae4
AS
19809# UNIX98 PTYs.
19810
19811for ac_func in grantpt
503d2be0
AS
19812do
19813as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19814{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19815echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19816if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19817 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19818else
503d2be0 19819 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19820/* confdefs.h. */
19821_ACEOF
19822cat confdefs.h >>conftest.$ac_ext
19823cat >>conftest.$ac_ext <<_ACEOF
19824/* end confdefs.h. */
edfaf76d
LK
19825/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19826 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19827#define $ac_func innocuous_$ac_func
19828
503d2be0 19829/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19830 which can conflict with char $ac_func (); below.
19831 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19832 <limits.h> exists even on freestanding compilers. */
edfaf76d 19833
19650fd6
AS
19834#ifdef __STDC__
19835# include <limits.h>
19836#else
19837# include <assert.h>
19838#endif
edfaf76d
LK
19839
19840#undef $ac_func
19841
ca81d7a0
JD
19842/* Override any GCC internal prototype to avoid an error.
19843 Use char because int might match the return type of a GCC
19844 builtin and then its argument prototype would still apply. */
503d2be0
AS
19845#ifdef __cplusplus
19846extern "C"
19847#endif
503d2be0 19848char $ac_func ();
503d2be0
AS
19849/* The GNU C library defines this for functions which it implements
19850 to always fail with ENOSYS. Some functions are actually named
19851 something starting with __ and the normal name is an alias. */
ca81d7a0 19852#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 19853choke me
503d2be0 19854#endif
4c343001 19855
19650fd6
AS
19856int
19857main ()
19858{
ca81d7a0 19859return $ac_func ();
503d2be0
AS
19860 ;
19861 return 0;
19862}
19863_ACEOF
19864rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19865if { (ac_try="$ac_link"
19866case "(($ac_try" in
19867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19868 *) ac_try_echo=$ac_try;;
19869esac
19870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19871 (eval "$ac_link") 2>conftest.er1
503d2be0 19872 ac_status=$?
edfaf76d
LK
19873 grep -v '^ *+' conftest.er1 >conftest.err
19874 rm -f conftest.er1
19875 cat conftest.err >&5
c0d27fcc 19876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19877 (exit $ac_status); } && {
19878 test -z "$ac_c_werror_flag" ||
19879 test ! -s conftest.err
19880 } && test -s conftest$ac_exeext &&
19881 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19882 eval "$as_ac_var=yes"
19883else
19884 echo "$as_me: failed program was:" >&5
19650fd6
AS
19885sed 's/^/| /' conftest.$ac_ext >&5
19886
ca81d7a0 19887 eval "$as_ac_var=no"
503d2be0 19888fi
ca81d7a0 19889
f053c89f 19890rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19891 conftest$ac_exeext conftest.$ac_ext
503d2be0 19892fi
ca81d7a0
JD
19893ac_res=`eval echo '${'$as_ac_var'}'`
19894 { echo "$as_me:$LINENO: result: $ac_res" >&5
19895echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19896if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19897 cat >>confdefs.h <<_ACEOF
503d2be0 19898#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19899_ACEOF
4c343001
DL
19900
19901fi
503d2be0
AS
19902done
19903
c0d27fcc 19904
b936fae4 19905# PTY-related GNU extensions.
4c343001 19906
b936fae4
AS
19907for ac_func in getpt
19908do
19909as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19910{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19911echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19912if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19913 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19914else
b936fae4 19915 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19916/* confdefs.h. */
19917_ACEOF
19918cat confdefs.h >>conftest.$ac_ext
19919cat >>conftest.$ac_ext <<_ACEOF
19920/* end confdefs.h. */
edfaf76d
LK
19921/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19922 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19923#define $ac_func innocuous_$ac_func
19924
087121cc 19925/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19926 which can conflict with char $ac_func (); below.
19927 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19928 <limits.h> exists even on freestanding compilers. */
edfaf76d 19929
19650fd6
AS
19930#ifdef __STDC__
19931# include <limits.h>
19932#else
19933# include <assert.h>
19934#endif
edfaf76d
LK
19935
19936#undef $ac_func
19937
ca81d7a0
JD
19938/* Override any GCC internal prototype to avoid an error.
19939 Use char because int might match the return type of a GCC
19940 builtin and then its argument prototype would still apply. */
503d2be0
AS
19941#ifdef __cplusplus
19942extern "C"
19943#endif
503d2be0 19944char $ac_func ();
087121cc
GM
19945/* The GNU C library defines this for functions which it implements
19946 to always fail with ENOSYS. Some functions are actually named
19947 something starting with __ and the normal name is an alias. */
ca81d7a0 19948#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19949choke me
087121cc
GM
19950#endif
19951
19650fd6
AS
19952int
19953main ()
19954{
ca81d7a0 19955return $ac_func ();
503d2be0
AS
19956 ;
19957 return 0;
19958}
19959_ACEOF
19960rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19961if { (ac_try="$ac_link"
19962case "(($ac_try" in
19963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19964 *) ac_try_echo=$ac_try;;
19965esac
19966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19967 (eval "$ac_link") 2>conftest.er1
503d2be0 19968 ac_status=$?
edfaf76d
LK
19969 grep -v '^ *+' conftest.er1 >conftest.err
19970 rm -f conftest.er1
19971 cat conftest.err >&5
c0d27fcc 19972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19973 (exit $ac_status); } && {
19974 test -z "$ac_c_werror_flag" ||
19975 test ! -s conftest.err
19976 } && test -s conftest$ac_exeext &&
19977 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19978 eval "$as_ac_var=yes"
19979else
19980 echo "$as_me: failed program was:" >&5
19650fd6
AS
19981sed 's/^/| /' conftest.$ac_ext >&5
19982
ca81d7a0 19983 eval "$as_ac_var=no"
503d2be0 19984fi
ca81d7a0 19985
f053c89f 19986rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19987 conftest$ac_exeext conftest.$ac_ext
503d2be0 19988fi
ca81d7a0
JD
19989ac_res=`eval echo '${'$as_ac_var'}'`
19990 { echo "$as_me:$LINENO: result: $ac_res" >&5
19991echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19992if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19993 cat >>confdefs.h <<_ACEOF
503d2be0 19994#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19995_ACEOF
087121cc 19996
087121cc
GM
19997fi
19998done
19999
c0d27fcc 20000
ba4481b5
DL
20001# Check this now, so that we will NOT find the above functions in ncurses.
20002# That is because we have not set up to link ncurses in lib-src.
20003# It's better to believe a function is not available
20004# than to expect to find it in ncurses.
503d2be0 20005
ca81d7a0
JD
20006{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
20007echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
20008if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
20009 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20010else
503d2be0 20011 ac_check_lib_save_LIBS=$LIBS
ba4481b5 20012LIBS="-lncurses $LIBS"
503d2be0 20013cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20014/* confdefs.h. */
20015_ACEOF
20016cat confdefs.h >>conftest.$ac_ext
20017cat >>conftest.$ac_ext <<_ACEOF
20018/* end confdefs.h. */
503d2be0 20019
ca81d7a0
JD
20020/* Override any GCC internal prototype to avoid an error.
20021 Use char because int might match the return type of a GCC
20022 builtin and then its argument prototype would still apply. */
503d2be0
AS
20023#ifdef __cplusplus
20024extern "C"
20025#endif
503d2be0
AS
20026char tparm ();
20027int
20028main ()
20029{
ca81d7a0 20030return tparm ();
503d2be0
AS
20031 ;
20032 return 0;
20033}
20034_ACEOF
20035rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20036if { (ac_try="$ac_link"
20037case "(($ac_try" in
20038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20039 *) ac_try_echo=$ac_try;;
20040esac
20041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20042 (eval "$ac_link") 2>conftest.er1
503d2be0 20043 ac_status=$?
edfaf76d
LK
20044 grep -v '^ *+' conftest.er1 >conftest.err
20045 rm -f conftest.er1
20046 cat conftest.err >&5
c0d27fcc 20047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20048 (exit $ac_status); } && {
20049 test -z "$ac_c_werror_flag" ||
20050 test ! -s conftest.err
20051 } && test -s conftest$ac_exeext &&
20052 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20053 ac_cv_lib_ncurses_tparm=yes
20054else
20055 echo "$as_me: failed program was:" >&5
19650fd6
AS
20056sed 's/^/| /' conftest.$ac_ext >&5
20057
ca81d7a0 20058 ac_cv_lib_ncurses_tparm=no
503d2be0 20059fi
ca81d7a0 20060
f053c89f 20061rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20062 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20063LIBS=$ac_check_lib_save_LIBS
20064fi
ca81d7a0
JD
20065{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
20066echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 20067if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 20068 cat >>confdefs.h <<_ACEOF
503d2be0 20069#define HAVE_LIBNCURSES 1
c0d27fcc 20070_ACEOF
ba4481b5
DL
20071
20072 LIBS="-lncurses $LIBS"
20073
ba4481b5
DL
20074fi
20075
c0d27fcc 20076
bc3512d0
CY
20077# Do we have res_init, for detecting changes in /etc/resolv.conf?
20078
20079resolv=no
074767f2 20080cat >conftest.$ac_ext <<_ACEOF
bc3512d0
CY
20081/* confdefs.h. */
20082_ACEOF
20083cat confdefs.h >>conftest.$ac_ext
20084cat >>conftest.$ac_ext <<_ACEOF
20085/* end confdefs.h. */
074767f2
AS
20086#include <netinet/in.h>
20087#include <arpa/nameser.h>
20088#include <resolv.h>
bc3512d0
CY
20089int
20090main ()
20091{
074767f2 20092return res_init();
bc3512d0
CY
20093 ;
20094 return 0;
20095}
20096_ACEOF
20097rm -f conftest.$ac_objext conftest$ac_exeext
20098if { (ac_try="$ac_link"
20099case "(($ac_try" in
20100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20101 *) ac_try_echo=$ac_try;;
20102esac
20103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20104 (eval "$ac_link") 2>conftest.er1
20105 ac_status=$?
20106 grep -v '^ *+' conftest.er1 >conftest.err
20107 rm -f conftest.er1
20108 cat conftest.err >&5
20109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20110 (exit $ac_status); } && {
20111 test -z "$ac_c_werror_flag" ||
20112 test ! -s conftest.err
20113 } && test -s conftest$ac_exeext &&
20114 $as_test_x conftest$ac_exeext; then
074767f2 20115 have_res_init=yes
bc3512d0
CY
20116else
20117 echo "$as_me: failed program was:" >&5
20118sed 's/^/| /' conftest.$ac_ext >&5
20119
074767f2 20120 have_res_init=no
bc3512d0
CY
20121fi
20122
20123rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20124 conftest$ac_exeext conftest.$ac_ext
bc3512d0
CY
20125if test "$have_res_init" = no; then
20126 OLIBS="$LIBS"
20127 LIBS="$LIBS -lresolv"
20128 { echo "$as_me:$LINENO: checking for res_init with -lresolv" >&5
20129echo $ECHO_N "checking for res_init with -lresolv... $ECHO_C" >&6; }
20130 cat >conftest.$ac_ext <<_ACEOF
20131/* confdefs.h. */
20132_ACEOF
20133cat confdefs.h >>conftest.$ac_ext
20134cat >>conftest.$ac_ext <<_ACEOF
20135/* end confdefs.h. */
20136#include <netinet/in.h>
20137#include <arpa/nameser.h>
20138#include <resolv.h>
20139int
20140main ()
20141{
074767f2 20142return res_init();
bc3512d0
CY
20143 ;
20144 return 0;
20145}
20146_ACEOF
20147rm -f conftest.$ac_objext conftest$ac_exeext
20148if { (ac_try="$ac_link"
20149case "(($ac_try" in
20150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20151 *) ac_try_echo=$ac_try;;
20152esac
20153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20154 (eval "$ac_link") 2>conftest.er1
20155 ac_status=$?
20156 grep -v '^ *+' conftest.er1 >conftest.err
20157 rm -f conftest.er1
20158 cat conftest.err >&5
20159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20160 (exit $ac_status); } && {
20161 test -z "$ac_c_werror_flag" ||
20162 test ! -s conftest.err
20163 } && test -s conftest$ac_exeext &&
20164 $as_test_x conftest$ac_exeext; then
20165 have_res_init=yes
20166else
20167 echo "$as_me: failed program was:" >&5
20168sed 's/^/| /' conftest.$ac_ext >&5
20169
20170 have_res_init=no
20171fi
20172
20173rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20174 conftest$ac_exeext conftest.$ac_ext
20175 { echo "$as_me:$LINENO: result: $have_res_init" >&5
20176echo "${ECHO_T}$have_res_init" >&6; }
20177 if test "$have_res_init" = yes ; then
20178 resolv=yes
20179 fi
20180 LIBS="$OLIBS"
20181fi
20182
20183if test "$have_res_init" = yes; then
20184
20185cat >>confdefs.h <<\_ACEOF
20186#define HAVE_RES_INIT 1
20187_ACEOF
20188
20189fi
20190
84e70f78 20191# Do we need the Hesiod library to provide the support routines?
ff1095d1 20192if test "$with_hesiod" != no ; then
84e70f78 20193 # Don't set $LIBS here -- see comments above.
ca81d7a0
JD
20194 { echo "$as_me:$LINENO: checking for res_send" >&5
20195echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
20196if test "${ac_cv_func_res_send+set}" = set; then
20197 echo $ECHO_N "(cached) $ECHO_C" >&6
20198else
20199 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20200/* confdefs.h. */
20201_ACEOF
20202cat confdefs.h >>conftest.$ac_ext
20203cat >>conftest.$ac_ext <<_ACEOF
20204/* end confdefs.h. */
edfaf76d
LK
20205/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
20206 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20207#define res_send innocuous_res_send
20208
84e70f78 20209/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20210 which can conflict with char res_send (); below.
20211 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20212 <limits.h> exists even on freestanding compilers. */
edfaf76d 20213
19650fd6
AS
20214#ifdef __STDC__
20215# include <limits.h>
20216#else
20217# include <assert.h>
20218#endif
edfaf76d
LK
20219
20220#undef res_send
20221
ca81d7a0
JD
20222/* Override any GCC internal prototype to avoid an error.
20223 Use char because int might match the return type of a GCC
20224 builtin and then its argument prototype would still apply. */
84e70f78
KR
20225#ifdef __cplusplus
20226extern "C"
20227#endif
84e70f78 20228char res_send ();
84e70f78
KR
20229/* The GNU C library defines this for functions which it implements
20230 to always fail with ENOSYS. Some functions are actually named
20231 something starting with __ and the normal name is an alias. */
ca81d7a0 20232#if defined __stub_res_send || defined __stub___res_send
84e70f78 20233choke me
cd958eb3
MB
20234#endif
20235
19650fd6
AS
20236int
20237main ()
20238{
ca81d7a0 20239return res_send ();
84e70f78
KR
20240 ;
20241 return 0;
20242}
20243_ACEOF
20244rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20245if { (ac_try="$ac_link"
20246case "(($ac_try" in
20247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20248 *) ac_try_echo=$ac_try;;
20249esac
20250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20251 (eval "$ac_link") 2>conftest.er1
84e70f78 20252 ac_status=$?
edfaf76d
LK
20253 grep -v '^ *+' conftest.er1 >conftest.err
20254 rm -f conftest.er1
20255 cat conftest.err >&5
c0d27fcc 20256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20257 (exit $ac_status); } && {
20258 test -z "$ac_c_werror_flag" ||
20259 test ! -s conftest.err
20260 } && test -s conftest$ac_exeext &&
20261 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20262 ac_cv_func_res_send=yes
20263else
20264 echo "$as_me: failed program was:" >&5
19650fd6
AS
20265sed 's/^/| /' conftest.$ac_ext >&5
20266
ca81d7a0 20267 ac_cv_func_res_send=no
84e70f78 20268fi
ca81d7a0 20269
f053c89f 20270rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20271 conftest$ac_exeext conftest.$ac_ext
84e70f78 20272fi
ca81d7a0
JD
20273{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
20274echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
20275if test $ac_cv_func_res_send = yes; then
20276 :
20277else
ca81d7a0
JD
20278 { echo "$as_me:$LINENO: checking for __res_send" >&5
20279echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
20280if test "${ac_cv_func___res_send+set}" = set; then
20281 echo $ECHO_N "(cached) $ECHO_C" >&6
20282else
20283 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20284/* confdefs.h. */
20285_ACEOF
20286cat confdefs.h >>conftest.$ac_ext
20287cat >>conftest.$ac_ext <<_ACEOF
20288/* end confdefs.h. */
edfaf76d
LK
20289/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
20290 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20291#define __res_send innocuous___res_send
20292
84e70f78 20293/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20294 which can conflict with char __res_send (); below.
20295 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20296 <limits.h> exists even on freestanding compilers. */
edfaf76d 20297
19650fd6
AS
20298#ifdef __STDC__
20299# include <limits.h>
20300#else
20301# include <assert.h>
20302#endif
edfaf76d
LK
20303
20304#undef __res_send
20305
ca81d7a0
JD
20306/* Override any GCC internal prototype to avoid an error.
20307 Use char because int might match the return type of a GCC
20308 builtin and then its argument prototype would still apply. */
84e70f78
KR
20309#ifdef __cplusplus
20310extern "C"
20311#endif
84e70f78 20312char __res_send ();
84e70f78
KR
20313/* The GNU C library defines this for functions which it implements
20314 to always fail with ENOSYS. Some functions are actually named
20315 something starting with __ and the normal name is an alias. */
ca81d7a0 20316#if defined __stub___res_send || defined __stub_____res_send
84e70f78 20317choke me
84e70f78
KR
20318#endif
20319
19650fd6
AS
20320int
20321main ()
20322{
ca81d7a0 20323return __res_send ();
84e70f78
KR
20324 ;
20325 return 0;
20326}
20327_ACEOF
20328rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20329if { (ac_try="$ac_link"
20330case "(($ac_try" in
20331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20332 *) ac_try_echo=$ac_try;;
20333esac
20334eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20335 (eval "$ac_link") 2>conftest.er1
84e70f78 20336 ac_status=$?
edfaf76d
LK
20337 grep -v '^ *+' conftest.er1 >conftest.err
20338 rm -f conftest.er1
20339 cat conftest.err >&5
c0d27fcc 20340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20341 (exit $ac_status); } && {
20342 test -z "$ac_c_werror_flag" ||
20343 test ! -s conftest.err
20344 } && test -s conftest$ac_exeext &&
20345 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20346 ac_cv_func___res_send=yes
20347else
20348 echo "$as_me: failed program was:" >&5
19650fd6
AS
20349sed 's/^/| /' conftest.$ac_ext >&5
20350
ca81d7a0 20351 ac_cv_func___res_send=no
84e70f78 20352fi
ca81d7a0 20353
f053c89f 20354rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20355 conftest$ac_exeext conftest.$ac_ext
84e70f78 20356fi
ca81d7a0
JD
20357{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
20358echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
20359if test $ac_cv_func___res_send = yes; then
20360 :
20361else
ca81d7a0
JD
20362 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
20363echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20364if test "${ac_cv_lib_resolv_res_send+set}" = set; then
20365 echo $ECHO_N "(cached) $ECHO_C" >&6
20366else
20367 ac_check_lib_save_LIBS=$LIBS
20368LIBS="-lresolv $LIBS"
20369cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20370/* confdefs.h. */
20371_ACEOF
20372cat confdefs.h >>conftest.$ac_ext
20373cat >>conftest.$ac_ext <<_ACEOF
20374/* end confdefs.h. */
84e70f78 20375
ca81d7a0
JD
20376/* Override any GCC internal prototype to avoid an error.
20377 Use char because int might match the return type of a GCC
20378 builtin and then its argument prototype would still apply. */
84e70f78
KR
20379#ifdef __cplusplus
20380extern "C"
20381#endif
84e70f78
KR
20382char res_send ();
20383int
20384main ()
20385{
ca81d7a0 20386return res_send ();
84e70f78
KR
20387 ;
20388 return 0;
20389}
20390_ACEOF
20391rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20392if { (ac_try="$ac_link"
20393case "(($ac_try" in
20394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20395 *) ac_try_echo=$ac_try;;
20396esac
20397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20398 (eval "$ac_link") 2>conftest.er1
84e70f78 20399 ac_status=$?
edfaf76d
LK
20400 grep -v '^ *+' conftest.er1 >conftest.err
20401 rm -f conftest.er1
20402 cat conftest.err >&5
c0d27fcc 20403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20404 (exit $ac_status); } && {
20405 test -z "$ac_c_werror_flag" ||
20406 test ! -s conftest.err
20407 } && test -s conftest$ac_exeext &&
20408 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20409 ac_cv_lib_resolv_res_send=yes
20410else
20411 echo "$as_me: failed program was:" >&5
19650fd6
AS
20412sed 's/^/| /' conftest.$ac_ext >&5
20413
ca81d7a0 20414 ac_cv_lib_resolv_res_send=no
84e70f78 20415fi
ca81d7a0 20416
f053c89f 20417rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20418 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20419LIBS=$ac_check_lib_save_LIBS
20420fi
ca81d7a0
JD
20421{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
20422echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
20423if test $ac_cv_lib_resolv_res_send = yes; then
20424 resolv=yes
20425else
ca81d7a0
JD
20426 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
20427echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20428if test "${ac_cv_lib_resolv___res_send+set}" = set; then
20429 echo $ECHO_N "(cached) $ECHO_C" >&6
20430else
20431 ac_check_lib_save_LIBS=$LIBS
20432LIBS="-lresolv $LIBS"
20433cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20434/* confdefs.h. */
20435_ACEOF
20436cat confdefs.h >>conftest.$ac_ext
20437cat >>conftest.$ac_ext <<_ACEOF
20438/* end confdefs.h. */
84e70f78 20439
ca81d7a0
JD
20440/* Override any GCC internal prototype to avoid an error.
20441 Use char because int might match the return type of a GCC
20442 builtin and then its argument prototype would still apply. */
84e70f78
KR
20443#ifdef __cplusplus
20444extern "C"
20445#endif
84e70f78
KR
20446char __res_send ();
20447int
20448main ()
20449{
ca81d7a0 20450return __res_send ();
84e70f78
KR
20451 ;
20452 return 0;
20453}
20454_ACEOF
20455rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20456if { (ac_try="$ac_link"
20457case "(($ac_try" in
20458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20459 *) ac_try_echo=$ac_try;;
20460esac
20461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20462 (eval "$ac_link") 2>conftest.er1
84e70f78 20463 ac_status=$?
edfaf76d
LK
20464 grep -v '^ *+' conftest.er1 >conftest.err
20465 rm -f conftest.er1
20466 cat conftest.err >&5
c0d27fcc 20467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20468 (exit $ac_status); } && {
20469 test -z "$ac_c_werror_flag" ||
20470 test ! -s conftest.err
20471 } && test -s conftest$ac_exeext &&
20472 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20473 ac_cv_lib_resolv___res_send=yes
20474else
20475 echo "$as_me: failed program was:" >&5
19650fd6
AS
20476sed 's/^/| /' conftest.$ac_ext >&5
20477
ca81d7a0 20478 ac_cv_lib_resolv___res_send=no
84e70f78 20479fi
ca81d7a0 20480
f053c89f 20481rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20482 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20483LIBS=$ac_check_lib_save_LIBS
20484fi
ca81d7a0
JD
20485{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
20486echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
20487if test $ac_cv_lib_resolv___res_send = yes; then
20488 resolv=yes
20489fi
20490
20491fi
20492
20493fi
20494
20495fi
20496
20497 if test "$resolv" = yes ; then
20498 RESOLVLIB=-lresolv
84e70f78
KR
20499 else
20500 RESOLVLIB=
20501 fi
ca81d7a0
JD
20502 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
20503echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
20504if test "${ac_cv_func_hes_getmailhost+set}" = set; then
20505 echo $ECHO_N "(cached) $ECHO_C" >&6
20506else
20507 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20508/* confdefs.h. */
20509_ACEOF
20510cat confdefs.h >>conftest.$ac_ext
20511cat >>conftest.$ac_ext <<_ACEOF
20512/* end confdefs.h. */
edfaf76d
LK
20513/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
20514 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20515#define hes_getmailhost innocuous_hes_getmailhost
20516
84e70f78 20517/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20518 which can conflict with char hes_getmailhost (); below.
20519 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20520 <limits.h> exists even on freestanding compilers. */
edfaf76d 20521
19650fd6
AS
20522#ifdef __STDC__
20523# include <limits.h>
20524#else
20525# include <assert.h>
20526#endif
edfaf76d
LK
20527
20528#undef hes_getmailhost
20529
ca81d7a0
JD
20530/* Override any GCC internal prototype to avoid an error.
20531 Use char because int might match the return type of a GCC
20532 builtin and then its argument prototype would still apply. */
84e70f78
KR
20533#ifdef __cplusplus
20534extern "C"
20535#endif
84e70f78 20536char hes_getmailhost ();
84e70f78
KR
20537/* The GNU C library defines this for functions which it implements
20538 to always fail with ENOSYS. Some functions are actually named
20539 something starting with __ and the normal name is an alias. */
ca81d7a0 20540#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 20541choke me
cd958eb3
MB
20542#endif
20543
19650fd6
AS
20544int
20545main ()
20546{
ca81d7a0 20547return hes_getmailhost ();
84e70f78
KR
20548 ;
20549 return 0;
20550}
20551_ACEOF
20552rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20553if { (ac_try="$ac_link"
20554case "(($ac_try" in
20555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20556 *) ac_try_echo=$ac_try;;
20557esac
20558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20559 (eval "$ac_link") 2>conftest.er1
84e70f78 20560 ac_status=$?
edfaf76d
LK
20561 grep -v '^ *+' conftest.er1 >conftest.err
20562 rm -f conftest.er1
20563 cat conftest.err >&5
c0d27fcc 20564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20565 (exit $ac_status); } && {
20566 test -z "$ac_c_werror_flag" ||
20567 test ! -s conftest.err
20568 } && test -s conftest$ac_exeext &&
20569 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20570 ac_cv_func_hes_getmailhost=yes
20571else
20572 echo "$as_me: failed program was:" >&5
19650fd6
AS
20573sed 's/^/| /' conftest.$ac_ext >&5
20574
ca81d7a0 20575 ac_cv_func_hes_getmailhost=no
84e70f78 20576fi
ca81d7a0 20577
f053c89f 20578rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20579 conftest$ac_exeext conftest.$ac_ext
84e70f78 20580fi
ca81d7a0
JD
20581{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
20582echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
20583if test $ac_cv_func_hes_getmailhost = yes; then
20584 :
20585else
ca81d7a0
JD
20586 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
20587echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
20588if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
20589 echo $ECHO_N "(cached) $ECHO_C" >&6
20590else
20591 ac_check_lib_save_LIBS=$LIBS
20592LIBS="-lhesiod $RESOLVLIB $LIBS"
20593cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20594/* confdefs.h. */
20595_ACEOF
20596cat confdefs.h >>conftest.$ac_ext
20597cat >>conftest.$ac_ext <<_ACEOF
20598/* end confdefs.h. */
84e70f78 20599
ca81d7a0
JD
20600/* Override any GCC internal prototype to avoid an error.
20601 Use char because int might match the return type of a GCC
20602 builtin and then its argument prototype would still apply. */
84e70f78
KR
20603#ifdef __cplusplus
20604extern "C"
20605#endif
84e70f78
KR
20606char hes_getmailhost ();
20607int
20608main ()
20609{
ca81d7a0 20610return hes_getmailhost ();
84e70f78
KR
20611 ;
20612 return 0;
20613}
20614_ACEOF
20615rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20616if { (ac_try="$ac_link"
20617case "(($ac_try" in
20618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20619 *) ac_try_echo=$ac_try;;
20620esac
20621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20622 (eval "$ac_link") 2>conftest.er1
84e70f78 20623 ac_status=$?
edfaf76d
LK
20624 grep -v '^ *+' conftest.er1 >conftest.err
20625 rm -f conftest.er1
20626 cat conftest.err >&5
c0d27fcc 20627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20628 (exit $ac_status); } && {
20629 test -z "$ac_c_werror_flag" ||
20630 test ! -s conftest.err
20631 } && test -s conftest$ac_exeext &&
20632 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20633 ac_cv_lib_hesiod_hes_getmailhost=yes
20634else
20635 echo "$as_me: failed program was:" >&5
19650fd6
AS
20636sed 's/^/| /' conftest.$ac_ext >&5
20637
ca81d7a0 20638 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 20639fi
ca81d7a0 20640
f053c89f 20641rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20642 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20643LIBS=$ac_check_lib_save_LIBS
20644fi
ca81d7a0
JD
20645{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
20646echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 20647if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 20648
c0d27fcc 20649cat >>confdefs.h <<\_ACEOF
84e70f78 20650#define HAVE_LIBHESIOD 1
c0d27fcc 20651_ACEOF
84e70f78
KR
20652
20653else
20654 :
20655fi
20656
20657fi
20658
20659fi
20660
bc3512d0
CY
20661# Do we need libresolv (due to res_init or Hesiod)?
20662if test "$resolv" = yes ; then
20663
20664cat >>confdefs.h <<\_ACEOF
20665#define HAVE_LIBRESOLV 1
20666_ACEOF
20667
20668fi
20669
a21616bd 20670# These tell us which Kerberos-related libraries to use.
ff1095d1 20671if test "${with_kerberos}" != no; then
503d2be0 20672
ca81d7a0
JD
20673{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
20674echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
20675if test "${ac_cv_lib_com_err_com_err+set}" = set; then
20676 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20677else
503d2be0 20678 ac_check_lib_save_LIBS=$LIBS
a21616bd 20679LIBS="-lcom_err $LIBS"
503d2be0 20680cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20681/* confdefs.h. */
20682_ACEOF
20683cat confdefs.h >>conftest.$ac_ext
20684cat >>conftest.$ac_ext <<_ACEOF
20685/* end confdefs.h. */
503d2be0 20686
ca81d7a0
JD
20687/* Override any GCC internal prototype to avoid an error.
20688 Use char because int might match the return type of a GCC
20689 builtin and then its argument prototype would still apply. */
503d2be0
AS
20690#ifdef __cplusplus
20691extern "C"
20692#endif
503d2be0
AS
20693char com_err ();
20694int
20695main ()
20696{
ca81d7a0 20697return com_err ();
503d2be0
AS
20698 ;
20699 return 0;
20700}
20701_ACEOF
20702rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20703if { (ac_try="$ac_link"
20704case "(($ac_try" in
20705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20706 *) ac_try_echo=$ac_try;;
20707esac
20708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20709 (eval "$ac_link") 2>conftest.er1
503d2be0 20710 ac_status=$?
edfaf76d
LK
20711 grep -v '^ *+' conftest.er1 >conftest.err
20712 rm -f conftest.er1
20713 cat conftest.err >&5
c0d27fcc 20714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20715 (exit $ac_status); } && {
20716 test -z "$ac_c_werror_flag" ||
20717 test ! -s conftest.err
20718 } && test -s conftest$ac_exeext &&
20719 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20720 ac_cv_lib_com_err_com_err=yes
20721else
20722 echo "$as_me: failed program was:" >&5
19650fd6
AS
20723sed 's/^/| /' conftest.$ac_ext >&5
20724
ca81d7a0 20725 ac_cv_lib_com_err_com_err=no
503d2be0 20726fi
ca81d7a0 20727
f053c89f 20728rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20729 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20730LIBS=$ac_check_lib_save_LIBS
20731fi
ca81d7a0
JD
20732{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
20733echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 20734if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 20735 cat >>confdefs.h <<_ACEOF
503d2be0 20736#define HAVE_LIBCOM_ERR 1
c0d27fcc 20737_ACEOF
a21616bd
KR
20738
20739 LIBS="-lcom_err $LIBS"
20740
a21616bd
KR
20741fi
20742
c0d27fcc 20743
ca81d7a0
JD
20744{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
20745echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
20746if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
20747 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20748else
503d2be0 20749 ac_check_lib_save_LIBS=$LIBS
a21616bd 20750LIBS="-lk5crypto $LIBS"
503d2be0 20751cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20752/* confdefs.h. */
20753_ACEOF
20754cat confdefs.h >>conftest.$ac_ext
20755cat >>conftest.$ac_ext <<_ACEOF
20756/* end confdefs.h. */
503d2be0 20757
ca81d7a0
JD
20758/* Override any GCC internal prototype to avoid an error.
20759 Use char because int might match the return type of a GCC
20760 builtin and then its argument prototype would still apply. */
503d2be0
AS
20761#ifdef __cplusplus
20762extern "C"
20763#endif
503d2be0
AS
20764char mit_des_cbc_encrypt ();
20765int
20766main ()
20767{
ca81d7a0 20768return mit_des_cbc_encrypt ();
503d2be0
AS
20769 ;
20770 return 0;
20771}
20772_ACEOF
20773rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20774if { (ac_try="$ac_link"
20775case "(($ac_try" in
20776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20777 *) ac_try_echo=$ac_try;;
20778esac
20779eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20780 (eval "$ac_link") 2>conftest.er1
503d2be0 20781 ac_status=$?
edfaf76d
LK
20782 grep -v '^ *+' conftest.er1 >conftest.err
20783 rm -f conftest.er1
20784 cat conftest.err >&5
c0d27fcc 20785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20786 (exit $ac_status); } && {
20787 test -z "$ac_c_werror_flag" ||
20788 test ! -s conftest.err
20789 } && test -s conftest$ac_exeext &&
20790 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20791 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
20792else
20793 echo "$as_me: failed program was:" >&5
19650fd6
AS
20794sed 's/^/| /' conftest.$ac_ext >&5
20795
ca81d7a0 20796 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 20797fi
ca81d7a0 20798
f053c89f 20799rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20800 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20801LIBS=$ac_check_lib_save_LIBS
20802fi
ca81d7a0
JD
20803{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
20804echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20805if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20806 cat >>confdefs.h <<_ACEOF
503d2be0 20807#define HAVE_LIBK5CRYPTO 1
c0d27fcc 20808_ACEOF
a21616bd
KR
20809
20810 LIBS="-lk5crypto $LIBS"
20811
a21616bd
KR
20812fi
20813
c0d27fcc 20814
ca81d7a0
JD
20815{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
20816echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
20817if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
20818 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20819else
503d2be0 20820 ac_check_lib_save_LIBS=$LIBS
a21616bd 20821LIBS="-lcrypto $LIBS"
503d2be0 20822cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20823/* confdefs.h. */
20824_ACEOF
20825cat confdefs.h >>conftest.$ac_ext
20826cat >>conftest.$ac_ext <<_ACEOF
20827/* end confdefs.h. */
503d2be0 20828
ca81d7a0
JD
20829/* Override any GCC internal prototype to avoid an error.
20830 Use char because int might match the return type of a GCC
20831 builtin and then its argument prototype would still apply. */
503d2be0
AS
20832#ifdef __cplusplus
20833extern "C"
20834#endif
503d2be0
AS
20835char mit_des_cbc_encrypt ();
20836int
20837main ()
20838{
ca81d7a0 20839return mit_des_cbc_encrypt ();
503d2be0
AS
20840 ;
20841 return 0;
20842}
20843_ACEOF
20844rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20845if { (ac_try="$ac_link"
20846case "(($ac_try" in
20847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20848 *) ac_try_echo=$ac_try;;
20849esac
20850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20851 (eval "$ac_link") 2>conftest.er1
503d2be0 20852 ac_status=$?
edfaf76d
LK
20853 grep -v '^ *+' conftest.er1 >conftest.err
20854 rm -f conftest.er1
20855 cat conftest.err >&5
c0d27fcc 20856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20857 (exit $ac_status); } && {
20858 test -z "$ac_c_werror_flag" ||
20859 test ! -s conftest.err
20860 } && test -s conftest$ac_exeext &&
20861 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20862 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
20863else
20864 echo "$as_me: failed program was:" >&5
19650fd6
AS
20865sed 's/^/| /' conftest.$ac_ext >&5
20866
ca81d7a0 20867 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 20868fi
ca81d7a0 20869
f053c89f 20870rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20871 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20872LIBS=$ac_check_lib_save_LIBS
20873fi
ca81d7a0
JD
20874{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
20875echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20876if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20877 cat >>confdefs.h <<_ACEOF
503d2be0 20878#define HAVE_LIBCRYPTO 1
c0d27fcc 20879_ACEOF
a21616bd
KR
20880
20881 LIBS="-lcrypto $LIBS"
20882
a21616bd
KR
20883fi
20884
c0d27fcc 20885
ca81d7a0
JD
20886{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
20887echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
20888if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
20889 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20890else
503d2be0 20891 ac_check_lib_save_LIBS=$LIBS
a21616bd 20892LIBS="-lkrb5 $LIBS"
503d2be0 20893cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20894/* confdefs.h. */
20895_ACEOF
20896cat confdefs.h >>conftest.$ac_ext
20897cat >>conftest.$ac_ext <<_ACEOF
20898/* end confdefs.h. */
a21616bd 20899
ca81d7a0
JD
20900/* Override any GCC internal prototype to avoid an error.
20901 Use char because int might match the return type of a GCC
20902 builtin and then its argument prototype would still apply. */
503d2be0
AS
20903#ifdef __cplusplus
20904extern "C"
20905#endif
503d2be0
AS
20906char krb5_init_context ();
20907int
20908main ()
20909{
ca81d7a0 20910return krb5_init_context ();
503d2be0
AS
20911 ;
20912 return 0;
20913}
20914_ACEOF
20915rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20916if { (ac_try="$ac_link"
20917case "(($ac_try" in
20918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20919 *) ac_try_echo=$ac_try;;
20920esac
20921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20922 (eval "$ac_link") 2>conftest.er1
503d2be0 20923 ac_status=$?
edfaf76d
LK
20924 grep -v '^ *+' conftest.er1 >conftest.err
20925 rm -f conftest.er1
20926 cat conftest.err >&5
c0d27fcc 20927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20928 (exit $ac_status); } && {
20929 test -z "$ac_c_werror_flag" ||
20930 test ! -s conftest.err
20931 } && test -s conftest$ac_exeext &&
20932 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20933 ac_cv_lib_krb5_krb5_init_context=yes
20934else
20935 echo "$as_me: failed program was:" >&5
19650fd6
AS
20936sed 's/^/| /' conftest.$ac_ext >&5
20937
ca81d7a0 20938 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20939fi
ca81d7a0 20940
f053c89f 20941rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20942 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20943LIBS=$ac_check_lib_save_LIBS
20944fi
ca81d7a0
JD
20945{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20946echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 20947if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20948 cat >>confdefs.h <<_ACEOF
503d2be0 20949#define HAVE_LIBKRB5 1
c0d27fcc 20950_ACEOF
a21616bd
KR
20951
20952 LIBS="-lkrb5 $LIBS"
20953
a21616bd
KR
20954fi
20955
ff1095d1 20956 if test "${with_kerberos5}" = no; then
503d2be0 20957
ca81d7a0
JD
20958{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20959echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
20960if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
20961 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20962else
503d2be0 20963 ac_check_lib_save_LIBS=$LIBS
a21616bd 20964LIBS="-ldes425 $LIBS"
503d2be0 20965cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20966/* confdefs.h. */
20967_ACEOF
20968cat confdefs.h >>conftest.$ac_ext
20969cat >>conftest.$ac_ext <<_ACEOF
20970/* end confdefs.h. */
503d2be0 20971
ca81d7a0
JD
20972/* Override any GCC internal prototype to avoid an error.
20973 Use char because int might match the return type of a GCC
20974 builtin and then its argument prototype would still apply. */
503d2be0
AS
20975#ifdef __cplusplus
20976extern "C"
20977#endif
503d2be0
AS
20978char des_cbc_encrypt ();
20979int
20980main ()
20981{
ca81d7a0 20982return des_cbc_encrypt ();
503d2be0
AS
20983 ;
20984 return 0;
20985}
20986_ACEOF
20987rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20988if { (ac_try="$ac_link"
20989case "(($ac_try" in
20990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20991 *) ac_try_echo=$ac_try;;
20992esac
20993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20994 (eval "$ac_link") 2>conftest.er1
503d2be0 20995 ac_status=$?
edfaf76d
LK
20996 grep -v '^ *+' conftest.er1 >conftest.err
20997 rm -f conftest.er1
20998 cat conftest.err >&5
c0d27fcc 20999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21000 (exit $ac_status); } && {
21001 test -z "$ac_c_werror_flag" ||
21002 test ! -s conftest.err
21003 } && test -s conftest$ac_exeext &&
21004 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21005 ac_cv_lib_des425_des_cbc_encrypt=yes
21006else
21007 echo "$as_me: failed program was:" >&5
19650fd6
AS
21008sed 's/^/| /' conftest.$ac_ext >&5
21009
ca81d7a0 21010 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 21011fi
ca81d7a0 21012
f053c89f 21013rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21014 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21015LIBS=$ac_check_lib_save_LIBS
21016fi
ca81d7a0
JD
21017{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
21018echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 21019if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 21020 cat >>confdefs.h <<_ACEOF
503d2be0 21021#define HAVE_LIBDES425 1
c0d27fcc 21022_ACEOF
a21616bd
KR
21023
21024 LIBS="-ldes425 $LIBS"
21025
21026else
503d2be0 21027
ca81d7a0
JD
21028{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
21029echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
21030if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
21031 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21032else
503d2be0 21033 ac_check_lib_save_LIBS=$LIBS
a21616bd 21034LIBS="-ldes $LIBS"
503d2be0 21035cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21036/* confdefs.h. */
21037_ACEOF
21038cat confdefs.h >>conftest.$ac_ext
21039cat >>conftest.$ac_ext <<_ACEOF
21040/* end confdefs.h. */
503d2be0 21041
ca81d7a0
JD
21042/* Override any GCC internal prototype to avoid an error.
21043 Use char because int might match the return type of a GCC
21044 builtin and then its argument prototype would still apply. */
503d2be0
AS
21045#ifdef __cplusplus
21046extern "C"
21047#endif
503d2be0
AS
21048char des_cbc_encrypt ();
21049int
21050main ()
21051{
ca81d7a0 21052return des_cbc_encrypt ();
503d2be0
AS
21053 ;
21054 return 0;
21055}
21056_ACEOF
21057rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21058if { (ac_try="$ac_link"
21059case "(($ac_try" in
21060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21061 *) ac_try_echo=$ac_try;;
21062esac
21063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21064 (eval "$ac_link") 2>conftest.er1
503d2be0 21065 ac_status=$?
edfaf76d
LK
21066 grep -v '^ *+' conftest.er1 >conftest.err
21067 rm -f conftest.er1
21068 cat conftest.err >&5
c0d27fcc 21069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21070 (exit $ac_status); } && {
21071 test -z "$ac_c_werror_flag" ||
21072 test ! -s conftest.err
21073 } && test -s conftest$ac_exeext &&
21074 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21075 ac_cv_lib_des_des_cbc_encrypt=yes
21076else
21077 echo "$as_me: failed program was:" >&5
19650fd6
AS
21078sed 's/^/| /' conftest.$ac_ext >&5
21079
ca81d7a0 21080 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 21081fi
ca81d7a0 21082
f053c89f 21083rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21084 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21085LIBS=$ac_check_lib_save_LIBS
21086fi
ca81d7a0
JD
21087{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
21088echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 21089if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 21090 cat >>confdefs.h <<_ACEOF
503d2be0 21091#define HAVE_LIBDES 1
c0d27fcc 21092_ACEOF
a21616bd
KR
21093
21094 LIBS="-ldes $LIBS"
21095
a21616bd
KR
21096fi
21097
21098fi
21099
c0d27fcc 21100
ca81d7a0
JD
21101{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
21102echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
21103if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
21104 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21105else
503d2be0 21106 ac_check_lib_save_LIBS=$LIBS
a21616bd 21107LIBS="-lkrb4 $LIBS"
503d2be0 21108cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21109/* confdefs.h. */
21110_ACEOF
21111cat confdefs.h >>conftest.$ac_ext
21112cat >>conftest.$ac_ext <<_ACEOF
21113/* end confdefs.h. */
503d2be0 21114
ca81d7a0
JD
21115/* Override any GCC internal prototype to avoid an error.
21116 Use char because int might match the return type of a GCC
21117 builtin and then its argument prototype would still apply. */
503d2be0
AS
21118#ifdef __cplusplus
21119extern "C"
21120#endif
503d2be0
AS
21121char krb_get_cred ();
21122int
21123main ()
21124{
f053c89f 21125return krb_get_cred ();
503d2be0
AS
21126 ;
21127 return 0;
21128}
21129_ACEOF
21130rm -f conftest.$ac_objext conftest$ac_exeext
f053c89f
CY
21131if { (ac_try="$ac_link"
21132case "(($ac_try" in
ca81d7a0
JD
21133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21134 *) ac_try_echo=$ac_try;;
21135esac
21136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 21137 (eval "$ac_link") 2>conftest.er1
503d2be0 21138 ac_status=$?
edfaf76d
LK
21139 grep -v '^ *+' conftest.er1 >conftest.err
21140 rm -f conftest.er1
21141 cat conftest.err >&5
c0d27fcc 21142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21143 (exit $ac_status); } && {
21144 test -z "$ac_c_werror_flag" ||
21145 test ! -s conftest.err
21146 } && test -s conftest$ac_exeext &&
21147 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21148 ac_cv_lib_krb4_krb_get_cred=yes
21149else
21150 echo "$as_me: failed program was:" >&5
19650fd6
AS
21151sed 's/^/| /' conftest.$ac_ext >&5
21152
ca81d7a0 21153 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 21154fi
ca81d7a0 21155
f053c89f 21156rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21157 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21158LIBS=$ac_check_lib_save_LIBS
21159fi
ca81d7a0
JD
21160{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
21161echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 21162if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 21163 cat >>confdefs.h <<_ACEOF
503d2be0 21164#define HAVE_LIBKRB4 1
c0d27fcc 21165_ACEOF
a21616bd
KR
21166
21167 LIBS="-lkrb4 $LIBS"
21168
21169else
503d2be0 21170
ca81d7a0
JD
21171{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
21172echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
21173if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
21174 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 21175else
503d2be0 21176 ac_check_lib_save_LIBS=$LIBS
a21616bd 21177LIBS="-lkrb $LIBS"
503d2be0 21178cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21179/* confdefs.h. */
21180_ACEOF
21181cat confdefs.h >>conftest.$ac_ext
21182cat >>conftest.$ac_ext <<_ACEOF
21183/* end confdefs.h. */
503d2be0 21184
ca81d7a0
JD
21185/* Override any GCC internal prototype to avoid an error.
21186 Use char because int might match the return type of a GCC
21187 builtin and then its argument prototype would still apply. */
503d2be0
AS
21188#ifdef __cplusplus
21189extern "C"
21190#endif
503d2be0
AS
21191char krb_get_cred ();
21192int
21193main ()
21194{
ca81d7a0 21195return krb_get_cred ();
503d2be0
AS
21196 ;
21197 return 0;
21198}
21199_ACEOF
21200rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21201if { (ac_try="$ac_link"
21202case "(($ac_try" in
21203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21204 *) ac_try_echo=$ac_try;;
21205esac
21206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21207 (eval "$ac_link") 2>conftest.er1
503d2be0 21208 ac_status=$?
edfaf76d
LK
21209 grep -v '^ *+' conftest.er1 >conftest.err
21210 rm -f conftest.er1
21211 cat conftest.err >&5
c0d27fcc 21212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21213 (exit $ac_status); } && {
21214 test -z "$ac_c_werror_flag" ||
21215 test ! -s conftest.err
21216 } && test -s conftest$ac_exeext &&
21217 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21218 ac_cv_lib_krb_krb_get_cred=yes
21219else
21220 echo "$as_me: failed program was:" >&5
19650fd6
AS
21221sed 's/^/| /' conftest.$ac_ext >&5
21222
ca81d7a0 21223 ac_cv_lib_krb_krb_get_cred=no
503d2be0 21224fi
ca81d7a0 21225
f053c89f 21226rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21227 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21228LIBS=$ac_check_lib_save_LIBS
21229fi
ca81d7a0
JD
21230{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
21231echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 21232if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 21233 cat >>confdefs.h <<_ACEOF
503d2be0 21234#define HAVE_LIBKRB 1
c0d27fcc 21235_ACEOF
a21616bd
KR
21236
21237 LIBS="-lkrb $LIBS"
21238
a21616bd
KR
21239fi
21240
21241fi
21242
21243 fi
21244
ff1095d1 21245 if test "${with_kerberos5}" != no; then
503d2be0
AS
21246
21247for ac_header in krb5.h
a21616bd 21248do
503d2be0 21249as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21250if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21251 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21252echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21253if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21254 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21255fi
ca81d7a0
JD
21256ac_res=`eval echo '${'$as_ac_Header'}'`
21257 { echo "$as_me:$LINENO: result: $ac_res" >&5
21258echo "${ECHO_T}$ac_res" >&6; }
98418dba 21259else
c0d27fcc 21260 # Is the header compilable?
ca81d7a0
JD
21261{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21262echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21263cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21264/* confdefs.h. */
21265_ACEOF
21266cat confdefs.h >>conftest.$ac_ext
21267cat >>conftest.$ac_ext <<_ACEOF
21268/* end confdefs.h. */
c0d27fcc
MR
21269$ac_includes_default
21270#include <$ac_header>
21271_ACEOF
21272rm -f conftest.$ac_objext
ca81d7a0
JD
21273if { (ac_try="$ac_compile"
21274case "(($ac_try" in
21275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21276 *) ac_try_echo=$ac_try;;
21277esac
21278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21279 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21280 ac_status=$?
edfaf76d
LK
21281 grep -v '^ *+' conftest.er1 >conftest.err
21282 rm -f conftest.er1
21283 cat conftest.err >&5
c0d27fcc 21284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21285 (exit $ac_status); } && {
21286 test -z "$ac_c_werror_flag" ||
21287 test ! -s conftest.err
21288 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21289 ac_header_compiler=yes
21290else
21291 echo "$as_me: failed program was:" >&5
19650fd6
AS
21292sed 's/^/| /' conftest.$ac_ext >&5
21293
ca81d7a0 21294 ac_header_compiler=no
c0d27fcc 21295fi
ca81d7a0
JD
21296
21297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21298{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21299echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21300
21301# Is the header present?
ca81d7a0
JD
21302{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21303echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21304cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21305/* confdefs.h. */
21306_ACEOF
21307cat confdefs.h >>conftest.$ac_ext
21308cat >>conftest.$ac_ext <<_ACEOF
21309/* end confdefs.h. */
503d2be0
AS
21310#include <$ac_header>
21311_ACEOF
ca81d7a0
JD
21312if { (ac_try="$ac_cpp conftest.$ac_ext"
21313case "(($ac_try" in
21314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21315 *) ac_try_echo=$ac_try;;
21316esac
21317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21318 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21319 ac_status=$?
6bae0ccf 21320 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21321 rm -f conftest.er1
21322 cat conftest.err >&5
c0d27fcc 21323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21324 (exit $ac_status); } >/dev/null && {
21325 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21326 test ! -s conftest.err
21327 }; then
c0d27fcc 21328 ac_header_preproc=yes
503d2be0
AS
21329else
21330 echo "$as_me: failed program was:" >&5
19650fd6
AS
21331sed 's/^/| /' conftest.$ac_ext >&5
21332
c0d27fcc 21333 ac_header_preproc=no
a21616bd 21334fi
ca81d7a0 21335
503d2be0 21336rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21337{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21338echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21339
21340# So? What about this header?
edfaf76d
LK
21341case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21342 yes:no: )
c0d27fcc
MR
21343 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21344echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21345 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21346echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21347 ac_header_preproc=yes
19650fd6 21348 ;;
edfaf76d 21349 no:yes:* )
c0d27fcc
MR
21350 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21351echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21352 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21353echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21354 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21355echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21356 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21357echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21358 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21359echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21360 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21361echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21362
19650fd6 21363 ;;
c0d27fcc 21364esac
ca81d7a0
JD
21365{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21366echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21367if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21368 echo $ECHO_N "(cached) $ECHO_C" >&6
21369else
edfaf76d 21370 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21371fi
ca81d7a0
JD
21372ac_res=`eval echo '${'$as_ac_Header'}'`
21373 { echo "$as_me:$LINENO: result: $ac_res" >&5
21374echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21375
21376fi
503d2be0 21377if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21378 cat >>confdefs.h <<_ACEOF
503d2be0 21379#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21380_ACEOF
503d2be0 21381
a21616bd 21382fi
c0d27fcc 21383
a21616bd
KR
21384done
21385
21386 else
503d2be0
AS
21387
21388for ac_header in des.h
a21616bd 21389do
503d2be0 21390as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21391if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21392 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21393echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21394if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21395 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21396fi
ca81d7a0
JD
21397ac_res=`eval echo '${'$as_ac_Header'}'`
21398 { echo "$as_me:$LINENO: result: $ac_res" >&5
21399echo "${ECHO_T}$ac_res" >&6; }
98418dba 21400else
c0d27fcc 21401 # Is the header compilable?
ca81d7a0
JD
21402{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21403echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21404cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21405/* confdefs.h. */
21406_ACEOF
21407cat confdefs.h >>conftest.$ac_ext
21408cat >>conftest.$ac_ext <<_ACEOF
21409/* end confdefs.h. */
c0d27fcc
MR
21410$ac_includes_default
21411#include <$ac_header>
21412_ACEOF
21413rm -f conftest.$ac_objext
ca81d7a0
JD
21414if { (ac_try="$ac_compile"
21415case "(($ac_try" in
21416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21417 *) ac_try_echo=$ac_try;;
21418esac
21419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21420 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21421 ac_status=$?
edfaf76d
LK
21422 grep -v '^ *+' conftest.er1 >conftest.err
21423 rm -f conftest.er1
21424 cat conftest.err >&5
c0d27fcc 21425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21426 (exit $ac_status); } && {
21427 test -z "$ac_c_werror_flag" ||
21428 test ! -s conftest.err
21429 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21430 ac_header_compiler=yes
21431else
21432 echo "$as_me: failed program was:" >&5
19650fd6
AS
21433sed 's/^/| /' conftest.$ac_ext >&5
21434
ca81d7a0 21435 ac_header_compiler=no
c0d27fcc 21436fi
ca81d7a0
JD
21437
21438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21439{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21440echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21441
21442# Is the header present?
ca81d7a0
JD
21443{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21444echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21445cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21446/* confdefs.h. */
21447_ACEOF
21448cat confdefs.h >>conftest.$ac_ext
21449cat >>conftest.$ac_ext <<_ACEOF
21450/* end confdefs.h. */
503d2be0
AS
21451#include <$ac_header>
21452_ACEOF
ca81d7a0
JD
21453if { (ac_try="$ac_cpp conftest.$ac_ext"
21454case "(($ac_try" in
21455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21456 *) ac_try_echo=$ac_try;;
21457esac
21458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21459 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21460 ac_status=$?
6bae0ccf 21461 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21462 rm -f conftest.er1
21463 cat conftest.err >&5
c0d27fcc 21464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21465 (exit $ac_status); } >/dev/null && {
21466 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21467 test ! -s conftest.err
21468 }; then
c0d27fcc 21469 ac_header_preproc=yes
503d2be0
AS
21470else
21471 echo "$as_me: failed program was:" >&5
19650fd6
AS
21472sed 's/^/| /' conftest.$ac_ext >&5
21473
c0d27fcc 21474 ac_header_preproc=no
a21616bd 21475fi
ca81d7a0 21476
503d2be0 21477rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21478{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21479echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21480
21481# So? What about this header?
edfaf76d
LK
21482case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21483 yes:no: )
c0d27fcc
MR
21484 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21485echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21486 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21487echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21488 ac_header_preproc=yes
19650fd6 21489 ;;
edfaf76d 21490 no:yes:* )
c0d27fcc
MR
21491 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21492echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21493 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21494echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21495 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21496echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21497 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21498echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21499 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21500echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21501 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21502echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21503
19650fd6 21504 ;;
c0d27fcc 21505esac
ca81d7a0
JD
21506{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21507echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21508if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21509 echo $ECHO_N "(cached) $ECHO_C" >&6
21510else
edfaf76d 21511 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21512fi
ca81d7a0
JD
21513ac_res=`eval echo '${'$as_ac_Header'}'`
21514 { echo "$as_me:$LINENO: result: $ac_res" >&5
21515echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21516
21517fi
503d2be0 21518if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21519 cat >>confdefs.h <<_ACEOF
503d2be0 21520#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21521_ACEOF
503d2be0 21522
a21616bd 21523else
503d2be0
AS
21524
21525for ac_header in kerberosIV/des.h
a21616bd 21526do
503d2be0 21527as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21528if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21529 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21530echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21531if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21532 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21533fi
ca81d7a0
JD
21534ac_res=`eval echo '${'$as_ac_Header'}'`
21535 { echo "$as_me:$LINENO: result: $ac_res" >&5
21536echo "${ECHO_T}$ac_res" >&6; }
98418dba 21537else
c0d27fcc 21538 # Is the header compilable?
ca81d7a0
JD
21539{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21540echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21541cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21542/* confdefs.h. */
21543_ACEOF
21544cat confdefs.h >>conftest.$ac_ext
21545cat >>conftest.$ac_ext <<_ACEOF
21546/* end confdefs.h. */
c0d27fcc
MR
21547$ac_includes_default
21548#include <$ac_header>
21549_ACEOF
21550rm -f conftest.$ac_objext
ca81d7a0
JD
21551if { (ac_try="$ac_compile"
21552case "(($ac_try" in
21553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21554 *) ac_try_echo=$ac_try;;
21555esac
21556eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21557 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21558 ac_status=$?
edfaf76d
LK
21559 grep -v '^ *+' conftest.er1 >conftest.err
21560 rm -f conftest.er1
21561 cat conftest.err >&5
c0d27fcc 21562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21563 (exit $ac_status); } && {
21564 test -z "$ac_c_werror_flag" ||
21565 test ! -s conftest.err
21566 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21567 ac_header_compiler=yes
21568else
21569 echo "$as_me: failed program was:" >&5
19650fd6
AS
21570sed 's/^/| /' conftest.$ac_ext >&5
21571
ca81d7a0 21572 ac_header_compiler=no
c0d27fcc 21573fi
ca81d7a0
JD
21574
21575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21576{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21577echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21578
21579# Is the header present?
ca81d7a0
JD
21580{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21581echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21582cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21583/* confdefs.h. */
21584_ACEOF
21585cat confdefs.h >>conftest.$ac_ext
21586cat >>conftest.$ac_ext <<_ACEOF
21587/* end confdefs.h. */
503d2be0
AS
21588#include <$ac_header>
21589_ACEOF
ca81d7a0
JD
21590if { (ac_try="$ac_cpp conftest.$ac_ext"
21591case "(($ac_try" in
21592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21593 *) ac_try_echo=$ac_try;;
21594esac
21595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21596 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21597 ac_status=$?
6bae0ccf 21598 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21599 rm -f conftest.er1
21600 cat conftest.err >&5
c0d27fcc 21601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21602 (exit $ac_status); } >/dev/null && {
21603 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21604 test ! -s conftest.err
21605 }; then
c0d27fcc 21606 ac_header_preproc=yes
503d2be0
AS
21607else
21608 echo "$as_me: failed program was:" >&5
19650fd6
AS
21609sed 's/^/| /' conftest.$ac_ext >&5
21610
c0d27fcc 21611 ac_header_preproc=no
a21616bd 21612fi
ca81d7a0 21613
503d2be0 21614rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21615{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21616echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21617
21618# So? What about this header?
edfaf76d
LK
21619case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21620 yes:no: )
c0d27fcc
MR
21621 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21622echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21623 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21624echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21625 ac_header_preproc=yes
19650fd6 21626 ;;
edfaf76d 21627 no:yes:* )
c0d27fcc
MR
21628 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21629echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21630 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21631echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21632 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21633echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21634 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21635echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21636 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21637echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21638 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21639echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21640
19650fd6 21641 ;;
c0d27fcc 21642esac
ca81d7a0
JD
21643{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21644echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21645if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21646 echo $ECHO_N "(cached) $ECHO_C" >&6
21647else
edfaf76d 21648 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21649fi
ca81d7a0
JD
21650ac_res=`eval echo '${'$as_ac_Header'}'`
21651 { echo "$as_me:$LINENO: result: $ac_res" >&5
21652echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21653
21654fi
503d2be0 21655if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21656 cat >>confdefs.h <<_ACEOF
503d2be0 21657#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21658_ACEOF
503d2be0 21659
a21616bd 21660else
503d2be0
AS
21661
21662for ac_header in kerberos/des.h
a21616bd 21663do
503d2be0 21664as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21665if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21666 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21667echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21668if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21669 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21670fi
ca81d7a0
JD
21671ac_res=`eval echo '${'$as_ac_Header'}'`
21672 { echo "$as_me:$LINENO: result: $ac_res" >&5
21673echo "${ECHO_T}$ac_res" >&6; }
98418dba 21674else
c0d27fcc 21675 # Is the header compilable?
ca81d7a0
JD
21676{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21677echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21678cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21679/* confdefs.h. */
21680_ACEOF
21681cat confdefs.h >>conftest.$ac_ext
21682cat >>conftest.$ac_ext <<_ACEOF
21683/* end confdefs.h. */
c0d27fcc
MR
21684$ac_includes_default
21685#include <$ac_header>
21686_ACEOF
21687rm -f conftest.$ac_objext
ca81d7a0
JD
21688if { (ac_try="$ac_compile"
21689case "(($ac_try" in
21690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21691 *) ac_try_echo=$ac_try;;
21692esac
21693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21694 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21695 ac_status=$?
edfaf76d
LK
21696 grep -v '^ *+' conftest.er1 >conftest.err
21697 rm -f conftest.er1
21698 cat conftest.err >&5
c0d27fcc 21699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21700 (exit $ac_status); } && {
21701 test -z "$ac_c_werror_flag" ||
21702 test ! -s conftest.err
21703 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21704 ac_header_compiler=yes
21705else
21706 echo "$as_me: failed program was:" >&5
19650fd6
AS
21707sed 's/^/| /' conftest.$ac_ext >&5
21708
ca81d7a0 21709 ac_header_compiler=no
c0d27fcc 21710fi
ca81d7a0
JD
21711
21712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21713{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21714echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21715
21716# Is the header present?
ca81d7a0
JD
21717{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21718echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21719cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21720/* confdefs.h. */
21721_ACEOF
21722cat confdefs.h >>conftest.$ac_ext
21723cat >>conftest.$ac_ext <<_ACEOF
21724/* end confdefs.h. */
503d2be0
AS
21725#include <$ac_header>
21726_ACEOF
ca81d7a0
JD
21727if { (ac_try="$ac_cpp conftest.$ac_ext"
21728case "(($ac_try" in
21729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21730 *) ac_try_echo=$ac_try;;
21731esac
21732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21733 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21734 ac_status=$?
6bae0ccf 21735 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21736 rm -f conftest.er1
21737 cat conftest.err >&5
c0d27fcc 21738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21739 (exit $ac_status); } >/dev/null && {
21740 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21741 test ! -s conftest.err
21742 }; then
c0d27fcc 21743 ac_header_preproc=yes
503d2be0
AS
21744else
21745 echo "$as_me: failed program was:" >&5
19650fd6
AS
21746sed 's/^/| /' conftest.$ac_ext >&5
21747
c0d27fcc 21748 ac_header_preproc=no
a21616bd 21749fi
ca81d7a0 21750
503d2be0 21751rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21752{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21753echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21754
21755# So? What about this header?
edfaf76d
LK
21756case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21757 yes:no: )
c0d27fcc
MR
21758 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21759echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21760 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21761echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21762 ac_header_preproc=yes
19650fd6 21763 ;;
edfaf76d 21764 no:yes:* )
c0d27fcc
MR
21765 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21766echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21767 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21768echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21769 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21770echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21771 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21772echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21773 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21774echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21775 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21776echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21777
19650fd6 21778 ;;
c0d27fcc 21779esac
ca81d7a0
JD
21780{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21781echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21782if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21783 echo $ECHO_N "(cached) $ECHO_C" >&6
21784else
edfaf76d 21785 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21786fi
ca81d7a0
JD
21787ac_res=`eval echo '${'$as_ac_Header'}'`
21788 { echo "$as_me:$LINENO: result: $ac_res" >&5
21789echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21790
21791fi
503d2be0 21792if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21793 cat >>confdefs.h <<_ACEOF
503d2be0 21794#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21795_ACEOF
a21616bd
KR
21796
21797fi
c0d27fcc 21798
a21616bd
KR
21799done
21800
98418dba 21801fi
c0d27fcc 21802
925c2f3f
EZ
21803done
21804
98418dba 21805fi
c0d27fcc 21806
925c2f3f 21807done
98418dba 21808
c0d27fcc 21809
925c2f3f
EZ
21810for ac_header in krb.h
21811do
21812as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21813if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21814 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21815echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21816if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 21817 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21818fi
ca81d7a0
JD
21819ac_res=`eval echo '${'$as_ac_Header'}'`
21820 { echo "$as_me:$LINENO: result: $ac_res" >&5
21821echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21822else
21823 # Is the header compilable?
ca81d7a0
JD
21824{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21825echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21826cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21827/* confdefs.h. */
21828_ACEOF
21829cat confdefs.h >>conftest.$ac_ext
21830cat >>conftest.$ac_ext <<_ACEOF
21831/* end confdefs.h. */
c0d27fcc
MR
21832$ac_includes_default
21833#include <$ac_header>
21834_ACEOF
21835rm -f conftest.$ac_objext
ca81d7a0
JD
21836if { (ac_try="$ac_compile"
21837case "(($ac_try" in
21838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21839 *) ac_try_echo=$ac_try;;
21840esac
21841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21842 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21843 ac_status=$?
edfaf76d
LK
21844 grep -v '^ *+' conftest.er1 >conftest.err
21845 rm -f conftest.er1
21846 cat conftest.err >&5
c0d27fcc 21847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21848 (exit $ac_status); } && {
21849 test -z "$ac_c_werror_flag" ||
21850 test ! -s conftest.err
21851 } && test -s conftest.$ac_objext; then
c0d27fcc 21852 ac_header_compiler=yes
925c2f3f 21853else
c0d27fcc 21854 echo "$as_me: failed program was:" >&5
19650fd6
AS
21855sed 's/^/| /' conftest.$ac_ext >&5
21856
ca81d7a0 21857 ac_header_compiler=no
c0d27fcc 21858fi
ca81d7a0
JD
21859
21860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21861{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21862echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21863
21864# Is the header present?
ca81d7a0
JD
21865{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21866echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21867cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21868/* confdefs.h. */
21869_ACEOF
21870cat confdefs.h >>conftest.$ac_ext
21871cat >>conftest.$ac_ext <<_ACEOF
21872/* end confdefs.h. */
503d2be0
AS
21873#include <$ac_header>
21874_ACEOF
ca81d7a0
JD
21875if { (ac_try="$ac_cpp conftest.$ac_ext"
21876case "(($ac_try" in
21877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21878 *) ac_try_echo=$ac_try;;
21879esac
21880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21881 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21882 ac_status=$?
6bae0ccf 21883 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21884 rm -f conftest.er1
21885 cat conftest.err >&5
c0d27fcc 21886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21887 (exit $ac_status); } >/dev/null && {
21888 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21889 test ! -s conftest.err
21890 }; then
c0d27fcc 21891 ac_header_preproc=yes
503d2be0
AS
21892else
21893 echo "$as_me: failed program was:" >&5
19650fd6
AS
21894sed 's/^/| /' conftest.$ac_ext >&5
21895
c0d27fcc 21896 ac_header_preproc=no
a21616bd 21897fi
ca81d7a0 21898
503d2be0 21899rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21900{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21901echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21902
21903# So? What about this header?
edfaf76d
LK
21904case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21905 yes:no: )
c0d27fcc
MR
21906 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21907echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21908 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21909echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21910 ac_header_preproc=yes
19650fd6 21911 ;;
edfaf76d 21912 no:yes:* )
c0d27fcc
MR
21913 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21914echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21915 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21916echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21917 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21918echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21919 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21920echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21921 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21922echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21923 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21924echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21925
19650fd6 21926 ;;
c0d27fcc 21927esac
ca81d7a0
JD
21928{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21929echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21930if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21931 echo $ECHO_N "(cached) $ECHO_C" >&6
21932else
edfaf76d 21933 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21934fi
ca81d7a0
JD
21935ac_res=`eval echo '${'$as_ac_Header'}'`
21936 { echo "$as_me:$LINENO: result: $ac_res" >&5
21937echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21938
21939fi
503d2be0 21940if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21941 cat >>confdefs.h <<_ACEOF
503d2be0 21942#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21943_ACEOF
503d2be0 21944
a21616bd 21945else
503d2be0
AS
21946
21947for ac_header in kerberosIV/krb.h
a21616bd 21948do
503d2be0 21949as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21950if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21951 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21952echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21953if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21954 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21955fi
ca81d7a0
JD
21956ac_res=`eval echo '${'$as_ac_Header'}'`
21957 { echo "$as_me:$LINENO: result: $ac_res" >&5
21958echo "${ECHO_T}$ac_res" >&6; }
98418dba 21959else
c0d27fcc 21960 # Is the header compilable?
ca81d7a0
JD
21961{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21962echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21963cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21964/* confdefs.h. */
21965_ACEOF
21966cat confdefs.h >>conftest.$ac_ext
21967cat >>conftest.$ac_ext <<_ACEOF
21968/* end confdefs.h. */
c0d27fcc
MR
21969$ac_includes_default
21970#include <$ac_header>
21971_ACEOF
21972rm -f conftest.$ac_objext
ca81d7a0
JD
21973if { (ac_try="$ac_compile"
21974case "(($ac_try" in
21975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21976 *) ac_try_echo=$ac_try;;
21977esac
21978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21979 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21980 ac_status=$?
edfaf76d
LK
21981 grep -v '^ *+' conftest.er1 >conftest.err
21982 rm -f conftest.er1
21983 cat conftest.err >&5
c0d27fcc 21984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21985 (exit $ac_status); } && {
21986 test -z "$ac_c_werror_flag" ||
21987 test ! -s conftest.err
21988 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21989 ac_header_compiler=yes
21990else
21991 echo "$as_me: failed program was:" >&5
19650fd6
AS
21992sed 's/^/| /' conftest.$ac_ext >&5
21993
ca81d7a0 21994 ac_header_compiler=no
c0d27fcc 21995fi
ca81d7a0
JD
21996
21997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21998{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21999echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22000
22001# Is the header present?
ca81d7a0
JD
22002{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22003echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22004cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22005/* confdefs.h. */
22006_ACEOF
22007cat confdefs.h >>conftest.$ac_ext
22008cat >>conftest.$ac_ext <<_ACEOF
22009/* end confdefs.h. */
503d2be0
AS
22010#include <$ac_header>
22011_ACEOF
ca81d7a0
JD
22012if { (ac_try="$ac_cpp conftest.$ac_ext"
22013case "(($ac_try" in
22014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22015 *) ac_try_echo=$ac_try;;
22016esac
22017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22018 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22019 ac_status=$?
6bae0ccf 22020 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22021 rm -f conftest.er1
22022 cat conftest.err >&5
c0d27fcc 22023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22024 (exit $ac_status); } >/dev/null && {
22025 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22026 test ! -s conftest.err
22027 }; then
c0d27fcc 22028 ac_header_preproc=yes
503d2be0
AS
22029else
22030 echo "$as_me: failed program was:" >&5
19650fd6
AS
22031sed 's/^/| /' conftest.$ac_ext >&5
22032
c0d27fcc 22033 ac_header_preproc=no
a21616bd 22034fi
ca81d7a0 22035
503d2be0 22036rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22037{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22038echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22039
22040# So? What about this header?
edfaf76d
LK
22041case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22042 yes:no: )
c0d27fcc
MR
22043 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22044echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22045 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22046echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22047 ac_header_preproc=yes
19650fd6 22048 ;;
edfaf76d 22049 no:yes:* )
c0d27fcc
MR
22050 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22051echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22052 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22053echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22054 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22055echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22056 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22057echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22058 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22059echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22060 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22061echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22062
19650fd6 22063 ;;
c0d27fcc 22064esac
ca81d7a0
JD
22065{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22066echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22067if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22068 echo $ECHO_N "(cached) $ECHO_C" >&6
22069else
edfaf76d 22070 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22071fi
ca81d7a0
JD
22072ac_res=`eval echo '${'$as_ac_Header'}'`
22073 { echo "$as_me:$LINENO: result: $ac_res" >&5
22074echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22075
22076fi
503d2be0 22077if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22078 cat >>confdefs.h <<_ACEOF
503d2be0 22079#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22080_ACEOF
503d2be0 22081
a21616bd 22082else
503d2be0
AS
22083
22084for ac_header in kerberos/krb.h
a21616bd 22085do
503d2be0 22086as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22087if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22088 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22089echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22090if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22091 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22092fi
ca81d7a0
JD
22093ac_res=`eval echo '${'$as_ac_Header'}'`
22094 { echo "$as_me:$LINENO: result: $ac_res" >&5
22095echo "${ECHO_T}$ac_res" >&6; }
98418dba 22096else
c0d27fcc 22097 # Is the header compilable?
ca81d7a0
JD
22098{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22099echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22100cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22101/* confdefs.h. */
22102_ACEOF
22103cat confdefs.h >>conftest.$ac_ext
22104cat >>conftest.$ac_ext <<_ACEOF
22105/* end confdefs.h. */
c0d27fcc
MR
22106$ac_includes_default
22107#include <$ac_header>
22108_ACEOF
22109rm -f conftest.$ac_objext
ca81d7a0
JD
22110if { (ac_try="$ac_compile"
22111case "(($ac_try" in
22112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22113 *) ac_try_echo=$ac_try;;
22114esac
22115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22116 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22117 ac_status=$?
edfaf76d
LK
22118 grep -v '^ *+' conftest.er1 >conftest.err
22119 rm -f conftest.er1
22120 cat conftest.err >&5
c0d27fcc 22121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22122 (exit $ac_status); } && {
22123 test -z "$ac_c_werror_flag" ||
22124 test ! -s conftest.err
22125 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22126 ac_header_compiler=yes
22127else
22128 echo "$as_me: failed program was:" >&5
19650fd6
AS
22129sed 's/^/| /' conftest.$ac_ext >&5
22130
ca81d7a0 22131 ac_header_compiler=no
c0d27fcc 22132fi
ca81d7a0
JD
22133
22134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22135{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22136echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22137
22138# Is the header present?
ca81d7a0
JD
22139{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22140echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22141cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22142/* confdefs.h. */
22143_ACEOF
22144cat confdefs.h >>conftest.$ac_ext
22145cat >>conftest.$ac_ext <<_ACEOF
22146/* end confdefs.h. */
503d2be0
AS
22147#include <$ac_header>
22148_ACEOF
ca81d7a0
JD
22149if { (ac_try="$ac_cpp conftest.$ac_ext"
22150case "(($ac_try" in
22151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22152 *) ac_try_echo=$ac_try;;
22153esac
22154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22155 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22156 ac_status=$?
6bae0ccf 22157 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22158 rm -f conftest.er1
22159 cat conftest.err >&5
c0d27fcc 22160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22161 (exit $ac_status); } >/dev/null && {
22162 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22163 test ! -s conftest.err
22164 }; then
c0d27fcc 22165 ac_header_preproc=yes
503d2be0
AS
22166else
22167 echo "$as_me: failed program was:" >&5
19650fd6
AS
22168sed 's/^/| /' conftest.$ac_ext >&5
22169
c0d27fcc 22170 ac_header_preproc=no
a21616bd 22171fi
ca81d7a0 22172
503d2be0 22173rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22174{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22175echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
22176
22177# So? What about this header?
edfaf76d
LK
22178case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22179 yes:no: )
35996d22
AS
22180 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22181echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22182 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22183echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22184 ac_header_preproc=yes
19650fd6 22185 ;;
edfaf76d 22186 no:yes:* )
c0d27fcc
MR
22187 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22188echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22189 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22190echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22191 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22192echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22193 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22194echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22195 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22196echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22197 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22198echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22199
19650fd6 22200 ;;
c0d27fcc 22201esac
ca81d7a0
JD
22202{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22203echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22204if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22205 echo $ECHO_N "(cached) $ECHO_C" >&6
22206else
edfaf76d 22207 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22208fi
ca81d7a0
JD
22209ac_res=`eval echo '${'$as_ac_Header'}'`
22210 { echo "$as_me:$LINENO: result: $ac_res" >&5
22211echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22212
22213fi
503d2be0 22214if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22215 cat >>confdefs.h <<_ACEOF
503d2be0 22216#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22217_ACEOF
503d2be0 22218
a21616bd 22219fi
c0d27fcc 22220
a21616bd
KR
22221done
22222
22223fi
c0d27fcc 22224
a21616bd
KR
22225done
22226
22227fi
c0d27fcc 22228
a21616bd
KR
22229done
22230
22231 fi
503d2be0
AS
22232
22233for ac_header in com_err.h
a21616bd 22234do
503d2be0 22235as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22236if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22237 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22238echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22239if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22240 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22241fi
ca81d7a0
JD
22242ac_res=`eval echo '${'$as_ac_Header'}'`
22243 { echo "$as_me:$LINENO: result: $ac_res" >&5
22244echo "${ECHO_T}$ac_res" >&6; }
98418dba 22245else
c0d27fcc 22246 # Is the header compilable?
ca81d7a0
JD
22247{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22248echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22249cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22250/* confdefs.h. */
22251_ACEOF
22252cat confdefs.h >>conftest.$ac_ext
22253cat >>conftest.$ac_ext <<_ACEOF
22254/* end confdefs.h. */
c0d27fcc
MR
22255$ac_includes_default
22256#include <$ac_header>
22257_ACEOF
22258rm -f conftest.$ac_objext
ca81d7a0
JD
22259if { (ac_try="$ac_compile"
22260case "(($ac_try" in
22261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22262 *) ac_try_echo=$ac_try;;
22263esac
22264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22265 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
22266 ac_status=$?
22267 grep -v '^ *+' conftest.er1 >conftest.err
22268 rm -f conftest.er1
22269 cat conftest.err >&5
22270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22271 (exit $ac_status); } && {
22272 test -z "$ac_c_werror_flag" ||
22273 test ! -s conftest.err
22274 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22275 ac_header_compiler=yes
22276else
22277 echo "$as_me: failed program was:" >&5
19650fd6
AS
22278sed 's/^/| /' conftest.$ac_ext >&5
22279
ca81d7a0 22280 ac_header_compiler=no
c0d27fcc 22281fi
ca81d7a0
JD
22282
22283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22284{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22285echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22286
22287# Is the header present?
ca81d7a0
JD
22288{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22289echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22290cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22291/* confdefs.h. */
22292_ACEOF
22293cat confdefs.h >>conftest.$ac_ext
22294cat >>conftest.$ac_ext <<_ACEOF
22295/* end confdefs.h. */
503d2be0
AS
22296#include <$ac_header>
22297_ACEOF
ca81d7a0
JD
22298if { (ac_try="$ac_cpp conftest.$ac_ext"
22299case "(($ac_try" in
22300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22301 *) ac_try_echo=$ac_try;;
22302esac
22303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22304 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22305 ac_status=$?
6bae0ccf 22306 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22307 rm -f conftest.er1
22308 cat conftest.err >&5
c0d27fcc 22309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22310 (exit $ac_status); } >/dev/null && {
22311 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22312 test ! -s conftest.err
22313 }; then
c0d27fcc 22314 ac_header_preproc=yes
503d2be0
AS
22315else
22316 echo "$as_me: failed program was:" >&5
19650fd6
AS
22317sed 's/^/| /' conftest.$ac_ext >&5
22318
c0d27fcc 22319 ac_header_preproc=no
a21616bd 22320fi
ca81d7a0 22321
503d2be0 22322rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22323{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22324echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22325
22326# So? What about this header?
edfaf76d
LK
22327case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22328 yes:no: )
c0d27fcc
MR
22329 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22330echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22331 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22332echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22333 ac_header_preproc=yes
19650fd6 22334 ;;
edfaf76d 22335 no:yes:* )
c0d27fcc
MR
22336 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22337echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22338 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22339echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22340 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22341echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22342 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22343echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22344 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22345echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22346 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22347echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22348
19650fd6 22349 ;;
c0d27fcc 22350esac
ca81d7a0
JD
22351{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22352echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22353if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22354 echo $ECHO_N "(cached) $ECHO_C" >&6
22355else
edfaf76d 22356 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 22357fi
ca81d7a0
JD
22358ac_res=`eval echo '${'$as_ac_Header'}'`
22359 { echo "$as_me:$LINENO: result: $ac_res" >&5
22360echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22361
22362fi
503d2be0 22363if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22364 cat >>confdefs.h <<_ACEOF
503d2be0 22365#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22366_ACEOF
503d2be0 22367
a21616bd 22368fi
c0d27fcc 22369
a21616bd
KR
22370done
22371
22372fi
22373
ba4481b5
DL
22374# Solaris requires -lintl if you want strerror (which calls dgettext)
22375# to return localized messages.
503d2be0 22376
ca81d7a0
JD
22377{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
22378echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
22379if test "${ac_cv_lib_intl_dgettext+set}" = set; then
22380 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22381else
503d2be0 22382 ac_check_lib_save_LIBS=$LIBS
ba4481b5 22383LIBS="-lintl $LIBS"
503d2be0 22384cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22385/* confdefs.h. */
22386_ACEOF
22387cat confdefs.h >>conftest.$ac_ext
22388cat >>conftest.$ac_ext <<_ACEOF
22389/* end confdefs.h. */
503d2be0 22390
ca81d7a0
JD
22391/* Override any GCC internal prototype to avoid an error.
22392 Use char because int might match the return type of a GCC
22393 builtin and then its argument prototype would still apply. */
503d2be0
AS
22394#ifdef __cplusplus
22395extern "C"
22396#endif
503d2be0
AS
22397char dgettext ();
22398int
22399main ()
22400{
ca81d7a0 22401return dgettext ();
503d2be0
AS
22402 ;
22403 return 0;
22404}
22405_ACEOF
22406rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22407if { (ac_try="$ac_link"
22408case "(($ac_try" in
22409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22410 *) ac_try_echo=$ac_try;;
22411esac
22412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22413 (eval "$ac_link") 2>conftest.er1
503d2be0 22414 ac_status=$?
edfaf76d
LK
22415 grep -v '^ *+' conftest.er1 >conftest.err
22416 rm -f conftest.er1
22417 cat conftest.err >&5
c0d27fcc 22418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22419 (exit $ac_status); } && {
22420 test -z "$ac_c_werror_flag" ||
22421 test ! -s conftest.err
22422 } && test -s conftest$ac_exeext &&
22423 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22424 ac_cv_lib_intl_dgettext=yes
22425else
22426 echo "$as_me: failed program was:" >&5
19650fd6
AS
22427sed 's/^/| /' conftest.$ac_ext >&5
22428
ca81d7a0 22429 ac_cv_lib_intl_dgettext=no
503d2be0 22430fi
ca81d7a0 22431
f053c89f 22432rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22433 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22434LIBS=$ac_check_lib_save_LIBS
22435fi
ca81d7a0
JD
22436{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
22437echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 22438if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 22439 cat >>confdefs.h <<_ACEOF
503d2be0 22440#define HAVE_LIBINTL 1
c0d27fcc 22441_ACEOF
ba4481b5
DL
22442
22443 LIBS="-lintl $LIBS"
22444
ba4481b5
DL
22445fi
22446
c0d27fcc 22447
ca81d7a0
JD
22448{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
22449echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
22450if test "${emacs_cv_localtime_cache+set}" = set; then
22451 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
22452else
22453 if test x$ac_cv_func_tzset = xyes; then
22454if test "$cross_compiling" = yes; then
22455 # If we have tzset, assume the worst when cross-compiling.
22456emacs_cv_localtime_cache=yes
22457else
503d2be0 22458 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22459/* confdefs.h. */
22460_ACEOF
22461cat confdefs.h >>conftest.$ac_ext
22462cat >>conftest.$ac_ext <<_ACEOF
22463/* end confdefs.h. */
ba4481b5 22464#include <time.h>
ba4481b5
DL
22465extern char **environ;
22466unset_TZ ()
22467{
22468 char **from, **to;
22469 for (to = from = environ; (*to = *from); from++)
22470 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
22471 to++;
22472}
22473char TZ_GMT0[] = "TZ=GMT0";
22474char TZ_PST8[] = "TZ=PST8";
22475main()
22476{
22477 time_t now = time ((time_t *) 0);
22478 int hour_GMT0, hour_unset;
22479 if (putenv (TZ_GMT0) != 0)
22480 exit (1);
22481 hour_GMT0 = localtime (&now)->tm_hour;
22482 unset_TZ ();
22483 hour_unset = localtime (&now)->tm_hour;
22484 if (putenv (TZ_PST8) != 0)
22485 exit (1);
22486 if (localtime (&now)->tm_hour == hour_GMT0)
22487 exit (1);
22488 unset_TZ ();
22489 if (localtime (&now)->tm_hour != hour_unset)
22490 exit (1);
22491 exit (0);
22492}
503d2be0
AS
22493_ACEOF
22494rm -f conftest$ac_exeext
ca81d7a0
JD
22495if { (ac_try="$ac_link"
22496case "(($ac_try" in
22497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22498 *) ac_try_echo=$ac_try;;
22499esac
22500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22501 (eval "$ac_link") 2>&5
503d2be0 22502 ac_status=$?
c0d27fcc 22503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22504 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22505 { (case "(($ac_try" in
22506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22507 *) ac_try_echo=$ac_try;;
22508esac
22509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22510 (eval "$ac_try") 2>&5
503d2be0 22511 ac_status=$?
c0d27fcc 22512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22513 (exit $ac_status); }; }; then
ba4481b5
DL
22514 emacs_cv_localtime_cache=no
22515else
503d2be0
AS
22516 echo "$as_me: program exited with status $ac_status" >&5
22517echo "$as_me: failed program was:" >&5
19650fd6
AS
22518sed 's/^/| /' conftest.$ac_ext >&5
22519
c0d27fcc 22520( exit $ac_status )
503d2be0 22521emacs_cv_localtime_cache=yes
ba4481b5 22522fi
ca81d7a0 22523rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 22524fi
ca81d7a0
JD
22525
22526
ba4481b5
DL
22527else
22528 # If we lack tzset, report that localtime does not cache TZ,
22529 # since we can't invalidate the cache if we don't have tzset.
22530 emacs_cv_localtime_cache=no
22531fi
22532fi
ca81d7a0
JD
22533{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
22534echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 22535if test $emacs_cv_localtime_cache = yes; then
b936fae4 22536
c0d27fcc 22537cat >>confdefs.h <<\_ACEOF
ba4481b5 22538#define LOCALTIME_CACHE 1
c0d27fcc 22539_ACEOF
ba4481b5
DL
22540
22541fi
22542
22543if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
22544
22545for ac_func in gettimeofday
48d4b120 22546do
503d2be0 22547as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
22548{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22549echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22550if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22551 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 22552else
503d2be0 22553 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22554/* confdefs.h. */
22555_ACEOF
22556cat confdefs.h >>conftest.$ac_ext
22557cat >>conftest.$ac_ext <<_ACEOF
22558/* end confdefs.h. */
edfaf76d
LK
22559/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22560 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22561#define $ac_func innocuous_$ac_func
22562
48d4b120 22563/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22564 which can conflict with char $ac_func (); below.
22565 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22566 <limits.h> exists even on freestanding compilers. */
edfaf76d 22567
19650fd6
AS
22568#ifdef __STDC__
22569# include <limits.h>
22570#else
22571# include <assert.h>
22572#endif
edfaf76d
LK
22573
22574#undef $ac_func
22575
ca81d7a0
JD
22576/* Override any GCC internal prototype to avoid an error.
22577 Use char because int might match the return type of a GCC
22578 builtin and then its argument prototype would still apply. */
503d2be0
AS
22579#ifdef __cplusplus
22580extern "C"
22581#endif
503d2be0 22582char $ac_func ();
48d4b120
DL
22583/* The GNU C library defines this for functions which it implements
22584 to always fail with ENOSYS. Some functions are actually named
22585 something starting with __ and the normal name is an alias. */
ca81d7a0 22586#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 22587choke me
cd958eb3
MB
22588#endif
22589
19650fd6
AS
22590int
22591main ()
22592{
ca81d7a0 22593return $ac_func ();
503d2be0
AS
22594 ;
22595 return 0;
22596}
22597_ACEOF
22598rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22599if { (ac_try="$ac_link"
22600case "(($ac_try" in
22601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22602 *) ac_try_echo=$ac_try;;
22603esac
22604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22605 (eval "$ac_link") 2>conftest.er1
503d2be0 22606 ac_status=$?
edfaf76d
LK
22607 grep -v '^ *+' conftest.er1 >conftest.err
22608 rm -f conftest.er1
22609 cat conftest.err >&5
c0d27fcc 22610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22611 (exit $ac_status); } && {
22612 test -z "$ac_c_werror_flag" ||
22613 test ! -s conftest.err
22614 } && test -s conftest$ac_exeext &&
22615 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22616 eval "$as_ac_var=yes"
22617else
22618 echo "$as_me: failed program was:" >&5
19650fd6
AS
22619sed 's/^/| /' conftest.$ac_ext >&5
22620
ca81d7a0 22621 eval "$as_ac_var=no"
503d2be0 22622fi
ca81d7a0 22623
f053c89f 22624rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22625 conftest$ac_exeext conftest.$ac_ext
503d2be0 22626fi
ca81d7a0
JD
22627ac_res=`eval echo '${'$as_ac_var'}'`
22628 { echo "$as_me:$LINENO: result: $ac_res" >&5
22629echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22630if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22631 cat >>confdefs.h <<_ACEOF
503d2be0 22632#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22633_ACEOF
48d4b120 22634
48d4b120
DL
22635fi
22636done
22637
b936fae4 22638 if test $ac_cv_func_gettimeofday = yes; then
ca81d7a0
JD
22639 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
22640echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
22641if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
22642 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22643else
503d2be0 22644 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22645/* confdefs.h. */
22646_ACEOF
22647cat confdefs.h >>conftest.$ac_ext
22648cat >>conftest.$ac_ext <<_ACEOF
22649/* end confdefs.h. */
ba4481b5 22650
a3f08d9e
DL
22651#ifdef TIME_WITH_SYS_TIME
22652#include <sys/time.h>
22653#include <time.h>
22654#else
22655#ifdef HAVE_SYS_TIME_H
22656#include <sys/time.h>
22657#else
22658#include <time.h>
22659#endif
22660#endif
503d2be0
AS
22661int
22662main ()
22663{
a3f08d9e 22664struct timeval time;
b936fae4 22665 gettimeofday (&time, 0);
503d2be0
AS
22666 ;
22667 return 0;
22668}
22669_ACEOF
22670rm -f conftest.$ac_objext
f053c89f
CY
22671if { (ac_try="$ac_compile"
22672case "(($ac_try" in
ca81d7a0
JD
22673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22674 *) ac_try_echo=$ac_try;;
22675esac
22676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 22677 (eval "$ac_compile") 2>conftest.er1
503d2be0 22678 ac_status=$?
edfaf76d
LK
22679 grep -v '^ *+' conftest.er1 >conftest.err
22680 rm -f conftest.er1
22681 cat conftest.err >&5
c0d27fcc 22682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22683 (exit $ac_status); } && {
22684 test -z "$ac_c_werror_flag" ||
22685 test ! -s conftest.err
22686 } && test -s conftest.$ac_objext; then
ba4481b5
DL
22687 emacs_cv_gettimeofday_two_arguments=yes
22688else
503d2be0 22689 echo "$as_me: failed program was:" >&5
19650fd6
AS
22690sed 's/^/| /' conftest.$ac_ext >&5
22691
ca81d7a0 22692 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 22693fi
ca81d7a0
JD
22694
22695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22696fi
ca81d7a0
JD
22697{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
22698echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
22699 if test $emacs_cv_gettimeofday_two_arguments = no; then
22700
c0d27fcc 22701cat >>confdefs.h <<\_ACEOF
ba4481b5 22702#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 22703_ACEOF
ba4481b5 22704
b936fae4 22705 fi
ba4481b5
DL
22706 fi
22707fi
22708
22709ok_so_far=yes
ca81d7a0
JD
22710{ echo "$as_me:$LINENO: checking for socket" >&5
22711echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
22712if test "${ac_cv_func_socket+set}" = set; then
22713 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22714else
503d2be0 22715 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22716/* confdefs.h. */
22717_ACEOF
22718cat confdefs.h >>conftest.$ac_ext
22719cat >>conftest.$ac_ext <<_ACEOF
22720/* end confdefs.h. */
edfaf76d
LK
22721/* Define socket to an innocuous variant, in case <limits.h> declares socket.
22722 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22723#define socket innocuous_socket
22724
ba4481b5 22725/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22726 which can conflict with char socket (); below.
22727 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22728 <limits.h> exists even on freestanding compilers. */
edfaf76d 22729
19650fd6
AS
22730#ifdef __STDC__
22731# include <limits.h>
22732#else
22733# include <assert.h>
22734#endif
edfaf76d
LK
22735
22736#undef socket
22737
ca81d7a0
JD
22738/* Override any GCC internal prototype to avoid an error.
22739 Use char because int might match the return type of a GCC
22740 builtin and then its argument prototype would still apply. */
503d2be0
AS
22741#ifdef __cplusplus
22742extern "C"
22743#endif
503d2be0 22744char socket ();
ba4481b5
DL
22745/* The GNU C library defines this for functions which it implements
22746 to always fail with ENOSYS. Some functions are actually named
22747 something starting with __ and the normal name is an alias. */
ca81d7a0 22748#if defined __stub_socket || defined __stub___socket
ba4481b5 22749choke me
cd958eb3
MB
22750#endif
22751
19650fd6
AS
22752int
22753main ()
22754{
ca81d7a0 22755return socket ();
503d2be0
AS
22756 ;
22757 return 0;
22758}
22759_ACEOF
22760rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22761if { (ac_try="$ac_link"
22762case "(($ac_try" in
22763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22764 *) ac_try_echo=$ac_try;;
22765esac
22766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22767 (eval "$ac_link") 2>conftest.er1
503d2be0 22768 ac_status=$?
edfaf76d
LK
22769 grep -v '^ *+' conftest.er1 >conftest.err
22770 rm -f conftest.er1
22771 cat conftest.err >&5
c0d27fcc 22772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22773 (exit $ac_status); } && {
22774 test -z "$ac_c_werror_flag" ||
22775 test ! -s conftest.err
22776 } && test -s conftest$ac_exeext &&
22777 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22778 ac_cv_func_socket=yes
22779else
22780 echo "$as_me: failed program was:" >&5
19650fd6
AS
22781sed 's/^/| /' conftest.$ac_ext >&5
22782
ca81d7a0 22783 ac_cv_func_socket=no
503d2be0 22784fi
ca81d7a0 22785
f053c89f 22786rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22787 conftest$ac_exeext conftest.$ac_ext
503d2be0 22788fi
ca81d7a0
JD
22789{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
22790echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 22791if test $ac_cv_func_socket = yes; then
ba4481b5
DL
22792 :
22793else
503d2be0 22794 ok_so_far=no
ba4481b5
DL
22795fi
22796
22797if test $ok_so_far = yes; then
c0d27fcc 22798 if test "${ac_cv_header_netinet_in_h+set}" = set; then
ca81d7a0
JD
22799 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22800echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
22801if test "${ac_cv_header_netinet_in_h+set}" = set; then
22802 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22803fi
ca81d7a0
JD
22804{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22805echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 22806else
c0d27fcc 22807 # Is the header compilable?
ca81d7a0
JD
22808{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
22809echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 22810cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22811/* confdefs.h. */
22812_ACEOF
22813cat confdefs.h >>conftest.$ac_ext
22814cat >>conftest.$ac_ext <<_ACEOF
22815/* end confdefs.h. */
c0d27fcc
MR
22816$ac_includes_default
22817#include <netinet/in.h>
22818_ACEOF
22819rm -f conftest.$ac_objext
ca81d7a0
JD
22820if { (ac_try="$ac_compile"
22821case "(($ac_try" in
22822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22823 *) ac_try_echo=$ac_try;;
22824esac
22825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22826 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22827 ac_status=$?
edfaf76d
LK
22828 grep -v '^ *+' conftest.er1 >conftest.err
22829 rm -f conftest.er1
22830 cat conftest.err >&5
c0d27fcc 22831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
22832 (exit $ac_status); } && {
22833 test -z "$ac_c_werror_flag" ||
22834 test ! -s conftest.err
22835 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22836 ac_header_compiler=yes
22837else
22838 echo "$as_me: failed program was:" >&5
19650fd6
AS
22839sed 's/^/| /' conftest.$ac_ext >&5
22840
ca81d7a0 22841 ac_header_compiler=no
c0d27fcc 22842fi
ca81d7a0
JD
22843
22844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22845{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22846echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22847
22848# Is the header present?
ca81d7a0
JD
22849{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22850echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22851cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22852/* confdefs.h. */
22853_ACEOF
22854cat confdefs.h >>conftest.$ac_ext
22855cat >>conftest.$ac_ext <<_ACEOF
22856/* end confdefs.h. */
ba4481b5 22857#include <netinet/in.h>
503d2be0 22858_ACEOF
ca81d7a0
JD
22859if { (ac_try="$ac_cpp conftest.$ac_ext"
22860case "(($ac_try" in
22861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22862 *) ac_try_echo=$ac_try;;
22863esac
22864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22865 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22866 ac_status=$?
6bae0ccf 22867 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22868 rm -f conftest.er1
22869 cat conftest.err >&5
c0d27fcc 22870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22871 (exit $ac_status); } >/dev/null && {
22872 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22873 test ! -s conftest.err
22874 }; then
c0d27fcc 22875 ac_header_preproc=yes
ba4481b5 22876else
503d2be0 22877 echo "$as_me: failed program was:" >&5
19650fd6
AS
22878sed 's/^/| /' conftest.$ac_ext >&5
22879
c0d27fcc 22880 ac_header_preproc=no
ba4481b5 22881fi
ca81d7a0 22882
503d2be0 22883rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22884{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22885echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22886
22887# So? What about this header?
edfaf76d
LK
22888case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22889 yes:no: )
c0d27fcc
MR
22890 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22891echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22892 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22893echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
22894 ac_header_preproc=yes
19650fd6 22895 ;;
edfaf76d 22896 no:yes:* )
c0d27fcc
MR
22897 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22898echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22899 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22900echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22901 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22902echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22903 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22904echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22905 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 22906echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22907 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22908echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22909
19650fd6 22910 ;;
c0d27fcc 22911esac
ca81d7a0
JD
22912{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22913echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
22914if test "${ac_cv_header_netinet_in_h+set}" = set; then
22915 echo $ECHO_N "(cached) $ECHO_C" >&6
22916else
22917 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22918fi
ca81d7a0
JD
22919{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22920echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22921
22922fi
503d2be0 22923if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22924 :
22925else
503d2be0 22926 ok_so_far=no
ba4481b5
DL
22927fi
22928
c0d27fcc 22929
ba4481b5
DL
22930fi
22931if test $ok_so_far = yes; then
c0d27fcc 22932 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
ca81d7a0
JD
22933 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22934echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
22935if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22936 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22937fi
ca81d7a0
JD
22938{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22939echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 22940else
c0d27fcc 22941 # Is the header compilable?
ca81d7a0
JD
22942{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
22943echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 22944cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22945/* confdefs.h. */
22946_ACEOF
22947cat confdefs.h >>conftest.$ac_ext
22948cat >>conftest.$ac_ext <<_ACEOF
22949/* end confdefs.h. */
c0d27fcc
MR
22950$ac_includes_default
22951#include <arpa/inet.h>
22952_ACEOF
22953rm -f conftest.$ac_objext
ca81d7a0
JD
22954if { (ac_try="$ac_compile"
22955case "(($ac_try" in
22956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22957 *) ac_try_echo=$ac_try;;
22958esac
22959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22960 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22961 ac_status=$?
edfaf76d
LK
22962 grep -v '^ *+' conftest.er1 >conftest.err
22963 rm -f conftest.er1
22964 cat conftest.err >&5
c0d27fcc 22965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22966 (exit $ac_status); } && {
22967 test -z "$ac_c_werror_flag" ||
22968 test ! -s conftest.err
22969 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22970 ac_header_compiler=yes
22971else
22972 echo "$as_me: failed program was:" >&5
19650fd6
AS
22973sed 's/^/| /' conftest.$ac_ext >&5
22974
ca81d7a0 22975 ac_header_compiler=no
c0d27fcc 22976fi
ca81d7a0
JD
22977
22978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22979{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22980echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22981
22982# Is the header present?
ca81d7a0
JD
22983{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
22984echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 22985cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22986/* confdefs.h. */
22987_ACEOF
22988cat confdefs.h >>conftest.$ac_ext
22989cat >>conftest.$ac_ext <<_ACEOF
22990/* end confdefs.h. */
ba4481b5 22991#include <arpa/inet.h>
503d2be0 22992_ACEOF
ca81d7a0
JD
22993if { (ac_try="$ac_cpp conftest.$ac_ext"
22994case "(($ac_try" in
22995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22996 *) ac_try_echo=$ac_try;;
22997esac
22998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22999 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23000 ac_status=$?
6bae0ccf 23001 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23002 rm -f conftest.er1
23003 cat conftest.err >&5
c0d27fcc 23004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23005 (exit $ac_status); } >/dev/null && {
23006 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23007 test ! -s conftest.err
23008 }; then
c0d27fcc 23009 ac_header_preproc=yes
ba4481b5 23010else
503d2be0 23011 echo "$as_me: failed program was:" >&5
19650fd6
AS
23012sed 's/^/| /' conftest.$ac_ext >&5
23013
c0d27fcc 23014 ac_header_preproc=no
ba4481b5 23015fi
ca81d7a0 23016
503d2be0 23017rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23018{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23019echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23020
23021# So? What about this header?
edfaf76d
LK
23022case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23023 yes:no: )
c0d27fcc
MR
23024 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
23025echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23026 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
23027echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
23028 ac_header_preproc=yes
19650fd6 23029 ;;
edfaf76d 23030 no:yes:* )
c0d27fcc
MR
23031 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
23032echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
23033 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
23034echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
23035 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
23036echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
23037 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
23038echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23039 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 23040echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23041 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
23042echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23043
19650fd6 23044 ;;
c0d27fcc 23045esac
ca81d7a0
JD
23046{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
23047echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
23048if test "${ac_cv_header_arpa_inet_h+set}" = set; then
23049 echo $ECHO_N "(cached) $ECHO_C" >&6
23050else
23051 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 23052fi
ca81d7a0
JD
23053{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
23054echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
23055
23056fi
503d2be0 23057if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
23058 :
23059else
503d2be0 23060 ok_so_far=no
ba4481b5
DL
23061fi
23062
c0d27fcc 23063
ba4481b5
DL
23064fi
23065if test $ok_so_far = yes; then
b936fae4 23066
c0d27fcc 23067cat >>confdefs.h <<\_ACEOF
ba4481b5 23068#define HAVE_INET_SOCKETS 1
c0d27fcc 23069_ACEOF
ba4481b5
DL
23070
23071fi
23072
2d2b6695 23073
7862d3a8 23074for ac_header in sys/ioctl.h
2d2b6695
KS
23075do
23076as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23077if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23078 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23079echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23080if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
23081 echo $ECHO_N "(cached) $ECHO_C" >&6
23082fi
ca81d7a0
JD
23083ac_res=`eval echo '${'$as_ac_Header'}'`
23084 { echo "$as_me:$LINENO: result: $ac_res" >&5
23085echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23086else
23087 # Is the header compilable?
ca81d7a0
JD
23088{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23089echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 23090cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23091/* confdefs.h. */
23092_ACEOF
23093cat confdefs.h >>conftest.$ac_ext
23094cat >>conftest.$ac_ext <<_ACEOF
23095/* end confdefs.h. */
23096$ac_includes_default
23097#include <$ac_header>
23098_ACEOF
23099rm -f conftest.$ac_objext
ca81d7a0
JD
23100if { (ac_try="$ac_compile"
23101case "(($ac_try" in
23102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23103 *) ac_try_echo=$ac_try;;
23104esac
23105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23106 (eval "$ac_compile") 2>conftest.er1
2d2b6695 23107 ac_status=$?
edfaf76d
LK
23108 grep -v '^ *+' conftest.er1 >conftest.err
23109 rm -f conftest.er1
23110 cat conftest.err >&5
2d2b6695 23111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23112 (exit $ac_status); } && {
23113 test -z "$ac_c_werror_flag" ||
23114 test ! -s conftest.err
23115 } && test -s conftest.$ac_objext; then
2d2b6695
KS
23116 ac_header_compiler=yes
23117else
23118 echo "$as_me: failed program was:" >&5
23119sed 's/^/| /' conftest.$ac_ext >&5
23120
ca81d7a0 23121 ac_header_compiler=no
2d2b6695 23122fi
ca81d7a0
JD
23123
23124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23125{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23126echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
23127
23128# Is the header present?
ca81d7a0
JD
23129{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23130echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 23131cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
23132/* confdefs.h. */
23133_ACEOF
23134cat confdefs.h >>conftest.$ac_ext
23135cat >>conftest.$ac_ext <<_ACEOF
23136/* end confdefs.h. */
23137#include <$ac_header>
23138_ACEOF
ca81d7a0
JD
23139if { (ac_try="$ac_cpp conftest.$ac_ext"
23140case "(($ac_try" in
23141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23142 *) ac_try_echo=$ac_try;;
23143esac
23144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23145 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
23146 ac_status=$?
23147 grep -v '^ *+' conftest.er1 >conftest.err
23148 rm -f conftest.er1
23149 cat conftest.err >&5
23150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23151 (exit $ac_status); } >/dev/null && {
23152 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23153 test ! -s conftest.err
23154 }; then
2d2b6695
KS
23155 ac_header_preproc=yes
23156else
23157 echo "$as_me: failed program was:" >&5
23158sed 's/^/| /' conftest.$ac_ext >&5
23159
23160 ac_header_preproc=no
23161fi
ca81d7a0 23162
2d2b6695 23163rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23164{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23165echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
23166
23167# So? What about this header?
edfaf76d
LK
23168case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23169 yes:no: )
2d2b6695
KS
23170 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23171echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23172 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23173echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23174 ac_header_preproc=yes
2d2b6695 23175 ;;
edfaf76d 23176 no:yes:* )
2d2b6695
KS
23177 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23178echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23179 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23180echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23181 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23182echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23183 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23184echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
23185 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
23186echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23187 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23188echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23189
2d2b6695
KS
23190 ;;
23191esac
ca81d7a0
JD
23192{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23193echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23194if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
23195 echo $ECHO_N "(cached) $ECHO_C" >&6
23196else
edfaf76d 23197 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 23198fi
ca81d7a0
JD
23199ac_res=`eval echo '${'$as_ac_Header'}'`
23200 { echo "$as_me:$LINENO: result: $ac_res" >&5
23201echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
23202
23203fi
23204if test `eval echo '${'$as_ac_Header'}'` = yes; then
23205 cat >>confdefs.h <<_ACEOF
23206#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23207_ACEOF
23208
23209fi
23210
23211done
23212
23213
ba4481b5 23214if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 23215
c0d27fcc 23216cat >>confdefs.h <<\_ACEOF
ba4481b5 23217#define HAVE_AIX_SMT_EXP 1
c0d27fcc 23218_ACEOF
ba4481b5
DL
23219
23220fi
23221
ca81d7a0
JD
23222{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
23223echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 23224if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ca81d7a0
JD
23225 { echo "$as_me:$LINENO: result: yes" >&5
23226echo "${ECHO_T}yes" >&6; }
b936fae4 23227
c0d27fcc 23228cat >>confdefs.h <<\_ACEOF
3d9fec71 23229#define HAVE_DEV_PTMX 1
c0d27fcc 23230_ACEOF
3d9fec71
DL
23231
23232else
ca81d7a0
JD
23233 { echo "$as_me:$LINENO: result: no" >&5
23234echo "${ECHO_T}no" >&6; }
3d9fec71
DL
23235fi
23236
ca81d7a0
JD
23237{ echo "$as_me:$LINENO: checking for pid_t" >&5
23238echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
23239if test "${ac_cv_type_pid_t+set}" = set; then
23240 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 23241else
503d2be0 23242 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23243/* confdefs.h. */
23244_ACEOF
23245cat confdefs.h >>conftest.$ac_ext
23246cat >>conftest.$ac_ext <<_ACEOF
23247/* end confdefs.h. */
503d2be0 23248$ac_includes_default
ca81d7a0 23249typedef pid_t ac__type_new_;
503d2be0
AS
23250int
23251main ()
23252{
ca81d7a0 23253if ((ac__type_new_ *) 0)
503d2be0 23254 return 0;
ca81d7a0 23255if (sizeof (ac__type_new_))
503d2be0
AS
23256 return 0;
23257 ;
23258 return 0;
23259}
23260_ACEOF
23261rm -f conftest.$ac_objext
ca81d7a0
JD
23262if { (ac_try="$ac_compile"
23263case "(($ac_try" in
23264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23265 *) ac_try_echo=$ac_try;;
23266esac
23267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23268 (eval "$ac_compile") 2>conftest.er1
503d2be0 23269 ac_status=$?
edfaf76d
LK
23270 grep -v '^ *+' conftest.er1 >conftest.err
23271 rm -f conftest.er1
23272 cat conftest.err >&5
c0d27fcc 23273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23274 (exit $ac_status); } && {
23275 test -z "$ac_c_werror_flag" ||
23276 test ! -s conftest.err
23277 } && test -s conftest.$ac_objext; then
647847ea
DL
23278 ac_cv_type_pid_t=yes
23279else
503d2be0 23280 echo "$as_me: failed program was:" >&5
19650fd6
AS
23281sed 's/^/| /' conftest.$ac_ext >&5
23282
ca81d7a0 23283 ac_cv_type_pid_t=no
647847ea 23284fi
ca81d7a0
JD
23285
23286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 23287fi
ca81d7a0
JD
23288{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
23289echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
23290if test $ac_cv_type_pid_t = yes; then
23291 :
23292else
23293
c0d27fcc 23294cat >>confdefs.h <<_ACEOF
647847ea 23295#define pid_t int
c0d27fcc 23296_ACEOF
647847ea
DL
23297
23298fi
23299
c0d27fcc 23300
ca81d7a0 23301for ac_header in vfork.h
503d2be0
AS
23302do
23303as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
23304if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23305 { echo "$as_me:$LINENO: checking for $ac_header" >&5
23306echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23307if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23308 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 23309fi
ca81d7a0
JD
23310ac_res=`eval echo '${'$as_ac_Header'}'`
23311 { echo "$as_me:$LINENO: result: $ac_res" >&5
23312echo "${ECHO_T}$ac_res" >&6; }
98418dba 23313else
c0d27fcc 23314 # Is the header compilable?
ca81d7a0
JD
23315{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
23316echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 23317cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23318/* confdefs.h. */
23319_ACEOF
23320cat confdefs.h >>conftest.$ac_ext
23321cat >>conftest.$ac_ext <<_ACEOF
23322/* end confdefs.h. */
c0d27fcc
MR
23323$ac_includes_default
23324#include <$ac_header>
23325_ACEOF
23326rm -f conftest.$ac_objext
ca81d7a0
JD
23327if { (ac_try="$ac_compile"
23328case "(($ac_try" in
23329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23330 *) ac_try_echo=$ac_try;;
23331esac
23332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23333 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 23334 ac_status=$?
edfaf76d
LK
23335 grep -v '^ *+' conftest.er1 >conftest.err
23336 rm -f conftest.er1
23337 cat conftest.err >&5
c0d27fcc 23338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23339 (exit $ac_status); } && {
23340 test -z "$ac_c_werror_flag" ||
23341 test ! -s conftest.err
23342 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
23343 ac_header_compiler=yes
23344else
23345 echo "$as_me: failed program was:" >&5
19650fd6
AS
23346sed 's/^/| /' conftest.$ac_ext >&5
23347
ca81d7a0 23348 ac_header_compiler=no
c0d27fcc 23349fi
ca81d7a0
JD
23350
23351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23352{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23353echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
23354
23355# Is the header present?
ca81d7a0
JD
23356{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
23357echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 23358cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23359/* confdefs.h. */
23360_ACEOF
23361cat confdefs.h >>conftest.$ac_ext
23362cat >>conftest.$ac_ext <<_ACEOF
23363/* end confdefs.h. */
503d2be0
AS
23364#include <$ac_header>
23365_ACEOF
ca81d7a0
JD
23366if { (ac_try="$ac_cpp conftest.$ac_ext"
23367case "(($ac_try" in
23368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23369 *) ac_try_echo=$ac_try;;
23370esac
23371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23372 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 23373 ac_status=$?
6bae0ccf 23374 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
23375 rm -f conftest.er1
23376 cat conftest.err >&5
c0d27fcc 23377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23378 (exit $ac_status); } >/dev/null && {
23379 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23380 test ! -s conftest.err
23381 }; then
c0d27fcc 23382 ac_header_preproc=yes
647847ea 23383else
503d2be0 23384 echo "$as_me: failed program was:" >&5
19650fd6
AS
23385sed 's/^/| /' conftest.$ac_ext >&5
23386
c0d27fcc 23387 ac_header_preproc=no
647847ea 23388fi
ca81d7a0 23389
503d2be0 23390rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
23391{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23392echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
23393
23394# So? What about this header?
edfaf76d
LK
23395case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23396 yes:no: )
c0d27fcc
MR
23397 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
23398echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
23399 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
23400echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
23401 ac_header_preproc=yes
19650fd6 23402 ;;
edfaf76d 23403 no:yes:* )
c0d27fcc
MR
23404 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
23405echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
23406 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
23407echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
23408 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
23409echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
23410 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
23411echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 23412 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 23413echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
23414 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
23415echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23416
19650fd6 23417 ;;
c0d27fcc 23418esac
ca81d7a0
JD
23419{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23420echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23421if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
23422 echo $ECHO_N "(cached) $ECHO_C" >&6
23423else
edfaf76d 23424 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 23425fi
ca81d7a0
JD
23426ac_res=`eval echo '${'$as_ac_Header'}'`
23427 { echo "$as_me:$LINENO: result: $ac_res" >&5
23428echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23429
23430fi
503d2be0 23431if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23432 cat >>confdefs.h <<_ACEOF
503d2be0 23433#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23434_ACEOF
647847ea 23435
73b77ee5 23436fi
c0d27fcc 23437
503d2be0 23438done
73b77ee5 23439
c0d27fcc
MR
23440
23441
503d2be0
AS
23442for ac_func in fork vfork
23443do
23444as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
23445{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23446echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23447if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23448 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23449else
503d2be0 23450 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23451/* confdefs.h. */
23452_ACEOF
23453cat confdefs.h >>conftest.$ac_ext
23454cat >>conftest.$ac_ext <<_ACEOF
23455/* end confdefs.h. */
edfaf76d
LK
23456/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23457 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23458#define $ac_func innocuous_$ac_func
23459
fa0b693c 23460/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
23461 which can conflict with char $ac_func (); below.
23462 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23463 <limits.h> exists even on freestanding compilers. */
edfaf76d 23464
19650fd6
AS
23465#ifdef __STDC__
23466# include <limits.h>
23467#else
23468# include <assert.h>
23469#endif
edfaf76d
LK
23470
23471#undef $ac_func
23472
ca81d7a0
JD
23473/* Override any GCC internal prototype to avoid an error.
23474 Use char because int might match the return type of a GCC
23475 builtin and then its argument prototype would still apply. */
503d2be0
AS
23476#ifdef __cplusplus
23477extern "C"
23478#endif
503d2be0 23479char $ac_func ();
fa0b693c
GM
23480/* The GNU C library defines this for functions which it implements
23481 to always fail with ENOSYS. Some functions are actually named
23482 something starting with __ and the normal name is an alias. */
ca81d7a0 23483#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 23484choke me
fa0b693c
GM
23485#endif
23486
19650fd6
AS
23487int
23488main ()
23489{
ca81d7a0 23490return $ac_func ();
503d2be0
AS
23491 ;
23492 return 0;
23493}
23494_ACEOF
23495rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23496if { (ac_try="$ac_link"
23497case "(($ac_try" in
23498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23499 *) ac_try_echo=$ac_try;;
23500esac
23501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23502 (eval "$ac_link") 2>conftest.er1
503d2be0 23503 ac_status=$?
edfaf76d
LK
23504 grep -v '^ *+' conftest.er1 >conftest.err
23505 rm -f conftest.er1
23506 cat conftest.err >&5
c0d27fcc 23507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23508 (exit $ac_status); } && {
23509 test -z "$ac_c_werror_flag" ||
23510 test ! -s conftest.err
23511 } && test -s conftest$ac_exeext &&
23512 $as_test_x conftest$ac_exeext; then
503d2be0
AS
23513 eval "$as_ac_var=yes"
23514else
23515 echo "$as_me: failed program was:" >&5
19650fd6
AS
23516sed 's/^/| /' conftest.$ac_ext >&5
23517
ca81d7a0 23518 eval "$as_ac_var=no"
503d2be0 23519fi
ca81d7a0 23520
f053c89f 23521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23522 conftest$ac_exeext conftest.$ac_ext
503d2be0 23523fi
ca81d7a0
JD
23524ac_res=`eval echo '${'$as_ac_var'}'`
23525 { echo "$as_me:$LINENO: result: $ac_res" >&5
23526echo "${ECHO_T}$ac_res" >&6; }
503d2be0 23527if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 23528 cat >>confdefs.h <<_ACEOF
503d2be0 23529#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 23530_ACEOF
503d2be0 23531
fa0b693c 23532fi
503d2be0 23533done
fa0b693c 23534
503d2be0 23535if test "x$ac_cv_func_fork" = xyes; then
ca81d7a0
JD
23536 { echo "$as_me:$LINENO: checking for working fork" >&5
23537echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
23538if test "${ac_cv_func_fork_works+set}" = set; then
23539 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23540else
503d2be0
AS
23541 if test "$cross_compiling" = yes; then
23542 ac_cv_func_fork_works=cross
23543else
23544 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
23545/* confdefs.h. */
23546_ACEOF
23547cat confdefs.h >>conftest.$ac_ext
23548cat >>conftest.$ac_ext <<_ACEOF
23549/* end confdefs.h. */
23550$ac_includes_default
23551int
23552main ()
23553{
23554
23555 /* By Ruediger Kuhlmann. */
23556 return fork () < 0;
23557
23558 ;
23559 return 0;
23560}
503d2be0
AS
23561_ACEOF
23562rm -f conftest$ac_exeext
ca81d7a0
JD
23563if { (ac_try="$ac_link"
23564case "(($ac_try" in
23565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23566 *) ac_try_echo=$ac_try;;
23567esac
23568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23569 (eval "$ac_link") 2>&5
503d2be0 23570 ac_status=$?
c0d27fcc 23571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23572 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23573 { (case "(($ac_try" in
23574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23575 *) ac_try_echo=$ac_try;;
23576esac
23577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23578 (eval "$ac_try") 2>&5
503d2be0 23579 ac_status=$?
c0d27fcc 23580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23581 (exit $ac_status); }; }; then
23582 ac_cv_func_fork_works=yes
23583else
23584 echo "$as_me: program exited with status $ac_status" >&5
23585echo "$as_me: failed program was:" >&5
19650fd6
AS
23586sed 's/^/| /' conftest.$ac_ext >&5
23587
c0d27fcc 23588( exit $ac_status )
503d2be0
AS
23589ac_cv_func_fork_works=no
23590fi
ca81d7a0 23591rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 23592fi
ca81d7a0
JD
23593
23594
503d2be0 23595fi
ca81d7a0
JD
23596{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
23597echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 23598
6bae0ccf
DL
23599else
23600 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
23601fi
23602if test "x$ac_cv_func_fork_works" = xcross; then
23603 case $host in
23604 *-*-amigaos* | *-*-msdosdjgpp*)
23605 # Override, as these systems have only a dummy fork() stub
23606 ac_cv_func_fork_works=no
23607 ;;
23608 *)
23609 ac_cv_func_fork_works=yes
23610 ;;
23611 esac
c0d27fcc
MR
23612 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23613echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 23614fi
73b77ee5 23615ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 23616if test "x$ac_cv_func_vfork" = xyes; then
ca81d7a0
JD
23617 { echo "$as_me:$LINENO: checking for working vfork" >&5
23618echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
23619if test "${ac_cv_func_vfork_works+set}" = set; then
23620 echo $ECHO_N "(cached) $ECHO_C" >&6
23621else
23622 if test "$cross_compiling" = yes; then
23623 ac_cv_func_vfork_works=cross
fa0b693c 23624else
503d2be0 23625 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23626/* confdefs.h. */
23627_ACEOF
23628cat confdefs.h >>conftest.$ac_ext
23629cat >>conftest.$ac_ext <<_ACEOF
23630/* end confdefs.h. */
73b77ee5 23631/* Thanks to Paul Eggert for this test. */
ca81d7a0 23632$ac_includes_default
19650fd6 23633#include <sys/wait.h>
f053c89f 23634#ifdef HAVE_VFORK_H
503d2be0 23635# include <vfork.h>
73b77ee5
GM
23636#endif
23637/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
23638 argument registers are propagated back to the parent. The compiler
23639 is told about this with #include <vfork.h>, but some compilers
23640 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
23641 static variable whose address is put into a register that is
23642 clobbered by the vfork. */
19650fd6 23643static void
fa0b693c 23644#ifdef __cplusplus
73b77ee5 23645sparc_address_test (int arg)
503d2be0 23646# else
73b77ee5 23647sparc_address_test (arg) int arg;
fa0b693c 23648#endif
fa0b693c 23649{
73b77ee5
GM
23650 static pid_t child;
23651 if (!child) {
23652 child = vfork ();
23653 if (child < 0) {
23654 perror ("vfork");
23655 _exit(2);
23656 }
23657 if (!child) {
23658 arg = getpid();
23659 write(-1, "", 0);
23660 _exit (arg);
23661 }
23662 }
23663}
503d2be0
AS
23664
23665int
23666main ()
23667{
73b77ee5
GM
23668 pid_t parent = getpid ();
23669 pid_t child;
fa0b693c 23670
19650fd6 23671 sparc_address_test (0);
fa0b693c 23672
73b77ee5 23673 child = vfork ();
fa0b693c 23674
73b77ee5 23675 if (child == 0) {
503d2be0
AS
23676 /* Here is another test for sparc vfork register problems. This
23677 test uses lots of local variables, at least as many local
23678 variables as main has allocated so far including compiler
23679 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
23680 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
23681 reuse the register of parent for one of the local variables,
23682 since it will think that parent can't possibly be used any more
23683 in this routine. Assigning to the local variable will thus
23684 munge parent in the parent process. */
73b77ee5
GM
23685 pid_t
23686 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23687 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23688 /* Convince the compiler that p..p7 are live; otherwise, it might
23689 use the same hardware register for all 8 local variables. */
23690 if (p != p1 || p != p2 || p != p3 || p != p4
23691 || p != p5 || p != p6 || p != p7)
23692 _exit(1);
fa0b693c 23693
503d2be0
AS
23694 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23695 from child file descriptors. If the child closes a descriptor
23696 before it execs or exits, this munges the parent's descriptor
23697 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
23698 _exit(close(fileno(stdout)) != 0);
23699 } else {
23700 int status;
23701 struct stat st;
23702
23703 while (wait(&status) != child)
23704 ;
ca81d7a0 23705 return (
73b77ee5
GM
23706 /* Was there some problem with vforking? */
23707 child < 0
23708
23709 /* Did the child fail? (This shouldn't happen.) */
23710 || status
23711
23712 /* Did the vfork/compiler bug occur? */
23713 || parent != getpid()
fa0b693c 23714
73b77ee5
GM
23715 /* Did the file descriptor bug occur? */
23716 || fstat(fileno(stdout), &st) != 0
23717 );
23718 }
23719}
503d2be0
AS
23720_ACEOF
23721rm -f conftest$ac_exeext
ca81d7a0
JD
23722if { (ac_try="$ac_link"
23723case "(($ac_try" in
23724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23725 *) ac_try_echo=$ac_try;;
23726esac
23727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23728 (eval "$ac_link") 2>&5
503d2be0 23729 ac_status=$?
c0d27fcc 23730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23731 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23732 { (case "(($ac_try" in
23733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23734 *) ac_try_echo=$ac_try;;
23735esac
23736eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23737 (eval "$ac_try") 2>&5
503d2be0 23738 ac_status=$?
c0d27fcc 23739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23740 (exit $ac_status); }; }; then
73b77ee5 23741 ac_cv_func_vfork_works=yes
fa0b693c 23742else
503d2be0
AS
23743 echo "$as_me: program exited with status $ac_status" >&5
23744echo "$as_me: failed program was:" >&5
19650fd6
AS
23745sed 's/^/| /' conftest.$ac_ext >&5
23746
c0d27fcc 23747( exit $ac_status )
503d2be0
AS
23748ac_cv_func_vfork_works=no
23749fi
ca81d7a0 23750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 23751fi
ca81d7a0
JD
23752
23753
fa0b693c 23754fi
ca81d7a0
JD
23755{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
23756echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 23757
503d2be0
AS
23758fi;
23759if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 23760 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
23761 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23762echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
23763fi
23764
503d2be0
AS
23765if test "x$ac_cv_func_vfork_works" = xyes; then
23766
c0d27fcc 23767cat >>confdefs.h <<\_ACEOF
503d2be0 23768#define HAVE_WORKING_VFORK 1
c0d27fcc 23769_ACEOF
503d2be0
AS
23770
23771else
23772
c0d27fcc 23773cat >>confdefs.h <<\_ACEOF
73b77ee5 23774#define vfork fork
c0d27fcc 23775_ACEOF
fa0b693c
GM
23776
23777fi
503d2be0
AS
23778if test "x$ac_cv_func_fork_works" = xyes; then
23779
c0d27fcc 23780cat >>confdefs.h <<\_ACEOF
503d2be0 23781#define HAVE_WORKING_FORK 1
c0d27fcc 23782_ACEOF
fa0b693c 23783
503d2be0 23784fi
647847ea 23785
c0d27fcc 23786
ca81d7a0
JD
23787{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
23788echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
23789if test "${emacs_cv_langinfo_codeset+set}" = set; then
23790 echo $ECHO_N "(cached) $ECHO_C" >&6
23791else
23792 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23793/* confdefs.h. */
23794_ACEOF
23795cat confdefs.h >>conftest.$ac_ext
23796cat >>conftest.$ac_ext <<_ACEOF
23797/* end confdefs.h. */
6a3a24fa
JD
23798#include <langinfo.h>
23799int
23800main ()
23801{
23802char* cs = nl_langinfo(CODESET);
23803 ;
23804 return 0;
23805}
23806_ACEOF
23807rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23808if { (ac_try="$ac_link"
23809case "(($ac_try" in
23810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23811 *) ac_try_echo=$ac_try;;
23812esac
23813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23814 (eval "$ac_link") 2>conftest.er1
6a3a24fa 23815 ac_status=$?
edfaf76d
LK
23816 grep -v '^ *+' conftest.er1 >conftest.err
23817 rm -f conftest.er1
23818 cat conftest.err >&5
6a3a24fa 23819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23820 (exit $ac_status); } && {
23821 test -z "$ac_c_werror_flag" ||
23822 test ! -s conftest.err
23823 } && test -s conftest$ac_exeext &&
23824 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23825 emacs_cv_langinfo_codeset=yes
23826else
23827 echo "$as_me: failed program was:" >&5
19650fd6
AS
23828sed 's/^/| /' conftest.$ac_ext >&5
23829
ca81d7a0 23830 emacs_cv_langinfo_codeset=no
6a3a24fa 23831fi
ca81d7a0 23832
f053c89f 23833rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23834 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23835
23836fi
ca81d7a0
JD
23837{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23838echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23839if test $emacs_cv_langinfo_codeset = yes; then
23840
23841cat >>confdefs.h <<\_ACEOF
23842#define HAVE_LANGINFO_CODESET 1
23843_ACEOF
23844
23845fi
23846
ca81d7a0
JD
23847{ echo "$as_me:$LINENO: checking for size_t" >&5
23848echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
23849if test "${ac_cv_type_size_t+set}" = set; then
23850 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23851else
503d2be0 23852 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23853/* confdefs.h. */
23854_ACEOF
23855cat confdefs.h >>conftest.$ac_ext
23856cat >>conftest.$ac_ext <<_ACEOF
23857/* end confdefs.h. */
503d2be0 23858$ac_includes_default
ca81d7a0 23859typedef size_t ac__type_new_;
503d2be0
AS
23860int
23861main ()
23862{
ca81d7a0 23863if ((ac__type_new_ *) 0)
503d2be0 23864 return 0;
ca81d7a0 23865if (sizeof (ac__type_new_))
503d2be0
AS
23866 return 0;
23867 ;
23868 return 0;
23869}
23870_ACEOF
23871rm -f conftest.$ac_objext
ca81d7a0
JD
23872if { (ac_try="$ac_compile"
23873case "(($ac_try" in
23874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23875 *) ac_try_echo=$ac_try;;
23876esac
23877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23878 (eval "$ac_compile") 2>conftest.er1
503d2be0 23879 ac_status=$?
edfaf76d
LK
23880 grep -v '^ *+' conftest.er1 >conftest.err
23881 rm -f conftest.er1
23882 cat conftest.err >&5
c0d27fcc 23883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23884 (exit $ac_status); } && {
23885 test -z "$ac_c_werror_flag" ||
23886 test ! -s conftest.err
23887 } && test -s conftest.$ac_objext; then
8730a8da
DL
23888 ac_cv_type_size_t=yes
23889else
503d2be0 23890 echo "$as_me: failed program was:" >&5
19650fd6
AS
23891sed 's/^/| /' conftest.$ac_ext >&5
23892
ca81d7a0 23893 ac_cv_type_size_t=no
8730a8da 23894fi
ca81d7a0
JD
23895
23896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 23897fi
ca81d7a0
JD
23898{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23899echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 23900if test $ac_cv_type_size_t = yes; then
503d2be0 23901
c0d27fcc
MR
23902cat >>confdefs.h <<_ACEOF
23903#define HAVE_SIZE_T 1
23904_ACEOF
23905
8730a8da
DL
23906
23907fi
23908
c0d27fcc 23909
ca81d7a0
JD
23910{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23911echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
23912if test "${ac_cv_type_mbstate_t+set}" = set; then
23913 echo $ECHO_N "(cached) $ECHO_C" >&6
23914else
23915 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23916/* confdefs.h. */
23917_ACEOF
23918cat confdefs.h >>conftest.$ac_ext
23919cat >>conftest.$ac_ext <<_ACEOF
23920/* end confdefs.h. */
973a76b1
DL
23921$ac_includes_default
23922# include <wchar.h>
23923int
23924main ()
23925{
23926mbstate_t x; return sizeof x;
23927 ;
23928 return 0;
23929}
23930_ACEOF
23931rm -f conftest.$ac_objext
ca81d7a0
JD
23932if { (ac_try="$ac_compile"
23933case "(($ac_try" in
23934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23935 *) ac_try_echo=$ac_try;;
23936esac
23937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23938 (eval "$ac_compile") 2>conftest.er1
973a76b1 23939 ac_status=$?
edfaf76d
LK
23940 grep -v '^ *+' conftest.er1 >conftest.err
23941 rm -f conftest.er1
23942 cat conftest.err >&5
973a76b1 23943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23944 (exit $ac_status); } && {
23945 test -z "$ac_c_werror_flag" ||
23946 test ! -s conftest.err
23947 } && test -s conftest.$ac_objext; then
973a76b1
DL
23948 ac_cv_type_mbstate_t=yes
23949else
23950 echo "$as_me: failed program was:" >&5
19650fd6
AS
23951sed 's/^/| /' conftest.$ac_ext >&5
23952
ca81d7a0 23953 ac_cv_type_mbstate_t=no
973a76b1 23954fi
ca81d7a0
JD
23955
23956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 23957fi
ca81d7a0
JD
23958{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
23959echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
23960 if test $ac_cv_type_mbstate_t = yes; then
23961
23962cat >>confdefs.h <<\_ACEOF
23963#define HAVE_MBSTATE_T 1
23964_ACEOF
23965
23966 else
23967
23968cat >>confdefs.h <<\_ACEOF
23969#define mbstate_t int
23970_ACEOF
23971
23972 fi
23973
ca81d7a0
JD
23974{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
23975echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
23976if test "${emacs_cv_c_restrict+set}" = set; then
23977 echo $ECHO_N "(cached) $ECHO_C" >&6
23978else
23979 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23980/* confdefs.h. */
23981_ACEOF
23982cat confdefs.h >>conftest.$ac_ext
23983cat >>conftest.$ac_ext <<_ACEOF
23984/* end confdefs.h. */
22044edf
DL
23985void fred (int *restrict x);
23986int
23987main ()
23988{
b936fae4 23989
22044edf
DL
23990 ;
23991 return 0;
23992}
c0d27fcc 23993_ACEOF
22044edf 23994rm -f conftest.$ac_objext
ca81d7a0
JD
23995if { (ac_try="$ac_compile"
23996case "(($ac_try" in
23997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23998 *) ac_try_echo=$ac_try;;
23999esac
24000eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24001 (eval "$ac_compile") 2>conftest.er1
22044edf 24002 ac_status=$?
edfaf76d
LK
24003 grep -v '^ *+' conftest.er1 >conftest.err
24004 rm -f conftest.er1
24005 cat conftest.err >&5
22044edf 24006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24007 (exit $ac_status); } && {
24008 test -z "$ac_c_werror_flag" ||
24009 test ! -s conftest.err
24010 } && test -s conftest.$ac_objext; then
22044edf
DL
24011 emacs_cv_c_restrict=yes
24012else
24013 echo "$as_me: failed program was:" >&5
19650fd6
AS
24014sed 's/^/| /' conftest.$ac_ext >&5
24015
ca81d7a0 24016 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24017/* confdefs.h. */
24018_ACEOF
24019cat confdefs.h >>conftest.$ac_ext
24020cat >>conftest.$ac_ext <<_ACEOF
24021/* end confdefs.h. */
22044edf
DL
24022void fred (int *__restrict x);
24023int
24024main ()
24025{
c0d27fcc 24026
22044edf
DL
24027 ;
24028 return 0;
24029}
c0d27fcc 24030_ACEOF
22044edf 24031rm -f conftest.$ac_objext
ca81d7a0
JD
24032if { (ac_try="$ac_compile"
24033case "(($ac_try" in
24034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24035 *) ac_try_echo=$ac_try;;
24036esac
24037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24038 (eval "$ac_compile") 2>conftest.er1
22044edf 24039 ac_status=$?
edfaf76d
LK
24040 grep -v '^ *+' conftest.er1 >conftest.err
24041 rm -f conftest.er1
24042 cat conftest.err >&5
22044edf 24043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24044 (exit $ac_status); } && {
24045 test -z "$ac_c_werror_flag" ||
24046 test ! -s conftest.err
24047 } && test -s conftest.$ac_objext; then
22044edf
DL
24048 emacs_cv_c_restrict=__restrict
24049else
24050 echo "$as_me: failed program was:" >&5
19650fd6
AS
24051sed 's/^/| /' conftest.$ac_ext >&5
24052
ca81d7a0 24053 emacs_cv_c_restrict=no
ba4481b5 24054fi
ca81d7a0
JD
24055
24056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24057fi
ca81d7a0
JD
24058
24059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 24060fi
ca81d7a0
JD
24061{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
24062echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
24063case "$emacs_cv_c_restrict" in
24064 yes) emacs_restrict=restrict;;
24065 no) emacs_restrict="";;
24066 *) emacs_restrict="$emacs_cv_c_restrict";;
24067esac
24068if test "$emacs_restrict" != __restrict; then
b936fae4 24069
22044edf
DL
24070cat >>confdefs.h <<_ACEOF
24071#define __restrict $emacs_restrict
c0d27fcc 24072_ACEOF
ba4481b5
DL
24073
24074fi
ba4481b5 24075
ca81d7a0
JD
24076{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
24077echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
24078if test "${emacs_cv_c_restrict_arr+set}" = set; then
24079 echo $ECHO_N "(cached) $ECHO_C" >&6
24080else
24081 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24082/* confdefs.h. */
24083_ACEOF
24084cat confdefs.h >>conftest.$ac_ext
24085cat >>conftest.$ac_ext <<_ACEOF
24086/* end confdefs.h. */
22044edf
DL
24087void fred (int x[__restrict]);
24088int
24089main ()
24090{
b936fae4 24091
22044edf
DL
24092 ;
24093 return 0;
24094}
c0d27fcc 24095_ACEOF
22044edf 24096rm -f conftest.$ac_objext
ca81d7a0
JD
24097if { (ac_try="$ac_compile"
24098case "(($ac_try" in
24099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24100 *) ac_try_echo=$ac_try;;
24101esac
24102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24103 (eval "$ac_compile") 2>conftest.er1
22044edf 24104 ac_status=$?
edfaf76d
LK
24105 grep -v '^ *+' conftest.er1 >conftest.err
24106 rm -f conftest.er1
24107 cat conftest.err >&5
22044edf 24108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
24109 (exit $ac_status); } && {
24110 test -z "$ac_c_werror_flag" ||
24111 test ! -s conftest.err
24112 } && test -s conftest.$ac_objext; then
22044edf
DL
24113 emacs_cv_c_restrict_arr=yes
24114else
24115 echo "$as_me: failed program was:" >&5
19650fd6
AS
24116sed 's/^/| /' conftest.$ac_ext >&5
24117
ca81d7a0 24118 emacs_cv_c_restrict_arr=no
ba4481b5 24119fi
ca81d7a0
JD
24120
24121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 24122fi
ca81d7a0
JD
24123{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
24124echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 24125if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 24126
c0d27fcc 24127cat >>confdefs.h <<\_ACEOF
22044edf 24128#define __restrict_arr __restrict
c0d27fcc 24129_ACEOF
ba4481b5 24130
ba4481b5
DL
24131fi
24132
c0d27fcc 24133
c0d27fcc 24134
22044edf
DL
24135# Set up the CFLAGS for real compilation, so we can substitute it.
24136CFLAGS="$REAL_CFLAGS"
24137CPPFLAGS="$REAL_CPPFLAGS"
24138
24139#### Find out which version of Emacs this is.
24140version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
24141 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
24142if test x"${version}" = x; then
24143 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
24144echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
24145 { (exit 1); exit 1; }; }
24146fi
24147
24148### Specify what sort of things we'll be editing into Makefile and config.h.
24149### Use configuration here uncanonicalized to avoid exceeding size limits.
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160
24161
24162
24163
24164
24165
24166
24167
24168
24169
24170
24171
24172
24173
24174
24175
24176
24177
24178
24179
24180
24181
6a3a24fa 24182
06b62770
AR
24183
24184
24185
edfda783 24186
facfbbbd 24187
22044edf
DL
24188
24189
24190cat >>confdefs.h <<_ACEOF
24191#define EMACS_CONFIGURATION "${canonical}"
24192_ACEOF
24193
24194
24195cat >>confdefs.h <<_ACEOF
24196#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
24197_ACEOF
24198
24199
24200cat >>confdefs.h <<_ACEOF
24201#define config_machfile "${machfile}"
24202_ACEOF
24203
24204
24205cat >>confdefs.h <<_ACEOF
24206#define config_opsysfile "${opsysfile}"
24207_ACEOF
24208
24209
24210cat >>confdefs.h <<_ACEOF
24211#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
24212_ACEOF
24213
24214
24215cat >>confdefs.h <<_ACEOF
24216#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
24217_ACEOF
24218
24219
24220cat >>confdefs.h <<_ACEOF
24221#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
24222_ACEOF
24223
24224
24225cat >>confdefs.h <<_ACEOF
24226#define UNEXEC_SRC ${UNEXEC_SRC}
24227_ACEOF
24228
24229
24230if test "${HAVE_X_WINDOWS}" = "yes" ; then
24231
24232cat >>confdefs.h <<\_ACEOF
24233#define HAVE_X_WINDOWS 1
24234_ACEOF
24235
24236fi
24237if test "${USE_X_TOOLKIT}" != "none" ; then
24238
24239cat >>confdefs.h <<\_ACEOF
24240#define USE_X_TOOLKIT 1
24241_ACEOF
24242
39dd4d52 24243 if test "${USE_X_TOOLKIT}" = "LUCID"; then
73d798d5
SM
24244
24245cat >>confdefs.h <<\_ACEOF
24246#define USE_LUCID 1
24247_ACEOF
24248
39dd4d52 24249 elif test "${USE_X_TOOLKIT}" = "MOTIF"; then
73d798d5
SM
24250
24251cat >>confdefs.h <<\_ACEOF
24252#define USE_MOTIF 1
24253_ACEOF
24254
24255 fi
22044edf
DL
24256fi
24257if test "${HAVE_X11}" = "yes" ; then
24258
24259cat >>confdefs.h <<\_ACEOF
24260#define HAVE_X11 1
24261_ACEOF
24262
22044edf
DL
24263fi
24264if test "${HAVE_MENUS}" = "yes" ; then
24265
24266cat >>confdefs.h <<\_ACEOF
24267#define HAVE_MENUS 1
24268_ACEOF
24269
24270fi
24271if test "${GNU_MALLOC}" = "yes" ; then
24272
24273cat >>confdefs.h <<\_ACEOF
24274#define GNU_MALLOC 1
24275_ACEOF
24276
24277fi
24278if test "${REL_ALLOC}" = "yes" ; then
24279
24280cat >>confdefs.h <<\_ACEOF
24281#define REL_ALLOC 1
24282_ACEOF
24283
24284fi
24285
24286
24287
c0d27fcc
MR
24288
24289
5afbeb22 24290
ba4481b5 24291#### Report on what we decided to do.
488dd4c4
JD
24292#### Report GTK as a toolkit, even if it doesn't use Xt.
24293#### It makes printing result more understandable as using GTK sets
24294#### toolkit_scroll_bars to yes by default.
24295if test "${HAVE_GTK}" = "yes"; then
24296 USE_X_TOOLKIT=GTK
24297fi
24298
ba4481b5
DL
24299echo "
24300Configured for \`${canonical}'.
24301
24302 Where should the build process find the source code? ${srcdir}
24303 What operating system and machine description files should Emacs use?
24304 \`${opsysfile}' and \`${machfile}'
24305 What compiler should emacs be built with? ${CC} ${CFLAGS}
24306 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 24307 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 24308 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 24309 What window system should Emacs use? ${window_system}
8e967cf7 24310 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
24311
24312if test -n "${x_includes}"; then
24313echo " Where do we find X Windows header files? ${x_includes}"
24314else
24315echo " Where do we find X Windows header files? Standard dirs"
24316fi
24317if test -n "${x_libraries}"; then
24318echo " Where do we find X Windows libraries? ${x_libraries}"
24319else
24320echo " Where do we find X Windows libraries? Standard dirs"
24321fi
24322
24323echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
24324echo " Does Emacs use -lXpm? ${HAVE_XPM}"
24325echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
24326echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 24327echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 24328echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 24329echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 24330echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 24331echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
2ee27f27 24332
edfda783
AR
24333echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
24334echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
24335echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
24336echo " Does Emacs use -lxft? ${HAVE_XFT}"
24337
ba4481b5
DL
24338echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
24339echo
24340
d0098f13
JD
24341if test $USE_XASSERTS = yes; then
24342 echo " Compiling with asserts turned on."
d0098f13 24343 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 24344fi
05cf15c6 24345
ca34d75a
JD
24346echo
24347
a2d3b5bd
JD
24348if test "$USE_X_TOOLKIT" = GTK; then
24349 case "$canonical" in
24350 *cygwin*)
24351 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
24352 will probably get a crash on startup. If this happens, please use another
24353 toolkit for Emacs. See etc/PROBLEMS for more information."
24354 ;;
24355 esac
24356fi
24357
05cf15c6 24358
f0e04acc
GM
24359if test "$HAVE_CARBON" = "yes"; then
24360 echo
24361 echo "Warning: The Mac Carbon port is currently unsupported and has
24362known problems. It is not recommended for use by non-developers.
06b62770 24363The NeXTstep port (--with-ns) is an alternative.
f0e04acc
GM
24364Read the emacs-devel archives for more information."
24365 echo
24366fi
24367
06b62770
AR
24368if test "$HAVE_NS" = "yes"; then
24369 echo
24370 echo "You must run \"make install\" in order to test the built application.
24371The installed application will go to nextstep/Emacs.app and can be
24372run or moved from there."
24373 if test "$EN_NS_SELF_CONTAINED" = "yes"; then
24374 echo "The application will be fully self-contained."
24375 else
24376 echo "The lisp resources for the application will be installed under ${prefix}.
24377You may need to run \"make install\" with sudo. The application will fail
24378to run if these resources are not installed."
24379 fi
24380 echo
24381fi
24382
131e4133
MA
24383if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
24384 echo "D-Bus integration has been tested for GNU/Linux only."
24385 echo
24386fi
24387
05cf15c6 24388
ba4481b5
DL
24389# Remove any trailing slashes in these variables.
24390test "${prefix}" != NONE &&
24391 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
24392test "${exec_prefix}" != NONE &&
24393 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
24394
8acdcf6f
GM
24395# Now get this: Some word that is part of the ${srcdir} directory name
24396# or the ${configuration} value might, just might, happen to be an
24397# identifier like `sun4' or `i386' or something, and be predefined by
24398# the C preprocessor to some helpful value like 1, or maybe the empty
24399# string. Needless to say consequent macro substitutions are less
24400# than conducive to the makefile finding the correct directory.
24401cpp_undefs="`echo $srcdir $configuration $canonical |
24402 sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24403 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g'`"
24404
d0e9bfd2
GM
24405## Check if the C preprocessor will convert `..' to `. .'. If so, set
24406## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
24407## from Makefile.c can correctly provide the arg `-traditional' to the
24408## C preprocessor.
24409
503d2be0 24410cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
24411/* confdefs.h. */
24412_ACEOF
24413cat confdefs.h >>conftest.$ac_ext
24414cat >>conftest.$ac_ext <<_ACEOF
24415/* end confdefs.h. */
d0e9bfd2 24416yes..yes
503d2be0 24417_ACEOF
d0e9bfd2 24418if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 24419 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
24420 CPP_NEED_TRADITIONAL=no
24421else
d0e9bfd2
GM
24422 CPP_NEED_TRADITIONAL=yes
24423fi
24424rm -f conftest*
24425
c0d27fcc 24426
f657c21b 24427ac_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
24428
24429ac_config_commands="$ac_config_commands default"
24430
503d2be0 24431cat >confcache <<\_ACEOF
ba4481b5
DL
24432# This file is a shell script that caches the results of configure
24433# tests run on this system so they can be shared between configure
503d2be0
AS
24434# scripts and configure runs, see configure's option --config-cache.
24435# It is not useful on other systems. If it contains results you don't
24436# want to keep, you may remove or edit it.
ba4481b5 24437#
503d2be0
AS
24438# config.status only pays attention to the cache file if you give it
24439# the --recheck option to rerun configure.
ba4481b5 24440#
6bae0ccf 24441# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
24442# loading this file, other *unset* `ac_cv_foo' will be assigned the
24443# following values.
24444
24445_ACEOF
24446
ba4481b5
DL
24447# The following way of writing the cache mishandles newlines in values,
24448# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 24449# So, we kill variables containing newlines.
ba4481b5
DL
24450# Ultrix sh set writes to stderr and can't be redirected directly,
24451# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
24452(
24453 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24454 eval ac_val=\$$ac_var
24455 case $ac_val in #(
24456 *${as_nl}*)
24457 case $ac_var in #(
24458 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24459echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24460 esac
24461 case $ac_var in #(
24462 _ | IFS | as_nl) ;; #(
24463 *) $as_unset $ac_var ;;
24464 esac ;;
24465 esac
24466 done
24467
503d2be0 24468 (set) 2>&1 |
ca81d7a0
JD
24469 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24470 *${as_nl}ac_space=\ *)
503d2be0
AS
24471 # `set' does not quote correctly, so add quotes (double-quote
24472 # substitution turns \\\\ into \\, and sed turns \\ into \).
24473 sed -n \
edfaf76d
LK
24474 "s/'/'\\\\''/g;
24475 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 24476 ;; #(
503d2be0
AS
24477 *)
24478 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 24479 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 24480 ;;
ca81d7a0
JD
24481 esac |
24482 sort
24483) |
503d2be0 24484 sed '
ca81d7a0 24485 /^ac_cv_env_/b end
503d2be0 24486 t clear
ca81d7a0 24487 :clear
503d2be0
AS
24488 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24489 t end
ca81d7a0
JD
24490 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24491 :end' >>confcache
24492if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24493 if test -w "$cache_file"; then
24494 test "x$cache_file" != "x/dev/null" &&
24495 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24496echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 24497 cat confcache >$cache_file
ba4481b5 24498 else
ca81d7a0
JD
24499 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24500echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
24501 fi
24502fi
24503rm -f confcache
24504
ba4481b5
DL
24505test "x$prefix" = xNONE && prefix=$ac_default_prefix
24506# Let make expand exec_prefix.
24507test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24508
ba4481b5
DL
24509DEFS=-DHAVE_CONFIG_H
24510
6bae0ccf
DL
24511ac_libobjs=
24512ac_ltlibobjs=
24513for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24514 # 1. Remove the extension, and $U if already installed.
ca81d7a0
JD
24515 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24516 ac_i=`echo "$ac_i" | sed "$ac_script"`
24517 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24518 # will be set to the directory where LIBOBJS objects are built.
24519 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24520 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
24521done
24522LIBOBJS=$ac_libobjs
24523
24524LTLIBOBJS=$ac_ltlibobjs
24525
24526
c0d27fcc 24527
ba4481b5 24528: ${CONFIG_STATUS=./config.status}
503d2be0
AS
24529ac_clean_files_save=$ac_clean_files
24530ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 24531{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
24532echo "$as_me: creating $CONFIG_STATUS" >&6;}
24533cat >$CONFIG_STATUS <<_ACEOF
24534#! $SHELL
c0d27fcc 24535# Generated by $as_me.
ba4481b5 24536# Run this file to recreate the current configuration.
ba4481b5 24537# Compiler output produced by configure, useful for debugging
503d2be0 24538# configure, is in config.log if it exists.
ba4481b5 24539
503d2be0 24540debug=false
19650fd6
AS
24541ac_cs_recheck=false
24542ac_cs_silent=false
503d2be0 24543SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
24544_ACEOF
24545
24546cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
24547## --------------------- ##
24548## M4sh Initialization. ##
24549## --------------------- ##
24550
f053c89f
CY
24551# Be more Bourne compatible
24552DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
24553if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24554 emulate sh
24555 NULLCMD=:
6bae0ccf
DL
24556 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24557 # is contrary to our usage. Disable this feature.
24558 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
24559 setopt NO_GLOB_SUBST
24560else
f053c89f
CY
24561 case `(set -o) 2>/dev/null` in
24562 *posix*) set -o posix ;;
24563esac
24564
503d2be0 24565fi
f053c89f
CY
24566
24567
503d2be0 24568
ca81d7a0
JD
24569
24570# PATH needs CR
24571# Avoid depending upon Character Ranges.
24572as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24573as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24574as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24575as_cr_digits='0123456789'
24576as_cr_alnum=$as_cr_Letters$as_cr_digits
24577
24578# The user is always right.
24579if test "${PATH_SEPARATOR+set}" != set; then
24580 echo "#! /bin/sh" >conf$$.sh
24581 echo "exit 0" >>conf$$.sh
24582 chmod +x conf$$.sh
24583 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24584 PATH_SEPARATOR=';'
24585 else
24586 PATH_SEPARATOR=:
24587 fi
24588 rm -f conf$$.sh
503d2be0
AS
24589fi
24590
c0d27fcc 24591# Support unset when possible.
edfaf76d 24592if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
24593 as_unset=unset
24594else
24595 as_unset=false
24596fi
24597
6bae0ccf 24598
ca81d7a0
JD
24599# IFS
24600# We need space, tab and new line, in precisely that order. Quoting is
24601# there to prevent editors from complaining about space-tab.
24602# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24603# splitting by setting IFS to empty value.)
24604as_nl='
24605'
24606IFS=" "" $as_nl"
24607
24608# Find who we are. Look in the path if we contain no directory separator.
24609case $0 in
24610 *[\\/]* ) as_myself=$0 ;;
24611 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24612for as_dir in $PATH
24613do
24614 IFS=$as_save_IFS
24615 test -z "$as_dir" && as_dir=.
24616 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24617done
24618IFS=$as_save_IFS
24619
24620 ;;
24621esac
24622# We did not find ourselves, most probably we were run as `sh COMMAND'
24623# in which case we are not to be found in the path.
24624if test "x$as_myself" = x; then
24625 as_myself=$0
24626fi
24627if test ! -f "$as_myself"; then
24628 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24629 { (exit 1); exit 1; }
24630fi
24631
6bae0ccf 24632# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
24633for as_var in ENV MAIL MAILPATH
24634do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24635done
6bae0ccf
DL
24636PS1='$ '
24637PS2='> '
24638PS4='+ '
24639
24640# NLS nuisances.
19650fd6
AS
24641for as_var in \
24642 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24643 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24644 LC_TELEPHONE LC_TIME
6bae0ccf 24645do
edfaf76d 24646 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
24647 eval $as_var=C; export $as_var
24648 else
ca81d7a0 24649 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
24650 fi
24651done
24652
24653# Required to use basename.
ca81d7a0
JD
24654if expr a : '\(a\)' >/dev/null 2>&1 &&
24655 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
24656 as_expr=expr
24657else
24658 as_expr=false
24659fi
24660
ca81d7a0 24661if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
24662 as_basename=basename
24663else
24664 as_basename=false
24665fi
c0d27fcc
MR
24666
24667
503d2be0 24668# Name of the executable.
ca81d7a0 24669as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
24670$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24671 X"$0" : 'X\(//\)$' \| \
ca81d7a0 24672 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 24673echo X/"$0" |
ca81d7a0
JD
24674 sed '/^.*\/\([^/][^/]*\)\/*$/{
24675 s//\1/
24676 q
24677 }
24678 /^X\/\(\/\/\)$/{
24679 s//\1/
24680 q
24681 }
24682 /^X\/\(\/\).*/{
24683 s//\1/
24684 q
24685 }
24686 s/.*/./; q'`
c0d27fcc 24687
ca81d7a0
JD
24688# CDPATH.
24689$as_unset CDPATH
c0d27fcc
MR
24690
24691
c0d27fcc 24692
c0d27fcc 24693 as_lineno_1=$LINENO
c0d27fcc 24694 as_lineno_2=$LINENO
c0d27fcc 24695 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 24696 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
24697
24698 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24699 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
24700 # line-number line after each line using $LINENO; the second 'sed'
24701 # does the real work. The second script uses 'N' to pair each
24702 # line-number line with the line containing $LINENO, and appends
24703 # trailing '-' during substitution so that $LINENO is not a special
24704 # case at line end.
c0d27fcc 24705 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
24706 # scripts with optimization help from Paolo Bonzini. Blame Lee
24707 # E. McMahon (1931-1989) for sed's syntax. :-)
24708 sed -n '
24709 p
24710 /[$]LINENO/=
24711 ' <$as_myself |
c0d27fcc 24712 sed '
ca81d7a0
JD
24713 s/[$]LINENO.*/&-/
24714 t lineno
24715 b
24716 :lineno
c0d27fcc 24717 N
ca81d7a0
JD
24718 :loop
24719 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 24720 t loop
ca81d7a0 24721 s/-\n.*//
c0d27fcc 24722 ' >$as_me.lineno &&
ca81d7a0
JD
24723 chmod +x "$as_me.lineno" ||
24724 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
24725 { (exit 1); exit 1; }; }
24726
24727 # Don't try to exec as it changes $[0], causing all sort of problems
24728 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
24729 # original and so on. Autoconf is especially sensitive to this).
24730 . "./$as_me.lineno"
c0d27fcc
MR
24731 # Exit status is that of the last command.
24732 exit
24733}
24734
24735
ca81d7a0
JD
24736if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24737 as_dirname=dirname
24738else
24739 as_dirname=false
24740fi
24741
24742ECHO_C= ECHO_N= ECHO_T=
24743case `echo -n x` in
24744-n*)
24745 case `echo 'x\c'` in
24746 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24747 *) ECHO_C='\c';;
24748 esac;;
24749*)
24750 ECHO_N='-n';;
c0d27fcc 24751esac
503d2be0 24752
ca81d7a0
JD
24753if expr a : '\(a\)' >/dev/null 2>&1 &&
24754 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
24755 as_expr=expr
24756else
24757 as_expr=false
24758fi
24759
24760rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
24761if test -d conf$$.dir; then
24762 rm -f conf$$.dir/conf$$.file
24763else
24764 rm -f conf$$.dir
24765 mkdir conf$$.dir
24766fi
503d2be0
AS
24767echo >conf$$.file
24768if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
24769 as_ln_s='ln -s'
24770 # ... but there are two gotchas:
24771 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24772 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24773 # In both cases, we have to default to `cp -p'.
24774 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 24775 as_ln_s='cp -p'
503d2be0
AS
24776elif ln conf$$.file conf$$ 2>/dev/null; then
24777 as_ln_s=ln
24778else
24779 as_ln_s='cp -p'
24780fi
ca81d7a0
JD
24781rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24782rmdir conf$$.dir 2>/dev/null
503d2be0 24783
6bae0ccf
DL
24784if mkdir -p . 2>/dev/null; then
24785 as_mkdir_p=:
24786else
edfaf76d 24787 test -d ./-p && rmdir ./-p
6bae0ccf
DL
24788 as_mkdir_p=false
24789fi
24790
f053c89f
CY
24791if test -x / >/dev/null 2>&1; then
24792 as_test_x='test -x'
ca81d7a0 24793else
f053c89f
CY
24794 if ls -dL / >/dev/null 2>&1; then
24795 as_ls_L_option=L
24796 else
24797 as_ls_L_option=
24798 fi
24799 as_test_x='
24800 eval sh -c '\''
24801 if test -d "$1"; then
24802 test -d "$1/.";
24803 else
24804 case $1 in
24805 -*)set "./$1";;
24806 esac;
24807 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24808 ???[sx]*):;;*)false;;esac;fi
24809 '\'' sh
24810 '
ca81d7a0 24811fi
f053c89f 24812as_executable_p=$as_test_x
503d2be0 24813
c0d27fcc 24814# Sed expression to map a string onto a valid CPP name.
edfaf76d 24815as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
24816
24817# Sed expression to map a string onto a valid variable name.
edfaf76d 24818as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 24819
503d2be0 24820
503d2be0
AS
24821exec 6>&1
24822
ca81d7a0 24823# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 24824# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
24825# values after options handling.
24826ac_log="
5d374ce1 24827This file was extended by emacs $as_me 23.0.60, which was
f053c89f 24828generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
24829
24830 CONFIG_FILES = $CONFIG_FILES
24831 CONFIG_HEADERS = $CONFIG_HEADERS
24832 CONFIG_LINKS = $CONFIG_LINKS
24833 CONFIG_COMMANDS = $CONFIG_COMMANDS
24834 $ $0 $@
24835
ca81d7a0
JD
24836on `(hostname || uname -n) 2>/dev/null | sed 1q`
24837"
24838
503d2be0
AS
24839_ACEOF
24840
ca81d7a0 24841cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24842# Files that config.status was made for.
ca81d7a0
JD
24843config_files="$ac_config_files"
24844config_headers="$ac_config_headers"
24845config_commands="$ac_config_commands"
503d2be0 24846
ca81d7a0 24847_ACEOF
503d2be0 24848
c0d27fcc 24849cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24850ac_cs_usage="\
24851\`$as_me' instantiates files from templates according to the
24852current configuration.
24853
24854Usage: $0 [OPTIONS] [FILE]...
24855
24856 -h, --help print this help, then exit
f053c89f 24857 -V, --version print version number and configuration settings, then exit
19650fd6 24858 -q, --quiet do not print progress messages
503d2be0
AS
24859 -d, --debug don't remove temporary files
24860 --recheck update $as_me by reconfiguring in the same conditions
24861 --file=FILE[:TEMPLATE]
edfaf76d 24862 instantiate the configuration file FILE
503d2be0 24863 --header=FILE[:TEMPLATE]
edfaf76d 24864 instantiate the configuration header FILE
503d2be0
AS
24865
24866Configuration files:
24867$config_files
24868
24869Configuration headers:
24870$config_headers
24871
24872Configuration commands:
24873$config_commands
24874
24875Report bugs to <bug-autoconf@gnu.org>."
503d2be0 24876
ca81d7a0 24877_ACEOF
c0d27fcc 24878cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24879ac_cs_version="\\
5d374ce1 24880emacs config.status 23.0.60
f053c89f 24881configured by $0, generated by GNU Autoconf 2.61,
ca81d7a0 24882 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24883
ca81d7a0 24884Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24885This config.status script is free software; the Free Software Foundation
24886gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
24887
24888ac_pwd='$ac_pwd'
24889srcdir='$srcdir'
24890INSTALL='$INSTALL'
c0d27fcc 24891_ACEOF
503d2be0 24892
c0d27fcc 24893cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24894# If no file are specified by the user, then we need to provide default
24895# value. By we need to know if files were specified by the user.
24896ac_need_defaults=:
24897while test $# != 0
ba4481b5 24898do
503d2be0
AS
24899 case $1 in
24900 --*=*)
ca81d7a0
JD
24901 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24902 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24903 ac_shift=:
24904 ;;
ca81d7a0 24905 *)
6bae0ccf
DL
24906 ac_option=$1
24907 ac_optarg=$2
24908 ac_shift=shift
503d2be0 24909 ;;
503d2be0
AS
24910 esac
24911
6bae0ccf 24912 case $ac_option in
503d2be0 24913 # Handling of the options.
19650fd6
AS
24914 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24915 ac_cs_recheck=: ;;
ca81d7a0
JD
24916 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24917 echo "$ac_cs_version"; exit ;;
24918 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24919 debug=: ;;
24920 --file | --fil | --fi | --f )
6bae0ccf
DL
24921 $ac_shift
24922 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24923 ac_need_defaults=false;;
24924 --header | --heade | --head | --hea )
6bae0ccf
DL
24925 $ac_shift
24926 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24927 ac_need_defaults=false;;
ca81d7a0
JD
24928 --he | --h)
24929 # Conflict between --help and --header
24930 { echo "$as_me: error: ambiguous option: $1
24931Try \`$0 --help' for more information." >&2
24932 { (exit 1); exit 1; }; };;
24933 --help | --hel | -h )
24934 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
24935 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24936 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24937 ac_cs_silent=: ;;
503d2be0
AS
24938
24939 # This is an error.
ca81d7a0
JD
24940 -*) { echo "$as_me: error: unrecognized option: $1
24941Try \`$0 --help' for more information." >&2
503d2be0
AS
24942 { (exit 1); exit 1; }; } ;;
24943
ca81d7a0
JD
24944 *) ac_config_targets="$ac_config_targets $1"
24945 ac_need_defaults=false ;;
503d2be0 24946
ba4481b5 24947 esac
503d2be0 24948 shift
ba4481b5
DL
24949done
24950
19650fd6
AS
24951ac_configure_extra_args=
24952
24953if $ac_cs_silent; then
24954 exec 6>/dev/null
24955 ac_configure_extra_args="$ac_configure_extra_args --silent"
24956fi
24957
24958_ACEOF
24959cat >>$CONFIG_STATUS <<_ACEOF
24960if \$ac_cs_recheck; then
ca81d7a0
JD
24961 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24962 CONFIG_SHELL=$SHELL
24963 export CONFIG_SHELL
24964 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
24965fi
24966
503d2be0 24967_ACEOF
ca81d7a0
JD
24968cat >>$CONFIG_STATUS <<\_ACEOF
24969exec 5>>config.log
24970{
24971 echo
24972 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24973## Running $as_me. ##
24974_ASBOX
24975 echo "$ac_log"
24976} >&5
ba4481b5 24977
ca81d7a0 24978_ACEOF
c0d27fcc 24979cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24980#
ca81d7a0 24981# INIT-COMMANDS
503d2be0 24982#
8acdcf6f 24983GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS" cpp_undefs="$cpp_undefs"
503d2be0 24984
c0d27fcc
MR
24985_ACEOF
24986
c0d27fcc 24987cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
24988
24989# Handling of arguments.
503d2be0
AS
24990for ac_config_target in $ac_config_targets
24991do
ca81d7a0
JD
24992 case $ac_config_target in
24993 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
24994 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24995 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
24996 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
24997 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
24998 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
24999 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
25000 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
ca81d7a0 25001 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 25002 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 25003 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
25004 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
25005 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25006
c0d27fcc 25007 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
25008echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25009 { (exit 1); exit 1; }; };;
25010 esac
ba4481b5 25011done
503d2be0 25012
ca81d7a0 25013
503d2be0
AS
25014# If the user did not use the arguments to specify the items to instantiate,
25015# then the envvar interface is used. Set only those that are not.
25016# We use the long form for the default assignment because of an extremely
25017# bizarre bug on SunOS 4.1.3.
25018if $ac_need_defaults; then
25019 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25020 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25021 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 25022fi
503d2be0 25023
19650fd6 25024# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 25025# simply because there is no reason against having it here, and in addition,
19650fd6 25026# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
25027# Hook for its removal unless debugging.
25028# Note that there is a small window in which the directory will not be cleaned:
25029# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
25030$debug ||
25031{
ca81d7a0
JD
25032 tmp=
25033 trap 'exit_status=$?
25034 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25035' 0
503d2be0
AS
25036 trap '{ (exit 1); exit 1; }' 1 2 13 15
25037}
503d2be0 25038# Create a (secure) tmp directory for tmp files.
19650fd6 25039
503d2be0 25040{
ca81d7a0 25041 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
25042 test -n "$tmp" && test -d "$tmp"
25043} ||
25044{
ca81d7a0
JD
25045 tmp=./conf$$-$RANDOM
25046 (umask 077 && mkdir "$tmp")
503d2be0
AS
25047} ||
25048{
19650fd6 25049 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
25050 { (exit 1); exit 1; }
25051}
25052
503d2be0 25053#
ca81d7a0 25054# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
25055#
25056
25057# No need to generate the scripts if there are no CONFIG_FILES.
25058# This happens for instance when ./config.status config.h
ca81d7a0
JD
25059if test -n "$CONFIG_FILES"; then
25060
25061_ACEOF
25062
25063
25064
25065ac_delim='%!_!# '
25066for ac_last_try in false false false false false :; do
25067 cat >conf$$subs.sed <<_ACEOF
25068SHELL!$SHELL$ac_delim
25069PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
25070PACKAGE_NAME!$PACKAGE_NAME$ac_delim
25071PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
25072PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
25073PACKAGE_STRING!$PACKAGE_STRING$ac_delim
25074PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
25075exec_prefix!$exec_prefix$ac_delim
25076prefix!$prefix$ac_delim
25077program_transform_name!$program_transform_name$ac_delim
25078bindir!$bindir$ac_delim
25079sbindir!$sbindir$ac_delim
25080libexecdir!$libexecdir$ac_delim
25081datarootdir!$datarootdir$ac_delim
25082datadir!$datadir$ac_delim
25083sysconfdir!$sysconfdir$ac_delim
25084sharedstatedir!$sharedstatedir$ac_delim
25085localstatedir!$localstatedir$ac_delim
25086includedir!$includedir$ac_delim
25087oldincludedir!$oldincludedir$ac_delim
25088docdir!$docdir$ac_delim
25089infodir!$infodir$ac_delim
25090htmldir!$htmldir$ac_delim
25091dvidir!$dvidir$ac_delim
25092pdfdir!$pdfdir$ac_delim
25093psdir!$psdir$ac_delim
25094libdir!$libdir$ac_delim
25095localedir!$localedir$ac_delim
25096mandir!$mandir$ac_delim
25097DEFS!$DEFS$ac_delim
25098ECHO_C!$ECHO_C$ac_delim
25099ECHO_N!$ECHO_N$ac_delim
25100ECHO_T!$ECHO_T$ac_delim
25101LIBS!$LIBS$ac_delim
25102build_alias!$build_alias$ac_delim
25103host_alias!$host_alias$ac_delim
25104target_alias!$target_alias$ac_delim
25105MAINT!$MAINT$ac_delim
25106build!$build$ac_delim
25107build_cpu!$build_cpu$ac_delim
25108build_vendor!$build_vendor$ac_delim
25109build_os!$build_os$ac_delim
25110host!$host$ac_delim
25111host_cpu!$host_cpu$ac_delim
25112host_vendor!$host_vendor$ac_delim
25113host_os!$host_os$ac_delim
25114CC!$CC$ac_delim
25115CFLAGS!$CFLAGS$ac_delim
25116LDFLAGS!$LDFLAGS$ac_delim
25117CPPFLAGS!$CPPFLAGS$ac_delim
25118ac_ct_CC!$ac_ct_CC$ac_delim
25119EXEEXT!$EXEEXT$ac_delim
25120OBJEXT!$OBJEXT$ac_delim
25121CPP!$CPP$ac_delim
25122GREP!$GREP$ac_delim
25123EGREP!$EGREP$ac_delim
25124LN_S!$LN_S$ac_delim
25125INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
25126INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
25127INSTALL_DATA!$INSTALL_DATA$ac_delim
25128RANLIB!$RANLIB$ac_delim
25129INSTALL_INFO!$INSTALL_INFO$ac_delim
25130GZIP_PROG!$GZIP_PROG$ac_delim
1bb9a689 25131MAKEINFO!$MAKEINFO$ac_delim
ca81d7a0
JD
25132LIBSOUND!$LIBSOUND$ac_delim
25133PKG_CONFIG!$PKG_CONFIG$ac_delim
25134ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
25135ALSA_LIBS!$ALSA_LIBS$ac_delim
25136CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
25137SET_MAKE!$SET_MAKE$ac_delim
25138XMKMF!$XMKMF$ac_delim
cfe440b8 25139HAVE_XSERVER!$HAVE_XSERVER$ac_delim
0cfc0546
GM
25140RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
25141RSVG_LIBS!$RSVG_LIBS$ac_delim
ca81d7a0
JD
25142GTK_CFLAGS!$GTK_CFLAGS$ac_delim
25143GTK_LIBS!$GTK_LIBS$ac_delim
131e4133
MA
25144DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
25145DBUS_LIBS!$DBUS_LIBS$ac_delim
c24fa7dc
MB
25146XFT_CFLAGS!$XFT_CFLAGS$ac_delim
25147XFT_LIBS!$XFT_LIBS$ac_delim
25148FREETYPE_CFLAGS!$FREETYPE_CFLAGS$ac_delim
25149FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim
25150FONTCONFIG_CFLAGS!$FONTCONFIG_CFLAGS$ac_delim
25151FONTCONFIG_LIBS!$FONTCONFIG_LIBS$ac_delim
c24fa7dc
MB
25152LIBOTF_CFLAGS!$LIBOTF_CFLAGS$ac_delim
25153LIBOTF_LIBS!$LIBOTF_LIBS$ac_delim
7f0942ba
KH
25154M17N_FLT_CFLAGS!$M17N_FLT_CFLAGS$ac_delim
25155M17N_FLT_LIBS!$M17N_FLT_LIBS$ac_delim
ca81d7a0
JD
25156ALLOCA!$ALLOCA$ac_delim
25157liblockfile!$liblockfile$ac_delim
25158LIBOBJS!$LIBOBJS$ac_delim
25159NEED_SETGID!$NEED_SETGID$ac_delim
25160KMEM_GROUP!$KMEM_GROUP$ac_delim
25161GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
25162GETOPT_H!$GETOPT_H$ac_delim
25163GETOPTOBJS!$GETOPTOBJS$ac_delim
e70b2110 25164version!$version$ac_delim
ca81d7a0
JD
25165_ACEOF
25166
25167 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
25168 break
25169 elif $ac_last_try; then
25170 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25171echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25172 { (exit 1); exit 1; }; }
25173 else
25174 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8eeae1c9 25175 fi
ca81d7a0
JD
25176done
25177
25178ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25179if test -n "$ac_eof"; then
25180 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25181 ac_eof=`expr $ac_eof + 1`
25182fi
503d2be0 25183
c0d27fcc 25184cat >>$CONFIG_STATUS <<_ACEOF
ca81d7a0
JD
25185cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
25186/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25187_ACEOF
25188sed '
25189s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25190s/^/s,@/; s/!/@,|#_!!_#|/
25191:n
25192t n
25193s/'"$ac_delim"'$/,g/; t
25194s/$/\\/; p
25195N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25196' >>$CONFIG_STATUS <conf$$subs.sed
25197rm -f conf$$subs.sed
25198cat >>$CONFIG_STATUS <<_ACEOF
25199CEOF$ac_eof
25200_ACEOF
503d2be0 25201
ca81d7a0
JD
25202
25203ac_delim='%!_!# '
25204for ac_last_try in false false false false false :; do
25205 cat >conf$$subs.sed <<_ACEOF
0bd50841 25206configuration!$configuration$ac_delim
7f0942ba
KH
25207canonical!$canonical$ac_delim
25208srcdir!$srcdir$ac_delim
1bb9a689
MB
25209lispdir!$lispdir$ac_delim
25210locallisppath!$locallisppath$ac_delim
25211lisppath!$lisppath$ac_delim
9bdeb5e9
MB
25212x_default_search_path!$x_default_search_path$ac_delim
25213etcdir!$etcdir$ac_delim
25214archlibdir!$archlibdir$ac_delim
25215bitmapdir!$bitmapdir$ac_delim
25216gamedir!$gamedir$ac_delim
25217gameuser!$gameuser$ac_delim
25218c_switch_system!$c_switch_system$ac_delim
c24fa7dc
MB
25219c_switch_machine!$c_switch_machine$ac_delim
25220LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
25221LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
ca81d7a0
JD
25222C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
25223X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
25224machfile!$machfile$ac_delim
25225opsysfile!$opsysfile$ac_delim
25226carbon_appdir!$carbon_appdir$ac_delim
edfda783 25227ns_appdir!$ns_appdir$ac_delim
06b62770
AR
25228ns_appbindir!$ns_appbindir$ac_delim
25229ns_appresdir!$ns_appresdir$ac_delim
25230ns_appsrc!$ns_appsrc$ac_delim
facfbbbd 25231GNUSTEP_MAKEFILES!$GNUSTEP_MAKEFILES$ac_delim
ca81d7a0
JD
25232LTLIBOBJS!$LTLIBOBJS$ac_delim
25233_ACEOF
503d2be0 25234
06b62770 25235 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 27; then
c24fa7dc
MB
25236 break
25237 elif $ac_last_try; then
25238 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
25239echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
25240 { (exit 1); exit 1; }; }
25241 else
25242 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 25243 fi
ca81d7a0
JD
25244done
25245
25246ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
25247if test -n "$ac_eof"; then
25248 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
25249 ac_eof=`expr $ac_eof + 1`
25250fi
ba4481b5 25251
ca81d7a0
JD
25252cat >>$CONFIG_STATUS <<_ACEOF
25253cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
25254/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
25255_ACEOF
25256sed '
25257s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
25258s/^/s,@/; s/!/@,|#_!!_#|/
25259:n
25260t n
25261s/'"$ac_delim"'$/,g/; t
25262s/$/\\/; p
25263N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
25264' >>$CONFIG_STATUS <conf$$subs.sed
25265rm -f conf$$subs.sed
25266cat >>$CONFIG_STATUS <<_ACEOF
25267:end
25268s/|#_!!_#|//g
25269CEOF$ac_eof
c0d27fcc 25270_ACEOF
ca81d7a0
JD
25271
25272
25273# VPATH may cause trouble with some makes, so we remove $(srcdir),
25274# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25275# trailing colons and then remove the whole line if VPATH becomes empty
25276# (actually we leave an empty line to preserve line numbers).
25277if test "x$srcdir" = x.; then
25278 ac_vpsub='/^[ ]*VPATH[ ]*=/{
25279s/:*\$(srcdir):*/:/
25280s/:*\${srcdir}:*/:/
25281s/:*@srcdir@:*/:/
25282s/^\([^=]*=[ ]*\):*/\1/
25283s/:*$//
25284s/^[^=]*=[ ]*$//
25285}'
25286fi
25287
c0d27fcc 25288cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
25289fi # test -n "$CONFIG_FILES"
25290
25291
25292for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
25293do
25294 case $ac_tag in
25295 :[FHLC]) ac_mode=$ac_tag; continue;;
25296 esac
25297 case $ac_mode$ac_tag in
25298 :[FHL]*:*);;
25299 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
25300echo "$as_me: error: Invalid tag $ac_tag." >&2;}
25301 { (exit 1); exit 1; }; };;
25302 :[FH]-) ac_tag=-:-;;
25303 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25304 esac
25305 ac_save_IFS=$IFS
25306 IFS=:
25307 set x $ac_tag
25308 IFS=$ac_save_IFS
25309 shift
25310 ac_file=$1
25311 shift
25312
25313 case $ac_mode in
25314 :L) ac_source=$1;;
25315 :[FH])
25316 ac_file_inputs=
25317 for ac_f
25318 do
25319 case $ac_f in
25320 -) ac_f="$tmp/stdin";;
25321 *) # Look for the file first in the build tree, then in the source tree
25322 # (if the path is not absolute). The absolute path cannot be DOS-style,
25323 # because $ac_f cannot contain `:'.
25324 test -f "$ac_f" ||
25325 case $ac_f in
25326 [\\/$]*) false;;
25327 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25328 esac ||
25329 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
25330echo "$as_me: error: cannot find input file: $ac_f" >&2;}
25331 { (exit 1); exit 1; }; };;
25332 esac
25333 ac_file_inputs="$ac_file_inputs $ac_f"
25334 done
25335
25336 # Let's still pretend it is `configure' which instantiates (i.e., don't
25337 # use $as_me), people would be surprised to read:
25338 # /* config.h. Generated by config.status. */
25339 configure_input="Generated from "`IFS=:
25340 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
25341 if test x"$ac_file" != x-; then
25342 configure_input="$ac_file. $configure_input"
25343 { echo "$as_me:$LINENO: creating $ac_file" >&5
25344echo "$as_me: creating $ac_file" >&6;}
25345 fi
25346
25347 case $ac_tag in
25348 *:-:* | *:-) cat >"$tmp/stdin";;
25349 esac
25350 ;;
ba4481b5
DL
25351 esac
25352
ca81d7a0 25353 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 25354$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25355 X"$ac_file" : 'X\(//\)[^/]' \| \
25356 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 25357 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 25358echo X"$ac_file" |
ca81d7a0
JD
25359 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25360 s//\1/
25361 q
25362 }
25363 /^X\(\/\/\)[^/].*/{
25364 s//\1/
25365 q
25366 }
25367 /^X\(\/\/\)$/{
25368 s//\1/
25369 q
25370 }
25371 /^X\(\/\).*/{
25372 s//\1/
25373 q
25374 }
25375 s/.*/./; q'`
25376 { as_dir="$ac_dir"
25377 case $as_dir in #(
25378 -*) as_dir=./$as_dir;;
25379 esac
25380 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 25381 as_dirs=
ca81d7a0
JD
25382 while :; do
25383 case $as_dir in #(
25384 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
25385 *) as_qdir=$as_dir;;
25386 esac
25387 as_dirs="'$as_qdir' $as_dirs"
25388 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 25389$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
25390 X"$as_dir" : 'X\(//\)[^/]' \| \
25391 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 25392 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 25393echo X"$as_dir" |
ca81d7a0
JD
25394 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25395 s//\1/
25396 q
25397 }
25398 /^X\(\/\/\)[^/].*/{
25399 s//\1/
25400 q
25401 }
25402 /^X\(\/\/\)$/{
25403 s//\1/
25404 q
25405 }
25406 /^X\(\/\).*/{
25407 s//\1/
25408 q
25409 }
25410 s/.*/./; q'`
25411 test -d "$as_dir" && break
6bae0ccf 25412 done
ca81d7a0
JD
25413 test -z "$as_dirs" || eval "mkdir $as_dirs"
25414 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
25415echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 25416 { (exit 1); exit 1; }; }; }
c0d27fcc 25417 ac_builddir=.
98418dba 25418
ca81d7a0
JD
25419case "$ac_dir" in
25420.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25421*)
c0d27fcc 25422 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
25423 # A ".." for each directory in $ac_dir_suffix.
25424 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
25425 case $ac_top_builddir_sub in
25426 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25427 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25428 esac ;;
25429esac
25430ac_abs_top_builddir=$ac_pwd
25431ac_abs_builddir=$ac_pwd$ac_dir_suffix
25432# for backward compatibility:
25433ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
25434
25435case $srcdir in
ca81d7a0 25436 .) # We are building in place.
c0d27fcc 25437 ac_srcdir=.
ca81d7a0
JD
25438 ac_top_srcdir=$ac_top_builddir_sub
25439 ac_abs_top_srcdir=$ac_pwd ;;
25440 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 25441 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
25442 ac_top_srcdir=$srcdir
25443 ac_abs_top_srcdir=$srcdir ;;
25444 *) # Relative name.
25445 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25446 ac_top_srcdir=$ac_top_build_prefix$srcdir
25447 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 25448esac
ca81d7a0 25449ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 25450
c0d27fcc 25451
ca81d7a0
JD
25452 case $ac_mode in
25453 :F)
25454 #
25455 # CONFIG_FILE
25456 #
ba4481b5 25457
503d2be0
AS
25458 case $INSTALL in
25459 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 25460 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 25461 esac
ca81d7a0 25462_ACEOF
ba4481b5 25463
ca81d7a0
JD
25464cat >>$CONFIG_STATUS <<\_ACEOF
25465# If the template does not know about datarootdir, expand it.
25466# FIXME: This hack should be removed a few years after 2.60.
25467ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 25468
ca81d7a0
JD
25469case `sed -n '/datarootdir/ {
25470 p
25471 q
25472}
25473/@datadir@/p
25474/@docdir@/p
25475/@infodir@/p
25476/@localedir@/p
25477/@mandir@/p
25478' $ac_file_inputs` in
25479*datarootdir*) ac_datarootdir_seen=yes;;
25480*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25481 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25482echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 25483_ACEOF
ca81d7a0
JD
25484cat >>$CONFIG_STATUS <<_ACEOF
25485 ac_datarootdir_hack='
25486 s&@datadir@&$datadir&g
25487 s&@docdir@&$docdir&g
25488 s&@infodir@&$infodir&g
25489 s&@localedir@&$localedir&g
25490 s&@mandir@&$mandir&g
25491 s&\\\${datarootdir}&$datarootdir&g' ;;
25492esac
c0d27fcc 25493_ACEOF
ca81d7a0
JD
25494
25495# Neutralize VPATH when `$srcdir' = `.'.
25496# Shell code in configure.ac might set extrasub.
25497# FIXME: do we really want to maintain this feature?
c0d27fcc 25498cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
25499 sed "$ac_vpsub
25500$extrasub
c0d27fcc
MR
25501_ACEOF
25502cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
25503:t
25504/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ca81d7a0
JD
25505s&@configure_input@&$configure_input&;t t
25506s&@top_builddir@&$ac_top_builddir_sub&;t t
25507s&@srcdir@&$ac_srcdir&;t t
25508s&@abs_srcdir@&$ac_abs_srcdir&;t t
25509s&@top_srcdir@&$ac_top_srcdir&;t t
25510s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25511s&@builddir@&$ac_builddir&;t t
25512s&@abs_builddir@&$ac_abs_builddir&;t t
25513s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25514s&@INSTALL@&$ac_INSTALL&;t t
25515$ac_datarootdir_hack
25516" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
25517
25518test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25519 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25520 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25521 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25522which seems to be undefined. Please make sure it is defined." >&5
25523echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25524which seems to be undefined. Please make sure it is defined." >&2;}
25525
25526 rm -f "$tmp/stdin"
503d2be0 25527 case $ac_file in
ca81d7a0
JD
25528 -) cat "$tmp/out"; rm -f "$tmp/out";;
25529 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 25530 esac
ca81d7a0
JD
25531 ;;
25532 :H)
25533 #
25534 # CONFIG_HEADER
25535 #
25536_ACEOF
25537
25538# Transform confdefs.h into a sed script `conftest.defines', that
25539# substitutes the proper values into config.h.in to produce config.h.
25540rm -f conftest.defines conftest.tail
25541# First, append a space to every undef/define line, to ease matching.
25542echo 's/$/ /' >conftest.defines
25543# Then, protect against being on the right side of a sed subst, or in
25544# an unquoted here document, in config.status. If some macros were
25545# called several times there might be several #defines for the same
25546# symbol, which is useless. But do not sort them, since the last
25547# AC_DEFINE must be honored.
25548ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25549# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25550# NAME is the cpp macro being defined, VALUE is the value it is being given.
25551# PARAMS is the parameter list in the macro definition--in most cases, it's
25552# just an empty string.
25553ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25554ac_dB='\\)[ (].*,\\1define\\2'
25555ac_dC=' '
25556ac_dD=' ,'
25557
25558uniq confdefs.h |
25559 sed -n '
25560 t rset
25561 :rset
25562 s/^[ ]*#[ ]*define[ ][ ]*//
25563 t ok
25564 d
25565 :ok
25566 s/[\\&,]/\\&/g
25567 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25568 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25569 ' >>conftest.defines
25570
25571# Remove the space that was appended to ease matching.
25572# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
25573# example, in the case of _POSIX_SOURCE, which is predefined and required
25574# on some systems where configure will not decide to define it.
ca81d7a0
JD
25575# (The regexp can be short, since the line contains either #define or #undef.)
25576echo 's/ $//
25577s,^[ #]*u.*,/* & */,' >>conftest.defines
25578
25579# Break up conftest.defines:
25580ac_max_sed_lines=50
25581
25582# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25583# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25584# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25585# et cetera.
25586ac_in='$ac_file_inputs'
25587ac_out='"$tmp/out1"'
25588ac_nxt='"$tmp/out2"'
25589
25590while :
503d2be0 25591do
ca81d7a0
JD
25592 # Write a here document:
25593 cat >>$CONFIG_STATUS <<_ACEOF
25594 # First, check the format of the line:
25595 cat >"\$tmp/defines.sed" <<\\CEOF
25596/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25597/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25598b
25599:def
25600_ACEOF
25601 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 25602 echo 'CEOF
ca81d7a0
JD
25603 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25604 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25605 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25606 grep . conftest.tail >/dev/null || break
503d2be0
AS
25607 rm -f conftest.defines
25608 mv conftest.tail conftest.defines
25609done
ca81d7a0 25610rm -f conftest.defines conftest.tail
503d2be0 25611
ca81d7a0 25612echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 25613cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 25614 if test x"$ac_file" != x-; then
ca81d7a0
JD
25615 echo "/* $configure_input */" >"$tmp/config.h"
25616 cat "$ac_result" >>"$tmp/config.h"
25617 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 25618 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
25619echo "$as_me: $ac_file is unchanged" >&6;}
25620 else
503d2be0 25621 rm -f $ac_file
ca81d7a0 25622 mv "$tmp/config.h" $ac_file
ba4481b5 25623 fi
503d2be0 25624 else
ca81d7a0
JD
25625 echo "/* $configure_input */"
25626 cat "$ac_result"
ba4481b5 25627 fi
ca81d7a0
JD
25628 rm -f "$tmp/out12"
25629 ;;
edfaf76d 25630
ca81d7a0
JD
25631 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
25632echo "$as_me: executing $ac_file commands" >&6;}
25633 ;;
25634 esac
ba4481b5 25635
c0d27fcc 25636
ca81d7a0
JD
25637 case $ac_file$ac_mode in
25638 "default":C)
ba4481b5
DL
25639
25640### Make the necessary directories, if they don't exist.
25641for dir in etc lisp ; do
25642 test -d ${dir} || mkdir ${dir}
25643done
25644
25645# Build src/Makefile from ${srcdir}/src/Makefile.c
25646# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
25647# This must be done after src/config.h is built, since we rely on that file.
25648
ba4481b5 25649echo creating src/epaths.h
4aa6b955 25650${MAKE-make} epaths-force
ba4481b5 25651
1c203d4c
DL
25652# As of 2000-11-19, newest development versions of GNU cpp preprocess
25653# `..' to `. .' unless invoked with -traditional
25654
d0e9bfd2 25655if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
25656 CPPFLAGS="$CPPFLAGS -traditional"
25657fi
25658
ba4481b5
DL
25659echo creating lib-src/Makefile
25660( cd lib-src
25661 rm -f junk.c junk1.c junk2.c
25662 sed -e '/start of cpp stuff/q' \
25663 < Makefile.c > junk1.c
25664 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25665 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25666 < Makefile.c > junk.c
8acdcf6f 25667 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25668 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25669 cat junk1.c junk2.c > Makefile.new
25670 rm -f junk.c junk1.c junk2.c
25671 chmod 444 Makefile.new
25672 mv -f Makefile.new Makefile
25673)
25674
25675echo creating src/Makefile
25676( cd src
25677 rm -f junk.c junk1.c junk2.c
25678 sed -e '/start of cpp stuff/q' \
25679 < Makefile.c > junk1.c
25680 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25681 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25682 < Makefile.c > junk.c
8acdcf6f 25683 $CPP $cpp_undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25684 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25685 cat junk1.c junk2.c > Makefile.new
25686 rm -f junk.c junk1.c junk2.c
25687 chmod 444 Makefile.new
25688 mv -f Makefile.new Makefile
25689)
25690
503d2be0 25691if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 25692 echo creating src/.gdbinit
503d2be0 25693 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
25694fi
25695
503d2be0 25696 ;;
ca81d7a0 25697
503d2be0 25698 esac
ca81d7a0 25699done # for ac_tag
503d2be0 25700
ba4481b5 25701
503d2be0 25702{ (exit 0); exit 0; }
c0d27fcc 25703_ACEOF
ba4481b5 25704chmod +x $CONFIG_STATUS
503d2be0
AS
25705ac_clean_files=$ac_clean_files_save
25706
c0d27fcc 25707
503d2be0
AS
25708# configure is writing to config.log, and then calls config.status.
25709# config.status does its own redirection, appending to config.log.
25710# Unfortunately, on DOS this fails, as config.log is still kept open
25711# by configure, so config.status won't be able to write to it; its
25712# output is simply discarded. So we exec the FD to /dev/null,
25713# effectively closing config.log, so it can be properly (re)opened and
25714# appended to by config.status. When coming back to configure, we
25715# need to make the FD available again.
25716if test "$no_create" != yes; then
25717 ac_cs_success=:
19650fd6
AS
25718 ac_config_status_args=
25719 test "$silent" = yes &&
25720 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 25721 exec 5>/dev/null
19650fd6 25722 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
25723 exec 5>>config.log
25724 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25725 # would make configure fail if this is the last instruction.
25726 $ac_cs_success || { (exit 1); exit 1; }
25727fi
f5f47add 25728
c0d27fcc 25729