(ibuffer-mode): Fix last change.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
9cf8f393 3# Generated by GNU Autoconf 2.61 for emacs 23.0.50.
ba4481b5 4#
d6e01aa5
KL
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
d6e01aa5
KL
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+"$@"}'='"$@"'
d6e01aa5
KL
21 setopt NO_GLOB_SUBST
22else
23 case `(set -o) 2>/dev/null` in
24 *posix*) set -o posix ;;
25esac
26
27fi
28
29
30
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
d6e01aa5
KL
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.
d6e01aa5
KL
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
d6e01aa5 111 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
112 fi
113done
114
115# Required to use basename.
d6e01aa5
KL
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
d6e01aa5 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.
d6e01aa5 131as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
132$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133 X"$0" : 'X\(//\)$' \| \
d6e01aa5 134 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 135echo X/"$0" |
d6e01aa5
KL
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
d6e01aa5
KL
150# CDPATH.
151$as_unset CDPATH
6bae0ccf 152
c0d27fcc 153
d6e01aa5
KL
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
d6e01aa5
KL
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
d6e01aa5
KL
178exitcode=0
179if as_func_success; then
180 :
181else
182 exitcode=1
183 echo as_func_success failed.
184fi
c0d27fcc 185
d6e01aa5
KL
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=.
d6e01aa5 226 case $as_dir in
c0d27fcc 227 /*)
d6e01aa5
KL
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
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
248 case `(set -o) 2>/dev/null` in
249 *posix*) set -o posix ;;
250esac
251
252fi
253
254
255:
256_ASEOF
257}; then
258 CONFIG_SHELL=$as_shell
259 as_have_required=yes
260 if { "$as_shell" 2> /dev/null <<\_ASEOF
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
269 case `(set -o) 2>/dev/null` in
270 *posix*) set -o posix ;;
271esac
272
273fi
274
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" &&
d6e01aa5
KL
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") || {
9fb1ba80
JD
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
d6e01aa5
KL
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
d6e01aa5
KL
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
d6e01aa5
KL
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 '
d6e01aa5
KL
443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
c0d27fcc 447 N
d6e01aa5
KL
448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 450 t loop
d6e01aa5 451 s/-\n.*//
c0d27fcc 452 ' >$as_me.lineno &&
d6e01aa5 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
d6e01aa5
KL
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
d6e01aa5
KL
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
d6e01aa5
KL
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
d6e01aa5
KL
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
d6e01aa5
KL
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
d6e01aa5
KL
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
d6e01aa5
KL
521if test -x / >/dev/null 2>&1; then
522 as_test_x='test -x'
523else
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 '
541fi
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
d6e01aa5 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
d6e01aa5 563ac_clean_files=
6bae0ccf 564ac_config_libobj_dir=.
d6e01aa5 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'
575PACKAGE_VERSION='23.0.50'
576PACKAGE_STRING='emacs 23.0.50'
577PACKAGE_BUGREPORT=''
c0d27fcc 578
9fb1ba80 579ac_unique_file="src/lisp.h"
6bae0ccf 580ac_config_libobj_dir=src
503d2be0
AS
581# Factoring default headers for most tests.
582ac_includes_default="\
583#include <stdio.h>
d6e01aa5 584#ifdef HAVE_SYS_TYPES_H
503d2be0
AS
585# include <sys/types.h>
586#endif
d6e01aa5 587#ifdef HAVE_SYS_STAT_H
503d2be0
AS
588# include <sys/stat.h>
589#endif
d6e01aa5 590#ifdef STDC_HEADERS
503d2be0
AS
591# include <stdlib.h>
592# include <stddef.h>
593#else
d6e01aa5 594# ifdef HAVE_STDLIB_H
503d2be0
AS
595# include <stdlib.h>
596# endif
597#endif
d6e01aa5
KL
598#ifdef HAVE_STRING_H
599# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
503d2be0
AS
600# include <memory.h>
601# endif
602# include <string.h>
603#endif
d6e01aa5 604#ifdef HAVE_STRINGS_H
503d2be0
AS
605# include <strings.h>
606#endif
d6e01aa5 607#ifdef HAVE_INTTYPES_H
503d2be0 608# include <inttypes.h>
503d2be0 609#endif
d6e01aa5
KL
610#ifdef HAVE_STDINT_H
611# include <stdint.h>
612#endif
613#ifdef HAVE_UNISTD_H
503d2be0
AS
614# include <unistd.h>
615#endif"
ba4481b5 616
d6e01aa5
KL
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
c982cf7d 682MAKEINFO
d6e01aa5
KL
683LIBSOUND
684PKG_CONFIG
685ALSA_CFLAGS
686ALSA_LIBS
687CFLAGS_SOUND
688SET_MAKE
689XMKMF
cfe440b8 690HAVE_XSERVER
0cfc0546
GM
691RSVG_CFLAGS
692RSVG_LIBS
d6e01aa5
KL
693GTK_CFLAGS
694GTK_LIBS
131e4133
MA
695DBUS_CFLAGS
696DBUS_LIBS
9d89ffd0
JD
697XFT_CFLAGS
698XFT_LIBS
d6e01aa5
KL
699ALLOCA
700liblockfile
701LIBOBJS
702NEED_SETGID
703KMEM_GROUP
704GETLOADAVG_LIBS
705GETOPT_H
706GETOPTOBJS
707version
708configuration
709canonical
710srcdir
711lispdir
712locallisppath
713lisppath
714x_default_search_path
715etcdir
716archlibdir
717bitmapdir
718gamedir
719gameuser
720c_switch_system
721c_switch_machine
722LD_SWITCH_X_SITE
723LD_SWITCH_X_SITE_AUX
724C_SWITCH_X_SITE
725X_TOOLKIT_TYPE
726machfile
727opsysfile
728carbon_appdir
729LTLIBOBJS'
6bae0ccf 730ac_subst_files=''
d6e01aa5
KL
731 ac_precious_vars='build_alias
732host_alias
733target_alias
734CC
735CFLAGS
736LDFLAGS
737LIBS
738CPPFLAGS
739CPP
740XMKMF'
741
c0d27fcc 742
ba4481b5 743# Initialize some variables set by options.
503d2be0
AS
744ac_init_help=
745ac_init_version=false
ba4481b5
DL
746# The variables have the same names as the options, with
747# dashes changed to underlines.
503d2be0 748cache_file=/dev/null
ba4481b5 749exec_prefix=NONE
ba4481b5 750no_create=
ba4481b5
DL
751no_recursion=
752prefix=NONE
753program_prefix=NONE
754program_suffix=NONE
755program_transform_name=s,x,x,
756silent=
757site=
758srcdir=
ba4481b5
DL
759verbose=
760x_includes=NONE
761x_libraries=NONE
503d2be0
AS
762
763# Installation directory options.
764# These are left unexpanded so users can "make install exec_prefix=/foo"
765# and all the variables that are supposed to be based on exec_prefix
766# by default will actually change.
767# Use braces instead of parens because sh, perl, etc. also accept them.
d6e01aa5 768# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
769bindir='${exec_prefix}/bin'
770sbindir='${exec_prefix}/sbin'
771libexecdir='${exec_prefix}/libexec'
d6e01aa5
KL
772datarootdir='${prefix}/share'
773datadir='${datarootdir}'
ba4481b5
DL
774sysconfdir='${prefix}/etc'
775sharedstatedir='${prefix}/com'
776localstatedir='${prefix}/var'
ba4481b5
DL
777includedir='${prefix}/include'
778oldincludedir='/usr/include'
9cf8f393 779docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
d6e01aa5
KL
780infodir='${datarootdir}/info'
781htmldir='${docdir}'
782dvidir='${docdir}'
783pdfdir='${docdir}'
784psdir='${docdir}'
785libdir='${exec_prefix}/lib'
786localedir='${datarootdir}/locale'
787mandir='${datarootdir}/man'
ba4481b5 788
ba4481b5 789ac_prev=
d6e01aa5 790ac_dashdash=
ba4481b5
DL
791for ac_option
792do
ba4481b5
DL
793 # If the previous option needs an argument, assign it.
794 if test -n "$ac_prev"; then
d6e01aa5 795 eval $ac_prev=\$ac_option
ba4481b5
DL
796 ac_prev=
797 continue
798 fi
799
d6e01aa5
KL
800 case $ac_option in
801 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
802 *) ac_optarg=yes ;;
803 esac
ba4481b5
DL
804
805 # Accept the important Cygnus configure options, so we can diagnose typos.
806
d6e01aa5
KL
807 case $ac_dashdash$ac_option in
808 --)
809 ac_dashdash=yes ;;
ba4481b5
DL
810
811 -bindir | --bindir | --bindi | --bind | --bin | --bi)
812 ac_prev=bindir ;;
813 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 814 bindir=$ac_optarg ;;
ba4481b5
DL
815
816 -build | --build | --buil | --bui | --bu)
503d2be0 817 ac_prev=build_alias ;;
ba4481b5 818 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 819 build_alias=$ac_optarg ;;
ba4481b5
DL
820
821 -cache-file | --cache-file | --cache-fil | --cache-fi \
822 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
823 ac_prev=cache_file ;;
824 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
825 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
826 cache_file=$ac_optarg ;;
827
828 --config-cache | -C)
829 cache_file=config.cache ;;
ba4481b5 830
d6e01aa5 831 -datadir | --datadir | --datadi | --datad)
ba4481b5 832 ac_prev=datadir ;;
d6e01aa5 833 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 834 datadir=$ac_optarg ;;
ba4481b5 835
d6e01aa5
KL
836 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
837 | --dataroo | --dataro | --datar)
838 ac_prev=datarootdir ;;
839 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
840 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
841 datarootdir=$ac_optarg ;;
842
ba4481b5 843 -disable-* | --disable-*)
503d2be0 844 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 845 # Reject names that are not valid shell variable names.
d6e01aa5 846 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
847 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
848 { (exit 1); exit 1; }; }
d6e01aa5
KL
849 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
850 eval enable_$ac_feature=no ;;
851
852 -docdir | --docdir | --docdi | --doc | --do)
853 ac_prev=docdir ;;
854 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
855 docdir=$ac_optarg ;;
856
857 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
858 ac_prev=dvidir ;;
859 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
860 dvidir=$ac_optarg ;;
ba4481b5
DL
861
862 -enable-* | --enable-*)
503d2be0 863 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 864 # Reject names that are not valid shell variable names.
d6e01aa5 865 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
866 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
867 { (exit 1); exit 1; }; }
d6e01aa5
KL
868 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
869 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
870
871 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
872 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
873 | --exec | --exe | --ex)
874 ac_prev=exec_prefix ;;
875 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
876 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
877 | --exec=* | --exe=* | --ex=*)
503d2be0 878 exec_prefix=$ac_optarg ;;
ba4481b5
DL
879
880 -gas | --gas | --ga | --g)
881 # Obsolete; use --with-gas.
882 with_gas=yes ;;
883
503d2be0
AS
884 -help | --help | --hel | --he | -h)
885 ac_init_help=long ;;
886 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
887 ac_init_help=recursive ;;
888 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
889 ac_init_help=short ;;
ba4481b5
DL
890
891 -host | --host | --hos | --ho)
503d2be0 892 ac_prev=host_alias ;;
ba4481b5 893 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 894 host_alias=$ac_optarg ;;
ba4481b5 895
d6e01aa5
KL
896 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
897 ac_prev=htmldir ;;
898 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
899 | --ht=*)
900 htmldir=$ac_optarg ;;
901
ba4481b5
DL
902 -includedir | --includedir | --includedi | --included | --include \
903 | --includ | --inclu | --incl | --inc)
904 ac_prev=includedir ;;
905 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
906 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 907 includedir=$ac_optarg ;;
ba4481b5
DL
908
909 -infodir | --infodir | --infodi | --infod | --info | --inf)
910 ac_prev=infodir ;;
911 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 912 infodir=$ac_optarg ;;
ba4481b5
DL
913
914 -libdir | --libdir | --libdi | --libd)
915 ac_prev=libdir ;;
916 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 917 libdir=$ac_optarg ;;
ba4481b5
DL
918
919 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
920 | --libexe | --libex | --libe)
921 ac_prev=libexecdir ;;
922 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
923 | --libexe=* | --libex=* | --libe=*)
503d2be0 924 libexecdir=$ac_optarg ;;
ba4481b5 925
d6e01aa5
KL
926 -localedir | --localedir | --localedi | --localed | --locale)
927 ac_prev=localedir ;;
928 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
929 localedir=$ac_optarg ;;
930
ba4481b5 931 -localstatedir | --localstatedir | --localstatedi | --localstated \
d6e01aa5 932 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
933 ac_prev=localstatedir ;;
934 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
d6e01aa5 935 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 936 localstatedir=$ac_optarg ;;
ba4481b5
DL
937
938 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
939 ac_prev=mandir ;;
940 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 941 mandir=$ac_optarg ;;
ba4481b5
DL
942
943 -nfp | --nfp | --nf)
944 # Obsolete; use --without-fp.
945 with_fp=no ;;
946
947 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 948 | --no-cr | --no-c | -n)
ba4481b5
DL
949 no_create=yes ;;
950
951 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
952 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
953 no_recursion=yes ;;
954
955 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
956 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
957 | --oldin | --oldi | --old | --ol | --o)
958 ac_prev=oldincludedir ;;
959 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
960 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
961 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 962 oldincludedir=$ac_optarg ;;
ba4481b5
DL
963
964 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
965 ac_prev=prefix ;;
966 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 967 prefix=$ac_optarg ;;
ba4481b5
DL
968
969 -program-prefix | --program-prefix | --program-prefi | --program-pref \
970 | --program-pre | --program-pr | --program-p)
971 ac_prev=program_prefix ;;
972 -program-prefix=* | --program-prefix=* | --program-prefi=* \
973 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 974 program_prefix=$ac_optarg ;;
ba4481b5
DL
975
976 -program-suffix | --program-suffix | --program-suffi | --program-suff \
977 | --program-suf | --program-su | --program-s)
978 ac_prev=program_suffix ;;
979 -program-suffix=* | --program-suffix=* | --program-suffi=* \
980 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 981 program_suffix=$ac_optarg ;;
ba4481b5
DL
982
983 -program-transform-name | --program-transform-name \
984 | --program-transform-nam | --program-transform-na \
985 | --program-transform-n | --program-transform- \
986 | --program-transform | --program-transfor \
987 | --program-transfo | --program-transf \
988 | --program-trans | --program-tran \
989 | --progr-tra | --program-tr | --program-t)
990 ac_prev=program_transform_name ;;
991 -program-transform-name=* | --program-transform-name=* \
992 | --program-transform-nam=* | --program-transform-na=* \
993 | --program-transform-n=* | --program-transform-=* \
994 | --program-transform=* | --program-transfor=* \
995 | --program-transfo=* | --program-transf=* \
996 | --program-trans=* | --program-tran=* \
997 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 998 program_transform_name=$ac_optarg ;;
ba4481b5 999
d6e01aa5
KL
1000 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1001 ac_prev=pdfdir ;;
1002 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1003 pdfdir=$ac_optarg ;;
1004
1005 -psdir | --psdir | --psdi | --psd | --ps)
1006 ac_prev=psdir ;;
1007 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1008 psdir=$ac_optarg ;;
1009
ba4481b5
DL
1010 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1011 | -silent | --silent | --silen | --sile | --sil)
1012 silent=yes ;;
1013
1014 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1015 ac_prev=sbindir ;;
1016 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1017 | --sbi=* | --sb=*)
503d2be0 1018 sbindir=$ac_optarg ;;
ba4481b5
DL
1019
1020 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1021 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1022 | --sharedst | --shareds | --shared | --share | --shar \
1023 | --sha | --sh)
1024 ac_prev=sharedstatedir ;;
1025 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1026 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1027 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1028 | --sha=* | --sh=*)
503d2be0 1029 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1030
1031 -site | --site | --sit)
1032 ac_prev=site ;;
1033 -site=* | --site=* | --sit=*)
503d2be0 1034 site=$ac_optarg ;;
ba4481b5
DL
1035
1036 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1037 ac_prev=srcdir ;;
1038 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1039 srcdir=$ac_optarg ;;
ba4481b5
DL
1040
1041 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1042 | --syscon | --sysco | --sysc | --sys | --sy)
1043 ac_prev=sysconfdir ;;
1044 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1045 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1046 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1047
1048 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1049 ac_prev=target_alias ;;
ba4481b5 1050 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1051 target_alias=$ac_optarg ;;
ba4481b5
DL
1052
1053 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1054 verbose=yes ;;
1055
503d2be0
AS
1056 -version | --version | --versio | --versi | --vers | -V)
1057 ac_init_version=: ;;
ba4481b5
DL
1058
1059 -with-* | --with-*)
503d2be0 1060 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1061 # Reject names that are not valid shell variable names.
d6e01aa5 1062 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1063 { echo "$as_me: error: invalid package name: $ac_package" >&2
1064 { (exit 1); exit 1; }; }
d6e01aa5
KL
1065 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1066 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1067
1068 -without-* | --without-*)
503d2be0 1069 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1070 # Reject names that are not valid shell variable names.
d6e01aa5 1071 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1072 { echo "$as_me: error: invalid package name: $ac_package" >&2
1073 { (exit 1); exit 1; }; }
d6e01aa5
KL
1074 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1075 eval with_$ac_package=no ;;
ba4481b5
DL
1076
1077 --x)
1078 # Obsolete; use --with-x.
1079 with_x=yes ;;
1080
1081 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1082 | --x-incl | --x-inc | --x-in | --x-i)
1083 ac_prev=x_includes ;;
1084 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1085 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1086 x_includes=$ac_optarg ;;
ba4481b5
DL
1087
1088 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1089 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1090 ac_prev=x_libraries ;;
1091 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1092 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1093 x_libraries=$ac_optarg ;;
ba4481b5 1094
503d2be0
AS
1095 -*) { echo "$as_me: error: unrecognized option: $ac_option
1096Try \`$0 --help' for more information." >&2
1097 { (exit 1); exit 1; }; }
ba4481b5
DL
1098 ;;
1099
503d2be0
AS
1100 *=*)
1101 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1102 # Reject names that are not valid shell variable names.
1103 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1104 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1105 { (exit 1); exit 1; }; }
d6e01aa5 1106 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1107 export $ac_envvar ;;
1108
ba4481b5 1109 *)
503d2be0
AS
1110 # FIXME: should be removed in autoconf 3.0.
1111 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1112 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1113 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1114 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1115 ;;
1116
1117 esac
1118done
1119
1120if test -n "$ac_prev"; then
503d2be0
AS
1121 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1122 { echo "$as_me: error: missing argument to $ac_option" >&2
1123 { (exit 1); exit 1; }; }
ba4481b5 1124fi
ba4481b5 1125
d6e01aa5
KL
1126# Be sure to have absolute directory names.
1127for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1128 datadir sysconfdir sharedstatedir localstatedir includedir \
1129 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1130 libdir localedir mandir
ba4481b5 1131do
d6e01aa5 1132 eval ac_val=\$$ac_var
503d2be0 1133 case $ac_val in
d6e01aa5
KL
1134 [\\/$]* | ?:[\\/]* ) continue;;
1135 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1136 esac
d6e01aa5
KL
1137 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1138 { (exit 1); exit 1; }; }
ba4481b5
DL
1139done
1140
503d2be0
AS
1141# There might be people who depend on the old broken behavior: `$host'
1142# used to hold the argument of --host etc.
c0d27fcc 1143# FIXME: To remove some day.
503d2be0
AS
1144build=$build_alias
1145host=$host_alias
1146target=$target_alias
1147
c0d27fcc 1148# FIXME: To remove some day.
503d2be0
AS
1149if test "x$host_alias" != x; then
1150 if test "x$build_alias" = x; then
1151 cross_compiling=maybe
1152 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1153 If a cross compiler is detected then cross compile mode will be used." >&2
1154 elif test "x$build_alias" != "x$host_alias"; then
1155 cross_compiling=yes
1156 fi
1157fi
ba4481b5 1158
503d2be0
AS
1159ac_tool_prefix=
1160test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1161
503d2be0 1162test "$silent" = yes && exec 6>/dev/null
ba4481b5 1163
c0d27fcc 1164
d6e01aa5
KL
1165ac_pwd=`pwd` && test -n "$ac_pwd" &&
1166ac_ls_di=`ls -di .` &&
1167ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1168 { echo "$as_me: error: Working directory cannot be determined" >&2
1169 { (exit 1); exit 1; }; }
1170test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1171 { echo "$as_me: error: pwd does not report name of working directory" >&2
1172 { (exit 1); exit 1; }; }
1173
1174
1175# Find the source files, if location was not specified.
1176if test -z "$srcdir"; then
1177 ac_srcdir_defaulted=yes
1178 # Try the directory containing this script, then the parent directory.
1179 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1180$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1181 X"$0" : 'X\(//\)[^/]' \| \
1182 X"$0" : 'X\(//\)$' \| \
d6e01aa5 1183 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1184echo X"$0" |
d6e01aa5
KL
1185 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1186 s//\1/
1187 q
1188 }
1189 /^X\(\/\/\)[^/].*/{
1190 s//\1/
1191 q
1192 }
1193 /^X\(\/\/\)$/{
1194 s//\1/
1195 q
1196 }
1197 /^X\(\/\).*/{
1198 s//\1/
1199 q
1200 }
1201 s/.*/./; q'`
ba4481b5 1202 srcdir=$ac_confdir
d6e01aa5 1203 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1204 srcdir=..
1205 fi
1206else
1207 ac_srcdir_defaulted=no
1208fi
d6e01aa5
KL
1209if test ! -r "$srcdir/$ac_unique_file"; then
1210 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1211 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1212 { (exit 1); exit 1; }; }
ba4481b5 1213fi
d6e01aa5
KL
1214ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1215ac_abs_confdir=`(
1216 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1217 { (exit 1); exit 1; }; }
d6e01aa5
KL
1218 pwd)`
1219# When building in place, set srcdir=.
1220if test "$ac_abs_confdir" = "$ac_pwd"; then
1221 srcdir=.
1222fi
1223# Remove unnecessary trailing slashes from srcdir.
1224# Double slashes in file names in object file debugging info
1225# mess up M-x gdb in Emacs.
1226case $srcdir in
1227*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1228esac
1229for ac_var in $ac_precious_vars; do
1230 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1231 eval ac_env_${ac_var}_value=\$${ac_var}
1232 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1233 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1234done
503d2be0
AS
1235
1236#
1237# Report the --help message.
1238#
1239if test "$ac_init_help" = "long"; then
1240 # Omit some internal or obsolete options to make the list less imposing.
1241 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1242 cat <<_ACEOF
9cf8f393 1243\`configure' configures emacs 23.0.50 to adapt to many kinds of systems.
503d2be0
AS
1244
1245Usage: $0 [OPTION]... [VAR=VALUE]...
1246
1247To assign environment variables (e.g., CC, CFLAGS...), specify them as
1248VAR=VALUE. See below for descriptions of some of the useful variables.
1249
1250Defaults for the options are specified in brackets.
1251
1252Configuration:
1253 -h, --help display this help and exit
1254 --help=short display options specific to this package
1255 --help=recursive display the short help of all the included packages
1256 -V, --version display version information and exit
1257 -q, --quiet, --silent do not print \`checking...' messages
1258 --cache-file=FILE cache test results in FILE [disabled]
1259 -C, --config-cache alias for \`--cache-file=config.cache'
1260 -n, --no-create do not create output files
1261 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1262
503d2be0
AS
1263Installation directories:
1264 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1265 [$ac_default_prefix]
503d2be0 1266 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1267 [PREFIX]
503d2be0
AS
1268
1269By default, \`make install' will install all the files in
1270\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1271an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1272for instance \`--prefix=\$HOME'.
1273
1274For better control, use the options below.
1275
1276Fine tuning of the installation directories:
1277 --bindir=DIR user executables [EPREFIX/bin]
1278 --sbindir=DIR system admin executables [EPREFIX/sbin]
1279 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1280 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1281 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1282 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1283 --libdir=DIR object code libraries [EPREFIX/lib]
1284 --includedir=DIR C header files [PREFIX/include]
1285 --oldincludedir=DIR C header files for non-gcc [/usr/include]
d6e01aa5
KL
1286 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1287 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1288 --infodir=DIR info documentation [DATAROOTDIR/info]
1289 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1290 --mandir=DIR man documentation [DATAROOTDIR/man]
9cf8f393 1291 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
d6e01aa5
KL
1292 --htmldir=DIR html documentation [DOCDIR]
1293 --dvidir=DIR dvi documentation [DOCDIR]
1294 --pdfdir=DIR pdf documentation [DOCDIR]
1295 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1296_ACEOF
503d2be0 1297
c0d27fcc 1298 cat <<\_ACEOF
503d2be0 1299
ba5da88a
PJ
1300Program names:
1301 --program-prefix=PREFIX prepend PREFIX to installed program names
1302 --program-suffix=SUFFIX append SUFFIX to installed program names
1303 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1304
503d2be0
AS
1305X features:
1306 --x-includes=DIR X include files are in DIR
1307 --x-libraries=DIR X library files are in DIR
1308
1309System types:
1310 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1311 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1312_ACEOF
503d2be0
AS
1313fi
1314
1315if test -n "$ac_init_help"; then
9cf8f393
JD
1316 case $ac_init_help in
1317 short | recursive ) echo "Configuration of emacs 23.0.50:";;
1318 esac
c0d27fcc 1319 cat <<\_ACEOF
503d2be0
AS
1320
1321Optional Features:
1322 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1323 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
709e90de 1324 --enable-carbon-app[=DIR]
6a3a24fa 1325 specify install directory for Emacs.app on Mac OS X
709e90de 1326 [DIR=/Application]
d0098f13 1327 --enable-asserts compile code with asserts enabled
709e90de
AS
1328 --enable-maintainer-mode
1329 enable make rules and dependencies not useful (and
1330 sometimes confusing) to the casual installer
9adfabc2
LK
1331 --enable-locallisppath=PATH
1332 directories Emacs should search for lisp files
1333 specific to this site
503d2be0
AS
1334 --disable-largefile omit support for large files
1335
1336Optional Packages:
1337 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1338 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1339 --without-gcc don't use GCC to compile Emacs if GCC is found
1340 --without-pop don't support POP mail retrieval with movemail
1341 --with-kerberos support Kerberos-authenticated POP
1342 --with-kerberos5 support Kerberos version 5 authenticated POP
1343 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1344 --without-sound don't compile with sound support
49adb60f
TTN
1345 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes, lucid, athena,
1346 motif, gtk, no)
503d2be0
AS
1347 --with-xpm use -lXpm for displaying XPM images
1348 --with-jpeg use -ljpeg for displaying JPEG images
1349 --with-tiff use -ltiff for displaying TIFF images
63175cd2 1350 --with-gif use -lgif (or -lungif) for displaying GIF images
503d2be0 1351 --with-png use -lpng for displaying PNG images
79011b82 1352 --with-gpm use -lgpm for mouse support on a GNU/Linux console
0cfc0546 1353 --with-rsvg use -lrsvg-2 for displaying SVG images
488dd4c4 1354 --with-gtk use GTK (same as --with-x-toolkit=gtk)
49adb60f 1355 --with-pkg-config-prog Path to pkg-config for finding GTK and librsvg
503d2be0 1356 --without-toolkit-scroll-bars
cc227489 1357 don't use Motif or Xaw3d scroll bars
c982cf7d 1358 --without-xaw3d don't use Xaw3d
cc227489 1359 --without-xim don't use X11 XIM
e0f712ba 1360 --without-carbon don't use Carbon GUI on Mac OS X
d088fbb2 1361 --with-dbus use D-Bus
503d2be0
AS
1362 --with-x use the X Window System
1363
1364Some influential environment variables:
1365 CC C compiler command
1366 CFLAGS C compiler flags
1367 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1368 nonstandard directory <lib dir>
d6e01aa5
KL
1369 LIBS libraries to pass to the linker, e.g. -l<library>
1370 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1371 you have headers in a nonstandard directory <include dir>
503d2be0 1372 CPP C preprocessor
d6e01aa5 1373 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1374
1375Use these variables to override the choices made by `configure' or to help
1376it to find libraries and programs with nonstandard names/locations.
1377
c0d27fcc 1378_ACEOF
d6e01aa5 1379ac_status=$?
503d2be0
AS
1380fi
1381
1382if test "$ac_init_help" = "recursive"; then
1383 # If there are subdirs, report their specific --help.
c0d27fcc 1384 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
d6e01aa5 1385 test -d "$ac_dir" || continue
c0d27fcc
MR
1386 ac_builddir=.
1387
d6e01aa5
KL
1388case "$ac_dir" in
1389.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1390*)
c0d27fcc 1391 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
d6e01aa5
KL
1392 # A ".." for each directory in $ac_dir_suffix.
1393 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1394 case $ac_top_builddir_sub in
1395 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1396 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1397 esac ;;
1398esac
1399ac_abs_top_builddir=$ac_pwd
1400ac_abs_builddir=$ac_pwd$ac_dir_suffix
1401# for backward compatibility:
1402ac_top_builddir=$ac_top_build_prefix
503d2be0 1403
c0d27fcc 1404case $srcdir in
d6e01aa5 1405 .) # We are building in place.
c0d27fcc 1406 ac_srcdir=.
d6e01aa5
KL
1407 ac_top_srcdir=$ac_top_builddir_sub
1408 ac_abs_top_srcdir=$ac_pwd ;;
1409 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1410 ac_srcdir=$srcdir$ac_dir_suffix;
d6e01aa5
KL
1411 ac_top_srcdir=$srcdir
1412 ac_abs_top_srcdir=$srcdir ;;
1413 *) # Relative name.
1414 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1415 ac_top_srcdir=$ac_top_build_prefix$srcdir
1416 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1417esac
d6e01aa5
KL
1418ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1419
1420 cd "$ac_dir" || { ac_status=$?; continue; }
1421 # Check for guested configure.
1422 if test -f "$ac_srcdir/configure.gnu"; then
1423 echo &&
1424 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1425 elif test -f "$ac_srcdir/configure"; then
1426 echo &&
1427 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1428 else
c0d27fcc 1429 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
d6e01aa5
KL
1430 fi || ac_status=$?
1431 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1432 done
1433fi
1434
d6e01aa5 1435test -n "$ac_init_help" && exit $ac_status
503d2be0 1436if $ac_init_version; then
c0d27fcc 1437 cat <<\_ACEOF
9cf8f393 1438emacs configure 23.0.50
d6e01aa5 1439generated by GNU Autoconf 2.61
503d2be0 1440
d6e01aa5
KL
1441Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14422002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1443This configure script is free software; the Free Software Foundation
1444gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1445_ACEOF
d6e01aa5 1446 exit
503d2be0 1447fi
d6e01aa5 1448cat >config.log <<_ACEOF
503d2be0
AS
1449This file contains any messages produced by compilers while
1450running configure, to aid debugging if configure makes a mistake.
1451
9cf8f393 1452It was created by emacs $as_me 23.0.50, which was
d6e01aa5 1453generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1454
1455 $ $0 $@
1456
c0d27fcc 1457_ACEOF
d6e01aa5 1458exec 5>>config.log
503d2be0
AS
1459{
1460cat <<_ASUNAME
c0d27fcc
MR
1461## --------- ##
1462## Platform. ##
1463## --------- ##
503d2be0
AS
1464
1465hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1466uname -m = `(uname -m) 2>/dev/null || echo unknown`
1467uname -r = `(uname -r) 2>/dev/null || echo unknown`
1468uname -s = `(uname -s) 2>/dev/null || echo unknown`
1469uname -v = `(uname -v) 2>/dev/null || echo unknown`
1470
1471/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1472/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1473
1474/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1475/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1476/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
d6e01aa5 1477/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1478/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1479/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1480/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1481
925c2f3f 1482_ASUNAME
c0d27fcc
MR
1483
1484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1485for as_dir in $PATH
1486do
1487 IFS=$as_save_IFS
1488 test -z "$as_dir" && as_dir=.
1489 echo "PATH: $as_dir"
1490done
d6e01aa5 1491IFS=$as_save_IFS
c0d27fcc 1492
503d2be0
AS
1493} >&5
1494
c0d27fcc
MR
1495cat >&5 <<_ACEOF
1496
1497
1498## ----------- ##
1499## Core tests. ##
1500## ----------- ##
1501
1502_ACEOF
503d2be0 1503
503d2be0
AS
1504
1505# Keep a trace of the command line.
1506# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1507# Strip out --silent because we don't want to record it for future runs.
503d2be0 1508# Also quote any args containing shell meta-characters.
19650fd6 1509# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1510ac_configure_args=
19650fd6
AS
1511ac_configure_args0=
1512ac_configure_args1=
19650fd6
AS
1513ac_must_keep_next=false
1514for ac_pass in 1 2
503d2be0 1515do
19650fd6
AS
1516 for ac_arg
1517 do
1518 case $ac_arg in
1519 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1520 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1521 | -silent | --silent | --silen | --sile | --sil)
1522 continue ;;
d6e01aa5 1523 *\'*)
19650fd6
AS
1524 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1525 esac
1526 case $ac_pass in
1527 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1528 2)
1529 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1530 if test $ac_must_keep_next = true; then
edfaf76d 1531 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1532 else
edfaf76d
LK
1533 case $ac_arg in
1534 *=* | --config-cache | -C | -disable-* | --disable-* \
1535 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1536 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1537 | -with-* | --with-* | -without-* | --without-* | --x)
1538 case "$ac_configure_args0 " in
1539 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1540 esac
1541 ;;
1542 -* ) ac_must_keep_next=true ;;
1543 esac
19650fd6 1544 fi
d6e01aa5 1545 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1546 ;;
1547 esac
1548 done
503d2be0 1549done
19650fd6
AS
1550$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1551$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1552
1553# When interrupted or exit'd, cleanup temporary files, and complete
1554# config.log. We remove comments because anyway the quotes in there
1555# would cause problems or look ugly.
d6e01aa5
KL
1556# WARNING: Use '\'' to represent an apostrophe within the trap.
1557# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1558trap 'exit_status=$?
1559 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1560 {
1561 echo
6bae0ccf 1562
c0d27fcc
MR
1563 cat <<\_ASBOX
1564## ---------------- ##
1565## Cache variables. ##
1566## ---------------- ##
1567_ASBOX
1568 echo
1569 # The following way of writing the cache mishandles newlines in values,
d6e01aa5
KL
1570(
1571 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1572 eval ac_val=\$$ac_var
1573 case $ac_val in #(
1574 *${as_nl}*)
1575 case $ac_var in #(
1576 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1577echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1578 esac
1579 case $ac_var in #(
1580 _ | IFS | as_nl) ;; #(
1581 *) $as_unset $ac_var ;;
1582 esac ;;
1583 esac
1584 done
503d2be0 1585 (set) 2>&1 |
d6e01aa5
KL
1586 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1587 *${as_nl}ac_space=\ *)
503d2be0 1588 sed -n \
d6e01aa5
KL
1589 "s/'\''/'\''\\\\'\'''\''/g;
1590 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1591 ;; #(
503d2be0 1592 *)
d6e01aa5 1593 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1594 ;;
d6e01aa5
KL
1595 esac |
1596 sort
1597)
c0d27fcc 1598 echo
6bae0ccf
DL
1599
1600 cat <<\_ASBOX
1601## ----------------- ##
1602## Output variables. ##
1603## ----------------- ##
1604_ASBOX
1605 echo
1606 for ac_var in $ac_subst_vars
1607 do
d6e01aa5
KL
1608 eval ac_val=\$$ac_var
1609 case $ac_val in
1610 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1611 esac
1612 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1613 done | sort
1614 echo
1615
1616 if test -n "$ac_subst_files"; then
1617 cat <<\_ASBOX
d6e01aa5
KL
1618## ------------------- ##
1619## File substitutions. ##
1620## ------------------- ##
6bae0ccf
DL
1621_ASBOX
1622 echo
1623 for ac_var in $ac_subst_files
1624 do
d6e01aa5
KL
1625 eval ac_val=\$$ac_var
1626 case $ac_val in
1627 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1628 esac
1629 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1630 done | sort
1631 echo
1632 fi
1633
c0d27fcc
MR
1634 if test -s confdefs.h; then
1635 cat <<\_ASBOX
1636## ----------- ##
1637## confdefs.h. ##
1638## ----------- ##
1639_ASBOX
1640 echo
d6e01aa5 1641 cat confdefs.h
c0d27fcc
MR
1642 echo
1643 fi
1644 test "$ac_signal" != 0 &&
1645 echo "$as_me: caught signal $ac_signal"
1646 echo "$as_me: exit $exit_status"
1647 } >&5
d6e01aa5
KL
1648 rm -f core *.core core.conftest.* &&
1649 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1650 exit $exit_status
d6e01aa5 1651' 0
503d2be0
AS
1652for ac_signal in 1 2 13 15; do
1653 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1654done
1655ac_signal=0
1656
1657# confdefs.h avoids OS command line length limits that DEFS can exceed.
d6e01aa5 1658rm -f -r conftest* confdefs.h
ba4481b5 1659
c0d27fcc
MR
1660# Predefined preprocessor variables.
1661
1662cat >>confdefs.h <<_ACEOF
1663#define PACKAGE_NAME "$PACKAGE_NAME"
1664_ACEOF
1665
1666
1667cat >>confdefs.h <<_ACEOF
1668#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1669_ACEOF
1670
1671
1672cat >>confdefs.h <<_ACEOF
1673#define PACKAGE_VERSION "$PACKAGE_VERSION"
1674_ACEOF
1675
1676
1677cat >>confdefs.h <<_ACEOF
1678#define PACKAGE_STRING "$PACKAGE_STRING"
1679_ACEOF
1680
1681
1682cat >>confdefs.h <<_ACEOF
1683#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1684_ACEOF
1685
1686
503d2be0 1687# Let the site file select an alternate cache file if it wants to.
ba4481b5 1688# Prefer explicitly selected file to automatically selected ones.
d6e01aa5
KL
1689if test -n "$CONFIG_SITE"; then
1690 set x "$CONFIG_SITE"
1691elif test "x$prefix" != xNONE; then
1692 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1693else
1694 set x "$ac_default_prefix/share/config.site" \
1695 "$ac_default_prefix/etc/config.site"
ba4481b5 1696fi
d6e01aa5
KL
1697shift
1698for ac_site_file
1699do
ba4481b5 1700 if test -r "$ac_site_file"; then
c0d27fcc 1701 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1702echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1703 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1704 . "$ac_site_file"
1705 fi
1706done
1707
1708if test -r "$cache_file"; then
503d2be0
AS
1709 # Some versions of bash will fail to source /dev/null (special
1710 # files actually), so we avoid doing that.
1711 if test -f "$cache_file"; then
c0d27fcc 1712 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1713echo "$as_me: loading cache $cache_file" >&6;}
1714 case $cache_file in
d6e01aa5
KL
1715 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1716 *) . "./$cache_file";;
503d2be0
AS
1717 esac
1718 fi
ba4481b5 1719else
c0d27fcc 1720 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1721echo "$as_me: creating cache $cache_file" >&6;}
1722 >$cache_file
1723fi
1724
d6e01aa5
KL
1725ac_header_list="$ac_header_list sys/time.h"
1726ac_header_list="$ac_header_list unistd.h"
1727ac_func_list="$ac_func_list alarm"
503d2be0
AS
1728# Check that the precious variables saved in the cache have kept the same
1729# value.
1730ac_cache_corrupted=false
d6e01aa5 1731for ac_var in $ac_precious_vars; do
503d2be0
AS
1732 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1733 eval ac_new_set=\$ac_env_${ac_var}_set
d6e01aa5
KL
1734 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1735 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1736 case $ac_old_set,$ac_new_set in
1737 set,)
c0d27fcc 1738 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1739echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1740 ac_cache_corrupted=: ;;
1741 ,set)
c0d27fcc 1742 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1743echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1744 ac_cache_corrupted=: ;;
1745 ,);;
1746 *)
1747 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1748 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1749echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1750 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1751echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1752 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1753echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1754 ac_cache_corrupted=:
503d2be0
AS
1755 fi;;
1756 esac
c0d27fcc 1757 # Pass precious variables to config.status.
503d2be0
AS
1758 if test "$ac_new_set" = set; then
1759 case $ac_new_val in
d6e01aa5 1760 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1761 *) ac_arg=$ac_var=$ac_new_val ;;
1762 esac
1763 case " $ac_configure_args " in
1764 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1765 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1766 esac
1767 fi
1768done
1769if $ac_cache_corrupted; then
c0d27fcc 1770 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1771echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1772 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1773echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1774 { (exit 1); exit 1; }; }
ba4481b5
DL
1775fi
1776
c0d27fcc
MR
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
9cf8f393
JD
1788
1789
1790
1791
1792
1793
1794
1795
c0d27fcc
MR
1796
1797
1798
1799
1800
d6e01aa5
KL
1801ac_ext=c
1802ac_cpp='$CPP $CPPFLAGS'
1803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1805ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 1806
6bae0ccf 1807
d6e01aa5 1808ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1809
c0d27fcc 1810
9fb1ba80 1811
ba5da88a 1812test "$program_prefix" != NONE &&
d6e01aa5 1813 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1814# Use a double $ so make ignores it.
1815test "$program_suffix" != NONE &&
d6e01aa5 1816 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1817# Double any \ or $. echo might interpret backslashes.
1818# By default was `s,x,x', remove it if useless.
1819cat <<\_ACEOF >conftest.sed
1820s/[\\$]/&&/g;s/;s,x,x,$//
1821_ACEOF
1822program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
d6e01aa5 1823rm -f conftest.sed
ba5da88a 1824
c0d27fcc 1825
ba4481b5
DL
1826lispdir='${datadir}/emacs/${version}/lisp'
1827locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1828'${datadir}/emacs/site-lisp'
1829lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1830etcdir='${datadir}/emacs/${version}/etc'
1831archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1832docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1833gamedir='${localstatedir}/games/emacs'
98418dba
CW
1834
1835gameuser=games
1836
c0d27fcc 1837
49adb60f 1838
d6e01aa5 1839# Check whether --with-gcc was given.
ba4481b5 1840if test "${with_gcc+set}" = set; then
d6e01aa5
KL
1841 withval=$with_gcc;
1842fi
503d2be0 1843
ba4481b5 1844
49adb60f 1845
d6e01aa5 1846# Check whether --with-pop was given.
ba4481b5 1847if test "${with_pop+set}" = set; then
d6e01aa5 1848 withval=$with_pop; if test "$withval" = yes; then
c0d27fcc 1849 cat >>confdefs.h <<\_ACEOF
ba4481b5 1850#define MAIL_USE_POP 1
c0d27fcc 1851_ACEOF
ba4481b5 1852
243cf185
DL
1853else :
1854fi
3d9fec71 1855else
c0d27fcc 1856 cat >>confdefs.h <<\_ACEOF
3d9fec71 1857#define MAIL_USE_POP 1
c0d27fcc 1858_ACEOF
3d9fec71 1859
d6e01aa5 1860fi
ba4481b5 1861
c0d27fcc 1862
d6e01aa5 1863
49adb60f 1864
d6e01aa5 1865# Check whether --with-kerberos was given.
a21616bd 1866if test "${with_kerberos+set}" = set; then
54e6585f
CY
1867 withval=$with_kerberos; if test "$withval" = yes; then
1868 cat >>confdefs.h <<\_ACEOF
a21616bd 1869#define KERBEROS 1
c0d27fcc 1870_ACEOF
a21616bd 1871
d6e01aa5 1872fi
54e6585f 1873fi
a21616bd 1874
c0d27fcc 1875
d6e01aa5 1876
49adb60f 1877
d6e01aa5 1878# Check whether --with-kerberos5 was given.
a21616bd 1879if test "${with_kerberos5+set}" = set; then
d6e01aa5 1880 withval=$with_kerberos5; if test "${with_kerberos5+set}" = set; then
a21616bd
KR
1881 if test "${with_kerberos+set}" != set; then
1882 with_kerberos=yes
c0d27fcc 1883 cat >>confdefs.h <<\_ACEOF
a21616bd 1884#define KERBEROS 1
c0d27fcc 1885_ACEOF
a21616bd
KR
1886
1887 fi
b936fae4 1888
c0d27fcc 1889cat >>confdefs.h <<\_ACEOF
a21616bd 1890#define KERBEROS5 1
c0d27fcc 1891_ACEOF
a21616bd 1892
d6e01aa5 1893fi
54e6585f 1894fi
a21616bd 1895
b936fae4 1896
49adb60f 1897
d6e01aa5
KL
1898# Check whether --with-hesiod was given.
1899if test "${with_hesiod+set}" = set; then
54e6585f
CY
1900 withval=$with_hesiod; if test "$withval" = yes; then
1901
c0d27fcc 1902cat >>confdefs.h <<\_ACEOF
ba4481b5 1903#define HESIOD 1
c0d27fcc 1904_ACEOF
ba4481b5 1905
d6e01aa5 1906fi
54e6585f 1907fi
ba4481b5 1908
c0d27fcc 1909
d6e01aa5
KL
1910
1911# Check whether --with-sound was given.
2c9dccc9 1912if test "${with_sound+set}" = set; then
d6e01aa5
KL
1913 withval=$with_sound;
1914fi
2c9dccc9 1915
2c9dccc9 1916
c0d27fcc 1917
d6e01aa5 1918# Check whether --with-x-toolkit was given.
ba4481b5 1919if test "${with_x_toolkit+set}" = set; then
d6e01aa5 1920 withval=$with_x_toolkit; case "${withval}" in
089a966d 1921 y | ye | yes ) val=gtk ;;
ba4481b5
DL
1922 n | no ) val=no ;;
1923 l | lu | luc | luci | lucid ) val=lucid ;;
1924 a | at | ath | athe | athen | athena ) val=athena ;;
1925 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1926 g | gt | gtk ) val=gtk ;;
ba4481b5 1927 * )
29d69661 1928{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1929this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661
JD
1930\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
1931echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1932this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1933\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
503d2be0 1934 { (exit 1); exit 1; }; }
ba4481b5
DL
1935 ;;
1936 esac
1937 with_x_toolkit=$val
1938
d6e01aa5
KL
1939fi
1940
ba4481b5 1941
49adb60f 1942
d6e01aa5 1943# Check whether --with-xpm was given.
ba4481b5 1944if test "${with_xpm+set}" = set; then
d6e01aa5
KL
1945 withval=$with_xpm;
1946fi
503d2be0 1947
ba4481b5 1948
d6e01aa5 1949# Check whether --with-jpeg was given.
ba4481b5 1950if test "${with_jpeg+set}" = set; then
d6e01aa5
KL
1951 withval=$with_jpeg;
1952fi
503d2be0 1953
ba4481b5 1954
d6e01aa5 1955# Check whether --with-tiff was given.
ba4481b5 1956if test "${with_tiff+set}" = set; then
d6e01aa5
KL
1957 withval=$with_tiff;
1958fi
503d2be0 1959
ba4481b5 1960
d6e01aa5 1961# Check whether --with-gif was given.
ba4481b5 1962if test "${with_gif+set}" = set; then
d6e01aa5
KL
1963 withval=$with_gif;
1964fi
503d2be0 1965
ba4481b5 1966
d6e01aa5 1967# Check whether --with-png was given.
ba4481b5 1968if test "${with_png+set}" = set; then
d6e01aa5
KL
1969 withval=$with_png;
1970fi
503d2be0 1971
ba4481b5 1972
79011b82
NR
1973# Check whether --with-gpm was given.
1974if test "${with_gpm+set}" = set; then
1975 withval=$with_gpm;
1976fi
1977
1978
0cfc0546
GM
1979# Check whether --with-rsvg was given.
1980if test "${with_rsvg+set}" = set; then
1981 withval=$with_rsvg;
1982fi
1983
1984
d6e01aa5 1985# Check whether --with-gtk was given.
488dd4c4 1986if test "${with_gtk+set}" = set; then
d6e01aa5
KL
1987 withval=$with_gtk;
1988fi
488dd4c4 1989
488dd4c4 1990
d6e01aa5 1991# Check whether --with-pkg-config-prog was given.
488dd4c4 1992if test "${with_pkg_config_prog+set}" = set; then
d6e01aa5
KL
1993 withval=$with_pkg_config_prog;
1994fi
488dd4c4 1995
488dd4c4 1996
d6e01aa5 1997# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 1998if test "${with_toolkit_scroll_bars+set}" = set; then
d6e01aa5
KL
1999 withval=$with_toolkit_scroll_bars;
2000fi
503d2be0 2001
ba4481b5 2002
e35a28cd
TTN
2003# Check whether --with-xaw3d was given.
2004if test "${with_xaw3d+set}" = set; then
2005 withval=$with_xaw3d;
c982cf7d
JD
2006fi
2007
2008
d6e01aa5 2009# Check whether --with-xim was given.
1d36487c 2010if test "${with_xim+set}" = set; then
d6e01aa5
KL
2011 withval=$with_xim;
2012fi
1d36487c 2013
ba4481b5 2014
d6e01aa5 2015# Check whether --with-carbon was given.
e0f712ba 2016if test "${with_carbon+set}" = set; then
d6e01aa5
KL
2017 withval=$with_carbon;
2018fi
e0f712ba 2019
49adb60f 2020
131e4133
MA
2021# Check whether --with-dbus was given.
2022if test "${with_dbus+set}" = set; then
2023 withval=$with_dbus;
2024fi
2025
2026
d6e01aa5 2027# Check whether --enable-carbon-app was given.
6a3a24fa 2028if test "${enable_carbon_app+set}" = set; then
d6e01aa5
KL
2029 enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
2030fi
e0f712ba 2031
d6e01aa5
KL
2032
2033# Check whether --enable-asserts was given.
d0098f13 2034if test "${enable_asserts+set}" = set; then
d6e01aa5 2035 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
2036else
2037 USE_XASSERTS=no
d6e01aa5
KL
2038fi
2039
d0098f13 2040
d6e01aa5 2041# Check whether --enable-maintainer-mode was given.
19650fd6 2042if test "${enable_maintainer_mode+set}" = set; then
d6e01aa5 2043 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
2044else
2045 USE_MAINTAINER_MODE=no
d6e01aa5
KL
2046fi
2047
19650fd6
AS
2048if test $USE_MAINTAINER_MODE = yes; then
2049 MAINT=
2050else
2051 MAINT=#
2052fi
2053
2054
d6e01aa5 2055# Check whether --enable-locallisppath was given.
9adfabc2 2056if test "${enable_locallisppath+set}" = set; then
d6e01aa5 2057 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2058 locallisppath=
2059elif test "${enableval}" != "yes"; then
2060 locallisppath=${enableval}
2061fi
d6e01aa5
KL
2062fi
2063
9adfabc2 2064
ba4481b5 2065#### Make srcdir absolute, if it isn't already. It's important to
17494071 2066#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2067#### give you automounter prefixes, which can go away. We do all this
2068#### so Emacs can find its files when run uninstalled.
17494071
GM
2069## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2070unset CDPATH
ba4481b5
DL
2071case "${srcdir}" in
2072 /* ) ;;
2073 . )
2074 ## We may be able to use the $PWD environment variable to make this
2075 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2076 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2077 ## but that tested only for a well-formed and valid PWD,
2078 ## it did not object when PWD was well-formed and valid but just wrong.
2079 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2080 then
2081 srcdir="$PWD"
2082 else
2083 srcdir="`(cd ${srcdir}; pwd)`"
2084 fi
2085 ;;
2086 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2087esac
2088
2089#### Check if the source directory already has a configured system in it.
2090if test `pwd` != `(cd ${srcdir} && pwd)` \
2091 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2092 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2093 as a build directory right now; it has been configured in its own
2094 right. To configure in another directory as well, you MUST
2095 use GNU make. If you do not have GNU make, then you must
2096 now do \`make distclean' in ${srcdir},
2097 and then run $0 again." >&5
2098echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2099 as a build directory right now; it has been configured in its own
2100 right. To configure in another directory as well, you MUST
2101 use GNU make. If you do not have GNU make, then you must
2102 now do \`make distclean' in ${srcdir},
503d2be0 2103 and then run $0 again." >&2;}
ba4481b5
DL
2104fi
2105
2106#### Given the configuration name, set machfile and opsysfile to the
2107#### names of the m/*.h and s/*.h files we should use.
2108
2109### Canonicalize the configuration name.
2110
2111ac_aux_dir=
d6e01aa5
KL
2112for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2113 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2114 ac_aux_dir=$ac_dir
2115 ac_install_sh="$ac_aux_dir/install-sh -c"
2116 break
d6e01aa5 2117 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2118 ac_aux_dir=$ac_dir
2119 ac_install_sh="$ac_aux_dir/install.sh -c"
2120 break
d6e01aa5 2121 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2122 ac_aux_dir=$ac_dir
2123 ac_install_sh="$ac_aux_dir/shtool install -c"
2124 break
ba4481b5
DL
2125 fi
2126done
2127if test -z "$ac_aux_dir"; then
d6e01aa5
KL
2128 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2129echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2130 { (exit 1); exit 1; }; }
ba4481b5 2131fi
d6e01aa5
KL
2132
2133# These three variables are undocumented and unsupported,
2134# and are intended to be withdrawn in a future Autoconf release.
2135# They can cause serious problems if a builder's source tree is in a directory
2136# whose full name contains unusual characters.
2137ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2138ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2139ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2140
ba4481b5
DL
2141
2142# Make sure we can run config.sub.
d6e01aa5
KL
2143$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2144 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2145echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2146 { (exit 1); exit 1; }; }
2147
d6e01aa5
KL
2148{ echo "$as_me:$LINENO: checking build system type" >&5
2149echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2150if test "${ac_cv_build+set}" = set; then
2151 echo $ECHO_N "(cached) $ECHO_C" >&6
2152else
d6e01aa5
KL
2153 ac_build_alias=$build_alias
2154test "x$ac_build_alias" = x &&
2155 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2156test "x$ac_build_alias" = x &&
c0d27fcc 2157 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2158echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2159 { (exit 1); exit 1; }; }
d6e01aa5
KL
2160ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2161 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2162echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2163 { (exit 1); exit 1; }; }
2164
2165fi
d6e01aa5
KL
2166{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2167echo "${ECHO_T}$ac_cv_build" >&6; }
2168case $ac_cv_build in
2169*-*-*) ;;
2170*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2171echo "$as_me: error: invalid value of canonical build" >&2;}
2172 { (exit 1); exit 1; }; };;
2173esac
503d2be0 2174build=$ac_cv_build
d6e01aa5
KL
2175ac_save_IFS=$IFS; IFS='-'
2176set x $ac_cv_build
2177shift
2178build_cpu=$1
2179build_vendor=$2
2180shift; shift
2181# Remember, the first character of IFS is used to create $*,
2182# except with old shells:
2183build_os=$*
2184IFS=$ac_save_IFS
2185case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2186
2187
2188{ echo "$as_me:$LINENO: checking host system type" >&5
2189echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2190if test "${ac_cv_host+set}" = set; then
2191 echo $ECHO_N "(cached) $ECHO_C" >&6
2192else
d6e01aa5
KL
2193 if test "x$host_alias" = x; then
2194 ac_cv_host=$ac_cv_build
2195else
2196 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2197 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2198echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2199 { (exit 1); exit 1; }; }
d6e01aa5 2200fi
503d2be0
AS
2201
2202fi
d6e01aa5
KL
2203{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2204echo "${ECHO_T}$ac_cv_host" >&6; }
2205case $ac_cv_host in
2206*-*-*) ;;
2207*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2208echo "$as_me: error: invalid value of canonical host" >&2;}
2209 { (exit 1); exit 1; }; };;
2210esac
503d2be0 2211host=$ac_cv_host
d6e01aa5
KL
2212ac_save_IFS=$IFS; IFS='-'
2213set x $ac_cv_host
2214shift
2215host_cpu=$1
2216host_vendor=$2
2217shift; shift
2218# Remember, the first character of IFS is used to create $*,
2219# except with old shells:
2220host_os=$*
2221IFS=$ac_save_IFS
2222case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2223
c0d27fcc 2224
ba4481b5 2225canonical=$host
1770dcdc 2226configuration=${host_alias-${build_alias-$host}}
ba4481b5 2227
c0d27fcc 2228
22044edf 2229
ba4481b5
DL
2230### If you add support for a new configuration, add code to this
2231### switch statement to recognize your configuration name and select
2232### the appropriate operating system and machine description files.
2233
2234### You would hope that you could choose an m/*.h file pretty much
2235### based on the machine portion of the configuration name, and an s-
2236### file based on the operating system portion. However, it turns out
2237### that each m/*.h file is pretty manufacturer-specific - for
55e6d9b2
AS
2238### example hp9000s300.h is a 68000 machine;
2239### mips.h, pmax.h are all MIPS
ba4481b5
DL
2240### machines. So we basically have to have a special case for each
2241### configuration name.
2242###
2243### As far as handling version numbers on operating systems is
2244### concerned, make sure things will fail in a fixable way. If
2245### /etc/MACHINES doesn't say anything about version numbers, be
2246### prepared to handle anything reasonably. If version numbers
2247### matter, be sure /etc/MACHINES says something about it.
2248###
2249### Eric Raymond says we should accept strings like "sysvr4" to mean
2250### "System V Release 4"; he writes, "The old convention encouraged
2251### confusion between `system' and `release' levels'."
2252
2253machine='' opsys='' unported=no
2254case "${canonical}" in
2255
1096bcc0
GM
2256 ## FreeBSD ports
2257 *-*-freebsd* )
2258 opsys=freebsd
2259 case "${canonical}" in
2260 alpha*-*-freebsd*) machine=alpha ;;
ec8fcb10
YM
2261 ia64-*-freebsd*) machine=ia64 ;;
2262 sparc64-*-freebsd*) machine=sparc ;;
2263 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2264 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 2265 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2266 esac
2267 ;;
2268
1b275743
GM
2269 ## FreeBSD kernel + glibc based userland
2270 *-*-kfreebsd*gnu* )
2271 opsys=gnu-kfreebsd
2272 case "${canonical}" in
2273 alpha*-*-kfreebsd*) machine=alpha ;;
2274 ia64-*-kfreebsd*) machine=ia64 ;;
2275 sparc64-*-kfreebsd*) machine=sparc ;;
2276 powerpc-*-kfreebsd*) machine=macppc ;;
2277 i[3456]86-*-kfreebsd*) machine=intel386 ;;
2278 amd64-*-kfreebsd*|x86_64-*-kfreebsd*) machine=amdx86-64 ;;
2279 esac
2280 ;;
2281
ba4481b5
DL
2282 ## NetBSD ports
2283 *-*-netbsd* )
2284 opsys=netbsd
dd038e26 2285 if test -f /usr/lib/crti.o; then
f57bd967
DL
2286
2287cat >>confdefs.h <<\_ACEOF
2288#define HAVE_CRTIN
dd038e26
AS
2289_ACEOF
2290
2291 fi
2292
ba4481b5
DL
2293 case "${canonical}" in
2294 alpha*-*-netbsd*) machine=alpha ;;
2295 i[3456]86-*-netbsd*) machine=intel386 ;;
2296 m68k-*-netbsd*)
2297 # This is somewhat bogus.
2298 machine=hp9000s300 ;;
ba4481b5 2299 mips-*-netbsd*) machine=pmax ;;
2df636f4 2300 mipsel-*-netbsd*) machine=pmax ;;
97836269 2301 mipseb-*-netbsd*) machine=pmax ;;
3a64eef5 2302 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2303 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2304 vax-*-netbsd*) machine=vax ;;
2df636f4 2305 arm-*-netbsd*) machine=arm ;;
d54ee7b4 2306 x86_64-*-netbsd*) machine=amdx86-64 ;;
13aadc96 2307 hppa-*-netbsd*) machine=hp800 ;;
ba4481b5
DL
2308 esac
2309 ;;
2310
2311 ## OpenBSD ports
2312 *-*-openbsd* )
2313 opsys=openbsd
2314 case "${canonical}" in
2315 alpha*-*-openbsd*) machine=alpha ;;
85410b02
CY
2316 arm-*-openbsd*) machine=arm ;;
2317 hppa-*-openbsd*) machine=hp9000s300 ;;
2318 i386-*-openbsd*) machine=intel386 ;;
2319 m68k-*-openbsd*) machine=hp9000s300 ;;
85410b02
CY
2320 mips64-*-openbsd*) machine=mips64 ;;
2321 powerpc-*-openbsd*) machine=macppc ;;
85410b02
CY
2322 sparc*-*-openbsd*) machine=sparc ;;
2323 vax-*-openbsd*) machine=vax ;;
2324 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2325 esac
2326 ;;
2327
10a3b1a1
EZ
2328 ## LynxOS ports
2329 *-*-lynxos* )
2330 opsys=lynxos
2331 case "${canonical}" in
2332 i[3456]86-*-lynxos*) machine=intel386 ;;
2333 powerpc-*-lynxos*) machine=powerpc ;;
2334 esac
2335 ;;
2336
ba4481b5
DL
2337 ## BSDI ports
2338 *-*-bsdi* )
2339 opsys=bsdi
2340 case "${canonical}" in
2341 i[345]86-*-bsdi*) machine=intel386 ;;
2342 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 2343 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
2344 esac
2345 case "${canonical}" in
2346 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
2347 *-*-bsdi2.0* ) opsys=bsdos2 ;;
2348 *-*-bsdi2* ) opsys=bsdos2-1 ;;
2349 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 2350 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
2351 esac
2352 ;;
2353
ba4481b5
DL
2354 ## Alpha (DEC) machines.
2355 alpha*-dec-osf* )
2356 machine=alpha opsys=osf1
2357 # This is needed to find X11R6.1 libraries for certain tests.
2358 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
2359 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
2360 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
2361 # due to non-traditional preprocessing with the current compiler
2362 # defaults. OSF 4 can also have that compiler version, and there
2363 # seems always to have been a usable /usr/bin/cpp.
2364 NON_GNU_CPP=/usr/bin/cpp
ca512671 2365 case "${canonical}" in
a55b799a 2366 alpha*-dec-osf[5-9]*)
bb17930d 2367 opsys=osf5-0 ;;
ca512671 2368 esac
ba4481b5
DL
2369 ;;
2370
2371 alpha*-*-linux-gnu* )
2372 machine=alpha opsys=gnu-linux
2373 ;;
2374
c4bb2108
DL
2375 arm*-*-linux-gnu* )
2376 machine=arm opsys=gnu-linux
2377 ;;
2378
040c474e
CY
2379 ## Apple Darwin / Mac OS X
2380 *-apple-darwin* )
2381 case "${canonical}" in
2382 i[3456]86-* ) machine=intel386 ;;
2383 powerpc-* ) machine=powermac ;;
2384 * ) unported=yes ;;
2385 esac
2386 opsys=darwin
2387 # Define CPP as follows to make autoconf work correctly.
2388 CPP="${CC-cc} -E -no-cpp-precomp"
2389 # Use fink packages if available.
2390 if test -d /sw/include && test -d /sw/lib; then
2391 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2392 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2393 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2394 fi
2395 ;;
2396
df645f7c
AS
2397 ## Compaq Nonstop
2398 mips-compaq-nonstopux* )
2399 machine=nonstopux opsys=nonstopux
2400 ;;
2401
ba4481b5
DL
2402 ## Cubix QBx/386
2403 i[3456]86-cubix-sysv* )
2404 machine=intel386 opsys=usg5-3
2405 ;;
2406
ba4481b5
DL
2407 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
2408 machine=pmax opsys=bsd4-2
2409 ;;
2410 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
2411 machine=pmax opsys=bsd4-3
2412 ;;
2413 mips-dec-ultrix* )
2414 machine=pmax opsys=ultrix4-3
2415 ;;
2416 mips-dec-osf* )
2417 machine=pmax opsys=osf1
2418 ;;
2419 mips-dec-mach_bsd4.3* )
2420 machine=pmax opsys=mach-bsd4-3
2421 ;;
2422
ba4481b5
DL
2423 ## HP 9000 series 200 or 300
2424 m68*-hp-bsd* )
2425 machine=hp9000s300 opsys=bsd4-3
2426 ;;
2427 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2428 m68*-hp-hpux* )
2429 case "`uname -r`" in
2430 ## Someone's system reports A.B8.05 for this.
2431 ## I wonder what other possibilities there are.
2432 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2433 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2434 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2435 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2436 *) machine=hp9000s300 opsys=hpux ;;
2437 esac
2438 ;;
2439
6fbb6db1
GM
2440 ## HP 9000 series 700 and 800, running HP/UX
2441 hppa*-hp-hpux7* )
2442 machine=hp800 opsys=hpux
2443 ;;
2444 hppa*-hp-hpux8* )
2445 machine=hp800 opsys=hpux8
2446 ;;
2447 hppa*-hp-hpux9shr* )
2448 machine=hp800 opsys=hpux9shr
2449 ;;
2450 hppa*-hp-hpux9* )
2451 machine=hp800 opsys=hpux9
2452 ;;
2453 hppa*-hp-hpux10.2* )
2454 machine=hp800 opsys=hpux10-20
2455 ;;
2456 hppa*-hp-hpux10* )
2457 machine=hp800 opsys=hpux10
2458 ;;
2459 hppa*-hp-hpux1[1-9]* )
2460 machine=hp800 opsys=hpux11
2461 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2462 ;;
2463
13aadc96
CY
2464 hppa*-*-linux-gnu* )
2465 machine=hp800 opsys=gnu-linux
2466 ;;
2467
6fbb6db1
GM
2468 ## HP 9000 series 700 and 800, running HP/UX
2469 hppa*-hp-hpux* )
2470 ## Cross-compilation? Nah!
2471 case "`uname -r`" in
2472 ## Someone's system reports A.B8.05 for this.
2473 ## I wonder what other possibilities there are.
2474 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2475 *.08.* ) machine=hp800 opsys=hpux8 ;;
2476 *.09.* ) machine=hp800 opsys=hpux9 ;;
2477 *) machine=hp800 opsys=hpux10 ;;
2478 esac
2479 ;;
13aadc96
CY
2480 hppa*-*-nextstep* )
2481 machine=hp800 opsys=nextstep
2482 ;;
2483
ba4481b5 2484 ## IBM machines
ba4481b5
DL
2485 i370-ibm-aix*)
2486 machine=ibm370aix opsys=usg5-3
2487 ;;
55597d70 2488 s390-*-linux-gnu* )
138f0859
GM
2489 machine=ibms390 opsys=gnu-linux
2490 ;;
bcdb1378
EZ
2491 s390x-*-linux-gnu* )
2492 machine=ibms390x opsys=gnu-linux
2493 ;;
ba4481b5
DL
2494 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2495 machine=ibmrs6000 opsys=aix3-1
2496 ;;
2497 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2498 machine=ibmrs6000 opsys=aix3-2-5
2499 ;;
2500 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2501 machine=ibmrs6000 opsys=aix4-1
2502 ;;
2503 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2504 machine=ibmrs6000 opsys=aix4-2
2505 ;;
67bf991b
CY
2506 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2507 machine=ibmrs6000 opsys=aix4-2
2508 ;;
55597d70 2509 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2510 machine=ibmrs6000 opsys=aix4-2
2511 ;;
ba4481b5
DL
2512 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2513 machine=ibmrs6000 opsys=aix4
2514 ;;
2515 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2516 machine=ibmrs6000 opsys=aix4-1
2517 ;;
2518 rs6000-ibm-aix* | powerpc-ibm-aix* )
2519 machine=ibmrs6000 opsys=aix3-2
2520 ;;
ba4481b5
DL
2521
2522 ## Prime EXL
2523 i[3456]86-prime-sysv* )
2524 machine=i386 opsys=usg5-3
2525 ;;
2526
ba4481b5
DL
2527 ## ncr machine running svr4.3.
2528 i[3456]86-ncr-sysv4.3 )
2529 machine=ncr386 opsys=usg5-4-3
2530 ;;
2531
2532 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2533 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2534 i[3456]86-ncr-sysv* )
2535 machine=ncr386 opsys=usg5-4-2
2536 ;;
2537
c76e04a8
GM
2538 ## Macintosh PowerPC
2539 powerpc*-*-linux-gnu* )
2540 machine=macppc opsys=gnu-linux
2541 ;;
2542
ba4481b5
DL
2543 ## Workstations sold by MIPS
2544 ## This is not necessarily all workstations using the MIPS processor -
2545 ## Irises are produced by SGI, and DECstations by DEC.
2546
2547 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2548 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2549 ## it gives for choosing between the alternatives seems to be "Use
2550 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2551 ## the BSD world." I'll assume that these are instructions for
2552 ## handling two odd situations, and that every other situation
2553 ## should use mips.h and usg5-2-2, they being listed first.
2554 mips-mips-usg* )
2555 machine=mips4
2556 ## Fall through to the general code at the bottom to decide on the OS.
2557 ;;
2558 mips-mips-riscos4* )
2559 machine=mips4 opsys=bsd4-3
2560 NON_GNU_CC="cc -systype bsd43"
2561 NON_GNU_CPP="cc -systype bsd43 -E"
2562 ;;
2563 mips-mips-riscos5* )
2564 machine=mips4 opsys=riscos5
2565 NON_GNU_CC="cc -systype bsd43"
2566 NON_GNU_CPP="cc -systype bsd43 -E"
2567 ;;
2568 mips-mips-bsd* )
2569 machine=mips opsys=bsd4-3
2570 ;;
2571 mips-mips-* )
2572 machine=mips opsys=usg5-2-2
2573 ;;
2574
2575 ## NeXT
2576 m68*-next-* | m68k-*-nextstep* )
2577 machine=m68k opsys=nextstep
2578 ;;
2579
ba4481b5
DL
2580 ## NEC EWS4800
2581 mips-nec-sysv4*)
2582 machine=ews4800 opsys=ux4800
2583 ;;
2584
ba4481b5
DL
2585 ## Siemens Nixdorf
2586 mips-siemens-sysv* | mips-sni-sysv*)
2587 machine=mips-siemens opsys=usg5-4
2588 NON_GNU_CC=/usr/ccs/bin/cc
2589 NON_GNU_CPP=/usr/ccs/lib/cpp
2590 ;;
2591
2592 ## Silicon Graphics machines
ba4481b5 2593 ## Iris 4D
ba4481b5
DL
2594 mips-sgi-irix6.5 )
2595 machine=iris4d opsys=irix6-5
946173ad
DL
2596 # Without defining _LANGUAGE_C, things get masked out in the headers
2597 # so that, for instance, grepping for `free' in stdlib.h fails and
2598 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2599 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2600 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2601 ;;
2602 mips-sgi-irix6* )
2603 machine=iris4d opsys=irix6-0
c4bb2108 2604 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2605 # but presumably it does no harm.
2606 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2607 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2608 NON_GCC_TEST_OPTIONS=-32
2609 ;;
2610 mips-sgi-irix5.[01]* )
2611 machine=iris4d opsys=irix5-0
2612 ;;
2613 mips-sgi-irix5* | mips-sgi-irix* )
2614 machine=iris4d opsys=irix5-2
2615 ;;
2616
ba4481b5
DL
2617 ## Suns
2618 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2619 machine=sparc opsys=gnu-linux
2620 ;;
2621
d054101f 2622 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2623 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2624 | rs6000-*-solaris2*)
2625 case "${canonical}" in
ba4481b5 2626 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2627 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2628 powerpcle* ) machine=powerpcle ;;
2629 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2630 sparc* ) machine=sparc ;;
2631 * ) unported=yes ;;
2632 esac
2633 case "${canonical}" in
ba4481b5
DL
2634 *-sunos5.3* | *-solaris2.3* )
2635 opsys=sol2-3
2636 NON_GNU_CPP=/usr/ccs/lib/cpp
2637 ;;
2638 *-sunos5.4* | *-solaris2.4* )
2639 opsys=sol2-4
2640 NON_GNU_CPP=/usr/ccs/lib/cpp
2641 RANLIB="ar -ts"
2642 ;;
2643 *-sunos5.5* | *-solaris2.5* )
2644 opsys=sol2-5
2645 NON_GNU_CPP=/usr/ccs/lib/cpp
2646 RANLIB="ar -ts"
2647 ;;
8e967cf7
MR
2648 *-sunos5.6* | *-solaris2.6* )
2649 opsys=sol2-6
2650 NON_GNU_CPP=/usr/ccs/lib/cpp
2651 RANLIB="ar -ts"
2652 ;;
ba4481b5 2653 *-sunos5* | *-solaris* )
9e71690e 2654 opsys=sol2-6
089a966d
GM
2655 emacs_check_sunpro_c=yes
2656 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5
DL
2657 ;;
2658 * ) opsys=bsd4-2 ;;
2659 esac
2660 ## Watch out for a compiler that we know will not work.
2661 case "${canonical}" in
2662 *-solaris* | *-sunos5* )
2663 if [ "x$CC" = x/usr/ucb/cc ]; then
2664 ## /usr/ucb/cc doesn't work;
2665 ## we should find some other compiler that does work.
2666 unset CC
2667 fi
2668 ;;
2669 *) ;;
2670 esac
2671 ;;
2672 sparc-*-nextstep* )
2673 machine=sparc opsys=nextstep
2674 ;;
2675
ba4481b5
DL
2676 ## Tandem Integrity S2
2677 mips-tandem-sysv* )
2678 machine=tandem-s2 opsys=usg5-3
2679 ;;
2680
ba4481b5
DL
2681 ## Vaxen.
2682 vax-dec-* )
2683 machine=vax
2684 case "${canonical}" in
2685 *-bsd4.1* ) opsys=bsd4-1 ;;
2686 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2687 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2688 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2689 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2690 *-vms* ) opsys=vms ;;
2691 * ) unported=yes
2692 esac
2693 ;;
2694
f4988be7
GM
2695 ## IA-64
2696 ia64*-*-linux* )
2697 machine=ia64 opsys=gnu-linux
2698 ;;
2699
ba4481b5
DL
2700 ## Intel 386 machines where we don't care about the manufacturer
2701 i[3456]86-*-* )
2702 machine=intel386
2703 case "${canonical}" in
c60ee5e7 2704 *-cygwin ) opsys=cygwin ;;
eae54018 2705 *-darwin* ) opsys=darwin
23fd4483
ST
2706 CPP="${CC-cc} -E -no-cpp-precomp"
2707 ;;
ba4481b5
DL
2708 *-xenix* ) opsys=xenix ;;
2709 *-linux-gnu* ) opsys=gnu-linux ;;
ba4481b5 2710 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2711 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2712 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 2713 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2714 *-nextstep* ) opsys=nextstep ;;
2715 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2716 esac
2717 ;;
2718
2719 ## m68k Linux-based GNU system
2720 m68k-*-linux-gnu* )
2721 machine=m68k opsys=gnu-linux
2722 ;;
2723
2724 ## Mips Linux-based GNU system
cd958eb3 2725 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2726 machine=mips opsys=gnu-linux
2727 ;;
2728
2729 ## UXP/DS
2730 sparc-fujitsu-sysv4* )
2731 machine=sparc opsys=uxpds
2732 NON_GNU_CPP=/usr/ccs/lib/cpp
2733 RANLIB="ar -ts"
2734 ;;
2735
598a2813
AS
2736 ## AMD x86-64 Linux-based GNU system
2737 x86_64-*-linux-gnu* )
24b01ec4 2738 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2739 ;;
2740
94218e27
DN
2741 ## Tensilica Xtensa Linux-based GNU system
2742 xtensa-*-linux-gnu* )
2743 machine=xtensa opsys=gnu-linux
2744 ;;
2745
ba4481b5
DL
2746 * )
2747 unported=yes
2748 ;;
2749esac
2750
2751### If the code above didn't choose an operating system, just choose
2752### an operating system based on the configuration name. You really
2753### only want to use this when you have no idea what the right
2754### operating system is; if you know what operating systems a machine
2755### runs, it's cleaner to make it explicit in the case statement
2756### above.
2757if test x"${opsys}" = x; then
2758 case "${canonical}" in
2759 *-gnu* ) opsys=gnu ;;
2760 *-bsd4.[01] ) opsys=bsd4-1 ;;
2761 *-bsd4.2 ) opsys=bsd4-2 ;;
2762 *-bsd4.3 ) opsys=bsd4-3 ;;
2763 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2764 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2765 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2766 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2767 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2768 *-sysv5uw* ) opsys=unixware ;;
2769 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2770 *-sysv4.1* | *-sysvr4.1* )
2771 NON_GNU_CPP=/usr/lib/cpp
2772 opsys=usg5-4 ;;
2773 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2774 if [ x$NON_GNU_CPP = x ]; then
2775 if [ -f /usr/ccs/lib/cpp ]; then
2776 NON_GNU_CPP=/usr/ccs/lib/cpp
2777 else
2778 NON_GNU_CPP=/lib/cpp
2779 fi
2780 fi
2781 opsys=usg5-4-2 ;;
2782 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2783 * )
2784 unported=yes
2785 ;;
2786 esac
2787fi
2788
c0d27fcc 2789
22044edf 2790
ba4481b5 2791if test $unported = yes; then
c0d27fcc 2792 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2793Check \`etc/MACHINES' for recognized configuration names." >&5
2794echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2795Check \`etc/MACHINES' for recognized configuration names." >&2;}
2796 { (exit 1); exit 1; }; }
ba4481b5
DL
2797fi
2798
2799machfile="m/${machine}.h"
2800opsysfile="s/${opsys}.h"
2801
c0d27fcc 2802
ba4481b5
DL
2803#### Choose a compiler.
2804test -n "$CC" && cc_specified=yes
2805
2806# Save the value of CFLAGS that the user specified.
2807SPECIFIED_CFLAGS="$CFLAGS"
2808
2809case ${with_gcc} in
2810 "yes" ) CC="gcc" GCC=yes ;;
2811 "no" ) : ${CC=cc} ;;
503d2be0
AS
2812 * )
2813esac
2814ac_ext=c
2815ac_cpp='$CPP $CPPFLAGS'
2816ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2817ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2818ac_compiler_gnu=$ac_cv_c_compiler_gnu
2819if test -n "$ac_tool_prefix"; then
2820 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2821set dummy ${ac_tool_prefix}gcc; ac_word=$2
d6e01aa5
KL
2822{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2823echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2824if test "${ac_cv_prog_CC+set}" = set; then
2825 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2826else
2827 if test -n "$CC"; then
2828 ac_cv_prog_CC="$CC" # Let the user override the test.
2829else
c0d27fcc
MR
2830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2831for as_dir in $PATH
2832do
2833 IFS=$as_save_IFS
2834 test -z "$as_dir" && as_dir=.
2835 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 2836 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2837 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2838 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2839 break 2
2840 fi
2841done
503d2be0 2842done
d6e01aa5 2843IFS=$as_save_IFS
503d2be0 2844
ba4481b5
DL
2845fi
2846fi
503d2be0 2847CC=$ac_cv_prog_CC
ba4481b5 2848if test -n "$CC"; then
d6e01aa5
KL
2849 { echo "$as_me:$LINENO: result: $CC" >&5
2850echo "${ECHO_T}$CC" >&6; }
503d2be0 2851else
d6e01aa5
KL
2852 { echo "$as_me:$LINENO: result: no" >&5
2853echo "${ECHO_T}no" >&6; }
503d2be0
AS
2854fi
2855
d6e01aa5 2856
503d2be0
AS
2857fi
2858if test -z "$ac_cv_prog_CC"; then
2859 ac_ct_CC=$CC
2860 # Extract the first word of "gcc", so it can be a program name with args.
2861set dummy gcc; ac_word=$2
d6e01aa5
KL
2862{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2863echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2864if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2865 echo $ECHO_N "(cached) $ECHO_C" >&6
2866else
2867 if test -n "$ac_ct_CC"; then
2868 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2869else
c0d27fcc
MR
2870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2871for as_dir in $PATH
2872do
2873 IFS=$as_save_IFS
2874 test -z "$as_dir" && as_dir=.
2875 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 2876 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2877 ac_cv_prog_ac_ct_CC="gcc"
2878 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2879 break 2
2880 fi
2881done
503d2be0 2882done
d6e01aa5 2883IFS=$as_save_IFS
503d2be0
AS
2884
2885fi
2886fi
2887ac_ct_CC=$ac_cv_prog_ac_ct_CC
2888if test -n "$ac_ct_CC"; then
d6e01aa5
KL
2889 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2890echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 2891else
d6e01aa5
KL
2892 { echo "$as_me:$LINENO: result: no" >&5
2893echo "${ECHO_T}no" >&6; }
503d2be0
AS
2894fi
2895
d6e01aa5
KL
2896 if test "x$ac_ct_CC" = x; then
2897 CC=""
2898 else
2899 case $cross_compiling:$ac_tool_warned in
2900yes:)
2901{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2902whose name does not start with the host triplet. If you think this
2903configuration is useful to you, please write to autoconf@gnu.org." >&5
2904echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2905whose name does not start with the host triplet. If you think this
2906configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2907ac_tool_warned=yes ;;
2908esac
2909 CC=$ac_ct_CC
2910 fi
503d2be0
AS
2911else
2912 CC="$ac_cv_prog_CC"
ba4481b5
DL
2913fi
2914
2915if test -z "$CC"; then
d6e01aa5
KL
2916 if test -n "$ac_tool_prefix"; then
2917 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 2918set dummy ${ac_tool_prefix}cc; ac_word=$2
d6e01aa5
KL
2919{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2920echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2921if test "${ac_cv_prog_CC+set}" = set; then
2922 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2923else
2924 if test -n "$CC"; then
2925 ac_cv_prog_CC="$CC" # Let the user override the test.
2926else
c0d27fcc
MR
2927as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2928for as_dir in $PATH
2929do
2930 IFS=$as_save_IFS
2931 test -z "$as_dir" && as_dir=.
2932 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 2933 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2934 ac_cv_prog_CC="${ac_tool_prefix}cc"
2935 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2936 break 2
2937 fi
2938done
503d2be0 2939done
d6e01aa5 2940IFS=$as_save_IFS
503d2be0
AS
2941
2942fi
2943fi
2944CC=$ac_cv_prog_CC
2945if test -n "$CC"; then
d6e01aa5
KL
2946 { echo "$as_me:$LINENO: result: $CC" >&5
2947echo "${ECHO_T}$CC" >&6; }
503d2be0 2948else
d6e01aa5
KL
2949 { echo "$as_me:$LINENO: result: no" >&5
2950echo "${ECHO_T}no" >&6; }
503d2be0
AS
2951fi
2952
503d2be0 2953
d6e01aa5 2954 fi
503d2be0
AS
2955fi
2956if test -z "$CC"; then
2957 # Extract the first word of "cc", so it can be a program name with args.
2958set dummy cc; ac_word=$2
d6e01aa5
KL
2959{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2960echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2961if test "${ac_cv_prog_CC+set}" = set; then
2962 echo $ECHO_N "(cached) $ECHO_C" >&6
2963else
2964 if test -n "$CC"; then
2965 ac_cv_prog_CC="$CC" # Let the user override the test.
2966else
2967 ac_prog_rejected=no
c0d27fcc
MR
2968as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2969for as_dir in $PATH
2970do
2971 IFS=$as_save_IFS
2972 test -z "$as_dir" && as_dir=.
2973 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 2974 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2975 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2976 ac_prog_rejected=yes
2977 continue
2978 fi
2979 ac_cv_prog_CC="cc"
2980 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2981 break 2
2982 fi
2983done
503d2be0 2984done
d6e01aa5 2985IFS=$as_save_IFS
503d2be0 2986
ba4481b5
DL
2987if test $ac_prog_rejected = yes; then
2988 # We found a bogon in the path, so make sure we never use it.
2989 set dummy $ac_cv_prog_CC
2990 shift
503d2be0 2991 if test $# != 0; then
ba4481b5
DL
2992 # We chose a different compiler from the bogus one.
2993 # However, it has the same basename, so the bogon will be chosen
2994 # first if we set CC to just the basename; use the full file name.
2995 shift
6bae0ccf 2996 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
2997 fi
2998fi
2999fi
3000fi
503d2be0 3001CC=$ac_cv_prog_CC
ba4481b5 3002if test -n "$CC"; then
d6e01aa5
KL
3003 { echo "$as_me:$LINENO: result: $CC" >&5
3004echo "${ECHO_T}$CC" >&6; }
ba4481b5 3005else
d6e01aa5
KL
3006 { echo "$as_me:$LINENO: result: no" >&5
3007echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3008fi
3009
d6e01aa5 3010
503d2be0
AS
3011fi
3012if test -z "$CC"; then
3013 if test -n "$ac_tool_prefix"; then
d6e01aa5 3014 for ac_prog in cl.exe
503d2be0
AS
3015 do
3016 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3017set dummy $ac_tool_prefix$ac_prog; ac_word=$2
d6e01aa5
KL
3018{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3019echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3020if test "${ac_cv_prog_CC+set}" = set; then
3021 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
3022else
3023 if test -n "$CC"; then
3024 ac_cv_prog_CC="$CC" # Let the user override the test.
3025else
c0d27fcc
MR
3026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3027for as_dir in $PATH
3028do
3029 IFS=$as_save_IFS
3030 test -z "$as_dir" && as_dir=.
3031 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3032 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3033 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3034 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3035 break 2
3036 fi
3037done
503d2be0 3038done
d6e01aa5 3039IFS=$as_save_IFS
503d2be0 3040
c4bb2108
DL
3041fi
3042fi
503d2be0 3043CC=$ac_cv_prog_CC
c4bb2108 3044if test -n "$CC"; then
d6e01aa5
KL
3045 { echo "$as_me:$LINENO: result: $CC" >&5
3046echo "${ECHO_T}$CC" >&6; }
c4bb2108 3047else
d6e01aa5
KL
3048 { echo "$as_me:$LINENO: result: no" >&5
3049echo "${ECHO_T}no" >&6; }
503d2be0
AS
3050fi
3051
d6e01aa5 3052
503d2be0
AS
3053 test -n "$CC" && break
3054 done
3055fi
3056if test -z "$CC"; then
3057 ac_ct_CC=$CC
d6e01aa5 3058 for ac_prog in cl.exe
503d2be0
AS
3059do
3060 # Extract the first word of "$ac_prog", so it can be a program name with args.
3061set dummy $ac_prog; ac_word=$2
d6e01aa5
KL
3062{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3063echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3064if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3065 echo $ECHO_N "(cached) $ECHO_C" >&6
3066else
3067 if test -n "$ac_ct_CC"; then
3068 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3069else
c0d27fcc
MR
3070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3071for as_dir in $PATH
3072do
3073 IFS=$as_save_IFS
3074 test -z "$as_dir" && as_dir=.
3075 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3076 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3077 ac_cv_prog_ac_ct_CC="$ac_prog"
3078 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3079 break 2
3080 fi
3081done
503d2be0 3082done
d6e01aa5 3083IFS=$as_save_IFS
503d2be0 3084
c4bb2108 3085fi
503d2be0
AS
3086fi
3087ac_ct_CC=$ac_cv_prog_ac_ct_CC
3088if test -n "$ac_ct_CC"; then
d6e01aa5
KL
3089 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3090echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 3091else
d6e01aa5
KL
3092 { echo "$as_me:$LINENO: result: no" >&5
3093echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3094fi
3095
d6e01aa5 3096
503d2be0
AS
3097 test -n "$ac_ct_CC" && break
3098done
ba4481b5 3099
d6e01aa5
KL
3100 if test "x$ac_ct_CC" = x; then
3101 CC=""
3102 else
3103 case $cross_compiling:$ac_tool_warned in
3104yes:)
3105{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3106whose name does not start with the host triplet. If you think this
3107configuration is useful to you, please write to autoconf@gnu.org." >&5
3108echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3109whose name does not start with the host triplet. If you think this
3110configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3111ac_tool_warned=yes ;;
3112esac
3113 CC=$ac_ct_CC
3114 fi
503d2be0
AS
3115fi
3116
3117fi
ba4481b5 3118
c0d27fcc 3119
19650fd6
AS
3120test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3121See \`config.log' for more details." >&5
3122echo "$as_me: error: no acceptable C compiler found in \$PATH
3123See \`config.log' for more details." >&2;}
503d2be0 3124 { (exit 1); exit 1; }; }
c4bb2108 3125
503d2be0 3126# Provide some information about the compiler.
d6e01aa5 3127echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3128ac_compiler=`set X $ac_compile; echo $2`
d6e01aa5
KL
3129{ (ac_try="$ac_compiler --version >&5"
3130case "(($ac_try" in
3131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3132 *) ac_try_echo=$ac_try;;
3133esac
3134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3135 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3136 ac_status=$?
c0d27fcc 3137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3138 (exit $ac_status); }
d6e01aa5
KL
3139{ (ac_try="$ac_compiler -v >&5"
3140case "(($ac_try" in
3141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3142 *) ac_try_echo=$ac_try;;
3143esac
3144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3145 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3146 ac_status=$?
c0d27fcc 3147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3148 (exit $ac_status); }
d6e01aa5
KL
3149{ (ac_try="$ac_compiler -V >&5"
3150case "(($ac_try" in
3151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3152 *) ac_try_echo=$ac_try;;
3153esac
3154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3155 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3156 ac_status=$?
c0d27fcc 3157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3158 (exit $ac_status); }
3159
3160cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3161/* confdefs.h. */
3162_ACEOF
3163cat confdefs.h >>conftest.$ac_ext
3164cat >>conftest.$ac_ext <<_ACEOF
3165/* end confdefs.h. */
c4bb2108 3166
503d2be0
AS
3167int
3168main ()
3169{
3170
3171 ;
3172 return 0;
3173}
3174_ACEOF
3175ac_clean_files_save=$ac_clean_files
19650fd6 3176ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3177# Try to create an executable without -o first, disregard a.out.
3178# It will help us diagnose broken compilers, and finding out an intuition
3179# of exeext.
d6e01aa5
KL
3180{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3181echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3182ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
d6e01aa5
KL
3183#
3184# List of possible output files, starting from the most likely.
3185# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3186# only as a last resort. b.out is created by i960 compilers.
3187ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3188#
3189# The IRIX 6 linker writes into existing files which may not be
3190# executable, retaining their permissions. Remove them first so a
3191# subsequent execution test works.
3192ac_rmfiles=
3193for ac_file in $ac_files
3194do
3195 case $ac_file in
3196 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3197 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3198 esac
3199done
3200rm -f $ac_rmfiles
3201
3202if { (ac_try="$ac_link_default"
3203case "(($ac_try" in
3204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3205 *) ac_try_echo=$ac_try;;
3206esac
3207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3208 (eval "$ac_link_default") 2>&5
503d2be0 3209 ac_status=$?
c0d27fcc 3210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3211 (exit $ac_status); }; then
d6e01aa5
KL
3212 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3213# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3214# in a Makefile. We should not override ac_cv_exeext if it was cached,
3215# so that the user can short-circuit this test for compilers unknown to
3216# Autoconf.
3217for ac_file in $ac_files ''
19650fd6 3218do
6bae0ccf 3219 test -f "$ac_file" || continue
503d2be0 3220 case $ac_file in
d6e01aa5 3221 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3222 ;;
19650fd6 3223 [ab].out )
edfaf76d
LK
3224 # We found the default executable, but exeext='' is most
3225 # certainly right.
3226 break;;
19650fd6 3227 *.* )
d6e01aa5
KL
3228 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3229 then :; else
3230 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3231 fi
3232 # We set ac_cv_exeext here because the later test for it is not
3233 # safe: cross compilers may not add the suffix if given an `-o'
3234 # argument, so we may need to know it at that point already.
3235 # Even if this section looks crufty: it has the advantage of
3236 # actually working.
edfaf76d 3237 break;;
19650fd6 3238 * )
edfaf76d 3239 break;;
503d2be0
AS
3240 esac
3241done
d6e01aa5
KL
3242test "$ac_cv_exeext" = no && ac_cv_exeext=
3243
503d2be0 3244else
d6e01aa5
KL
3245 ac_file=''
3246fi
3247
3248{ echo "$as_me:$LINENO: result: $ac_file" >&5
3249echo "${ECHO_T}$ac_file" >&6; }
3250if test -z "$ac_file"; then
503d2be0 3251 echo "$as_me: failed program was:" >&5
19650fd6
AS
3252sed 's/^/| /' conftest.$ac_ext >&5
3253
6bae0ccf 3254{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3255See \`config.log' for more details." >&5
6bae0ccf 3256echo "$as_me: error: C compiler cannot create executables
19650fd6 3257See \`config.log' for more details." >&2;}
503d2be0
AS
3258 { (exit 77); exit 77; }; }
3259fi
3260
3261ac_exeext=$ac_cv_exeext
503d2be0 3262
d6e01aa5 3263# Check that the compiler produces executables we can run. If not, either
503d2be0 3264# the compiler is broken, or we cross compile.
d6e01aa5
KL
3265{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3266echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3267# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3268# If not cross compiling, check that we can run a simple program.
3269if test "$cross_compiling" != yes; then
3270 if { ac_try='./$ac_file'
d6e01aa5
KL
3271 { (case "(($ac_try" in
3272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3273 *) ac_try_echo=$ac_try;;
3274esac
3275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3276 (eval "$ac_try") 2>&5
503d2be0 3277 ac_status=$?
c0d27fcc 3278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3279 (exit $ac_status); }; }; then
3280 cross_compiling=no
ba4481b5 3281 else
503d2be0
AS
3282 if test "$cross_compiling" = maybe; then
3283 cross_compiling=yes
3284 else
c0d27fcc 3285 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3286If you meant to cross compile, use \`--host'.
3287See \`config.log' for more details." >&5
503d2be0 3288echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3289If you meant to cross compile, use \`--host'.
3290See \`config.log' for more details." >&2;}
503d2be0
AS
3291 { (exit 1); exit 1; }; }
3292 fi
ba4481b5 3293 fi
503d2be0 3294fi
d6e01aa5
KL
3295{ echo "$as_me:$LINENO: result: yes" >&5
3296echo "${ECHO_T}yes" >&6; }
503d2be0 3297
19650fd6 3298rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3299ac_clean_files=$ac_clean_files_save
d6e01aa5 3300# Check that the compiler produces executables we can run. If not, either
503d2be0 3301# the compiler is broken, or we cross compile.
d6e01aa5
KL
3302{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3303echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3304{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3305echo "${ECHO_T}$cross_compiling" >&6; }
3306
3307{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3308echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3309if { (ac_try="$ac_link"
3310case "(($ac_try" in
3311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3312 *) ac_try_echo=$ac_try;;
3313esac
3314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3315 (eval "$ac_link") 2>&5
503d2be0 3316 ac_status=$?
c0d27fcc 3317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3318 (exit $ac_status); }; then
3319 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3320# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3321# work properly (i.e., refer to `conftest.exe'), while it won't with
3322# `rm'.
6bae0ccf
DL
3323for ac_file in conftest.exe conftest conftest.*; do
3324 test -f "$ac_file" || continue
503d2be0 3325 case $ac_file in
d6e01aa5 3326 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3327 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3328 break;;
503d2be0
AS
3329 * ) break;;
3330 esac
3331done
ba4481b5 3332else
19650fd6
AS
3333 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3334See \`config.log' for more details." >&5
3335echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3336See \`config.log' for more details." >&2;}
503d2be0 3337 { (exit 1); exit 1; }; }
ba4481b5 3338fi
ba4481b5 3339
503d2be0 3340rm -f conftest$ac_cv_exeext
d6e01aa5
KL
3341{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3342echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3343
503d2be0
AS
3344rm -f conftest.$ac_ext
3345EXEEXT=$ac_cv_exeext
3346ac_exeext=$EXEEXT
d6e01aa5
KL
3347{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3348echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3349if test "${ac_cv_objext+set}" = set; then
3350 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3351else
503d2be0 3352 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3353/* confdefs.h. */
3354_ACEOF
3355cat confdefs.h >>conftest.$ac_ext
3356cat >>conftest.$ac_ext <<_ACEOF
3357/* end confdefs.h. */
ba4481b5 3358
503d2be0
AS
3359int
3360main ()
3361{
ba4481b5 3362
503d2be0
AS
3363 ;
3364 return 0;
3365}
3366_ACEOF
3367rm -f conftest.o conftest.obj
d6e01aa5
KL
3368if { (ac_try="$ac_compile"
3369case "(($ac_try" in
3370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3371 *) ac_try_echo=$ac_try;;
3372esac
3373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3374 (eval "$ac_compile") 2>&5
503d2be0 3375 ac_status=$?
c0d27fcc 3376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3377 (exit $ac_status); }; then
d6e01aa5
KL
3378 for ac_file in conftest.o conftest.obj conftest.*; do
3379 test -f "$ac_file" || continue;
503d2be0 3380 case $ac_file in
d6e01aa5 3381 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3382 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3383 break;;
3384 esac
3385done
c4bb2108 3386else
503d2be0 3387 echo "$as_me: failed program was:" >&5
19650fd6
AS
3388sed 's/^/| /' conftest.$ac_ext >&5
3389
3390{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3391See \`config.log' for more details." >&5
3392echo "$as_me: error: cannot compute suffix of object files: cannot compile
3393See \`config.log' for more details." >&2;}
503d2be0 3394 { (exit 1); exit 1; }; }
c4bb2108
DL
3395fi
3396
503d2be0
AS
3397rm -f conftest.$ac_cv_objext conftest.$ac_ext
3398fi
d6e01aa5
KL
3399{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3400echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3401OBJEXT=$ac_cv_objext
3402ac_objext=$OBJEXT
d6e01aa5
KL
3403{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3404echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3405if test "${ac_cv_c_compiler_gnu+set}" = set; then
3406 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3407else
503d2be0 3408 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3409/* confdefs.h. */
3410_ACEOF
3411cat confdefs.h >>conftest.$ac_ext
3412cat >>conftest.$ac_ext <<_ACEOF
3413/* end confdefs.h. */
503d2be0
AS
3414
3415int
3416main ()
3417{
3418#ifndef __GNUC__
3419 choke me
3420#endif
3421
3422 ;
3423 return 0;
3424}
3425_ACEOF
3426rm -f conftest.$ac_objext
d6e01aa5
KL
3427if { (ac_try="$ac_compile"
3428case "(($ac_try" in
3429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3430 *) ac_try_echo=$ac_try;;
3431esac
3432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3433 (eval "$ac_compile") 2>conftest.er1
503d2be0 3434 ac_status=$?
edfaf76d
LK
3435 grep -v '^ *+' conftest.er1 >conftest.err
3436 rm -f conftest.er1
3437 cat conftest.err >&5
c0d27fcc 3438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
3439 (exit $ac_status); } && {
3440 test -z "$ac_c_werror_flag" ||
3441 test ! -s conftest.err
3442 } && test -s conftest.$ac_objext; then
503d2be0
AS
3443 ac_compiler_gnu=yes
3444else
3445 echo "$as_me: failed program was:" >&5
19650fd6
AS
3446sed 's/^/| /' conftest.$ac_ext >&5
3447
d6e01aa5 3448 ac_compiler_gnu=no
503d2be0 3449fi
d6e01aa5
KL
3450
3451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3452ac_cv_c_compiler_gnu=$ac_compiler_gnu
3453
3454fi
d6e01aa5
KL
3455{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3456echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3457GCC=`test $ac_compiler_gnu = yes && echo yes`
3458ac_test_CFLAGS=${CFLAGS+set}
3459ac_save_CFLAGS=$CFLAGS
d6e01aa5
KL
3460{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3461echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3462if test "${ac_cv_prog_cc_g+set}" = set; then
3463 echo $ECHO_N "(cached) $ECHO_C" >&6
3464else
d6e01aa5
KL
3465 ac_save_c_werror_flag=$ac_c_werror_flag
3466 ac_c_werror_flag=yes
3467 ac_cv_prog_cc_g=no
3468 CFLAGS="-g"
3469 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3470/* confdefs.h. */
3471_ACEOF
3472cat confdefs.h >>conftest.$ac_ext
3473cat >>conftest.$ac_ext <<_ACEOF
3474/* end confdefs.h. */
503d2be0
AS
3475
3476int
3477main ()
3478{
3479
3480 ;
3481 return 0;
3482}
3483_ACEOF
3484rm -f conftest.$ac_objext
d6e01aa5
KL
3485if { (ac_try="$ac_compile"
3486case "(($ac_try" in
3487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3488 *) ac_try_echo=$ac_try;;
3489esac
3490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3491 (eval "$ac_compile") 2>conftest.er1
503d2be0 3492 ac_status=$?
edfaf76d
LK
3493 grep -v '^ *+' conftest.er1 >conftest.err
3494 rm -f conftest.er1
3495 cat conftest.err >&5
c0d27fcc 3496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
3497 (exit $ac_status); } && {
3498 test -z "$ac_c_werror_flag" ||
3499 test ! -s conftest.err
3500 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3501 ac_cv_prog_cc_g=yes
3502else
503d2be0 3503 echo "$as_me: failed program was:" >&5
19650fd6
AS
3504sed 's/^/| /' conftest.$ac_ext >&5
3505
d6e01aa5
KL
3506 CFLAGS=""
3507 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3508/* confdefs.h. */
3509_ACEOF
3510cat confdefs.h >>conftest.$ac_ext
3511cat >>conftest.$ac_ext <<_ACEOF
3512/* end confdefs.h. */
d6e01aa5
KL
3513
3514int
3515main ()
6bae0ccf 3516{
edfaf76d 3517
6bae0ccf
DL
3518 ;
3519 return 0;
3520}
3521_ACEOF
d6e01aa5
KL
3522rm -f conftest.$ac_objext
3523if { (ac_try="$ac_compile"
3524case "(($ac_try" in
3525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3526 *) ac_try_echo=$ac_try;;
3527esac
3528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3529 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3530 ac_status=$?
edfaf76d
LK
3531 grep -v '^ *+' conftest.er1 >conftest.err
3532 rm -f conftest.er1
3533 cat conftest.err >&5
6bae0ccf 3534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
3535 (exit $ac_status); } && {
3536 test -z "$ac_c_werror_flag" ||
3537 test ! -s conftest.err
3538 } && test -s conftest.$ac_objext; then
3539 :
6bae0ccf
DL
3540else
3541 echo "$as_me: failed program was:" >&5
19650fd6
AS
3542sed 's/^/| /' conftest.$ac_ext >&5
3543
d6e01aa5
KL
3544 ac_c_werror_flag=$ac_save_c_werror_flag
3545 CFLAGS="-g"
3546 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3547/* confdefs.h. */
3548_ACEOF
3549cat confdefs.h >>conftest.$ac_ext
3550cat >>conftest.$ac_ext <<_ACEOF
3551/* end confdefs.h. */
d6e01aa5 3552
503d2be0
AS
3553int
3554main ()
3555{
d6e01aa5 3556
503d2be0
AS
3557 ;
3558 return 0;
3559}
3560_ACEOF
3561rm -f conftest.$ac_objext
d6e01aa5
KL
3562if { (ac_try="$ac_compile"
3563case "(($ac_try" in
3564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3565 *) ac_try_echo=$ac_try;;
3566esac
3567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3568 (eval "$ac_compile") 2>conftest.er1
503d2be0 3569 ac_status=$?
edfaf76d
LK
3570 grep -v '^ *+' conftest.er1 >conftest.err
3571 rm -f conftest.er1
3572 cat conftest.err >&5
c0d27fcc 3573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
3574 (exit $ac_status); } && {
3575 test -z "$ac_c_werror_flag" ||
3576 test ! -s conftest.err
3577 } && test -s conftest.$ac_objext; then
3578 ac_cv_prog_cc_g=yes
503d2be0
AS
3579else
3580 echo "$as_me: failed program was:" >&5
19650fd6
AS
3581sed 's/^/| /' conftest.$ac_ext >&5
3582
d6e01aa5 3583
503d2be0 3584fi
d6e01aa5
KL
3585
3586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3587fi
3588
3589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3590fi
3591
3592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3593 ac_c_werror_flag=$ac_save_c_werror_flag
3594fi
3595{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3596echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3597if test "$ac_test_CFLAGS" = set; then
3598 CFLAGS=$ac_save_CFLAGS
3599elif test $ac_cv_prog_cc_g = yes; then
3600 if test "$GCC" = yes; then
3601 CFLAGS="-g -O2"
3602 else
3603 CFLAGS="-g"
3604 fi
3605else
3606 if test "$GCC" = yes; then
3607 CFLAGS="-O2"
3608 else
3609 CFLAGS=
3610 fi
3611fi
3612{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3613echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3614if test "${ac_cv_prog_cc_c89+set}" = set; then
3615 echo $ECHO_N "(cached) $ECHO_C" >&6
3616else
3617 ac_cv_prog_cc_c89=no
3618ac_save_CC=$CC
3619cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3620/* confdefs.h. */
3621_ACEOF
3622cat confdefs.h >>conftest.$ac_ext
3623cat >>conftest.$ac_ext <<_ACEOF
3624/* end confdefs.h. */
d6e01aa5
KL
3625#include <stdarg.h>
3626#include <stdio.h>
3627#include <sys/types.h>
3628#include <sys/stat.h>
3629/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3630struct buf { int x; };
3631FILE * (*rcsopen) (struct buf *, struct stat *, int);
3632static char *e (p, i)
3633 char **p;
3634 int i;
3635{
3636 return p[i];
3637}
3638static char *f (char * (*g) (char **, int), char **p, ...)
3639{
3640 char *s;
3641 va_list v;
3642 va_start (v,p);
3643 s = g (p, va_arg (v,int));
3644 va_end (v);
3645 return s;
3646}
3647
3648/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3649 function prototypes and stuff, but not '\xHH' hex character constants.
3650 These don't provoke an error unfortunately, instead are silently treated
3651 as 'x'. The following induces an error, until -std is added to get
3652 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3653 array size at least. It's necessary to write '\x00'==0 to get something
3654 that's true only with -std. */
3655int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3656
3657/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3658 inside strings and character constants. */
3659#define FOO(x) 'x'
3660int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3661
3662int test (int i, double x);
3663struct s1 {int (*f) (int a);};
3664struct s2 {int (*f) (double a);};
3665int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3666int argc;
3667char **argv;
503d2be0
AS
3668int
3669main ()
3670{
d6e01aa5 3671return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
503d2be0
AS
3672 ;
3673 return 0;
3674}
3675_ACEOF
d6e01aa5
KL
3676for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3677 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3678do
3679 CC="$ac_save_CC $ac_arg"
3680 rm -f conftest.$ac_objext
3681if { (ac_try="$ac_compile"
3682case "(($ac_try" in
3683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3684 *) ac_try_echo=$ac_try;;
3685esac
3686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3687 (eval "$ac_compile") 2>conftest.er1
503d2be0 3688 ac_status=$?
edfaf76d
LK
3689 grep -v '^ *+' conftest.er1 >conftest.err
3690 rm -f conftest.er1
3691 cat conftest.err >&5
c0d27fcc 3692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
3693 (exit $ac_status); } && {
3694 test -z "$ac_c_werror_flag" ||
3695 test ! -s conftest.err
3696 } && test -s conftest.$ac_objext; then
3697 ac_cv_prog_cc_c89=$ac_arg
503d2be0
AS
3698else
3699 echo "$as_me: failed program was:" >&5
19650fd6
AS
3700sed 's/^/| /' conftest.$ac_ext >&5
3701
d6e01aa5 3702
503d2be0 3703fi
d6e01aa5
KL
3704
3705rm -f core conftest.err conftest.$ac_objext
3706 test "x$ac_cv_prog_cc_c89" != "xno" && break
503d2be0 3707done
d6e01aa5
KL
3708rm -f conftest.$ac_ext
3709CC=$ac_save_CC
3710
503d2be0 3711fi
d6e01aa5
KL
3712# AC_CACHE_VAL
3713case "x$ac_cv_prog_cc_c89" in
3714 x)
3715 { echo "$as_me:$LINENO: result: none needed" >&5
3716echo "${ECHO_T}none needed" >&6; } ;;
3717 xno)
3718 { echo "$as_me:$LINENO: result: unsupported" >&5
3719echo "${ECHO_T}unsupported" >&6; } ;;
3720 *)
3721 CC="$CC $ac_cv_prog_cc_c89"
3722 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3723echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3724esac
ba4481b5 3725
19650fd6 3726
503d2be0
AS
3727ac_ext=c
3728ac_cpp='$CPP $CPPFLAGS'
3729ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3730ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3731ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3732
c0d27fcc 3733
ba4481b5
DL
3734# On Suns, sometimes $CPP names a directory.
3735if test -n "$CPP" && test -d "$CPP"; then
3736 CPP=
3737fi
3738
089a966d
GM
3739## If not using gcc, and on Solaris, and no CPP specified, see if
3740## using a Sun compiler, which needs -Xs to prevent whitespace.
3741if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
3742 test x"$CPP" = x; then
3743 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
3744echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
3745
3746if test "${emacs_cv_sunpro_c+set}" = set; then
3747 echo $ECHO_N "(cached) $ECHO_C" >&6
3748else
3749 cat >conftest.$ac_ext <<_ACEOF
3750/* confdefs.h. */
3751_ACEOF
3752cat confdefs.h >>conftest.$ac_ext
3753cat >>conftest.$ac_ext <<_ACEOF
3754/* end confdefs.h. */
3755
3756int
3757main ()
3758{
3759#ifndef __SUNPRO_C
3760fail;
3761#endif
3762
3763 ;
3764 return 0;
3765}
3766_ACEOF
3767rm -f conftest.$ac_objext conftest$ac_exeext
3768if { (ac_try="$ac_link"
3769case "(($ac_try" in
3770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3771 *) ac_try_echo=$ac_try;;
3772esac
3773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3774 (eval "$ac_link") 2>conftest.er1
3775 ac_status=$?
3776 grep -v '^ *+' conftest.er1 >conftest.err
3777 rm -f conftest.er1
3778 cat conftest.err >&5
3779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3780 (exit $ac_status); } && {
3781 test -z "$ac_c_werror_flag" ||
3782 test ! -s conftest.err
3783 } && test -s conftest$ac_exeext &&
3784 $as_test_x conftest$ac_exeext; then
3785 emacs_cv_sunpro_c=yes
3786else
3787 echo "$as_me: failed program was:" >&5
3788sed 's/^/| /' conftest.$ac_ext >&5
3789
3790 emacs_cv_sunpro_c=no
3791fi
3792
3793rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3794 conftest$ac_exeext conftest.$ac_ext
3795fi
3796
3797 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
3798echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
3799
3800 if test x"$emacs_cv_sunpro_c" = xyes; then
3801 NON_GNU_CPP="$CC -E -Xs"
3802 fi
3803fi
3804
ba4481b5
DL
3805#### Some systems specify a CPP to use unless we are using GCC.
3806#### Now that we know whether we are using GCC, we can decide whether
3807#### to use that one.
3808if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3809then
3810 CPP="$NON_GNU_CPP"
3811fi
3812
3813#### Some systems specify a CC to use unless we are using GCC.
3814#### Now that we know whether we are using GCC, we can decide whether
3815#### to use that one.
3816if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3817 test x$cc_specified != xyes
3818then
3819 CC="$NON_GNU_CC"
3820fi
3821
3822if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3823then
3824 CC="$CC $GCC_TEST_OPTIONS"
3825fi
3826
3827if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3828then
3829 CC="$CC $NON_GCC_TEST_OPTIONS"
3830fi
3831
e143ad11
AS
3832ac_ext=c
3833ac_cpp='$CPP $CPPFLAGS'
3834ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3835ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3836ac_compiler_gnu=$ac_cv_c_compiler_gnu
d6e01aa5
KL
3837{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3838echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
3839# On Suns, sometimes $CPP names a directory.
3840if test -n "$CPP" && test -d "$CPP"; then
3841 CPP=
3842fi
3843if test -z "$CPP"; then
3844 if test "${ac_cv_prog_CPP+set}" = set; then
3845 echo $ECHO_N "(cached) $ECHO_C" >&6
3846else
3847 # Double quotes because CPP needs to be expanded
3848 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3849 do
3850 ac_preproc_ok=false
3851for ac_c_preproc_warn_flag in '' yes
3852do
3853 # Use a header file that comes with gcc, so configuring glibc
3854 # with a fresh cross-compiler works.
3855 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3856 # <limits.h> exists even on freestanding compilers.
3857 # On the NeXT, cc -E runs the code through the compiler's parser,
3858 # not just through cpp. "Syntax error" is here to catch this case.
3859 cat >conftest.$ac_ext <<_ACEOF
3860/* confdefs.h. */
3861_ACEOF
3862cat confdefs.h >>conftest.$ac_ext
3863cat >>conftest.$ac_ext <<_ACEOF
3864/* end confdefs.h. */
3865#ifdef __STDC__
3866# include <limits.h>
3867#else
3868# include <assert.h>
3869#endif
3870 Syntax error
3871_ACEOF
d6e01aa5
KL
3872if { (ac_try="$ac_cpp conftest.$ac_ext"
3873case "(($ac_try" in
3874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3875 *) ac_try_echo=$ac_try;;
3876esac
3877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3878 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3879 ac_status=$?
3880 grep -v '^ *+' conftest.er1 >conftest.err
3881 rm -f conftest.er1
3882 cat conftest.err >&5
3883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
3884 (exit $ac_status); } >/dev/null && {
3885 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3886 test ! -s conftest.err
3887 }; then
e143ad11
AS
3888 :
3889else
3890 echo "$as_me: failed program was:" >&5
3891sed 's/^/| /' conftest.$ac_ext >&5
3892
3893 # Broken: fails on valid input.
3894continue
3895fi
d6e01aa5 3896
e143ad11
AS
3897rm -f conftest.err conftest.$ac_ext
3898
d6e01aa5 3899 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3900 # can be detected and how.
3901 cat >conftest.$ac_ext <<_ACEOF
3902/* confdefs.h. */
3903_ACEOF
3904cat confdefs.h >>conftest.$ac_ext
3905cat >>conftest.$ac_ext <<_ACEOF
3906/* end confdefs.h. */
3907#include <ac_nonexistent.h>
3908_ACEOF
d6e01aa5
KL
3909if { (ac_try="$ac_cpp conftest.$ac_ext"
3910case "(($ac_try" in
3911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3912 *) ac_try_echo=$ac_try;;
3913esac
3914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3915 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3916 ac_status=$?
3917 grep -v '^ *+' conftest.er1 >conftest.err
3918 rm -f conftest.er1
3919 cat conftest.err >&5
3920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
3921 (exit $ac_status); } >/dev/null && {
3922 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3923 test ! -s conftest.err
3924 }; then
e143ad11
AS
3925 # Broken: success on invalid input.
3926continue
3927else
3928 echo "$as_me: failed program was:" >&5
3929sed 's/^/| /' conftest.$ac_ext >&5
3930
3931 # Passes both tests.
3932ac_preproc_ok=:
3933break
3934fi
d6e01aa5 3935
e143ad11
AS
3936rm -f conftest.err conftest.$ac_ext
3937
3938done
3939# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3940rm -f conftest.err conftest.$ac_ext
3941if $ac_preproc_ok; then
3942 break
3943fi
3944
3945 done
3946 ac_cv_prog_CPP=$CPP
3947
3948fi
3949 CPP=$ac_cv_prog_CPP
3950else
3951 ac_cv_prog_CPP=$CPP
3952fi
d6e01aa5
KL
3953{ echo "$as_me:$LINENO: result: $CPP" >&5
3954echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
3955ac_preproc_ok=false
3956for ac_c_preproc_warn_flag in '' yes
3957do
3958 # Use a header file that comes with gcc, so configuring glibc
3959 # with a fresh cross-compiler works.
3960 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3961 # <limits.h> exists even on freestanding compilers.
3962 # On the NeXT, cc -E runs the code through the compiler's parser,
3963 # not just through cpp. "Syntax error" is here to catch this case.
3964 cat >conftest.$ac_ext <<_ACEOF
3965/* confdefs.h. */
3966_ACEOF
3967cat confdefs.h >>conftest.$ac_ext
3968cat >>conftest.$ac_ext <<_ACEOF
3969/* end confdefs.h. */
3970#ifdef __STDC__
3971# include <limits.h>
3972#else
3973# include <assert.h>
3974#endif
3975 Syntax error
3976_ACEOF
d6e01aa5
KL
3977if { (ac_try="$ac_cpp conftest.$ac_ext"
3978case "(($ac_try" in
3979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3980 *) ac_try_echo=$ac_try;;
3981esac
3982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3983 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3984 ac_status=$?
3985 grep -v '^ *+' conftest.er1 >conftest.err
3986 rm -f conftest.er1
3987 cat conftest.err >&5
3988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
3989 (exit $ac_status); } >/dev/null && {
3990 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3991 test ! -s conftest.err
3992 }; then
e143ad11
AS
3993 :
3994else
3995 echo "$as_me: failed program was:" >&5
3996sed 's/^/| /' conftest.$ac_ext >&5
3997
3998 # Broken: fails on valid input.
3999continue
4000fi
d6e01aa5 4001
e143ad11
AS
4002rm -f conftest.err conftest.$ac_ext
4003
d6e01aa5 4004 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4005 # can be detected and how.
4006 cat >conftest.$ac_ext <<_ACEOF
4007/* confdefs.h. */
4008_ACEOF
4009cat confdefs.h >>conftest.$ac_ext
4010cat >>conftest.$ac_ext <<_ACEOF
4011/* end confdefs.h. */
4012#include <ac_nonexistent.h>
4013_ACEOF
d6e01aa5
KL
4014if { (ac_try="$ac_cpp conftest.$ac_ext"
4015case "(($ac_try" in
4016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4017 *) ac_try_echo=$ac_try;;
4018esac
4019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4020 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4021 ac_status=$?
4022 grep -v '^ *+' conftest.er1 >conftest.err
4023 rm -f conftest.er1
4024 cat conftest.err >&5
4025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4026 (exit $ac_status); } >/dev/null && {
4027 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4028 test ! -s conftest.err
4029 }; then
e143ad11
AS
4030 # Broken: success on invalid input.
4031continue
4032else
4033 echo "$as_me: failed program was:" >&5
4034sed 's/^/| /' conftest.$ac_ext >&5
4035
4036 # Passes both tests.
4037ac_preproc_ok=:
4038break
4039fi
d6e01aa5 4040
e143ad11
AS
4041rm -f conftest.err conftest.$ac_ext
4042
4043done
4044# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4045rm -f conftest.err conftest.$ac_ext
4046if $ac_preproc_ok; then
4047 :
4048else
4049 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4050See \`config.log' for more details." >&5
4051echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4052See \`config.log' for more details." >&2;}
4053 { (exit 1); exit 1; }; }
4054fi
4055
4056ac_ext=c
4057ac_cpp='$CPP $CPPFLAGS'
4058ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4059ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4060ac_compiler_gnu=$ac_cv_c_compiler_gnu
4061
4062
d6e01aa5
KL
4063{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4064echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4065if test "${ac_cv_path_GREP+set}" = set; then
4066 echo $ECHO_N "(cached) $ECHO_C" >&6
4067else
4068 # Extract the first word of "grep ggrep" to use in msg output
4069if test -z "$GREP"; then
4070set dummy grep ggrep; ac_prog_name=$2
4071if test "${ac_cv_path_GREP+set}" = set; then
4072 echo $ECHO_N "(cached) $ECHO_C" >&6
4073else
4074 ac_path_GREP_found=false
4075# Loop through the user's path and test for each of PROGNAME-LIST
4076as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4077for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4078do
4079 IFS=$as_save_IFS
4080 test -z "$as_dir" && as_dir=.
4081 for ac_prog in grep ggrep; do
4082 for ac_exec_ext in '' $ac_executable_extensions; do
4083 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4084 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4085 # Check for GNU ac_path_GREP and select it if it is found.
4086 # Check for GNU $ac_path_GREP
4087case `"$ac_path_GREP" --version 2>&1` in
4088*GNU*)
4089 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4090*)
4091 ac_count=0
4092 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4093 while :
4094 do
4095 cat "conftest.in" "conftest.in" >"conftest.tmp"
4096 mv "conftest.tmp" "conftest.in"
4097 cp "conftest.in" "conftest.nl"
4098 echo 'GREP' >> "conftest.nl"
4099 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4100 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4101 ac_count=`expr $ac_count + 1`
4102 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4103 # Best one so far, save it but keep looking for a better one
4104 ac_cv_path_GREP="$ac_path_GREP"
4105 ac_path_GREP_max=$ac_count
4106 fi
4107 # 10*(2^10) chars as input seems more than enough
4108 test $ac_count -gt 10 && break
4109 done
4110 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4111esac
4112
4113
4114 $ac_path_GREP_found && break 3
4115 done
4116done
4117
4118done
4119IFS=$as_save_IFS
4120
4121
4122fi
4123
4124GREP="$ac_cv_path_GREP"
4125if test -z "$GREP"; then
4126 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4127echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4128 { (exit 1); exit 1; }; }
4129fi
4130
4131else
4132 ac_cv_path_GREP=$GREP
4133fi
4134
4135
4136fi
4137{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4138echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4139 GREP="$ac_cv_path_GREP"
4140
4141
4142{ echo "$as_me:$LINENO: checking for egrep" >&5
4143echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4144if test "${ac_cv_path_EGREP+set}" = set; then
4145 echo $ECHO_N "(cached) $ECHO_C" >&6
4146else
4147 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4148 then ac_cv_path_EGREP="$GREP -E"
4149 else
4150 # Extract the first word of "egrep" to use in msg output
4151if test -z "$EGREP"; then
4152set dummy egrep; ac_prog_name=$2
4153if test "${ac_cv_path_EGREP+set}" = set; then
e143ad11
AS
4154 echo $ECHO_N "(cached) $ECHO_C" >&6
4155else
d6e01aa5
KL
4156 ac_path_EGREP_found=false
4157# Loop through the user's path and test for each of PROGNAME-LIST
4158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4159for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4160do
4161 IFS=$as_save_IFS
4162 test -z "$as_dir" && as_dir=.
4163 for ac_prog in egrep; do
4164 for ac_exec_ext in '' $ac_executable_extensions; do
4165 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4166 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4167 # Check for GNU ac_path_EGREP and select it if it is found.
4168 # Check for GNU $ac_path_EGREP
4169case `"$ac_path_EGREP" --version 2>&1` in
4170*GNU*)
4171 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4172*)
4173 ac_count=0
4174 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4175 while :
4176 do
4177 cat "conftest.in" "conftest.in" >"conftest.tmp"
4178 mv "conftest.tmp" "conftest.in"
4179 cp "conftest.in" "conftest.nl"
4180 echo 'EGREP' >> "conftest.nl"
4181 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4182 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4183 ac_count=`expr $ac_count + 1`
4184 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4185 # Best one so far, save it but keep looking for a better one
4186 ac_cv_path_EGREP="$ac_path_EGREP"
4187 ac_path_EGREP_max=$ac_count
e143ad11 4188 fi
d6e01aa5
KL
4189 # 10*(2^10) chars as input seems more than enough
4190 test $ac_count -gt 10 && break
4191 done
4192 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4193esac
4194
4195
4196 $ac_path_EGREP_found && break 3
4197 done
4198done
4199
4200done
4201IFS=$as_save_IFS
4202
4203
4204fi
4205
4206EGREP="$ac_cv_path_EGREP"
4207if test -z "$EGREP"; then
4208 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4209echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4210 { (exit 1); exit 1; }; }
4211fi
4212
4213else
4214 ac_cv_path_EGREP=$EGREP
e143ad11 4215fi
d6e01aa5
KL
4216
4217
4218 fi
4219fi
4220{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4221echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4222 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4223
4224
4225
d6e01aa5
KL
4226{ echo "$as_me:$LINENO: checking for AIX" >&5
4227echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4228cat >conftest.$ac_ext <<_ACEOF
4229/* confdefs.h. */
4230_ACEOF
4231cat confdefs.h >>conftest.$ac_ext
4232cat >>conftest.$ac_ext <<_ACEOF
4233/* end confdefs.h. */
4234#ifdef _AIX
4235 yes
4236#endif
4237
4238_ACEOF
4239if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4240 $EGREP "yes" >/dev/null 2>&1; then
d6e01aa5
KL
4241 { echo "$as_me:$LINENO: result: yes" >&5
4242echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4243cat >>confdefs.h <<\_ACEOF
4244#define _ALL_SOURCE 1
4245_ACEOF
4246
4247else
d6e01aa5
KL
4248 { echo "$as_me:$LINENO: result: no" >&5
4249echo "${ECHO_T}no" >&6; }
e143ad11
AS
4250fi
4251rm -f conftest*
4252
4253
4254
4255cat >>confdefs.h <<\_ACEOF
4256#define _GNU_SOURCE 1
4257_ACEOF
4258
4259
4260
01abe918 4261### Use -Wno-pointer-sign if the compiler supports it
d6e01aa5
KL
4262{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4263echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4264SAVE_CFLAGS="$CFLAGS"
4265CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4266cat >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
4273int
4274main ()
4275{
4276
4277 ;
4278 return 0;
4279}
4280_ACEOF
4281rm -f conftest.$ac_objext
d6e01aa5
KL
4282if { (ac_try="$ac_compile"
4283case "(($ac_try" in
4284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4285 *) ac_try_echo=$ac_try;;
4286esac
4287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4288 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4289 ac_status=$?
4290 grep -v '^ *+' conftest.er1 >conftest.err
4291 rm -f conftest.er1
4292 cat conftest.err >&5
4293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4294 (exit $ac_status); } && {
4295 test -z "$ac_c_werror_flag" ||
4296 test ! -s conftest.err
4297 } && test -s conftest.$ac_objext; then
01abe918
CY
4298 has_option=yes
4299else
4300 echo "$as_me: failed program was:" >&5
4301sed 's/^/| /' conftest.$ac_ext >&5
4302
d6e01aa5 4303 has_option=no
01abe918 4304fi
d6e01aa5
KL
4305
4306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4307if test $has_option = yes; then
4308 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4309fi
d6e01aa5
KL
4310{ echo "$as_me:$LINENO: result: $has_option" >&5
4311echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4312CFLAGS="$SAVE_CFLAGS"
4313unset has_option
4314unset SAVE_CFLAGS
4315
6a3a24fa 4316#### Some other nice autoconf tests.
ba4481b5 4317
d6e01aa5
KL
4318{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4319echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4320LN_S=$as_ln_s
4321if test "$LN_S" = "ln -s"; then
d6e01aa5
KL
4322 { echo "$as_me:$LINENO: result: yes" >&5
4323echo "${ECHO_T}yes" >&6; }
ba4481b5 4324else
d6e01aa5
KL
4325 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4326echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4327fi
4328
503d2be0
AS
4329ac_ext=c
4330ac_cpp='$CPP $CPPFLAGS'
4331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4333ac_compiler_gnu=$ac_cv_c_compiler_gnu
d6e01aa5
KL
4334{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4335echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4336# On Suns, sometimes $CPP names a directory.
4337if test -n "$CPP" && test -d "$CPP"; then
4338 CPP=
4339fi
4340if test -z "$CPP"; then
503d2be0
AS
4341 if test "${ac_cv_prog_CPP+set}" = set; then
4342 echo $ECHO_N "(cached) $ECHO_C" >&6
4343else
4344 # Double quotes because CPP needs to be expanded
4345 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4346 do
4347 ac_preproc_ok=false
4348for ac_c_preproc_warn_flag in '' yes
4349do
4350 # Use a header file that comes with gcc, so configuring glibc
4351 # with a fresh cross-compiler works.
19650fd6
AS
4352 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4353 # <limits.h> exists even on freestanding compilers.
ba4481b5 4354 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4355 # not just through cpp. "Syntax error" is here to catch this case.
4356 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4357/* confdefs.h. */
4358_ACEOF
4359cat confdefs.h >>conftest.$ac_ext
4360cat >>conftest.$ac_ext <<_ACEOF
4361/* end confdefs.h. */
4362#ifdef __STDC__
4363# include <limits.h>
4364#else
4365# include <assert.h>
4366#endif
edfaf76d 4367 Syntax error
503d2be0 4368_ACEOF
d6e01aa5
KL
4369if { (ac_try="$ac_cpp conftest.$ac_ext"
4370case "(($ac_try" in
4371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4372 *) ac_try_echo=$ac_try;;
4373esac
4374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4375 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4376 ac_status=$?
6bae0ccf 4377 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4378 rm -f conftest.er1
4379 cat conftest.err >&5
c0d27fcc 4380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4381 (exit $ac_status); } >/dev/null && {
4382 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4383 test ! -s conftest.err
4384 }; then
ba4481b5
DL
4385 :
4386else
503d2be0 4387 echo "$as_me: failed program was:" >&5
19650fd6
AS
4388sed 's/^/| /' conftest.$ac_ext >&5
4389
503d2be0
AS
4390 # Broken: fails on valid input.
4391continue
4392fi
d6e01aa5 4393
503d2be0
AS
4394rm -f conftest.err conftest.$ac_ext
4395
d6e01aa5 4396 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4397 # can be detected and how.
4398 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4399/* confdefs.h. */
4400_ACEOF
4401cat confdefs.h >>conftest.$ac_ext
4402cat >>conftest.$ac_ext <<_ACEOF
4403/* end confdefs.h. */
503d2be0
AS
4404#include <ac_nonexistent.h>
4405_ACEOF
d6e01aa5
KL
4406if { (ac_try="$ac_cpp conftest.$ac_ext"
4407case "(($ac_try" in
4408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4409 *) ac_try_echo=$ac_try;;
4410esac
4411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4412 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4413 ac_status=$?
6bae0ccf 4414 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4415 rm -f conftest.er1
4416 cat conftest.err >&5
c0d27fcc 4417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4418 (exit $ac_status); } >/dev/null && {
4419 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4420 test ! -s conftest.err
4421 }; then
503d2be0
AS
4422 # Broken: success on invalid input.
4423continue
c4bb2108 4424else
503d2be0 4425 echo "$as_me: failed program was:" >&5
19650fd6
AS
4426sed 's/^/| /' conftest.$ac_ext >&5
4427
503d2be0
AS
4428 # Passes both tests.
4429ac_preproc_ok=:
4430break
4431fi
d6e01aa5 4432
503d2be0
AS
4433rm -f conftest.err conftest.$ac_ext
4434
4435done
4436# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4437rm -f conftest.err conftest.$ac_ext
4438if $ac_preproc_ok; then
4439 break
4440fi
4441
4442 done
4443 ac_cv_prog_CPP=$CPP
4444
4445fi
4446 CPP=$ac_cv_prog_CPP
4447else
4448 ac_cv_prog_CPP=$CPP
4449fi
d6e01aa5
KL
4450{ echo "$as_me:$LINENO: result: $CPP" >&5
4451echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4452ac_preproc_ok=false
4453for ac_c_preproc_warn_flag in '' yes
4454do
4455 # Use a header file that comes with gcc, so configuring glibc
4456 # with a fresh cross-compiler works.
19650fd6
AS
4457 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4458 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4459 # On the NeXT, cc -E runs the code through the compiler's parser,
4460 # not just through cpp. "Syntax error" is here to catch this case.
4461 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4462/* confdefs.h. */
4463_ACEOF
4464cat confdefs.h >>conftest.$ac_ext
4465cat >>conftest.$ac_ext <<_ACEOF
4466/* end confdefs.h. */
4467#ifdef __STDC__
4468# include <limits.h>
4469#else
4470# include <assert.h>
4471#endif
edfaf76d 4472 Syntax error
503d2be0 4473_ACEOF
d6e01aa5
KL
4474if { (ac_try="$ac_cpp conftest.$ac_ext"
4475case "(($ac_try" in
4476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4477 *) ac_try_echo=$ac_try;;
4478esac
4479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4480 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4481 ac_status=$?
6bae0ccf 4482 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4483 rm -f conftest.er1
4484 cat conftest.err >&5
c0d27fcc 4485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4486 (exit $ac_status); } >/dev/null && {
4487 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4488 test ! -s conftest.err
4489 }; then
ba4481b5
DL
4490 :
4491else
503d2be0 4492 echo "$as_me: failed program was:" >&5
19650fd6
AS
4493sed 's/^/| /' conftest.$ac_ext >&5
4494
503d2be0
AS
4495 # Broken: fails on valid input.
4496continue
4497fi
d6e01aa5 4498
503d2be0
AS
4499rm -f conftest.err conftest.$ac_ext
4500
d6e01aa5 4501 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4502 # can be detected and how.
4503 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4504/* confdefs.h. */
4505_ACEOF
4506cat confdefs.h >>conftest.$ac_ext
4507cat >>conftest.$ac_ext <<_ACEOF
4508/* end confdefs.h. */
503d2be0
AS
4509#include <ac_nonexistent.h>
4510_ACEOF
d6e01aa5
KL
4511if { (ac_try="$ac_cpp conftest.$ac_ext"
4512case "(($ac_try" in
4513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4514 *) ac_try_echo=$ac_try;;
4515esac
4516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4517 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4518 ac_status=$?
6bae0ccf 4519 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4520 rm -f conftest.er1
4521 cat conftest.err >&5
c0d27fcc 4522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4523 (exit $ac_status); } >/dev/null && {
4524 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4525 test ! -s conftest.err
4526 }; then
503d2be0
AS
4527 # Broken: success on invalid input.
4528continue
4529else
4530 echo "$as_me: failed program was:" >&5
19650fd6
AS
4531sed 's/^/| /' conftest.$ac_ext >&5
4532
503d2be0
AS
4533 # Passes both tests.
4534ac_preproc_ok=:
4535break
ba4481b5 4536fi
d6e01aa5 4537
503d2be0
AS
4538rm -f conftest.err conftest.$ac_ext
4539
4540done
4541# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4542rm -f conftest.err conftest.$ac_ext
4543if $ac_preproc_ok; then
4544 :
ba4481b5 4545else
19650fd6
AS
4546 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4547See \`config.log' for more details." >&5
4548echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4549See \`config.log' for more details." >&2;}
503d2be0 4550 { (exit 1); exit 1; }; }
ba4481b5 4551fi
503d2be0
AS
4552
4553ac_ext=c
4554ac_cpp='$CPP $CPPFLAGS'
4555ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4556ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4557ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4558
4559# Find a good install program. We prefer a C program (faster),
4560# so one script is as good as another. But avoid the broken or
4561# incompatible versions:
4562# SysV /etc/install, /usr/sbin/install
4563# SunOS /usr/etc/install
4564# IRIX /sbin/install
4565# AIX /bin/install
503d2be0 4566# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4567# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4568# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4569# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4570# OS/2's system install, which has a completely different semantic
ba4481b5 4571# ./install, which can be erroneously created by make from ./install.sh.
d6e01aa5
KL
4572{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4573echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 4574if test -z "$INSTALL"; then
503d2be0
AS
4575if test "${ac_cv_path_install+set}" = set; then
4576 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4577else
c0d27fcc
MR
4578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4579for as_dir in $PATH
4580do
4581 IFS=$as_save_IFS
4582 test -z "$as_dir" && as_dir=.
4583 # Account for people who put trailing slashes in PATH elements.
4584case $as_dir/ in
4585 ./ | .// | /cC/* | \
4586 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4587 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4588 /usr/ucb/* ) ;;
4589 *)
4590 # OSF1 and SCO ODT 3.0 have their own names for install.
4591 # Don't use installbsd from OSF since it installs stuff as root
4592 # by default.
4593 for ac_prog in ginstall scoinst install; do
4594 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 4595 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4596 if test $ac_prog = install &&
4597 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4598 # AIX install. It has an incompatible calling convention.
4599 :
4600 elif test $ac_prog = install &&
4601 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4602 # program-specific install script used by HP pwplus--don't use.
4603 :
4604 else
4605 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4606 break 3
4607 fi
4608 fi
ba4481b5 4609 done
c0d27fcc
MR
4610 done
4611 ;;
4612esac
4613done
d6e01aa5 4614IFS=$as_save_IFS
c0d27fcc 4615
ba4481b5
DL
4616
4617fi
4618 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4619 INSTALL=$ac_cv_path_install
ba4481b5 4620 else
d6e01aa5
KL
4621 # As a last resort, use the slow shell script. Don't cache a
4622 # value for INSTALL within a source directory, because that will
ba4481b5 4623 # break other packages using the cache if that directory is
d6e01aa5 4624 # removed, or if the value is a relative name.
503d2be0 4625 INSTALL=$ac_install_sh
ba4481b5
DL
4626 fi
4627fi
d6e01aa5
KL
4628{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4629echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
4630
4631# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4632# It thinks the first close brace ends the variable substitution.
4633test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4634
503d2be0 4635test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 4636
ba4481b5
DL
4637test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4638
c0d27fcc
MR
4639if test "x$RANLIB" = x; then
4640 if test -n "$ac_tool_prefix"; then
4641 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4642set dummy ${ac_tool_prefix}ranlib; ac_word=$2
d6e01aa5
KL
4643{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4644echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 4645if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 4646 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
4647else
4648 if test -n "$RANLIB"; then
4649 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4650else
c0d27fcc
MR
4651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4652for as_dir in $PATH
4653do
4654 IFS=$as_save_IFS
4655 test -z "$as_dir" && as_dir=.
4656 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 4657 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
4658 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4659 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4660 break 2
4661 fi
4662done
503d2be0 4663done
d6e01aa5 4664IFS=$as_save_IFS
503d2be0 4665
7397acc4
DL
4666fi
4667fi
503d2be0 4668RANLIB=$ac_cv_prog_RANLIB
7397acc4 4669if test -n "$RANLIB"; then
d6e01aa5
KL
4670 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4671echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 4672else
d6e01aa5
KL
4673 { echo "$as_me:$LINENO: result: no" >&5
4674echo "${ECHO_T}no" >&6; }
503d2be0
AS
4675fi
4676
d6e01aa5 4677
503d2be0
AS
4678fi
4679if test -z "$ac_cv_prog_RANLIB"; then
4680 ac_ct_RANLIB=$RANLIB
4681 # Extract the first word of "ranlib", so it can be a program name with args.
4682set dummy ranlib; ac_word=$2
d6e01aa5
KL
4683{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4684echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
4685if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4686 echo $ECHO_N "(cached) $ECHO_C" >&6
4687else
4688 if test -n "$ac_ct_RANLIB"; then
4689 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4690else
c0d27fcc
MR
4691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4692for as_dir in $PATH
4693do
4694 IFS=$as_save_IFS
4695 test -z "$as_dir" && as_dir=.
4696 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 4697 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
4698 ac_cv_prog_ac_ct_RANLIB="ranlib"
4699 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4700 break 2
4701 fi
4702done
503d2be0 4703done
d6e01aa5 4704IFS=$as_save_IFS
503d2be0 4705
503d2be0
AS
4706fi
4707fi
4708ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4709if test -n "$ac_ct_RANLIB"; then
d6e01aa5
KL
4710 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4711echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 4712else
d6e01aa5
KL
4713 { echo "$as_me:$LINENO: result: no" >&5
4714echo "${ECHO_T}no" >&6; }
503d2be0
AS
4715fi
4716
d6e01aa5
KL
4717 if test "x$ac_ct_RANLIB" = x; then
4718 RANLIB=":"
4719 else
4720 case $cross_compiling:$ac_tool_warned in
4721yes:)
4722{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4723whose name does not start with the host triplet. If you think this
4724configuration is useful to you, please write to autoconf@gnu.org." >&5
4725echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4726whose name does not start with the host triplet. If you think this
4727configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4728ac_tool_warned=yes ;;
4729esac
4730 RANLIB=$ac_ct_RANLIB
4731 fi
7397acc4 4732else
503d2be0 4733 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
4734fi
4735
4736fi
9e71690e
DK
4737# Extract the first word of "install-info", so it can be a program name with args.
4738set dummy install-info; ac_word=$2
d6e01aa5
KL
4739{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4740echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
4741if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4742 echo $ECHO_N "(cached) $ECHO_C" >&6
4743else
4744 case $INSTALL_INFO in
4745 [\\/]* | ?:[\\/]*)
4746 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4747 ;;
4748 *)
4749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4750for as_dir in $PATH
4751do
4752 IFS=$as_save_IFS
4753 test -z "$as_dir" && as_dir=.
4754 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 4755 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
4756 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4757 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4758 break 2
4759 fi
4760done
4761done
d6e01aa5 4762IFS=$as_save_IFS
9e71690e
DK
4763
4764 ;;
4765esac
4766fi
4767INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 4768if test -n "$INSTALL_INFO"; then
d6e01aa5
KL
4769 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4770echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 4771else
d6e01aa5
KL
4772 { echo "$as_me:$LINENO: result: no" >&5
4773echo "${ECHO_T}no" >&6; }
9e71690e
DK
4774fi
4775
d6e01aa5 4776
9e71690e
DK
4777# Extract the first word of "install-info", so it can be a program name with args.
4778set dummy install-info; ac_word=$2
d6e01aa5
KL
4779{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4780echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
4781if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4782 echo $ECHO_N "(cached) $ECHO_C" >&6
4783else
4784 case $INSTALL_INFO in
4785 [\\/]* | ?:[\\/]*)
4786 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4787 ;;
4788 *)
4789 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4790for as_dir in /usr/sbin
4791do
4792 IFS=$as_save_IFS
4793 test -z "$as_dir" && as_dir=.
4794 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 4795 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
4796 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4797 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4798 break 2
4799 fi
4800done
4801done
d6e01aa5 4802IFS=$as_save_IFS
9e71690e
DK
4803
4804 ;;
4805esac
4806fi
4807INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 4808if test -n "$INSTALL_INFO"; then
d6e01aa5
KL
4809 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4810echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 4811else
d6e01aa5
KL
4812 { echo "$as_me:$LINENO: result: no" >&5
4813echo "${ECHO_T}no" >&6; }
9e71690e
DK
4814fi
4815
d6e01aa5 4816
9e71690e
DK
4817# Extract the first word of "install-info", so it can be a program name with args.
4818set dummy install-info; ac_word=$2
d6e01aa5
KL
4819{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4820echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
4821if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4822 echo $ECHO_N "(cached) $ECHO_C" >&6
4823else
4824 case $INSTALL_INFO in
4825 [\\/]* | ?:[\\/]*)
4826 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4827 ;;
4828 *)
4829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4830for as_dir in /sbin
4831do
4832 IFS=$as_save_IFS
4833 test -z "$as_dir" && as_dir=.
4834 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 4835 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
4836 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4837 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4838 break 2
4839 fi
4840done
4841done
d6e01aa5 4842IFS=$as_save_IFS
9e71690e
DK
4843
4844 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4845 ;;
4846esac
4847fi
4848INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 4849if test -n "$INSTALL_INFO"; then
d6e01aa5
KL
4850 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4851echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 4852else
d6e01aa5
KL
4853 { echo "$as_me:$LINENO: result: no" >&5
4854echo "${ECHO_T}no" >&6; }
9e71690e
DK
4855fi
4856
d6e01aa5 4857
8ae52ca6
RF
4858# Extract the first word of "gzip", so it can be a program name with args.
4859set dummy gzip; ac_word=$2
d6e01aa5
KL
4860{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4861echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 4862if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
4863 echo $ECHO_N "(cached) $ECHO_C" >&6
4864else
46e35e9f 4865 case $GZIP_PROG in
8ae52ca6 4866 [\\/]* | ?:[\\/]*)
46e35e9f 4867 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
4868 ;;
4869 *)
4870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4871for as_dir in $PATH
4872do
4873 IFS=$as_save_IFS
4874 test -z "$as_dir" && as_dir=.
4875 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 4876 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 4877 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
4878 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4879 break 2
4880 fi
4881done
4882done
d6e01aa5 4883IFS=$as_save_IFS
8ae52ca6
RF
4884
4885 ;;
4886esac
4887fi
46e35e9f 4888GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 4889if test -n "$GZIP_PROG"; then
d6e01aa5
KL
4890 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
4891echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 4892else
d6e01aa5
KL
4893 { echo "$as_me:$LINENO: result: no" >&5
4894echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
4895fi
4896
ba4481b5 4897
c0d27fcc 4898
d6e01aa5 4899
c982cf7d
JD
4900## Need makeinfo >= 4.6 (?) to build the manuals.
4901# Extract the first word of "makeinfo", so it can be a program name with args.
4902set dummy makeinfo; ac_word=$2
4903{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4904echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4905if test "${ac_cv_path_MAKEINFO+set}" = set; then
4906 echo $ECHO_N "(cached) $ECHO_C" >&6
4907else
4908 case $MAKEINFO in
4909 [\\/]* | ?:[\\/]*)
4910 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
4911 ;;
4912 *)
4913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4914for as_dir in $PATH
4915do
4916 IFS=$as_save_IFS
4917 test -z "$as_dir" && as_dir=.
4918 for ac_exec_ext in '' $ac_executable_extensions; do
4919 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4920 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
4921 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4922 break 2
4923 fi
4924done
4925done
4926IFS=$as_save_IFS
4927
4928 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
4929 ;;
4930esac
4931fi
4932MAKEINFO=$ac_cv_path_MAKEINFO
4933if test -n "$MAKEINFO"; then
4934 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
4935echo "${ECHO_T}$MAKEINFO" >&6; }
4936else
4937 { echo "$as_me:$LINENO: result: no" >&5
4938echo "${ECHO_T}no" >&6; }
4939fi
4940
4941
4942if test "$MAKEINFO" != "no" && \
d4840f44 4943 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
c982cf7d
JD
4944 MAKEINFO=no
4945fi
4946
4947if test "$MAKEINFO" = "no"; then
4948 { { echo "$as_me:$LINENO: error: makeinfo >= 4.6 is required " >&5
4949echo "$as_me: error: makeinfo >= 4.6 is required " >&2;}
4950 { (exit 1); exit 1; }; }
4951fi
4952
4953
4954
8e967cf7
MR
4955if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
4956then
4957 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
4958fi
4959
4960if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
4961then
4962 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
4963fi
4964
c0d27fcc 4965
fe239f0f 4966late_LDFLAGS=$LDFLAGS
4af002d6 4967if test "$GCC" = yes; then
fe239f0f
AS
4968 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
4969else
4970 LDFLAGS="$LDFLAGS -znocombreloc"
4971fi
4972
d6e01aa5
KL
4973{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
4974echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
4975cat >conftest.$ac_ext <<_ACEOF
4976main(){return 0;}
4977_ACEOF
4978rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
4979if { (ac_try="$ac_link"
4980case "(($ac_try" in
4981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4982 *) ac_try_echo=$ac_try;;
4983esac
4984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4985 (eval "$ac_link") 2>conftest.er1
fe239f0f 4986 ac_status=$?
edfaf76d
LK
4987 grep -v '^ *+' conftest.er1 >conftest.err
4988 rm -f conftest.er1
4989 cat conftest.err >&5
fe239f0f 4990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4991 (exit $ac_status); } && {
4992 test -z "$ac_c_werror_flag" ||
4993 test ! -s conftest.err
4994 } && test -s conftest$ac_exeext &&
4995 $as_test_x conftest$ac_exeext; then
4996 { echo "$as_me:$LINENO: result: yes" >&5
4997echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
4998else
4999 echo "$as_me: failed program was:" >&5
5000sed 's/^/| /' conftest.$ac_ext >&5
5001
d6e01aa5
KL
5002 LDFLAGS=$late_LDFLAGS
5003 { echo "$as_me:$LINENO: result: no" >&5
5004echo "${ECHO_T}no" >&6; }
fe239f0f 5005fi
d6e01aa5
KL
5006
5007rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5008 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5009
3b33a005
DL
5010#### Extract some information from the operating system and machine files.
5011
c0d27fcc 5012{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5013 - which libraries the lib-src programs will want, and
503d2be0
AS
5014 - whether the GNU malloc routines are usable..." >&5
5015echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5016 - which libraries the lib-src programs will want, and
503d2be0 5017 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5018
5019### First figure out CFLAGS (which we use for running the compiler here)
5020### and REAL_CFLAGS (which we use for real compilation).
5021### The two are the same except on a few systems, where they are made
5022### different to work around various lossages. For example,
5023### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5024### as implying static linking.
5025
5026### If the CFLAGS env var is specified, we use that value
5027### instead of the default.
5028
5029### It's not important that this name contain the PID; you can't run
5030### two configures in the same directory and have anything work
5031### anyway.
5032tempcname="conftest.c"
5033
5034echo '
5035#include "'${srcdir}'/src/'${opsysfile}'"
5036#include "'${srcdir}'/src/'${machfile}'"
5037#ifndef LIBS_MACHINE
5038#define LIBS_MACHINE
5039#endif
5040#ifndef LIBS_SYSTEM
5041#define LIBS_SYSTEM
5042#endif
5043#ifndef C_SWITCH_SYSTEM
5044#define C_SWITCH_SYSTEM
5045#endif
5046#ifndef C_SWITCH_MACHINE
5047#define C_SWITCH_MACHINE
5048#endif
5049configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5050configure___ c_switch_system=C_SWITCH_SYSTEM
5051configure___ c_switch_machine=C_SWITCH_MACHINE
5052
5053#ifndef LIB_X11_LIB
5054#define LIB_X11_LIB -lX11
5055#endif
5056
5057#ifndef LIBX11_MACHINE
5058#define LIBX11_MACHINE
5059#endif
5060
5061#ifndef LIBX11_SYSTEM
5062#define LIBX11_SYSTEM
5063#endif
5064configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
5065
5066#ifdef UNEXEC
5067configure___ unexec=UNEXEC
5068#else
5069configure___ unexec=unexec.o
5070#endif
5071
5072#ifdef SYSTEM_MALLOC
5073configure___ system_malloc=yes
5074#else
5075configure___ system_malloc=no
5076#endif
5077
ef9e4345
GM
5078#ifdef USE_MMAP_FOR_BUFFERS
5079configure___ use_mmap_for_buffers=yes
73b77ee5 5080#else
ef9e4345 5081configure___ use_mmap_for_buffers=no
73b77ee5
GM
5082#endif
5083
3b33a005
DL
5084#ifndef C_DEBUG_SWITCH
5085#define C_DEBUG_SWITCH -g
5086#endif
5087
5088#ifndef C_OPTIMIZE_SWITCH
5089#ifdef __GNUC__
5090#define C_OPTIMIZE_SWITCH -O2
5091#else
5092#define C_OPTIMIZE_SWITCH -O
5093#endif
5094#endif
5095
01abe918
CY
5096#ifndef C_WARNINGS_SWITCH
5097#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5098#endif
5099
3b33a005
DL
5100#ifndef LD_SWITCH_MACHINE
5101#define LD_SWITCH_MACHINE
5102#endif
5103
5104#ifndef LD_SWITCH_SYSTEM
5105#define LD_SWITCH_SYSTEM
5106#endif
5107
5108#ifndef LD_SWITCH_X_SITE_AUX
5109#define LD_SWITCH_X_SITE_AUX
503d2be0 5110#endif
3b33a005
DL
5111
5112configure___ ld_switch_system=LD_SWITCH_SYSTEM
5113configure___ ld_switch_machine=LD_SWITCH_MACHINE
5114
5115#ifdef THIS_IS_CONFIGURE
5116
5117/* Get the CFLAGS for tests in configure. */
5118#ifdef __GNUC__
5119configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5120#else
5121configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5122#endif
5123
5124#else /* not THIS_IS_CONFIGURE */
5125
5126/* Get the CFLAGS for real compilation. */
5127#ifdef __GNUC__
01abe918 5128configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5129#else
5130configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5131#endif
5132
5133#endif /* not THIS_IS_CONFIGURE */
5134' > ${tempcname}
5135
5136# The value of CPP is a quoted variable reference, so we need to do this
5137# to get its actual value...
5138CPP=`eval "echo $CPP"`
5139eval `${CPP} -Isrc ${tempcname} \
5140 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5141if test "x$SPECIFIED_CFLAGS" = x; then
5142 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5143 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5144else
5145 REAL_CFLAGS="$CFLAGS"
5146fi
5147rm ${tempcname}
5148
5149ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5150
5151### Make sure subsequent tests use flags consistent with the build flags.
5152
5153if test x"${OVERRIDE_CPPFLAGS}" != x; then
5154 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5155else
5156 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5157fi
5158
6bae0ccf
DL
5159
5160
d6e01aa5 5161# Check whether --enable-largefile was given.
f4988be7 5162if test "${enable_largefile+set}" = set; then
d6e01aa5
KL
5163 enableval=$enable_largefile;
5164fi
f4988be7 5165
503d2be0 5166if test "$enable_largefile" != no; then
f4988be7 5167
d6e01aa5
KL
5168 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5169echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5170if test "${ac_cv_sys_largefile_CC+set}" = set; then
5171 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5172else
f4988be7 5173 ac_cv_sys_largefile_CC=no
503d2be0
AS
5174 if test "$GCC" != yes; then
5175 ac_save_CC=$CC
5176 while :; do
d6e01aa5
KL
5177 # IRIX 6.2 and later do not support large files by default,
5178 # so use the C compiler's -n32 option if that helps.
edfaf76d 5179 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5180/* confdefs.h. */
5181_ACEOF
5182cat confdefs.h >>conftest.$ac_ext
5183cat >>conftest.$ac_ext <<_ACEOF
5184/* end confdefs.h. */
f4988be7 5185#include <sys/types.h>
503d2be0
AS
5186 /* Check that off_t can represent 2**63 - 1 correctly.
5187 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5188 since some C++ compilers masquerading as C compilers
5189 incorrectly reject 9223372036854775807. */
5190#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5191 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5192 && LARGE_OFF_T % 2147483647 == 1)
5193 ? 1 : -1];
5194int
5195main ()
5196{
f4988be7 5197
503d2be0
AS
5198 ;
5199 return 0;
5200}
5201_ACEOF
d6e01aa5
KL
5202 rm -f conftest.$ac_objext
5203if { (ac_try="$ac_compile"
5204case "(($ac_try" in
5205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5206 *) ac_try_echo=$ac_try;;
5207esac
5208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5209 (eval "$ac_compile") 2>conftest.er1
503d2be0 5210 ac_status=$?
edfaf76d
LK
5211 grep -v '^ *+' conftest.er1 >conftest.err
5212 rm -f conftest.er1
5213 cat conftest.err >&5
c0d27fcc 5214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5215 (exit $ac_status); } && {
5216 test -z "$ac_c_werror_flag" ||
5217 test ! -s conftest.err
5218 } && test -s conftest.$ac_objext; then
503d2be0 5219 break
b192d653 5220else
503d2be0 5221 echo "$as_me: failed program was:" >&5
19650fd6
AS
5222sed 's/^/| /' conftest.$ac_ext >&5
5223
d6e01aa5 5224
503d2be0 5225fi
d6e01aa5
KL
5226
5227rm -f core conftest.err conftest.$ac_objext
5228 CC="$CC -n32"
5229 rm -f conftest.$ac_objext
5230if { (ac_try="$ac_compile"
5231case "(($ac_try" in
5232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5233 *) ac_try_echo=$ac_try;;
5234esac
5235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5236 (eval "$ac_compile") 2>conftest.er1
503d2be0 5237 ac_status=$?
edfaf76d
LK
5238 grep -v '^ *+' conftest.er1 >conftest.err
5239 rm -f conftest.er1
5240 cat conftest.err >&5
c0d27fcc 5241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5242 (exit $ac_status); } && {
5243 test -z "$ac_c_werror_flag" ||
5244 test ! -s conftest.err
5245 } && test -s conftest.$ac_objext; then
503d2be0
AS
5246 ac_cv_sys_largefile_CC=' -n32'; break
5247else
5248 echo "$as_me: failed program was:" >&5
19650fd6
AS
5249sed 's/^/| /' conftest.$ac_ext >&5
5250
d6e01aa5 5251
503d2be0 5252fi
d6e01aa5
KL
5253
5254rm -f core conftest.err conftest.$ac_objext
edfaf76d 5255 break
503d2be0
AS
5256 done
5257 CC=$ac_save_CC
5258 rm -f conftest.$ac_ext
5259 fi
b192d653 5260fi
d6e01aa5
KL
5261{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5262echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5263 if test "$ac_cv_sys_largefile_CC" != no; then
5264 CC=$CC$ac_cv_sys_largefile_CC
5265 fi
b192d653 5266
d6e01aa5
KL
5267 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5268echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5269if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5270 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5271else
503d2be0 5272 while :; do
503d2be0 5273 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5274/* confdefs.h. */
5275_ACEOF
5276cat confdefs.h >>conftest.$ac_ext
5277cat >>conftest.$ac_ext <<_ACEOF
5278/* end confdefs.h. */
f4988be7 5279#include <sys/types.h>
503d2be0
AS
5280 /* Check that off_t can represent 2**63 - 1 correctly.
5281 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5282 since some C++ compilers masquerading as C compilers
5283 incorrectly reject 9223372036854775807. */
5284#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5285 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5286 && LARGE_OFF_T % 2147483647 == 1)
5287 ? 1 : -1];
5288int
5289main ()
5290{
f4988be7 5291
503d2be0
AS
5292 ;
5293 return 0;
5294}
5295_ACEOF
5296rm -f conftest.$ac_objext
d6e01aa5
KL
5297if { (ac_try="$ac_compile"
5298case "(($ac_try" in
5299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5300 *) ac_try_echo=$ac_try;;
5301esac
5302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5303 (eval "$ac_compile") 2>conftest.er1
503d2be0 5304 ac_status=$?
edfaf76d
LK
5305 grep -v '^ *+' conftest.er1 >conftest.err
5306 rm -f conftest.er1
5307 cat conftest.err >&5
c0d27fcc 5308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5309 (exit $ac_status); } && {
5310 test -z "$ac_c_werror_flag" ||
5311 test ! -s conftest.err
5312 } && test -s conftest.$ac_objext; then
5313 ac_cv_sys_file_offset_bits=no; break
f4988be7 5314else
503d2be0 5315 echo "$as_me: failed program was:" >&5
19650fd6
AS
5316sed 's/^/| /' conftest.$ac_ext >&5
5317
d6e01aa5 5318
503d2be0 5319fi
d6e01aa5
KL
5320
5321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5322 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5323/* confdefs.h. */
5324_ACEOF
5325cat confdefs.h >>conftest.$ac_ext
5326cat >>conftest.$ac_ext <<_ACEOF
5327/* end confdefs.h. */
f4988be7
GM
5328#define _FILE_OFFSET_BITS 64
5329#include <sys/types.h>
503d2be0
AS
5330 /* Check that off_t can represent 2**63 - 1 correctly.
5331 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5332 since some C++ compilers masquerading as C compilers
5333 incorrectly reject 9223372036854775807. */
5334#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5335 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5336 && LARGE_OFF_T % 2147483647 == 1)
5337 ? 1 : -1];
5338int
5339main ()
5340{
5341
5342 ;
5343 return 0;
5344}
5345_ACEOF
5346rm -f conftest.$ac_objext
d6e01aa5
KL
5347if { (ac_try="$ac_compile"
5348case "(($ac_try" in
5349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5350 *) ac_try_echo=$ac_try;;
5351esac
5352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5353 (eval "$ac_compile") 2>conftest.er1
503d2be0 5354 ac_status=$?
edfaf76d
LK
5355 grep -v '^ *+' conftest.er1 >conftest.err
5356 rm -f conftest.er1
5357 cat conftest.err >&5
c0d27fcc 5358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5359 (exit $ac_status); } && {
5360 test -z "$ac_c_werror_flag" ||
5361 test ! -s conftest.err
5362 } && test -s conftest.$ac_objext; then
503d2be0
AS
5363 ac_cv_sys_file_offset_bits=64; break
5364else
5365 echo "$as_me: failed program was:" >&5
19650fd6
AS
5366sed 's/^/| /' conftest.$ac_ext >&5
5367
d6e01aa5 5368
503d2be0 5369fi
d6e01aa5
KL
5370
5371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5372 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5373 break
5374done
ba4481b5 5375fi
d6e01aa5
KL
5376{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5377echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
5378case $ac_cv_sys_file_offset_bits in #(
5379 no | unknown) ;;
5380 *)
c0d27fcc 5381cat >>confdefs.h <<_ACEOF
f4988be7 5382#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5383_ACEOF
d6e01aa5
KL
5384;;
5385esac
503d2be0 5386rm -f conftest*
d6e01aa5
KL
5387 if test $ac_cv_sys_file_offset_bits = unknown; then
5388 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
5389echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5390if test "${ac_cv_sys_large_files+set}" = set; then
5391 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5392else
503d2be0 5393 while :; do
503d2be0 5394 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5395/* confdefs.h. */
5396_ACEOF
5397cat confdefs.h >>conftest.$ac_ext
5398cat >>conftest.$ac_ext <<_ACEOF
5399/* end confdefs.h. */
503d2be0
AS
5400#include <sys/types.h>
5401 /* Check that off_t can represent 2**63 - 1 correctly.
5402 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5403 since some C++ compilers masquerading as C compilers
5404 incorrectly reject 9223372036854775807. */
5405#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5406 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5407 && LARGE_OFF_T % 2147483647 == 1)
5408 ? 1 : -1];
5409int
5410main ()
5411{
ba4481b5 5412
503d2be0
AS
5413 ;
5414 return 0;
5415}
5416_ACEOF
5417rm -f conftest.$ac_objext
d6e01aa5
KL
5418if { (ac_try="$ac_compile"
5419case "(($ac_try" in
5420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5421 *) ac_try_echo=$ac_try;;
5422esac
5423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5424 (eval "$ac_compile") 2>conftest.er1
503d2be0 5425 ac_status=$?
edfaf76d
LK
5426 grep -v '^ *+' conftest.er1 >conftest.err
5427 rm -f conftest.er1
5428 cat conftest.err >&5
c0d27fcc 5429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5430 (exit $ac_status); } && {
5431 test -z "$ac_c_werror_flag" ||
5432 test ! -s conftest.err
5433 } && test -s conftest.$ac_objext; then
5434 ac_cv_sys_large_files=no; break
ba4481b5 5435else
503d2be0 5436 echo "$as_me: failed program was:" >&5
19650fd6
AS
5437sed 's/^/| /' conftest.$ac_ext >&5
5438
d6e01aa5 5439
503d2be0 5440fi
d6e01aa5
KL
5441
5442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5443 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5444/* confdefs.h. */
5445_ACEOF
5446cat confdefs.h >>conftest.$ac_ext
5447cat >>conftest.$ac_ext <<_ACEOF
5448/* end confdefs.h. */
f4988be7 5449#define _LARGE_FILES 1
503d2be0
AS
5450#include <sys/types.h>
5451 /* Check that off_t can represent 2**63 - 1 correctly.
5452 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5453 since some C++ compilers masquerading as C compilers
5454 incorrectly reject 9223372036854775807. */
5455#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5456 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5457 && LARGE_OFF_T % 2147483647 == 1)
5458 ? 1 : -1];
5459int
5460main ()
5461{
f4988be7 5462
503d2be0
AS
5463 ;
5464 return 0;
5465}
5466_ACEOF
5467rm -f conftest.$ac_objext
d6e01aa5
KL
5468if { (ac_try="$ac_compile"
5469case "(($ac_try" in
5470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5471 *) ac_try_echo=$ac_try;;
5472esac
5473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5474 (eval "$ac_compile") 2>conftest.er1
503d2be0 5475 ac_status=$?
edfaf76d
LK
5476 grep -v '^ *+' conftest.er1 >conftest.err
5477 rm -f conftest.er1
5478 cat conftest.err >&5
c0d27fcc 5479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5480 (exit $ac_status); } && {
5481 test -z "$ac_c_werror_flag" ||
5482 test ! -s conftest.err
5483 } && test -s conftest.$ac_objext; then
503d2be0
AS
5484 ac_cv_sys_large_files=1; break
5485else
5486 echo "$as_me: failed program was:" >&5
19650fd6
AS
5487sed 's/^/| /' conftest.$ac_ext >&5
5488
d6e01aa5 5489
503d2be0 5490fi
d6e01aa5
KL
5491
5492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5493 ac_cv_sys_large_files=unknown
503d2be0
AS
5494 break
5495done
ba4481b5 5496fi
d6e01aa5
KL
5497{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5498echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
5499case $ac_cv_sys_large_files in #(
5500 no | unknown) ;;
5501 *)
c0d27fcc 5502cat >>confdefs.h <<_ACEOF
f4988be7 5503#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5504_ACEOF
d6e01aa5
KL
5505;;
5506esac
503d2be0 5507rm -f conftest*
d6e01aa5 5508 fi
503d2be0 5509fi
ba4481b5 5510
c0d27fcc 5511
439f58ee 5512
55e6d9b2 5513### The standard library on x86-64 and s390x GNU/Linux distributions can
bc5d9888
CY
5514### be located in either /usr/lib64 or /usr/lib.
5515case "${canonical}" in
55e6d9b2 5516 x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
bc5d9888
CY
5517 if test -d /usr/lib64; then
5518
5519cat >>confdefs.h <<\_ACEOF
55e6d9b2 5520#define HAVE_LIB64_DIR 1
bc5d9888
CY
5521_ACEOF
5522
5523fi
5524esac
5525
439f58ee
JD
5526
5527
5528
2c9dccc9
PJ
5529if test "${with_sound}" != "no"; then
5530 # Sound support for GNU/Linux and the free BSDs.
d6e01aa5
KL
5531 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5532echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
c0d27fcc
MR
5533if test "${ac_cv_header_stdc+set}" = set; then
5534 echo $ECHO_N "(cached) $ECHO_C" >&6
5535else
5536 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5537/* confdefs.h. */
5538_ACEOF
5539cat confdefs.h >>conftest.$ac_ext
5540cat >>conftest.$ac_ext <<_ACEOF
5541/* end confdefs.h. */
c0d27fcc
MR
5542#include <stdlib.h>
5543#include <stdarg.h>
5544#include <string.h>
5545#include <float.h>
98418dba 5546
19650fd6
AS
5547int
5548main ()
5549{
5550
5551 ;
5552 return 0;
5553}
c0d27fcc 5554_ACEOF
19650fd6 5555rm -f conftest.$ac_objext
d6e01aa5
KL
5556if { (ac_try="$ac_compile"
5557case "(($ac_try" in
5558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5559 *) ac_try_echo=$ac_try;;
5560esac
5561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5562 (eval "$ac_compile") 2>conftest.er1
cd958eb3 5563 ac_status=$?
edfaf76d
LK
5564 grep -v '^ *+' conftest.er1 >conftest.err
5565 rm -f conftest.er1
5566 cat conftest.err >&5
cd958eb3 5567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5568 (exit $ac_status); } && {
5569 test -z "$ac_c_werror_flag" ||
5570 test ! -s conftest.err
5571 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5572 ac_cv_header_stdc=yes
5573else
5574 echo "$as_me: failed program was:" >&5
19650fd6
AS
5575sed 's/^/| /' conftest.$ac_ext >&5
5576
d6e01aa5 5577 ac_cv_header_stdc=no
c0d27fcc 5578fi
d6e01aa5
KL
5579
5580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5581
5582if test $ac_cv_header_stdc = yes; then
5583 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5584 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5585/* confdefs.h. */
5586_ACEOF
5587cat confdefs.h >>conftest.$ac_ext
5588cat >>conftest.$ac_ext <<_ACEOF
5589/* end confdefs.h. */
c0d27fcc
MR
5590#include <string.h>
5591
5592_ACEOF
5593if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5594 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
5595 :
5596else
5597 ac_cv_header_stdc=no
5598fi
5599rm -f conftest*
5600
5601fi
5602
5603if test $ac_cv_header_stdc = yes; then
5604 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5605 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5606/* confdefs.h. */
5607_ACEOF
5608cat confdefs.h >>conftest.$ac_ext
5609cat >>conftest.$ac_ext <<_ACEOF
5610/* end confdefs.h. */
c0d27fcc
MR
5611#include <stdlib.h>
5612
5613_ACEOF
5614if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5615 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
5616 :
5617else
5618 ac_cv_header_stdc=no
5619fi
5620rm -f conftest*
5621
5622fi
5623
5624if test $ac_cv_header_stdc = yes; then
5625 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5626 if test "$cross_compiling" = yes; then
5627 :
5628else
5629 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5630/* confdefs.h. */
5631_ACEOF
5632cat confdefs.h >>conftest.$ac_ext
5633cat >>conftest.$ac_ext <<_ACEOF
5634/* end confdefs.h. */
c0d27fcc 5635#include <ctype.h>
d6e01aa5 5636#include <stdlib.h>
c0d27fcc
MR
5637#if ((' ' & 0x0FF) == 0x020)
5638# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5639# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5640#else
19650fd6 5641# define ISLOWER(c) \
edfaf76d
LK
5642 (('a' <= (c) && (c) <= 'i') \
5643 || ('j' <= (c) && (c) <= 'r') \
5644 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
5645# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5646#endif
5647
5648#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5649int
5650main ()
5651{
5652 int i;
5653 for (i = 0; i < 256; i++)
5654 if (XOR (islower (i), ISLOWER (i))
edfaf76d 5655 || toupper (i) != TOUPPER (i))
d6e01aa5
KL
5656 return 2;
5657 return 0;
c0d27fcc
MR
5658}
5659_ACEOF
5660rm -f conftest$ac_exeext
d6e01aa5
KL
5661if { (ac_try="$ac_link"
5662case "(($ac_try" in
5663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5664 *) ac_try_echo=$ac_try;;
5665esac
5666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5667 (eval "$ac_link") 2>&5
c0d27fcc
MR
5668 ac_status=$?
5669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5670 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
5671 { (case "(($ac_try" in
5672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5673 *) ac_try_echo=$ac_try;;
5674esac
5675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5676 (eval "$ac_try") 2>&5
c0d27fcc
MR
5677 ac_status=$?
5678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5679 (exit $ac_status); }; }; then
5680 :
5681else
5682 echo "$as_me: program exited with status $ac_status" >&5
5683echo "$as_me: failed program was:" >&5
19650fd6
AS
5684sed 's/^/| /' conftest.$ac_ext >&5
5685
c0d27fcc
MR
5686( exit $ac_status )
5687ac_cv_header_stdc=no
5688fi
d6e01aa5 5689rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc 5690fi
d6e01aa5
KL
5691
5692
c0d27fcc
MR
5693fi
5694fi
d6e01aa5
KL
5695{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5696echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
c0d27fcc
MR
5697if test $ac_cv_header_stdc = yes; then
5698
5699cat >>confdefs.h <<\_ACEOF
5700#define STDC_HEADERS 1
5701_ACEOF
5702
5703fi
5704
5705# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 5716 inttypes.h stdint.h unistd.h
98418dba
CW
5717do
5718as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
5719{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5720echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5721if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 5722 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5723else
925c2f3f 5724 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5725/* confdefs.h. */
5726_ACEOF
5727cat confdefs.h >>conftest.$ac_ext
5728cat >>conftest.$ac_ext <<_ACEOF
5729/* end confdefs.h. */
c0d27fcc
MR
5730$ac_includes_default
5731
5732#include <$ac_header>
5733_ACEOF
5734rm -f conftest.$ac_objext
d6e01aa5
KL
5735if { (ac_try="$ac_compile"
5736case "(($ac_try" in
5737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5738 *) ac_try_echo=$ac_try;;
5739esac
5740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5741 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 5742 ac_status=$?
edfaf76d
LK
5743 grep -v '^ *+' conftest.er1 >conftest.err
5744 rm -f conftest.er1
5745 cat conftest.err >&5
c0d27fcc 5746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5747 (exit $ac_status); } && {
5748 test -z "$ac_c_werror_flag" ||
5749 test ! -s conftest.err
5750 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5751 eval "$as_ac_Header=yes"
5752else
5753 echo "$as_me: failed program was:" >&5
19650fd6
AS
5754sed 's/^/| /' conftest.$ac_ext >&5
5755
d6e01aa5 5756 eval "$as_ac_Header=no"
c0d27fcc 5757fi
d6e01aa5
KL
5758
5759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc 5760fi
d6e01aa5
KL
5761ac_res=`eval echo '${'$as_ac_Header'}'`
5762 { echo "$as_me:$LINENO: result: $ac_res" >&5
5763echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
5764if test `eval echo '${'$as_ac_Header'}'` = yes; then
5765 cat >>confdefs.h <<_ACEOF
5766#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5767_ACEOF
5768
5769fi
5770
5771done
5772
5773
5774
5775
5776
5777for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5778do
5779as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
5780if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5781 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5782echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5783if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
5784 echo $ECHO_N "(cached) $ECHO_C" >&6
5785fi
d6e01aa5
KL
5786ac_res=`eval echo '${'$as_ac_Header'}'`
5787 { echo "$as_me:$LINENO: result: $ac_res" >&5
5788echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
5789else
5790 # Is the header compilable?
d6e01aa5
KL
5791{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5792echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 5793cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5794/* confdefs.h. */
5795_ACEOF
5796cat confdefs.h >>conftest.$ac_ext
5797cat >>conftest.$ac_ext <<_ACEOF
5798/* end confdefs.h. */
c0d27fcc 5799$ac_includes_default
98418dba 5800#include <$ac_header>
503d2be0 5801_ACEOF
c0d27fcc 5802rm -f conftest.$ac_objext
d6e01aa5
KL
5803if { (ac_try="$ac_compile"
5804case "(($ac_try" in
5805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5806 *) ac_try_echo=$ac_try;;
5807esac
5808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5809 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 5810 ac_status=$?
edfaf76d
LK
5811 grep -v '^ *+' conftest.er1 >conftest.err
5812 rm -f conftest.er1
5813 cat conftest.err >&5
c0d27fcc 5814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5815 (exit $ac_status); } && {
5816 test -z "$ac_c_werror_flag" ||
5817 test ! -s conftest.err
5818 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5819 ac_header_compiler=yes
5820else
5821 echo "$as_me: failed program was:" >&5
19650fd6
AS
5822sed 's/^/| /' conftest.$ac_ext >&5
5823
d6e01aa5 5824 ac_header_compiler=no
c0d27fcc 5825fi
d6e01aa5
KL
5826
5827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5828{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5829echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
5830
5831# Is the header present?
d6e01aa5
KL
5832{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5833echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 5834cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5835/* confdefs.h. */
5836_ACEOF
5837cat confdefs.h >>conftest.$ac_ext
5838cat >>conftest.$ac_ext <<_ACEOF
5839/* end confdefs.h. */
c0d27fcc
MR
5840#include <$ac_header>
5841_ACEOF
d6e01aa5
KL
5842if { (ac_try="$ac_cpp conftest.$ac_ext"
5843case "(($ac_try" in
5844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5845 *) ac_try_echo=$ac_try;;
5846esac
5847eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5848 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 5849 ac_status=$?
6bae0ccf 5850 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5851 rm -f conftest.er1
5852 cat conftest.err >&5
c0d27fcc 5853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5854 (exit $ac_status); } >/dev/null && {
5855 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5856 test ! -s conftest.err
5857 }; then
c0d27fcc 5858 ac_header_preproc=yes
f4988be7 5859else
503d2be0 5860 echo "$as_me: failed program was:" >&5
19650fd6
AS
5861sed 's/^/| /' conftest.$ac_ext >&5
5862
c0d27fcc 5863 ac_header_preproc=no
f4988be7 5864fi
d6e01aa5 5865
98418dba 5866rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
5867{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5868echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
5869
5870# So? What about this header?
edfaf76d
LK
5871case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5872 yes:no: )
c0d27fcc
MR
5873 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5874echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
5875 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5876echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5877 ac_header_preproc=yes
19650fd6 5878 ;;
edfaf76d 5879 no:yes:* )
c0d27fcc
MR
5880 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5881echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
5882 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5883echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5884 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5885echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5886 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5887echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5888 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5889echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
5890 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5891echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 5892
19650fd6 5893 ;;
c0d27fcc 5894esac
d6e01aa5
KL
5895{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5896echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5897if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
5898 echo $ECHO_N "(cached) $ECHO_C" >&6
5899else
edfaf76d 5900 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 5901fi
d6e01aa5
KL
5902ac_res=`eval echo '${'$as_ac_Header'}'`
5903 { echo "$as_me:$LINENO: result: $ac_res" >&5
5904echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
5905
5906fi
98418dba 5907if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5908 cat >>confdefs.h <<_ACEOF
98418dba 5909#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5910_ACEOF
f4988be7
GM
5911
5912fi
c0d27fcc 5913
98418dba
CW
5914done
5915
5916 # Emulation library used on NetBSD.
d6e01aa5
KL
5917 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
5918echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 5919if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 5920 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5921else
98418dba
CW
5922 ac_check_lib_save_LIBS=$LIBS
5923LIBS="-lossaudio $LIBS"
5924cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5925/* confdefs.h. */
5926_ACEOF
5927cat confdefs.h >>conftest.$ac_ext
5928cat >>conftest.$ac_ext <<_ACEOF
5929/* end confdefs.h. */
98418dba 5930
d6e01aa5
KL
5931/* Override any GCC internal prototype to avoid an error.
5932 Use char because int might match the return type of a GCC
5933 builtin and then its argument prototype would still apply. */
98418dba
CW
5934#ifdef __cplusplus
5935extern "C"
f4988be7 5936#endif
98418dba 5937char _oss_ioctl ();
503d2be0
AS
5938int
5939main ()
5940{
d6e01aa5 5941return _oss_ioctl ();
503d2be0
AS
5942 ;
5943 return 0;
5944}
5945_ACEOF
98418dba 5946rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
5947if { (ac_try="$ac_link"
5948case "(($ac_try" in
5949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5950 *) ac_try_echo=$ac_try;;
5951esac
5952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5953 (eval "$ac_link") 2>conftest.er1
503d2be0 5954 ac_status=$?
edfaf76d
LK
5955 grep -v '^ *+' conftest.er1 >conftest.err
5956 rm -f conftest.er1
5957 cat conftest.err >&5
c0d27fcc 5958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5959 (exit $ac_status); } && {
5960 test -z "$ac_c_werror_flag" ||
5961 test ! -s conftest.err
5962 } && test -s conftest$ac_exeext &&
5963 $as_test_x conftest$ac_exeext; then
98418dba 5964 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 5965else
503d2be0 5966 echo "$as_me: failed program was:" >&5
19650fd6
AS
5967sed 's/^/| /' conftest.$ac_ext >&5
5968
d6e01aa5 5969 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 5970fi
d6e01aa5
KL
5971
5972rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5973 conftest$ac_exeext conftest.$ac_ext
98418dba 5974LIBS=$ac_check_lib_save_LIBS
f4988be7 5975fi
d6e01aa5
KL
5976{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
5977echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
5978if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
5979 LIBSOUND=-lossaudio
5980else
5981 LIBSOUND=
5982fi
5983
c0d27fcc 5984
439f58ee
JD
5985
5986 ALSA_REQUIRED=1.0.0
5987 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
5988 if test "X${with_pkg_config_prog}" != X; then
5989 PKG_CONFIG="${with_pkg_config_prog}"
5990 fi
5991
5992 succeeded=no
5993
5994 if test -z "$PKG_CONFIG"; then
5995 # Extract the first word of "pkg-config", so it can be a program name with args.
5996set dummy pkg-config; ac_word=$2
d6e01aa5
KL
5997{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5998echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
5999if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6000 echo $ECHO_N "(cached) $ECHO_C" >&6
6001else
6002 case $PKG_CONFIG in
6003 [\\/]* | ?:[\\/]*)
6004 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6005 ;;
6006 *)
6007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6008for as_dir in $PATH
6009do
6010 IFS=$as_save_IFS
6011 test -z "$as_dir" && as_dir=.
6012 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 6013 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6014 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6015 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6016 break 2
6017 fi
6018done
6019done
d6e01aa5 6020IFS=$as_save_IFS
439f58ee
JD
6021
6022 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6023 ;;
6024esac
6025fi
6026PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6027if test -n "$PKG_CONFIG"; then
d6e01aa5
KL
6028 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6029echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6030else
d6e01aa5
KL
6031 { echo "$as_me:$LINENO: result: no" >&5
6032echo "${ECHO_T}no" >&6; }
439f58ee
JD
6033fi
6034
d6e01aa5 6035
439f58ee
JD
6036 fi
6037
6038 if test "$PKG_CONFIG" = "no" ; then
6039 HAVE_ALSA=no
6040 else
6041 PKG_CONFIG_MIN_VERSION=0.9.0
6042 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
d6e01aa5
KL
6043 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6044echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6045
67db6aa2 6046 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
d6e01aa5
KL
6047 { echo "$as_me:$LINENO: result: yes" >&5
6048echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6049 succeeded=yes
6050
d6e01aa5
KL
6051 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6052echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6053 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
d6e01aa5
KL
6054 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6055echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6056
d6e01aa5
KL
6057 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6058echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6059 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
d6e01aa5
KL
6060 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6061echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6062 else
d6e01aa5
KL
6063 { echo "$as_me:$LINENO: result: no" >&5
6064echo "${ECHO_T}no" >&6; }
439f58ee
JD
6065 ALSA_CFLAGS=""
6066 ALSA_LIBS=""
6067 ## If we have a custom action on failure, don't print errors, but
6068 ## do set a variable so people can do so.
6069 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6070
6071 fi
6072
6073
6074
6075 else
6076 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6077 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6078 fi
6079 fi
6080
6081 if test $succeeded = yes; then
6082 HAVE_ALSA=yes
6083 else
6084 HAVE_ALSA=no
6085 fi
6086
6087 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6088 SAVE_CFLAGS="$CFLAGS"
6089 SAVE_LDFLAGS="$LDFLAGS"
6090 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6091 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6092 cat >conftest.$ac_ext <<_ACEOF
6093/* confdefs.h. */
6094_ACEOF
6095cat confdefs.h >>conftest.$ac_ext
6096cat >>conftest.$ac_ext <<_ACEOF
6097/* end confdefs.h. */
6098#include <asoundlib.h>
6099int
6100main ()
6101{
6102snd_lib_error_set_handler (0);
6103 ;
6104 return 0;
6105}
6106_ACEOF
6107rm -f conftest.$ac_objext
6108if { (ac_try="$ac_compile"
6109case "(($ac_try" in
6110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6111 *) ac_try_echo=$ac_try;;
6112esac
6113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6114 (eval "$ac_compile") 2>conftest.er1
6115 ac_status=$?
6116 grep -v '^ *+' conftest.er1 >conftest.err
6117 rm -f conftest.er1
6118 cat conftest.err >&5
6119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6120 (exit $ac_status); } && {
6121 test -z "$ac_c_werror_flag" ||
6122 test ! -s conftest.err
6123 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6124 emacs_alsa_normal=yes
6125else
6126 echo "$as_me: failed program was:" >&5
6127sed 's/^/| /' conftest.$ac_ext >&5
6128
6129 emacs_alsa_normal=no
6130fi
6131
6132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6133 if test "$emacs_alsa_normal" != yes; then
6134 cat >conftest.$ac_ext <<_ACEOF
6135/* confdefs.h. */
6136_ACEOF
6137cat confdefs.h >>conftest.$ac_ext
6138cat >>conftest.$ac_ext <<_ACEOF
6139/* end confdefs.h. */
6140#include <alsa/asoundlib.h>
6141int
6142main ()
6143{
6144snd_lib_error_set_handler (0);
6145 ;
6146 return 0;
6147}
6148_ACEOF
6149rm -f conftest.$ac_objext
6150if { (ac_try="$ac_compile"
6151case "(($ac_try" in
6152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6153 *) ac_try_echo=$ac_try;;
6154esac
6155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6156 (eval "$ac_compile") 2>conftest.er1
6157 ac_status=$?
6158 grep -v '^ *+' conftest.er1 >conftest.err
6159 rm -f conftest.er1
6160 cat conftest.err >&5
6161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6162 (exit $ac_status); } && {
6163 test -z "$ac_c_werror_flag" ||
6164 test ! -s conftest.err
6165 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6166 emacs_alsa_subdir=yes
6167else
6168 echo "$as_me: failed program was:" >&5
6169sed 's/^/| /' conftest.$ac_ext >&5
6170
6171 emacs_alsa_subdir=no
6172fi
6173
6174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6175 if test "$emacs_alsa_subdir" != yes; then
6176 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6177echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6178 { (exit 1); exit 1; }; }
6179 fi
6180 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6181 fi
6182
6183 CFLAGS="$SAVE_CFLAGS"
6184 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6185 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6186 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6187
6188cat >>confdefs.h <<\_ACEOF
6189#define HAVE_ALSA 1
6190_ACEOF
6191
6192 fi
6193
f4988be7 6194fi
c0d27fcc
MR
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
22044edf
DL
6213
6214
973a76b1 6215
cffcede7 6216
551ffc27 6217
226e2359 6218
c0d27fcc 6219
f4988be7 6220
98418dba
CW
6221for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6222 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6223 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6224 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6225 sys/utsname.h pwd.h
98418dba
CW
6226do
6227as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
6228if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6229 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6230echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6231if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6232 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6233fi
d6e01aa5
KL
6234ac_res=`eval echo '${'$as_ac_Header'}'`
6235 { echo "$as_me:$LINENO: result: $ac_res" >&5
6236echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6237else
c0d27fcc 6238 # Is the header compilable?
d6e01aa5
KL
6239{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6240echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6241cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6242/* confdefs.h. */
6243_ACEOF
6244cat confdefs.h >>conftest.$ac_ext
6245cat >>conftest.$ac_ext <<_ACEOF
6246/* end confdefs.h. */
c0d27fcc
MR
6247$ac_includes_default
6248#include <$ac_header>
6249_ACEOF
6250rm -f conftest.$ac_objext
d6e01aa5
KL
6251if { (ac_try="$ac_compile"
6252case "(($ac_try" in
6253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6254 *) ac_try_echo=$ac_try;;
6255esac
6256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6257 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6258 ac_status=$?
edfaf76d
LK
6259 grep -v '^ *+' conftest.er1 >conftest.err
6260 rm -f conftest.er1
6261 cat conftest.err >&5
c0d27fcc 6262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6263 (exit $ac_status); } && {
6264 test -z "$ac_c_werror_flag" ||
6265 test ! -s conftest.err
6266 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6267 ac_header_compiler=yes
6268else
6269 echo "$as_me: failed program was:" >&5
19650fd6
AS
6270sed 's/^/| /' conftest.$ac_ext >&5
6271
d6e01aa5 6272 ac_header_compiler=no
c0d27fcc 6273fi
d6e01aa5
KL
6274
6275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6276{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6277echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6278
6279# Is the header present?
d6e01aa5
KL
6280{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6281echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6282cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6283/* confdefs.h. */
6284_ACEOF
6285cat confdefs.h >>conftest.$ac_ext
6286cat >>conftest.$ac_ext <<_ACEOF
6287/* end confdefs.h. */
98418dba 6288#include <$ac_header>
503d2be0 6289_ACEOF
d6e01aa5
KL
6290if { (ac_try="$ac_cpp conftest.$ac_ext"
6291case "(($ac_try" in
6292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6293 *) ac_try_echo=$ac_try;;
6294esac
6295eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6296 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6297 ac_status=$?
6bae0ccf 6298 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6299 rm -f conftest.er1
6300 cat conftest.err >&5
c0d27fcc 6301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6302 (exit $ac_status); } >/dev/null && {
6303 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6304 test ! -s conftest.err
6305 }; then
c0d27fcc 6306 ac_header_preproc=yes
34ec9ebe 6307else
503d2be0 6308 echo "$as_me: failed program was:" >&5
19650fd6
AS
6309sed 's/^/| /' conftest.$ac_ext >&5
6310
c0d27fcc 6311 ac_header_preproc=no
34ec9ebe 6312fi
d6e01aa5 6313
98418dba 6314rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
6315{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6316echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6317
6318# So? What about this header?
edfaf76d
LK
6319case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6320 yes:no: )
c0d27fcc
MR
6321 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6322echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6323 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6324echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6325 ac_header_preproc=yes
19650fd6 6326 ;;
edfaf76d 6327 no:yes:* )
c0d27fcc
MR
6328 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6329echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6330 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6331echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6332 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6333echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6334 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6335echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6336 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6337echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6338 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6339echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 6340
19650fd6 6341 ;;
c0d27fcc 6342esac
d6e01aa5
KL
6343{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6344echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6345if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6346 echo $ECHO_N "(cached) $ECHO_C" >&6
6347else
edfaf76d 6348 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6349fi
d6e01aa5
KL
6350ac_res=`eval echo '${'$as_ac_Header'}'`
6351 { echo "$as_me:$LINENO: result: $ac_res" >&5
6352echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6353
6354fi
98418dba 6355if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6356 cat >>confdefs.h <<_ACEOF
98418dba 6357#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6358_ACEOF
34ec9ebe 6359
98418dba 6360fi
c0d27fcc 6361
98418dba
CW
6362done
6363
22044edf 6364
d6e01aa5
KL
6365{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6366echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6367cat >conftest.$ac_ext <<_ACEOF
6368/* confdefs.h. */
6369_ACEOF
6370cat confdefs.h >>conftest.$ac_ext
6371cat >>conftest.$ac_ext <<_ACEOF
6372/* end confdefs.h. */
6373#include <sys/personality.h>
6374int
6375main ()
6376{
6377personality (PER_LINUX32)
6378 ;
6379 return 0;
6380}
6381_ACEOF
6382rm -f conftest.$ac_objext
d6e01aa5
KL
6383if { (ac_try="$ac_compile"
6384case "(($ac_try" in
6385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6386 *) ac_try_echo=$ac_try;;
6387esac
6388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6389 (eval "$ac_compile") 2>conftest.er1
f17e308a 6390 ac_status=$?
edfaf76d
LK
6391 grep -v '^ *+' conftest.er1 >conftest.err
6392 rm -f conftest.er1
6393 cat conftest.err >&5
f17e308a 6394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6395 (exit $ac_status); } && {
6396 test -z "$ac_c_werror_flag" ||
6397 test ! -s conftest.err
6398 } && test -s conftest.$ac_objext; then
f17e308a
JD
6399 emacs_cv_personality_linux32=yes
6400else
6401 echo "$as_me: failed program was:" >&5
6402sed 's/^/| /' conftest.$ac_ext >&5
6403
d6e01aa5 6404 emacs_cv_personality_linux32=no
f17e308a 6405fi
d6e01aa5
KL
6406
6407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6408{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6409echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6410
6411if test $emacs_cv_personality_linux32 = yes; then
6412
6413cat >>confdefs.h <<\_ACEOF
6414#define HAVE_PERSONALITY_LINUX32 1
6415_ACEOF
6416
6417fi
6418
6419
22044edf
DL
6420for ac_header in term.h
6421do
6422as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
6423{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6424echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6425if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6426 echo $ECHO_N "(cached) $ECHO_C" >&6
6427else
6428 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6429/* confdefs.h. */
6430_ACEOF
6431cat confdefs.h >>conftest.$ac_ext
6432cat >>conftest.$ac_ext <<_ACEOF
6433/* end confdefs.h. */
22044edf
DL
6434#include <$ac_header>
6435_ACEOF
d6e01aa5
KL
6436if { (ac_try="$ac_cpp conftest.$ac_ext"
6437case "(($ac_try" in
6438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6439 *) ac_try_echo=$ac_try;;
6440esac
6441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6442 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6443 ac_status=$?
6444 grep -v '^ *+' conftest.er1 >conftest.err
6445 rm -f conftest.er1
6446 cat conftest.err >&5
6447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6448 (exit $ac_status); } >/dev/null && {
6449 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6450 test ! -s conftest.err
6451 }; then
22044edf
DL
6452 eval "$as_ac_Header=yes"
6453else
6454 echo "$as_me: failed program was:" >&5
19650fd6
AS
6455sed 's/^/| /' conftest.$ac_ext >&5
6456
22044edf
DL
6457 eval "$as_ac_Header=no"
6458fi
d6e01aa5 6459
22044edf
DL
6460rm -f conftest.err conftest.$ac_ext
6461fi
d6e01aa5
KL
6462ac_res=`eval echo '${'$as_ac_Header'}'`
6463 { echo "$as_me:$LINENO: result: $ac_res" >&5
6464echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6465if test `eval echo '${'$as_ac_Header'}'` = yes; then
6466 cat >>confdefs.h <<_ACEOF
6467#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6468_ACEOF
6469
6470fi
6471
6472done
6473
d6e01aa5
KL
6474{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6475echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6476if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6477 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6478else
503d2be0 6479 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6480/* confdefs.h. */
6481_ACEOF
6482cat confdefs.h >>conftest.$ac_ext
6483cat >>conftest.$ac_ext <<_ACEOF
6484/* end confdefs.h. */
98418dba
CW
6485#include <stdlib.h>
6486#include <stdarg.h>
6487#include <string.h>
6488#include <float.h>
6489
19650fd6
AS
6490int
6491main ()
6492{
6493
6494 ;
6495 return 0;
6496}
98418dba 6497_ACEOF
19650fd6 6498rm -f conftest.$ac_objext
d6e01aa5
KL
6499if { (ac_try="$ac_compile"
6500case "(($ac_try" in
6501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6502 *) ac_try_echo=$ac_try;;
6503esac
6504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6505 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6506 ac_status=$?
edfaf76d
LK
6507 grep -v '^ *+' conftest.er1 >conftest.err
6508 rm -f conftest.er1
6509 cat conftest.err >&5
cd958eb3 6510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6511 (exit $ac_status); } && {
6512 test -z "$ac_c_werror_flag" ||
6513 test ! -s conftest.err
6514 } && test -s conftest.$ac_objext; then
98418dba 6515 ac_cv_header_stdc=yes
ba4481b5 6516else
503d2be0 6517 echo "$as_me: failed program was:" >&5
19650fd6
AS
6518sed 's/^/| /' conftest.$ac_ext >&5
6519
d6e01aa5 6520 ac_cv_header_stdc=no
ba4481b5 6521fi
d6e01aa5
KL
6522
6523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6524
6525if test $ac_cv_header_stdc = yes; then
6526 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6527 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6528/* confdefs.h. */
6529_ACEOF
6530cat confdefs.h >>conftest.$ac_ext
6531cat >>conftest.$ac_ext <<_ACEOF
6532/* end confdefs.h. */
98418dba
CW
6533#include <string.h>
6534
6535_ACEOF
6536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6537 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6538 :
6539else
6540 ac_cv_header_stdc=no
ba4481b5 6541fi
98418dba 6542rm -f conftest*
ba4481b5
DL
6543
6544fi
6545
98418dba
CW
6546if test $ac_cv_header_stdc = yes; then
6547 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6548 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6549/* confdefs.h. */
6550_ACEOF
6551cat confdefs.h >>conftest.$ac_ext
6552cat >>conftest.$ac_ext <<_ACEOF
6553/* end confdefs.h. */
98418dba
CW
6554#include <stdlib.h>
6555
6556_ACEOF
6557if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6558 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6559 :
6560else
6561 ac_cv_header_stdc=no
6562fi
6563rm -f conftest*
6564
6565fi
6566
6567if test $ac_cv_header_stdc = yes; then
6568 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6569 if test "$cross_compiling" = yes; then
6570 :
d42122a3 6571else
503d2be0 6572 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6573/* confdefs.h. */
6574_ACEOF
6575cat confdefs.h >>conftest.$ac_ext
6576cat >>conftest.$ac_ext <<_ACEOF
6577/* end confdefs.h. */
98418dba 6578#include <ctype.h>
d6e01aa5 6579#include <stdlib.h>
98418dba
CW
6580#if ((' ' & 0x0FF) == 0x020)
6581# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6582# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6583#else
19650fd6 6584# define ISLOWER(c) \
edfaf76d
LK
6585 (('a' <= (c) && (c) <= 'i') \
6586 || ('j' <= (c) && (c) <= 'r') \
6587 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6588# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6589#endif
6590
6591#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6592int
6593main ()
6594{
98418dba
CW
6595 int i;
6596 for (i = 0; i < 256; i++)
6597 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6598 || toupper (i) != TOUPPER (i))
d6e01aa5
KL
6599 return 2;
6600 return 0;
503d2be0
AS
6601}
6602_ACEOF
98418dba 6603rm -f conftest$ac_exeext
d6e01aa5
KL
6604if { (ac_try="$ac_link"
6605case "(($ac_try" in
6606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6607 *) ac_try_echo=$ac_try;;
6608esac
6609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6610 (eval "$ac_link") 2>&5
503d2be0 6611 ac_status=$?
c0d27fcc 6612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6613 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
6614 { (case "(($ac_try" in
6615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6616 *) ac_try_echo=$ac_try;;
6617esac
6618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6619 (eval "$ac_try") 2>&5
503d2be0 6620 ac_status=$?
c0d27fcc 6621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6622 (exit $ac_status); }; }; then
98418dba 6623 :
d42122a3 6624else
98418dba
CW
6625 echo "$as_me: program exited with status $ac_status" >&5
6626echo "$as_me: failed program was:" >&5
19650fd6
AS
6627sed 's/^/| /' conftest.$ac_ext >&5
6628
c0d27fcc 6629( exit $ac_status )
98418dba 6630ac_cv_header_stdc=no
d42122a3 6631fi
d6e01aa5 6632rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6633fi
d6e01aa5
KL
6634
6635
98418dba
CW
6636fi
6637fi
d6e01aa5
KL
6638{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6639echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
6640if test $ac_cv_header_stdc = yes; then
6641
c0d27fcc 6642cat >>confdefs.h <<\_ACEOF
98418dba 6643#define STDC_HEADERS 1
c0d27fcc 6644_ACEOF
d42122a3
DL
6645
6646fi
6647
d6e01aa5
KL
6648{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
6649echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 6650if test "${ac_cv_header_time+set}" = set; then
503d2be0 6651 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6652else
503d2be0 6653 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6654/* confdefs.h. */
6655_ACEOF
6656cat confdefs.h >>conftest.$ac_ext
6657cat >>conftest.$ac_ext <<_ACEOF
6658/* end confdefs.h. */
ba4481b5 6659#include <sys/types.h>
98418dba 6660#include <sys/time.h>
ba4481b5 6661#include <time.h>
503d2be0
AS
6662
6663int
6664main ()
6665{
98418dba
CW
6666if ((struct tm *) 0)
6667return 0;
503d2be0
AS
6668 ;
6669 return 0;
6670}
6671_ACEOF
6672rm -f conftest.$ac_objext
d6e01aa5
KL
6673if { (ac_try="$ac_compile"
6674case "(($ac_try" in
6675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6676 *) ac_try_echo=$ac_try;;
6677esac
6678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6679 (eval "$ac_compile") 2>conftest.er1
503d2be0 6680 ac_status=$?
edfaf76d
LK
6681 grep -v '^ *+' conftest.er1 >conftest.err
6682 rm -f conftest.er1
6683 cat conftest.err >&5
c0d27fcc 6684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6685 (exit $ac_status); } && {
6686 test -z "$ac_c_werror_flag" ||
6687 test ! -s conftest.err
6688 } && test -s conftest.$ac_objext; then
98418dba 6689 ac_cv_header_time=yes
ba4481b5 6690else
503d2be0 6691 echo "$as_me: failed program was:" >&5
19650fd6
AS
6692sed 's/^/| /' conftest.$ac_ext >&5
6693
d6e01aa5 6694 ac_cv_header_time=no
ba4481b5 6695fi
d6e01aa5
KL
6696
6697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6698fi
d6e01aa5
KL
6699{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
6700echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 6701if test $ac_cv_header_time = yes; then
503d2be0 6702
c0d27fcc 6703cat >>confdefs.h <<\_ACEOF
98418dba 6704#define TIME_WITH_SYS_TIME 1
c0d27fcc 6705_ACEOF
ba4481b5
DL
6706
6707fi
6708
d6e01aa5
KL
6709{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6710echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 6711if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 6712 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 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. */
cd958eb3
MB
6720$ac_includes_default
6721int
6722main ()
6723{
6724#ifndef sys_siglist
d6e01aa5 6725 (void) sys_siglist;
98418dba 6726#endif
503d2be0 6727
cd958eb3
MB
6728 ;
6729 return 0;
6730}
6731_ACEOF
6732rm -f conftest.$ac_objext
d6e01aa5
KL
6733if { (ac_try="$ac_compile"
6734case "(($ac_try" in
6735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6736 *) ac_try_echo=$ac_try;;
6737esac
6738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6739 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6740 ac_status=$?
edfaf76d
LK
6741 grep -v '^ *+' conftest.er1 >conftest.err
6742 rm -f conftest.er1
6743 cat conftest.err >&5
cd958eb3 6744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6745 (exit $ac_status); } && {
6746 test -z "$ac_c_werror_flag" ||
6747 test ! -s conftest.err
6748 } && test -s conftest.$ac_objext; then
cd958eb3
MB
6749 ac_cv_have_decl_sys_siglist=yes
6750else
6751 echo "$as_me: failed program was:" >&5
19650fd6
AS
6752sed 's/^/| /' conftest.$ac_ext >&5
6753
d6e01aa5 6754 ac_cv_have_decl_sys_siglist=no
cd958eb3 6755fi
d6e01aa5
KL
6756
6757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 6758fi
d6e01aa5
KL
6759{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
6760echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
6761if test $ac_cv_have_decl_sys_siglist = yes; then
6762
6763cat >>confdefs.h <<_ACEOF
6764#define HAVE_DECL_SYS_SIGLIST 1
6765_ACEOF
6766
6767
6768else
6769 cat >>confdefs.h <<_ACEOF
6770#define HAVE_DECL_SYS_SIGLIST 0
6771_ACEOF
6772
6773
6774fi
6775
6776
6777if test $ac_cv_have_decl_sys_siglist != yes; then
6778 # For Tru64, at least:
d6e01aa5
KL
6779 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
6780echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
6781if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
6782 echo $ECHO_N "(cached) $ECHO_C" >&6
6783else
6784 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6785/* confdefs.h. */
6786_ACEOF
6787cat confdefs.h >>conftest.$ac_ext
6788cat >>conftest.$ac_ext <<_ACEOF
6789/* end confdefs.h. */
cd958eb3 6790$ac_includes_default
503d2be0
AS
6791int
6792main ()
6793{
cd958eb3 6794#ifndef __sys_siglist
d6e01aa5 6795 (void) __sys_siglist;
cd958eb3
MB
6796#endif
6797
503d2be0
AS
6798 ;
6799 return 0;
6800}
6801_ACEOF
6802rm -f conftest.$ac_objext
d6e01aa5
KL
6803if { (ac_try="$ac_compile"
6804case "(($ac_try" in
6805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6806 *) ac_try_echo=$ac_try;;
6807esac
6808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6809 (eval "$ac_compile") 2>conftest.er1
503d2be0 6810 ac_status=$?
edfaf76d
LK
6811 grep -v '^ *+' conftest.er1 >conftest.err
6812 rm -f conftest.er1
6813 cat conftest.err >&5
c0d27fcc 6814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6815 (exit $ac_status); } && {
6816 test -z "$ac_c_werror_flag" ||
6817 test ! -s conftest.err
6818 } && test -s conftest.$ac_objext; then
cd958eb3 6819 ac_cv_have_decl___sys_siglist=yes
ba4481b5 6820else
503d2be0 6821 echo "$as_me: failed program was:" >&5
19650fd6
AS
6822sed 's/^/| /' conftest.$ac_ext >&5
6823
d6e01aa5 6824 ac_cv_have_decl___sys_siglist=no
ba4481b5 6825fi
d6e01aa5
KL
6826
6827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6828fi
d6e01aa5
KL
6829{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
6830echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 6831if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 6832
cd958eb3
MB
6833cat >>confdefs.h <<_ACEOF
6834#define HAVE_DECL___SYS_SIGLIST 1
6835_ACEOF
6836
6837
6838else
6839 cat >>confdefs.h <<_ACEOF
6840#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 6841_ACEOF
503d2be0 6842
cd958eb3 6843
ba4481b5
DL
6844fi
6845
cd958eb3
MB
6846
6847 if test $ac_cv_have_decl___sys_siglist = yes; then
6848
6849cat >>confdefs.h <<\_ACEOF
6850#define sys_siglist __sys_siglist
6851_ACEOF
6852
6853 fi
6854fi
d6e01aa5
KL
6855{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
6856echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 6857if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 6858 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6859else
503d2be0 6860 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6861/* confdefs.h. */
6862_ACEOF
6863cat confdefs.h >>conftest.$ac_ext
6864cat >>conftest.$ac_ext <<_ACEOF
6865/* end confdefs.h. */
98418dba
CW
6866#include <sys/types.h>
6867#include <sys/wait.h>
6868#ifndef WEXITSTATUS
d6e01aa5 6869# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
6870#endif
6871#ifndef WIFEXITED
6872# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 6873#endif
503d2be0
AS
6874
6875int
6876main ()
6877{
98418dba
CW
6878 int s;
6879 wait (&s);
6880 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
6881 ;
6882 return 0;
6883}
6884_ACEOF
98418dba 6885rm -f conftest.$ac_objext
d6e01aa5
KL
6886if { (ac_try="$ac_compile"
6887case "(($ac_try" in
6888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6889 *) ac_try_echo=$ac_try;;
6890esac
6891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6892 (eval "$ac_compile") 2>conftest.er1
503d2be0 6893 ac_status=$?
edfaf76d
LK
6894 grep -v '^ *+' conftest.er1 >conftest.err
6895 rm -f conftest.er1
6896 cat conftest.err >&5
c0d27fcc 6897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6898 (exit $ac_status); } && {
6899 test -z "$ac_c_werror_flag" ||
6900 test ! -s conftest.err
6901 } && test -s conftest.$ac_objext; then
98418dba 6902 ac_cv_header_sys_wait_h=yes
ba4481b5 6903else
503d2be0 6904 echo "$as_me: failed program was:" >&5
19650fd6
AS
6905sed 's/^/| /' conftest.$ac_ext >&5
6906
d6e01aa5 6907 ac_cv_header_sys_wait_h=no
ba4481b5 6908fi
d6e01aa5
KL
6909
6910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6911fi
d6e01aa5
KL
6912{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6913echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 6914if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 6915
c0d27fcc 6916cat >>confdefs.h <<\_ACEOF
98418dba 6917#define HAVE_SYS_WAIT_H 1
c0d27fcc 6918_ACEOF
ba4481b5 6919
ba4481b5
DL
6920fi
6921
c0d27fcc 6922
d6e01aa5
KL
6923{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
6924echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 6925if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 6926 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 6927else
503d2be0 6928 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6929/* confdefs.h. */
6930_ACEOF
6931cat confdefs.h >>conftest.$ac_ext
6932cat >>conftest.$ac_ext <<_ACEOF
6933/* end confdefs.h. */
98418dba
CW
6934#ifdef TIME_WITH_SYS_TIME
6935#include <sys/time.h>
6936#include <time.h>
6937#else
6938#ifdef HAVE_SYS_TIME_H
6939#include <sys/time.h>
6940#else
1113b624 6941#include <time.h>
98418dba
CW
6942#endif
6943#endif
6944#ifdef HAVE_UTIME_H
6945#include <utime.h>
6946#endif
503d2be0
AS
6947int
6948main ()
6949{
98418dba 6950static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
6951 ;
6952 return 0;
6953}
6954_ACEOF
98418dba 6955rm -f conftest.$ac_objext
d6e01aa5
KL
6956if { (ac_try="$ac_compile"
6957case "(($ac_try" in
6958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6959 *) ac_try_echo=$ac_try;;
6960esac
6961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6962 (eval "$ac_compile") 2>conftest.er1
503d2be0 6963 ac_status=$?
edfaf76d
LK
6964 grep -v '^ *+' conftest.er1 >conftest.err
6965 rm -f conftest.er1
6966 cat conftest.err >&5
c0d27fcc 6967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6968 (exit $ac_status); } && {
6969 test -z "$ac_c_werror_flag" ||
6970 test ! -s conftest.err
6971 } && test -s conftest.$ac_objext; then
98418dba 6972 emacs_cv_struct_utimbuf=yes
1113b624 6973else
503d2be0 6974 echo "$as_me: failed program was:" >&5
19650fd6
AS
6975sed 's/^/| /' conftest.$ac_ext >&5
6976
d6e01aa5 6977 emacs_cv_struct_utimbuf=no
1113b624 6978fi
d6e01aa5
KL
6979
6980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 6981fi
d6e01aa5
KL
6982{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
6983echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 6984if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 6985
c0d27fcc 6986cat >>confdefs.h <<\_ACEOF
98418dba 6987#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 6988_ACEOF
1113b624
PE
6989
6990fi
ba4481b5 6991
d6e01aa5
KL
6992{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6993echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 6994if test "${ac_cv_type_signal+set}" = set; then
503d2be0 6995 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 6996else
98418dba 6997 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6998/* confdefs.h. */
6999_ACEOF
7000cat confdefs.h >>conftest.$ac_ext
7001cat >>conftest.$ac_ext <<_ACEOF
7002/* end confdefs.h. */
7397acc4 7003#include <sys/types.h>
98418dba 7004#include <signal.h>
98418dba 7005
503d2be0
AS
7006int
7007main ()
7008{
d6e01aa5 7009return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7010 ;
7011 return 0;
7012}
7013_ACEOF
98418dba 7014rm -f conftest.$ac_objext
d6e01aa5
KL
7015if { (ac_try="$ac_compile"
7016case "(($ac_try" in
7017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7018 *) ac_try_echo=$ac_try;;
7019esac
7020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7021 (eval "$ac_compile") 2>conftest.er1
503d2be0 7022 ac_status=$?
edfaf76d
LK
7023 grep -v '^ *+' conftest.er1 >conftest.err
7024 rm -f conftest.er1
7025 cat conftest.err >&5
c0d27fcc 7026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7027 (exit $ac_status); } && {
7028 test -z "$ac_c_werror_flag" ||
7029 test ! -s conftest.err
7030 } && test -s conftest.$ac_objext; then
7031 ac_cv_type_signal=int
503d2be0
AS
7032else
7033 echo "$as_me: failed program was:" >&5
19650fd6
AS
7034sed 's/^/| /' conftest.$ac_ext >&5
7035
d6e01aa5 7036 ac_cv_type_signal=void
503d2be0 7037fi
d6e01aa5
KL
7038
7039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7040fi
d6e01aa5
KL
7041{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7042echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7043
c0d27fcc 7044cat >>confdefs.h <<_ACEOF
98418dba 7045#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7046_ACEOF
7047
503d2be0 7048
c0d27fcc 7049
d6e01aa5
KL
7050{ echo "$as_me:$LINENO: checking for speed_t" >&5
7051echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7052if test "${emacs_cv_speed_t+set}" = set; then
7053 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7054else
98418dba 7055 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7056/* confdefs.h. */
7057_ACEOF
7058cat confdefs.h >>conftest.$ac_ext
7059cat >>conftest.$ac_ext <<_ACEOF
7060/* end confdefs.h. */
98418dba 7061#include <termios.h>
98418dba
CW
7062int
7063main ()
7064{
7065speed_t x = 1;
7066 ;
7067 return 0;
7068}
7069_ACEOF
7070rm -f conftest.$ac_objext
d6e01aa5
KL
7071if { (ac_try="$ac_compile"
7072case "(($ac_try" in
7073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7074 *) ac_try_echo=$ac_try;;
7075esac
7076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7077 (eval "$ac_compile") 2>conftest.er1
98418dba 7078 ac_status=$?
edfaf76d
LK
7079 grep -v '^ *+' conftest.er1 >conftest.err
7080 rm -f conftest.er1
7081 cat conftest.err >&5
c0d27fcc 7082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7083 (exit $ac_status); } && {
7084 test -z "$ac_c_werror_flag" ||
7085 test ! -s conftest.err
7086 } && test -s conftest.$ac_objext; then
98418dba
CW
7087 emacs_cv_speed_t=yes
7088else
7089 echo "$as_me: failed program was:" >&5
19650fd6
AS
7090sed 's/^/| /' conftest.$ac_ext >&5
7091
d6e01aa5 7092 emacs_cv_speed_t=no
98418dba 7093fi
d6e01aa5
KL
7094
7095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7096fi
d6e01aa5
KL
7097{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7098echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7099if test $emacs_cv_speed_t = yes; then
b936fae4 7100
c0d27fcc 7101cat >>confdefs.h <<\_ACEOF
98418dba 7102#define HAVE_SPEED_T 1
c0d27fcc 7103_ACEOF
98418dba 7104
7397acc4
DL
7105fi
7106
d6e01aa5
KL
7107{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7108echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7109if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7110 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7111else
503d2be0 7112 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7113/* confdefs.h. */
7114_ACEOF
7115cat confdefs.h >>conftest.$ac_ext
7116cat >>conftest.$ac_ext <<_ACEOF
7117/* end confdefs.h. */
98418dba
CW
7118#ifdef TIME_WITH_SYS_TIME
7119#include <sys/time.h>
7120#include <time.h>
7121#else
7122#ifdef HAVE_SYS_TIME_H
7123#include <sys/time.h>
7124#else
7125#include <time.h>
7126#endif
7127#endif
503d2be0
AS
7128int
7129main ()
7130{
98418dba 7131static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7132 ;
7133 return 0;
7134}
7135_ACEOF
7136rm -f conftest.$ac_objext
d6e01aa5
KL
7137if { (ac_try="$ac_compile"
7138case "(($ac_try" in
7139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7140 *) ac_try_echo=$ac_try;;
7141esac
7142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7143 (eval "$ac_compile") 2>conftest.er1
503d2be0 7144 ac_status=$?
edfaf76d
LK
7145 grep -v '^ *+' conftest.er1 >conftest.err
7146 rm -f conftest.er1
7147 cat conftest.err >&5
c0d27fcc 7148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7149 (exit $ac_status); } && {
7150 test -z "$ac_c_werror_flag" ||
7151 test ! -s conftest.err
7152 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7153 emacs_cv_struct_timeval=yes
7154else
503d2be0 7155 echo "$as_me: failed program was:" >&5
19650fd6
AS
7156sed 's/^/| /' conftest.$ac_ext >&5
7157
d6e01aa5 7158 emacs_cv_struct_timeval=no
7397acc4 7159fi
d6e01aa5
KL
7160
7161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7162fi
d6e01aa5
KL
7163{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7164echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7165HAVE_TIMEVAL=$emacs_cv_struct_timeval
7166if test $emacs_cv_struct_timeval = yes; then
b936fae4 7167
c0d27fcc 7168cat >>confdefs.h <<\_ACEOF
98418dba 7169#define HAVE_TIMEVAL 1
c0d27fcc 7170_ACEOF
7397acc4
DL
7171
7172fi
7173
d6e01aa5
KL
7174{ echo "$as_me:$LINENO: checking for struct exception" >&5
7175echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7176if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7177 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7178else
503d2be0 7179 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7180/* confdefs.h. */
7181_ACEOF
7182cat confdefs.h >>conftest.$ac_ext
7183cat >>conftest.$ac_ext <<_ACEOF
7184/* end confdefs.h. */
98418dba 7185#include <math.h>
503d2be0
AS
7186int
7187main ()
7188{
98418dba 7189static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7190 ;
7191 return 0;
ba4481b5 7192}
503d2be0
AS
7193_ACEOF
7194rm -f conftest.$ac_objext
d6e01aa5
KL
7195if { (ac_try="$ac_compile"
7196case "(($ac_try" in
7197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7198 *) ac_try_echo=$ac_try;;
7199esac
7200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7201 (eval "$ac_compile") 2>conftest.er1
503d2be0 7202 ac_status=$?
edfaf76d
LK
7203 grep -v '^ *+' conftest.er1 >conftest.err
7204 rm -f conftest.er1
7205 cat conftest.err >&5
c0d27fcc 7206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7207 (exit $ac_status); } && {
7208 test -z "$ac_c_werror_flag" ||
7209 test ! -s conftest.err
7210 } && test -s conftest.$ac_objext; then
98418dba 7211 emacs_cv_struct_exception=yes
ba4481b5 7212else
503d2be0 7213 echo "$as_me: failed program was:" >&5
19650fd6
AS
7214sed 's/^/| /' conftest.$ac_ext >&5
7215
d6e01aa5 7216 emacs_cv_struct_exception=no
ba4481b5 7217fi
d6e01aa5
KL
7218
7219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7220fi
d6e01aa5
KL
7221{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7222echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7223HAVE_EXCEPTION=$emacs_cv_struct_exception
7224if test $emacs_cv_struct_exception != yes; then
b936fae4 7225
c0d27fcc 7226cat >>confdefs.h <<\_ACEOF
98418dba 7227#define NO_MATHERR 1
c0d27fcc 7228_ACEOF
ba4481b5
DL
7229
7230fi
7231
7862d3a8
AS
7232
7233for ac_header in sys/socket.h
7234do
7235as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
7236if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7237 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7238echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7239if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7240 echo $ECHO_N "(cached) $ECHO_C" >&6
7241fi
d6e01aa5
KL
7242ac_res=`eval echo '${'$as_ac_Header'}'`
7243 { echo "$as_me:$LINENO: result: $ac_res" >&5
7244echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7245else
7246 # Is the header compilable?
d6e01aa5
KL
7247{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7248echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7249cat >conftest.$ac_ext <<_ACEOF
7250/* confdefs.h. */
7251_ACEOF
7252cat confdefs.h >>conftest.$ac_ext
7253cat >>conftest.$ac_ext <<_ACEOF
7254/* end confdefs.h. */
7255$ac_includes_default
7256#include <$ac_header>
7257_ACEOF
7258rm -f conftest.$ac_objext
d6e01aa5
KL
7259if { (ac_try="$ac_compile"
7260case "(($ac_try" in
7261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7262 *) ac_try_echo=$ac_try;;
7263esac
7264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7265 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7266 ac_status=$?
edfaf76d
LK
7267 grep -v '^ *+' conftest.er1 >conftest.err
7268 rm -f conftest.er1
7269 cat conftest.err >&5
7862d3a8 7270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7271 (exit $ac_status); } && {
7272 test -z "$ac_c_werror_flag" ||
7273 test ! -s conftest.err
7274 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7275 ac_header_compiler=yes
7276else
7277 echo "$as_me: failed program was:" >&5
7278sed 's/^/| /' conftest.$ac_ext >&5
7279
d6e01aa5 7280 ac_header_compiler=no
7862d3a8 7281fi
d6e01aa5
KL
7282
7283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7284{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7285echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7286
7287# Is the header present?
d6e01aa5
KL
7288{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7289echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7290cat >conftest.$ac_ext <<_ACEOF
7291/* confdefs.h. */
7292_ACEOF
7293cat confdefs.h >>conftest.$ac_ext
7294cat >>conftest.$ac_ext <<_ACEOF
7295/* end confdefs.h. */
7296#include <$ac_header>
7297_ACEOF
d6e01aa5
KL
7298if { (ac_try="$ac_cpp conftest.$ac_ext"
7299case "(($ac_try" in
7300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7301 *) ac_try_echo=$ac_try;;
7302esac
7303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7304 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7305 ac_status=$?
7306 grep -v '^ *+' conftest.er1 >conftest.err
7307 rm -f conftest.er1
7308 cat conftest.err >&5
7309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7310 (exit $ac_status); } >/dev/null && {
7311 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7312 test ! -s conftest.err
7313 }; then
7862d3a8
AS
7314 ac_header_preproc=yes
7315else
7316 echo "$as_me: failed program was:" >&5
7317sed 's/^/| /' conftest.$ac_ext >&5
7318
7319 ac_header_preproc=no
7320fi
d6e01aa5 7321
7862d3a8 7322rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
7323{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7324echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7325
7326# So? What about this header?
edfaf76d
LK
7327case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7328 yes:no: )
7862d3a8
AS
7329 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7330echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7331 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7332echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7333 ac_header_preproc=yes
7862d3a8 7334 ;;
edfaf76d 7335 no:yes:* )
7862d3a8
AS
7336 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7337echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7338 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7339echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7340 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7341echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7342 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7343echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7344 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7345echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7346 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7347echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 7348
7862d3a8
AS
7349 ;;
7350esac
d6e01aa5
KL
7351{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7352echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7353if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7354 echo $ECHO_N "(cached) $ECHO_C" >&6
7355else
edfaf76d 7356 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7357fi
d6e01aa5
KL
7358ac_res=`eval echo '${'$as_ac_Header'}'`
7359 { echo "$as_me:$LINENO: result: $ac_res" >&5
7360echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7361
7362fi
7363if test `eval echo '${'$as_ac_Header'}'` = yes; then
7364 cat >>confdefs.h <<_ACEOF
7365#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7366_ACEOF
7367
7368fi
7369
7370done
7371
7372
7373for ac_header in net/if.h
7374do
7375as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
7376{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7377echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7378if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7379 echo $ECHO_N "(cached) $ECHO_C" >&6
7380else
7381 cat >conftest.$ac_ext <<_ACEOF
7382/* confdefs.h. */
7383_ACEOF
7384cat confdefs.h >>conftest.$ac_ext
7385cat >>conftest.$ac_ext <<_ACEOF
7386/* end confdefs.h. */
7387$ac_includes_default
7388#if HAVE_SYS_SOCKET_H
7389#include <sys/socket.h>
7390#endif
7391
7392#include <$ac_header>
7393_ACEOF
7394rm -f conftest.$ac_objext
d6e01aa5
KL
7395if { (ac_try="$ac_compile"
7396case "(($ac_try" in
7397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7398 *) ac_try_echo=$ac_try;;
7399esac
7400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7401 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7402 ac_status=$?
edfaf76d
LK
7403 grep -v '^ *+' conftest.er1 >conftest.err
7404 rm -f conftest.er1
7405 cat conftest.err >&5
7862d3a8 7406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7407 (exit $ac_status); } && {
7408 test -z "$ac_c_werror_flag" ||
7409 test ! -s conftest.err
7410 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7411 eval "$as_ac_Header=yes"
7412else
7413 echo "$as_me: failed program was:" >&5
7414sed 's/^/| /' conftest.$ac_ext >&5
7415
d6e01aa5 7416 eval "$as_ac_Header=no"
7862d3a8 7417fi
d6e01aa5
KL
7418
7419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7420fi
d6e01aa5
KL
7421ac_res=`eval echo '${'$as_ac_Header'}'`
7422 { echo "$as_me:$LINENO: result: $ac_res" >&5
7423echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7424if test `eval echo '${'$as_ac_Header'}'` = yes; then
7425 cat >>confdefs.h <<_ACEOF
7426#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7427_ACEOF
7428
7429fi
7430
7431done
7432
7433
d6e01aa5
KL
7434{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7435echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7436if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7437 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7438else
503d2be0 7439 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7440/* confdefs.h. */
7441_ACEOF
7442cat confdefs.h >>conftest.$ac_ext
7443cat >>conftest.$ac_ext <<_ACEOF
7444/* end confdefs.h. */
98418dba
CW
7445#include <sys/types.h>
7446#include <time.h>
7397acc4 7447
503d2be0
AS
7448int
7449main ()
7450{
d6e01aa5
KL
7451struct tm tm;
7452 int *p = &tm.tm_sec;
7453 return !p;
503d2be0
AS
7454 ;
7455 return 0;
7456}
7457_ACEOF
7458rm -f conftest.$ac_objext
d6e01aa5
KL
7459if { (ac_try="$ac_compile"
7460case "(($ac_try" in
7461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7462 *) ac_try_echo=$ac_try;;
7463esac
7464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7465 (eval "$ac_compile") 2>conftest.er1
503d2be0 7466 ac_status=$?
edfaf76d
LK
7467 grep -v '^ *+' conftest.er1 >conftest.err
7468 rm -f conftest.er1
7469 cat conftest.err >&5
c0d27fcc 7470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7471 (exit $ac_status); } && {
7472 test -z "$ac_c_werror_flag" ||
7473 test ! -s conftest.err
7474 } && test -s conftest.$ac_objext; then
35996d22
AS
7475 ac_cv_struct_tm=time.h
7476else
503d2be0 7477 echo "$as_me: failed program was:" >&5
19650fd6
AS
7478sed 's/^/| /' conftest.$ac_ext >&5
7479
d6e01aa5 7480 ac_cv_struct_tm=sys/time.h
7397acc4 7481fi
d6e01aa5
KL
7482
7483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7484fi
d6e01aa5
KL
7485{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7486echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7487if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7488
c0d27fcc 7489cat >>confdefs.h <<\_ACEOF
98418dba 7490#define TM_IN_SYS_TIME 1
c0d27fcc 7491_ACEOF
7397acc4
DL
7492
7493fi
ba4481b5 7494
d6e01aa5
KL
7495{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7496echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7497if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7498 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7499else
98418dba 7500 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7501/* confdefs.h. */
7502_ACEOF
7503cat confdefs.h >>conftest.$ac_ext
7504cat >>conftest.$ac_ext <<_ACEOF
7505/* end confdefs.h. */
98418dba
CW
7506#include <sys/types.h>
7507#include <$ac_cv_struct_tm>
ba4481b5 7508
c0d27fcc 7509
98418dba
CW
7510int
7511main ()
7512{
7513static struct tm ac_aggr;
7514if (ac_aggr.tm_zone)
7515return 0;
7516 ;
7517 return 0;
7518}
7519_ACEOF
7520rm -f conftest.$ac_objext
d6e01aa5
KL
7521if { (ac_try="$ac_compile"
7522case "(($ac_try" in
7523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7524 *) ac_try_echo=$ac_try;;
7525esac
7526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7527 (eval "$ac_compile") 2>conftest.er1
98418dba 7528 ac_status=$?
edfaf76d
LK
7529 grep -v '^ *+' conftest.er1 >conftest.err
7530 rm -f conftest.er1
7531 cat conftest.err >&5
c0d27fcc 7532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7533 (exit $ac_status); } && {
7534 test -z "$ac_c_werror_flag" ||
7535 test ! -s conftest.err
7536 } && test -s conftest.$ac_objext; then
98418dba 7537 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7538else
98418dba 7539 echo "$as_me: failed program was:" >&5
19650fd6
AS
7540sed 's/^/| /' conftest.$ac_ext >&5
7541
d6e01aa5 7542 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7543/* confdefs.h. */
7544_ACEOF
7545cat confdefs.h >>conftest.$ac_ext
7546cat >>conftest.$ac_ext <<_ACEOF
7547/* end confdefs.h. */
6bae0ccf
DL
7548#include <sys/types.h>
7549#include <$ac_cv_struct_tm>
7550
7551
7552int
7553main ()
7554{
7555static struct tm ac_aggr;
7556if (sizeof ac_aggr.tm_zone)
7557return 0;
7558 ;
7559 return 0;
7560}
7561_ACEOF
7562rm -f conftest.$ac_objext
d6e01aa5
KL
7563if { (ac_try="$ac_compile"
7564case "(($ac_try" in
7565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7566 *) ac_try_echo=$ac_try;;
7567esac
7568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7569 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7570 ac_status=$?
edfaf76d
LK
7571 grep -v '^ *+' conftest.er1 >conftest.err
7572 rm -f conftest.er1
7573 cat conftest.err >&5
6bae0ccf 7574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7575 (exit $ac_status); } && {
7576 test -z "$ac_c_werror_flag" ||
7577 test ! -s conftest.err
7578 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7579 ac_cv_member_struct_tm_tm_zone=yes
7580else
7581 echo "$as_me: failed program was:" >&5
19650fd6
AS
7582sed 's/^/| /' conftest.$ac_ext >&5
7583
d6e01aa5 7584 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7585fi
d6e01aa5
KL
7586
7587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7588fi
d6e01aa5
KL
7589
7590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7591fi
d6e01aa5
KL
7592{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7593echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 7594if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7595
c0d27fcc 7596cat >>confdefs.h <<_ACEOF
98418dba 7597#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7598_ACEOF
7599
ba4481b5 7600
98418dba 7601fi
ba4481b5 7602
98418dba 7603if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7604
c0d27fcc 7605cat >>confdefs.h <<\_ACEOF
98418dba 7606#define HAVE_TM_ZONE 1
c0d27fcc 7607_ACEOF
ba4481b5 7608
ba4481b5 7609else
d6e01aa5
KL
7610 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7611echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
7612if test "${ac_cv_have_decl_tzname+set}" = set; then
7613 echo $ECHO_N "(cached) $ECHO_C" >&6
7614else
7615 cat >conftest.$ac_ext <<_ACEOF
7616/* confdefs.h. */
7617_ACEOF
7618cat confdefs.h >>conftest.$ac_ext
7619cat >>conftest.$ac_ext <<_ACEOF
7620/* end confdefs.h. */
7621#include <time.h>
7622
7623int
7624main ()
7625{
7626#ifndef tzname
7627 (void) tzname;
7628#endif
7629
7630 ;
7631 return 0;
7632}
7633_ACEOF
7634rm -f conftest.$ac_objext
7635if { (ac_try="$ac_compile"
7636case "(($ac_try" in
7637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7638 *) ac_try_echo=$ac_try;;
7639esac
7640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7641 (eval "$ac_compile") 2>conftest.er1
7642 ac_status=$?
7643 grep -v '^ *+' conftest.er1 >conftest.err
7644 rm -f conftest.er1
7645 cat conftest.err >&5
7646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7647 (exit $ac_status); } && {
7648 test -z "$ac_c_werror_flag" ||
7649 test ! -s conftest.err
7650 } && test -s conftest.$ac_objext; then
7651 ac_cv_have_decl_tzname=yes
7652else
7653 echo "$as_me: failed program was:" >&5
7654sed 's/^/| /' conftest.$ac_ext >&5
7655
7656 ac_cv_have_decl_tzname=no
7657fi
7658
7659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7660fi
7661{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
7662echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
7663if test $ac_cv_have_decl_tzname = yes; then
7664
7665cat >>confdefs.h <<_ACEOF
7666#define HAVE_DECL_TZNAME 1
7667_ACEOF
7668
7669
7670else
7671 cat >>confdefs.h <<_ACEOF
7672#define HAVE_DECL_TZNAME 0
7673_ACEOF
7674
7675
7676fi
7677
7678
7679 { echo "$as_me:$LINENO: checking for tzname" >&5
7680echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
98418dba 7681if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 7682 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7683else
98418dba 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. */
98418dba 7690#include <time.h>
d6e01aa5
KL
7691#if !HAVE_DECL_TZNAME
7692extern char *tzname[];
98418dba
CW
7693#endif
7694
98418dba
CW
7695int
7696main ()
7697{
d6e01aa5 7698return tzname[0][0];
98418dba
CW
7699 ;
7700 return 0;
7701}
7702_ACEOF
7703rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
7704if { (ac_try="$ac_link"
7705case "(($ac_try" in
7706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7707 *) ac_try_echo=$ac_try;;
7708esac
7709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7710 (eval "$ac_link") 2>conftest.er1
98418dba 7711 ac_status=$?
edfaf76d
LK
7712 grep -v '^ *+' conftest.er1 >conftest.err
7713 rm -f conftest.er1
7714 cat conftest.err >&5
c0d27fcc 7715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7716 (exit $ac_status); } && {
7717 test -z "$ac_c_werror_flag" ||
7718 test ! -s conftest.err
7719 } && test -s conftest$ac_exeext &&
7720 $as_test_x conftest$ac_exeext; then
98418dba
CW
7721 ac_cv_var_tzname=yes
7722else
7723 echo "$as_me: failed program was:" >&5
19650fd6
AS
7724sed 's/^/| /' conftest.$ac_ext >&5
7725
d6e01aa5 7726 ac_cv_var_tzname=no
ba4481b5 7727fi
d6e01aa5
KL
7728
7729rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 7730 conftest$ac_exeext conftest.$ac_ext
98418dba 7731fi
d6e01aa5
KL
7732{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
7733echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
98418dba 7734 if test $ac_cv_var_tzname = yes; then
ba4481b5 7735
c0d27fcc 7736cat >>confdefs.h <<\_ACEOF
98418dba 7737#define HAVE_TZNAME 1
c0d27fcc 7738_ACEOF
503d2be0 7739
98418dba
CW
7740 fi
7741fi
503d2be0 7742
d6e01aa5
KL
7743{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
7744echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
b936fae4 7745if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
7746 echo $ECHO_N "(cached) $ECHO_C" >&6
7747else
7748 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7749/* confdefs.h. */
7750_ACEOF
7751cat confdefs.h >>conftest.$ac_ext
7752cat >>conftest.$ac_ext <<_ACEOF
7753/* end confdefs.h. */
98418dba 7754#include <time.h>
b936fae4 7755
98418dba
CW
7756int
7757main ()
7758{
b936fae4
AS
7759static struct tm ac_aggr;
7760if (ac_aggr.tm_gmtoff)
7761return 0;
98418dba
CW
7762 ;
7763 return 0;
7764}
7765_ACEOF
b936fae4 7766rm -f conftest.$ac_objext
d6e01aa5
KL
7767if { (ac_try="$ac_compile"
7768case "(($ac_try" in
7769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7770 *) ac_try_echo=$ac_try;;
7771esac
7772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7773 (eval "$ac_compile") 2>conftest.er1
98418dba 7774 ac_status=$?
edfaf76d
LK
7775 grep -v '^ *+' conftest.er1 >conftest.err
7776 rm -f conftest.er1
7777 cat conftest.err >&5
c0d27fcc 7778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7779 (exit $ac_status); } && {
7780 test -z "$ac_c_werror_flag" ||
7781 test ! -s conftest.err
7782 } && test -s conftest.$ac_objext; then
b936fae4 7783 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
7784else
7785 echo "$as_me: failed program was:" >&5
19650fd6
AS
7786sed 's/^/| /' conftest.$ac_ext >&5
7787
d6e01aa5 7788 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7789/* confdefs.h. */
7790_ACEOF
7791cat confdefs.h >>conftest.$ac_ext
7792cat >>conftest.$ac_ext <<_ACEOF
7793/* end confdefs.h. */
6bae0ccf
DL
7794#include <time.h>
7795
8799b3e4
CW
7796int
7797main ()
7798{
6bae0ccf
DL
7799static struct tm ac_aggr;
7800if (sizeof ac_aggr.tm_gmtoff)
7801return 0;
8799b3e4
CW
7802 ;
7803 return 0;
7804}
7805_ACEOF
6bae0ccf 7806rm -f conftest.$ac_objext
d6e01aa5
KL
7807if { (ac_try="$ac_compile"
7808case "(($ac_try" in
7809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7810 *) ac_try_echo=$ac_try;;
7811esac
7812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7813 (eval "$ac_compile") 2>conftest.er1
8799b3e4 7814 ac_status=$?
edfaf76d
LK
7815 grep -v '^ *+' conftest.er1 >conftest.err
7816 rm -f conftest.er1
7817 cat conftest.err >&5
c0d27fcc 7818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7819 (exit $ac_status); } && {
7820 test -z "$ac_c_werror_flag" ||
7821 test ! -s conftest.err
7822 } && test -s conftest.$ac_objext; then
6bae0ccf 7823 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
7824else
7825 echo "$as_me: failed program was:" >&5
19650fd6
AS
7826sed 's/^/| /' conftest.$ac_ext >&5
7827
d6e01aa5 7828 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 7829fi
d6e01aa5
KL
7830
7831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7832fi
d6e01aa5
KL
7833
7834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 7835fi
d6e01aa5
KL
7836{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
7837echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
7838if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
7839
7840cat >>confdefs.h <<\_ACEOF
7841#define HAVE_TM_GMTOFF 1
7842_ACEOF
7843
7844fi
7845
d6e01aa5
KL
7846{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
7847echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
7848if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
7849 echo $ECHO_N "(cached) $ECHO_C" >&6
7850else
7851 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7852/* confdefs.h. */
7853_ACEOF
7854cat confdefs.h >>conftest.$ac_ext
7855cat >>conftest.$ac_ext <<_ACEOF
7856/* end confdefs.h. */
7862d3a8
AS
7857$ac_includes_default
7858#if HAVE_SYS_SOCKET_H
7859#include <sys/socket.h>
7860#endif
7861#if HAVE_NET_IF_H
96f3a036 7862#include <net/if.h>
7862d3a8 7863#endif
96f3a036
DL
7864
7865int
7866main ()
7867{
7868static struct ifreq ac_aggr;
7869if (ac_aggr.ifr_flags)
7870return 0;
7871 ;
7872 return 0;
7873}
7874_ACEOF
7875rm -f conftest.$ac_objext
d6e01aa5
KL
7876if { (ac_try="$ac_compile"
7877case "(($ac_try" in
7878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7879 *) ac_try_echo=$ac_try;;
7880esac
7881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7882 (eval "$ac_compile") 2>conftest.er1
96f3a036 7883 ac_status=$?
edfaf76d
LK
7884 grep -v '^ *+' conftest.er1 >conftest.err
7885 rm -f conftest.er1
7886 cat conftest.err >&5
96f3a036 7887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7888 (exit $ac_status); } && {
7889 test -z "$ac_c_werror_flag" ||
7890 test ! -s conftest.err
7891 } && test -s conftest.$ac_objext; then
96f3a036
DL
7892 ac_cv_member_struct_ifreq_ifr_flags=yes
7893else
7894 echo "$as_me: failed program was:" >&5
7895sed 's/^/| /' conftest.$ac_ext >&5
7896
d6e01aa5 7897 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7898/* confdefs.h. */
7899_ACEOF
7900cat confdefs.h >>conftest.$ac_ext
7901cat >>conftest.$ac_ext <<_ACEOF
7902/* end confdefs.h. */
7862d3a8
AS
7903$ac_includes_default
7904#if HAVE_SYS_SOCKET_H
7905#include <sys/socket.h>
7906#endif
7907#if HAVE_NET_IF_H
96f3a036 7908#include <net/if.h>
7862d3a8 7909#endif
96f3a036
DL
7910
7911int
7912main ()
7913{
7914static struct ifreq ac_aggr;
7915if (sizeof ac_aggr.ifr_flags)
7916return 0;
7917 ;
7918 return 0;
7919}
7920_ACEOF
7921rm -f conftest.$ac_objext
d6e01aa5
KL
7922if { (ac_try="$ac_compile"
7923case "(($ac_try" in
7924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7925 *) ac_try_echo=$ac_try;;
7926esac
7927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7928 (eval "$ac_compile") 2>conftest.er1
96f3a036 7929 ac_status=$?
edfaf76d
LK
7930 grep -v '^ *+' conftest.er1 >conftest.err
7931 rm -f conftest.er1
7932 cat conftest.err >&5
96f3a036 7933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7934 (exit $ac_status); } && {
7935 test -z "$ac_c_werror_flag" ||
7936 test ! -s conftest.err
7937 } && test -s conftest.$ac_objext; then
96f3a036
DL
7938 ac_cv_member_struct_ifreq_ifr_flags=yes
7939else
7940 echo "$as_me: failed program was:" >&5
7941sed 's/^/| /' conftest.$ac_ext >&5
7942
d6e01aa5 7943 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 7944fi
d6e01aa5
KL
7945
7946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7947fi
d6e01aa5
KL
7948
7949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 7950fi
d6e01aa5
KL
7951{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
7952echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
7953if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
7954
7955cat >>confdefs.h <<_ACEOF
7956#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
7957_ACEOF
7958
7959
7960fi
d6e01aa5
KL
7961{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
7962echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
7963if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
7964 echo $ECHO_N "(cached) $ECHO_C" >&6
7965else
7966 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7967/* confdefs.h. */
7968_ACEOF
7969cat confdefs.h >>conftest.$ac_ext
7970cat >>conftest.$ac_ext <<_ACEOF
7971/* end confdefs.h. */
7862d3a8
AS
7972$ac_includes_default
7973#if HAVE_SYS_SOCKET_H
7974#include <sys/socket.h>
7975#endif
7976#if HAVE_NET_IF_H
96f3a036 7977#include <net/if.h>
7862d3a8 7978#endif
96f3a036
DL
7979
7980int
7981main ()
7982{
7983static struct ifreq ac_aggr;
7984if (ac_aggr.ifr_hwaddr)
7985return 0;
7986 ;
7987 return 0;
7988}
7989_ACEOF
7990rm -f conftest.$ac_objext
d6e01aa5
KL
7991if { (ac_try="$ac_compile"
7992case "(($ac_try" in
7993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7994 *) ac_try_echo=$ac_try;;
7995esac
7996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7997 (eval "$ac_compile") 2>conftest.er1
96f3a036 7998 ac_status=$?
edfaf76d
LK
7999 grep -v '^ *+' conftest.er1 >conftest.err
8000 rm -f conftest.er1
8001 cat conftest.err >&5
96f3a036 8002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8003 (exit $ac_status); } && {
8004 test -z "$ac_c_werror_flag" ||
8005 test ! -s conftest.err
8006 } && test -s conftest.$ac_objext; then
96f3a036
DL
8007 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8008else
8009 echo "$as_me: failed program was:" >&5
8010sed 's/^/| /' conftest.$ac_ext >&5
8011
d6e01aa5 8012 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8013/* confdefs.h. */
8014_ACEOF
8015cat confdefs.h >>conftest.$ac_ext
8016cat >>conftest.$ac_ext <<_ACEOF
8017/* end confdefs.h. */
7862d3a8
AS
8018$ac_includes_default
8019#if HAVE_SYS_SOCKET_H
8020#include <sys/socket.h>
8021#endif
8022#if HAVE_NET_IF_H
96f3a036 8023#include <net/if.h>
7862d3a8 8024#endif
96f3a036
DL
8025
8026int
8027main ()
8028{
8029static struct ifreq ac_aggr;
8030if (sizeof ac_aggr.ifr_hwaddr)
8031return 0;
8032 ;
8033 return 0;
8034}
8035_ACEOF
8036rm -f conftest.$ac_objext
d6e01aa5
KL
8037if { (ac_try="$ac_compile"
8038case "(($ac_try" in
8039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8040 *) ac_try_echo=$ac_try;;
8041esac
8042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8043 (eval "$ac_compile") 2>conftest.er1
96f3a036 8044 ac_status=$?
edfaf76d
LK
8045 grep -v '^ *+' conftest.er1 >conftest.err
8046 rm -f conftest.er1
8047 cat conftest.err >&5
96f3a036 8048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8049 (exit $ac_status); } && {
8050 test -z "$ac_c_werror_flag" ||
8051 test ! -s conftest.err
8052 } && test -s conftest.$ac_objext; then
96f3a036
DL
8053 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8054else
8055 echo "$as_me: failed program was:" >&5
8056sed 's/^/| /' conftest.$ac_ext >&5
8057
d6e01aa5 8058 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8059fi
d6e01aa5
KL
8060
8061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8062fi
d6e01aa5
KL
8063
8064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8065fi
d6e01aa5
KL
8066{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8067echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8068if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8069
8070cat >>confdefs.h <<_ACEOF
8071#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8072_ACEOF
8073
8074
8075fi
d6e01aa5
KL
8076{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8077echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8078if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8079 echo $ECHO_N "(cached) $ECHO_C" >&6
8080else
8081 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8082/* confdefs.h. */
8083_ACEOF
8084cat confdefs.h >>conftest.$ac_ext
8085cat >>conftest.$ac_ext <<_ACEOF
8086/* end confdefs.h. */
7862d3a8
AS
8087$ac_includes_default
8088#if HAVE_SYS_SOCKET_H
8089#include <sys/socket.h>
8090#endif
8091#if HAVE_NET_IF_H
96f3a036 8092#include <net/if.h>
7862d3a8 8093#endif
96f3a036
DL
8094
8095int
8096main ()
8097{
8098static struct ifreq ac_aggr;
8099if (ac_aggr.ifr_netmask)
8100return 0;
8101 ;
8102 return 0;
8103}
8104_ACEOF
8105rm -f conftest.$ac_objext
d6e01aa5
KL
8106if { (ac_try="$ac_compile"
8107case "(($ac_try" in
8108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8109 *) ac_try_echo=$ac_try;;
8110esac
8111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8112 (eval "$ac_compile") 2>conftest.er1
96f3a036 8113 ac_status=$?
edfaf76d
LK
8114 grep -v '^ *+' conftest.er1 >conftest.err
8115 rm -f conftest.er1
8116 cat conftest.err >&5
96f3a036 8117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8118 (exit $ac_status); } && {
8119 test -z "$ac_c_werror_flag" ||
8120 test ! -s conftest.err
8121 } && test -s conftest.$ac_objext; then
96f3a036
DL
8122 ac_cv_member_struct_ifreq_ifr_netmask=yes
8123else
8124 echo "$as_me: failed program was:" >&5
8125sed 's/^/| /' conftest.$ac_ext >&5
8126
d6e01aa5 8127 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8128/* confdefs.h. */
8129_ACEOF
8130cat confdefs.h >>conftest.$ac_ext
8131cat >>conftest.$ac_ext <<_ACEOF
8132/* end confdefs.h. */
7862d3a8
AS
8133$ac_includes_default
8134#if HAVE_SYS_SOCKET_H
8135#include <sys/socket.h>
8136#endif
8137#if HAVE_NET_IF_H
96f3a036 8138#include <net/if.h>
7862d3a8 8139#endif
96f3a036
DL
8140
8141int
8142main ()
8143{
8144static struct ifreq ac_aggr;
8145if (sizeof ac_aggr.ifr_netmask)
8146return 0;
8147 ;
8148 return 0;
8149}
8150_ACEOF
8151rm -f conftest.$ac_objext
d6e01aa5
KL
8152if { (ac_try="$ac_compile"
8153case "(($ac_try" in
8154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8155 *) ac_try_echo=$ac_try;;
8156esac
8157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8158 (eval "$ac_compile") 2>conftest.er1
96f3a036 8159 ac_status=$?
edfaf76d
LK
8160 grep -v '^ *+' conftest.er1 >conftest.err
8161 rm -f conftest.er1
8162 cat conftest.err >&5
96f3a036 8163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8164 (exit $ac_status); } && {
8165 test -z "$ac_c_werror_flag" ||
8166 test ! -s conftest.err
8167 } && test -s conftest.$ac_objext; then
96f3a036
DL
8168 ac_cv_member_struct_ifreq_ifr_netmask=yes
8169else
8170 echo "$as_me: failed program was:" >&5
8171sed 's/^/| /' conftest.$ac_ext >&5
8172
d6e01aa5 8173 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8174fi
d6e01aa5
KL
8175
8176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8177fi
d6e01aa5
KL
8178
8179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8180fi
d6e01aa5
KL
8181{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8182echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8183if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8184
8185cat >>confdefs.h <<_ACEOF
8186#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8187_ACEOF
8188
8189
8190fi
d6e01aa5
KL
8191{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8192echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8193if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8194 echo $ECHO_N "(cached) $ECHO_C" >&6
8195else
8196 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8197/* confdefs.h. */
8198_ACEOF
8199cat confdefs.h >>conftest.$ac_ext
8200cat >>conftest.$ac_ext <<_ACEOF
8201/* end confdefs.h. */
7862d3a8
AS
8202$ac_includes_default
8203#if HAVE_SYS_SOCKET_H
8204#include <sys/socket.h>
8205#endif
8206#if HAVE_NET_IF_H
96f3a036 8207#include <net/if.h>
7862d3a8 8208#endif
96f3a036
DL
8209
8210int
8211main ()
8212{
8213static struct ifreq ac_aggr;
8214if (ac_aggr.ifr_broadaddr)
8215return 0;
8216 ;
8217 return 0;
8218}
8219_ACEOF
8220rm -f conftest.$ac_objext
d6e01aa5
KL
8221if { (ac_try="$ac_compile"
8222case "(($ac_try" in
8223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8224 *) ac_try_echo=$ac_try;;
8225esac
8226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8227 (eval "$ac_compile") 2>conftest.er1
96f3a036 8228 ac_status=$?
edfaf76d
LK
8229 grep -v '^ *+' conftest.er1 >conftest.err
8230 rm -f conftest.er1
8231 cat conftest.err >&5
96f3a036 8232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8233 (exit $ac_status); } && {
8234 test -z "$ac_c_werror_flag" ||
8235 test ! -s conftest.err
8236 } && test -s conftest.$ac_objext; then
96f3a036
DL
8237 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8238else
8239 echo "$as_me: failed program was:" >&5
8240sed 's/^/| /' conftest.$ac_ext >&5
8241
d6e01aa5 8242 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8243/* confdefs.h. */
8244_ACEOF
8245cat confdefs.h >>conftest.$ac_ext
8246cat >>conftest.$ac_ext <<_ACEOF
8247/* end confdefs.h. */
7862d3a8
AS
8248$ac_includes_default
8249#if HAVE_SYS_SOCKET_H
8250#include <sys/socket.h>
8251#endif
8252#if HAVE_NET_IF_H
96f3a036 8253#include <net/if.h>
7862d3a8 8254#endif
96f3a036
DL
8255
8256int
8257main ()
8258{
8259static struct ifreq ac_aggr;
8260if (sizeof ac_aggr.ifr_broadaddr)
8261return 0;
8262 ;
8263 return 0;
8264}
8265_ACEOF
8266rm -f conftest.$ac_objext
d6e01aa5
KL
8267if { (ac_try="$ac_compile"
8268case "(($ac_try" in
8269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8270 *) ac_try_echo=$ac_try;;
8271esac
8272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8273 (eval "$ac_compile") 2>conftest.er1
96f3a036 8274 ac_status=$?
edfaf76d
LK
8275 grep -v '^ *+' conftest.er1 >conftest.err
8276 rm -f conftest.er1
8277 cat conftest.err >&5
96f3a036 8278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8279 (exit $ac_status); } && {
8280 test -z "$ac_c_werror_flag" ||
8281 test ! -s conftest.err
8282 } && test -s conftest.$ac_objext; then
96f3a036
DL
8283 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8284else
8285 echo "$as_me: failed program was:" >&5
8286sed 's/^/| /' conftest.$ac_ext >&5
8287
d6e01aa5 8288 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8289fi
d6e01aa5
KL
8290
8291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8292fi
d6e01aa5
KL
8293
8294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8295fi
d6e01aa5
KL
8296{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8297echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8298if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8299
8300cat >>confdefs.h <<_ACEOF
8301#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8302_ACEOF
8303
8304
8305fi
d6e01aa5
KL
8306{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8307echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8308if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8309 echo $ECHO_N "(cached) $ECHO_C" >&6
8310else
8311 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8312/* confdefs.h. */
8313_ACEOF
8314cat confdefs.h >>conftest.$ac_ext
8315cat >>conftest.$ac_ext <<_ACEOF
8316/* end confdefs.h. */
7862d3a8
AS
8317$ac_includes_default
8318#if HAVE_SYS_SOCKET_H
8319#include <sys/socket.h>
8320#endif
8321#if HAVE_NET_IF_H
96f3a036 8322#include <net/if.h>
7862d3a8 8323#endif
96f3a036
DL
8324
8325int
8326main ()
8327{
8328static struct ifreq ac_aggr;
8329if (ac_aggr.ifr_addr)
8330return 0;
8331 ;
8332 return 0;
8333}
8334_ACEOF
8335rm -f conftest.$ac_objext
d6e01aa5
KL
8336if { (ac_try="$ac_compile"
8337case "(($ac_try" in
8338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8339 *) ac_try_echo=$ac_try;;
8340esac
8341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8342 (eval "$ac_compile") 2>conftest.er1
96f3a036 8343 ac_status=$?
edfaf76d
LK
8344 grep -v '^ *+' conftest.er1 >conftest.err
8345 rm -f conftest.er1
8346 cat conftest.err >&5
96f3a036 8347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8348 (exit $ac_status); } && {
8349 test -z "$ac_c_werror_flag" ||
8350 test ! -s conftest.err
8351 } && test -s conftest.$ac_objext; then
96f3a036
DL
8352 ac_cv_member_struct_ifreq_ifr_addr=yes
8353else
8354 echo "$as_me: failed program was:" >&5
8355sed 's/^/| /' conftest.$ac_ext >&5
8356
d6e01aa5 8357 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8358/* confdefs.h. */
8359_ACEOF
8360cat confdefs.h >>conftest.$ac_ext
8361cat >>conftest.$ac_ext <<_ACEOF
8362/* end confdefs.h. */
7862d3a8
AS
8363$ac_includes_default
8364#if HAVE_SYS_SOCKET_H
8365#include <sys/socket.h>
8366#endif
8367#if HAVE_NET_IF_H
96f3a036 8368#include <net/if.h>
7862d3a8 8369#endif
96f3a036
DL
8370
8371int
8372main ()
8373{
8374static struct ifreq ac_aggr;
8375if (sizeof ac_aggr.ifr_addr)
8376return 0;
8377 ;
8378 return 0;
8379}
8380_ACEOF
8381rm -f conftest.$ac_objext
d6e01aa5
KL
8382if { (ac_try="$ac_compile"
8383case "(($ac_try" in
8384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8385 *) ac_try_echo=$ac_try;;
8386esac
8387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8388 (eval "$ac_compile") 2>conftest.er1
96f3a036 8389 ac_status=$?
edfaf76d
LK
8390 grep -v '^ *+' conftest.er1 >conftest.err
8391 rm -f conftest.er1
8392 cat conftest.err >&5
96f3a036 8393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8394 (exit $ac_status); } && {
8395 test -z "$ac_c_werror_flag" ||
8396 test ! -s conftest.err
8397 } && test -s conftest.$ac_objext; then
96f3a036
DL
8398 ac_cv_member_struct_ifreq_ifr_addr=yes
8399else
8400 echo "$as_me: failed program was:" >&5
8401sed 's/^/| /' conftest.$ac_ext >&5
8402
d6e01aa5 8403 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8404fi
d6e01aa5
KL
8405
8406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8407fi
d6e01aa5
KL
8408
8409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8410fi
d6e01aa5
KL
8411{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8412echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8413if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8414
8415cat >>confdefs.h <<_ACEOF
8416#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8417_ACEOF
8418
8419
8420fi
8421
8799b3e4 8422
8799b3e4 8423
d6e01aa5
KL
8424{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8425echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8426if test "$ac_cv_prog_cc_c89" != no; then
8427 { echo "$as_me:$LINENO: result: yes" >&5
8428echo "${ECHO_T}yes" >&6; }
98418dba 8429
c0d27fcc 8430cat >>confdefs.h <<\_ACEOF
98418dba 8431#define PROTOTYPES 1
c0d27fcc
MR
8432_ACEOF
8433
8434
8435cat >>confdefs.h <<\_ACEOF
8436#define __PROTOTYPES 1
8437_ACEOF
98418dba
CW
8438
8439else
d6e01aa5
KL
8440 { echo "$as_me:$LINENO: result: no" >&5
8441echo "${ECHO_T}no" >&6; }
98418dba
CW
8442fi
8443
d6e01aa5
KL
8444{ echo "$as_me:$LINENO: checking for working volatile" >&5
8445echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8446if test "${ac_cv_c_volatile+set}" = set; then
8447 echo $ECHO_N "(cached) $ECHO_C" >&6
8448else
8449 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8450/* confdefs.h. */
8451_ACEOF
8452cat confdefs.h >>conftest.$ac_ext
8453cat >>conftest.$ac_ext <<_ACEOF
8454/* end confdefs.h. */
98418dba 8455
98418dba
CW
8456int
8457main ()
8458{
8459
8460volatile int x;
d6e01aa5
KL
8461int * volatile y = (int *) 0;
8462return !x && !y;
98418dba
CW
8463 ;
8464 return 0;
8465}
8466_ACEOF
8467rm -f conftest.$ac_objext
d6e01aa5
KL
8468if { (ac_try="$ac_compile"
8469case "(($ac_try" in
8470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8471 *) ac_try_echo=$ac_try;;
8472esac
8473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8474 (eval "$ac_compile") 2>conftest.er1
98418dba 8475 ac_status=$?
edfaf76d
LK
8476 grep -v '^ *+' conftest.er1 >conftest.err
8477 rm -f conftest.er1
8478 cat conftest.err >&5
c0d27fcc 8479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8480 (exit $ac_status); } && {
8481 test -z "$ac_c_werror_flag" ||
8482 test ! -s conftest.err
8483 } && test -s conftest.$ac_objext; then
98418dba
CW
8484 ac_cv_c_volatile=yes
8485else
8486 echo "$as_me: failed program was:" >&5
19650fd6
AS
8487sed 's/^/| /' conftest.$ac_ext >&5
8488
d6e01aa5 8489 ac_cv_c_volatile=no
98418dba 8490fi
d6e01aa5
KL
8491
8492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8493fi
d6e01aa5
KL
8494{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8495echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8496if test $ac_cv_c_volatile = no; then
8497
c0d27fcc 8498cat >>confdefs.h <<\_ACEOF
98418dba 8499#define volatile
c0d27fcc 8500_ACEOF
98418dba
CW
8501
8502fi
8503
d6e01aa5
KL
8504{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8505echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8506if test "${ac_cv_c_const+set}" = set; then
8507 echo $ECHO_N "(cached) $ECHO_C" >&6
8508else
8509 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8510/* confdefs.h. */
8511_ACEOF
8512cat confdefs.h >>conftest.$ac_ext
8513cat >>conftest.$ac_ext <<_ACEOF
8514/* end confdefs.h. */
98418dba 8515
98418dba
CW
8516int
8517main ()
8518{
8519/* FIXME: Include the comments suggested by Paul. */
8520#ifndef __cplusplus
8521 /* Ultrix mips cc rejects this. */
8522 typedef int charset[2];
d6e01aa5 8523 const charset cs;
98418dba 8524 /* SunOS 4.1.1 cc rejects this. */
d6e01aa5
KL
8525 char const *const *pcpcc;
8526 char **ppc;
98418dba
CW
8527 /* NEC SVR4.0.2 mips cc rejects this. */
8528 struct point {int x, y;};
8529 static struct point const zero = {0,0};
8530 /* AIX XL C 1.02.0.0 rejects this.
8531 It does not let you subtract one const X* pointer from another in
8532 an arm of an if-expression whose if-part is not a constant
8533 expression */
8534 const char *g = "string";
d6e01aa5 8535 pcpcc = &g + (g ? g-g : 0);
98418dba 8536 /* HPUX 7.0 cc rejects these. */
d6e01aa5
KL
8537 ++pcpcc;
8538 ppc = (char**) pcpcc;
8539 pcpcc = (char const *const *) ppc;
98418dba
CW
8540 { /* SCO 3.2v4 cc rejects this. */
8541 char *t;
8542 char const *s = 0 ? (char *) 0 : (char const *) 0;
8543
8544 *t++ = 0;
d6e01aa5 8545 if (s) return 0;
98418dba
CW
8546 }
8547 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8548 int x[] = {25, 17};
8549 const int *foo = &x[0];
8550 ++foo;
8551 }
8552 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8553 typedef const int *iptr;
8554 iptr p = 0;
8555 ++p;
8556 }
8557 { /* AIX XL C 1.02.0.0 rejects this saying
8558 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8559 struct s { int j; const int *ap[3]; };
8560 struct s *b; b->j = 5;
8561 }
8562 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8563 const int foo = 10;
d6e01aa5 8564 if (!foo) return 0;
98418dba 8565 }
d6e01aa5 8566 return !cs[0] && !zero.x;
98418dba
CW
8567#endif
8568
8569 ;
8570 return 0;
8571}
8572_ACEOF
8573rm -f conftest.$ac_objext
d6e01aa5
KL
8574if { (ac_try="$ac_compile"
8575case "(($ac_try" in
8576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8577 *) ac_try_echo=$ac_try;;
8578esac
8579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8580 (eval "$ac_compile") 2>conftest.er1
98418dba 8581 ac_status=$?
edfaf76d
LK
8582 grep -v '^ *+' conftest.er1 >conftest.err
8583 rm -f conftest.er1
8584 cat conftest.err >&5
c0d27fcc 8585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8586 (exit $ac_status); } && {
8587 test -z "$ac_c_werror_flag" ||
8588 test ! -s conftest.err
8589 } && test -s conftest.$ac_objext; then
98418dba
CW
8590 ac_cv_c_const=yes
8591else
8592 echo "$as_me: failed program was:" >&5
19650fd6
AS
8593sed 's/^/| /' conftest.$ac_ext >&5
8594
d6e01aa5 8595 ac_cv_c_const=no
98418dba 8596fi
d6e01aa5
KL
8597
8598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8599fi
d6e01aa5
KL
8600{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8601echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8602if test $ac_cv_c_const = no; then
8603
c0d27fcc 8604cat >>confdefs.h <<\_ACEOF
98418dba 8605#define const
c0d27fcc 8606_ACEOF
98418dba
CW
8607
8608fi
8609
d6e01aa5
KL
8610{ echo "$as_me:$LINENO: checking for void * support" >&5
8611echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
8612if test "${emacs_cv_void_star+set}" = set; then
8613 echo $ECHO_N "(cached) $ECHO_C" >&6
8614else
8615 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8616/* confdefs.h. */
8617_ACEOF
8618cat confdefs.h >>conftest.$ac_ext
8619cat >>conftest.$ac_ext <<_ACEOF
8620/* end confdefs.h. */
98418dba 8621
98418dba
CW
8622int
8623main ()
8624{
8625void * foo;
8626 ;
8627 return 0;
8628}
8629_ACEOF
8630rm -f conftest.$ac_objext
d6e01aa5
KL
8631if { (ac_try="$ac_compile"
8632case "(($ac_try" in
8633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8634 *) ac_try_echo=$ac_try;;
8635esac
8636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8637 (eval "$ac_compile") 2>conftest.er1
98418dba 8638 ac_status=$?
edfaf76d
LK
8639 grep -v '^ *+' conftest.er1 >conftest.err
8640 rm -f conftest.er1
8641 cat conftest.err >&5
c0d27fcc 8642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8643 (exit $ac_status); } && {
8644 test -z "$ac_c_werror_flag" ||
8645 test ! -s conftest.err
8646 } && test -s conftest.$ac_objext; then
98418dba
CW
8647 emacs_cv_void_star=yes
8648else
8649 echo "$as_me: failed program was:" >&5
19650fd6
AS
8650sed 's/^/| /' conftest.$ac_ext >&5
8651
d6e01aa5 8652 emacs_cv_void_star=no
98418dba 8653fi
d6e01aa5
KL
8654
8655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8656fi
d6e01aa5
KL
8657{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
8658echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 8659if test $emacs_cv_void_star = yes; then
c0d27fcc 8660 cat >>confdefs.h <<\_ACEOF
98418dba 8661#define POINTER_TYPE void
c0d27fcc 8662_ACEOF
98418dba
CW
8663
8664else
c0d27fcc 8665 cat >>confdefs.h <<\_ACEOF
98418dba 8666#define POINTER_TYPE char
c0d27fcc 8667_ACEOF
98418dba
CW
8668
8669fi
8670
c0d27fcc 8671
4494a266
JD
8672
8673
cd958eb3 8674
d6e01aa5
KL
8675{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8676echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
8677set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
8678if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
8679 echo $ECHO_N "(cached) $ECHO_C" >&6
8680else
c0d27fcc 8681 cat >conftest.make <<\_ACEOF
d6e01aa5 8682SHELL = /bin/sh
98418dba 8683all:
d6e01aa5 8684 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 8685_ACEOF
98418dba 8686# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
d6e01aa5
KL
8687case `${MAKE-make} -f conftest.make 2>/dev/null` in
8688 *@@@%%%=?*=@@@%%%*)
8689 eval ac_cv_prog_make_${ac_make}_set=yes;;
8690 *)
8691 eval ac_cv_prog_make_${ac_make}_set=no;;
8692esac
98418dba
CW
8693rm -f conftest.make
8694fi
d6e01aa5
KL
8695if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
8696 { echo "$as_me:$LINENO: result: yes" >&5
8697echo "${ECHO_T}yes" >&6; }
98418dba
CW
8698 SET_MAKE=
8699else
d6e01aa5
KL
8700 { echo "$as_me:$LINENO: result: no" >&5
8701echo "${ECHO_T}no" >&6; }
98418dba
CW
8702 SET_MAKE="MAKE=${MAKE-make}"
8703fi
8704
c0d27fcc 8705
d6e01aa5
KL
8706{ echo "$as_me:$LINENO: checking for long file names" >&5
8707echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
8708if test "${ac_cv_sys_long_file_names+set}" = set; then
8709 echo $ECHO_N "(cached) $ECHO_C" >&6
8710else
8711 ac_cv_sys_long_file_names=yes
8712# Test for long file names in all the places we know might matter:
8713# . the current directory, where building will happen
8714# $prefix/lib where we will be installing things
8715# $exec_prefix/lib likewise
98418dba 8716# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
8717# /tmp where it might want to write temporary files
8718# /var/tmp likewise
8719# /usr/tmp likewise
d6e01aa5
KL
8720for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8721 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8722 # in the usual case where exec_prefix is '${prefix}'.
8723 case $ac_dir in #(
8724 . | /* | ?:[\\/]*) ;; #(
8725 *) continue;;
8726 esac
8727 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 8728 ac_xdir=$ac_dir/cf$$
d6e01aa5 8729 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
8730 ac_tf1=$ac_xdir/conftest9012345
8731 ac_tf2=$ac_xdir/conftest9012346
d6e01aa5 8732 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 8733 ac_cv_sys_long_file_names=no
d6e01aa5
KL
8734 rm -f -r "$ac_xdir" 2>/dev/null
8735 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
8736done
8737fi
d6e01aa5
KL
8738{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
8739echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
8740if test $ac_cv_sys_long_file_names = yes; then
8741
c0d27fcc 8742cat >>confdefs.h <<\_ACEOF
98418dba 8743#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8744_ACEOF
98418dba
CW
8745
8746fi
8747
c0d27fcc 8748
98418dba
CW
8749#### Choose a window system.
8750
d6e01aa5
KL
8751{ echo "$as_me:$LINENO: checking for X" >&5
8752echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 8753
c0d27fcc 8754
d6e01aa5 8755# Check whether --with-x was given.
98418dba 8756if test "${with_x+set}" = set; then
d6e01aa5
KL
8757 withval=$with_x;
8758fi
98418dba 8759
98418dba
CW
8760# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8761if test "x$with_x" = xno; then
8762 # The user explicitly disabled X.
8763 have_x=disabled
8764else
d6e01aa5
KL
8765 case $x_includes,$x_libraries in #(
8766 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
8767echo "$as_me: error: Cannot use X directory names containing '" >&2;}
8768 { (exit 1); exit 1; }; };; #(
8769 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
8770 echo $ECHO_N "(cached) $ECHO_C" >&6
8771else
8772 # One or both of the vars are not set, and there is no cached value.
8773ac_x_includes=no ac_x_libraries=no
d6e01aa5 8774rm -f -r conftest.dir
98418dba
CW
8775if mkdir conftest.dir; then
8776 cd conftest.dir
c0d27fcc 8777 cat >Imakefile <<'_ACEOF'
d6e01aa5
KL
8778incroot:
8779 @echo incroot='${INCROOT}'
8780usrlibdir:
8781 @echo usrlibdir='${USRLIBDIR}'
8782libdir:
8783 @echo libdir='${LIBDIR}'
8784_ACEOF
8785 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 8786 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
d6e01aa5
KL
8787 for ac_var in incroot usrlibdir libdir; do
8788 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8789 done
98418dba
CW
8790 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8791 for ac_extension in a so sl; do
d6e01aa5
KL
8792 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8793 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 8794 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
8795 fi
8796 done
8797 # Screen out bogus values from the imake configuration. They are
8798 # bogus both because they are the default anyway, and because
8799 # using them would break gcc on systems where it needs fixed includes.
8800 case $ac_im_incroot in
d6e01aa5 8801 /usr/include) ac_x_includes= ;;
98418dba
CW
8802 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8803 esac
8804 case $ac_im_usrlibdir in
8805 /usr/lib | /lib) ;;
8806 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8807 esac
8808 fi
8809 cd ..
d6e01aa5 8810 rm -f -r conftest.dir
98418dba
CW
8811fi
8812
8813# Standard set of common directories for X headers.
8814# Check X11 before X11Rn because it is often a symlink to the current release.
8815ac_x_header_dirs='
8816/usr/X11/include
8817/usr/X11R6/include
8818/usr/X11R5/include
8819/usr/X11R4/include
8820
8821/usr/include/X11
8822/usr/include/X11R6
8823/usr/include/X11R5
8824/usr/include/X11R4
8825
8826/usr/local/X11/include
8827/usr/local/X11R6/include
8828/usr/local/X11R5/include
8829/usr/local/X11R4/include
8830
8831/usr/local/include/X11
8832/usr/local/include/X11R6
8833/usr/local/include/X11R5
8834/usr/local/include/X11R4
8835
8836/usr/X386/include
8837/usr/x386/include
8838/usr/XFree86/include/X11
8839
8840/usr/include
8841/usr/local/include
8842/usr/unsupported/include
8843/usr/athena/include
8844/usr/local/x11r5/include
8845/usr/lpp/Xamples/include
8846
8847/usr/openwin/include
8848/usr/openwin/share/include'
8849
8850if test "$ac_x_includes" = no; then
d6e01aa5 8851 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
8852 # First, try using that file with no special directory specified.
8853 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8854/* confdefs.h. */
8855_ACEOF
8856cat confdefs.h >>conftest.$ac_ext
8857cat >>conftest.$ac_ext <<_ACEOF
8858/* end confdefs.h. */
c3a63088 8859#include <X11/Xlib.h>
98418dba 8860_ACEOF
d6e01aa5
KL
8861if { (ac_try="$ac_cpp conftest.$ac_ext"
8862case "(($ac_try" in
8863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8864 *) ac_try_echo=$ac_try;;
8865esac
8866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8867 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 8868 ac_status=$?
6bae0ccf 8869 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8870 rm -f conftest.er1
8871 cat conftest.err >&5
c0d27fcc 8872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8873 (exit $ac_status); } >/dev/null && {
8874 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8875 test ! -s conftest.err
8876 }; then
98418dba
CW
8877 # We can compile using X headers with no special include directory.
8878ac_x_includes=
8879else
8880 echo "$as_me: failed program was:" >&5
19650fd6
AS
8881sed 's/^/| /' conftest.$ac_ext >&5
8882
98418dba 8883 for ac_dir in $ac_x_header_dirs; do
c3a63088 8884 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
8885 ac_x_includes=$ac_dir
8886 break
8887 fi
8888done
8889fi
d6e01aa5 8890
98418dba
CW
8891rm -f conftest.err conftest.$ac_ext
8892fi # $ac_x_includes = no
8893
8894if test "$ac_x_libraries" = no; then
8895 # Check for the libraries.
8896 # See if we find them without any special options.
8897 # Don't add to $LIBS permanently.
8898 ac_save_LIBS=$LIBS
c3a63088 8899 LIBS="-lX11 $LIBS"
98418dba 8900 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8901/* confdefs.h. */
8902_ACEOF
8903cat confdefs.h >>conftest.$ac_ext
8904cat >>conftest.$ac_ext <<_ACEOF
8905/* end confdefs.h. */
c3a63088 8906#include <X11/Xlib.h>
98418dba
CW
8907int
8908main ()
8909{
c3a63088 8910XrmInitialize ()
98418dba
CW
8911 ;
8912 return 0;
8913}
8914_ACEOF
8915rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
8916if { (ac_try="$ac_link"
8917case "(($ac_try" in
8918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8919 *) ac_try_echo=$ac_try;;
8920esac
8921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8922 (eval "$ac_link") 2>conftest.er1
98418dba 8923 ac_status=$?
edfaf76d
LK
8924 grep -v '^ *+' conftest.er1 >conftest.err
8925 rm -f conftest.er1
8926 cat conftest.err >&5
c0d27fcc 8927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8928 (exit $ac_status); } && {
8929 test -z "$ac_c_werror_flag" ||
8930 test ! -s conftest.err
8931 } && test -s conftest$ac_exeext &&
8932 $as_test_x conftest$ac_exeext; then
98418dba
CW
8933 LIBS=$ac_save_LIBS
8934# We can link X programs with no special library path.
8935ac_x_libraries=
8936else
8937 echo "$as_me: failed program was:" >&5
19650fd6
AS
8938sed 's/^/| /' conftest.$ac_ext >&5
8939
d6e01aa5 8940 LIBS=$ac_save_LIBS
98418dba
CW
8941for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8942do
8943 # Don't even attempt the hair of trying to link an X program!
8944 for ac_extension in a so sl; do
d6e01aa5 8945 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
8946 ac_x_libraries=$ac_dir
8947 break 2
8948 fi
8949 done
8950done
8951fi
d6e01aa5
KL
8952
8953rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 8954 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
8955fi # $ac_x_libraries = no
8956
d6e01aa5
KL
8957case $ac_x_includes,$ac_x_libraries in #(
8958 no,* | *,no | *\'*)
8959 # Didn't find X, or a directory has "'" in its name.
8960 ac_cv_have_x="have_x=no";; #(
8961 *)
8962 # Record where we found X for the cache.
8963 ac_cv_have_x="have_x=yes\
8964 ac_x_includes='$ac_x_includes'\
8965 ac_x_libraries='$ac_x_libraries'"
8966esac
98418dba 8967fi
d6e01aa5
KL
8968;; #(
8969 *) have_x=yes;;
8970 esac
98418dba
CW
8971 eval "$ac_cv_have_x"
8972fi # $with_x != no
8973
8974if test "$have_x" != yes; then
d6e01aa5
KL
8975 { echo "$as_me:$LINENO: result: $have_x" >&5
8976echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
8977 no_x=yes
8978else
8979 # If each of the values was on the command line, it overrides each guess.
8980 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8981 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8982 # Update the cache value to reflect the command line values.
d6e01aa5
KL
8983 ac_cv_have_x="have_x=yes\
8984 ac_x_includes='$x_includes'\
8985 ac_x_libraries='$x_libraries'"
8986 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
8987echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
8988fi
8989
8990if test "$no_x" = yes; then
8991 window_system=none
8992else
8993 window_system=x11
8994fi
8995
92d1ccf4
AS
8996if test "${x_libraries}" != NONE; then
8997 if test -n "${x_libraries}"; then
8998 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
8999 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9000 fi
98418dba 9001 x_default_search_path=""
92d1ccf4
AS
9002 x_search_path=${x_libraries}
9003 if test -z "${x_search_path}"; then
9004 x_search_path=/usr/lib
9005 fi
9006 for x_library in `echo ${x_search_path}: | \
9007 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9008 x_search_path="\
9009${x_library}/X11/%L/%T/%N%C%S:\
9010${x_library}/X11/%l/%T/%N%C%S:\
9011${x_library}/X11/%T/%N%C%S:\
9012${x_library}/X11/%L/%T/%N%S:\
9013${x_library}/X11/%l/%T/%N%S:\
9014${x_library}/X11/%T/%N%S"
9015 if test x"${x_default_search_path}" = x; then
9016 x_default_search_path=${x_search_path}
9017 else
9018 x_default_search_path="${x_search_path}:${x_default_search_path}"
9019 fi
9020 done
9021fi
9022if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9023 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9024fi
9025
9026if test x"${x_includes}" = x; then
9027 bitmapdir=/usr/include/X11/bitmaps
9028else
9029 # accumulate include directories that have X11 bitmap subdirectories
9030 bmd_acc="dummyval"
9031 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9032 if test -d "${bmd}/X11/bitmaps"; then
9033 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9034 fi
9035 if test -d "${bmd}/bitmaps"; then
9036 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9037 fi
9038 done
9039 if test ${bmd_acc} != "dummyval"; then
9040 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9041 fi
9042fi
9043
5d6da11e 9044HAVE_CARBON=no
1d4d5604
YM
9045if test "${with_carbon}" != no; then
9046 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
d6e01aa5
KL
9047 { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9048echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9049if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9050 echo $ECHO_N "(cached) $ECHO_C" >&6
9051fi
d6e01aa5
KL
9052{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9053echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9054else
9055 # Is the header compilable?
d6e01aa5
KL
9056{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9057echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
5d6da11e
YM
9058cat >conftest.$ac_ext <<_ACEOF
9059/* confdefs.h. */
9060_ACEOF
9061cat confdefs.h >>conftest.$ac_ext
9062cat >>conftest.$ac_ext <<_ACEOF
9063/* end confdefs.h. */
9064$ac_includes_default
9065#include <Carbon/Carbon.h>
9066_ACEOF
9067rm -f conftest.$ac_objext
d6e01aa5
KL
9068if { (ac_try="$ac_compile"
9069case "(($ac_try" in
9070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9071 *) ac_try_echo=$ac_try;;
9072esac
9073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9074 (eval "$ac_compile") 2>conftest.er1
5d6da11e 9075 ac_status=$?
edfaf76d
LK
9076 grep -v '^ *+' conftest.er1 >conftest.err
9077 rm -f conftest.er1
9078 cat conftest.err >&5
5d6da11e 9079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9080 (exit $ac_status); } && {
9081 test -z "$ac_c_werror_flag" ||
9082 test ! -s conftest.err
9083 } && test -s conftest.$ac_objext; then
5d6da11e
YM
9084 ac_header_compiler=yes
9085else
9086 echo "$as_me: failed program was:" >&5
9087sed 's/^/| /' conftest.$ac_ext >&5
9088
d6e01aa5 9089 ac_header_compiler=no
5d6da11e 9090fi
d6e01aa5
KL
9091
9092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9093{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9094echo "${ECHO_T}$ac_header_compiler" >&6; }
5d6da11e
YM
9095
9096# Is the header present?
d6e01aa5
KL
9097{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9098echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
5d6da11e
YM
9099cat >conftest.$ac_ext <<_ACEOF
9100/* confdefs.h. */
9101_ACEOF
9102cat confdefs.h >>conftest.$ac_ext
9103cat >>conftest.$ac_ext <<_ACEOF
9104/* end confdefs.h. */
9105#include <Carbon/Carbon.h>
9106_ACEOF
d6e01aa5
KL
9107if { (ac_try="$ac_cpp conftest.$ac_ext"
9108case "(($ac_try" in
9109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9110 *) ac_try_echo=$ac_try;;
9111esac
9112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9113 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5d6da11e
YM
9114 ac_status=$?
9115 grep -v '^ *+' conftest.er1 >conftest.err
9116 rm -f conftest.er1
9117 cat conftest.err >&5
9118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9119 (exit $ac_status); } >/dev/null && {
9120 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9121 test ! -s conftest.err
9122 }; then
5d6da11e
YM
9123 ac_header_preproc=yes
9124else
9125 echo "$as_me: failed program was:" >&5
9126sed 's/^/| /' conftest.$ac_ext >&5
9127
9128 ac_header_preproc=no
9129fi
d6e01aa5 9130
5d6da11e 9131rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
9132{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9133echo "${ECHO_T}$ac_header_preproc" >&6; }
5d6da11e
YM
9134
9135# So? What about this header?
edfaf76d
LK
9136case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9137 yes:no: )
5d6da11e
YM
9138 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9139echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9140 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
9141echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
9142 ac_header_preproc=yes
5d6da11e 9143 ;;
edfaf76d 9144 no:yes:* )
5d6da11e
YM
9145 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9146echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
9147 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9148echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9149 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
9150echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
9151 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
9152echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
9153 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9154echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9155 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
9156echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 9157
5d6da11e
YM
9158 ;;
9159esac
d6e01aa5
KL
9160{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9161echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9162if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9163 echo $ECHO_N "(cached) $ECHO_C" >&6
9164else
9165 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
9166fi
d6e01aa5
KL
9167{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9168echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9169
9170fi
9171if test $ac_cv_header_Carbon_Carbon_h = yes; then
9172 HAVE_CARBON=yes
9173fi
9174
9175
1d4d5604
YM
9176fi
9177if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
9178 if test "${with_carbon+set}" != set \
9179 && test "${carbon_appdir_x+set}" != set; then
ec8fcb10
YM
9180 for var in with_x with_x_toolkit with_gtk with_xim \
9181 with_xpm with_jpeg with_tiff with_gif with_png; do
9182 if eval test \"\${$var+set}\" = set; then
9183 HAVE_CARBON=no
9184 break
9185 fi
9186 done
5d6da11e
YM
9187 fi
9188fi
1d4d5604
YM
9189if test "${HAVE_CARBON}" = yes; then
9190 window_system=mac
9191fi
9192
9193case "${window_system}" in
9194 x11 )
9195 HAVE_X_WINDOWS=yes
9196 HAVE_X11=yes
9197 case "${with_x_toolkit}" in
9198 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9199 motif ) USE_X_TOOLKIT=MOTIF ;;
9200 gtk ) with_gtk=yes
9201 USE_X_TOOLKIT=none ;;
9202 no ) USE_X_TOOLKIT=none ;;
089a966d
GM
9203 * )
9204 if test x"$with_gtk" = xyes; then
9205 USE_X_TOOLKIT=none
9206 else
9207 USE_X_TOOLKIT=maybe
9208 fi
9209 ;;
1d4d5604
YM
9210 esac
9211 ;;
9212 mac | none )
9213 HAVE_X_WINDOWS=no
9214 HAVE_X11=no
9215 USE_X_TOOLKIT=none
9216 ;;
9217esac
9218
cfe440b8
JD
9219if test "$window_system" = none && test "X$with_x" != "Xno"; then
9220 # Extract the first word of "X", so it can be a program name with args.
9221set dummy X; ac_word=$2
9222{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9223echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9224if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
9225 echo $ECHO_N "(cached) $ECHO_C" >&6
9226else
9227 if test -n "$HAVE_XSERVER"; then
9228 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9229else
9230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9231for as_dir in $PATH
9232do
9233 IFS=$as_save_IFS
9234 test -z "$as_dir" && as_dir=.
9235 for ac_exec_ext in '' $ac_executable_extensions; do
9236 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9237 ac_cv_prog_HAVE_XSERVER="true"
9238 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9239 break 2
9240 fi
9241done
9242done
9243IFS=$as_save_IFS
9244
9245 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9246fi
9247fi
9248HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9249if test -n "$HAVE_XSERVER"; then
9250 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9251echo "${ECHO_T}$HAVE_XSERVER" >&6; }
9252else
9253 { echo "$as_me:$LINENO: result: no" >&5
9254echo "${ECHO_T}no" >&6; }
9255fi
9256
9257
9258 if test "$HAVE_XSERVER" = true ||
9259 test -n "$DISPLAY" ||
9260 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9261 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
0cfc0546
GM
9262were found. You should install the relevant development files for X
9263and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9264sure you have development files for image handling, i.e.
9265tiff, gif, jpeg, png and xpm.
9266If you are sure you want Emacs compiled without X window support, pass
9267 --without-x
9268to configure." >&5
9269echo "$as_me: error: You seem to be running X, but no X development libraries
0cfc0546
GM
9270were found. You should install the relevant development files for X
9271and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9272sure you have development files for image handling, i.e.
9273tiff, gif, jpeg, png and xpm.
9274If you are sure you want Emacs compiled without X window support, pass
9275 --without-x
9276to configure." >&2;}
9277 { (exit 1); exit 1; }; }
9278 fi
9279fi
9280
1d4d5604
YM
9281### If we're using X11, we should use the X menu package.
9282HAVE_MENUS=no
9283case ${HAVE_X11} in
9284 yes ) HAVE_MENUS=yes ;;
9285esac
9286
98418dba
CW
9287### Compute the unexec source name from the object name.
9288UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
9289
9290# Do the opsystem or machine files prohibit the use of the GNU malloc?
9291# Assume not, until told otherwise.
9292GNU_MALLOC=yes
9293doug_lea_malloc=yes
d6e01aa5
KL
9294{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9295echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9296if test "${ac_cv_func_malloc_get_state+set}" = set; then
9297 echo $ECHO_N "(cached) $ECHO_C" >&6
9298else
9299 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9300/* confdefs.h. */
9301_ACEOF
9302cat confdefs.h >>conftest.$ac_ext
9303cat >>conftest.$ac_ext <<_ACEOF
9304/* end confdefs.h. */
edfaf76d
LK
9305/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9306 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9307#define malloc_get_state innocuous_malloc_get_state
9308
98418dba 9309/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9310 which can conflict with char malloc_get_state (); below.
9311 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9312 <limits.h> exists even on freestanding compilers. */
edfaf76d 9313
19650fd6
AS
9314#ifdef __STDC__
9315# include <limits.h>
9316#else
9317# include <assert.h>
9318#endif
edfaf76d
LK
9319
9320#undef malloc_get_state
9321
d6e01aa5
KL
9322/* Override any GCC internal prototype to avoid an error.
9323 Use char because int might match the return type of a GCC
9324 builtin and then its argument prototype would still apply. */
98418dba
CW
9325#ifdef __cplusplus
9326extern "C"
9327#endif
98418dba 9328char malloc_get_state ();
98418dba
CW
9329/* The GNU C library defines this for functions which it implements
9330 to always fail with ENOSYS. Some functions are actually named
9331 something starting with __ and the normal name is an alias. */
d6e01aa5 9332#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9333choke me
98418dba
CW
9334#endif
9335
19650fd6
AS
9336int
9337main ()
9338{
d6e01aa5 9339return malloc_get_state ();
98418dba
CW
9340 ;
9341 return 0;
9342}
9343_ACEOF
9344rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
9345if { (ac_try="$ac_link"
9346case "(($ac_try" in
9347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9348 *) ac_try_echo=$ac_try;;
9349esac
9350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9351 (eval "$ac_link") 2>conftest.er1
98418dba 9352 ac_status=$?
edfaf76d
LK
9353 grep -v '^ *+' conftest.er1 >conftest.err
9354 rm -f conftest.er1
9355 cat conftest.err >&5
c0d27fcc 9356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9357 (exit $ac_status); } && {
9358 test -z "$ac_c_werror_flag" ||
9359 test ! -s conftest.err
9360 } && test -s conftest$ac_exeext &&
9361 $as_test_x conftest$ac_exeext; then
98418dba
CW
9362 ac_cv_func_malloc_get_state=yes
9363else
9364 echo "$as_me: failed program was:" >&5
19650fd6
AS
9365sed 's/^/| /' conftest.$ac_ext >&5
9366
d6e01aa5 9367 ac_cv_func_malloc_get_state=no
98418dba 9368fi
d6e01aa5
KL
9369
9370rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9371 conftest$ac_exeext conftest.$ac_ext
98418dba 9372fi
d6e01aa5
KL
9373{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9374echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9375if test $ac_cv_func_malloc_get_state = yes; then
9376 :
9377else
9378 doug_lea_malloc=no
9379fi
9380
d6e01aa5
KL
9381{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9382echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9383if test "${ac_cv_func_malloc_set_state+set}" = set; then
9384 echo $ECHO_N "(cached) $ECHO_C" >&6
9385else
9386 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9387/* confdefs.h. */
9388_ACEOF
9389cat confdefs.h >>conftest.$ac_ext
9390cat >>conftest.$ac_ext <<_ACEOF
9391/* end confdefs.h. */
edfaf76d
LK
9392/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9393 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9394#define malloc_set_state innocuous_malloc_set_state
9395
98418dba 9396/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9397 which can conflict with char malloc_set_state (); below.
9398 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9399 <limits.h> exists even on freestanding compilers. */
edfaf76d 9400
19650fd6
AS
9401#ifdef __STDC__
9402# include <limits.h>
9403#else
9404# include <assert.h>
9405#endif
edfaf76d
LK
9406
9407#undef malloc_set_state
9408
d6e01aa5
KL
9409/* Override any GCC internal prototype to avoid an error.
9410 Use char because int might match the return type of a GCC
9411 builtin and then its argument prototype would still apply. */
98418dba
CW
9412#ifdef __cplusplus
9413extern "C"
9414#endif
98418dba 9415char malloc_set_state ();
98418dba
CW
9416/* The GNU C library defines this for functions which it implements
9417 to always fail with ENOSYS. Some functions are actually named
9418 something starting with __ and the normal name is an alias. */
d6e01aa5 9419#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9420choke me
98418dba
CW
9421#endif
9422
19650fd6
AS
9423int
9424main ()
9425{
d6e01aa5 9426return malloc_set_state ();
98418dba
CW
9427 ;
9428 return 0;
9429}
9430_ACEOF
9431rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
9432if { (ac_try="$ac_link"
9433case "(($ac_try" in
9434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9435 *) ac_try_echo=$ac_try;;
9436esac
9437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9438 (eval "$ac_link") 2>conftest.er1
98418dba 9439 ac_status=$?
edfaf76d
LK
9440 grep -v '^ *+' conftest.er1 >conftest.err
9441 rm -f conftest.er1
9442 cat conftest.err >&5
c0d27fcc 9443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9444 (exit $ac_status); } && {
9445 test -z "$ac_c_werror_flag" ||
9446 test ! -s conftest.err
9447 } && test -s conftest$ac_exeext &&
9448 $as_test_x conftest$ac_exeext; then
98418dba
CW
9449 ac_cv_func_malloc_set_state=yes
9450else
9451 echo "$as_me: failed program was:" >&5
19650fd6
AS
9452sed 's/^/| /' conftest.$ac_ext >&5
9453
d6e01aa5 9454 ac_cv_func_malloc_set_state=no
98418dba 9455fi
d6e01aa5
KL
9456
9457rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9458 conftest$ac_exeext conftest.$ac_ext
98418dba 9459fi
d6e01aa5
KL
9460{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9461echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9462if test $ac_cv_func_malloc_set_state = yes; then
9463 :
9464else
9465 doug_lea_malloc=no
9466fi
9467
d6e01aa5
KL
9468{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9469echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9470if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9471 echo $ECHO_N "(cached) $ECHO_C" >&6
9472else
9473 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9474/* confdefs.h. */
9475_ACEOF
9476cat confdefs.h >>conftest.$ac_ext
9477cat >>conftest.$ac_ext <<_ACEOF
9478/* end confdefs.h. */
98418dba 9479extern void (* __after_morecore_hook)();
98418dba
CW
9480int
9481main ()
9482{
9483__after_morecore_hook = 0
9484 ;
9485 return 0;
9486}
9487_ACEOF
9488rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
9489if { (ac_try="$ac_link"
9490case "(($ac_try" in
9491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9492 *) ac_try_echo=$ac_try;;
9493esac
9494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9495 (eval "$ac_link") 2>conftest.er1
98418dba 9496 ac_status=$?
edfaf76d
LK
9497 grep -v '^ *+' conftest.er1 >conftest.err
9498 rm -f conftest.er1
9499 cat conftest.err >&5
c0d27fcc 9500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9501 (exit $ac_status); } && {
9502 test -z "$ac_c_werror_flag" ||
9503 test ! -s conftest.err
9504 } && test -s conftest$ac_exeext &&
9505 $as_test_x conftest$ac_exeext; then
98418dba
CW
9506 emacs_cv_var___after_morecore_hook=yes
9507else
9508 echo "$as_me: failed program was:" >&5
19650fd6
AS
9509sed 's/^/| /' conftest.$ac_ext >&5
9510
d6e01aa5 9511 emacs_cv_var___after_morecore_hook=no
98418dba 9512fi
d6e01aa5
KL
9513
9514rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9515 conftest$ac_exeext conftest.$ac_ext
98418dba 9516fi
d6e01aa5
KL
9517{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9518echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9519if test $emacs_cv_var___after_morecore_hook = no; then
9520 doug_lea_malloc=no
9521fi
9522if test "${system_malloc}" = "yes"; then
9523 GNU_MALLOC=no
9524 GNU_MALLOC_reason="
9525 (The GNU allocators don't work with this system configuration.)"
9526fi
9527if test "$doug_lea_malloc" = "yes" ; then
9528 if test "$GNU_MALLOC" = yes ; then
9529 GNU_MALLOC_reason="
9530 (Using Doug Lea's new malloc from the GNU C Library.)"
9531 fi
b936fae4 9532
c0d27fcc 9533cat >>confdefs.h <<\_ACEOF
98418dba 9534#define DOUG_LEA_MALLOC 1
c0d27fcc 9535_ACEOF
98418dba
CW
9536
9537fi
9538
9539if test x"${REL_ALLOC}" = x; then
9540 REL_ALLOC=${GNU_MALLOC}
9541fi
9542
9543
c0d27fcc
MR
9544
9545
9546for ac_header in stdlib.h unistd.h
98418dba
CW
9547do
9548as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
9549if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9550 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9551echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9552if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 9553 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9554fi
d6e01aa5
KL
9555ac_res=`eval echo '${'$as_ac_Header'}'`
9556 { echo "$as_me:$LINENO: result: $ac_res" >&5
9557echo "${ECHO_T}$ac_res" >&6; }
98418dba 9558else
c0d27fcc 9559 # Is the header compilable?
d6e01aa5
KL
9560{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9561echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9562cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9563/* confdefs.h. */
9564_ACEOF
9565cat confdefs.h >>conftest.$ac_ext
9566cat >>conftest.$ac_ext <<_ACEOF
9567/* end confdefs.h. */
98418dba
CW
9568$ac_includes_default
9569#include <$ac_header>
9570_ACEOF
9571rm -f conftest.$ac_objext
d6e01aa5
KL
9572if { (ac_try="$ac_compile"
9573case "(($ac_try" in
9574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9575 *) ac_try_echo=$ac_try;;
9576esac
9577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9578 (eval "$ac_compile") 2>conftest.er1
98418dba 9579 ac_status=$?
edfaf76d
LK
9580 grep -v '^ *+' conftest.er1 >conftest.err
9581 rm -f conftest.er1
9582 cat conftest.err >&5
c0d27fcc 9583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9584 (exit $ac_status); } && {
9585 test -z "$ac_c_werror_flag" ||
9586 test ! -s conftest.err
9587 } && test -s conftest.$ac_objext; then
c0d27fcc 9588 ac_header_compiler=yes
98418dba
CW
9589else
9590 echo "$as_me: failed program was:" >&5
19650fd6
AS
9591sed 's/^/| /' conftest.$ac_ext >&5
9592
d6e01aa5 9593 ac_header_compiler=no
98418dba 9594fi
d6e01aa5
KL
9595
9596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9597{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9598echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9599
c0d27fcc 9600# Is the header present?
d6e01aa5
KL
9601{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9602echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9603cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9604/* confdefs.h. */
9605_ACEOF
9606cat confdefs.h >>conftest.$ac_ext
9607cat >>conftest.$ac_ext <<_ACEOF
9608/* end confdefs.h. */
98418dba
CW
9609#include <$ac_header>
9610_ACEOF
d6e01aa5
KL
9611if { (ac_try="$ac_cpp conftest.$ac_ext"
9612case "(($ac_try" in
9613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9614 *) ac_try_echo=$ac_try;;
9615esac
9616eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9617 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9618 ac_status=$?
6bae0ccf 9619 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9620 rm -f conftest.er1
9621 cat conftest.err >&5
c0d27fcc 9622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9623 (exit $ac_status); } >/dev/null && {
9624 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9625 test ! -s conftest.err
9626 }; then
c0d27fcc 9627 ac_header_preproc=yes
98418dba
CW
9628else
9629 echo "$as_me: failed program was:" >&5
19650fd6
AS
9630sed 's/^/| /' conftest.$ac_ext >&5
9631
c0d27fcc 9632 ac_header_preproc=no
98418dba 9633fi
d6e01aa5 9634
98418dba 9635rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
9636{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9637echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
9638
9639# So? What about this header?
edfaf76d
LK
9640case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9641 yes:no: )
c0d27fcc
MR
9642 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9643echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9644 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9645echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9646 ac_header_preproc=yes
9647 ;;
9648 no:yes:* )
9649 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9650echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9651 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9652echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9653 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9654echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9655 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9656echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9657 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9658echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9659 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9660echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 9661
19650fd6 9662 ;;
c0d27fcc 9663esac
d6e01aa5
KL
9664{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9665echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9666if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
9667 echo $ECHO_N "(cached) $ECHO_C" >&6
9668else
edfaf76d 9669 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9670fi
d6e01aa5
KL
9671ac_res=`eval echo '${'$as_ac_Header'}'`
9672 { echo "$as_me:$LINENO: result: $ac_res" >&5
9673echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
9674
9675fi
98418dba 9676if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9677 cat >>confdefs.h <<_ACEOF
98418dba 9678#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9679_ACEOF
98418dba
CW
9680
9681fi
c0d27fcc 9682
98418dba
CW
9683done
9684
c0d27fcc 9685
98418dba
CW
9686for ac_func in getpagesize
9687do
9688as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
9689{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9690echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9691if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9692 echo $ECHO_N "(cached) $ECHO_C" >&6
9693else
9694 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9695/* confdefs.h. */
9696_ACEOF
9697cat confdefs.h >>conftest.$ac_ext
9698cat >>conftest.$ac_ext <<_ACEOF
9699/* end confdefs.h. */
edfaf76d
LK
9700/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9701 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9702#define $ac_func innocuous_$ac_func
9703
98418dba 9704/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9705 which can conflict with char $ac_func (); below.
9706 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9707 <limits.h> exists even on freestanding compilers. */
edfaf76d 9708
19650fd6
AS
9709#ifdef __STDC__
9710# include <limits.h>
9711#else
9712# include <assert.h>
9713#endif
edfaf76d
LK
9714
9715#undef $ac_func
9716
d6e01aa5
KL
9717/* Override any GCC internal prototype to avoid an error.
9718 Use char because int might match the return type of a GCC
9719 builtin and then its argument prototype would still apply. */
98418dba
CW
9720#ifdef __cplusplus
9721extern "C"
9722#endif
98418dba 9723char $ac_func ();
98418dba
CW
9724/* The GNU C library defines this for functions which it implements
9725 to always fail with ENOSYS. Some functions are actually named
9726 something starting with __ and the normal name is an alias. */
d6e01aa5 9727#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 9728choke me
98418dba
CW
9729#endif
9730
19650fd6
AS
9731int
9732main ()
9733{
d6e01aa5 9734return $ac_func ();
98418dba
CW
9735 ;
9736 return 0;
9737}
9738_ACEOF
9739rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
9740if { (ac_try="$ac_link"
9741case "(($ac_try" in
9742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9743 *) ac_try_echo=$ac_try;;
9744esac
9745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9746 (eval "$ac_link") 2>conftest.er1
98418dba 9747 ac_status=$?
edfaf76d
LK
9748 grep -v '^ *+' conftest.er1 >conftest.err
9749 rm -f conftest.er1
9750 cat conftest.err >&5
c0d27fcc 9751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9752 (exit $ac_status); } && {
9753 test -z "$ac_c_werror_flag" ||
9754 test ! -s conftest.err
9755 } && test -s conftest$ac_exeext &&
9756 $as_test_x conftest$ac_exeext; then
98418dba
CW
9757 eval "$as_ac_var=yes"
9758else
9759 echo "$as_me: failed program was:" >&5
19650fd6
AS
9760sed 's/^/| /' conftest.$ac_ext >&5
9761
d6e01aa5 9762 eval "$as_ac_var=no"
98418dba 9763fi
d6e01aa5
KL
9764
9765rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9766 conftest$ac_exeext conftest.$ac_ext
98418dba 9767fi
d6e01aa5
KL
9768ac_res=`eval echo '${'$as_ac_var'}'`
9769 { echo "$as_me:$LINENO: result: $ac_res" >&5
9770echo "${ECHO_T}$ac_res" >&6; }
98418dba 9771if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9772 cat >>confdefs.h <<_ACEOF
98418dba 9773#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9774_ACEOF
98418dba
CW
9775
9776fi
9777done
9778
d6e01aa5
KL
9779{ echo "$as_me:$LINENO: checking for working mmap" >&5
9780echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
9781if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9782 echo $ECHO_N "(cached) $ECHO_C" >&6
9783else
9784 if test "$cross_compiling" = yes; then
9785 ac_cv_func_mmap_fixed_mapped=no
9786else
9787 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9788/* confdefs.h. */
9789_ACEOF
9790cat confdefs.h >>conftest.$ac_ext
9791cat >>conftest.$ac_ext <<_ACEOF
9792/* end confdefs.h. */
98418dba 9793$ac_includes_default
c0d27fcc
MR
9794/* malloc might have been renamed as rpl_malloc. */
9795#undef malloc
9796
98418dba
CW
9797/* Thanks to Mike Haertel and Jim Avera for this test.
9798 Here is a matrix of mmap possibilities:
9799 mmap private not fixed
9800 mmap private fixed at somewhere currently unmapped
9801 mmap private fixed at somewhere already mapped
9802 mmap shared not fixed
9803 mmap shared fixed at somewhere currently unmapped
9804 mmap shared fixed at somewhere already mapped
9805 For private mappings, we should verify that changes cannot be read()
9806 back from the file, nor mmap's back from the file at a different
9807 address. (There have been systems where private was not correctly
9808 implemented like the infamous i386 svr4.0, and systems where the
9809 VM page cache was not coherent with the file system buffer cache
9810 like early versions of FreeBSD and possibly contemporary NetBSD.)
9811 For shared mappings, we should conversely verify that changes get
c0d27fcc 9812 propagated back to all the places they're supposed to be.
98418dba
CW
9813
9814 Grep wants private fixed already mapped.
9815 The main things grep needs to know about mmap are:
9816 * does it exist and is it safe to write into the mmap'd area
9817 * how to use it (BSD variants) */
9818
9819#include <fcntl.h>
9820#include <sys/mman.h>
9821
d6e01aa5 9822#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
9823char *malloc ();
9824#endif
9825
9826/* This mess was copied from the GNU getpagesize.h. */
d6e01aa5 9827#ifndef HAVE_GETPAGESIZE
98418dba 9828/* Assume that all systems that can run configure have sys/param.h. */
d6e01aa5 9829# ifndef HAVE_SYS_PARAM_H
98418dba
CW
9830# define HAVE_SYS_PARAM_H 1
9831# endif
9832
9833# ifdef _SC_PAGESIZE
9834# define getpagesize() sysconf(_SC_PAGESIZE)
9835# else /* no _SC_PAGESIZE */
d6e01aa5 9836# ifdef HAVE_SYS_PARAM_H
98418dba
CW
9837# include <sys/param.h>
9838# ifdef EXEC_PAGESIZE
9839# define getpagesize() EXEC_PAGESIZE
9840# else /* no EXEC_PAGESIZE */
9841# ifdef NBPG
9842# define getpagesize() NBPG * CLSIZE
9843# ifndef CLSIZE
9844# define CLSIZE 1
9845# endif /* no CLSIZE */
9846# else /* no NBPG */
9847# ifdef NBPC
9848# define getpagesize() NBPC
9849# else /* no NBPC */
9850# ifdef PAGESIZE
9851# define getpagesize() PAGESIZE
9852# endif /* PAGESIZE */
9853# endif /* no NBPC */
9854# endif /* no NBPG */
9855# endif /* no EXEC_PAGESIZE */
9856# else /* no HAVE_SYS_PARAM_H */
9857# define getpagesize() 8192 /* punt totally */
9858# endif /* no HAVE_SYS_PARAM_H */
9859# endif /* no _SC_PAGESIZE */
9860
9861#endif /* no HAVE_GETPAGESIZE */
9862
9863int
9864main ()
9865{
9866 char *data, *data2, *data3;
9867 int i, pagesize;
9868 int fd;
9869
9870 pagesize = getpagesize ();
9871
9872 /* First, make a file with some known garbage in it. */
9873 data = (char *) malloc (pagesize);
9874 if (!data)
d6e01aa5 9875 return 1;
98418dba
CW
9876 for (i = 0; i < pagesize; ++i)
9877 *(data + i) = rand ();
9878 umask (0);
9879 fd = creat ("conftest.mmap", 0600);
9880 if (fd < 0)
d6e01aa5 9881 return 1;
98418dba 9882 if (write (fd, data, pagesize) != pagesize)
d6e01aa5 9883 return 1;
98418dba
CW
9884 close (fd);
9885
9886 /* Next, try to mmap the file at a fixed address which already has
9887 something else allocated at it. If we can, also make sure that
9888 we see the same garbage. */
9889 fd = open ("conftest.mmap", O_RDWR);
9890 if (fd < 0)
d6e01aa5 9891 return 1;
98418dba
CW
9892 data2 = (char *) malloc (2 * pagesize);
9893 if (!data2)
d6e01aa5
KL
9894 return 1;
9895 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 9896 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 9897 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d6e01aa5 9898 return 1;
98418dba
CW
9899 for (i = 0; i < pagesize; ++i)
9900 if (*(data + i) != *(data2 + i))
d6e01aa5 9901 return 1;
98418dba
CW
9902
9903 /* Finally, make sure that changes to the mapped area do not
9904 percolate back to the file as seen by read(). (This is a bug on
9905 some variants of i386 svr4.0.) */
9906 for (i = 0; i < pagesize; ++i)
9907 *(data2 + i) = *(data2 + i) + 1;
9908 data3 = (char *) malloc (pagesize);
9909 if (!data3)
d6e01aa5 9910 return 1;
98418dba 9911 if (read (fd, data3, pagesize) != pagesize)
d6e01aa5 9912 return 1;
98418dba
CW
9913 for (i = 0; i < pagesize; ++i)
9914 if (*(data + i) != *(data3 + i))
d6e01aa5 9915 return 1;
98418dba 9916 close (fd);
d6e01aa5 9917 return 0;
98418dba
CW
9918}
9919_ACEOF
9920rm -f conftest$ac_exeext
d6e01aa5
KL
9921if { (ac_try="$ac_link"
9922case "(($ac_try" in
9923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9924 *) ac_try_echo=$ac_try;;
9925esac
9926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9927 (eval "$ac_link") 2>&5
98418dba 9928 ac_status=$?
c0d27fcc 9929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9930 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
9931 { (case "(($ac_try" in
9932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9933 *) ac_try_echo=$ac_try;;
9934esac
9935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9936 (eval "$ac_try") 2>&5
98418dba 9937 ac_status=$?
c0d27fcc 9938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9939 (exit $ac_status); }; }; then
9940 ac_cv_func_mmap_fixed_mapped=yes
9941else
9942 echo "$as_me: program exited with status $ac_status" >&5
9943echo "$as_me: failed program was:" >&5
19650fd6
AS
9944sed 's/^/| /' conftest.$ac_ext >&5
9945
c0d27fcc 9946( exit $ac_status )
98418dba
CW
9947ac_cv_func_mmap_fixed_mapped=no
9948fi
d6e01aa5 9949rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 9950fi
d6e01aa5
KL
9951
9952
98418dba 9953fi
d6e01aa5
KL
9954{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
9955echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
9956if test $ac_cv_func_mmap_fixed_mapped = yes; then
9957
c0d27fcc 9958cat >>confdefs.h <<\_ACEOF
98418dba 9959#define HAVE_MMAP 1
c0d27fcc 9960_ACEOF
98418dba
CW
9961
9962fi
9963rm -f conftest.mmap
9964
9965if test $use_mmap_for_buffers = yes; then
9966 REL_ALLOC=no
9967fi
9968
9969LIBS="$libsrc_libs $LIBS"
9970
c0d27fcc 9971
d6e01aa5
KL
9972{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
9973echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
9974if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
9975 echo $ECHO_N "(cached) $ECHO_C" >&6
9976else
9977 ac_check_lib_save_LIBS=$LIBS
9978LIBS="-ldnet $LIBS"
9979cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9980/* confdefs.h. */
9981_ACEOF
9982cat confdefs.h >>conftest.$ac_ext
9983cat >>conftest.$ac_ext <<_ACEOF
9984/* end confdefs.h. */
98418dba 9985
d6e01aa5
KL
9986/* Override any GCC internal prototype to avoid an error.
9987 Use char because int might match the return type of a GCC
9988 builtin and then its argument prototype would still apply. */
98418dba
CW
9989#ifdef __cplusplus
9990extern "C"
9991#endif
98418dba 9992char dnet_ntoa ();
98418dba
CW
9993int
9994main ()
9995{
d6e01aa5 9996return dnet_ntoa ();
98418dba
CW
9997 ;
9998 return 0;
9999}
10000_ACEOF
10001rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10002if { (ac_try="$ac_link"
10003case "(($ac_try" in
10004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10005 *) ac_try_echo=$ac_try;;
10006esac
10007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10008 (eval "$ac_link") 2>conftest.er1
98418dba 10009 ac_status=$?
edfaf76d
LK
10010 grep -v '^ *+' conftest.er1 >conftest.err
10011 rm -f conftest.er1
10012 cat conftest.err >&5
c0d27fcc 10013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10014 (exit $ac_status); } && {
10015 test -z "$ac_c_werror_flag" ||
10016 test ! -s conftest.err
10017 } && test -s conftest$ac_exeext &&
10018 $as_test_x conftest$ac_exeext; then
98418dba
CW
10019 ac_cv_lib_dnet_dnet_ntoa=yes
10020else
10021 echo "$as_me: failed program was:" >&5
19650fd6
AS
10022sed 's/^/| /' conftest.$ac_ext >&5
10023
d6e01aa5 10024 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10025fi
d6e01aa5
KL
10026
10027rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10028 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10029LIBS=$ac_check_lib_save_LIBS
10030fi
d6e01aa5
KL
10031{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10032echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10033if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10034 cat >>confdefs.h <<_ACEOF
98418dba 10035#define HAVE_LIBDNET 1
c0d27fcc 10036_ACEOF
98418dba
CW
10037
10038 LIBS="-ldnet $LIBS"
10039
10040fi
10041
c0d27fcc 10042
d6e01aa5
KL
10043{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10044echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10045if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10046 echo $ECHO_N "(cached) $ECHO_C" >&6
10047else
10048 ac_check_lib_save_LIBS=$LIBS
10049LIBS="-lXbsd $LIBS"
10050cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10051/* confdefs.h. */
10052_ACEOF
10053cat confdefs.h >>conftest.$ac_ext
10054cat >>conftest.$ac_ext <<_ACEOF
10055/* end confdefs.h. */
98418dba 10056
c0d27fcc 10057
98418dba
CW
10058int
10059main ()
10060{
d6e01aa5 10061return main ();
98418dba
CW
10062 ;
10063 return 0;
10064}
10065_ACEOF
10066rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10067if { (ac_try="$ac_link"
10068case "(($ac_try" in
10069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10070 *) ac_try_echo=$ac_try;;
10071esac
10072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10073 (eval "$ac_link") 2>conftest.er1
98418dba 10074 ac_status=$?
edfaf76d
LK
10075 grep -v '^ *+' conftest.er1 >conftest.err
10076 rm -f conftest.er1
10077 cat conftest.err >&5
c0d27fcc 10078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10079 (exit $ac_status); } && {
10080 test -z "$ac_c_werror_flag" ||
10081 test ! -s conftest.err
10082 } && test -s conftest$ac_exeext &&
10083 $as_test_x conftest$ac_exeext; then
98418dba
CW
10084 ac_cv_lib_Xbsd_main=yes
10085else
10086 echo "$as_me: failed program was:" >&5
19650fd6
AS
10087sed 's/^/| /' conftest.$ac_ext >&5
10088
d6e01aa5 10089 ac_cv_lib_Xbsd_main=no
98418dba 10090fi
d6e01aa5
KL
10091
10092rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10093 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10094LIBS=$ac_check_lib_save_LIBS
10095fi
d6e01aa5
KL
10096{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10097echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10098if test $ac_cv_lib_Xbsd_main = yes; then
10099 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10100fi
10101
c0d27fcc
MR
10102
10103
d6e01aa5
KL
10104{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10105echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10106if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10107 echo $ECHO_N "(cached) $ECHO_C" >&6
10108else
10109 ac_check_lib_save_LIBS=$LIBS
10110LIBS="-lpthreads $LIBS"
10111cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10112/* confdefs.h. */
10113_ACEOF
10114cat confdefs.h >>conftest.$ac_ext
10115cat >>conftest.$ac_ext <<_ACEOF
10116/* end confdefs.h. */
98418dba 10117
d6e01aa5
KL
10118/* Override any GCC internal prototype to avoid an error.
10119 Use char because int might match the return type of a GCC
10120 builtin and then its argument prototype would still apply. */
98418dba
CW
10121#ifdef __cplusplus
10122extern "C"
10123#endif
98418dba 10124char cma_open ();
98418dba
CW
10125int
10126main ()
10127{
d6e01aa5 10128return cma_open ();
98418dba
CW
10129 ;
10130 return 0;
10131}
10132_ACEOF
10133rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10134if { (ac_try="$ac_link"
10135case "(($ac_try" in
10136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10137 *) ac_try_echo=$ac_try;;
10138esac
10139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10140 (eval "$ac_link") 2>conftest.er1
98418dba 10141 ac_status=$?
edfaf76d
LK
10142 grep -v '^ *+' conftest.er1 >conftest.err
10143 rm -f conftest.er1
10144 cat conftest.err >&5
c0d27fcc 10145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10146 (exit $ac_status); } && {
10147 test -z "$ac_c_werror_flag" ||
10148 test ! -s conftest.err
10149 } && test -s conftest$ac_exeext &&
10150 $as_test_x conftest$ac_exeext; then
98418dba
CW
10151 ac_cv_lib_pthreads_cma_open=yes
10152else
10153 echo "$as_me: failed program was:" >&5
19650fd6
AS
10154sed 's/^/| /' conftest.$ac_ext >&5
10155
d6e01aa5 10156 ac_cv_lib_pthreads_cma_open=no
98418dba 10157fi
d6e01aa5
KL
10158
10159rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10160 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10161LIBS=$ac_check_lib_save_LIBS
10162fi
d6e01aa5
KL
10163{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10164echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10165if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10166 cat >>confdefs.h <<_ACEOF
98418dba 10167#define HAVE_LIBPTHREADS 1
c0d27fcc 10168_ACEOF
98418dba
CW
10169
10170 LIBS="-lpthreads $LIBS"
10171
10172fi
10173
c0d27fcc 10174
d6e01aa5
KL
10175{ echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
10176echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6; }
98418dba
CW
10177if test -d /usr/X386/include; then
10178 HAVE_XFREE386=yes
10179 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
10180else
10181 HAVE_XFREE386=no
10182fi
d6e01aa5
KL
10183{ echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
10184echo "${ECHO_T}$HAVE_XFREE386" >&6; }
98418dba 10185
55597d70
DL
10186
10187case ${host_os} in
10188aix*)
d6e01aa5
KL
10189 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10190echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10191if test "${gdb_cv_bigtoc+set}" = set; then
10192 echo $ECHO_N "(cached) $ECHO_C" >&6
10193else
10194
10195 case $GCC in
10196 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10197 *) gdb_cv_bigtoc=-bbigtoc ;;
10198 esac
10199
10200 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10201 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10202/* confdefs.h. */
10203_ACEOF
10204cat confdefs.h >>conftest.$ac_ext
10205cat >>conftest.$ac_ext <<_ACEOF
10206/* end confdefs.h. */
55597d70
DL
10207
10208int
10209main ()
10210{
10211int i;
10212 ;
10213 return 0;
10214}
10215_ACEOF
10216rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10217if { (ac_try="$ac_link"
10218case "(($ac_try" in
10219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10220 *) ac_try_echo=$ac_try;;
10221esac
10222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10223 (eval "$ac_link") 2>conftest.er1
55597d70 10224 ac_status=$?
edfaf76d
LK
10225 grep -v '^ *+' conftest.er1 >conftest.err
10226 rm -f conftest.er1
10227 cat conftest.err >&5
55597d70 10228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10229 (exit $ac_status); } && {
10230 test -z "$ac_c_werror_flag" ||
10231 test ! -s conftest.err
10232 } && test -s conftest$ac_exeext &&
10233 $as_test_x conftest$ac_exeext; then
55597d70
DL
10234 :
10235else
10236 echo "$as_me: failed program was:" >&5
19650fd6
AS
10237sed 's/^/| /' conftest.$ac_ext >&5
10238
d6e01aa5 10239 gdb_cv_bigtoc=
55597d70 10240fi
d6e01aa5
KL
10241
10242rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10243 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10244
10245fi
d6e01aa5
KL
10246{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10247echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10248 ;;
10249esac
10250
ae1a998c
RS
10251# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10252# used for the tests that follow. We set them back to REAL_CFLAGS and
10253# REAL_CPPFLAGS later on.
98418dba
CW
10254
10255REAL_CPPFLAGS="$CPPFLAGS"
10256
10257if test "${HAVE_X11}" = "yes"; then
10258 DEFS="$C_SWITCH_X_SITE $DEFS"
10259 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10260 LIBS="$LIBX $LIBS"
10261 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10262 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10263
10264 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10265 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10266 # but it's more convenient here to set LD_RUN_PATH
10267 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10268 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10269 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10270 export LD_RUN_PATH
10271 fi
10272
10273 if test "${opsys}" = "gnu-linux"; then
d6e01aa5
KL
10274 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10275echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10276 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10277/* confdefs.h. */
10278_ACEOF
10279cat confdefs.h >>conftest.$ac_ext
10280cat >>conftest.$ac_ext <<_ACEOF
10281/* end confdefs.h. */
98418dba 10282
98418dba
CW
10283int
10284main ()
10285{
10286XOpenDisplay ("foo");
10287 ;
10288 return 0;
10289}
10290_ACEOF
10291rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10292if { (ac_try="$ac_link"
10293case "(($ac_try" in
10294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10295 *) ac_try_echo=$ac_try;;
10296esac
10297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10298 (eval "$ac_link") 2>conftest.er1
98418dba 10299 ac_status=$?
edfaf76d
LK
10300 grep -v '^ *+' conftest.er1 >conftest.err
10301 rm -f conftest.er1
10302 cat conftest.err >&5
c0d27fcc 10303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10304 (exit $ac_status); } && {
10305 test -z "$ac_c_werror_flag" ||
10306 test ! -s conftest.err
10307 } && test -s conftest$ac_exeext &&
10308 $as_test_x conftest$ac_exeext; then
35996d22 10309 xlinux_first_failure=no
98418dba
CW
10310else
10311 echo "$as_me: failed program was:" >&5
19650fd6
AS
10312sed 's/^/| /' conftest.$ac_ext >&5
10313
d6e01aa5 10314 xlinux_first_failure=yes
98418dba 10315fi
d6e01aa5
KL
10316
10317rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10318 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10319 if test "${xlinux_first_failure}" = "yes"; then
10320 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10321 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10322 OLD_CPPFLAGS="$CPPFLAGS"
10323 OLD_LIBS="$LIBS"
10324 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10325 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10326 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10327 LIBS="$LIBS -b i486-linuxaout"
10328 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10329/* confdefs.h. */
10330_ACEOF
10331cat confdefs.h >>conftest.$ac_ext
10332cat >>conftest.$ac_ext <<_ACEOF
10333/* end confdefs.h. */
98418dba 10334
98418dba
CW
10335int
10336main ()
10337{
10338XOpenDisplay ("foo");
10339 ;
10340 return 0;
10341}
10342_ACEOF
10343rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10344if { (ac_try="$ac_link"
10345case "(($ac_try" in
10346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10347 *) ac_try_echo=$ac_try;;
10348esac
10349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10350 (eval "$ac_link") 2>conftest.er1
98418dba 10351 ac_status=$?
edfaf76d
LK
10352 grep -v '^ *+' conftest.er1 >conftest.err
10353 rm -f conftest.er1
10354 cat conftest.err >&5
c0d27fcc 10355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10356 (exit $ac_status); } && {
10357 test -z "$ac_c_werror_flag" ||
10358 test ! -s conftest.err
10359 } && test -s conftest$ac_exeext &&
10360 $as_test_x conftest$ac_exeext; then
98418dba
CW
10361 xlinux_second_failure=no
10362else
10363 echo "$as_me: failed program was:" >&5
19650fd6
AS
10364sed 's/^/| /' conftest.$ac_ext >&5
10365
d6e01aa5 10366 xlinux_second_failure=yes
98418dba 10367fi
d6e01aa5
KL
10368
10369rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10370 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10371 if test "${xlinux_second_failure}" = "yes"; then
10372 # If we get the same failure with -b, there is no use adding -b.
10373 # So take it out. This plays safe.
10374 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10375 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10376 CPPFLAGS="$OLD_CPPFLAGS"
10377 LIBS="$OLD_LIBS"
d6e01aa5
KL
10378 { echo "$as_me:$LINENO: result: no" >&5
10379echo "${ECHO_T}no" >&6; }
98418dba 10380 else
d6e01aa5
KL
10381 { echo "$as_me:$LINENO: result: yes" >&5
10382echo "${ECHO_T}yes" >&6; }
98418dba
CW
10383 fi
10384 else
d6e01aa5
KL
10385 { echo "$as_me:$LINENO: result: no" >&5
10386echo "${ECHO_T}no" >&6; }
98418dba
CW
10387 fi
10388 fi
10389
10390 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10391 # header files included from there.
d6e01aa5
KL
10392 { echo "$as_me:$LINENO: checking for Xkb" >&5
10393echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10394 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10395/* confdefs.h. */
10396_ACEOF
10397cat confdefs.h >>conftest.$ac_ext
10398cat >>conftest.$ac_ext <<_ACEOF
10399/* end confdefs.h. */
98418dba
CW
10400#include <X11/Xlib.h>
10401#include <X11/XKBlib.h>
98418dba
CW
10402int
10403main ()
10404{
10405XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10406 ;
10407 return 0;
10408}
10409_ACEOF
10410rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10411if { (ac_try="$ac_link"
10412case "(($ac_try" in
10413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10414 *) ac_try_echo=$ac_try;;
10415esac
10416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10417 (eval "$ac_link") 2>conftest.er1
98418dba 10418 ac_status=$?
edfaf76d
LK
10419 grep -v '^ *+' conftest.er1 >conftest.err
10420 rm -f conftest.er1
10421 cat conftest.err >&5
c0d27fcc 10422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10423 (exit $ac_status); } && {
10424 test -z "$ac_c_werror_flag" ||
10425 test ! -s conftest.err
10426 } && test -s conftest$ac_exeext &&
10427 $as_test_x conftest$ac_exeext; then
98418dba
CW
10428 emacs_xkb=yes
10429else
10430 echo "$as_me: failed program was:" >&5
19650fd6
AS
10431sed 's/^/| /' conftest.$ac_ext >&5
10432
d6e01aa5 10433 emacs_xkb=no
98418dba 10434fi
d6e01aa5
KL
10435
10436rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10437 conftest$ac_exeext conftest.$ac_ext
d6e01aa5
KL
10438 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10439echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10440 if test $emacs_xkb = yes; then
b936fae4 10441
c0d27fcc 10442cat >>confdefs.h <<\_ACEOF
98418dba 10443#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10444_ACEOF
98418dba
CW
10445
10446 fi
10447
c0d27fcc
MR
10448
10449
10450
10451
98418dba
CW
10452for ac_func in XrmSetDatabase XScreenResourceString \
10453XScreenNumberOfScreen XSetWMProtocols
10454do
10455as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
10456{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10457echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10458if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10459 echo $ECHO_N "(cached) $ECHO_C" >&6
10460else
10461 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10462/* confdefs.h. */
10463_ACEOF
10464cat confdefs.h >>conftest.$ac_ext
10465cat >>conftest.$ac_ext <<_ACEOF
10466/* end confdefs.h. */
edfaf76d
LK
10467/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10468 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10469#define $ac_func innocuous_$ac_func
10470
98418dba 10471/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10472 which can conflict with char $ac_func (); below.
10473 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10474 <limits.h> exists even on freestanding compilers. */
edfaf76d 10475
19650fd6
AS
10476#ifdef __STDC__
10477# include <limits.h>
10478#else
10479# include <assert.h>
10480#endif
edfaf76d
LK
10481
10482#undef $ac_func
10483
d6e01aa5
KL
10484/* Override any GCC internal prototype to avoid an error.
10485 Use char because int might match the return type of a GCC
10486 builtin and then its argument prototype would still apply. */
98418dba
CW
10487#ifdef __cplusplus
10488extern "C"
10489#endif
98418dba 10490char $ac_func ();
98418dba
CW
10491/* The GNU C library defines this for functions which it implements
10492 to always fail with ENOSYS. Some functions are actually named
10493 something starting with __ and the normal name is an alias. */
d6e01aa5 10494#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10495choke me
98418dba
CW
10496#endif
10497
19650fd6
AS
10498int
10499main ()
10500{
d6e01aa5 10501return $ac_func ();
98418dba
CW
10502 ;
10503 return 0;
10504}
10505_ACEOF
10506rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10507if { (ac_try="$ac_link"
10508case "(($ac_try" in
10509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10510 *) ac_try_echo=$ac_try;;
10511esac
10512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10513 (eval "$ac_link") 2>conftest.er1
98418dba 10514 ac_status=$?
edfaf76d
LK
10515 grep -v '^ *+' conftest.er1 >conftest.err
10516 rm -f conftest.er1
10517 cat conftest.err >&5
c0d27fcc 10518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10519 (exit $ac_status); } && {
10520 test -z "$ac_c_werror_flag" ||
10521 test ! -s conftest.err
10522 } && test -s conftest$ac_exeext &&
10523 $as_test_x conftest$ac_exeext; then
98418dba
CW
10524 eval "$as_ac_var=yes"
10525else
10526 echo "$as_me: failed program was:" >&5
19650fd6
AS
10527sed 's/^/| /' conftest.$ac_ext >&5
10528
d6e01aa5 10529 eval "$as_ac_var=no"
98418dba 10530fi
d6e01aa5
KL
10531
10532rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10533 conftest$ac_exeext conftest.$ac_ext
98418dba 10534fi
d6e01aa5
KL
10535ac_res=`eval echo '${'$as_ac_var'}'`
10536 { echo "$as_me:$LINENO: result: $ac_res" >&5
10537echo "${ECHO_T}$ac_res" >&6; }
98418dba 10538if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10539 cat >>confdefs.h <<_ACEOF
98418dba 10540#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10541_ACEOF
98418dba
CW
10542
10543fi
10544done
10545
10546fi
10547
10548if test "${window_system}" = "x11"; then
d6e01aa5
KL
10549 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10550echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
10551 if test "${emacs_cv_x11_version_6+set}" = set; then
10552 echo $ECHO_N "(cached) $ECHO_C" >&6
10553else
10554 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10555/* confdefs.h. */
10556_ACEOF
10557cat confdefs.h >>conftest.$ac_ext
10558cat >>conftest.$ac_ext <<_ACEOF
10559/* end confdefs.h. */
98418dba 10560#include <X11/Xlib.h>
98418dba
CW
10561int
10562main ()
10563{
10564#if XlibSpecificationRelease < 6
10565fail;
10566#endif
10567
10568 ;
10569 return 0;
10570}
10571_ACEOF
10572rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10573if { (ac_try="$ac_link"
10574case "(($ac_try" in
10575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10576 *) ac_try_echo=$ac_try;;
10577esac
10578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10579 (eval "$ac_link") 2>conftest.er1
98418dba 10580 ac_status=$?
edfaf76d
LK
10581 grep -v '^ *+' conftest.er1 >conftest.err
10582 rm -f conftest.er1
10583 cat conftest.err >&5
c0d27fcc 10584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10585 (exit $ac_status); } && {
10586 test -z "$ac_c_werror_flag" ||
10587 test ! -s conftest.err
10588 } && test -s conftest$ac_exeext &&
10589 $as_test_x conftest$ac_exeext; then
98418dba
CW
10590 emacs_cv_x11_version_6=yes
10591else
10592 echo "$as_me: failed program was:" >&5
19650fd6
AS
10593sed 's/^/| /' conftest.$ac_ext >&5
10594
d6e01aa5 10595 emacs_cv_x11_version_6=no
98418dba 10596fi
d6e01aa5
KL
10597
10598rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10599 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10600fi
10601
10602 if test $emacs_cv_x11_version_6 = yes; then
d6e01aa5
KL
10603 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10604echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10605
c0d27fcc 10606cat >>confdefs.h <<\_ACEOF
98418dba 10607#define HAVE_X11R6 1
c0d27fcc 10608_ACEOF
98418dba
CW
10609
10610 else
d6e01aa5
KL
10611 { echo "$as_me:$LINENO: result: before 6" >&5
10612echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10613 fi
10614fi
10615
98418dba 10616
0cfc0546
GM
10617### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10618HAVE_RSVG=no
ae0476ed 10619if test "${HAVE_X11}" = "yes" || test "${HAVE_CARBON}" = "yes"; then
0cfc0546
GM
10620 if test "${with_rsvg}" != "no"; then
10621 if test "X${with_pkg_config_prog}" != X; then
10622 PKG_CONFIG="${with_pkg_config_prog}"
10623 fi
10624
10625 RSVG_REQUIRED=2.0.0
10626 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10627
10628
10629 succeeded=no
10630
10631 if test -z "$PKG_CONFIG"; then
10632 # Extract the first word of "pkg-config", so it can be a program name with args.
10633set dummy pkg-config; ac_word=$2
10634{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10635echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
10636if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10637 echo $ECHO_N "(cached) $ECHO_C" >&6
10638else
10639 case $PKG_CONFIG in
10640 [\\/]* | ?:[\\/]*)
10641 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10642 ;;
10643 *)
10644 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10645for as_dir in $PATH
10646do
10647 IFS=$as_save_IFS
10648 test -z "$as_dir" && as_dir=.
10649 for ac_exec_ext in '' $ac_executable_extensions; do
10650 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10651 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10652 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10653 break 2
10654 fi
10655done
10656done
10657IFS=$as_save_IFS
10658
10659 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10660 ;;
10661esac
10662fi
10663PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10664if test -n "$PKG_CONFIG"; then
10665 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10666echo "${ECHO_T}$PKG_CONFIG" >&6; }
10667else
10668 { echo "$as_me:$LINENO: result: no" >&5
10669echo "${ECHO_T}no" >&6; }
10670fi
10671
10672
10673 fi
10674
10675 if test "$PKG_CONFIG" = "no" ; then
10676 :
10677 else
10678 PKG_CONFIG_MIN_VERSION=0.9.0
10679 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10680 { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
10681echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
10682
10683 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
10684 { echo "$as_me:$LINENO: result: yes" >&5
10685echo "${ECHO_T}yes" >&6; }
10686 succeeded=yes
10687
10688 { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
10689echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
10690 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10691 { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
10692echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
10693
10694 { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
10695echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
10696 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10697 { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
10698echo "${ECHO_T}$RSVG_LIBS" >&6; }
10699 else
10700 { echo "$as_me:$LINENO: result: no" >&5
10701echo "${ECHO_T}no" >&6; }
10702 RSVG_CFLAGS=""
10703 RSVG_LIBS=""
10704 ## If we have a custom action on failure, don't print errors, but
10705 ## do set a variable so people can do so.
10706 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
10707
10708 fi
10709
10710
10711
10712 else
10713 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10714 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10715 fi
10716 fi
10717
10718 if test $succeeded = yes; then
10719 :
10720 else
10721 :
10722 fi
10723
10724
10725
10726
10727 if test ".${RSVG_CFLAGS}" != "."; then
10728 HAVE_RSVG=yes
10729
10730cat >>confdefs.h <<\_ACEOF
10731#define HAVE_RSVG 1
10732_ACEOF
10733
10734 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10735 LIBS="$RSVG_LIBS $LIBS"
10736 fi
10737 fi
10738fi
10739
10740
488dd4c4 10741HAVE_GTK=no
8eeae1c9
JD
10742if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then
10743 USE_X_TOOLKIT=none
10744fi
089a966d
GM
10745if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk" || \
10746 test "$USE_X_TOOLKIT" = "maybe"; then
cd890796 10747 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
10748 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
10749echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
10750 { (exit 1); exit 1; }; };
10751 fi
787eb67d
JD
10752 GLIB_REQUIRED=2.6
10753 GTK_REQUIRED=2.6
488dd4c4
JD
10754 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10755
10756 if test "X${with_pkg_config_prog}" != X; then
10757 PKG_CONFIG="${with_pkg_config_prog}"
10758 fi
10759
10760 succeeded=no
10761
10762 if test -z "$PKG_CONFIG"; then
10763 # Extract the first word of "pkg-config", so it can be a program name with args.
10764set dummy pkg-config; ac_word=$2
d6e01aa5
KL
10765{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10766echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
10767if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10768 echo $ECHO_N "(cached) $ECHO_C" >&6
10769else
10770 case $PKG_CONFIG in
10771 [\\/]* | ?:[\\/]*)
10772 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10773 ;;
10774 *)
10775 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10776for as_dir in $PATH
10777do
10778 IFS=$as_save_IFS
10779 test -z "$as_dir" && as_dir=.
10780 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 10781 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
10782 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10783 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10784 break 2
10785 fi
10786done
10787done
d6e01aa5 10788IFS=$as_save_IFS
488dd4c4
JD
10789
10790 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10791 ;;
10792esac
10793fi
10794PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 10795if test -n "$PKG_CONFIG"; then
d6e01aa5
KL
10796 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10797echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 10798else
d6e01aa5
KL
10799 { echo "$as_me:$LINENO: result: no" >&5
10800echo "${ECHO_T}no" >&6; }
488dd4c4
JD
10801fi
10802
d6e01aa5 10803
488dd4c4
JD
10804 fi
10805
10806 if test "$PKG_CONFIG" = "no" ; then
089a966d 10807 pkg_check_gtk=no
488dd4c4
JD
10808 else
10809 PKG_CONFIG_MIN_VERSION=0.9.0
10810 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
d6e01aa5
KL
10811 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
10812echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 10813
67db6aa2 10814 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
d6e01aa5
KL
10815 { echo "$as_me:$LINENO: result: yes" >&5
10816echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
10817 succeeded=yes
10818
d6e01aa5
KL
10819 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
10820echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 10821 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
d6e01aa5
KL
10822 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
10823echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 10824
d6e01aa5
KL
10825 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
10826echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 10827 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
d6e01aa5
KL
10828 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
10829echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 10830 else
d6e01aa5
KL
10831 { echo "$as_me:$LINENO: result: no" >&5
10832echo "${ECHO_T}no" >&6; }
488dd4c4
JD
10833 GTK_CFLAGS=""
10834 GTK_LIBS=""
10835 ## If we have a custom action on failure, don't print errors, but
10836 ## do set a variable so people can do so.
10837 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 10838
488dd4c4
JD
10839 fi
10840
10841
10842
10843 else
10844 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10845 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10846 fi
10847 fi
10848
10849 if test $succeeded = yes; then
089a966d 10850 pkg_check_gtk=yes
488dd4c4 10851 else
089a966d
GM
10852 pkg_check_gtk=no
10853 fi
10854
10855 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
10856 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
10857echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
10858 { (exit 1); exit 1; }; }
10859 fi
089a966d
GM
10860fi
10861
10862
10863if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
10864
10865
10866
10867 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
10868 CFLAGS="$CFLAGS $GTK_CFLAGS"
10869 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 10870 GTK_COMPILES=no
57669b57 10871
8eeae1c9 10872for ac_func in gtk_main
57669b57
JD
10873do
10874as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10875{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10876echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10877if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
10878 echo $ECHO_N "(cached) $ECHO_C" >&6
10879else
10880 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
10881/* confdefs.h. */
10882_ACEOF
10883cat confdefs.h >>conftest.$ac_ext
10884cat >>conftest.$ac_ext <<_ACEOF
10885/* end confdefs.h. */
edfaf76d
LK
10886/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10887 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10888#define $ac_func innocuous_$ac_func
10889
57669b57
JD
10890/* System header to define __stub macros and hopefully few prototypes,
10891 which can conflict with char $ac_func (); below.
10892 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10893 <limits.h> exists even on freestanding compilers. */
edfaf76d 10894
57669b57
JD
10895#ifdef __STDC__
10896# include <limits.h>
10897#else
10898# include <assert.h>
10899#endif
edfaf76d
LK
10900
10901#undef $ac_func
10902
ca81d7a0
JD
10903/* Override any GCC internal prototype to avoid an error.
10904 Use char because int might match the return type of a GCC
10905 builtin and then its argument prototype would still apply. */
57669b57
JD
10906#ifdef __cplusplus
10907extern "C"
57669b57 10908#endif
57669b57
JD
10909char $ac_func ();
10910/* The GNU C library defines this for functions which it implements
10911 to always fail with ENOSYS. Some functions are actually named
10912 something starting with __ and the normal name is an alias. */
ca81d7a0 10913#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 10914choke me
57669b57
JD
10915#endif
10916
10917int
10918main ()
10919{
ca81d7a0 10920return $ac_func ();
57669b57
JD
10921 ;
10922 return 0;
10923}
10924_ACEOF
10925rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10926if { (ac_try="$ac_link"
10927case "(($ac_try" in
10928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10929 *) ac_try_echo=$ac_try;;
10930esac
10931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10932 (eval "$ac_link") 2>conftest.er1
57669b57 10933 ac_status=$?
edfaf76d
LK
10934 grep -v '^ *+' conftest.er1 >conftest.err
10935 rm -f conftest.er1
10936 cat conftest.err >&5
57669b57 10937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10938 (exit $ac_status); } && {
10939 test -z "$ac_c_werror_flag" ||
10940 test ! -s conftest.err
10941 } && test -s conftest$ac_exeext &&
10942 $as_test_x conftest$ac_exeext; then
57669b57
JD
10943 eval "$as_ac_var=yes"
10944else
10945 echo "$as_me: failed program was:" >&5
10946sed 's/^/| /' conftest.$ac_ext >&5
10947
ca81d7a0 10948 eval "$as_ac_var=no"
57669b57 10949fi
ca81d7a0 10950
f053c89f 10951rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10952 conftest$ac_exeext conftest.$ac_ext
57669b57 10953fi
ca81d7a0
JD
10954ac_res=`eval echo '${'$as_ac_var'}'`
10955 { echo "$as_me:$LINENO: result: $ac_res" >&5
10956echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
10957if test `eval echo '${'$as_ac_var'}'` = yes; then
10958 cat >>confdefs.h <<_ACEOF
10959#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10960_ACEOF
8eeae1c9 10961 GTK_COMPILES=yes
57669b57
JD
10962fi
10963done
10964
8eeae1c9 10965 if test "${GTK_COMPILES}" != "yes"; then
089a966d
GM
10966 if test "$USE_X_TOOLKIT" != "maybe"; then
10967 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
8eeae1c9
JD
10968echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
10969 { (exit 1); exit 1; }; };
089a966d
GM
10970 fi
10971 else
10972 HAVE_GTK=yes
488dd4c4
JD
10973
10974cat >>confdefs.h <<\_ACEOF
10975#define HAVE_GTK 1
10976_ACEOF
10977
089a966d
GM
10978 USE_X_TOOLKIT=none
10979 fi
10980
10981fi
10982
10983
10984if test "${HAVE_GTK}" = "yes"; then
488dd4c4 10985
d0a80c21
JD
10986 if test "$with_toolkit_scroll_bars" != no; then
10987 with_toolkit_scroll_bars=yes
10988 fi
57669b57 10989
c982cf7d 10990 HAVE_GTK_MULTIDISPLAY=no
fa1b1007
KL
10991
10992for ac_func in gdk_display_open
10993do
10994as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10995{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10996echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10997if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10998 echo $ECHO_N "(cached) $ECHO_C" >&6
10999else
11000 cat >conftest.$ac_ext <<_ACEOF
11001/* confdefs.h. */
11002_ACEOF
11003cat confdefs.h >>conftest.$ac_ext
11004cat >>conftest.$ac_ext <<_ACEOF
11005/* end confdefs.h. */
11006/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11007 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11008#define $ac_func innocuous_$ac_func
11009
11010/* System header to define __stub macros and hopefully few prototypes,
11011 which can conflict with char $ac_func (); below.
11012 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11013 <limits.h> exists even on freestanding compilers. */
11014
11015#ifdef __STDC__
11016# include <limits.h>
11017#else
11018# include <assert.h>
11019#endif
11020
11021#undef $ac_func
11022
11023/* Override any GCC internal prototype to avoid an error.
11024 Use char because int might match the return type of a GCC
11025 builtin and then its argument prototype would still apply. */
11026#ifdef __cplusplus
11027extern "C"
11028#endif
11029char $ac_func ();
11030/* The GNU C library defines this for functions which it implements
11031 to always fail with ENOSYS. Some functions are actually named
11032 something starting with __ and the normal name is an alias. */
11033#if defined __stub_$ac_func || defined __stub___$ac_func
11034choke me
11035#endif
11036
11037int
11038main ()
11039{
11040return $ac_func ();
11041 ;
11042 return 0;
11043}
11044_ACEOF
11045rm -f conftest.$ac_objext conftest$ac_exeext
11046if { (ac_try="$ac_link"
11047case "(($ac_try" in
11048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11049 *) ac_try_echo=$ac_try;;
11050esac
11051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11052 (eval "$ac_link") 2>conftest.er1
11053 ac_status=$?
11054 grep -v '^ *+' conftest.er1 >conftest.err
11055 rm -f conftest.er1
11056 cat conftest.err >&5
11057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11058 (exit $ac_status); } && {
11059 test -z "$ac_c_werror_flag" ||
11060 test ! -s conftest.err
11061 } && test -s conftest$ac_exeext &&
11062 $as_test_x conftest$ac_exeext; then
11063 eval "$as_ac_var=yes"
11064else
11065 echo "$as_me: failed program was:" >&5
11066sed 's/^/| /' conftest.$ac_ext >&5
11067
11068 eval "$as_ac_var=no"
11069fi
11070
11071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11072 conftest$ac_exeext conftest.$ac_ext
11073fi
11074ac_res=`eval echo '${'$as_ac_var'}'`
11075 { echo "$as_me:$LINENO: result: $ac_res" >&5
11076echo "${ECHO_T}$ac_res" >&6; }
11077if test `eval echo '${'$as_ac_var'}'` = yes; then
11078 cat >>confdefs.h <<_ACEOF
11079#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11080_ACEOF
11081 HAVE_GTK_MULTIDISPLAY=yes
11082fi
11083done
11084
11085 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11086
11087cat >>confdefs.h <<\_ACEOF
11088#define HAVE_GTK_MULTIDISPLAY 1
11089_ACEOF
11090
11091 fi
57669b57 11092
572a3cc2
JD
11093 HAVE_GTK_FILE_SELECTION=no
11094
11095for ac_func in gtk_file_selection_new
11096do
11097as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
11098{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11099echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11100if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11101 echo $ECHO_N "(cached) $ECHO_C" >&6
11102else
11103 cat >conftest.$ac_ext <<_ACEOF
11104/* confdefs.h. */
11105_ACEOF
11106cat confdefs.h >>conftest.$ac_ext
11107cat >>conftest.$ac_ext <<_ACEOF
11108/* end confdefs.h. */
edfaf76d
LK
11109/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11110 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11111#define $ac_func innocuous_$ac_func
11112
572a3cc2
JD
11113/* System header to define __stub macros and hopefully few prototypes,
11114 which can conflict with char $ac_func (); below.
11115 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11116 <limits.h> exists even on freestanding compilers. */
edfaf76d 11117
572a3cc2
JD
11118#ifdef __STDC__
11119# include <limits.h>
11120#else
11121# include <assert.h>
11122#endif
edfaf76d
LK
11123
11124#undef $ac_func
11125
d6e01aa5
KL
11126/* Override any GCC internal prototype to avoid an error.
11127 Use char because int might match the return type of a GCC
11128 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11129#ifdef __cplusplus
11130extern "C"
572a3cc2 11131#endif
572a3cc2
JD
11132char $ac_func ();
11133/* The GNU C library defines this for functions which it implements
11134 to always fail with ENOSYS. Some functions are actually named
11135 something starting with __ and the normal name is an alias. */
d6e01aa5 11136#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11137choke me
572a3cc2
JD
11138#endif
11139
11140int
11141main ()
11142{
d6e01aa5 11143return $ac_func ();
572a3cc2
JD
11144 ;
11145 return 0;
11146}
11147_ACEOF
11148rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
11149if { (ac_try="$ac_link"
11150case "(($ac_try" in
11151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11152 *) ac_try_echo=$ac_try;;
11153esac
11154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11155 (eval "$ac_link") 2>conftest.er1
572a3cc2 11156 ac_status=$?
edfaf76d
LK
11157 grep -v '^ *+' conftest.er1 >conftest.err
11158 rm -f conftest.er1
11159 cat conftest.err >&5
572a3cc2 11160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11161 (exit $ac_status); } && {
11162 test -z "$ac_c_werror_flag" ||
11163 test ! -s conftest.err
11164 } && test -s conftest$ac_exeext &&
11165 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11166 eval "$as_ac_var=yes"
11167else
11168 echo "$as_me: failed program was:" >&5
11169sed 's/^/| /' conftest.$ac_ext >&5
11170
d6e01aa5 11171 eval "$as_ac_var=no"
572a3cc2 11172fi
d6e01aa5
KL
11173
11174rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11175 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11176fi
d6e01aa5
KL
11177ac_res=`eval echo '${'$as_ac_var'}'`
11178 { echo "$as_me:$LINENO: result: $ac_res" >&5
11179echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11180if test `eval echo '${'$as_ac_var'}'` = yes; then
11181 cat >>confdefs.h <<_ACEOF
11182#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11183_ACEOF
11184 HAVE_GTK_FILE_SELECTION=yes
11185fi
11186done
11187
11188
11189 HAVE_GTK_FILE_CHOOSER=no
11190
11191for ac_func in gtk_file_chooser_dialog_new
11192do
11193as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
11194{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11195echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11196if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11197 echo $ECHO_N "(cached) $ECHO_C" >&6
11198else
11199 cat >conftest.$ac_ext <<_ACEOF
11200/* confdefs.h. */
11201_ACEOF
11202cat confdefs.h >>conftest.$ac_ext
11203cat >>conftest.$ac_ext <<_ACEOF
11204/* end confdefs.h. */
edfaf76d
LK
11205/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11206 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11207#define $ac_func innocuous_$ac_func
11208
572a3cc2
JD
11209/* System header to define __stub macros and hopefully few prototypes,
11210 which can conflict with char $ac_func (); below.
11211 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11212 <limits.h> exists even on freestanding compilers. */
edfaf76d 11213
572a3cc2
JD
11214#ifdef __STDC__
11215# include <limits.h>
11216#else
11217# include <assert.h>
11218#endif
edfaf76d
LK
11219
11220#undef $ac_func
11221
d6e01aa5
KL
11222/* Override any GCC internal prototype to avoid an error.
11223 Use char because int might match the return type of a GCC
11224 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11225#ifdef __cplusplus
11226extern "C"
572a3cc2 11227#endif
572a3cc2
JD
11228char $ac_func ();
11229/* The GNU C library defines this for functions which it implements
11230 to always fail with ENOSYS. Some functions are actually named
11231 something starting with __ and the normal name is an alias. */
d6e01aa5 11232#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11233choke me
572a3cc2
JD
11234#endif
11235
11236int
11237main ()
11238{
d6e01aa5 11239return $ac_func ();
572a3cc2
JD
11240 ;
11241 return 0;
11242}
11243_ACEOF
11244rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
11245if { (ac_try="$ac_link"
11246case "(($ac_try" in
11247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11248 *) ac_try_echo=$ac_try;;
11249esac
11250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11251 (eval "$ac_link") 2>conftest.er1
572a3cc2 11252 ac_status=$?
edfaf76d
LK
11253 grep -v '^ *+' conftest.er1 >conftest.err
11254 rm -f conftest.er1
11255 cat conftest.err >&5
572a3cc2 11256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11257 (exit $ac_status); } && {
11258 test -z "$ac_c_werror_flag" ||
11259 test ! -s conftest.err
11260 } && test -s conftest$ac_exeext &&
11261 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11262 eval "$as_ac_var=yes"
11263else
11264 echo "$as_me: failed program was:" >&5
11265sed 's/^/| /' conftest.$ac_ext >&5
11266
d6e01aa5 11267 eval "$as_ac_var=no"
572a3cc2 11268fi
d6e01aa5
KL
11269
11270rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11271 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11272fi
d6e01aa5
KL
11273ac_res=`eval echo '${'$as_ac_var'}'`
11274 { echo "$as_me:$LINENO: result: $ac_res" >&5
11275echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11276if test `eval echo '${'$as_ac_var'}'` = yes; then
11277 cat >>confdefs.h <<_ACEOF
11278#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11279_ACEOF
11280 HAVE_GTK_FILE_CHOOSER=yes
11281fi
11282done
11283
11284
11285 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11286 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11287
11288cat >>confdefs.h <<\_ACEOF
11289#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
11290_ACEOF
11291
b8bdffbe
JD
11292 fi
11293
11294 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11295 HAVE_GTK_AND_PTHREAD=no
11296
11297for ac_header in pthread.h
11298do
11299as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
11300if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11301 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11302echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11303if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11304 echo $ECHO_N "(cached) $ECHO_C" >&6
11305fi
d6e01aa5
KL
11306ac_res=`eval echo '${'$as_ac_Header'}'`
11307 { echo "$as_me:$LINENO: result: $ac_res" >&5
11308echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11309else
11310 # Is the header compilable?
d6e01aa5
KL
11311{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11312echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
b8bdffbe
JD
11313cat >conftest.$ac_ext <<_ACEOF
11314/* confdefs.h. */
11315_ACEOF
11316cat confdefs.h >>conftest.$ac_ext
11317cat >>conftest.$ac_ext <<_ACEOF
11318/* end confdefs.h. */
11319$ac_includes_default
11320#include <$ac_header>
11321_ACEOF
11322rm -f conftest.$ac_objext
d6e01aa5
KL
11323if { (ac_try="$ac_compile"
11324case "(($ac_try" in
11325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11326 *) ac_try_echo=$ac_try;;
11327esac
11328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11329 (eval "$ac_compile") 2>conftest.er1
b8bdffbe 11330 ac_status=$?
edfaf76d
LK
11331 grep -v '^ *+' conftest.er1 >conftest.err
11332 rm -f conftest.er1
11333 cat conftest.err >&5
b8bdffbe 11334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11335 (exit $ac_status); } && {
11336 test -z "$ac_c_werror_flag" ||
11337 test ! -s conftest.err
11338 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11339 ac_header_compiler=yes
11340else
11341 echo "$as_me: failed program was:" >&5
11342sed 's/^/| /' conftest.$ac_ext >&5
11343
d6e01aa5 11344 ac_header_compiler=no
b8bdffbe 11345fi
b8bdffbe 11346
d6e01aa5
KL
11347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11348{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11349echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11350
11351# Is the header present?
d6e01aa5
KL
11352{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11353echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11354cat >conftest.$ac_ext <<_ACEOF
11355/* confdefs.h. */
11356_ACEOF
11357cat confdefs.h >>conftest.$ac_ext
11358cat >>conftest.$ac_ext <<_ACEOF
11359/* end confdefs.h. */
11360#include <$ac_header>
11361_ACEOF
d6e01aa5
KL
11362if { (ac_try="$ac_cpp conftest.$ac_ext"
11363case "(($ac_try" in
11364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11365 *) ac_try_echo=$ac_try;;
11366esac
11367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11368 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11369 ac_status=$?
11370 grep -v '^ *+' conftest.er1 >conftest.err
11371 rm -f conftest.er1
11372 cat conftest.err >&5
11373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11374 (exit $ac_status); } >/dev/null && {
11375 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11376 test ! -s conftest.err
11377 }; then
b8bdffbe
JD
11378 ac_header_preproc=yes
11379else
11380 echo "$as_me: failed program was:" >&5
11381sed 's/^/| /' conftest.$ac_ext >&5
11382
11383 ac_header_preproc=no
11384fi
d6e01aa5 11385
b8bdffbe 11386rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
11387{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11388echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11389
11390# So? What about this header?
edfaf76d
LK
11391case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11392 yes:no: )
b8bdffbe
JD
11393 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11394echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11395 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11396echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11397 ac_header_preproc=yes
b8bdffbe 11398 ;;
edfaf76d 11399 no:yes:* )
b8bdffbe
JD
11400 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11401echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11402 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11403echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11404 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11405echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11406 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11407echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11408 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11409echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11410 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11411echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 11412
b8bdffbe
JD
11413 ;;
11414esac
d6e01aa5
KL
11415{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11416echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11417if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11418 echo $ECHO_N "(cached) $ECHO_C" >&6
11419else
edfaf76d 11420 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11421fi
d6e01aa5
KL
11422ac_res=`eval echo '${'$as_ac_Header'}'`
11423 { echo "$as_me:$LINENO: result: $ac_res" >&5
11424echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11425
11426fi
11427if test `eval echo '${'$as_ac_Header'}'` = yes; then
11428 cat >>confdefs.h <<_ACEOF
11429#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11430_ACEOF
11431
11432fi
11433
11434done
11435
11436 if test "$ac_cv_header_pthread_h"; then
d6e01aa5
KL
11437 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11438echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11439if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11440 echo $ECHO_N "(cached) $ECHO_C" >&6
11441else
11442 ac_check_lib_save_LIBS=$LIBS
11443LIBS="-lpthread $LIBS"
11444cat >conftest.$ac_ext <<_ACEOF
11445/* confdefs.h. */
11446_ACEOF
11447cat confdefs.h >>conftest.$ac_ext
11448cat >>conftest.$ac_ext <<_ACEOF
11449/* end confdefs.h. */
11450
d6e01aa5
KL
11451/* Override any GCC internal prototype to avoid an error.
11452 Use char because int might match the return type of a GCC
11453 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11454#ifdef __cplusplus
11455extern "C"
11456#endif
b8bdffbe
JD
11457char pthread_self ();
11458int
11459main ()
11460{
d6e01aa5 11461return pthread_self ();
b8bdffbe
JD
11462 ;
11463 return 0;
11464}
11465_ACEOF
11466rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
11467if { (ac_try="$ac_link"
11468case "(($ac_try" in
11469 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11470 *) ac_try_echo=$ac_try;;
11471esac
11472eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11473 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11474 ac_status=$?
edfaf76d
LK
11475 grep -v '^ *+' conftest.er1 >conftest.err
11476 rm -f conftest.er1
11477 cat conftest.err >&5
b8bdffbe 11478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11479 (exit $ac_status); } && {
11480 test -z "$ac_c_werror_flag" ||
11481 test ! -s conftest.err
11482 } && test -s conftest$ac_exeext &&
11483 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11484 ac_cv_lib_pthread_pthread_self=yes
11485else
11486 echo "$as_me: failed program was:" >&5
11487sed 's/^/| /' conftest.$ac_ext >&5
11488
d6e01aa5 11489 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11490fi
d6e01aa5
KL
11491
11492rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11493 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11494LIBS=$ac_check_lib_save_LIBS
11495fi
d6e01aa5
KL
11496{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11497echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11498if test $ac_cv_lib_pthread_pthread_self = yes; then
11499 HAVE_GTK_AND_PTHREAD=yes
11500fi
11501
11502 fi
11503 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
846d1b3e
JD
11504 case "${canonical}" in
11505 *-hpux*) ;;
11506 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
11507 esac
b8bdffbe
JD
11508
11509cat >>confdefs.h <<\_ACEOF
11510#define HAVE_GTK_AND_PTHREAD 1
11511_ACEOF
11512
11513 fi
57669b57 11514 fi
488dd4c4
JD
11515fi
11516
131e4133
MA
11517HAVE_DBUS=no
11518if test "${with_dbus}" = "yes"; then
cffe4909
MH
11519
11520 succeeded=no
11521
11522 if test -z "$PKG_CONFIG"; then
11523 # Extract the first word of "pkg-config", so it can be a program name with args.
11524set dummy pkg-config; ac_word=$2
11525{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11526echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11527if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
131e4133
MA
11528 echo $ECHO_N "(cached) $ECHO_C" >&6
11529else
cffe4909
MH
11530 case $PKG_CONFIG in
11531 [\\/]* | ?:[\\/]*)
11532 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11533 ;;
11534 *)
11535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11536for as_dir in $PATH
11537do
11538 IFS=$as_save_IFS
11539 test -z "$as_dir" && as_dir=.
11540 for ac_exec_ext in '' $ac_executable_extensions; do
11541 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11542 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11543 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11544 break 2
11545 fi
11546done
11547done
11548IFS=$as_save_IFS
131e4133 11549
cffe4909
MH
11550 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11551 ;;
131e4133 11552esac
cffe4909
MH
11553fi
11554PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11555if test -n "$PKG_CONFIG"; then
11556 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11557echo "${ECHO_T}$PKG_CONFIG" >&6; }
131e4133 11558else
cffe4909
MH
11559 { echo "$as_me:$LINENO: result: no" >&5
11560echo "${ECHO_T}no" >&6; }
131e4133
MA
11561fi
11562
cffe4909
MH
11563
11564 fi
11565
11566 if test "$PKG_CONFIG" = "no" ; then
11567 HAVE_DBUS=no
11568 else
11569 PKG_CONFIG_MIN_VERSION=0.9.0
11570 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11571 { echo "$as_me:$LINENO: checking for dbus-1 >= 1.0" >&5
11572echo $ECHO_N "checking for dbus-1 >= 1.0... $ECHO_C" >&6; }
11573
11574 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
11575 { echo "$as_me:$LINENO: result: yes" >&5
11576echo "${ECHO_T}yes" >&6; }
11577 succeeded=yes
11578
11579 { echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5
11580echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6; }
11581 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11582 { echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5
11583echo "${ECHO_T}$DBUS_CFLAGS" >&6; }
11584
11585 { echo "$as_me:$LINENO: checking DBUS_LIBS" >&5
11586echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6; }
11587 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11588 { echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5
11589echo "${ECHO_T}$DBUS_LIBS" >&6; }
11590 else
11591 { echo "$as_me:$LINENO: result: no" >&5
11592echo "${ECHO_T}no" >&6; }
11593 DBUS_CFLAGS=""
11594 DBUS_LIBS=""
11595 ## If we have a custom action on failure, don't print errors, but
11596 ## do set a variable so people can do so.
11597 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
11598
11599 fi
11600
11601
11602
11603 else
11604 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11605 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11606 fi
11607 fi
11608
11609 if test $succeeded = yes; then
11610 HAVE_DBUS=yes
11611 else
11612 HAVE_DBUS=no
11613 fi
131e4133
MA
11614
11615 if test "$HAVE_DBUS" = yes; then
11616
11617cat >>confdefs.h <<\_ACEOF
11618#define HAVE_DBUS 1
11619_ACEOF
11620
131e4133
MA
11621 fi
11622fi
11623
9d89ffd0
JD
11624### Link with -lXft if available to work around a bug.
11625HAVE_XFT=maybe
11626if test "${HAVE_GTK}" = "yes"; then
11627 if test "X${with_pkg_config_prog}" != X; then
11628 PKG_CONFIG="${with_pkg_config_prog}"
11629 fi
11630
11631
11632 succeeded=no
11633
11634 if test -z "$PKG_CONFIG"; then
11635 # Extract the first word of "pkg-config", so it can be a program name with args.
11636set dummy pkg-config; ac_word=$2
11637{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11638echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11639if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11640 echo $ECHO_N "(cached) $ECHO_C" >&6
11641else
11642 case $PKG_CONFIG in
11643 [\\/]* | ?:[\\/]*)
11644 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11645 ;;
11646 *)
11647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11648for as_dir in $PATH
11649do
11650 IFS=$as_save_IFS
11651 test -z "$as_dir" && as_dir=.
11652 for ac_exec_ext in '' $ac_executable_extensions; do
11653 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11654 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11655 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11656 break 2
11657 fi
11658done
11659done
11660IFS=$as_save_IFS
11661
11662 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11663 ;;
11664esac
11665fi
11666PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11667if test -n "$PKG_CONFIG"; then
11668 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11669echo "${ECHO_T}$PKG_CONFIG" >&6; }
11670else
11671 { echo "$as_me:$LINENO: result: no" >&5
11672echo "${ECHO_T}no" >&6; }
11673fi
11674
11675
11676 fi
11677
11678 if test "$PKG_CONFIG" = "no" ; then
11679 HAVE_XFT=no
11680 else
11681 PKG_CONFIG_MIN_VERSION=0.9.0
11682 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11683 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
11684echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
11685
11686 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
11687 { echo "$as_me:$LINENO: result: yes" >&5
11688echo "${ECHO_T}yes" >&6; }
11689 succeeded=yes
11690
11691 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
11692echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
94315858 11693 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9d89ffd0
JD
11694 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
11695echo "${ECHO_T}$XFT_CFLAGS" >&6; }
11696
11697 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
11698echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
94315858 11699 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9d89ffd0
JD
11700 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
11701echo "${ECHO_T}$XFT_LIBS" >&6; }
11702 else
11703 { echo "$as_me:$LINENO: result: no" >&5
11704echo "${ECHO_T}no" >&6; }
11705 XFT_CFLAGS=""
11706 XFT_LIBS=""
11707 ## If we have a custom action on failure, don't print errors, but
11708 ## do set a variable so people can do so.
11709 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
11710
11711 fi
11712
11713
11714
11715 else
11716 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11717 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11718 fi
11719 fi
11720
11721 if test $succeeded = yes; then
11722 :
11723 else
11724 HAVE_XFT=no
11725 fi
11726
11727 if test "$HAVE_XFT" != no; then
11728 OLD_CFLAGS="$CPPFLAGS"
f23323c5 11729 OLD_CPPFLAGS="$CFLAGS"
9d89ffd0
JD
11730 OLD_LIBS="$LIBS"
11731 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
11732 CFLAGS="$CFLAGS $XFT_CFLAGS"
11733 LIBS="$XFT_LIBS $LIBS"
11734 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
11735 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
11736echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
11737if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
11738 echo $ECHO_N "(cached) $ECHO_C" >&6
11739fi
11740{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
11741echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
11742else
11743 # Is the header compilable?
11744{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
11745echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
11746cat >conftest.$ac_ext <<_ACEOF
11747/* confdefs.h. */
11748_ACEOF
11749cat confdefs.h >>conftest.$ac_ext
11750cat >>conftest.$ac_ext <<_ACEOF
11751/* end confdefs.h. */
11752$ac_includes_default
11753#include <X11/Xft/Xft.h>
11754_ACEOF
11755rm -f conftest.$ac_objext
11756if { (ac_try="$ac_compile"
11757case "(($ac_try" in
11758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11759 *) ac_try_echo=$ac_try;;
11760esac
11761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11762 (eval "$ac_compile") 2>conftest.er1
11763 ac_status=$?
11764 grep -v '^ *+' conftest.er1 >conftest.err
11765 rm -f conftest.er1
11766 cat conftest.err >&5
11767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11768 (exit $ac_status); } && {
11769 test -z "$ac_c_werror_flag" ||
11770 test ! -s conftest.err
11771 } && test -s conftest.$ac_objext; then
11772 ac_header_compiler=yes
11773else
11774 echo "$as_me: failed program was:" >&5
11775sed 's/^/| /' conftest.$ac_ext >&5
11776
11777 ac_header_compiler=no
11778fi
11779
11780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11781{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11782echo "${ECHO_T}$ac_header_compiler" >&6; }
11783
11784# Is the header present?
11785{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
11786echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
11787cat >conftest.$ac_ext <<_ACEOF
11788/* confdefs.h. */
11789_ACEOF
11790cat confdefs.h >>conftest.$ac_ext
11791cat >>conftest.$ac_ext <<_ACEOF
11792/* end confdefs.h. */
11793#include <X11/Xft/Xft.h>
11794_ACEOF
11795if { (ac_try="$ac_cpp conftest.$ac_ext"
11796case "(($ac_try" in
11797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11798 *) ac_try_echo=$ac_try;;
11799esac
11800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11801 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11802 ac_status=$?
11803 grep -v '^ *+' conftest.er1 >conftest.err
11804 rm -f conftest.er1
11805 cat conftest.err >&5
11806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11807 (exit $ac_status); } >/dev/null && {
11808 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11809 test ! -s conftest.err
11810 }; then
11811 ac_header_preproc=yes
11812else
11813 echo "$as_me: failed program was:" >&5
11814sed 's/^/| /' conftest.$ac_ext >&5
11815
11816 ac_header_preproc=no
11817fi
11818
11819rm -f conftest.err conftest.$ac_ext
11820{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11821echo "${ECHO_T}$ac_header_preproc" >&6; }
11822
11823# So? What about this header?
11824case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11825 yes:no: )
11826 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
11827echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11828 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
11829echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
11830 ac_header_preproc=yes
11831 ;;
11832 no:yes:* )
11833 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
11834echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
11835 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
11836echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
11837 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
11838echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
11839 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
11840echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
11841 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
11842echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
11843 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
11844echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
11845
11846 ;;
11847esac
11848{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
11849echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
11850if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
11851 echo $ECHO_N "(cached) $ECHO_C" >&6
11852else
11853 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
11854fi
11855{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
11856echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
11857
11858fi
11859if test $ac_cv_header_X11_Xft_Xft_h = yes; then
11860 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
11861echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
11862if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
11863 echo $ECHO_N "(cached) $ECHO_C" >&6
11864else
11865 ac_check_lib_save_LIBS=$LIBS
11866LIBS="-lXft $XFT_LIBS $LIBS"
11867cat >conftest.$ac_ext <<_ACEOF
11868/* confdefs.h. */
11869_ACEOF
11870cat confdefs.h >>conftest.$ac_ext
11871cat >>conftest.$ac_ext <<_ACEOF
11872/* end confdefs.h. */
11873
11874/* Override any GCC internal prototype to avoid an error.
11875 Use char because int might match the return type of a GCC
11876 builtin and then its argument prototype would still apply. */
11877#ifdef __cplusplus
11878extern "C"
11879#endif
11880char XftFontOpen ();
11881int
11882main ()
11883{
11884return XftFontOpen ();
11885 ;
11886 return 0;
11887}
11888_ACEOF
11889rm -f conftest.$ac_objext conftest$ac_exeext
11890if { (ac_try="$ac_link"
11891case "(($ac_try" in
11892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11893 *) ac_try_echo=$ac_try;;
11894esac
11895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11896 (eval "$ac_link") 2>conftest.er1
11897 ac_status=$?
11898 grep -v '^ *+' conftest.er1 >conftest.err
11899 rm -f conftest.er1
11900 cat conftest.err >&5
11901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11902 (exit $ac_status); } && {
11903 test -z "$ac_c_werror_flag" ||
11904 test ! -s conftest.err
11905 } && test -s conftest$ac_exeext &&
11906 $as_test_x conftest$ac_exeext; then
11907 ac_cv_lib_Xft_XftFontOpen=yes
11908else
11909 echo "$as_me: failed program was:" >&5
11910sed 's/^/| /' conftest.$ac_ext >&5
11911
11912 ac_cv_lib_Xft_XftFontOpen=no
11913fi
11914
11915rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11916 conftest$ac_exeext conftest.$ac_ext
11917LIBS=$ac_check_lib_save_LIBS
11918fi
11919{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
11920echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
11921if test $ac_cv_lib_Xft_XftFontOpen = yes; then
11922 HAVE_XFT=yes
11923fi
11924
11925fi
11926
11927
11928
11929 if test "${HAVE_XFT}" = "yes"; then
11930
11931cat >>confdefs.h <<\_ACEOF
11932#define HAVE_XFT 1
11933_ACEOF
11934
11935
11936 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
11937 else
11938 CFLAGS="$OLD_CPPFLAGS"
11939 CFLAGS="$OLD_CFLAGS"
11940 LIBS="$OLD_LIBS"
11941 fi
11942 fi
11943fi
11944
dba7bae0 11945HAVE_XAW3D=no
3685ba3f 11946if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
a5c2c204
JD
11947 if test "$with_xaw3d" != no; then
11948 { echo "$as_me:$LINENO: checking for xaw3d" >&5
dba7bae0 11949echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
a5c2c204 11950 if test "${emacs_cv_xaw3d+set}" = set; then
98418dba
CW
11951 echo $ECHO_N "(cached) $ECHO_C" >&6
11952else
11953 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11954/* confdefs.h. */
11955_ACEOF
11956cat confdefs.h >>conftest.$ac_ext
11957cat >>conftest.$ac_ext <<_ACEOF
11958/* end confdefs.h. */
98418dba
CW
11959
11960#include <X11/Intrinsic.h>
dba7bae0 11961#include <X11/Xaw3d/Simple.h>
98418dba
CW
11962int
11963main ()
11964{
11965
11966 ;
11967 return 0;
11968}
11969_ACEOF
11970rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
11971if { (ac_try="$ac_link"
11972case "(($ac_try" in
11973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11974 *) ac_try_echo=$ac_try;;
11975esac
11976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11977 (eval "$ac_link") 2>conftest.er1
98418dba 11978 ac_status=$?
edfaf76d
LK
11979 grep -v '^ *+' conftest.er1 >conftest.err
11980 rm -f conftest.er1
11981 cat conftest.err >&5
c0d27fcc 11982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11983 (exit $ac_status); } && {
11984 test -z "$ac_c_werror_flag" ||
11985 test ! -s conftest.err
11986 } && test -s conftest$ac_exeext &&
11987 $as_test_x conftest$ac_exeext; then
dba7bae0 11988 emacs_cv_xaw3d=yes
98418dba
CW
11989else
11990 echo "$as_me: failed program was:" >&5
19650fd6
AS
11991sed 's/^/| /' conftest.$ac_ext >&5
11992
dba7bae0 11993 emacs_cv_xaw3d=no
98418dba 11994fi
d6e01aa5
KL
11995
11996rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11997 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11998fi
11999
a5c2c204
JD
12000 else
12001 emacs_cv_xaw3d=no
12002 fi
12003 if test $emacs_cv_xaw3d = yes; then
12004 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
dba7bae0 12005echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
a5c2c204
JD
12006 USE_X_TOOLKIT=LUCID
12007 HAVE_XAW3D=yes
dba7bae0
CY
12008
12009cat >>confdefs.h <<\_ACEOF
12010#define HAVE_XAW3D 1
12011_ACEOF
12012
a5c2c204
JD
12013 else
12014 { echo "$as_me:$LINENO: result: no" >&5
dba7bae0 12015echo "${ECHO_T}no" >&6; }
a5c2c204 12016 { echo "$as_me:$LINENO: checking for libXaw" >&5
dba7bae0 12017echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
a5c2c204 12018 if test "${emacs_cv_xaw+set}" = set; then
dba7bae0
CY
12019 echo $ECHO_N "(cached) $ECHO_C" >&6
12020else
12021 cat >conftest.$ac_ext <<_ACEOF
12022/* confdefs.h. */
12023_ACEOF
12024cat confdefs.h >>conftest.$ac_ext
12025cat >>conftest.$ac_ext <<_ACEOF
12026/* end confdefs.h. */
12027
12028#include <X11/Intrinsic.h>
12029#include <X11/Xaw/Simple.h>
12030int
12031main ()
12032{
12033
12034 ;
12035 return 0;
12036}
12037_ACEOF
12038rm -f conftest.$ac_objext conftest$ac_exeext
12039if { (ac_try="$ac_link"
12040case "(($ac_try" in
12041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12042 *) ac_try_echo=$ac_try;;
12043esac
12044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12045 (eval "$ac_link") 2>conftest.er1
12046 ac_status=$?
12047 grep -v '^ *+' conftest.er1 >conftest.err
12048 rm -f conftest.er1
12049 cat conftest.err >&5
12050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12051 (exit $ac_status); } && {
12052 test -z "$ac_c_werror_flag" ||
12053 test ! -s conftest.err
12054 } && test -s conftest$ac_exeext &&
12055 $as_test_x conftest$ac_exeext; then
12056 emacs_cv_xaw=yes
12057else
12058 echo "$as_me: failed program was:" >&5
12059sed 's/^/| /' conftest.$ac_ext >&5
12060
12061 emacs_cv_xaw=no
12062fi
12063
12064rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12065 conftest$ac_exeext conftest.$ac_ext
12066fi
12067
a5c2c204
JD
12068 if test $emacs_cv_xaw = yes; then
12069 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
dba7bae0 12070echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
a5c2c204
JD
12071 USE_X_TOOLKIT=LUCID
12072 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
12073 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
3685ba3f
CY
12074echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
12075 { (exit 1); exit 1; }; }
a5c2c204
JD
12076 else
12077 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
dba7bae0 12078echo "${ECHO_T}no; do not use toolkit by default" >&6; }
a5c2c204 12079 USE_X_TOOLKIT=none
98418dba 12080 fi
98418dba
CW
12081 fi
12082fi
12083
12084X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12085
12086if test "${USE_X_TOOLKIT}" != "none"; then
d6e01aa5
KL
12087 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
12088echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
12089 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
12090 echo $ECHO_N "(cached) $ECHO_C" >&6
12091else
12092 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12093/* confdefs.h. */
12094_ACEOF
12095cat confdefs.h >>conftest.$ac_ext
12096cat >>conftest.$ac_ext <<_ACEOF
12097/* end confdefs.h. */
98418dba 12098#include <X11/Intrinsic.h>
98418dba
CW
12099int
12100main ()
12101{
12102#if XtSpecificationRelease < 6
12103fail;
12104#endif
12105
12106 ;
12107 return 0;
12108}
12109_ACEOF
12110rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12111if { (ac_try="$ac_link"
12112case "(($ac_try" in
12113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12114 *) ac_try_echo=$ac_try;;
12115esac
12116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12117 (eval "$ac_link") 2>conftest.er1
98418dba 12118 ac_status=$?
edfaf76d
LK
12119 grep -v '^ *+' conftest.er1 >conftest.err
12120 rm -f conftest.er1
12121 cat conftest.err >&5
c0d27fcc 12122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12123 (exit $ac_status); } && {
12124 test -z "$ac_c_werror_flag" ||
12125 test ! -s conftest.err
12126 } && test -s conftest$ac_exeext &&
12127 $as_test_x conftest$ac_exeext; then
98418dba
CW
12128 emacs_cv_x11_toolkit_version_6=yes
12129else
12130 echo "$as_me: failed program was:" >&5
19650fd6
AS
12131sed 's/^/| /' conftest.$ac_ext >&5
12132
d6e01aa5 12133 emacs_cv_x11_toolkit_version_6=no
98418dba 12134fi
d6e01aa5
KL
12135
12136rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12137 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12138fi
12139
12140 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12141 if test $emacs_cv_x11_toolkit_version_6 = yes; then
d6e01aa5
KL
12142 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12143echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12144
c0d27fcc 12145cat >>confdefs.h <<\_ACEOF
98418dba 12146#define HAVE_X11XTR6 1
c0d27fcc 12147_ACEOF
98418dba
CW
12148
12149 else
d6e01aa5
KL
12150 { echo "$as_me:$LINENO: result: before 6" >&5
12151echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12152 fi
12153
12154 OLDLIBS="$LIBS"
12155 if test x$HAVE_X11XTR6 = xyes; then
12156 LIBS="-lXt -lSM -lICE $LIBS"
12157 else
12158 LIBS="-lXt $LIBS"
12159 fi
12160
d6e01aa5
KL
12161{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12162echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
12163if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
12164 echo $ECHO_N "(cached) $ECHO_C" >&6
12165else
12166 ac_check_lib_save_LIBS=$LIBS
12167LIBS="-lXmu $LIBS"
12168cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12169/* confdefs.h. */
12170_ACEOF
12171cat confdefs.h >>conftest.$ac_ext
12172cat >>conftest.$ac_ext <<_ACEOF
12173/* end confdefs.h. */
98418dba 12174
d6e01aa5
KL
12175/* Override any GCC internal prototype to avoid an error.
12176 Use char because int might match the return type of a GCC
12177 builtin and then its argument prototype would still apply. */
98418dba
CW
12178#ifdef __cplusplus
12179extern "C"
12180#endif
98418dba 12181char XmuConvertStandardSelection ();
98418dba
CW
12182int
12183main ()
12184{
d6e01aa5 12185return XmuConvertStandardSelection ();
98418dba
CW
12186 ;
12187 return 0;
12188}
12189_ACEOF
12190rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12191if { (ac_try="$ac_link"
12192case "(($ac_try" in
12193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12194 *) ac_try_echo=$ac_try;;
12195esac
12196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12197 (eval "$ac_link") 2>conftest.er1
98418dba 12198 ac_status=$?
edfaf76d
LK
12199 grep -v '^ *+' conftest.er1 >conftest.err
12200 rm -f conftest.er1
12201 cat conftest.err >&5
c0d27fcc 12202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12203 (exit $ac_status); } && {
12204 test -z "$ac_c_werror_flag" ||
12205 test ! -s conftest.err
12206 } && test -s conftest$ac_exeext &&
12207 $as_test_x conftest$ac_exeext; then
98418dba
CW
12208 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12209else
12210 echo "$as_me: failed program was:" >&5
19650fd6
AS
12211sed 's/^/| /' conftest.$ac_ext >&5
12212
d6e01aa5 12213 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12214fi
d6e01aa5
KL
12215
12216rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12217 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12218LIBS=$ac_check_lib_save_LIBS
12219fi
d6e01aa5
KL
12220{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12221echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 12222if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12223 cat >>confdefs.h <<_ACEOF
98418dba 12224#define HAVE_LIBXMU 1
c0d27fcc 12225_ACEOF
98418dba
CW
12226
12227 LIBS="-lXmu $LIBS"
12228
12229fi
12230
12231 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12232fi
12233
12234# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12235if test "${HAVE_X11}" = "yes"; then
12236 if test "${USE_X_TOOLKIT}" != "none"; then
12237
d6e01aa5
KL
12238{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12239echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12240if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12241 echo $ECHO_N "(cached) $ECHO_C" >&6
12242else
12243 ac_check_lib_save_LIBS=$LIBS
12244LIBS="-lXext $LIBS"
12245cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12246/* confdefs.h. */
12247_ACEOF
12248cat confdefs.h >>conftest.$ac_ext
12249cat >>conftest.$ac_ext <<_ACEOF
12250/* end confdefs.h. */
98418dba 12251
d6e01aa5
KL
12252/* Override any GCC internal prototype to avoid an error.
12253 Use char because int might match the return type of a GCC
12254 builtin and then its argument prototype would still apply. */
98418dba
CW
12255#ifdef __cplusplus
12256extern "C"
12257#endif
98418dba 12258char XShapeQueryExtension ();
98418dba
CW
12259int
12260main ()
12261{
d6e01aa5 12262return XShapeQueryExtension ();
98418dba
CW
12263 ;
12264 return 0;
12265}
12266_ACEOF
12267rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12268if { (ac_try="$ac_link"
12269case "(($ac_try" in
12270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12271 *) ac_try_echo=$ac_try;;
12272esac
12273eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12274 (eval "$ac_link") 2>conftest.er1
98418dba 12275 ac_status=$?
edfaf76d
LK
12276 grep -v '^ *+' conftest.er1 >conftest.err
12277 rm -f conftest.er1
12278 cat conftest.err >&5
c0d27fcc 12279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12280 (exit $ac_status); } && {
12281 test -z "$ac_c_werror_flag" ||
12282 test ! -s conftest.err
12283 } && test -s conftest$ac_exeext &&
12284 $as_test_x conftest$ac_exeext; then
98418dba
CW
12285 ac_cv_lib_Xext_XShapeQueryExtension=yes
12286else
12287 echo "$as_me: failed program was:" >&5
19650fd6
AS
12288sed 's/^/| /' conftest.$ac_ext >&5
12289
d6e01aa5 12290 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12291fi
d6e01aa5
KL
12292
12293rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12294 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12295LIBS=$ac_check_lib_save_LIBS
12296fi
d6e01aa5
KL
12297{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12298echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12299if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12300 cat >>confdefs.h <<_ACEOF
98418dba 12301#define HAVE_LIBXEXT 1
c0d27fcc 12302_ACEOF
98418dba
CW
12303
12304 LIBS="-lXext $LIBS"
12305
12306fi
12307
12308 fi
12309fi
12310
12311if test "${USE_X_TOOLKIT}" = "MOTIF"; then
d6e01aa5
KL
12312 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12313echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12314if test "${emacs_cv_motif_version_2_1+set}" = set; then
12315 echo $ECHO_N "(cached) $ECHO_C" >&6
12316else
12317 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12318/* confdefs.h. */
12319_ACEOF
12320cat confdefs.h >>conftest.$ac_ext
12321cat >>conftest.$ac_ext <<_ACEOF
12322/* end confdefs.h. */
98418dba 12323#include <Xm/Xm.h>
98418dba
CW
12324int
12325main ()
12326{
12327#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12328int x = 5;
12329#else
12330Motif version prior to 2.1.
12331#endif
12332 ;
12333 return 0;
12334}
12335_ACEOF
12336rm -f conftest.$ac_objext
d6e01aa5
KL
12337if { (ac_try="$ac_compile"
12338case "(($ac_try" in
12339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12340 *) ac_try_echo=$ac_try;;
12341esac
12342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12343 (eval "$ac_compile") 2>conftest.er1
98418dba 12344 ac_status=$?
edfaf76d
LK
12345 grep -v '^ *+' conftest.er1 >conftest.err
12346 rm -f conftest.er1
12347 cat conftest.err >&5
c0d27fcc 12348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12349 (exit $ac_status); } && {
12350 test -z "$ac_c_werror_flag" ||
12351 test ! -s conftest.err
12352 } && test -s conftest.$ac_objext; then
98418dba
CW
12353 emacs_cv_motif_version_2_1=yes
12354else
12355 echo "$as_me: failed program was:" >&5
19650fd6
AS
12356sed 's/^/| /' conftest.$ac_ext >&5
12357
d6e01aa5 12358 emacs_cv_motif_version_2_1=no
98418dba 12359fi
d6e01aa5
KL
12360
12361rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12362fi
d6e01aa5
KL
12363{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12364echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12365 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12366 if test $emacs_cv_motif_version_2_1 = yes; then
12367 HAVE_LIBXP=no
b936fae4 12368
c0d27fcc 12369cat >>confdefs.h <<\_ACEOF
98418dba 12370#define HAVE_MOTIF_2_1 1
c0d27fcc 12371_ACEOF
98418dba 12372
d6e01aa5
KL
12373 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12374echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12375if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12376 echo $ECHO_N "(cached) $ECHO_C" >&6
12377else
12378 ac_check_lib_save_LIBS=$LIBS
12379LIBS="-lXp $LIBS"
12380cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12381/* confdefs.h. */
12382_ACEOF
12383cat confdefs.h >>conftest.$ac_ext
12384cat >>conftest.$ac_ext <<_ACEOF
12385/* end confdefs.h. */
98418dba 12386
d6e01aa5
KL
12387/* Override any GCC internal prototype to avoid an error.
12388 Use char because int might match the return type of a GCC
12389 builtin and then its argument prototype would still apply. */
98418dba
CW
12390#ifdef __cplusplus
12391extern "C"
12392#endif
98418dba 12393char XpCreateContext ();
98418dba
CW
12394int
12395main ()
12396{
d6e01aa5 12397return XpCreateContext ();
98418dba
CW
12398 ;
12399 return 0;
12400}
12401_ACEOF
12402rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12403if { (ac_try="$ac_link"
12404case "(($ac_try" in
12405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12406 *) ac_try_echo=$ac_try;;
12407esac
12408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12409 (eval "$ac_link") 2>conftest.er1
98418dba 12410 ac_status=$?
edfaf76d
LK
12411 grep -v '^ *+' conftest.er1 >conftest.err
12412 rm -f conftest.er1
12413 cat conftest.err >&5
c0d27fcc 12414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12415 (exit $ac_status); } && {
12416 test -z "$ac_c_werror_flag" ||
12417 test ! -s conftest.err
12418 } && test -s conftest$ac_exeext &&
12419 $as_test_x conftest$ac_exeext; then
98418dba
CW
12420 ac_cv_lib_Xp_XpCreateContext=yes
12421else
12422 echo "$as_me: failed program was:" >&5
19650fd6
AS
12423sed 's/^/| /' conftest.$ac_ext >&5
12424
d6e01aa5 12425 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12426fi
d6e01aa5
KL
12427
12428rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12429 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12430LIBS=$ac_check_lib_save_LIBS
12431fi
d6e01aa5
KL
12432{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12433echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12434if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12435 HAVE_LIBXP=yes
12436fi
503d2be0 12437
98418dba 12438 if test ${HAVE_LIBXP} = yes; then
b936fae4 12439
c0d27fcc 12440cat >>confdefs.h <<\_ACEOF
98418dba 12441#define HAVE_LIBXP 1
c0d27fcc 12442_ACEOF
503d2be0 12443
98418dba 12444 fi
4693dbc9 12445 else
d6e01aa5
KL
12446 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12447echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12448if test "${emacs_cv_lesstif+set}" = set; then
12449 echo $ECHO_N "(cached) $ECHO_C" >&6
12450else
12451 # We put this in CFLAGS temporarily to precede other -I options
12452 # that might be in CFLAGS temporarily.
12453 # We put this in CPPFLAGS where it precedes the other -I options.
12454 OLD_CPPFLAGS=$CPPFLAGS
12455 OLD_CFLAGS=$CFLAGS
12456 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12457 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12458 cat >conftest.$ac_ext <<_ACEOF
12459/* confdefs.h. */
12460_ACEOF
12461cat confdefs.h >>conftest.$ac_ext
12462cat >>conftest.$ac_ext <<_ACEOF
12463/* end confdefs.h. */
12464#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12465int
12466main ()
12467{
12468int x = 5;
12469 ;
12470 return 0;
12471}
12472_ACEOF
12473rm -f conftest.$ac_objext
d6e01aa5
KL
12474if { (ac_try="$ac_compile"
12475case "(($ac_try" in
12476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12477 *) ac_try_echo=$ac_try;;
12478esac
12479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12480 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12481 ac_status=$?
edfaf76d
LK
12482 grep -v '^ *+' conftest.er1 >conftest.err
12483 rm -f conftest.er1
12484 cat conftest.err >&5
4693dbc9 12485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12486 (exit $ac_status); } && {
12487 test -z "$ac_c_werror_flag" ||
12488 test ! -s conftest.err
12489 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12490 emacs_cv_lesstif=yes
12491else
12492 echo "$as_me: failed program was:" >&5
12493sed 's/^/| /' conftest.$ac_ext >&5
12494
d6e01aa5 12495 emacs_cv_lesstif=no
4693dbc9 12496fi
d6e01aa5
KL
12497
12498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12499fi
d6e01aa5
KL
12500{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12501echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12502 if test $emacs_cv_lesstif = yes; then
12503 # Make sure this -I option remains in CPPFLAGS after it is set
12504 # back to REAL_CPPFLAGS.
12505 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12506 # have those other -I options anyway. Ultimately, having this
12507 # directory ultimately in CPPFLAGS will be enough.
12508 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12509 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12510 else
12511 CFLAGS=$OLD_CFLAGS
12512 CPPFLAGS=$OLD_CPPFLAGS
12513 fi
98418dba
CW
12514 fi
12515fi
12516
c0d27fcc
MR
12517
12518
98418dba
CW
12519USE_TOOLKIT_SCROLL_BARS=no
12520if test "${with_toolkit_scroll_bars}" != "no"; then
12521 if test "${USE_X_TOOLKIT}" != "none"; then
12522 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12523 cat >>confdefs.h <<\_ACEOF
98418dba 12524#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12525_ACEOF
98418dba
CW
12526
12527 HAVE_XAW3D=no
12528 USE_TOOLKIT_SCROLL_BARS=yes
12529 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12530 cat >>confdefs.h <<\_ACEOF
98418dba 12531#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12532_ACEOF
98418dba
CW
12533
12534 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12535 fi
488dd4c4
JD
12536 elif test "${HAVE_GTK}" = "yes"; then
12537 cat >>confdefs.h <<\_ACEOF
12538#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
12539_ACEOF
12540
12541 USE_TOOLKIT_SCROLL_BARS=yes
12542 elif test "${HAVE_CARBON}" = "yes"; then
12543 cat >>confdefs.h <<\_ACEOF
12544#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12545_ACEOF
12546
12547 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12548 fi
12549fi
12550
abd39b57 12551cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12552/* confdefs.h. */
12553_ACEOF
12554cat confdefs.h >>conftest.$ac_ext
12555cat >>conftest.$ac_ext <<_ACEOF
12556/* end confdefs.h. */
12557
12558 #include <X11/Xlib.h>
12559 #include <X11/Xresource.h>
12560int
12561main ()
12562{
12563XIMProc callback;
12564 ;
12565 return 0;
12566}
12567_ACEOF
12568rm -f conftest.$ac_objext
d6e01aa5
KL
12569if { (ac_try="$ac_compile"
12570case "(($ac_try" in
12571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12572 *) ac_try_echo=$ac_try;;
12573esac
12574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12575 (eval "$ac_compile") 2>conftest.er1
abd39b57 12576 ac_status=$?
edfaf76d
LK
12577 grep -v '^ *+' conftest.er1 >conftest.err
12578 rm -f conftest.er1
12579 cat conftest.err >&5
abd39b57 12580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12581 (exit $ac_status); } && {
12582 test -z "$ac_c_werror_flag" ||
12583 test ! -s conftest.err
12584 } && test -s conftest.$ac_objext; then
abd39b57
AC
12585 HAVE_XIM=yes
12586
12587cat >>confdefs.h <<\_ACEOF
12588#define HAVE_XIM 1
12589_ACEOF
12590
12591else
12592 echo "$as_me: failed program was:" >&5
12593sed 's/^/| /' conftest.$ac_ext >&5
12594
d6e01aa5 12595 HAVE_XIM=no
abd39b57 12596fi
d6e01aa5
KL
12597
12598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12599
c0d27fcc 12600
98418dba 12601if test "${with_xim}" != "no"; then
b936fae4 12602
c0d27fcc 12603cat >>confdefs.h <<\_ACEOF
98418dba 12604#define USE_XIM 1
c0d27fcc 12605_ACEOF
98418dba 12606
793fa0d7 12607fi
abd39b57
AC
12608
12609
12610if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12611 late_CFLAGS=$CFLAGS
12612 if test "$GCC" = yes; then
12613 CFLAGS="$CFLAGS --pedantic-errors"
12614 fi
cffcede7 12615 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12616/* confdefs.h. */
12617_ACEOF
12618cat confdefs.h >>conftest.$ac_ext
12619cat >>conftest.$ac_ext <<_ACEOF
12620/* end confdefs.h. */
cffcede7
JD
12621
12622#include <X11/Xlib.h>
12623#include <X11/Xresource.h>
12624int
12625main ()
12626{
12627Display *display;
12628XrmDatabase db;
12629char *res_name;
12630char *res_class;
12631XIMProc callback;
12632XPointer *client_data;
849d80cf
DL
12633#ifndef __GNUC__
12634/* If we're not using GCC, it's probably not XFree86, and this is
12635 probably right, but we can't use something like --pedantic-errors. */
12636extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12637 char*, XIMProc, XPointer*);
12638#endif
cffcede7
JD
12639(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12640 client_data);
12641 ;
12642 return 0;
12643}
12644_ACEOF
12645rm -f conftest.$ac_objext
d6e01aa5
KL
12646if { (ac_try="$ac_compile"
12647case "(($ac_try" in
12648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12649 *) ac_try_echo=$ac_try;;
12650esac
12651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12652 (eval "$ac_compile") 2>conftest.er1
cffcede7 12653 ac_status=$?
edfaf76d
LK
12654 grep -v '^ *+' conftest.er1 >conftest.err
12655 rm -f conftest.er1
12656 cat conftest.err >&5
cffcede7 12657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12658 (exit $ac_status); } && {
12659 test -z "$ac_c_werror_flag" ||
12660 test ! -s conftest.err
12661 } && test -s conftest.$ac_objext; then
cffcede7
JD
12662 emacs_cv_arg6_star=yes
12663else
12664 echo "$as_me: failed program was:" >&5
19650fd6
AS
12665sed 's/^/| /' conftest.$ac_ext >&5
12666
d6e01aa5 12667
cffcede7 12668fi
d6e01aa5
KL
12669
12670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12671
12672 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12673 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12674#define XRegisterIMInstantiateCallback_arg6 XPointer*
12675_ACEOF
12676
12677 else
f57bd967 12678 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12679#define XRegisterIMInstantiateCallback_arg6 XPointer
12680_ACEOF
12681
12682 fi
849d80cf 12683 CFLAGS=$late_CFLAGS
98418dba
CW
12684fi
12685
12686### Use -lXpm if available, unless `--with-xpm=no'.
12687HAVE_XPM=no
12688if test "${HAVE_X11}" = "yes"; then
12689 if test "${with_xpm}" != "no"; then
c0d27fcc 12690 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
d6e01aa5
KL
12691 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
12692echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
12693if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12694 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 12695fi
d6e01aa5
KL
12696{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
12697echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 12698else
c0d27fcc 12699 # Is the header compilable?
d6e01aa5
KL
12700{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
12701echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 12702cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12703/* confdefs.h. */
12704_ACEOF
12705cat confdefs.h >>conftest.$ac_ext
12706cat >>conftest.$ac_ext <<_ACEOF
12707/* end confdefs.h. */
c0d27fcc
MR
12708$ac_includes_default
12709#include <X11/xpm.h>
12710_ACEOF
12711rm -f conftest.$ac_objext
d6e01aa5
KL
12712if { (ac_try="$ac_compile"
12713case "(($ac_try" in
12714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12715 *) ac_try_echo=$ac_try;;
12716esac
12717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12718 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 12719 ac_status=$?
edfaf76d
LK
12720 grep -v '^ *+' conftest.er1 >conftest.err
12721 rm -f conftest.er1
12722 cat conftest.err >&5
c0d27fcc 12723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12724 (exit $ac_status); } && {
12725 test -z "$ac_c_werror_flag" ||
12726 test ! -s conftest.err
12727 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
12728 ac_header_compiler=yes
12729else
12730 echo "$as_me: failed program was:" >&5
19650fd6
AS
12731sed 's/^/| /' conftest.$ac_ext >&5
12732
d6e01aa5 12733 ac_header_compiler=no
c0d27fcc 12734fi
d6e01aa5
KL
12735
12736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12737{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12738echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
12739
12740# Is the header present?
d6e01aa5
KL
12741{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
12742echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 12743cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12744/* confdefs.h. */
12745_ACEOF
12746cat confdefs.h >>conftest.$ac_ext
12747cat >>conftest.$ac_ext <<_ACEOF
12748/* end confdefs.h. */
98418dba
CW
12749#include <X11/xpm.h>
12750_ACEOF
d6e01aa5
KL
12751if { (ac_try="$ac_cpp conftest.$ac_ext"
12752case "(($ac_try" in
12753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12754 *) ac_try_echo=$ac_try;;
12755esac
12756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12757 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 12758 ac_status=$?
6bae0ccf 12759 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12760 rm -f conftest.er1
12761 cat conftest.err >&5
c0d27fcc 12762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12763 (exit $ac_status); } >/dev/null && {
12764 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12765 test ! -s conftest.err
12766 }; then
c0d27fcc 12767 ac_header_preproc=yes
98418dba
CW
12768else
12769 echo "$as_me: failed program was:" >&5
19650fd6
AS
12770sed 's/^/| /' conftest.$ac_ext >&5
12771
c0d27fcc 12772 ac_header_preproc=no
98418dba 12773fi
d6e01aa5 12774
98418dba 12775rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
12776{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12777echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
12778
12779# So? What about this header?
edfaf76d
LK
12780case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12781 yes:no: )
c0d27fcc
MR
12782 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
12783echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12784 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
12785echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
12786 ac_header_preproc=yes
12787 ;;
12788 no:yes:* )
12789 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
12790echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
12791 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
12792echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
12793 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
12794echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
12795 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
12796echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
12797 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
12798echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12799 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
12800echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 12801
19650fd6 12802 ;;
c0d27fcc 12803esac
d6e01aa5
KL
12804{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
12805echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
12806if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12807 echo $ECHO_N "(cached) $ECHO_C" >&6
12808else
12809 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 12810fi
d6e01aa5
KL
12811{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
12812echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
12813
12814fi
98418dba 12815if test $ac_cv_header_X11_xpm_h = yes; then
d6e01aa5
KL
12816 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
12817echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 12818if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 12819 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12820else
98418dba
CW
12821 ac_check_lib_save_LIBS=$LIBS
12822LIBS="-lXpm -lX11 $LIBS"
12823cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12824/* confdefs.h. */
12825_ACEOF
12826cat confdefs.h >>conftest.$ac_ext
12827cat >>conftest.$ac_ext <<_ACEOF
12828/* end confdefs.h. */
98418dba 12829
d6e01aa5
KL
12830/* Override any GCC internal prototype to avoid an error.
12831 Use char because int might match the return type of a GCC
12832 builtin and then its argument prototype would still apply. */
503d2be0
AS
12833#ifdef __cplusplus
12834extern "C"
12835#endif
98418dba 12836char XpmReadFileToPixmap ();
503d2be0
AS
12837int
12838main ()
12839{
d6e01aa5 12840return XpmReadFileToPixmap ();
503d2be0
AS
12841 ;
12842 return 0;
12843}
12844_ACEOF
12845rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12846if { (ac_try="$ac_link"
12847case "(($ac_try" in
12848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12849 *) ac_try_echo=$ac_try;;
12850esac
12851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12852 (eval "$ac_link") 2>conftest.er1
503d2be0 12853 ac_status=$?
edfaf76d
LK
12854 grep -v '^ *+' conftest.er1 >conftest.err
12855 rm -f conftest.er1
12856 cat conftest.err >&5
c0d27fcc 12857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12858 (exit $ac_status); } && {
12859 test -z "$ac_c_werror_flag" ||
12860 test ! -s conftest.err
12861 } && test -s conftest$ac_exeext &&
12862 $as_test_x conftest$ac_exeext; then
98418dba 12863 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
12864else
12865 echo "$as_me: failed program was:" >&5
19650fd6
AS
12866sed 's/^/| /' conftest.$ac_ext >&5
12867
d6e01aa5 12868 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 12869fi
d6e01aa5
KL
12870
12871rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12872 conftest$ac_exeext conftest.$ac_ext
98418dba 12873LIBS=$ac_check_lib_save_LIBS
503d2be0 12874fi
d6e01aa5
KL
12875{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
12876echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
12877if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
12878 HAVE_XPM=yes
ba4481b5
DL
12879fi
12880
98418dba
CW
12881fi
12882
c0d27fcc 12883
98418dba 12884 if test "${HAVE_XPM}" = "yes"; then
d6e01aa5
KL
12885 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
12886echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 12887 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12888/* confdefs.h. */
12889_ACEOF
12890cat confdefs.h >>conftest.$ac_ext
12891cat >>conftest.$ac_ext <<_ACEOF
12892/* end confdefs.h. */
98418dba
CW
12893#include "X11/xpm.h"
12894#ifndef XpmReturnAllocPixels
12895no_return_alloc_pixels
503d2be0 12896#endif
ba4481b5 12897
98418dba
CW
12898_ACEOF
12899if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 12900 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
12901 HAVE_XPM=no
12902else
12903 HAVE_XPM=yes
12904fi
12905rm -f conftest*
ba4481b5 12906
c0d27fcc 12907
98418dba 12908 if test "${HAVE_XPM}" = "yes"; then
d6e01aa5
KL
12909 { echo "$as_me:$LINENO: result: yes" >&5
12910echo "${ECHO_T}yes" >&6; }
98418dba 12911 else
d6e01aa5
KL
12912 { echo "$as_me:$LINENO: result: no" >&5
12913echo "${ECHO_T}no" >&6; }
98418dba
CW
12914 fi
12915 fi
12916 fi
12917
12918 if test "${HAVE_XPM}" = "yes"; then
b936fae4 12919
c0d27fcc 12920cat >>confdefs.h <<\_ACEOF
98418dba 12921#define HAVE_XPM 1
c0d27fcc 12922_ACEOF
98418dba
CW
12923
12924 fi
12925fi
12926
12927### Use -ljpeg if available, unless `--with-jpeg=no'.
12928HAVE_JPEG=no
12929if test "${HAVE_X11}" = "yes"; then
12930 if test "${with_jpeg}" != "no"; then
c0d27fcc 12931 if test "${ac_cv_header_jerror_h+set}" = set; then
d6e01aa5
KL
12932 { echo "$as_me:$LINENO: checking for jerror.h" >&5
12933echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
12934if test "${ac_cv_header_jerror_h+set}" = set; then
12935 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 12936fi
d6e01aa5
KL
12937{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
12938echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 12939else
c0d27fcc 12940 # Is the header compilable?
d6e01aa5
KL
12941{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
12942echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 12943cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12944/* confdefs.h. */
12945_ACEOF
12946cat confdefs.h >>conftest.$ac_ext
12947cat >>conftest.$ac_ext <<_ACEOF
12948/* end confdefs.h. */
c0d27fcc
MR
12949$ac_includes_default
12950#include <jerror.h>
12951_ACEOF
12952rm -f conftest.$ac_objext
d6e01aa5
KL
12953if { (ac_try="$ac_compile"
12954case "(($ac_try" in
12955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12956 *) ac_try_echo=$ac_try;;
12957esac
12958eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12959 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 12960 ac_status=$?
edfaf76d
LK
12961 grep -v '^ *+' conftest.er1 >conftest.err
12962 rm -f conftest.er1
12963 cat conftest.err >&5
c0d27fcc 12964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12965 (exit $ac_status); } && {
12966 test -z "$ac_c_werror_flag" ||
12967 test ! -s conftest.err
12968 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
12969 ac_header_compiler=yes
12970else
12971 echo "$as_me: failed program was:" >&5
19650fd6
AS
12972sed 's/^/| /' conftest.$ac_ext >&5
12973
d6e01aa5 12974 ac_header_compiler=no
c0d27fcc 12975fi
d6e01aa5
KL
12976
12977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12978{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12979echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
12980
12981# Is the header present?
d6e01aa5
KL
12982{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
12983echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 12984cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12985/* confdefs.h. */
12986_ACEOF
12987cat confdefs.h >>conftest.$ac_ext
12988cat >>conftest.$ac_ext <<_ACEOF
12989/* end confdefs.h. */
98418dba
CW
12990#include <jerror.h>
12991_ACEOF
d6e01aa5
KL
12992if { (ac_try="$ac_cpp conftest.$ac_ext"
12993case "(($ac_try" in
12994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12995 *) ac_try_echo=$ac_try;;
12996esac
12997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12998 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 12999 ac_status=$?
6bae0ccf 13000 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13001 rm -f conftest.er1
13002 cat conftest.err >&5
c0d27fcc 13003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13004 (exit $ac_status); } >/dev/null && {
13005 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13006 test ! -s conftest.err
13007 }; then
c0d27fcc 13008 ac_header_preproc=yes
ba4481b5 13009else
98418dba 13010 echo "$as_me: failed program was:" >&5
19650fd6
AS
13011sed 's/^/| /' conftest.$ac_ext >&5
13012
c0d27fcc 13013 ac_header_preproc=no
98418dba 13014fi
d6e01aa5 13015
98418dba 13016rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
13017{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13018echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13019
13020# So? What about this header?
edfaf76d
LK
13021case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13022 yes:no: )
c0d27fcc
MR
13023 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13024echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13025 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13026echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13027 ac_header_preproc=yes
19650fd6 13028 ;;
edfaf76d 13029 no:yes:* )
c0d27fcc
MR
13030 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13031echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13032 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13033echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13034 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13035echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13036 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13037echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13038 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13039echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13040 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13041echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 13042
19650fd6 13043 ;;
c0d27fcc 13044esac
d6e01aa5
KL
13045{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13046echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13047if test "${ac_cv_header_jerror_h+set}" = set; then
13048 echo $ECHO_N "(cached) $ECHO_C" >&6
13049else
13050 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13051fi
d6e01aa5
KL
13052{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13053echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13054
13055fi
98418dba 13056if test $ac_cv_header_jerror_h = yes; then
d6e01aa5
KL
13057 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13058echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13059if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13060 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13061else
98418dba
CW
13062 ac_check_lib_save_LIBS=$LIBS
13063LIBS="-ljpeg $LIBS"
13064cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13065/* confdefs.h. */
13066_ACEOF
13067cat confdefs.h >>conftest.$ac_ext
13068cat >>conftest.$ac_ext <<_ACEOF
13069/* end confdefs.h. */
98418dba 13070
d6e01aa5
KL
13071/* Override any GCC internal prototype to avoid an error.
13072 Use char because int might match the return type of a GCC
13073 builtin and then its argument prototype would still apply. */
98418dba
CW
13074#ifdef __cplusplus
13075extern "C"
13076#endif
98418dba 13077char jpeg_destroy_compress ();
503d2be0
AS
13078int
13079main ()
13080{
d6e01aa5 13081return jpeg_destroy_compress ();
503d2be0
AS
13082 ;
13083 return 0;
13084}
13085_ACEOF
13086rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
13087if { (ac_try="$ac_link"
13088case "(($ac_try" in
13089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13090 *) ac_try_echo=$ac_try;;
13091esac
13092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13093 (eval "$ac_link") 2>conftest.er1
503d2be0 13094 ac_status=$?
edfaf76d
LK
13095 grep -v '^ *+' conftest.er1 >conftest.err
13096 rm -f conftest.er1
13097 cat conftest.err >&5
c0d27fcc 13098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13099 (exit $ac_status); } && {
13100 test -z "$ac_c_werror_flag" ||
13101 test ! -s conftest.err
13102 } && test -s conftest$ac_exeext &&
13103 $as_test_x conftest$ac_exeext; then
98418dba 13104 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13105else
503d2be0 13106 echo "$as_me: failed program was:" >&5
19650fd6
AS
13107sed 's/^/| /' conftest.$ac_ext >&5
13108
d6e01aa5 13109 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13110fi
d6e01aa5
KL
13111
13112rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13113 conftest$ac_exeext conftest.$ac_ext
98418dba 13114LIBS=$ac_check_lib_save_LIBS
ba4481b5 13115fi
d6e01aa5
KL
13116{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13117echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13118if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13119 HAVE_JPEG=yes
ba4481b5 13120fi
98418dba 13121
ba4481b5 13122fi
98418dba 13123
c0d27fcc 13124
ba4481b5 13125 fi
ba4481b5 13126
c0d27fcc 13127
98418dba 13128 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13129 cat >>confdefs.h <<\_ACEOF
98418dba 13130#define HAVE_JPEG 1
c0d27fcc 13131_ACEOF
98418dba
CW
13132
13133 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13134/* confdefs.h. */
13135_ACEOF
13136cat confdefs.h >>conftest.$ac_ext
13137cat >>conftest.$ac_ext <<_ACEOF
13138/* end confdefs.h. */
22044edf 13139#include <jpeglib.h>
98418dba
CW
13140 version=JPEG_LIB_VERSION
13141
13142_ACEOF
13143if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13144 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13145 cat >>confdefs.h <<\_ACEOF
98418dba 13146#define HAVE_JPEG 1
c0d27fcc 13147_ACEOF
ba4481b5 13148
98418dba 13149else
c0d27fcc 13150 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13151echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13152 HAVE_JPEG=no
ba4481b5 13153fi
98418dba 13154rm -f conftest*
ba4481b5 13155
98418dba
CW
13156 fi
13157fi
503d2be0 13158
98418dba
CW
13159### Use -lpng if available, unless `--with-png=no'.
13160HAVE_PNG=no
13161if test "${HAVE_X11}" = "yes"; then
13162 if test "${with_png}" != "no"; then
f57bd967
DL
13163 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13164 # in /usr/include/libpng.
13165
13166
13167for ac_header in png.h libpng/png.h
13168do
13169as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
13170if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13171 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13172echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13173if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13174 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13175fi
d6e01aa5
KL
13176ac_res=`eval echo '${'$as_ac_Header'}'`
13177 { echo "$as_me:$LINENO: result: $ac_res" >&5
13178echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13179else
c0d27fcc 13180 # Is the header compilable?
d6e01aa5
KL
13181{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13182echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13183cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13184/* confdefs.h. */
13185_ACEOF
13186cat confdefs.h >>conftest.$ac_ext
13187cat >>conftest.$ac_ext <<_ACEOF
13188/* end confdefs.h. */
c0d27fcc 13189$ac_includes_default
f57bd967 13190#include <$ac_header>
c0d27fcc
MR
13191_ACEOF
13192rm -f conftest.$ac_objext
d6e01aa5
KL
13193if { (ac_try="$ac_compile"
13194case "(($ac_try" in
13195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13196 *) ac_try_echo=$ac_try;;
13197esac
13198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13199 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13200 ac_status=$?
edfaf76d
LK
13201 grep -v '^ *+' conftest.er1 >conftest.err
13202 rm -f conftest.er1
13203 cat conftest.err >&5
c0d27fcc 13204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13205 (exit $ac_status); } && {
13206 test -z "$ac_c_werror_flag" ||
13207 test ! -s conftest.err
13208 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13209 ac_header_compiler=yes
13210else
13211 echo "$as_me: failed program was:" >&5
19650fd6
AS
13212sed 's/^/| /' conftest.$ac_ext >&5
13213
d6e01aa5 13214 ac_header_compiler=no
c0d27fcc 13215fi
d6e01aa5
KL
13216
13217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13218{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13219echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13220
13221# Is the header present?
d6e01aa5
KL
13222{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13223echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13224cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13225/* confdefs.h. */
13226_ACEOF
13227cat confdefs.h >>conftest.$ac_ext
13228cat >>conftest.$ac_ext <<_ACEOF
13229/* end confdefs.h. */
f57bd967 13230#include <$ac_header>
503d2be0 13231_ACEOF
d6e01aa5
KL
13232if { (ac_try="$ac_cpp conftest.$ac_ext"
13233case "(($ac_try" in
13234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13235 *) ac_try_echo=$ac_try;;
13236esac
13237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13238 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13239 ac_status=$?
6bae0ccf 13240 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13241 rm -f conftest.er1
13242 cat conftest.err >&5
c0d27fcc 13243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13244 (exit $ac_status); } >/dev/null && {
13245 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13246 test ! -s conftest.err
13247 }; then
c0d27fcc 13248 ac_header_preproc=yes
503d2be0
AS
13249else
13250 echo "$as_me: failed program was:" >&5
19650fd6
AS
13251sed 's/^/| /' conftest.$ac_ext >&5
13252
c0d27fcc 13253 ac_header_preproc=no
ba4481b5 13254fi
d6e01aa5 13255
503d2be0 13256rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
13257{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13258echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13259
13260# So? What about this header?
edfaf76d
LK
13261case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13262 yes:no: )
f57bd967
DL
13263 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13264echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13265 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13266echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13267 ac_header_preproc=yes
19650fd6 13268 ;;
edfaf76d 13269 no:yes:* )
f57bd967
DL
13270 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13271echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13272 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13273echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13274 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13275echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13276 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13277echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 13278 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13279echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13280 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13281echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 13282
19650fd6 13283 ;;
c0d27fcc 13284esac
d6e01aa5
KL
13285{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13286echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13287if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
13288 echo $ECHO_N "(cached) $ECHO_C" >&6
13289else
edfaf76d 13290 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 13291fi
d6e01aa5
KL
13292ac_res=`eval echo '${'$as_ac_Header'}'`
13293 { echo "$as_me:$LINENO: result: $ac_res" >&5
13294echo "${ECHO_T}$ac_res" >&6; }
f57bd967 13295
ba4481b5 13296fi
f57bd967
DL
13297if test `eval echo '${'$as_ac_Header'}'` = yes; then
13298 cat >>confdefs.h <<_ACEOF
13299#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13300_ACEOF
c0d27fcc
MR
13301
13302fi
f57bd967
DL
13303
13304done
13305
13306 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
d6e01aa5
KL
13307 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
13308echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 13309if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 13310 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13311else
98418dba
CW
13312 ac_check_lib_save_LIBS=$LIBS
13313LIBS="-lpng -lz -lm $LIBS"
13314cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13315/* confdefs.h. */
13316_ACEOF
13317cat confdefs.h >>conftest.$ac_ext
13318cat >>conftest.$ac_ext <<_ACEOF
13319/* end confdefs.h. */
98418dba 13320
d6e01aa5
KL
13321/* Override any GCC internal prototype to avoid an error.
13322 Use char because int might match the return type of a GCC
13323 builtin and then its argument prototype would still apply. */
503d2be0
AS
13324#ifdef __cplusplus
13325extern "C"
13326#endif
98418dba 13327char png_get_channels ();
503d2be0
AS
13328int
13329main ()
13330{
d6e01aa5 13331return png_get_channels ();
503d2be0
AS
13332 ;
13333 return 0;
13334}
13335_ACEOF
13336rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
13337if { (ac_try="$ac_link"
13338case "(($ac_try" in
13339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13340 *) ac_try_echo=$ac_try;;
13341esac
13342eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13343 (eval "$ac_link") 2>conftest.er1
503d2be0 13344 ac_status=$?
edfaf76d
LK
13345 grep -v '^ *+' conftest.er1 >conftest.err
13346 rm -f conftest.er1
13347 cat conftest.err >&5
c0d27fcc 13348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13349 (exit $ac_status); } && {
13350 test -z "$ac_c_werror_flag" ||
13351 test ! -s conftest.err
13352 } && test -s conftest$ac_exeext &&
13353 $as_test_x conftest$ac_exeext; then
98418dba 13354 ac_cv_lib_png_png_get_channels=yes
73b77ee5 13355else
98418dba 13356 echo "$as_me: failed program was:" >&5
19650fd6
AS
13357sed 's/^/| /' conftest.$ac_ext >&5
13358
d6e01aa5 13359 ac_cv_lib_png_png_get_channels=no
73b77ee5 13360fi
d6e01aa5
KL
13361
13362rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13363 conftest$ac_exeext conftest.$ac_ext
98418dba 13364LIBS=$ac_check_lib_save_LIBS
73b77ee5 13365fi
d6e01aa5
KL
13366{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
13367echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
13368if test $ac_cv_lib_png_png_get_channels = yes; then
13369 HAVE_PNG=yes
73b77ee5 13370fi
503d2be0 13371
f57bd967 13372 fi
98418dba
CW
13373 fi
13374
13375 if test "${HAVE_PNG}" = "yes"; then
b936fae4 13376
c0d27fcc 13377cat >>confdefs.h <<\_ACEOF
98418dba 13378#define HAVE_PNG 1
c0d27fcc 13379_ACEOF
73b77ee5 13380
98418dba 13381 fi
73b77ee5
GM
13382fi
13383
98418dba
CW
13384### Use -ltiff if available, unless `--with-tiff=no'.
13385HAVE_TIFF=no
13386if test "${HAVE_X11}" = "yes"; then
13387 if test "${with_tiff}" != "no"; then
c0d27fcc 13388 if test "${ac_cv_header_tiffio_h+set}" = set; then
d6e01aa5
KL
13389 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
13390echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
13391if test "${ac_cv_header_tiffio_h+set}" = set; then
13392 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13393fi
d6e01aa5
KL
13394{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13395echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 13396else
c0d27fcc 13397 # Is the header compilable?
d6e01aa5
KL
13398{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
13399echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 13400cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13401/* confdefs.h. */
13402_ACEOF
13403cat confdefs.h >>conftest.$ac_ext
13404cat >>conftest.$ac_ext <<_ACEOF
13405/* end confdefs.h. */
c0d27fcc
MR
13406$ac_includes_default
13407#include <tiffio.h>
13408_ACEOF
13409rm -f conftest.$ac_objext
d6e01aa5
KL
13410if { (ac_try="$ac_compile"
13411case "(($ac_try" in
13412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13413 *) ac_try_echo=$ac_try;;
13414esac
13415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13416 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13417 ac_status=$?
edfaf76d
LK
13418 grep -v '^ *+' conftest.er1 >conftest.err
13419 rm -f conftest.er1
13420 cat conftest.err >&5
c0d27fcc 13421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13422 (exit $ac_status); } && {
13423 test -z "$ac_c_werror_flag" ||
13424 test ! -s conftest.err
13425 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13426 ac_header_compiler=yes
13427else
13428 echo "$as_me: failed program was:" >&5
19650fd6
AS
13429sed 's/^/| /' conftest.$ac_ext >&5
13430
d6e01aa5 13431 ac_header_compiler=no
c0d27fcc 13432fi
d6e01aa5
KL
13433
13434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13435{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13436echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13437
13438# Is the header present?
d6e01aa5
KL
13439{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
13440echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 13441cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13442/* confdefs.h. */
13443_ACEOF
13444cat confdefs.h >>conftest.$ac_ext
13445cat >>conftest.$ac_ext <<_ACEOF
13446/* end confdefs.h. */
98418dba
CW
13447#include <tiffio.h>
13448_ACEOF
d6e01aa5
KL
13449if { (ac_try="$ac_cpp conftest.$ac_ext"
13450case "(($ac_try" in
13451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13452 *) ac_try_echo=$ac_try;;
13453esac
13454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13455 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13456 ac_status=$?
6bae0ccf 13457 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13458 rm -f conftest.er1
13459 cat conftest.err >&5
c0d27fcc 13460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13461 (exit $ac_status); } >/dev/null && {
13462 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13463 test ! -s conftest.err
13464 }; then
c0d27fcc 13465 ac_header_preproc=yes
98418dba
CW
13466else
13467 echo "$as_me: failed program was:" >&5
19650fd6
AS
13468sed 's/^/| /' conftest.$ac_ext >&5
13469
c0d27fcc 13470 ac_header_preproc=no
98418dba 13471fi
d6e01aa5 13472
98418dba 13473rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
13474{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13475echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13476
13477# So? What about this header?
edfaf76d
LK
13478case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13479 yes:no: )
c0d27fcc
MR
13480 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
13481echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13482 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
13483echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
13484 ac_header_preproc=yes
19650fd6 13485 ;;
edfaf76d 13486 no:yes:* )
c0d27fcc
MR
13487 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
13488echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13489 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
13490echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
13491 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
13492echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
13493 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
13494echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13495 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 13496echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13497 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
13498echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 13499
19650fd6 13500 ;;
c0d27fcc 13501esac
d6e01aa5
KL
13502{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
13503echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
13504if test "${ac_cv_header_tiffio_h+set}" = set; then
13505 echo $ECHO_N "(cached) $ECHO_C" >&6
13506else
13507 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 13508fi
d6e01aa5
KL
13509{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13510echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
13511
13512fi
98418dba
CW
13513if test $ac_cv_header_tiffio_h = yes; then
13514 tifflibs="-lz -lm"
13515 # At least one tiff package requires the jpeg library.
13516 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
d6e01aa5
KL
13517 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
13518echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 13519if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 13520 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13521else
503d2be0 13522 ac_check_lib_save_LIBS=$LIBS
98418dba 13523LIBS="-ltiff $tifflibs $LIBS"
503d2be0 13524cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13525/* confdefs.h. */
13526_ACEOF
13527cat confdefs.h >>conftest.$ac_ext
13528cat >>conftest.$ac_ext <<_ACEOF
13529/* end confdefs.h. */
503d2be0 13530
d6e01aa5
KL
13531/* Override any GCC internal prototype to avoid an error.
13532 Use char because int might match the return type of a GCC
13533 builtin and then its argument prototype would still apply. */
503d2be0
AS
13534#ifdef __cplusplus
13535extern "C"
13536#endif
98418dba 13537char TIFFGetVersion ();
503d2be0
AS
13538int
13539main ()
13540{
d6e01aa5 13541return TIFFGetVersion ();
503d2be0
AS
13542 ;
13543 return 0;
13544}
13545_ACEOF
13546rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
13547if { (ac_try="$ac_link"
13548case "(($ac_try" in
13549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13550 *) ac_try_echo=$ac_try;;
13551esac
13552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13553 (eval "$ac_link") 2>conftest.er1
503d2be0 13554 ac_status=$?
edfaf76d
LK
13555 grep -v '^ *+' conftest.er1 >conftest.err
13556 rm -f conftest.er1
13557 cat conftest.err >&5
c0d27fcc 13558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13559 (exit $ac_status); } && {
13560 test -z "$ac_c_werror_flag" ||
13561 test ! -s conftest.err
13562 } && test -s conftest$ac_exeext &&
13563 $as_test_x conftest$ac_exeext; then
98418dba 13564 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
13565else
13566 echo "$as_me: failed program was:" >&5
19650fd6
AS
13567sed 's/^/| /' conftest.$ac_ext >&5
13568
d6e01aa5 13569 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 13570fi
d6e01aa5
KL
13571
13572rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13573 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
13574LIBS=$ac_check_lib_save_LIBS
13575fi
d6e01aa5
KL
13576{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13577echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
13578if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
13579 HAVE_TIFF=yes
13580fi
13581
13582fi
73b77ee5 13583
c0d27fcc 13584
98418dba
CW
13585 fi
13586
13587 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 13588
c0d27fcc 13589cat >>confdefs.h <<\_ACEOF
98418dba 13590#define HAVE_TIFF 1
c0d27fcc 13591_ACEOF
98418dba
CW
13592
13593 fi
73b77ee5
GM
13594fi
13595
9aeb8aaa 13596### Use -lgif or -lungif if available, unless `--with-gif=no'.
98418dba 13597HAVE_GIF=no
9aeb8aaa
GM
13598if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
13599 if test "${ac_cv_header_gif_lib_h+set}" = set; then
d6e01aa5
KL
13600 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
13601echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
13602if test "${ac_cv_header_gif_lib_h+set}" = set; then
13603 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13604fi
d6e01aa5
KL
13605{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
13606echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 13607else
c0d27fcc 13608 # Is the header compilable?
d6e01aa5
KL
13609{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
13610echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 13611cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13612/* confdefs.h. */
13613_ACEOF
13614cat confdefs.h >>conftest.$ac_ext
13615cat >>conftest.$ac_ext <<_ACEOF
13616/* end confdefs.h. */
c0d27fcc
MR
13617$ac_includes_default
13618#include <gif_lib.h>
13619_ACEOF
13620rm -f conftest.$ac_objext
d6e01aa5
KL
13621if { (ac_try="$ac_compile"
13622case "(($ac_try" in
13623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13624 *) ac_try_echo=$ac_try;;
13625esac
13626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13627 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13628 ac_status=$?
edfaf76d
LK
13629 grep -v '^ *+' conftest.er1 >conftest.err
13630 rm -f conftest.er1
13631 cat conftest.err >&5
c0d27fcc 13632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13633 (exit $ac_status); } && {
13634 test -z "$ac_c_werror_flag" ||
13635 test ! -s conftest.err
13636 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13637 ac_header_compiler=yes
13638else
13639 echo "$as_me: failed program was:" >&5
19650fd6
AS
13640sed 's/^/| /' conftest.$ac_ext >&5
13641
d6e01aa5 13642 ac_header_compiler=no
c0d27fcc 13643fi
d6e01aa5
KL
13644
13645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13646{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13647echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13648
13649# Is the header present?
d6e01aa5
KL
13650{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
13651echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 13652cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13653/* confdefs.h. */
13654_ACEOF
13655cat confdefs.h >>conftest.$ac_ext
13656cat >>conftest.$ac_ext <<_ACEOF
13657/* end confdefs.h. */
98418dba
CW
13658#include <gif_lib.h>
13659_ACEOF
d6e01aa5
KL
13660if { (ac_try="$ac_cpp conftest.$ac_ext"
13661case "(($ac_try" in
13662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13663 *) ac_try_echo=$ac_try;;
13664esac
13665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13666 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13667 ac_status=$?
6bae0ccf 13668 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13669 rm -f conftest.er1
13670 cat conftest.err >&5
c0d27fcc 13671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13672 (exit $ac_status); } >/dev/null && {
13673 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13674 test ! -s conftest.err
13675 }; then
c0d27fcc 13676 ac_header_preproc=yes
98418dba
CW
13677else
13678 echo "$as_me: failed program was:" >&5
19650fd6
AS
13679sed 's/^/| /' conftest.$ac_ext >&5
13680
c0d27fcc 13681 ac_header_preproc=no
98418dba 13682fi
d6e01aa5 13683
98418dba 13684rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
13685{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13686echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13687
13688# So? What about this header?
edfaf76d
LK
13689case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13690 yes:no: )
c0d27fcc
MR
13691 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
13692echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13693 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
13694echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
13695 ac_header_preproc=yes
19650fd6 13696 ;;
edfaf76d 13697 no:yes:* )
c0d27fcc
MR
13698 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
13699echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13700 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
13701echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
13702 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
13703echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
13704 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
13705echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13706 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 13707echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13708 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
13709echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 13710
19650fd6 13711 ;;
c0d27fcc 13712esac
d6e01aa5
KL
13713{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
13714echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
13715if test "${ac_cv_header_gif_lib_h+set}" = set; then
13716 echo $ECHO_N "(cached) $ECHO_C" >&6
13717else
13718 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 13719fi
d6e01aa5
KL
13720{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
13721echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
13722
13723fi
98418dba
CW
13724if test $ac_cv_header_gif_lib_h = yes; then
13725 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13726# Earlier versions can crash Emacs.
63175cd2
GM
13727 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
13728echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
13729if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
503d2be0 13730 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13731else
503d2be0 13732 ac_check_lib_save_LIBS=$LIBS
63175cd2 13733LIBS="-lgif $LIBS"
503d2be0 13734cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13735/* confdefs.h. */
13736_ACEOF
13737cat confdefs.h >>conftest.$ac_ext
13738cat >>conftest.$ac_ext <<_ACEOF
13739/* end confdefs.h. */
73b77ee5 13740
d6e01aa5
KL
13741/* Override any GCC internal prototype to avoid an error.
13742 Use char because int might match the return type of a GCC
13743 builtin and then its argument prototype would still apply. */
98418dba
CW
13744#ifdef __cplusplus
13745extern "C"
13746#endif
98418dba 13747char EGifPutExtensionLast ();
503d2be0
AS
13748int
13749main ()
13750{
d6e01aa5 13751return EGifPutExtensionLast ();
503d2be0
AS
13752 ;
13753 return 0;
13754}
13755_ACEOF
13756rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
13757if { (ac_try="$ac_link"
13758case "(($ac_try" in
13759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13760 *) ac_try_echo=$ac_try;;
13761esac
13762eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13763 (eval "$ac_link") 2>conftest.er1
503d2be0 13764 ac_status=$?
edfaf76d
LK
13765 grep -v '^ *+' conftest.er1 >conftest.err
13766 rm -f conftest.er1
13767 cat conftest.err >&5
c0d27fcc 13768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13769 (exit $ac_status); } && {
13770 test -z "$ac_c_werror_flag" ||
13771 test ! -s conftest.err
13772 } && test -s conftest$ac_exeext &&
13773 $as_test_x conftest$ac_exeext; then
63175cd2 13774 ac_cv_lib_gif_EGifPutExtensionLast=yes
35996d22 13775else
98418dba 13776 echo "$as_me: failed program was:" >&5
19650fd6
AS
13777sed 's/^/| /' conftest.$ac_ext >&5
13778
63175cd2 13779 ac_cv_lib_gif_EGifPutExtensionLast=no
98418dba 13780fi
d6e01aa5
KL
13781
13782rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13783 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13784LIBS=$ac_check_lib_save_LIBS
13785fi
63175cd2
GM
13786{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
13787echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
13788if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
98418dba 13789 HAVE_GIF=yes
9aeb8aaa 13790else
63175cd2 13791 try_libungif=yes
98418dba
CW
13792fi
13793
13794fi
13795
c0d27fcc 13796
9aeb8aaa
GM
13797
13798 if test "$HAVE_GIF" = yes; then
63175cd2 13799 ac_gif_lib_name="-lgif"
9aeb8aaa
GM
13800 fi
13801
63175cd2
GM
13802# If gif_lib.h but no libgif, try libungif.
13803 if test x"$try_libungif" = xyes; then
13804 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
13805echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
13806if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
9aeb8aaa
GM
13807 echo $ECHO_N "(cached) $ECHO_C" >&6
13808else
13809 ac_check_lib_save_LIBS=$LIBS
63175cd2 13810LIBS="-lungif $LIBS"
9aeb8aaa
GM
13811cat >conftest.$ac_ext <<_ACEOF
13812/* confdefs.h. */
13813_ACEOF
13814cat confdefs.h >>conftest.$ac_ext
13815cat >>conftest.$ac_ext <<_ACEOF
13816/* end confdefs.h. */
13817
13818/* Override any GCC internal prototype to avoid an error.
13819 Use char because int might match the return type of a GCC
13820 builtin and then its argument prototype would still apply. */
13821#ifdef __cplusplus
13822extern "C"
13823#endif
13824char EGifPutExtensionLast ();
13825int
13826main ()
13827{
13828return EGifPutExtensionLast ();
13829 ;
13830 return 0;
13831}
13832_ACEOF
13833rm -f conftest.$ac_objext conftest$ac_exeext
13834if { (ac_try="$ac_link"
13835case "(($ac_try" in
13836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13837 *) ac_try_echo=$ac_try;;
13838esac
13839eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13840 (eval "$ac_link") 2>conftest.er1
13841 ac_status=$?
13842 grep -v '^ *+' conftest.er1 >conftest.err
13843 rm -f conftest.er1
13844 cat conftest.err >&5
13845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13846 (exit $ac_status); } && {
13847 test -z "$ac_c_werror_flag" ||
13848 test ! -s conftest.err
13849 } && test -s conftest$ac_exeext &&
13850 $as_test_x conftest$ac_exeext; then
63175cd2 13851 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9aeb8aaa
GM
13852else
13853 echo "$as_me: failed program was:" >&5
13854sed 's/^/| /' conftest.$ac_ext >&5
13855
63175cd2 13856 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba
CW
13857fi
13858
9aeb8aaa
GM
13859rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13860 conftest$ac_exeext conftest.$ac_ext
13861LIBS=$ac_check_lib_save_LIBS
13862fi
63175cd2
GM
13863{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13864echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
13865if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9aeb8aaa 13866 HAVE_GIF=yes
98418dba
CW
13867fi
13868
c0d27fcc 13869
9aeb8aaa
GM
13870 if test "$HAVE_GIF" = yes; then
13871
13872cat >>confdefs.h <<\_ACEOF
63175cd2 13873#define LIBGIF -lungif
9aeb8aaa
GM
13874_ACEOF
13875
63175cd2 13876 ac_gif_lib_name="-lungif"
9aeb8aaa 13877 fi
98418dba
CW
13878 fi
13879
13880 if test "${HAVE_GIF}" = "yes"; then
b936fae4 13881
c0d27fcc 13882cat >>confdefs.h <<\_ACEOF
98418dba 13883#define HAVE_GIF 1
c0d27fcc 13884_ACEOF
98418dba
CW
13885
13886 fi
13887fi
13888
5afbeb22
JD
13889if test "${HAVE_X11}" = "yes"; then
13890 MISSING=""
13891 WITH_NO=""
13892 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
13893 MISSING="libXpm" && WITH_NO="--with-xpm=no"
13894 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
13895 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
13896 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
13897 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
13898 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
13899 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
13900 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
13901 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
13902
13903 if test "X${MISSING}" != X; then
c982cf7d 13904 { { echo "$as_me:$LINENO: error: The following required libraries were not found:
5afbeb22 13905 $MISSING
86e73516 13906Maybe some development libraries/packages are missing?
5afbeb22
JD
13907If you don't want to link with them give
13908 $WITH_NO
13909as options to configure" >&5
c982cf7d 13910echo "$as_me: error: The following required libraries were not found:
5afbeb22 13911 $MISSING
86e73516 13912Maybe some development libraries/packages are missing?
5afbeb22
JD
13913If you don't want to link with them give
13914 $WITH_NO
13915as options to configure" >&2;}
86e73516 13916 { (exit 1); exit 1; }; }
98418dba
CW
13917 fi
13918fi
13919
79011b82
NR
13920### Use -lgpm if available, unless `--with-gpm=no'.
13921HAVE_GPM=no
13922if test "${with_gpm}" != "no"; then
13923 if test "${ac_cv_header_gpm_h+set}" = set; then
13924 { echo "$as_me:$LINENO: checking for gpm.h" >&5
13925echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
13926if test "${ac_cv_header_gpm_h+set}" = set; then
13927 echo $ECHO_N "(cached) $ECHO_C" >&6
13928fi
13929{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
13930echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
13931else
13932 # Is the header compilable?
13933{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
13934echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
13935cat >conftest.$ac_ext <<_ACEOF
13936/* confdefs.h. */
13937_ACEOF
13938cat confdefs.h >>conftest.$ac_ext
13939cat >>conftest.$ac_ext <<_ACEOF
13940/* end confdefs.h. */
13941$ac_includes_default
13942#include <gpm.h>
13943_ACEOF
13944rm -f conftest.$ac_objext
13945if { (ac_try="$ac_compile"
13946case "(($ac_try" in
13947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13948 *) ac_try_echo=$ac_try;;
13949esac
13950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13951 (eval "$ac_compile") 2>conftest.er1
13952 ac_status=$?
13953 grep -v '^ *+' conftest.er1 >conftest.err
13954 rm -f conftest.er1
13955 cat conftest.err >&5
13956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13957 (exit $ac_status); } && {
13958 test -z "$ac_c_werror_flag" ||
13959 test ! -s conftest.err
13960 } && test -s conftest.$ac_objext; then
13961 ac_header_compiler=yes
13962else
13963 echo "$as_me: failed program was:" >&5
13964sed 's/^/| /' conftest.$ac_ext >&5
13965
13966 ac_header_compiler=no
13967fi
13968
13969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13970{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13971echo "${ECHO_T}$ac_header_compiler" >&6; }
13972
13973# Is the header present?
13974{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
13975echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
13976cat >conftest.$ac_ext <<_ACEOF
13977/* confdefs.h. */
13978_ACEOF
13979cat confdefs.h >>conftest.$ac_ext
13980cat >>conftest.$ac_ext <<_ACEOF
13981/* end confdefs.h. */
13982#include <gpm.h>
13983_ACEOF
13984if { (ac_try="$ac_cpp conftest.$ac_ext"
13985case "(($ac_try" in
13986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13987 *) ac_try_echo=$ac_try;;
13988esac
13989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13990 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13991 ac_status=$?
13992 grep -v '^ *+' conftest.er1 >conftest.err
13993 rm -f conftest.er1
13994 cat conftest.err >&5
13995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13996 (exit $ac_status); } >/dev/null && {
13997 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13998 test ! -s conftest.err
13999 }; then
14000 ac_header_preproc=yes
14001else
14002 echo "$as_me: failed program was:" >&5
14003sed 's/^/| /' conftest.$ac_ext >&5
14004
14005 ac_header_preproc=no
14006fi
14007
14008rm -f conftest.err conftest.$ac_ext
14009{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14010echo "${ECHO_T}$ac_header_preproc" >&6; }
14011
14012# So? What about this header?
14013case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14014 yes:no: )
14015 { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14016echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14017 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
14018echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
14019 ac_header_preproc=yes
14020 ;;
14021 no:yes:* )
14022 { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
14023echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
14024 { echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
14025echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
14026 { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
14027echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
14028 { echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
14029echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
14030 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
14031echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
14032 { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
14033echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
14034
14035 ;;
14036esac
14037{ echo "$as_me:$LINENO: checking for gpm.h" >&5
14038echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14039if test "${ac_cv_header_gpm_h+set}" = set; then
14040 echo $ECHO_N "(cached) $ECHO_C" >&6
14041else
14042 ac_cv_header_gpm_h=$ac_header_preproc
14043fi
14044{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14045echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14046
14047fi
14048if test $ac_cv_header_gpm_h = yes; then
14049 { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
14050echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
14051if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
14052 echo $ECHO_N "(cached) $ECHO_C" >&6
14053else
14054 ac_check_lib_save_LIBS=$LIBS
14055LIBS="-lgpm $LIBS"
14056cat >conftest.$ac_ext <<_ACEOF
14057/* confdefs.h. */
14058_ACEOF
14059cat confdefs.h >>conftest.$ac_ext
14060cat >>conftest.$ac_ext <<_ACEOF
14061/* end confdefs.h. */
14062
14063/* Override any GCC internal prototype to avoid an error.
14064 Use char because int might match the return type of a GCC
14065 builtin and then its argument prototype would still apply. */
14066#ifdef __cplusplus
14067extern "C"
14068#endif
14069char Gpm_Open ();
14070int
14071main ()
14072{
14073return Gpm_Open ();
14074 ;
14075 return 0;
14076}
14077_ACEOF
14078rm -f conftest.$ac_objext conftest$ac_exeext
14079if { (ac_try="$ac_link"
14080case "(($ac_try" in
14081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14082 *) ac_try_echo=$ac_try;;
14083esac
14084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14085 (eval "$ac_link") 2>conftest.er1
14086 ac_status=$?
14087 grep -v '^ *+' conftest.er1 >conftest.err
14088 rm -f conftest.er1
14089 cat conftest.err >&5
14090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14091 (exit $ac_status); } && {
14092 test -z "$ac_c_werror_flag" ||
14093 test ! -s conftest.err
14094 } && test -s conftest$ac_exeext &&
14095 $as_test_x conftest$ac_exeext; then
14096 ac_cv_lib_gpm_Gpm_Open=yes
14097else
14098 echo "$as_me: failed program was:" >&5
14099sed 's/^/| /' conftest.$ac_ext >&5
14100
14101 ac_cv_lib_gpm_Gpm_Open=no
14102fi
14103
14104rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14105 conftest$ac_exeext conftest.$ac_ext
14106LIBS=$ac_check_lib_save_LIBS
14107fi
14108{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14109echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
14110if test $ac_cv_lib_gpm_Gpm_Open = yes; then
14111 HAVE_GPM=yes
14112fi
14113
14114fi
14115
14116
14117fi
14118
14119if test "${HAVE_GPM}" = "yes"; then
14120
14121cat >>confdefs.h <<\_ACEOF
14122#define HAVE_GPM 1
14123_ACEOF
14124
14125fi
14126
cef11da2 14127if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
d6e01aa5
KL
14128 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14129echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14130if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14131 echo $ECHO_N "(cached) $ECHO_C" >&6
14132fi
d6e01aa5
KL
14133{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14134echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14135else
14136 # Is the header compilable?
d6e01aa5
KL
14137{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
14138echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
14139cat >conftest.$ac_ext <<_ACEOF
14140/* confdefs.h. */
14141_ACEOF
14142cat confdefs.h >>conftest.$ac_ext
14143cat >>conftest.$ac_ext <<_ACEOF
14144/* end confdefs.h. */
14145$ac_includes_default
14146#include <malloc/malloc.h>
14147_ACEOF
14148rm -f conftest.$ac_objext
d6e01aa5
KL
14149if { (ac_try="$ac_compile"
14150case "(($ac_try" in
14151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14152 *) ac_try_echo=$ac_try;;
14153esac
14154eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14155 (eval "$ac_compile") 2>conftest.er1
cef11da2 14156 ac_status=$?
edfaf76d
LK
14157 grep -v '^ *+' conftest.er1 >conftest.err
14158 rm -f conftest.er1
14159 cat conftest.err >&5
cef11da2 14160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14161 (exit $ac_status); } && {
14162 test -z "$ac_c_werror_flag" ||
14163 test ! -s conftest.err
14164 } && test -s conftest.$ac_objext; then
cef11da2
ST
14165 ac_header_compiler=yes
14166else
14167 echo "$as_me: failed program was:" >&5
14168sed 's/^/| /' conftest.$ac_ext >&5
14169
d6e01aa5 14170 ac_header_compiler=no
cef11da2 14171fi
d6e01aa5
KL
14172
14173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14174{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14175echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14176
14177# Is the header present?
d6e01aa5
KL
14178{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
14179echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
14180cat >conftest.$ac_ext <<_ACEOF
14181/* confdefs.h. */
14182_ACEOF
14183cat confdefs.h >>conftest.$ac_ext
14184cat >>conftest.$ac_ext <<_ACEOF
14185/* end confdefs.h. */
14186#include <malloc/malloc.h>
14187_ACEOF
d6e01aa5
KL
14188if { (ac_try="$ac_cpp conftest.$ac_ext"
14189case "(($ac_try" in
14190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14191 *) ac_try_echo=$ac_try;;
14192esac
14193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14194 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14195 ac_status=$?
14196 grep -v '^ *+' conftest.er1 >conftest.err
14197 rm -f conftest.er1
14198 cat conftest.err >&5
14199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14200 (exit $ac_status); } >/dev/null && {
14201 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14202 test ! -s conftest.err
14203 }; then
cef11da2
ST
14204 ac_header_preproc=yes
14205else
14206 echo "$as_me: failed program was:" >&5
14207sed 's/^/| /' conftest.$ac_ext >&5
14208
14209 ac_header_preproc=no
14210fi
d6e01aa5 14211
cef11da2 14212rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
14213{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14214echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14215
14216# So? What about this header?
edfaf76d
LK
14217case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14218 yes:no: )
cef11da2
ST
14219 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14220echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14221 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14222echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
14223 ac_header_preproc=yes
cef11da2 14224 ;;
edfaf76d 14225 no:yes:* )
cef11da2
ST
14226 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14227echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14228 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14229echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14230 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14231echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14232 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14233echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
14234 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14235echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14236 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14237echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 14238
cef11da2
ST
14239 ;;
14240esac
d6e01aa5
KL
14241{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14242echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14243if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14244 echo $ECHO_N "(cached) $ECHO_C" >&6
14245else
14246 ac_cv_header_malloc_malloc_h=$ac_header_preproc
14247fi
d6e01aa5
KL
14248{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14249echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14250
14251fi
14252if test $ac_cv_header_malloc_malloc_h = yes; then
14253
14254cat >>confdefs.h <<\_ACEOF
14255#define HAVE_MALLOC_MALLOC_H 1
14256_ACEOF
14257
14258fi
14259
14260
14261
5d6da11e 14262### Use Mac OS X Carbon API to implement GUI.
e0f712ba 14263if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 14264
c0d27fcc 14265cat >>confdefs.h <<\_ACEOF
e0f712ba 14266#define HAVE_CARBON 1
c0d27fcc 14267_ACEOF
e0f712ba 14268
6a3a24fa
JD
14269 ## Specify the install directory
14270 carbon_appdir=
14271 if test "${carbon_appdir_x}" != ""; then
14272 case ${carbon_appdir_x} in
14273 y | ye | yes) carbon_appdir=/Applications ;;
14274 * ) carbon_appdir=${carbon_appdir_x} ;;
14275 esac
14276 fi
8f417b3b
AS
14277 # We also have mouse menus.
14278 HAVE_MENUS=yes
e0f712ba
AC
14279fi
14280
98418dba
CW
14281### Use session management (-lSM -lICE) if available
14282HAVE_X_SM=no
14283if test "${HAVE_X11}" = "yes"; then
c0d27fcc 14284 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
d6e01aa5
KL
14285 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14286echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
14287if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14288 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14289fi
d6e01aa5
KL
14290{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14291echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 14292else
c0d27fcc 14293 # Is the header compilable?
d6e01aa5
KL
14294{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
14295echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 14296cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14297/* confdefs.h. */
14298_ACEOF
14299cat confdefs.h >>conftest.$ac_ext
14300cat >>conftest.$ac_ext <<_ACEOF
14301/* end confdefs.h. */
c0d27fcc
MR
14302$ac_includes_default
14303#include <X11/SM/SMlib.h>
14304_ACEOF
14305rm -f conftest.$ac_objext
d6e01aa5
KL
14306if { (ac_try="$ac_compile"
14307case "(($ac_try" in
14308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14309 *) ac_try_echo=$ac_try;;
14310esac
14311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14312 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14313 ac_status=$?
edfaf76d
LK
14314 grep -v '^ *+' conftest.er1 >conftest.err
14315 rm -f conftest.er1
14316 cat conftest.err >&5
c0d27fcc 14317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14318 (exit $ac_status); } && {
14319 test -z "$ac_c_werror_flag" ||
14320 test ! -s conftest.err
14321 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14322 ac_header_compiler=yes
14323else
14324 echo "$as_me: failed program was:" >&5
19650fd6
AS
14325sed 's/^/| /' conftest.$ac_ext >&5
14326
d6e01aa5 14327 ac_header_compiler=no
c0d27fcc 14328fi
d6e01aa5
KL
14329
14330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14331{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14332echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14333
14334# Is the header present?
d6e01aa5
KL
14335{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
14336echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 14337cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14338/* confdefs.h. */
14339_ACEOF
14340cat confdefs.h >>conftest.$ac_ext
14341cat >>conftest.$ac_ext <<_ACEOF
14342/* end confdefs.h. */
98418dba
CW
14343#include <X11/SM/SMlib.h>
14344_ACEOF
d6e01aa5
KL
14345if { (ac_try="$ac_cpp conftest.$ac_ext"
14346case "(($ac_try" in
14347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14348 *) ac_try_echo=$ac_try;;
14349esac
14350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14351 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14352 ac_status=$?
6bae0ccf 14353 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14354 rm -f conftest.er1
14355 cat conftest.err >&5
c0d27fcc 14356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14357 (exit $ac_status); } >/dev/null && {
14358 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14359 test ! -s conftest.err
14360 }; then
c0d27fcc 14361 ac_header_preproc=yes
98418dba
CW
14362else
14363 echo "$as_me: failed program was:" >&5
19650fd6
AS
14364sed 's/^/| /' conftest.$ac_ext >&5
14365
c0d27fcc 14366 ac_header_preproc=no
98418dba 14367fi
d6e01aa5 14368
98418dba 14369rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
14370{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14371echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14372
14373# So? What about this header?
edfaf76d
LK
14374case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14375 yes:no: )
c0d27fcc
MR
14376 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14377echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14378 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
14379echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
14380 ac_header_preproc=yes
19650fd6 14381 ;;
edfaf76d 14382 no:yes:* )
c0d27fcc
MR
14383 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
14384echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14385 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
14386echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
14387 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
14388echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
14389 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
14390echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14391 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 14392echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14393 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
14394echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 14395
19650fd6 14396 ;;
c0d27fcc 14397esac
d6e01aa5
KL
14398{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14399echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14400if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14401 echo $ECHO_N "(cached) $ECHO_C" >&6
14402else
14403 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 14404fi
d6e01aa5
KL
14405{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14406echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
14407
14408fi
98418dba 14409if test $ac_cv_header_X11_SM_SMlib_h = yes; then
d6e01aa5
KL
14410 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
14411echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 14412if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 14413 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14414else
503d2be0 14415 ac_check_lib_save_LIBS=$LIBS
1660500f 14416LIBS="-lSM -lICE $LIBS"
503d2be0 14417cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14418/* confdefs.h. */
14419_ACEOF
14420cat confdefs.h >>conftest.$ac_ext
14421cat >>conftest.$ac_ext <<_ACEOF
14422/* end confdefs.h. */
503d2be0 14423
d6e01aa5
KL
14424/* Override any GCC internal prototype to avoid an error.
14425 Use char because int might match the return type of a GCC
14426 builtin and then its argument prototype would still apply. */
503d2be0
AS
14427#ifdef __cplusplus
14428extern "C"
14429#endif
98418dba 14430char SmcOpenConnection ();
503d2be0
AS
14431int
14432main ()
14433{
d6e01aa5 14434return SmcOpenConnection ();
503d2be0
AS
14435 ;
14436 return 0;
14437}
14438_ACEOF
14439rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14440if { (ac_try="$ac_link"
14441case "(($ac_try" in
14442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14443 *) ac_try_echo=$ac_try;;
14444esac
14445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14446 (eval "$ac_link") 2>conftest.er1
503d2be0 14447 ac_status=$?
edfaf76d
LK
14448 grep -v '^ *+' conftest.er1 >conftest.err
14449 rm -f conftest.er1
14450 cat conftest.err >&5
c0d27fcc 14451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14452 (exit $ac_status); } && {
14453 test -z "$ac_c_werror_flag" ||
14454 test ! -s conftest.err
14455 } && test -s conftest$ac_exeext &&
14456 $as_test_x conftest$ac_exeext; then
98418dba 14457 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
14458else
14459 echo "$as_me: failed program was:" >&5
19650fd6
AS
14460sed 's/^/| /' conftest.$ac_ext >&5
14461
d6e01aa5 14462 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 14463fi
d6e01aa5
KL
14464
14465rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14466 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14467LIBS=$ac_check_lib_save_LIBS
14468fi
d6e01aa5
KL
14469{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
14470echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
14471if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
14472 HAVE_X_SM=yes
73b77ee5
GM
14473fi
14474
73b77ee5 14475fi
73b77ee5 14476
c0d27fcc
MR
14477
14478
98418dba 14479 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 14480
c0d27fcc 14481cat >>confdefs.h <<\_ACEOF
98418dba 14482#define HAVE_X_SM 1
c0d27fcc 14483_ACEOF
73b77ee5 14484
98418dba
CW
14485 case "$LIBS" in
14486 *-lSM*) ;;
14487 *) LIBS="-lSM -lICE $LIBS" ;;
14488 esac
73b77ee5 14489 fi
98418dba 14490fi
73b77ee5 14491
98418dba 14492# If netdb.h doesn't declare h_errno, we must declare it by hand.
d6e01aa5
KL
14493{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
14494echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
14495if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
14496 echo $ECHO_N "(cached) $ECHO_C" >&6
14497else
14498 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14499/* confdefs.h. */
14500_ACEOF
14501cat confdefs.h >>conftest.$ac_ext
14502cat >>conftest.$ac_ext <<_ACEOF
14503/* end confdefs.h. */
98418dba 14504#include <netdb.h>
503d2be0
AS
14505int
14506main ()
14507{
98418dba 14508return h_errno;
503d2be0
AS
14509 ;
14510 return 0;
14511}
14512_ACEOF
14513rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14514if { (ac_try="$ac_link"
14515case "(($ac_try" in
14516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14517 *) ac_try_echo=$ac_try;;
14518esac
14519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14520 (eval "$ac_link") 2>conftest.er1
503d2be0 14521 ac_status=$?
edfaf76d
LK
14522 grep -v '^ *+' conftest.er1 >conftest.err
14523 rm -f conftest.er1
14524 cat conftest.err >&5
c0d27fcc 14525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14526 (exit $ac_status); } && {
14527 test -z "$ac_c_werror_flag" ||
14528 test ! -s conftest.err
14529 } && test -s conftest$ac_exeext &&
14530 $as_test_x conftest$ac_exeext; then
98418dba 14531 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 14532else
503d2be0 14533 echo "$as_me: failed program was:" >&5
19650fd6
AS
14534sed 's/^/| /' conftest.$ac_ext >&5
14535
d6e01aa5 14536 emacs_cv_netdb_declares_h_errno=no
73b77ee5 14537fi
d6e01aa5
KL
14538
14539rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14540 conftest$ac_exeext conftest.$ac_ext
98418dba 14541fi
d6e01aa5
KL
14542{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
14543echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 14544if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 14545
c0d27fcc 14546cat >>confdefs.h <<\_ACEOF
98418dba 14547#define HAVE_H_ERRNO 1
c0d27fcc 14548_ACEOF
73b77ee5 14549
98418dba
CW
14550fi
14551
14552# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14553# for constant arguments. Useless!
d6e01aa5
KL
14554{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
14555echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
14556if test "${ac_cv_working_alloca_h+set}" = set; then
14557 echo $ECHO_N "(cached) $ECHO_C" >&6
14558else
14559 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14560/* confdefs.h. */
14561_ACEOF
14562cat confdefs.h >>conftest.$ac_ext
14563cat >>conftest.$ac_ext <<_ACEOF
14564/* end confdefs.h. */
98418dba 14565#include <alloca.h>
503d2be0
AS
14566int
14567main ()
14568{
98418dba 14569char *p = (char *) alloca (2 * sizeof (int));
d6e01aa5 14570 if (p) return 0;
503d2be0
AS
14571 ;
14572 return 0;
14573}
14574_ACEOF
14575rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14576if { (ac_try="$ac_link"
14577case "(($ac_try" in
14578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14579 *) ac_try_echo=$ac_try;;
14580esac
14581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14582 (eval "$ac_link") 2>conftest.er1
503d2be0 14583 ac_status=$?
edfaf76d
LK
14584 grep -v '^ *+' conftest.er1 >conftest.err
14585 rm -f conftest.er1
14586 cat conftest.err >&5
c0d27fcc 14587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14588 (exit $ac_status); } && {
14589 test -z "$ac_c_werror_flag" ||
14590 test ! -s conftest.err
14591 } && test -s conftest$ac_exeext &&
14592 $as_test_x conftest$ac_exeext; then
98418dba 14593 ac_cv_working_alloca_h=yes
73b77ee5 14594else
503d2be0 14595 echo "$as_me: failed program was:" >&5
19650fd6
AS
14596sed 's/^/| /' conftest.$ac_ext >&5
14597
d6e01aa5 14598 ac_cv_working_alloca_h=no
73b77ee5 14599fi
d6e01aa5
KL
14600
14601rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14602 conftest$ac_exeext conftest.$ac_ext
98418dba 14603fi
d6e01aa5
KL
14604{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
14605echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 14606if test $ac_cv_working_alloca_h = yes; then
73b77ee5 14607
c0d27fcc 14608cat >>confdefs.h <<\_ACEOF
98418dba 14609#define HAVE_ALLOCA_H 1
c0d27fcc 14610_ACEOF
98418dba
CW
14611
14612fi
14613
d6e01aa5
KL
14614{ echo "$as_me:$LINENO: checking for alloca" >&5
14615echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
14616if test "${ac_cv_func_alloca_works+set}" = set; then
14617 echo $ECHO_N "(cached) $ECHO_C" >&6
14618else
503d2be0 14619 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14620/* confdefs.h. */
14621_ACEOF
14622cat confdefs.h >>conftest.$ac_ext
14623cat >>conftest.$ac_ext <<_ACEOF
14624/* end confdefs.h. */
98418dba
CW
14625#ifdef __GNUC__
14626# define alloca __builtin_alloca
14627#else
14628# ifdef _MSC_VER
14629# include <malloc.h>
14630# define alloca _alloca
14631# else
d6e01aa5 14632# ifdef HAVE_ALLOCA_H
98418dba
CW
14633# include <alloca.h>
14634# else
14635# ifdef _AIX
14636 #pragma alloca
14637# else
14638# ifndef alloca /* predefined by HP cc +Olibcalls */
14639char *alloca ();
14640# endif
14641# endif
14642# endif
14643# endif
14644#endif
14645
503d2be0
AS
14646int
14647main ()
14648{
98418dba 14649char *p = (char *) alloca (1);
d6e01aa5 14650 if (p) return 0;
503d2be0
AS
14651 ;
14652 return 0;
14653}
14654_ACEOF
14655rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14656if { (ac_try="$ac_link"
14657case "(($ac_try" in
14658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14659 *) ac_try_echo=$ac_try;;
14660esac
14661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14662 (eval "$ac_link") 2>conftest.er1
503d2be0 14663 ac_status=$?
edfaf76d
LK
14664 grep -v '^ *+' conftest.er1 >conftest.err
14665 rm -f conftest.er1
14666 cat conftest.err >&5
c0d27fcc 14667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14668 (exit $ac_status); } && {
14669 test -z "$ac_c_werror_flag" ||
14670 test ! -s conftest.err
14671 } && test -s conftest$ac_exeext &&
14672 $as_test_x conftest$ac_exeext; then
98418dba 14673 ac_cv_func_alloca_works=yes
ac95a621 14674else
503d2be0 14675 echo "$as_me: failed program was:" >&5
19650fd6
AS
14676sed 's/^/| /' conftest.$ac_ext >&5
14677
d6e01aa5 14678 ac_cv_func_alloca_works=no
ac95a621 14679fi
d6e01aa5
KL
14680
14681rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14682 conftest$ac_exeext conftest.$ac_ext
98418dba 14683fi
d6e01aa5
KL
14684{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
14685echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 14686
98418dba
CW
14687if test $ac_cv_func_alloca_works = yes; then
14688
c0d27fcc 14689cat >>confdefs.h <<\_ACEOF
98418dba 14690#define HAVE_ALLOCA 1
c0d27fcc 14691_ACEOF
98418dba
CW
14692
14693else
14694 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
14695# that cause trouble. Some versions do not even contain alloca or
14696# contain a buggy version. If you still want to use their alloca,
14697# use ar to extract alloca.o from them instead of compiling alloca.c.
14698
d6e01aa5 14699ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 14700
c0d27fcc 14701cat >>confdefs.h <<\_ACEOF
98418dba 14702#define C_ALLOCA 1
c0d27fcc 14703_ACEOF
98418dba 14704
c0d27fcc 14705
d6e01aa5
KL
14706{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
14707echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
14708if test "${ac_cv_os_cray+set}" = set; then
14709 echo $ECHO_N "(cached) $ECHO_C" >&6
14710else
14711 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14712/* confdefs.h. */
14713_ACEOF
14714cat confdefs.h >>conftest.$ac_ext
14715cat >>conftest.$ac_ext <<_ACEOF
14716/* end confdefs.h. */
d6e01aa5 14717#if defined CRAY && ! defined CRAY2
98418dba
CW
14718webecray
14719#else
14720wenotbecray
14721#endif
14722
14723_ACEOF
14724if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 14725 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
14726 ac_cv_os_cray=yes
14727else
14728 ac_cv_os_cray=no
14729fi
14730rm -f conftest*
ac95a621 14731
98418dba 14732fi
d6e01aa5
KL
14733{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
14734echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
14735if test $ac_cv_os_cray = yes; then
14736 for ac_func in _getb67 GETB67 getb67; do
14737 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
14738{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14739echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14740if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 14741 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14742else
503d2be0 14743 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14744/* confdefs.h. */
14745_ACEOF
14746cat confdefs.h >>conftest.$ac_ext
14747cat >>conftest.$ac_ext <<_ACEOF
14748/* end confdefs.h. */
edfaf76d
LK
14749/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14750 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14751#define $ac_func innocuous_$ac_func
14752
73b77ee5 14753/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14754 which can conflict with char $ac_func (); below.
14755 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14756 <limits.h> exists even on freestanding compilers. */
edfaf76d 14757
19650fd6
AS
14758#ifdef __STDC__
14759# include <limits.h>
14760#else
14761# include <assert.h>
14762#endif
edfaf76d
LK
14763
14764#undef $ac_func
14765
d6e01aa5
KL
14766/* Override any GCC internal prototype to avoid an error.
14767 Use char because int might match the return type of a GCC
14768 builtin and then its argument prototype would still apply. */
503d2be0
AS
14769#ifdef __cplusplus
14770extern "C"
14771#endif
503d2be0 14772char $ac_func ();
73b77ee5
GM
14773/* The GNU C library defines this for functions which it implements
14774 to always fail with ENOSYS. Some functions are actually named
14775 something starting with __ and the normal name is an alias. */
d6e01aa5 14776#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 14777choke me
73b77ee5
GM
14778#endif
14779
19650fd6
AS
14780int
14781main ()
14782{
d6e01aa5 14783return $ac_func ();
503d2be0
AS
14784 ;
14785 return 0;
14786}
14787_ACEOF
14788rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14789if { (ac_try="$ac_link"
14790case "(($ac_try" in
14791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14792 *) ac_try_echo=$ac_try;;
14793esac
14794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14795 (eval "$ac_link") 2>conftest.er1
503d2be0 14796 ac_status=$?
edfaf76d
LK
14797 grep -v '^ *+' conftest.er1 >conftest.err
14798 rm -f conftest.er1
14799 cat conftest.err >&5
c0d27fcc 14800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14801 (exit $ac_status); } && {
14802 test -z "$ac_c_werror_flag" ||
14803 test ! -s conftest.err
14804 } && test -s conftest$ac_exeext &&
14805 $as_test_x conftest$ac_exeext; then
503d2be0
AS
14806 eval "$as_ac_var=yes"
14807else
14808 echo "$as_me: failed program was:" >&5
19650fd6
AS
14809sed 's/^/| /' conftest.$ac_ext >&5
14810
d6e01aa5 14811 eval "$as_ac_var=no"
503d2be0 14812fi
d6e01aa5
KL
14813
14814rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14815 conftest$ac_exeext conftest.$ac_ext
503d2be0 14816fi
d6e01aa5
KL
14817ac_res=`eval echo '${'$as_ac_var'}'`
14818 { echo "$as_me:$LINENO: result: $ac_res" >&5
14819echo "${ECHO_T}$ac_res" >&6; }
503d2be0 14820if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 14821
c0d27fcc 14822cat >>confdefs.h <<_ACEOF
98418dba 14823#define CRAY_STACKSEG_END $ac_func
c0d27fcc 14824_ACEOF
98418dba
CW
14825
14826 break
73b77ee5 14827fi
73b77ee5 14828
98418dba 14829 done
73b77ee5
GM
14830fi
14831
d6e01aa5
KL
14832{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
14833echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 14834if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 14835 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
14836else
14837 if test "$cross_compiling" = yes; then
14838 ac_cv_c_stack_direction=0
73b77ee5 14839else
503d2be0 14840 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14841/* confdefs.h. */
14842_ACEOF
14843cat confdefs.h >>conftest.$ac_ext
14844cat >>conftest.$ac_ext <<_ACEOF
14845/* end confdefs.h. */
d6e01aa5 14846$ac_includes_default
503d2be0 14847int
98418dba 14848find_stack_direction ()
503d2be0 14849{
98418dba
CW
14850 static char *addr = 0;
14851 auto char dummy;
14852 if (addr == 0)
14853 {
14854 addr = &dummy;
14855 return find_stack_direction ();
14856 }
73b77ee5 14857 else
98418dba
CW
14858 return (&dummy > addr) ? 1 : -1;
14859}
ba4481b5 14860
503d2be0
AS
14861int
14862main ()
14863{
d6e01aa5 14864 return find_stack_direction () < 0;
503d2be0
AS
14865}
14866_ACEOF
98418dba 14867rm -f conftest$ac_exeext
d6e01aa5
KL
14868if { (ac_try="$ac_link"
14869case "(($ac_try" in
14870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14871 *) ac_try_echo=$ac_try;;
14872esac
14873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14874 (eval "$ac_link") 2>&5
503d2be0 14875 ac_status=$?
c0d27fcc 14876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14877 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
14878 { (case "(($ac_try" in
14879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14880 *) ac_try_echo=$ac_try;;
14881esac
14882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14883 (eval "$ac_try") 2>&5
503d2be0 14884 ac_status=$?
c0d27fcc 14885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14886 (exit $ac_status); }; }; then
98418dba 14887 ac_cv_c_stack_direction=1
ba4481b5 14888else
98418dba
CW
14889 echo "$as_me: program exited with status $ac_status" >&5
14890echo "$as_me: failed program was:" >&5
19650fd6
AS
14891sed 's/^/| /' conftest.$ac_ext >&5
14892
c0d27fcc 14893( exit $ac_status )
98418dba 14894ac_cv_c_stack_direction=-1
ba4481b5 14895fi
d6e01aa5 14896rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 14897fi
d6e01aa5
KL
14898
14899
98418dba 14900fi
d6e01aa5
KL
14901{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
14902echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 14903
c0d27fcc 14904cat >>confdefs.h <<_ACEOF
98418dba 14905#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
14906_ACEOF
14907
ba4481b5 14908
ba4481b5
DL
14909fi
14910
c0d27fcc 14911
611adb3e
GM
14912if test x"$ac_cv_func_alloca_works" != xyes; then
14913 { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
14914echo "$as_me: error: a system implementation of alloca is required " >&2;}
14915 { (exit 1); exit 1; }; }
14916fi
14917
98418dba
CW
14918# fmod, logb, and frexp are found in -lm on most systems.
14919# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
14920
d6e01aa5
KL
14921{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
14922echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 14923if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 14924 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14925else
98418dba
CW
14926 ac_check_lib_save_LIBS=$LIBS
14927LIBS="-lm $LIBS"
14928cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14929/* confdefs.h. */
14930_ACEOF
14931cat confdefs.h >>conftest.$ac_ext
14932cat >>conftest.$ac_ext <<_ACEOF
14933/* end confdefs.h. */
ba4481b5 14934
d6e01aa5
KL
14935/* Override any GCC internal prototype to avoid an error.
14936 Use char because int might match the return type of a GCC
14937 builtin and then its argument prototype would still apply. */
98418dba
CW
14938#ifdef __cplusplus
14939extern "C"
14940#endif
98418dba 14941char sqrt ();
503d2be0
AS
14942int
14943main ()
14944{
d6e01aa5 14945return sqrt ();
503d2be0
AS
14946 ;
14947 return 0;
14948}
14949_ACEOF
14950rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14951if { (ac_try="$ac_link"
14952case "(($ac_try" in
14953 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14954 *) ac_try_echo=$ac_try;;
14955esac
14956eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14957 (eval "$ac_link") 2>conftest.er1
503d2be0 14958 ac_status=$?
edfaf76d
LK
14959 grep -v '^ *+' conftest.er1 >conftest.err
14960 rm -f conftest.er1
14961 cat conftest.err >&5
c0d27fcc 14962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14963 (exit $ac_status); } && {
14964 test -z "$ac_c_werror_flag" ||
14965 test ! -s conftest.err
14966 } && test -s conftest$ac_exeext &&
14967 $as_test_x conftest$ac_exeext; then
98418dba 14968 ac_cv_lib_m_sqrt=yes
ba4481b5 14969else
503d2be0 14970 echo "$as_me: failed program was:" >&5
19650fd6
AS
14971sed 's/^/| /' conftest.$ac_ext >&5
14972
d6e01aa5 14973 ac_cv_lib_m_sqrt=no
ba4481b5 14974fi
d6e01aa5
KL
14975
14976rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14977 conftest$ac_exeext conftest.$ac_ext
98418dba 14978LIBS=$ac_check_lib_save_LIBS
ba4481b5 14979fi
d6e01aa5
KL
14980{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
14981echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 14982if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 14983 cat >>confdefs.h <<_ACEOF
98418dba 14984#define HAVE_LIBM 1
c0d27fcc 14985_ACEOF
98418dba
CW
14986
14987 LIBS="-lm $LIBS"
ba4481b5 14988
ba4481b5
DL
14989fi
14990
c0d27fcc 14991
55597d70
DL
14992# Check for mail-locking functions in a "mail" library. Probably this should
14993# have the same check as for liblockfile below.
98418dba 14994
d6e01aa5
KL
14995{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
14996echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 14997if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 14998 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14999else
98418dba
CW
15000 ac_check_lib_save_LIBS=$LIBS
15001LIBS="-lmail $LIBS"
15002cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15003/* confdefs.h. */
15004_ACEOF
15005cat confdefs.h >>conftest.$ac_ext
15006cat >>conftest.$ac_ext <<_ACEOF
15007/* end confdefs.h. */
98418dba 15008
d6e01aa5
KL
15009/* Override any GCC internal prototype to avoid an error.
15010 Use char because int might match the return type of a GCC
15011 builtin and then its argument prototype would still apply. */
98418dba
CW
15012#ifdef __cplusplus
15013extern "C"
15014#endif
98418dba 15015char maillock ();
503d2be0
AS
15016int
15017main ()
15018{
d6e01aa5 15019return maillock ();
503d2be0
AS
15020 ;
15021 return 0;
15022}
15023_ACEOF
15024rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15025if { (ac_try="$ac_link"
15026case "(($ac_try" in
15027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15028 *) ac_try_echo=$ac_try;;
15029esac
15030eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15031 (eval "$ac_link") 2>conftest.er1
503d2be0 15032 ac_status=$?
edfaf76d
LK
15033 grep -v '^ *+' conftest.er1 >conftest.err
15034 rm -f conftest.er1
15035 cat conftest.err >&5
c0d27fcc 15036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15037 (exit $ac_status); } && {
15038 test -z "$ac_c_werror_flag" ||
15039 test ! -s conftest.err
15040 } && test -s conftest$ac_exeext &&
15041 $as_test_x conftest$ac_exeext; then
98418dba 15042 ac_cv_lib_mail_maillock=yes
ba4481b5 15043else
503d2be0 15044 echo "$as_me: failed program was:" >&5
19650fd6
AS
15045sed 's/^/| /' conftest.$ac_ext >&5
15046
d6e01aa5 15047 ac_cv_lib_mail_maillock=no
ba4481b5 15048fi
d6e01aa5
KL
15049
15050rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15051 conftest$ac_exeext conftest.$ac_ext
98418dba 15052LIBS=$ac_check_lib_save_LIBS
ba4481b5 15053fi
d6e01aa5
KL
15054{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15055echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 15056if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15057 cat >>confdefs.h <<_ACEOF
98418dba 15058#define HAVE_LIBMAIL 1
c0d27fcc 15059_ACEOF
ba4481b5 15060
98418dba 15061 LIBS="-lmail $LIBS"
ba4481b5 15062
98418dba 15063fi
ba4481b5 15064
c0d27fcc 15065
d6e01aa5
KL
15066{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15067echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15068if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 15069 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15070else
503d2be0 15071 ac_check_lib_save_LIBS=$LIBS
98418dba 15072LIBS="-llockfile $LIBS"
503d2be0 15073cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15074/* confdefs.h. */
15075_ACEOF
15076cat confdefs.h >>conftest.$ac_ext
15077cat >>conftest.$ac_ext <<_ACEOF
15078/* end confdefs.h. */
503d2be0 15079
d6e01aa5
KL
15080/* Override any GCC internal prototype to avoid an error.
15081 Use char because int might match the return type of a GCC
15082 builtin and then its argument prototype would still apply. */
503d2be0
AS
15083#ifdef __cplusplus
15084extern "C"
15085#endif
98418dba 15086char maillock ();
503d2be0
AS
15087int
15088main ()
15089{
d6e01aa5 15090return maillock ();
503d2be0
AS
15091 ;
15092 return 0;
15093}
15094_ACEOF
15095rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15096if { (ac_try="$ac_link"
15097case "(($ac_try" in
15098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15099 *) ac_try_echo=$ac_try;;
15100esac
15101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15102 (eval "$ac_link") 2>conftest.er1
503d2be0 15103 ac_status=$?
edfaf76d
LK
15104 grep -v '^ *+' conftest.er1 >conftest.err
15105 rm -f conftest.er1
15106 cat conftest.err >&5
c0d27fcc 15107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15108 (exit $ac_status); } && {
15109 test -z "$ac_c_werror_flag" ||
15110 test ! -s conftest.err
15111 } && test -s conftest$ac_exeext &&
15112 $as_test_x conftest$ac_exeext; then
98418dba 15113 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
15114else
15115 echo "$as_me: failed program was:" >&5
19650fd6
AS
15116sed 's/^/| /' conftest.$ac_ext >&5
15117
d6e01aa5 15118 ac_cv_lib_lockfile_maillock=no
98418dba 15119fi
d6e01aa5
KL
15120
15121rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15122 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15123LIBS=$ac_check_lib_save_LIBS
15124fi
d6e01aa5
KL
15125{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
15126echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 15127if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 15128 cat >>confdefs.h <<_ACEOF
98418dba 15129#define HAVE_LIBLOCKFILE 1
c0d27fcc 15130_ACEOF
98418dba
CW
15131
15132 LIBS="-llockfile $LIBS"
15133
15134fi
15135
15136# If we have the shared liblockfile, assume we must use it for mail
15137# locking (e.g. Debian). If we couldn't link against liblockfile
15138# (no liblockfile.a installed), ensure that we don't need to.
15139if test "$ac_cv_lib_lockfile_maillock" = no; then
15140 # Extract the first word of "liblockfile.so", so it can be a program name with args.
15141set dummy liblockfile.so; ac_word=$2
d6e01aa5
KL
15142{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15143echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
15144if test "${ac_cv_prog_liblockfile+set}" = set; then
15145 echo $ECHO_N "(cached) $ECHO_C" >&6
15146else
15147 if test -n "$liblockfile"; then
15148 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
15149else
c0d27fcc 15150as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
15151as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
15152for as_dir in $as_dummy
c0d27fcc
MR
15153do
15154 IFS=$as_save_IFS
15155 test -z "$as_dir" && as_dir=.
15156 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 15157 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
15158 ac_cv_prog_liblockfile="yes"
15159 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15160 break 2
15161 fi
15162done
98418dba 15163done
d6e01aa5 15164IFS=$as_save_IFS
98418dba
CW
15165
15166 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 15167fi
503d2be0 15168fi
98418dba
CW
15169liblockfile=$ac_cv_prog_liblockfile
15170if test -n "$liblockfile"; then
d6e01aa5
KL
15171 { echo "$as_me:$LINENO: result: $liblockfile" >&5
15172echo "${ECHO_T}$liblockfile" >&6; }
98418dba 15173else
d6e01aa5
KL
15174 { echo "$as_me:$LINENO: result: no" >&5
15175echo "${ECHO_T}no" >&6; }
ba4481b5
DL
15176fi
15177
d6e01aa5 15178
98418dba 15179 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 15180 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
15181This probably means that movemail could lose mail.
15182There may be a \`development' package to install containing liblockfile." >&5
15183echo "$as_me: error: Shared liblockfile found but can't link against it.
15184This probably means that movemail could lose mail.
15185There may be a \`development' package to install containing liblockfile." >&2;}
15186 { (exit 1); exit 1; }; }
98418dba 15187 else :
55597d70 15188 fi
98418dba 15189fi
503d2be0 15190
98418dba
CW
15191for ac_func in touchlock
15192do
15193as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
15194{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15195echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15196if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15197 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 15198else
98418dba 15199 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15200/* confdefs.h. */
15201_ACEOF
15202cat confdefs.h >>conftest.$ac_ext
15203cat >>conftest.$ac_ext <<_ACEOF
15204/* end confdefs.h. */
edfaf76d
LK
15205/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15206 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15207#define $ac_func innocuous_$ac_func
15208
98418dba 15209/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15210 which can conflict with char $ac_func (); below.
15211 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15212 <limits.h> exists even on freestanding compilers. */
edfaf76d 15213
19650fd6
AS
15214#ifdef __STDC__
15215# include <limits.h>
15216#else
15217# include <assert.h>
15218#endif
edfaf76d
LK
15219
15220#undef $ac_func
15221
d6e01aa5
KL
15222/* Override any GCC internal prototype to avoid an error.
15223 Use char because int might match the return type of a GCC
15224 builtin and then its argument prototype would still apply. */
503d2be0
AS
15225#ifdef __cplusplus
15226extern "C"
15227#endif
98418dba 15228char $ac_func ();
98418dba
CW
15229/* The GNU C library defines this for functions which it implements
15230 to always fail with ENOSYS. Some functions are actually named
15231 something starting with __ and the normal name is an alias. */
d6e01aa5 15232#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15233choke me
cd958eb3
MB
15234#endif
15235
19650fd6
AS
15236int
15237main ()
15238{
d6e01aa5 15239return $ac_func ();
503d2be0
AS
15240 ;
15241 return 0;
15242}
15243_ACEOF
15244rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15245if { (ac_try="$ac_link"
15246case "(($ac_try" in
15247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15248 *) ac_try_echo=$ac_try;;
15249esac
15250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15251 (eval "$ac_link") 2>conftest.er1
503d2be0 15252 ac_status=$?
edfaf76d
LK
15253 grep -v '^ *+' conftest.er1 >conftest.err
15254 rm -f conftest.er1
15255 cat conftest.err >&5
c0d27fcc 15256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15257 (exit $ac_status); } && {
15258 test -z "$ac_c_werror_flag" ||
15259 test ! -s conftest.err
15260 } && test -s conftest$ac_exeext &&
15261 $as_test_x conftest$ac_exeext; then
98418dba 15262 eval "$as_ac_var=yes"
503d2be0
AS
15263else
15264 echo "$as_me: failed program was:" >&5
19650fd6
AS
15265sed 's/^/| /' conftest.$ac_ext >&5
15266
d6e01aa5 15267 eval "$as_ac_var=no"
503d2be0 15268fi
d6e01aa5
KL
15269
15270rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15271 conftest$ac_exeext conftest.$ac_ext
503d2be0 15272fi
d6e01aa5
KL
15273ac_res=`eval echo '${'$as_ac_var'}'`
15274 { echo "$as_me:$LINENO: result: $ac_res" >&5
15275echo "${ECHO_T}$ac_res" >&6; }
98418dba 15276if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15277 cat >>confdefs.h <<_ACEOF
98418dba 15278#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15279_ACEOF
457b792c 15280
457b792c 15281fi
98418dba 15282done
457b792c 15283
c0d27fcc 15284
98418dba
CW
15285for ac_header in maillock.h
15286do
15287as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
15288if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15289 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15290echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15291if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15292 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15293fi
d6e01aa5
KL
15294ac_res=`eval echo '${'$as_ac_Header'}'`
15295 { echo "$as_me:$LINENO: result: $ac_res" >&5
15296echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 15297else
c0d27fcc 15298 # Is the header compilable?
d6e01aa5
KL
15299{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15300echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15301cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15302/* confdefs.h. */
15303_ACEOF
15304cat confdefs.h >>conftest.$ac_ext
15305cat >>conftest.$ac_ext <<_ACEOF
15306/* end confdefs.h. */
c0d27fcc
MR
15307$ac_includes_default
15308#include <$ac_header>
15309_ACEOF
15310rm -f conftest.$ac_objext
d6e01aa5
KL
15311if { (ac_try="$ac_compile"
15312case "(($ac_try" in
15313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15314 *) ac_try_echo=$ac_try;;
15315esac
15316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15317 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15318 ac_status=$?
edfaf76d
LK
15319 grep -v '^ *+' conftest.er1 >conftest.err
15320 rm -f conftest.er1
15321 cat conftest.err >&5
c0d27fcc 15322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15323 (exit $ac_status); } && {
15324 test -z "$ac_c_werror_flag" ||
15325 test ! -s conftest.err
15326 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15327 ac_header_compiler=yes
15328else
15329 echo "$as_me: failed program was:" >&5
19650fd6
AS
15330sed 's/^/| /' conftest.$ac_ext >&5
15331
d6e01aa5 15332 ac_header_compiler=no
c0d27fcc 15333fi
d6e01aa5
KL
15334
15335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15336{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15337echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15338
15339# Is the header present?
d6e01aa5
KL
15340{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15341echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15342cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15343/* confdefs.h. */
15344_ACEOF
15345cat confdefs.h >>conftest.$ac_ext
15346cat >>conftest.$ac_ext <<_ACEOF
15347/* end confdefs.h. */
98418dba 15348#include <$ac_header>
503d2be0 15349_ACEOF
d6e01aa5
KL
15350if { (ac_try="$ac_cpp conftest.$ac_ext"
15351case "(($ac_try" in
15352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15353 *) ac_try_echo=$ac_try;;
15354esac
15355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15356 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15357 ac_status=$?
6bae0ccf 15358 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15359 rm -f conftest.er1
15360 cat conftest.err >&5
c0d27fcc 15361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15362 (exit $ac_status); } >/dev/null && {
15363 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15364 test ! -s conftest.err
15365 }; then
c0d27fcc 15366 ac_header_preproc=yes
98418dba
CW
15367else
15368 echo "$as_me: failed program was:" >&5
19650fd6
AS
15369sed 's/^/| /' conftest.$ac_ext >&5
15370
c0d27fcc 15371 ac_header_preproc=no
503d2be0 15372fi
d6e01aa5 15373
98418dba 15374rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
15375{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15376echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15377
15378# So? What about this header?
edfaf76d
LK
15379case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15380 yes:no: )
c0d27fcc
MR
15381 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15382echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15383 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15384echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15385 ac_header_preproc=yes
19650fd6 15386 ;;
edfaf76d 15387 no:yes:* )
c0d27fcc
MR
15388 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15389echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15390 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15391echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15392 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15393echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15394 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15395echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15396 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15397echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15398 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15399echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 15400
19650fd6 15401 ;;
c0d27fcc 15402esac
d6e01aa5
KL
15403{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15404echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15405if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15406 echo $ECHO_N "(cached) $ECHO_C" >&6
15407else
edfaf76d 15408 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 15409fi
d6e01aa5
KL
15410ac_res=`eval echo '${'$as_ac_Header'}'`
15411 { echo "$as_me:$LINENO: result: $ac_res" >&5
15412echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15413
15414fi
98418dba 15415if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15416 cat >>confdefs.h <<_ACEOF
98418dba 15417#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15418_ACEOF
48d4b120 15419
ba4481b5 15420fi
c0d27fcc 15421
98418dba
CW
15422done
15423
c0d27fcc
MR
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
22044edf
DL
15479
15480
c0d27fcc 15481
b0e44248
RB
15482
15483
973a76b1
DL
15484
15485
15486
cd958eb3 15487
25ca0bca 15488
ea92fc9f 15489
e2fcf543 15490
c0d27fcc
MR
15491
15492
98418dba 15493for ac_func in gethostname getdomainname dup2 \
e2fcf543 15494rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
bc3512d0 15495random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
98418dba 15496strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 15497utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
15498__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
15499sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 15500gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
4489ece2 15501memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
15502do
15503as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
15504{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15505echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15506if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15507 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15508else
503d2be0 15509 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15510/* confdefs.h. */
15511_ACEOF
15512cat confdefs.h >>conftest.$ac_ext
15513cat >>conftest.$ac_ext <<_ACEOF
15514/* end confdefs.h. */
edfaf76d
LK
15515/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15516 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15517#define $ac_func innocuous_$ac_func
15518
98418dba 15519/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15520 which can conflict with char $ac_func (); below.
15521 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15522 <limits.h> exists even on freestanding compilers. */
edfaf76d 15523
19650fd6
AS
15524#ifdef __STDC__
15525# include <limits.h>
15526#else
15527# include <assert.h>
15528#endif
edfaf76d
LK
15529
15530#undef $ac_func
15531
d6e01aa5
KL
15532/* Override any GCC internal prototype to avoid an error.
15533 Use char because int might match the return type of a GCC
15534 builtin and then its argument prototype would still apply. */
503d2be0
AS
15535#ifdef __cplusplus
15536extern "C"
15537#endif
98418dba 15538char $ac_func ();
98418dba
CW
15539/* The GNU C library defines this for functions which it implements
15540 to always fail with ENOSYS. Some functions are actually named
15541 something starting with __ and the normal name is an alias. */
d6e01aa5 15542#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15543choke me
98418dba
CW
15544#endif
15545
19650fd6
AS
15546int
15547main ()
15548{
d6e01aa5 15549return $ac_func ();
503d2be0
AS
15550 ;
15551 return 0;
15552}
15553_ACEOF
15554rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15555if { (ac_try="$ac_link"
15556case "(($ac_try" in
15557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15558 *) ac_try_echo=$ac_try;;
15559esac
15560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15561 (eval "$ac_link") 2>conftest.er1
503d2be0 15562 ac_status=$?
edfaf76d
LK
15563 grep -v '^ *+' conftest.er1 >conftest.err
15564 rm -f conftest.er1
15565 cat conftest.err >&5
c0d27fcc 15566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15567 (exit $ac_status); } && {
15568 test -z "$ac_c_werror_flag" ||
15569 test ! -s conftest.err
15570 } && test -s conftest$ac_exeext &&
15571 $as_test_x conftest$ac_exeext; then
98418dba 15572 eval "$as_ac_var=yes"
503d2be0
AS
15573else
15574 echo "$as_me: failed program was:" >&5
19650fd6
AS
15575sed 's/^/| /' conftest.$ac_ext >&5
15576
d6e01aa5 15577 eval "$as_ac_var=no"
503d2be0 15578fi
d6e01aa5
KL
15579
15580rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15581 conftest$ac_exeext conftest.$ac_ext
ba4481b5 15582fi
d6e01aa5
KL
15583ac_res=`eval echo '${'$as_ac_var'}'`
15584 { echo "$as_me:$LINENO: result: $ac_res" >&5
15585echo "${ECHO_T}$ac_res" >&6; }
98418dba 15586if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15587 cat >>confdefs.h <<_ACEOF
98418dba 15588#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15589_ACEOF
ba4481b5 15590
ba4481b5 15591fi
98418dba 15592done
ba4481b5 15593
c0d27fcc
MR
15594
15595
98418dba
CW
15596for ac_header in sys/un.h
15597do
15598as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
15599if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15600 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15601echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15602if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 15603 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15604fi
d6e01aa5
KL
15605ac_res=`eval echo '${'$as_ac_Header'}'`
15606 { echo "$as_me:$LINENO: result: $ac_res" >&5
15607echo "${ECHO_T}$ac_res" >&6; }
98418dba 15608else
c0d27fcc 15609 # Is the header compilable?
d6e01aa5
KL
15610{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15611echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15612cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15613/* confdefs.h. */
15614_ACEOF
15615cat confdefs.h >>conftest.$ac_ext
15616cat >>conftest.$ac_ext <<_ACEOF
15617/* end confdefs.h. */
c0d27fcc
MR
15618$ac_includes_default
15619#include <$ac_header>
15620_ACEOF
15621rm -f conftest.$ac_objext
d6e01aa5
KL
15622if { (ac_try="$ac_compile"
15623case "(($ac_try" in
15624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15625 *) ac_try_echo=$ac_try;;
15626esac
15627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15628 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15629 ac_status=$?
edfaf76d
LK
15630 grep -v '^ *+' conftest.er1 >conftest.err
15631 rm -f conftest.er1
15632 cat conftest.err >&5
c0d27fcc 15633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15634 (exit $ac_status); } && {
15635 test -z "$ac_c_werror_flag" ||
15636 test ! -s conftest.err
15637 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15638 ac_header_compiler=yes
15639else
15640 echo "$as_me: failed program was:" >&5
19650fd6
AS
15641sed 's/^/| /' conftest.$ac_ext >&5
15642
d6e01aa5 15643 ac_header_compiler=no
c0d27fcc 15644fi
d6e01aa5
KL
15645
15646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15647{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15648echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15649
15650# Is the header present?
d6e01aa5
KL
15651{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15652echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15653cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15654/* confdefs.h. */
15655_ACEOF
15656cat confdefs.h >>conftest.$ac_ext
15657cat >>conftest.$ac_ext <<_ACEOF
15658/* end confdefs.h. */
98418dba 15659#include <$ac_header>
503d2be0 15660_ACEOF
d6e01aa5
KL
15661if { (ac_try="$ac_cpp conftest.$ac_ext"
15662case "(($ac_try" in
15663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15664 *) ac_try_echo=$ac_try;;
15665esac
15666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15667 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15668 ac_status=$?
6bae0ccf 15669 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15670 rm -f conftest.er1
15671 cat conftest.err >&5
c0d27fcc 15672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15673 (exit $ac_status); } >/dev/null && {
15674 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15675 test ! -s conftest.err
15676 }; then
c0d27fcc 15677 ac_header_preproc=yes
ba4481b5 15678else
503d2be0 15679 echo "$as_me: failed program was:" >&5
19650fd6
AS
15680sed 's/^/| /' conftest.$ac_ext >&5
15681
c0d27fcc 15682 ac_header_preproc=no
ba4481b5 15683fi
d6e01aa5 15684
503d2be0 15685rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
15686{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15687echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15688
15689# So? What about this header?
edfaf76d
LK
15690case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15691 yes:no: )
c0d27fcc
MR
15692 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15693echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15694 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15695echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15696 ac_header_preproc=yes
19650fd6 15697 ;;
edfaf76d 15698 no:yes:* )
c0d27fcc
MR
15699 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15700echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15701 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15702echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15703 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15704echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15705 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15706echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15707 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15708echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15709 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15710echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 15711
19650fd6 15712 ;;
c0d27fcc 15713esac
d6e01aa5
KL
15714{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15715echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15716if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15717 echo $ECHO_N "(cached) $ECHO_C" >&6
15718else
edfaf76d 15719 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 15720fi
d6e01aa5
KL
15721ac_res=`eval echo '${'$as_ac_Header'}'`
15722 { echo "$as_me:$LINENO: result: $ac_res" >&5
15723echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15724
15725fi
925c2f3f 15726if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15727 cat >>confdefs.h <<_ACEOF
925c2f3f 15728#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15729_ACEOF
503d2be0 15730
925c2f3f 15731fi
c0d27fcc 15732
925c2f3f
EZ
15733done
15734
c0d27fcc
MR
15735
15736
15737
edfaf76d 15738
d6e01aa5
KL
15739
15740for ac_header in $ac_header_list
925c2f3f
EZ
15741do
15742as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
15743if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15744 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15745echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15746if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 15747 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15748fi
d6e01aa5
KL
15749ac_res=`eval echo '${'$as_ac_Header'}'`
15750 { echo "$as_me:$LINENO: result: $ac_res" >&5
15751echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 15752else
c0d27fcc 15753 # Is the header compilable?
d6e01aa5
KL
15754{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15755echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15756cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15757/* confdefs.h. */
15758_ACEOF
15759cat confdefs.h >>conftest.$ac_ext
15760cat >>conftest.$ac_ext <<_ACEOF
15761/* end confdefs.h. */
c0d27fcc
MR
15762$ac_includes_default
15763#include <$ac_header>
15764_ACEOF
15765rm -f conftest.$ac_objext
d6e01aa5
KL
15766if { (ac_try="$ac_compile"
15767case "(($ac_try" in
15768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15769 *) ac_try_echo=$ac_try;;
15770esac
15771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15772 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15773 ac_status=$?
edfaf76d
LK
15774 grep -v '^ *+' conftest.er1 >conftest.err
15775 rm -f conftest.er1
15776 cat conftest.err >&5
c0d27fcc 15777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15778 (exit $ac_status); } && {
15779 test -z "$ac_c_werror_flag" ||
15780 test ! -s conftest.err
15781 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15782 ac_header_compiler=yes
15783else
15784 echo "$as_me: failed program was:" >&5
19650fd6
AS
15785sed 's/^/| /' conftest.$ac_ext >&5
15786
d6e01aa5 15787 ac_header_compiler=no
c0d27fcc 15788fi
d6e01aa5
KL
15789
15790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15791{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15792echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15793
15794# Is the header present?
d6e01aa5
KL
15795{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15796echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15797cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15798/* confdefs.h. */
15799_ACEOF
15800cat confdefs.h >>conftest.$ac_ext
15801cat >>conftest.$ac_ext <<_ACEOF
15802/* end confdefs.h. */
98418dba 15803#include <$ac_header>
503d2be0 15804_ACEOF
d6e01aa5
KL
15805if { (ac_try="$ac_cpp conftest.$ac_ext"
15806case "(($ac_try" in
15807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15808 *) ac_try_echo=$ac_try;;
15809esac
15810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15811 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15812 ac_status=$?
6bae0ccf 15813 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15814 rm -f conftest.er1
15815 cat conftest.err >&5
c0d27fcc 15816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15817 (exit $ac_status); } >/dev/null && {
15818 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15819 test ! -s conftest.err
15820 }; then
c0d27fcc 15821 ac_header_preproc=yes
98418dba
CW
15822else
15823 echo "$as_me: failed program was:" >&5
19650fd6
AS
15824sed 's/^/| /' conftest.$ac_ext >&5
15825
c0d27fcc 15826 ac_header_preproc=no
98418dba 15827fi
d6e01aa5 15828
98418dba 15829rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
15830{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15831echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15832
15833# So? What about this header?
edfaf76d
LK
15834case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15835 yes:no: )
c0d27fcc
MR
15836 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15837echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15838 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15839echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15840 ac_header_preproc=yes
19650fd6 15841 ;;
edfaf76d 15842 no:yes:* )
c0d27fcc
MR
15843 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15844echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15845 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15846echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15847 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15848echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15849 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15850echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15851 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15852echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15853 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15854echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 15855
19650fd6 15856 ;;
c0d27fcc 15857esac
d6e01aa5
KL
15858{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15859echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15860if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15861 echo $ECHO_N "(cached) $ECHO_C" >&6
15862else
edfaf76d 15863 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 15864fi
d6e01aa5
KL
15865ac_res=`eval echo '${'$as_ac_Header'}'`
15866 { echo "$as_me:$LINENO: result: $ac_res" >&5
15867echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15868
15869fi
98418dba 15870if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15871 cat >>confdefs.h <<_ACEOF
98418dba 15872#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15873_ACEOF
98418dba
CW
15874
15875fi
c0d27fcc 15876
98418dba
CW
15877done
15878
c0d27fcc 15879
d6e01aa5
KL
15880
15881
15882
15883
15884
15885
15886
15887for ac_func in $ac_func_list
98418dba
CW
15888do
15889as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
15890{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15891echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15892if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15893 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15894else
98418dba 15895 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15896/* confdefs.h. */
15897_ACEOF
15898cat confdefs.h >>conftest.$ac_ext
15899cat >>conftest.$ac_ext <<_ACEOF
15900/* end confdefs.h. */
edfaf76d
LK
15901/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15902 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15903#define $ac_func innocuous_$ac_func
15904
98418dba 15905/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15906 which can conflict with char $ac_func (); below.
15907 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15908 <limits.h> exists even on freestanding compilers. */
edfaf76d 15909
19650fd6
AS
15910#ifdef __STDC__
15911# include <limits.h>
15912#else
15913# include <assert.h>
15914#endif
edfaf76d
LK
15915
15916#undef $ac_func
15917
d6e01aa5
KL
15918/* Override any GCC internal prototype to avoid an error.
15919 Use char because int might match the return type of a GCC
15920 builtin and then its argument prototype would still apply. */
503d2be0
AS
15921#ifdef __cplusplus
15922extern "C"
15923#endif
98418dba 15924char $ac_func ();
98418dba
CW
15925/* The GNU C library defines this for functions which it implements
15926 to always fail with ENOSYS. Some functions are actually named
15927 something starting with __ and the normal name is an alias. */
d6e01aa5 15928#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15929choke me
98418dba
CW
15930#endif
15931
19650fd6
AS
15932int
15933main ()
15934{
d6e01aa5 15935return $ac_func ();
503d2be0
AS
15936 ;
15937 return 0;
15938}
15939_ACEOF
15940rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15941if { (ac_try="$ac_link"
15942case "(($ac_try" in
15943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15944 *) ac_try_echo=$ac_try;;
15945esac
15946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15947 (eval "$ac_link") 2>conftest.er1
503d2be0 15948 ac_status=$?
edfaf76d
LK
15949 grep -v '^ *+' conftest.er1 >conftest.err
15950 rm -f conftest.er1
15951 cat conftest.err >&5
c0d27fcc 15952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15953 (exit $ac_status); } && {
15954 test -z "$ac_c_werror_flag" ||
15955 test ! -s conftest.err
15956 } && test -s conftest$ac_exeext &&
15957 $as_test_x conftest$ac_exeext; then
98418dba 15958 eval "$as_ac_var=yes"
503d2be0
AS
15959else
15960 echo "$as_me: failed program was:" >&5
19650fd6
AS
15961sed 's/^/| /' conftest.$ac_ext >&5
15962
d6e01aa5 15963 eval "$as_ac_var=no"
503d2be0 15964fi
d6e01aa5
KL
15965
15966rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15967 conftest$ac_exeext conftest.$ac_ext
ffe36136 15968fi
d6e01aa5
KL
15969ac_res=`eval echo '${'$as_ac_var'}'`
15970 { echo "$as_me:$LINENO: result: $ac_res" >&5
15971echo "${ECHO_T}$ac_res" >&6; }
98418dba 15972if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15973 cat >>confdefs.h <<_ACEOF
98418dba 15974#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15975_ACEOF
ffe36136 15976
ba4481b5 15977fi
98418dba 15978done
ba4481b5 15979
d6e01aa5
KL
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996{ echo "$as_me:$LINENO: checking for working mktime" >&5
15997echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
15998if test "${ac_cv_func_working_mktime+set}" = set; then
15999 echo $ECHO_N "(cached) $ECHO_C" >&6
16000else
16001 if test "$cross_compiling" = yes; then
16002 ac_cv_func_working_mktime=no
16003else
16004 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16005/* confdefs.h. */
16006_ACEOF
16007cat confdefs.h >>conftest.$ac_ext
16008cat >>conftest.$ac_ext <<_ACEOF
16009/* end confdefs.h. */
98418dba 16010/* Test program from Paul Eggert and Tony Leneis. */
d6e01aa5 16011#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16012# include <sys/time.h>
16013# include <time.h>
16014#else
d6e01aa5 16015# ifdef HAVE_SYS_TIME_H
98418dba
CW
16016# include <sys/time.h>
16017# else
16018# include <time.h>
16019# endif
16020#endif
ba4481b5 16021
d6e01aa5 16022#include <stdlib.h>
edfaf76d 16023
d6e01aa5 16024#ifdef HAVE_UNISTD_H
98418dba
CW
16025# include <unistd.h>
16026#endif
ba4481b5 16027
d6e01aa5 16028#ifndef HAVE_ALARM
98418dba
CW
16029# define alarm(X) /* empty */
16030#endif
df645f7c 16031
98418dba
CW
16032/* Work around redefinition to rpl_putenv by other config tests. */
16033#undef putenv
df645f7c 16034
98418dba 16035static time_t time_t_max;
edfaf76d 16036static time_t time_t_min;
df645f7c 16037
98418dba 16038/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16039static char *tz_strings[] = {
16040 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16041 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16042};
16043#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16044
d6e01aa5 16045/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16046 Based on a problem report from Andreas Jaeger. */
d6e01aa5 16047static int
98418dba
CW
16048spring_forward_gap ()
16049{
16050 /* glibc (up to about 1998-10-07) failed this test. */
16051 struct tm tm;
16052
16053 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16054 instead of "TZ=America/Vancouver" in order to detect the bug even
16055 on systems that don't support the Olson extension, or don't have the
16056 full zoneinfo tables installed. */
16057 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16058
16059 tm.tm_year = 98;
16060 tm.tm_mon = 3;
16061 tm.tm_mday = 5;
16062 tm.tm_hour = 2;
16063 tm.tm_min = 0;
16064 tm.tm_sec = 0;
16065 tm.tm_isdst = -1;
d6e01aa5 16066 return mktime (&tm) != (time_t) -1;
98418dba
CW
16067}
16068
d6e01aa5 16069static int
edfaf76d 16070mktime_test1 (now)
98418dba
CW
16071 time_t now;
16072{
16073 struct tm *lt;
d6e01aa5 16074 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16075}
16076
d6e01aa5 16077static int
edfaf76d
LK
16078mktime_test (now)
16079 time_t now;
16080{
d6e01aa5
KL
16081 return (mktime_test1 (now)
16082 && mktime_test1 ((time_t) (time_t_max - now))
16083 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16084}
16085
d6e01aa5 16086static int
98418dba
CW
16087irix_6_4_bug ()
16088{
16089 /* Based on code from Ariel Faigon. */
16090 struct tm tm;
16091 tm.tm_year = 96;
16092 tm.tm_mon = 3;
16093 tm.tm_mday = 0;
16094 tm.tm_hour = 0;
16095 tm.tm_min = 0;
16096 tm.tm_sec = 0;
16097 tm.tm_isdst = -1;
16098 mktime (&tm);
d6e01aa5 16099 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16100}
16101
d6e01aa5 16102static int
98418dba
CW
16103bigtime_test (j)
16104 int j;
16105{
16106 struct tm tm;
16107 time_t now;
16108 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16109 now = mktime (&tm);
16110 if (now != (time_t) -1)
16111 {
16112 struct tm *lt = localtime (&now);
16113 if (! (lt
16114 && lt->tm_year == tm.tm_year
16115 && lt->tm_mon == tm.tm_mon
16116 && lt->tm_mday == tm.tm_mday
16117 && lt->tm_hour == tm.tm_hour
16118 && lt->tm_min == tm.tm_min
16119 && lt->tm_sec == tm.tm_sec
16120 && lt->tm_yday == tm.tm_yday
16121 && lt->tm_wday == tm.tm_wday
16122 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16123 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
d6e01aa5 16124 return 0;
98418dba 16125 }
d6e01aa5
KL
16126 return 1;
16127}
16128
16129static int
16130year_2050_test ()
16131{
16132 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16133 ignoring leap seconds. */
16134 unsigned long int answer = 2527315200UL;
16135
16136 struct tm tm;
16137 time_t t;
16138 tm.tm_year = 2050 - 1900;
16139 tm.tm_mon = 2 - 1;
16140 tm.tm_mday = 1;
16141 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16142 tm.tm_isdst = -1;
16143
16144 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16145 instead of "TZ=America/Vancouver" in order to detect the bug even
16146 on systems that don't support the Olson extension, or don't have the
16147 full zoneinfo tables installed. */
16148 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16149
16150 t = mktime (&tm);
16151
16152 /* Check that the result is either a failure, or close enough
16153 to the correct answer that we can assume the discrepancy is
16154 due to leap seconds. */
16155 return (t == (time_t) -1
16156 || (0 < t && answer - 120 <= t && t <= answer + 120));
98418dba
CW
16157}
16158
16159int
16160main ()
16161{
16162 time_t t, delta;
16163 int i, j;
16164
16165 /* This test makes some buggy mktime implementations loop.
16166 Give up after 60 seconds; a mktime slower than that
16167 isn't worth using anyway. */
16168 alarm (60);
16169
16170 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
16171 continue;
16172 time_t_max--;
edfaf76d
LK
16173 if ((time_t) -1 < 0)
16174 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
16175 continue;
98418dba
CW
16176 delta = time_t_max / 997; /* a suitable prime number */
16177 for (i = 0; i < N_STRINGS; i++)
16178 {
16179 if (tz_strings[i])
16180 putenv (tz_strings[i]);
503d2be0 16181
98418dba 16182 for (t = 0; t <= time_t_max - delta; t += delta)
d6e01aa5
KL
16183 if (! mktime_test (t))
16184 return 1;
16185 if (! (mktime_test ((time_t) 1)
16186 && mktime_test ((time_t) (60 * 60))
16187 && mktime_test ((time_t) (60 * 60 * 24))))
16188 return 1;
98418dba
CW
16189
16190 for (j = 1; 0 < j; j *= 2)
d6e01aa5
KL
16191 if (! bigtime_test (j))
16192 return 1;
16193 if (! bigtime_test (j - 1))
16194 return 1;
98418dba 16195 }
d6e01aa5 16196 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
16197}
16198_ACEOF
98418dba 16199rm -f conftest$ac_exeext
d6e01aa5
KL
16200if { (ac_try="$ac_link"
16201case "(($ac_try" in
16202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16203 *) ac_try_echo=$ac_try;;
16204esac
16205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16206 (eval "$ac_link") 2>&5
503d2be0 16207 ac_status=$?
c0d27fcc 16208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 16209 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
16210 { (case "(($ac_try" in
16211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16212 *) ac_try_echo=$ac_try;;
16213esac
16214eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16215 (eval "$ac_try") 2>&5
503d2be0 16216 ac_status=$?
c0d27fcc 16217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16218 (exit $ac_status); }; }; then
98418dba 16219 ac_cv_func_working_mktime=yes
503d2be0 16220else
98418dba
CW
16221 echo "$as_me: program exited with status $ac_status" >&5
16222echo "$as_me: failed program was:" >&5
19650fd6
AS
16223sed 's/^/| /' conftest.$ac_ext >&5
16224
c0d27fcc 16225( exit $ac_status )
98418dba 16226ac_cv_func_working_mktime=no
503d2be0 16227fi
d6e01aa5 16228rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 16229fi
d6e01aa5
KL
16230
16231
ba4481b5 16232fi
d6e01aa5
KL
16233{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
16234echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 16235if test $ac_cv_func_working_mktime = no; then
d6e01aa5 16236 case " $LIBOBJS " in
edfaf76d 16237 *" mktime.$ac_objext "* ) ;;
d6e01aa5
KL
16238 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
16239 ;;
edfaf76d
LK
16240esac
16241
ba4481b5
DL
16242fi
16243
98418dba 16244if test "$ac_cv_func_working_mktime" = no; then
b936fae4 16245
c0d27fcc 16246cat >>confdefs.h <<\_ACEOF
98418dba 16247#define BROKEN_MKTIME 1
c0d27fcc 16248_ACEOF
ba4481b5 16249
ba4481b5 16250fi
503d2be0 16251
98418dba
CW
16252ac_have_func=no # yes means we've found a way to get the load average.
16253
6bae0ccf
DL
16254# Make sure getloadavg.c is where it belongs, at configure-time.
16255test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
16256 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
16257echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
16258 { (exit 1); exit 1; }; }
16259
98418dba
CW
16260ac_save_LIBS=$LIBS
16261
16262# Check for getloadavg, but be sure not to touch the cache variable.
d6e01aa5
KL
16263({ echo "$as_me:$LINENO: checking for getloadavg" >&5
16264echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 16265if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 16266 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16267else
503d2be0 16268 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16269/* confdefs.h. */
16270_ACEOF
16271cat confdefs.h >>conftest.$ac_ext
16272cat >>conftest.$ac_ext <<_ACEOF
16273/* end confdefs.h. */
edfaf76d
LK
16274/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
16275 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16276#define getloadavg innocuous_getloadavg
16277
98418dba 16278/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16279 which can conflict with char getloadavg (); below.
16280 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16281 <limits.h> exists even on freestanding compilers. */
edfaf76d 16282
19650fd6
AS
16283#ifdef __STDC__
16284# include <limits.h>
16285#else
16286# include <assert.h>
16287#endif
edfaf76d
LK
16288
16289#undef getloadavg
16290
d6e01aa5
KL
16291/* Override any GCC internal prototype to avoid an error.
16292 Use char because int might match the return type of a GCC
16293 builtin and then its argument prototype would still apply. */
503d2be0
AS
16294#ifdef __cplusplus
16295extern "C"
16296#endif
98418dba 16297char getloadavg ();
98418dba
CW
16298/* The GNU C library defines this for functions which it implements
16299 to always fail with ENOSYS. Some functions are actually named
16300 something starting with __ and the normal name is an alias. */
d6e01aa5 16301#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 16302choke me
cd958eb3
MB
16303#endif
16304
19650fd6
AS
16305int
16306main ()
16307{
d6e01aa5 16308return getloadavg ();
503d2be0
AS
16309 ;
16310 return 0;
16311}
16312_ACEOF
16313rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16314if { (ac_try="$ac_link"
16315case "(($ac_try" in
16316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16317 *) ac_try_echo=$ac_try;;
16318esac
16319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16320 (eval "$ac_link") 2>conftest.er1
503d2be0 16321 ac_status=$?
edfaf76d
LK
16322 grep -v '^ *+' conftest.er1 >conftest.err
16323 rm -f conftest.er1
16324 cat conftest.err >&5
c0d27fcc 16325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16326 (exit $ac_status); } && {
16327 test -z "$ac_c_werror_flag" ||
16328 test ! -s conftest.err
16329 } && test -s conftest$ac_exeext &&
16330 $as_test_x conftest$ac_exeext; then
98418dba 16331 ac_cv_func_getloadavg=yes
503d2be0
AS
16332else
16333 echo "$as_me: failed program was:" >&5
19650fd6
AS
16334sed 's/^/| /' conftest.$ac_ext >&5
16335
d6e01aa5 16336 ac_cv_func_getloadavg=no
503d2be0 16337fi
d6e01aa5
KL
16338
16339rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16340 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16341fi
d6e01aa5
KL
16342{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
16343echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
16344if test $ac_cv_func_getloadavg = yes; then
16345 exit 0
16346else
16347 exit 1
ba4481b5 16348fi
98418dba 16349) && ac_have_func=yes
ba4481b5 16350
98418dba 16351# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 16352
98418dba
CW
16353for ac_func in pstat_getdynamic
16354do
16355as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
16356{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16357echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16358if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16359 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16360else
503d2be0 16361 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16362/* confdefs.h. */
16363_ACEOF
16364cat confdefs.h >>conftest.$ac_ext
16365cat >>conftest.$ac_ext <<_ACEOF
16366/* end confdefs.h. */
edfaf76d
LK
16367/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16368 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16369#define $ac_func innocuous_$ac_func
16370
98418dba 16371/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16372 which can conflict with char $ac_func (); below.
16373 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16374 <limits.h> exists even on freestanding compilers. */
edfaf76d 16375
19650fd6
AS
16376#ifdef __STDC__
16377# include <limits.h>
16378#else
16379# include <assert.h>
16380#endif
edfaf76d
LK
16381
16382#undef $ac_func
16383
d6e01aa5
KL
16384/* Override any GCC internal prototype to avoid an error.
16385 Use char because int might match the return type of a GCC
16386 builtin and then its argument prototype would still apply. */
503d2be0
AS
16387#ifdef __cplusplus
16388extern "C"
16389#endif
98418dba 16390char $ac_func ();
98418dba
CW
16391/* The GNU C library defines this for functions which it implements
16392 to always fail with ENOSYS. Some functions are actually named
16393 something starting with __ and the normal name is an alias. */
d6e01aa5 16394#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16395choke me
98418dba
CW
16396#endif
16397
19650fd6
AS
16398int
16399main ()
16400{
d6e01aa5 16401return $ac_func ();
98418dba
CW
16402 ;
16403 return 0;
16404}
f21fadcc 16405_ACEOF
98418dba 16406rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16407if { (ac_try="$ac_link"
16408case "(($ac_try" in
16409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16410 *) ac_try_echo=$ac_try;;
16411esac
16412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16413 (eval "$ac_link") 2>conftest.er1
f21fadcc 16414 ac_status=$?
edfaf76d
LK
16415 grep -v '^ *+' conftest.er1 >conftest.err
16416 rm -f conftest.er1
16417 cat conftest.err >&5
c0d27fcc 16418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16419 (exit $ac_status); } && {
16420 test -z "$ac_c_werror_flag" ||
16421 test ! -s conftest.err
16422 } && test -s conftest$ac_exeext &&
16423 $as_test_x conftest$ac_exeext; then
98418dba 16424 eval "$as_ac_var=yes"
f21fadcc
JD
16425else
16426 echo "$as_me: failed program was:" >&5
19650fd6
AS
16427sed 's/^/| /' conftest.$ac_ext >&5
16428
d6e01aa5 16429 eval "$as_ac_var=no"
f21fadcc 16430fi
d6e01aa5
KL
16431
16432rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16433 conftest$ac_exeext conftest.$ac_ext
f21fadcc 16434fi
d6e01aa5
KL
16435ac_res=`eval echo '${'$as_ac_var'}'`
16436 { echo "$as_me:$LINENO: result: $ac_res" >&5
16437echo "${ECHO_T}$ac_res" >&6; }
98418dba 16438if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16439 cat >>confdefs.h <<_ACEOF
98418dba 16440#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16441_ACEOF
98418dba
CW
16442
16443fi
16444done
16445
c0d27fcc 16446
98418dba
CW
16447# Solaris has libkstat which does not require root.
16448
d6e01aa5
KL
16449{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
16450echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 16451if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
16452 echo $ECHO_N "(cached) $ECHO_C" >&6
16453else
16454 ac_check_lib_save_LIBS=$LIBS
98418dba 16455LIBS="-lkstat $LIBS"
f21fadcc 16456cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16457/* confdefs.h. */
16458_ACEOF
16459cat confdefs.h >>conftest.$ac_ext
16460cat >>conftest.$ac_ext <<_ACEOF
16461/* end confdefs.h. */
f21fadcc 16462
d6e01aa5
KL
16463/* Override any GCC internal prototype to avoid an error.
16464 Use char because int might match the return type of a GCC
16465 builtin and then its argument prototype would still apply. */
f21fadcc
JD
16466#ifdef __cplusplus
16467extern "C"
16468#endif
98418dba 16469char kstat_open ();
f21fadcc
JD
16470int
16471main ()
16472{
d6e01aa5 16473return kstat_open ();
f21fadcc
JD
16474 ;
16475 return 0;
16476}
16477_ACEOF
16478rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16479if { (ac_try="$ac_link"
16480case "(($ac_try" in
16481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16482 *) ac_try_echo=$ac_try;;
16483esac
16484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16485 (eval "$ac_link") 2>conftest.er1
f21fadcc 16486 ac_status=$?
edfaf76d
LK
16487 grep -v '^ *+' conftest.er1 >conftest.err
16488 rm -f conftest.er1
16489 cat conftest.err >&5
c0d27fcc 16490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16491 (exit $ac_status); } && {
16492 test -z "$ac_c_werror_flag" ||
16493 test ! -s conftest.err
16494 } && test -s conftest$ac_exeext &&
16495 $as_test_x conftest$ac_exeext; then
98418dba 16496 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
16497else
16498 echo "$as_me: failed program was:" >&5
19650fd6
AS
16499sed 's/^/| /' conftest.$ac_ext >&5
16500
d6e01aa5 16501 ac_cv_lib_kstat_kstat_open=no
f21fadcc 16502fi
d6e01aa5
KL
16503
16504rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16505 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
16506LIBS=$ac_check_lib_save_LIBS
16507fi
d6e01aa5
KL
16508{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
16509echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 16510if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 16511 cat >>confdefs.h <<_ACEOF
98418dba 16512#define HAVE_LIBKSTAT 1
c0d27fcc 16513_ACEOF
f21fadcc 16514
98418dba 16515 LIBS="-lkstat $LIBS"
f21fadcc 16516
f21fadcc
JD
16517fi
16518
98418dba
CW
16519test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
16520
16521# Some systems with -lutil have (and need) -lkvm as well, some do not.
16522# On Solaris, -lkvm requires nlist from -lelf, so check that first
16523# to get the right answer into the cache.
16524# For kstat on solaris, we need libelf to force the definition of SVR4 below.
16525if test $ac_have_func = no; then
d6e01aa5
KL
16526 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
16527echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 16528if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 16529 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16530else
98418dba
CW
16531 ac_check_lib_save_LIBS=$LIBS
16532LIBS="-lelf $LIBS"
16533cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16534/* confdefs.h. */
16535_ACEOF
16536cat confdefs.h >>conftest.$ac_ext
16537cat >>conftest.$ac_ext <<_ACEOF
16538/* end confdefs.h. */
98418dba 16539
d6e01aa5
KL
16540/* Override any GCC internal prototype to avoid an error.
16541 Use char because int might match the return type of a GCC
16542 builtin and then its argument prototype would still apply. */
98418dba
CW
16543#ifdef __cplusplus
16544extern "C"
16545#endif
98418dba 16546char elf_begin ();
503d2be0
AS
16547int
16548main ()
16549{
d6e01aa5 16550return elf_begin ();
503d2be0
AS
16551 ;
16552 return 0;
16553}
16554_ACEOF
16555rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16556if { (ac_try="$ac_link"
16557case "(($ac_try" in
16558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16559 *) ac_try_echo=$ac_try;;
16560esac
16561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16562 (eval "$ac_link") 2>conftest.er1
503d2be0 16563 ac_status=$?
edfaf76d
LK
16564 grep -v '^ *+' conftest.er1 >conftest.err
16565 rm -f conftest.er1
16566 cat conftest.err >&5
c0d27fcc 16567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16568 (exit $ac_status); } && {
16569 test -z "$ac_c_werror_flag" ||
16570 test ! -s conftest.err
16571 } && test -s conftest$ac_exeext &&
16572 $as_test_x conftest$ac_exeext; then
98418dba 16573 ac_cv_lib_elf_elf_begin=yes
ba4481b5 16574else
503d2be0 16575 echo "$as_me: failed program was:" >&5
19650fd6
AS
16576sed 's/^/| /' conftest.$ac_ext >&5
16577
d6e01aa5 16578 ac_cv_lib_elf_elf_begin=no
ba4481b5 16579fi
d6e01aa5
KL
16580
16581rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16582 conftest$ac_exeext conftest.$ac_ext
98418dba 16583LIBS=$ac_check_lib_save_LIBS
ba4481b5 16584fi
d6e01aa5
KL
16585{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
16586echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
16587if test $ac_cv_lib_elf_elf_begin = yes; then
16588 LIBS="-lelf $LIBS"
ba4481b5
DL
16589fi
16590
98418dba
CW
16591fi
16592if test $ac_have_func = no; then
d6e01aa5
KL
16593 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
16594echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 16595if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 16596 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16597else
98418dba
CW
16598 ac_check_lib_save_LIBS=$LIBS
16599LIBS="-lkvm $LIBS"
16600cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16601/* confdefs.h. */
16602_ACEOF
16603cat confdefs.h >>conftest.$ac_ext
16604cat >>conftest.$ac_ext <<_ACEOF
16605/* end confdefs.h. */
98418dba 16606
d6e01aa5
KL
16607/* Override any GCC internal prototype to avoid an error.
16608 Use char because int might match the return type of a GCC
16609 builtin and then its argument prototype would still apply. */
98418dba
CW
16610#ifdef __cplusplus
16611extern "C"
16612#endif
98418dba 16613char kvm_open ();
503d2be0
AS
16614int
16615main ()
16616{
d6e01aa5 16617return kvm_open ();
503d2be0
AS
16618 ;
16619 return 0;
16620}
16621_ACEOF
16622rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16623if { (ac_try="$ac_link"
16624case "(($ac_try" in
16625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16626 *) ac_try_echo=$ac_try;;
16627esac
16628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16629 (eval "$ac_link") 2>conftest.er1
503d2be0 16630 ac_status=$?
edfaf76d
LK
16631 grep -v '^ *+' conftest.er1 >conftest.err
16632 rm -f conftest.er1
16633 cat conftest.err >&5
c0d27fcc 16634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16635 (exit $ac_status); } && {
16636 test -z "$ac_c_werror_flag" ||
16637 test ! -s conftest.err
16638 } && test -s conftest$ac_exeext &&
16639 $as_test_x conftest$ac_exeext; then
98418dba 16640 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
16641else
16642 echo "$as_me: failed program was:" >&5
19650fd6
AS
16643sed 's/^/| /' conftest.$ac_ext >&5
16644
d6e01aa5 16645 ac_cv_lib_kvm_kvm_open=no
503d2be0 16646fi
d6e01aa5
KL
16647
16648rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16649 conftest$ac_exeext conftest.$ac_ext
98418dba 16650LIBS=$ac_check_lib_save_LIBS
503d2be0 16651fi
d6e01aa5
KL
16652{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
16653echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
16654if test $ac_cv_lib_kvm_kvm_open = yes; then
16655 LIBS="-lkvm $LIBS"
ba4481b5
DL
16656fi
16657
98418dba 16658 # Check for the 4.4BSD definition of getloadavg.
d6e01aa5
KL
16659 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
16660echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 16661if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 16662 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16663else
98418dba
CW
16664 ac_check_lib_save_LIBS=$LIBS
16665LIBS="-lutil $LIBS"
16666cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16667/* confdefs.h. */
16668_ACEOF
16669cat confdefs.h >>conftest.$ac_ext
16670cat >>conftest.$ac_ext <<_ACEOF
16671/* end confdefs.h. */
98418dba 16672
d6e01aa5
KL
16673/* Override any GCC internal prototype to avoid an error.
16674 Use char because int might match the return type of a GCC
16675 builtin and then its argument prototype would still apply. */
98418dba
CW
16676#ifdef __cplusplus
16677extern "C"
16678#endif
98418dba 16679char getloadavg ();
503d2be0
AS
16680int
16681main ()
16682{
d6e01aa5 16683return getloadavg ();
503d2be0
AS
16684 ;
16685 return 0;
16686}
16687_ACEOF
16688rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16689if { (ac_try="$ac_link"
16690case "(($ac_try" in
16691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16692 *) ac_try_echo=$ac_try;;
16693esac
16694eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16695 (eval "$ac_link") 2>conftest.er1
503d2be0 16696 ac_status=$?
edfaf76d
LK
16697 grep -v '^ *+' conftest.er1 >conftest.err
16698 rm -f conftest.er1
16699 cat conftest.err >&5
c0d27fcc 16700 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16701 (exit $ac_status); } && {
16702 test -z "$ac_c_werror_flag" ||
16703 test ! -s conftest.err
16704 } && test -s conftest$ac_exeext &&
16705 $as_test_x conftest$ac_exeext; then
35996d22
AS
16706 ac_cv_lib_util_getloadavg=yes
16707else
503d2be0 16708 echo "$as_me: failed program was:" >&5
19650fd6
AS
16709sed 's/^/| /' conftest.$ac_ext >&5
16710
d6e01aa5 16711 ac_cv_lib_util_getloadavg=no
ba4481b5 16712fi
d6e01aa5
KL
16713
16714rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16715 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
16716LIBS=$ac_check_lib_save_LIBS
16717fi
d6e01aa5
KL
16718{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
16719echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
16720if test $ac_cv_lib_util_getloadavg = yes; then
16721 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 16722fi
503d2be0 16723
98418dba 16724fi
ba4481b5 16725
98418dba
CW
16726if test $ac_have_func = no; then
16727 # There is a commonly available library for RS/6000 AIX.
16728 # Since it is not a standard part of AIX, it might be installed locally.
16729 ac_getloadavg_LIBS=$LIBS
16730 LIBS="-L/usr/local/lib $LIBS"
d6e01aa5
KL
16731 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
16732echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 16733if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 16734 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16735else
98418dba
CW
16736 ac_check_lib_save_LIBS=$LIBS
16737LIBS="-lgetloadavg $LIBS"
16738cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16739/* confdefs.h. */
16740_ACEOF
16741cat confdefs.h >>conftest.$ac_ext
16742cat >>conftest.$ac_ext <<_ACEOF
16743/* end confdefs.h. */
ba4481b5 16744
d6e01aa5
KL
16745/* Override any GCC internal prototype to avoid an error.
16746 Use char because int might match the return type of a GCC
16747 builtin and then its argument prototype would still apply. */
98418dba
CW
16748#ifdef __cplusplus
16749extern "C"
16750#endif
98418dba 16751char getloadavg ();
98418dba
CW
16752int
16753main ()
16754{
d6e01aa5 16755return getloadavg ();
98418dba
CW
16756 ;
16757 return 0;
16758}
503d2be0 16759_ACEOF
98418dba 16760rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16761if { (ac_try="$ac_link"
16762case "(($ac_try" in
16763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16764 *) ac_try_echo=$ac_try;;
16765esac
16766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16767 (eval "$ac_link") 2>conftest.er1
98418dba 16768 ac_status=$?
edfaf76d
LK
16769 grep -v '^ *+' conftest.er1 >conftest.err
16770 rm -f conftest.er1
16771 cat conftest.err >&5
c0d27fcc 16772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16773 (exit $ac_status); } && {
16774 test -z "$ac_c_werror_flag" ||
16775 test ! -s conftest.err
16776 } && test -s conftest$ac_exeext &&
16777 $as_test_x conftest$ac_exeext; then
98418dba 16778 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 16779else
98418dba 16780 echo "$as_me: failed program was:" >&5
19650fd6
AS
16781sed 's/^/| /' conftest.$ac_ext >&5
16782
d6e01aa5 16783 ac_cv_lib_getloadavg_getloadavg=no
98418dba 16784fi
d6e01aa5
KL
16785
16786rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16787 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
16788LIBS=$ac_check_lib_save_LIBS
16789fi
d6e01aa5
KL
16790{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
16791echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
16792if test $ac_cv_lib_getloadavg_getloadavg = yes; then
16793 LIBS="-lgetloadavg $LIBS"
16794else
16795 LIBS=$ac_getloadavg_LIBS
ba4481b5 16796fi
ba4481b5
DL
16797
16798fi
98418dba
CW
16799
16800# Make sure it is really in the library, if we think we found it,
16801# otherwise set up the replacement function.
16802
16803for ac_func in getloadavg
16804do
16805as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
16806{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16807echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16808if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16809 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16810else
503d2be0 16811 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16812/* confdefs.h. */
16813_ACEOF
16814cat confdefs.h >>conftest.$ac_ext
16815cat >>conftest.$ac_ext <<_ACEOF
16816/* end confdefs.h. */
edfaf76d
LK
16817/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16818 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16819#define $ac_func innocuous_$ac_func
16820
ba4481b5 16821/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16822 which can conflict with char $ac_func (); below.
16823 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16824 <limits.h> exists even on freestanding compilers. */
edfaf76d 16825
19650fd6
AS
16826#ifdef __STDC__
16827# include <limits.h>
16828#else
16829# include <assert.h>
16830#endif
edfaf76d
LK
16831
16832#undef $ac_func
16833
d6e01aa5
KL
16834/* Override any GCC internal prototype to avoid an error.
16835 Use char because int might match the return type of a GCC
16836 builtin and then its argument prototype would still apply. */
503d2be0
AS
16837#ifdef __cplusplus
16838extern "C"
16839#endif
503d2be0 16840char $ac_func ();
ba4481b5
DL
16841/* The GNU C library defines this for functions which it implements
16842 to always fail with ENOSYS. Some functions are actually named
16843 something starting with __ and the normal name is an alias. */
d6e01aa5 16844#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 16845choke me
cd958eb3
MB
16846#endif
16847
19650fd6
AS
16848int
16849main ()
16850{
d6e01aa5 16851return $ac_func ();
503d2be0
AS
16852 ;
16853 return 0;
16854}
16855_ACEOF
16856rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16857if { (ac_try="$ac_link"
16858case "(($ac_try" in
16859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16860 *) ac_try_echo=$ac_try;;
16861esac
16862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16863 (eval "$ac_link") 2>conftest.er1
503d2be0 16864 ac_status=$?
edfaf76d
LK
16865 grep -v '^ *+' conftest.er1 >conftest.err
16866 rm -f conftest.er1
16867 cat conftest.err >&5
c0d27fcc 16868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16869 (exit $ac_status); } && {
16870 test -z "$ac_c_werror_flag" ||
16871 test ! -s conftest.err
16872 } && test -s conftest$ac_exeext &&
16873 $as_test_x conftest$ac_exeext; then
503d2be0
AS
16874 eval "$as_ac_var=yes"
16875else
16876 echo "$as_me: failed program was:" >&5
19650fd6
AS
16877sed 's/^/| /' conftest.$ac_ext >&5
16878
d6e01aa5 16879 eval "$as_ac_var=no"
503d2be0 16880fi
d6e01aa5
KL
16881
16882rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16883 conftest$ac_exeext conftest.$ac_ext
503d2be0 16884fi
d6e01aa5
KL
16885ac_res=`eval echo '${'$as_ac_var'}'`
16886 { echo "$as_me:$LINENO: result: $ac_res" >&5
16887echo "${ECHO_T}$ac_res" >&6; }
503d2be0 16888if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16889 cat >>confdefs.h <<_ACEOF
98418dba 16890#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16891_ACEOF
503d2be0 16892
98418dba 16893else
d6e01aa5 16894 case " $LIBOBJS " in
edfaf76d 16895 *" getloadavg.$ac_objext "* ) ;;
d6e01aa5
KL
16896 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
16897 ;;
edfaf76d
LK
16898esac
16899
ba4481b5 16900
c0d27fcc 16901cat >>confdefs.h <<\_ACEOF
98418dba 16902#define C_GETLOADAVG 1
c0d27fcc 16903_ACEOF
ba4481b5 16904
98418dba
CW
16905# Figure out what our getloadavg.c needs.
16906ac_have_func=no
c0d27fcc 16907if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
d6e01aa5
KL
16908 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
16909echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 16910if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 16911 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16912fi
d6e01aa5
KL
16913{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
16914echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 16915else
c0d27fcc 16916 # Is the header compilable?
d6e01aa5
KL
16917{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
16918echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 16919cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16920/* confdefs.h. */
16921_ACEOF
16922cat confdefs.h >>conftest.$ac_ext
16923cat >>conftest.$ac_ext <<_ACEOF
16924/* end confdefs.h. */
c0d27fcc
MR
16925$ac_includes_default
16926#include <sys/dg_sys_info.h>
16927_ACEOF
16928rm -f conftest.$ac_objext
d6e01aa5
KL
16929if { (ac_try="$ac_compile"
16930case "(($ac_try" in
16931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16932 *) ac_try_echo=$ac_try;;
16933esac
16934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16935 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16936 ac_status=$?
edfaf76d
LK
16937 grep -v '^ *+' conftest.er1 >conftest.err
16938 rm -f conftest.er1
16939 cat conftest.err >&5
c0d27fcc 16940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16941 (exit $ac_status); } && {
16942 test -z "$ac_c_werror_flag" ||
16943 test ! -s conftest.err
16944 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16945 ac_header_compiler=yes
16946else
16947 echo "$as_me: failed program was:" >&5
19650fd6
AS
16948sed 's/^/| /' conftest.$ac_ext >&5
16949
d6e01aa5 16950 ac_header_compiler=no
c0d27fcc 16951fi
d6e01aa5
KL
16952
16953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16954{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16955echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16956
16957# Is the header present?
d6e01aa5
KL
16958{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
16959echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 16960cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16961/* confdefs.h. */
16962_ACEOF
16963cat confdefs.h >>conftest.$ac_ext
16964cat >>conftest.$ac_ext <<_ACEOF
16965/* end confdefs.h. */
98418dba
CW
16966#include <sys/dg_sys_info.h>
16967_ACEOF
d6e01aa5
KL
16968if { (ac_try="$ac_cpp conftest.$ac_ext"
16969case "(($ac_try" in
16970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16971 *) ac_try_echo=$ac_try;;
16972esac
16973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16974 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 16975 ac_status=$?
6bae0ccf 16976 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16977 rm -f conftest.er1
16978 cat conftest.err >&5
c0d27fcc 16979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16980 (exit $ac_status); } >/dev/null && {
16981 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16982 test ! -s conftest.err
16983 }; then
c0d27fcc 16984 ac_header_preproc=yes
98418dba
CW
16985else
16986 echo "$as_me: failed program was:" >&5
19650fd6
AS
16987sed 's/^/| /' conftest.$ac_ext >&5
16988
c0d27fcc 16989 ac_header_preproc=no
ba4481b5 16990fi
d6e01aa5 16991
98418dba 16992rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
16993{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16994echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16995
16996# So? What about this header?
edfaf76d
LK
16997case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16998 yes:no: )
c0d27fcc
MR
16999 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17000echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17001 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17002echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
17003 ac_header_preproc=yes
19650fd6 17004 ;;
edfaf76d 17005 no:yes:* )
c0d27fcc
MR
17006 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17007echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17008 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17009echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17010 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17011echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17012 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17013echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17014 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 17015echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17016 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17017echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 17018
19650fd6 17019 ;;
c0d27fcc 17020esac
d6e01aa5
KL
17021{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17022echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
17023if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
17024 echo $ECHO_N "(cached) $ECHO_C" >&6
17025else
17026 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17027fi
d6e01aa5
KL
17028{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17029echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17030
17031fi
98418dba
CW
17032if test $ac_cv_header_sys_dg_sys_info_h = yes; then
17033 ac_have_func=yes
ba4481b5 17034
c0d27fcc 17035cat >>confdefs.h <<\_ACEOF
98418dba 17036#define DGUX 1
c0d27fcc
MR
17037_ACEOF
17038
503d2be0 17039
d6e01aa5
KL
17040{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17041echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17042if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 17043 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17044else
503d2be0 17045 ac_check_lib_save_LIBS=$LIBS
98418dba 17046LIBS="-ldgc $LIBS"
503d2be0 17047cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17048/* confdefs.h. */
17049_ACEOF
17050cat confdefs.h >>conftest.$ac_ext
17051cat >>conftest.$ac_ext <<_ACEOF
17052/* end confdefs.h. */
503d2be0 17053
d6e01aa5
KL
17054/* Override any GCC internal prototype to avoid an error.
17055 Use char because int might match the return type of a GCC
17056 builtin and then its argument prototype would still apply. */
503d2be0
AS
17057#ifdef __cplusplus
17058extern "C"
17059#endif
98418dba 17060char dg_sys_info ();
503d2be0
AS
17061int
17062main ()
17063{
d6e01aa5 17064return dg_sys_info ();
503d2be0
AS
17065 ;
17066 return 0;
17067}
17068_ACEOF
17069rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17070if { (ac_try="$ac_link"
17071case "(($ac_try" in
17072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17073 *) ac_try_echo=$ac_try;;
17074esac
17075eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17076 (eval "$ac_link") 2>conftest.er1
503d2be0 17077 ac_status=$?
edfaf76d
LK
17078 grep -v '^ *+' conftest.er1 >conftest.err
17079 rm -f conftest.er1
17080 cat conftest.err >&5
c0d27fcc 17081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17082 (exit $ac_status); } && {
17083 test -z "$ac_c_werror_flag" ||
17084 test ! -s conftest.err
17085 } && test -s conftest$ac_exeext &&
17086 $as_test_x conftest$ac_exeext; then
98418dba 17087 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
17088else
17089 echo "$as_me: failed program was:" >&5
19650fd6
AS
17090sed 's/^/| /' conftest.$ac_ext >&5
17091
d6e01aa5 17092 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17093fi
d6e01aa5
KL
17094
17095rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17096 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17097LIBS=$ac_check_lib_save_LIBS
17098fi
d6e01aa5
KL
17099{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17100echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 17101if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17102 cat >>confdefs.h <<_ACEOF
98418dba 17103#define HAVE_LIBDGC 1
c0d27fcc 17104_ACEOF
ba4481b5 17105
98418dba 17106 LIBS="-ldgc $LIBS"
ba4481b5 17107
ba4481b5
DL
17108fi
17109
98418dba 17110fi
503d2be0 17111
c0d27fcc
MR
17112
17113
17114if test "${ac_cv_header_locale_h+set}" = set; then
d6e01aa5
KL
17115 { echo "$as_me:$LINENO: checking for locale.h" >&5
17116echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 17117if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 17118 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17119fi
d6e01aa5
KL
17120{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17121echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 17122else
c0d27fcc 17123 # Is the header compilable?
d6e01aa5
KL
17124{ echo "$as_me:$LINENO: checking locale.h usability" >&5
17125echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 17126cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17127/* confdefs.h. */
17128_ACEOF
17129cat confdefs.h >>conftest.$ac_ext
17130cat >>conftest.$ac_ext <<_ACEOF
17131/* end confdefs.h. */
c0d27fcc
MR
17132$ac_includes_default
17133#include <locale.h>
17134_ACEOF
17135rm -f conftest.$ac_objext
d6e01aa5
KL
17136if { (ac_try="$ac_compile"
17137case "(($ac_try" in
17138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17139 *) ac_try_echo=$ac_try;;
17140esac
17141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17142 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17143 ac_status=$?
edfaf76d
LK
17144 grep -v '^ *+' conftest.er1 >conftest.err
17145 rm -f conftest.er1
17146 cat conftest.err >&5
c0d27fcc 17147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17148 (exit $ac_status); } && {
17149 test -z "$ac_c_werror_flag" ||
17150 test ! -s conftest.err
17151 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17152 ac_header_compiler=yes
17153else
17154 echo "$as_me: failed program was:" >&5
19650fd6
AS
17155sed 's/^/| /' conftest.$ac_ext >&5
17156
d6e01aa5 17157 ac_header_compiler=no
c0d27fcc 17158fi
d6e01aa5
KL
17159
17160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17161{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17162echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17163
17164# Is the header present?
d6e01aa5
KL
17165{ echo "$as_me:$LINENO: checking locale.h presence" >&5
17166echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 17167cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17168/* confdefs.h. */
17169_ACEOF
17170cat confdefs.h >>conftest.$ac_ext
17171cat >>conftest.$ac_ext <<_ACEOF
17172/* end confdefs.h. */
98418dba 17173#include <locale.h>
503d2be0 17174_ACEOF
d6e01aa5
KL
17175if { (ac_try="$ac_cpp conftest.$ac_ext"
17176case "(($ac_try" in
17177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17178 *) ac_try_echo=$ac_try;;
17179esac
17180eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17181 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17182 ac_status=$?
6bae0ccf 17183 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17184 rm -f conftest.er1
17185 cat conftest.err >&5
c0d27fcc 17186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17187 (exit $ac_status); } >/dev/null && {
17188 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17189 test ! -s conftest.err
17190 }; then
c0d27fcc 17191 ac_header_preproc=yes
98418dba
CW
17192else
17193 echo "$as_me: failed program was:" >&5
19650fd6
AS
17194sed 's/^/| /' conftest.$ac_ext >&5
17195
c0d27fcc 17196 ac_header_preproc=no
ba4481b5 17197fi
d6e01aa5 17198
98418dba 17199rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
17200{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17201echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17202
17203# So? What about this header?
edfaf76d
LK
17204case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17205 yes:no: )
c0d27fcc
MR
17206 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
17207echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17208 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
17209echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
17210 ac_header_preproc=yes
19650fd6 17211 ;;
edfaf76d 17212 no:yes:* )
c0d27fcc
MR
17213 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
17214echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17215 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
17216echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
17217 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
17218echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
17219 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
17220echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17221 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 17222echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17223 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
17224echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 17225
19650fd6 17226 ;;
c0d27fcc 17227esac
d6e01aa5
KL
17228{ echo "$as_me:$LINENO: checking for locale.h" >&5
17229echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
17230if test "${ac_cv_header_locale_h+set}" = set; then
17231 echo $ECHO_N "(cached) $ECHO_C" >&6
17232else
17233 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 17234fi
d6e01aa5
KL
17235{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17236echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 17237
c0d27fcc
MR
17238fi
17239
17240
17241
98418dba 17242for ac_func in setlocale
ba4481b5 17243do
503d2be0 17244as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
17245{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17246echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17247if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17248 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17249else
503d2be0 17250 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17251/* confdefs.h. */
17252_ACEOF
17253cat confdefs.h >>conftest.$ac_ext
17254cat >>conftest.$ac_ext <<_ACEOF
17255/* end confdefs.h. */
edfaf76d
LK
17256/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17257 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17258#define $ac_func innocuous_$ac_func
17259
ba4481b5 17260/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17261 which can conflict with char $ac_func (); below.
17262 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17263 <limits.h> exists even on freestanding compilers. */
edfaf76d 17264
19650fd6
AS
17265#ifdef __STDC__
17266# include <limits.h>
17267#else
17268# include <assert.h>
17269#endif
edfaf76d
LK
17270
17271#undef $ac_func
17272
d6e01aa5
KL
17273/* Override any GCC internal prototype to avoid an error.
17274 Use char because int might match the return type of a GCC
17275 builtin and then its argument prototype would still apply. */
503d2be0
AS
17276#ifdef __cplusplus
17277extern "C"
17278#endif
503d2be0 17279char $ac_func ();
ba4481b5
DL
17280/* The GNU C library defines this for functions which it implements
17281 to always fail with ENOSYS. Some functions are actually named
17282 something starting with __ and the normal name is an alias. */
d6e01aa5 17283#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17284choke me
ba4481b5
DL
17285#endif
17286
19650fd6
AS
17287int
17288main ()
17289{
d6e01aa5 17290return $ac_func ();
503d2be0
AS
17291 ;
17292 return 0;
17293}
17294_ACEOF
17295rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17296if { (ac_try="$ac_link"
17297case "(($ac_try" in
17298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17299 *) ac_try_echo=$ac_try;;
17300esac
17301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17302 (eval "$ac_link") 2>conftest.er1
503d2be0 17303 ac_status=$?
edfaf76d
LK
17304 grep -v '^ *+' conftest.er1 >conftest.err
17305 rm -f conftest.er1
17306 cat conftest.err >&5
c0d27fcc 17307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17308 (exit $ac_status); } && {
17309 test -z "$ac_c_werror_flag" ||
17310 test ! -s conftest.err
17311 } && test -s conftest$ac_exeext &&
17312 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17313 eval "$as_ac_var=yes"
17314else
17315 echo "$as_me: failed program was:" >&5
19650fd6
AS
17316sed 's/^/| /' conftest.$ac_ext >&5
17317
d6e01aa5 17318 eval "$as_ac_var=no"
503d2be0 17319fi
d6e01aa5
KL
17320
17321rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17322 conftest$ac_exeext conftest.$ac_ext
503d2be0 17323fi
d6e01aa5
KL
17324ac_res=`eval echo '${'$as_ac_var'}'`
17325 { echo "$as_me:$LINENO: result: $ac_res" >&5
17326echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17327if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17328 cat >>confdefs.h <<_ACEOF
503d2be0 17329#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17330_ACEOF
ba4481b5 17331
ba4481b5
DL
17332fi
17333done
17334
c0d27fcc 17335
98418dba
CW
17336# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
17337# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
17338# Irix 4.0.5F has the header but not the library.
17339if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
17340 ac_have_func=yes
17341
c0d27fcc 17342cat >>confdefs.h <<\_ACEOF
98418dba 17343#define SVR4 1
c0d27fcc 17344_ACEOF
98418dba
CW
17345
17346fi
17347
17348if test $ac_have_func = no; then
c0d27fcc 17349 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
d6e01aa5
KL
17350 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17351echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 17352if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 17353 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17354fi
d6e01aa5
KL
17355{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17356echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 17357else
c0d27fcc 17358 # Is the header compilable?
d6e01aa5
KL
17359{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
17360echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17361cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17362/* confdefs.h. */
17363_ACEOF
17364cat confdefs.h >>conftest.$ac_ext
17365cat >>conftest.$ac_ext <<_ACEOF
17366/* end confdefs.h. */
c0d27fcc
MR
17367$ac_includes_default
17368#include <inq_stats/cpustats.h>
17369_ACEOF
17370rm -f conftest.$ac_objext
d6e01aa5
KL
17371if { (ac_try="$ac_compile"
17372case "(($ac_try" in
17373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17374 *) ac_try_echo=$ac_try;;
17375esac
17376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17377 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17378 ac_status=$?
edfaf76d
LK
17379 grep -v '^ *+' conftest.er1 >conftest.err
17380 rm -f conftest.er1
17381 cat conftest.err >&5
c0d27fcc 17382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17383 (exit $ac_status); } && {
17384 test -z "$ac_c_werror_flag" ||
17385 test ! -s conftest.err
17386 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17387 ac_header_compiler=yes
17388else
17389 echo "$as_me: failed program was:" >&5
19650fd6
AS
17390sed 's/^/| /' conftest.$ac_ext >&5
17391
d6e01aa5 17392 ac_header_compiler=no
c0d27fcc 17393fi
d6e01aa5
KL
17394
17395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17396{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17397echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17398
17399# Is the header present?
d6e01aa5
KL
17400{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
17401echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 17402cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17403/* confdefs.h. */
17404_ACEOF
17405cat confdefs.h >>conftest.$ac_ext
17406cat >>conftest.$ac_ext <<_ACEOF
17407/* end confdefs.h. */
98418dba 17408#include <inq_stats/cpustats.h>
503d2be0 17409_ACEOF
d6e01aa5
KL
17410if { (ac_try="$ac_cpp conftest.$ac_ext"
17411case "(($ac_try" in
17412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17413 *) ac_try_echo=$ac_try;;
17414esac
17415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17416 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17417 ac_status=$?
6bae0ccf 17418 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17419 rm -f conftest.er1
17420 cat conftest.err >&5
c0d27fcc 17421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17422 (exit $ac_status); } >/dev/null && {
17423 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17424 test ! -s conftest.err
17425 }; then
c0d27fcc 17426 ac_header_preproc=yes
503d2be0
AS
17427else
17428 echo "$as_me: failed program was:" >&5
19650fd6
AS
17429sed 's/^/| /' conftest.$ac_ext >&5
17430
c0d27fcc 17431 ac_header_preproc=no
ba4481b5 17432fi
d6e01aa5 17433
503d2be0 17434rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
17435{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17436echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17437
17438# So? What about this header?
edfaf76d
LK
17439case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17440 yes:no: )
c0d27fcc
MR
17441 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
17442echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17443 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
17444echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
17445 ac_header_preproc=yes
19650fd6 17446 ;;
edfaf76d 17447 no:yes:* )
c0d27fcc
MR
17448 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
17449echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17450 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
17451echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
17452 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
17453echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
17454 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
17455echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17456 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 17457echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17458 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
17459echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 17460
19650fd6 17461 ;;
c0d27fcc 17462esac
d6e01aa5
KL
17463{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17464echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
17465if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
17466 echo $ECHO_N "(cached) $ECHO_C" >&6
17467else
17468 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 17469fi
d6e01aa5
KL
17470{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17471echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
17472
17473fi
98418dba
CW
17474if test $ac_cv_header_inq_stats_cpustats_h = yes; then
17475 ac_have_func=yes
ba4481b5 17476
c0d27fcc 17477cat >>confdefs.h <<\_ACEOF
98418dba 17478#define UMAX 1
c0d27fcc 17479_ACEOF
98418dba 17480
c0d27fcc
MR
17481
17482cat >>confdefs.h <<\_ACEOF
98418dba 17483#define UMAX4_3 1
c0d27fcc 17484_ACEOF
98418dba
CW
17485
17486fi
17487
c0d27fcc 17488
98418dba
CW
17489fi
17490
17491if test $ac_have_func = no; then
c0d27fcc 17492 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
d6e01aa5
KL
17493 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
17494echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 17495if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 17496 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17497fi
d6e01aa5
KL
17498{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
17499echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 17500else
c0d27fcc 17501 # Is the header compilable?
d6e01aa5
KL
17502{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
17503echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17504cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17505/* confdefs.h. */
17506_ACEOF
17507cat confdefs.h >>conftest.$ac_ext
17508cat >>conftest.$ac_ext <<_ACEOF
17509/* end confdefs.h. */
c0d27fcc
MR
17510$ac_includes_default
17511#include <sys/cpustats.h>
17512_ACEOF
17513rm -f conftest.$ac_objext
d6e01aa5
KL
17514if { (ac_try="$ac_compile"
17515case "(($ac_try" in
17516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17517 *) ac_try_echo=$ac_try;;
17518esac
17519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17520 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17521 ac_status=$?
edfaf76d
LK
17522 grep -v '^ *+' conftest.er1 >conftest.err
17523 rm -f conftest.er1
17524 cat conftest.err >&5
c0d27fcc 17525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17526 (exit $ac_status); } && {
17527 test -z "$ac_c_werror_flag" ||
17528 test ! -s conftest.err
17529 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17530 ac_header_compiler=yes
17531else
17532 echo "$as_me: failed program was:" >&5
19650fd6
AS
17533sed 's/^/| /' conftest.$ac_ext >&5
17534
d6e01aa5 17535 ac_header_compiler=no
c0d27fcc 17536fi
d6e01aa5
KL
17537
17538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17539{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17540echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17541
17542# Is the header present?
d6e01aa5
KL
17543{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
17544echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 17545cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17546/* confdefs.h. */
17547_ACEOF
17548cat confdefs.h >>conftest.$ac_ext
17549cat >>conftest.$ac_ext <<_ACEOF
17550/* end confdefs.h. */
98418dba
CW
17551#include <sys/cpustats.h>
17552_ACEOF
d6e01aa5
KL
17553if { (ac_try="$ac_cpp conftest.$ac_ext"
17554case "(($ac_try" in
17555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17556 *) ac_try_echo=$ac_try;;
17557esac
17558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17559 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17560 ac_status=$?
6bae0ccf 17561 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17562 rm -f conftest.er1
17563 cat conftest.err >&5
c0d27fcc 17564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17565 (exit $ac_status); } >/dev/null && {
17566 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17567 test ! -s conftest.err
17568 }; then
c0d27fcc 17569 ac_header_preproc=yes
98418dba
CW
17570else
17571 echo "$as_me: failed program was:" >&5
19650fd6
AS
17572sed 's/^/| /' conftest.$ac_ext >&5
17573
c0d27fcc 17574 ac_header_preproc=no
98418dba 17575fi
d6e01aa5 17576
98418dba 17577rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
17578{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17579echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17580
17581# So? What about this header?
edfaf76d
LK
17582case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17583 yes:no: )
c0d27fcc
MR
17584 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
17585echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17586 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
17587echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
17588 ac_header_preproc=yes
19650fd6 17589 ;;
edfaf76d 17590 no:yes:* )
c0d27fcc
MR
17591 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
17592echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17593 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
17594echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
17595 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
17596echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
17597 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
17598echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17599 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 17600echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17601 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
17602echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 17603
19650fd6 17604 ;;
c0d27fcc 17605esac
d6e01aa5
KL
17606{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
17607echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
17608if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
17609 echo $ECHO_N "(cached) $ECHO_C" >&6
17610else
17611 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 17612fi
d6e01aa5
KL
17613{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
17614echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
17615
17616fi
98418dba 17617if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 17618 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 17619#define UMAX 1
c0d27fcc 17620_ACEOF
ba4481b5 17621
98418dba
CW
17622fi
17623
c0d27fcc 17624
98418dba
CW
17625fi
17626
17627if test $ac_have_func = no; then
17628
17629for ac_header in mach/mach.h
2c9dccc9
PJ
17630do
17631as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
17632if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17633 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17634echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17635if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 17636 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17637fi
d6e01aa5
KL
17638ac_res=`eval echo '${'$as_ac_Header'}'`
17639 { echo "$as_me:$LINENO: result: $ac_res" >&5
17640echo "${ECHO_T}$ac_res" >&6; }
98418dba 17641else
c0d27fcc 17642 # Is the header compilable?
d6e01aa5
KL
17643{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17644echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 17645cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17646/* confdefs.h. */
17647_ACEOF
17648cat confdefs.h >>conftest.$ac_ext
17649cat >>conftest.$ac_ext <<_ACEOF
17650/* end confdefs.h. */
c0d27fcc
MR
17651$ac_includes_default
17652#include <$ac_header>
17653_ACEOF
17654rm -f conftest.$ac_objext
d6e01aa5
KL
17655if { (ac_try="$ac_compile"
17656case "(($ac_try" in
17657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17658 *) ac_try_echo=$ac_try;;
17659esac
17660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17661 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17662 ac_status=$?
edfaf76d
LK
17663 grep -v '^ *+' conftest.er1 >conftest.err
17664 rm -f conftest.er1
17665 cat conftest.err >&5
c0d27fcc 17666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17667 (exit $ac_status); } && {
17668 test -z "$ac_c_werror_flag" ||
17669 test ! -s conftest.err
17670 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17671 ac_header_compiler=yes
17672else
17673 echo "$as_me: failed program was:" >&5
19650fd6
AS
17674sed 's/^/| /' conftest.$ac_ext >&5
17675
d6e01aa5 17676 ac_header_compiler=no
c0d27fcc 17677fi
d6e01aa5
KL
17678
17679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17680{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17681echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17682
17683# Is the header present?
d6e01aa5
KL
17684{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
17685echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 17686cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17687/* confdefs.h. */
17688_ACEOF
17689cat confdefs.h >>conftest.$ac_ext
17690cat >>conftest.$ac_ext <<_ACEOF
17691/* end confdefs.h. */
2c9dccc9
PJ
17692#include <$ac_header>
17693_ACEOF
d6e01aa5
KL
17694if { (ac_try="$ac_cpp conftest.$ac_ext"
17695case "(($ac_try" in
17696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17697 *) ac_try_echo=$ac_try;;
17698esac
17699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17700 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 17701 ac_status=$?
6bae0ccf 17702 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
17703 rm -f conftest.er1
17704 cat conftest.err >&5
c0d27fcc 17705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17706 (exit $ac_status); } >/dev/null && {
17707 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17708 test ! -s conftest.err
17709 }; then
c0d27fcc
MR
17710 ac_header_preproc=yes
17711else
17712 echo "$as_me: failed program was:" >&5
19650fd6
AS
17713sed 's/^/| /' conftest.$ac_ext >&5
17714
c0d27fcc
MR
17715 ac_header_preproc=no
17716fi
d6e01aa5 17717
c0d27fcc 17718rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
17719{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17720echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17721
17722# So? What about this header?
edfaf76d
LK
17723case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17724 yes:no: )
c0d27fcc
MR
17725 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17726echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17727 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17728echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17729 ac_header_preproc=yes
19650fd6 17730 ;;
edfaf76d 17731 no:yes:* )
c0d27fcc
MR
17732 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17733echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
17734 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17735echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17736 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17737echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17738 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17739echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17740 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 17741echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17742 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17743echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 17744
19650fd6 17745 ;;
c0d27fcc 17746esac
d6e01aa5
KL
17747{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17748echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17749if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17750 echo $ECHO_N "(cached) $ECHO_C" >&6
17751else
edfaf76d 17752 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 17753fi
d6e01aa5
KL
17754ac_res=`eval echo '${'$as_ac_Header'}'`
17755 { echo "$as_me:$LINENO: result: $ac_res" >&5
17756echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17757
17758fi
17759if test `eval echo '${'$as_ac_Header'}'` = yes; then
17760 cat >>confdefs.h <<_ACEOF
17761#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17762_ACEOF
17763
17764fi
17765
17766done
17767
17768fi
17769
17770
17771for ac_header in nlist.h
17772do
17773as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
17774if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17775 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17776echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17777if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17778 echo $ECHO_N "(cached) $ECHO_C" >&6
17779fi
d6e01aa5
KL
17780ac_res=`eval echo '${'$as_ac_Header'}'`
17781 { echo "$as_me:$LINENO: result: $ac_res" >&5
17782echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17783else
17784 # Is the header compilable?
d6e01aa5
KL
17785{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17786echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 17787cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17788/* confdefs.h. */
17789_ACEOF
17790cat confdefs.h >>conftest.$ac_ext
17791cat >>conftest.$ac_ext <<_ACEOF
17792/* end confdefs.h. */
c0d27fcc
MR
17793$ac_includes_default
17794#include <$ac_header>
17795_ACEOF
17796rm -f conftest.$ac_objext
d6e01aa5
KL
17797if { (ac_try="$ac_compile"
17798case "(($ac_try" in
17799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17800 *) ac_try_echo=$ac_try;;
17801esac
17802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17803 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17804 ac_status=$?
edfaf76d
LK
17805 grep -v '^ *+' conftest.er1 >conftest.err
17806 rm -f conftest.er1
17807 cat conftest.err >&5
c0d27fcc 17808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17809 (exit $ac_status); } && {
17810 test -z "$ac_c_werror_flag" ||
17811 test ! -s conftest.err
17812 } && test -s conftest.$ac_objext; then
c0d27fcc 17813 ac_header_compiler=yes
2c9dccc9
PJ
17814else
17815 echo "$as_me: failed program was:" >&5
19650fd6
AS
17816sed 's/^/| /' conftest.$ac_ext >&5
17817
d6e01aa5 17818 ac_header_compiler=no
98418dba 17819fi
d6e01aa5
KL
17820
17821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17822{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17823echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 17824
c0d27fcc 17825# Is the header present?
d6e01aa5
KL
17826{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
17827echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 17828cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17829/* confdefs.h. */
17830_ACEOF
17831cat confdefs.h >>conftest.$ac_ext
17832cat >>conftest.$ac_ext <<_ACEOF
17833/* end confdefs.h. */
503d2be0
AS
17834#include <$ac_header>
17835_ACEOF
d6e01aa5
KL
17836if { (ac_try="$ac_cpp conftest.$ac_ext"
17837case "(($ac_try" in
17838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17839 *) ac_try_echo=$ac_try;;
17840esac
17841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17842 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17843 ac_status=$?
6bae0ccf 17844 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17845 rm -f conftest.er1
17846 cat conftest.err >&5
c0d27fcc 17847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17848 (exit $ac_status); } >/dev/null && {
17849 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17850 test ! -s conftest.err
17851 }; then
c0d27fcc 17852 ac_header_preproc=yes
503d2be0
AS
17853else
17854 echo "$as_me: failed program was:" >&5
19650fd6
AS
17855sed 's/^/| /' conftest.$ac_ext >&5
17856
c0d27fcc 17857 ac_header_preproc=no
b5de8dc0 17858fi
d6e01aa5 17859
503d2be0 17860rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
17861{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17862echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17863
17864# So? What about this header?
edfaf76d
LK
17865case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17866 yes:no: )
c0d27fcc
MR
17867 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17868echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17869 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17870echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17871 ac_header_preproc=yes
19650fd6 17872 ;;
edfaf76d 17873 no:yes:* )
c0d27fcc
MR
17874 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17875echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
17876 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17877echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17878 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17879echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17880 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17881echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17882 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 17883echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17884 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17885echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 17886
19650fd6 17887 ;;
c0d27fcc 17888esac
d6e01aa5
KL
17889{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17890echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17891if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17892 echo $ECHO_N "(cached) $ECHO_C" >&6
17893else
edfaf76d 17894 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 17895fi
d6e01aa5
KL
17896ac_res=`eval echo '${'$as_ac_Header'}'`
17897 { echo "$as_me:$LINENO: result: $ac_res" >&5
17898echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17899
17900fi
98418dba 17901if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 17902 cat >>confdefs.h <<_ACEOF
98418dba 17903#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 17904_ACEOF
d6e01aa5
KL
17905 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
17906echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 17907if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 17908 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 17909else
503d2be0 17910 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17911/* confdefs.h. */
17912_ACEOF
17913cat confdefs.h >>conftest.$ac_ext
17914cat >>conftest.$ac_ext <<_ACEOF
17915/* end confdefs.h. */
98418dba 17916#include <nlist.h>
b5de8dc0 17917
503d2be0
AS
17918int
17919main ()
17920{
98418dba
CW
17921static struct nlist ac_aggr;
17922if (ac_aggr.n_un.n_name)
17923return 0;
503d2be0
AS
17924 ;
17925 return 0;
17926}
17927_ACEOF
98418dba 17928rm -f conftest.$ac_objext
d6e01aa5
KL
17929if { (ac_try="$ac_compile"
17930case "(($ac_try" in
17931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17932 *) ac_try_echo=$ac_try;;
17933esac
17934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17935 (eval "$ac_compile") 2>conftest.er1
503d2be0 17936 ac_status=$?
edfaf76d
LK
17937 grep -v '^ *+' conftest.er1 >conftest.err
17938 rm -f conftest.er1
17939 cat conftest.err >&5
c0d27fcc 17940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17941 (exit $ac_status); } && {
17942 test -z "$ac_c_werror_flag" ||
17943 test ! -s conftest.err
17944 } && test -s conftest.$ac_objext; then
edfaf76d 17945 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
17946else
17947 echo "$as_me: failed program was:" >&5
19650fd6
AS
17948sed 's/^/| /' conftest.$ac_ext >&5
17949
d6e01aa5 17950 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17951/* confdefs.h. */
17952_ACEOF
17953cat confdefs.h >>conftest.$ac_ext
17954cat >>conftest.$ac_ext <<_ACEOF
17955/* end confdefs.h. */
6bae0ccf
DL
17956#include <nlist.h>
17957
17958int
17959main ()
17960{
17961static struct nlist ac_aggr;
17962if (sizeof ac_aggr.n_un.n_name)
17963return 0;
17964 ;
17965 return 0;
17966}
17967_ACEOF
17968rm -f conftest.$ac_objext
d6e01aa5
KL
17969if { (ac_try="$ac_compile"
17970case "(($ac_try" in
17971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17972 *) ac_try_echo=$ac_try;;
17973esac
17974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17975 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 17976 ac_status=$?
edfaf76d
LK
17977 grep -v '^ *+' conftest.er1 >conftest.err
17978 rm -f conftest.er1
17979 cat conftest.err >&5
6bae0ccf 17980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17981 (exit $ac_status); } && {
17982 test -z "$ac_c_werror_flag" ||
17983 test ! -s conftest.err
17984 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
17985 ac_cv_member_struct_nlist_n_un_n_name=yes
17986else
17987 echo "$as_me: failed program was:" >&5
19650fd6
AS
17988sed 's/^/| /' conftest.$ac_ext >&5
17989
d6e01aa5 17990 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 17991fi
d6e01aa5
KL
17992
17993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 17994fi
d6e01aa5
KL
17995
17996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 17997fi
d6e01aa5
KL
17998{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
17999echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 18000if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18001
c0d27fcc 18002cat >>confdefs.h <<_ACEOF
98418dba 18003#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18004_ACEOF
b5de8dc0 18005
c0d27fcc
MR
18006
18007cat >>confdefs.h <<\_ACEOF
98418dba 18008#define NLIST_NAME_UNION 1
c0d27fcc 18009_ACEOF
b5de8dc0 18010
98418dba 18011fi
b5de8dc0 18012
c0d27fcc 18013
98418dba 18014fi
c0d27fcc 18015
98418dba 18016done
b5de8dc0 18017
98418dba
CW
18018fi
18019done
b5de8dc0 18020
c0d27fcc 18021
98418dba 18022# Some definitions of getloadavg require that the program be installed setgid.
d6e01aa5
KL
18023{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18024echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
18025if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
18026 echo $ECHO_N "(cached) $ECHO_C" >&6
18027else
18028 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18029/* confdefs.h. */
18030_ACEOF
18031cat confdefs.h >>conftest.$ac_ext
18032cat >>conftest.$ac_ext <<_ACEOF
18033/* end confdefs.h. */
6bae0ccf 18034#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18035#ifdef LDAV_PRIVILEGED
18036Yowza Am I SETGID yet
18037#endif
18038_ACEOF
18039if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18040 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18041 ac_cv_func_getloadavg_setgid=yes
18042else
18043 ac_cv_func_getloadavg_setgid=no
18044fi
18045rm -f conftest*
b5de8dc0 18046
98418dba 18047fi
d6e01aa5
KL
18048{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18049echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18050if test $ac_cv_func_getloadavg_setgid = yes; then
18051 NEED_SETGID=true
b5de8dc0 18052
c0d27fcc 18053cat >>confdefs.h <<\_ACEOF
98418dba 18054#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18055_ACEOF
98418dba 18056
b5de8dc0 18057else
98418dba 18058 NEED_SETGID=false
b5de8dc0 18059fi
98418dba
CW
18060
18061if test $ac_cv_func_getloadavg_setgid = yes; then
d6e01aa5
KL
18062 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18063echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
18064if test "${ac_cv_group_kmem+set}" = set; then
18065 echo $ECHO_N "(cached) $ECHO_C" >&6
18066else
18067 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18068 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18069 # If we got an error (system does not support symlinks), try without -L.
18070 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
18071 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18072 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18073 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18074 / /s/.* //;p;'`
18075
b5de8dc0 18076fi
d6e01aa5
KL
18077{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18078echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18079 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18080fi
98418dba
CW
18081if test "x$ac_save_LIBS" = x; then
18082 GETLOADAVG_LIBS=$LIBS
18083else
18084 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18085fi
98418dba 18086LIBS=$ac_save_LIBS
b5de8dc0 18087
c0d27fcc
MR
18088
18089
d6e01aa5
KL
18090{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18091echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18092if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 18093 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18094else
b936fae4 18095 while :; do
503d2be0 18096 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18097/* confdefs.h. */
18098_ACEOF
18099cat confdefs.h >>conftest.$ac_ext
18100cat >>conftest.$ac_ext <<_ACEOF
18101/* end confdefs.h. */
cffe4909 18102#include <stdio.h>
503d2be0
AS
18103int
18104main ()
18105{
cffe4909 18106return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18107 ;
18108 return 0;
18109}
18110_ACEOF
d6e01aa5
KL
18111rm -f conftest.$ac_objext conftest$ac_exeext
18112if { (ac_try="$ac_link"
18113case "(($ac_try" in
18114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18115 *) ac_try_echo=$ac_try;;
18116esac
18117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18118 (eval "$ac_link") 2>conftest.er1
b936fae4 18119 ac_status=$?
edfaf76d
LK
18120 grep -v '^ *+' conftest.er1 >conftest.err
18121 rm -f conftest.er1
18122 cat conftest.err >&5
c0d27fcc 18123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18124 (exit $ac_status); } && {
18125 test -z "$ac_c_werror_flag" ||
18126 test ! -s conftest.err
18127 } && test -s conftest$ac_exeext &&
18128 $as_test_x conftest$ac_exeext; then
18129 ac_cv_sys_largefile_source=no; break
b936fae4
AS
18130else
18131 echo "$as_me: failed program was:" >&5
19650fd6
AS
18132sed 's/^/| /' conftest.$ac_ext >&5
18133
d6e01aa5 18134
b936fae4 18135fi
d6e01aa5
KL
18136
18137rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18138 conftest$ac_exeext conftest.$ac_ext
b936fae4 18139 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18140/* confdefs.h. */
18141_ACEOF
18142cat confdefs.h >>conftest.$ac_ext
18143cat >>conftest.$ac_ext <<_ACEOF
18144/* end confdefs.h. */
b936fae4 18145#define _LARGEFILE_SOURCE 1
cffe4909 18146#include <stdio.h>
b936fae4
AS
18147int
18148main ()
18149{
cffe4909 18150return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18151 ;
18152 return 0;
18153}
18154_ACEOF
d6e01aa5
KL
18155rm -f conftest.$ac_objext conftest$ac_exeext
18156if { (ac_try="$ac_link"
18157case "(($ac_try" in
18158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18159 *) ac_try_echo=$ac_try;;
18160esac
18161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18162 (eval "$ac_link") 2>conftest.er1
b936fae4 18163 ac_status=$?
edfaf76d
LK
18164 grep -v '^ *+' conftest.er1 >conftest.err
18165 rm -f conftest.er1
18166 cat conftest.err >&5
c0d27fcc 18167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18168 (exit $ac_status); } && {
18169 test -z "$ac_c_werror_flag" ||
18170 test ! -s conftest.err
18171 } && test -s conftest$ac_exeext &&
18172 $as_test_x conftest$ac_exeext; then
b936fae4
AS
18173 ac_cv_sys_largefile_source=1; break
18174else
18175 echo "$as_me: failed program was:" >&5
19650fd6
AS
18176sed 's/^/| /' conftest.$ac_ext >&5
18177
d6e01aa5 18178
b936fae4 18179fi
d6e01aa5
KL
18180
18181rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18182 conftest$ac_exeext conftest.$ac_ext
18183 ac_cv_sys_largefile_source=unknown
b936fae4
AS
18184 break
18185done
18186fi
d6e01aa5
KL
18187{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18188echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
18189case $ac_cv_sys_largefile_source in #(
18190 no | unknown) ;;
18191 *)
c0d27fcc 18192cat >>confdefs.h <<_ACEOF
b936fae4 18193#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 18194_ACEOF
d6e01aa5
KL
18195;;
18196esac
b936fae4 18197rm -f conftest*
4c343001 18198
b936fae4
AS
18199# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18200# in glibc 2.1.3, but that breaks too many other things.
18201# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
d6e01aa5 18202if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 18203
c0d27fcc 18204cat >>confdefs.h <<\_ACEOF
b936fae4 18205#define HAVE_FSEEKO 1
c0d27fcc 18206_ACEOF
b936fae4 18207
4c343001
DL
18208fi
18209
c0d27fcc 18210
52dbaac8
PE
18211# Configure getopt.
18212# getopt.m4 serial 10
18213
18214# The getopt module assume you want GNU getopt, with getopt_long etc,
18215# rather than vanilla POSIX getopt. This means your your code should
18216# always include <getopt.h> for the getopt prototypes.
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228# Prerequisites of lib/getopt*.
18229
18230
18231
10a3b1a1 18232
52dbaac8
PE
18233 GETOPT_H=
18234
18235for ac_header in getopt.h
18236do
18237as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
18238if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18239 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18240echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18241if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18242 echo $ECHO_N "(cached) $ECHO_C" >&6
18243fi
d6e01aa5
KL
18244ac_res=`eval echo '${'$as_ac_Header'}'`
18245 { echo "$as_me:$LINENO: result: $ac_res" >&5
18246echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18247else
18248 # Is the header compilable?
d6e01aa5
KL
18249{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18250echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
18251cat >conftest.$ac_ext <<_ACEOF
18252/* confdefs.h. */
18253_ACEOF
18254cat confdefs.h >>conftest.$ac_ext
18255cat >>conftest.$ac_ext <<_ACEOF
18256/* end confdefs.h. */
18257$ac_includes_default
18258#include <$ac_header>
18259_ACEOF
18260rm -f conftest.$ac_objext
d6e01aa5
KL
18261if { (ac_try="$ac_compile"
18262case "(($ac_try" in
18263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18264 *) ac_try_echo=$ac_try;;
18265esac
18266eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18267 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18268 ac_status=$?
18269 grep -v '^ *+' conftest.er1 >conftest.err
18270 rm -f conftest.er1
18271 cat conftest.err >&5
18272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18273 (exit $ac_status); } && {
18274 test -z "$ac_c_werror_flag" ||
18275 test ! -s conftest.err
18276 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18277 ac_header_compiler=yes
18278else
18279 echo "$as_me: failed program was:" >&5
18280sed 's/^/| /' conftest.$ac_ext >&5
18281
d6e01aa5 18282 ac_header_compiler=no
52dbaac8 18283fi
d6e01aa5
KL
18284
18285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18286{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18287echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
18288
18289# Is the header present?
d6e01aa5
KL
18290{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18291echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
18292cat >conftest.$ac_ext <<_ACEOF
18293/* confdefs.h. */
18294_ACEOF
18295cat confdefs.h >>conftest.$ac_ext
18296cat >>conftest.$ac_ext <<_ACEOF
18297/* end confdefs.h. */
18298#include <$ac_header>
18299_ACEOF
d6e01aa5
KL
18300if { (ac_try="$ac_cpp conftest.$ac_ext"
18301case "(($ac_try" in
18302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18303 *) ac_try_echo=$ac_try;;
18304esac
18305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18306 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
18307 ac_status=$?
18308 grep -v '^ *+' conftest.er1 >conftest.err
18309 rm -f conftest.er1
18310 cat conftest.err >&5
18311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18312 (exit $ac_status); } >/dev/null && {
18313 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18314 test ! -s conftest.err
18315 }; then
52dbaac8
PE
18316 ac_header_preproc=yes
18317else
18318 echo "$as_me: failed program was:" >&5
18319sed 's/^/| /' conftest.$ac_ext >&5
18320
18321 ac_header_preproc=no
18322fi
d6e01aa5 18323
52dbaac8 18324rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
18325{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18326echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
18327
18328# So? What about this header?
18329case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18330 yes:no: )
18331 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18332echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18333 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18334echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18335 ac_header_preproc=yes
18336 ;;
18337 no:yes:* )
18338 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18339echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18340 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18341echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18342 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18343echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18344 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18345echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
18346 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18347echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18348 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18349echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 18350
52dbaac8
PE
18351 ;;
18352esac
d6e01aa5
KL
18353{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18354echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18355if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18356 echo $ECHO_N "(cached) $ECHO_C" >&6
18357else
18358 eval "$as_ac_Header=\$ac_header_preproc"
18359fi
d6e01aa5
KL
18360ac_res=`eval echo '${'$as_ac_Header'}'`
18361 { echo "$as_me:$LINENO: result: $ac_res" >&5
18362echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18363
18364fi
18365if test `eval echo '${'$as_ac_Header'}'` = yes; then
18366 cat >>confdefs.h <<_ACEOF
18367#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18368_ACEOF
18369
18370else
18371 GETOPT_H=getopt.h
18372fi
18373
18374done
18375
18376 if test -z "$GETOPT_H"; then
18377
18378for ac_func in getopt_long_only
18379do
18380as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
18381{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18382echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18383if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18384 echo $ECHO_N "(cached) $ECHO_C" >&6
18385else
18386 cat >conftest.$ac_ext <<_ACEOF
18387/* confdefs.h. */
18388_ACEOF
18389cat confdefs.h >>conftest.$ac_ext
18390cat >>conftest.$ac_ext <<_ACEOF
18391/* end confdefs.h. */
18392/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18393 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18394#define $ac_func innocuous_$ac_func
18395
18396/* System header to define __stub macros and hopefully few prototypes,
18397 which can conflict with char $ac_func (); below.
18398 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18399 <limits.h> exists even on freestanding compilers. */
18400
18401#ifdef __STDC__
18402# include <limits.h>
18403#else
18404# include <assert.h>
18405#endif
18406
18407#undef $ac_func
18408
d6e01aa5
KL
18409/* Override any GCC internal prototype to avoid an error.
18410 Use char because int might match the return type of a GCC
18411 builtin and then its argument prototype would still apply. */
52dbaac8
PE
18412#ifdef __cplusplus
18413extern "C"
52dbaac8 18414#endif
52dbaac8
PE
18415char $ac_func ();
18416/* The GNU C library defines this for functions which it implements
18417 to always fail with ENOSYS. Some functions are actually named
18418 something starting with __ and the normal name is an alias. */
d6e01aa5 18419#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 18420choke me
52dbaac8
PE
18421#endif
18422
18423int
18424main ()
18425{
d6e01aa5 18426return $ac_func ();
52dbaac8
PE
18427 ;
18428 return 0;
18429}
18430_ACEOF
18431rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
18432if { (ac_try="$ac_link"
18433case "(($ac_try" in
18434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18435 *) ac_try_echo=$ac_try;;
18436esac
18437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18438 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
18439 ac_status=$?
18440 grep -v '^ *+' conftest.er1 >conftest.err
18441 rm -f conftest.er1
18442 cat conftest.err >&5
18443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18444 (exit $ac_status); } && {
18445 test -z "$ac_c_werror_flag" ||
18446 test ! -s conftest.err
18447 } && test -s conftest$ac_exeext &&
18448 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
18449 eval "$as_ac_var=yes"
18450else
18451 echo "$as_me: failed program was:" >&5
18452sed 's/^/| /' conftest.$ac_ext >&5
18453
d6e01aa5 18454 eval "$as_ac_var=no"
52dbaac8 18455fi
d6e01aa5
KL
18456
18457rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
18458 conftest$ac_exeext conftest.$ac_ext
18459fi
d6e01aa5
KL
18460ac_res=`eval echo '${'$as_ac_var'}'`
18461 { echo "$as_me:$LINENO: result: $ac_res" >&5
18462echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18463if test `eval echo '${'$as_ac_var'}'` = yes; then
18464 cat >>confdefs.h <<_ACEOF
18465#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18466_ACEOF
18467
18468else
18469 GETOPT_H=getopt.h
18470fi
18471done
18472
18473 fi
18474
18475 if test -z "$GETOPT_H"; then
d6e01aa5
KL
18476 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
18477echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
18478if test "${ac_cv_have_decl_optreset+set}" = set; then
18479 echo $ECHO_N "(cached) $ECHO_C" >&6
18480else
18481 cat >conftest.$ac_ext <<_ACEOF
18482/* confdefs.h. */
18483_ACEOF
18484cat confdefs.h >>conftest.$ac_ext
18485cat >>conftest.$ac_ext <<_ACEOF
18486/* end confdefs.h. */
18487#include <getopt.h>
18488
18489int
18490main ()
18491{
18492#ifndef optreset
d6e01aa5 18493 (void) optreset;
52dbaac8
PE
18494#endif
18495
18496 ;
18497 return 0;
18498}
18499_ACEOF
18500rm -f conftest.$ac_objext
d6e01aa5
KL
18501if { (ac_try="$ac_compile"
18502case "(($ac_try" in
18503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18504 *) ac_try_echo=$ac_try;;
18505esac
18506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18507 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18508 ac_status=$?
18509 grep -v '^ *+' conftest.er1 >conftest.err
18510 rm -f conftest.er1
18511 cat conftest.err >&5
18512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18513 (exit $ac_status); } && {
18514 test -z "$ac_c_werror_flag" ||
18515 test ! -s conftest.err
18516 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18517 ac_cv_have_decl_optreset=yes
18518else
18519 echo "$as_me: failed program was:" >&5
18520sed 's/^/| /' conftest.$ac_ext >&5
18521
d6e01aa5 18522 ac_cv_have_decl_optreset=no
52dbaac8 18523fi
d6e01aa5
KL
18524
18525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 18526fi
d6e01aa5
KL
18527{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
18528echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
18529if test $ac_cv_have_decl_optreset = yes; then
18530 GETOPT_H=getopt.h
18531fi
18532
18533 fi
18534
18535 if test -z "$GETOPT_H"; then
d6e01aa5
KL
18536 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
18537echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
18538if test "${gl_cv_func_gnu_getopt+set}" = set; then
18539 echo $ECHO_N "(cached) $ECHO_C" >&6
18540else
18541 if test "$cross_compiling" = yes; then
d6e01aa5
KL
18542 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
18543echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
18544if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
18545 echo $ECHO_N "(cached) $ECHO_C" >&6
18546else
18547 cat >conftest.$ac_ext <<_ACEOF
18548/* confdefs.h. */
18549_ACEOF
18550cat confdefs.h >>conftest.$ac_ext
18551cat >>conftest.$ac_ext <<_ACEOF
18552/* end confdefs.h. */
18553#include <getopt.h>
18554
18555int
18556main ()
18557{
18558#ifndef getopt_clip
d6e01aa5 18559 (void) getopt_clip;
52dbaac8
PE
18560#endif
18561
18562 ;
18563 return 0;
18564}
18565_ACEOF
18566rm -f conftest.$ac_objext
d6e01aa5
KL
18567if { (ac_try="$ac_compile"
18568case "(($ac_try" in
18569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18570 *) ac_try_echo=$ac_try;;
18571esac
18572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18573 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18574 ac_status=$?
18575 grep -v '^ *+' conftest.er1 >conftest.err
18576 rm -f conftest.er1
18577 cat conftest.err >&5
18578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18579 (exit $ac_status); } && {
18580 test -z "$ac_c_werror_flag" ||
18581 test ! -s conftest.err
18582 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18583 ac_cv_have_decl_getopt_clip=yes
18584else
18585 echo "$as_me: failed program was:" >&5
18586sed 's/^/| /' conftest.$ac_ext >&5
18587
d6e01aa5 18588 ac_cv_have_decl_getopt_clip=no
52dbaac8 18589fi
d6e01aa5
KL
18590
18591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 18592fi
d6e01aa5
KL
18593{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
18594echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
18595if test $ac_cv_have_decl_getopt_clip = yes; then
18596 gl_cv_func_gnu_getopt=no
18597else
18598 gl_cv_func_gnu_getopt=yes
18599fi
18600
18601else
18602 cat >conftest.$ac_ext <<_ACEOF
18603/* confdefs.h. */
18604_ACEOF
18605cat confdefs.h >>conftest.$ac_ext
18606cat >>conftest.$ac_ext <<_ACEOF
18607/* end confdefs.h. */
18608#include <getopt.h>
18609int
18610main ()
18611{
18612
18613 char *myargv[3];
18614 myargv[0] = "conftest";
18615 myargv[1] = "-+";
18616 myargv[2] = 0;
18617 return getopt (2, myargv, "+a") != '?';
18618
18619 ;
18620 return 0;
18621}
18622_ACEOF
18623rm -f conftest$ac_exeext
d6e01aa5
KL
18624if { (ac_try="$ac_link"
18625case "(($ac_try" in
18626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18627 *) ac_try_echo=$ac_try;;
18628esac
18629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18630 (eval "$ac_link") 2>&5
52dbaac8
PE
18631 ac_status=$?
18632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18633 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
18634 { (case "(($ac_try" in
18635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18636 *) ac_try_echo=$ac_try;;
18637esac
18638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18639 (eval "$ac_try") 2>&5
52dbaac8
PE
18640 ac_status=$?
18641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18642 (exit $ac_status); }; }; then
18643 gl_cv_func_gnu_getopt=yes
18644else
18645 echo "$as_me: program exited with status $ac_status" >&5
18646echo "$as_me: failed program was:" >&5
18647sed 's/^/| /' conftest.$ac_ext >&5
18648
18649( exit $ac_status )
18650gl_cv_func_gnu_getopt=no
18651fi
d6e01aa5 18652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 18653fi
d6e01aa5
KL
18654
18655
52dbaac8 18656fi
d6e01aa5
KL
18657{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
18658echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
18659 if test "$gl_cv_func_gnu_getopt" = "no"; then
18660 GETOPT_H=getopt.h
18661 fi
18662 fi
18663
18664
18665
18666 if test -n "$GETOPT_H"; then
18667
18668
18669 GETOPT_H=getopt.h
18670
18671cat >>confdefs.h <<\_ACEOF
18672#define __GETOPT_PREFIX rpl_
18673_ACEOF
18674
18675
18676
18677 :
18678 GETOPTOBJS='getopt.o getopt1.o'
18679
18680fi
18681
18682
18683
18684
d6e01aa5
KL
18685{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
18686echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
18687if test "${ac_cv_func_getpgrp_void+set}" = set; then
18688 echo $ECHO_N "(cached) $ECHO_C" >&6
18689else
18690 # Use it with a single arg.
18691cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18692/* confdefs.h. */
18693_ACEOF
18694cat confdefs.h >>conftest.$ac_ext
18695cat >>conftest.$ac_ext <<_ACEOF
18696/* end confdefs.h. */
cd958eb3
MB
18697$ac_includes_default
18698int
18699main ()
18700{
18701getpgrp (0);
18702 ;
18703 return 0;
18704}
18705_ACEOF
18706rm -f conftest.$ac_objext
d6e01aa5
KL
18707if { (ac_try="$ac_compile"
18708case "(($ac_try" in
18709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18710 *) ac_try_echo=$ac_try;;
18711esac
18712eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18713 (eval "$ac_compile") 2>conftest.er1
cd958eb3 18714 ac_status=$?
edfaf76d
LK
18715 grep -v '^ *+' conftest.er1 >conftest.err
18716 rm -f conftest.er1
18717 cat conftest.err >&5
cd958eb3 18718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18719 (exit $ac_status); } && {
18720 test -z "$ac_c_werror_flag" ||
18721 test ! -s conftest.err
18722 } && test -s conftest.$ac_objext; then
cd958eb3
MB
18723 ac_cv_func_getpgrp_void=no
18724else
18725 echo "$as_me: failed program was:" >&5
19650fd6
AS
18726sed 's/^/| /' conftest.$ac_ext >&5
18727
d6e01aa5 18728 ac_cv_func_getpgrp_void=yes
cd958eb3 18729fi
d6e01aa5
KL
18730
18731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
18732
18733fi
d6e01aa5
KL
18734{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
18735echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
18736if test $ac_cv_func_getpgrp_void = yes; then
18737
18738cat >>confdefs.h <<\_ACEOF
18739#define GETPGRP_VOID 1
18740_ACEOF
18741
18742fi
18743
18744
973a76b1
DL
18745
18746for ac_func in strftime
18747do
18748as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
18749{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18750echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18751if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
18752 echo $ECHO_N "(cached) $ECHO_C" >&6
18753else
18754 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18755/* confdefs.h. */
18756_ACEOF
18757cat confdefs.h >>conftest.$ac_ext
18758cat >>conftest.$ac_ext <<_ACEOF
18759/* end confdefs.h. */
edfaf76d
LK
18760/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18761 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18762#define $ac_func innocuous_$ac_func
18763
973a76b1 18764/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18765 which can conflict with char $ac_func (); below.
18766 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18767 <limits.h> exists even on freestanding compilers. */
edfaf76d 18768
19650fd6
AS
18769#ifdef __STDC__
18770# include <limits.h>
18771#else
18772# include <assert.h>
18773#endif
edfaf76d
LK
18774
18775#undef $ac_func
18776
d6e01aa5
KL
18777/* Override any GCC internal prototype to avoid an error.
18778 Use char because int might match the return type of a GCC
18779 builtin and then its argument prototype would still apply. */
973a76b1
DL
18780#ifdef __cplusplus
18781extern "C"
973a76b1 18782#endif
973a76b1
DL
18783char $ac_func ();
18784/* The GNU C library defines this for functions which it implements
18785 to always fail with ENOSYS. Some functions are actually named
18786 something starting with __ and the normal name is an alias. */
d6e01aa5 18787#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 18788choke me
973a76b1
DL
18789#endif
18790
19650fd6
AS
18791int
18792main ()
18793{
d6e01aa5 18794return $ac_func ();
973a76b1
DL
18795 ;
18796 return 0;
18797}
18798_ACEOF
18799rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
18800if { (ac_try="$ac_link"
18801case "(($ac_try" in
18802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18803 *) ac_try_echo=$ac_try;;
18804esac
18805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18806 (eval "$ac_link") 2>conftest.er1
973a76b1 18807 ac_status=$?
edfaf76d
LK
18808 grep -v '^ *+' conftest.er1 >conftest.err
18809 rm -f conftest.er1
18810 cat conftest.err >&5
973a76b1 18811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18812 (exit $ac_status); } && {
18813 test -z "$ac_c_werror_flag" ||
18814 test ! -s conftest.err
18815 } && test -s conftest$ac_exeext &&
18816 $as_test_x conftest$ac_exeext; then
973a76b1
DL
18817 eval "$as_ac_var=yes"
18818else
18819 echo "$as_me: failed program was:" >&5
19650fd6
AS
18820sed 's/^/| /' conftest.$ac_ext >&5
18821
d6e01aa5 18822 eval "$as_ac_var=no"
973a76b1 18823fi
d6e01aa5
KL
18824
18825rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18826 conftest$ac_exeext conftest.$ac_ext
973a76b1 18827fi
d6e01aa5
KL
18828ac_res=`eval echo '${'$as_ac_var'}'`
18829 { echo "$as_me:$LINENO: result: $ac_res" >&5
18830echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
18831if test `eval echo '${'$as_ac_var'}'` = yes; then
18832 cat >>confdefs.h <<_ACEOF
18833#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18834_ACEOF
18835
18836else
18837 # strftime is in -lintl on SCO UNIX.
d6e01aa5
KL
18838{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
18839echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
18840if test "${ac_cv_lib_intl_strftime+set}" = set; then
18841 echo $ECHO_N "(cached) $ECHO_C" >&6
18842else
18843 ac_check_lib_save_LIBS=$LIBS
18844LIBS="-lintl $LIBS"
18845cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18846/* confdefs.h. */
18847_ACEOF
18848cat confdefs.h >>conftest.$ac_ext
18849cat >>conftest.$ac_ext <<_ACEOF
18850/* end confdefs.h. */
973a76b1 18851
d6e01aa5
KL
18852/* Override any GCC internal prototype to avoid an error.
18853 Use char because int might match the return type of a GCC
18854 builtin and then its argument prototype would still apply. */
973a76b1
DL
18855#ifdef __cplusplus
18856extern "C"
18857#endif
973a76b1
DL
18858char strftime ();
18859int
18860main ()
18861{
d6e01aa5 18862return strftime ();
973a76b1
DL
18863 ;
18864 return 0;
18865}
18866_ACEOF
18867rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
18868if { (ac_try="$ac_link"
18869case "(($ac_try" in
18870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18871 *) ac_try_echo=$ac_try;;
18872esac
18873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18874 (eval "$ac_link") 2>conftest.er1
973a76b1 18875 ac_status=$?
edfaf76d
LK
18876 grep -v '^ *+' conftest.er1 >conftest.err
18877 rm -f conftest.er1
18878 cat conftest.err >&5
973a76b1 18879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18880 (exit $ac_status); } && {
18881 test -z "$ac_c_werror_flag" ||
18882 test ! -s conftest.err
18883 } && test -s conftest$ac_exeext &&
18884 $as_test_x conftest$ac_exeext; then
973a76b1
DL
18885 ac_cv_lib_intl_strftime=yes
18886else
18887 echo "$as_me: failed program was:" >&5
19650fd6
AS
18888sed 's/^/| /' conftest.$ac_ext >&5
18889
d6e01aa5 18890 ac_cv_lib_intl_strftime=no
973a76b1 18891fi
d6e01aa5
KL
18892
18893rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18894 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
18895LIBS=$ac_check_lib_save_LIBS
18896fi
d6e01aa5
KL
18897{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
18898echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
18899if test $ac_cv_lib_intl_strftime = yes; then
18900 cat >>confdefs.h <<\_ACEOF
18901#define HAVE_STRFTIME 1
18902_ACEOF
18903
18904LIBS="-lintl $LIBS"
18905fi
18906
18907fi
18908done
18909
18910
b936fae4
AS
18911# UNIX98 PTYs.
18912
18913for ac_func in grantpt
503d2be0
AS
18914do
18915as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
18916{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18917echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18918if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 18919 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18920else
503d2be0 18921 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18922/* confdefs.h. */
18923_ACEOF
18924cat confdefs.h >>conftest.$ac_ext
18925cat >>conftest.$ac_ext <<_ACEOF
18926/* end confdefs.h. */
edfaf76d
LK
18927/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18928 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18929#define $ac_func innocuous_$ac_func
18930
503d2be0 18931/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18932 which can conflict with char $ac_func (); below.
18933 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18934 <limits.h> exists even on freestanding compilers. */
edfaf76d 18935
19650fd6
AS
18936#ifdef __STDC__
18937# include <limits.h>
18938#else
18939# include <assert.h>
18940#endif
edfaf76d
LK
18941
18942#undef $ac_func
18943
d6e01aa5
KL
18944/* Override any GCC internal prototype to avoid an error.
18945 Use char because int might match the return type of a GCC
18946 builtin and then its argument prototype would still apply. */
503d2be0
AS
18947#ifdef __cplusplus
18948extern "C"
18949#endif
503d2be0 18950char $ac_func ();
503d2be0
AS
18951/* The GNU C library defines this for functions which it implements
18952 to always fail with ENOSYS. Some functions are actually named
18953 something starting with __ and the normal name is an alias. */
d6e01aa5 18954#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 18955choke me
503d2be0 18956#endif
4c343001 18957
19650fd6
AS
18958int
18959main ()
18960{
d6e01aa5 18961return $ac_func ();
503d2be0
AS
18962 ;
18963 return 0;
18964}
18965_ACEOF
18966rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
18967if { (ac_try="$ac_link"
18968case "(($ac_try" in
18969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18970 *) ac_try_echo=$ac_try;;
18971esac
18972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18973 (eval "$ac_link") 2>conftest.er1
503d2be0 18974 ac_status=$?
edfaf76d
LK
18975 grep -v '^ *+' conftest.er1 >conftest.err
18976 rm -f conftest.er1
18977 cat conftest.err >&5
c0d27fcc 18978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18979 (exit $ac_status); } && {
18980 test -z "$ac_c_werror_flag" ||
18981 test ! -s conftest.err
18982 } && test -s conftest$ac_exeext &&
18983 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18984 eval "$as_ac_var=yes"
18985else
18986 echo "$as_me: failed program was:" >&5
19650fd6
AS
18987sed 's/^/| /' conftest.$ac_ext >&5
18988
d6e01aa5 18989 eval "$as_ac_var=no"
503d2be0 18990fi
d6e01aa5
KL
18991
18992rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18993 conftest$ac_exeext conftest.$ac_ext
503d2be0 18994fi
d6e01aa5
KL
18995ac_res=`eval echo '${'$as_ac_var'}'`
18996 { echo "$as_me:$LINENO: result: $ac_res" >&5
18997echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18998if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18999 cat >>confdefs.h <<_ACEOF
503d2be0 19000#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19001_ACEOF
4c343001
DL
19002
19003fi
503d2be0
AS
19004done
19005
c0d27fcc 19006
b936fae4 19007# PTY-related GNU extensions.
4c343001 19008
b936fae4
AS
19009for ac_func in getpt
19010do
19011as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
19012{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19013echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19014if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19015 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19016else
b936fae4 19017 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19018/* confdefs.h. */
19019_ACEOF
19020cat confdefs.h >>conftest.$ac_ext
19021cat >>conftest.$ac_ext <<_ACEOF
19022/* end confdefs.h. */
edfaf76d
LK
19023/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19024 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19025#define $ac_func innocuous_$ac_func
19026
087121cc 19027/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19028 which can conflict with char $ac_func (); below.
19029 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19030 <limits.h> exists even on freestanding compilers. */
edfaf76d 19031
19650fd6
AS
19032#ifdef __STDC__
19033# include <limits.h>
19034#else
19035# include <assert.h>
19036#endif
edfaf76d
LK
19037
19038#undef $ac_func
19039
d6e01aa5
KL
19040/* Override any GCC internal prototype to avoid an error.
19041 Use char because int might match the return type of a GCC
19042 builtin and then its argument prototype would still apply. */
503d2be0
AS
19043#ifdef __cplusplus
19044extern "C"
19045#endif
503d2be0 19046char $ac_func ();
087121cc
GM
19047/* The GNU C library defines this for functions which it implements
19048 to always fail with ENOSYS. Some functions are actually named
19049 something starting with __ and the normal name is an alias. */
d6e01aa5 19050#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19051choke me
087121cc
GM
19052#endif
19053
19650fd6
AS
19054int
19055main ()
19056{
d6e01aa5 19057return $ac_func ();
503d2be0
AS
19058 ;
19059 return 0;
19060}
19061_ACEOF
19062rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19063if { (ac_try="$ac_link"
19064case "(($ac_try" in
19065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19066 *) ac_try_echo=$ac_try;;
19067esac
19068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19069 (eval "$ac_link") 2>conftest.er1
503d2be0 19070 ac_status=$?
edfaf76d
LK
19071 grep -v '^ *+' conftest.er1 >conftest.err
19072 rm -f conftest.er1
19073 cat conftest.err >&5
c0d27fcc 19074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19075 (exit $ac_status); } && {
19076 test -z "$ac_c_werror_flag" ||
19077 test ! -s conftest.err
19078 } && test -s conftest$ac_exeext &&
19079 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19080 eval "$as_ac_var=yes"
19081else
19082 echo "$as_me: failed program was:" >&5
19650fd6
AS
19083sed 's/^/| /' conftest.$ac_ext >&5
19084
d6e01aa5 19085 eval "$as_ac_var=no"
503d2be0 19086fi
d6e01aa5
KL
19087
19088rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19089 conftest$ac_exeext conftest.$ac_ext
503d2be0 19090fi
d6e01aa5
KL
19091ac_res=`eval echo '${'$as_ac_var'}'`
19092 { echo "$as_me:$LINENO: result: $ac_res" >&5
19093echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19094if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19095 cat >>confdefs.h <<_ACEOF
503d2be0 19096#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19097_ACEOF
087121cc 19098
087121cc
GM
19099fi
19100done
19101
c0d27fcc 19102
ba4481b5
DL
19103# Check this now, so that we will NOT find the above functions in ncurses.
19104# That is because we have not set up to link ncurses in lib-src.
19105# It's better to believe a function is not available
19106# than to expect to find it in ncurses.
503d2be0 19107
d6e01aa5
KL
19108{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
19109echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
19110if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
19111 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19112else
503d2be0 19113 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19114LIBS="-lncurses $LIBS"
503d2be0 19115cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19116/* confdefs.h. */
19117_ACEOF
19118cat confdefs.h >>conftest.$ac_ext
19119cat >>conftest.$ac_ext <<_ACEOF
19120/* end confdefs.h. */
503d2be0 19121
d6e01aa5
KL
19122/* Override any GCC internal prototype to avoid an error.
19123 Use char because int might match the return type of a GCC
19124 builtin and then its argument prototype would still apply. */
503d2be0
AS
19125#ifdef __cplusplus
19126extern "C"
19127#endif
503d2be0
AS
19128char tparm ();
19129int
19130main ()
19131{
d6e01aa5 19132return tparm ();
503d2be0
AS
19133 ;
19134 return 0;
19135}
19136_ACEOF
19137rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19138if { (ac_try="$ac_link"
19139case "(($ac_try" in
19140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19141 *) ac_try_echo=$ac_try;;
19142esac
19143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19144 (eval "$ac_link") 2>conftest.er1
503d2be0 19145 ac_status=$?
edfaf76d
LK
19146 grep -v '^ *+' conftest.er1 >conftest.err
19147 rm -f conftest.er1
19148 cat conftest.err >&5
c0d27fcc 19149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19150 (exit $ac_status); } && {
19151 test -z "$ac_c_werror_flag" ||
19152 test ! -s conftest.err
19153 } && test -s conftest$ac_exeext &&
19154 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19155 ac_cv_lib_ncurses_tparm=yes
19156else
19157 echo "$as_me: failed program was:" >&5
19650fd6
AS
19158sed 's/^/| /' conftest.$ac_ext >&5
19159
d6e01aa5 19160 ac_cv_lib_ncurses_tparm=no
503d2be0 19161fi
d6e01aa5
KL
19162
19163rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19164 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19165LIBS=$ac_check_lib_save_LIBS
19166fi
d6e01aa5
KL
19167{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
19168echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 19169if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 19170 cat >>confdefs.h <<_ACEOF
503d2be0 19171#define HAVE_LIBNCURSES 1
c0d27fcc 19172_ACEOF
ba4481b5
DL
19173
19174 LIBS="-lncurses $LIBS"
19175
ba4481b5
DL
19176fi
19177
c0d27fcc 19178
bc3512d0
CY
19179# Do we have res_init, for detecting changes in /etc/resolv.conf?
19180
19181resolv=no
074767f2 19182cat >conftest.$ac_ext <<_ACEOF
bc3512d0
CY
19183/* confdefs.h. */
19184_ACEOF
19185cat confdefs.h >>conftest.$ac_ext
19186cat >>conftest.$ac_ext <<_ACEOF
19187/* end confdefs.h. */
074767f2
AS
19188#include <netinet/in.h>
19189#include <arpa/nameser.h>
19190#include <resolv.h>
bc3512d0
CY
19191int
19192main ()
19193{
074767f2 19194return res_init();
bc3512d0
CY
19195 ;
19196 return 0;
19197}
19198_ACEOF
19199rm -f conftest.$ac_objext conftest$ac_exeext
19200if { (ac_try="$ac_link"
19201case "(($ac_try" in
19202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19203 *) ac_try_echo=$ac_try;;
19204esac
19205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19206 (eval "$ac_link") 2>conftest.er1
19207 ac_status=$?
19208 grep -v '^ *+' conftest.er1 >conftest.err
19209 rm -f conftest.er1
19210 cat conftest.err >&5
19211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19212 (exit $ac_status); } && {
19213 test -z "$ac_c_werror_flag" ||
19214 test ! -s conftest.err
19215 } && test -s conftest$ac_exeext &&
19216 $as_test_x conftest$ac_exeext; then
074767f2 19217 have_res_init=yes
bc3512d0
CY
19218else
19219 echo "$as_me: failed program was:" >&5
19220sed 's/^/| /' conftest.$ac_ext >&5
19221
074767f2 19222 have_res_init=no
bc3512d0
CY
19223fi
19224
19225rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19226 conftest$ac_exeext conftest.$ac_ext
bc3512d0
CY
19227if test "$have_res_init" = no; then
19228 OLIBS="$LIBS"
19229 LIBS="$LIBS -lresolv"
19230 { echo "$as_me:$LINENO: checking for res_init with -lresolv" >&5
19231echo $ECHO_N "checking for res_init with -lresolv... $ECHO_C" >&6; }
19232 cat >conftest.$ac_ext <<_ACEOF
19233/* confdefs.h. */
19234_ACEOF
19235cat confdefs.h >>conftest.$ac_ext
19236cat >>conftest.$ac_ext <<_ACEOF
19237/* end confdefs.h. */
19238#include <netinet/in.h>
19239#include <arpa/nameser.h>
19240#include <resolv.h>
19241int
19242main ()
19243{
074767f2 19244return res_init();
bc3512d0
CY
19245 ;
19246 return 0;
19247}
19248_ACEOF
19249rm -f conftest.$ac_objext conftest$ac_exeext
19250if { (ac_try="$ac_link"
19251case "(($ac_try" in
19252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19253 *) ac_try_echo=$ac_try;;
19254esac
19255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19256 (eval "$ac_link") 2>conftest.er1
19257 ac_status=$?
19258 grep -v '^ *+' conftest.er1 >conftest.err
19259 rm -f conftest.er1
19260 cat conftest.err >&5
19261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19262 (exit $ac_status); } && {
19263 test -z "$ac_c_werror_flag" ||
19264 test ! -s conftest.err
19265 } && test -s conftest$ac_exeext &&
19266 $as_test_x conftest$ac_exeext; then
19267 have_res_init=yes
19268else
19269 echo "$as_me: failed program was:" >&5
19270sed 's/^/| /' conftest.$ac_ext >&5
19271
19272 have_res_init=no
19273fi
19274
19275rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19276 conftest$ac_exeext conftest.$ac_ext
19277 { echo "$as_me:$LINENO: result: $have_res_init" >&5
19278echo "${ECHO_T}$have_res_init" >&6; }
19279 if test "$have_res_init" = yes ; then
19280 resolv=yes
19281 fi
19282 LIBS="$OLIBS"
19283fi
19284
19285if test "$have_res_init" = yes; then
19286
19287cat >>confdefs.h <<\_ACEOF
19288#define HAVE_RES_INIT 1
19289_ACEOF
19290
19291fi
19292
84e70f78
KR
19293# Do we need the Hesiod library to provide the support routines?
19294if test "$with_hesiod" = yes ; then
19295 # Don't set $LIBS here -- see comments above.
d6e01aa5
KL
19296 { echo "$as_me:$LINENO: checking for res_send" >&5
19297echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
19298if test "${ac_cv_func_res_send+set}" = set; then
19299 echo $ECHO_N "(cached) $ECHO_C" >&6
19300else
19301 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19302/* confdefs.h. */
19303_ACEOF
19304cat confdefs.h >>conftest.$ac_ext
19305cat >>conftest.$ac_ext <<_ACEOF
19306/* end confdefs.h. */
edfaf76d
LK
19307/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
19308 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19309#define res_send innocuous_res_send
19310
84e70f78 19311/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19312 which can conflict with char res_send (); below.
19313 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19314 <limits.h> exists even on freestanding compilers. */
edfaf76d 19315
19650fd6
AS
19316#ifdef __STDC__
19317# include <limits.h>
19318#else
19319# include <assert.h>
19320#endif
edfaf76d
LK
19321
19322#undef res_send
19323
d6e01aa5
KL
19324/* Override any GCC internal prototype to avoid an error.
19325 Use char because int might match the return type of a GCC
19326 builtin and then its argument prototype would still apply. */
84e70f78
KR
19327#ifdef __cplusplus
19328extern "C"
19329#endif
84e70f78 19330char res_send ();
84e70f78
KR
19331/* The GNU C library defines this for functions which it implements
19332 to always fail with ENOSYS. Some functions are actually named
19333 something starting with __ and the normal name is an alias. */
d6e01aa5 19334#if defined __stub_res_send || defined __stub___res_send
84e70f78 19335choke me
cd958eb3
MB
19336#endif
19337
19650fd6
AS
19338int
19339main ()
19340{
d6e01aa5 19341return res_send ();
84e70f78
KR
19342 ;
19343 return 0;
19344}
19345_ACEOF
19346rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19347if { (ac_try="$ac_link"
19348case "(($ac_try" in
19349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19350 *) ac_try_echo=$ac_try;;
19351esac
19352eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19353 (eval "$ac_link") 2>conftest.er1
84e70f78 19354 ac_status=$?
edfaf76d
LK
19355 grep -v '^ *+' conftest.er1 >conftest.err
19356 rm -f conftest.er1
19357 cat conftest.err >&5
c0d27fcc 19358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19359 (exit $ac_status); } && {
19360 test -z "$ac_c_werror_flag" ||
19361 test ! -s conftest.err
19362 } && test -s conftest$ac_exeext &&
19363 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19364 ac_cv_func_res_send=yes
19365else
19366 echo "$as_me: failed program was:" >&5
19650fd6
AS
19367sed 's/^/| /' conftest.$ac_ext >&5
19368
d6e01aa5 19369 ac_cv_func_res_send=no
84e70f78 19370fi
d6e01aa5
KL
19371
19372rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19373 conftest$ac_exeext conftest.$ac_ext
84e70f78 19374fi
d6e01aa5
KL
19375{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
19376echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
19377if test $ac_cv_func_res_send = yes; then
19378 :
19379else
d6e01aa5
KL
19380 { echo "$as_me:$LINENO: checking for __res_send" >&5
19381echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
19382if test "${ac_cv_func___res_send+set}" = set; then
19383 echo $ECHO_N "(cached) $ECHO_C" >&6
19384else
19385 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19386/* confdefs.h. */
19387_ACEOF
19388cat confdefs.h >>conftest.$ac_ext
19389cat >>conftest.$ac_ext <<_ACEOF
19390/* end confdefs.h. */
edfaf76d
LK
19391/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
19392 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19393#define __res_send innocuous___res_send
19394
84e70f78 19395/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19396 which can conflict with char __res_send (); below.
19397 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19398 <limits.h> exists even on freestanding compilers. */
edfaf76d 19399
19650fd6
AS
19400#ifdef __STDC__
19401# include <limits.h>
19402#else
19403# include <assert.h>
19404#endif
edfaf76d
LK
19405
19406#undef __res_send
19407
d6e01aa5
KL
19408/* Override any GCC internal prototype to avoid an error.
19409 Use char because int might match the return type of a GCC
19410 builtin and then its argument prototype would still apply. */
84e70f78
KR
19411#ifdef __cplusplus
19412extern "C"
19413#endif
84e70f78 19414char __res_send ();
84e70f78
KR
19415/* The GNU C library defines this for functions which it implements
19416 to always fail with ENOSYS. Some functions are actually named
19417 something starting with __ and the normal name is an alias. */
d6e01aa5 19418#if defined __stub___res_send || defined __stub_____res_send
84e70f78 19419choke me
84e70f78
KR
19420#endif
19421
19650fd6
AS
19422int
19423main ()
19424{
d6e01aa5 19425return __res_send ();
84e70f78
KR
19426 ;
19427 return 0;
19428}
19429_ACEOF
19430rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19431if { (ac_try="$ac_link"
19432case "(($ac_try" in
19433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19434 *) ac_try_echo=$ac_try;;
19435esac
19436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19437 (eval "$ac_link") 2>conftest.er1
84e70f78 19438 ac_status=$?
edfaf76d
LK
19439 grep -v '^ *+' conftest.er1 >conftest.err
19440 rm -f conftest.er1
19441 cat conftest.err >&5
c0d27fcc 19442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19443 (exit $ac_status); } && {
19444 test -z "$ac_c_werror_flag" ||
19445 test ! -s conftest.err
19446 } && test -s conftest$ac_exeext &&
19447 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19448 ac_cv_func___res_send=yes
19449else
19450 echo "$as_me: failed program was:" >&5
19650fd6
AS
19451sed 's/^/| /' conftest.$ac_ext >&5
19452
d6e01aa5 19453 ac_cv_func___res_send=no
84e70f78 19454fi
d6e01aa5
KL
19455
19456rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19457 conftest$ac_exeext conftest.$ac_ext
84e70f78 19458fi
d6e01aa5
KL
19459{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
19460echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
19461if test $ac_cv_func___res_send = yes; then
19462 :
19463else
d6e01aa5
KL
19464 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
19465echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19466if test "${ac_cv_lib_resolv_res_send+set}" = set; then
19467 echo $ECHO_N "(cached) $ECHO_C" >&6
19468else
19469 ac_check_lib_save_LIBS=$LIBS
19470LIBS="-lresolv $LIBS"
19471cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19472/* confdefs.h. */
19473_ACEOF
19474cat confdefs.h >>conftest.$ac_ext
19475cat >>conftest.$ac_ext <<_ACEOF
19476/* end confdefs.h. */
84e70f78 19477
d6e01aa5
KL
19478/* Override any GCC internal prototype to avoid an error.
19479 Use char because int might match the return type of a GCC
19480 builtin and then its argument prototype would still apply. */
84e70f78
KR
19481#ifdef __cplusplus
19482extern "C"
19483#endif
84e70f78
KR
19484char res_send ();
19485int
19486main ()
19487{
d6e01aa5 19488return res_send ();
84e70f78
KR
19489 ;
19490 return 0;
19491}
19492_ACEOF
19493rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19494if { (ac_try="$ac_link"
19495case "(($ac_try" in
19496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19497 *) ac_try_echo=$ac_try;;
19498esac
19499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19500 (eval "$ac_link") 2>conftest.er1
84e70f78 19501 ac_status=$?
edfaf76d
LK
19502 grep -v '^ *+' conftest.er1 >conftest.err
19503 rm -f conftest.er1
19504 cat conftest.err >&5
c0d27fcc 19505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19506 (exit $ac_status); } && {
19507 test -z "$ac_c_werror_flag" ||
19508 test ! -s conftest.err
19509 } && test -s conftest$ac_exeext &&
19510 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19511 ac_cv_lib_resolv_res_send=yes
19512else
19513 echo "$as_me: failed program was:" >&5
19650fd6
AS
19514sed 's/^/| /' conftest.$ac_ext >&5
19515
d6e01aa5 19516 ac_cv_lib_resolv_res_send=no
84e70f78 19517fi
d6e01aa5
KL
19518
19519rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19520 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19521LIBS=$ac_check_lib_save_LIBS
19522fi
d6e01aa5
KL
19523{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
19524echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
19525if test $ac_cv_lib_resolv_res_send = yes; then
19526 resolv=yes
19527else
d6e01aa5
KL
19528 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
19529echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19530if test "${ac_cv_lib_resolv___res_send+set}" = set; then
19531 echo $ECHO_N "(cached) $ECHO_C" >&6
19532else
19533 ac_check_lib_save_LIBS=$LIBS
19534LIBS="-lresolv $LIBS"
19535cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19536/* confdefs.h. */
19537_ACEOF
19538cat confdefs.h >>conftest.$ac_ext
19539cat >>conftest.$ac_ext <<_ACEOF
19540/* end confdefs.h. */
84e70f78 19541
d6e01aa5
KL
19542/* Override any GCC internal prototype to avoid an error.
19543 Use char because int might match the return type of a GCC
19544 builtin and then its argument prototype would still apply. */
84e70f78
KR
19545#ifdef __cplusplus
19546extern "C"
19547#endif
84e70f78
KR
19548char __res_send ();
19549int
19550main ()
19551{
d6e01aa5 19552return __res_send ();
84e70f78
KR
19553 ;
19554 return 0;
19555}
19556_ACEOF
19557rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19558if { (ac_try="$ac_link"
19559case "(($ac_try" in
19560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19561 *) ac_try_echo=$ac_try;;
19562esac
19563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19564 (eval "$ac_link") 2>conftest.er1
84e70f78 19565 ac_status=$?
edfaf76d
LK
19566 grep -v '^ *+' conftest.er1 >conftest.err
19567 rm -f conftest.er1
19568 cat conftest.err >&5
c0d27fcc 19569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19570 (exit $ac_status); } && {
19571 test -z "$ac_c_werror_flag" ||
19572 test ! -s conftest.err
19573 } && test -s conftest$ac_exeext &&
19574 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19575 ac_cv_lib_resolv___res_send=yes
19576else
19577 echo "$as_me: failed program was:" >&5
19650fd6
AS
19578sed 's/^/| /' conftest.$ac_ext >&5
19579
d6e01aa5 19580 ac_cv_lib_resolv___res_send=no
84e70f78 19581fi
d6e01aa5
KL
19582
19583rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19584 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19585LIBS=$ac_check_lib_save_LIBS
19586fi
d6e01aa5
KL
19587{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
19588echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
19589if test $ac_cv_lib_resolv___res_send = yes; then
19590 resolv=yes
19591fi
19592
19593fi
19594
19595fi
19596
19597fi
19598
19599 if test "$resolv" = yes ; then
19600 RESOLVLIB=-lresolv
84e70f78
KR
19601 else
19602 RESOLVLIB=
19603 fi
d6e01aa5
KL
19604 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
19605echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
19606if test "${ac_cv_func_hes_getmailhost+set}" = set; then
19607 echo $ECHO_N "(cached) $ECHO_C" >&6
19608else
19609 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19610/* confdefs.h. */
19611_ACEOF
19612cat confdefs.h >>conftest.$ac_ext
19613cat >>conftest.$ac_ext <<_ACEOF
19614/* end confdefs.h. */
edfaf76d
LK
19615/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
19616 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19617#define hes_getmailhost innocuous_hes_getmailhost
19618
84e70f78 19619/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19620 which can conflict with char hes_getmailhost (); below.
19621 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19622 <limits.h> exists even on freestanding compilers. */
edfaf76d 19623
19650fd6
AS
19624#ifdef __STDC__
19625# include <limits.h>
19626#else
19627# include <assert.h>
19628#endif
edfaf76d
LK
19629
19630#undef hes_getmailhost
19631
d6e01aa5
KL
19632/* Override any GCC internal prototype to avoid an error.
19633 Use char because int might match the return type of a GCC
19634 builtin and then its argument prototype would still apply. */
84e70f78
KR
19635#ifdef __cplusplus
19636extern "C"
19637#endif
84e70f78 19638char hes_getmailhost ();
84e70f78
KR
19639/* The GNU C library defines this for functions which it implements
19640 to always fail with ENOSYS. Some functions are actually named
19641 something starting with __ and the normal name is an alias. */
d6e01aa5 19642#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 19643choke me
cd958eb3
MB
19644#endif
19645
19650fd6
AS
19646int
19647main ()
19648{
d6e01aa5 19649return hes_getmailhost ();
84e70f78
KR
19650 ;
19651 return 0;
19652}
19653_ACEOF
19654rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19655if { (ac_try="$ac_link"
19656case "(($ac_try" in
19657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19658 *) ac_try_echo=$ac_try;;
19659esac
19660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19661 (eval "$ac_link") 2>conftest.er1
84e70f78 19662 ac_status=$?
edfaf76d
LK
19663 grep -v '^ *+' conftest.er1 >conftest.err
19664 rm -f conftest.er1
19665 cat conftest.err >&5
c0d27fcc 19666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19667 (exit $ac_status); } && {
19668 test -z "$ac_c_werror_flag" ||
19669 test ! -s conftest.err
19670 } && test -s conftest$ac_exeext &&
19671 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19672 ac_cv_func_hes_getmailhost=yes
19673else
19674 echo "$as_me: failed program was:" >&5
19650fd6
AS
19675sed 's/^/| /' conftest.$ac_ext >&5
19676
d6e01aa5 19677 ac_cv_func_hes_getmailhost=no
84e70f78 19678fi
d6e01aa5
KL
19679
19680rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19681 conftest$ac_exeext conftest.$ac_ext
84e70f78 19682fi
d6e01aa5
KL
19683{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
19684echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
19685if test $ac_cv_func_hes_getmailhost = yes; then
19686 :
19687else
d6e01aa5
KL
19688 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
19689echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
19690if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
19691 echo $ECHO_N "(cached) $ECHO_C" >&6
19692else
19693 ac_check_lib_save_LIBS=$LIBS
19694LIBS="-lhesiod $RESOLVLIB $LIBS"
19695cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19696/* confdefs.h. */
19697_ACEOF
19698cat confdefs.h >>conftest.$ac_ext
19699cat >>conftest.$ac_ext <<_ACEOF
19700/* end confdefs.h. */
84e70f78 19701
d6e01aa5
KL
19702/* Override any GCC internal prototype to avoid an error.
19703 Use char because int might match the return type of a GCC
19704 builtin and then its argument prototype would still apply. */
84e70f78
KR
19705#ifdef __cplusplus
19706extern "C"
19707#endif
84e70f78
KR
19708char hes_getmailhost ();
19709int
19710main ()
19711{
d6e01aa5 19712return hes_getmailhost ();
84e70f78
KR
19713 ;
19714 return 0;
19715}
19716_ACEOF
19717rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19718if { (ac_try="$ac_link"
19719case "(($ac_try" in
19720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19721 *) ac_try_echo=$ac_try;;
19722esac
19723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19724 (eval "$ac_link") 2>conftest.er1
84e70f78 19725 ac_status=$?
edfaf76d
LK
19726 grep -v '^ *+' conftest.er1 >conftest.err
19727 rm -f conftest.er1
19728 cat conftest.err >&5
c0d27fcc 19729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19730 (exit $ac_status); } && {
19731 test -z "$ac_c_werror_flag" ||
19732 test ! -s conftest.err
19733 } && test -s conftest$ac_exeext &&
19734 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19735 ac_cv_lib_hesiod_hes_getmailhost=yes
19736else
19737 echo "$as_me: failed program was:" >&5
19650fd6
AS
19738sed 's/^/| /' conftest.$ac_ext >&5
19739
d6e01aa5 19740 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 19741fi
d6e01aa5
KL
19742
19743rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19744 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19745LIBS=$ac_check_lib_save_LIBS
19746fi
d6e01aa5
KL
19747{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
19748echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 19749if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 19750
c0d27fcc 19751cat >>confdefs.h <<\_ACEOF
84e70f78 19752#define HAVE_LIBHESIOD 1
c0d27fcc 19753_ACEOF
84e70f78
KR
19754
19755else
19756 :
19757fi
19758
19759fi
19760
19761fi
19762
bc3512d0
CY
19763# Do we need libresolv (due to res_init or Hesiod)?
19764if test "$resolv" = yes ; then
19765
19766cat >>confdefs.h <<\_ACEOF
19767#define HAVE_LIBRESOLV 1
19768_ACEOF
19769
19770fi
19771
a21616bd
KR
19772# These tell us which Kerberos-related libraries to use.
19773if test "${with_kerberos+set}" = set; then
503d2be0 19774
d6e01aa5
KL
19775{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
19776echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
19777if test "${ac_cv_lib_com_err_com_err+set}" = set; then
19778 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19779else
503d2be0 19780 ac_check_lib_save_LIBS=$LIBS
a21616bd 19781LIBS="-lcom_err $LIBS"
503d2be0 19782cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19783/* confdefs.h. */
19784_ACEOF
19785cat confdefs.h >>conftest.$ac_ext
19786cat >>conftest.$ac_ext <<_ACEOF
19787/* end confdefs.h. */
503d2be0 19788
d6e01aa5
KL
19789/* Override any GCC internal prototype to avoid an error.
19790 Use char because int might match the return type of a GCC
19791 builtin and then its argument prototype would still apply. */
503d2be0
AS
19792#ifdef __cplusplus
19793extern "C"
19794#endif
503d2be0
AS
19795char com_err ();
19796int
19797main ()
19798{
d6e01aa5 19799return com_err ();
503d2be0
AS
19800 ;
19801 return 0;
19802}
19803_ACEOF
19804rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19805if { (ac_try="$ac_link"
19806case "(($ac_try" in
19807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19808 *) ac_try_echo=$ac_try;;
19809esac
19810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19811 (eval "$ac_link") 2>conftest.er1
503d2be0 19812 ac_status=$?
edfaf76d
LK
19813 grep -v '^ *+' conftest.er1 >conftest.err
19814 rm -f conftest.er1
19815 cat conftest.err >&5
c0d27fcc 19816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19817 (exit $ac_status); } && {
19818 test -z "$ac_c_werror_flag" ||
19819 test ! -s conftest.err
19820 } && test -s conftest$ac_exeext &&
19821 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19822 ac_cv_lib_com_err_com_err=yes
19823else
19824 echo "$as_me: failed program was:" >&5
19650fd6
AS
19825sed 's/^/| /' conftest.$ac_ext >&5
19826
d6e01aa5 19827 ac_cv_lib_com_err_com_err=no
503d2be0 19828fi
d6e01aa5
KL
19829
19830rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19831 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19832LIBS=$ac_check_lib_save_LIBS
19833fi
d6e01aa5
KL
19834{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
19835echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 19836if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 19837 cat >>confdefs.h <<_ACEOF
503d2be0 19838#define HAVE_LIBCOM_ERR 1
c0d27fcc 19839_ACEOF
a21616bd
KR
19840
19841 LIBS="-lcom_err $LIBS"
19842
a21616bd
KR
19843fi
19844
c0d27fcc 19845
d6e01aa5
KL
19846{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
19847echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
19848if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
19849 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19850else
503d2be0 19851 ac_check_lib_save_LIBS=$LIBS
a21616bd 19852LIBS="-lk5crypto $LIBS"
503d2be0 19853cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19854/* confdefs.h. */
19855_ACEOF
19856cat confdefs.h >>conftest.$ac_ext
19857cat >>conftest.$ac_ext <<_ACEOF
19858/* end confdefs.h. */
503d2be0 19859
d6e01aa5
KL
19860/* Override any GCC internal prototype to avoid an error.
19861 Use char because int might match the return type of a GCC
19862 builtin and then its argument prototype would still apply. */
503d2be0
AS
19863#ifdef __cplusplus
19864extern "C"
19865#endif
503d2be0
AS
19866char mit_des_cbc_encrypt ();
19867int
19868main ()
19869{
d6e01aa5 19870return mit_des_cbc_encrypt ();
503d2be0
AS
19871 ;
19872 return 0;
19873}
19874_ACEOF
19875rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19876if { (ac_try="$ac_link"
19877case "(($ac_try" in
19878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19879 *) ac_try_echo=$ac_try;;
19880esac
19881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19882 (eval "$ac_link") 2>conftest.er1
503d2be0 19883 ac_status=$?
edfaf76d
LK
19884 grep -v '^ *+' conftest.er1 >conftest.err
19885 rm -f conftest.er1
19886 cat conftest.err >&5
c0d27fcc 19887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19888 (exit $ac_status); } && {
19889 test -z "$ac_c_werror_flag" ||
19890 test ! -s conftest.err
19891 } && test -s conftest$ac_exeext &&
19892 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19893 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
19894else
19895 echo "$as_me: failed program was:" >&5
19650fd6
AS
19896sed 's/^/| /' conftest.$ac_ext >&5
19897
d6e01aa5 19898 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 19899fi
d6e01aa5
KL
19900
19901rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19902 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19903LIBS=$ac_check_lib_save_LIBS
19904fi
d6e01aa5
KL
19905{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
19906echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 19907if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 19908 cat >>confdefs.h <<_ACEOF
503d2be0 19909#define HAVE_LIBK5CRYPTO 1
c0d27fcc 19910_ACEOF
a21616bd
KR
19911
19912 LIBS="-lk5crypto $LIBS"
19913
a21616bd
KR
19914fi
19915
c0d27fcc 19916
d6e01aa5
KL
19917{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
19918echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
19919if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
19920 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19921else
503d2be0 19922 ac_check_lib_save_LIBS=$LIBS
a21616bd 19923LIBS="-lcrypto $LIBS"
503d2be0 19924cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19925/* confdefs.h. */
19926_ACEOF
19927cat confdefs.h >>conftest.$ac_ext
19928cat >>conftest.$ac_ext <<_ACEOF
19929/* end confdefs.h. */
503d2be0 19930
d6e01aa5
KL
19931/* Override any GCC internal prototype to avoid an error.
19932 Use char because int might match the return type of a GCC
19933 builtin and then its argument prototype would still apply. */
503d2be0
AS
19934#ifdef __cplusplus
19935extern "C"
19936#endif
503d2be0
AS
19937char mit_des_cbc_encrypt ();
19938int
19939main ()
19940{
d6e01aa5 19941return mit_des_cbc_encrypt ();
503d2be0
AS
19942 ;
19943 return 0;
19944}
19945_ACEOF
19946rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19947if { (ac_try="$ac_link"
19948case "(($ac_try" in
19949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19950 *) ac_try_echo=$ac_try;;
19951esac
19952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19953 (eval "$ac_link") 2>conftest.er1
503d2be0 19954 ac_status=$?
edfaf76d
LK
19955 grep -v '^ *+' conftest.er1 >conftest.err
19956 rm -f conftest.er1
19957 cat conftest.err >&5
c0d27fcc 19958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19959 (exit $ac_status); } && {
19960 test -z "$ac_c_werror_flag" ||
19961 test ! -s conftest.err
19962 } && test -s conftest$ac_exeext &&
19963 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19964 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
19965else
19966 echo "$as_me: failed program was:" >&5
19650fd6
AS
19967sed 's/^/| /' conftest.$ac_ext >&5
19968
d6e01aa5 19969 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 19970fi
d6e01aa5
KL
19971
19972rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19973 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19974LIBS=$ac_check_lib_save_LIBS
19975fi
d6e01aa5
KL
19976{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
19977echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 19978if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 19979 cat >>confdefs.h <<_ACEOF
503d2be0 19980#define HAVE_LIBCRYPTO 1
c0d27fcc 19981_ACEOF
a21616bd
KR
19982
19983 LIBS="-lcrypto $LIBS"
19984
a21616bd
KR
19985fi
19986
c0d27fcc 19987
d6e01aa5
KL
19988{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
19989echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
19990if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
19991 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19992else
503d2be0 19993 ac_check_lib_save_LIBS=$LIBS
a21616bd 19994LIBS="-lkrb5 $LIBS"
503d2be0 19995cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19996/* confdefs.h. */
19997_ACEOF
19998cat confdefs.h >>conftest.$ac_ext
19999cat >>conftest.$ac_ext <<_ACEOF
20000/* end confdefs.h. */
a21616bd 20001
d6e01aa5
KL
20002/* Override any GCC internal prototype to avoid an error.
20003 Use char because int might match the return type of a GCC
20004 builtin and then its argument prototype would still apply. */
503d2be0
AS
20005#ifdef __cplusplus
20006extern "C"
20007#endif
503d2be0
AS
20008char krb5_init_context ();
20009int
20010main ()
20011{
d6e01aa5 20012return krb5_init_context ();
503d2be0
AS
20013 ;
20014 return 0;
20015}
20016_ACEOF
20017rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20018if { (ac_try="$ac_link"
20019case "(($ac_try" in
20020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20021 *) ac_try_echo=$ac_try;;
20022esac
20023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20024 (eval "$ac_link") 2>conftest.er1
503d2be0 20025 ac_status=$?
edfaf76d
LK
20026 grep -v '^ *+' conftest.er1 >conftest.err
20027 rm -f conftest.er1
20028 cat conftest.err >&5
c0d27fcc 20029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20030 (exit $ac_status); } && {
20031 test -z "$ac_c_werror_flag" ||
20032 test ! -s conftest.err
20033 } && test -s conftest$ac_exeext &&
20034 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20035 ac_cv_lib_krb5_krb5_init_context=yes
20036else
20037 echo "$as_me: failed program was:" >&5
19650fd6
AS
20038sed 's/^/| /' conftest.$ac_ext >&5
20039
d6e01aa5 20040 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20041fi
d6e01aa5
KL
20042
20043rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20044 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20045LIBS=$ac_check_lib_save_LIBS
20046fi
d6e01aa5
KL
20047{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20048echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 20049if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20050 cat >>confdefs.h <<_ACEOF
503d2be0 20051#define HAVE_LIBKRB5 1
c0d27fcc 20052_ACEOF
a21616bd
KR
20053
20054 LIBS="-lkrb5 $LIBS"
20055
a21616bd
KR
20056fi
20057
20058 if test "${with_kerberos5+set}" != set; then
503d2be0 20059
d6e01aa5
KL
20060{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20061echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
20062if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
20063 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20064else
503d2be0 20065 ac_check_lib_save_LIBS=$LIBS
a21616bd 20066LIBS="-ldes425 $LIBS"
503d2be0 20067cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20068/* confdefs.h. */
20069_ACEOF
20070cat confdefs.h >>conftest.$ac_ext
20071cat >>conftest.$ac_ext <<_ACEOF
20072/* end confdefs.h. */
503d2be0 20073
d6e01aa5
KL
20074/* Override any GCC internal prototype to avoid an error.
20075 Use char because int might match the return type of a GCC
20076 builtin and then its argument prototype would still apply. */
503d2be0
AS
20077#ifdef __cplusplus
20078extern "C"
20079#endif
503d2be0
AS
20080char des_cbc_encrypt ();
20081int
20082main ()
20083{
d6e01aa5 20084return des_cbc_encrypt ();
503d2be0
AS
20085 ;
20086 return 0;
20087}
20088_ACEOF
20089rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20090if { (ac_try="$ac_link"
20091case "(($ac_try" in
20092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20093 *) ac_try_echo=$ac_try;;
20094esac
20095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20096 (eval "$ac_link") 2>conftest.er1
503d2be0 20097 ac_status=$?
edfaf76d
LK
20098 grep -v '^ *+' conftest.er1 >conftest.err
20099 rm -f conftest.er1
20100 cat conftest.err >&5
c0d27fcc 20101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20102 (exit $ac_status); } && {
20103 test -z "$ac_c_werror_flag" ||
20104 test ! -s conftest.err
20105 } && test -s conftest$ac_exeext &&
20106 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20107 ac_cv_lib_des425_des_cbc_encrypt=yes
20108else
20109 echo "$as_me: failed program was:" >&5
19650fd6
AS
20110sed 's/^/| /' conftest.$ac_ext >&5
20111
d6e01aa5 20112 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 20113fi
d6e01aa5
KL
20114
20115rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20116 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20117LIBS=$ac_check_lib_save_LIBS
20118fi
d6e01aa5
KL
20119{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
20120echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 20121if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 20122 cat >>confdefs.h <<_ACEOF
503d2be0 20123#define HAVE_LIBDES425 1
c0d27fcc 20124_ACEOF
a21616bd
KR
20125
20126 LIBS="-ldes425 $LIBS"
20127
20128else
503d2be0 20129
d6e01aa5
KL
20130{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
20131echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
20132if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
20133 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20134else
503d2be0 20135 ac_check_lib_save_LIBS=$LIBS
a21616bd 20136LIBS="-ldes $LIBS"
503d2be0 20137cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20138/* confdefs.h. */
20139_ACEOF
20140cat confdefs.h >>conftest.$ac_ext
20141cat >>conftest.$ac_ext <<_ACEOF
20142/* end confdefs.h. */
503d2be0 20143
d6e01aa5
KL
20144/* Override any GCC internal prototype to avoid an error.
20145 Use char because int might match the return type of a GCC
20146 builtin and then its argument prototype would still apply. */
503d2be0
AS
20147#ifdef __cplusplus
20148extern "C"
20149#endif
503d2be0
AS
20150char des_cbc_encrypt ();
20151int
20152main ()
20153{
d6e01aa5 20154return des_cbc_encrypt ();
503d2be0
AS
20155 ;
20156 return 0;
20157}
20158_ACEOF
20159rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20160if { (ac_try="$ac_link"
20161case "(($ac_try" in
20162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20163 *) ac_try_echo=$ac_try;;
20164esac
20165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20166 (eval "$ac_link") 2>conftest.er1
503d2be0 20167 ac_status=$?
edfaf76d
LK
20168 grep -v '^ *+' conftest.er1 >conftest.err
20169 rm -f conftest.er1
20170 cat conftest.err >&5
c0d27fcc 20171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20172 (exit $ac_status); } && {
20173 test -z "$ac_c_werror_flag" ||
20174 test ! -s conftest.err
20175 } && test -s conftest$ac_exeext &&
20176 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20177 ac_cv_lib_des_des_cbc_encrypt=yes
20178else
20179 echo "$as_me: failed program was:" >&5
19650fd6
AS
20180sed 's/^/| /' conftest.$ac_ext >&5
20181
d6e01aa5 20182 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 20183fi
d6e01aa5
KL
20184
20185rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20186 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20187LIBS=$ac_check_lib_save_LIBS
20188fi
d6e01aa5
KL
20189{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
20190echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 20191if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 20192 cat >>confdefs.h <<_ACEOF
503d2be0 20193#define HAVE_LIBDES 1
c0d27fcc 20194_ACEOF
a21616bd
KR
20195
20196 LIBS="-ldes $LIBS"
20197
a21616bd
KR
20198fi
20199
20200fi
20201
c0d27fcc 20202
d6e01aa5
KL
20203{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
20204echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
20205if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
20206 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20207else
503d2be0 20208 ac_check_lib_save_LIBS=$LIBS
a21616bd 20209LIBS="-lkrb4 $LIBS"
503d2be0 20210cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20211/* confdefs.h. */
20212_ACEOF
20213cat confdefs.h >>conftest.$ac_ext
20214cat >>conftest.$ac_ext <<_ACEOF
20215/* end confdefs.h. */
503d2be0 20216
d6e01aa5
KL
20217/* Override any GCC internal prototype to avoid an error.
20218 Use char because int might match the return type of a GCC
20219 builtin and then its argument prototype would still apply. */
503d2be0
AS
20220#ifdef __cplusplus
20221extern "C"
20222#endif
503d2be0
AS
20223char krb_get_cred ();
20224int
20225main ()
20226{
d6e01aa5 20227return krb_get_cred ();
503d2be0
AS
20228 ;
20229 return 0;
20230}
20231_ACEOF
20232rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20233if { (ac_try="$ac_link"
20234case "(($ac_try" in
20235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20236 *) ac_try_echo=$ac_try;;
20237esac
20238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20239 (eval "$ac_link") 2>conftest.er1
503d2be0 20240 ac_status=$?
edfaf76d
LK
20241 grep -v '^ *+' conftest.er1 >conftest.err
20242 rm -f conftest.er1
20243 cat conftest.err >&5
c0d27fcc 20244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20245 (exit $ac_status); } && {
20246 test -z "$ac_c_werror_flag" ||
20247 test ! -s conftest.err
20248 } && test -s conftest$ac_exeext &&
20249 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20250 ac_cv_lib_krb4_krb_get_cred=yes
20251else
20252 echo "$as_me: failed program was:" >&5
19650fd6
AS
20253sed 's/^/| /' conftest.$ac_ext >&5
20254
d6e01aa5 20255 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 20256fi
d6e01aa5
KL
20257
20258rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20259 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20260LIBS=$ac_check_lib_save_LIBS
20261fi
d6e01aa5
KL
20262{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
20263echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 20264if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 20265 cat >>confdefs.h <<_ACEOF
503d2be0 20266#define HAVE_LIBKRB4 1
c0d27fcc 20267_ACEOF
a21616bd
KR
20268
20269 LIBS="-lkrb4 $LIBS"
20270
20271else
503d2be0 20272
d6e01aa5
KL
20273{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
20274echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
20275if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
20276 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20277else
503d2be0 20278 ac_check_lib_save_LIBS=$LIBS
a21616bd 20279LIBS="-lkrb $LIBS"
503d2be0 20280cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20281/* confdefs.h. */
20282_ACEOF
20283cat confdefs.h >>conftest.$ac_ext
20284cat >>conftest.$ac_ext <<_ACEOF
20285/* end confdefs.h. */
503d2be0 20286
d6e01aa5
KL
20287/* Override any GCC internal prototype to avoid an error.
20288 Use char because int might match the return type of a GCC
20289 builtin and then its argument prototype would still apply. */
503d2be0
AS
20290#ifdef __cplusplus
20291extern "C"
20292#endif
503d2be0
AS
20293char krb_get_cred ();
20294int
20295main ()
20296{
d6e01aa5 20297return krb_get_cred ();
503d2be0
AS
20298 ;
20299 return 0;
20300}
20301_ACEOF
20302rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20303if { (ac_try="$ac_link"
20304case "(($ac_try" in
20305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20306 *) ac_try_echo=$ac_try;;
20307esac
20308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20309 (eval "$ac_link") 2>conftest.er1
503d2be0 20310 ac_status=$?
edfaf76d
LK
20311 grep -v '^ *+' conftest.er1 >conftest.err
20312 rm -f conftest.er1
20313 cat conftest.err >&5
c0d27fcc 20314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20315 (exit $ac_status); } && {
20316 test -z "$ac_c_werror_flag" ||
20317 test ! -s conftest.err
20318 } && test -s conftest$ac_exeext &&
20319 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20320 ac_cv_lib_krb_krb_get_cred=yes
20321else
20322 echo "$as_me: failed program was:" >&5
19650fd6
AS
20323sed 's/^/| /' conftest.$ac_ext >&5
20324
d6e01aa5 20325 ac_cv_lib_krb_krb_get_cred=no
503d2be0 20326fi
d6e01aa5
KL
20327
20328rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20329 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20330LIBS=$ac_check_lib_save_LIBS
20331fi
d6e01aa5
KL
20332{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
20333echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 20334if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 20335 cat >>confdefs.h <<_ACEOF
503d2be0 20336#define HAVE_LIBKRB 1
c0d27fcc 20337_ACEOF
a21616bd
KR
20338
20339 LIBS="-lkrb $LIBS"
20340
a21616bd
KR
20341fi
20342
20343fi
20344
20345 fi
20346
20347 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
20348
20349for ac_header in krb5.h
a21616bd 20350do
503d2be0 20351as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
20352if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20353 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20354echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20355if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20356 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20357fi
d6e01aa5
KL
20358ac_res=`eval echo '${'$as_ac_Header'}'`
20359 { echo "$as_me:$LINENO: result: $ac_res" >&5
20360echo "${ECHO_T}$ac_res" >&6; }
98418dba 20361else
c0d27fcc 20362 # Is the header compilable?
d6e01aa5
KL
20363{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20364echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20365cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20366/* confdefs.h. */
20367_ACEOF
20368cat confdefs.h >>conftest.$ac_ext
20369cat >>conftest.$ac_ext <<_ACEOF
20370/* end confdefs.h. */
c0d27fcc
MR
20371$ac_includes_default
20372#include <$ac_header>
20373_ACEOF
20374rm -f conftest.$ac_objext
d6e01aa5
KL
20375if { (ac_try="$ac_compile"
20376case "(($ac_try" in
20377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20378 *) ac_try_echo=$ac_try;;
20379esac
20380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20381 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20382 ac_status=$?
edfaf76d
LK
20383 grep -v '^ *+' conftest.er1 >conftest.err
20384 rm -f conftest.er1
20385 cat conftest.err >&5
c0d27fcc 20386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20387 (exit $ac_status); } && {
20388 test -z "$ac_c_werror_flag" ||
20389 test ! -s conftest.err
20390 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20391 ac_header_compiler=yes
20392else
20393 echo "$as_me: failed program was:" >&5
19650fd6
AS
20394sed 's/^/| /' conftest.$ac_ext >&5
20395
d6e01aa5 20396 ac_header_compiler=no
c0d27fcc 20397fi
d6e01aa5
KL
20398
20399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20400{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20401echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20402
20403# Is the header present?
d6e01aa5
KL
20404{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20405echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20406cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20407/* confdefs.h. */
20408_ACEOF
20409cat confdefs.h >>conftest.$ac_ext
20410cat >>conftest.$ac_ext <<_ACEOF
20411/* end confdefs.h. */
503d2be0
AS
20412#include <$ac_header>
20413_ACEOF
d6e01aa5
KL
20414if { (ac_try="$ac_cpp conftest.$ac_ext"
20415case "(($ac_try" in
20416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20417 *) ac_try_echo=$ac_try;;
20418esac
20419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20420 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20421 ac_status=$?
6bae0ccf 20422 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20423 rm -f conftest.er1
20424 cat conftest.err >&5
c0d27fcc 20425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20426 (exit $ac_status); } >/dev/null && {
20427 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20428 test ! -s conftest.err
20429 }; then
c0d27fcc 20430 ac_header_preproc=yes
503d2be0
AS
20431else
20432 echo "$as_me: failed program was:" >&5
19650fd6
AS
20433sed 's/^/| /' conftest.$ac_ext >&5
20434
c0d27fcc 20435 ac_header_preproc=no
a21616bd 20436fi
d6e01aa5 20437
503d2be0 20438rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
20439{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20440echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20441
20442# So? What about this header?
edfaf76d
LK
20443case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20444 yes:no: )
c0d27fcc
MR
20445 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20446echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20447 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20448echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20449 ac_header_preproc=yes
19650fd6 20450 ;;
edfaf76d 20451 no:yes:* )
c0d27fcc
MR
20452 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20453echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20454 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20455echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20456 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20457echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20458 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20459echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20460 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20461echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20462 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20463echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 20464
19650fd6 20465 ;;
c0d27fcc 20466esac
d6e01aa5
KL
20467{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20468echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20469if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20470 echo $ECHO_N "(cached) $ECHO_C" >&6
20471else
edfaf76d 20472 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20473fi
d6e01aa5
KL
20474ac_res=`eval echo '${'$as_ac_Header'}'`
20475 { echo "$as_me:$LINENO: result: $ac_res" >&5
20476echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20477
20478fi
503d2be0 20479if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20480 cat >>confdefs.h <<_ACEOF
503d2be0 20481#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20482_ACEOF
503d2be0 20483
a21616bd 20484fi
c0d27fcc 20485
a21616bd
KR
20486done
20487
20488 else
503d2be0
AS
20489
20490for ac_header in des.h
a21616bd 20491do
503d2be0 20492as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
20493if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20494 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20495echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20496if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20497 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20498fi
d6e01aa5
KL
20499ac_res=`eval echo '${'$as_ac_Header'}'`
20500 { echo "$as_me:$LINENO: result: $ac_res" >&5
20501echo "${ECHO_T}$ac_res" >&6; }
98418dba 20502else
c0d27fcc 20503 # Is the header compilable?
d6e01aa5
KL
20504{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20505echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20506cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20507/* confdefs.h. */
20508_ACEOF
20509cat confdefs.h >>conftest.$ac_ext
20510cat >>conftest.$ac_ext <<_ACEOF
20511/* end confdefs.h. */
c0d27fcc
MR
20512$ac_includes_default
20513#include <$ac_header>
20514_ACEOF
20515rm -f conftest.$ac_objext
d6e01aa5
KL
20516if { (ac_try="$ac_compile"
20517case "(($ac_try" in
20518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20519 *) ac_try_echo=$ac_try;;
20520esac
20521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20522 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20523 ac_status=$?
edfaf76d
LK
20524 grep -v '^ *+' conftest.er1 >conftest.err
20525 rm -f conftest.er1
20526 cat conftest.err >&5
c0d27fcc 20527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20528 (exit $ac_status); } && {
20529 test -z "$ac_c_werror_flag" ||
20530 test ! -s conftest.err
20531 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20532 ac_header_compiler=yes
20533else
20534 echo "$as_me: failed program was:" >&5
19650fd6
AS
20535sed 's/^/| /' conftest.$ac_ext >&5
20536
d6e01aa5 20537 ac_header_compiler=no
c0d27fcc 20538fi
d6e01aa5
KL
20539
20540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20541{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20542echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20543
20544# Is the header present?
d6e01aa5
KL
20545{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20546echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20547cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20548/* confdefs.h. */
20549_ACEOF
20550cat confdefs.h >>conftest.$ac_ext
20551cat >>conftest.$ac_ext <<_ACEOF
20552/* end confdefs.h. */
503d2be0
AS
20553#include <$ac_header>
20554_ACEOF
d6e01aa5
KL
20555if { (ac_try="$ac_cpp conftest.$ac_ext"
20556case "(($ac_try" in
20557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20558 *) ac_try_echo=$ac_try;;
20559esac
20560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20561 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20562 ac_status=$?
6bae0ccf 20563 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20564 rm -f conftest.er1
20565 cat conftest.err >&5
c0d27fcc 20566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20567 (exit $ac_status); } >/dev/null && {
20568 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20569 test ! -s conftest.err
20570 }; then
c0d27fcc 20571 ac_header_preproc=yes
503d2be0
AS
20572else
20573 echo "$as_me: failed program was:" >&5
19650fd6
AS
20574sed 's/^/| /' conftest.$ac_ext >&5
20575
c0d27fcc 20576 ac_header_preproc=no
a21616bd 20577fi
d6e01aa5 20578
503d2be0 20579rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
20580{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20581echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20582
20583# So? What about this header?
edfaf76d
LK
20584case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20585 yes:no: )
c0d27fcc
MR
20586 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20587echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20588 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20589echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20590 ac_header_preproc=yes
19650fd6 20591 ;;
edfaf76d 20592 no:yes:* )
c0d27fcc
MR
20593 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20594echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20595 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20596echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20597 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20598echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20599 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20600echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20601 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20602echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20603 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20604echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 20605
19650fd6 20606 ;;
c0d27fcc 20607esac
d6e01aa5
KL
20608{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20609echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20610if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20611 echo $ECHO_N "(cached) $ECHO_C" >&6
20612else
edfaf76d 20613 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20614fi
d6e01aa5
KL
20615ac_res=`eval echo '${'$as_ac_Header'}'`
20616 { echo "$as_me:$LINENO: result: $ac_res" >&5
20617echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20618
20619fi
503d2be0 20620if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20621 cat >>confdefs.h <<_ACEOF
503d2be0 20622#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20623_ACEOF
503d2be0 20624
a21616bd 20625else
503d2be0
AS
20626
20627for ac_header in kerberosIV/des.h
a21616bd 20628do
503d2be0 20629as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
20630if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20631 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20632echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20633if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20634 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20635fi
d6e01aa5
KL
20636ac_res=`eval echo '${'$as_ac_Header'}'`
20637 { echo "$as_me:$LINENO: result: $ac_res" >&5
20638echo "${ECHO_T}$ac_res" >&6; }
98418dba 20639else
c0d27fcc 20640 # Is the header compilable?
d6e01aa5
KL
20641{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20642echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20643cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20644/* confdefs.h. */
20645_ACEOF
20646cat confdefs.h >>conftest.$ac_ext
20647cat >>conftest.$ac_ext <<_ACEOF
20648/* end confdefs.h. */
c0d27fcc
MR
20649$ac_includes_default
20650#include <$ac_header>
20651_ACEOF
20652rm -f conftest.$ac_objext
d6e01aa5
KL
20653if { (ac_try="$ac_compile"
20654case "(($ac_try" in
20655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20656 *) ac_try_echo=$ac_try;;
20657esac
20658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20659 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20660 ac_status=$?
edfaf76d
LK
20661 grep -v '^ *+' conftest.er1 >conftest.err
20662 rm -f conftest.er1
20663 cat conftest.err >&5
c0d27fcc 20664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20665 (exit $ac_status); } && {
20666 test -z "$ac_c_werror_flag" ||
20667 test ! -s conftest.err
20668 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20669 ac_header_compiler=yes
20670else
20671 echo "$as_me: failed program was:" >&5
19650fd6
AS
20672sed 's/^/| /' conftest.$ac_ext >&5
20673
d6e01aa5 20674 ac_header_compiler=no
c0d27fcc 20675fi
d6e01aa5
KL
20676
20677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20678{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20679echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20680
20681# Is the header present?
d6e01aa5
KL
20682{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20683echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20684cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20685/* confdefs.h. */
20686_ACEOF
20687cat confdefs.h >>conftest.$ac_ext
20688cat >>conftest.$ac_ext <<_ACEOF
20689/* end confdefs.h. */
503d2be0
AS
20690#include <$ac_header>
20691_ACEOF
d6e01aa5
KL
20692if { (ac_try="$ac_cpp conftest.$ac_ext"
20693case "(($ac_try" in
20694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20695 *) ac_try_echo=$ac_try;;
20696esac
20697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20698 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20699 ac_status=$?
6bae0ccf 20700 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20701 rm -f conftest.er1
20702 cat conftest.err >&5
c0d27fcc 20703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20704 (exit $ac_status); } >/dev/null && {
20705 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20706 test ! -s conftest.err
20707 }; then
c0d27fcc 20708 ac_header_preproc=yes
503d2be0
AS
20709else
20710 echo "$as_me: failed program was:" >&5
19650fd6
AS
20711sed 's/^/| /' conftest.$ac_ext >&5
20712
c0d27fcc 20713 ac_header_preproc=no
a21616bd 20714fi
d6e01aa5 20715
503d2be0 20716rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
20717{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20718echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20719
20720# So? What about this header?
edfaf76d
LK
20721case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20722 yes:no: )
c0d27fcc
MR
20723 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20724echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20725 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20726echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20727 ac_header_preproc=yes
19650fd6 20728 ;;
edfaf76d 20729 no:yes:* )
c0d27fcc
MR
20730 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20731echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20732 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20733echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20734 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20735echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20736 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20737echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20738 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20739echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20740 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20741echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 20742
19650fd6 20743 ;;
c0d27fcc 20744esac
d6e01aa5
KL
20745{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20746echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20747if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20748 echo $ECHO_N "(cached) $ECHO_C" >&6
20749else
edfaf76d 20750 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20751fi
d6e01aa5
KL
20752ac_res=`eval echo '${'$as_ac_Header'}'`
20753 { echo "$as_me:$LINENO: result: $ac_res" >&5
20754echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20755
20756fi
503d2be0 20757if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20758 cat >>confdefs.h <<_ACEOF
503d2be0 20759#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20760_ACEOF
503d2be0 20761
a21616bd 20762else
503d2be0
AS
20763
20764for ac_header in kerberos/des.h
a21616bd 20765do
503d2be0 20766as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
20767if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20768 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20769echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20770if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20771 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20772fi
d6e01aa5
KL
20773ac_res=`eval echo '${'$as_ac_Header'}'`
20774 { echo "$as_me:$LINENO: result: $ac_res" >&5
20775echo "${ECHO_T}$ac_res" >&6; }
98418dba 20776else
c0d27fcc 20777 # Is the header compilable?
d6e01aa5
KL
20778{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20779echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20780cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20781/* confdefs.h. */
20782_ACEOF
20783cat confdefs.h >>conftest.$ac_ext
20784cat >>conftest.$ac_ext <<_ACEOF
20785/* end confdefs.h. */
c0d27fcc
MR
20786$ac_includes_default
20787#include <$ac_header>
20788_ACEOF
20789rm -f conftest.$ac_objext
d6e01aa5
KL
20790if { (ac_try="$ac_compile"
20791case "(($ac_try" in
20792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20793 *) ac_try_echo=$ac_try;;
20794esac
20795eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20796 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20797 ac_status=$?
edfaf76d
LK
20798 grep -v '^ *+' conftest.er1 >conftest.err
20799 rm -f conftest.er1
20800 cat conftest.err >&5
c0d27fcc 20801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20802 (exit $ac_status); } && {
20803 test -z "$ac_c_werror_flag" ||
20804 test ! -s conftest.err
20805 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20806 ac_header_compiler=yes
20807else
20808 echo "$as_me: failed program was:" >&5
19650fd6
AS
20809sed 's/^/| /' conftest.$ac_ext >&5
20810
d6e01aa5 20811 ac_header_compiler=no
c0d27fcc 20812fi
d6e01aa5
KL
20813
20814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20815{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20816echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20817
20818# Is the header present?
d6e01aa5
KL
20819{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20820echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20821cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20822/* confdefs.h. */
20823_ACEOF
20824cat confdefs.h >>conftest.$ac_ext
20825cat >>conftest.$ac_ext <<_ACEOF
20826/* end confdefs.h. */
503d2be0
AS
20827#include <$ac_header>
20828_ACEOF
d6e01aa5
KL
20829if { (ac_try="$ac_cpp conftest.$ac_ext"
20830case "(($ac_try" in
20831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20832 *) ac_try_echo=$ac_try;;
20833esac
20834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20835 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20836 ac_status=$?
6bae0ccf 20837 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20838 rm -f conftest.er1
20839 cat conftest.err >&5
c0d27fcc 20840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20841 (exit $ac_status); } >/dev/null && {
20842 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20843 test ! -s conftest.err
20844 }; then
c0d27fcc 20845 ac_header_preproc=yes
503d2be0
AS
20846else
20847 echo "$as_me: failed program was:" >&5
19650fd6
AS
20848sed 's/^/| /' conftest.$ac_ext >&5
20849
c0d27fcc 20850 ac_header_preproc=no
a21616bd 20851fi
d6e01aa5 20852
503d2be0 20853rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
20854{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20855echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20856
20857# So? What about this header?
edfaf76d
LK
20858case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20859 yes:no: )
c0d27fcc
MR
20860 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20861echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20862 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20863echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20864 ac_header_preproc=yes
19650fd6 20865 ;;
edfaf76d 20866 no:yes:* )
c0d27fcc
MR
20867 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20868echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20869 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20870echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20871 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20872echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20873 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20874echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20875 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20876echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20877 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20878echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 20879
19650fd6 20880 ;;
c0d27fcc 20881esac
d6e01aa5
KL
20882{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20883echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20884if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20885 echo $ECHO_N "(cached) $ECHO_C" >&6
20886else
edfaf76d 20887 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20888fi
d6e01aa5
KL
20889ac_res=`eval echo '${'$as_ac_Header'}'`
20890 { echo "$as_me:$LINENO: result: $ac_res" >&5
20891echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20892
20893fi
503d2be0 20894if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20895 cat >>confdefs.h <<_ACEOF
503d2be0 20896#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20897_ACEOF
a21616bd
KR
20898
20899fi
c0d27fcc 20900
a21616bd
KR
20901done
20902
98418dba 20903fi
c0d27fcc 20904
925c2f3f
EZ
20905done
20906
98418dba 20907fi
c0d27fcc 20908
925c2f3f 20909done
98418dba 20910
c0d27fcc 20911
925c2f3f
EZ
20912for ac_header in krb.h
20913do
20914as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
20915if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20916 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20917echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20918if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 20919 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20920fi
d6e01aa5
KL
20921ac_res=`eval echo '${'$as_ac_Header'}'`
20922 { echo "$as_me:$LINENO: result: $ac_res" >&5
20923echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20924else
20925 # Is the header compilable?
d6e01aa5
KL
20926{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20927echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20928cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20929/* confdefs.h. */
20930_ACEOF
20931cat confdefs.h >>conftest.$ac_ext
20932cat >>conftest.$ac_ext <<_ACEOF
20933/* end confdefs.h. */
c0d27fcc
MR
20934$ac_includes_default
20935#include <$ac_header>
20936_ACEOF
20937rm -f conftest.$ac_objext
d6e01aa5
KL
20938if { (ac_try="$ac_compile"
20939case "(($ac_try" in
20940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20941 *) ac_try_echo=$ac_try;;
20942esac
20943eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20944 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20945 ac_status=$?
edfaf76d
LK
20946 grep -v '^ *+' conftest.er1 >conftest.err
20947 rm -f conftest.er1
20948 cat conftest.err >&5
c0d27fcc 20949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20950 (exit $ac_status); } && {
20951 test -z "$ac_c_werror_flag" ||
20952 test ! -s conftest.err
20953 } && test -s conftest.$ac_objext; then
c0d27fcc 20954 ac_header_compiler=yes
925c2f3f 20955else
c0d27fcc 20956 echo "$as_me: failed program was:" >&5
19650fd6
AS
20957sed 's/^/| /' conftest.$ac_ext >&5
20958
d6e01aa5 20959 ac_header_compiler=no
c0d27fcc 20960fi
d6e01aa5
KL
20961
20962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20963{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20964echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20965
20966# Is the header present?
d6e01aa5
KL
20967{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20968echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20969cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20970/* confdefs.h. */
20971_ACEOF
20972cat confdefs.h >>conftest.$ac_ext
20973cat >>conftest.$ac_ext <<_ACEOF
20974/* end confdefs.h. */
503d2be0
AS
20975#include <$ac_header>
20976_ACEOF
d6e01aa5
KL
20977if { (ac_try="$ac_cpp conftest.$ac_ext"
20978case "(($ac_try" in
20979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20980 *) ac_try_echo=$ac_try;;
20981esac
20982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20983 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20984 ac_status=$?
6bae0ccf 20985 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20986 rm -f conftest.er1
20987 cat conftest.err >&5
c0d27fcc 20988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20989 (exit $ac_status); } >/dev/null && {
20990 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20991 test ! -s conftest.err
20992 }; then
c0d27fcc 20993 ac_header_preproc=yes
503d2be0
AS
20994else
20995 echo "$as_me: failed program was:" >&5
19650fd6
AS
20996sed 's/^/| /' conftest.$ac_ext >&5
20997
c0d27fcc 20998 ac_header_preproc=no
a21616bd 20999fi
d6e01aa5 21000
503d2be0 21001rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21002{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21003echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21004
21005# So? What about this header?
edfaf76d
LK
21006case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21007 yes:no: )
c0d27fcc
MR
21008 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21009echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21010 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21011echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21012 ac_header_preproc=yes
19650fd6 21013 ;;
edfaf76d 21014 no:yes:* )
c0d27fcc
MR
21015 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21016echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21017 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21018echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21019 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21020echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21021 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21022echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21023 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21024echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21025 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21026echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21027
19650fd6 21028 ;;
c0d27fcc 21029esac
d6e01aa5
KL
21030{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21031echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21032if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21033 echo $ECHO_N "(cached) $ECHO_C" >&6
21034else
edfaf76d 21035 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21036fi
d6e01aa5
KL
21037ac_res=`eval echo '${'$as_ac_Header'}'`
21038 { echo "$as_me:$LINENO: result: $ac_res" >&5
21039echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21040
21041fi
503d2be0 21042if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21043 cat >>confdefs.h <<_ACEOF
503d2be0 21044#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21045_ACEOF
503d2be0 21046
a21616bd 21047else
503d2be0
AS
21048
21049for ac_header in kerberosIV/krb.h
a21616bd 21050do
503d2be0 21051as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21052if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21053 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21054echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21055if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21056 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21057fi
d6e01aa5
KL
21058ac_res=`eval echo '${'$as_ac_Header'}'`
21059 { echo "$as_me:$LINENO: result: $ac_res" >&5
21060echo "${ECHO_T}$ac_res" >&6; }
98418dba 21061else
c0d27fcc 21062 # Is the header compilable?
d6e01aa5
KL
21063{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21064echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21065cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21066/* confdefs.h. */
21067_ACEOF
21068cat confdefs.h >>conftest.$ac_ext
21069cat >>conftest.$ac_ext <<_ACEOF
21070/* end confdefs.h. */
c0d27fcc
MR
21071$ac_includes_default
21072#include <$ac_header>
21073_ACEOF
21074rm -f conftest.$ac_objext
d6e01aa5
KL
21075if { (ac_try="$ac_compile"
21076case "(($ac_try" in
21077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21078 *) ac_try_echo=$ac_try;;
21079esac
21080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21081 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21082 ac_status=$?
edfaf76d
LK
21083 grep -v '^ *+' conftest.er1 >conftest.err
21084 rm -f conftest.er1
21085 cat conftest.err >&5
c0d27fcc 21086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21087 (exit $ac_status); } && {
21088 test -z "$ac_c_werror_flag" ||
21089 test ! -s conftest.err
21090 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21091 ac_header_compiler=yes
21092else
21093 echo "$as_me: failed program was:" >&5
19650fd6
AS
21094sed 's/^/| /' conftest.$ac_ext >&5
21095
d6e01aa5 21096 ac_header_compiler=no
c0d27fcc 21097fi
d6e01aa5
KL
21098
21099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21100{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21101echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21102
21103# Is the header present?
d6e01aa5
KL
21104{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21105echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21106cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21107/* confdefs.h. */
21108_ACEOF
21109cat confdefs.h >>conftest.$ac_ext
21110cat >>conftest.$ac_ext <<_ACEOF
21111/* end confdefs.h. */
503d2be0
AS
21112#include <$ac_header>
21113_ACEOF
d6e01aa5
KL
21114if { (ac_try="$ac_cpp conftest.$ac_ext"
21115case "(($ac_try" in
21116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21117 *) ac_try_echo=$ac_try;;
21118esac
21119eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21120 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21121 ac_status=$?
6bae0ccf 21122 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21123 rm -f conftest.er1
21124 cat conftest.err >&5
c0d27fcc 21125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21126 (exit $ac_status); } >/dev/null && {
21127 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21128 test ! -s conftest.err
21129 }; then
c0d27fcc 21130 ac_header_preproc=yes
503d2be0
AS
21131else
21132 echo "$as_me: failed program was:" >&5
19650fd6
AS
21133sed 's/^/| /' conftest.$ac_ext >&5
21134
c0d27fcc 21135 ac_header_preproc=no
a21616bd 21136fi
d6e01aa5 21137
503d2be0 21138rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21139{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21140echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21141
21142# So? What about this header?
edfaf76d
LK
21143case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21144 yes:no: )
c0d27fcc
MR
21145 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21146echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21147 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21148echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21149 ac_header_preproc=yes
19650fd6 21150 ;;
edfaf76d 21151 no:yes:* )
c0d27fcc
MR
21152 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21153echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21154 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21155echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21156 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21157echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21158 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21159echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21160 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21161echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21162 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21163echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21164
19650fd6 21165 ;;
c0d27fcc 21166esac
d6e01aa5
KL
21167{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21168echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21169if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21170 echo $ECHO_N "(cached) $ECHO_C" >&6
21171else
edfaf76d 21172 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21173fi
d6e01aa5
KL
21174ac_res=`eval echo '${'$as_ac_Header'}'`
21175 { echo "$as_me:$LINENO: result: $ac_res" >&5
21176echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21177
21178fi
503d2be0 21179if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21180 cat >>confdefs.h <<_ACEOF
503d2be0 21181#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21182_ACEOF
503d2be0 21183
a21616bd 21184else
503d2be0
AS
21185
21186for ac_header in kerberos/krb.h
a21616bd 21187do
503d2be0 21188as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21189if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21190 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21191echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21192if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21193 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21194fi
d6e01aa5
KL
21195ac_res=`eval echo '${'$as_ac_Header'}'`
21196 { echo "$as_me:$LINENO: result: $ac_res" >&5
21197echo "${ECHO_T}$ac_res" >&6; }
98418dba 21198else
c0d27fcc 21199 # Is the header compilable?
d6e01aa5
KL
21200{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21201echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21202cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21203/* confdefs.h. */
21204_ACEOF
21205cat confdefs.h >>conftest.$ac_ext
21206cat >>conftest.$ac_ext <<_ACEOF
21207/* end confdefs.h. */
c0d27fcc
MR
21208$ac_includes_default
21209#include <$ac_header>
21210_ACEOF
21211rm -f conftest.$ac_objext
d6e01aa5
KL
21212if { (ac_try="$ac_compile"
21213case "(($ac_try" in
21214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21215 *) ac_try_echo=$ac_try;;
21216esac
21217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21218 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21219 ac_status=$?
edfaf76d
LK
21220 grep -v '^ *+' conftest.er1 >conftest.err
21221 rm -f conftest.er1
21222 cat conftest.err >&5
c0d27fcc 21223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21224 (exit $ac_status); } && {
21225 test -z "$ac_c_werror_flag" ||
21226 test ! -s conftest.err
21227 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21228 ac_header_compiler=yes
21229else
21230 echo "$as_me: failed program was:" >&5
19650fd6
AS
21231sed 's/^/| /' conftest.$ac_ext >&5
21232
d6e01aa5 21233 ac_header_compiler=no
c0d27fcc 21234fi
d6e01aa5
KL
21235
21236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21237{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21238echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21239
21240# Is the header present?
d6e01aa5
KL
21241{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21242echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21243cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21244/* confdefs.h. */
21245_ACEOF
21246cat confdefs.h >>conftest.$ac_ext
21247cat >>conftest.$ac_ext <<_ACEOF
21248/* end confdefs.h. */
503d2be0
AS
21249#include <$ac_header>
21250_ACEOF
d6e01aa5
KL
21251if { (ac_try="$ac_cpp conftest.$ac_ext"
21252case "(($ac_try" in
21253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21254 *) ac_try_echo=$ac_try;;
21255esac
21256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21257 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21258 ac_status=$?
6bae0ccf 21259 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21260 rm -f conftest.er1
21261 cat conftest.err >&5
c0d27fcc 21262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21263 (exit $ac_status); } >/dev/null && {
21264 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21265 test ! -s conftest.err
21266 }; then
c0d27fcc 21267 ac_header_preproc=yes
503d2be0
AS
21268else
21269 echo "$as_me: failed program was:" >&5
19650fd6
AS
21270sed 's/^/| /' conftest.$ac_ext >&5
21271
c0d27fcc 21272 ac_header_preproc=no
a21616bd 21273fi
d6e01aa5 21274
503d2be0 21275rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21276{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21277echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
21278
21279# So? What about this header?
edfaf76d
LK
21280case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21281 yes:no: )
35996d22
AS
21282 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21283echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21284 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21285echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21286 ac_header_preproc=yes
19650fd6 21287 ;;
edfaf76d 21288 no:yes:* )
c0d27fcc
MR
21289 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21290echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21291 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21292echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21293 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21294echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21295 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21296echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21297 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21298echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21299 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21300echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21301
19650fd6 21302 ;;
c0d27fcc 21303esac
d6e01aa5
KL
21304{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21305echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21306if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21307 echo $ECHO_N "(cached) $ECHO_C" >&6
21308else
edfaf76d 21309 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21310fi
d6e01aa5
KL
21311ac_res=`eval echo '${'$as_ac_Header'}'`
21312 { echo "$as_me:$LINENO: result: $ac_res" >&5
21313echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21314
21315fi
503d2be0 21316if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21317 cat >>confdefs.h <<_ACEOF
503d2be0 21318#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21319_ACEOF
503d2be0 21320
a21616bd 21321fi
c0d27fcc 21322
a21616bd
KR
21323done
21324
21325fi
c0d27fcc 21326
a21616bd
KR
21327done
21328
21329fi
c0d27fcc 21330
a21616bd
KR
21331done
21332
21333 fi
503d2be0
AS
21334
21335for ac_header in com_err.h
a21616bd 21336do
503d2be0 21337as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21338if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21339 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21340echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21341if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21342 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21343fi
d6e01aa5
KL
21344ac_res=`eval echo '${'$as_ac_Header'}'`
21345 { echo "$as_me:$LINENO: result: $ac_res" >&5
21346echo "${ECHO_T}$ac_res" >&6; }
98418dba 21347else
c0d27fcc 21348 # Is the header compilable?
d6e01aa5
KL
21349{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21350echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21351cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21352/* confdefs.h. */
21353_ACEOF
21354cat confdefs.h >>conftest.$ac_ext
21355cat >>conftest.$ac_ext <<_ACEOF
21356/* end confdefs.h. */
c0d27fcc
MR
21357$ac_includes_default
21358#include <$ac_header>
21359_ACEOF
21360rm -f conftest.$ac_objext
d6e01aa5
KL
21361if { (ac_try="$ac_compile"
21362case "(($ac_try" in
21363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21364 *) ac_try_echo=$ac_try;;
21365esac
21366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21367 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
21368 ac_status=$?
21369 grep -v '^ *+' conftest.er1 >conftest.err
21370 rm -f conftest.er1
21371 cat conftest.err >&5
21372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21373 (exit $ac_status); } && {
21374 test -z "$ac_c_werror_flag" ||
21375 test ! -s conftest.err
21376 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21377 ac_header_compiler=yes
21378else
21379 echo "$as_me: failed program was:" >&5
19650fd6
AS
21380sed 's/^/| /' conftest.$ac_ext >&5
21381
d6e01aa5 21382 ac_header_compiler=no
c0d27fcc 21383fi
d6e01aa5
KL
21384
21385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21386{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21387echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21388
21389# Is the header present?
d6e01aa5
KL
21390{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21391echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21392cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21393/* confdefs.h. */
21394_ACEOF
21395cat confdefs.h >>conftest.$ac_ext
21396cat >>conftest.$ac_ext <<_ACEOF
21397/* end confdefs.h. */
503d2be0
AS
21398#include <$ac_header>
21399_ACEOF
d6e01aa5
KL
21400if { (ac_try="$ac_cpp conftest.$ac_ext"
21401case "(($ac_try" in
21402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21403 *) ac_try_echo=$ac_try;;
21404esac
21405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21406 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21407 ac_status=$?
6bae0ccf 21408 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21409 rm -f conftest.er1
21410 cat conftest.err >&5
c0d27fcc 21411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21412 (exit $ac_status); } >/dev/null && {
21413 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21414 test ! -s conftest.err
21415 }; then
c0d27fcc 21416 ac_header_preproc=yes
503d2be0
AS
21417else
21418 echo "$as_me: failed program was:" >&5
19650fd6
AS
21419sed 's/^/| /' conftest.$ac_ext >&5
21420
c0d27fcc 21421 ac_header_preproc=no
a21616bd 21422fi
d6e01aa5 21423
503d2be0 21424rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21425{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21426echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21427
21428# So? What about this header?
edfaf76d
LK
21429case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21430 yes:no: )
c0d27fcc
MR
21431 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21432echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21433 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21434echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21435 ac_header_preproc=yes
19650fd6 21436 ;;
edfaf76d 21437 no:yes:* )
c0d27fcc
MR
21438 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21439echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21440 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21441echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21442 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21443echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21444 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21445echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21446 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21447echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21448 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21449echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21450
19650fd6 21451 ;;
c0d27fcc 21452esac
d6e01aa5
KL
21453{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21454echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21455if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21456 echo $ECHO_N "(cached) $ECHO_C" >&6
21457else
edfaf76d 21458 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21459fi
d6e01aa5
KL
21460ac_res=`eval echo '${'$as_ac_Header'}'`
21461 { echo "$as_me:$LINENO: result: $ac_res" >&5
21462echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21463
21464fi
503d2be0 21465if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21466 cat >>confdefs.h <<_ACEOF
503d2be0 21467#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21468_ACEOF
503d2be0 21469
a21616bd 21470fi
c0d27fcc 21471
a21616bd
KR
21472done
21473
21474fi
21475
ba4481b5
DL
21476# Solaris requires -lintl if you want strerror (which calls dgettext)
21477# to return localized messages.
503d2be0 21478
d6e01aa5
KL
21479{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
21480echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
21481if test "${ac_cv_lib_intl_dgettext+set}" = set; then
21482 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21483else
503d2be0 21484 ac_check_lib_save_LIBS=$LIBS
ba4481b5 21485LIBS="-lintl $LIBS"
503d2be0 21486cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21487/* confdefs.h. */
21488_ACEOF
21489cat confdefs.h >>conftest.$ac_ext
21490cat >>conftest.$ac_ext <<_ACEOF
21491/* end confdefs.h. */
503d2be0 21492
d6e01aa5
KL
21493/* Override any GCC internal prototype to avoid an error.
21494 Use char because int might match the return type of a GCC
21495 builtin and then its argument prototype would still apply. */
503d2be0
AS
21496#ifdef __cplusplus
21497extern "C"
21498#endif
503d2be0
AS
21499char dgettext ();
21500int
21501main ()
21502{
d6e01aa5 21503return dgettext ();
503d2be0
AS
21504 ;
21505 return 0;
21506}
21507_ACEOF
21508rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
21509if { (ac_try="$ac_link"
21510case "(($ac_try" in
21511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21512 *) ac_try_echo=$ac_try;;
21513esac
21514eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21515 (eval "$ac_link") 2>conftest.er1
503d2be0 21516 ac_status=$?
edfaf76d
LK
21517 grep -v '^ *+' conftest.er1 >conftest.err
21518 rm -f conftest.er1
21519 cat conftest.err >&5
c0d27fcc 21520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21521 (exit $ac_status); } && {
21522 test -z "$ac_c_werror_flag" ||
21523 test ! -s conftest.err
21524 } && test -s conftest$ac_exeext &&
21525 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21526 ac_cv_lib_intl_dgettext=yes
21527else
21528 echo "$as_me: failed program was:" >&5
19650fd6
AS
21529sed 's/^/| /' conftest.$ac_ext >&5
21530
d6e01aa5 21531 ac_cv_lib_intl_dgettext=no
503d2be0 21532fi
d6e01aa5
KL
21533
21534rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21535 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21536LIBS=$ac_check_lib_save_LIBS
21537fi
d6e01aa5
KL
21538{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
21539echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 21540if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 21541 cat >>confdefs.h <<_ACEOF
503d2be0 21542#define HAVE_LIBINTL 1
c0d27fcc 21543_ACEOF
ba4481b5
DL
21544
21545 LIBS="-lintl $LIBS"
21546
ba4481b5
DL
21547fi
21548
c0d27fcc 21549
d6e01aa5
KL
21550{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
21551echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
21552if test "${emacs_cv_localtime_cache+set}" = set; then
21553 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
21554else
21555 if test x$ac_cv_func_tzset = xyes; then
21556if test "$cross_compiling" = yes; then
21557 # If we have tzset, assume the worst when cross-compiling.
21558emacs_cv_localtime_cache=yes
21559else
503d2be0 21560 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21561/* confdefs.h. */
21562_ACEOF
21563cat confdefs.h >>conftest.$ac_ext
21564cat >>conftest.$ac_ext <<_ACEOF
21565/* end confdefs.h. */
ba4481b5 21566#include <time.h>
ba4481b5
DL
21567extern char **environ;
21568unset_TZ ()
21569{
21570 char **from, **to;
21571 for (to = from = environ; (*to = *from); from++)
21572 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
21573 to++;
21574}
21575char TZ_GMT0[] = "TZ=GMT0";
21576char TZ_PST8[] = "TZ=PST8";
21577main()
21578{
21579 time_t now = time ((time_t *) 0);
21580 int hour_GMT0, hour_unset;
21581 if (putenv (TZ_GMT0) != 0)
21582 exit (1);
21583 hour_GMT0 = localtime (&now)->tm_hour;
21584 unset_TZ ();
21585 hour_unset = localtime (&now)->tm_hour;
21586 if (putenv (TZ_PST8) != 0)
21587 exit (1);
21588 if (localtime (&now)->tm_hour == hour_GMT0)
21589 exit (1);
21590 unset_TZ ();
21591 if (localtime (&now)->tm_hour != hour_unset)
21592 exit (1);
21593 exit (0);
21594}
503d2be0
AS
21595_ACEOF
21596rm -f conftest$ac_exeext
d6e01aa5
KL
21597if { (ac_try="$ac_link"
21598case "(($ac_try" in
21599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21600 *) ac_try_echo=$ac_try;;
21601esac
21602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21603 (eval "$ac_link") 2>&5
503d2be0 21604 ac_status=$?
c0d27fcc 21605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21606 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
21607 { (case "(($ac_try" in
21608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21609 *) ac_try_echo=$ac_try;;
21610esac
21611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21612 (eval "$ac_try") 2>&5
503d2be0 21613 ac_status=$?
c0d27fcc 21614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21615 (exit $ac_status); }; }; then
ba4481b5
DL
21616 emacs_cv_localtime_cache=no
21617else
503d2be0
AS
21618 echo "$as_me: program exited with status $ac_status" >&5
21619echo "$as_me: failed program was:" >&5
19650fd6
AS
21620sed 's/^/| /' conftest.$ac_ext >&5
21621
c0d27fcc 21622( exit $ac_status )
503d2be0 21623emacs_cv_localtime_cache=yes
ba4481b5 21624fi
d6e01aa5 21625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 21626fi
d6e01aa5
KL
21627
21628
ba4481b5
DL
21629else
21630 # If we lack tzset, report that localtime does not cache TZ,
21631 # since we can't invalidate the cache if we don't have tzset.
21632 emacs_cv_localtime_cache=no
21633fi
21634fi
d6e01aa5
KL
21635{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
21636echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 21637if test $emacs_cv_localtime_cache = yes; then
b936fae4 21638
c0d27fcc 21639cat >>confdefs.h <<\_ACEOF
ba4481b5 21640#define LOCALTIME_CACHE 1
c0d27fcc 21641_ACEOF
ba4481b5
DL
21642
21643fi
21644
21645if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
21646
21647for ac_func in gettimeofday
48d4b120 21648do
503d2be0 21649as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
21650{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21651echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21652if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21653 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 21654else
503d2be0 21655 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21656/* confdefs.h. */
21657_ACEOF
21658cat confdefs.h >>conftest.$ac_ext
21659cat >>conftest.$ac_ext <<_ACEOF
21660/* end confdefs.h. */
edfaf76d
LK
21661/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21662 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21663#define $ac_func innocuous_$ac_func
21664
48d4b120 21665/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21666 which can conflict with char $ac_func (); below.
21667 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21668 <limits.h> exists even on freestanding compilers. */
edfaf76d 21669
19650fd6
AS
21670#ifdef __STDC__
21671# include <limits.h>
21672#else
21673# include <assert.h>
21674#endif
edfaf76d
LK
21675
21676#undef $ac_func
21677
d6e01aa5
KL
21678/* Override any GCC internal prototype to avoid an error.
21679 Use char because int might match the return type of a GCC
21680 builtin and then its argument prototype would still apply. */
503d2be0
AS
21681#ifdef __cplusplus
21682extern "C"
21683#endif
503d2be0 21684char $ac_func ();
48d4b120
DL
21685/* The GNU C library defines this for functions which it implements
21686 to always fail with ENOSYS. Some functions are actually named
21687 something starting with __ and the normal name is an alias. */
d6e01aa5 21688#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 21689choke me
cd958eb3
MB
21690#endif
21691
19650fd6
AS
21692int
21693main ()
21694{
d6e01aa5 21695return $ac_func ();
503d2be0
AS
21696 ;
21697 return 0;
21698}
21699_ACEOF
21700rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
21701if { (ac_try="$ac_link"
21702case "(($ac_try" in
21703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21704 *) ac_try_echo=$ac_try;;
21705esac
21706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21707 (eval "$ac_link") 2>conftest.er1
503d2be0 21708 ac_status=$?
edfaf76d
LK
21709 grep -v '^ *+' conftest.er1 >conftest.err
21710 rm -f conftest.er1
21711 cat conftest.err >&5
c0d27fcc 21712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21713 (exit $ac_status); } && {
21714 test -z "$ac_c_werror_flag" ||
21715 test ! -s conftest.err
21716 } && test -s conftest$ac_exeext &&
21717 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21718 eval "$as_ac_var=yes"
21719else
21720 echo "$as_me: failed program was:" >&5
19650fd6
AS
21721sed 's/^/| /' conftest.$ac_ext >&5
21722
d6e01aa5 21723 eval "$as_ac_var=no"
503d2be0 21724fi
d6e01aa5
KL
21725
21726rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21727 conftest$ac_exeext conftest.$ac_ext
503d2be0 21728fi
d6e01aa5
KL
21729ac_res=`eval echo '${'$as_ac_var'}'`
21730 { echo "$as_me:$LINENO: result: $ac_res" >&5
21731echo "${ECHO_T}$ac_res" >&6; }
503d2be0 21732if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 21733 cat >>confdefs.h <<_ACEOF
503d2be0 21734#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 21735_ACEOF
48d4b120 21736
48d4b120
DL
21737fi
21738done
21739
b936fae4 21740 if test $ac_cv_func_gettimeofday = yes; then
d6e01aa5
KL
21741 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
21742echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
21743if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
21744 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21745else
503d2be0 21746 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21747/* confdefs.h. */
21748_ACEOF
21749cat confdefs.h >>conftest.$ac_ext
21750cat >>conftest.$ac_ext <<_ACEOF
21751/* end confdefs.h. */
ba4481b5 21752
a3f08d9e
DL
21753#ifdef TIME_WITH_SYS_TIME
21754#include <sys/time.h>
21755#include <time.h>
21756#else
21757#ifdef HAVE_SYS_TIME_H
21758#include <sys/time.h>
21759#else
21760#include <time.h>
21761#endif
21762#endif
503d2be0
AS
21763int
21764main ()
21765{
a3f08d9e 21766struct timeval time;
b936fae4 21767 gettimeofday (&time, 0);
503d2be0
AS
21768 ;
21769 return 0;
21770}
21771_ACEOF
21772rm -f conftest.$ac_objext
d6e01aa5
KL
21773if { (ac_try="$ac_compile"
21774case "(($ac_try" in
21775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21776 *) ac_try_echo=$ac_try;;
21777esac
21778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21779 (eval "$ac_compile") 2>conftest.er1
503d2be0 21780 ac_status=$?
edfaf76d
LK
21781 grep -v '^ *+' conftest.er1 >conftest.err
21782 rm -f conftest.er1
21783 cat conftest.err >&5
c0d27fcc 21784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21785 (exit $ac_status); } && {
21786 test -z "$ac_c_werror_flag" ||
21787 test ! -s conftest.err
21788 } && test -s conftest.$ac_objext; then
ba4481b5
DL
21789 emacs_cv_gettimeofday_two_arguments=yes
21790else
503d2be0 21791 echo "$as_me: failed program was:" >&5
19650fd6
AS
21792sed 's/^/| /' conftest.$ac_ext >&5
21793
d6e01aa5 21794 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 21795fi
d6e01aa5
KL
21796
21797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21798fi
d6e01aa5
KL
21799{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
21800echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
21801 if test $emacs_cv_gettimeofday_two_arguments = no; then
21802
c0d27fcc 21803cat >>confdefs.h <<\_ACEOF
ba4481b5 21804#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 21805_ACEOF
ba4481b5 21806
b936fae4 21807 fi
ba4481b5
DL
21808 fi
21809fi
21810
21811ok_so_far=yes
d6e01aa5
KL
21812{ echo "$as_me:$LINENO: checking for socket" >&5
21813echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
21814if test "${ac_cv_func_socket+set}" = set; then
21815 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21816else
503d2be0 21817 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21818/* confdefs.h. */
21819_ACEOF
21820cat confdefs.h >>conftest.$ac_ext
21821cat >>conftest.$ac_ext <<_ACEOF
21822/* end confdefs.h. */
edfaf76d
LK
21823/* Define socket to an innocuous variant, in case <limits.h> declares socket.
21824 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21825#define socket innocuous_socket
21826
ba4481b5 21827/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21828 which can conflict with char socket (); below.
21829 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21830 <limits.h> exists even on freestanding compilers. */
edfaf76d 21831
19650fd6
AS
21832#ifdef __STDC__
21833# include <limits.h>
21834#else
21835# include <assert.h>
21836#endif
edfaf76d
LK
21837
21838#undef socket
21839
d6e01aa5
KL
21840/* Override any GCC internal prototype to avoid an error.
21841 Use char because int might match the return type of a GCC
21842 builtin and then its argument prototype would still apply. */
503d2be0
AS
21843#ifdef __cplusplus
21844extern "C"
21845#endif
503d2be0 21846char socket ();
ba4481b5
DL
21847/* The GNU C library defines this for functions which it implements
21848 to always fail with ENOSYS. Some functions are actually named
21849 something starting with __ and the normal name is an alias. */
d6e01aa5 21850#if defined __stub_socket || defined __stub___socket
ba4481b5 21851choke me
cd958eb3
MB
21852#endif
21853
19650fd6
AS
21854int
21855main ()
21856{
d6e01aa5 21857return socket ();
503d2be0
AS
21858 ;
21859 return 0;
21860}
21861_ACEOF
21862rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
21863if { (ac_try="$ac_link"
21864case "(($ac_try" in
21865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21866 *) ac_try_echo=$ac_try;;
21867esac
21868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21869 (eval "$ac_link") 2>conftest.er1
503d2be0 21870 ac_status=$?
edfaf76d
LK
21871 grep -v '^ *+' conftest.er1 >conftest.err
21872 rm -f conftest.er1
21873 cat conftest.err >&5
c0d27fcc 21874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21875 (exit $ac_status); } && {
21876 test -z "$ac_c_werror_flag" ||
21877 test ! -s conftest.err
21878 } && test -s conftest$ac_exeext &&
21879 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21880 ac_cv_func_socket=yes
21881else
21882 echo "$as_me: failed program was:" >&5
19650fd6
AS
21883sed 's/^/| /' conftest.$ac_ext >&5
21884
d6e01aa5 21885 ac_cv_func_socket=no
503d2be0 21886fi
d6e01aa5
KL
21887
21888rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21889 conftest$ac_exeext conftest.$ac_ext
503d2be0 21890fi
d6e01aa5
KL
21891{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
21892echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 21893if test $ac_cv_func_socket = yes; then
ba4481b5
DL
21894 :
21895else
503d2be0 21896 ok_so_far=no
ba4481b5
DL
21897fi
21898
21899if test $ok_so_far = yes; then
c0d27fcc 21900 if test "${ac_cv_header_netinet_in_h+set}" = set; then
d6e01aa5
KL
21901 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
21902echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
21903if test "${ac_cv_header_netinet_in_h+set}" = set; then
21904 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21905fi
d6e01aa5
KL
21906{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
21907echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 21908else
c0d27fcc 21909 # Is the header compilable?
d6e01aa5
KL
21910{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
21911echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 21912cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21913/* confdefs.h. */
21914_ACEOF
21915cat confdefs.h >>conftest.$ac_ext
21916cat >>conftest.$ac_ext <<_ACEOF
21917/* end confdefs.h. */
c0d27fcc
MR
21918$ac_includes_default
21919#include <netinet/in.h>
21920_ACEOF
21921rm -f conftest.$ac_objext
d6e01aa5
KL
21922if { (ac_try="$ac_compile"
21923case "(($ac_try" in
21924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21925 *) ac_try_echo=$ac_try;;
21926esac
21927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21928 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21929 ac_status=$?
edfaf76d
LK
21930 grep -v '^ *+' conftest.er1 >conftest.err
21931 rm -f conftest.er1
21932 cat conftest.err >&5
c0d27fcc 21933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21934 (exit $ac_status); } && {
21935 test -z "$ac_c_werror_flag" ||
21936 test ! -s conftest.err
21937 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21938 ac_header_compiler=yes
21939else
21940 echo "$as_me: failed program was:" >&5
19650fd6
AS
21941sed 's/^/| /' conftest.$ac_ext >&5
21942
d6e01aa5 21943 ac_header_compiler=no
c0d27fcc 21944fi
d6e01aa5
KL
21945
21946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21947{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21948echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21949
21950# Is the header present?
d6e01aa5
KL
21951{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
21952echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 21953cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21954/* confdefs.h. */
21955_ACEOF
21956cat confdefs.h >>conftest.$ac_ext
21957cat >>conftest.$ac_ext <<_ACEOF
21958/* end confdefs.h. */
ba4481b5 21959#include <netinet/in.h>
503d2be0 21960_ACEOF
d6e01aa5
KL
21961if { (ac_try="$ac_cpp conftest.$ac_ext"
21962case "(($ac_try" in
21963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21964 *) ac_try_echo=$ac_try;;
21965esac
21966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21967 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21968 ac_status=$?
6bae0ccf 21969 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21970 rm -f conftest.er1
21971 cat conftest.err >&5
c0d27fcc 21972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21973 (exit $ac_status); } >/dev/null && {
21974 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21975 test ! -s conftest.err
21976 }; then
c0d27fcc 21977 ac_header_preproc=yes
ba4481b5 21978else
503d2be0 21979 echo "$as_me: failed program was:" >&5
19650fd6
AS
21980sed 's/^/| /' conftest.$ac_ext >&5
21981
c0d27fcc 21982 ac_header_preproc=no
ba4481b5 21983fi
d6e01aa5 21984
503d2be0 21985rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21986{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21987echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21988
21989# So? What about this header?
edfaf76d
LK
21990case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21991 yes:no: )
c0d27fcc
MR
21992 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
21993echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21994 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
21995echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
21996 ac_header_preproc=yes
19650fd6 21997 ;;
edfaf76d 21998 no:yes:* )
c0d27fcc
MR
21999 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22000echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22001 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22002echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22003 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22004echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22005 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22006echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22007 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 22008echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22009 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22010echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 22011
19650fd6 22012 ;;
c0d27fcc 22013esac
d6e01aa5
KL
22014{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22015echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
22016if test "${ac_cv_header_netinet_in_h+set}" = set; then
22017 echo $ECHO_N "(cached) $ECHO_C" >&6
22018else
22019 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22020fi
d6e01aa5
KL
22021{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22022echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22023
22024fi
503d2be0 22025if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22026 :
22027else
503d2be0 22028 ok_so_far=no
ba4481b5
DL
22029fi
22030
c0d27fcc 22031
ba4481b5
DL
22032fi
22033if test $ok_so_far = yes; then
c0d27fcc 22034 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
d6e01aa5
KL
22035 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22036echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
22037if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22038 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22039fi
d6e01aa5
KL
22040{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22041echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 22042else
c0d27fcc 22043 # Is the header compilable?
d6e01aa5
KL
22044{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
22045echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 22046cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22047/* confdefs.h. */
22048_ACEOF
22049cat confdefs.h >>conftest.$ac_ext
22050cat >>conftest.$ac_ext <<_ACEOF
22051/* end confdefs.h. */
c0d27fcc
MR
22052$ac_includes_default
22053#include <arpa/inet.h>
22054_ACEOF
22055rm -f conftest.$ac_objext
d6e01aa5
KL
22056if { (ac_try="$ac_compile"
22057case "(($ac_try" in
22058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22059 *) ac_try_echo=$ac_try;;
22060esac
22061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22062 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22063 ac_status=$?
edfaf76d
LK
22064 grep -v '^ *+' conftest.er1 >conftest.err
22065 rm -f conftest.er1
22066 cat conftest.err >&5
c0d27fcc 22067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22068 (exit $ac_status); } && {
22069 test -z "$ac_c_werror_flag" ||
22070 test ! -s conftest.err
22071 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22072 ac_header_compiler=yes
22073else
22074 echo "$as_me: failed program was:" >&5
19650fd6
AS
22075sed 's/^/| /' conftest.$ac_ext >&5
22076
d6e01aa5 22077 ac_header_compiler=no
c0d27fcc 22078fi
d6e01aa5
KL
22079
22080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22081{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22082echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22083
22084# Is the header present?
d6e01aa5
KL
22085{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
22086echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 22087cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22088/* confdefs.h. */
22089_ACEOF
22090cat confdefs.h >>conftest.$ac_ext
22091cat >>conftest.$ac_ext <<_ACEOF
22092/* end confdefs.h. */
ba4481b5 22093#include <arpa/inet.h>
503d2be0 22094_ACEOF
d6e01aa5
KL
22095if { (ac_try="$ac_cpp conftest.$ac_ext"
22096case "(($ac_try" in
22097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22098 *) ac_try_echo=$ac_try;;
22099esac
22100eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22101 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22102 ac_status=$?
6bae0ccf 22103 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22104 rm -f conftest.er1
22105 cat conftest.err >&5
c0d27fcc 22106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22107 (exit $ac_status); } >/dev/null && {
22108 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22109 test ! -s conftest.err
22110 }; then
c0d27fcc 22111 ac_header_preproc=yes
ba4481b5 22112else
503d2be0 22113 echo "$as_me: failed program was:" >&5
19650fd6
AS
22114sed 's/^/| /' conftest.$ac_ext >&5
22115
c0d27fcc 22116 ac_header_preproc=no
ba4481b5 22117fi
d6e01aa5 22118
503d2be0 22119rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
22120{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22121echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22122
22123# So? What about this header?
edfaf76d
LK
22124case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22125 yes:no: )
c0d27fcc
MR
22126 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
22127echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22128 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
22129echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
22130 ac_header_preproc=yes
19650fd6 22131 ;;
edfaf76d 22132 no:yes:* )
c0d27fcc
MR
22133 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
22134echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22135 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
22136echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
22137 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
22138echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
22139 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
22140echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22141 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 22142echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22143 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
22144echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 22145
19650fd6 22146 ;;
c0d27fcc 22147esac
d6e01aa5
KL
22148{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22149echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
22150if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22151 echo $ECHO_N "(cached) $ECHO_C" >&6
22152else
22153 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 22154fi
d6e01aa5
KL
22155{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22156echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
22157
22158fi
503d2be0 22159if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
22160 :
22161else
503d2be0 22162 ok_so_far=no
ba4481b5
DL
22163fi
22164
c0d27fcc 22165
ba4481b5
DL
22166fi
22167if test $ok_so_far = yes; then
b936fae4 22168
c0d27fcc 22169cat >>confdefs.h <<\_ACEOF
ba4481b5 22170#define HAVE_INET_SOCKETS 1
c0d27fcc 22171_ACEOF
ba4481b5
DL
22172
22173fi
22174
2d2b6695 22175
7862d3a8 22176for ac_header in sys/ioctl.h
2d2b6695
KS
22177do
22178as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
22179if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22180 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22181echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22182if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
22183 echo $ECHO_N "(cached) $ECHO_C" >&6
22184fi
d6e01aa5
KL
22185ac_res=`eval echo '${'$as_ac_Header'}'`
22186 { echo "$as_me:$LINENO: result: $ac_res" >&5
22187echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
22188else
22189 # Is the header compilable?
d6e01aa5
KL
22190{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22191echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 22192cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
22193/* confdefs.h. */
22194_ACEOF
22195cat confdefs.h >>conftest.$ac_ext
22196cat >>conftest.$ac_ext <<_ACEOF
22197/* end confdefs.h. */
22198$ac_includes_default
22199#include <$ac_header>
22200_ACEOF
22201rm -f conftest.$ac_objext
d6e01aa5
KL
22202if { (ac_try="$ac_compile"
22203case "(($ac_try" in
22204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22205 *) ac_try_echo=$ac_try;;
22206esac
22207eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22208 (eval "$ac_compile") 2>conftest.er1
2d2b6695 22209 ac_status=$?
edfaf76d
LK
22210 grep -v '^ *+' conftest.er1 >conftest.err
22211 rm -f conftest.er1
22212 cat conftest.err >&5
2d2b6695 22213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22214 (exit $ac_status); } && {
22215 test -z "$ac_c_werror_flag" ||
22216 test ! -s conftest.err
22217 } && test -s conftest.$ac_objext; then
2d2b6695
KS
22218 ac_header_compiler=yes
22219else
22220 echo "$as_me: failed program was:" >&5
22221sed 's/^/| /' conftest.$ac_ext >&5
22222
d6e01aa5 22223 ac_header_compiler=no
2d2b6695 22224fi
d6e01aa5
KL
22225
22226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22227{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22228echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
22229
22230# Is the header present?
d6e01aa5
KL
22231{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22232echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 22233cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
22234/* confdefs.h. */
22235_ACEOF
22236cat confdefs.h >>conftest.$ac_ext
22237cat >>conftest.$ac_ext <<_ACEOF
22238/* end confdefs.h. */
22239#include <$ac_header>
22240_ACEOF
d6e01aa5
KL
22241if { (ac_try="$ac_cpp conftest.$ac_ext"
22242case "(($ac_try" in
22243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22244 *) ac_try_echo=$ac_try;;
22245esac
22246eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22247 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
22248 ac_status=$?
22249 grep -v '^ *+' conftest.er1 >conftest.err
22250 rm -f conftest.er1
22251 cat conftest.err >&5
22252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22253 (exit $ac_status); } >/dev/null && {
22254 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22255 test ! -s conftest.err
22256 }; then
2d2b6695
KS
22257 ac_header_preproc=yes
22258else
22259 echo "$as_me: failed program was:" >&5
22260sed 's/^/| /' conftest.$ac_ext >&5
22261
22262 ac_header_preproc=no
22263fi
d6e01aa5 22264
2d2b6695 22265rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
22266{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22267echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
22268
22269# So? What about this header?
edfaf76d
LK
22270case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22271 yes:no: )
2d2b6695
KS
22272 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22273echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22274 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22275echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22276 ac_header_preproc=yes
2d2b6695 22277 ;;
edfaf76d 22278 no:yes:* )
2d2b6695
KS
22279 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22280echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22281 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22282echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22283 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22284echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22285 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22286echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
22287 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22288echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22289 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22290echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 22291
2d2b6695
KS
22292 ;;
22293esac
d6e01aa5
KL
22294{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22295echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22296if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
22297 echo $ECHO_N "(cached) $ECHO_C" >&6
22298else
edfaf76d 22299 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 22300fi
d6e01aa5
KL
22301ac_res=`eval echo '${'$as_ac_Header'}'`
22302 { echo "$as_me:$LINENO: result: $ac_res" >&5
22303echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
22304
22305fi
22306if test `eval echo '${'$as_ac_Header'}'` = yes; then
22307 cat >>confdefs.h <<_ACEOF
22308#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22309_ACEOF
22310
22311fi
22312
22313done
22314
22315
ba4481b5 22316if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 22317
c0d27fcc 22318cat >>confdefs.h <<\_ACEOF
ba4481b5 22319#define HAVE_AIX_SMT_EXP 1
c0d27fcc 22320_ACEOF
ba4481b5
DL
22321
22322fi
22323
d6e01aa5
KL
22324{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
22325echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 22326if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
d6e01aa5
KL
22327 { echo "$as_me:$LINENO: result: yes" >&5
22328echo "${ECHO_T}yes" >&6; }
b936fae4 22329
c0d27fcc 22330cat >>confdefs.h <<\_ACEOF
3d9fec71 22331#define HAVE_DEV_PTMX 1
c0d27fcc 22332_ACEOF
3d9fec71
DL
22333
22334else
d6e01aa5
KL
22335 { echo "$as_me:$LINENO: result: no" >&5
22336echo "${ECHO_T}no" >&6; }
3d9fec71
DL
22337fi
22338
d6e01aa5
KL
22339{ echo "$as_me:$LINENO: checking for pid_t" >&5
22340echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
22341if test "${ac_cv_type_pid_t+set}" = set; then
22342 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 22343else
503d2be0 22344 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22345/* confdefs.h. */
22346_ACEOF
22347cat confdefs.h >>conftest.$ac_ext
22348cat >>conftest.$ac_ext <<_ACEOF
22349/* end confdefs.h. */
503d2be0 22350$ac_includes_default
d6e01aa5 22351typedef pid_t ac__type_new_;
503d2be0
AS
22352int
22353main ()
22354{
d6e01aa5 22355if ((ac__type_new_ *) 0)
503d2be0 22356 return 0;
d6e01aa5 22357if (sizeof (ac__type_new_))
503d2be0
AS
22358 return 0;
22359 ;
22360 return 0;
22361}
22362_ACEOF
22363rm -f conftest.$ac_objext
d6e01aa5
KL
22364if { (ac_try="$ac_compile"
22365case "(($ac_try" in
22366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22367 *) ac_try_echo=$ac_try;;
22368esac
22369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22370 (eval "$ac_compile") 2>conftest.er1
503d2be0 22371 ac_status=$?
edfaf76d
LK
22372 grep -v '^ *+' conftest.er1 >conftest.err
22373 rm -f conftest.er1
22374 cat conftest.err >&5
c0d27fcc 22375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22376 (exit $ac_status); } && {
22377 test -z "$ac_c_werror_flag" ||
22378 test ! -s conftest.err
22379 } && test -s conftest.$ac_objext; then
647847ea
DL
22380 ac_cv_type_pid_t=yes
22381else
503d2be0 22382 echo "$as_me: failed program was:" >&5
19650fd6
AS
22383sed 's/^/| /' conftest.$ac_ext >&5
22384
d6e01aa5 22385 ac_cv_type_pid_t=no
647847ea 22386fi
d6e01aa5
KL
22387
22388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 22389fi
d6e01aa5
KL
22390{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
22391echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
22392if test $ac_cv_type_pid_t = yes; then
22393 :
22394else
22395
c0d27fcc 22396cat >>confdefs.h <<_ACEOF
647847ea 22397#define pid_t int
c0d27fcc 22398_ACEOF
647847ea
DL
22399
22400fi
22401
c0d27fcc 22402
d6e01aa5 22403for ac_header in vfork.h
503d2be0
AS
22404do
22405as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
22406if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22407 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22408echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22409if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22410 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22411fi
d6e01aa5
KL
22412ac_res=`eval echo '${'$as_ac_Header'}'`
22413 { echo "$as_me:$LINENO: result: $ac_res" >&5
22414echo "${ECHO_T}$ac_res" >&6; }
98418dba 22415else
c0d27fcc 22416 # Is the header compilable?
d6e01aa5
KL
22417{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22418echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22419cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22420/* confdefs.h. */
22421_ACEOF
22422cat confdefs.h >>conftest.$ac_ext
22423cat >>conftest.$ac_ext <<_ACEOF
22424/* end confdefs.h. */
c0d27fcc
MR
22425$ac_includes_default
22426#include <$ac_header>
22427_ACEOF
22428rm -f conftest.$ac_objext
d6e01aa5
KL
22429if { (ac_try="$ac_compile"
22430case "(($ac_try" in
22431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22432 *) ac_try_echo=$ac_try;;
22433esac
22434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22435 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22436 ac_status=$?
edfaf76d
LK
22437 grep -v '^ *+' conftest.er1 >conftest.err
22438 rm -f conftest.er1
22439 cat conftest.err >&5
c0d27fcc 22440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22441 (exit $ac_status); } && {
22442 test -z "$ac_c_werror_flag" ||
22443 test ! -s conftest.err
22444 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22445 ac_header_compiler=yes
22446else
22447 echo "$as_me: failed program was:" >&5
19650fd6
AS
22448sed 's/^/| /' conftest.$ac_ext >&5
22449
d6e01aa5 22450 ac_header_compiler=no
c0d27fcc 22451fi
d6e01aa5
KL
22452
22453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22454{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22455echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22456
22457# Is the header present?
d6e01aa5
KL
22458{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22459echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22460cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22461/* confdefs.h. */
22462_ACEOF
22463cat confdefs.h >>conftest.$ac_ext
22464cat >>conftest.$ac_ext <<_ACEOF
22465/* end confdefs.h. */
503d2be0
AS
22466#include <$ac_header>
22467_ACEOF
d6e01aa5
KL
22468if { (ac_try="$ac_cpp conftest.$ac_ext"
22469case "(($ac_try" in
22470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22471 *) ac_try_echo=$ac_try;;
22472esac
22473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22474 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22475 ac_status=$?
6bae0ccf 22476 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22477 rm -f conftest.er1
22478 cat conftest.err >&5
c0d27fcc 22479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22480 (exit $ac_status); } >/dev/null && {
22481 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22482 test ! -s conftest.err
22483 }; then
c0d27fcc 22484 ac_header_preproc=yes
647847ea 22485else
503d2be0 22486 echo "$as_me: failed program was:" >&5
19650fd6
AS
22487sed 's/^/| /' conftest.$ac_ext >&5
22488
c0d27fcc 22489 ac_header_preproc=no
647847ea 22490fi
d6e01aa5 22491
503d2be0 22492rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
22493{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22494echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22495
22496# So? What about this header?
edfaf76d
LK
22497case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22498 yes:no: )
c0d27fcc
MR
22499 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22500echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22501 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22502echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22503 ac_header_preproc=yes
19650fd6 22504 ;;
edfaf76d 22505 no:yes:* )
c0d27fcc
MR
22506 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22507echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22508 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22509echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22510 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22511echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22512 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22513echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22514 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22515echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22516 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22517echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 22518
19650fd6 22519 ;;
c0d27fcc 22520esac
d6e01aa5
KL
22521{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22522echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22523if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22524 echo $ECHO_N "(cached) $ECHO_C" >&6
22525else
edfaf76d 22526 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 22527fi
d6e01aa5
KL
22528ac_res=`eval echo '${'$as_ac_Header'}'`
22529 { echo "$as_me:$LINENO: result: $ac_res" >&5
22530echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22531
22532fi
503d2be0 22533if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22534 cat >>confdefs.h <<_ACEOF
503d2be0 22535#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22536_ACEOF
647847ea 22537
73b77ee5 22538fi
c0d27fcc 22539
503d2be0 22540done
73b77ee5 22541
c0d27fcc
MR
22542
22543
503d2be0
AS
22544for ac_func in fork vfork
22545do
22546as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
22547{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22548echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22549if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22550 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22551else
503d2be0 22552 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22553/* confdefs.h. */
22554_ACEOF
22555cat confdefs.h >>conftest.$ac_ext
22556cat >>conftest.$ac_ext <<_ACEOF
22557/* end confdefs.h. */
edfaf76d
LK
22558/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22559 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22560#define $ac_func innocuous_$ac_func
22561
fa0b693c 22562/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22563 which can conflict with char $ac_func (); below.
22564 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22565 <limits.h> exists even on freestanding compilers. */
edfaf76d 22566
19650fd6
AS
22567#ifdef __STDC__
22568# include <limits.h>
22569#else
22570# include <assert.h>
22571#endif
edfaf76d
LK
22572
22573#undef $ac_func
22574
d6e01aa5
KL
22575/* Override any GCC internal prototype to avoid an error.
22576 Use char because int might match the return type of a GCC
22577 builtin and then its argument prototype would still apply. */
503d2be0
AS
22578#ifdef __cplusplus
22579extern "C"
22580#endif
503d2be0 22581char $ac_func ();
fa0b693c
GM
22582/* The GNU C library defines this for functions which it implements
22583 to always fail with ENOSYS. Some functions are actually named
22584 something starting with __ and the normal name is an alias. */
d6e01aa5 22585#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 22586choke me
fa0b693c
GM
22587#endif
22588
19650fd6
AS
22589int
22590main ()
22591{
d6e01aa5 22592return $ac_func ();
503d2be0
AS
22593 ;
22594 return 0;
22595}
22596_ACEOF
22597rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
22598if { (ac_try="$ac_link"
22599case "(($ac_try" in
22600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22601 *) ac_try_echo=$ac_try;;
22602esac
22603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22604 (eval "$ac_link") 2>conftest.er1
503d2be0 22605 ac_status=$?
edfaf76d
LK
22606 grep -v '^ *+' conftest.er1 >conftest.err
22607 rm -f conftest.er1
22608 cat conftest.err >&5
c0d27fcc 22609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22610 (exit $ac_status); } && {
22611 test -z "$ac_c_werror_flag" ||
22612 test ! -s conftest.err
22613 } && test -s conftest$ac_exeext &&
22614 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22615 eval "$as_ac_var=yes"
22616else
22617 echo "$as_me: failed program was:" >&5
19650fd6
AS
22618sed 's/^/| /' conftest.$ac_ext >&5
22619
d6e01aa5 22620 eval "$as_ac_var=no"
503d2be0 22621fi
d6e01aa5
KL
22622
22623rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22624 conftest$ac_exeext conftest.$ac_ext
503d2be0 22625fi
d6e01aa5
KL
22626ac_res=`eval echo '${'$as_ac_var'}'`
22627 { echo "$as_me:$LINENO: result: $ac_res" >&5
22628echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22629if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22630 cat >>confdefs.h <<_ACEOF
503d2be0 22631#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22632_ACEOF
503d2be0 22633
fa0b693c 22634fi
503d2be0 22635done
fa0b693c 22636
503d2be0 22637if test "x$ac_cv_func_fork" = xyes; then
d6e01aa5
KL
22638 { echo "$as_me:$LINENO: checking for working fork" >&5
22639echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
22640if test "${ac_cv_func_fork_works+set}" = set; then
22641 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22642else
503d2be0
AS
22643 if test "$cross_compiling" = yes; then
22644 ac_cv_func_fork_works=cross
22645else
22646 cat >conftest.$ac_ext <<_ACEOF
c3a63088
KL
22647/* confdefs.h. */
22648_ACEOF
22649cat confdefs.h >>conftest.$ac_ext
22650cat >>conftest.$ac_ext <<_ACEOF
22651/* end confdefs.h. */
22652$ac_includes_default
22653int
22654main ()
22655{
22656
22657 /* By Ruediger Kuhlmann. */
d6e01aa5 22658 return fork () < 0;
c3a63088
KL
22659
22660 ;
22661 return 0;
22662}
503d2be0
AS
22663_ACEOF
22664rm -f conftest$ac_exeext
d6e01aa5
KL
22665if { (ac_try="$ac_link"
22666case "(($ac_try" in
22667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22668 *) ac_try_echo=$ac_try;;
22669esac
22670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22671 (eval "$ac_link") 2>&5
503d2be0 22672 ac_status=$?
c0d27fcc 22673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22674 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
22675 { (case "(($ac_try" in
22676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22677 *) ac_try_echo=$ac_try;;
22678esac
22679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22680 (eval "$ac_try") 2>&5
503d2be0 22681 ac_status=$?
c0d27fcc 22682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22683 (exit $ac_status); }; }; then
22684 ac_cv_func_fork_works=yes
22685else
22686 echo "$as_me: program exited with status $ac_status" >&5
22687echo "$as_me: failed program was:" >&5
19650fd6
AS
22688sed 's/^/| /' conftest.$ac_ext >&5
22689
c0d27fcc 22690( exit $ac_status )
503d2be0
AS
22691ac_cv_func_fork_works=no
22692fi
d6e01aa5 22693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 22694fi
d6e01aa5
KL
22695
22696
503d2be0 22697fi
d6e01aa5
KL
22698{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
22699echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 22700
6bae0ccf
DL
22701else
22702 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
22703fi
22704if test "x$ac_cv_func_fork_works" = xcross; then
22705 case $host in
22706 *-*-amigaos* | *-*-msdosdjgpp*)
22707 # Override, as these systems have only a dummy fork() stub
22708 ac_cv_func_fork_works=no
22709 ;;
22710 *)
22711 ac_cv_func_fork_works=yes
22712 ;;
22713 esac
c0d27fcc
MR
22714 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
22715echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 22716fi
73b77ee5 22717ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 22718if test "x$ac_cv_func_vfork" = xyes; then
d6e01aa5
KL
22719 { echo "$as_me:$LINENO: checking for working vfork" >&5
22720echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
22721if test "${ac_cv_func_vfork_works+set}" = set; then
22722 echo $ECHO_N "(cached) $ECHO_C" >&6
22723else
22724 if test "$cross_compiling" = yes; then
22725 ac_cv_func_vfork_works=cross
fa0b693c 22726else
503d2be0 22727 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22728/* confdefs.h. */
22729_ACEOF
22730cat confdefs.h >>conftest.$ac_ext
22731cat >>conftest.$ac_ext <<_ACEOF
22732/* end confdefs.h. */
73b77ee5 22733/* Thanks to Paul Eggert for this test. */
d6e01aa5 22734$ac_includes_default
19650fd6 22735#include <sys/wait.h>
d6e01aa5 22736#ifdef HAVE_VFORK_H
503d2be0 22737# include <vfork.h>
73b77ee5
GM
22738#endif
22739/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
22740 argument registers are propagated back to the parent. The compiler
22741 is told about this with #include <vfork.h>, but some compilers
22742 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
22743 static variable whose address is put into a register that is
22744 clobbered by the vfork. */
19650fd6 22745static void
fa0b693c 22746#ifdef __cplusplus
73b77ee5 22747sparc_address_test (int arg)
503d2be0 22748# else
73b77ee5 22749sparc_address_test (arg) int arg;
fa0b693c 22750#endif
fa0b693c 22751{
73b77ee5
GM
22752 static pid_t child;
22753 if (!child) {
22754 child = vfork ();
22755 if (child < 0) {
22756 perror ("vfork");
22757 _exit(2);
22758 }
22759 if (!child) {
22760 arg = getpid();
22761 write(-1, "", 0);
22762 _exit (arg);
22763 }
22764 }
22765}
503d2be0
AS
22766
22767int
22768main ()
22769{
73b77ee5
GM
22770 pid_t parent = getpid ();
22771 pid_t child;
fa0b693c 22772
19650fd6 22773 sparc_address_test (0);
fa0b693c 22774
73b77ee5 22775 child = vfork ();
fa0b693c 22776
73b77ee5 22777 if (child == 0) {
503d2be0
AS
22778 /* Here is another test for sparc vfork register problems. This
22779 test uses lots of local variables, at least as many local
22780 variables as main has allocated so far including compiler
22781 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
22782 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
22783 reuse the register of parent for one of the local variables,
22784 since it will think that parent can't possibly be used any more
22785 in this routine. Assigning to the local variable will thus
22786 munge parent in the parent process. */
73b77ee5
GM
22787 pid_t
22788 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22789 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22790 /* Convince the compiler that p..p7 are live; otherwise, it might
22791 use the same hardware register for all 8 local variables. */
22792 if (p != p1 || p != p2 || p != p3 || p != p4
22793 || p != p5 || p != p6 || p != p7)
22794 _exit(1);
fa0b693c 22795
503d2be0
AS
22796 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22797 from child file descriptors. If the child closes a descriptor
22798 before it execs or exits, this munges the parent's descriptor
22799 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
22800 _exit(close(fileno(stdout)) != 0);
22801 } else {
22802 int status;
22803 struct stat st;
22804
22805 while (wait(&status) != child)
22806 ;
d6e01aa5 22807 return (
73b77ee5
GM
22808 /* Was there some problem with vforking? */
22809 child < 0
22810
22811 /* Did the child fail? (This shouldn't happen.) */
22812 || status
22813
22814 /* Did the vfork/compiler bug occur? */
22815 || parent != getpid()
fa0b693c 22816
73b77ee5
GM
22817 /* Did the file descriptor bug occur? */
22818 || fstat(fileno(stdout), &st) != 0
22819 );
22820 }
22821}
503d2be0
AS
22822_ACEOF
22823rm -f conftest$ac_exeext
d6e01aa5
KL
22824if { (ac_try="$ac_link"
22825case "(($ac_try" in
22826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22827 *) ac_try_echo=$ac_try;;
22828esac
22829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22830 (eval "$ac_link") 2>&5
503d2be0 22831 ac_status=$?
c0d27fcc 22832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22833 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
22834 { (case "(($ac_try" in
22835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22836 *) ac_try_echo=$ac_try;;
22837esac
22838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22839 (eval "$ac_try") 2>&5
503d2be0 22840 ac_status=$?
c0d27fcc 22841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22842 (exit $ac_status); }; }; then
73b77ee5 22843 ac_cv_func_vfork_works=yes
fa0b693c 22844else
503d2be0
AS
22845 echo "$as_me: program exited with status $ac_status" >&5
22846echo "$as_me: failed program was:" >&5
19650fd6
AS
22847sed 's/^/| /' conftest.$ac_ext >&5
22848
c0d27fcc 22849( exit $ac_status )
503d2be0
AS
22850ac_cv_func_vfork_works=no
22851fi
d6e01aa5 22852rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 22853fi
d6e01aa5
KL
22854
22855
fa0b693c 22856fi
d6e01aa5
KL
22857{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
22858echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 22859
503d2be0
AS
22860fi;
22861if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 22862 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
22863 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
22864echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
22865fi
22866
503d2be0
AS
22867if test "x$ac_cv_func_vfork_works" = xyes; then
22868
c0d27fcc 22869cat >>confdefs.h <<\_ACEOF
503d2be0 22870#define HAVE_WORKING_VFORK 1
c0d27fcc 22871_ACEOF
503d2be0
AS
22872
22873else
22874
c0d27fcc 22875cat >>confdefs.h <<\_ACEOF
73b77ee5 22876#define vfork fork
c0d27fcc 22877_ACEOF
fa0b693c
GM
22878
22879fi
503d2be0
AS
22880if test "x$ac_cv_func_fork_works" = xyes; then
22881
c0d27fcc 22882cat >>confdefs.h <<\_ACEOF
503d2be0 22883#define HAVE_WORKING_FORK 1
c0d27fcc 22884_ACEOF
fa0b693c 22885
503d2be0 22886fi
647847ea 22887
c0d27fcc 22888
d6e01aa5
KL
22889{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
22890echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
22891if test "${emacs_cv_langinfo_codeset+set}" = set; then
22892 echo $ECHO_N "(cached) $ECHO_C" >&6
22893else
22894 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22895/* confdefs.h. */
22896_ACEOF
22897cat confdefs.h >>conftest.$ac_ext
22898cat >>conftest.$ac_ext <<_ACEOF
22899/* end confdefs.h. */
6a3a24fa
JD
22900#include <langinfo.h>
22901int
22902main ()
22903{
22904char* cs = nl_langinfo(CODESET);
22905 ;
22906 return 0;
22907}
22908_ACEOF
22909rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
22910if { (ac_try="$ac_link"
22911case "(($ac_try" in
22912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22913 *) ac_try_echo=$ac_try;;
22914esac
22915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22916 (eval "$ac_link") 2>conftest.er1
6a3a24fa 22917 ac_status=$?
edfaf76d
LK
22918 grep -v '^ *+' conftest.er1 >conftest.err
22919 rm -f conftest.er1
22920 cat conftest.err >&5
6a3a24fa 22921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22922 (exit $ac_status); } && {
22923 test -z "$ac_c_werror_flag" ||
22924 test ! -s conftest.err
22925 } && test -s conftest$ac_exeext &&
22926 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
22927 emacs_cv_langinfo_codeset=yes
22928else
22929 echo "$as_me: failed program was:" >&5
19650fd6
AS
22930sed 's/^/| /' conftest.$ac_ext >&5
22931
d6e01aa5 22932 emacs_cv_langinfo_codeset=no
6a3a24fa 22933fi
d6e01aa5
KL
22934
22935rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22936 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
22937
22938fi
d6e01aa5
KL
22939{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
22940echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
22941if test $emacs_cv_langinfo_codeset = yes; then
22942
22943cat >>confdefs.h <<\_ACEOF
22944#define HAVE_LANGINFO_CODESET 1
22945_ACEOF
22946
22947fi
22948
d6e01aa5
KL
22949{ echo "$as_me:$LINENO: checking for size_t" >&5
22950echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
22951if test "${ac_cv_type_size_t+set}" = set; then
22952 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 22953else
503d2be0 22954 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22955/* confdefs.h. */
22956_ACEOF
22957cat confdefs.h >>conftest.$ac_ext
22958cat >>conftest.$ac_ext <<_ACEOF
22959/* end confdefs.h. */
503d2be0 22960$ac_includes_default
d6e01aa5 22961typedef size_t ac__type_new_;
503d2be0
AS
22962int
22963main ()
22964{
d6e01aa5 22965if ((ac__type_new_ *) 0)
503d2be0 22966 return 0;
d6e01aa5 22967if (sizeof (ac__type_new_))
503d2be0
AS
22968 return 0;
22969 ;
22970 return 0;
22971}
22972_ACEOF
22973rm -f conftest.$ac_objext
d6e01aa5
KL
22974if { (ac_try="$ac_compile"
22975case "(($ac_try" in
22976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22977 *) ac_try_echo=$ac_try;;
22978esac
22979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22980 (eval "$ac_compile") 2>conftest.er1
503d2be0 22981 ac_status=$?
edfaf76d
LK
22982 grep -v '^ *+' conftest.er1 >conftest.err
22983 rm -f conftest.er1
22984 cat conftest.err >&5
c0d27fcc 22985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22986 (exit $ac_status); } && {
22987 test -z "$ac_c_werror_flag" ||
22988 test ! -s conftest.err
22989 } && test -s conftest.$ac_objext; then
8730a8da
DL
22990 ac_cv_type_size_t=yes
22991else
503d2be0 22992 echo "$as_me: failed program was:" >&5
19650fd6
AS
22993sed 's/^/| /' conftest.$ac_ext >&5
22994
d6e01aa5 22995 ac_cv_type_size_t=no
8730a8da 22996fi
d6e01aa5
KL
22997
22998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 22999fi
d6e01aa5
KL
23000{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23001echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 23002if test $ac_cv_type_size_t = yes; then
503d2be0 23003
c0d27fcc
MR
23004cat >>confdefs.h <<_ACEOF
23005#define HAVE_SIZE_T 1
23006_ACEOF
23007
8730a8da
DL
23008
23009fi
23010
c0d27fcc 23011
d6e01aa5
KL
23012{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23013echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
23014if test "${ac_cv_type_mbstate_t+set}" = set; then
23015 echo $ECHO_N "(cached) $ECHO_C" >&6
23016else
23017 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23018/* confdefs.h. */
23019_ACEOF
23020cat confdefs.h >>conftest.$ac_ext
23021cat >>conftest.$ac_ext <<_ACEOF
23022/* end confdefs.h. */
973a76b1
DL
23023$ac_includes_default
23024# include <wchar.h>
23025int
23026main ()
23027{
23028mbstate_t x; return sizeof x;
23029 ;
23030 return 0;
23031}
23032_ACEOF
23033rm -f conftest.$ac_objext
d6e01aa5
KL
23034if { (ac_try="$ac_compile"
23035case "(($ac_try" in
23036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23037 *) ac_try_echo=$ac_try;;
23038esac
23039eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23040 (eval "$ac_compile") 2>conftest.er1
973a76b1 23041 ac_status=$?
edfaf76d
LK
23042 grep -v '^ *+' conftest.er1 >conftest.err
23043 rm -f conftest.er1
23044 cat conftest.err >&5
973a76b1 23045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23046 (exit $ac_status); } && {
23047 test -z "$ac_c_werror_flag" ||
23048 test ! -s conftest.err
23049 } && test -s conftest.$ac_objext; then
973a76b1
DL
23050 ac_cv_type_mbstate_t=yes
23051else
23052 echo "$as_me: failed program was:" >&5
19650fd6
AS
23053sed 's/^/| /' conftest.$ac_ext >&5
23054
d6e01aa5 23055 ac_cv_type_mbstate_t=no
973a76b1 23056fi
d6e01aa5
KL
23057
23058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 23059fi
d6e01aa5
KL
23060{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
23061echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
23062 if test $ac_cv_type_mbstate_t = yes; then
23063
23064cat >>confdefs.h <<\_ACEOF
23065#define HAVE_MBSTATE_T 1
23066_ACEOF
23067
23068 else
23069
23070cat >>confdefs.h <<\_ACEOF
23071#define mbstate_t int
23072_ACEOF
23073
23074 fi
23075
d6e01aa5
KL
23076{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
23077echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
23078if test "${emacs_cv_c_restrict+set}" = set; then
23079 echo $ECHO_N "(cached) $ECHO_C" >&6
23080else
23081 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23082/* confdefs.h. */
23083_ACEOF
23084cat confdefs.h >>conftest.$ac_ext
23085cat >>conftest.$ac_ext <<_ACEOF
23086/* end confdefs.h. */
22044edf
DL
23087void fred (int *restrict x);
23088int
23089main ()
23090{
b936fae4 23091
22044edf
DL
23092 ;
23093 return 0;
23094}
c0d27fcc 23095_ACEOF
22044edf 23096rm -f conftest.$ac_objext
d6e01aa5
KL
23097if { (ac_try="$ac_compile"
23098case "(($ac_try" in
23099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23100 *) ac_try_echo=$ac_try;;
23101esac
23102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23103 (eval "$ac_compile") 2>conftest.er1
22044edf 23104 ac_status=$?
edfaf76d
LK
23105 grep -v '^ *+' conftest.er1 >conftest.err
23106 rm -f conftest.er1
23107 cat conftest.err >&5
22044edf 23108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23109 (exit $ac_status); } && {
23110 test -z "$ac_c_werror_flag" ||
23111 test ! -s conftest.err
23112 } && test -s conftest.$ac_objext; then
22044edf
DL
23113 emacs_cv_c_restrict=yes
23114else
23115 echo "$as_me: failed program was:" >&5
19650fd6
AS
23116sed 's/^/| /' conftest.$ac_ext >&5
23117
d6e01aa5 23118 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23119/* confdefs.h. */
23120_ACEOF
23121cat confdefs.h >>conftest.$ac_ext
23122cat >>conftest.$ac_ext <<_ACEOF
23123/* end confdefs.h. */
22044edf
DL
23124void fred (int *__restrict x);
23125int
23126main ()
23127{
c0d27fcc 23128
22044edf
DL
23129 ;
23130 return 0;
23131}
c0d27fcc 23132_ACEOF
22044edf 23133rm -f conftest.$ac_objext
d6e01aa5
KL
23134if { (ac_try="$ac_compile"
23135case "(($ac_try" in
23136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23137 *) ac_try_echo=$ac_try;;
23138esac
23139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23140 (eval "$ac_compile") 2>conftest.er1
22044edf 23141 ac_status=$?
edfaf76d
LK
23142 grep -v '^ *+' conftest.er1 >conftest.err
23143 rm -f conftest.er1
23144 cat conftest.err >&5
22044edf 23145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23146 (exit $ac_status); } && {
23147 test -z "$ac_c_werror_flag" ||
23148 test ! -s conftest.err
23149 } && test -s conftest.$ac_objext; then
22044edf
DL
23150 emacs_cv_c_restrict=__restrict
23151else
23152 echo "$as_me: failed program was:" >&5
19650fd6
AS
23153sed 's/^/| /' conftest.$ac_ext >&5
23154
d6e01aa5 23155 emacs_cv_c_restrict=no
ba4481b5 23156fi
d6e01aa5
KL
23157
23158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23159fi
d6e01aa5
KL
23160
23161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23162fi
d6e01aa5
KL
23163{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
23164echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
23165case "$emacs_cv_c_restrict" in
23166 yes) emacs_restrict=restrict;;
23167 no) emacs_restrict="";;
23168 *) emacs_restrict="$emacs_cv_c_restrict";;
23169esac
23170if test "$emacs_restrict" != __restrict; then
b936fae4 23171
22044edf
DL
23172cat >>confdefs.h <<_ACEOF
23173#define __restrict $emacs_restrict
c0d27fcc 23174_ACEOF
ba4481b5
DL
23175
23176fi
ba4481b5 23177
d6e01aa5
KL
23178{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
23179echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
23180if test "${emacs_cv_c_restrict_arr+set}" = set; then
23181 echo $ECHO_N "(cached) $ECHO_C" >&6
23182else
23183 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23184/* confdefs.h. */
23185_ACEOF
23186cat confdefs.h >>conftest.$ac_ext
23187cat >>conftest.$ac_ext <<_ACEOF
23188/* end confdefs.h. */
22044edf
DL
23189void fred (int x[__restrict]);
23190int
23191main ()
23192{
b936fae4 23193
22044edf
DL
23194 ;
23195 return 0;
23196}
c0d27fcc 23197_ACEOF
22044edf 23198rm -f conftest.$ac_objext
d6e01aa5
KL
23199if { (ac_try="$ac_compile"
23200case "(($ac_try" in
23201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23202 *) ac_try_echo=$ac_try;;
23203esac
23204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23205 (eval "$ac_compile") 2>conftest.er1
22044edf 23206 ac_status=$?
edfaf76d
LK
23207 grep -v '^ *+' conftest.er1 >conftest.err
23208 rm -f conftest.er1
23209 cat conftest.err >&5
22044edf 23210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23211 (exit $ac_status); } && {
23212 test -z "$ac_c_werror_flag" ||
23213 test ! -s conftest.err
23214 } && test -s conftest.$ac_objext; then
22044edf
DL
23215 emacs_cv_c_restrict_arr=yes
23216else
23217 echo "$as_me: failed program was:" >&5
19650fd6
AS
23218sed 's/^/| /' conftest.$ac_ext >&5
23219
d6e01aa5 23220 emacs_cv_c_restrict_arr=no
ba4481b5 23221fi
d6e01aa5
KL
23222
23223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 23224fi
d6e01aa5
KL
23225{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
23226echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 23227if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 23228
c0d27fcc 23229cat >>confdefs.h <<\_ACEOF
22044edf 23230#define __restrict_arr __restrict
c0d27fcc 23231_ACEOF
ba4481b5 23232
ba4481b5
DL
23233fi
23234
c0d27fcc 23235
c0d27fcc 23236
22044edf
DL
23237# Set up the CFLAGS for real compilation, so we can substitute it.
23238CFLAGS="$REAL_CFLAGS"
23239CPPFLAGS="$REAL_CPPFLAGS"
23240
23241#### Find out which version of Emacs this is.
23242version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
23243 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
23244if test x"${version}" = x; then
23245 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
23246echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
23247 { (exit 1); exit 1; }; }
23248fi
23249
23250### Specify what sort of things we'll be editing into Makefile and config.h.
23251### Use configuration here uncanonicalized to avoid exceeding size limits.
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
6a3a24fa 23284
22044edf
DL
23285
23286
23287cat >>confdefs.h <<_ACEOF
23288#define EMACS_CONFIGURATION "${canonical}"
23289_ACEOF
23290
23291
23292cat >>confdefs.h <<_ACEOF
23293#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
23294_ACEOF
23295
23296
23297cat >>confdefs.h <<_ACEOF
23298#define config_machfile "${machfile}"
23299_ACEOF
23300
23301
23302cat >>confdefs.h <<_ACEOF
23303#define config_opsysfile "${opsysfile}"
23304_ACEOF
23305
23306
23307cat >>confdefs.h <<_ACEOF
23308#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
23309_ACEOF
23310
23311
23312cat >>confdefs.h <<_ACEOF
23313#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
23314_ACEOF
23315
23316
23317cat >>confdefs.h <<_ACEOF
23318#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
23319_ACEOF
23320
23321
23322cat >>confdefs.h <<_ACEOF
23323#define UNEXEC_SRC ${UNEXEC_SRC}
23324_ACEOF
23325
23326
23327if test "${HAVE_X_WINDOWS}" = "yes" ; then
23328
23329cat >>confdefs.h <<\_ACEOF
23330#define HAVE_X_WINDOWS 1
23331_ACEOF
23332
23333fi
23334if test "${USE_X_TOOLKIT}" != "none" ; then
23335
23336cat >>confdefs.h <<\_ACEOF
23337#define USE_X_TOOLKIT 1
23338_ACEOF
23339
23340fi
23341if test "${HAVE_X11}" = "yes" ; then
23342
23343cat >>confdefs.h <<\_ACEOF
23344#define HAVE_X11 1
23345_ACEOF
23346
23347fi
23348if test "${HAVE_XFREE386}" = "yes" ; then
23349
23350cat >>confdefs.h <<\_ACEOF
23351#define HAVE_XFREE386 1
23352_ACEOF
23353
23354fi
23355if test "${HAVE_MENUS}" = "yes" ; then
23356
23357cat >>confdefs.h <<\_ACEOF
23358#define HAVE_MENUS 1
23359_ACEOF
23360
23361fi
23362if test "${GNU_MALLOC}" = "yes" ; then
23363
23364cat >>confdefs.h <<\_ACEOF
23365#define GNU_MALLOC 1
23366_ACEOF
23367
23368fi
23369if test "${REL_ALLOC}" = "yes" ; then
23370
23371cat >>confdefs.h <<\_ACEOF
23372#define REL_ALLOC 1
23373_ACEOF
23374
23375fi
23376
23377
23378
c0d27fcc
MR
23379
23380
5afbeb22 23381
ba4481b5 23382#### Report on what we decided to do.
488dd4c4
JD
23383#### Report GTK as a toolkit, even if it doesn't use Xt.
23384#### It makes printing result more understandable as using GTK sets
23385#### toolkit_scroll_bars to yes by default.
23386if test "${HAVE_GTK}" = "yes"; then
23387 USE_X_TOOLKIT=GTK
23388fi
23389
ba4481b5
DL
23390echo "
23391Configured for \`${canonical}'.
23392
23393 Where should the build process find the source code? ${srcdir}
23394 What operating system and machine description files should Emacs use?
23395 \`${opsysfile}' and \`${machfile}'
23396 What compiler should emacs be built with? ${CC} ${CFLAGS}
23397 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 23398 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 23399 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 23400 What window system should Emacs use? ${window_system}
8e967cf7 23401 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
23402
23403if test -n "${x_includes}"; then
23404echo " Where do we find X Windows header files? ${x_includes}"
23405else
23406echo " Where do we find X Windows header files? Standard dirs"
23407fi
23408if test -n "${x_libraries}"; then
23409echo " Where do we find X Windows libraries? ${x_libraries}"
23410else
23411echo " Where do we find X Windows libraries? Standard dirs"
23412fi
23413
23414echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
23415echo " Does Emacs use -lXpm? ${HAVE_XPM}"
23416echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
23417echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 23418echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 23419echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 23420echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 23421echo " Does Emacs use -lgpm? ${HAVE_GPM}"
ba4481b5
DL
23422echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
23423echo
23424
d0098f13
JD
23425if test $USE_XASSERTS = yes; then
23426 echo " Compiling with asserts turned on."
d0098f13
JD
23427 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
23428 echo
23429fi
05cf15c6 23430
a2d3b5bd
JD
23431if test "$USE_X_TOOLKIT" = GTK; then
23432 case "$canonical" in
23433 *cygwin*)
23434 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
23435 will probably get a crash on startup. If this happens, please use another
23436 toolkit for Emacs. See etc/PROBLEMS for more information."
23437 ;;
23438 esac
23439fi
23440
05cf15c6 23441
f0e04acc
GM
23442if test "$HAVE_CARBON" = "yes"; then
23443 echo
23444 echo "Warning: The Mac Carbon port is currently unsupported and has
23445known problems. It is not recommended for use by non-developers.
23446Read the emacs-devel archives for more information."
23447 echo
23448fi
23449
131e4133
MA
23450if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
23451 echo "D-Bus integration has been tested for GNU/Linux only."
23452 echo
23453fi
23454
05cf15c6 23455
ba4481b5
DL
23456# Remove any trailing slashes in these variables.
23457test "${prefix}" != NONE &&
23458 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
23459test "${exec_prefix}" != NONE &&
23460 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
23461
d0e9bfd2
GM
23462## Check if the C preprocessor will convert `..' to `. .'. If so, set
23463## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
23464## from Makefile.c can correctly provide the arg `-traditional' to the
23465## C preprocessor.
23466
503d2be0 23467cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23468/* confdefs.h. */
23469_ACEOF
23470cat confdefs.h >>conftest.$ac_ext
23471cat >>conftest.$ac_ext <<_ACEOF
23472/* end confdefs.h. */
d0e9bfd2 23473yes..yes
503d2be0 23474_ACEOF
d0e9bfd2 23475if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 23476 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
23477 CPP_NEED_TRADITIONAL=no
23478else
d0e9bfd2
GM
23479 CPP_NEED_TRADITIONAL=yes
23480fi
23481rm -f conftest*
23482
c0d27fcc 23483
f657c21b 23484ac_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"
d6e01aa5
KL
23485
23486ac_config_commands="$ac_config_commands default"
23487
503d2be0 23488cat >confcache <<\_ACEOF
ba4481b5
DL
23489# This file is a shell script that caches the results of configure
23490# tests run on this system so they can be shared between configure
503d2be0
AS
23491# scripts and configure runs, see configure's option --config-cache.
23492# It is not useful on other systems. If it contains results you don't
23493# want to keep, you may remove or edit it.
ba4481b5 23494#
503d2be0
AS
23495# config.status only pays attention to the cache file if you give it
23496# the --recheck option to rerun configure.
ba4481b5 23497#
6bae0ccf 23498# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
23499# loading this file, other *unset* `ac_cv_foo' will be assigned the
23500# following values.
23501
23502_ACEOF
23503
ba4481b5
DL
23504# The following way of writing the cache mishandles newlines in values,
23505# but we know of no workaround that is simple, portable, and efficient.
d6e01aa5 23506# So, we kill variables containing newlines.
ba4481b5
DL
23507# Ultrix sh set writes to stderr and can't be redirected directly,
23508# and sets the high bit in the cache file unless we assign to the vars.
d6e01aa5
KL
23509(
23510 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23511 eval ac_val=\$$ac_var
23512 case $ac_val in #(
23513 *${as_nl}*)
23514 case $ac_var in #(
23515 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23516echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23517 esac
23518 case $ac_var in #(
23519 _ | IFS | as_nl) ;; #(
23520 *) $as_unset $ac_var ;;
23521 esac ;;
23522 esac
23523 done
23524
503d2be0 23525 (set) 2>&1 |
d6e01aa5
KL
23526 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23527 *${as_nl}ac_space=\ *)
503d2be0
AS
23528 # `set' does not quote correctly, so add quotes (double-quote
23529 # substitution turns \\\\ into \\, and sed turns \\ into \).
23530 sed -n \
edfaf76d
LK
23531 "s/'/'\\\\''/g;
23532 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
d6e01aa5 23533 ;; #(
503d2be0
AS
23534 *)
23535 # `set' quotes correctly as required by POSIX, so do not add quotes.
d6e01aa5 23536 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 23537 ;;
d6e01aa5
KL
23538 esac |
23539 sort
23540) |
503d2be0 23541 sed '
d6e01aa5 23542 /^ac_cv_env_/b end
503d2be0 23543 t clear
d6e01aa5 23544 :clear
503d2be0
AS
23545 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23546 t end
d6e01aa5
KL
23547 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23548 :end' >>confcache
23549if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23550 if test -w "$cache_file"; then
23551 test "x$cache_file" != "x/dev/null" &&
23552 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23553echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 23554 cat confcache >$cache_file
ba4481b5 23555 else
d6e01aa5
KL
23556 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23557echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
23558 fi
23559fi
23560rm -f confcache
23561
ba4481b5
DL
23562test "x$prefix" = xNONE && prefix=$ac_default_prefix
23563# Let make expand exec_prefix.
23564test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23565
ba4481b5
DL
23566DEFS=-DHAVE_CONFIG_H
23567
6bae0ccf
DL
23568ac_libobjs=
23569ac_ltlibobjs=
23570for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23571 # 1. Remove the extension, and $U if already installed.
d6e01aa5
KL
23572 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
23573 ac_i=`echo "$ac_i" | sed "$ac_script"`
23574 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
23575 # will be set to the directory where LIBOBJS objects are built.
23576 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23577 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
23578done
23579LIBOBJS=$ac_libobjs
23580
23581LTLIBOBJS=$ac_ltlibobjs
23582
23583
c0d27fcc 23584
ba4481b5 23585: ${CONFIG_STATUS=./config.status}
503d2be0
AS
23586ac_clean_files_save=$ac_clean_files
23587ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 23588{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
23589echo "$as_me: creating $CONFIG_STATUS" >&6;}
23590cat >$CONFIG_STATUS <<_ACEOF
23591#! $SHELL
c0d27fcc 23592# Generated by $as_me.
ba4481b5 23593# Run this file to recreate the current configuration.
ba4481b5 23594# Compiler output produced by configure, useful for debugging
503d2be0 23595# configure, is in config.log if it exists.
ba4481b5 23596
503d2be0 23597debug=false
19650fd6
AS
23598ac_cs_recheck=false
23599ac_cs_silent=false
503d2be0 23600SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
23601_ACEOF
23602
23603cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
23604## --------------------- ##
23605## M4sh Initialization. ##
23606## --------------------- ##
23607
d6e01aa5
KL
23608# Be more Bourne compatible
23609DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
23610if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23611 emulate sh
23612 NULLCMD=:
6bae0ccf
DL
23613 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23614 # is contrary to our usage. Disable this feature.
23615 alias -g '${1+"$@"}'='"$@"'
d6e01aa5
KL
23616 setopt NO_GLOB_SUBST
23617else
23618 case `(set -o) 2>/dev/null` in
23619 *posix*) set -o posix ;;
23620esac
23621
23622fi
23623
23624
23625
23626
23627# PATH needs CR
23628# Avoid depending upon Character Ranges.
23629as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23630as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23631as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23632as_cr_digits='0123456789'
23633as_cr_alnum=$as_cr_Letters$as_cr_digits
23634
23635# The user is always right.
23636if test "${PATH_SEPARATOR+set}" != set; then
23637 echo "#! /bin/sh" >conf$$.sh
23638 echo "exit 0" >>conf$$.sh
23639 chmod +x conf$$.sh
23640 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23641 PATH_SEPARATOR=';'
23642 else
23643 PATH_SEPARATOR=:
23644 fi
23645 rm -f conf$$.sh
503d2be0
AS
23646fi
23647
c0d27fcc 23648# Support unset when possible.
edfaf76d 23649if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
23650 as_unset=unset
23651else
23652 as_unset=false
23653fi
23654
6bae0ccf 23655
d6e01aa5
KL
23656# IFS
23657# We need space, tab and new line, in precisely that order. Quoting is
23658# there to prevent editors from complaining about space-tab.
23659# (If _AS_PATH_WALK were called with IFS unset, it would disable word
23660# splitting by setting IFS to empty value.)
23661as_nl='
23662'
23663IFS=" "" $as_nl"
23664
23665# Find who we are. Look in the path if we contain no directory separator.
23666case $0 in
23667 *[\\/]* ) as_myself=$0 ;;
23668 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23669for as_dir in $PATH
23670do
23671 IFS=$as_save_IFS
23672 test -z "$as_dir" && as_dir=.
23673 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23674done
23675IFS=$as_save_IFS
23676
23677 ;;
23678esac
23679# We did not find ourselves, most probably we were run as `sh COMMAND'
23680# in which case we are not to be found in the path.
23681if test "x$as_myself" = x; then
23682 as_myself=$0
23683fi
23684if test ! -f "$as_myself"; then
23685 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
23686 { (exit 1); exit 1; }
23687fi
23688
6bae0ccf 23689# Work around bugs in pre-3.0 UWIN ksh.
d6e01aa5
KL
23690for as_var in ENV MAIL MAILPATH
23691do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23692done
6bae0ccf
DL
23693PS1='$ '
23694PS2='> '
23695PS4='+ '
23696
23697# NLS nuisances.
19650fd6
AS
23698for as_var in \
23699 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23700 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23701 LC_TELEPHONE LC_TIME
6bae0ccf 23702do
edfaf76d 23703 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
23704 eval $as_var=C; export $as_var
23705 else
d6e01aa5 23706 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
23707 fi
23708done
23709
23710# Required to use basename.
d6e01aa5
KL
23711if expr a : '\(a\)' >/dev/null 2>&1 &&
23712 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
23713 as_expr=expr
23714else
23715 as_expr=false
23716fi
23717
d6e01aa5 23718if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
23719 as_basename=basename
23720else
23721 as_basename=false
23722fi
c0d27fcc
MR
23723
23724
503d2be0 23725# Name of the executable.
d6e01aa5 23726as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
23727$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23728 X"$0" : 'X\(//\)$' \| \
d6e01aa5 23729 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 23730echo X/"$0" |
d6e01aa5
KL
23731 sed '/^.*\/\([^/][^/]*\)\/*$/{
23732 s//\1/
23733 q
23734 }
23735 /^X\/\(\/\/\)$/{
23736 s//\1/
23737 q
23738 }
23739 /^X\/\(\/\).*/{
23740 s//\1/
23741 q
23742 }
23743 s/.*/./; q'`
c0d27fcc 23744
d6e01aa5
KL
23745# CDPATH.
23746$as_unset CDPATH
c0d27fcc
MR
23747
23748
c0d27fcc 23749
c0d27fcc
MR
23750 as_lineno_1=$LINENO
23751 as_lineno_2=$LINENO
c0d27fcc 23752 test "x$as_lineno_1" != "x$as_lineno_2" &&
d6e01aa5 23753 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
23754
23755 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23756 # uniformly replaced by the line number. The first 'sed' inserts a
d6e01aa5
KL
23757 # line-number line after each line using $LINENO; the second 'sed'
23758 # does the real work. The second script uses 'N' to pair each
23759 # line-number line with the line containing $LINENO, and appends
23760 # trailing '-' during substitution so that $LINENO is not a special
23761 # case at line end.
c0d27fcc 23762 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
d6e01aa5
KL
23763 # scripts with optimization help from Paolo Bonzini. Blame Lee
23764 # E. McMahon (1931-1989) for sed's syntax. :-)
23765 sed -n '
23766 p
23767 /[$]LINENO/=
23768 ' <$as_myself |
c0d27fcc 23769 sed '
d6e01aa5
KL
23770 s/[$]LINENO.*/&-/
23771 t lineno
23772 b
23773 :lineno
c0d27fcc 23774 N
d6e01aa5
KL
23775 :loop
23776 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 23777 t loop
d6e01aa5 23778 s/-\n.*//
c0d27fcc 23779 ' >$as_me.lineno &&
d6e01aa5
KL
23780 chmod +x "$as_me.lineno" ||
23781 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
23782 { (exit 1); exit 1; }; }
23783
23784 # Don't try to exec as it changes $[0], causing all sort of problems
23785 # (the dirname of $[0] is not the place where we might find the
d6e01aa5
KL
23786 # original and so on. Autoconf is especially sensitive to this).
23787 . "./$as_me.lineno"
c0d27fcc
MR
23788 # Exit status is that of the last command.
23789 exit
23790}
23791
23792
d6e01aa5
KL
23793if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
23794 as_dirname=dirname
23795else
23796 as_dirname=false
23797fi
23798
23799ECHO_C= ECHO_N= ECHO_T=
23800case `echo -n x` in
23801-n*)
23802 case `echo 'x\c'` in
23803 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
23804 *) ECHO_C='\c';;
23805 esac;;
23806*)
23807 ECHO_N='-n';;
c0d27fcc 23808esac
503d2be0 23809
d6e01aa5
KL
23810if expr a : '\(a\)' >/dev/null 2>&1 &&
23811 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
23812 as_expr=expr
23813else
23814 as_expr=false
23815fi
23816
23817rm -f conf$$ conf$$.exe conf$$.file
d6e01aa5
KL
23818if test -d conf$$.dir; then
23819 rm -f conf$$.dir/conf$$.file
23820else
23821 rm -f conf$$.dir
23822 mkdir conf$$.dir
23823fi
503d2be0
AS
23824echo >conf$$.file
23825if ln -s conf$$.file conf$$ 2>/dev/null; then
d6e01aa5
KL
23826 as_ln_s='ln -s'
23827 # ... but there are two gotchas:
23828 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
23829 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
23830 # In both cases, we have to default to `cp -p'.
23831 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 23832 as_ln_s='cp -p'
503d2be0
AS
23833elif ln conf$$.file conf$$ 2>/dev/null; then
23834 as_ln_s=ln
23835else
23836 as_ln_s='cp -p'
23837fi
d6e01aa5
KL
23838rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
23839rmdir conf$$.dir 2>/dev/null
503d2be0 23840
6bae0ccf
DL
23841if mkdir -p . 2>/dev/null; then
23842 as_mkdir_p=:
23843else
edfaf76d 23844 test -d ./-p && rmdir ./-p
6bae0ccf
DL
23845 as_mkdir_p=false
23846fi
23847
d6e01aa5
KL
23848if test -x / >/dev/null 2>&1; then
23849 as_test_x='test -x'
23850else
23851 if ls -dL / >/dev/null 2>&1; then
23852 as_ls_L_option=L
23853 else
23854 as_ls_L_option=
23855 fi
23856 as_test_x='
23857 eval sh -c '\''
23858 if test -d "$1"; then
23859 test -d "$1/.";
23860 else
23861 case $1 in
23862 -*)set "./$1";;
23863 esac;
23864 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
23865 ???[sx]*):;;*)false;;esac;fi
23866 '\'' sh
23867 '
23868fi
23869as_executable_p=$as_test_x
503d2be0 23870
c0d27fcc 23871# Sed expression to map a string onto a valid CPP name.
edfaf76d 23872as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
23873
23874# Sed expression to map a string onto a valid variable name.
edfaf76d 23875as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 23876
503d2be0 23877
503d2be0
AS
23878exec 6>&1
23879
d6e01aa5 23880# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 23881# report actual input values of CONFIG_FILES etc. instead of their
d6e01aa5
KL
23882# values after options handling.
23883ac_log="
9cf8f393 23884This file was extended by emacs $as_me 23.0.50, which was
d6e01aa5 23885generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
23886
23887 CONFIG_FILES = $CONFIG_FILES
23888 CONFIG_HEADERS = $CONFIG_HEADERS
23889 CONFIG_LINKS = $CONFIG_LINKS
23890 CONFIG_COMMANDS = $CONFIG_COMMANDS
23891 $ $0 $@
23892
d6e01aa5
KL
23893on `(hostname || uname -n) 2>/dev/null | sed 1q`
23894"
23895
503d2be0
AS
23896_ACEOF
23897
d6e01aa5 23898cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 23899# Files that config.status was made for.
d6e01aa5
KL
23900config_files="$ac_config_files"
23901config_headers="$ac_config_headers"
23902config_commands="$ac_config_commands"
503d2be0 23903
d6e01aa5 23904_ACEOF
503d2be0 23905
c0d27fcc 23906cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23907ac_cs_usage="\
23908\`$as_me' instantiates files from templates according to the
23909current configuration.
23910
23911Usage: $0 [OPTIONS] [FILE]...
23912
23913 -h, --help print this help, then exit
d6e01aa5 23914 -V, --version print version number and configuration settings, then exit
19650fd6 23915 -q, --quiet do not print progress messages
503d2be0
AS
23916 -d, --debug don't remove temporary files
23917 --recheck update $as_me by reconfiguring in the same conditions
23918 --file=FILE[:TEMPLATE]
edfaf76d 23919 instantiate the configuration file FILE
503d2be0 23920 --header=FILE[:TEMPLATE]
edfaf76d 23921 instantiate the configuration header FILE
503d2be0
AS
23922
23923Configuration files:
23924$config_files
23925
23926Configuration headers:
23927$config_headers
23928
23929Configuration commands:
23930$config_commands
23931
23932Report bugs to <bug-autoconf@gnu.org>."
503d2be0 23933
d6e01aa5 23934_ACEOF
c0d27fcc 23935cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 23936ac_cs_version="\\
9cf8f393 23937emacs config.status 23.0.50
d6e01aa5
KL
23938configured by $0, generated by GNU Autoconf 2.61,
23939 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 23940
d6e01aa5 23941Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
23942This config.status script is free software; the Free Software Foundation
23943gives unlimited permission to copy, distribute and modify it."
d6e01aa5
KL
23944
23945ac_pwd='$ac_pwd'
23946srcdir='$srcdir'
23947INSTALL='$INSTALL'
c0d27fcc 23948_ACEOF
503d2be0 23949
c0d27fcc 23950cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23951# If no file are specified by the user, then we need to provide default
23952# value. By we need to know if files were specified by the user.
23953ac_need_defaults=:
23954while test $# != 0
ba4481b5 23955do
503d2be0
AS
23956 case $1 in
23957 --*=*)
d6e01aa5
KL
23958 ac_option=`expr "X$1" : 'X\([^=]*\)='`
23959 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
23960 ac_shift=:
23961 ;;
d6e01aa5 23962 *)
6bae0ccf
DL
23963 ac_option=$1
23964 ac_optarg=$2
23965 ac_shift=shift
503d2be0 23966 ;;
503d2be0
AS
23967 esac
23968
6bae0ccf 23969 case $ac_option in
503d2be0 23970 # Handling of the options.
19650fd6
AS
23971 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23972 ac_cs_recheck=: ;;
d6e01aa5
KL
23973 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
23974 echo "$ac_cs_version"; exit ;;
23975 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
23976 debug=: ;;
23977 --file | --fil | --fi | --f )
6bae0ccf
DL
23978 $ac_shift
23979 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
23980 ac_need_defaults=false;;
23981 --header | --heade | --head | --hea )
6bae0ccf
DL
23982 $ac_shift
23983 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 23984 ac_need_defaults=false;;
d6e01aa5
KL
23985 --he | --h)
23986 # Conflict between --help and --header
23987 { echo "$as_me: error: ambiguous option: $1
23988Try \`$0 --help' for more information." >&2
23989 { (exit 1); exit 1; }; };;
23990 --help | --hel | -h )
23991 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
23992 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23993 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23994 ac_cs_silent=: ;;
503d2be0
AS
23995
23996 # This is an error.
d6e01aa5
KL
23997 -*) { echo "$as_me: error: unrecognized option: $1
23998Try \`$0 --help' for more information." >&2
503d2be0
AS
23999 { (exit 1); exit 1; }; } ;;
24000
d6e01aa5
KL
24001 *) ac_config_targets="$ac_config_targets $1"
24002 ac_need_defaults=false ;;
503d2be0 24003
ba4481b5 24004 esac
503d2be0 24005 shift
ba4481b5
DL
24006done
24007
19650fd6
AS
24008ac_configure_extra_args=
24009
24010if $ac_cs_silent; then
24011 exec 6>/dev/null
24012 ac_configure_extra_args="$ac_configure_extra_args --silent"
24013fi
24014
24015_ACEOF
24016cat >>$CONFIG_STATUS <<_ACEOF
24017if \$ac_cs_recheck; then
d6e01aa5
KL
24018 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24019 CONFIG_SHELL=$SHELL
24020 export CONFIG_SHELL
24021 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
24022fi
24023
503d2be0 24024_ACEOF
d6e01aa5
KL
24025cat >>$CONFIG_STATUS <<\_ACEOF
24026exec 5>>config.log
24027{
24028 echo
24029 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24030## Running $as_me. ##
24031_ASBOX
24032 echo "$ac_log"
24033} >&5
ba4481b5 24034
d6e01aa5 24035_ACEOF
c0d27fcc 24036cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24037#
d6e01aa5 24038# INIT-COMMANDS
503d2be0 24039#
503d2be0
AS
24040GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
24041
c0d27fcc
MR
24042_ACEOF
24043
c0d27fcc 24044cat >>$CONFIG_STATUS <<\_ACEOF
d6e01aa5
KL
24045
24046# Handling of arguments.
503d2be0
AS
24047for ac_config_target in $ac_config_targets
24048do
d6e01aa5
KL
24049 case $ac_config_target in
24050 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
24051 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24052 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
24053 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
24054 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
24055 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
24056 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
24057 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
d6e01aa5 24058 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 24059 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
d6e01aa5 24060 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
d6e01aa5
KL
24061 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
24062 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24063
c0d27fcc 24064 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
24065echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24066 { (exit 1); exit 1; }; };;
24067 esac
ba4481b5 24068done
503d2be0 24069
d6e01aa5 24070
503d2be0
AS
24071# If the user did not use the arguments to specify the items to instantiate,
24072# then the envvar interface is used. Set only those that are not.
24073# We use the long form for the default assignment because of an extremely
24074# bizarre bug on SunOS 4.1.3.
24075if $ac_need_defaults; then
24076 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24077 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24078 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 24079fi
503d2be0 24080
19650fd6 24081# Have a temporary directory for convenience. Make it in the build tree
d6e01aa5 24082# simply because there is no reason against having it here, and in addition,
19650fd6 24083# creating and moving files from /tmp can sometimes cause problems.
d6e01aa5
KL
24084# Hook for its removal unless debugging.
24085# Note that there is a small window in which the directory will not be cleaned:
24086# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
24087$debug ||
24088{
d6e01aa5
KL
24089 tmp=
24090 trap 'exit_status=$?
24091 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24092' 0
503d2be0
AS
24093 trap '{ (exit 1); exit 1; }' 1 2 13 15
24094}
503d2be0 24095# Create a (secure) tmp directory for tmp files.
19650fd6 24096
503d2be0 24097{
d6e01aa5 24098 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
24099 test -n "$tmp" && test -d "$tmp"
24100} ||
24101{
d6e01aa5
KL
24102 tmp=./conf$$-$RANDOM
24103 (umask 077 && mkdir "$tmp")
503d2be0
AS
24104} ||
24105{
19650fd6 24106 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
24107 { (exit 1); exit 1; }
24108}
24109
503d2be0 24110#
d6e01aa5 24111# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
24112#
24113
24114# No need to generate the scripts if there are no CONFIG_FILES.
24115# This happens for instance when ./config.status config.h
d6e01aa5
KL
24116if test -n "$CONFIG_FILES"; then
24117
24118_ACEOF
24119
24120
24121
24122ac_delim='%!_!# '
24123for ac_last_try in false false false false false :; do
24124 cat >conf$$subs.sed <<_ACEOF
24125SHELL!$SHELL$ac_delim
24126PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24127PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24128PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24129PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24130PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24131PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24132exec_prefix!$exec_prefix$ac_delim
24133prefix!$prefix$ac_delim
24134program_transform_name!$program_transform_name$ac_delim
24135bindir!$bindir$ac_delim
24136sbindir!$sbindir$ac_delim
24137libexecdir!$libexecdir$ac_delim
24138datarootdir!$datarootdir$ac_delim
24139datadir!$datadir$ac_delim
24140sysconfdir!$sysconfdir$ac_delim
24141sharedstatedir!$sharedstatedir$ac_delim
24142localstatedir!$localstatedir$ac_delim
24143includedir!$includedir$ac_delim
24144oldincludedir!$oldincludedir$ac_delim
24145docdir!$docdir$ac_delim
24146infodir!$infodir$ac_delim
24147htmldir!$htmldir$ac_delim
24148dvidir!$dvidir$ac_delim
24149pdfdir!$pdfdir$ac_delim
24150psdir!$psdir$ac_delim
24151libdir!$libdir$ac_delim
24152localedir!$localedir$ac_delim
24153mandir!$mandir$ac_delim
24154DEFS!$DEFS$ac_delim
24155ECHO_C!$ECHO_C$ac_delim
24156ECHO_N!$ECHO_N$ac_delim
24157ECHO_T!$ECHO_T$ac_delim
24158LIBS!$LIBS$ac_delim
24159build_alias!$build_alias$ac_delim
24160host_alias!$host_alias$ac_delim
24161target_alias!$target_alias$ac_delim
24162MAINT!$MAINT$ac_delim
24163build!$build$ac_delim
24164build_cpu!$build_cpu$ac_delim
24165build_vendor!$build_vendor$ac_delim
24166build_os!$build_os$ac_delim
24167host!$host$ac_delim
24168host_cpu!$host_cpu$ac_delim
24169host_vendor!$host_vendor$ac_delim
24170host_os!$host_os$ac_delim
24171CC!$CC$ac_delim
24172CFLAGS!$CFLAGS$ac_delim
24173LDFLAGS!$LDFLAGS$ac_delim
24174CPPFLAGS!$CPPFLAGS$ac_delim
24175ac_ct_CC!$ac_ct_CC$ac_delim
24176EXEEXT!$EXEEXT$ac_delim
24177OBJEXT!$OBJEXT$ac_delim
24178CPP!$CPP$ac_delim
24179GREP!$GREP$ac_delim
24180EGREP!$EGREP$ac_delim
24181LN_S!$LN_S$ac_delim
24182INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24183INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24184INSTALL_DATA!$INSTALL_DATA$ac_delim
24185RANLIB!$RANLIB$ac_delim
24186INSTALL_INFO!$INSTALL_INFO$ac_delim
24187GZIP_PROG!$GZIP_PROG$ac_delim
c982cf7d 24188MAKEINFO!$MAKEINFO$ac_delim
d6e01aa5
KL
24189LIBSOUND!$LIBSOUND$ac_delim
24190PKG_CONFIG!$PKG_CONFIG$ac_delim
24191ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
24192ALSA_LIBS!$ALSA_LIBS$ac_delim
24193CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
24194SET_MAKE!$SET_MAKE$ac_delim
24195XMKMF!$XMKMF$ac_delim
cfe440b8 24196HAVE_XSERVER!$HAVE_XSERVER$ac_delim
0cfc0546
GM
24197RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
24198RSVG_LIBS!$RSVG_LIBS$ac_delim
d6e01aa5
KL
24199GTK_CFLAGS!$GTK_CFLAGS$ac_delim
24200GTK_LIBS!$GTK_LIBS$ac_delim
131e4133
MA
24201DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
24202DBUS_LIBS!$DBUS_LIBS$ac_delim
9d89ffd0
JD
24203XFT_CFLAGS!$XFT_CFLAGS$ac_delim
24204XFT_LIBS!$XFT_LIBS$ac_delim
d6e01aa5
KL
24205ALLOCA!$ALLOCA$ac_delim
24206liblockfile!$liblockfile$ac_delim
24207LIBOBJS!$LIBOBJS$ac_delim
24208NEED_SETGID!$NEED_SETGID$ac_delim
24209KMEM_GROUP!$KMEM_GROUP$ac_delim
24210GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
24211GETOPT_H!$GETOPT_H$ac_delim
24212GETOPTOBJS!$GETOPTOBJS$ac_delim
24213version!$version$ac_delim
24214configuration!$configuration$ac_delim
24215canonical!$canonical$ac_delim
24216srcdir!$srcdir$ac_delim
24217lispdir!$lispdir$ac_delim
24218locallisppath!$locallisppath$ac_delim
24219lisppath!$lisppath$ac_delim
24220x_default_search_path!$x_default_search_path$ac_delim
868641cc 24221etcdir!$etcdir$ac_delim
d6e01aa5
KL
24222_ACEOF
24223
24224 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24225 break
24226 elif $ac_last_try; then
24227 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24228echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24229 { (exit 1); exit 1; }; }
24230 else
24231 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 24232 fi
d6e01aa5
KL
24233done
24234
24235ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24236if test -n "$ac_eof"; then
24237 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24238 ac_eof=`expr $ac_eof + 1`
24239fi
24240
24241cat >>$CONFIG_STATUS <<_ACEOF
24242cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24243/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24244_ACEOF
24245sed '
24246s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24247s/^/s,@/; s/!/@,|#_!!_#|/
24248:n
24249t n
24250s/'"$ac_delim"'$/,g/; t
24251s/$/\\/; p
24252N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24253' >>$CONFIG_STATUS <conf$$subs.sed
24254rm -f conf$$subs.sed
24255cat >>$CONFIG_STATUS <<_ACEOF
24256CEOF$ac_eof
24257_ACEOF
24258
ba4481b5 24259
d6e01aa5
KL
24260ac_delim='%!_!# '
24261for ac_last_try in false false false false false :; do
24262 cat >conf$$subs.sed <<_ACEOF
131e4133
MA
24263archlibdir!$archlibdir$ac_delim
24264bitmapdir!$bitmapdir$ac_delim
c982cf7d 24265gamedir!$gamedir$ac_delim
0cfc0546
GM
24266gameuser!$gameuser$ac_delim
24267c_switch_system!$c_switch_system$ac_delim
cfe440b8 24268c_switch_machine!$c_switch_machine$ac_delim
9d89ffd0
JD
24269LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
24270LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
d6e01aa5
KL
24271C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
24272X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
24273machfile!$machfile$ac_delim
24274opsysfile!$opsysfile$ac_delim
24275carbon_appdir!$carbon_appdir$ac_delim
24276LTLIBOBJS!$LTLIBOBJS$ac_delim
c0d27fcc 24277_ACEOF
d6e01aa5 24278
868641cc 24279 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 14; then
d6e01aa5
KL
24280 break
24281 elif $ac_last_try; then
24282 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24283echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24284 { (exit 1); exit 1; }; }
24285 else
24286 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24287 fi
24288done
24289
24290ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24291if test -n "$ac_eof"; then
24292 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24293 ac_eof=`expr $ac_eof + 1`
24294fi
24295
24296cat >>$CONFIG_STATUS <<_ACEOF
24297cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24298/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24299_ACEOF
24300sed '
24301s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24302s/^/s,@/; s/!/@,|#_!!_#|/
24303:n
24304t n
24305s/'"$ac_delim"'$/,g/; t
24306s/$/\\/; p
24307N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24308' >>$CONFIG_STATUS <conf$$subs.sed
24309rm -f conf$$subs.sed
24310cat >>$CONFIG_STATUS <<_ACEOF
24311:end
24312s/|#_!!_#|//g
24313CEOF$ac_eof
24314_ACEOF
24315
24316
24317# VPATH may cause trouble with some makes, so we remove $(srcdir),
24318# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24319# trailing colons and then remove the whole line if VPATH becomes empty
24320# (actually we leave an empty line to preserve line numbers).
24321if test "x$srcdir" = x.; then
24322 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24323s/:*\$(srcdir):*/:/
24324s/:*\${srcdir}:*/:/
24325s/:*@srcdir@:*/:/
24326s/^\([^=]*=[ ]*\):*/\1/
24327s/:*$//
24328s/^[^=]*=[ ]*$//
24329}'
24330fi
24331
c0d27fcc 24332cat >>$CONFIG_STATUS <<\_ACEOF
d6e01aa5
KL
24333fi # test -n "$CONFIG_FILES"
24334
24335
24336for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
24337do
24338 case $ac_tag in
24339 :[FHLC]) ac_mode=$ac_tag; continue;;
24340 esac
24341 case $ac_mode$ac_tag in
24342 :[FHL]*:*);;
24343 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24344echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24345 { (exit 1); exit 1; }; };;
24346 :[FH]-) ac_tag=-:-;;
24347 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
ba4481b5 24348 esac
d6e01aa5
KL
24349 ac_save_IFS=$IFS
24350 IFS=:
24351 set x $ac_tag
24352 IFS=$ac_save_IFS
24353 shift
24354 ac_file=$1
24355 shift
24356
24357 case $ac_mode in
24358 :L) ac_source=$1;;
24359 :[FH])
24360 ac_file_inputs=
24361 for ac_f
24362 do
24363 case $ac_f in
24364 -) ac_f="$tmp/stdin";;
24365 *) # Look for the file first in the build tree, then in the source tree
24366 # (if the path is not absolute). The absolute path cannot be DOS-style,
24367 # because $ac_f cannot contain `:'.
24368 test -f "$ac_f" ||
24369 case $ac_f in
24370 [\\/$]*) false;;
24371 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24372 esac ||
24373 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24374echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24375 { (exit 1); exit 1; }; };;
24376 esac
24377 ac_file_inputs="$ac_file_inputs $ac_f"
24378 done
ba4481b5 24379
d6e01aa5
KL
24380 # Let's still pretend it is `configure' which instantiates (i.e., don't
24381 # use $as_me), people would be surprised to read:
24382 # /* config.h. Generated by config.status. */
24383 configure_input="Generated from "`IFS=:
24384 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24385 if test x"$ac_file" != x-; then
24386 configure_input="$ac_file. $configure_input"
24387 { echo "$as_me:$LINENO: creating $ac_file" >&5
24388echo "$as_me: creating $ac_file" >&6;}
24389 fi
24390
24391 case $ac_tag in
24392 *:-:* | *:-) cat >"$tmp/stdin";;
24393 esac
24394 ;;
ba4481b5
DL
24395 esac
24396
d6e01aa5 24397 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 24398$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24399 X"$ac_file" : 'X\(//\)[^/]' \| \
24400 X"$ac_file" : 'X\(//\)$' \| \
d6e01aa5 24401 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 24402echo X"$ac_file" |
d6e01aa5
KL
24403 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24404 s//\1/
24405 q
24406 }
24407 /^X\(\/\/\)[^/].*/{
24408 s//\1/
24409 q
24410 }
24411 /^X\(\/\/\)$/{
24412 s//\1/
24413 q
24414 }
24415 /^X\(\/\).*/{
24416 s//\1/
24417 q
24418 }
24419 s/.*/./; q'`
24420 { as_dir="$ac_dir"
24421 case $as_dir in #(
24422 -*) as_dir=./$as_dir;;
24423 esac
24424 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 24425 as_dirs=
d6e01aa5
KL
24426 while :; do
24427 case $as_dir in #(
24428 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24429 *) as_qdir=$as_dir;;
24430 esac
24431 as_dirs="'$as_qdir' $as_dirs"
24432 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 24433$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24434 X"$as_dir" : 'X\(//\)[^/]' \| \
24435 X"$as_dir" : 'X\(//\)$' \| \
d6e01aa5 24436 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 24437echo X"$as_dir" |
d6e01aa5
KL
24438 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24439 s//\1/
24440 q
24441 }
24442 /^X\(\/\/\)[^/].*/{
24443 s//\1/
24444 q
24445 }
24446 /^X\(\/\/\)$/{
24447 s//\1/
24448 q
24449 }
24450 /^X\(\/\).*/{
24451 s//\1/
24452 q
24453 }
24454 s/.*/./; q'`
24455 test -d "$as_dir" && break
6bae0ccf 24456 done
d6e01aa5
KL
24457 test -z "$as_dirs" || eval "mkdir $as_dirs"
24458 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24459echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 24460 { (exit 1); exit 1; }; }; }
c0d27fcc 24461 ac_builddir=.
98418dba 24462
d6e01aa5
KL
24463case "$ac_dir" in
24464.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24465*)
c0d27fcc 24466 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
d6e01aa5
KL
24467 # A ".." for each directory in $ac_dir_suffix.
24468 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24469 case $ac_top_builddir_sub in
24470 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24471 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24472 esac ;;
24473esac
24474ac_abs_top_builddir=$ac_pwd
24475ac_abs_builddir=$ac_pwd$ac_dir_suffix
24476# for backward compatibility:
24477ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
24478
24479case $srcdir in
d6e01aa5 24480 .) # We are building in place.
c0d27fcc 24481 ac_srcdir=.
d6e01aa5
KL
24482 ac_top_srcdir=$ac_top_builddir_sub
24483 ac_abs_top_srcdir=$ac_pwd ;;
24484 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 24485 ac_srcdir=$srcdir$ac_dir_suffix;
d6e01aa5
KL
24486 ac_top_srcdir=$srcdir
24487 ac_abs_top_srcdir=$srcdir ;;
24488 *) # Relative name.
24489 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24490 ac_top_srcdir=$ac_top_build_prefix$srcdir
24491 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 24492esac
d6e01aa5 24493ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 24494
c0d27fcc 24495
d6e01aa5
KL
24496 case $ac_mode in
24497 :F)
24498 #
24499 # CONFIG_FILE
24500 #
ba4481b5 24501
503d2be0
AS
24502 case $INSTALL in
24503 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
d6e01aa5 24504 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 24505 esac
d6e01aa5 24506_ACEOF
ba4481b5 24507
d6e01aa5
KL
24508cat >>$CONFIG_STATUS <<\_ACEOF
24509# If the template does not know about datarootdir, expand it.
24510# FIXME: This hack should be removed a few years after 2.60.
24511ac_datarootdir_hack=; ac_datarootdir_seen=
8ae52ca6 24512
d6e01aa5
KL
24513case `sed -n '/datarootdir/ {
24514 p
24515 q
24516}
24517/@datadir@/p
24518/@docdir@/p
24519/@infodir@/p
24520/@localedir@/p
24521/@mandir@/p
24522' $ac_file_inputs` in
24523*datarootdir*) ac_datarootdir_seen=yes;;
24524*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24525 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24526echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
24527_ACEOF
24528cat >>$CONFIG_STATUS <<_ACEOF
24529 ac_datarootdir_hack='
24530 s&@datadir@&$datadir&g
24531 s&@docdir@&$docdir&g
24532 s&@infodir@&$infodir&g
24533 s&@localedir@&$localedir&g
24534 s&@mandir@&$mandir&g
24535 s&\\\${datarootdir}&$datarootdir&g' ;;
24536esac
c0d27fcc 24537_ACEOF
d6e01aa5
KL
24538
24539# Neutralize VPATH when `$srcdir' = `.'.
24540# Shell code in configure.ac might set extrasub.
24541# FIXME: do we really want to maintain this feature?
c0d27fcc 24542cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
24543 sed "$ac_vpsub
24544$extrasub
c0d27fcc
MR
24545_ACEOF
24546cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24547:t
24548/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
d6e01aa5
KL
24549s&@configure_input@&$configure_input&;t t
24550s&@top_builddir@&$ac_top_builddir_sub&;t t
24551s&@srcdir@&$ac_srcdir&;t t
24552s&@abs_srcdir@&$ac_abs_srcdir&;t t
24553s&@top_srcdir@&$ac_top_srcdir&;t t
24554s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24555s&@builddir@&$ac_builddir&;t t
24556s&@abs_builddir@&$ac_abs_builddir&;t t
24557s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24558s&@INSTALL@&$ac_INSTALL&;t t
24559$ac_datarootdir_hack
24560" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
24561
24562test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24563 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24564 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24565 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24566which seems to be undefined. Please make sure it is defined." >&5
24567echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24568which seems to be undefined. Please make sure it is defined." >&2;}
24569
24570 rm -f "$tmp/stdin"
503d2be0 24571 case $ac_file in
d6e01aa5
KL
24572 -) cat "$tmp/out"; rm -f "$tmp/out";;
24573 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 24574 esac
d6e01aa5
KL
24575 ;;
24576 :H)
24577 #
24578 # CONFIG_HEADER
24579 #
24580_ACEOF
24581
24582# Transform confdefs.h into a sed script `conftest.defines', that
24583# substitutes the proper values into config.h.in to produce config.h.
24584rm -f conftest.defines conftest.tail
24585# First, append a space to every undef/define line, to ease matching.
24586echo 's/$/ /' >conftest.defines
24587# Then, protect against being on the right side of a sed subst, or in
24588# an unquoted here document, in config.status. If some macros were
24589# called several times there might be several #defines for the same
24590# symbol, which is useless. But do not sort them, since the last
24591# AC_DEFINE must be honored.
24592ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24593# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
24594# NAME is the cpp macro being defined, VALUE is the value it is being given.
24595# PARAMS is the parameter list in the macro definition--in most cases, it's
24596# just an empty string.
24597ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
24598ac_dB='\\)[ (].*,\\1define\\2'
24599ac_dC=' '
24600ac_dD=' ,'
24601
24602uniq confdefs.h |
24603 sed -n '
24604 t rset
24605 :rset
24606 s/^[ ]*#[ ]*define[ ][ ]*//
24607 t ok
24608 d
24609 :ok
24610 s/[\\&,]/\\&/g
24611 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
24612 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
24613 ' >>conftest.defines
24614
24615# Remove the space that was appended to ease matching.
24616# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
24617# example, in the case of _POSIX_SOURCE, which is predefined and required
24618# on some systems where configure will not decide to define it.
d6e01aa5
KL
24619# (The regexp can be short, since the line contains either #define or #undef.)
24620echo 's/ $//
24621s,^[ #]*u.*,/* & */,' >>conftest.defines
24622
24623# Break up conftest.defines:
24624ac_max_sed_lines=50
24625
24626# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
24627# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
24628# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
24629# et cetera.
24630ac_in='$ac_file_inputs'
24631ac_out='"$tmp/out1"'
24632ac_nxt='"$tmp/out2"'
24633
24634while :
503d2be0 24635do
d6e01aa5
KL
24636 # Write a here document:
24637 cat >>$CONFIG_STATUS <<_ACEOF
24638 # First, check the format of the line:
24639 cat >"\$tmp/defines.sed" <<\\CEOF
24640/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
24641/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
24642b
24643:def
24644_ACEOF
24645 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 24646 echo 'CEOF
d6e01aa5
KL
24647 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
24648 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
24649 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
24650 grep . conftest.tail >/dev/null || break
503d2be0
AS
24651 rm -f conftest.defines
24652 mv conftest.tail conftest.defines
24653done
d6e01aa5 24654rm -f conftest.defines conftest.tail
503d2be0 24655
d6e01aa5 24656echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 24657cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 24658 if test x"$ac_file" != x-; then
d6e01aa5
KL
24659 echo "/* $configure_input */" >"$tmp/config.h"
24660 cat "$ac_result" >>"$tmp/config.h"
24661 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 24662 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
24663echo "$as_me: $ac_file is unchanged" >&6;}
24664 else
503d2be0 24665 rm -f $ac_file
d6e01aa5 24666 mv "$tmp/config.h" $ac_file
ba4481b5 24667 fi
503d2be0 24668 else
d6e01aa5
KL
24669 echo "/* $configure_input */"
24670 cat "$ac_result"
ba4481b5 24671 fi
d6e01aa5
KL
24672 rm -f "$tmp/out12"
24673 ;;
edfaf76d 24674
d6e01aa5
KL
24675 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
24676echo "$as_me: executing $ac_file commands" >&6;}
24677 ;;
24678 esac
ba4481b5 24679
c0d27fcc 24680
d6e01aa5
KL
24681 case $ac_file$ac_mode in
24682 "default":C)
ba4481b5
DL
24683
24684### Make the necessary directories, if they don't exist.
24685for dir in etc lisp ; do
24686 test -d ${dir} || mkdir ${dir}
24687done
24688
24689# Build src/Makefile from ${srcdir}/src/Makefile.c
24690# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
24691# This must be done after src/config.h is built, since we rely on that file.
24692
24693# Now get this: Some word that is part of the ${srcdir} directory name
24694# or the ${configuration} value might, just might, happen to be an
24695# identifier like `sun4' or `i386' or something, and be predefined by
24696# the C preprocessor to some helpful value like 1, or maybe the empty
24697# string. Needless to say consequent macro substitutions are less
24698# than conducive to the makefile finding the correct directory.
24699undefs="`echo $top_srcdir $configuration $canonical |
24700sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24701 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
24702`"
24703
24704echo creating src/epaths.h
4aa6b955 24705${MAKE-make} epaths-force
ba4481b5 24706
1c203d4c
DL
24707# As of 2000-11-19, newest development versions of GNU cpp preprocess
24708# `..' to `. .' unless invoked with -traditional
24709
d0e9bfd2 24710if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
24711 CPPFLAGS="$CPPFLAGS -traditional"
24712fi
24713
ba4481b5
DL
24714echo creating lib-src/Makefile
24715( cd lib-src
24716 rm -f junk.c junk1.c junk2.c
24717 sed -e '/start of cpp stuff/q' \
24718 < Makefile.c > junk1.c
24719 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24720 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24721 < Makefile.c > junk.c
503d2be0 24722 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24723 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24724 cat junk1.c junk2.c > Makefile.new
24725 rm -f junk.c junk1.c junk2.c
24726 chmod 444 Makefile.new
24727 mv -f Makefile.new Makefile
24728)
24729
24730echo creating src/Makefile
24731( cd src
24732 rm -f junk.c junk1.c junk2.c
24733 sed -e '/start of cpp stuff/q' \
24734 < Makefile.c > junk1.c
24735 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24736 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24737 < Makefile.c > junk.c
503d2be0 24738 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24739 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24740 cat junk1.c junk2.c > Makefile.new
24741 rm -f junk.c junk1.c junk2.c
24742 chmod 444 Makefile.new
24743 mv -f Makefile.new Makefile
24744)
24745
503d2be0 24746if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 24747 echo creating src/.gdbinit
503d2be0 24748 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
24749fi
24750
24751# This is how we know whether to re-run configure in certain cases.
24752touch src/config.stamp
24753
503d2be0 24754 ;;
d6e01aa5 24755
503d2be0 24756 esac
d6e01aa5 24757done # for ac_tag
503d2be0 24758
ba4481b5 24759
503d2be0 24760{ (exit 0); exit 0; }
c0d27fcc 24761_ACEOF
ba4481b5 24762chmod +x $CONFIG_STATUS
503d2be0
AS
24763ac_clean_files=$ac_clean_files_save
24764
c0d27fcc 24765
503d2be0
AS
24766# configure is writing to config.log, and then calls config.status.
24767# config.status does its own redirection, appending to config.log.
24768# Unfortunately, on DOS this fails, as config.log is still kept open
24769# by configure, so config.status won't be able to write to it; its
24770# output is simply discarded. So we exec the FD to /dev/null,
24771# effectively closing config.log, so it can be properly (re)opened and
24772# appended to by config.status. When coming back to configure, we
24773# need to make the FD available again.
24774if test "$no_create" != yes; then
24775 ac_cs_success=:
19650fd6
AS
24776 ac_config_status_args=
24777 test "$silent" = yes &&
24778 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 24779 exec 5>/dev/null
19650fd6 24780 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
24781 exec 5>>config.log
24782 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24783 # would make configure fail if this is the last instruction.
24784 $ac_cs_success || { (exit 1); exit 1; }
24785fi
f5f47add 24786
c0d27fcc 24787