(x_scroll_bar_set_handle, x_scroll_bar_handle_click)
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
d6e01aa5 3# Generated by GNU Autoconf 2.61.
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") || {
d0162c10
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
MR
572# Identity of this package.
573PACKAGE_NAME=
574PACKAGE_TARNAME=
575PACKAGE_VERSION=
576PACKAGE_STRING=
577PACKAGE_BUGREPORT=
578
503d2be0 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
9d89ffd0
JD
695XFT_CFLAGS
696XFT_LIBS
d6e01aa5
KL
697ALLOCA
698liblockfile
699LIBOBJS
700NEED_SETGID
701KMEM_GROUP
702GETLOADAVG_LIBS
703GETOPT_H
704GETOPTOBJS
705version
706configuration
707canonical
708srcdir
709lispdir
710locallisppath
711lisppath
712x_default_search_path
713etcdir
714archlibdir
715bitmapdir
716gamedir
717gameuser
718c_switch_system
719c_switch_machine
720LD_SWITCH_X_SITE
721LD_SWITCH_X_SITE_AUX
722C_SWITCH_X_SITE
723X_TOOLKIT_TYPE
724machfile
725opsysfile
726carbon_appdir
727LTLIBOBJS'
6bae0ccf 728ac_subst_files=''
d6e01aa5
KL
729 ac_precious_vars='build_alias
730host_alias
731target_alias
732CC
733CFLAGS
734LDFLAGS
735LIBS
736CPPFLAGS
737CPP
738XMKMF'
739
c0d27fcc 740
ba4481b5 741# Initialize some variables set by options.
503d2be0
AS
742ac_init_help=
743ac_init_version=false
ba4481b5
DL
744# The variables have the same names as the options, with
745# dashes changed to underlines.
503d2be0 746cache_file=/dev/null
ba4481b5 747exec_prefix=NONE
ba4481b5 748no_create=
ba4481b5
DL
749no_recursion=
750prefix=NONE
751program_prefix=NONE
752program_suffix=NONE
753program_transform_name=s,x,x,
754silent=
755site=
756srcdir=
ba4481b5
DL
757verbose=
758x_includes=NONE
759x_libraries=NONE
503d2be0
AS
760
761# Installation directory options.
762# These are left unexpanded so users can "make install exec_prefix=/foo"
763# and all the variables that are supposed to be based on exec_prefix
764# by default will actually change.
765# Use braces instead of parens because sh, perl, etc. also accept them.
d6e01aa5 766# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
767bindir='${exec_prefix}/bin'
768sbindir='${exec_prefix}/sbin'
769libexecdir='${exec_prefix}/libexec'
d6e01aa5
KL
770datarootdir='${prefix}/share'
771datadir='${datarootdir}'
ba4481b5
DL
772sysconfdir='${prefix}/etc'
773sharedstatedir='${prefix}/com'
774localstatedir='${prefix}/var'
ba4481b5
DL
775includedir='${prefix}/include'
776oldincludedir='/usr/include'
d6e01aa5
KL
777docdir='${datarootdir}/doc/${PACKAGE}'
778infodir='${datarootdir}/info'
779htmldir='${docdir}'
780dvidir='${docdir}'
781pdfdir='${docdir}'
782psdir='${docdir}'
783libdir='${exec_prefix}/lib'
784localedir='${datarootdir}/locale'
785mandir='${datarootdir}/man'
ba4481b5 786
ba4481b5 787ac_prev=
d6e01aa5 788ac_dashdash=
ba4481b5
DL
789for ac_option
790do
ba4481b5
DL
791 # If the previous option needs an argument, assign it.
792 if test -n "$ac_prev"; then
d6e01aa5 793 eval $ac_prev=\$ac_option
ba4481b5
DL
794 ac_prev=
795 continue
796 fi
797
d6e01aa5
KL
798 case $ac_option in
799 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
800 *) ac_optarg=yes ;;
801 esac
ba4481b5
DL
802
803 # Accept the important Cygnus configure options, so we can diagnose typos.
804
d6e01aa5
KL
805 case $ac_dashdash$ac_option in
806 --)
807 ac_dashdash=yes ;;
ba4481b5
DL
808
809 -bindir | --bindir | --bindi | --bind | --bin | --bi)
810 ac_prev=bindir ;;
811 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 812 bindir=$ac_optarg ;;
ba4481b5
DL
813
814 -build | --build | --buil | --bui | --bu)
503d2be0 815 ac_prev=build_alias ;;
ba4481b5 816 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 817 build_alias=$ac_optarg ;;
ba4481b5
DL
818
819 -cache-file | --cache-file | --cache-fil | --cache-fi \
820 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
821 ac_prev=cache_file ;;
822 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
823 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
824 cache_file=$ac_optarg ;;
825
826 --config-cache | -C)
827 cache_file=config.cache ;;
ba4481b5 828
d6e01aa5 829 -datadir | --datadir | --datadi | --datad)
ba4481b5 830 ac_prev=datadir ;;
d6e01aa5 831 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 832 datadir=$ac_optarg ;;
ba4481b5 833
d6e01aa5
KL
834 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
835 | --dataroo | --dataro | --datar)
836 ac_prev=datarootdir ;;
837 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
838 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
839 datarootdir=$ac_optarg ;;
840
ba4481b5 841 -disable-* | --disable-*)
503d2be0 842 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 843 # Reject names that are not valid shell variable names.
d6e01aa5 844 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
845 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
846 { (exit 1); exit 1; }; }
d6e01aa5
KL
847 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
848 eval enable_$ac_feature=no ;;
849
850 -docdir | --docdir | --docdi | --doc | --do)
851 ac_prev=docdir ;;
852 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
853 docdir=$ac_optarg ;;
854
855 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
856 ac_prev=dvidir ;;
857 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
858 dvidir=$ac_optarg ;;
ba4481b5
DL
859
860 -enable-* | --enable-*)
503d2be0 861 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 862 # Reject names that are not valid shell variable names.
d6e01aa5 863 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
864 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
865 { (exit 1); exit 1; }; }
d6e01aa5
KL
866 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
867 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
868
869 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
870 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
871 | --exec | --exe | --ex)
872 ac_prev=exec_prefix ;;
873 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
874 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
875 | --exec=* | --exe=* | --ex=*)
503d2be0 876 exec_prefix=$ac_optarg ;;
ba4481b5
DL
877
878 -gas | --gas | --ga | --g)
879 # Obsolete; use --with-gas.
880 with_gas=yes ;;
881
503d2be0
AS
882 -help | --help | --hel | --he | -h)
883 ac_init_help=long ;;
884 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
885 ac_init_help=recursive ;;
886 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
887 ac_init_help=short ;;
ba4481b5
DL
888
889 -host | --host | --hos | --ho)
503d2be0 890 ac_prev=host_alias ;;
ba4481b5 891 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 892 host_alias=$ac_optarg ;;
ba4481b5 893
d6e01aa5
KL
894 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
895 ac_prev=htmldir ;;
896 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
897 | --ht=*)
898 htmldir=$ac_optarg ;;
899
ba4481b5
DL
900 -includedir | --includedir | --includedi | --included | --include \
901 | --includ | --inclu | --incl | --inc)
902 ac_prev=includedir ;;
903 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
904 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 905 includedir=$ac_optarg ;;
ba4481b5
DL
906
907 -infodir | --infodir | --infodi | --infod | --info | --inf)
908 ac_prev=infodir ;;
909 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 910 infodir=$ac_optarg ;;
ba4481b5
DL
911
912 -libdir | --libdir | --libdi | --libd)
913 ac_prev=libdir ;;
914 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 915 libdir=$ac_optarg ;;
ba4481b5
DL
916
917 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
918 | --libexe | --libex | --libe)
919 ac_prev=libexecdir ;;
920 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
921 | --libexe=* | --libex=* | --libe=*)
503d2be0 922 libexecdir=$ac_optarg ;;
ba4481b5 923
d6e01aa5
KL
924 -localedir | --localedir | --localedi | --localed | --locale)
925 ac_prev=localedir ;;
926 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
927 localedir=$ac_optarg ;;
928
ba4481b5 929 -localstatedir | --localstatedir | --localstatedi | --localstated \
d6e01aa5 930 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
931 ac_prev=localstatedir ;;
932 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
d6e01aa5 933 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 934 localstatedir=$ac_optarg ;;
ba4481b5
DL
935
936 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
937 ac_prev=mandir ;;
938 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 939 mandir=$ac_optarg ;;
ba4481b5
DL
940
941 -nfp | --nfp | --nf)
942 # Obsolete; use --without-fp.
943 with_fp=no ;;
944
945 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 946 | --no-cr | --no-c | -n)
ba4481b5
DL
947 no_create=yes ;;
948
949 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
950 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
951 no_recursion=yes ;;
952
953 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
954 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
955 | --oldin | --oldi | --old | --ol | --o)
956 ac_prev=oldincludedir ;;
957 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
958 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
959 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 960 oldincludedir=$ac_optarg ;;
ba4481b5
DL
961
962 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
963 ac_prev=prefix ;;
964 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 965 prefix=$ac_optarg ;;
ba4481b5
DL
966
967 -program-prefix | --program-prefix | --program-prefi | --program-pref \
968 | --program-pre | --program-pr | --program-p)
969 ac_prev=program_prefix ;;
970 -program-prefix=* | --program-prefix=* | --program-prefi=* \
971 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 972 program_prefix=$ac_optarg ;;
ba4481b5
DL
973
974 -program-suffix | --program-suffix | --program-suffi | --program-suff \
975 | --program-suf | --program-su | --program-s)
976 ac_prev=program_suffix ;;
977 -program-suffix=* | --program-suffix=* | --program-suffi=* \
978 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 979 program_suffix=$ac_optarg ;;
ba4481b5
DL
980
981 -program-transform-name | --program-transform-name \
982 | --program-transform-nam | --program-transform-na \
983 | --program-transform-n | --program-transform- \
984 | --program-transform | --program-transfor \
985 | --program-transfo | --program-transf \
986 | --program-trans | --program-tran \
987 | --progr-tra | --program-tr | --program-t)
988 ac_prev=program_transform_name ;;
989 -program-transform-name=* | --program-transform-name=* \
990 | --program-transform-nam=* | --program-transform-na=* \
991 | --program-transform-n=* | --program-transform-=* \
992 | --program-transform=* | --program-transfor=* \
993 | --program-transfo=* | --program-transf=* \
994 | --program-trans=* | --program-tran=* \
995 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 996 program_transform_name=$ac_optarg ;;
ba4481b5 997
d6e01aa5
KL
998 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
999 ac_prev=pdfdir ;;
1000 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1001 pdfdir=$ac_optarg ;;
1002
1003 -psdir | --psdir | --psdi | --psd | --ps)
1004 ac_prev=psdir ;;
1005 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1006 psdir=$ac_optarg ;;
1007
ba4481b5
DL
1008 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1009 | -silent | --silent | --silen | --sile | --sil)
1010 silent=yes ;;
1011
1012 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1013 ac_prev=sbindir ;;
1014 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1015 | --sbi=* | --sb=*)
503d2be0 1016 sbindir=$ac_optarg ;;
ba4481b5
DL
1017
1018 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1019 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1020 | --sharedst | --shareds | --shared | --share | --shar \
1021 | --sha | --sh)
1022 ac_prev=sharedstatedir ;;
1023 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1024 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1025 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1026 | --sha=* | --sh=*)
503d2be0 1027 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1028
1029 -site | --site | --sit)
1030 ac_prev=site ;;
1031 -site=* | --site=* | --sit=*)
503d2be0 1032 site=$ac_optarg ;;
ba4481b5
DL
1033
1034 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1035 ac_prev=srcdir ;;
1036 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1037 srcdir=$ac_optarg ;;
ba4481b5
DL
1038
1039 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1040 | --syscon | --sysco | --sysc | --sys | --sy)
1041 ac_prev=sysconfdir ;;
1042 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1043 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1044 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1045
1046 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1047 ac_prev=target_alias ;;
ba4481b5 1048 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1049 target_alias=$ac_optarg ;;
ba4481b5
DL
1050
1051 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1052 verbose=yes ;;
1053
503d2be0
AS
1054 -version | --version | --versio | --versi | --vers | -V)
1055 ac_init_version=: ;;
ba4481b5
DL
1056
1057 -with-* | --with-*)
503d2be0 1058 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1059 # Reject names that are not valid shell variable names.
d6e01aa5 1060 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1061 { echo "$as_me: error: invalid package name: $ac_package" >&2
1062 { (exit 1); exit 1; }; }
d6e01aa5
KL
1063 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1064 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1065
1066 -without-* | --without-*)
503d2be0 1067 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1068 # Reject names that are not valid shell variable names.
d6e01aa5 1069 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1070 { echo "$as_me: error: invalid package name: $ac_package" >&2
1071 { (exit 1); exit 1; }; }
d6e01aa5
KL
1072 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1073 eval with_$ac_package=no ;;
ba4481b5
DL
1074
1075 --x)
1076 # Obsolete; use --with-x.
1077 with_x=yes ;;
1078
1079 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1080 | --x-incl | --x-inc | --x-in | --x-i)
1081 ac_prev=x_includes ;;
1082 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1083 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1084 x_includes=$ac_optarg ;;
ba4481b5
DL
1085
1086 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1087 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1088 ac_prev=x_libraries ;;
1089 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1090 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1091 x_libraries=$ac_optarg ;;
ba4481b5 1092
503d2be0
AS
1093 -*) { echo "$as_me: error: unrecognized option: $ac_option
1094Try \`$0 --help' for more information." >&2
1095 { (exit 1); exit 1; }; }
ba4481b5
DL
1096 ;;
1097
503d2be0
AS
1098 *=*)
1099 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1100 # Reject names that are not valid shell variable names.
1101 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1102 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1103 { (exit 1); exit 1; }; }
d6e01aa5 1104 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1105 export $ac_envvar ;;
1106
ba4481b5 1107 *)
503d2be0
AS
1108 # FIXME: should be removed in autoconf 3.0.
1109 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1110 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1111 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1112 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1113 ;;
1114
1115 esac
1116done
1117
1118if test -n "$ac_prev"; then
503d2be0
AS
1119 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1120 { echo "$as_me: error: missing argument to $ac_option" >&2
1121 { (exit 1); exit 1; }; }
ba4481b5 1122fi
ba4481b5 1123
d6e01aa5
KL
1124# Be sure to have absolute directory names.
1125for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1126 datadir sysconfdir sharedstatedir localstatedir includedir \
1127 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1128 libdir localedir mandir
ba4481b5 1129do
d6e01aa5 1130 eval ac_val=\$$ac_var
503d2be0 1131 case $ac_val in
d6e01aa5
KL
1132 [\\/$]* | ?:[\\/]* ) continue;;
1133 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1134 esac
d6e01aa5
KL
1135 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1136 { (exit 1); exit 1; }; }
ba4481b5
DL
1137done
1138
503d2be0
AS
1139# There might be people who depend on the old broken behavior: `$host'
1140# used to hold the argument of --host etc.
c0d27fcc 1141# FIXME: To remove some day.
503d2be0
AS
1142build=$build_alias
1143host=$host_alias
1144target=$target_alias
1145
c0d27fcc 1146# FIXME: To remove some day.
503d2be0
AS
1147if test "x$host_alias" != x; then
1148 if test "x$build_alias" = x; then
1149 cross_compiling=maybe
1150 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1151 If a cross compiler is detected then cross compile mode will be used." >&2
1152 elif test "x$build_alias" != "x$host_alias"; then
1153 cross_compiling=yes
1154 fi
1155fi
ba4481b5 1156
503d2be0
AS
1157ac_tool_prefix=
1158test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1159
503d2be0 1160test "$silent" = yes && exec 6>/dev/null
ba4481b5 1161
c0d27fcc 1162
d6e01aa5
KL
1163ac_pwd=`pwd` && test -n "$ac_pwd" &&
1164ac_ls_di=`ls -di .` &&
1165ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1166 { echo "$as_me: error: Working directory cannot be determined" >&2
1167 { (exit 1); exit 1; }; }
1168test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1169 { echo "$as_me: error: pwd does not report name of working directory" >&2
1170 { (exit 1); exit 1; }; }
1171
1172
1173# Find the source files, if location was not specified.
1174if test -z "$srcdir"; then
1175 ac_srcdir_defaulted=yes
1176 # Try the directory containing this script, then the parent directory.
1177 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1178$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1179 X"$0" : 'X\(//\)[^/]' \| \
1180 X"$0" : 'X\(//\)$' \| \
d6e01aa5 1181 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1182echo X"$0" |
d6e01aa5
KL
1183 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1184 s//\1/
1185 q
1186 }
1187 /^X\(\/\/\)[^/].*/{
1188 s//\1/
1189 q
1190 }
1191 /^X\(\/\/\)$/{
1192 s//\1/
1193 q
1194 }
1195 /^X\(\/\).*/{
1196 s//\1/
1197 q
1198 }
1199 s/.*/./; q'`
ba4481b5 1200 srcdir=$ac_confdir
d6e01aa5 1201 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1202 srcdir=..
1203 fi
1204else
1205 ac_srcdir_defaulted=no
1206fi
d6e01aa5
KL
1207if test ! -r "$srcdir/$ac_unique_file"; then
1208 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1209 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1210 { (exit 1); exit 1; }; }
ba4481b5 1211fi
d6e01aa5
KL
1212ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1213ac_abs_confdir=`(
1214 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1215 { (exit 1); exit 1; }; }
d6e01aa5
KL
1216 pwd)`
1217# When building in place, set srcdir=.
1218if test "$ac_abs_confdir" = "$ac_pwd"; then
1219 srcdir=.
1220fi
1221# Remove unnecessary trailing slashes from srcdir.
1222# Double slashes in file names in object file debugging info
1223# mess up M-x gdb in Emacs.
1224case $srcdir in
1225*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1226esac
1227for ac_var in $ac_precious_vars; do
1228 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1229 eval ac_env_${ac_var}_value=\$${ac_var}
1230 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1231 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1232done
503d2be0
AS
1233
1234#
1235# Report the --help message.
1236#
1237if test "$ac_init_help" = "long"; then
1238 # Omit some internal or obsolete options to make the list less imposing.
1239 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1240 cat <<_ACEOF
503d2be0
AS
1241\`configure' configures this package to adapt to many kinds of systems.
1242
1243Usage: $0 [OPTION]... [VAR=VALUE]...
1244
1245To assign environment variables (e.g., CC, CFLAGS...), specify them as
1246VAR=VALUE. See below for descriptions of some of the useful variables.
1247
1248Defaults for the options are specified in brackets.
1249
1250Configuration:
1251 -h, --help display this help and exit
1252 --help=short display options specific to this package
1253 --help=recursive display the short help of all the included packages
1254 -V, --version display version information and exit
1255 -q, --quiet, --silent do not print \`checking...' messages
1256 --cache-file=FILE cache test results in FILE [disabled]
1257 -C, --config-cache alias for \`--cache-file=config.cache'
1258 -n, --no-create do not create output files
1259 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1260
503d2be0
AS
1261Installation directories:
1262 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1263 [$ac_default_prefix]
503d2be0 1264 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1265 [PREFIX]
503d2be0
AS
1266
1267By default, \`make install' will install all the files in
1268\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1269an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1270for instance \`--prefix=\$HOME'.
1271
1272For better control, use the options below.
1273
1274Fine tuning of the installation directories:
1275 --bindir=DIR user executables [EPREFIX/bin]
1276 --sbindir=DIR system admin executables [EPREFIX/sbin]
1277 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1278 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1279 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1280 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1281 --libdir=DIR object code libraries [EPREFIX/lib]
1282 --includedir=DIR C header files [PREFIX/include]
1283 --oldincludedir=DIR C header files for non-gcc [/usr/include]
d6e01aa5
KL
1284 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1285 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1286 --infodir=DIR info documentation [DATAROOTDIR/info]
1287 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1288 --mandir=DIR man documentation [DATAROOTDIR/man]
1289 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1290 --htmldir=DIR html documentation [DOCDIR]
1291 --dvidir=DIR dvi documentation [DOCDIR]
1292 --pdfdir=DIR pdf documentation [DOCDIR]
1293 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1294_ACEOF
503d2be0 1295
c0d27fcc 1296 cat <<\_ACEOF
503d2be0 1297
ba5da88a
PJ
1298Program names:
1299 --program-prefix=PREFIX prepend PREFIX to installed program names
1300 --program-suffix=SUFFIX append SUFFIX to installed program names
1301 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1302
503d2be0
AS
1303X features:
1304 --x-includes=DIR X include files are in DIR
1305 --x-libraries=DIR X library files are in DIR
1306
1307System types:
1308 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1309 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1310_ACEOF
503d2be0
AS
1311fi
1312
1313if test -n "$ac_init_help"; then
1314
c0d27fcc 1315 cat <<\_ACEOF
503d2be0
AS
1316
1317Optional Features:
1318 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1319 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
709e90de 1320 --enable-carbon-app[=DIR]
6a3a24fa 1321 specify install directory for Emacs.app on Mac OS X
709e90de 1322 [DIR=/Application]
d0098f13 1323 --enable-asserts compile code with asserts enabled
709e90de
AS
1324 --enable-maintainer-mode
1325 enable make rules and dependencies not useful (and
1326 sometimes confusing) to the casual installer
9adfabc2
LK
1327 --enable-locallisppath=PATH
1328 directories Emacs should search for lisp files
1329 specific to this site
503d2be0
AS
1330 --disable-largefile omit support for large files
1331
1332Optional Packages:
1333 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1334 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1335 --without-gcc don't use GCC to compile Emacs if GCC is found
1336 --without-pop don't support POP mail retrieval with movemail
1337 --with-kerberos support Kerberos-authenticated POP
1338 --with-kerberos5 support Kerberos version 5 authenticated POP
1339 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1340 --without-sound don't compile with sound support
49adb60f
TTN
1341 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes, lucid, athena,
1342 motif, gtk, no)
503d2be0
AS
1343 --with-xpm use -lXpm for displaying XPM images
1344 --with-jpeg use -ljpeg for displaying JPEG images
1345 --with-tiff use -ltiff for displaying TIFF images
63175cd2 1346 --with-gif use -lgif (or -lungif) for displaying GIF images
503d2be0 1347 --with-png use -lpng for displaying PNG images
79011b82 1348 --with-gpm use -lgpm for mouse support on a GNU/Linux console
0cfc0546 1349 --with-rsvg use -lrsvg-2 for displaying SVG images
488dd4c4 1350 --with-gtk use GTK (same as --with-x-toolkit=gtk)
49adb60f 1351 --with-pkg-config-prog Path to pkg-config for finding GTK and librsvg
503d2be0 1352 --without-toolkit-scroll-bars
cc227489 1353 don't use Motif or Xaw3d scroll bars
c982cf7d 1354 --without-xaw3d don't use Xaw3d
cc227489 1355 --without-xim don't use X11 XIM
e0f712ba 1356 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
1357 --with-x use the X Window System
1358
1359Some influential environment variables:
1360 CC C compiler command
1361 CFLAGS C compiler flags
1362 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1363 nonstandard directory <lib dir>
d6e01aa5
KL
1364 LIBS libraries to pass to the linker, e.g. -l<library>
1365 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1366 you have headers in a nonstandard directory <include dir>
503d2be0 1367 CPP C preprocessor
d6e01aa5 1368 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1369
1370Use these variables to override the choices made by `configure' or to help
1371it to find libraries and programs with nonstandard names/locations.
1372
c0d27fcc 1373_ACEOF
d6e01aa5 1374ac_status=$?
503d2be0
AS
1375fi
1376
1377if test "$ac_init_help" = "recursive"; then
1378 # If there are subdirs, report their specific --help.
c0d27fcc 1379 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
d6e01aa5 1380 test -d "$ac_dir" || continue
c0d27fcc
MR
1381 ac_builddir=.
1382
d6e01aa5
KL
1383case "$ac_dir" in
1384.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1385*)
c0d27fcc 1386 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
d6e01aa5
KL
1387 # A ".." for each directory in $ac_dir_suffix.
1388 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1389 case $ac_top_builddir_sub in
1390 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1391 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1392 esac ;;
1393esac
1394ac_abs_top_builddir=$ac_pwd
1395ac_abs_builddir=$ac_pwd$ac_dir_suffix
1396# for backward compatibility:
1397ac_top_builddir=$ac_top_build_prefix
503d2be0 1398
c0d27fcc 1399case $srcdir in
d6e01aa5 1400 .) # We are building in place.
c0d27fcc 1401 ac_srcdir=.
d6e01aa5
KL
1402 ac_top_srcdir=$ac_top_builddir_sub
1403 ac_abs_top_srcdir=$ac_pwd ;;
1404 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1405 ac_srcdir=$srcdir$ac_dir_suffix;
d6e01aa5
KL
1406 ac_top_srcdir=$srcdir
1407 ac_abs_top_srcdir=$srcdir ;;
1408 *) # Relative name.
1409 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1410 ac_top_srcdir=$ac_top_build_prefix$srcdir
1411 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1412esac
d6e01aa5
KL
1413ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1414
1415 cd "$ac_dir" || { ac_status=$?; continue; }
1416 # Check for guested configure.
1417 if test -f "$ac_srcdir/configure.gnu"; then
1418 echo &&
1419 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1420 elif test -f "$ac_srcdir/configure"; then
1421 echo &&
1422 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1423 else
c0d27fcc 1424 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
d6e01aa5
KL
1425 fi || ac_status=$?
1426 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1427 done
1428fi
1429
d6e01aa5 1430test -n "$ac_init_help" && exit $ac_status
503d2be0 1431if $ac_init_version; then
c0d27fcc 1432 cat <<\_ACEOF
d6e01aa5
KL
1433configure
1434generated by GNU Autoconf 2.61
503d2be0 1435
d6e01aa5
KL
1436Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14372002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1438This configure script is free software; the Free Software Foundation
1439gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1440_ACEOF
d6e01aa5 1441 exit
503d2be0 1442fi
d6e01aa5 1443cat >config.log <<_ACEOF
503d2be0
AS
1444This file contains any messages produced by compilers while
1445running configure, to aid debugging if configure makes a mistake.
1446
1447It was created by $as_me, which was
d6e01aa5 1448generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1449
1450 $ $0 $@
1451
c0d27fcc 1452_ACEOF
d6e01aa5 1453exec 5>>config.log
503d2be0
AS
1454{
1455cat <<_ASUNAME
c0d27fcc
MR
1456## --------- ##
1457## Platform. ##
1458## --------- ##
503d2be0
AS
1459
1460hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1461uname -m = `(uname -m) 2>/dev/null || echo unknown`
1462uname -r = `(uname -r) 2>/dev/null || echo unknown`
1463uname -s = `(uname -s) 2>/dev/null || echo unknown`
1464uname -v = `(uname -v) 2>/dev/null || echo unknown`
1465
1466/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1467/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1468
1469/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1470/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1471/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
d6e01aa5 1472/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1473/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1474/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1475/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1476
925c2f3f 1477_ASUNAME
c0d27fcc
MR
1478
1479as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1480for as_dir in $PATH
1481do
1482 IFS=$as_save_IFS
1483 test -z "$as_dir" && as_dir=.
1484 echo "PATH: $as_dir"
1485done
d6e01aa5 1486IFS=$as_save_IFS
c0d27fcc 1487
503d2be0
AS
1488} >&5
1489
c0d27fcc
MR
1490cat >&5 <<_ACEOF
1491
1492
1493## ----------- ##
1494## Core tests. ##
1495## ----------- ##
1496
1497_ACEOF
503d2be0 1498
503d2be0
AS
1499
1500# Keep a trace of the command line.
1501# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1502# Strip out --silent because we don't want to record it for future runs.
503d2be0 1503# Also quote any args containing shell meta-characters.
19650fd6 1504# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1505ac_configure_args=
19650fd6
AS
1506ac_configure_args0=
1507ac_configure_args1=
19650fd6
AS
1508ac_must_keep_next=false
1509for ac_pass in 1 2
503d2be0 1510do
19650fd6
AS
1511 for ac_arg
1512 do
1513 case $ac_arg in
1514 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1515 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1516 | -silent | --silent | --silen | --sile | --sil)
1517 continue ;;
d6e01aa5 1518 *\'*)
19650fd6
AS
1519 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1520 esac
1521 case $ac_pass in
1522 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1523 2)
1524 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1525 if test $ac_must_keep_next = true; then
edfaf76d 1526 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1527 else
edfaf76d
LK
1528 case $ac_arg in
1529 *=* | --config-cache | -C | -disable-* | --disable-* \
1530 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1531 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1532 | -with-* | --with-* | -without-* | --without-* | --x)
1533 case "$ac_configure_args0 " in
1534 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1535 esac
1536 ;;
1537 -* ) ac_must_keep_next=true ;;
1538 esac
19650fd6 1539 fi
d6e01aa5 1540 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1541 ;;
1542 esac
1543 done
503d2be0 1544done
19650fd6
AS
1545$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1546$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1547
1548# When interrupted or exit'd, cleanup temporary files, and complete
1549# config.log. We remove comments because anyway the quotes in there
1550# would cause problems or look ugly.
d6e01aa5
KL
1551# WARNING: Use '\'' to represent an apostrophe within the trap.
1552# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1553trap 'exit_status=$?
1554 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1555 {
1556 echo
6bae0ccf 1557
c0d27fcc
MR
1558 cat <<\_ASBOX
1559## ---------------- ##
1560## Cache variables. ##
1561## ---------------- ##
1562_ASBOX
1563 echo
1564 # The following way of writing the cache mishandles newlines in values,
d6e01aa5
KL
1565(
1566 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1567 eval ac_val=\$$ac_var
1568 case $ac_val in #(
1569 *${as_nl}*)
1570 case $ac_var in #(
1571 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1572echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1573 esac
1574 case $ac_var in #(
1575 _ | IFS | as_nl) ;; #(
1576 *) $as_unset $ac_var ;;
1577 esac ;;
1578 esac
1579 done
503d2be0 1580 (set) 2>&1 |
d6e01aa5
KL
1581 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1582 *${as_nl}ac_space=\ *)
503d2be0 1583 sed -n \
d6e01aa5
KL
1584 "s/'\''/'\''\\\\'\'''\''/g;
1585 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1586 ;; #(
503d2be0 1587 *)
d6e01aa5 1588 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1589 ;;
d6e01aa5
KL
1590 esac |
1591 sort
1592)
c0d27fcc 1593 echo
6bae0ccf
DL
1594
1595 cat <<\_ASBOX
1596## ----------------- ##
1597## Output variables. ##
1598## ----------------- ##
1599_ASBOX
1600 echo
1601 for ac_var in $ac_subst_vars
1602 do
d6e01aa5
KL
1603 eval ac_val=\$$ac_var
1604 case $ac_val in
1605 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1606 esac
1607 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1608 done | sort
1609 echo
1610
1611 if test -n "$ac_subst_files"; then
1612 cat <<\_ASBOX
d6e01aa5
KL
1613## ------------------- ##
1614## File substitutions. ##
1615## ------------------- ##
6bae0ccf
DL
1616_ASBOX
1617 echo
1618 for ac_var in $ac_subst_files
1619 do
d6e01aa5
KL
1620 eval ac_val=\$$ac_var
1621 case $ac_val in
1622 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1623 esac
1624 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1625 done | sort
1626 echo
1627 fi
1628
c0d27fcc
MR
1629 if test -s confdefs.h; then
1630 cat <<\_ASBOX
1631## ----------- ##
1632## confdefs.h. ##
1633## ----------- ##
1634_ASBOX
1635 echo
d6e01aa5 1636 cat confdefs.h
c0d27fcc
MR
1637 echo
1638 fi
1639 test "$ac_signal" != 0 &&
1640 echo "$as_me: caught signal $ac_signal"
1641 echo "$as_me: exit $exit_status"
1642 } >&5
d6e01aa5
KL
1643 rm -f core *.core core.conftest.* &&
1644 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1645 exit $exit_status
d6e01aa5 1646' 0
503d2be0
AS
1647for ac_signal in 1 2 13 15; do
1648 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1649done
1650ac_signal=0
1651
1652# confdefs.h avoids OS command line length limits that DEFS can exceed.
d6e01aa5 1653rm -f -r conftest* confdefs.h
ba4481b5 1654
c0d27fcc
MR
1655# Predefined preprocessor variables.
1656
1657cat >>confdefs.h <<_ACEOF
1658#define PACKAGE_NAME "$PACKAGE_NAME"
1659_ACEOF
1660
1661
1662cat >>confdefs.h <<_ACEOF
1663#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1664_ACEOF
1665
1666
1667cat >>confdefs.h <<_ACEOF
1668#define PACKAGE_VERSION "$PACKAGE_VERSION"
1669_ACEOF
1670
1671
1672cat >>confdefs.h <<_ACEOF
1673#define PACKAGE_STRING "$PACKAGE_STRING"
1674_ACEOF
1675
1676
1677cat >>confdefs.h <<_ACEOF
1678#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1679_ACEOF
1680
1681
503d2be0 1682# Let the site file select an alternate cache file if it wants to.
ba4481b5 1683# Prefer explicitly selected file to automatically selected ones.
d6e01aa5
KL
1684if test -n "$CONFIG_SITE"; then
1685 set x "$CONFIG_SITE"
1686elif test "x$prefix" != xNONE; then
1687 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1688else
1689 set x "$ac_default_prefix/share/config.site" \
1690 "$ac_default_prefix/etc/config.site"
ba4481b5 1691fi
d6e01aa5
KL
1692shift
1693for ac_site_file
1694do
ba4481b5 1695 if test -r "$ac_site_file"; then
c0d27fcc 1696 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1697echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1698 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1699 . "$ac_site_file"
1700 fi
1701done
1702
1703if test -r "$cache_file"; then
503d2be0
AS
1704 # Some versions of bash will fail to source /dev/null (special
1705 # files actually), so we avoid doing that.
1706 if test -f "$cache_file"; then
c0d27fcc 1707 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1708echo "$as_me: loading cache $cache_file" >&6;}
1709 case $cache_file in
d6e01aa5
KL
1710 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1711 *) . "./$cache_file";;
503d2be0
AS
1712 esac
1713 fi
ba4481b5 1714else
c0d27fcc 1715 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1716echo "$as_me: creating cache $cache_file" >&6;}
1717 >$cache_file
1718fi
1719
d6e01aa5
KL
1720ac_header_list="$ac_header_list sys/time.h"
1721ac_header_list="$ac_header_list unistd.h"
1722ac_func_list="$ac_func_list alarm"
503d2be0
AS
1723# Check that the precious variables saved in the cache have kept the same
1724# value.
1725ac_cache_corrupted=false
d6e01aa5 1726for ac_var in $ac_precious_vars; do
503d2be0
AS
1727 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1728 eval ac_new_set=\$ac_env_${ac_var}_set
d6e01aa5
KL
1729 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1730 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1731 case $ac_old_set,$ac_new_set in
1732 set,)
c0d27fcc 1733 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1734echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1735 ac_cache_corrupted=: ;;
1736 ,set)
c0d27fcc 1737 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1738echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1739 ac_cache_corrupted=: ;;
1740 ,);;
1741 *)
1742 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1743 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1744echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1745 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1746echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1747 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1748echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1749 ac_cache_corrupted=:
503d2be0
AS
1750 fi;;
1751 esac
c0d27fcc 1752 # Pass precious variables to config.status.
503d2be0
AS
1753 if test "$ac_new_set" = set; then
1754 case $ac_new_val in
d6e01aa5 1755 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1756 *) ac_arg=$ac_var=$ac_new_val ;;
1757 esac
1758 case " $ac_configure_args " in
1759 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1760 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1761 esac
1762 fi
1763done
1764if $ac_cache_corrupted; then
c0d27fcc 1765 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1766echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1767 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1768echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1769 { (exit 1); exit 1; }; }
ba4481b5
DL
1770fi
1771
c0d27fcc
MR
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
d6e01aa5
KL
1788ac_ext=c
1789ac_cpp='$CPP $CPPFLAGS'
1790ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1791ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1792ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 1793
6bae0ccf 1794
d6e01aa5 1795ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1796
c0d27fcc 1797
ba5da88a 1798test "$program_prefix" != NONE &&
d6e01aa5 1799 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1800# Use a double $ so make ignores it.
1801test "$program_suffix" != NONE &&
d6e01aa5 1802 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1803# Double any \ or $. echo might interpret backslashes.
1804# By default was `s,x,x', remove it if useless.
1805cat <<\_ACEOF >conftest.sed
1806s/[\\$]/&&/g;s/;s,x,x,$//
1807_ACEOF
1808program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
d6e01aa5 1809rm -f conftest.sed
ba5da88a 1810
c0d27fcc 1811
ba4481b5
DL
1812lispdir='${datadir}/emacs/${version}/lisp'
1813locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1814'${datadir}/emacs/site-lisp'
1815lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1816etcdir='${datadir}/emacs/${version}/etc'
1817archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1818docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1819gamedir='${localstatedir}/games/emacs'
98418dba
CW
1820
1821gameuser=games
1822
c0d27fcc 1823
49adb60f 1824
d6e01aa5 1825# Check whether --with-gcc was given.
ba4481b5 1826if test "${with_gcc+set}" = set; then
d6e01aa5
KL
1827 withval=$with_gcc;
1828fi
503d2be0 1829
ba4481b5 1830
49adb60f 1831
d6e01aa5 1832# Check whether --with-pop was given.
ba4481b5 1833if test "${with_pop+set}" = set; then
d6e01aa5 1834 withval=$with_pop; if test "$withval" = yes; then
c0d27fcc 1835 cat >>confdefs.h <<\_ACEOF
ba4481b5 1836#define MAIL_USE_POP 1
c0d27fcc 1837_ACEOF
ba4481b5 1838
243cf185
DL
1839else :
1840fi
3d9fec71 1841else
c0d27fcc 1842 cat >>confdefs.h <<\_ACEOF
3d9fec71 1843#define MAIL_USE_POP 1
c0d27fcc 1844_ACEOF
3d9fec71 1845
d6e01aa5 1846fi
ba4481b5 1847
c0d27fcc 1848
d6e01aa5 1849
49adb60f 1850
d6e01aa5 1851# Check whether --with-kerberos was given.
a21616bd 1852if test "${with_kerberos+set}" = set; then
54e6585f
CY
1853 withval=$with_kerberos; if test "$withval" = yes; then
1854 cat >>confdefs.h <<\_ACEOF
a21616bd 1855#define KERBEROS 1
c0d27fcc 1856_ACEOF
a21616bd 1857
d6e01aa5 1858fi
54e6585f 1859fi
a21616bd 1860
c0d27fcc 1861
d6e01aa5 1862
49adb60f 1863
d6e01aa5 1864# Check whether --with-kerberos5 was given.
a21616bd 1865if test "${with_kerberos5+set}" = set; then
d6e01aa5 1866 withval=$with_kerberos5; if test "${with_kerberos5+set}" = set; then
a21616bd
KR
1867 if test "${with_kerberos+set}" != set; then
1868 with_kerberos=yes
c0d27fcc 1869 cat >>confdefs.h <<\_ACEOF
a21616bd 1870#define KERBEROS 1
c0d27fcc 1871_ACEOF
a21616bd
KR
1872
1873 fi
b936fae4 1874
c0d27fcc 1875cat >>confdefs.h <<\_ACEOF
a21616bd 1876#define KERBEROS5 1
c0d27fcc 1877_ACEOF
a21616bd 1878
d6e01aa5 1879fi
54e6585f 1880fi
a21616bd 1881
b936fae4 1882
49adb60f 1883
d6e01aa5
KL
1884# Check whether --with-hesiod was given.
1885if test "${with_hesiod+set}" = set; then
54e6585f
CY
1886 withval=$with_hesiod; if test "$withval" = yes; then
1887
c0d27fcc 1888cat >>confdefs.h <<\_ACEOF
ba4481b5 1889#define HESIOD 1
c0d27fcc 1890_ACEOF
ba4481b5 1891
d6e01aa5 1892fi
54e6585f 1893fi
ba4481b5 1894
c0d27fcc 1895
d6e01aa5
KL
1896
1897# Check whether --with-sound was given.
2c9dccc9 1898if test "${with_sound+set}" = set; then
d6e01aa5
KL
1899 withval=$with_sound;
1900fi
2c9dccc9 1901
2c9dccc9 1902
c0d27fcc 1903
d6e01aa5 1904# Check whether --with-x-toolkit was given.
ba4481b5 1905if test "${with_x_toolkit+set}" = set; then
d6e01aa5 1906 withval=$with_x_toolkit; case "${withval}" in
089a966d 1907 y | ye | yes ) val=gtk ;;
ba4481b5
DL
1908 n | no ) val=no ;;
1909 l | lu | luc | luci | lucid ) val=lucid ;;
1910 a | at | ath | athe | athen | athena ) val=athena ;;
1911 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1912 g | gt | gtk ) val=gtk ;;
ba4481b5 1913 * )
29d69661 1914{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1915this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661
JD
1916\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
1917echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1918this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1919\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
503d2be0 1920 { (exit 1); exit 1; }; }
ba4481b5
DL
1921 ;;
1922 esac
1923 with_x_toolkit=$val
1924
d6e01aa5
KL
1925fi
1926
ba4481b5 1927
49adb60f 1928
d6e01aa5 1929# Check whether --with-xpm was given.
ba4481b5 1930if test "${with_xpm+set}" = set; then
d6e01aa5
KL
1931 withval=$with_xpm;
1932fi
503d2be0 1933
ba4481b5 1934
d6e01aa5 1935# Check whether --with-jpeg was given.
ba4481b5 1936if test "${with_jpeg+set}" = set; then
d6e01aa5
KL
1937 withval=$with_jpeg;
1938fi
503d2be0 1939
ba4481b5 1940
d6e01aa5 1941# Check whether --with-tiff was given.
ba4481b5 1942if test "${with_tiff+set}" = set; then
d6e01aa5
KL
1943 withval=$with_tiff;
1944fi
503d2be0 1945
ba4481b5 1946
d6e01aa5 1947# Check whether --with-gif was given.
ba4481b5 1948if test "${with_gif+set}" = set; then
d6e01aa5
KL
1949 withval=$with_gif;
1950fi
503d2be0 1951
ba4481b5 1952
d6e01aa5 1953# Check whether --with-png was given.
ba4481b5 1954if test "${with_png+set}" = set; then
d6e01aa5
KL
1955 withval=$with_png;
1956fi
503d2be0 1957
ba4481b5 1958
79011b82
NR
1959# Check whether --with-gpm was given.
1960if test "${with_gpm+set}" = set; then
1961 withval=$with_gpm;
1962fi
1963
1964
0cfc0546
GM
1965# Check whether --with-rsvg was given.
1966if test "${with_rsvg+set}" = set; then
1967 withval=$with_rsvg;
1968fi
1969
1970
d6e01aa5 1971# Check whether --with-gtk was given.
488dd4c4 1972if test "${with_gtk+set}" = set; then
d6e01aa5
KL
1973 withval=$with_gtk;
1974fi
488dd4c4 1975
488dd4c4 1976
d6e01aa5 1977# Check whether --with-pkg-config-prog was given.
488dd4c4 1978if test "${with_pkg_config_prog+set}" = set; then
d6e01aa5
KL
1979 withval=$with_pkg_config_prog;
1980fi
488dd4c4 1981
488dd4c4 1982
d6e01aa5 1983# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 1984if test "${with_toolkit_scroll_bars+set}" = set; then
d6e01aa5
KL
1985 withval=$with_toolkit_scroll_bars;
1986fi
503d2be0 1987
ba4481b5 1988
e35a28cd
TTN
1989# Check whether --with-xaw3d was given.
1990if test "${with_xaw3d+set}" = set; then
1991 withval=$with_xaw3d;
c982cf7d
JD
1992fi
1993
1994
d6e01aa5 1995# Check whether --with-xim was given.
1d36487c 1996if test "${with_xim+set}" = set; then
d6e01aa5
KL
1997 withval=$with_xim;
1998fi
1d36487c 1999
ba4481b5 2000
d6e01aa5 2001# Check whether --with-carbon was given.
e0f712ba 2002if test "${with_carbon+set}" = set; then
d6e01aa5
KL
2003 withval=$with_carbon;
2004fi
e0f712ba 2005
49adb60f 2006
d6e01aa5 2007# Check whether --enable-carbon-app was given.
6a3a24fa 2008if test "${enable_carbon_app+set}" = set; then
d6e01aa5
KL
2009 enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
2010fi
e0f712ba 2011
d6e01aa5
KL
2012
2013# Check whether --enable-asserts was given.
d0098f13 2014if test "${enable_asserts+set}" = set; then
d6e01aa5 2015 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
2016else
2017 USE_XASSERTS=no
d6e01aa5
KL
2018fi
2019
d0098f13 2020
d6e01aa5 2021# Check whether --enable-maintainer-mode was given.
19650fd6 2022if test "${enable_maintainer_mode+set}" = set; then
d6e01aa5 2023 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
2024else
2025 USE_MAINTAINER_MODE=no
d6e01aa5
KL
2026fi
2027
19650fd6
AS
2028if test $USE_MAINTAINER_MODE = yes; then
2029 MAINT=
2030else
2031 MAINT=#
2032fi
2033
2034
d6e01aa5 2035# Check whether --enable-locallisppath was given.
9adfabc2 2036if test "${enable_locallisppath+set}" = set; then
d6e01aa5 2037 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2038 locallisppath=
2039elif test "${enableval}" != "yes"; then
2040 locallisppath=${enableval}
2041fi
d6e01aa5
KL
2042fi
2043
9adfabc2 2044
ba4481b5 2045#### Make srcdir absolute, if it isn't already. It's important to
17494071 2046#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2047#### give you automounter prefixes, which can go away. We do all this
2048#### so Emacs can find its files when run uninstalled.
17494071
GM
2049## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2050unset CDPATH
ba4481b5
DL
2051case "${srcdir}" in
2052 /* ) ;;
2053 . )
2054 ## We may be able to use the $PWD environment variable to make this
2055 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2056 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2057 ## but that tested only for a well-formed and valid PWD,
2058 ## it did not object when PWD was well-formed and valid but just wrong.
2059 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2060 then
2061 srcdir="$PWD"
2062 else
2063 srcdir="`(cd ${srcdir}; pwd)`"
2064 fi
2065 ;;
2066 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2067esac
2068
2069#### Check if the source directory already has a configured system in it.
2070if test `pwd` != `(cd ${srcdir} && pwd)` \
2071 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2072 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2073 as a build directory right now; it has been configured in its own
2074 right. To configure in another directory as well, you MUST
2075 use GNU make. If you do not have GNU make, then you must
2076 now do \`make distclean' in ${srcdir},
2077 and then run $0 again." >&5
2078echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2079 as a build directory right now; it has been configured in its own
2080 right. To configure in another directory as well, you MUST
2081 use GNU make. If you do not have GNU make, then you must
2082 now do \`make distclean' in ${srcdir},
503d2be0 2083 and then run $0 again." >&2;}
ba4481b5
DL
2084fi
2085
2086#### Given the configuration name, set machfile and opsysfile to the
2087#### names of the m/*.h and s/*.h files we should use.
2088
2089### Canonicalize the configuration name.
2090
2091ac_aux_dir=
d6e01aa5
KL
2092for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2093 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2094 ac_aux_dir=$ac_dir
2095 ac_install_sh="$ac_aux_dir/install-sh -c"
2096 break
d6e01aa5 2097 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2098 ac_aux_dir=$ac_dir
2099 ac_install_sh="$ac_aux_dir/install.sh -c"
2100 break
d6e01aa5 2101 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2102 ac_aux_dir=$ac_dir
2103 ac_install_sh="$ac_aux_dir/shtool install -c"
2104 break
ba4481b5
DL
2105 fi
2106done
2107if test -z "$ac_aux_dir"; then
d6e01aa5
KL
2108 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2109echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2110 { (exit 1); exit 1; }; }
ba4481b5 2111fi
d6e01aa5
KL
2112
2113# These three variables are undocumented and unsupported,
2114# and are intended to be withdrawn in a future Autoconf release.
2115# They can cause serious problems if a builder's source tree is in a directory
2116# whose full name contains unusual characters.
2117ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2118ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2119ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2120
ba4481b5
DL
2121
2122# Make sure we can run config.sub.
d6e01aa5
KL
2123$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2124 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2125echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2126 { (exit 1); exit 1; }; }
2127
d6e01aa5
KL
2128{ echo "$as_me:$LINENO: checking build system type" >&5
2129echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2130if test "${ac_cv_build+set}" = set; then
2131 echo $ECHO_N "(cached) $ECHO_C" >&6
2132else
d6e01aa5
KL
2133 ac_build_alias=$build_alias
2134test "x$ac_build_alias" = x &&
2135 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2136test "x$ac_build_alias" = x &&
c0d27fcc 2137 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2138echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2139 { (exit 1); exit 1; }; }
d6e01aa5
KL
2140ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2141 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2142echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2143 { (exit 1); exit 1; }; }
2144
2145fi
d6e01aa5
KL
2146{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2147echo "${ECHO_T}$ac_cv_build" >&6; }
2148case $ac_cv_build in
2149*-*-*) ;;
2150*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2151echo "$as_me: error: invalid value of canonical build" >&2;}
2152 { (exit 1); exit 1; }; };;
2153esac
503d2be0 2154build=$ac_cv_build
d6e01aa5
KL
2155ac_save_IFS=$IFS; IFS='-'
2156set x $ac_cv_build
2157shift
2158build_cpu=$1
2159build_vendor=$2
2160shift; shift
2161# Remember, the first character of IFS is used to create $*,
2162# except with old shells:
2163build_os=$*
2164IFS=$ac_save_IFS
2165case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2166
2167
2168{ echo "$as_me:$LINENO: checking host system type" >&5
2169echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2170if test "${ac_cv_host+set}" = set; then
2171 echo $ECHO_N "(cached) $ECHO_C" >&6
2172else
d6e01aa5
KL
2173 if test "x$host_alias" = x; then
2174 ac_cv_host=$ac_cv_build
2175else
2176 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2177 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2178echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2179 { (exit 1); exit 1; }; }
d6e01aa5 2180fi
503d2be0
AS
2181
2182fi
d6e01aa5
KL
2183{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2184echo "${ECHO_T}$ac_cv_host" >&6; }
2185case $ac_cv_host in
2186*-*-*) ;;
2187*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2188echo "$as_me: error: invalid value of canonical host" >&2;}
2189 { (exit 1); exit 1; }; };;
2190esac
503d2be0 2191host=$ac_cv_host
d6e01aa5
KL
2192ac_save_IFS=$IFS; IFS='-'
2193set x $ac_cv_host
2194shift
2195host_cpu=$1
2196host_vendor=$2
2197shift; shift
2198# Remember, the first character of IFS is used to create $*,
2199# except with old shells:
2200host_os=$*
2201IFS=$ac_save_IFS
2202case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2203
c0d27fcc 2204
ba4481b5 2205canonical=$host
1770dcdc 2206configuration=${host_alias-${build_alias-$host}}
ba4481b5 2207
c0d27fcc 2208
22044edf 2209
ba4481b5
DL
2210### If you add support for a new configuration, add code to this
2211### switch statement to recognize your configuration name and select
2212### the appropriate operating system and machine description files.
2213
2214### You would hope that you could choose an m/*.h file pretty much
2215### based on the machine portion of the configuration name, and an s-
2216### file based on the operating system portion. However, it turns out
2217### that each m/*.h file is pretty manufacturer-specific - for
2218### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
2219### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
2220### machines. So we basically have to have a special case for each
2221### configuration name.
2222###
2223### As far as handling version numbers on operating systems is
2224### concerned, make sure things will fail in a fixable way. If
2225### /etc/MACHINES doesn't say anything about version numbers, be
2226### prepared to handle anything reasonably. If version numbers
2227### matter, be sure /etc/MACHINES says something about it.
2228###
2229### Eric Raymond says we should accept strings like "sysvr4" to mean
2230### "System V Release 4"; he writes, "The old convention encouraged
2231### confusion between `system' and `release' levels'."
2232
2233machine='' opsys='' unported=no
2234case "${canonical}" in
2235
1096bcc0
GM
2236 ## FreeBSD ports
2237 *-*-freebsd* )
2238 opsys=freebsd
2239 case "${canonical}" in
2240 alpha*-*-freebsd*) machine=alpha ;;
ec8fcb10
YM
2241 ia64-*-freebsd*) machine=ia64 ;;
2242 sparc64-*-freebsd*) machine=sparc ;;
2243 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2244 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 2245 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2246 esac
2247 ;;
2248
ba4481b5
DL
2249 ## NetBSD ports
2250 *-*-netbsd* )
2251 opsys=netbsd
dd038e26 2252 if test -f /usr/lib/crti.o; then
f57bd967
DL
2253
2254cat >>confdefs.h <<\_ACEOF
2255#define HAVE_CRTIN
dd038e26
AS
2256_ACEOF
2257
2258 fi
2259
ba4481b5
DL
2260 case "${canonical}" in
2261 alpha*-*-netbsd*) machine=alpha ;;
2262 i[3456]86-*-netbsd*) machine=intel386 ;;
2263 m68k-*-netbsd*)
2264 # This is somewhat bogus.
2265 machine=hp9000s300 ;;
ba4481b5 2266 mips-*-netbsd*) machine=pmax ;;
2df636f4 2267 mipsel-*-netbsd*) machine=pmax ;;
97836269 2268 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 2269 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 2270 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2271 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2272 vax-*-netbsd*) machine=vax ;;
2df636f4 2273 arm-*-netbsd*) machine=arm ;;
d54ee7b4 2274 x86_64-*-netbsd*) machine=amdx86-64 ;;
13aadc96 2275 hppa-*-netbsd*) machine=hp800 ;;
d54ee7b4 2276 shle-*-netbsd*) machine=sh3el ;;
ba4481b5
DL
2277 esac
2278 ;;
2279
2280 ## OpenBSD ports
2281 *-*-openbsd* )
2282 opsys=openbsd
2283 case "${canonical}" in
2284 alpha*-*-openbsd*) machine=alpha ;;
85410b02
CY
2285 arm-*-openbsd*) machine=arm ;;
2286 hppa-*-openbsd*) machine=hp9000s300 ;;
2287 i386-*-openbsd*) machine=intel386 ;;
2288 m68k-*-openbsd*) machine=hp9000s300 ;;
2289 m88k-*-openbsd*) machine=aviion ;;
2290 mips64-*-openbsd*) machine=mips64 ;;
2291 powerpc-*-openbsd*) machine=macppc ;;
2292 sh-*-openbsd*) machine=sh3el ;;
2293 sparc*-*-openbsd*) machine=sparc ;;
2294 vax-*-openbsd*) machine=vax ;;
2295 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2296 esac
2297 ;;
2298
10a3b1a1
EZ
2299 ## LynxOS ports
2300 *-*-lynxos* )
2301 opsys=lynxos
2302 case "${canonical}" in
2303 i[3456]86-*-lynxos*) machine=intel386 ;;
2304 powerpc-*-lynxos*) machine=powerpc ;;
2305 esac
2306 ;;
2307
ba4481b5
DL
2308 ## Acorn RISCiX:
2309 arm-acorn-riscix1.1* )
2310 machine=acorn opsys=riscix1-1
2311 ;;
2312 arm-acorn-riscix1.2* | arm-acorn-riscix )
2313 ## This name is riscix12 instead of riscix1.2
2314 ## to avoid a file name conflict on MSDOS.
2315 machine=acorn opsys=riscix12
2316 ;;
2317
2318 ## BSDI ports
2319 *-*-bsdi* )
2320 opsys=bsdi
2321 case "${canonical}" in
2322 i[345]86-*-bsdi*) machine=intel386 ;;
2323 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 2324 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
2325 esac
2326 case "${canonical}" in
2327 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
2328 *-*-bsdi2.0* ) opsys=bsdos2 ;;
2329 *-*-bsdi2* ) opsys=bsdos2-1 ;;
2330 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 2331 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
2332 esac
2333 ;;
2334
2335 ## Alliant machines
2336 ## Strictly speaking, we need the version of the alliant operating
2337 ## system to choose the right machine file, but currently the
2338 ## configuration name doesn't tell us enough to choose the right
2339 ## one; we need to give alliants their own operating system name to
2340 ## do this right. When someone cares, they can help us.
2341 fx80-alliant-* )
2342 machine=alliant4 opsys=bsd4-2
2343 ;;
2344 i860-alliant-* )
2345 machine=alliant-2800 opsys=bsd4-3
2346 ;;
2347
2348 ## Alpha (DEC) machines.
2349 alpha*-dec-osf* )
2350 machine=alpha opsys=osf1
2351 # This is needed to find X11R6.1 libraries for certain tests.
2352 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
2353 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
2354 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
2355 # due to non-traditional preprocessing with the current compiler
2356 # defaults. OSF 4 can also have that compiler version, and there
2357 # seems always to have been a usable /usr/bin/cpp.
2358 NON_GNU_CPP=/usr/bin/cpp
ca512671 2359 case "${canonical}" in
a55b799a 2360 alpha*-dec-osf[5-9]*)
bb17930d 2361 opsys=osf5-0 ;;
ca512671 2362 esac
ba4481b5
DL
2363 ;;
2364
2365 alpha*-*-linux-gnu* )
2366 machine=alpha opsys=gnu-linux
2367 ;;
2368
c4bb2108
DL
2369 arm*-*-linux-gnu* )
2370 machine=arm opsys=gnu-linux
2371 ;;
2372
ba4481b5
DL
2373 ## Altos 3068
2374 m68*-altos-sysv* )
2375 machine=altos opsys=usg5-2
2376 ;;
2377
2378 ## Amdahl UTS
2379 580-amdahl-sysv* )
2380 machine=amdahl opsys=usg5-2-2
2381 ;;
2382
2383 ## Apollo, Domain/OS
2384 m68*-apollo-* )
2385 machine=apollo opsys=bsd4-3
2386 ;;
2387
040c474e
CY
2388 ## Apple Darwin / Mac OS X
2389 *-apple-darwin* )
2390 case "${canonical}" in
2391 i[3456]86-* ) machine=intel386 ;;
2392 powerpc-* ) machine=powermac ;;
2393 * ) unported=yes ;;
2394 esac
2395 opsys=darwin
2396 # Define CPP as follows to make autoconf work correctly.
2397 CPP="${CC-cc} -E -no-cpp-precomp"
2398 # Use fink packages if available.
2399 if test -d /sw/include && test -d /sw/lib; then
2400 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2401 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2402 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2403 fi
2404 ;;
2405
ba4481b5
DL
2406 ## AT&T 3b2, 3b5, 3b15, 3b20
2407 we32k-att-sysv* )
2408 machine=att3b opsys=usg5-2-2
2409 ;;
2410
2411 ## AT&T 3b1 - The Mighty Unix PC!
2412 m68*-att-sysv* )
2413 machine=7300 opsys=usg5-2-2
2414 ;;
2415
2416 ## Bull dpx20
2417 rs6000-bull-bosx* )
2418 machine=ibmrs6000 opsys=aix3-2
2419 ;;
2420
2421 ## Bull dpx2
2422 m68*-bull-sysv3* )
2423 machine=dpx2 opsys=usg5-3
2424 ;;
2425
2426 ## Bull sps7
2427 m68*-bull-sysv2* )
2428 machine=sps7 opsys=usg5-2
2429 ;;
2430
2431 ## CCI 5/32, 6/32 -- see "Tahoe".
2432
2433 ## Celerity
2434 ## I don't know what configuration name to use for this; config.sub
2435 ## doesn't seem to know anything about it. Hey, Celerity users, get
2436 ## in touch with us!
2437 celerity-celerity-bsd* )
2438 machine=celerity opsys=bsd4-2
2439 ;;
2440
2441 ## Clipper
2442 ## What operating systems does this chip run that Emacs has been
2443 ## tested on?
2444 clipper-* )
2445 machine=clipper
2446 ## We'll use the catch-all code at the bottom to guess the
2447 ## operating system.
2448 ;;
2449
df645f7c
AS
2450 ## Compaq Nonstop
2451 mips-compaq-nonstopux* )
2452 machine=nonstopux opsys=nonstopux
2453 ;;
2454
ba4481b5
DL
2455 ## Convex
2456 *-convex-bsd* | *-convex-convexos* )
2457 machine=convex opsys=bsd4-3
2458 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
2459 NON_GNU_CPP="cc -E -P"
2460 ;;
2461
2462 ## Cubix QBx/386
2463 i[3456]86-cubix-sysv* )
2464 machine=intel386 opsys=usg5-3
2465 ;;
2466
2467 ## Cydra 5
2468 cydra*-cydrome-sysv* )
2469 machine=cydra5 opsys=usg5-3
2470 ;;
2471
2472 ## Data General AViiON Machines
2473 ## DG changed naming conventions with the release of 5.4.4.10, they
2474 ## dropped the initial 5.4 but left the intervening R. Because of the
2475 ## R this shouldn't conflict with older versions of the OS (which I
2476 ## think were named like dgux4.*). In addition, DG new AViiONs series
2477 ## uses either Motorola M88k or Intel Pentium CPUs.
2478 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
2479 machine=aviion opsys=dgux4
2480 ;;
2481 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
2482 ## This name is dgux5-4-3 instead of dgux5-4r3
2483 ## to avoid a file name conflict on MSDOS.
2484 machine=aviion opsys=dgux5-4-3
2485 ;;
2486 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
2487 machine=aviion opsys=dgux5-4r2
2488 ;;
2489 m88k-dg-dgux* )
2490 machine=aviion opsys=dgux
2491 ;;
2492
2493 ## Data General AViiON Intel (x86) Machines
2494 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
2495 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
2496 i[345]86-dg-dguxR4* )
2497 machine=aviion-intel opsys=dgux4
2498 ;;
2499
2500 ## DECstations
2501 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
2502 machine=pmax opsys=bsd4-2
2503 ;;
2504 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
2505 machine=pmax opsys=bsd4-3
2506 ;;
2507 mips-dec-ultrix* )
2508 machine=pmax opsys=ultrix4-3
2509 ;;
2510 mips-dec-osf* )
2511 machine=pmax opsys=osf1
2512 ;;
2513 mips-dec-mach_bsd4.3* )
2514 machine=pmax opsys=mach-bsd4-3
2515 ;;
2516
cd890796
JD
2517 ## Motorola Delta machines
2518 m68k-motorola-sysv* | m68000-motorola-sysv* )
2519 machine=delta opsys=usg5-3
2520 if test -z "`type gnucc | grep 'not found'`"
2521 then
2522 if test -s /etc/167config
2523 then CC="gnucc -m68040"
2524 else CC="gnucc -m68881"
2525 fi
2526 else
2527 if test -z "`type gcc | grep 'not found'`"
2528 then CC=gcc
2529 else CC=cc
2530 fi
2531 fi
2532 ;;
ba4481b5
DL
2533 m88k-motorola-sysv4* )
2534 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
2535 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
2536 # I hope there are not other 4.0 versions for this machine
2537 # which really need usg5-4 instead.
2538 machine=delta88k opsys=usg5-4-2
2539 ;;
2540 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
2541 machine=delta88k opsys=usg5-3
2542 ;;
2543
2544 ## Dual machines
2545 m68*-dual-sysv* )
2546 machine=dual opsys=usg5-2
2547 ;;
2548 m68*-dual-uniplus* )
2549 machine=dual opsys=unipl5-2
2550 ;;
2551
2552 ## Elxsi 6400
2553 elxsi-elxsi-sysv* )
2554 machine=elxsi opsys=usg5-2
2555 ;;
2556
2557 ## Encore machines
2558 ns16k-encore-bsd* )
2559 machine=ns16000 opsys=umax
2560 ;;
2561
65171e3a
DL
2562 ## The GEC 63 - apparently, this port isn't really finished yet.
2563 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
2564
2565 ## Gould Power Node and NP1
2566 pn-gould-bsd4.2* )
2567 machine=gould opsys=bsd4-2
2568 ;;
2569 pn-gould-bsd4.3* )
2570 machine=gould opsys=bsd4-3
2571 ;;
2572 np1-gould-bsd* )
2573 machine=gould-np1 opsys=bsd4-3
2574 ;;
2575
2576 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2577 ## as far as Emacs is concerned).
2578 m88k-harris-cxux* )
2579 # Build needs to be different on 7.0 and later releases
2580 case "`uname -r`" in
2581 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2582 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2583 esac
2584 NON_GNU_CPP="/lib/cpp"
2585 ;;
2586 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2587 m68k-harris-cxux* )
2588 machine=nh3000 opsys=cxux
2589 ;;
2590 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2591 powerpc-harris-powerunix )
2592 machine=nh6000 opsys=powerunix
2593 NON_GNU_CPP="cc -Xo -E -P"
2594 ;;
6fbb6db1
GM
2595 ## SR2001/SR2201 running HI-UX/MPP
2596 hppa1.1-hitachi-hiuxmpp* )
2597 machine=sr2k opsys=hiuxmpp
2598 ;;
2599 hppa1.1-hitachi-hiuxwe2* )
2600 machine=sr2k opsys=hiuxwe2
2601 ;;
ba4481b5
DL
2602 ## Honeywell XPS100
2603 xps*-honeywell-sysv* )
2604 machine=xps100 opsys=usg5-2
2605 ;;
2606
2607 ## HP 9000 series 200 or 300
2608 m68*-hp-bsd* )
2609 machine=hp9000s300 opsys=bsd4-3
2610 ;;
2611 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2612 m68*-hp-hpux* )
2613 case "`uname -r`" in
2614 ## Someone's system reports A.B8.05 for this.
2615 ## I wonder what other possibilities there are.
2616 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2617 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2618 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2619 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2620 *) machine=hp9000s300 opsys=hpux ;;
2621 esac
2622 ;;
2623
6fbb6db1
GM
2624 ## HP 9000 series 700 and 800, running HP/UX
2625 hppa*-hp-hpux7* )
2626 machine=hp800 opsys=hpux
2627 ;;
2628 hppa*-hp-hpux8* )
2629 machine=hp800 opsys=hpux8
2630 ;;
2631 hppa*-hp-hpux9shr* )
2632 machine=hp800 opsys=hpux9shr
2633 ;;
2634 hppa*-hp-hpux9* )
2635 machine=hp800 opsys=hpux9
2636 ;;
2637 hppa*-hp-hpux10.2* )
2638 machine=hp800 opsys=hpux10-20
2639 ;;
2640 hppa*-hp-hpux10* )
2641 machine=hp800 opsys=hpux10
2642 ;;
2643 hppa*-hp-hpux1[1-9]* )
2644 machine=hp800 opsys=hpux11
2645 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2646 ;;
2647
13aadc96
CY
2648 hppa*-*-linux-gnu* )
2649 machine=hp800 opsys=gnu-linux
2650 ;;
2651
6fbb6db1
GM
2652 ## HP 9000 series 700 and 800, running HP/UX
2653 hppa*-hp-hpux* )
2654 ## Cross-compilation? Nah!
2655 case "`uname -r`" in
2656 ## Someone's system reports A.B8.05 for this.
2657 ## I wonder what other possibilities there are.
2658 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2659 *.08.* ) machine=hp800 opsys=hpux8 ;;
2660 *.09.* ) machine=hp800 opsys=hpux9 ;;
2661 *) machine=hp800 opsys=hpux10 ;;
2662 esac
2663 ;;
13aadc96
CY
2664 hppa*-*-nextstep* )
2665 machine=hp800 opsys=nextstep
2666 ;;
2667
ba4481b5
DL
2668 ## Orion machines
2669 orion-orion-bsd* )
2670 machine=orion opsys=bsd4-2
2671 ;;
2672 clipper-orion-bsd* )
2673 machine=orion105 opsys=bsd4-2
2674 ;;
2675
2676 ## IBM machines
2677 i[3456]86-ibm-aix1.1* )
2678 machine=ibmps2-aix opsys=usg5-2-2
2679 ;;
2680 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2681 machine=ibmps2-aix opsys=usg5-3
2682 ;;
2683 i370-ibm-aix*)
2684 machine=ibm370aix opsys=usg5-3
2685 ;;
55597d70 2686 s390-*-linux-gnu* )
138f0859
GM
2687 machine=ibms390 opsys=gnu-linux
2688 ;;
bcdb1378
EZ
2689 s390x-*-linux-gnu* )
2690 machine=ibms390x opsys=gnu-linux
2691 ;;
ba4481b5
DL
2692 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2693 machine=ibmrs6000 opsys=aix3-1
2694 ;;
2695 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2696 machine=ibmrs6000 opsys=aix3-2-5
2697 ;;
2698 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2699 machine=ibmrs6000 opsys=aix4-1
2700 ;;
2701 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2702 machine=ibmrs6000 opsys=aix4-2
2703 ;;
67bf991b
CY
2704 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2705 machine=ibmrs6000 opsys=aix4-2
2706 ;;
55597d70 2707 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2708 machine=ibmrs6000 opsys=aix4-2
2709 ;;
ba4481b5
DL
2710 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2711 machine=ibmrs6000 opsys=aix4
2712 ;;
2713 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2714 machine=ibmrs6000 opsys=aix4-1
2715 ;;
2716 rs6000-ibm-aix* | powerpc-ibm-aix* )
2717 machine=ibmrs6000 opsys=aix3-2
2718 ;;
2719 romp-ibm-bsd4.3* )
2720 machine=ibmrt opsys=bsd4-3
2721 ;;
2722 romp-ibm-bsd4.2* )
2723 machine=ibmrt opsys=bsd4-2
2724 ;;
2725 romp-ibm-aos4.3* )
2726 machine=ibmrt opsys=bsd4-3
2727 ;;
2728 romp-ibm-aos4.2* )
2729 machine=ibmrt opsys=bsd4-2
2730 ;;
2731 romp-ibm-aos* )
2732 machine=ibmrt opsys=bsd4-3
2733 ;;
2734 romp-ibm-bsd* )
2735 machine=ibmrt opsys=bsd4-3
2736 ;;
2737 romp-ibm-aix* )
2738 machine=ibmrt-aix opsys=usg5-2-2
2739 ;;
2740
2741 ## Integrated Solutions `Optimum V'
2742 m68*-isi-bsd4.2* )
2743 machine=isi-ov opsys=bsd4-2
2744 ;;
2745 m68*-isi-bsd4.3* )
2746 machine=isi-ov opsys=bsd4-3
2747 ;;
2748
2749 ## Intel 386 machines where we do care about the manufacturer
2750 i[3456]86-intsys-sysv* )
2751 machine=is386 opsys=usg5-2-2
2752 ;;
2753
2754 ## Prime EXL
2755 i[3456]86-prime-sysv* )
2756 machine=i386 opsys=usg5-3
2757 ;;
2758
2759 ## Sequent Symmetry running Dynix
2760 i[3456]86-sequent-bsd* )
2761 machine=symmetry opsys=bsd4-3
2762 ;;
2763
2764 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2765 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2766 machine=sequent-ptx opsys=ptx4
2767 NON_GNU_CPP=/lib/cpp
2768 ;;
2769
2770 ## Sequent Symmetry running DYNIX/ptx
2771 ## Use the old cpp rather than the newer ANSI one.
2772 i[3456]86-sequent-ptx* )
2773 machine=sequent-ptx opsys=ptx
2774 NON_GNU_CPP="/lib/cpp"
2775 ;;
2776
2777 ## ncr machine running svr4.3.
2778 i[3456]86-ncr-sysv4.3 )
2779 machine=ncr386 opsys=usg5-4-3
2780 ;;
2781
2782 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2783 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2784 i[3456]86-ncr-sysv* )
2785 machine=ncr386 opsys=usg5-4-2
2786 ;;
2787
2788 ## Intel Paragon OSF/1
2789 i860-intel-osf1* )
2790 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2791 ;;
2792
2793 ## Intel 860
2794 i860-*-sysv4* )
2795 machine=i860 opsys=usg5-4
2796 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2797 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2798 ;;
2799
c76e04a8
GM
2800 ## Macintosh PowerPC
2801 powerpc*-*-linux-gnu* )
2802 machine=macppc opsys=gnu-linux
2803 ;;
2804
ba4481b5
DL
2805 ## Masscomp machines
2806 m68*-masscomp-rtu* )
2807 machine=masscomp opsys=rtu
2808 ;;
2809
2810 ## Megatest machines
2811 m68*-megatest-bsd* )
2812 machine=mega68 opsys=bsd4-2
2813 ;;
2814
2815 ## Workstations sold by MIPS
2816 ## This is not necessarily all workstations using the MIPS processor -
2817 ## Irises are produced by SGI, and DECstations by DEC.
2818
2819 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2820 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2821 ## it gives for choosing between the alternatives seems to be "Use
2822 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2823 ## the BSD world." I'll assume that these are instructions for
2824 ## handling two odd situations, and that every other situation
2825 ## should use mips.h and usg5-2-2, they being listed first.
2826 mips-mips-usg* )
2827 machine=mips4
2828 ## Fall through to the general code at the bottom to decide on the OS.
2829 ;;
2830 mips-mips-riscos4* )
2831 machine=mips4 opsys=bsd4-3
2832 NON_GNU_CC="cc -systype bsd43"
2833 NON_GNU_CPP="cc -systype bsd43 -E"
2834 ;;
2835 mips-mips-riscos5* )
2836 machine=mips4 opsys=riscos5
2837 NON_GNU_CC="cc -systype bsd43"
2838 NON_GNU_CPP="cc -systype bsd43 -E"
2839 ;;
2840 mips-mips-bsd* )
2841 machine=mips opsys=bsd4-3
2842 ;;
2843 mips-mips-* )
2844 machine=mips opsys=usg5-2-2
2845 ;;
2846
2847 ## NeXT
2848 m68*-next-* | m68k-*-nextstep* )
2849 machine=m68k opsys=nextstep
2850 ;;
2851
2852 ## The complete machine from National Semiconductor
2853 ns32k-ns-genix* )
2854 machine=ns32000 opsys=usg5-2
2855 ;;
2856
2857 ## NCR machines
2858 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2859 machine=tower32 opsys=usg5-2-2
2860 ;;
2861 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2862 machine=tower32v3 opsys=usg5-3
2863 ;;
2864
2865 ## NEC EWS4800
2866 mips-nec-sysv4*)
2867 machine=ews4800 opsys=ux4800
2868 ;;
2869
2870 ## Nixdorf Targon 31
2871 m68*-nixdorf-sysv* )
2872 machine=targon31 opsys=usg5-2-2
2873 ;;
2874
2875 ## Nu (TI or LMI)
2876 m68*-nu-sysv* )
2877 machine=nu opsys=usg5-2
2878 ;;
2879
2880 ## Plexus
2881 m68*-plexus-sysv* )
2882 machine=plexus opsys=usg5-2
2883 ;;
2884
ba4481b5
DL
2885 ## Pyramid machines
2886 ## I don't really have any idea what sort of processor the Pyramid has,
2887 ## so I'm assuming it is its own architecture.
2888 pyramid-pyramid-bsd* )
2889 machine=pyramid opsys=bsd4-2
2890 ;;
2891
2892 ## Sequent Balance
2893 ns32k-sequent-bsd4.2* )
2894 machine=sequent opsys=bsd4-2
2895 ;;
2896 ns32k-sequent-bsd4.3* )
2897 machine=sequent opsys=bsd4-3
2898 ;;
2899
2900 ## Siemens Nixdorf
2901 mips-siemens-sysv* | mips-sni-sysv*)
2902 machine=mips-siemens opsys=usg5-4
2903 NON_GNU_CC=/usr/ccs/bin/cc
2904 NON_GNU_CPP=/usr/ccs/lib/cpp
2905 ;;
2906
2907 ## Silicon Graphics machines
2908 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2909 m68*-sgi-iris3.5* )
2910 machine=irist opsys=iris3-5
2911 ;;
2912 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2913 machine=irist opsys=iris3-6
2914 ;;
2915 ## Iris 4D
2916 mips-sgi-irix3* )
2917 machine=iris4d opsys=irix3-3
2918 ;;
2919 mips-sgi-irix4* )
2920 machine=iris4d opsys=irix4-0
2921 ;;
2922 mips-sgi-irix6.5 )
2923 machine=iris4d opsys=irix6-5
946173ad
DL
2924 # Without defining _LANGUAGE_C, things get masked out in the headers
2925 # so that, for instance, grepping for `free' in stdlib.h fails and
2926 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2927 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2928 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2929 ;;
2930 mips-sgi-irix6* )
2931 machine=iris4d opsys=irix6-0
c4bb2108 2932 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2933 # but presumably it does no harm.
2934 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2935 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2936 NON_GCC_TEST_OPTIONS=-32
2937 ;;
2938 mips-sgi-irix5.[01]* )
2939 machine=iris4d opsys=irix5-0
2940 ;;
2941 mips-sgi-irix5* | mips-sgi-irix* )
2942 machine=iris4d opsys=irix5-2
2943 ;;
2944
2945 ## SONY machines
2946 m68*-sony-bsd4.2* )
2947 machine=news opsys=bsd4-2
2948 ;;
2949 m68*-sony-bsd4.3* )
2950 machine=news opsys=bsd4-3
2951 ;;
2952 m68*-sony-newsos3* | m68*-sony-news3*)
2953 machine=news opsys=bsd4-3
2954 ;;
2955 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2956 machine=news-risc opsys=bsd4-3
2957 ;;
2958 mips-sony-newsos6* )
2959 machine=news-r6 opsys=newsos6
2960 ;;
2961 mips-sony-news* )
2962 machine=news-risc opsys=newsos5
2963 ;;
2964
2965 ## Stride
2966 m68*-stride-sysv* )
2967 machine=stride opsys=usg5-2
2968 ;;
2969
2970 ## Suns
2971 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2972 machine=sparc opsys=gnu-linux
2973 ;;
2974
d054101f 2975 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2976 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2977 | rs6000-*-solaris2*)
2978 case "${canonical}" in
2979 m68*-sunos1* ) machine=sun1 ;;
2980 m68*-sunos2* ) machine=sun2 ;;
2981 m68* ) machine=sun3 ;;
2982 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2983 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2984 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2985 powerpcle* ) machine=powerpcle ;;
2986 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2987 sparc* ) machine=sparc ;;
2988 * ) unported=yes ;;
2989 esac
2990 case "${canonical}" in
2991 ## The Sun386 didn't get past 4.0.
2992 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2993 *-sunos4.0* ) opsys=sunos4-0 ;;
2994 *-sunos4.1.[3-9]*noshare )
2995 ## This name is sunos413 instead of sunos4-1-3
2996 ## to avoid a file name conflict on MSDOS.
2997 opsys=sunos413
2998 NON_GNU_CPP=/usr/lib/cpp
2999 NON_GCC_TEST_OPTIONS=-Bstatic
3000 GCC_TEST_OPTIONS=-static
3001 ;;
3002 *-sunos4.1.[3-9]* | *-sunos4shr*)
3003 opsys=sunos4shr
3004 NON_GNU_CPP=/usr/lib/cpp
3005 ;;
3006 *-sunos4* | *-sunos )
3007 opsys=sunos4-1
3008 NON_GCC_TEST_OPTIONS=-Bstatic
3009 GCC_TEST_OPTIONS=-static
3010 ;;
3011 *-sunos5.3* | *-solaris2.3* )
3012 opsys=sol2-3
3013 NON_GNU_CPP=/usr/ccs/lib/cpp
3014 ;;
3015 *-sunos5.4* | *-solaris2.4* )
3016 opsys=sol2-4
3017 NON_GNU_CPP=/usr/ccs/lib/cpp
3018 RANLIB="ar -ts"
3019 ;;
3020 *-sunos5.5* | *-solaris2.5* )
3021 opsys=sol2-5
3022 NON_GNU_CPP=/usr/ccs/lib/cpp
3023 RANLIB="ar -ts"
3024 ;;
8e967cf7
MR
3025 *-sunos5.6* | *-solaris2.6* )
3026 opsys=sol2-6
3027 NON_GNU_CPP=/usr/ccs/lib/cpp
3028 RANLIB="ar -ts"
3029 ;;
ba4481b5 3030 *-sunos5* | *-solaris* )
9e71690e 3031 opsys=sol2-6
089a966d
GM
3032 emacs_check_sunpro_c=yes
3033 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5
DL
3034 ;;
3035 * ) opsys=bsd4-2 ;;
3036 esac
3037 ## Watch out for a compiler that we know will not work.
3038 case "${canonical}" in
3039 *-solaris* | *-sunos5* )
3040 if [ "x$CC" = x/usr/ucb/cc ]; then
3041 ## /usr/ucb/cc doesn't work;
3042 ## we should find some other compiler that does work.
3043 unset CC
3044 fi
3045 ;;
3046 *) ;;
3047 esac
3048 ;;
3049 sparc-*-nextstep* )
3050 machine=sparc opsys=nextstep
3051 ;;
3052
3053 ## Tadpole 68k
3054 m68*-tadpole-sysv* )
3055 machine=tad68k opsys=usg5-3
3056 ;;
3057
3058 ## Tahoe machines
3059 tahoe-tahoe-bsd4.2* )
3060 machine=tahoe opsys=bsd4-2
3061 ;;
3062 tahoe-tahoe-bsd4.3* )
3063 machine=tahoe opsys=bsd4-3
3064 ;;
3065
3066 ## Tandem Integrity S2
3067 mips-tandem-sysv* )
3068 machine=tandem-s2 opsys=usg5-3
3069 ;;
3070
3071 ## Tektronix XD88
3072 m88k-tektronix-sysv3* )
3073 machine=tekxd88 opsys=usg5-3
3074 ;;
3075
3076 ## Tektronix 16000 box (6130?)
3077 ns16k-tektronix-bsd* )
3078 machine=ns16000 opsys=bsd4-2
3079 ;;
3080 ## Tektronix 4300
3081 ## src/m/tek4300.h hints that this is a m68k machine.
3082 m68*-tektronix-bsd* )
3083 machine=tek4300 opsys=bsd4-3
3084 ;;
3085
3086 ## Titan P2 or P3
3087 ## We seem to have lost the machine-description file titan.h!
3088 titan-titan-sysv* )
3089 machine=titan opsys=usg5-3
3090 ;;
3091
3092 ## Ustation E30 (SS5E)
3093 m68*-unisys-uniplus* )
3094 machine=ustation opsystem=unipl5-2
3095 ;;
3096
3097 ## Vaxen.
3098 vax-dec-* )
3099 machine=vax
3100 case "${canonical}" in
3101 *-bsd4.1* ) opsys=bsd4-1 ;;
3102 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
3103 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
3104 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
3105 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
3106 *-vms* ) opsys=vms ;;
3107 * ) unported=yes
3108 esac
3109 ;;
3110
3111 ## Whitechapel MG1
3112 ns16k-whitechapel-* )
3113 machine=mg1
3114 ## We don't know what sort of OS runs on these; we'll let the
3115 ## operating system guessing code below try.
3116 ;;
3117
3118 ## Wicat
3119 m68*-wicat-sysv* )
3120 machine=wicat opsys=usg5-2
3121 ;;
3122
f4988be7
GM
3123 ## IA-64
3124 ia64*-*-linux* )
3125 machine=ia64 opsys=gnu-linux
3126 ;;
3127
ba4481b5
DL
3128 ## Intel 386 machines where we don't care about the manufacturer
3129 i[3456]86-*-* )
3130 machine=intel386
3131 case "${canonical}" in
c60ee5e7 3132 *-cygwin ) opsys=cygwin ;;
eae54018 3133 *-darwin* ) opsys=darwin
23fd4483
ST
3134 CPP="${CC-cc} -E -no-cpp-precomp"
3135 ;;
ba4481b5
DL
3136 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
3137 *-isc2.2* ) opsys=isc2-2 ;;
3138 *-isc4.0* ) opsys=isc4-0 ;;
3139 *-isc4.* ) opsys=isc4-1
3140 GCC_TEST_OPTIONS=-posix
3141 NON_GCC_TEST_OPTIONS=-Xp
3142 ;;
3143 *-isc* ) opsys=isc3-0 ;;
3144 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
3145 *-esix* ) opsys=esix ;;
3146 *-xenix* ) opsys=xenix ;;
3147 *-linux-gnu* ) opsys=gnu-linux ;;
3148 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 3149 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
3150 NON_GNU_CPP=/lib/cpp
3151 # Prevent -belf from being passed to $CPP.
3152 # /lib/cpp does not accept it.
3153 OVERRIDE_CPPFLAGS=" "
3154 ;;
3155 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
3156 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3157 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 3158 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
3159 *-nextstep* ) opsys=nextstep ;;
3160 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3161 esac
3162 ;;
3163
3164 ## m68k Linux-based GNU system
3165 m68k-*-linux-gnu* )
3166 machine=m68k opsys=gnu-linux
3167 ;;
3168
3169 ## Mips Linux-based GNU system
cd958eb3 3170 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
3171 machine=mips opsys=gnu-linux
3172 ;;
3173
3174 ## UXP/DS
3175 sparc-fujitsu-sysv4* )
3176 machine=sparc opsys=uxpds
3177 NON_GNU_CPP=/usr/ccs/lib/cpp
3178 RANLIB="ar -ts"
3179 ;;
3180
3181 ## UXP/V
3182 f301-fujitsu-uxpv4.1)
3183 machine=f301 opsys=uxpv
3184 ;;
3185
598a2813
AS
3186 ## AMD x86-64 Linux-based GNU system
3187 x86_64-*-linux-gnu* )
24b01ec4 3188 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
3189 ;;
3190
94218e27
DN
3191 ## Tensilica Xtensa Linux-based GNU system
3192 xtensa-*-linux-gnu* )
3193 machine=xtensa opsys=gnu-linux
3194 ;;
3195
ba4481b5
DL
3196 * )
3197 unported=yes
3198 ;;
3199esac
3200
3201### If the code above didn't choose an operating system, just choose
3202### an operating system based on the configuration name. You really
3203### only want to use this when you have no idea what the right
3204### operating system is; if you know what operating systems a machine
3205### runs, it's cleaner to make it explicit in the case statement
3206### above.
3207if test x"${opsys}" = x; then
3208 case "${canonical}" in
3209 *-gnu* ) opsys=gnu ;;
3210 *-bsd4.[01] ) opsys=bsd4-1 ;;
3211 *-bsd4.2 ) opsys=bsd4-2 ;;
3212 *-bsd4.3 ) opsys=bsd4-3 ;;
3213 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
3214 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
3215 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
3216 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
3217 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
3218 *-sysv5uw* ) opsys=unixware ;;
3219 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
3220 *-sysv4.1* | *-sysvr4.1* )
3221 NON_GNU_CPP=/usr/lib/cpp
3222 opsys=usg5-4 ;;
3223 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
3224 if [ x$NON_GNU_CPP = x ]; then
3225 if [ -f /usr/ccs/lib/cpp ]; then
3226 NON_GNU_CPP=/usr/ccs/lib/cpp
3227 else
3228 NON_GNU_CPP=/lib/cpp
3229 fi
3230 fi
3231 opsys=usg5-4-2 ;;
3232 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
3233 * )
3234 unported=yes
3235 ;;
3236 esac
3237fi
3238
c0d27fcc 3239
22044edf 3240
ba4481b5 3241if test $unported = yes; then
c0d27fcc 3242 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
3243Check \`etc/MACHINES' for recognized configuration names." >&5
3244echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
3245Check \`etc/MACHINES' for recognized configuration names." >&2;}
3246 { (exit 1); exit 1; }; }
ba4481b5
DL
3247fi
3248
3249machfile="m/${machine}.h"
3250opsysfile="s/${opsys}.h"
3251
c0d27fcc 3252
ba4481b5
DL
3253#### Choose a compiler.
3254test -n "$CC" && cc_specified=yes
3255
3256# Save the value of CFLAGS that the user specified.
3257SPECIFIED_CFLAGS="$CFLAGS"
3258
3259case ${with_gcc} in
3260 "yes" ) CC="gcc" GCC=yes ;;
3261 "no" ) : ${CC=cc} ;;
503d2be0
AS
3262 * )
3263esac
3264ac_ext=c
3265ac_cpp='$CPP $CPPFLAGS'
3266ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3267ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3268ac_compiler_gnu=$ac_cv_c_compiler_gnu
3269if test -n "$ac_tool_prefix"; then
3270 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3271set dummy ${ac_tool_prefix}gcc; ac_word=$2
d6e01aa5
KL
3272{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3273echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3274if test "${ac_cv_prog_CC+set}" = set; then
3275 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3276else
3277 if test -n "$CC"; then
3278 ac_cv_prog_CC="$CC" # Let the user override the test.
3279else
c0d27fcc
MR
3280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3281for as_dir in $PATH
3282do
3283 IFS=$as_save_IFS
3284 test -z "$as_dir" && as_dir=.
3285 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3286 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3287 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3288 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3289 break 2
3290 fi
3291done
503d2be0 3292done
d6e01aa5 3293IFS=$as_save_IFS
503d2be0 3294
ba4481b5
DL
3295fi
3296fi
503d2be0 3297CC=$ac_cv_prog_CC
ba4481b5 3298if test -n "$CC"; then
d6e01aa5
KL
3299 { echo "$as_me:$LINENO: result: $CC" >&5
3300echo "${ECHO_T}$CC" >&6; }
503d2be0 3301else
d6e01aa5
KL
3302 { echo "$as_me:$LINENO: result: no" >&5
3303echo "${ECHO_T}no" >&6; }
503d2be0
AS
3304fi
3305
d6e01aa5 3306
503d2be0
AS
3307fi
3308if test -z "$ac_cv_prog_CC"; then
3309 ac_ct_CC=$CC
3310 # Extract the first word of "gcc", so it can be a program name with args.
3311set dummy gcc; ac_word=$2
d6e01aa5
KL
3312{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3313echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3314if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3315 echo $ECHO_N "(cached) $ECHO_C" >&6
3316else
3317 if test -n "$ac_ct_CC"; then
3318 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3319else
c0d27fcc
MR
3320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3321for as_dir in $PATH
3322do
3323 IFS=$as_save_IFS
3324 test -z "$as_dir" && as_dir=.
3325 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3326 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3327 ac_cv_prog_ac_ct_CC="gcc"
3328 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3329 break 2
3330 fi
3331done
503d2be0 3332done
d6e01aa5 3333IFS=$as_save_IFS
503d2be0
AS
3334
3335fi
3336fi
3337ac_ct_CC=$ac_cv_prog_ac_ct_CC
3338if test -n "$ac_ct_CC"; then
d6e01aa5
KL
3339 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3340echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 3341else
d6e01aa5
KL
3342 { echo "$as_me:$LINENO: result: no" >&5
3343echo "${ECHO_T}no" >&6; }
503d2be0
AS
3344fi
3345
d6e01aa5
KL
3346 if test "x$ac_ct_CC" = x; then
3347 CC=""
3348 else
3349 case $cross_compiling:$ac_tool_warned in
3350yes:)
3351{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3352whose name does not start with the host triplet. If you think this
3353configuration is useful to you, please write to autoconf@gnu.org." >&5
3354echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3355whose name does not start with the host triplet. If you think this
3356configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3357ac_tool_warned=yes ;;
3358esac
3359 CC=$ac_ct_CC
3360 fi
503d2be0
AS
3361else
3362 CC="$ac_cv_prog_CC"
ba4481b5
DL
3363fi
3364
3365if test -z "$CC"; then
d6e01aa5
KL
3366 if test -n "$ac_tool_prefix"; then
3367 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 3368set dummy ${ac_tool_prefix}cc; ac_word=$2
d6e01aa5
KL
3369{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3370echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3371if test "${ac_cv_prog_CC+set}" = set; then
3372 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3373else
3374 if test -n "$CC"; then
3375 ac_cv_prog_CC="$CC" # Let the user override the test.
3376else
c0d27fcc
MR
3377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3378for as_dir in $PATH
3379do
3380 IFS=$as_save_IFS
3381 test -z "$as_dir" && as_dir=.
3382 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3383 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3384 ac_cv_prog_CC="${ac_tool_prefix}cc"
3385 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3386 break 2
3387 fi
3388done
503d2be0 3389done
d6e01aa5 3390IFS=$as_save_IFS
503d2be0
AS
3391
3392fi
3393fi
3394CC=$ac_cv_prog_CC
3395if test -n "$CC"; then
d6e01aa5
KL
3396 { echo "$as_me:$LINENO: result: $CC" >&5
3397echo "${ECHO_T}$CC" >&6; }
503d2be0 3398else
d6e01aa5
KL
3399 { echo "$as_me:$LINENO: result: no" >&5
3400echo "${ECHO_T}no" >&6; }
503d2be0
AS
3401fi
3402
503d2be0 3403
d6e01aa5 3404 fi
503d2be0
AS
3405fi
3406if test -z "$CC"; then
3407 # Extract the first word of "cc", so it can be a program name with args.
3408set dummy cc; ac_word=$2
d6e01aa5
KL
3409{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3410echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3411if test "${ac_cv_prog_CC+set}" = set; then
3412 echo $ECHO_N "(cached) $ECHO_C" >&6
3413else
3414 if test -n "$CC"; then
3415 ac_cv_prog_CC="$CC" # Let the user override the test.
3416else
3417 ac_prog_rejected=no
c0d27fcc
MR
3418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3419for as_dir in $PATH
3420do
3421 IFS=$as_save_IFS
3422 test -z "$as_dir" && as_dir=.
3423 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3424 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3425 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3426 ac_prog_rejected=yes
3427 continue
3428 fi
3429 ac_cv_prog_CC="cc"
3430 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3431 break 2
3432 fi
3433done
503d2be0 3434done
d6e01aa5 3435IFS=$as_save_IFS
503d2be0 3436
ba4481b5
DL
3437if test $ac_prog_rejected = yes; then
3438 # We found a bogon in the path, so make sure we never use it.
3439 set dummy $ac_cv_prog_CC
3440 shift
503d2be0 3441 if test $# != 0; then
ba4481b5
DL
3442 # We chose a different compiler from the bogus one.
3443 # However, it has the same basename, so the bogon will be chosen
3444 # first if we set CC to just the basename; use the full file name.
3445 shift
6bae0ccf 3446 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
3447 fi
3448fi
3449fi
3450fi
503d2be0 3451CC=$ac_cv_prog_CC
ba4481b5 3452if test -n "$CC"; then
d6e01aa5
KL
3453 { echo "$as_me:$LINENO: result: $CC" >&5
3454echo "${ECHO_T}$CC" >&6; }
ba4481b5 3455else
d6e01aa5
KL
3456 { echo "$as_me:$LINENO: result: no" >&5
3457echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3458fi
3459
d6e01aa5 3460
503d2be0
AS
3461fi
3462if test -z "$CC"; then
3463 if test -n "$ac_tool_prefix"; then
d6e01aa5 3464 for ac_prog in cl.exe
503d2be0
AS
3465 do
3466 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3467set dummy $ac_tool_prefix$ac_prog; ac_word=$2
d6e01aa5
KL
3468{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3469echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3470if test "${ac_cv_prog_CC+set}" = set; then
3471 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
3472else
3473 if test -n "$CC"; then
3474 ac_cv_prog_CC="$CC" # Let the user override the test.
3475else
c0d27fcc
MR
3476as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3477for as_dir in $PATH
3478do
3479 IFS=$as_save_IFS
3480 test -z "$as_dir" && as_dir=.
3481 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3482 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3483 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3484 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3485 break 2
3486 fi
3487done
503d2be0 3488done
d6e01aa5 3489IFS=$as_save_IFS
503d2be0 3490
c4bb2108
DL
3491fi
3492fi
503d2be0 3493CC=$ac_cv_prog_CC
c4bb2108 3494if test -n "$CC"; then
d6e01aa5
KL
3495 { echo "$as_me:$LINENO: result: $CC" >&5
3496echo "${ECHO_T}$CC" >&6; }
c4bb2108 3497else
d6e01aa5
KL
3498 { echo "$as_me:$LINENO: result: no" >&5
3499echo "${ECHO_T}no" >&6; }
503d2be0
AS
3500fi
3501
d6e01aa5 3502
503d2be0
AS
3503 test -n "$CC" && break
3504 done
3505fi
3506if test -z "$CC"; then
3507 ac_ct_CC=$CC
d6e01aa5 3508 for ac_prog in cl.exe
503d2be0
AS
3509do
3510 # Extract the first word of "$ac_prog", so it can be a program name with args.
3511set dummy $ac_prog; ac_word=$2
d6e01aa5
KL
3512{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3513echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3514if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3515 echo $ECHO_N "(cached) $ECHO_C" >&6
3516else
3517 if test -n "$ac_ct_CC"; then
3518 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3519else
c0d27fcc
MR
3520as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3521for as_dir in $PATH
3522do
3523 IFS=$as_save_IFS
3524 test -z "$as_dir" && as_dir=.
3525 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 3526 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3527 ac_cv_prog_ac_ct_CC="$ac_prog"
3528 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3529 break 2
3530 fi
3531done
503d2be0 3532done
d6e01aa5 3533IFS=$as_save_IFS
503d2be0 3534
c4bb2108 3535fi
503d2be0
AS
3536fi
3537ac_ct_CC=$ac_cv_prog_ac_ct_CC
3538if test -n "$ac_ct_CC"; then
d6e01aa5
KL
3539 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3540echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 3541else
d6e01aa5
KL
3542 { echo "$as_me:$LINENO: result: no" >&5
3543echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3544fi
3545
d6e01aa5 3546
503d2be0
AS
3547 test -n "$ac_ct_CC" && break
3548done
ba4481b5 3549
d6e01aa5
KL
3550 if test "x$ac_ct_CC" = x; then
3551 CC=""
3552 else
3553 case $cross_compiling:$ac_tool_warned in
3554yes:)
3555{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3556whose name does not start with the host triplet. If you think this
3557configuration is useful to you, please write to autoconf@gnu.org." >&5
3558echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3559whose name does not start with the host triplet. If you think this
3560configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3561ac_tool_warned=yes ;;
3562esac
3563 CC=$ac_ct_CC
3564 fi
503d2be0
AS
3565fi
3566
3567fi
ba4481b5 3568
c0d27fcc 3569
19650fd6
AS
3570test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3571See \`config.log' for more details." >&5
3572echo "$as_me: error: no acceptable C compiler found in \$PATH
3573See \`config.log' for more details." >&2;}
503d2be0 3574 { (exit 1); exit 1; }; }
c4bb2108 3575
503d2be0 3576# Provide some information about the compiler.
d6e01aa5 3577echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3578ac_compiler=`set X $ac_compile; echo $2`
d6e01aa5
KL
3579{ (ac_try="$ac_compiler --version >&5"
3580case "(($ac_try" in
3581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3582 *) ac_try_echo=$ac_try;;
3583esac
3584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3585 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3586 ac_status=$?
c0d27fcc 3587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3588 (exit $ac_status); }
d6e01aa5
KL
3589{ (ac_try="$ac_compiler -v >&5"
3590case "(($ac_try" in
3591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3592 *) ac_try_echo=$ac_try;;
3593esac
3594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3595 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3596 ac_status=$?
c0d27fcc 3597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3598 (exit $ac_status); }
d6e01aa5
KL
3599{ (ac_try="$ac_compiler -V >&5"
3600case "(($ac_try" in
3601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3602 *) ac_try_echo=$ac_try;;
3603esac
3604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3605 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3606 ac_status=$?
c0d27fcc 3607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3608 (exit $ac_status); }
3609
3610cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3611/* confdefs.h. */
3612_ACEOF
3613cat confdefs.h >>conftest.$ac_ext
3614cat >>conftest.$ac_ext <<_ACEOF
3615/* end confdefs.h. */
c4bb2108 3616
503d2be0
AS
3617int
3618main ()
3619{
3620
3621 ;
3622 return 0;
3623}
3624_ACEOF
3625ac_clean_files_save=$ac_clean_files
19650fd6 3626ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3627# Try to create an executable without -o first, disregard a.out.
3628# It will help us diagnose broken compilers, and finding out an intuition
3629# of exeext.
d6e01aa5
KL
3630{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3631echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3632ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
d6e01aa5
KL
3633#
3634# List of possible output files, starting from the most likely.
3635# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3636# only as a last resort. b.out is created by i960 compilers.
3637ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3638#
3639# The IRIX 6 linker writes into existing files which may not be
3640# executable, retaining their permissions. Remove them first so a
3641# subsequent execution test works.
3642ac_rmfiles=
3643for ac_file in $ac_files
3644do
3645 case $ac_file in
3646 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3647 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3648 esac
3649done
3650rm -f $ac_rmfiles
3651
3652if { (ac_try="$ac_link_default"
3653case "(($ac_try" in
3654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3655 *) ac_try_echo=$ac_try;;
3656esac
3657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3658 (eval "$ac_link_default") 2>&5
503d2be0 3659 ac_status=$?
c0d27fcc 3660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3661 (exit $ac_status); }; then
d6e01aa5
KL
3662 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3663# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3664# in a Makefile. We should not override ac_cv_exeext if it was cached,
3665# so that the user can short-circuit this test for compilers unknown to
3666# Autoconf.
3667for ac_file in $ac_files ''
19650fd6 3668do
6bae0ccf 3669 test -f "$ac_file" || continue
503d2be0 3670 case $ac_file in
d6e01aa5 3671 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3672 ;;
19650fd6 3673 [ab].out )
edfaf76d
LK
3674 # We found the default executable, but exeext='' is most
3675 # certainly right.
3676 break;;
19650fd6 3677 *.* )
d6e01aa5
KL
3678 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3679 then :; else
3680 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3681 fi
3682 # We set ac_cv_exeext here because the later test for it is not
3683 # safe: cross compilers may not add the suffix if given an `-o'
3684 # argument, so we may need to know it at that point already.
3685 # Even if this section looks crufty: it has the advantage of
3686 # actually working.
edfaf76d 3687 break;;
19650fd6 3688 * )
edfaf76d 3689 break;;
503d2be0
AS
3690 esac
3691done
d6e01aa5
KL
3692test "$ac_cv_exeext" = no && ac_cv_exeext=
3693
503d2be0 3694else
d6e01aa5
KL
3695 ac_file=''
3696fi
3697
3698{ echo "$as_me:$LINENO: result: $ac_file" >&5
3699echo "${ECHO_T}$ac_file" >&6; }
3700if test -z "$ac_file"; then
503d2be0 3701 echo "$as_me: failed program was:" >&5
19650fd6
AS
3702sed 's/^/| /' conftest.$ac_ext >&5
3703
6bae0ccf 3704{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3705See \`config.log' for more details." >&5
6bae0ccf 3706echo "$as_me: error: C compiler cannot create executables
19650fd6 3707See \`config.log' for more details." >&2;}
503d2be0
AS
3708 { (exit 77); exit 77; }; }
3709fi
3710
3711ac_exeext=$ac_cv_exeext
503d2be0 3712
d6e01aa5 3713# Check that the compiler produces executables we can run. If not, either
503d2be0 3714# the compiler is broken, or we cross compile.
d6e01aa5
KL
3715{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3716echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3717# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3718# If not cross compiling, check that we can run a simple program.
3719if test "$cross_compiling" != yes; then
3720 if { ac_try='./$ac_file'
d6e01aa5
KL
3721 { (case "(($ac_try" in
3722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3723 *) ac_try_echo=$ac_try;;
3724esac
3725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3726 (eval "$ac_try") 2>&5
503d2be0 3727 ac_status=$?
c0d27fcc 3728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3729 (exit $ac_status); }; }; then
3730 cross_compiling=no
ba4481b5 3731 else
503d2be0
AS
3732 if test "$cross_compiling" = maybe; then
3733 cross_compiling=yes
3734 else
c0d27fcc 3735 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3736If you meant to cross compile, use \`--host'.
3737See \`config.log' for more details." >&5
503d2be0 3738echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3739If you meant to cross compile, use \`--host'.
3740See \`config.log' for more details." >&2;}
503d2be0
AS
3741 { (exit 1); exit 1; }; }
3742 fi
ba4481b5 3743 fi
503d2be0 3744fi
d6e01aa5
KL
3745{ echo "$as_me:$LINENO: result: yes" >&5
3746echo "${ECHO_T}yes" >&6; }
503d2be0 3747
19650fd6 3748rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3749ac_clean_files=$ac_clean_files_save
d6e01aa5 3750# Check that the compiler produces executables we can run. If not, either
503d2be0 3751# the compiler is broken, or we cross compile.
d6e01aa5
KL
3752{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3753echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3754{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3755echo "${ECHO_T}$cross_compiling" >&6; }
3756
3757{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3758echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3759if { (ac_try="$ac_link"
3760case "(($ac_try" in
3761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3762 *) ac_try_echo=$ac_try;;
3763esac
3764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3765 (eval "$ac_link") 2>&5
503d2be0 3766 ac_status=$?
c0d27fcc 3767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3768 (exit $ac_status); }; then
3769 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3770# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3771# work properly (i.e., refer to `conftest.exe'), while it won't with
3772# `rm'.
6bae0ccf
DL
3773for ac_file in conftest.exe conftest conftest.*; do
3774 test -f "$ac_file" || continue
503d2be0 3775 case $ac_file in
d6e01aa5 3776 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3777 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3778 break;;
503d2be0
AS
3779 * ) break;;
3780 esac
3781done
ba4481b5 3782else
19650fd6
AS
3783 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3784See \`config.log' for more details." >&5
3785echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3786See \`config.log' for more details." >&2;}
503d2be0 3787 { (exit 1); exit 1; }; }
ba4481b5 3788fi
ba4481b5 3789
503d2be0 3790rm -f conftest$ac_cv_exeext
d6e01aa5
KL
3791{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3792echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3793
503d2be0
AS
3794rm -f conftest.$ac_ext
3795EXEEXT=$ac_cv_exeext
3796ac_exeext=$EXEEXT
d6e01aa5
KL
3797{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3798echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3799if test "${ac_cv_objext+set}" = set; then
3800 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3801else
503d2be0 3802 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3803/* confdefs.h. */
3804_ACEOF
3805cat confdefs.h >>conftest.$ac_ext
3806cat >>conftest.$ac_ext <<_ACEOF
3807/* end confdefs.h. */
ba4481b5 3808
503d2be0
AS
3809int
3810main ()
3811{
ba4481b5 3812
503d2be0
AS
3813 ;
3814 return 0;
3815}
3816_ACEOF
3817rm -f conftest.o conftest.obj
d6e01aa5
KL
3818if { (ac_try="$ac_compile"
3819case "(($ac_try" in
3820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3821 *) ac_try_echo=$ac_try;;
3822esac
3823eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3824 (eval "$ac_compile") 2>&5
503d2be0 3825 ac_status=$?
c0d27fcc 3826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3827 (exit $ac_status); }; then
d6e01aa5
KL
3828 for ac_file in conftest.o conftest.obj conftest.*; do
3829 test -f "$ac_file" || continue;
503d2be0 3830 case $ac_file in
d6e01aa5 3831 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3832 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3833 break;;
3834 esac
3835done
c4bb2108 3836else
503d2be0 3837 echo "$as_me: failed program was:" >&5
19650fd6
AS
3838sed 's/^/| /' conftest.$ac_ext >&5
3839
3840{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3841See \`config.log' for more details." >&5
3842echo "$as_me: error: cannot compute suffix of object files: cannot compile
3843See \`config.log' for more details." >&2;}
503d2be0 3844 { (exit 1); exit 1; }; }
c4bb2108
DL
3845fi
3846
503d2be0
AS
3847rm -f conftest.$ac_cv_objext conftest.$ac_ext
3848fi
d6e01aa5
KL
3849{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3850echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3851OBJEXT=$ac_cv_objext
3852ac_objext=$OBJEXT
d6e01aa5
KL
3853{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3854echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3855if test "${ac_cv_c_compiler_gnu+set}" = set; then
3856 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3857else
503d2be0 3858 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3859/* confdefs.h. */
3860_ACEOF
3861cat confdefs.h >>conftest.$ac_ext
3862cat >>conftest.$ac_ext <<_ACEOF
3863/* end confdefs.h. */
503d2be0
AS
3864
3865int
3866main ()
3867{
3868#ifndef __GNUC__
3869 choke me
3870#endif
3871
3872 ;
3873 return 0;
3874}
3875_ACEOF
3876rm -f conftest.$ac_objext
d6e01aa5
KL
3877if { (ac_try="$ac_compile"
3878case "(($ac_try" in
3879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3880 *) ac_try_echo=$ac_try;;
3881esac
3882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3883 (eval "$ac_compile") 2>conftest.er1
503d2be0 3884 ac_status=$?
edfaf76d
LK
3885 grep -v '^ *+' conftest.er1 >conftest.err
3886 rm -f conftest.er1
3887 cat conftest.err >&5
c0d27fcc 3888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
3889 (exit $ac_status); } && {
3890 test -z "$ac_c_werror_flag" ||
3891 test ! -s conftest.err
3892 } && test -s conftest.$ac_objext; then
503d2be0
AS
3893 ac_compiler_gnu=yes
3894else
3895 echo "$as_me: failed program was:" >&5
19650fd6
AS
3896sed 's/^/| /' conftest.$ac_ext >&5
3897
d6e01aa5 3898 ac_compiler_gnu=no
503d2be0 3899fi
d6e01aa5
KL
3900
3901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3902ac_cv_c_compiler_gnu=$ac_compiler_gnu
3903
3904fi
d6e01aa5
KL
3905{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3906echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3907GCC=`test $ac_compiler_gnu = yes && echo yes`
3908ac_test_CFLAGS=${CFLAGS+set}
3909ac_save_CFLAGS=$CFLAGS
d6e01aa5
KL
3910{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3911echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3912if test "${ac_cv_prog_cc_g+set}" = set; then
3913 echo $ECHO_N "(cached) $ECHO_C" >&6
3914else
d6e01aa5
KL
3915 ac_save_c_werror_flag=$ac_c_werror_flag
3916 ac_c_werror_flag=yes
3917 ac_cv_prog_cc_g=no
3918 CFLAGS="-g"
3919 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3920/* confdefs.h. */
3921_ACEOF
3922cat confdefs.h >>conftest.$ac_ext
3923cat >>conftest.$ac_ext <<_ACEOF
3924/* end confdefs.h. */
503d2be0
AS
3925
3926int
3927main ()
3928{
3929
3930 ;
3931 return 0;
3932}
3933_ACEOF
3934rm -f conftest.$ac_objext
d6e01aa5
KL
3935if { (ac_try="$ac_compile"
3936case "(($ac_try" in
3937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3938 *) ac_try_echo=$ac_try;;
3939esac
3940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3941 (eval "$ac_compile") 2>conftest.er1
503d2be0 3942 ac_status=$?
edfaf76d
LK
3943 grep -v '^ *+' conftest.er1 >conftest.err
3944 rm -f conftest.er1
3945 cat conftest.err >&5
c0d27fcc 3946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
3947 (exit $ac_status); } && {
3948 test -z "$ac_c_werror_flag" ||
3949 test ! -s conftest.err
3950 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3951 ac_cv_prog_cc_g=yes
3952else
503d2be0 3953 echo "$as_me: failed program was:" >&5
19650fd6
AS
3954sed 's/^/| /' conftest.$ac_ext >&5
3955
d6e01aa5
KL
3956 CFLAGS=""
3957 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3958/* confdefs.h. */
3959_ACEOF
3960cat confdefs.h >>conftest.$ac_ext
3961cat >>conftest.$ac_ext <<_ACEOF
3962/* end confdefs.h. */
d6e01aa5
KL
3963
3964int
3965main ()
6bae0ccf 3966{
edfaf76d 3967
6bae0ccf
DL
3968 ;
3969 return 0;
3970}
3971_ACEOF
d6e01aa5
KL
3972rm -f conftest.$ac_objext
3973if { (ac_try="$ac_compile"
3974case "(($ac_try" in
3975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3976 *) ac_try_echo=$ac_try;;
3977esac
3978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3979 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3980 ac_status=$?
edfaf76d
LK
3981 grep -v '^ *+' conftest.er1 >conftest.err
3982 rm -f conftest.er1
3983 cat conftest.err >&5
6bae0ccf 3984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
3985 (exit $ac_status); } && {
3986 test -z "$ac_c_werror_flag" ||
3987 test ! -s conftest.err
3988 } && test -s conftest.$ac_objext; then
3989 :
6bae0ccf
DL
3990else
3991 echo "$as_me: failed program was:" >&5
19650fd6
AS
3992sed 's/^/| /' conftest.$ac_ext >&5
3993
d6e01aa5
KL
3994 ac_c_werror_flag=$ac_save_c_werror_flag
3995 CFLAGS="-g"
3996 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3997/* confdefs.h. */
3998_ACEOF
3999cat confdefs.h >>conftest.$ac_ext
4000cat >>conftest.$ac_ext <<_ACEOF
4001/* end confdefs.h. */
d6e01aa5 4002
503d2be0
AS
4003int
4004main ()
4005{
d6e01aa5 4006
503d2be0
AS
4007 ;
4008 return 0;
4009}
4010_ACEOF
4011rm -f conftest.$ac_objext
d6e01aa5
KL
4012if { (ac_try="$ac_compile"
4013case "(($ac_try" in
4014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4015 *) ac_try_echo=$ac_try;;
4016esac
4017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4018 (eval "$ac_compile") 2>conftest.er1
503d2be0 4019 ac_status=$?
edfaf76d
LK
4020 grep -v '^ *+' conftest.er1 >conftest.err
4021 rm -f conftest.er1
4022 cat conftest.err >&5
c0d27fcc 4023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4024 (exit $ac_status); } && {
4025 test -z "$ac_c_werror_flag" ||
4026 test ! -s conftest.err
4027 } && test -s conftest.$ac_objext; then
4028 ac_cv_prog_cc_g=yes
503d2be0
AS
4029else
4030 echo "$as_me: failed program was:" >&5
19650fd6
AS
4031sed 's/^/| /' conftest.$ac_ext >&5
4032
d6e01aa5 4033
503d2be0 4034fi
d6e01aa5
KL
4035
4036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4037fi
4038
4039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4040fi
4041
4042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4043 ac_c_werror_flag=$ac_save_c_werror_flag
4044fi
4045{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
4046echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
4047if test "$ac_test_CFLAGS" = set; then
4048 CFLAGS=$ac_save_CFLAGS
4049elif test $ac_cv_prog_cc_g = yes; then
4050 if test "$GCC" = yes; then
4051 CFLAGS="-g -O2"
4052 else
4053 CFLAGS="-g"
4054 fi
4055else
4056 if test "$GCC" = yes; then
4057 CFLAGS="-O2"
4058 else
4059 CFLAGS=
4060 fi
4061fi
4062{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
4063echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
4064if test "${ac_cv_prog_cc_c89+set}" = set; then
4065 echo $ECHO_N "(cached) $ECHO_C" >&6
4066else
4067 ac_cv_prog_cc_c89=no
4068ac_save_CC=$CC
4069cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4070/* confdefs.h. */
4071_ACEOF
4072cat confdefs.h >>conftest.$ac_ext
4073cat >>conftest.$ac_ext <<_ACEOF
4074/* end confdefs.h. */
d6e01aa5
KL
4075#include <stdarg.h>
4076#include <stdio.h>
4077#include <sys/types.h>
4078#include <sys/stat.h>
4079/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4080struct buf { int x; };
4081FILE * (*rcsopen) (struct buf *, struct stat *, int);
4082static char *e (p, i)
4083 char **p;
4084 int i;
4085{
4086 return p[i];
4087}
4088static char *f (char * (*g) (char **, int), char **p, ...)
4089{
4090 char *s;
4091 va_list v;
4092 va_start (v,p);
4093 s = g (p, va_arg (v,int));
4094 va_end (v);
4095 return s;
4096}
4097
4098/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4099 function prototypes and stuff, but not '\xHH' hex character constants.
4100 These don't provoke an error unfortunately, instead are silently treated
4101 as 'x'. The following induces an error, until -std is added to get
4102 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4103 array size at least. It's necessary to write '\x00'==0 to get something
4104 that's true only with -std. */
4105int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4106
4107/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4108 inside strings and character constants. */
4109#define FOO(x) 'x'
4110int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4111
4112int test (int i, double x);
4113struct s1 {int (*f) (int a);};
4114struct s2 {int (*f) (double a);};
4115int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4116int argc;
4117char **argv;
503d2be0
AS
4118int
4119main ()
4120{
d6e01aa5 4121return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
503d2be0
AS
4122 ;
4123 return 0;
4124}
4125_ACEOF
d6e01aa5
KL
4126for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4127 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4128do
4129 CC="$ac_save_CC $ac_arg"
4130 rm -f conftest.$ac_objext
4131if { (ac_try="$ac_compile"
4132case "(($ac_try" in
4133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4134 *) ac_try_echo=$ac_try;;
4135esac
4136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4137 (eval "$ac_compile") 2>conftest.er1
503d2be0 4138 ac_status=$?
edfaf76d
LK
4139 grep -v '^ *+' conftest.er1 >conftest.err
4140 rm -f conftest.er1
4141 cat conftest.err >&5
c0d27fcc 4142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4143 (exit $ac_status); } && {
4144 test -z "$ac_c_werror_flag" ||
4145 test ! -s conftest.err
4146 } && test -s conftest.$ac_objext; then
4147 ac_cv_prog_cc_c89=$ac_arg
503d2be0
AS
4148else
4149 echo "$as_me: failed program was:" >&5
19650fd6
AS
4150sed 's/^/| /' conftest.$ac_ext >&5
4151
d6e01aa5 4152
503d2be0 4153fi
d6e01aa5
KL
4154
4155rm -f core conftest.err conftest.$ac_objext
4156 test "x$ac_cv_prog_cc_c89" != "xno" && break
503d2be0 4157done
d6e01aa5
KL
4158rm -f conftest.$ac_ext
4159CC=$ac_save_CC
4160
503d2be0 4161fi
d6e01aa5
KL
4162# AC_CACHE_VAL
4163case "x$ac_cv_prog_cc_c89" in
4164 x)
4165 { echo "$as_me:$LINENO: result: none needed" >&5
4166echo "${ECHO_T}none needed" >&6; } ;;
4167 xno)
4168 { echo "$as_me:$LINENO: result: unsupported" >&5
4169echo "${ECHO_T}unsupported" >&6; } ;;
4170 *)
4171 CC="$CC $ac_cv_prog_cc_c89"
4172 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
4173echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
4174esac
ba4481b5 4175
19650fd6 4176
503d2be0
AS
4177ac_ext=c
4178ac_cpp='$CPP $CPPFLAGS'
4179ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4180ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4181ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 4182
c0d27fcc 4183
ba4481b5
DL
4184# On Suns, sometimes $CPP names a directory.
4185if test -n "$CPP" && test -d "$CPP"; then
4186 CPP=
4187fi
4188
089a966d
GM
4189## If not using gcc, and on Solaris, and no CPP specified, see if
4190## using a Sun compiler, which needs -Xs to prevent whitespace.
4191if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
4192 test x"$CPP" = x; then
4193 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
4194echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
4195
4196if test "${emacs_cv_sunpro_c+set}" = set; then
4197 echo $ECHO_N "(cached) $ECHO_C" >&6
4198else
4199 cat >conftest.$ac_ext <<_ACEOF
4200/* confdefs.h. */
4201_ACEOF
4202cat confdefs.h >>conftest.$ac_ext
4203cat >>conftest.$ac_ext <<_ACEOF
4204/* end confdefs.h. */
4205
4206int
4207main ()
4208{
4209#ifndef __SUNPRO_C
4210fail;
4211#endif
4212
4213 ;
4214 return 0;
4215}
4216_ACEOF
4217rm -f conftest.$ac_objext conftest$ac_exeext
4218if { (ac_try="$ac_link"
4219case "(($ac_try" in
4220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4221 *) ac_try_echo=$ac_try;;
4222esac
4223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4224 (eval "$ac_link") 2>conftest.er1
4225 ac_status=$?
4226 grep -v '^ *+' conftest.er1 >conftest.err
4227 rm -f conftest.er1
4228 cat conftest.err >&5
4229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4230 (exit $ac_status); } && {
4231 test -z "$ac_c_werror_flag" ||
4232 test ! -s conftest.err
4233 } && test -s conftest$ac_exeext &&
4234 $as_test_x conftest$ac_exeext; then
4235 emacs_cv_sunpro_c=yes
4236else
4237 echo "$as_me: failed program was:" >&5
4238sed 's/^/| /' conftest.$ac_ext >&5
4239
4240 emacs_cv_sunpro_c=no
4241fi
4242
4243rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4244 conftest$ac_exeext conftest.$ac_ext
4245fi
4246
4247 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
4248echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
4249
4250 if test x"$emacs_cv_sunpro_c" = xyes; then
4251 NON_GNU_CPP="$CC -E -Xs"
4252 fi
4253fi
4254
ba4481b5
DL
4255#### Some systems specify a CPP to use unless we are using GCC.
4256#### Now that we know whether we are using GCC, we can decide whether
4257#### to use that one.
4258if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4259then
4260 CPP="$NON_GNU_CPP"
4261fi
4262
4263#### Some systems specify a CC to use unless we are using GCC.
4264#### Now that we know whether we are using GCC, we can decide whether
4265#### to use that one.
4266if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4267 test x$cc_specified != xyes
4268then
4269 CC="$NON_GNU_CC"
4270fi
4271
4272if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
4273then
4274 CC="$CC $GCC_TEST_OPTIONS"
4275fi
4276
4277if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
4278then
4279 CC="$CC $NON_GCC_TEST_OPTIONS"
4280fi
4281
e143ad11
AS
4282ac_ext=c
4283ac_cpp='$CPP $CPPFLAGS'
4284ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4285ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4286ac_compiler_gnu=$ac_cv_c_compiler_gnu
d6e01aa5
KL
4287{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4288echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
4289# On Suns, sometimes $CPP names a directory.
4290if test -n "$CPP" && test -d "$CPP"; then
4291 CPP=
4292fi
4293if test -z "$CPP"; then
4294 if test "${ac_cv_prog_CPP+set}" = set; then
4295 echo $ECHO_N "(cached) $ECHO_C" >&6
4296else
4297 # Double quotes because CPP needs to be expanded
4298 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4299 do
4300 ac_preproc_ok=false
4301for ac_c_preproc_warn_flag in '' yes
4302do
4303 # Use a header file that comes with gcc, so configuring glibc
4304 # with a fresh cross-compiler works.
4305 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4306 # <limits.h> exists even on freestanding compilers.
4307 # On the NeXT, cc -E runs the code through the compiler's parser,
4308 # not just through cpp. "Syntax error" is here to catch this case.
4309 cat >conftest.$ac_ext <<_ACEOF
4310/* confdefs.h. */
4311_ACEOF
4312cat confdefs.h >>conftest.$ac_ext
4313cat >>conftest.$ac_ext <<_ACEOF
4314/* end confdefs.h. */
4315#ifdef __STDC__
4316# include <limits.h>
4317#else
4318# include <assert.h>
4319#endif
4320 Syntax error
4321_ACEOF
d6e01aa5
KL
4322if { (ac_try="$ac_cpp conftest.$ac_ext"
4323case "(($ac_try" in
4324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4325 *) ac_try_echo=$ac_try;;
4326esac
4327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4328 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4329 ac_status=$?
4330 grep -v '^ *+' conftest.er1 >conftest.err
4331 rm -f conftest.er1
4332 cat conftest.err >&5
4333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4334 (exit $ac_status); } >/dev/null && {
4335 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4336 test ! -s conftest.err
4337 }; then
e143ad11
AS
4338 :
4339else
4340 echo "$as_me: failed program was:" >&5
4341sed 's/^/| /' conftest.$ac_ext >&5
4342
4343 # Broken: fails on valid input.
4344continue
4345fi
d6e01aa5 4346
e143ad11
AS
4347rm -f conftest.err conftest.$ac_ext
4348
d6e01aa5 4349 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4350 # can be detected and how.
4351 cat >conftest.$ac_ext <<_ACEOF
4352/* confdefs.h. */
4353_ACEOF
4354cat confdefs.h >>conftest.$ac_ext
4355cat >>conftest.$ac_ext <<_ACEOF
4356/* end confdefs.h. */
4357#include <ac_nonexistent.h>
4358_ACEOF
d6e01aa5
KL
4359if { (ac_try="$ac_cpp conftest.$ac_ext"
4360case "(($ac_try" in
4361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4362 *) ac_try_echo=$ac_try;;
4363esac
4364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4365 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4366 ac_status=$?
4367 grep -v '^ *+' conftest.er1 >conftest.err
4368 rm -f conftest.er1
4369 cat conftest.err >&5
4370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4371 (exit $ac_status); } >/dev/null && {
4372 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4373 test ! -s conftest.err
4374 }; then
e143ad11
AS
4375 # Broken: success on invalid input.
4376continue
4377else
4378 echo "$as_me: failed program was:" >&5
4379sed 's/^/| /' conftest.$ac_ext >&5
4380
4381 # Passes both tests.
4382ac_preproc_ok=:
4383break
4384fi
d6e01aa5 4385
e143ad11
AS
4386rm -f conftest.err conftest.$ac_ext
4387
4388done
4389# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4390rm -f conftest.err conftest.$ac_ext
4391if $ac_preproc_ok; then
4392 break
4393fi
4394
4395 done
4396 ac_cv_prog_CPP=$CPP
4397
4398fi
4399 CPP=$ac_cv_prog_CPP
4400else
4401 ac_cv_prog_CPP=$CPP
4402fi
d6e01aa5
KL
4403{ echo "$as_me:$LINENO: result: $CPP" >&5
4404echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
4405ac_preproc_ok=false
4406for ac_c_preproc_warn_flag in '' yes
4407do
4408 # Use a header file that comes with gcc, so configuring glibc
4409 # with a fresh cross-compiler works.
4410 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4411 # <limits.h> exists even on freestanding compilers.
4412 # On the NeXT, cc -E runs the code through the compiler's parser,
4413 # not just through cpp. "Syntax error" is here to catch this case.
4414 cat >conftest.$ac_ext <<_ACEOF
4415/* confdefs.h. */
4416_ACEOF
4417cat confdefs.h >>conftest.$ac_ext
4418cat >>conftest.$ac_ext <<_ACEOF
4419/* end confdefs.h. */
4420#ifdef __STDC__
4421# include <limits.h>
4422#else
4423# include <assert.h>
4424#endif
4425 Syntax error
4426_ACEOF
d6e01aa5
KL
4427if { (ac_try="$ac_cpp conftest.$ac_ext"
4428case "(($ac_try" in
4429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4430 *) ac_try_echo=$ac_try;;
4431esac
4432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4433 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4434 ac_status=$?
4435 grep -v '^ *+' conftest.er1 >conftest.err
4436 rm -f conftest.er1
4437 cat conftest.err >&5
4438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4439 (exit $ac_status); } >/dev/null && {
4440 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4441 test ! -s conftest.err
4442 }; then
e143ad11
AS
4443 :
4444else
4445 echo "$as_me: failed program was:" >&5
4446sed 's/^/| /' conftest.$ac_ext >&5
4447
4448 # Broken: fails on valid input.
4449continue
4450fi
d6e01aa5 4451
e143ad11
AS
4452rm -f conftest.err conftest.$ac_ext
4453
d6e01aa5 4454 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4455 # can be detected and how.
4456 cat >conftest.$ac_ext <<_ACEOF
4457/* confdefs.h. */
4458_ACEOF
4459cat confdefs.h >>conftest.$ac_ext
4460cat >>conftest.$ac_ext <<_ACEOF
4461/* end confdefs.h. */
4462#include <ac_nonexistent.h>
4463_ACEOF
d6e01aa5
KL
4464if { (ac_try="$ac_cpp conftest.$ac_ext"
4465case "(($ac_try" in
4466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4467 *) ac_try_echo=$ac_try;;
4468esac
4469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4470 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4471 ac_status=$?
4472 grep -v '^ *+' conftest.er1 >conftest.err
4473 rm -f conftest.er1
4474 cat conftest.err >&5
4475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4476 (exit $ac_status); } >/dev/null && {
4477 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4478 test ! -s conftest.err
4479 }; then
e143ad11
AS
4480 # Broken: success on invalid input.
4481continue
4482else
4483 echo "$as_me: failed program was:" >&5
4484sed 's/^/| /' conftest.$ac_ext >&5
4485
4486 # Passes both tests.
4487ac_preproc_ok=:
4488break
4489fi
d6e01aa5 4490
e143ad11
AS
4491rm -f conftest.err conftest.$ac_ext
4492
4493done
4494# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4495rm -f conftest.err conftest.$ac_ext
4496if $ac_preproc_ok; then
4497 :
4498else
4499 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4500See \`config.log' for more details." >&5
4501echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4502See \`config.log' for more details." >&2;}
4503 { (exit 1); exit 1; }; }
4504fi
4505
4506ac_ext=c
4507ac_cpp='$CPP $CPPFLAGS'
4508ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4509ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4510ac_compiler_gnu=$ac_cv_c_compiler_gnu
4511
4512
d6e01aa5
KL
4513{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4514echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4515if test "${ac_cv_path_GREP+set}" = set; then
4516 echo $ECHO_N "(cached) $ECHO_C" >&6
4517else
4518 # Extract the first word of "grep ggrep" to use in msg output
4519if test -z "$GREP"; then
4520set dummy grep ggrep; ac_prog_name=$2
4521if test "${ac_cv_path_GREP+set}" = set; then
4522 echo $ECHO_N "(cached) $ECHO_C" >&6
4523else
4524 ac_path_GREP_found=false
4525# Loop through the user's path and test for each of PROGNAME-LIST
4526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4527for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4528do
4529 IFS=$as_save_IFS
4530 test -z "$as_dir" && as_dir=.
4531 for ac_prog in grep ggrep; do
4532 for ac_exec_ext in '' $ac_executable_extensions; do
4533 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4534 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
4535 # Check for GNU ac_path_GREP and select it if it is found.
4536 # Check for GNU $ac_path_GREP
4537case `"$ac_path_GREP" --version 2>&1` in
4538*GNU*)
4539 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4540*)
4541 ac_count=0
4542 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4543 while :
4544 do
4545 cat "conftest.in" "conftest.in" >"conftest.tmp"
4546 mv "conftest.tmp" "conftest.in"
4547 cp "conftest.in" "conftest.nl"
4548 echo 'GREP' >> "conftest.nl"
4549 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4550 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4551 ac_count=`expr $ac_count + 1`
4552 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4553 # Best one so far, save it but keep looking for a better one
4554 ac_cv_path_GREP="$ac_path_GREP"
4555 ac_path_GREP_max=$ac_count
4556 fi
4557 # 10*(2^10) chars as input seems more than enough
4558 test $ac_count -gt 10 && break
4559 done
4560 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4561esac
4562
4563
4564 $ac_path_GREP_found && break 3
4565 done
4566done
4567
4568done
4569IFS=$as_save_IFS
4570
4571
4572fi
4573
4574GREP="$ac_cv_path_GREP"
4575if test -z "$GREP"; then
4576 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4577echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4578 { (exit 1); exit 1; }; }
4579fi
4580
4581else
4582 ac_cv_path_GREP=$GREP
4583fi
4584
4585
4586fi
4587{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4588echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4589 GREP="$ac_cv_path_GREP"
4590
4591
4592{ echo "$as_me:$LINENO: checking for egrep" >&5
4593echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4594if test "${ac_cv_path_EGREP+set}" = set; then
4595 echo $ECHO_N "(cached) $ECHO_C" >&6
4596else
4597 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4598 then ac_cv_path_EGREP="$GREP -E"
4599 else
4600 # Extract the first word of "egrep" to use in msg output
4601if test -z "$EGREP"; then
4602set dummy egrep; ac_prog_name=$2
4603if test "${ac_cv_path_EGREP+set}" = set; then
e143ad11
AS
4604 echo $ECHO_N "(cached) $ECHO_C" >&6
4605else
d6e01aa5
KL
4606 ac_path_EGREP_found=false
4607# Loop through the user's path and test for each of PROGNAME-LIST
4608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4609for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4610do
4611 IFS=$as_save_IFS
4612 test -z "$as_dir" && as_dir=.
4613 for ac_prog in egrep; do
4614 for ac_exec_ext in '' $ac_executable_extensions; do
4615 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4616 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4617 # Check for GNU ac_path_EGREP and select it if it is found.
4618 # Check for GNU $ac_path_EGREP
4619case `"$ac_path_EGREP" --version 2>&1` in
4620*GNU*)
4621 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4622*)
4623 ac_count=0
4624 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4625 while :
4626 do
4627 cat "conftest.in" "conftest.in" >"conftest.tmp"
4628 mv "conftest.tmp" "conftest.in"
4629 cp "conftest.in" "conftest.nl"
4630 echo 'EGREP' >> "conftest.nl"
4631 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4632 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4633 ac_count=`expr $ac_count + 1`
4634 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4635 # Best one so far, save it but keep looking for a better one
4636 ac_cv_path_EGREP="$ac_path_EGREP"
4637 ac_path_EGREP_max=$ac_count
e143ad11 4638 fi
d6e01aa5
KL
4639 # 10*(2^10) chars as input seems more than enough
4640 test $ac_count -gt 10 && break
4641 done
4642 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4643esac
4644
4645
4646 $ac_path_EGREP_found && break 3
4647 done
4648done
4649
4650done
4651IFS=$as_save_IFS
4652
4653
4654fi
4655
4656EGREP="$ac_cv_path_EGREP"
4657if test -z "$EGREP"; then
4658 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4659echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4660 { (exit 1); exit 1; }; }
4661fi
4662
4663else
4664 ac_cv_path_EGREP=$EGREP
e143ad11 4665fi
d6e01aa5
KL
4666
4667
4668 fi
4669fi
4670{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4671echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4672 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4673
4674
4675
d6e01aa5
KL
4676{ echo "$as_me:$LINENO: checking for AIX" >&5
4677echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4678cat >conftest.$ac_ext <<_ACEOF
4679/* confdefs.h. */
4680_ACEOF
4681cat confdefs.h >>conftest.$ac_ext
4682cat >>conftest.$ac_ext <<_ACEOF
4683/* end confdefs.h. */
4684#ifdef _AIX
4685 yes
4686#endif
4687
4688_ACEOF
4689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4690 $EGREP "yes" >/dev/null 2>&1; then
d6e01aa5
KL
4691 { echo "$as_me:$LINENO: result: yes" >&5
4692echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4693cat >>confdefs.h <<\_ACEOF
4694#define _ALL_SOURCE 1
4695_ACEOF
4696
4697else
d6e01aa5
KL
4698 { echo "$as_me:$LINENO: result: no" >&5
4699echo "${ECHO_T}no" >&6; }
e143ad11
AS
4700fi
4701rm -f conftest*
4702
4703
4704
4705cat >>confdefs.h <<\_ACEOF
4706#define _GNU_SOURCE 1
4707_ACEOF
4708
4709
4710
01abe918 4711### Use -Wno-pointer-sign if the compiler supports it
d6e01aa5
KL
4712{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4713echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4714SAVE_CFLAGS="$CFLAGS"
4715CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4716cat >conftest.$ac_ext <<_ACEOF
4717/* confdefs.h. */
4718_ACEOF
4719cat confdefs.h >>conftest.$ac_ext
4720cat >>conftest.$ac_ext <<_ACEOF
4721/* end confdefs.h. */
4722
4723int
4724main ()
4725{
4726
4727 ;
4728 return 0;
4729}
4730_ACEOF
4731rm -f conftest.$ac_objext
d6e01aa5
KL
4732if { (ac_try="$ac_compile"
4733case "(($ac_try" in
4734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4735 *) ac_try_echo=$ac_try;;
4736esac
4737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4738 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4739 ac_status=$?
4740 grep -v '^ *+' conftest.er1 >conftest.err
4741 rm -f conftest.er1
4742 cat conftest.err >&5
4743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4744 (exit $ac_status); } && {
4745 test -z "$ac_c_werror_flag" ||
4746 test ! -s conftest.err
4747 } && test -s conftest.$ac_objext; then
01abe918
CY
4748 has_option=yes
4749else
4750 echo "$as_me: failed program was:" >&5
4751sed 's/^/| /' conftest.$ac_ext >&5
4752
d6e01aa5 4753 has_option=no
01abe918 4754fi
d6e01aa5
KL
4755
4756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4757if test $has_option = yes; then
4758 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4759fi
d6e01aa5
KL
4760{ echo "$as_me:$LINENO: result: $has_option" >&5
4761echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4762CFLAGS="$SAVE_CFLAGS"
4763unset has_option
4764unset SAVE_CFLAGS
4765
6a3a24fa 4766#### Some other nice autoconf tests.
ba4481b5 4767
d6e01aa5
KL
4768{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4769echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4770LN_S=$as_ln_s
4771if test "$LN_S" = "ln -s"; then
d6e01aa5
KL
4772 { echo "$as_me:$LINENO: result: yes" >&5
4773echo "${ECHO_T}yes" >&6; }
ba4481b5 4774else
d6e01aa5
KL
4775 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4776echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4777fi
4778
503d2be0
AS
4779ac_ext=c
4780ac_cpp='$CPP $CPPFLAGS'
4781ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4782ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4783ac_compiler_gnu=$ac_cv_c_compiler_gnu
d6e01aa5
KL
4784{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4785echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4786# On Suns, sometimes $CPP names a directory.
4787if test -n "$CPP" && test -d "$CPP"; then
4788 CPP=
4789fi
4790if test -z "$CPP"; then
503d2be0
AS
4791 if test "${ac_cv_prog_CPP+set}" = set; then
4792 echo $ECHO_N "(cached) $ECHO_C" >&6
4793else
4794 # Double quotes because CPP needs to be expanded
4795 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4796 do
4797 ac_preproc_ok=false
4798for ac_c_preproc_warn_flag in '' yes
4799do
4800 # Use a header file that comes with gcc, so configuring glibc
4801 # with a fresh cross-compiler works.
19650fd6
AS
4802 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4803 # <limits.h> exists even on freestanding compilers.
ba4481b5 4804 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4805 # not just through cpp. "Syntax error" is here to catch this case.
4806 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4807/* confdefs.h. */
4808_ACEOF
4809cat confdefs.h >>conftest.$ac_ext
4810cat >>conftest.$ac_ext <<_ACEOF
4811/* end confdefs.h. */
4812#ifdef __STDC__
4813# include <limits.h>
4814#else
4815# include <assert.h>
4816#endif
edfaf76d 4817 Syntax error
503d2be0 4818_ACEOF
d6e01aa5
KL
4819if { (ac_try="$ac_cpp conftest.$ac_ext"
4820case "(($ac_try" in
4821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4822 *) ac_try_echo=$ac_try;;
4823esac
4824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4825 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4826 ac_status=$?
6bae0ccf 4827 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4828 rm -f conftest.er1
4829 cat conftest.err >&5
c0d27fcc 4830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4831 (exit $ac_status); } >/dev/null && {
4832 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4833 test ! -s conftest.err
4834 }; then
ba4481b5
DL
4835 :
4836else
503d2be0 4837 echo "$as_me: failed program was:" >&5
19650fd6
AS
4838sed 's/^/| /' conftest.$ac_ext >&5
4839
503d2be0
AS
4840 # Broken: fails on valid input.
4841continue
4842fi
d6e01aa5 4843
503d2be0
AS
4844rm -f conftest.err conftest.$ac_ext
4845
d6e01aa5 4846 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4847 # can be detected and how.
4848 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4849/* confdefs.h. */
4850_ACEOF
4851cat confdefs.h >>conftest.$ac_ext
4852cat >>conftest.$ac_ext <<_ACEOF
4853/* end confdefs.h. */
503d2be0
AS
4854#include <ac_nonexistent.h>
4855_ACEOF
d6e01aa5
KL
4856if { (ac_try="$ac_cpp conftest.$ac_ext"
4857case "(($ac_try" in
4858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4859 *) ac_try_echo=$ac_try;;
4860esac
4861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4862 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4863 ac_status=$?
6bae0ccf 4864 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4865 rm -f conftest.er1
4866 cat conftest.err >&5
c0d27fcc 4867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4868 (exit $ac_status); } >/dev/null && {
4869 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4870 test ! -s conftest.err
4871 }; then
503d2be0
AS
4872 # Broken: success on invalid input.
4873continue
c4bb2108 4874else
503d2be0 4875 echo "$as_me: failed program was:" >&5
19650fd6
AS
4876sed 's/^/| /' conftest.$ac_ext >&5
4877
503d2be0
AS
4878 # Passes both tests.
4879ac_preproc_ok=:
4880break
4881fi
d6e01aa5 4882
503d2be0
AS
4883rm -f conftest.err conftest.$ac_ext
4884
4885done
4886# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4887rm -f conftest.err conftest.$ac_ext
4888if $ac_preproc_ok; then
4889 break
4890fi
4891
4892 done
4893 ac_cv_prog_CPP=$CPP
4894
4895fi
4896 CPP=$ac_cv_prog_CPP
4897else
4898 ac_cv_prog_CPP=$CPP
4899fi
d6e01aa5
KL
4900{ echo "$as_me:$LINENO: result: $CPP" >&5
4901echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4902ac_preproc_ok=false
4903for ac_c_preproc_warn_flag in '' yes
4904do
4905 # Use a header file that comes with gcc, so configuring glibc
4906 # with a fresh cross-compiler works.
19650fd6
AS
4907 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4908 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4909 # On the NeXT, cc -E runs the code through the compiler's parser,
4910 # not just through cpp. "Syntax error" is here to catch this case.
4911 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4912/* confdefs.h. */
4913_ACEOF
4914cat confdefs.h >>conftest.$ac_ext
4915cat >>conftest.$ac_ext <<_ACEOF
4916/* end confdefs.h. */
4917#ifdef __STDC__
4918# include <limits.h>
4919#else
4920# include <assert.h>
4921#endif
edfaf76d 4922 Syntax error
503d2be0 4923_ACEOF
d6e01aa5
KL
4924if { (ac_try="$ac_cpp conftest.$ac_ext"
4925case "(($ac_try" in
4926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4927 *) ac_try_echo=$ac_try;;
4928esac
4929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4930 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4931 ac_status=$?
6bae0ccf 4932 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4933 rm -f conftest.er1
4934 cat conftest.err >&5
c0d27fcc 4935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4936 (exit $ac_status); } >/dev/null && {
4937 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4938 test ! -s conftest.err
4939 }; then
ba4481b5
DL
4940 :
4941else
503d2be0 4942 echo "$as_me: failed program was:" >&5
19650fd6
AS
4943sed 's/^/| /' conftest.$ac_ext >&5
4944
503d2be0
AS
4945 # Broken: fails on valid input.
4946continue
4947fi
d6e01aa5 4948
503d2be0
AS
4949rm -f conftest.err conftest.$ac_ext
4950
d6e01aa5 4951 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4952 # can be detected and how.
4953 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4954/* confdefs.h. */
4955_ACEOF
4956cat confdefs.h >>conftest.$ac_ext
4957cat >>conftest.$ac_ext <<_ACEOF
4958/* end confdefs.h. */
503d2be0
AS
4959#include <ac_nonexistent.h>
4960_ACEOF
d6e01aa5
KL
4961if { (ac_try="$ac_cpp conftest.$ac_ext"
4962case "(($ac_try" in
4963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4964 *) ac_try_echo=$ac_try;;
4965esac
4966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4967 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4968 ac_status=$?
6bae0ccf 4969 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4970 rm -f conftest.er1
4971 cat conftest.err >&5
c0d27fcc 4972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
4973 (exit $ac_status); } >/dev/null && {
4974 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4975 test ! -s conftest.err
4976 }; then
503d2be0
AS
4977 # Broken: success on invalid input.
4978continue
4979else
4980 echo "$as_me: failed program was:" >&5
19650fd6
AS
4981sed 's/^/| /' conftest.$ac_ext >&5
4982
503d2be0
AS
4983 # Passes both tests.
4984ac_preproc_ok=:
4985break
ba4481b5 4986fi
d6e01aa5 4987
503d2be0
AS
4988rm -f conftest.err conftest.$ac_ext
4989
4990done
4991# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4992rm -f conftest.err conftest.$ac_ext
4993if $ac_preproc_ok; then
4994 :
ba4481b5 4995else
19650fd6
AS
4996 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4997See \`config.log' for more details." >&5
4998echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4999See \`config.log' for more details." >&2;}
503d2be0 5000 { (exit 1); exit 1; }; }
ba4481b5 5001fi
503d2be0
AS
5002
5003ac_ext=c
5004ac_cpp='$CPP $CPPFLAGS'
5005ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5006ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5007ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
5008
5009# Find a good install program. We prefer a C program (faster),
5010# so one script is as good as another. But avoid the broken or
5011# incompatible versions:
5012# SysV /etc/install, /usr/sbin/install
5013# SunOS /usr/etc/install
5014# IRIX /sbin/install
5015# AIX /bin/install
503d2be0 5016# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 5017# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
5018# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5019# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 5020# OS/2's system install, which has a completely different semantic
ba4481b5 5021# ./install, which can be erroneously created by make from ./install.sh.
d6e01aa5
KL
5022{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
5023echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 5024if test -z "$INSTALL"; then
503d2be0
AS
5025if test "${ac_cv_path_install+set}" = set; then
5026 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5027else
c0d27fcc
MR
5028 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5029for as_dir in $PATH
5030do
5031 IFS=$as_save_IFS
5032 test -z "$as_dir" && as_dir=.
5033 # Account for people who put trailing slashes in PATH elements.
5034case $as_dir/ in
5035 ./ | .// | /cC/* | \
5036 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 5037 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
5038 /usr/ucb/* ) ;;
5039 *)
5040 # OSF1 and SCO ODT 3.0 have their own names for install.
5041 # Don't use installbsd from OSF since it installs stuff as root
5042 # by default.
5043 for ac_prog in ginstall scoinst install; do
5044 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5045 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
5046 if test $ac_prog = install &&
5047 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5048 # AIX install. It has an incompatible calling convention.
5049 :
5050 elif test $ac_prog = install &&
5051 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5052 # program-specific install script used by HP pwplus--don't use.
5053 :
5054 else
5055 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5056 break 3
5057 fi
5058 fi
ba4481b5 5059 done
c0d27fcc
MR
5060 done
5061 ;;
5062esac
5063done
d6e01aa5 5064IFS=$as_save_IFS
c0d27fcc 5065
ba4481b5
DL
5066
5067fi
5068 if test "${ac_cv_path_install+set}" = set; then
503d2be0 5069 INSTALL=$ac_cv_path_install
ba4481b5 5070 else
d6e01aa5
KL
5071 # As a last resort, use the slow shell script. Don't cache a
5072 # value for INSTALL within a source directory, because that will
ba4481b5 5073 # break other packages using the cache if that directory is
d6e01aa5 5074 # removed, or if the value is a relative name.
503d2be0 5075 INSTALL=$ac_install_sh
ba4481b5
DL
5076 fi
5077fi
d6e01aa5
KL
5078{ echo "$as_me:$LINENO: result: $INSTALL" >&5
5079echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
5080
5081# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5082# It thinks the first close brace ends the variable substitution.
5083test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5084
503d2be0 5085test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 5086
ba4481b5
DL
5087test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5088
c0d27fcc
MR
5089if test "x$RANLIB" = x; then
5090 if test -n "$ac_tool_prefix"; then
5091 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5092set dummy ${ac_tool_prefix}ranlib; ac_word=$2
d6e01aa5
KL
5093{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5094echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5095if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 5096 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5097else
5098 if test -n "$RANLIB"; then
5099 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5100else
c0d27fcc
MR
5101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5102for as_dir in $PATH
5103do
5104 IFS=$as_save_IFS
5105 test -z "$as_dir" && as_dir=.
5106 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5107 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5108 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5109 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5110 break 2
5111 fi
5112done
503d2be0 5113done
d6e01aa5 5114IFS=$as_save_IFS
503d2be0 5115
7397acc4
DL
5116fi
5117fi
503d2be0 5118RANLIB=$ac_cv_prog_RANLIB
7397acc4 5119if test -n "$RANLIB"; then
d6e01aa5
KL
5120 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5121echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5122else
d6e01aa5
KL
5123 { echo "$as_me:$LINENO: result: no" >&5
5124echo "${ECHO_T}no" >&6; }
503d2be0
AS
5125fi
5126
d6e01aa5 5127
503d2be0
AS
5128fi
5129if test -z "$ac_cv_prog_RANLIB"; then
5130 ac_ct_RANLIB=$RANLIB
5131 # Extract the first word of "ranlib", so it can be a program name with args.
5132set dummy ranlib; ac_word=$2
d6e01aa5
KL
5133{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5134echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5135if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5136 echo $ECHO_N "(cached) $ECHO_C" >&6
5137else
5138 if test -n "$ac_ct_RANLIB"; then
5139 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5140else
c0d27fcc
MR
5141as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5142for as_dir in $PATH
5143do
5144 IFS=$as_save_IFS
5145 test -z "$as_dir" && as_dir=.
5146 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5147 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5148 ac_cv_prog_ac_ct_RANLIB="ranlib"
5149 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5150 break 2
5151 fi
5152done
503d2be0 5153done
d6e01aa5 5154IFS=$as_save_IFS
503d2be0 5155
503d2be0
AS
5156fi
5157fi
5158ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5159if test -n "$ac_ct_RANLIB"; then
d6e01aa5
KL
5160 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5161echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5162else
d6e01aa5
KL
5163 { echo "$as_me:$LINENO: result: no" >&5
5164echo "${ECHO_T}no" >&6; }
503d2be0
AS
5165fi
5166
d6e01aa5
KL
5167 if test "x$ac_ct_RANLIB" = x; then
5168 RANLIB=":"
5169 else
5170 case $cross_compiling:$ac_tool_warned in
5171yes:)
5172{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5173whose name does not start with the host triplet. If you think this
5174configuration is useful to you, please write to autoconf@gnu.org." >&5
5175echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5176whose name does not start with the host triplet. If you think this
5177configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5178ac_tool_warned=yes ;;
5179esac
5180 RANLIB=$ac_ct_RANLIB
5181 fi
7397acc4 5182else
503d2be0 5183 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5184fi
5185
5186fi
9e71690e
DK
5187# Extract the first word of "install-info", so it can be a program name with args.
5188set dummy install-info; ac_word=$2
d6e01aa5
KL
5189{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5190echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5191if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5192 echo $ECHO_N "(cached) $ECHO_C" >&6
5193else
5194 case $INSTALL_INFO in
5195 [\\/]* | ?:[\\/]*)
5196 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5197 ;;
5198 *)
5199 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5200for as_dir in $PATH
5201do
5202 IFS=$as_save_IFS
5203 test -z "$as_dir" && as_dir=.
5204 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5205 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5206 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5207 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5208 break 2
5209 fi
5210done
5211done
d6e01aa5 5212IFS=$as_save_IFS
9e71690e
DK
5213
5214 ;;
5215esac
5216fi
5217INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5218if test -n "$INSTALL_INFO"; then
d6e01aa5
KL
5219 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5220echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5221else
d6e01aa5
KL
5222 { echo "$as_me:$LINENO: result: no" >&5
5223echo "${ECHO_T}no" >&6; }
9e71690e
DK
5224fi
5225
d6e01aa5 5226
9e71690e
DK
5227# Extract the first word of "install-info", so it can be a program name with args.
5228set dummy install-info; ac_word=$2
d6e01aa5
KL
5229{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5230echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5231if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5232 echo $ECHO_N "(cached) $ECHO_C" >&6
5233else
5234 case $INSTALL_INFO in
5235 [\\/]* | ?:[\\/]*)
5236 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5237 ;;
5238 *)
5239 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5240for as_dir in /usr/sbin
5241do
5242 IFS=$as_save_IFS
5243 test -z "$as_dir" && as_dir=.
5244 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5245 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5246 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5247 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5248 break 2
5249 fi
5250done
5251done
d6e01aa5 5252IFS=$as_save_IFS
9e71690e
DK
5253
5254 ;;
5255esac
5256fi
5257INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5258if test -n "$INSTALL_INFO"; then
d6e01aa5
KL
5259 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5260echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5261else
d6e01aa5
KL
5262 { echo "$as_me:$LINENO: result: no" >&5
5263echo "${ECHO_T}no" >&6; }
9e71690e
DK
5264fi
5265
d6e01aa5 5266
9e71690e
DK
5267# Extract the first word of "install-info", so it can be a program name with args.
5268set dummy install-info; ac_word=$2
d6e01aa5
KL
5269{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5270echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5271if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5272 echo $ECHO_N "(cached) $ECHO_C" >&6
5273else
5274 case $INSTALL_INFO in
5275 [\\/]* | ?:[\\/]*)
5276 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5277 ;;
5278 *)
5279 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5280for as_dir in /sbin
5281do
5282 IFS=$as_save_IFS
5283 test -z "$as_dir" && as_dir=.
5284 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5285 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5286 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5287 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5288 break 2
5289 fi
5290done
5291done
d6e01aa5 5292IFS=$as_save_IFS
9e71690e
DK
5293
5294 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5295 ;;
5296esac
5297fi
5298INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5299if test -n "$INSTALL_INFO"; then
d6e01aa5
KL
5300 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5301echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5302else
d6e01aa5
KL
5303 { echo "$as_me:$LINENO: result: no" >&5
5304echo "${ECHO_T}no" >&6; }
9e71690e
DK
5305fi
5306
d6e01aa5 5307
8ae52ca6
RF
5308# Extract the first word of "gzip", so it can be a program name with args.
5309set dummy gzip; ac_word=$2
d6e01aa5
KL
5310{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5311echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5312if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5313 echo $ECHO_N "(cached) $ECHO_C" >&6
5314else
46e35e9f 5315 case $GZIP_PROG in
8ae52ca6 5316 [\\/]* | ?:[\\/]*)
46e35e9f 5317 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5318 ;;
5319 *)
5320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5321for as_dir in $PATH
5322do
5323 IFS=$as_save_IFS
5324 test -z "$as_dir" && as_dir=.
5325 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 5326 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5327 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5328 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5329 break 2
5330 fi
5331done
5332done
d6e01aa5 5333IFS=$as_save_IFS
8ae52ca6
RF
5334
5335 ;;
5336esac
5337fi
46e35e9f 5338GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5339if test -n "$GZIP_PROG"; then
d6e01aa5
KL
5340 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5341echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5342else
d6e01aa5
KL
5343 { echo "$as_me:$LINENO: result: no" >&5
5344echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5345fi
5346
ba4481b5 5347
c0d27fcc 5348
d6e01aa5 5349
c982cf7d
JD
5350## Need makeinfo >= 4.6 (?) to build the manuals.
5351# Extract the first word of "makeinfo", so it can be a program name with args.
5352set dummy makeinfo; ac_word=$2
5353{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5354echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
5355if test "${ac_cv_path_MAKEINFO+set}" = set; then
5356 echo $ECHO_N "(cached) $ECHO_C" >&6
5357else
5358 case $MAKEINFO in
5359 [\\/]* | ?:[\\/]*)
5360 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
5361 ;;
5362 *)
5363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5364for as_dir in $PATH
5365do
5366 IFS=$as_save_IFS
5367 test -z "$as_dir" && as_dir=.
5368 for ac_exec_ext in '' $ac_executable_extensions; do
5369 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5370 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
5371 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5372 break 2
5373 fi
5374done
5375done
5376IFS=$as_save_IFS
5377
5378 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5379 ;;
5380esac
5381fi
5382MAKEINFO=$ac_cv_path_MAKEINFO
5383if test -n "$MAKEINFO"; then
5384 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5385echo "${ECHO_T}$MAKEINFO" >&6; }
5386else
5387 { echo "$as_me:$LINENO: result: no" >&5
5388echo "${ECHO_T}no" >&6; }
5389fi
5390
5391
5392if test "$MAKEINFO" != "no" && \
d4840f44 5393 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
5394 MAKEINFO=no
5395fi
5396
5397if test "$MAKEINFO" = "no"; then
5398 { { echo "$as_me:$LINENO: error: makeinfo >= 4.6 is required " >&5
5399echo "$as_me: error: makeinfo >= 4.6 is required " >&2;}
5400 { (exit 1); exit 1; }; }
5401fi
5402
5403
5404
8e967cf7
MR
5405if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5406then
5407 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5408fi
5409
5410if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5411then
5412 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5413fi
5414
c0d27fcc 5415
fe239f0f 5416late_LDFLAGS=$LDFLAGS
4af002d6 5417if test "$GCC" = yes; then
fe239f0f
AS
5418 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5419else
5420 LDFLAGS="$LDFLAGS -znocombreloc"
5421fi
5422
d6e01aa5
KL
5423{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5424echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5425cat >conftest.$ac_ext <<_ACEOF
5426main(){return 0;}
5427_ACEOF
5428rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
5429if { (ac_try="$ac_link"
5430case "(($ac_try" in
5431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5432 *) ac_try_echo=$ac_try;;
5433esac
5434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5435 (eval "$ac_link") 2>conftest.er1
fe239f0f 5436 ac_status=$?
edfaf76d
LK
5437 grep -v '^ *+' conftest.er1 >conftest.err
5438 rm -f conftest.er1
5439 cat conftest.err >&5
fe239f0f 5440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5441 (exit $ac_status); } && {
5442 test -z "$ac_c_werror_flag" ||
5443 test ! -s conftest.err
5444 } && test -s conftest$ac_exeext &&
5445 $as_test_x conftest$ac_exeext; then
5446 { echo "$as_me:$LINENO: result: yes" >&5
5447echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5448else
5449 echo "$as_me: failed program was:" >&5
5450sed 's/^/| /' conftest.$ac_ext >&5
5451
d6e01aa5
KL
5452 LDFLAGS=$late_LDFLAGS
5453 { echo "$as_me:$LINENO: result: no" >&5
5454echo "${ECHO_T}no" >&6; }
fe239f0f 5455fi
d6e01aa5
KL
5456
5457rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5458 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5459
3b33a005
DL
5460#### Extract some information from the operating system and machine files.
5461
c0d27fcc 5462{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5463 - which libraries the lib-src programs will want, and
503d2be0
AS
5464 - whether the GNU malloc routines are usable..." >&5
5465echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5466 - which libraries the lib-src programs will want, and
503d2be0 5467 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5468
5469### First figure out CFLAGS (which we use for running the compiler here)
5470### and REAL_CFLAGS (which we use for real compilation).
5471### The two are the same except on a few systems, where they are made
5472### different to work around various lossages. For example,
5473### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5474### as implying static linking.
5475
5476### If the CFLAGS env var is specified, we use that value
5477### instead of the default.
5478
5479### It's not important that this name contain the PID; you can't run
5480### two configures in the same directory and have anything work
5481### anyway.
5482tempcname="conftest.c"
5483
5484echo '
5485#include "'${srcdir}'/src/'${opsysfile}'"
5486#include "'${srcdir}'/src/'${machfile}'"
5487#ifndef LIBS_MACHINE
5488#define LIBS_MACHINE
5489#endif
5490#ifndef LIBS_SYSTEM
5491#define LIBS_SYSTEM
5492#endif
5493#ifndef C_SWITCH_SYSTEM
5494#define C_SWITCH_SYSTEM
5495#endif
5496#ifndef C_SWITCH_MACHINE
5497#define C_SWITCH_MACHINE
5498#endif
5499configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5500configure___ c_switch_system=C_SWITCH_SYSTEM
5501configure___ c_switch_machine=C_SWITCH_MACHINE
5502
5503#ifndef LIB_X11_LIB
5504#define LIB_X11_LIB -lX11
5505#endif
5506
5507#ifndef LIBX11_MACHINE
5508#define LIBX11_MACHINE
5509#endif
5510
5511#ifndef LIBX11_SYSTEM
5512#define LIBX11_SYSTEM
5513#endif
5514configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
5515
5516#ifdef UNEXEC
5517configure___ unexec=UNEXEC
5518#else
5519configure___ unexec=unexec.o
5520#endif
5521
5522#ifdef SYSTEM_MALLOC
5523configure___ system_malloc=yes
5524#else
5525configure___ system_malloc=no
5526#endif
5527
ef9e4345
GM
5528#ifdef USE_MMAP_FOR_BUFFERS
5529configure___ use_mmap_for_buffers=yes
73b77ee5 5530#else
ef9e4345 5531configure___ use_mmap_for_buffers=no
73b77ee5
GM
5532#endif
5533
3b33a005
DL
5534#ifndef C_DEBUG_SWITCH
5535#define C_DEBUG_SWITCH -g
5536#endif
5537
5538#ifndef C_OPTIMIZE_SWITCH
5539#ifdef __GNUC__
5540#define C_OPTIMIZE_SWITCH -O2
5541#else
5542#define C_OPTIMIZE_SWITCH -O
5543#endif
5544#endif
5545
01abe918
CY
5546#ifndef C_WARNINGS_SWITCH
5547#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5548#endif
5549
3b33a005
DL
5550#ifndef LD_SWITCH_MACHINE
5551#define LD_SWITCH_MACHINE
5552#endif
5553
5554#ifndef LD_SWITCH_SYSTEM
5555#define LD_SWITCH_SYSTEM
5556#endif
5557
5558#ifndef LD_SWITCH_X_SITE_AUX
5559#define LD_SWITCH_X_SITE_AUX
503d2be0 5560#endif
3b33a005
DL
5561
5562configure___ ld_switch_system=LD_SWITCH_SYSTEM
5563configure___ ld_switch_machine=LD_SWITCH_MACHINE
5564
5565#ifdef THIS_IS_CONFIGURE
5566
5567/* Get the CFLAGS for tests in configure. */
5568#ifdef __GNUC__
5569configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5570#else
5571configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5572#endif
5573
5574#else /* not THIS_IS_CONFIGURE */
5575
5576/* Get the CFLAGS for real compilation. */
5577#ifdef __GNUC__
01abe918 5578configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5579#else
5580configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5581#endif
5582
5583#endif /* not THIS_IS_CONFIGURE */
5584' > ${tempcname}
5585
5586# The value of CPP is a quoted variable reference, so we need to do this
5587# to get its actual value...
5588CPP=`eval "echo $CPP"`
5589eval `${CPP} -Isrc ${tempcname} \
5590 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5591if test "x$SPECIFIED_CFLAGS" = x; then
5592 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5593 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5594else
5595 REAL_CFLAGS="$CFLAGS"
5596fi
5597rm ${tempcname}
5598
5599ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5600
5601### Make sure subsequent tests use flags consistent with the build flags.
5602
5603if test x"${OVERRIDE_CPPFLAGS}" != x; then
5604 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5605else
5606 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5607fi
5608
6bae0ccf
DL
5609
5610
d6e01aa5 5611# Check whether --enable-largefile was given.
f4988be7 5612if test "${enable_largefile+set}" = set; then
d6e01aa5
KL
5613 enableval=$enable_largefile;
5614fi
f4988be7 5615
503d2be0 5616if test "$enable_largefile" != no; then
f4988be7 5617
d6e01aa5
KL
5618 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5619echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5620if test "${ac_cv_sys_largefile_CC+set}" = set; then
5621 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5622else
f4988be7 5623 ac_cv_sys_largefile_CC=no
503d2be0
AS
5624 if test "$GCC" != yes; then
5625 ac_save_CC=$CC
5626 while :; do
d6e01aa5
KL
5627 # IRIX 6.2 and later do not support large files by default,
5628 # so use the C compiler's -n32 option if that helps.
edfaf76d 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. */
f4988be7 5635#include <sys/types.h>
503d2be0
AS
5636 /* Check that off_t can represent 2**63 - 1 correctly.
5637 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5638 since some C++ compilers masquerading as C compilers
5639 incorrectly reject 9223372036854775807. */
5640#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5641 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5642 && LARGE_OFF_T % 2147483647 == 1)
5643 ? 1 : -1];
5644int
5645main ()
5646{
f4988be7 5647
503d2be0
AS
5648 ;
5649 return 0;
5650}
5651_ACEOF
d6e01aa5
KL
5652 rm -f conftest.$ac_objext
5653if { (ac_try="$ac_compile"
5654case "(($ac_try" in
5655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5656 *) ac_try_echo=$ac_try;;
5657esac
5658eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5659 (eval "$ac_compile") 2>conftest.er1
503d2be0 5660 ac_status=$?
edfaf76d
LK
5661 grep -v '^ *+' conftest.er1 >conftest.err
5662 rm -f conftest.er1
5663 cat conftest.err >&5
c0d27fcc 5664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5665 (exit $ac_status); } && {
5666 test -z "$ac_c_werror_flag" ||
5667 test ! -s conftest.err
5668 } && test -s conftest.$ac_objext; then
503d2be0 5669 break
b192d653 5670else
503d2be0 5671 echo "$as_me: failed program was:" >&5
19650fd6
AS
5672sed 's/^/| /' conftest.$ac_ext >&5
5673
d6e01aa5 5674
503d2be0 5675fi
d6e01aa5
KL
5676
5677rm -f core conftest.err conftest.$ac_objext
5678 CC="$CC -n32"
5679 rm -f conftest.$ac_objext
5680if { (ac_try="$ac_compile"
5681case "(($ac_try" in
5682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5683 *) ac_try_echo=$ac_try;;
5684esac
5685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5686 (eval "$ac_compile") 2>conftest.er1
503d2be0 5687 ac_status=$?
edfaf76d
LK
5688 grep -v '^ *+' conftest.er1 >conftest.err
5689 rm -f conftest.er1
5690 cat conftest.err >&5
c0d27fcc 5691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5692 (exit $ac_status); } && {
5693 test -z "$ac_c_werror_flag" ||
5694 test ! -s conftest.err
5695 } && test -s conftest.$ac_objext; then
503d2be0
AS
5696 ac_cv_sys_largefile_CC=' -n32'; break
5697else
5698 echo "$as_me: failed program was:" >&5
19650fd6
AS
5699sed 's/^/| /' conftest.$ac_ext >&5
5700
d6e01aa5 5701
503d2be0 5702fi
d6e01aa5
KL
5703
5704rm -f core conftest.err conftest.$ac_objext
edfaf76d 5705 break
503d2be0
AS
5706 done
5707 CC=$ac_save_CC
5708 rm -f conftest.$ac_ext
5709 fi
b192d653 5710fi
d6e01aa5
KL
5711{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5712echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5713 if test "$ac_cv_sys_largefile_CC" != no; then
5714 CC=$CC$ac_cv_sys_largefile_CC
5715 fi
b192d653 5716
d6e01aa5
KL
5717 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5718echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5719if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5720 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5721else
503d2be0 5722 while :; do
503d2be0 5723 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5724/* confdefs.h. */
5725_ACEOF
5726cat confdefs.h >>conftest.$ac_ext
5727cat >>conftest.$ac_ext <<_ACEOF
5728/* end confdefs.h. */
f4988be7 5729#include <sys/types.h>
503d2be0
AS
5730 /* Check that off_t can represent 2**63 - 1 correctly.
5731 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5732 since some C++ compilers masquerading as C compilers
5733 incorrectly reject 9223372036854775807. */
5734#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5735 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5736 && LARGE_OFF_T % 2147483647 == 1)
5737 ? 1 : -1];
5738int
5739main ()
5740{
f4988be7 5741
503d2be0
AS
5742 ;
5743 return 0;
5744}
5745_ACEOF
5746rm -f conftest.$ac_objext
d6e01aa5
KL
5747if { (ac_try="$ac_compile"
5748case "(($ac_try" in
5749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5750 *) ac_try_echo=$ac_try;;
5751esac
5752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5753 (eval "$ac_compile") 2>conftest.er1
503d2be0 5754 ac_status=$?
edfaf76d
LK
5755 grep -v '^ *+' conftest.er1 >conftest.err
5756 rm -f conftest.er1
5757 cat conftest.err >&5
c0d27fcc 5758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5759 (exit $ac_status); } && {
5760 test -z "$ac_c_werror_flag" ||
5761 test ! -s conftest.err
5762 } && test -s conftest.$ac_objext; then
5763 ac_cv_sys_file_offset_bits=no; break
f4988be7 5764else
503d2be0 5765 echo "$as_me: failed program was:" >&5
19650fd6
AS
5766sed 's/^/| /' conftest.$ac_ext >&5
5767
d6e01aa5 5768
503d2be0 5769fi
d6e01aa5
KL
5770
5771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5772 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5773/* confdefs.h. */
5774_ACEOF
5775cat confdefs.h >>conftest.$ac_ext
5776cat >>conftest.$ac_ext <<_ACEOF
5777/* end confdefs.h. */
f4988be7
GM
5778#define _FILE_OFFSET_BITS 64
5779#include <sys/types.h>
503d2be0
AS
5780 /* Check that off_t can represent 2**63 - 1 correctly.
5781 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5782 since some C++ compilers masquerading as C compilers
5783 incorrectly reject 9223372036854775807. */
5784#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5785 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5786 && LARGE_OFF_T % 2147483647 == 1)
5787 ? 1 : -1];
5788int
5789main ()
5790{
5791
5792 ;
5793 return 0;
5794}
5795_ACEOF
5796rm -f conftest.$ac_objext
d6e01aa5
KL
5797if { (ac_try="$ac_compile"
5798case "(($ac_try" in
5799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5800 *) ac_try_echo=$ac_try;;
5801esac
5802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5803 (eval "$ac_compile") 2>conftest.er1
503d2be0 5804 ac_status=$?
edfaf76d
LK
5805 grep -v '^ *+' conftest.er1 >conftest.err
5806 rm -f conftest.er1
5807 cat conftest.err >&5
c0d27fcc 5808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5809 (exit $ac_status); } && {
5810 test -z "$ac_c_werror_flag" ||
5811 test ! -s conftest.err
5812 } && test -s conftest.$ac_objext; then
503d2be0
AS
5813 ac_cv_sys_file_offset_bits=64; break
5814else
5815 echo "$as_me: failed program was:" >&5
19650fd6
AS
5816sed 's/^/| /' conftest.$ac_ext >&5
5817
d6e01aa5 5818
503d2be0 5819fi
d6e01aa5
KL
5820
5821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5822 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5823 break
5824done
ba4481b5 5825fi
d6e01aa5
KL
5826{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5827echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
5828case $ac_cv_sys_file_offset_bits in #(
5829 no | unknown) ;;
5830 *)
c0d27fcc 5831cat >>confdefs.h <<_ACEOF
f4988be7 5832#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5833_ACEOF
d6e01aa5
KL
5834;;
5835esac
503d2be0 5836rm -f conftest*
d6e01aa5
KL
5837 if test $ac_cv_sys_file_offset_bits = unknown; then
5838 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
5839echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5840if test "${ac_cv_sys_large_files+set}" = set; then
5841 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5842else
503d2be0 5843 while :; do
503d2be0 5844 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5845/* confdefs.h. */
5846_ACEOF
5847cat confdefs.h >>conftest.$ac_ext
5848cat >>conftest.$ac_ext <<_ACEOF
5849/* end confdefs.h. */
503d2be0
AS
5850#include <sys/types.h>
5851 /* Check that off_t can represent 2**63 - 1 correctly.
5852 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5853 since some C++ compilers masquerading as C compilers
5854 incorrectly reject 9223372036854775807. */
5855#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5856 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5857 && LARGE_OFF_T % 2147483647 == 1)
5858 ? 1 : -1];
5859int
5860main ()
5861{
ba4481b5 5862
503d2be0
AS
5863 ;
5864 return 0;
5865}
5866_ACEOF
5867rm -f conftest.$ac_objext
d6e01aa5
KL
5868if { (ac_try="$ac_compile"
5869case "(($ac_try" in
5870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5871 *) ac_try_echo=$ac_try;;
5872esac
5873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5874 (eval "$ac_compile") 2>conftest.er1
503d2be0 5875 ac_status=$?
edfaf76d
LK
5876 grep -v '^ *+' conftest.er1 >conftest.err
5877 rm -f conftest.er1
5878 cat conftest.err >&5
c0d27fcc 5879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5880 (exit $ac_status); } && {
5881 test -z "$ac_c_werror_flag" ||
5882 test ! -s conftest.err
5883 } && test -s conftest.$ac_objext; then
5884 ac_cv_sys_large_files=no; break
ba4481b5 5885else
503d2be0 5886 echo "$as_me: failed program was:" >&5
19650fd6
AS
5887sed 's/^/| /' conftest.$ac_ext >&5
5888
d6e01aa5 5889
503d2be0 5890fi
d6e01aa5
KL
5891
5892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5893 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5894/* confdefs.h. */
5895_ACEOF
5896cat confdefs.h >>conftest.$ac_ext
5897cat >>conftest.$ac_ext <<_ACEOF
5898/* end confdefs.h. */
f4988be7 5899#define _LARGE_FILES 1
503d2be0
AS
5900#include <sys/types.h>
5901 /* Check that off_t can represent 2**63 - 1 correctly.
5902 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5903 since some C++ compilers masquerading as C compilers
5904 incorrectly reject 9223372036854775807. */
5905#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5906 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5907 && LARGE_OFF_T % 2147483647 == 1)
5908 ? 1 : -1];
5909int
5910main ()
5911{
f4988be7 5912
503d2be0
AS
5913 ;
5914 return 0;
5915}
5916_ACEOF
5917rm -f conftest.$ac_objext
d6e01aa5
KL
5918if { (ac_try="$ac_compile"
5919case "(($ac_try" in
5920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5921 *) ac_try_echo=$ac_try;;
5922esac
5923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5924 (eval "$ac_compile") 2>conftest.er1
503d2be0 5925 ac_status=$?
edfaf76d
LK
5926 grep -v '^ *+' conftest.er1 >conftest.err
5927 rm -f conftest.er1
5928 cat conftest.err >&5
c0d27fcc 5929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
5930 (exit $ac_status); } && {
5931 test -z "$ac_c_werror_flag" ||
5932 test ! -s conftest.err
5933 } && test -s conftest.$ac_objext; then
503d2be0
AS
5934 ac_cv_sys_large_files=1; break
5935else
5936 echo "$as_me: failed program was:" >&5
19650fd6
AS
5937sed 's/^/| /' conftest.$ac_ext >&5
5938
d6e01aa5 5939
503d2be0 5940fi
d6e01aa5
KL
5941
5942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5943 ac_cv_sys_large_files=unknown
503d2be0
AS
5944 break
5945done
ba4481b5 5946fi
d6e01aa5
KL
5947{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5948echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
5949case $ac_cv_sys_large_files in #(
5950 no | unknown) ;;
5951 *)
c0d27fcc 5952cat >>confdefs.h <<_ACEOF
f4988be7 5953#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5954_ACEOF
d6e01aa5
KL
5955;;
5956esac
503d2be0 5957rm -f conftest*
d6e01aa5 5958 fi
503d2be0 5959fi
ba4481b5 5960
c0d27fcc 5961
439f58ee 5962
bc5d9888
CY
5963### The standard library on x86-64 GNU/Linux distributions can
5964### be located in either /usr/lib64 or /usr/lib.
5965case "${canonical}" in
5966 x86_64-*-linux-gnu* )
5967 if test -d /usr/lib64; then
5968
5969cat >>confdefs.h <<\_ACEOF
5970#define HAVE_X86_64_LIB64_DIR 1
5971_ACEOF
5972
5973fi
5974esac
5975
439f58ee
JD
5976
5977
5978
2c9dccc9
PJ
5979if test "${with_sound}" != "no"; then
5980 # Sound support for GNU/Linux and the free BSDs.
d6e01aa5
KL
5981 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5982echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
c0d27fcc
MR
5983if test "${ac_cv_header_stdc+set}" = set; then
5984 echo $ECHO_N "(cached) $ECHO_C" >&6
5985else
5986 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5987/* confdefs.h. */
5988_ACEOF
5989cat confdefs.h >>conftest.$ac_ext
5990cat >>conftest.$ac_ext <<_ACEOF
5991/* end confdefs.h. */
c0d27fcc
MR
5992#include <stdlib.h>
5993#include <stdarg.h>
5994#include <string.h>
5995#include <float.h>
98418dba 5996
19650fd6
AS
5997int
5998main ()
5999{
6000
6001 ;
6002 return 0;
6003}
c0d27fcc 6004_ACEOF
19650fd6 6005rm -f conftest.$ac_objext
d6e01aa5
KL
6006if { (ac_try="$ac_compile"
6007case "(($ac_try" in
6008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6009 *) ac_try_echo=$ac_try;;
6010esac
6011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6012 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6013 ac_status=$?
edfaf76d
LK
6014 grep -v '^ *+' conftest.er1 >conftest.err
6015 rm -f conftest.er1
6016 cat conftest.err >&5
cd958eb3 6017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6018 (exit $ac_status); } && {
6019 test -z "$ac_c_werror_flag" ||
6020 test ! -s conftest.err
6021 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6022 ac_cv_header_stdc=yes
6023else
6024 echo "$as_me: failed program was:" >&5
19650fd6
AS
6025sed 's/^/| /' conftest.$ac_ext >&5
6026
d6e01aa5 6027 ac_cv_header_stdc=no
c0d27fcc 6028fi
d6e01aa5
KL
6029
6030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
6031
6032if test $ac_cv_header_stdc = yes; then
6033 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6034 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6035/* confdefs.h. */
6036_ACEOF
6037cat confdefs.h >>conftest.$ac_ext
6038cat >>conftest.$ac_ext <<_ACEOF
6039/* end confdefs.h. */
c0d27fcc
MR
6040#include <string.h>
6041
6042_ACEOF
6043if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6044 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
6045 :
6046else
6047 ac_cv_header_stdc=no
6048fi
6049rm -f conftest*
6050
6051fi
6052
6053if test $ac_cv_header_stdc = yes; then
6054 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6055 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6056/* confdefs.h. */
6057_ACEOF
6058cat confdefs.h >>conftest.$ac_ext
6059cat >>conftest.$ac_ext <<_ACEOF
6060/* end confdefs.h. */
c0d27fcc
MR
6061#include <stdlib.h>
6062
6063_ACEOF
6064if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6065 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
6066 :
6067else
6068 ac_cv_header_stdc=no
6069fi
6070rm -f conftest*
6071
6072fi
6073
6074if test $ac_cv_header_stdc = yes; then
6075 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6076 if test "$cross_compiling" = yes; then
6077 :
6078else
6079 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6080/* confdefs.h. */
6081_ACEOF
6082cat confdefs.h >>conftest.$ac_ext
6083cat >>conftest.$ac_ext <<_ACEOF
6084/* end confdefs.h. */
c0d27fcc 6085#include <ctype.h>
d6e01aa5 6086#include <stdlib.h>
c0d27fcc
MR
6087#if ((' ' & 0x0FF) == 0x020)
6088# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6089# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6090#else
19650fd6 6091# define ISLOWER(c) \
edfaf76d
LK
6092 (('a' <= (c) && (c) <= 'i') \
6093 || ('j' <= (c) && (c) <= 'r') \
6094 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
6095# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6096#endif
6097
6098#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6099int
6100main ()
6101{
6102 int i;
6103 for (i = 0; i < 256; i++)
6104 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6105 || toupper (i) != TOUPPER (i))
d6e01aa5
KL
6106 return 2;
6107 return 0;
c0d27fcc
MR
6108}
6109_ACEOF
6110rm -f conftest$ac_exeext
d6e01aa5
KL
6111if { (ac_try="$ac_link"
6112case "(($ac_try" in
6113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6114 *) ac_try_echo=$ac_try;;
6115esac
6116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6117 (eval "$ac_link") 2>&5
c0d27fcc
MR
6118 ac_status=$?
6119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6120 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
6121 { (case "(($ac_try" in
6122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6123 *) ac_try_echo=$ac_try;;
6124esac
6125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6126 (eval "$ac_try") 2>&5
c0d27fcc
MR
6127 ac_status=$?
6128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6129 (exit $ac_status); }; }; then
6130 :
6131else
6132 echo "$as_me: program exited with status $ac_status" >&5
6133echo "$as_me: failed program was:" >&5
19650fd6
AS
6134sed 's/^/| /' conftest.$ac_ext >&5
6135
c0d27fcc
MR
6136( exit $ac_status )
6137ac_cv_header_stdc=no
6138fi
d6e01aa5 6139rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6140fi
d6e01aa5
KL
6141
6142
c0d27fcc
MR
6143fi
6144fi
d6e01aa5
KL
6145{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6146echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
c0d27fcc
MR
6147if test $ac_cv_header_stdc = yes; then
6148
6149cat >>confdefs.h <<\_ACEOF
6150#define STDC_HEADERS 1
6151_ACEOF
6152
6153fi
6154
6155# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 6166 inttypes.h stdint.h unistd.h
98418dba
CW
6167do
6168as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
6169{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6170echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6171if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6172 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6173else
925c2f3f 6174 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6175/* confdefs.h. */
6176_ACEOF
6177cat confdefs.h >>conftest.$ac_ext
6178cat >>conftest.$ac_ext <<_ACEOF
6179/* end confdefs.h. */
c0d27fcc
MR
6180$ac_includes_default
6181
6182#include <$ac_header>
6183_ACEOF
6184rm -f conftest.$ac_objext
d6e01aa5
KL
6185if { (ac_try="$ac_compile"
6186case "(($ac_try" in
6187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6188 *) ac_try_echo=$ac_try;;
6189esac
6190eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6191 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6192 ac_status=$?
edfaf76d
LK
6193 grep -v '^ *+' conftest.er1 >conftest.err
6194 rm -f conftest.er1
6195 cat conftest.err >&5
c0d27fcc 6196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6197 (exit $ac_status); } && {
6198 test -z "$ac_c_werror_flag" ||
6199 test ! -s conftest.err
6200 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6201 eval "$as_ac_Header=yes"
6202else
6203 echo "$as_me: failed program was:" >&5
19650fd6
AS
6204sed 's/^/| /' conftest.$ac_ext >&5
6205
d6e01aa5 6206 eval "$as_ac_Header=no"
c0d27fcc 6207fi
d6e01aa5
KL
6208
6209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6210fi
d6e01aa5
KL
6211ac_res=`eval echo '${'$as_ac_Header'}'`
6212 { echo "$as_me:$LINENO: result: $ac_res" >&5
6213echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6214if test `eval echo '${'$as_ac_Header'}'` = yes; then
6215 cat >>confdefs.h <<_ACEOF
6216#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6217_ACEOF
6218
6219fi
6220
6221done
6222
6223
6224
6225
6226
6227for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
6228do
6229as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
6230if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6231 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6232echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6233if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6234 echo $ECHO_N "(cached) $ECHO_C" >&6
6235fi
d6e01aa5
KL
6236ac_res=`eval echo '${'$as_ac_Header'}'`
6237 { echo "$as_me:$LINENO: result: $ac_res" >&5
6238echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6239else
6240 # Is the header compilable?
d6e01aa5
KL
6241{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6242echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6243cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6244/* confdefs.h. */
6245_ACEOF
6246cat confdefs.h >>conftest.$ac_ext
6247cat >>conftest.$ac_ext <<_ACEOF
6248/* end confdefs.h. */
c0d27fcc 6249$ac_includes_default
98418dba 6250#include <$ac_header>
503d2be0 6251_ACEOF
c0d27fcc 6252rm -f conftest.$ac_objext
d6e01aa5
KL
6253if { (ac_try="$ac_compile"
6254case "(($ac_try" in
6255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6256 *) ac_try_echo=$ac_try;;
6257esac
6258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6259 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6260 ac_status=$?
edfaf76d
LK
6261 grep -v '^ *+' conftest.er1 >conftest.err
6262 rm -f conftest.er1
6263 cat conftest.err >&5
c0d27fcc 6264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6265 (exit $ac_status); } && {
6266 test -z "$ac_c_werror_flag" ||
6267 test ! -s conftest.err
6268 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6269 ac_header_compiler=yes
6270else
6271 echo "$as_me: failed program was:" >&5
19650fd6
AS
6272sed 's/^/| /' conftest.$ac_ext >&5
6273
d6e01aa5 6274 ac_header_compiler=no
c0d27fcc 6275fi
d6e01aa5
KL
6276
6277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6278{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6279echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6280
6281# Is the header present?
d6e01aa5
KL
6282{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6283echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6284cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6285/* confdefs.h. */
6286_ACEOF
6287cat confdefs.h >>conftest.$ac_ext
6288cat >>conftest.$ac_ext <<_ACEOF
6289/* end confdefs.h. */
c0d27fcc
MR
6290#include <$ac_header>
6291_ACEOF
d6e01aa5
KL
6292if { (ac_try="$ac_cpp conftest.$ac_ext"
6293case "(($ac_try" in
6294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6295 *) ac_try_echo=$ac_try;;
6296esac
6297eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6298 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6299 ac_status=$?
6bae0ccf 6300 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6301 rm -f conftest.er1
6302 cat conftest.err >&5
c0d27fcc 6303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6304 (exit $ac_status); } >/dev/null && {
6305 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6306 test ! -s conftest.err
6307 }; then
c0d27fcc 6308 ac_header_preproc=yes
f4988be7 6309else
503d2be0 6310 echo "$as_me: failed program was:" >&5
19650fd6
AS
6311sed 's/^/| /' conftest.$ac_ext >&5
6312
c0d27fcc 6313 ac_header_preproc=no
f4988be7 6314fi
d6e01aa5 6315
98418dba 6316rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
6317{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6318echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6319
6320# So? What about this header?
edfaf76d
LK
6321case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6322 yes:no: )
c0d27fcc
MR
6323 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6324echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6325 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6326echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6327 ac_header_preproc=yes
19650fd6 6328 ;;
edfaf76d 6329 no:yes:* )
c0d27fcc
MR
6330 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6331echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6332 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6333echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6334 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6335echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6336 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6337echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6338 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6339echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6340 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6341echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 6342
19650fd6 6343 ;;
c0d27fcc 6344esac
d6e01aa5
KL
6345{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6346echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6347if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6348 echo $ECHO_N "(cached) $ECHO_C" >&6
6349else
edfaf76d 6350 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6351fi
d6e01aa5
KL
6352ac_res=`eval echo '${'$as_ac_Header'}'`
6353 { echo "$as_me:$LINENO: result: $ac_res" >&5
6354echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6355
6356fi
98418dba 6357if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6358 cat >>confdefs.h <<_ACEOF
98418dba 6359#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6360_ACEOF
f4988be7
GM
6361
6362fi
c0d27fcc 6363
98418dba
CW
6364done
6365
6366 # Emulation library used on NetBSD.
d6e01aa5
KL
6367 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6368echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6369if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6370 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6371else
98418dba
CW
6372 ac_check_lib_save_LIBS=$LIBS
6373LIBS="-lossaudio $LIBS"
6374cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6375/* confdefs.h. */
6376_ACEOF
6377cat confdefs.h >>conftest.$ac_ext
6378cat >>conftest.$ac_ext <<_ACEOF
6379/* end confdefs.h. */
98418dba 6380
d6e01aa5
KL
6381/* Override any GCC internal prototype to avoid an error.
6382 Use char because int might match the return type of a GCC
6383 builtin and then its argument prototype would still apply. */
98418dba
CW
6384#ifdef __cplusplus
6385extern "C"
f4988be7 6386#endif
98418dba 6387char _oss_ioctl ();
503d2be0
AS
6388int
6389main ()
6390{
d6e01aa5 6391return _oss_ioctl ();
503d2be0
AS
6392 ;
6393 return 0;
6394}
6395_ACEOF
98418dba 6396rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
6397if { (ac_try="$ac_link"
6398case "(($ac_try" in
6399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6400 *) ac_try_echo=$ac_try;;
6401esac
6402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6403 (eval "$ac_link") 2>conftest.er1
503d2be0 6404 ac_status=$?
edfaf76d
LK
6405 grep -v '^ *+' conftest.er1 >conftest.err
6406 rm -f conftest.er1
6407 cat conftest.err >&5
c0d27fcc 6408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6409 (exit $ac_status); } && {
6410 test -z "$ac_c_werror_flag" ||
6411 test ! -s conftest.err
6412 } && test -s conftest$ac_exeext &&
6413 $as_test_x conftest$ac_exeext; then
98418dba 6414 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6415else
503d2be0 6416 echo "$as_me: failed program was:" >&5
19650fd6
AS
6417sed 's/^/| /' conftest.$ac_ext >&5
6418
d6e01aa5 6419 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6420fi
d6e01aa5
KL
6421
6422rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6423 conftest$ac_exeext conftest.$ac_ext
98418dba 6424LIBS=$ac_check_lib_save_LIBS
f4988be7 6425fi
d6e01aa5
KL
6426{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6427echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6428if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6429 LIBSOUND=-lossaudio
6430else
6431 LIBSOUND=
6432fi
6433
c0d27fcc 6434
439f58ee
JD
6435
6436 ALSA_REQUIRED=1.0.0
6437 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
6438 if test "X${with_pkg_config_prog}" != X; then
6439 PKG_CONFIG="${with_pkg_config_prog}"
6440 fi
6441
6442 succeeded=no
6443
6444 if test -z "$PKG_CONFIG"; then
6445 # Extract the first word of "pkg-config", so it can be a program name with args.
6446set dummy pkg-config; ac_word=$2
d6e01aa5
KL
6447{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6448echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6449if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6450 echo $ECHO_N "(cached) $ECHO_C" >&6
6451else
6452 case $PKG_CONFIG in
6453 [\\/]* | ?:[\\/]*)
6454 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6455 ;;
6456 *)
6457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6458for as_dir in $PATH
6459do
6460 IFS=$as_save_IFS
6461 test -z "$as_dir" && as_dir=.
6462 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 6463 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6464 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6465 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6466 break 2
6467 fi
6468done
6469done
d6e01aa5 6470IFS=$as_save_IFS
439f58ee
JD
6471
6472 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6473 ;;
6474esac
6475fi
6476PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6477if test -n "$PKG_CONFIG"; then
d6e01aa5
KL
6478 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6479echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6480else
d6e01aa5
KL
6481 { echo "$as_me:$LINENO: result: no" >&5
6482echo "${ECHO_T}no" >&6; }
439f58ee
JD
6483fi
6484
d6e01aa5 6485
439f58ee
JD
6486 fi
6487
6488 if test "$PKG_CONFIG" = "no" ; then
6489 HAVE_ALSA=no
6490 else
6491 PKG_CONFIG_MIN_VERSION=0.9.0
6492 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
d6e01aa5
KL
6493 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6494echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6495
67db6aa2 6496 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
d6e01aa5
KL
6497 { echo "$as_me:$LINENO: result: yes" >&5
6498echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6499 succeeded=yes
6500
d6e01aa5
KL
6501 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6502echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6503 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
d6e01aa5
KL
6504 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6505echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6506
d6e01aa5
KL
6507 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6508echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6509 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
d6e01aa5
KL
6510 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6511echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6512 else
d6e01aa5
KL
6513 { echo "$as_me:$LINENO: result: no" >&5
6514echo "${ECHO_T}no" >&6; }
439f58ee
JD
6515 ALSA_CFLAGS=""
6516 ALSA_LIBS=""
6517 ## If we have a custom action on failure, don't print errors, but
6518 ## do set a variable so people can do so.
6519 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6520
6521 fi
6522
6523
6524
6525 else
6526 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6527 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6528 fi
6529 fi
6530
6531 if test $succeeded = yes; then
6532 HAVE_ALSA=yes
6533 else
6534 HAVE_ALSA=no
6535 fi
6536
6537 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6538 SAVE_CFLAGS="$CFLAGS"
6539 SAVE_LDFLAGS="$LDFLAGS"
6540 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6541 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6542 cat >conftest.$ac_ext <<_ACEOF
6543/* confdefs.h. */
6544_ACEOF
6545cat confdefs.h >>conftest.$ac_ext
6546cat >>conftest.$ac_ext <<_ACEOF
6547/* end confdefs.h. */
6548#include <asoundlib.h>
6549int
6550main ()
6551{
6552snd_lib_error_set_handler (0);
6553 ;
6554 return 0;
6555}
6556_ACEOF
6557rm -f conftest.$ac_objext
6558if { (ac_try="$ac_compile"
6559case "(($ac_try" in
6560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6561 *) ac_try_echo=$ac_try;;
6562esac
6563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6564 (eval "$ac_compile") 2>conftest.er1
6565 ac_status=$?
6566 grep -v '^ *+' conftest.er1 >conftest.err
6567 rm -f conftest.er1
6568 cat conftest.err >&5
6569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6570 (exit $ac_status); } && {
6571 test -z "$ac_c_werror_flag" ||
6572 test ! -s conftest.err
6573 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6574 emacs_alsa_normal=yes
6575else
6576 echo "$as_me: failed program was:" >&5
6577sed 's/^/| /' conftest.$ac_ext >&5
6578
6579 emacs_alsa_normal=no
6580fi
6581
6582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6583 if test "$emacs_alsa_normal" != yes; then
6584 cat >conftest.$ac_ext <<_ACEOF
6585/* confdefs.h. */
6586_ACEOF
6587cat confdefs.h >>conftest.$ac_ext
6588cat >>conftest.$ac_ext <<_ACEOF
6589/* end confdefs.h. */
6590#include <alsa/asoundlib.h>
6591int
6592main ()
6593{
6594snd_lib_error_set_handler (0);
6595 ;
6596 return 0;
6597}
6598_ACEOF
6599rm -f conftest.$ac_objext
6600if { (ac_try="$ac_compile"
6601case "(($ac_try" in
6602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6603 *) ac_try_echo=$ac_try;;
6604esac
6605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6606 (eval "$ac_compile") 2>conftest.er1
6607 ac_status=$?
6608 grep -v '^ *+' conftest.er1 >conftest.err
6609 rm -f conftest.er1
6610 cat conftest.err >&5
6611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6612 (exit $ac_status); } && {
6613 test -z "$ac_c_werror_flag" ||
6614 test ! -s conftest.err
6615 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6616 emacs_alsa_subdir=yes
6617else
6618 echo "$as_me: failed program was:" >&5
6619sed 's/^/| /' conftest.$ac_ext >&5
6620
6621 emacs_alsa_subdir=no
6622fi
6623
6624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6625 if test "$emacs_alsa_subdir" != yes; then
6626 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6627echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6628 { (exit 1); exit 1; }; }
6629 fi
6630 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6631 fi
6632
6633 CFLAGS="$SAVE_CFLAGS"
6634 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6635 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6636 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6637
6638cat >>confdefs.h <<\_ACEOF
6639#define HAVE_ALSA 1
6640_ACEOF
6641
6642 fi
6643
f4988be7 6644fi
c0d27fcc
MR
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
22044edf
DL
6663
6664
973a76b1 6665
cffcede7 6666
551ffc27 6667
226e2359 6668
c0d27fcc 6669
f4988be7 6670
98418dba
CW
6671for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6672 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6673 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6674 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6675 sys/utsname.h pwd.h
98418dba
CW
6676do
6677as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
6678if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6679 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6680echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6681if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6682 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6683fi
d6e01aa5
KL
6684ac_res=`eval echo '${'$as_ac_Header'}'`
6685 { echo "$as_me:$LINENO: result: $ac_res" >&5
6686echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6687else
c0d27fcc 6688 # Is the header compilable?
d6e01aa5
KL
6689{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6690echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6691cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6692/* confdefs.h. */
6693_ACEOF
6694cat confdefs.h >>conftest.$ac_ext
6695cat >>conftest.$ac_ext <<_ACEOF
6696/* end confdefs.h. */
c0d27fcc
MR
6697$ac_includes_default
6698#include <$ac_header>
6699_ACEOF
6700rm -f conftest.$ac_objext
d6e01aa5
KL
6701if { (ac_try="$ac_compile"
6702case "(($ac_try" in
6703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6704 *) ac_try_echo=$ac_try;;
6705esac
6706eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6707 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6708 ac_status=$?
edfaf76d
LK
6709 grep -v '^ *+' conftest.er1 >conftest.err
6710 rm -f conftest.er1
6711 cat conftest.err >&5
c0d27fcc 6712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6713 (exit $ac_status); } && {
6714 test -z "$ac_c_werror_flag" ||
6715 test ! -s conftest.err
6716 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6717 ac_header_compiler=yes
6718else
6719 echo "$as_me: failed program was:" >&5
19650fd6
AS
6720sed 's/^/| /' conftest.$ac_ext >&5
6721
d6e01aa5 6722 ac_header_compiler=no
c0d27fcc 6723fi
d6e01aa5
KL
6724
6725rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6726{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6727echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6728
6729# Is the header present?
d6e01aa5
KL
6730{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6731echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6732cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6733/* confdefs.h. */
6734_ACEOF
6735cat confdefs.h >>conftest.$ac_ext
6736cat >>conftest.$ac_ext <<_ACEOF
6737/* end confdefs.h. */
98418dba 6738#include <$ac_header>
503d2be0 6739_ACEOF
d6e01aa5
KL
6740if { (ac_try="$ac_cpp conftest.$ac_ext"
6741case "(($ac_try" in
6742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6743 *) ac_try_echo=$ac_try;;
6744esac
6745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6746 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6747 ac_status=$?
6bae0ccf 6748 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6749 rm -f conftest.er1
6750 cat conftest.err >&5
c0d27fcc 6751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6752 (exit $ac_status); } >/dev/null && {
6753 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6754 test ! -s conftest.err
6755 }; then
c0d27fcc 6756 ac_header_preproc=yes
34ec9ebe 6757else
503d2be0 6758 echo "$as_me: failed program was:" >&5
19650fd6
AS
6759sed 's/^/| /' conftest.$ac_ext >&5
6760
c0d27fcc 6761 ac_header_preproc=no
34ec9ebe 6762fi
d6e01aa5 6763
98418dba 6764rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
6765{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6766echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6767
6768# So? What about this header?
edfaf76d
LK
6769case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6770 yes:no: )
c0d27fcc
MR
6771 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6772echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6773 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6774echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6775 ac_header_preproc=yes
19650fd6 6776 ;;
edfaf76d 6777 no:yes:* )
c0d27fcc
MR
6778 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6779echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6780 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6781echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6782 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6783echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6784 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6785echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6786 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6787echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6788 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6789echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 6790
19650fd6 6791 ;;
c0d27fcc 6792esac
d6e01aa5
KL
6793{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6794echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6795if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6796 echo $ECHO_N "(cached) $ECHO_C" >&6
6797else
edfaf76d 6798 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6799fi
d6e01aa5
KL
6800ac_res=`eval echo '${'$as_ac_Header'}'`
6801 { echo "$as_me:$LINENO: result: $ac_res" >&5
6802echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6803
6804fi
98418dba 6805if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6806 cat >>confdefs.h <<_ACEOF
98418dba 6807#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6808_ACEOF
34ec9ebe 6809
98418dba 6810fi
c0d27fcc 6811
98418dba
CW
6812done
6813
22044edf 6814
d6e01aa5
KL
6815{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6816echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6817cat >conftest.$ac_ext <<_ACEOF
6818/* confdefs.h. */
6819_ACEOF
6820cat confdefs.h >>conftest.$ac_ext
6821cat >>conftest.$ac_ext <<_ACEOF
6822/* end confdefs.h. */
6823#include <sys/personality.h>
6824int
6825main ()
6826{
6827personality (PER_LINUX32)
6828 ;
6829 return 0;
6830}
6831_ACEOF
6832rm -f conftest.$ac_objext
d6e01aa5
KL
6833if { (ac_try="$ac_compile"
6834case "(($ac_try" in
6835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6836 *) ac_try_echo=$ac_try;;
6837esac
6838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6839 (eval "$ac_compile") 2>conftest.er1
f17e308a 6840 ac_status=$?
edfaf76d
LK
6841 grep -v '^ *+' conftest.er1 >conftest.err
6842 rm -f conftest.er1
6843 cat conftest.err >&5
f17e308a 6844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6845 (exit $ac_status); } && {
6846 test -z "$ac_c_werror_flag" ||
6847 test ! -s conftest.err
6848 } && test -s conftest.$ac_objext; then
f17e308a
JD
6849 emacs_cv_personality_linux32=yes
6850else
6851 echo "$as_me: failed program was:" >&5
6852sed 's/^/| /' conftest.$ac_ext >&5
6853
d6e01aa5 6854 emacs_cv_personality_linux32=no
f17e308a 6855fi
d6e01aa5
KL
6856
6857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6858{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6859echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6860
6861if test $emacs_cv_personality_linux32 = yes; then
6862
6863cat >>confdefs.h <<\_ACEOF
6864#define HAVE_PERSONALITY_LINUX32 1
6865_ACEOF
6866
6867fi
6868
6869
22044edf
DL
6870for ac_header in term.h
6871do
6872as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
6873{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6874echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6875if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6876 echo $ECHO_N "(cached) $ECHO_C" >&6
6877else
6878 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6879/* confdefs.h. */
6880_ACEOF
6881cat confdefs.h >>conftest.$ac_ext
6882cat >>conftest.$ac_ext <<_ACEOF
6883/* end confdefs.h. */
22044edf
DL
6884#include <$ac_header>
6885_ACEOF
d6e01aa5
KL
6886if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6893 ac_status=$?
6894 grep -v '^ *+' conftest.er1 >conftest.err
6895 rm -f conftest.er1
6896 cat conftest.err >&5
6897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6898 (exit $ac_status); } >/dev/null && {
6899 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6900 test ! -s conftest.err
6901 }; then
22044edf
DL
6902 eval "$as_ac_Header=yes"
6903else
6904 echo "$as_me: failed program was:" >&5
19650fd6
AS
6905sed 's/^/| /' conftest.$ac_ext >&5
6906
22044edf
DL
6907 eval "$as_ac_Header=no"
6908fi
d6e01aa5 6909
22044edf
DL
6910rm -f conftest.err conftest.$ac_ext
6911fi
d6e01aa5
KL
6912ac_res=`eval echo '${'$as_ac_Header'}'`
6913 { echo "$as_me:$LINENO: result: $ac_res" >&5
6914echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6915if test `eval echo '${'$as_ac_Header'}'` = yes; then
6916 cat >>confdefs.h <<_ACEOF
6917#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6918_ACEOF
6919
6920fi
6921
6922done
6923
d6e01aa5
KL
6924{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6925echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6926if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6927 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6928else
503d2be0 6929 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6930/* confdefs.h. */
6931_ACEOF
6932cat confdefs.h >>conftest.$ac_ext
6933cat >>conftest.$ac_ext <<_ACEOF
6934/* end confdefs.h. */
98418dba
CW
6935#include <stdlib.h>
6936#include <stdarg.h>
6937#include <string.h>
6938#include <float.h>
6939
19650fd6
AS
6940int
6941main ()
6942{
6943
6944 ;
6945 return 0;
6946}
98418dba 6947_ACEOF
19650fd6 6948rm -f conftest.$ac_objext
d6e01aa5
KL
6949if { (ac_try="$ac_compile"
6950case "(($ac_try" in
6951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6952 *) ac_try_echo=$ac_try;;
6953esac
6954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6955 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6956 ac_status=$?
edfaf76d
LK
6957 grep -v '^ *+' conftest.er1 >conftest.err
6958 rm -f conftest.er1
6959 cat conftest.err >&5
cd958eb3 6960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
6961 (exit $ac_status); } && {
6962 test -z "$ac_c_werror_flag" ||
6963 test ! -s conftest.err
6964 } && test -s conftest.$ac_objext; then
98418dba 6965 ac_cv_header_stdc=yes
ba4481b5 6966else
503d2be0 6967 echo "$as_me: failed program was:" >&5
19650fd6
AS
6968sed 's/^/| /' conftest.$ac_ext >&5
6969
d6e01aa5 6970 ac_cv_header_stdc=no
ba4481b5 6971fi
d6e01aa5
KL
6972
6973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6974
6975if test $ac_cv_header_stdc = yes; then
6976 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6977 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6978/* confdefs.h. */
6979_ACEOF
6980cat confdefs.h >>conftest.$ac_ext
6981cat >>conftest.$ac_ext <<_ACEOF
6982/* end confdefs.h. */
98418dba
CW
6983#include <string.h>
6984
6985_ACEOF
6986if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6987 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6988 :
6989else
6990 ac_cv_header_stdc=no
ba4481b5 6991fi
98418dba 6992rm -f conftest*
ba4481b5
DL
6993
6994fi
6995
98418dba
CW
6996if test $ac_cv_header_stdc = yes; then
6997 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6998 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6999/* confdefs.h. */
7000_ACEOF
7001cat confdefs.h >>conftest.$ac_ext
7002cat >>conftest.$ac_ext <<_ACEOF
7003/* end confdefs.h. */
98418dba
CW
7004#include <stdlib.h>
7005
7006_ACEOF
7007if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 7008 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
7009 :
7010else
7011 ac_cv_header_stdc=no
7012fi
7013rm -f conftest*
7014
7015fi
7016
7017if test $ac_cv_header_stdc = yes; then
7018 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7019 if test "$cross_compiling" = yes; then
7020 :
d42122a3 7021else
503d2be0 7022 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7023/* confdefs.h. */
7024_ACEOF
7025cat confdefs.h >>conftest.$ac_ext
7026cat >>conftest.$ac_ext <<_ACEOF
7027/* end confdefs.h. */
98418dba 7028#include <ctype.h>
d6e01aa5 7029#include <stdlib.h>
98418dba
CW
7030#if ((' ' & 0x0FF) == 0x020)
7031# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7032# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7033#else
19650fd6 7034# define ISLOWER(c) \
edfaf76d
LK
7035 (('a' <= (c) && (c) <= 'i') \
7036 || ('j' <= (c) && (c) <= 'r') \
7037 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
7038# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7039#endif
7040
7041#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
7042int
7043main ()
7044{
98418dba
CW
7045 int i;
7046 for (i = 0; i < 256; i++)
7047 if (XOR (islower (i), ISLOWER (i))
edfaf76d 7048 || toupper (i) != TOUPPER (i))
d6e01aa5
KL
7049 return 2;
7050 return 0;
503d2be0
AS
7051}
7052_ACEOF
98418dba 7053rm -f conftest$ac_exeext
d6e01aa5
KL
7054if { (ac_try="$ac_link"
7055case "(($ac_try" in
7056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7057 *) ac_try_echo=$ac_try;;
7058esac
7059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7060 (eval "$ac_link") 2>&5
503d2be0 7061 ac_status=$?
c0d27fcc 7062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 7063 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
7064 { (case "(($ac_try" in
7065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7066 *) ac_try_echo=$ac_try;;
7067esac
7068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7069 (eval "$ac_try") 2>&5
503d2be0 7070 ac_status=$?
c0d27fcc 7071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 7072 (exit $ac_status); }; }; then
98418dba 7073 :
d42122a3 7074else
98418dba
CW
7075 echo "$as_me: program exited with status $ac_status" >&5
7076echo "$as_me: failed program was:" >&5
19650fd6
AS
7077sed 's/^/| /' conftest.$ac_ext >&5
7078
c0d27fcc 7079( exit $ac_status )
98418dba 7080ac_cv_header_stdc=no
d42122a3 7081fi
d6e01aa5 7082rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 7083fi
d6e01aa5
KL
7084
7085
98418dba
CW
7086fi
7087fi
d6e01aa5
KL
7088{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7089echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
7090if test $ac_cv_header_stdc = yes; then
7091
c0d27fcc 7092cat >>confdefs.h <<\_ACEOF
98418dba 7093#define STDC_HEADERS 1
c0d27fcc 7094_ACEOF
d42122a3
DL
7095
7096fi
7097
d6e01aa5
KL
7098{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
7099echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 7100if test "${ac_cv_header_time+set}" = set; then
503d2be0 7101 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7102else
503d2be0 7103 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7104/* confdefs.h. */
7105_ACEOF
7106cat confdefs.h >>conftest.$ac_ext
7107cat >>conftest.$ac_ext <<_ACEOF
7108/* end confdefs.h. */
ba4481b5 7109#include <sys/types.h>
98418dba 7110#include <sys/time.h>
ba4481b5 7111#include <time.h>
503d2be0
AS
7112
7113int
7114main ()
7115{
98418dba
CW
7116if ((struct tm *) 0)
7117return 0;
503d2be0
AS
7118 ;
7119 return 0;
7120}
7121_ACEOF
7122rm -f conftest.$ac_objext
d6e01aa5
KL
7123if { (ac_try="$ac_compile"
7124case "(($ac_try" in
7125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7126 *) ac_try_echo=$ac_try;;
7127esac
7128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7129 (eval "$ac_compile") 2>conftest.er1
503d2be0 7130 ac_status=$?
edfaf76d
LK
7131 grep -v '^ *+' conftest.er1 >conftest.err
7132 rm -f conftest.er1
7133 cat conftest.err >&5
c0d27fcc 7134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7135 (exit $ac_status); } && {
7136 test -z "$ac_c_werror_flag" ||
7137 test ! -s conftest.err
7138 } && test -s conftest.$ac_objext; then
98418dba 7139 ac_cv_header_time=yes
ba4481b5 7140else
503d2be0 7141 echo "$as_me: failed program was:" >&5
19650fd6
AS
7142sed 's/^/| /' conftest.$ac_ext >&5
7143
d6e01aa5 7144 ac_cv_header_time=no
ba4481b5 7145fi
d6e01aa5
KL
7146
7147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7148fi
d6e01aa5
KL
7149{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7150echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 7151if test $ac_cv_header_time = yes; then
503d2be0 7152
c0d27fcc 7153cat >>confdefs.h <<\_ACEOF
98418dba 7154#define TIME_WITH_SYS_TIME 1
c0d27fcc 7155_ACEOF
ba4481b5
DL
7156
7157fi
7158
d6e01aa5
KL
7159{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
7160echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 7161if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 7162 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7163else
503d2be0 7164 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7165/* confdefs.h. */
7166_ACEOF
7167cat confdefs.h >>conftest.$ac_ext
7168cat >>conftest.$ac_ext <<_ACEOF
7169/* end confdefs.h. */
cd958eb3
MB
7170$ac_includes_default
7171int
7172main ()
7173{
7174#ifndef sys_siglist
d6e01aa5 7175 (void) sys_siglist;
98418dba 7176#endif
503d2be0 7177
cd958eb3
MB
7178 ;
7179 return 0;
7180}
7181_ACEOF
7182rm -f conftest.$ac_objext
d6e01aa5
KL
7183if { (ac_try="$ac_compile"
7184case "(($ac_try" in
7185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7186 *) ac_try_echo=$ac_try;;
7187esac
7188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7189 (eval "$ac_compile") 2>conftest.er1
cd958eb3 7190 ac_status=$?
edfaf76d
LK
7191 grep -v '^ *+' conftest.er1 >conftest.err
7192 rm -f conftest.er1
7193 cat conftest.err >&5
cd958eb3 7194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7195 (exit $ac_status); } && {
7196 test -z "$ac_c_werror_flag" ||
7197 test ! -s conftest.err
7198 } && test -s conftest.$ac_objext; then
cd958eb3
MB
7199 ac_cv_have_decl_sys_siglist=yes
7200else
7201 echo "$as_me: failed program was:" >&5
19650fd6
AS
7202sed 's/^/| /' conftest.$ac_ext >&5
7203
d6e01aa5 7204 ac_cv_have_decl_sys_siglist=no
cd958eb3 7205fi
d6e01aa5
KL
7206
7207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 7208fi
d6e01aa5
KL
7209{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
7210echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
7211if test $ac_cv_have_decl_sys_siglist = yes; then
7212
7213cat >>confdefs.h <<_ACEOF
7214#define HAVE_DECL_SYS_SIGLIST 1
7215_ACEOF
7216
7217
7218else
7219 cat >>confdefs.h <<_ACEOF
7220#define HAVE_DECL_SYS_SIGLIST 0
7221_ACEOF
7222
7223
7224fi
7225
7226
7227if test $ac_cv_have_decl_sys_siglist != yes; then
7228 # For Tru64, at least:
d6e01aa5
KL
7229 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
7230echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
7231if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
7232 echo $ECHO_N "(cached) $ECHO_C" >&6
7233else
7234 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7235/* confdefs.h. */
7236_ACEOF
7237cat confdefs.h >>conftest.$ac_ext
7238cat >>conftest.$ac_ext <<_ACEOF
7239/* end confdefs.h. */
cd958eb3 7240$ac_includes_default
503d2be0
AS
7241int
7242main ()
7243{
cd958eb3 7244#ifndef __sys_siglist
d6e01aa5 7245 (void) __sys_siglist;
cd958eb3
MB
7246#endif
7247
503d2be0
AS
7248 ;
7249 return 0;
7250}
7251_ACEOF
7252rm -f conftest.$ac_objext
d6e01aa5
KL
7253if { (ac_try="$ac_compile"
7254case "(($ac_try" in
7255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7256 *) ac_try_echo=$ac_try;;
7257esac
7258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7259 (eval "$ac_compile") 2>conftest.er1
503d2be0 7260 ac_status=$?
edfaf76d
LK
7261 grep -v '^ *+' conftest.er1 >conftest.err
7262 rm -f conftest.er1
7263 cat conftest.err >&5
c0d27fcc 7264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7265 (exit $ac_status); } && {
7266 test -z "$ac_c_werror_flag" ||
7267 test ! -s conftest.err
7268 } && test -s conftest.$ac_objext; then
cd958eb3 7269 ac_cv_have_decl___sys_siglist=yes
ba4481b5 7270else
503d2be0 7271 echo "$as_me: failed program was:" >&5
19650fd6
AS
7272sed 's/^/| /' conftest.$ac_ext >&5
7273
d6e01aa5 7274 ac_cv_have_decl___sys_siglist=no
ba4481b5 7275fi
d6e01aa5
KL
7276
7277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 7278fi
d6e01aa5
KL
7279{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
7280echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 7281if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 7282
cd958eb3
MB
7283cat >>confdefs.h <<_ACEOF
7284#define HAVE_DECL___SYS_SIGLIST 1
7285_ACEOF
7286
7287
7288else
7289 cat >>confdefs.h <<_ACEOF
7290#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 7291_ACEOF
503d2be0 7292
cd958eb3 7293
ba4481b5
DL
7294fi
7295
cd958eb3
MB
7296
7297 if test $ac_cv_have_decl___sys_siglist = yes; then
7298
7299cat >>confdefs.h <<\_ACEOF
7300#define sys_siglist __sys_siglist
7301_ACEOF
7302
7303 fi
7304fi
d6e01aa5
KL
7305{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7306echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 7307if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 7308 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7309else
503d2be0 7310 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7311/* confdefs.h. */
7312_ACEOF
7313cat confdefs.h >>conftest.$ac_ext
7314cat >>conftest.$ac_ext <<_ACEOF
7315/* end confdefs.h. */
98418dba
CW
7316#include <sys/types.h>
7317#include <sys/wait.h>
7318#ifndef WEXITSTATUS
d6e01aa5 7319# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7320#endif
7321#ifndef WIFEXITED
7322# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7323#endif
503d2be0
AS
7324
7325int
7326main ()
7327{
98418dba
CW
7328 int s;
7329 wait (&s);
7330 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7331 ;
7332 return 0;
7333}
7334_ACEOF
98418dba 7335rm -f conftest.$ac_objext
d6e01aa5
KL
7336if { (ac_try="$ac_compile"
7337case "(($ac_try" in
7338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7339 *) ac_try_echo=$ac_try;;
7340esac
7341eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7342 (eval "$ac_compile") 2>conftest.er1
503d2be0 7343 ac_status=$?
edfaf76d
LK
7344 grep -v '^ *+' conftest.er1 >conftest.err
7345 rm -f conftest.er1
7346 cat conftest.err >&5
c0d27fcc 7347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7348 (exit $ac_status); } && {
7349 test -z "$ac_c_werror_flag" ||
7350 test ! -s conftest.err
7351 } && test -s conftest.$ac_objext; then
98418dba 7352 ac_cv_header_sys_wait_h=yes
ba4481b5 7353else
503d2be0 7354 echo "$as_me: failed program was:" >&5
19650fd6
AS
7355sed 's/^/| /' conftest.$ac_ext >&5
7356
d6e01aa5 7357 ac_cv_header_sys_wait_h=no
ba4481b5 7358fi
d6e01aa5
KL
7359
7360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7361fi
d6e01aa5
KL
7362{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7363echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7364if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7365
c0d27fcc 7366cat >>confdefs.h <<\_ACEOF
98418dba 7367#define HAVE_SYS_WAIT_H 1
c0d27fcc 7368_ACEOF
ba4481b5 7369
ba4481b5
DL
7370fi
7371
c0d27fcc 7372
d6e01aa5
KL
7373{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7374echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7375if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7376 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7377else
503d2be0 7378 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7379/* confdefs.h. */
7380_ACEOF
7381cat confdefs.h >>conftest.$ac_ext
7382cat >>conftest.$ac_ext <<_ACEOF
7383/* end confdefs.h. */
98418dba
CW
7384#ifdef TIME_WITH_SYS_TIME
7385#include <sys/time.h>
7386#include <time.h>
7387#else
7388#ifdef HAVE_SYS_TIME_H
7389#include <sys/time.h>
7390#else
1113b624 7391#include <time.h>
98418dba
CW
7392#endif
7393#endif
7394#ifdef HAVE_UTIME_H
7395#include <utime.h>
7396#endif
503d2be0
AS
7397int
7398main ()
7399{
98418dba 7400static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7401 ;
7402 return 0;
7403}
7404_ACEOF
98418dba 7405rm -f conftest.$ac_objext
d6e01aa5
KL
7406if { (ac_try="$ac_compile"
7407case "(($ac_try" in
7408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7409 *) ac_try_echo=$ac_try;;
7410esac
7411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7412 (eval "$ac_compile") 2>conftest.er1
503d2be0 7413 ac_status=$?
edfaf76d
LK
7414 grep -v '^ *+' conftest.er1 >conftest.err
7415 rm -f conftest.er1
7416 cat conftest.err >&5
c0d27fcc 7417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7418 (exit $ac_status); } && {
7419 test -z "$ac_c_werror_flag" ||
7420 test ! -s conftest.err
7421 } && test -s conftest.$ac_objext; then
98418dba 7422 emacs_cv_struct_utimbuf=yes
1113b624 7423else
503d2be0 7424 echo "$as_me: failed program was:" >&5
19650fd6
AS
7425sed 's/^/| /' conftest.$ac_ext >&5
7426
d6e01aa5 7427 emacs_cv_struct_utimbuf=no
1113b624 7428fi
d6e01aa5
KL
7429
7430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7431fi
d6e01aa5
KL
7432{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7433echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7434if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7435
c0d27fcc 7436cat >>confdefs.h <<\_ACEOF
98418dba 7437#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7438_ACEOF
1113b624
PE
7439
7440fi
ba4481b5 7441
d6e01aa5
KL
7442{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7443echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7444if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7445 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7446else
98418dba 7447 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7448/* confdefs.h. */
7449_ACEOF
7450cat confdefs.h >>conftest.$ac_ext
7451cat >>conftest.$ac_ext <<_ACEOF
7452/* end confdefs.h. */
7397acc4 7453#include <sys/types.h>
98418dba 7454#include <signal.h>
98418dba 7455
503d2be0
AS
7456int
7457main ()
7458{
d6e01aa5 7459return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7460 ;
7461 return 0;
7462}
7463_ACEOF
98418dba 7464rm -f conftest.$ac_objext
d6e01aa5
KL
7465if { (ac_try="$ac_compile"
7466case "(($ac_try" in
7467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7468 *) ac_try_echo=$ac_try;;
7469esac
7470eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7471 (eval "$ac_compile") 2>conftest.er1
503d2be0 7472 ac_status=$?
edfaf76d
LK
7473 grep -v '^ *+' conftest.er1 >conftest.err
7474 rm -f conftest.er1
7475 cat conftest.err >&5
c0d27fcc 7476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7477 (exit $ac_status); } && {
7478 test -z "$ac_c_werror_flag" ||
7479 test ! -s conftest.err
7480 } && test -s conftest.$ac_objext; then
7481 ac_cv_type_signal=int
503d2be0
AS
7482else
7483 echo "$as_me: failed program was:" >&5
19650fd6
AS
7484sed 's/^/| /' conftest.$ac_ext >&5
7485
d6e01aa5 7486 ac_cv_type_signal=void
503d2be0 7487fi
d6e01aa5
KL
7488
7489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7490fi
d6e01aa5
KL
7491{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7492echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7493
c0d27fcc 7494cat >>confdefs.h <<_ACEOF
98418dba 7495#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7496_ACEOF
7497
503d2be0 7498
c0d27fcc 7499
d6e01aa5
KL
7500{ echo "$as_me:$LINENO: checking for speed_t" >&5
7501echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7502if test "${emacs_cv_speed_t+set}" = set; then
7503 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7504else
98418dba 7505 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7506/* confdefs.h. */
7507_ACEOF
7508cat confdefs.h >>conftest.$ac_ext
7509cat >>conftest.$ac_ext <<_ACEOF
7510/* end confdefs.h. */
98418dba 7511#include <termios.h>
98418dba
CW
7512int
7513main ()
7514{
7515speed_t x = 1;
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
CW
7537 emacs_cv_speed_t=yes
7538else
7539 echo "$as_me: failed program was:" >&5
19650fd6
AS
7540sed 's/^/| /' conftest.$ac_ext >&5
7541
d6e01aa5 7542 emacs_cv_speed_t=no
98418dba 7543fi
d6e01aa5
KL
7544
7545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7546fi
d6e01aa5
KL
7547{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7548echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7549if test $emacs_cv_speed_t = yes; then
b936fae4 7550
c0d27fcc 7551cat >>confdefs.h <<\_ACEOF
98418dba 7552#define HAVE_SPEED_T 1
c0d27fcc 7553_ACEOF
98418dba 7554
7397acc4
DL
7555fi
7556
d6e01aa5
KL
7557{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7558echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7559if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7560 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7561else
503d2be0 7562 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7563/* confdefs.h. */
7564_ACEOF
7565cat confdefs.h >>conftest.$ac_ext
7566cat >>conftest.$ac_ext <<_ACEOF
7567/* end confdefs.h. */
98418dba
CW
7568#ifdef TIME_WITH_SYS_TIME
7569#include <sys/time.h>
7570#include <time.h>
7571#else
7572#ifdef HAVE_SYS_TIME_H
7573#include <sys/time.h>
7574#else
7575#include <time.h>
7576#endif
7577#endif
503d2be0
AS
7578int
7579main ()
7580{
98418dba 7581static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7582 ;
7583 return 0;
7584}
7585_ACEOF
7586rm -f conftest.$ac_objext
d6e01aa5
KL
7587if { (ac_try="$ac_compile"
7588case "(($ac_try" in
7589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7590 *) ac_try_echo=$ac_try;;
7591esac
7592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7593 (eval "$ac_compile") 2>conftest.er1
503d2be0 7594 ac_status=$?
edfaf76d
LK
7595 grep -v '^ *+' conftest.er1 >conftest.err
7596 rm -f conftest.er1
7597 cat conftest.err >&5
c0d27fcc 7598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7599 (exit $ac_status); } && {
7600 test -z "$ac_c_werror_flag" ||
7601 test ! -s conftest.err
7602 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7603 emacs_cv_struct_timeval=yes
7604else
503d2be0 7605 echo "$as_me: failed program was:" >&5
19650fd6
AS
7606sed 's/^/| /' conftest.$ac_ext >&5
7607
d6e01aa5 7608 emacs_cv_struct_timeval=no
7397acc4 7609fi
d6e01aa5
KL
7610
7611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7612fi
d6e01aa5
KL
7613{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7614echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7615HAVE_TIMEVAL=$emacs_cv_struct_timeval
7616if test $emacs_cv_struct_timeval = yes; then
b936fae4 7617
c0d27fcc 7618cat >>confdefs.h <<\_ACEOF
98418dba 7619#define HAVE_TIMEVAL 1
c0d27fcc 7620_ACEOF
7397acc4
DL
7621
7622fi
7623
d6e01aa5
KL
7624{ echo "$as_me:$LINENO: checking for struct exception" >&5
7625echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7626if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7627 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7628else
503d2be0 7629 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7630/* confdefs.h. */
7631_ACEOF
7632cat confdefs.h >>conftest.$ac_ext
7633cat >>conftest.$ac_ext <<_ACEOF
7634/* end confdefs.h. */
98418dba 7635#include <math.h>
503d2be0
AS
7636int
7637main ()
7638{
98418dba 7639static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7640 ;
7641 return 0;
ba4481b5 7642}
503d2be0
AS
7643_ACEOF
7644rm -f conftest.$ac_objext
d6e01aa5
KL
7645if { (ac_try="$ac_compile"
7646case "(($ac_try" in
7647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7648 *) ac_try_echo=$ac_try;;
7649esac
7650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7651 (eval "$ac_compile") 2>conftest.er1
503d2be0 7652 ac_status=$?
edfaf76d
LK
7653 grep -v '^ *+' conftest.er1 >conftest.err
7654 rm -f conftest.er1
7655 cat conftest.err >&5
c0d27fcc 7656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7657 (exit $ac_status); } && {
7658 test -z "$ac_c_werror_flag" ||
7659 test ! -s conftest.err
7660 } && test -s conftest.$ac_objext; then
98418dba 7661 emacs_cv_struct_exception=yes
ba4481b5 7662else
503d2be0 7663 echo "$as_me: failed program was:" >&5
19650fd6
AS
7664sed 's/^/| /' conftest.$ac_ext >&5
7665
d6e01aa5 7666 emacs_cv_struct_exception=no
ba4481b5 7667fi
d6e01aa5
KL
7668
7669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7670fi
d6e01aa5
KL
7671{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7672echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7673HAVE_EXCEPTION=$emacs_cv_struct_exception
7674if test $emacs_cv_struct_exception != yes; then
b936fae4 7675
c0d27fcc 7676cat >>confdefs.h <<\_ACEOF
98418dba 7677#define NO_MATHERR 1
c0d27fcc 7678_ACEOF
ba4481b5
DL
7679
7680fi
7681
7862d3a8
AS
7682
7683for ac_header in sys/socket.h
7684do
7685as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
7686if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7687 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7688echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7689if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7690 echo $ECHO_N "(cached) $ECHO_C" >&6
7691fi
d6e01aa5
KL
7692ac_res=`eval echo '${'$as_ac_Header'}'`
7693 { echo "$as_me:$LINENO: result: $ac_res" >&5
7694echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7695else
7696 # Is the header compilable?
d6e01aa5
KL
7697{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7698echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7699cat >conftest.$ac_ext <<_ACEOF
7700/* confdefs.h. */
7701_ACEOF
7702cat confdefs.h >>conftest.$ac_ext
7703cat >>conftest.$ac_ext <<_ACEOF
7704/* end confdefs.h. */
7705$ac_includes_default
7706#include <$ac_header>
7707_ACEOF
7708rm -f conftest.$ac_objext
d6e01aa5
KL
7709if { (ac_try="$ac_compile"
7710case "(($ac_try" in
7711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7712 *) ac_try_echo=$ac_try;;
7713esac
7714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7715 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7716 ac_status=$?
edfaf76d
LK
7717 grep -v '^ *+' conftest.er1 >conftest.err
7718 rm -f conftest.er1
7719 cat conftest.err >&5
7862d3a8 7720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7721 (exit $ac_status); } && {
7722 test -z "$ac_c_werror_flag" ||
7723 test ! -s conftest.err
7724 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7725 ac_header_compiler=yes
7726else
7727 echo "$as_me: failed program was:" >&5
7728sed 's/^/| /' conftest.$ac_ext >&5
7729
d6e01aa5 7730 ac_header_compiler=no
7862d3a8 7731fi
d6e01aa5
KL
7732
7733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7734{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7735echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7736
7737# Is the header present?
d6e01aa5
KL
7738{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7739echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7740cat >conftest.$ac_ext <<_ACEOF
7741/* confdefs.h. */
7742_ACEOF
7743cat confdefs.h >>conftest.$ac_ext
7744cat >>conftest.$ac_ext <<_ACEOF
7745/* end confdefs.h. */
7746#include <$ac_header>
7747_ACEOF
d6e01aa5
KL
7748if { (ac_try="$ac_cpp conftest.$ac_ext"
7749case "(($ac_try" in
7750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7751 *) ac_try_echo=$ac_try;;
7752esac
7753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7754 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7755 ac_status=$?
7756 grep -v '^ *+' conftest.er1 >conftest.err
7757 rm -f conftest.er1
7758 cat conftest.err >&5
7759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7760 (exit $ac_status); } >/dev/null && {
7761 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7762 test ! -s conftest.err
7763 }; then
7862d3a8
AS
7764 ac_header_preproc=yes
7765else
7766 echo "$as_me: failed program was:" >&5
7767sed 's/^/| /' conftest.$ac_ext >&5
7768
7769 ac_header_preproc=no
7770fi
d6e01aa5 7771
7862d3a8 7772rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
7773{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7774echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7775
7776# So? What about this header?
edfaf76d
LK
7777case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7778 yes:no: )
7862d3a8
AS
7779 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7780echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7781 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7782echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7783 ac_header_preproc=yes
7862d3a8 7784 ;;
edfaf76d 7785 no:yes:* )
7862d3a8
AS
7786 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7787echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7788 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7789echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7790 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7791echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7792 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7793echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7794 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7795echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7796 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7797echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 7798
7862d3a8
AS
7799 ;;
7800esac
d6e01aa5
KL
7801{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7802echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7803if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7804 echo $ECHO_N "(cached) $ECHO_C" >&6
7805else
edfaf76d 7806 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7807fi
d6e01aa5
KL
7808ac_res=`eval echo '${'$as_ac_Header'}'`
7809 { echo "$as_me:$LINENO: result: $ac_res" >&5
7810echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7811
7812fi
7813if test `eval echo '${'$as_ac_Header'}'` = yes; then
7814 cat >>confdefs.h <<_ACEOF
7815#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7816_ACEOF
7817
7818fi
7819
7820done
7821
7822
7823for ac_header in net/if.h
7824do
7825as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
7826{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7827echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7828if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7829 echo $ECHO_N "(cached) $ECHO_C" >&6
7830else
7831 cat >conftest.$ac_ext <<_ACEOF
7832/* confdefs.h. */
7833_ACEOF
7834cat confdefs.h >>conftest.$ac_ext
7835cat >>conftest.$ac_ext <<_ACEOF
7836/* end confdefs.h. */
7837$ac_includes_default
7838#if HAVE_SYS_SOCKET_H
7839#include <sys/socket.h>
7840#endif
7841
7842#include <$ac_header>
7843_ACEOF
7844rm -f conftest.$ac_objext
d6e01aa5
KL
7845if { (ac_try="$ac_compile"
7846case "(($ac_try" in
7847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7848 *) ac_try_echo=$ac_try;;
7849esac
7850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7851 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7852 ac_status=$?
edfaf76d
LK
7853 grep -v '^ *+' conftest.er1 >conftest.err
7854 rm -f conftest.er1
7855 cat conftest.err >&5
7862d3a8 7856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7857 (exit $ac_status); } && {
7858 test -z "$ac_c_werror_flag" ||
7859 test ! -s conftest.err
7860 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7861 eval "$as_ac_Header=yes"
7862else
7863 echo "$as_me: failed program was:" >&5
7864sed 's/^/| /' conftest.$ac_ext >&5
7865
d6e01aa5 7866 eval "$as_ac_Header=no"
7862d3a8 7867fi
d6e01aa5
KL
7868
7869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7870fi
d6e01aa5
KL
7871ac_res=`eval echo '${'$as_ac_Header'}'`
7872 { echo "$as_me:$LINENO: result: $ac_res" >&5
7873echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7874if test `eval echo '${'$as_ac_Header'}'` = yes; then
7875 cat >>confdefs.h <<_ACEOF
7876#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7877_ACEOF
7878
7879fi
7880
7881done
7882
7883
d6e01aa5
KL
7884{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7885echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7886if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7887 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7888else
503d2be0 7889 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7890/* confdefs.h. */
7891_ACEOF
7892cat confdefs.h >>conftest.$ac_ext
7893cat >>conftest.$ac_ext <<_ACEOF
7894/* end confdefs.h. */
98418dba
CW
7895#include <sys/types.h>
7896#include <time.h>
7397acc4 7897
503d2be0
AS
7898int
7899main ()
7900{
d6e01aa5
KL
7901struct tm tm;
7902 int *p = &tm.tm_sec;
7903 return !p;
503d2be0
AS
7904 ;
7905 return 0;
7906}
7907_ACEOF
7908rm -f conftest.$ac_objext
d6e01aa5
KL
7909if { (ac_try="$ac_compile"
7910case "(($ac_try" in
7911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7912 *) ac_try_echo=$ac_try;;
7913esac
7914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7915 (eval "$ac_compile") 2>conftest.er1
503d2be0 7916 ac_status=$?
edfaf76d
LK
7917 grep -v '^ *+' conftest.er1 >conftest.err
7918 rm -f conftest.er1
7919 cat conftest.err >&5
c0d27fcc 7920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7921 (exit $ac_status); } && {
7922 test -z "$ac_c_werror_flag" ||
7923 test ! -s conftest.err
7924 } && test -s conftest.$ac_objext; then
35996d22
AS
7925 ac_cv_struct_tm=time.h
7926else
503d2be0 7927 echo "$as_me: failed program was:" >&5
19650fd6
AS
7928sed 's/^/| /' conftest.$ac_ext >&5
7929
d6e01aa5 7930 ac_cv_struct_tm=sys/time.h
7397acc4 7931fi
d6e01aa5
KL
7932
7933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7934fi
d6e01aa5
KL
7935{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7936echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7937if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7938
c0d27fcc 7939cat >>confdefs.h <<\_ACEOF
98418dba 7940#define TM_IN_SYS_TIME 1
c0d27fcc 7941_ACEOF
7397acc4
DL
7942
7943fi
ba4481b5 7944
d6e01aa5
KL
7945{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7946echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7947if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7948 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7949else
98418dba 7950 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7951/* confdefs.h. */
7952_ACEOF
7953cat confdefs.h >>conftest.$ac_ext
7954cat >>conftest.$ac_ext <<_ACEOF
7955/* end confdefs.h. */
98418dba
CW
7956#include <sys/types.h>
7957#include <$ac_cv_struct_tm>
ba4481b5 7958
c0d27fcc 7959
98418dba
CW
7960int
7961main ()
7962{
7963static struct tm ac_aggr;
7964if (ac_aggr.tm_zone)
7965return 0;
7966 ;
7967 return 0;
7968}
7969_ACEOF
7970rm -f conftest.$ac_objext
d6e01aa5
KL
7971if { (ac_try="$ac_compile"
7972case "(($ac_try" in
7973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7974 *) ac_try_echo=$ac_try;;
7975esac
7976eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7977 (eval "$ac_compile") 2>conftest.er1
98418dba 7978 ac_status=$?
edfaf76d
LK
7979 grep -v '^ *+' conftest.er1 >conftest.err
7980 rm -f conftest.er1
7981 cat conftest.err >&5
c0d27fcc 7982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
7983 (exit $ac_status); } && {
7984 test -z "$ac_c_werror_flag" ||
7985 test ! -s conftest.err
7986 } && test -s conftest.$ac_objext; then
98418dba 7987 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7988else
98418dba 7989 echo "$as_me: failed program was:" >&5
19650fd6
AS
7990sed 's/^/| /' conftest.$ac_ext >&5
7991
d6e01aa5 7992 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7993/* confdefs.h. */
7994_ACEOF
7995cat confdefs.h >>conftest.$ac_ext
7996cat >>conftest.$ac_ext <<_ACEOF
7997/* end confdefs.h. */
6bae0ccf
DL
7998#include <sys/types.h>
7999#include <$ac_cv_struct_tm>
8000
8001
8002int
8003main ()
8004{
8005static struct tm ac_aggr;
8006if (sizeof ac_aggr.tm_zone)
8007return 0;
8008 ;
8009 return 0;
8010}
8011_ACEOF
8012rm -f conftest.$ac_objext
d6e01aa5
KL
8013if { (ac_try="$ac_compile"
8014case "(($ac_try" in
8015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8016 *) ac_try_echo=$ac_try;;
8017esac
8018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8019 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 8020 ac_status=$?
edfaf76d
LK
8021 grep -v '^ *+' conftest.er1 >conftest.err
8022 rm -f conftest.er1
8023 cat conftest.err >&5
6bae0ccf 8024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8025 (exit $ac_status); } && {
8026 test -z "$ac_c_werror_flag" ||
8027 test ! -s conftest.err
8028 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
8029 ac_cv_member_struct_tm_tm_zone=yes
8030else
8031 echo "$as_me: failed program was:" >&5
19650fd6
AS
8032sed 's/^/| /' conftest.$ac_ext >&5
8033
d6e01aa5 8034 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 8035fi
d6e01aa5
KL
8036
8037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 8038fi
d6e01aa5
KL
8039
8040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8041fi
d6e01aa5
KL
8042{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
8043echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 8044if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 8045
c0d27fcc 8046cat >>confdefs.h <<_ACEOF
98418dba 8047#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
8048_ACEOF
8049
ba4481b5 8050
98418dba 8051fi
ba4481b5 8052
98418dba 8053if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 8054
c0d27fcc 8055cat >>confdefs.h <<\_ACEOF
98418dba 8056#define HAVE_TM_ZONE 1
c0d27fcc 8057_ACEOF
ba4481b5 8058
ba4481b5 8059else
d6e01aa5
KL
8060 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
8061echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
8062if test "${ac_cv_have_decl_tzname+set}" = set; then
8063 echo $ECHO_N "(cached) $ECHO_C" >&6
8064else
8065 cat >conftest.$ac_ext <<_ACEOF
8066/* confdefs.h. */
8067_ACEOF
8068cat confdefs.h >>conftest.$ac_ext
8069cat >>conftest.$ac_ext <<_ACEOF
8070/* end confdefs.h. */
8071#include <time.h>
8072
8073int
8074main ()
8075{
8076#ifndef tzname
8077 (void) tzname;
8078#endif
8079
8080 ;
8081 return 0;
8082}
8083_ACEOF
8084rm -f conftest.$ac_objext
8085if { (ac_try="$ac_compile"
8086case "(($ac_try" in
8087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8088 *) ac_try_echo=$ac_try;;
8089esac
8090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8091 (eval "$ac_compile") 2>conftest.er1
8092 ac_status=$?
8093 grep -v '^ *+' conftest.er1 >conftest.err
8094 rm -f conftest.er1
8095 cat conftest.err >&5
8096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8097 (exit $ac_status); } && {
8098 test -z "$ac_c_werror_flag" ||
8099 test ! -s conftest.err
8100 } && test -s conftest.$ac_objext; then
8101 ac_cv_have_decl_tzname=yes
8102else
8103 echo "$as_me: failed program was:" >&5
8104sed 's/^/| /' conftest.$ac_ext >&5
8105
8106 ac_cv_have_decl_tzname=no
8107fi
8108
8109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8110fi
8111{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
8112echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
8113if test $ac_cv_have_decl_tzname = yes; then
8114
8115cat >>confdefs.h <<_ACEOF
8116#define HAVE_DECL_TZNAME 1
8117_ACEOF
8118
8119
8120else
8121 cat >>confdefs.h <<_ACEOF
8122#define HAVE_DECL_TZNAME 0
8123_ACEOF
8124
8125
8126fi
8127
8128
8129 { echo "$as_me:$LINENO: checking for tzname" >&5
8130echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
98418dba 8131if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 8132 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 8133else
98418dba 8134 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8135/* confdefs.h. */
8136_ACEOF
8137cat confdefs.h >>conftest.$ac_ext
8138cat >>conftest.$ac_ext <<_ACEOF
8139/* end confdefs.h. */
98418dba 8140#include <time.h>
d6e01aa5
KL
8141#if !HAVE_DECL_TZNAME
8142extern char *tzname[];
98418dba
CW
8143#endif
8144
98418dba
CW
8145int
8146main ()
8147{
d6e01aa5 8148return tzname[0][0];
98418dba
CW
8149 ;
8150 return 0;
8151}
8152_ACEOF
8153rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
8154if { (ac_try="$ac_link"
8155case "(($ac_try" in
8156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8157 *) ac_try_echo=$ac_try;;
8158esac
8159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8160 (eval "$ac_link") 2>conftest.er1
98418dba 8161 ac_status=$?
edfaf76d
LK
8162 grep -v '^ *+' conftest.er1 >conftest.err
8163 rm -f conftest.er1
8164 cat conftest.err >&5
c0d27fcc 8165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8166 (exit $ac_status); } && {
8167 test -z "$ac_c_werror_flag" ||
8168 test ! -s conftest.err
8169 } && test -s conftest$ac_exeext &&
8170 $as_test_x conftest$ac_exeext; then
98418dba
CW
8171 ac_cv_var_tzname=yes
8172else
8173 echo "$as_me: failed program was:" >&5
19650fd6
AS
8174sed 's/^/| /' conftest.$ac_ext >&5
8175
d6e01aa5 8176 ac_cv_var_tzname=no
ba4481b5 8177fi
d6e01aa5
KL
8178
8179rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 8180 conftest$ac_exeext conftest.$ac_ext
98418dba 8181fi
d6e01aa5
KL
8182{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
8183echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
98418dba 8184 if test $ac_cv_var_tzname = yes; then
ba4481b5 8185
c0d27fcc 8186cat >>confdefs.h <<\_ACEOF
98418dba 8187#define HAVE_TZNAME 1
c0d27fcc 8188_ACEOF
503d2be0 8189
98418dba
CW
8190 fi
8191fi
503d2be0 8192
d6e01aa5
KL
8193{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
8194echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
b936fae4 8195if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
8196 echo $ECHO_N "(cached) $ECHO_C" >&6
8197else
8198 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8199/* confdefs.h. */
8200_ACEOF
8201cat confdefs.h >>conftest.$ac_ext
8202cat >>conftest.$ac_ext <<_ACEOF
8203/* end confdefs.h. */
98418dba 8204#include <time.h>
b936fae4 8205
98418dba
CW
8206int
8207main ()
8208{
b936fae4
AS
8209static struct tm ac_aggr;
8210if (ac_aggr.tm_gmtoff)
8211return 0;
98418dba
CW
8212 ;
8213 return 0;
8214}
8215_ACEOF
b936fae4 8216rm -f conftest.$ac_objext
d6e01aa5
KL
8217if { (ac_try="$ac_compile"
8218case "(($ac_try" in
8219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8220 *) ac_try_echo=$ac_try;;
8221esac
8222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8223 (eval "$ac_compile") 2>conftest.er1
98418dba 8224 ac_status=$?
edfaf76d
LK
8225 grep -v '^ *+' conftest.er1 >conftest.err
8226 rm -f conftest.er1
8227 cat conftest.err >&5
c0d27fcc 8228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8229 (exit $ac_status); } && {
8230 test -z "$ac_c_werror_flag" ||
8231 test ! -s conftest.err
8232 } && test -s conftest.$ac_objext; then
b936fae4 8233 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
8234else
8235 echo "$as_me: failed program was:" >&5
19650fd6
AS
8236sed 's/^/| /' conftest.$ac_ext >&5
8237
d6e01aa5 8238 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8239/* confdefs.h. */
8240_ACEOF
8241cat confdefs.h >>conftest.$ac_ext
8242cat >>conftest.$ac_ext <<_ACEOF
8243/* end confdefs.h. */
6bae0ccf
DL
8244#include <time.h>
8245
8799b3e4
CW
8246int
8247main ()
8248{
6bae0ccf
DL
8249static struct tm ac_aggr;
8250if (sizeof ac_aggr.tm_gmtoff)
8251return 0;
8799b3e4
CW
8252 ;
8253 return 0;
8254}
8255_ACEOF
6bae0ccf 8256rm -f conftest.$ac_objext
d6e01aa5
KL
8257if { (ac_try="$ac_compile"
8258case "(($ac_try" in
8259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8260 *) ac_try_echo=$ac_try;;
8261esac
8262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8263 (eval "$ac_compile") 2>conftest.er1
8799b3e4 8264 ac_status=$?
edfaf76d
LK
8265 grep -v '^ *+' conftest.er1 >conftest.err
8266 rm -f conftest.er1
8267 cat conftest.err >&5
c0d27fcc 8268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8269 (exit $ac_status); } && {
8270 test -z "$ac_c_werror_flag" ||
8271 test ! -s conftest.err
8272 } && test -s conftest.$ac_objext; then
6bae0ccf 8273 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
8274else
8275 echo "$as_me: failed program was:" >&5
19650fd6
AS
8276sed 's/^/| /' conftest.$ac_ext >&5
8277
d6e01aa5 8278 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 8279fi
d6e01aa5
KL
8280
8281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8282fi
d6e01aa5
KL
8283
8284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 8285fi
d6e01aa5
KL
8286{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
8287echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
8288if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
8289
8290cat >>confdefs.h <<\_ACEOF
8291#define HAVE_TM_GMTOFF 1
8292_ACEOF
8293
8294fi
8295
d6e01aa5
KL
8296{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
8297echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
8298if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
8299 echo $ECHO_N "(cached) $ECHO_C" >&6
8300else
8301 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8302/* confdefs.h. */
8303_ACEOF
8304cat confdefs.h >>conftest.$ac_ext
8305cat >>conftest.$ac_ext <<_ACEOF
8306/* end confdefs.h. */
7862d3a8
AS
8307$ac_includes_default
8308#if HAVE_SYS_SOCKET_H
8309#include <sys/socket.h>
8310#endif
8311#if HAVE_NET_IF_H
96f3a036 8312#include <net/if.h>
7862d3a8 8313#endif
96f3a036
DL
8314
8315int
8316main ()
8317{
8318static struct ifreq ac_aggr;
8319if (ac_aggr.ifr_flags)
8320return 0;
8321 ;
8322 return 0;
8323}
8324_ACEOF
8325rm -f conftest.$ac_objext
d6e01aa5
KL
8326if { (ac_try="$ac_compile"
8327case "(($ac_try" in
8328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8329 *) ac_try_echo=$ac_try;;
8330esac
8331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8332 (eval "$ac_compile") 2>conftest.er1
96f3a036 8333 ac_status=$?
edfaf76d
LK
8334 grep -v '^ *+' conftest.er1 >conftest.err
8335 rm -f conftest.er1
8336 cat conftest.err >&5
96f3a036 8337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8338 (exit $ac_status); } && {
8339 test -z "$ac_c_werror_flag" ||
8340 test ! -s conftest.err
8341 } && test -s conftest.$ac_objext; then
96f3a036
DL
8342 ac_cv_member_struct_ifreq_ifr_flags=yes
8343else
8344 echo "$as_me: failed program was:" >&5
8345sed 's/^/| /' conftest.$ac_ext >&5
8346
d6e01aa5 8347 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8348/* confdefs.h. */
8349_ACEOF
8350cat confdefs.h >>conftest.$ac_ext
8351cat >>conftest.$ac_ext <<_ACEOF
8352/* end confdefs.h. */
7862d3a8
AS
8353$ac_includes_default
8354#if HAVE_SYS_SOCKET_H
8355#include <sys/socket.h>
8356#endif
8357#if HAVE_NET_IF_H
96f3a036 8358#include <net/if.h>
7862d3a8 8359#endif
96f3a036
DL
8360
8361int
8362main ()
8363{
8364static struct ifreq ac_aggr;
8365if (sizeof ac_aggr.ifr_flags)
8366return 0;
8367 ;
8368 return 0;
8369}
8370_ACEOF
8371rm -f conftest.$ac_objext
d6e01aa5
KL
8372if { (ac_try="$ac_compile"
8373case "(($ac_try" in
8374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8375 *) ac_try_echo=$ac_try;;
8376esac
8377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8378 (eval "$ac_compile") 2>conftest.er1
96f3a036 8379 ac_status=$?
edfaf76d
LK
8380 grep -v '^ *+' conftest.er1 >conftest.err
8381 rm -f conftest.er1
8382 cat conftest.err >&5
96f3a036 8383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8384 (exit $ac_status); } && {
8385 test -z "$ac_c_werror_flag" ||
8386 test ! -s conftest.err
8387 } && test -s conftest.$ac_objext; then
96f3a036
DL
8388 ac_cv_member_struct_ifreq_ifr_flags=yes
8389else
8390 echo "$as_me: failed program was:" >&5
8391sed 's/^/| /' conftest.$ac_ext >&5
8392
d6e01aa5 8393 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8394fi
d6e01aa5
KL
8395
8396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8397fi
d6e01aa5
KL
8398
8399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8400fi
d6e01aa5
KL
8401{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8402echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8403if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8404
8405cat >>confdefs.h <<_ACEOF
8406#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8407_ACEOF
8408
8409
8410fi
d6e01aa5
KL
8411{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8412echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8413if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8414 echo $ECHO_N "(cached) $ECHO_C" >&6
8415else
8416 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8417/* confdefs.h. */
8418_ACEOF
8419cat confdefs.h >>conftest.$ac_ext
8420cat >>conftest.$ac_ext <<_ACEOF
8421/* end confdefs.h. */
7862d3a8
AS
8422$ac_includes_default
8423#if HAVE_SYS_SOCKET_H
8424#include <sys/socket.h>
8425#endif
8426#if HAVE_NET_IF_H
96f3a036 8427#include <net/if.h>
7862d3a8 8428#endif
96f3a036
DL
8429
8430int
8431main ()
8432{
8433static struct ifreq ac_aggr;
8434if (ac_aggr.ifr_hwaddr)
8435return 0;
8436 ;
8437 return 0;
8438}
8439_ACEOF
8440rm -f conftest.$ac_objext
d6e01aa5
KL
8441if { (ac_try="$ac_compile"
8442case "(($ac_try" in
8443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8444 *) ac_try_echo=$ac_try;;
8445esac
8446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8447 (eval "$ac_compile") 2>conftest.er1
96f3a036 8448 ac_status=$?
edfaf76d
LK
8449 grep -v '^ *+' conftest.er1 >conftest.err
8450 rm -f conftest.er1
8451 cat conftest.err >&5
96f3a036 8452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8453 (exit $ac_status); } && {
8454 test -z "$ac_c_werror_flag" ||
8455 test ! -s conftest.err
8456 } && test -s conftest.$ac_objext; then
96f3a036
DL
8457 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8458else
8459 echo "$as_me: failed program was:" >&5
8460sed 's/^/| /' conftest.$ac_ext >&5
8461
d6e01aa5 8462 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8463/* confdefs.h. */
8464_ACEOF
8465cat confdefs.h >>conftest.$ac_ext
8466cat >>conftest.$ac_ext <<_ACEOF
8467/* end confdefs.h. */
7862d3a8
AS
8468$ac_includes_default
8469#if HAVE_SYS_SOCKET_H
8470#include <sys/socket.h>
8471#endif
8472#if HAVE_NET_IF_H
96f3a036 8473#include <net/if.h>
7862d3a8 8474#endif
96f3a036
DL
8475
8476int
8477main ()
8478{
8479static struct ifreq ac_aggr;
8480if (sizeof ac_aggr.ifr_hwaddr)
8481return 0;
8482 ;
8483 return 0;
8484}
8485_ACEOF
8486rm -f conftest.$ac_objext
d6e01aa5
KL
8487if { (ac_try="$ac_compile"
8488case "(($ac_try" in
8489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8490 *) ac_try_echo=$ac_try;;
8491esac
8492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8493 (eval "$ac_compile") 2>conftest.er1
96f3a036 8494 ac_status=$?
edfaf76d
LK
8495 grep -v '^ *+' conftest.er1 >conftest.err
8496 rm -f conftest.er1
8497 cat conftest.err >&5
96f3a036 8498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8499 (exit $ac_status); } && {
8500 test -z "$ac_c_werror_flag" ||
8501 test ! -s conftest.err
8502 } && test -s conftest.$ac_objext; then
96f3a036
DL
8503 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8504else
8505 echo "$as_me: failed program was:" >&5
8506sed 's/^/| /' conftest.$ac_ext >&5
8507
d6e01aa5 8508 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8509fi
d6e01aa5
KL
8510
8511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8512fi
d6e01aa5
KL
8513
8514rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8515fi
d6e01aa5
KL
8516{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8517echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8518if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8519
8520cat >>confdefs.h <<_ACEOF
8521#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8522_ACEOF
8523
8524
8525fi
d6e01aa5
KL
8526{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8527echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8528if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8529 echo $ECHO_N "(cached) $ECHO_C" >&6
8530else
8531 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8532/* confdefs.h. */
8533_ACEOF
8534cat confdefs.h >>conftest.$ac_ext
8535cat >>conftest.$ac_ext <<_ACEOF
8536/* end confdefs.h. */
7862d3a8
AS
8537$ac_includes_default
8538#if HAVE_SYS_SOCKET_H
8539#include <sys/socket.h>
8540#endif
8541#if HAVE_NET_IF_H
96f3a036 8542#include <net/if.h>
7862d3a8 8543#endif
96f3a036
DL
8544
8545int
8546main ()
8547{
8548static struct ifreq ac_aggr;
8549if (ac_aggr.ifr_netmask)
8550return 0;
8551 ;
8552 return 0;
8553}
8554_ACEOF
8555rm -f conftest.$ac_objext
d6e01aa5
KL
8556if { (ac_try="$ac_compile"
8557case "(($ac_try" in
8558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8559 *) ac_try_echo=$ac_try;;
8560esac
8561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8562 (eval "$ac_compile") 2>conftest.er1
96f3a036 8563 ac_status=$?
edfaf76d
LK
8564 grep -v '^ *+' conftest.er1 >conftest.err
8565 rm -f conftest.er1
8566 cat conftest.err >&5
96f3a036 8567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8568 (exit $ac_status); } && {
8569 test -z "$ac_c_werror_flag" ||
8570 test ! -s conftest.err
8571 } && test -s conftest.$ac_objext; then
96f3a036
DL
8572 ac_cv_member_struct_ifreq_ifr_netmask=yes
8573else
8574 echo "$as_me: failed program was:" >&5
8575sed 's/^/| /' conftest.$ac_ext >&5
8576
d6e01aa5 8577 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8578/* confdefs.h. */
8579_ACEOF
8580cat confdefs.h >>conftest.$ac_ext
8581cat >>conftest.$ac_ext <<_ACEOF
8582/* end confdefs.h. */
7862d3a8
AS
8583$ac_includes_default
8584#if HAVE_SYS_SOCKET_H
8585#include <sys/socket.h>
8586#endif
8587#if HAVE_NET_IF_H
96f3a036 8588#include <net/if.h>
7862d3a8 8589#endif
96f3a036
DL
8590
8591int
8592main ()
8593{
8594static struct ifreq ac_aggr;
8595if (sizeof ac_aggr.ifr_netmask)
8596return 0;
8597 ;
8598 return 0;
8599}
8600_ACEOF
8601rm -f conftest.$ac_objext
d6e01aa5
KL
8602if { (ac_try="$ac_compile"
8603case "(($ac_try" in
8604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8605 *) ac_try_echo=$ac_try;;
8606esac
8607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8608 (eval "$ac_compile") 2>conftest.er1
96f3a036 8609 ac_status=$?
edfaf76d
LK
8610 grep -v '^ *+' conftest.er1 >conftest.err
8611 rm -f conftest.er1
8612 cat conftest.err >&5
96f3a036 8613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8614 (exit $ac_status); } && {
8615 test -z "$ac_c_werror_flag" ||
8616 test ! -s conftest.err
8617 } && test -s conftest.$ac_objext; then
96f3a036
DL
8618 ac_cv_member_struct_ifreq_ifr_netmask=yes
8619else
8620 echo "$as_me: failed program was:" >&5
8621sed 's/^/| /' conftest.$ac_ext >&5
8622
d6e01aa5 8623 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8624fi
d6e01aa5
KL
8625
8626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8627fi
d6e01aa5
KL
8628
8629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8630fi
d6e01aa5
KL
8631{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8632echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8633if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8634
8635cat >>confdefs.h <<_ACEOF
8636#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8637_ACEOF
8638
8639
8640fi
d6e01aa5
KL
8641{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8642echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8643if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8644 echo $ECHO_N "(cached) $ECHO_C" >&6
8645else
8646 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8647/* confdefs.h. */
8648_ACEOF
8649cat confdefs.h >>conftest.$ac_ext
8650cat >>conftest.$ac_ext <<_ACEOF
8651/* end confdefs.h. */
7862d3a8
AS
8652$ac_includes_default
8653#if HAVE_SYS_SOCKET_H
8654#include <sys/socket.h>
8655#endif
8656#if HAVE_NET_IF_H
96f3a036 8657#include <net/if.h>
7862d3a8 8658#endif
96f3a036
DL
8659
8660int
8661main ()
8662{
8663static struct ifreq ac_aggr;
8664if (ac_aggr.ifr_broadaddr)
8665return 0;
8666 ;
8667 return 0;
8668}
8669_ACEOF
8670rm -f conftest.$ac_objext
d6e01aa5
KL
8671if { (ac_try="$ac_compile"
8672case "(($ac_try" in
8673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8674 *) ac_try_echo=$ac_try;;
8675esac
8676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8677 (eval "$ac_compile") 2>conftest.er1
96f3a036 8678 ac_status=$?
edfaf76d
LK
8679 grep -v '^ *+' conftest.er1 >conftest.err
8680 rm -f conftest.er1
8681 cat conftest.err >&5
96f3a036 8682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8683 (exit $ac_status); } && {
8684 test -z "$ac_c_werror_flag" ||
8685 test ! -s conftest.err
8686 } && test -s conftest.$ac_objext; then
96f3a036
DL
8687 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8688else
8689 echo "$as_me: failed program was:" >&5
8690sed 's/^/| /' conftest.$ac_ext >&5
8691
d6e01aa5 8692 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8693/* confdefs.h. */
8694_ACEOF
8695cat confdefs.h >>conftest.$ac_ext
8696cat >>conftest.$ac_ext <<_ACEOF
8697/* end confdefs.h. */
7862d3a8
AS
8698$ac_includes_default
8699#if HAVE_SYS_SOCKET_H
8700#include <sys/socket.h>
8701#endif
8702#if HAVE_NET_IF_H
96f3a036 8703#include <net/if.h>
7862d3a8 8704#endif
96f3a036
DL
8705
8706int
8707main ()
8708{
8709static struct ifreq ac_aggr;
8710if (sizeof ac_aggr.ifr_broadaddr)
8711return 0;
8712 ;
8713 return 0;
8714}
8715_ACEOF
8716rm -f conftest.$ac_objext
d6e01aa5
KL
8717if { (ac_try="$ac_compile"
8718case "(($ac_try" in
8719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8720 *) ac_try_echo=$ac_try;;
8721esac
8722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8723 (eval "$ac_compile") 2>conftest.er1
96f3a036 8724 ac_status=$?
edfaf76d
LK
8725 grep -v '^ *+' conftest.er1 >conftest.err
8726 rm -f conftest.er1
8727 cat conftest.err >&5
96f3a036 8728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8729 (exit $ac_status); } && {
8730 test -z "$ac_c_werror_flag" ||
8731 test ! -s conftest.err
8732 } && test -s conftest.$ac_objext; then
96f3a036
DL
8733 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8734else
8735 echo "$as_me: failed program was:" >&5
8736sed 's/^/| /' conftest.$ac_ext >&5
8737
d6e01aa5 8738 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8739fi
d6e01aa5
KL
8740
8741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8742fi
d6e01aa5
KL
8743
8744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8745fi
d6e01aa5
KL
8746{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8747echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8748if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8749
8750cat >>confdefs.h <<_ACEOF
8751#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8752_ACEOF
8753
8754
8755fi
d6e01aa5
KL
8756{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8757echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8758if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8759 echo $ECHO_N "(cached) $ECHO_C" >&6
8760else
8761 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8762/* confdefs.h. */
8763_ACEOF
8764cat confdefs.h >>conftest.$ac_ext
8765cat >>conftest.$ac_ext <<_ACEOF
8766/* end confdefs.h. */
7862d3a8
AS
8767$ac_includes_default
8768#if HAVE_SYS_SOCKET_H
8769#include <sys/socket.h>
8770#endif
8771#if HAVE_NET_IF_H
96f3a036 8772#include <net/if.h>
7862d3a8 8773#endif
96f3a036
DL
8774
8775int
8776main ()
8777{
8778static struct ifreq ac_aggr;
8779if (ac_aggr.ifr_addr)
8780return 0;
8781 ;
8782 return 0;
8783}
8784_ACEOF
8785rm -f conftest.$ac_objext
d6e01aa5
KL
8786if { (ac_try="$ac_compile"
8787case "(($ac_try" in
8788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8789 *) ac_try_echo=$ac_try;;
8790esac
8791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8792 (eval "$ac_compile") 2>conftest.er1
96f3a036 8793 ac_status=$?
edfaf76d
LK
8794 grep -v '^ *+' conftest.er1 >conftest.err
8795 rm -f conftest.er1
8796 cat conftest.err >&5
96f3a036 8797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8798 (exit $ac_status); } && {
8799 test -z "$ac_c_werror_flag" ||
8800 test ! -s conftest.err
8801 } && test -s conftest.$ac_objext; then
96f3a036
DL
8802 ac_cv_member_struct_ifreq_ifr_addr=yes
8803else
8804 echo "$as_me: failed program was:" >&5
8805sed 's/^/| /' conftest.$ac_ext >&5
8806
d6e01aa5 8807 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8808/* confdefs.h. */
8809_ACEOF
8810cat confdefs.h >>conftest.$ac_ext
8811cat >>conftest.$ac_ext <<_ACEOF
8812/* end confdefs.h. */
7862d3a8
AS
8813$ac_includes_default
8814#if HAVE_SYS_SOCKET_H
8815#include <sys/socket.h>
8816#endif
8817#if HAVE_NET_IF_H
96f3a036 8818#include <net/if.h>
7862d3a8 8819#endif
96f3a036
DL
8820
8821int
8822main ()
8823{
8824static struct ifreq ac_aggr;
8825if (sizeof ac_aggr.ifr_addr)
8826return 0;
8827 ;
8828 return 0;
8829}
8830_ACEOF
8831rm -f conftest.$ac_objext
d6e01aa5
KL
8832if { (ac_try="$ac_compile"
8833case "(($ac_try" in
8834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8835 *) ac_try_echo=$ac_try;;
8836esac
8837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8838 (eval "$ac_compile") 2>conftest.er1
96f3a036 8839 ac_status=$?
edfaf76d
LK
8840 grep -v '^ *+' conftest.er1 >conftest.err
8841 rm -f conftest.er1
8842 cat conftest.err >&5
96f3a036 8843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8844 (exit $ac_status); } && {
8845 test -z "$ac_c_werror_flag" ||
8846 test ! -s conftest.err
8847 } && test -s conftest.$ac_objext; then
96f3a036
DL
8848 ac_cv_member_struct_ifreq_ifr_addr=yes
8849else
8850 echo "$as_me: failed program was:" >&5
8851sed 's/^/| /' conftest.$ac_ext >&5
8852
d6e01aa5 8853 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8854fi
d6e01aa5
KL
8855
8856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8857fi
d6e01aa5
KL
8858
8859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8860fi
d6e01aa5
KL
8861{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8862echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8863if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8864
8865cat >>confdefs.h <<_ACEOF
8866#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8867_ACEOF
8868
8869
8870fi
8871
8799b3e4 8872
8799b3e4 8873
d6e01aa5
KL
8874{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8875echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8876if test "$ac_cv_prog_cc_c89" != no; then
8877 { echo "$as_me:$LINENO: result: yes" >&5
8878echo "${ECHO_T}yes" >&6; }
98418dba 8879
c0d27fcc 8880cat >>confdefs.h <<\_ACEOF
98418dba 8881#define PROTOTYPES 1
c0d27fcc
MR
8882_ACEOF
8883
8884
8885cat >>confdefs.h <<\_ACEOF
8886#define __PROTOTYPES 1
8887_ACEOF
98418dba
CW
8888
8889else
d6e01aa5
KL
8890 { echo "$as_me:$LINENO: result: no" >&5
8891echo "${ECHO_T}no" >&6; }
98418dba
CW
8892fi
8893
d6e01aa5
KL
8894{ echo "$as_me:$LINENO: checking for working volatile" >&5
8895echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8896if test "${ac_cv_c_volatile+set}" = set; then
8897 echo $ECHO_N "(cached) $ECHO_C" >&6
8898else
8899 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8900/* confdefs.h. */
8901_ACEOF
8902cat confdefs.h >>conftest.$ac_ext
8903cat >>conftest.$ac_ext <<_ACEOF
8904/* end confdefs.h. */
98418dba 8905
98418dba
CW
8906int
8907main ()
8908{
8909
8910volatile int x;
d6e01aa5
KL
8911int * volatile y = (int *) 0;
8912return !x && !y;
98418dba
CW
8913 ;
8914 return 0;
8915}
8916_ACEOF
8917rm -f conftest.$ac_objext
d6e01aa5
KL
8918if { (ac_try="$ac_compile"
8919case "(($ac_try" in
8920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8921 *) ac_try_echo=$ac_try;;
8922esac
8923eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8924 (eval "$ac_compile") 2>conftest.er1
98418dba 8925 ac_status=$?
edfaf76d
LK
8926 grep -v '^ *+' conftest.er1 >conftest.err
8927 rm -f conftest.er1
8928 cat conftest.err >&5
c0d27fcc 8929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
8930 (exit $ac_status); } && {
8931 test -z "$ac_c_werror_flag" ||
8932 test ! -s conftest.err
8933 } && test -s conftest.$ac_objext; then
98418dba
CW
8934 ac_cv_c_volatile=yes
8935else
8936 echo "$as_me: failed program was:" >&5
19650fd6
AS
8937sed 's/^/| /' conftest.$ac_ext >&5
8938
d6e01aa5 8939 ac_cv_c_volatile=no
98418dba 8940fi
d6e01aa5
KL
8941
8942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8943fi
d6e01aa5
KL
8944{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8945echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8946if test $ac_cv_c_volatile = no; then
8947
c0d27fcc 8948cat >>confdefs.h <<\_ACEOF
98418dba 8949#define volatile
c0d27fcc 8950_ACEOF
98418dba
CW
8951
8952fi
8953
d6e01aa5
KL
8954{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8955echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8956if test "${ac_cv_c_const+set}" = set; then
8957 echo $ECHO_N "(cached) $ECHO_C" >&6
8958else
8959 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8960/* confdefs.h. */
8961_ACEOF
8962cat confdefs.h >>conftest.$ac_ext
8963cat >>conftest.$ac_ext <<_ACEOF
8964/* end confdefs.h. */
98418dba 8965
98418dba
CW
8966int
8967main ()
8968{
8969/* FIXME: Include the comments suggested by Paul. */
8970#ifndef __cplusplus
8971 /* Ultrix mips cc rejects this. */
8972 typedef int charset[2];
d6e01aa5 8973 const charset cs;
98418dba 8974 /* SunOS 4.1.1 cc rejects this. */
d6e01aa5
KL
8975 char const *const *pcpcc;
8976 char **ppc;
98418dba
CW
8977 /* NEC SVR4.0.2 mips cc rejects this. */
8978 struct point {int x, y;};
8979 static struct point const zero = {0,0};
8980 /* AIX XL C 1.02.0.0 rejects this.
8981 It does not let you subtract one const X* pointer from another in
8982 an arm of an if-expression whose if-part is not a constant
8983 expression */
8984 const char *g = "string";
d6e01aa5 8985 pcpcc = &g + (g ? g-g : 0);
98418dba 8986 /* HPUX 7.0 cc rejects these. */
d6e01aa5
KL
8987 ++pcpcc;
8988 ppc = (char**) pcpcc;
8989 pcpcc = (char const *const *) ppc;
98418dba
CW
8990 { /* SCO 3.2v4 cc rejects this. */
8991 char *t;
8992 char const *s = 0 ? (char *) 0 : (char const *) 0;
8993
8994 *t++ = 0;
d6e01aa5 8995 if (s) return 0;
98418dba
CW
8996 }
8997 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8998 int x[] = {25, 17};
8999 const int *foo = &x[0];
9000 ++foo;
9001 }
9002 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
9003 typedef const int *iptr;
9004 iptr p = 0;
9005 ++p;
9006 }
9007 { /* AIX XL C 1.02.0.0 rejects this saying
9008 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
9009 struct s { int j; const int *ap[3]; };
9010 struct s *b; b->j = 5;
9011 }
9012 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
9013 const int foo = 10;
d6e01aa5 9014 if (!foo) return 0;
98418dba 9015 }
d6e01aa5 9016 return !cs[0] && !zero.x;
98418dba
CW
9017#endif
9018
9019 ;
9020 return 0;
9021}
9022_ACEOF
9023rm -f conftest.$ac_objext
d6e01aa5
KL
9024if { (ac_try="$ac_compile"
9025case "(($ac_try" in
9026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9027 *) ac_try_echo=$ac_try;;
9028esac
9029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9030 (eval "$ac_compile") 2>conftest.er1
98418dba 9031 ac_status=$?
edfaf76d
LK
9032 grep -v '^ *+' conftest.er1 >conftest.err
9033 rm -f conftest.er1
9034 cat conftest.err >&5
c0d27fcc 9035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9036 (exit $ac_status); } && {
9037 test -z "$ac_c_werror_flag" ||
9038 test ! -s conftest.err
9039 } && test -s conftest.$ac_objext; then
98418dba
CW
9040 ac_cv_c_const=yes
9041else
9042 echo "$as_me: failed program was:" >&5
19650fd6
AS
9043sed 's/^/| /' conftest.$ac_ext >&5
9044
d6e01aa5 9045 ac_cv_c_const=no
98418dba 9046fi
d6e01aa5
KL
9047
9048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 9049fi
d6e01aa5
KL
9050{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
9051echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
9052if test $ac_cv_c_const = no; then
9053
c0d27fcc 9054cat >>confdefs.h <<\_ACEOF
98418dba 9055#define const
c0d27fcc 9056_ACEOF
98418dba
CW
9057
9058fi
9059
d6e01aa5
KL
9060{ echo "$as_me:$LINENO: checking for void * support" >&5
9061echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
9062if test "${emacs_cv_void_star+set}" = set; then
9063 echo $ECHO_N "(cached) $ECHO_C" >&6
9064else
9065 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9066/* confdefs.h. */
9067_ACEOF
9068cat confdefs.h >>conftest.$ac_ext
9069cat >>conftest.$ac_ext <<_ACEOF
9070/* end confdefs.h. */
98418dba 9071
98418dba
CW
9072int
9073main ()
9074{
9075void * foo;
9076 ;
9077 return 0;
9078}
9079_ACEOF
9080rm -f conftest.$ac_objext
d6e01aa5
KL
9081if { (ac_try="$ac_compile"
9082case "(($ac_try" in
9083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9084 *) ac_try_echo=$ac_try;;
9085esac
9086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9087 (eval "$ac_compile") 2>conftest.er1
98418dba 9088 ac_status=$?
edfaf76d
LK
9089 grep -v '^ *+' conftest.er1 >conftest.err
9090 rm -f conftest.er1
9091 cat conftest.err >&5
c0d27fcc 9092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9093 (exit $ac_status); } && {
9094 test -z "$ac_c_werror_flag" ||
9095 test ! -s conftest.err
9096 } && test -s conftest.$ac_objext; then
98418dba
CW
9097 emacs_cv_void_star=yes
9098else
9099 echo "$as_me: failed program was:" >&5
19650fd6
AS
9100sed 's/^/| /' conftest.$ac_ext >&5
9101
d6e01aa5 9102 emacs_cv_void_star=no
98418dba 9103fi
d6e01aa5
KL
9104
9105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 9106fi
d6e01aa5
KL
9107{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
9108echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 9109if test $emacs_cv_void_star = yes; then
c0d27fcc 9110 cat >>confdefs.h <<\_ACEOF
98418dba 9111#define POINTER_TYPE void
c0d27fcc 9112_ACEOF
98418dba
CW
9113
9114else
c0d27fcc 9115 cat >>confdefs.h <<\_ACEOF
98418dba 9116#define POINTER_TYPE char
c0d27fcc 9117_ACEOF
98418dba
CW
9118
9119fi
9120
c0d27fcc 9121
4494a266
JD
9122
9123
cd958eb3 9124
d6e01aa5
KL
9125{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
9126echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
9127set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
9128if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9129 echo $ECHO_N "(cached) $ECHO_C" >&6
9130else
c0d27fcc 9131 cat >conftest.make <<\_ACEOF
d6e01aa5 9132SHELL = /bin/sh
98418dba 9133all:
d6e01aa5 9134 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 9135_ACEOF
98418dba 9136# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
d6e01aa5
KL
9137case `${MAKE-make} -f conftest.make 2>/dev/null` in
9138 *@@@%%%=?*=@@@%%%*)
9139 eval ac_cv_prog_make_${ac_make}_set=yes;;
9140 *)
9141 eval ac_cv_prog_make_${ac_make}_set=no;;
9142esac
98418dba
CW
9143rm -f conftest.make
9144fi
d6e01aa5
KL
9145if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
9146 { echo "$as_me:$LINENO: result: yes" >&5
9147echo "${ECHO_T}yes" >&6; }
98418dba
CW
9148 SET_MAKE=
9149else
d6e01aa5
KL
9150 { echo "$as_me:$LINENO: result: no" >&5
9151echo "${ECHO_T}no" >&6; }
98418dba
CW
9152 SET_MAKE="MAKE=${MAKE-make}"
9153fi
9154
c0d27fcc 9155
d6e01aa5
KL
9156{ echo "$as_me:$LINENO: checking for long file names" >&5
9157echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
9158if test "${ac_cv_sys_long_file_names+set}" = set; then
9159 echo $ECHO_N "(cached) $ECHO_C" >&6
9160else
9161 ac_cv_sys_long_file_names=yes
9162# Test for long file names in all the places we know might matter:
9163# . the current directory, where building will happen
9164# $prefix/lib where we will be installing things
9165# $exec_prefix/lib likewise
98418dba 9166# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
9167# /tmp where it might want to write temporary files
9168# /var/tmp likewise
9169# /usr/tmp likewise
d6e01aa5
KL
9170for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9171 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9172 # in the usual case where exec_prefix is '${prefix}'.
9173 case $ac_dir in #(
9174 . | /* | ?:[\\/]*) ;; #(
9175 *) continue;;
9176 esac
9177 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 9178 ac_xdir=$ac_dir/cf$$
d6e01aa5 9179 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
9180 ac_tf1=$ac_xdir/conftest9012345
9181 ac_tf2=$ac_xdir/conftest9012346
d6e01aa5 9182 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 9183 ac_cv_sys_long_file_names=no
d6e01aa5
KL
9184 rm -f -r "$ac_xdir" 2>/dev/null
9185 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
9186done
9187fi
d6e01aa5
KL
9188{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
9189echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
9190if test $ac_cv_sys_long_file_names = yes; then
9191
c0d27fcc 9192cat >>confdefs.h <<\_ACEOF
98418dba 9193#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 9194_ACEOF
98418dba
CW
9195
9196fi
9197
c0d27fcc 9198
98418dba
CW
9199#### Choose a window system.
9200
d6e01aa5
KL
9201{ echo "$as_me:$LINENO: checking for X" >&5
9202echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 9203
c0d27fcc 9204
d6e01aa5 9205# Check whether --with-x was given.
98418dba 9206if test "${with_x+set}" = set; then
d6e01aa5
KL
9207 withval=$with_x;
9208fi
98418dba 9209
98418dba
CW
9210# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9211if test "x$with_x" = xno; then
9212 # The user explicitly disabled X.
9213 have_x=disabled
9214else
d6e01aa5
KL
9215 case $x_includes,$x_libraries in #(
9216 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
9217echo "$as_me: error: Cannot use X directory names containing '" >&2;}
9218 { (exit 1); exit 1; }; };; #(
9219 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
9220 echo $ECHO_N "(cached) $ECHO_C" >&6
9221else
9222 # One or both of the vars are not set, and there is no cached value.
9223ac_x_includes=no ac_x_libraries=no
d6e01aa5 9224rm -f -r conftest.dir
98418dba
CW
9225if mkdir conftest.dir; then
9226 cd conftest.dir
c0d27fcc 9227 cat >Imakefile <<'_ACEOF'
d6e01aa5
KL
9228incroot:
9229 @echo incroot='${INCROOT}'
9230usrlibdir:
9231 @echo usrlibdir='${USRLIBDIR}'
9232libdir:
9233 @echo libdir='${LIBDIR}'
9234_ACEOF
9235 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 9236 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
d6e01aa5
KL
9237 for ac_var in incroot usrlibdir libdir; do
9238 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9239 done
98418dba
CW
9240 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9241 for ac_extension in a so sl; do
d6e01aa5
KL
9242 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9243 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 9244 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
9245 fi
9246 done
9247 # Screen out bogus values from the imake configuration. They are
9248 # bogus both because they are the default anyway, and because
9249 # using them would break gcc on systems where it needs fixed includes.
9250 case $ac_im_incroot in
d6e01aa5 9251 /usr/include) ac_x_includes= ;;
98418dba
CW
9252 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9253 esac
9254 case $ac_im_usrlibdir in
9255 /usr/lib | /lib) ;;
9256 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9257 esac
9258 fi
9259 cd ..
d6e01aa5 9260 rm -f -r conftest.dir
98418dba
CW
9261fi
9262
9263# Standard set of common directories for X headers.
9264# Check X11 before X11Rn because it is often a symlink to the current release.
9265ac_x_header_dirs='
9266/usr/X11/include
9267/usr/X11R6/include
9268/usr/X11R5/include
9269/usr/X11R4/include
9270
9271/usr/include/X11
9272/usr/include/X11R6
9273/usr/include/X11R5
9274/usr/include/X11R4
9275
9276/usr/local/X11/include
9277/usr/local/X11R6/include
9278/usr/local/X11R5/include
9279/usr/local/X11R4/include
9280
9281/usr/local/include/X11
9282/usr/local/include/X11R6
9283/usr/local/include/X11R5
9284/usr/local/include/X11R4
9285
9286/usr/X386/include
9287/usr/x386/include
9288/usr/XFree86/include/X11
9289
9290/usr/include
9291/usr/local/include
9292/usr/unsupported/include
9293/usr/athena/include
9294/usr/local/x11r5/include
9295/usr/lpp/Xamples/include
9296
9297/usr/openwin/include
9298/usr/openwin/share/include'
9299
9300if test "$ac_x_includes" = no; then
d6e01aa5 9301 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
9302 # First, try using that file with no special directory specified.
9303 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9304/* confdefs.h. */
9305_ACEOF
9306cat confdefs.h >>conftest.$ac_ext
9307cat >>conftest.$ac_ext <<_ACEOF
9308/* end confdefs.h. */
c3a63088 9309#include <X11/Xlib.h>
98418dba 9310_ACEOF
d6e01aa5
KL
9311if { (ac_try="$ac_cpp conftest.$ac_ext"
9312case "(($ac_try" in
9313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9314 *) ac_try_echo=$ac_try;;
9315esac
9316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9317 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9318 ac_status=$?
6bae0ccf 9319 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9320 rm -f conftest.er1
9321 cat conftest.err >&5
c0d27fcc 9322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9323 (exit $ac_status); } >/dev/null && {
9324 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9325 test ! -s conftest.err
9326 }; then
98418dba
CW
9327 # We can compile using X headers with no special include directory.
9328ac_x_includes=
9329else
9330 echo "$as_me: failed program was:" >&5
19650fd6
AS
9331sed 's/^/| /' conftest.$ac_ext >&5
9332
98418dba 9333 for ac_dir in $ac_x_header_dirs; do
c3a63088 9334 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9335 ac_x_includes=$ac_dir
9336 break
9337 fi
9338done
9339fi
d6e01aa5 9340
98418dba
CW
9341rm -f conftest.err conftest.$ac_ext
9342fi # $ac_x_includes = no
9343
9344if test "$ac_x_libraries" = no; then
9345 # Check for the libraries.
9346 # See if we find them without any special options.
9347 # Don't add to $LIBS permanently.
9348 ac_save_LIBS=$LIBS
c3a63088 9349 LIBS="-lX11 $LIBS"
98418dba 9350 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9351/* confdefs.h. */
9352_ACEOF
9353cat confdefs.h >>conftest.$ac_ext
9354cat >>conftest.$ac_ext <<_ACEOF
9355/* end confdefs.h. */
c3a63088 9356#include <X11/Xlib.h>
98418dba
CW
9357int
9358main ()
9359{
c3a63088 9360XrmInitialize ()
98418dba
CW
9361 ;
9362 return 0;
9363}
9364_ACEOF
9365rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
9366if { (ac_try="$ac_link"
9367case "(($ac_try" in
9368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9369 *) ac_try_echo=$ac_try;;
9370esac
9371eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9372 (eval "$ac_link") 2>conftest.er1
98418dba 9373 ac_status=$?
edfaf76d
LK
9374 grep -v '^ *+' conftest.er1 >conftest.err
9375 rm -f conftest.er1
9376 cat conftest.err >&5
c0d27fcc 9377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9378 (exit $ac_status); } && {
9379 test -z "$ac_c_werror_flag" ||
9380 test ! -s conftest.err
9381 } && test -s conftest$ac_exeext &&
9382 $as_test_x conftest$ac_exeext; then
98418dba
CW
9383 LIBS=$ac_save_LIBS
9384# We can link X programs with no special library path.
9385ac_x_libraries=
9386else
9387 echo "$as_me: failed program was:" >&5
19650fd6
AS
9388sed 's/^/| /' conftest.$ac_ext >&5
9389
d6e01aa5 9390 LIBS=$ac_save_LIBS
98418dba
CW
9391for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9392do
9393 # Don't even attempt the hair of trying to link an X program!
9394 for ac_extension in a so sl; do
d6e01aa5 9395 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9396 ac_x_libraries=$ac_dir
9397 break 2
9398 fi
9399 done
9400done
9401fi
d6e01aa5
KL
9402
9403rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9404 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9405fi # $ac_x_libraries = no
9406
d6e01aa5
KL
9407case $ac_x_includes,$ac_x_libraries in #(
9408 no,* | *,no | *\'*)
9409 # Didn't find X, or a directory has "'" in its name.
9410 ac_cv_have_x="have_x=no";; #(
9411 *)
9412 # Record where we found X for the cache.
9413 ac_cv_have_x="have_x=yes\
9414 ac_x_includes='$ac_x_includes'\
9415 ac_x_libraries='$ac_x_libraries'"
9416esac
98418dba 9417fi
d6e01aa5
KL
9418;; #(
9419 *) have_x=yes;;
9420 esac
98418dba
CW
9421 eval "$ac_cv_have_x"
9422fi # $with_x != no
9423
9424if test "$have_x" != yes; then
d6e01aa5
KL
9425 { echo "$as_me:$LINENO: result: $have_x" >&5
9426echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9427 no_x=yes
9428else
9429 # If each of the values was on the command line, it overrides each guess.
9430 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9431 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9432 # Update the cache value to reflect the command line values.
d6e01aa5
KL
9433 ac_cv_have_x="have_x=yes\
9434 ac_x_includes='$x_includes'\
9435 ac_x_libraries='$x_libraries'"
9436 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9437echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9438fi
9439
9440if test "$no_x" = yes; then
9441 window_system=none
9442else
9443 window_system=x11
9444fi
9445
92d1ccf4
AS
9446if test "${x_libraries}" != NONE; then
9447 if test -n "${x_libraries}"; then
9448 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9449 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9450 fi
98418dba 9451 x_default_search_path=""
92d1ccf4
AS
9452 x_search_path=${x_libraries}
9453 if test -z "${x_search_path}"; then
9454 x_search_path=/usr/lib
9455 fi
9456 for x_library in `echo ${x_search_path}: | \
9457 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9458 x_search_path="\
9459${x_library}/X11/%L/%T/%N%C%S:\
9460${x_library}/X11/%l/%T/%N%C%S:\
9461${x_library}/X11/%T/%N%C%S:\
9462${x_library}/X11/%L/%T/%N%S:\
9463${x_library}/X11/%l/%T/%N%S:\
9464${x_library}/X11/%T/%N%S"
9465 if test x"${x_default_search_path}" = x; then
9466 x_default_search_path=${x_search_path}
9467 else
9468 x_default_search_path="${x_search_path}:${x_default_search_path}"
9469 fi
9470 done
9471fi
9472if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9473 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9474fi
9475
9476if test x"${x_includes}" = x; then
9477 bitmapdir=/usr/include/X11/bitmaps
9478else
9479 # accumulate include directories that have X11 bitmap subdirectories
9480 bmd_acc="dummyval"
9481 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9482 if test -d "${bmd}/X11/bitmaps"; then
9483 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9484 fi
9485 if test -d "${bmd}/bitmaps"; then
9486 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9487 fi
9488 done
9489 if test ${bmd_acc} != "dummyval"; then
9490 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9491 fi
9492fi
9493
5d6da11e 9494HAVE_CARBON=no
1d4d5604
YM
9495if test "${with_carbon}" != no; then
9496 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
d6e01aa5
KL
9497 { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9498echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9499if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9500 echo $ECHO_N "(cached) $ECHO_C" >&6
9501fi
d6e01aa5
KL
9502{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9503echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9504else
9505 # Is the header compilable?
d6e01aa5
KL
9506{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9507echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
5d6da11e
YM
9508cat >conftest.$ac_ext <<_ACEOF
9509/* confdefs.h. */
9510_ACEOF
9511cat confdefs.h >>conftest.$ac_ext
9512cat >>conftest.$ac_ext <<_ACEOF
9513/* end confdefs.h. */
9514$ac_includes_default
9515#include <Carbon/Carbon.h>
9516_ACEOF
9517rm -f conftest.$ac_objext
d6e01aa5
KL
9518if { (ac_try="$ac_compile"
9519case "(($ac_try" in
9520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9521 *) ac_try_echo=$ac_try;;
9522esac
9523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9524 (eval "$ac_compile") 2>conftest.er1
5d6da11e 9525 ac_status=$?
edfaf76d
LK
9526 grep -v '^ *+' conftest.er1 >conftest.err
9527 rm -f conftest.er1
9528 cat conftest.err >&5
5d6da11e 9529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9530 (exit $ac_status); } && {
9531 test -z "$ac_c_werror_flag" ||
9532 test ! -s conftest.err
9533 } && test -s conftest.$ac_objext; then
5d6da11e
YM
9534 ac_header_compiler=yes
9535else
9536 echo "$as_me: failed program was:" >&5
9537sed 's/^/| /' conftest.$ac_ext >&5
9538
d6e01aa5 9539 ac_header_compiler=no
5d6da11e 9540fi
d6e01aa5
KL
9541
9542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9543{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9544echo "${ECHO_T}$ac_header_compiler" >&6; }
5d6da11e
YM
9545
9546# Is the header present?
d6e01aa5
KL
9547{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9548echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
5d6da11e
YM
9549cat >conftest.$ac_ext <<_ACEOF
9550/* confdefs.h. */
9551_ACEOF
9552cat confdefs.h >>conftest.$ac_ext
9553cat >>conftest.$ac_ext <<_ACEOF
9554/* end confdefs.h. */
9555#include <Carbon/Carbon.h>
9556_ACEOF
d6e01aa5
KL
9557if { (ac_try="$ac_cpp conftest.$ac_ext"
9558case "(($ac_try" in
9559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9560 *) ac_try_echo=$ac_try;;
9561esac
9562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9563 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5d6da11e
YM
9564 ac_status=$?
9565 grep -v '^ *+' conftest.er1 >conftest.err
9566 rm -f conftest.er1
9567 cat conftest.err >&5
9568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9569 (exit $ac_status); } >/dev/null && {
9570 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9571 test ! -s conftest.err
9572 }; then
5d6da11e
YM
9573 ac_header_preproc=yes
9574else
9575 echo "$as_me: failed program was:" >&5
9576sed 's/^/| /' conftest.$ac_ext >&5
9577
9578 ac_header_preproc=no
9579fi
d6e01aa5 9580
5d6da11e 9581rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
9582{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9583echo "${ECHO_T}$ac_header_preproc" >&6; }
5d6da11e
YM
9584
9585# So? What about this header?
edfaf76d
LK
9586case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9587 yes:no: )
5d6da11e
YM
9588 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9589echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9590 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
9591echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
9592 ac_header_preproc=yes
5d6da11e 9593 ;;
edfaf76d 9594 no:yes:* )
5d6da11e
YM
9595 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9596echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
9597 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9598echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9599 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
9600echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
9601 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
9602echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
9603 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9604echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9605 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
9606echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 9607
5d6da11e
YM
9608 ;;
9609esac
d6e01aa5
KL
9610{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9611echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9612if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9613 echo $ECHO_N "(cached) $ECHO_C" >&6
9614else
9615 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
9616fi
d6e01aa5
KL
9617{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9618echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9619
9620fi
9621if test $ac_cv_header_Carbon_Carbon_h = yes; then
9622 HAVE_CARBON=yes
9623fi
9624
9625
1d4d5604
YM
9626fi
9627if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
9628 if test "${with_carbon+set}" != set \
9629 && test "${carbon_appdir_x+set}" != set; then
ec8fcb10
YM
9630 for var in with_x with_x_toolkit with_gtk with_xim \
9631 with_xpm with_jpeg with_tiff with_gif with_png; do
9632 if eval test \"\${$var+set}\" = set; then
9633 HAVE_CARBON=no
9634 break
9635 fi
9636 done
5d6da11e
YM
9637 fi
9638fi
1d4d5604
YM
9639if test "${HAVE_CARBON}" = yes; then
9640 window_system=mac
9641fi
9642
9643case "${window_system}" in
9644 x11 )
9645 HAVE_X_WINDOWS=yes
9646 HAVE_X11=yes
9647 case "${with_x_toolkit}" in
9648 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9649 motif ) USE_X_TOOLKIT=MOTIF ;;
9650 gtk ) with_gtk=yes
9651 USE_X_TOOLKIT=none ;;
9652 no ) USE_X_TOOLKIT=none ;;
089a966d
GM
9653 * )
9654 if test x"$with_gtk" = xyes; then
9655 USE_X_TOOLKIT=none
9656 else
9657 USE_X_TOOLKIT=maybe
9658 fi
9659 ;;
1d4d5604
YM
9660 esac
9661 ;;
9662 mac | none )
9663 HAVE_X_WINDOWS=no
9664 HAVE_X11=no
9665 USE_X_TOOLKIT=none
9666 ;;
9667esac
9668
cfe440b8
JD
9669if test "$window_system" = none && test "X$with_x" != "Xno"; then
9670 # Extract the first word of "X", so it can be a program name with args.
9671set dummy X; ac_word=$2
9672{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9673echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9674if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
9675 echo $ECHO_N "(cached) $ECHO_C" >&6
9676else
9677 if test -n "$HAVE_XSERVER"; then
9678 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9679else
9680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9681for as_dir in $PATH
9682do
9683 IFS=$as_save_IFS
9684 test -z "$as_dir" && as_dir=.
9685 for ac_exec_ext in '' $ac_executable_extensions; do
9686 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9687 ac_cv_prog_HAVE_XSERVER="true"
9688 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9689 break 2
9690 fi
9691done
9692done
9693IFS=$as_save_IFS
9694
9695 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9696fi
9697fi
9698HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9699if test -n "$HAVE_XSERVER"; then
9700 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9701echo "${ECHO_T}$HAVE_XSERVER" >&6; }
9702else
9703 { echo "$as_me:$LINENO: result: no" >&5
9704echo "${ECHO_T}no" >&6; }
9705fi
9706
9707
9708 if test "$HAVE_XSERVER" = true ||
9709 test -n "$DISPLAY" ||
9710 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9711 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
0cfc0546
GM
9712were found. You should install the relevant development files for X
9713and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9714sure you have development files for image handling, i.e.
9715tiff, gif, jpeg, png and xpm.
9716If you are sure you want Emacs compiled without X window support, pass
9717 --without-x
9718to configure." >&5
9719echo "$as_me: error: You seem to be running X, but no X development libraries
0cfc0546
GM
9720were found. You should install the relevant development files for X
9721and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9722sure you have development files for image handling, i.e.
9723tiff, gif, jpeg, png and xpm.
9724If you are sure you want Emacs compiled without X window support, pass
9725 --without-x
9726to configure." >&2;}
9727 { (exit 1); exit 1; }; }
9728 fi
9729fi
9730
1d4d5604
YM
9731### If we're using X11, we should use the X menu package.
9732HAVE_MENUS=no
9733case ${HAVE_X11} in
9734 yes ) HAVE_MENUS=yes ;;
9735esac
9736
9737if test "${opsys}" = "hpux9"; then
9738 case "${x_libraries}" in
9739 *X11R4* )
9740 opsysfile="s/hpux9-x11r4.h"
9741 ;;
9742 esac
9743fi
9744
9745if test "${opsys}" = "hpux9shr"; then
9746 case "${x_libraries}" in
9747 *X11R4* )
9748 opsysfile="s/hpux9shxr4.h"
9749 ;;
9750 esac
9751fi
5d6da11e 9752
98418dba
CW
9753### Compute the unexec source name from the object name.
9754UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
9755
9756# Do the opsystem or machine files prohibit the use of the GNU malloc?
9757# Assume not, until told otherwise.
9758GNU_MALLOC=yes
9759doug_lea_malloc=yes
d6e01aa5
KL
9760{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9761echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9762if test "${ac_cv_func_malloc_get_state+set}" = set; then
9763 echo $ECHO_N "(cached) $ECHO_C" >&6
9764else
9765 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9766/* confdefs.h. */
9767_ACEOF
9768cat confdefs.h >>conftest.$ac_ext
9769cat >>conftest.$ac_ext <<_ACEOF
9770/* end confdefs.h. */
edfaf76d
LK
9771/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9772 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9773#define malloc_get_state innocuous_malloc_get_state
9774
98418dba 9775/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9776 which can conflict with char malloc_get_state (); below.
9777 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9778 <limits.h> exists even on freestanding compilers. */
edfaf76d 9779
19650fd6
AS
9780#ifdef __STDC__
9781# include <limits.h>
9782#else
9783# include <assert.h>
9784#endif
edfaf76d
LK
9785
9786#undef malloc_get_state
9787
d6e01aa5
KL
9788/* Override any GCC internal prototype to avoid an error.
9789 Use char because int might match the return type of a GCC
9790 builtin and then its argument prototype would still apply. */
98418dba
CW
9791#ifdef __cplusplus
9792extern "C"
9793#endif
98418dba 9794char malloc_get_state ();
98418dba
CW
9795/* The GNU C library defines this for functions which it implements
9796 to always fail with ENOSYS. Some functions are actually named
9797 something starting with __ and the normal name is an alias. */
d6e01aa5 9798#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9799choke me
98418dba
CW
9800#endif
9801
19650fd6
AS
9802int
9803main ()
9804{
d6e01aa5 9805return malloc_get_state ();
98418dba
CW
9806 ;
9807 return 0;
9808}
9809_ACEOF
9810rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
9811if { (ac_try="$ac_link"
9812case "(($ac_try" in
9813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9814 *) ac_try_echo=$ac_try;;
9815esac
9816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9817 (eval "$ac_link") 2>conftest.er1
98418dba 9818 ac_status=$?
edfaf76d
LK
9819 grep -v '^ *+' conftest.er1 >conftest.err
9820 rm -f conftest.er1
9821 cat conftest.err >&5
c0d27fcc 9822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9823 (exit $ac_status); } && {
9824 test -z "$ac_c_werror_flag" ||
9825 test ! -s conftest.err
9826 } && test -s conftest$ac_exeext &&
9827 $as_test_x conftest$ac_exeext; then
98418dba
CW
9828 ac_cv_func_malloc_get_state=yes
9829else
9830 echo "$as_me: failed program was:" >&5
19650fd6
AS
9831sed 's/^/| /' conftest.$ac_ext >&5
9832
d6e01aa5 9833 ac_cv_func_malloc_get_state=no
98418dba 9834fi
d6e01aa5
KL
9835
9836rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9837 conftest$ac_exeext conftest.$ac_ext
98418dba 9838fi
d6e01aa5
KL
9839{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9840echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9841if test $ac_cv_func_malloc_get_state = yes; then
9842 :
9843else
9844 doug_lea_malloc=no
9845fi
9846
d6e01aa5
KL
9847{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9848echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9849if test "${ac_cv_func_malloc_set_state+set}" = set; then
9850 echo $ECHO_N "(cached) $ECHO_C" >&6
9851else
9852 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9853/* confdefs.h. */
9854_ACEOF
9855cat confdefs.h >>conftest.$ac_ext
9856cat >>conftest.$ac_ext <<_ACEOF
9857/* end confdefs.h. */
edfaf76d
LK
9858/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9859 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9860#define malloc_set_state innocuous_malloc_set_state
9861
98418dba 9862/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9863 which can conflict with char malloc_set_state (); below.
9864 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9865 <limits.h> exists even on freestanding compilers. */
edfaf76d 9866
19650fd6
AS
9867#ifdef __STDC__
9868# include <limits.h>
9869#else
9870# include <assert.h>
9871#endif
edfaf76d
LK
9872
9873#undef malloc_set_state
9874
d6e01aa5
KL
9875/* Override any GCC internal prototype to avoid an error.
9876 Use char because int might match the return type of a GCC
9877 builtin and then its argument prototype would still apply. */
98418dba
CW
9878#ifdef __cplusplus
9879extern "C"
9880#endif
98418dba 9881char malloc_set_state ();
98418dba
CW
9882/* The GNU C library defines this for functions which it implements
9883 to always fail with ENOSYS. Some functions are actually named
9884 something starting with __ and the normal name is an alias. */
d6e01aa5 9885#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9886choke me
98418dba
CW
9887#endif
9888
19650fd6
AS
9889int
9890main ()
9891{
d6e01aa5 9892return malloc_set_state ();
98418dba
CW
9893 ;
9894 return 0;
9895}
9896_ACEOF
9897rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
9898if { (ac_try="$ac_link"
9899case "(($ac_try" in
9900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9901 *) ac_try_echo=$ac_try;;
9902esac
9903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9904 (eval "$ac_link") 2>conftest.er1
98418dba 9905 ac_status=$?
edfaf76d
LK
9906 grep -v '^ *+' conftest.er1 >conftest.err
9907 rm -f conftest.er1
9908 cat conftest.err >&5
c0d27fcc 9909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9910 (exit $ac_status); } && {
9911 test -z "$ac_c_werror_flag" ||
9912 test ! -s conftest.err
9913 } && test -s conftest$ac_exeext &&
9914 $as_test_x conftest$ac_exeext; then
98418dba
CW
9915 ac_cv_func_malloc_set_state=yes
9916else
9917 echo "$as_me: failed program was:" >&5
19650fd6
AS
9918sed 's/^/| /' conftest.$ac_ext >&5
9919
d6e01aa5 9920 ac_cv_func_malloc_set_state=no
98418dba 9921fi
d6e01aa5
KL
9922
9923rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9924 conftest$ac_exeext conftest.$ac_ext
98418dba 9925fi
d6e01aa5
KL
9926{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9927echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9928if test $ac_cv_func_malloc_set_state = yes; then
9929 :
9930else
9931 doug_lea_malloc=no
9932fi
9933
d6e01aa5
KL
9934{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9935echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9936if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9937 echo $ECHO_N "(cached) $ECHO_C" >&6
9938else
9939 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9940/* confdefs.h. */
9941_ACEOF
9942cat confdefs.h >>conftest.$ac_ext
9943cat >>conftest.$ac_ext <<_ACEOF
9944/* end confdefs.h. */
98418dba 9945extern void (* __after_morecore_hook)();
98418dba
CW
9946int
9947main ()
9948{
9949__after_morecore_hook = 0
9950 ;
9951 return 0;
9952}
9953_ACEOF
9954rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
9955if { (ac_try="$ac_link"
9956case "(($ac_try" in
9957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9958 *) ac_try_echo=$ac_try;;
9959esac
9960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9961 (eval "$ac_link") 2>conftest.er1
98418dba 9962 ac_status=$?
edfaf76d
LK
9963 grep -v '^ *+' conftest.er1 >conftest.err
9964 rm -f conftest.er1
9965 cat conftest.err >&5
c0d27fcc 9966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
9967 (exit $ac_status); } && {
9968 test -z "$ac_c_werror_flag" ||
9969 test ! -s conftest.err
9970 } && test -s conftest$ac_exeext &&
9971 $as_test_x conftest$ac_exeext; then
98418dba
CW
9972 emacs_cv_var___after_morecore_hook=yes
9973else
9974 echo "$as_me: failed program was:" >&5
19650fd6
AS
9975sed 's/^/| /' conftest.$ac_ext >&5
9976
d6e01aa5 9977 emacs_cv_var___after_morecore_hook=no
98418dba 9978fi
d6e01aa5
KL
9979
9980rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9981 conftest$ac_exeext conftest.$ac_ext
98418dba 9982fi
d6e01aa5
KL
9983{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9984echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9985if test $emacs_cv_var___after_morecore_hook = no; then
9986 doug_lea_malloc=no
9987fi
9988if test "${system_malloc}" = "yes"; then
9989 GNU_MALLOC=no
9990 GNU_MALLOC_reason="
9991 (The GNU allocators don't work with this system configuration.)"
9992fi
9993if test "$doug_lea_malloc" = "yes" ; then
9994 if test "$GNU_MALLOC" = yes ; then
9995 GNU_MALLOC_reason="
9996 (Using Doug Lea's new malloc from the GNU C Library.)"
9997 fi
b936fae4 9998
c0d27fcc 9999cat >>confdefs.h <<\_ACEOF
98418dba 10000#define DOUG_LEA_MALLOC 1
c0d27fcc 10001_ACEOF
98418dba
CW
10002
10003fi
10004
10005if test x"${REL_ALLOC}" = x; then
10006 REL_ALLOC=${GNU_MALLOC}
10007fi
10008
10009
c0d27fcc
MR
10010
10011
10012for ac_header in stdlib.h unistd.h
98418dba
CW
10013do
10014as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
10015if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10016 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10017echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10018if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 10019 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 10020fi
d6e01aa5
KL
10021ac_res=`eval echo '${'$as_ac_Header'}'`
10022 { echo "$as_me:$LINENO: result: $ac_res" >&5
10023echo "${ECHO_T}$ac_res" >&6; }
98418dba 10024else
c0d27fcc 10025 # Is the header compilable?
d6e01aa5
KL
10026{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
10027echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 10028cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10029/* confdefs.h. */
10030_ACEOF
10031cat confdefs.h >>conftest.$ac_ext
10032cat >>conftest.$ac_ext <<_ACEOF
10033/* end confdefs.h. */
98418dba
CW
10034$ac_includes_default
10035#include <$ac_header>
10036_ACEOF
10037rm -f conftest.$ac_objext
d6e01aa5
KL
10038if { (ac_try="$ac_compile"
10039case "(($ac_try" in
10040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10041 *) ac_try_echo=$ac_try;;
10042esac
10043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10044 (eval "$ac_compile") 2>conftest.er1
98418dba 10045 ac_status=$?
edfaf76d
LK
10046 grep -v '^ *+' conftest.er1 >conftest.err
10047 rm -f conftest.er1
10048 cat conftest.err >&5
c0d27fcc 10049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10050 (exit $ac_status); } && {
10051 test -z "$ac_c_werror_flag" ||
10052 test ! -s conftest.err
10053 } && test -s conftest.$ac_objext; then
c0d27fcc 10054 ac_header_compiler=yes
98418dba
CW
10055else
10056 echo "$as_me: failed program was:" >&5
19650fd6
AS
10057sed 's/^/| /' conftest.$ac_ext >&5
10058
d6e01aa5 10059 ac_header_compiler=no
98418dba 10060fi
d6e01aa5
KL
10061
10062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10063{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10064echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 10065
c0d27fcc 10066# Is the header present?
d6e01aa5
KL
10067{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
10068echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 10069cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10070/* confdefs.h. */
10071_ACEOF
10072cat confdefs.h >>conftest.$ac_ext
10073cat >>conftest.$ac_ext <<_ACEOF
10074/* end confdefs.h. */
98418dba
CW
10075#include <$ac_header>
10076_ACEOF
d6e01aa5
KL
10077if { (ac_try="$ac_cpp conftest.$ac_ext"
10078case "(($ac_try" in
10079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10080 *) ac_try_echo=$ac_try;;
10081esac
10082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10083 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 10084 ac_status=$?
6bae0ccf 10085 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
10086 rm -f conftest.er1
10087 cat conftest.err >&5
c0d27fcc 10088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10089 (exit $ac_status); } >/dev/null && {
10090 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10091 test ! -s conftest.err
10092 }; then
c0d27fcc 10093 ac_header_preproc=yes
98418dba
CW
10094else
10095 echo "$as_me: failed program was:" >&5
19650fd6
AS
10096sed 's/^/| /' conftest.$ac_ext >&5
10097
c0d27fcc 10098 ac_header_preproc=no
98418dba 10099fi
d6e01aa5 10100
98418dba 10101rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
10102{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10103echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
10104
10105# So? What about this header?
edfaf76d
LK
10106case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10107 yes:no: )
c0d27fcc
MR
10108 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10109echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
10110 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10111echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10112 ac_header_preproc=yes
10113 ;;
10114 no:yes:* )
10115 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10116echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10117 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10118echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10119 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10120echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10121 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10122echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
10123 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10124echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
10125 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10126echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 10127
19650fd6 10128 ;;
c0d27fcc 10129esac
d6e01aa5
KL
10130{ echo "$as_me:$LINENO: checking for $ac_header" >&5
10131echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10132if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
10133 echo $ECHO_N "(cached) $ECHO_C" >&6
10134else
edfaf76d 10135 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 10136fi
d6e01aa5
KL
10137ac_res=`eval echo '${'$as_ac_Header'}'`
10138 { echo "$as_me:$LINENO: result: $ac_res" >&5
10139echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
10140
10141fi
98418dba 10142if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 10143 cat >>confdefs.h <<_ACEOF
98418dba 10144#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 10145_ACEOF
98418dba
CW
10146
10147fi
c0d27fcc 10148
98418dba
CW
10149done
10150
c0d27fcc 10151
98418dba
CW
10152for ac_func in getpagesize
10153do
10154as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
10155{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10156echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10157if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10158 echo $ECHO_N "(cached) $ECHO_C" >&6
10159else
10160 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10161/* confdefs.h. */
10162_ACEOF
10163cat confdefs.h >>conftest.$ac_ext
10164cat >>conftest.$ac_ext <<_ACEOF
10165/* end confdefs.h. */
edfaf76d
LK
10166/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10167 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10168#define $ac_func innocuous_$ac_func
10169
98418dba 10170/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10171 which can conflict with char $ac_func (); below.
10172 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10173 <limits.h> exists even on freestanding compilers. */
edfaf76d 10174
19650fd6
AS
10175#ifdef __STDC__
10176# include <limits.h>
10177#else
10178# include <assert.h>
10179#endif
edfaf76d
LK
10180
10181#undef $ac_func
10182
d6e01aa5
KL
10183/* Override any GCC internal prototype to avoid an error.
10184 Use char because int might match the return type of a GCC
10185 builtin and then its argument prototype would still apply. */
98418dba
CW
10186#ifdef __cplusplus
10187extern "C"
10188#endif
98418dba 10189char $ac_func ();
98418dba
CW
10190/* The GNU C library defines this for functions which it implements
10191 to always fail with ENOSYS. Some functions are actually named
10192 something starting with __ and the normal name is an alias. */
d6e01aa5 10193#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10194choke me
98418dba
CW
10195#endif
10196
19650fd6
AS
10197int
10198main ()
10199{
d6e01aa5 10200return $ac_func ();
98418dba
CW
10201 ;
10202 return 0;
10203}
10204_ACEOF
10205rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10206if { (ac_try="$ac_link"
10207case "(($ac_try" in
10208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10209 *) ac_try_echo=$ac_try;;
10210esac
10211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10212 (eval "$ac_link") 2>conftest.er1
98418dba 10213 ac_status=$?
edfaf76d
LK
10214 grep -v '^ *+' conftest.er1 >conftest.err
10215 rm -f conftest.er1
10216 cat conftest.err >&5
c0d27fcc 10217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10218 (exit $ac_status); } && {
10219 test -z "$ac_c_werror_flag" ||
10220 test ! -s conftest.err
10221 } && test -s conftest$ac_exeext &&
10222 $as_test_x conftest$ac_exeext; then
98418dba
CW
10223 eval "$as_ac_var=yes"
10224else
10225 echo "$as_me: failed program was:" >&5
19650fd6
AS
10226sed 's/^/| /' conftest.$ac_ext >&5
10227
d6e01aa5 10228 eval "$as_ac_var=no"
98418dba 10229fi
d6e01aa5
KL
10230
10231rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10232 conftest$ac_exeext conftest.$ac_ext
98418dba 10233fi
d6e01aa5
KL
10234ac_res=`eval echo '${'$as_ac_var'}'`
10235 { echo "$as_me:$LINENO: result: $ac_res" >&5
10236echo "${ECHO_T}$ac_res" >&6; }
98418dba 10237if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10238 cat >>confdefs.h <<_ACEOF
98418dba 10239#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10240_ACEOF
98418dba
CW
10241
10242fi
10243done
10244
d6e01aa5
KL
10245{ echo "$as_me:$LINENO: checking for working mmap" >&5
10246echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
10247if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
10248 echo $ECHO_N "(cached) $ECHO_C" >&6
10249else
10250 if test "$cross_compiling" = yes; then
10251 ac_cv_func_mmap_fixed_mapped=no
10252else
10253 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10254/* confdefs.h. */
10255_ACEOF
10256cat confdefs.h >>conftest.$ac_ext
10257cat >>conftest.$ac_ext <<_ACEOF
10258/* end confdefs.h. */
98418dba 10259$ac_includes_default
c0d27fcc
MR
10260/* malloc might have been renamed as rpl_malloc. */
10261#undef malloc
10262
98418dba
CW
10263/* Thanks to Mike Haertel and Jim Avera for this test.
10264 Here is a matrix of mmap possibilities:
10265 mmap private not fixed
10266 mmap private fixed at somewhere currently unmapped
10267 mmap private fixed at somewhere already mapped
10268 mmap shared not fixed
10269 mmap shared fixed at somewhere currently unmapped
10270 mmap shared fixed at somewhere already mapped
10271 For private mappings, we should verify that changes cannot be read()
10272 back from the file, nor mmap's back from the file at a different
10273 address. (There have been systems where private was not correctly
10274 implemented like the infamous i386 svr4.0, and systems where the
10275 VM page cache was not coherent with the file system buffer cache
10276 like early versions of FreeBSD and possibly contemporary NetBSD.)
10277 For shared mappings, we should conversely verify that changes get
c0d27fcc 10278 propagated back to all the places they're supposed to be.
98418dba
CW
10279
10280 Grep wants private fixed already mapped.
10281 The main things grep needs to know about mmap are:
10282 * does it exist and is it safe to write into the mmap'd area
10283 * how to use it (BSD variants) */
10284
10285#include <fcntl.h>
10286#include <sys/mman.h>
10287
d6e01aa5 10288#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10289char *malloc ();
10290#endif
10291
10292/* This mess was copied from the GNU getpagesize.h. */
d6e01aa5 10293#ifndef HAVE_GETPAGESIZE
98418dba 10294/* Assume that all systems that can run configure have sys/param.h. */
d6e01aa5 10295# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10296# define HAVE_SYS_PARAM_H 1
10297# endif
10298
10299# ifdef _SC_PAGESIZE
10300# define getpagesize() sysconf(_SC_PAGESIZE)
10301# else /* no _SC_PAGESIZE */
d6e01aa5 10302# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10303# include <sys/param.h>
10304# ifdef EXEC_PAGESIZE
10305# define getpagesize() EXEC_PAGESIZE
10306# else /* no EXEC_PAGESIZE */
10307# ifdef NBPG
10308# define getpagesize() NBPG * CLSIZE
10309# ifndef CLSIZE
10310# define CLSIZE 1
10311# endif /* no CLSIZE */
10312# else /* no NBPG */
10313# ifdef NBPC
10314# define getpagesize() NBPC
10315# else /* no NBPC */
10316# ifdef PAGESIZE
10317# define getpagesize() PAGESIZE
10318# endif /* PAGESIZE */
10319# endif /* no NBPC */
10320# endif /* no NBPG */
10321# endif /* no EXEC_PAGESIZE */
10322# else /* no HAVE_SYS_PARAM_H */
10323# define getpagesize() 8192 /* punt totally */
10324# endif /* no HAVE_SYS_PARAM_H */
10325# endif /* no _SC_PAGESIZE */
10326
10327#endif /* no HAVE_GETPAGESIZE */
10328
10329int
10330main ()
10331{
10332 char *data, *data2, *data3;
10333 int i, pagesize;
10334 int fd;
10335
10336 pagesize = getpagesize ();
10337
10338 /* First, make a file with some known garbage in it. */
10339 data = (char *) malloc (pagesize);
10340 if (!data)
d6e01aa5 10341 return 1;
98418dba
CW
10342 for (i = 0; i < pagesize; ++i)
10343 *(data + i) = rand ();
10344 umask (0);
10345 fd = creat ("conftest.mmap", 0600);
10346 if (fd < 0)
d6e01aa5 10347 return 1;
98418dba 10348 if (write (fd, data, pagesize) != pagesize)
d6e01aa5 10349 return 1;
98418dba
CW
10350 close (fd);
10351
10352 /* Next, try to mmap the file at a fixed address which already has
10353 something else allocated at it. If we can, also make sure that
10354 we see the same garbage. */
10355 fd = open ("conftest.mmap", O_RDWR);
10356 if (fd < 0)
d6e01aa5 10357 return 1;
98418dba
CW
10358 data2 = (char *) malloc (2 * pagesize);
10359 if (!data2)
d6e01aa5
KL
10360 return 1;
10361 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10362 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10363 MAP_PRIVATE | MAP_FIXED, fd, 0L))
d6e01aa5 10364 return 1;
98418dba
CW
10365 for (i = 0; i < pagesize; ++i)
10366 if (*(data + i) != *(data2 + i))
d6e01aa5 10367 return 1;
98418dba
CW
10368
10369 /* Finally, make sure that changes to the mapped area do not
10370 percolate back to the file as seen by read(). (This is a bug on
10371 some variants of i386 svr4.0.) */
10372 for (i = 0; i < pagesize; ++i)
10373 *(data2 + i) = *(data2 + i) + 1;
10374 data3 = (char *) malloc (pagesize);
10375 if (!data3)
d6e01aa5 10376 return 1;
98418dba 10377 if (read (fd, data3, pagesize) != pagesize)
d6e01aa5 10378 return 1;
98418dba
CW
10379 for (i = 0; i < pagesize; ++i)
10380 if (*(data + i) != *(data3 + i))
d6e01aa5 10381 return 1;
98418dba 10382 close (fd);
d6e01aa5 10383 return 0;
98418dba
CW
10384}
10385_ACEOF
10386rm -f conftest$ac_exeext
d6e01aa5
KL
10387if { (ac_try="$ac_link"
10388case "(($ac_try" in
10389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10390 *) ac_try_echo=$ac_try;;
10391esac
10392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10393 (eval "$ac_link") 2>&5
98418dba 10394 ac_status=$?
c0d27fcc 10395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10396 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
10397 { (case "(($ac_try" in
10398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10399 *) ac_try_echo=$ac_try;;
10400esac
10401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10402 (eval "$ac_try") 2>&5
98418dba 10403 ac_status=$?
c0d27fcc 10404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10405 (exit $ac_status); }; }; then
10406 ac_cv_func_mmap_fixed_mapped=yes
10407else
10408 echo "$as_me: program exited with status $ac_status" >&5
10409echo "$as_me: failed program was:" >&5
19650fd6
AS
10410sed 's/^/| /' conftest.$ac_ext >&5
10411
c0d27fcc 10412( exit $ac_status )
98418dba
CW
10413ac_cv_func_mmap_fixed_mapped=no
10414fi
d6e01aa5 10415rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10416fi
d6e01aa5
KL
10417
10418
98418dba 10419fi
d6e01aa5
KL
10420{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10421echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10422if test $ac_cv_func_mmap_fixed_mapped = yes; then
10423
c0d27fcc 10424cat >>confdefs.h <<\_ACEOF
98418dba 10425#define HAVE_MMAP 1
c0d27fcc 10426_ACEOF
98418dba
CW
10427
10428fi
10429rm -f conftest.mmap
10430
10431if test $use_mmap_for_buffers = yes; then
10432 REL_ALLOC=no
10433fi
10434
10435LIBS="$libsrc_libs $LIBS"
10436
c0d27fcc 10437
d6e01aa5
KL
10438{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10439echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10440if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10441 echo $ECHO_N "(cached) $ECHO_C" >&6
10442else
10443 ac_check_lib_save_LIBS=$LIBS
10444LIBS="-ldnet $LIBS"
10445cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10446/* confdefs.h. */
10447_ACEOF
10448cat confdefs.h >>conftest.$ac_ext
10449cat >>conftest.$ac_ext <<_ACEOF
10450/* end confdefs.h. */
98418dba 10451
d6e01aa5
KL
10452/* Override any GCC internal prototype to avoid an error.
10453 Use char because int might match the return type of a GCC
10454 builtin and then its argument prototype would still apply. */
98418dba
CW
10455#ifdef __cplusplus
10456extern "C"
10457#endif
98418dba 10458char dnet_ntoa ();
98418dba
CW
10459int
10460main ()
10461{
d6e01aa5 10462return dnet_ntoa ();
98418dba
CW
10463 ;
10464 return 0;
10465}
10466_ACEOF
10467rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10468if { (ac_try="$ac_link"
10469case "(($ac_try" in
10470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10471 *) ac_try_echo=$ac_try;;
10472esac
10473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10474 (eval "$ac_link") 2>conftest.er1
98418dba 10475 ac_status=$?
edfaf76d
LK
10476 grep -v '^ *+' conftest.er1 >conftest.err
10477 rm -f conftest.er1
10478 cat conftest.err >&5
c0d27fcc 10479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10480 (exit $ac_status); } && {
10481 test -z "$ac_c_werror_flag" ||
10482 test ! -s conftest.err
10483 } && test -s conftest$ac_exeext &&
10484 $as_test_x conftest$ac_exeext; then
98418dba
CW
10485 ac_cv_lib_dnet_dnet_ntoa=yes
10486else
10487 echo "$as_me: failed program was:" >&5
19650fd6
AS
10488sed 's/^/| /' conftest.$ac_ext >&5
10489
d6e01aa5 10490 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10491fi
d6e01aa5
KL
10492
10493rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10494 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10495LIBS=$ac_check_lib_save_LIBS
10496fi
d6e01aa5
KL
10497{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10498echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10499if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10500 cat >>confdefs.h <<_ACEOF
98418dba 10501#define HAVE_LIBDNET 1
c0d27fcc 10502_ACEOF
98418dba
CW
10503
10504 LIBS="-ldnet $LIBS"
10505
10506fi
10507
c0d27fcc 10508
d6e01aa5
KL
10509{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10510echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10511if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10512 echo $ECHO_N "(cached) $ECHO_C" >&6
10513else
10514 ac_check_lib_save_LIBS=$LIBS
10515LIBS="-lXbsd $LIBS"
10516cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10517/* confdefs.h. */
10518_ACEOF
10519cat confdefs.h >>conftest.$ac_ext
10520cat >>conftest.$ac_ext <<_ACEOF
10521/* end confdefs.h. */
98418dba 10522
c0d27fcc 10523
98418dba
CW
10524int
10525main ()
10526{
d6e01aa5 10527return main ();
98418dba
CW
10528 ;
10529 return 0;
10530}
10531_ACEOF
10532rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10533if { (ac_try="$ac_link"
10534case "(($ac_try" in
10535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10536 *) ac_try_echo=$ac_try;;
10537esac
10538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10539 (eval "$ac_link") 2>conftest.er1
98418dba 10540 ac_status=$?
edfaf76d
LK
10541 grep -v '^ *+' conftest.er1 >conftest.err
10542 rm -f conftest.er1
10543 cat conftest.err >&5
c0d27fcc 10544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10545 (exit $ac_status); } && {
10546 test -z "$ac_c_werror_flag" ||
10547 test ! -s conftest.err
10548 } && test -s conftest$ac_exeext &&
10549 $as_test_x conftest$ac_exeext; then
98418dba
CW
10550 ac_cv_lib_Xbsd_main=yes
10551else
10552 echo "$as_me: failed program was:" >&5
19650fd6
AS
10553sed 's/^/| /' conftest.$ac_ext >&5
10554
d6e01aa5 10555 ac_cv_lib_Xbsd_main=no
98418dba 10556fi
d6e01aa5
KL
10557
10558rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10559 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10560LIBS=$ac_check_lib_save_LIBS
10561fi
d6e01aa5
KL
10562{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10563echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10564if test $ac_cv_lib_Xbsd_main = yes; then
10565 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10566fi
10567
c0d27fcc
MR
10568
10569
d6e01aa5
KL
10570{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10571echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10572if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10573 echo $ECHO_N "(cached) $ECHO_C" >&6
10574else
10575 ac_check_lib_save_LIBS=$LIBS
10576LIBS="-lpthreads $LIBS"
10577cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10578/* confdefs.h. */
10579_ACEOF
10580cat confdefs.h >>conftest.$ac_ext
10581cat >>conftest.$ac_ext <<_ACEOF
10582/* end confdefs.h. */
98418dba 10583
d6e01aa5
KL
10584/* Override any GCC internal prototype to avoid an error.
10585 Use char because int might match the return type of a GCC
10586 builtin and then its argument prototype would still apply. */
98418dba
CW
10587#ifdef __cplusplus
10588extern "C"
10589#endif
98418dba 10590char cma_open ();
98418dba
CW
10591int
10592main ()
10593{
d6e01aa5 10594return cma_open ();
98418dba
CW
10595 ;
10596 return 0;
10597}
10598_ACEOF
10599rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10600if { (ac_try="$ac_link"
10601case "(($ac_try" in
10602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10603 *) ac_try_echo=$ac_try;;
10604esac
10605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10606 (eval "$ac_link") 2>conftest.er1
98418dba 10607 ac_status=$?
edfaf76d
LK
10608 grep -v '^ *+' conftest.er1 >conftest.err
10609 rm -f conftest.er1
10610 cat conftest.err >&5
c0d27fcc 10611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10612 (exit $ac_status); } && {
10613 test -z "$ac_c_werror_flag" ||
10614 test ! -s conftest.err
10615 } && test -s conftest$ac_exeext &&
10616 $as_test_x conftest$ac_exeext; then
98418dba
CW
10617 ac_cv_lib_pthreads_cma_open=yes
10618else
10619 echo "$as_me: failed program was:" >&5
19650fd6
AS
10620sed 's/^/| /' conftest.$ac_ext >&5
10621
d6e01aa5 10622 ac_cv_lib_pthreads_cma_open=no
98418dba 10623fi
d6e01aa5
KL
10624
10625rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10626 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10627LIBS=$ac_check_lib_save_LIBS
10628fi
d6e01aa5
KL
10629{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10630echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10631if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10632 cat >>confdefs.h <<_ACEOF
98418dba 10633#define HAVE_LIBPTHREADS 1
c0d27fcc 10634_ACEOF
98418dba
CW
10635
10636 LIBS="-lpthreads $LIBS"
10637
10638fi
10639
c0d27fcc 10640
d6e01aa5
KL
10641{ echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
10642echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6; }
98418dba
CW
10643if test -d /usr/X386/include; then
10644 HAVE_XFREE386=yes
10645 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
10646else
10647 HAVE_XFREE386=no
10648fi
d6e01aa5
KL
10649{ echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
10650echo "${ECHO_T}$HAVE_XFREE386" >&6; }
98418dba 10651
55597d70
DL
10652
10653case ${host_os} in
10654aix*)
d6e01aa5
KL
10655 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10656echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10657if test "${gdb_cv_bigtoc+set}" = set; then
10658 echo $ECHO_N "(cached) $ECHO_C" >&6
10659else
10660
10661 case $GCC in
10662 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10663 *) gdb_cv_bigtoc=-bbigtoc ;;
10664 esac
10665
10666 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10667 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10668/* confdefs.h. */
10669_ACEOF
10670cat confdefs.h >>conftest.$ac_ext
10671cat >>conftest.$ac_ext <<_ACEOF
10672/* end confdefs.h. */
55597d70
DL
10673
10674int
10675main ()
10676{
10677int i;
10678 ;
10679 return 0;
10680}
10681_ACEOF
10682rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10683if { (ac_try="$ac_link"
10684case "(($ac_try" in
10685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10686 *) ac_try_echo=$ac_try;;
10687esac
10688eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10689 (eval "$ac_link") 2>conftest.er1
55597d70 10690 ac_status=$?
edfaf76d
LK
10691 grep -v '^ *+' conftest.er1 >conftest.err
10692 rm -f conftest.er1
10693 cat conftest.err >&5
55597d70 10694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10695 (exit $ac_status); } && {
10696 test -z "$ac_c_werror_flag" ||
10697 test ! -s conftest.err
10698 } && test -s conftest$ac_exeext &&
10699 $as_test_x conftest$ac_exeext; then
55597d70
DL
10700 :
10701else
10702 echo "$as_me: failed program was:" >&5
19650fd6
AS
10703sed 's/^/| /' conftest.$ac_ext >&5
10704
d6e01aa5 10705 gdb_cv_bigtoc=
55597d70 10706fi
d6e01aa5
KL
10707
10708rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10709 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10710
10711fi
d6e01aa5
KL
10712{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10713echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10714 ;;
10715esac
10716
ae1a998c
RS
10717# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10718# used for the tests that follow. We set them back to REAL_CFLAGS and
10719# REAL_CPPFLAGS later on.
98418dba
CW
10720
10721REAL_CPPFLAGS="$CPPFLAGS"
10722
10723if test "${HAVE_X11}" = "yes"; then
10724 DEFS="$C_SWITCH_X_SITE $DEFS"
10725 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10726 LIBS="$LIBX $LIBS"
10727 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10728 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10729
10730 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10731 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10732 # but it's more convenient here to set LD_RUN_PATH
10733 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10734 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10735 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10736 export LD_RUN_PATH
10737 fi
10738
10739 if test "${opsys}" = "gnu-linux"; then
d6e01aa5
KL
10740 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10741echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10742 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10743/* confdefs.h. */
10744_ACEOF
10745cat confdefs.h >>conftest.$ac_ext
10746cat >>conftest.$ac_ext <<_ACEOF
10747/* end confdefs.h. */
98418dba 10748
98418dba
CW
10749int
10750main ()
10751{
10752XOpenDisplay ("foo");
10753 ;
10754 return 0;
10755}
10756_ACEOF
10757rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10758if { (ac_try="$ac_link"
10759case "(($ac_try" in
10760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10761 *) ac_try_echo=$ac_try;;
10762esac
10763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10764 (eval "$ac_link") 2>conftest.er1
98418dba 10765 ac_status=$?
edfaf76d
LK
10766 grep -v '^ *+' conftest.er1 >conftest.err
10767 rm -f conftest.er1
10768 cat conftest.err >&5
c0d27fcc 10769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10770 (exit $ac_status); } && {
10771 test -z "$ac_c_werror_flag" ||
10772 test ! -s conftest.err
10773 } && test -s conftest$ac_exeext &&
10774 $as_test_x conftest$ac_exeext; then
35996d22 10775 xlinux_first_failure=no
98418dba
CW
10776else
10777 echo "$as_me: failed program was:" >&5
19650fd6
AS
10778sed 's/^/| /' conftest.$ac_ext >&5
10779
d6e01aa5 10780 xlinux_first_failure=yes
98418dba 10781fi
d6e01aa5
KL
10782
10783rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10784 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10785 if test "${xlinux_first_failure}" = "yes"; then
10786 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10787 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10788 OLD_CPPFLAGS="$CPPFLAGS"
10789 OLD_LIBS="$LIBS"
10790 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10791 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10792 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10793 LIBS="$LIBS -b i486-linuxaout"
10794 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10795/* confdefs.h. */
10796_ACEOF
10797cat confdefs.h >>conftest.$ac_ext
10798cat >>conftest.$ac_ext <<_ACEOF
10799/* end confdefs.h. */
98418dba 10800
98418dba
CW
10801int
10802main ()
10803{
10804XOpenDisplay ("foo");
10805 ;
10806 return 0;
10807}
10808_ACEOF
10809rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10810if { (ac_try="$ac_link"
10811case "(($ac_try" in
10812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10813 *) ac_try_echo=$ac_try;;
10814esac
10815eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10816 (eval "$ac_link") 2>conftest.er1
98418dba 10817 ac_status=$?
edfaf76d
LK
10818 grep -v '^ *+' conftest.er1 >conftest.err
10819 rm -f conftest.er1
10820 cat conftest.err >&5
c0d27fcc 10821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10822 (exit $ac_status); } && {
10823 test -z "$ac_c_werror_flag" ||
10824 test ! -s conftest.err
10825 } && test -s conftest$ac_exeext &&
10826 $as_test_x conftest$ac_exeext; then
98418dba
CW
10827 xlinux_second_failure=no
10828else
10829 echo "$as_me: failed program was:" >&5
19650fd6
AS
10830sed 's/^/| /' conftest.$ac_ext >&5
10831
d6e01aa5 10832 xlinux_second_failure=yes
98418dba 10833fi
d6e01aa5
KL
10834
10835rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10836 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10837 if test "${xlinux_second_failure}" = "yes"; then
10838 # If we get the same failure with -b, there is no use adding -b.
10839 # So take it out. This plays safe.
10840 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10841 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10842 CPPFLAGS="$OLD_CPPFLAGS"
10843 LIBS="$OLD_LIBS"
d6e01aa5
KL
10844 { echo "$as_me:$LINENO: result: no" >&5
10845echo "${ECHO_T}no" >&6; }
98418dba 10846 else
d6e01aa5
KL
10847 { echo "$as_me:$LINENO: result: yes" >&5
10848echo "${ECHO_T}yes" >&6; }
98418dba
CW
10849 fi
10850 else
d6e01aa5
KL
10851 { echo "$as_me:$LINENO: result: no" >&5
10852echo "${ECHO_T}no" >&6; }
98418dba
CW
10853 fi
10854 fi
10855
10856 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10857 # header files included from there.
d6e01aa5
KL
10858 { echo "$as_me:$LINENO: checking for Xkb" >&5
10859echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10860 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10861/* confdefs.h. */
10862_ACEOF
10863cat confdefs.h >>conftest.$ac_ext
10864cat >>conftest.$ac_ext <<_ACEOF
10865/* end confdefs.h. */
98418dba
CW
10866#include <X11/Xlib.h>
10867#include <X11/XKBlib.h>
98418dba
CW
10868int
10869main ()
10870{
10871XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10872 ;
10873 return 0;
10874}
10875_ACEOF
10876rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10877if { (ac_try="$ac_link"
10878case "(($ac_try" in
10879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10880 *) ac_try_echo=$ac_try;;
10881esac
10882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10883 (eval "$ac_link") 2>conftest.er1
98418dba 10884 ac_status=$?
edfaf76d
LK
10885 grep -v '^ *+' conftest.er1 >conftest.err
10886 rm -f conftest.er1
10887 cat conftest.err >&5
c0d27fcc 10888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10889 (exit $ac_status); } && {
10890 test -z "$ac_c_werror_flag" ||
10891 test ! -s conftest.err
10892 } && test -s conftest$ac_exeext &&
10893 $as_test_x conftest$ac_exeext; then
98418dba
CW
10894 emacs_xkb=yes
10895else
10896 echo "$as_me: failed program was:" >&5
19650fd6
AS
10897sed 's/^/| /' conftest.$ac_ext >&5
10898
d6e01aa5 10899 emacs_xkb=no
98418dba 10900fi
d6e01aa5
KL
10901
10902rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10903 conftest$ac_exeext conftest.$ac_ext
d6e01aa5
KL
10904 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10905echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10906 if test $emacs_xkb = yes; then
b936fae4 10907
c0d27fcc 10908cat >>confdefs.h <<\_ACEOF
98418dba 10909#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10910_ACEOF
98418dba
CW
10911
10912 fi
10913
c0d27fcc
MR
10914
10915
10916
10917
98418dba
CW
10918for ac_func in XrmSetDatabase XScreenResourceString \
10919XScreenNumberOfScreen XSetWMProtocols
10920do
10921as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
10922{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10923echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10924if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10925 echo $ECHO_N "(cached) $ECHO_C" >&6
10926else
10927 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10928/* confdefs.h. */
10929_ACEOF
10930cat confdefs.h >>conftest.$ac_ext
10931cat >>conftest.$ac_ext <<_ACEOF
10932/* end confdefs.h. */
edfaf76d
LK
10933/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10934 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10935#define $ac_func innocuous_$ac_func
10936
98418dba 10937/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10938 which can conflict with char $ac_func (); below.
10939 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10940 <limits.h> exists even on freestanding compilers. */
edfaf76d 10941
19650fd6
AS
10942#ifdef __STDC__
10943# include <limits.h>
10944#else
10945# include <assert.h>
10946#endif
edfaf76d
LK
10947
10948#undef $ac_func
10949
d6e01aa5
KL
10950/* Override any GCC internal prototype to avoid an error.
10951 Use char because int might match the return type of a GCC
10952 builtin and then its argument prototype would still apply. */
98418dba
CW
10953#ifdef __cplusplus
10954extern "C"
10955#endif
98418dba 10956char $ac_func ();
98418dba
CW
10957/* The GNU C library defines this for functions which it implements
10958 to always fail with ENOSYS. Some functions are actually named
10959 something starting with __ and the normal name is an alias. */
d6e01aa5 10960#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10961choke me
98418dba
CW
10962#endif
10963
19650fd6
AS
10964int
10965main ()
10966{
d6e01aa5 10967return $ac_func ();
98418dba
CW
10968 ;
10969 return 0;
10970}
10971_ACEOF
10972rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
10973if { (ac_try="$ac_link"
10974case "(($ac_try" in
10975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10976 *) ac_try_echo=$ac_try;;
10977esac
10978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10979 (eval "$ac_link") 2>conftest.er1
98418dba 10980 ac_status=$?
edfaf76d
LK
10981 grep -v '^ *+' conftest.er1 >conftest.err
10982 rm -f conftest.er1
10983 cat conftest.err >&5
c0d27fcc 10984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
10985 (exit $ac_status); } && {
10986 test -z "$ac_c_werror_flag" ||
10987 test ! -s conftest.err
10988 } && test -s conftest$ac_exeext &&
10989 $as_test_x conftest$ac_exeext; then
98418dba
CW
10990 eval "$as_ac_var=yes"
10991else
10992 echo "$as_me: failed program was:" >&5
19650fd6
AS
10993sed 's/^/| /' conftest.$ac_ext >&5
10994
d6e01aa5 10995 eval "$as_ac_var=no"
98418dba 10996fi
d6e01aa5
KL
10997
10998rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10999 conftest$ac_exeext conftest.$ac_ext
98418dba 11000fi
d6e01aa5
KL
11001ac_res=`eval echo '${'$as_ac_var'}'`
11002 { echo "$as_me:$LINENO: result: $ac_res" >&5
11003echo "${ECHO_T}$ac_res" >&6; }
98418dba 11004if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 11005 cat >>confdefs.h <<_ACEOF
98418dba 11006#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 11007_ACEOF
98418dba
CW
11008
11009fi
11010done
11011
11012fi
11013
11014if test "${window_system}" = "x11"; then
d6e01aa5
KL
11015 { echo "$as_me:$LINENO: checking X11 version 6" >&5
11016echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
11017 if test "${emacs_cv_x11_version_6+set}" = set; then
11018 echo $ECHO_N "(cached) $ECHO_C" >&6
11019else
11020 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11021/* confdefs.h. */
11022_ACEOF
11023cat confdefs.h >>conftest.$ac_ext
11024cat >>conftest.$ac_ext <<_ACEOF
11025/* end confdefs.h. */
98418dba 11026#include <X11/Xlib.h>
98418dba
CW
11027int
11028main ()
11029{
11030#if XlibSpecificationRelease < 6
11031fail;
11032#endif
11033
11034 ;
11035 return 0;
11036}
11037_ACEOF
11038rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
11039if { (ac_try="$ac_link"
11040case "(($ac_try" in
11041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11042 *) ac_try_echo=$ac_try;;
11043esac
11044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11045 (eval "$ac_link") 2>conftest.er1
98418dba 11046 ac_status=$?
edfaf76d
LK
11047 grep -v '^ *+' conftest.er1 >conftest.err
11048 rm -f conftest.er1
11049 cat conftest.err >&5
c0d27fcc 11050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11051 (exit $ac_status); } && {
11052 test -z "$ac_c_werror_flag" ||
11053 test ! -s conftest.err
11054 } && test -s conftest$ac_exeext &&
11055 $as_test_x conftest$ac_exeext; then
98418dba
CW
11056 emacs_cv_x11_version_6=yes
11057else
11058 echo "$as_me: failed program was:" >&5
19650fd6
AS
11059sed 's/^/| /' conftest.$ac_ext >&5
11060
d6e01aa5 11061 emacs_cv_x11_version_6=no
98418dba 11062fi
d6e01aa5
KL
11063
11064rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11065 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11066fi
11067
11068 if test $emacs_cv_x11_version_6 = yes; then
d6e01aa5
KL
11069 { echo "$as_me:$LINENO: result: 6 or newer" >&5
11070echo "${ECHO_T}6 or newer" >&6; }
b936fae4 11071
c0d27fcc 11072cat >>confdefs.h <<\_ACEOF
98418dba 11073#define HAVE_X11R6 1
c0d27fcc 11074_ACEOF
98418dba
CW
11075
11076 else
d6e01aa5
KL
11077 { echo "$as_me:$LINENO: result: before 6" >&5
11078echo "${ECHO_T}before 6" >&6; }
98418dba
CW
11079 fi
11080fi
11081
98418dba 11082
0cfc0546
GM
11083### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
11084HAVE_RSVG=no
ae0476ed 11085if test "${HAVE_X11}" = "yes" || test "${HAVE_CARBON}" = "yes"; then
0cfc0546
GM
11086 if test "${with_rsvg}" != "no"; then
11087 if test "X${with_pkg_config_prog}" != X; then
11088 PKG_CONFIG="${with_pkg_config_prog}"
11089 fi
11090
11091 RSVG_REQUIRED=2.0.0
11092 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
11093
11094
11095 succeeded=no
11096
11097 if test -z "$PKG_CONFIG"; then
11098 # Extract the first word of "pkg-config", so it can be a program name with args.
11099set dummy pkg-config; ac_word=$2
11100{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11101echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11102if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11103 echo $ECHO_N "(cached) $ECHO_C" >&6
11104else
11105 case $PKG_CONFIG in
11106 [\\/]* | ?:[\\/]*)
11107 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11108 ;;
11109 *)
11110 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11111for as_dir in $PATH
11112do
11113 IFS=$as_save_IFS
11114 test -z "$as_dir" && as_dir=.
11115 for ac_exec_ext in '' $ac_executable_extensions; do
11116 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11117 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11118 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11119 break 2
11120 fi
11121done
11122done
11123IFS=$as_save_IFS
11124
11125 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11126 ;;
11127esac
11128fi
11129PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11130if test -n "$PKG_CONFIG"; then
11131 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11132echo "${ECHO_T}$PKG_CONFIG" >&6; }
11133else
11134 { echo "$as_me:$LINENO: result: no" >&5
11135echo "${ECHO_T}no" >&6; }
11136fi
11137
11138
11139 fi
11140
11141 if test "$PKG_CONFIG" = "no" ; then
11142 :
11143 else
11144 PKG_CONFIG_MIN_VERSION=0.9.0
11145 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11146 { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
11147echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
11148
11149 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
11150 { echo "$as_me:$LINENO: result: yes" >&5
11151echo "${ECHO_T}yes" >&6; }
11152 succeeded=yes
11153
11154 { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
11155echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
11156 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
11157 { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
11158echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
11159
11160 { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
11161echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
11162 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
11163 { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
11164echo "${ECHO_T}$RSVG_LIBS" >&6; }
11165 else
11166 { echo "$as_me:$LINENO: result: no" >&5
11167echo "${ECHO_T}no" >&6; }
11168 RSVG_CFLAGS=""
11169 RSVG_LIBS=""
11170 ## If we have a custom action on failure, don't print errors, but
11171 ## do set a variable so people can do so.
11172 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
11173
11174 fi
11175
11176
11177
11178 else
11179 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11180 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11181 fi
11182 fi
11183
11184 if test $succeeded = yes; then
11185 :
11186 else
11187 :
11188 fi
11189
11190
11191
11192
11193 if test ".${RSVG_CFLAGS}" != "."; then
11194 HAVE_RSVG=yes
11195
11196cat >>confdefs.h <<\_ACEOF
11197#define HAVE_RSVG 1
11198_ACEOF
11199
11200 CFLAGS="$CFLAGS $RSVG_CFLAGS"
11201 LIBS="$RSVG_LIBS $LIBS"
11202 fi
11203 fi
11204fi
11205
11206
488dd4c4 11207HAVE_GTK=no
8eeae1c9
JD
11208if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then
11209 USE_X_TOOLKIT=none
11210fi
089a966d
GM
11211if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk" || \
11212 test "$USE_X_TOOLKIT" = "maybe"; then
cd890796 11213 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
11214 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
11215echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
11216 { (exit 1); exit 1; }; };
11217 fi
787eb67d
JD
11218 GLIB_REQUIRED=2.6
11219 GTK_REQUIRED=2.6
488dd4c4
JD
11220 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11221
11222 if test "X${with_pkg_config_prog}" != X; then
11223 PKG_CONFIG="${with_pkg_config_prog}"
11224 fi
11225
11226 succeeded=no
11227
11228 if test -z "$PKG_CONFIG"; then
11229 # Extract the first word of "pkg-config", so it can be a program name with args.
11230set dummy pkg-config; ac_word=$2
d6e01aa5
KL
11231{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11232echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
11233if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11234 echo $ECHO_N "(cached) $ECHO_C" >&6
11235else
11236 case $PKG_CONFIG in
11237 [\\/]* | ?:[\\/]*)
11238 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11239 ;;
11240 *)
11241 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11242for as_dir in $PATH
11243do
11244 IFS=$as_save_IFS
11245 test -z "$as_dir" && as_dir=.
11246 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 11247 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
11248 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11249 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11250 break 2
11251 fi
11252done
11253done
d6e01aa5 11254IFS=$as_save_IFS
488dd4c4
JD
11255
11256 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11257 ;;
11258esac
11259fi
11260PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 11261if test -n "$PKG_CONFIG"; then
d6e01aa5
KL
11262 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11263echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 11264else
d6e01aa5
KL
11265 { echo "$as_me:$LINENO: result: no" >&5
11266echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11267fi
11268
d6e01aa5 11269
488dd4c4
JD
11270 fi
11271
11272 if test "$PKG_CONFIG" = "no" ; then
089a966d 11273 pkg_check_gtk=no
488dd4c4
JD
11274 else
11275 PKG_CONFIG_MIN_VERSION=0.9.0
11276 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
d6e01aa5
KL
11277 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
11278echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 11279
67db6aa2 11280 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
d6e01aa5
KL
11281 { echo "$as_me:$LINENO: result: yes" >&5
11282echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
11283 succeeded=yes
11284
d6e01aa5
KL
11285 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
11286echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 11287 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
d6e01aa5
KL
11288 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
11289echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 11290
d6e01aa5
KL
11291 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
11292echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 11293 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
d6e01aa5
KL
11294 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
11295echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 11296 else
d6e01aa5
KL
11297 { echo "$as_me:$LINENO: result: no" >&5
11298echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11299 GTK_CFLAGS=""
11300 GTK_LIBS=""
11301 ## If we have a custom action on failure, don't print errors, but
11302 ## do set a variable so people can do so.
11303 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 11304
488dd4c4
JD
11305 fi
11306
11307
11308
11309 else
11310 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11311 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11312 fi
11313 fi
11314
11315 if test $succeeded = yes; then
089a966d 11316 pkg_check_gtk=yes
488dd4c4 11317 else
089a966d
GM
11318 pkg_check_gtk=no
11319 fi
11320
11321 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
11322 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
11323echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
11324 { (exit 1); exit 1; }; }
11325 fi
089a966d
GM
11326fi
11327
11328
11329if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
11330
11331
11332
11333 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11334 CFLAGS="$CFLAGS $GTK_CFLAGS"
11335 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11336 GTK_COMPILES=no
57669b57 11337
8eeae1c9 11338for ac_func in gtk_main
57669b57
JD
11339do
11340as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11341{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11342echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11343if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11344 echo $ECHO_N "(cached) $ECHO_C" >&6
11345else
11346 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11347/* confdefs.h. */
11348_ACEOF
11349cat confdefs.h >>conftest.$ac_ext
11350cat >>conftest.$ac_ext <<_ACEOF
11351/* end confdefs.h. */
edfaf76d
LK
11352/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11353 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11354#define $ac_func innocuous_$ac_func
11355
57669b57
JD
11356/* System header to define __stub macros and hopefully few prototypes,
11357 which can conflict with char $ac_func (); below.
11358 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11359 <limits.h> exists even on freestanding compilers. */
edfaf76d 11360
57669b57
JD
11361#ifdef __STDC__
11362# include <limits.h>
11363#else
11364# include <assert.h>
11365#endif
edfaf76d
LK
11366
11367#undef $ac_func
11368
ca81d7a0
JD
11369/* Override any GCC internal prototype to avoid an error.
11370 Use char because int might match the return type of a GCC
11371 builtin and then its argument prototype would still apply. */
57669b57
JD
11372#ifdef __cplusplus
11373extern "C"
57669b57 11374#endif
57669b57
JD
11375char $ac_func ();
11376/* The GNU C library defines this for functions which it implements
11377 to always fail with ENOSYS. Some functions are actually named
11378 something starting with __ and the normal name is an alias. */
ca81d7a0 11379#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11380choke me
57669b57
JD
11381#endif
11382
11383int
11384main ()
11385{
ca81d7a0 11386return $ac_func ();
57669b57
JD
11387 ;
11388 return 0;
11389}
11390_ACEOF
11391rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11392if { (ac_try="$ac_link"
11393case "(($ac_try" in
11394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11395 *) ac_try_echo=$ac_try;;
11396esac
11397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11398 (eval "$ac_link") 2>conftest.er1
57669b57 11399 ac_status=$?
edfaf76d
LK
11400 grep -v '^ *+' conftest.er1 >conftest.err
11401 rm -f conftest.er1
11402 cat conftest.err >&5
57669b57 11403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11404 (exit $ac_status); } && {
11405 test -z "$ac_c_werror_flag" ||
11406 test ! -s conftest.err
11407 } && test -s conftest$ac_exeext &&
11408 $as_test_x conftest$ac_exeext; then
57669b57
JD
11409 eval "$as_ac_var=yes"
11410else
11411 echo "$as_me: failed program was:" >&5
11412sed 's/^/| /' conftest.$ac_ext >&5
11413
ca81d7a0 11414 eval "$as_ac_var=no"
57669b57 11415fi
ca81d7a0 11416
f053c89f 11417rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11418 conftest$ac_exeext conftest.$ac_ext
57669b57 11419fi
ca81d7a0
JD
11420ac_res=`eval echo '${'$as_ac_var'}'`
11421 { echo "$as_me:$LINENO: result: $ac_res" >&5
11422echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11423if test `eval echo '${'$as_ac_var'}'` = yes; then
11424 cat >>confdefs.h <<_ACEOF
11425#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11426_ACEOF
8eeae1c9 11427 GTK_COMPILES=yes
57669b57
JD
11428fi
11429done
11430
8eeae1c9 11431 if test "${GTK_COMPILES}" != "yes"; then
089a966d
GM
11432 if test "$USE_X_TOOLKIT" != "maybe"; then
11433 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
8eeae1c9
JD
11434echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11435 { (exit 1); exit 1; }; };
089a966d
GM
11436 fi
11437 else
11438 HAVE_GTK=yes
488dd4c4
JD
11439
11440cat >>confdefs.h <<\_ACEOF
11441#define HAVE_GTK 1
11442_ACEOF
11443
089a966d
GM
11444 USE_X_TOOLKIT=none
11445 fi
11446
11447fi
11448
11449
11450if test "${HAVE_GTK}" = "yes"; then
488dd4c4 11451
d0a80c21
JD
11452 if test "$with_toolkit_scroll_bars" != no; then
11453 with_toolkit_scroll_bars=yes
11454 fi
57669b57 11455
c982cf7d 11456 HAVE_GTK_MULTIDISPLAY=no
fa1b1007
KL
11457
11458for ac_func in gdk_display_open
11459do
11460as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11461{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11462echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11463if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11464 echo $ECHO_N "(cached) $ECHO_C" >&6
11465else
11466 cat >conftest.$ac_ext <<_ACEOF
11467/* confdefs.h. */
11468_ACEOF
11469cat confdefs.h >>conftest.$ac_ext
11470cat >>conftest.$ac_ext <<_ACEOF
11471/* end confdefs.h. */
11472/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11473 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11474#define $ac_func innocuous_$ac_func
11475
11476/* System header to define __stub macros and hopefully few prototypes,
11477 which can conflict with char $ac_func (); below.
11478 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11479 <limits.h> exists even on freestanding compilers. */
11480
11481#ifdef __STDC__
11482# include <limits.h>
11483#else
11484# include <assert.h>
11485#endif
11486
11487#undef $ac_func
11488
11489/* Override any GCC internal prototype to avoid an error.
11490 Use char because int might match the return type of a GCC
11491 builtin and then its argument prototype would still apply. */
11492#ifdef __cplusplus
11493extern "C"
11494#endif
11495char $ac_func ();
11496/* The GNU C library defines this for functions which it implements
11497 to always fail with ENOSYS. Some functions are actually named
11498 something starting with __ and the normal name is an alias. */
11499#if defined __stub_$ac_func || defined __stub___$ac_func
11500choke me
11501#endif
11502
11503int
11504main ()
11505{
11506return $ac_func ();
11507 ;
11508 return 0;
11509}
11510_ACEOF
11511rm -f conftest.$ac_objext conftest$ac_exeext
11512if { (ac_try="$ac_link"
11513case "(($ac_try" in
11514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11515 *) ac_try_echo=$ac_try;;
11516esac
11517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11518 (eval "$ac_link") 2>conftest.er1
11519 ac_status=$?
11520 grep -v '^ *+' conftest.er1 >conftest.err
11521 rm -f conftest.er1
11522 cat conftest.err >&5
11523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11524 (exit $ac_status); } && {
11525 test -z "$ac_c_werror_flag" ||
11526 test ! -s conftest.err
11527 } && test -s conftest$ac_exeext &&
11528 $as_test_x conftest$ac_exeext; then
11529 eval "$as_ac_var=yes"
11530else
11531 echo "$as_me: failed program was:" >&5
11532sed 's/^/| /' conftest.$ac_ext >&5
11533
11534 eval "$as_ac_var=no"
11535fi
11536
11537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11538 conftest$ac_exeext conftest.$ac_ext
11539fi
11540ac_res=`eval echo '${'$as_ac_var'}'`
11541 { echo "$as_me:$LINENO: result: $ac_res" >&5
11542echo "${ECHO_T}$ac_res" >&6; }
11543if test `eval echo '${'$as_ac_var'}'` = yes; then
11544 cat >>confdefs.h <<_ACEOF
11545#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11546_ACEOF
11547 HAVE_GTK_MULTIDISPLAY=yes
11548fi
11549done
11550
11551 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11552
11553cat >>confdefs.h <<\_ACEOF
11554#define HAVE_GTK_MULTIDISPLAY 1
11555_ACEOF
11556
11557 fi
57669b57 11558
572a3cc2
JD
11559 HAVE_GTK_FILE_SELECTION=no
11560
11561for ac_func in gtk_file_selection_new
11562do
11563as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
11564{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11565echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11566if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11567 echo $ECHO_N "(cached) $ECHO_C" >&6
11568else
11569 cat >conftest.$ac_ext <<_ACEOF
11570/* confdefs.h. */
11571_ACEOF
11572cat confdefs.h >>conftest.$ac_ext
11573cat >>conftest.$ac_ext <<_ACEOF
11574/* end confdefs.h. */
edfaf76d
LK
11575/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11576 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11577#define $ac_func innocuous_$ac_func
11578
572a3cc2
JD
11579/* System header to define __stub macros and hopefully few prototypes,
11580 which can conflict with char $ac_func (); below.
11581 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11582 <limits.h> exists even on freestanding compilers. */
edfaf76d 11583
572a3cc2
JD
11584#ifdef __STDC__
11585# include <limits.h>
11586#else
11587# include <assert.h>
11588#endif
edfaf76d
LK
11589
11590#undef $ac_func
11591
d6e01aa5
KL
11592/* Override any GCC internal prototype to avoid an error.
11593 Use char because int might match the return type of a GCC
11594 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11595#ifdef __cplusplus
11596extern "C"
572a3cc2 11597#endif
572a3cc2
JD
11598char $ac_func ();
11599/* The GNU C library defines this for functions which it implements
11600 to always fail with ENOSYS. Some functions are actually named
11601 something starting with __ and the normal name is an alias. */
d6e01aa5 11602#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11603choke me
572a3cc2
JD
11604#endif
11605
11606int
11607main ()
11608{
d6e01aa5 11609return $ac_func ();
572a3cc2
JD
11610 ;
11611 return 0;
11612}
11613_ACEOF
11614rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
11615if { (ac_try="$ac_link"
11616case "(($ac_try" in
11617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11618 *) ac_try_echo=$ac_try;;
11619esac
11620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11621 (eval "$ac_link") 2>conftest.er1
572a3cc2 11622 ac_status=$?
edfaf76d
LK
11623 grep -v '^ *+' conftest.er1 >conftest.err
11624 rm -f conftest.er1
11625 cat conftest.err >&5
572a3cc2 11626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11627 (exit $ac_status); } && {
11628 test -z "$ac_c_werror_flag" ||
11629 test ! -s conftest.err
11630 } && test -s conftest$ac_exeext &&
11631 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11632 eval "$as_ac_var=yes"
11633else
11634 echo "$as_me: failed program was:" >&5
11635sed 's/^/| /' conftest.$ac_ext >&5
11636
d6e01aa5 11637 eval "$as_ac_var=no"
572a3cc2 11638fi
d6e01aa5
KL
11639
11640rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11641 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11642fi
d6e01aa5
KL
11643ac_res=`eval echo '${'$as_ac_var'}'`
11644 { echo "$as_me:$LINENO: result: $ac_res" >&5
11645echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11646if test `eval echo '${'$as_ac_var'}'` = yes; then
11647 cat >>confdefs.h <<_ACEOF
11648#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11649_ACEOF
11650 HAVE_GTK_FILE_SELECTION=yes
11651fi
11652done
11653
11654
11655 HAVE_GTK_FILE_CHOOSER=no
11656
11657for ac_func in gtk_file_chooser_dialog_new
11658do
11659as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
11660{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11661echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11662if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11663 echo $ECHO_N "(cached) $ECHO_C" >&6
11664else
11665 cat >conftest.$ac_ext <<_ACEOF
11666/* confdefs.h. */
11667_ACEOF
11668cat confdefs.h >>conftest.$ac_ext
11669cat >>conftest.$ac_ext <<_ACEOF
11670/* end confdefs.h. */
edfaf76d
LK
11671/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11672 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11673#define $ac_func innocuous_$ac_func
11674
572a3cc2
JD
11675/* System header to define __stub macros and hopefully few prototypes,
11676 which can conflict with char $ac_func (); below.
11677 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11678 <limits.h> exists even on freestanding compilers. */
edfaf76d 11679
572a3cc2
JD
11680#ifdef __STDC__
11681# include <limits.h>
11682#else
11683# include <assert.h>
11684#endif
edfaf76d
LK
11685
11686#undef $ac_func
11687
d6e01aa5
KL
11688/* Override any GCC internal prototype to avoid an error.
11689 Use char because int might match the return type of a GCC
11690 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11691#ifdef __cplusplus
11692extern "C"
572a3cc2 11693#endif
572a3cc2
JD
11694char $ac_func ();
11695/* The GNU C library defines this for functions which it implements
11696 to always fail with ENOSYS. Some functions are actually named
11697 something starting with __ and the normal name is an alias. */
d6e01aa5 11698#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11699choke me
572a3cc2
JD
11700#endif
11701
11702int
11703main ()
11704{
d6e01aa5 11705return $ac_func ();
572a3cc2
JD
11706 ;
11707 return 0;
11708}
11709_ACEOF
11710rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
11711if { (ac_try="$ac_link"
11712case "(($ac_try" in
11713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11714 *) ac_try_echo=$ac_try;;
11715esac
11716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11717 (eval "$ac_link") 2>conftest.er1
572a3cc2 11718 ac_status=$?
edfaf76d
LK
11719 grep -v '^ *+' conftest.er1 >conftest.err
11720 rm -f conftest.er1
11721 cat conftest.err >&5
572a3cc2 11722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11723 (exit $ac_status); } && {
11724 test -z "$ac_c_werror_flag" ||
11725 test ! -s conftest.err
11726 } && test -s conftest$ac_exeext &&
11727 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11728 eval "$as_ac_var=yes"
11729else
11730 echo "$as_me: failed program was:" >&5
11731sed 's/^/| /' conftest.$ac_ext >&5
11732
d6e01aa5 11733 eval "$as_ac_var=no"
572a3cc2 11734fi
d6e01aa5
KL
11735
11736rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11737 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11738fi
d6e01aa5
KL
11739ac_res=`eval echo '${'$as_ac_var'}'`
11740 { echo "$as_me:$LINENO: result: $ac_res" >&5
11741echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11742if test `eval echo '${'$as_ac_var'}'` = yes; then
11743 cat >>confdefs.h <<_ACEOF
11744#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11745_ACEOF
11746 HAVE_GTK_FILE_CHOOSER=yes
11747fi
11748done
11749
11750
11751 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11752 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11753
11754cat >>confdefs.h <<\_ACEOF
11755#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
11756_ACEOF
11757
b8bdffbe
JD
11758 fi
11759
11760 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11761 HAVE_GTK_AND_PTHREAD=no
11762
11763for ac_header in pthread.h
11764do
11765as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
11766if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11767 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11768echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11769if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11770 echo $ECHO_N "(cached) $ECHO_C" >&6
11771fi
d6e01aa5
KL
11772ac_res=`eval echo '${'$as_ac_Header'}'`
11773 { echo "$as_me:$LINENO: result: $ac_res" >&5
11774echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11775else
11776 # Is the header compilable?
d6e01aa5
KL
11777{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11778echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
b8bdffbe
JD
11779cat >conftest.$ac_ext <<_ACEOF
11780/* confdefs.h. */
11781_ACEOF
11782cat confdefs.h >>conftest.$ac_ext
11783cat >>conftest.$ac_ext <<_ACEOF
11784/* end confdefs.h. */
11785$ac_includes_default
11786#include <$ac_header>
11787_ACEOF
11788rm -f conftest.$ac_objext
d6e01aa5
KL
11789if { (ac_try="$ac_compile"
11790case "(($ac_try" in
11791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11792 *) ac_try_echo=$ac_try;;
11793esac
11794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11795 (eval "$ac_compile") 2>conftest.er1
b8bdffbe 11796 ac_status=$?
edfaf76d
LK
11797 grep -v '^ *+' conftest.er1 >conftest.err
11798 rm -f conftest.er1
11799 cat conftest.err >&5
b8bdffbe 11800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11801 (exit $ac_status); } && {
11802 test -z "$ac_c_werror_flag" ||
11803 test ! -s conftest.err
11804 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11805 ac_header_compiler=yes
11806else
11807 echo "$as_me: failed program was:" >&5
11808sed 's/^/| /' conftest.$ac_ext >&5
11809
d6e01aa5 11810 ac_header_compiler=no
b8bdffbe 11811fi
b8bdffbe 11812
d6e01aa5
KL
11813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11814{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11815echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11816
11817# Is the header present?
d6e01aa5
KL
11818{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11819echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11820cat >conftest.$ac_ext <<_ACEOF
11821/* confdefs.h. */
11822_ACEOF
11823cat confdefs.h >>conftest.$ac_ext
11824cat >>conftest.$ac_ext <<_ACEOF
11825/* end confdefs.h. */
11826#include <$ac_header>
11827_ACEOF
d6e01aa5
KL
11828if { (ac_try="$ac_cpp conftest.$ac_ext"
11829case "(($ac_try" in
11830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11831 *) ac_try_echo=$ac_try;;
11832esac
11833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11834 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11835 ac_status=$?
11836 grep -v '^ *+' conftest.er1 >conftest.err
11837 rm -f conftest.er1
11838 cat conftest.err >&5
11839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11840 (exit $ac_status); } >/dev/null && {
11841 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11842 test ! -s conftest.err
11843 }; then
b8bdffbe
JD
11844 ac_header_preproc=yes
11845else
11846 echo "$as_me: failed program was:" >&5
11847sed 's/^/| /' conftest.$ac_ext >&5
11848
11849 ac_header_preproc=no
11850fi
d6e01aa5 11851
b8bdffbe 11852rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
11853{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11854echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11855
11856# So? What about this header?
edfaf76d
LK
11857case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11858 yes:no: )
b8bdffbe
JD
11859 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11860echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11861 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11862echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11863 ac_header_preproc=yes
b8bdffbe 11864 ;;
edfaf76d 11865 no:yes:* )
b8bdffbe
JD
11866 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11867echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11868 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11869echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11870 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11871echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11872 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11873echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11874 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11875echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11876 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11877echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 11878
b8bdffbe
JD
11879 ;;
11880esac
d6e01aa5
KL
11881{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11882echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11883if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11884 echo $ECHO_N "(cached) $ECHO_C" >&6
11885else
edfaf76d 11886 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11887fi
d6e01aa5
KL
11888ac_res=`eval echo '${'$as_ac_Header'}'`
11889 { echo "$as_me:$LINENO: result: $ac_res" >&5
11890echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11891
11892fi
11893if test `eval echo '${'$as_ac_Header'}'` = yes; then
11894 cat >>confdefs.h <<_ACEOF
11895#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11896_ACEOF
11897
11898fi
11899
11900done
11901
11902 if test "$ac_cv_header_pthread_h"; then
d6e01aa5
KL
11903 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11904echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11905if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11906 echo $ECHO_N "(cached) $ECHO_C" >&6
11907else
11908 ac_check_lib_save_LIBS=$LIBS
11909LIBS="-lpthread $LIBS"
11910cat >conftest.$ac_ext <<_ACEOF
11911/* confdefs.h. */
11912_ACEOF
11913cat confdefs.h >>conftest.$ac_ext
11914cat >>conftest.$ac_ext <<_ACEOF
11915/* end confdefs.h. */
11916
d6e01aa5
KL
11917/* Override any GCC internal prototype to avoid an error.
11918 Use char because int might match the return type of a GCC
11919 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11920#ifdef __cplusplus
11921extern "C"
11922#endif
b8bdffbe
JD
11923char pthread_self ();
11924int
11925main ()
11926{
d6e01aa5 11927return pthread_self ();
b8bdffbe
JD
11928 ;
11929 return 0;
11930}
11931_ACEOF
11932rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
11933if { (ac_try="$ac_link"
11934case "(($ac_try" in
11935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11936 *) ac_try_echo=$ac_try;;
11937esac
11938eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11939 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11940 ac_status=$?
edfaf76d
LK
11941 grep -v '^ *+' conftest.er1 >conftest.err
11942 rm -f conftest.er1
11943 cat conftest.err >&5
b8bdffbe 11944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
11945 (exit $ac_status); } && {
11946 test -z "$ac_c_werror_flag" ||
11947 test ! -s conftest.err
11948 } && test -s conftest$ac_exeext &&
11949 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11950 ac_cv_lib_pthread_pthread_self=yes
11951else
11952 echo "$as_me: failed program was:" >&5
11953sed 's/^/| /' conftest.$ac_ext >&5
11954
d6e01aa5 11955 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11956fi
d6e01aa5
KL
11957
11958rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11959 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11960LIBS=$ac_check_lib_save_LIBS
11961fi
d6e01aa5
KL
11962{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11963echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11964if test $ac_cv_lib_pthread_pthread_self = yes; then
11965 HAVE_GTK_AND_PTHREAD=yes
11966fi
11967
11968 fi
11969 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
846d1b3e
JD
11970 case "${canonical}" in
11971 *-hpux*) ;;
11972 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
11973 esac
b8bdffbe
JD
11974
11975cat >>confdefs.h <<\_ACEOF
11976#define HAVE_GTK_AND_PTHREAD 1
11977_ACEOF
11978
11979 fi
57669b57 11980 fi
488dd4c4
JD
11981fi
11982
9d89ffd0
JD
11983### Link with -lXft if available to work around a bug.
11984HAVE_XFT=maybe
11985if test "${HAVE_GTK}" = "yes"; then
11986 if test "X${with_pkg_config_prog}" != X; then
11987 PKG_CONFIG="${with_pkg_config_prog}"
11988 fi
11989
11990
11991 succeeded=no
11992
11993 if test -z "$PKG_CONFIG"; then
11994 # Extract the first word of "pkg-config", so it can be a program name with args.
11995set dummy pkg-config; ac_word=$2
11996{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11997echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11998if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11999 echo $ECHO_N "(cached) $ECHO_C" >&6
12000else
12001 case $PKG_CONFIG in
12002 [\\/]* | ?:[\\/]*)
12003 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12004 ;;
12005 *)
12006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12007for as_dir in $PATH
12008do
12009 IFS=$as_save_IFS
12010 test -z "$as_dir" && as_dir=.
12011 for ac_exec_ext in '' $ac_executable_extensions; do
12012 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12013 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12014 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12015 break 2
12016 fi
12017done
12018done
12019IFS=$as_save_IFS
12020
12021 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12022 ;;
12023esac
12024fi
12025PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12026if test -n "$PKG_CONFIG"; then
12027 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12028echo "${ECHO_T}$PKG_CONFIG" >&6; }
12029else
12030 { echo "$as_me:$LINENO: result: no" >&5
12031echo "${ECHO_T}no" >&6; }
12032fi
12033
12034
12035 fi
12036
12037 if test "$PKG_CONFIG" = "no" ; then
12038 HAVE_XFT=no
12039 else
12040 PKG_CONFIG_MIN_VERSION=0.9.0
12041 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12042 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
12043echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
12044
12045 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
12046 { echo "$as_me:$LINENO: result: yes" >&5
12047echo "${ECHO_T}yes" >&6; }
12048 succeeded=yes
12049
12050 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
12051echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
94315858 12052 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9d89ffd0
JD
12053 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
12054echo "${ECHO_T}$XFT_CFLAGS" >&6; }
12055
12056 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
12057echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
94315858 12058 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9d89ffd0
JD
12059 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
12060echo "${ECHO_T}$XFT_LIBS" >&6; }
12061 else
12062 { echo "$as_me:$LINENO: result: no" >&5
12063echo "${ECHO_T}no" >&6; }
12064 XFT_CFLAGS=""
12065 XFT_LIBS=""
12066 ## If we have a custom action on failure, don't print errors, but
12067 ## do set a variable so people can do so.
12068 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12069
12070 fi
12071
12072
12073
12074 else
12075 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12076 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12077 fi
12078 fi
12079
12080 if test $succeeded = yes; then
12081 :
12082 else
12083 HAVE_XFT=no
12084 fi
12085
12086 if test "$HAVE_XFT" != no; then
12087 OLD_CFLAGS="$CPPFLAGS"
f23323c5 12088 OLD_CPPFLAGS="$CFLAGS"
9d89ffd0
JD
12089 OLD_LIBS="$LIBS"
12090 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12091 CFLAGS="$CFLAGS $XFT_CFLAGS"
12092 LIBS="$XFT_LIBS $LIBS"
12093 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12094 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12095echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
12096if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12097 echo $ECHO_N "(cached) $ECHO_C" >&6
12098fi
12099{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12100echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
12101else
12102 # Is the header compilable?
12103{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
12104echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
12105cat >conftest.$ac_ext <<_ACEOF
12106/* confdefs.h. */
12107_ACEOF
12108cat confdefs.h >>conftest.$ac_ext
12109cat >>conftest.$ac_ext <<_ACEOF
12110/* end confdefs.h. */
12111$ac_includes_default
12112#include <X11/Xft/Xft.h>
12113_ACEOF
12114rm -f conftest.$ac_objext
12115if { (ac_try="$ac_compile"
12116case "(($ac_try" in
12117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12118 *) ac_try_echo=$ac_try;;
12119esac
12120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12121 (eval "$ac_compile") 2>conftest.er1
12122 ac_status=$?
12123 grep -v '^ *+' conftest.er1 >conftest.err
12124 rm -f conftest.er1
12125 cat conftest.err >&5
12126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12127 (exit $ac_status); } && {
12128 test -z "$ac_c_werror_flag" ||
12129 test ! -s conftest.err
12130 } && test -s conftest.$ac_objext; then
12131 ac_header_compiler=yes
12132else
12133 echo "$as_me: failed program was:" >&5
12134sed 's/^/| /' conftest.$ac_ext >&5
12135
12136 ac_header_compiler=no
12137fi
12138
12139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12140{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12141echo "${ECHO_T}$ac_header_compiler" >&6; }
12142
12143# Is the header present?
12144{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
12145echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
12146cat >conftest.$ac_ext <<_ACEOF
12147/* confdefs.h. */
12148_ACEOF
12149cat confdefs.h >>conftest.$ac_ext
12150cat >>conftest.$ac_ext <<_ACEOF
12151/* end confdefs.h. */
12152#include <X11/Xft/Xft.h>
12153_ACEOF
12154if { (ac_try="$ac_cpp conftest.$ac_ext"
12155case "(($ac_try" in
12156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12157 *) ac_try_echo=$ac_try;;
12158esac
12159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12160 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12161 ac_status=$?
12162 grep -v '^ *+' conftest.er1 >conftest.err
12163 rm -f conftest.er1
12164 cat conftest.err >&5
12165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12166 (exit $ac_status); } >/dev/null && {
12167 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12168 test ! -s conftest.err
12169 }; then
12170 ac_header_preproc=yes
12171else
12172 echo "$as_me: failed program was:" >&5
12173sed 's/^/| /' conftest.$ac_ext >&5
12174
12175 ac_header_preproc=no
12176fi
12177
12178rm -f conftest.err conftest.$ac_ext
12179{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12180echo "${ECHO_T}$ac_header_preproc" >&6; }
12181
12182# So? What about this header?
12183case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12184 yes:no: )
12185 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
12186echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12187 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
12188echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
12189 ac_header_preproc=yes
12190 ;;
12191 no:yes:* )
12192 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
12193echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
12194 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
12195echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
12196 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
12197echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
12198 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
12199echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
12200 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
12201echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
12202 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
12203echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
12204
12205 ;;
12206esac
12207{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12208echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
12209if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12210 echo $ECHO_N "(cached) $ECHO_C" >&6
12211else
12212 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
12213fi
12214{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12215echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
12216
12217fi
12218if test $ac_cv_header_X11_Xft_Xft_h = yes; then
12219 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
12220echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
12221if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
12222 echo $ECHO_N "(cached) $ECHO_C" >&6
12223else
12224 ac_check_lib_save_LIBS=$LIBS
12225LIBS="-lXft $XFT_LIBS $LIBS"
12226cat >conftest.$ac_ext <<_ACEOF
12227/* confdefs.h. */
12228_ACEOF
12229cat confdefs.h >>conftest.$ac_ext
12230cat >>conftest.$ac_ext <<_ACEOF
12231/* end confdefs.h. */
12232
12233/* Override any GCC internal prototype to avoid an error.
12234 Use char because int might match the return type of a GCC
12235 builtin and then its argument prototype would still apply. */
12236#ifdef __cplusplus
12237extern "C"
12238#endif
12239char XftFontOpen ();
12240int
12241main ()
12242{
12243return XftFontOpen ();
12244 ;
12245 return 0;
12246}
12247_ACEOF
12248rm -f conftest.$ac_objext conftest$ac_exeext
12249if { (ac_try="$ac_link"
12250case "(($ac_try" in
12251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12252 *) ac_try_echo=$ac_try;;
12253esac
12254eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12255 (eval "$ac_link") 2>conftest.er1
12256 ac_status=$?
12257 grep -v '^ *+' conftest.er1 >conftest.err
12258 rm -f conftest.er1
12259 cat conftest.err >&5
12260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12261 (exit $ac_status); } && {
12262 test -z "$ac_c_werror_flag" ||
12263 test ! -s conftest.err
12264 } && test -s conftest$ac_exeext &&
12265 $as_test_x conftest$ac_exeext; then
12266 ac_cv_lib_Xft_XftFontOpen=yes
12267else
12268 echo "$as_me: failed program was:" >&5
12269sed 's/^/| /' conftest.$ac_ext >&5
12270
12271 ac_cv_lib_Xft_XftFontOpen=no
12272fi
12273
12274rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12275 conftest$ac_exeext conftest.$ac_ext
12276LIBS=$ac_check_lib_save_LIBS
12277fi
12278{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12279echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
12280if test $ac_cv_lib_Xft_XftFontOpen = yes; then
12281 HAVE_XFT=yes
12282fi
12283
12284fi
12285
12286
12287
12288 if test "${HAVE_XFT}" = "yes"; then
12289
12290cat >>confdefs.h <<\_ACEOF
12291#define HAVE_XFT 1
12292_ACEOF
12293
12294
12295 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12296 else
12297 CFLAGS="$OLD_CPPFLAGS"
12298 CFLAGS="$OLD_CFLAGS"
12299 LIBS="$OLD_LIBS"
12300 fi
12301 fi
12302fi
12303
dba7bae0 12304HAVE_XAW3D=no
3685ba3f 12305if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
a5c2c204
JD
12306 if test "$with_xaw3d" != no; then
12307 { echo "$as_me:$LINENO: checking for xaw3d" >&5
dba7bae0 12308echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
a5c2c204 12309 if test "${emacs_cv_xaw3d+set}" = set; then
98418dba
CW
12310 echo $ECHO_N "(cached) $ECHO_C" >&6
12311else
12312 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12313/* confdefs.h. */
12314_ACEOF
12315cat confdefs.h >>conftest.$ac_ext
12316cat >>conftest.$ac_ext <<_ACEOF
12317/* end confdefs.h. */
98418dba
CW
12318
12319#include <X11/Intrinsic.h>
dba7bae0 12320#include <X11/Xaw3d/Simple.h>
98418dba
CW
12321int
12322main ()
12323{
12324
12325 ;
12326 return 0;
12327}
12328_ACEOF
12329rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12330if { (ac_try="$ac_link"
12331case "(($ac_try" in
12332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12333 *) ac_try_echo=$ac_try;;
12334esac
12335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12336 (eval "$ac_link") 2>conftest.er1
98418dba 12337 ac_status=$?
edfaf76d
LK
12338 grep -v '^ *+' conftest.er1 >conftest.err
12339 rm -f conftest.er1
12340 cat conftest.err >&5
c0d27fcc 12341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12342 (exit $ac_status); } && {
12343 test -z "$ac_c_werror_flag" ||
12344 test ! -s conftest.err
12345 } && test -s conftest$ac_exeext &&
12346 $as_test_x conftest$ac_exeext; then
dba7bae0 12347 emacs_cv_xaw3d=yes
98418dba
CW
12348else
12349 echo "$as_me: failed program was:" >&5
19650fd6
AS
12350sed 's/^/| /' conftest.$ac_ext >&5
12351
dba7bae0 12352 emacs_cv_xaw3d=no
98418dba 12353fi
d6e01aa5
KL
12354
12355rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12356 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12357fi
12358
a5c2c204
JD
12359 else
12360 emacs_cv_xaw3d=no
12361 fi
12362 if test $emacs_cv_xaw3d = yes; then
12363 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
dba7bae0 12364echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
a5c2c204
JD
12365 USE_X_TOOLKIT=LUCID
12366 HAVE_XAW3D=yes
dba7bae0
CY
12367
12368cat >>confdefs.h <<\_ACEOF
12369#define HAVE_XAW3D 1
12370_ACEOF
12371
a5c2c204
JD
12372 else
12373 { echo "$as_me:$LINENO: result: no" >&5
dba7bae0 12374echo "${ECHO_T}no" >&6; }
a5c2c204 12375 { echo "$as_me:$LINENO: checking for libXaw" >&5
dba7bae0 12376echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
a5c2c204 12377 if test "${emacs_cv_xaw+set}" = set; then
dba7bae0
CY
12378 echo $ECHO_N "(cached) $ECHO_C" >&6
12379else
12380 cat >conftest.$ac_ext <<_ACEOF
12381/* confdefs.h. */
12382_ACEOF
12383cat confdefs.h >>conftest.$ac_ext
12384cat >>conftest.$ac_ext <<_ACEOF
12385/* end confdefs.h. */
12386
12387#include <X11/Intrinsic.h>
12388#include <X11/Xaw/Simple.h>
12389int
12390main ()
12391{
12392
12393 ;
12394 return 0;
12395}
12396_ACEOF
12397rm -f conftest.$ac_objext conftest$ac_exeext
12398if { (ac_try="$ac_link"
12399case "(($ac_try" in
12400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12401 *) ac_try_echo=$ac_try;;
12402esac
12403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12404 (eval "$ac_link") 2>conftest.er1
12405 ac_status=$?
12406 grep -v '^ *+' conftest.er1 >conftest.err
12407 rm -f conftest.er1
12408 cat conftest.err >&5
12409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12410 (exit $ac_status); } && {
12411 test -z "$ac_c_werror_flag" ||
12412 test ! -s conftest.err
12413 } && test -s conftest$ac_exeext &&
12414 $as_test_x conftest$ac_exeext; then
12415 emacs_cv_xaw=yes
12416else
12417 echo "$as_me: failed program was:" >&5
12418sed 's/^/| /' conftest.$ac_ext >&5
12419
12420 emacs_cv_xaw=no
12421fi
12422
12423rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12424 conftest$ac_exeext conftest.$ac_ext
12425fi
12426
a5c2c204
JD
12427 if test $emacs_cv_xaw = yes; then
12428 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
dba7bae0 12429echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
a5c2c204
JD
12430 USE_X_TOOLKIT=LUCID
12431 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
12432 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
3685ba3f
CY
12433echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
12434 { (exit 1); exit 1; }; }
a5c2c204
JD
12435 else
12436 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
dba7bae0 12437echo "${ECHO_T}no; do not use toolkit by default" >&6; }
a5c2c204 12438 USE_X_TOOLKIT=none
98418dba 12439 fi
98418dba
CW
12440 fi
12441fi
12442
12443X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12444
12445if test "${USE_X_TOOLKIT}" != "none"; then
d6e01aa5
KL
12446 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
12447echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
12448 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
12449 echo $ECHO_N "(cached) $ECHO_C" >&6
12450else
12451 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12452/* confdefs.h. */
12453_ACEOF
12454cat confdefs.h >>conftest.$ac_ext
12455cat >>conftest.$ac_ext <<_ACEOF
12456/* end confdefs.h. */
98418dba 12457#include <X11/Intrinsic.h>
98418dba
CW
12458int
12459main ()
12460{
12461#if XtSpecificationRelease < 6
12462fail;
12463#endif
12464
12465 ;
12466 return 0;
12467}
12468_ACEOF
12469rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12470if { (ac_try="$ac_link"
12471case "(($ac_try" in
12472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12473 *) ac_try_echo=$ac_try;;
12474esac
12475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12476 (eval "$ac_link") 2>conftest.er1
98418dba 12477 ac_status=$?
edfaf76d
LK
12478 grep -v '^ *+' conftest.er1 >conftest.err
12479 rm -f conftest.er1
12480 cat conftest.err >&5
c0d27fcc 12481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12482 (exit $ac_status); } && {
12483 test -z "$ac_c_werror_flag" ||
12484 test ! -s conftest.err
12485 } && test -s conftest$ac_exeext &&
12486 $as_test_x conftest$ac_exeext; then
98418dba
CW
12487 emacs_cv_x11_toolkit_version_6=yes
12488else
12489 echo "$as_me: failed program was:" >&5
19650fd6
AS
12490sed 's/^/| /' conftest.$ac_ext >&5
12491
d6e01aa5 12492 emacs_cv_x11_toolkit_version_6=no
98418dba 12493fi
d6e01aa5
KL
12494
12495rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12496 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12497fi
12498
12499 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12500 if test $emacs_cv_x11_toolkit_version_6 = yes; then
d6e01aa5
KL
12501 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12502echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12503
c0d27fcc 12504cat >>confdefs.h <<\_ACEOF
98418dba 12505#define HAVE_X11XTR6 1
c0d27fcc 12506_ACEOF
98418dba
CW
12507
12508 else
d6e01aa5
KL
12509 { echo "$as_me:$LINENO: result: before 6" >&5
12510echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12511 fi
12512
12513 OLDLIBS="$LIBS"
12514 if test x$HAVE_X11XTR6 = xyes; then
12515 LIBS="-lXt -lSM -lICE $LIBS"
12516 else
12517 LIBS="-lXt $LIBS"
12518 fi
12519
d6e01aa5
KL
12520{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12521echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
12522if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
12523 echo $ECHO_N "(cached) $ECHO_C" >&6
12524else
12525 ac_check_lib_save_LIBS=$LIBS
12526LIBS="-lXmu $LIBS"
12527cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12528/* confdefs.h. */
12529_ACEOF
12530cat confdefs.h >>conftest.$ac_ext
12531cat >>conftest.$ac_ext <<_ACEOF
12532/* end confdefs.h. */
98418dba 12533
d6e01aa5
KL
12534/* Override any GCC internal prototype to avoid an error.
12535 Use char because int might match the return type of a GCC
12536 builtin and then its argument prototype would still apply. */
98418dba
CW
12537#ifdef __cplusplus
12538extern "C"
12539#endif
98418dba 12540char XmuConvertStandardSelection ();
98418dba
CW
12541int
12542main ()
12543{
d6e01aa5 12544return XmuConvertStandardSelection ();
98418dba
CW
12545 ;
12546 return 0;
12547}
12548_ACEOF
12549rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12550if { (ac_try="$ac_link"
12551case "(($ac_try" in
12552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12553 *) ac_try_echo=$ac_try;;
12554esac
12555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12556 (eval "$ac_link") 2>conftest.er1
98418dba 12557 ac_status=$?
edfaf76d
LK
12558 grep -v '^ *+' conftest.er1 >conftest.err
12559 rm -f conftest.er1
12560 cat conftest.err >&5
c0d27fcc 12561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12562 (exit $ac_status); } && {
12563 test -z "$ac_c_werror_flag" ||
12564 test ! -s conftest.err
12565 } && test -s conftest$ac_exeext &&
12566 $as_test_x conftest$ac_exeext; then
98418dba
CW
12567 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12568else
12569 echo "$as_me: failed program was:" >&5
19650fd6
AS
12570sed 's/^/| /' conftest.$ac_ext >&5
12571
d6e01aa5 12572 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12573fi
d6e01aa5
KL
12574
12575rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12576 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12577LIBS=$ac_check_lib_save_LIBS
12578fi
d6e01aa5
KL
12579{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12580echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 12581if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12582 cat >>confdefs.h <<_ACEOF
98418dba 12583#define HAVE_LIBXMU 1
c0d27fcc 12584_ACEOF
98418dba
CW
12585
12586 LIBS="-lXmu $LIBS"
12587
12588fi
12589
12590 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12591fi
12592
12593# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12594if test "${HAVE_X11}" = "yes"; then
12595 if test "${USE_X_TOOLKIT}" != "none"; then
12596
d6e01aa5
KL
12597{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12598echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12599if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12600 echo $ECHO_N "(cached) $ECHO_C" >&6
12601else
12602 ac_check_lib_save_LIBS=$LIBS
12603LIBS="-lXext $LIBS"
12604cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12605/* confdefs.h. */
12606_ACEOF
12607cat confdefs.h >>conftest.$ac_ext
12608cat >>conftest.$ac_ext <<_ACEOF
12609/* end confdefs.h. */
98418dba 12610
d6e01aa5
KL
12611/* Override any GCC internal prototype to avoid an error.
12612 Use char because int might match the return type of a GCC
12613 builtin and then its argument prototype would still apply. */
98418dba
CW
12614#ifdef __cplusplus
12615extern "C"
12616#endif
98418dba 12617char XShapeQueryExtension ();
98418dba
CW
12618int
12619main ()
12620{
d6e01aa5 12621return XShapeQueryExtension ();
98418dba
CW
12622 ;
12623 return 0;
12624}
12625_ACEOF
12626rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12627if { (ac_try="$ac_link"
12628case "(($ac_try" in
12629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12630 *) ac_try_echo=$ac_try;;
12631esac
12632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12633 (eval "$ac_link") 2>conftest.er1
98418dba 12634 ac_status=$?
edfaf76d
LK
12635 grep -v '^ *+' conftest.er1 >conftest.err
12636 rm -f conftest.er1
12637 cat conftest.err >&5
c0d27fcc 12638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12639 (exit $ac_status); } && {
12640 test -z "$ac_c_werror_flag" ||
12641 test ! -s conftest.err
12642 } && test -s conftest$ac_exeext &&
12643 $as_test_x conftest$ac_exeext; then
98418dba
CW
12644 ac_cv_lib_Xext_XShapeQueryExtension=yes
12645else
12646 echo "$as_me: failed program was:" >&5
19650fd6
AS
12647sed 's/^/| /' conftest.$ac_ext >&5
12648
d6e01aa5 12649 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12650fi
d6e01aa5
KL
12651
12652rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12653 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12654LIBS=$ac_check_lib_save_LIBS
12655fi
d6e01aa5
KL
12656{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12657echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12658if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12659 cat >>confdefs.h <<_ACEOF
98418dba 12660#define HAVE_LIBXEXT 1
c0d27fcc 12661_ACEOF
98418dba
CW
12662
12663 LIBS="-lXext $LIBS"
12664
12665fi
12666
12667 fi
12668fi
12669
12670if test "${USE_X_TOOLKIT}" = "MOTIF"; then
d6e01aa5
KL
12671 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12672echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12673if test "${emacs_cv_motif_version_2_1+set}" = set; then
12674 echo $ECHO_N "(cached) $ECHO_C" >&6
12675else
12676 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12677/* confdefs.h. */
12678_ACEOF
12679cat confdefs.h >>conftest.$ac_ext
12680cat >>conftest.$ac_ext <<_ACEOF
12681/* end confdefs.h. */
98418dba 12682#include <Xm/Xm.h>
98418dba
CW
12683int
12684main ()
12685{
12686#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12687int x = 5;
12688#else
12689Motif version prior to 2.1.
12690#endif
12691 ;
12692 return 0;
12693}
12694_ACEOF
12695rm -f conftest.$ac_objext
d6e01aa5
KL
12696if { (ac_try="$ac_compile"
12697case "(($ac_try" in
12698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12699 *) ac_try_echo=$ac_try;;
12700esac
12701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12702 (eval "$ac_compile") 2>conftest.er1
98418dba 12703 ac_status=$?
edfaf76d
LK
12704 grep -v '^ *+' conftest.er1 >conftest.err
12705 rm -f conftest.er1
12706 cat conftest.err >&5
c0d27fcc 12707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12708 (exit $ac_status); } && {
12709 test -z "$ac_c_werror_flag" ||
12710 test ! -s conftest.err
12711 } && test -s conftest.$ac_objext; then
98418dba
CW
12712 emacs_cv_motif_version_2_1=yes
12713else
12714 echo "$as_me: failed program was:" >&5
19650fd6
AS
12715sed 's/^/| /' conftest.$ac_ext >&5
12716
d6e01aa5 12717 emacs_cv_motif_version_2_1=no
98418dba 12718fi
d6e01aa5
KL
12719
12720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12721fi
d6e01aa5
KL
12722{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12723echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12724 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12725 if test $emacs_cv_motif_version_2_1 = yes; then
12726 HAVE_LIBXP=no
b936fae4 12727
c0d27fcc 12728cat >>confdefs.h <<\_ACEOF
98418dba 12729#define HAVE_MOTIF_2_1 1
c0d27fcc 12730_ACEOF
98418dba 12731
d6e01aa5
KL
12732 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12733echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12734if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12735 echo $ECHO_N "(cached) $ECHO_C" >&6
12736else
12737 ac_check_lib_save_LIBS=$LIBS
12738LIBS="-lXp $LIBS"
12739cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12740/* confdefs.h. */
12741_ACEOF
12742cat confdefs.h >>conftest.$ac_ext
12743cat >>conftest.$ac_ext <<_ACEOF
12744/* end confdefs.h. */
98418dba 12745
d6e01aa5
KL
12746/* Override any GCC internal prototype to avoid an error.
12747 Use char because int might match the return type of a GCC
12748 builtin and then its argument prototype would still apply. */
98418dba
CW
12749#ifdef __cplusplus
12750extern "C"
12751#endif
98418dba 12752char XpCreateContext ();
98418dba
CW
12753int
12754main ()
12755{
d6e01aa5 12756return XpCreateContext ();
98418dba
CW
12757 ;
12758 return 0;
12759}
12760_ACEOF
12761rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
12762if { (ac_try="$ac_link"
12763case "(($ac_try" in
12764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12765 *) ac_try_echo=$ac_try;;
12766esac
12767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12768 (eval "$ac_link") 2>conftest.er1
98418dba 12769 ac_status=$?
edfaf76d
LK
12770 grep -v '^ *+' conftest.er1 >conftest.err
12771 rm -f conftest.er1
12772 cat conftest.err >&5
c0d27fcc 12773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12774 (exit $ac_status); } && {
12775 test -z "$ac_c_werror_flag" ||
12776 test ! -s conftest.err
12777 } && test -s conftest$ac_exeext &&
12778 $as_test_x conftest$ac_exeext; then
98418dba
CW
12779 ac_cv_lib_Xp_XpCreateContext=yes
12780else
12781 echo "$as_me: failed program was:" >&5
19650fd6
AS
12782sed 's/^/| /' conftest.$ac_ext >&5
12783
d6e01aa5 12784 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12785fi
d6e01aa5
KL
12786
12787rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12788 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12789LIBS=$ac_check_lib_save_LIBS
12790fi
d6e01aa5
KL
12791{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12792echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12793if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12794 HAVE_LIBXP=yes
12795fi
503d2be0 12796
98418dba 12797 if test ${HAVE_LIBXP} = yes; then
b936fae4 12798
c0d27fcc 12799cat >>confdefs.h <<\_ACEOF
98418dba 12800#define HAVE_LIBXP 1
c0d27fcc 12801_ACEOF
503d2be0 12802
98418dba 12803 fi
4693dbc9 12804 else
d6e01aa5
KL
12805 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12806echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12807if test "${emacs_cv_lesstif+set}" = set; then
12808 echo $ECHO_N "(cached) $ECHO_C" >&6
12809else
12810 # We put this in CFLAGS temporarily to precede other -I options
12811 # that might be in CFLAGS temporarily.
12812 # We put this in CPPFLAGS where it precedes the other -I options.
12813 OLD_CPPFLAGS=$CPPFLAGS
12814 OLD_CFLAGS=$CFLAGS
12815 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12816 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12817 cat >conftest.$ac_ext <<_ACEOF
12818/* confdefs.h. */
12819_ACEOF
12820cat confdefs.h >>conftest.$ac_ext
12821cat >>conftest.$ac_ext <<_ACEOF
12822/* end confdefs.h. */
12823#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12824int
12825main ()
12826{
12827int x = 5;
12828 ;
12829 return 0;
12830}
12831_ACEOF
12832rm -f conftest.$ac_objext
d6e01aa5
KL
12833if { (ac_try="$ac_compile"
12834case "(($ac_try" in
12835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12836 *) ac_try_echo=$ac_try;;
12837esac
12838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12839 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12840 ac_status=$?
edfaf76d
LK
12841 grep -v '^ *+' conftest.er1 >conftest.err
12842 rm -f conftest.er1
12843 cat conftest.err >&5
4693dbc9 12844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12845 (exit $ac_status); } && {
12846 test -z "$ac_c_werror_flag" ||
12847 test ! -s conftest.err
12848 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12849 emacs_cv_lesstif=yes
12850else
12851 echo "$as_me: failed program was:" >&5
12852sed 's/^/| /' conftest.$ac_ext >&5
12853
d6e01aa5 12854 emacs_cv_lesstif=no
4693dbc9 12855fi
d6e01aa5
KL
12856
12857rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12858fi
d6e01aa5
KL
12859{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12860echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12861 if test $emacs_cv_lesstif = yes; then
12862 # Make sure this -I option remains in CPPFLAGS after it is set
12863 # back to REAL_CPPFLAGS.
12864 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12865 # have those other -I options anyway. Ultimately, having this
12866 # directory ultimately in CPPFLAGS will be enough.
12867 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12868 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12869 else
12870 CFLAGS=$OLD_CFLAGS
12871 CPPFLAGS=$OLD_CPPFLAGS
12872 fi
98418dba
CW
12873 fi
12874fi
12875
c0d27fcc
MR
12876
12877
98418dba
CW
12878USE_TOOLKIT_SCROLL_BARS=no
12879if test "${with_toolkit_scroll_bars}" != "no"; then
12880 if test "${USE_X_TOOLKIT}" != "none"; then
12881 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12882 cat >>confdefs.h <<\_ACEOF
98418dba 12883#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12884_ACEOF
98418dba
CW
12885
12886 HAVE_XAW3D=no
12887 USE_TOOLKIT_SCROLL_BARS=yes
12888 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12889 cat >>confdefs.h <<\_ACEOF
98418dba 12890#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12891_ACEOF
98418dba
CW
12892
12893 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12894 fi
488dd4c4
JD
12895 elif test "${HAVE_GTK}" = "yes"; then
12896 cat >>confdefs.h <<\_ACEOF
12897#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
12898_ACEOF
12899
12900 USE_TOOLKIT_SCROLL_BARS=yes
12901 elif test "${HAVE_CARBON}" = "yes"; then
12902 cat >>confdefs.h <<\_ACEOF
12903#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12904_ACEOF
12905
12906 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12907 fi
12908fi
12909
abd39b57 12910cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12911/* confdefs.h. */
12912_ACEOF
12913cat confdefs.h >>conftest.$ac_ext
12914cat >>conftest.$ac_ext <<_ACEOF
12915/* end confdefs.h. */
12916
12917 #include <X11/Xlib.h>
12918 #include <X11/Xresource.h>
12919int
12920main ()
12921{
12922XIMProc callback;
12923 ;
12924 return 0;
12925}
12926_ACEOF
12927rm -f conftest.$ac_objext
d6e01aa5
KL
12928if { (ac_try="$ac_compile"
12929case "(($ac_try" in
12930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12931 *) ac_try_echo=$ac_try;;
12932esac
12933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12934 (eval "$ac_compile") 2>conftest.er1
abd39b57 12935 ac_status=$?
edfaf76d
LK
12936 grep -v '^ *+' conftest.er1 >conftest.err
12937 rm -f conftest.er1
12938 cat conftest.err >&5
abd39b57 12939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
12940 (exit $ac_status); } && {
12941 test -z "$ac_c_werror_flag" ||
12942 test ! -s conftest.err
12943 } && test -s conftest.$ac_objext; then
abd39b57
AC
12944 HAVE_XIM=yes
12945
12946cat >>confdefs.h <<\_ACEOF
12947#define HAVE_XIM 1
12948_ACEOF
12949
12950else
12951 echo "$as_me: failed program was:" >&5
12952sed 's/^/| /' conftest.$ac_ext >&5
12953
d6e01aa5 12954 HAVE_XIM=no
abd39b57 12955fi
d6e01aa5
KL
12956
12957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12958
c0d27fcc 12959
98418dba 12960if test "${with_xim}" != "no"; then
b936fae4 12961
c0d27fcc 12962cat >>confdefs.h <<\_ACEOF
98418dba 12963#define USE_XIM 1
c0d27fcc 12964_ACEOF
98418dba 12965
793fa0d7 12966fi
abd39b57
AC
12967
12968
12969if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12970 late_CFLAGS=$CFLAGS
12971 if test "$GCC" = yes; then
12972 CFLAGS="$CFLAGS --pedantic-errors"
12973 fi
cffcede7 12974 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12975/* confdefs.h. */
12976_ACEOF
12977cat confdefs.h >>conftest.$ac_ext
12978cat >>conftest.$ac_ext <<_ACEOF
12979/* end confdefs.h. */
cffcede7
JD
12980
12981#include <X11/Xlib.h>
12982#include <X11/Xresource.h>
12983int
12984main ()
12985{
12986Display *display;
12987XrmDatabase db;
12988char *res_name;
12989char *res_class;
12990XIMProc callback;
12991XPointer *client_data;
849d80cf
DL
12992#ifndef __GNUC__
12993/* If we're not using GCC, it's probably not XFree86, and this is
12994 probably right, but we can't use something like --pedantic-errors. */
12995extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12996 char*, XIMProc, XPointer*);
12997#endif
cffcede7
JD
12998(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12999 client_data);
13000 ;
13001 return 0;
13002}
13003_ACEOF
13004rm -f conftest.$ac_objext
d6e01aa5
KL
13005if { (ac_try="$ac_compile"
13006case "(($ac_try" in
13007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13008 *) ac_try_echo=$ac_try;;
13009esac
13010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13011 (eval "$ac_compile") 2>conftest.er1
cffcede7 13012 ac_status=$?
edfaf76d
LK
13013 grep -v '^ *+' conftest.er1 >conftest.err
13014 rm -f conftest.er1
13015 cat conftest.err >&5
cffcede7 13016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13017 (exit $ac_status); } && {
13018 test -z "$ac_c_werror_flag" ||
13019 test ! -s conftest.err
13020 } && test -s conftest.$ac_objext; then
cffcede7
JD
13021 emacs_cv_arg6_star=yes
13022else
13023 echo "$as_me: failed program was:" >&5
19650fd6
AS
13024sed 's/^/| /' conftest.$ac_ext >&5
13025
d6e01aa5 13026
cffcede7 13027fi
d6e01aa5
KL
13028
13029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
13030
13031 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 13032 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
13033#define XRegisterIMInstantiateCallback_arg6 XPointer*
13034_ACEOF
13035
13036 else
f57bd967 13037 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
13038#define XRegisterIMInstantiateCallback_arg6 XPointer
13039_ACEOF
13040
13041 fi
849d80cf 13042 CFLAGS=$late_CFLAGS
98418dba
CW
13043fi
13044
13045### Use -lXpm if available, unless `--with-xpm=no'.
13046HAVE_XPM=no
13047if test "${HAVE_X11}" = "yes"; then
13048 if test "${with_xpm}" != "no"; then
c0d27fcc 13049 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
d6e01aa5
KL
13050 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13051echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
13052if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13053 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13054fi
d6e01aa5
KL
13055{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13056echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 13057else
c0d27fcc 13058 # Is the header compilable?
d6e01aa5
KL
13059{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
13060echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 13061cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13062/* confdefs.h. */
13063_ACEOF
13064cat confdefs.h >>conftest.$ac_ext
13065cat >>conftest.$ac_ext <<_ACEOF
13066/* end confdefs.h. */
c0d27fcc
MR
13067$ac_includes_default
13068#include <X11/xpm.h>
13069_ACEOF
13070rm -f conftest.$ac_objext
d6e01aa5
KL
13071if { (ac_try="$ac_compile"
13072case "(($ac_try" in
13073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13074 *) ac_try_echo=$ac_try;;
13075esac
13076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13077 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13078 ac_status=$?
edfaf76d
LK
13079 grep -v '^ *+' conftest.er1 >conftest.err
13080 rm -f conftest.er1
13081 cat conftest.err >&5
c0d27fcc 13082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13083 (exit $ac_status); } && {
13084 test -z "$ac_c_werror_flag" ||
13085 test ! -s conftest.err
13086 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13087 ac_header_compiler=yes
13088else
13089 echo "$as_me: failed program was:" >&5
19650fd6
AS
13090sed 's/^/| /' conftest.$ac_ext >&5
13091
d6e01aa5 13092 ac_header_compiler=no
c0d27fcc 13093fi
d6e01aa5
KL
13094
13095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13096{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13097echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13098
13099# Is the header present?
d6e01aa5
KL
13100{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
13101echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 13102cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13103/* confdefs.h. */
13104_ACEOF
13105cat confdefs.h >>conftest.$ac_ext
13106cat >>conftest.$ac_ext <<_ACEOF
13107/* end confdefs.h. */
98418dba
CW
13108#include <X11/xpm.h>
13109_ACEOF
d6e01aa5
KL
13110if { (ac_try="$ac_cpp conftest.$ac_ext"
13111case "(($ac_try" in
13112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13113 *) ac_try_echo=$ac_try;;
13114esac
13115eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13116 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13117 ac_status=$?
6bae0ccf 13118 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13119 rm -f conftest.er1
13120 cat conftest.err >&5
c0d27fcc 13121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13122 (exit $ac_status); } >/dev/null && {
13123 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13124 test ! -s conftest.err
13125 }; then
c0d27fcc 13126 ac_header_preproc=yes
98418dba
CW
13127else
13128 echo "$as_me: failed program was:" >&5
19650fd6
AS
13129sed 's/^/| /' conftest.$ac_ext >&5
13130
c0d27fcc 13131 ac_header_preproc=no
98418dba 13132fi
d6e01aa5 13133
98418dba 13134rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
13135{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13136echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13137
13138# So? What about this header?
edfaf76d
LK
13139case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13140 yes:no: )
c0d27fcc
MR
13141 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
13142echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13143 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
13144echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
13145 ac_header_preproc=yes
13146 ;;
13147 no:yes:* )
13148 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
13149echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
13150 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
13151echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
13152 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
13153echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
13154 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
13155echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
13156 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
13157echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13158 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
13159echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 13160
19650fd6 13161 ;;
c0d27fcc 13162esac
d6e01aa5
KL
13163{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13164echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
13165if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13166 echo $ECHO_N "(cached) $ECHO_C" >&6
13167else
13168 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 13169fi
d6e01aa5
KL
13170{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13171echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
13172
13173fi
98418dba 13174if test $ac_cv_header_X11_xpm_h = yes; then
d6e01aa5
KL
13175 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
13176echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 13177if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 13178 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13179else
98418dba
CW
13180 ac_check_lib_save_LIBS=$LIBS
13181LIBS="-lXpm -lX11 $LIBS"
13182cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13183/* confdefs.h. */
13184_ACEOF
13185cat confdefs.h >>conftest.$ac_ext
13186cat >>conftest.$ac_ext <<_ACEOF
13187/* end confdefs.h. */
98418dba 13188
d6e01aa5
KL
13189/* Override any GCC internal prototype to avoid an error.
13190 Use char because int might match the return type of a GCC
13191 builtin and then its argument prototype would still apply. */
503d2be0
AS
13192#ifdef __cplusplus
13193extern "C"
13194#endif
98418dba 13195char XpmReadFileToPixmap ();
503d2be0
AS
13196int
13197main ()
13198{
d6e01aa5 13199return XpmReadFileToPixmap ();
503d2be0
AS
13200 ;
13201 return 0;
13202}
13203_ACEOF
13204rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
13205if { (ac_try="$ac_link"
13206case "(($ac_try" in
13207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13208 *) ac_try_echo=$ac_try;;
13209esac
13210eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13211 (eval "$ac_link") 2>conftest.er1
503d2be0 13212 ac_status=$?
edfaf76d
LK
13213 grep -v '^ *+' conftest.er1 >conftest.err
13214 rm -f conftest.er1
13215 cat conftest.err >&5
c0d27fcc 13216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13217 (exit $ac_status); } && {
13218 test -z "$ac_c_werror_flag" ||
13219 test ! -s conftest.err
13220 } && test -s conftest$ac_exeext &&
13221 $as_test_x conftest$ac_exeext; then
98418dba 13222 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
13223else
13224 echo "$as_me: failed program was:" >&5
19650fd6
AS
13225sed 's/^/| /' conftest.$ac_ext >&5
13226
d6e01aa5 13227 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13228fi
d6e01aa5
KL
13229
13230rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13231 conftest$ac_exeext conftest.$ac_ext
98418dba 13232LIBS=$ac_check_lib_save_LIBS
503d2be0 13233fi
d6e01aa5
KL
13234{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13235echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
13236if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
13237 HAVE_XPM=yes
ba4481b5
DL
13238fi
13239
98418dba
CW
13240fi
13241
c0d27fcc 13242
98418dba 13243 if test "${HAVE_XPM}" = "yes"; then
d6e01aa5
KL
13244 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13245echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13246 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13247/* confdefs.h. */
13248_ACEOF
13249cat confdefs.h >>conftest.$ac_ext
13250cat >>conftest.$ac_ext <<_ACEOF
13251/* end confdefs.h. */
98418dba
CW
13252#include "X11/xpm.h"
13253#ifndef XpmReturnAllocPixels
13254no_return_alloc_pixels
503d2be0 13255#endif
ba4481b5 13256
98418dba
CW
13257_ACEOF
13258if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13259 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13260 HAVE_XPM=no
13261else
13262 HAVE_XPM=yes
13263fi
13264rm -f conftest*
ba4481b5 13265
c0d27fcc 13266
98418dba 13267 if test "${HAVE_XPM}" = "yes"; then
d6e01aa5
KL
13268 { echo "$as_me:$LINENO: result: yes" >&5
13269echo "${ECHO_T}yes" >&6; }
98418dba 13270 else
d6e01aa5
KL
13271 { echo "$as_me:$LINENO: result: no" >&5
13272echo "${ECHO_T}no" >&6; }
98418dba
CW
13273 fi
13274 fi
13275 fi
13276
13277 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13278
c0d27fcc 13279cat >>confdefs.h <<\_ACEOF
98418dba 13280#define HAVE_XPM 1
c0d27fcc 13281_ACEOF
98418dba
CW
13282
13283 fi
13284fi
13285
13286### Use -ljpeg if available, unless `--with-jpeg=no'.
13287HAVE_JPEG=no
13288if test "${HAVE_X11}" = "yes"; then
13289 if test "${with_jpeg}" != "no"; then
c0d27fcc 13290 if test "${ac_cv_header_jerror_h+set}" = set; then
d6e01aa5
KL
13291 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13292echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
13293if test "${ac_cv_header_jerror_h+set}" = set; then
13294 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13295fi
d6e01aa5
KL
13296{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13297echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13298else
c0d27fcc 13299 # Is the header compilable?
d6e01aa5
KL
13300{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13301echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13302cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13303/* confdefs.h. */
13304_ACEOF
13305cat confdefs.h >>conftest.$ac_ext
13306cat >>conftest.$ac_ext <<_ACEOF
13307/* end confdefs.h. */
c0d27fcc
MR
13308$ac_includes_default
13309#include <jerror.h>
13310_ACEOF
13311rm -f conftest.$ac_objext
d6e01aa5
KL
13312if { (ac_try="$ac_compile"
13313case "(($ac_try" in
13314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13315 *) ac_try_echo=$ac_try;;
13316esac
13317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13318 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13319 ac_status=$?
edfaf76d
LK
13320 grep -v '^ *+' conftest.er1 >conftest.err
13321 rm -f conftest.er1
13322 cat conftest.err >&5
c0d27fcc 13323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13324 (exit $ac_status); } && {
13325 test -z "$ac_c_werror_flag" ||
13326 test ! -s conftest.err
13327 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13328 ac_header_compiler=yes
13329else
13330 echo "$as_me: failed program was:" >&5
19650fd6
AS
13331sed 's/^/| /' conftest.$ac_ext >&5
13332
d6e01aa5 13333 ac_header_compiler=no
c0d27fcc 13334fi
d6e01aa5
KL
13335
13336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13337{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13338echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13339
13340# Is the header present?
d6e01aa5
KL
13341{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13342echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13343cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13344/* confdefs.h. */
13345_ACEOF
13346cat confdefs.h >>conftest.$ac_ext
13347cat >>conftest.$ac_ext <<_ACEOF
13348/* end confdefs.h. */
98418dba
CW
13349#include <jerror.h>
13350_ACEOF
d6e01aa5
KL
13351if { (ac_try="$ac_cpp conftest.$ac_ext"
13352case "(($ac_try" in
13353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13354 *) ac_try_echo=$ac_try;;
13355esac
13356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13357 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13358 ac_status=$?
6bae0ccf 13359 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13360 rm -f conftest.er1
13361 cat conftest.err >&5
c0d27fcc 13362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13363 (exit $ac_status); } >/dev/null && {
13364 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13365 test ! -s conftest.err
13366 }; then
c0d27fcc 13367 ac_header_preproc=yes
ba4481b5 13368else
98418dba 13369 echo "$as_me: failed program was:" >&5
19650fd6
AS
13370sed 's/^/| /' conftest.$ac_ext >&5
13371
c0d27fcc 13372 ac_header_preproc=no
98418dba 13373fi
d6e01aa5 13374
98418dba 13375rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
13376{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13377echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13378
13379# So? What about this header?
edfaf76d
LK
13380case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13381 yes:no: )
c0d27fcc
MR
13382 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13383echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13384 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13385echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13386 ac_header_preproc=yes
19650fd6 13387 ;;
edfaf76d 13388 no:yes:* )
c0d27fcc
MR
13389 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13390echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13391 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13392echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13393 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13394echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13395 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13396echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13397 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13398echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13399 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13400echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 13401
19650fd6 13402 ;;
c0d27fcc 13403esac
d6e01aa5
KL
13404{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13405echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13406if test "${ac_cv_header_jerror_h+set}" = set; then
13407 echo $ECHO_N "(cached) $ECHO_C" >&6
13408else
13409 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13410fi
d6e01aa5
KL
13411{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13412echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13413
13414fi
98418dba 13415if test $ac_cv_header_jerror_h = yes; then
d6e01aa5
KL
13416 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13417echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13418if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13419 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13420else
98418dba
CW
13421 ac_check_lib_save_LIBS=$LIBS
13422LIBS="-ljpeg $LIBS"
13423cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13424/* confdefs.h. */
13425_ACEOF
13426cat confdefs.h >>conftest.$ac_ext
13427cat >>conftest.$ac_ext <<_ACEOF
13428/* end confdefs.h. */
98418dba 13429
d6e01aa5
KL
13430/* Override any GCC internal prototype to avoid an error.
13431 Use char because int might match the return type of a GCC
13432 builtin and then its argument prototype would still apply. */
98418dba
CW
13433#ifdef __cplusplus
13434extern "C"
13435#endif
98418dba 13436char jpeg_destroy_compress ();
503d2be0
AS
13437int
13438main ()
13439{
d6e01aa5 13440return jpeg_destroy_compress ();
503d2be0
AS
13441 ;
13442 return 0;
13443}
13444_ACEOF
13445rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
13446if { (ac_try="$ac_link"
13447case "(($ac_try" in
13448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13449 *) ac_try_echo=$ac_try;;
13450esac
13451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13452 (eval "$ac_link") 2>conftest.er1
503d2be0 13453 ac_status=$?
edfaf76d
LK
13454 grep -v '^ *+' conftest.er1 >conftest.err
13455 rm -f conftest.er1
13456 cat conftest.err >&5
c0d27fcc 13457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13458 (exit $ac_status); } && {
13459 test -z "$ac_c_werror_flag" ||
13460 test ! -s conftest.err
13461 } && test -s conftest$ac_exeext &&
13462 $as_test_x conftest$ac_exeext; then
98418dba 13463 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13464else
503d2be0 13465 echo "$as_me: failed program was:" >&5
19650fd6
AS
13466sed 's/^/| /' conftest.$ac_ext >&5
13467
d6e01aa5 13468 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13469fi
d6e01aa5
KL
13470
13471rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13472 conftest$ac_exeext conftest.$ac_ext
98418dba 13473LIBS=$ac_check_lib_save_LIBS
ba4481b5 13474fi
d6e01aa5
KL
13475{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13476echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13477if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13478 HAVE_JPEG=yes
ba4481b5 13479fi
98418dba 13480
ba4481b5 13481fi
98418dba 13482
c0d27fcc 13483
ba4481b5 13484 fi
ba4481b5 13485
c0d27fcc 13486
98418dba 13487 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13488 cat >>confdefs.h <<\_ACEOF
98418dba 13489#define HAVE_JPEG 1
c0d27fcc 13490_ACEOF
98418dba
CW
13491
13492 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13493/* confdefs.h. */
13494_ACEOF
13495cat confdefs.h >>conftest.$ac_ext
13496cat >>conftest.$ac_ext <<_ACEOF
13497/* end confdefs.h. */
22044edf 13498#include <jpeglib.h>
98418dba
CW
13499 version=JPEG_LIB_VERSION
13500
13501_ACEOF
13502if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13503 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13504 cat >>confdefs.h <<\_ACEOF
98418dba 13505#define HAVE_JPEG 1
c0d27fcc 13506_ACEOF
ba4481b5 13507
98418dba 13508else
c0d27fcc 13509 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13510echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13511 HAVE_JPEG=no
ba4481b5 13512fi
98418dba 13513rm -f conftest*
ba4481b5 13514
98418dba
CW
13515 fi
13516fi
503d2be0 13517
98418dba
CW
13518### Use -lpng if available, unless `--with-png=no'.
13519HAVE_PNG=no
13520if test "${HAVE_X11}" = "yes"; then
13521 if test "${with_png}" != "no"; then
f57bd967
DL
13522 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13523 # in /usr/include/libpng.
13524
13525
13526for ac_header in png.h libpng/png.h
13527do
13528as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
13529if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13530 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13531echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13532if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13533 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13534fi
d6e01aa5
KL
13535ac_res=`eval echo '${'$as_ac_Header'}'`
13536 { echo "$as_me:$LINENO: result: $ac_res" >&5
13537echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13538else
c0d27fcc 13539 # Is the header compilable?
d6e01aa5
KL
13540{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13541echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13542cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13543/* confdefs.h. */
13544_ACEOF
13545cat confdefs.h >>conftest.$ac_ext
13546cat >>conftest.$ac_ext <<_ACEOF
13547/* end confdefs.h. */
c0d27fcc 13548$ac_includes_default
f57bd967 13549#include <$ac_header>
c0d27fcc
MR
13550_ACEOF
13551rm -f conftest.$ac_objext
d6e01aa5
KL
13552if { (ac_try="$ac_compile"
13553case "(($ac_try" in
13554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13555 *) ac_try_echo=$ac_try;;
13556esac
13557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13558 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13559 ac_status=$?
edfaf76d
LK
13560 grep -v '^ *+' conftest.er1 >conftest.err
13561 rm -f conftest.er1
13562 cat conftest.err >&5
c0d27fcc 13563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13564 (exit $ac_status); } && {
13565 test -z "$ac_c_werror_flag" ||
13566 test ! -s conftest.err
13567 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13568 ac_header_compiler=yes
13569else
13570 echo "$as_me: failed program was:" >&5
19650fd6
AS
13571sed 's/^/| /' conftest.$ac_ext >&5
13572
d6e01aa5 13573 ac_header_compiler=no
c0d27fcc 13574fi
d6e01aa5
KL
13575
13576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13577{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13578echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13579
13580# Is the header present?
d6e01aa5
KL
13581{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13582echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13583cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13584/* confdefs.h. */
13585_ACEOF
13586cat confdefs.h >>conftest.$ac_ext
13587cat >>conftest.$ac_ext <<_ACEOF
13588/* end confdefs.h. */
f57bd967 13589#include <$ac_header>
503d2be0 13590_ACEOF
d6e01aa5
KL
13591if { (ac_try="$ac_cpp conftest.$ac_ext"
13592case "(($ac_try" in
13593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13594 *) ac_try_echo=$ac_try;;
13595esac
13596eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13597 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13598 ac_status=$?
6bae0ccf 13599 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13600 rm -f conftest.er1
13601 cat conftest.err >&5
c0d27fcc 13602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13603 (exit $ac_status); } >/dev/null && {
13604 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13605 test ! -s conftest.err
13606 }; then
c0d27fcc 13607 ac_header_preproc=yes
503d2be0
AS
13608else
13609 echo "$as_me: failed program was:" >&5
19650fd6
AS
13610sed 's/^/| /' conftest.$ac_ext >&5
13611
c0d27fcc 13612 ac_header_preproc=no
ba4481b5 13613fi
d6e01aa5 13614
503d2be0 13615rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
13616{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13617echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13618
13619# So? What about this header?
edfaf76d
LK
13620case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13621 yes:no: )
f57bd967
DL
13622 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13623echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13624 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13625echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13626 ac_header_preproc=yes
19650fd6 13627 ;;
edfaf76d 13628 no:yes:* )
f57bd967
DL
13629 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13630echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13631 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13632echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13633 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13634echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13635 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13636echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 13637 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13638echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13639 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13640echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 13641
19650fd6 13642 ;;
c0d27fcc 13643esac
d6e01aa5
KL
13644{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13645echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13646if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
13647 echo $ECHO_N "(cached) $ECHO_C" >&6
13648else
edfaf76d 13649 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 13650fi
d6e01aa5
KL
13651ac_res=`eval echo '${'$as_ac_Header'}'`
13652 { echo "$as_me:$LINENO: result: $ac_res" >&5
13653echo "${ECHO_T}$ac_res" >&6; }
f57bd967 13654
ba4481b5 13655fi
f57bd967
DL
13656if test `eval echo '${'$as_ac_Header'}'` = yes; then
13657 cat >>confdefs.h <<_ACEOF
13658#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13659_ACEOF
c0d27fcc
MR
13660
13661fi
f57bd967
DL
13662
13663done
13664
13665 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
d6e01aa5
KL
13666 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
13667echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 13668if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 13669 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13670else
98418dba
CW
13671 ac_check_lib_save_LIBS=$LIBS
13672LIBS="-lpng -lz -lm $LIBS"
13673cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13674/* confdefs.h. */
13675_ACEOF
13676cat confdefs.h >>conftest.$ac_ext
13677cat >>conftest.$ac_ext <<_ACEOF
13678/* end confdefs.h. */
98418dba 13679
d6e01aa5
KL
13680/* Override any GCC internal prototype to avoid an error.
13681 Use char because int might match the return type of a GCC
13682 builtin and then its argument prototype would still apply. */
503d2be0
AS
13683#ifdef __cplusplus
13684extern "C"
13685#endif
98418dba 13686char png_get_channels ();
503d2be0
AS
13687int
13688main ()
13689{
d6e01aa5 13690return png_get_channels ();
503d2be0
AS
13691 ;
13692 return 0;
13693}
13694_ACEOF
13695rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
13696if { (ac_try="$ac_link"
13697case "(($ac_try" in
13698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13699 *) ac_try_echo=$ac_try;;
13700esac
13701eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13702 (eval "$ac_link") 2>conftest.er1
503d2be0 13703 ac_status=$?
edfaf76d
LK
13704 grep -v '^ *+' conftest.er1 >conftest.err
13705 rm -f conftest.er1
13706 cat conftest.err >&5
c0d27fcc 13707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13708 (exit $ac_status); } && {
13709 test -z "$ac_c_werror_flag" ||
13710 test ! -s conftest.err
13711 } && test -s conftest$ac_exeext &&
13712 $as_test_x conftest$ac_exeext; then
98418dba 13713 ac_cv_lib_png_png_get_channels=yes
73b77ee5 13714else
98418dba 13715 echo "$as_me: failed program was:" >&5
19650fd6
AS
13716sed 's/^/| /' conftest.$ac_ext >&5
13717
d6e01aa5 13718 ac_cv_lib_png_png_get_channels=no
73b77ee5 13719fi
d6e01aa5
KL
13720
13721rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13722 conftest$ac_exeext conftest.$ac_ext
98418dba 13723LIBS=$ac_check_lib_save_LIBS
73b77ee5 13724fi
d6e01aa5
KL
13725{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
13726echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
13727if test $ac_cv_lib_png_png_get_channels = yes; then
13728 HAVE_PNG=yes
73b77ee5 13729fi
503d2be0 13730
f57bd967 13731 fi
98418dba
CW
13732 fi
13733
13734 if test "${HAVE_PNG}" = "yes"; then
b936fae4 13735
c0d27fcc 13736cat >>confdefs.h <<\_ACEOF
98418dba 13737#define HAVE_PNG 1
c0d27fcc 13738_ACEOF
73b77ee5 13739
98418dba 13740 fi
73b77ee5
GM
13741fi
13742
98418dba
CW
13743### Use -ltiff if available, unless `--with-tiff=no'.
13744HAVE_TIFF=no
13745if test "${HAVE_X11}" = "yes"; then
13746 if test "${with_tiff}" != "no"; then
c0d27fcc 13747 if test "${ac_cv_header_tiffio_h+set}" = set; then
d6e01aa5
KL
13748 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
13749echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
13750if test "${ac_cv_header_tiffio_h+set}" = set; then
13751 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13752fi
d6e01aa5
KL
13753{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13754echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 13755else
c0d27fcc 13756 # Is the header compilable?
d6e01aa5
KL
13757{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
13758echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 13759cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13760/* confdefs.h. */
13761_ACEOF
13762cat confdefs.h >>conftest.$ac_ext
13763cat >>conftest.$ac_ext <<_ACEOF
13764/* end confdefs.h. */
c0d27fcc
MR
13765$ac_includes_default
13766#include <tiffio.h>
13767_ACEOF
13768rm -f conftest.$ac_objext
d6e01aa5
KL
13769if { (ac_try="$ac_compile"
13770case "(($ac_try" in
13771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13772 *) ac_try_echo=$ac_try;;
13773esac
13774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13775 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13776 ac_status=$?
edfaf76d
LK
13777 grep -v '^ *+' conftest.er1 >conftest.err
13778 rm -f conftest.er1
13779 cat conftest.err >&5
c0d27fcc 13780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13781 (exit $ac_status); } && {
13782 test -z "$ac_c_werror_flag" ||
13783 test ! -s conftest.err
13784 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13785 ac_header_compiler=yes
13786else
13787 echo "$as_me: failed program was:" >&5
19650fd6
AS
13788sed 's/^/| /' conftest.$ac_ext >&5
13789
d6e01aa5 13790 ac_header_compiler=no
c0d27fcc 13791fi
d6e01aa5
KL
13792
13793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13794{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13795echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13796
13797# Is the header present?
d6e01aa5
KL
13798{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
13799echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 13800cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13801/* confdefs.h. */
13802_ACEOF
13803cat confdefs.h >>conftest.$ac_ext
13804cat >>conftest.$ac_ext <<_ACEOF
13805/* end confdefs.h. */
98418dba
CW
13806#include <tiffio.h>
13807_ACEOF
d6e01aa5
KL
13808if { (ac_try="$ac_cpp conftest.$ac_ext"
13809case "(($ac_try" in
13810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13811 *) ac_try_echo=$ac_try;;
13812esac
13813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13814 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13815 ac_status=$?
6bae0ccf 13816 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13817 rm -f conftest.er1
13818 cat conftest.err >&5
c0d27fcc 13819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13820 (exit $ac_status); } >/dev/null && {
13821 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13822 test ! -s conftest.err
13823 }; then
c0d27fcc 13824 ac_header_preproc=yes
98418dba
CW
13825else
13826 echo "$as_me: failed program was:" >&5
19650fd6
AS
13827sed 's/^/| /' conftest.$ac_ext >&5
13828
c0d27fcc 13829 ac_header_preproc=no
98418dba 13830fi
d6e01aa5 13831
98418dba 13832rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
13833{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13834echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13835
13836# So? What about this header?
edfaf76d
LK
13837case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13838 yes:no: )
c0d27fcc
MR
13839 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
13840echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13841 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
13842echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
13843 ac_header_preproc=yes
19650fd6 13844 ;;
edfaf76d 13845 no:yes:* )
c0d27fcc
MR
13846 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
13847echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13848 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
13849echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
13850 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
13851echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
13852 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
13853echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13854 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 13855echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13856 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
13857echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 13858
19650fd6 13859 ;;
c0d27fcc 13860esac
d6e01aa5
KL
13861{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
13862echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
13863if test "${ac_cv_header_tiffio_h+set}" = set; then
13864 echo $ECHO_N "(cached) $ECHO_C" >&6
13865else
13866 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 13867fi
d6e01aa5
KL
13868{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13869echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
13870
13871fi
98418dba
CW
13872if test $ac_cv_header_tiffio_h = yes; then
13873 tifflibs="-lz -lm"
13874 # At least one tiff package requires the jpeg library.
13875 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
d6e01aa5
KL
13876 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
13877echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 13878if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 13879 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13880else
503d2be0 13881 ac_check_lib_save_LIBS=$LIBS
98418dba 13882LIBS="-ltiff $tifflibs $LIBS"
503d2be0 13883cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13884/* confdefs.h. */
13885_ACEOF
13886cat confdefs.h >>conftest.$ac_ext
13887cat >>conftest.$ac_ext <<_ACEOF
13888/* end confdefs.h. */
503d2be0 13889
d6e01aa5
KL
13890/* Override any GCC internal prototype to avoid an error.
13891 Use char because int might match the return type of a GCC
13892 builtin and then its argument prototype would still apply. */
503d2be0
AS
13893#ifdef __cplusplus
13894extern "C"
13895#endif
98418dba 13896char TIFFGetVersion ();
503d2be0
AS
13897int
13898main ()
13899{
d6e01aa5 13900return TIFFGetVersion ();
503d2be0
AS
13901 ;
13902 return 0;
13903}
13904_ACEOF
13905rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
13906if { (ac_try="$ac_link"
13907case "(($ac_try" in
13908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13909 *) ac_try_echo=$ac_try;;
13910esac
13911eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13912 (eval "$ac_link") 2>conftest.er1
503d2be0 13913 ac_status=$?
edfaf76d
LK
13914 grep -v '^ *+' conftest.er1 >conftest.err
13915 rm -f conftest.er1
13916 cat conftest.err >&5
c0d27fcc 13917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13918 (exit $ac_status); } && {
13919 test -z "$ac_c_werror_flag" ||
13920 test ! -s conftest.err
13921 } && test -s conftest$ac_exeext &&
13922 $as_test_x conftest$ac_exeext; then
98418dba 13923 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
13924else
13925 echo "$as_me: failed program was:" >&5
19650fd6
AS
13926sed 's/^/| /' conftest.$ac_ext >&5
13927
d6e01aa5 13928 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 13929fi
d6e01aa5
KL
13930
13931rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13932 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
13933LIBS=$ac_check_lib_save_LIBS
13934fi
d6e01aa5
KL
13935{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13936echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
13937if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
13938 HAVE_TIFF=yes
13939fi
13940
13941fi
73b77ee5 13942
c0d27fcc 13943
98418dba
CW
13944 fi
13945
13946 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 13947
c0d27fcc 13948cat >>confdefs.h <<\_ACEOF
98418dba 13949#define HAVE_TIFF 1
c0d27fcc 13950_ACEOF
98418dba
CW
13951
13952 fi
73b77ee5
GM
13953fi
13954
9aeb8aaa 13955### Use -lgif or -lungif if available, unless `--with-gif=no'.
98418dba 13956HAVE_GIF=no
9aeb8aaa
GM
13957if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
13958 if test "${ac_cv_header_gif_lib_h+set}" = set; then
d6e01aa5
KL
13959 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
13960echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
13961if test "${ac_cv_header_gif_lib_h+set}" = set; then
13962 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13963fi
d6e01aa5
KL
13964{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
13965echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 13966else
c0d27fcc 13967 # Is the header compilable?
d6e01aa5
KL
13968{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
13969echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 13970cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13971/* confdefs.h. */
13972_ACEOF
13973cat confdefs.h >>conftest.$ac_ext
13974cat >>conftest.$ac_ext <<_ACEOF
13975/* end confdefs.h. */
c0d27fcc
MR
13976$ac_includes_default
13977#include <gif_lib.h>
13978_ACEOF
13979rm -f conftest.$ac_objext
d6e01aa5
KL
13980if { (ac_try="$ac_compile"
13981case "(($ac_try" in
13982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13983 *) ac_try_echo=$ac_try;;
13984esac
13985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13986 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13987 ac_status=$?
edfaf76d
LK
13988 grep -v '^ *+' conftest.er1 >conftest.err
13989 rm -f conftest.er1
13990 cat conftest.err >&5
c0d27fcc 13991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
13992 (exit $ac_status); } && {
13993 test -z "$ac_c_werror_flag" ||
13994 test ! -s conftest.err
13995 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13996 ac_header_compiler=yes
13997else
13998 echo "$as_me: failed program was:" >&5
19650fd6
AS
13999sed 's/^/| /' conftest.$ac_ext >&5
14000
d6e01aa5 14001 ac_header_compiler=no
c0d27fcc 14002fi
d6e01aa5
KL
14003
14004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14005{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14006echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14007
14008# Is the header present?
d6e01aa5
KL
14009{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
14010echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 14011cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14012/* confdefs.h. */
14013_ACEOF
14014cat confdefs.h >>conftest.$ac_ext
14015cat >>conftest.$ac_ext <<_ACEOF
14016/* end confdefs.h. */
98418dba
CW
14017#include <gif_lib.h>
14018_ACEOF
d6e01aa5
KL
14019if { (ac_try="$ac_cpp conftest.$ac_ext"
14020case "(($ac_try" in
14021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14022 *) ac_try_echo=$ac_try;;
14023esac
14024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14025 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14026 ac_status=$?
6bae0ccf 14027 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14028 rm -f conftest.er1
14029 cat conftest.err >&5
c0d27fcc 14030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14031 (exit $ac_status); } >/dev/null && {
14032 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14033 test ! -s conftest.err
14034 }; then
c0d27fcc 14035 ac_header_preproc=yes
98418dba
CW
14036else
14037 echo "$as_me: failed program was:" >&5
19650fd6
AS
14038sed 's/^/| /' conftest.$ac_ext >&5
14039
c0d27fcc 14040 ac_header_preproc=no
98418dba 14041fi
d6e01aa5 14042
98418dba 14043rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
14044{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14045echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14046
14047# So? What about this header?
edfaf76d
LK
14048case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14049 yes:no: )
c0d27fcc
MR
14050 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14051echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14052 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
14053echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
14054 ac_header_preproc=yes
19650fd6 14055 ;;
edfaf76d 14056 no:yes:* )
c0d27fcc
MR
14057 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
14058echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14059 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
14060echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
14061 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
14062echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
14063 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
14064echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14065 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 14066echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14067 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
14068echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 14069
19650fd6 14070 ;;
c0d27fcc 14071esac
d6e01aa5
KL
14072{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14073echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14074if test "${ac_cv_header_gif_lib_h+set}" = set; then
14075 echo $ECHO_N "(cached) $ECHO_C" >&6
14076else
14077 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 14078fi
d6e01aa5
KL
14079{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14080echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
14081
14082fi
98418dba
CW
14083if test $ac_cv_header_gif_lib_h = yes; then
14084 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14085# Earlier versions can crash Emacs.
63175cd2
GM
14086 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
14087echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
14088if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
503d2be0 14089 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14090else
503d2be0 14091 ac_check_lib_save_LIBS=$LIBS
63175cd2 14092LIBS="-lgif $LIBS"
503d2be0 14093cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14094/* confdefs.h. */
14095_ACEOF
14096cat confdefs.h >>conftest.$ac_ext
14097cat >>conftest.$ac_ext <<_ACEOF
14098/* end confdefs.h. */
73b77ee5 14099
d6e01aa5
KL
14100/* Override any GCC internal prototype to avoid an error.
14101 Use char because int might match the return type of a GCC
14102 builtin and then its argument prototype would still apply. */
98418dba
CW
14103#ifdef __cplusplus
14104extern "C"
14105#endif
98418dba 14106char EGifPutExtensionLast ();
503d2be0
AS
14107int
14108main ()
14109{
d6e01aa5 14110return EGifPutExtensionLast ();
503d2be0
AS
14111 ;
14112 return 0;
14113}
14114_ACEOF
14115rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14116if { (ac_try="$ac_link"
14117case "(($ac_try" in
14118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14119 *) ac_try_echo=$ac_try;;
14120esac
14121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14122 (eval "$ac_link") 2>conftest.er1
503d2be0 14123 ac_status=$?
edfaf76d
LK
14124 grep -v '^ *+' conftest.er1 >conftest.err
14125 rm -f conftest.er1
14126 cat conftest.err >&5
c0d27fcc 14127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14128 (exit $ac_status); } && {
14129 test -z "$ac_c_werror_flag" ||
14130 test ! -s conftest.err
14131 } && test -s conftest$ac_exeext &&
14132 $as_test_x conftest$ac_exeext; then
63175cd2 14133 ac_cv_lib_gif_EGifPutExtensionLast=yes
35996d22 14134else
98418dba 14135 echo "$as_me: failed program was:" >&5
19650fd6
AS
14136sed 's/^/| /' conftest.$ac_ext >&5
14137
63175cd2 14138 ac_cv_lib_gif_EGifPutExtensionLast=no
98418dba 14139fi
d6e01aa5
KL
14140
14141rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14142 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14143LIBS=$ac_check_lib_save_LIBS
14144fi
63175cd2
GM
14145{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14146echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14147if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
98418dba 14148 HAVE_GIF=yes
9aeb8aaa 14149else
63175cd2 14150 try_libungif=yes
98418dba
CW
14151fi
14152
14153fi
14154
c0d27fcc 14155
9aeb8aaa
GM
14156
14157 if test "$HAVE_GIF" = yes; then
63175cd2 14158 ac_gif_lib_name="-lgif"
9aeb8aaa
GM
14159 fi
14160
63175cd2
GM
14161# If gif_lib.h but no libgif, try libungif.
14162 if test x"$try_libungif" = xyes; then
14163 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
14164echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
14165if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
9aeb8aaa
GM
14166 echo $ECHO_N "(cached) $ECHO_C" >&6
14167else
14168 ac_check_lib_save_LIBS=$LIBS
63175cd2 14169LIBS="-lungif $LIBS"
9aeb8aaa
GM
14170cat >conftest.$ac_ext <<_ACEOF
14171/* confdefs.h. */
14172_ACEOF
14173cat confdefs.h >>conftest.$ac_ext
14174cat >>conftest.$ac_ext <<_ACEOF
14175/* end confdefs.h. */
14176
14177/* Override any GCC internal prototype to avoid an error.
14178 Use char because int might match the return type of a GCC
14179 builtin and then its argument prototype would still apply. */
14180#ifdef __cplusplus
14181extern "C"
14182#endif
14183char EGifPutExtensionLast ();
14184int
14185main ()
14186{
14187return EGifPutExtensionLast ();
14188 ;
14189 return 0;
14190}
14191_ACEOF
14192rm -f conftest.$ac_objext conftest$ac_exeext
14193if { (ac_try="$ac_link"
14194case "(($ac_try" in
14195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14196 *) ac_try_echo=$ac_try;;
14197esac
14198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14199 (eval "$ac_link") 2>conftest.er1
14200 ac_status=$?
14201 grep -v '^ *+' conftest.er1 >conftest.err
14202 rm -f conftest.er1
14203 cat conftest.err >&5
14204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14205 (exit $ac_status); } && {
14206 test -z "$ac_c_werror_flag" ||
14207 test ! -s conftest.err
14208 } && test -s conftest$ac_exeext &&
14209 $as_test_x conftest$ac_exeext; then
63175cd2 14210 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9aeb8aaa
GM
14211else
14212 echo "$as_me: failed program was:" >&5
14213sed 's/^/| /' conftest.$ac_ext >&5
14214
63175cd2 14215 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba
CW
14216fi
14217
9aeb8aaa
GM
14218rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14219 conftest$ac_exeext conftest.$ac_ext
14220LIBS=$ac_check_lib_save_LIBS
14221fi
63175cd2
GM
14222{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14223echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14224if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9aeb8aaa 14225 HAVE_GIF=yes
98418dba
CW
14226fi
14227
c0d27fcc 14228
9aeb8aaa
GM
14229 if test "$HAVE_GIF" = yes; then
14230
14231cat >>confdefs.h <<\_ACEOF
63175cd2 14232#define LIBGIF -lungif
9aeb8aaa
GM
14233_ACEOF
14234
63175cd2 14235 ac_gif_lib_name="-lungif"
9aeb8aaa 14236 fi
98418dba
CW
14237 fi
14238
14239 if test "${HAVE_GIF}" = "yes"; then
b936fae4 14240
c0d27fcc 14241cat >>confdefs.h <<\_ACEOF
98418dba 14242#define HAVE_GIF 1
c0d27fcc 14243_ACEOF
98418dba
CW
14244
14245 fi
14246fi
14247
5afbeb22
JD
14248if test "${HAVE_X11}" = "yes"; then
14249 MISSING=""
14250 WITH_NO=""
14251 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14252 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14253 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14254 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14255 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14256 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14257 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14258 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14259 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14260 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14261
14262 if test "X${MISSING}" != X; then
c982cf7d 14263 { { echo "$as_me:$LINENO: error: The following required libraries were not found:
5afbeb22 14264 $MISSING
86e73516 14265Maybe some development libraries/packages are missing?
5afbeb22
JD
14266If you don't want to link with them give
14267 $WITH_NO
14268as options to configure" >&5
c982cf7d 14269echo "$as_me: error: The following required libraries were not found:
5afbeb22 14270 $MISSING
86e73516 14271Maybe some development libraries/packages are missing?
5afbeb22
JD
14272If you don't want to link with them give
14273 $WITH_NO
14274as options to configure" >&2;}
86e73516 14275 { (exit 1); exit 1; }; }
98418dba
CW
14276 fi
14277fi
14278
79011b82
NR
14279### Use -lgpm if available, unless `--with-gpm=no'.
14280HAVE_GPM=no
14281if test "${with_gpm}" != "no"; then
14282 if test "${ac_cv_header_gpm_h+set}" = set; then
14283 { echo "$as_me:$LINENO: checking for gpm.h" >&5
14284echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14285if test "${ac_cv_header_gpm_h+set}" = set; then
14286 echo $ECHO_N "(cached) $ECHO_C" >&6
14287fi
14288{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14289echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14290else
14291 # Is the header compilable?
14292{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
14293echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
14294cat >conftest.$ac_ext <<_ACEOF
14295/* confdefs.h. */
14296_ACEOF
14297cat confdefs.h >>conftest.$ac_ext
14298cat >>conftest.$ac_ext <<_ACEOF
14299/* end confdefs.h. */
14300$ac_includes_default
14301#include <gpm.h>
14302_ACEOF
14303rm -f conftest.$ac_objext
14304if { (ac_try="$ac_compile"
14305case "(($ac_try" in
14306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14307 *) ac_try_echo=$ac_try;;
14308esac
14309eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14310 (eval "$ac_compile") 2>conftest.er1
14311 ac_status=$?
14312 grep -v '^ *+' conftest.er1 >conftest.err
14313 rm -f conftest.er1
14314 cat conftest.err >&5
14315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14316 (exit $ac_status); } && {
14317 test -z "$ac_c_werror_flag" ||
14318 test ! -s conftest.err
14319 } && test -s conftest.$ac_objext; then
14320 ac_header_compiler=yes
14321else
14322 echo "$as_me: failed program was:" >&5
14323sed 's/^/| /' conftest.$ac_ext >&5
14324
14325 ac_header_compiler=no
14326fi
14327
14328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14329{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14330echo "${ECHO_T}$ac_header_compiler" >&6; }
14331
14332# Is the header present?
14333{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
14334echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
14335cat >conftest.$ac_ext <<_ACEOF
14336/* confdefs.h. */
14337_ACEOF
14338cat confdefs.h >>conftest.$ac_ext
14339cat >>conftest.$ac_ext <<_ACEOF
14340/* end confdefs.h. */
14341#include <gpm.h>
14342_ACEOF
14343if { (ac_try="$ac_cpp conftest.$ac_ext"
14344case "(($ac_try" in
14345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14346 *) ac_try_echo=$ac_try;;
14347esac
14348eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14349 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14350 ac_status=$?
14351 grep -v '^ *+' conftest.er1 >conftest.err
14352 rm -f conftest.er1
14353 cat conftest.err >&5
14354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14355 (exit $ac_status); } >/dev/null && {
14356 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14357 test ! -s conftest.err
14358 }; then
14359 ac_header_preproc=yes
14360else
14361 echo "$as_me: failed program was:" >&5
14362sed 's/^/| /' conftest.$ac_ext >&5
14363
14364 ac_header_preproc=no
14365fi
14366
14367rm -f conftest.err conftest.$ac_ext
14368{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14369echo "${ECHO_T}$ac_header_preproc" >&6; }
14370
14371# So? What about this header?
14372case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14373 yes:no: )
14374 { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14375echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14376 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
14377echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
14378 ac_header_preproc=yes
14379 ;;
14380 no:yes:* )
14381 { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
14382echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
14383 { echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
14384echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
14385 { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
14386echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
14387 { echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
14388echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
14389 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
14390echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
14391 { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
14392echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
14393
14394 ;;
14395esac
14396{ echo "$as_me:$LINENO: checking for gpm.h" >&5
14397echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14398if test "${ac_cv_header_gpm_h+set}" = set; then
14399 echo $ECHO_N "(cached) $ECHO_C" >&6
14400else
14401 ac_cv_header_gpm_h=$ac_header_preproc
14402fi
14403{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14404echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14405
14406fi
14407if test $ac_cv_header_gpm_h = yes; then
14408 { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
14409echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
14410if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
14411 echo $ECHO_N "(cached) $ECHO_C" >&6
14412else
14413 ac_check_lib_save_LIBS=$LIBS
14414LIBS="-lgpm $LIBS"
14415cat >conftest.$ac_ext <<_ACEOF
14416/* confdefs.h. */
14417_ACEOF
14418cat confdefs.h >>conftest.$ac_ext
14419cat >>conftest.$ac_ext <<_ACEOF
14420/* end confdefs.h. */
14421
14422/* Override any GCC internal prototype to avoid an error.
14423 Use char because int might match the return type of a GCC
14424 builtin and then its argument prototype would still apply. */
14425#ifdef __cplusplus
14426extern "C"
14427#endif
14428char Gpm_Open ();
14429int
14430main ()
14431{
14432return Gpm_Open ();
14433 ;
14434 return 0;
14435}
14436_ACEOF
14437rm -f conftest.$ac_objext conftest$ac_exeext
14438if { (ac_try="$ac_link"
14439case "(($ac_try" in
14440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14441 *) ac_try_echo=$ac_try;;
14442esac
14443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14444 (eval "$ac_link") 2>conftest.er1
14445 ac_status=$?
14446 grep -v '^ *+' conftest.er1 >conftest.err
14447 rm -f conftest.er1
14448 cat conftest.err >&5
14449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14450 (exit $ac_status); } && {
14451 test -z "$ac_c_werror_flag" ||
14452 test ! -s conftest.err
14453 } && test -s conftest$ac_exeext &&
14454 $as_test_x conftest$ac_exeext; then
14455 ac_cv_lib_gpm_Gpm_Open=yes
14456else
14457 echo "$as_me: failed program was:" >&5
14458sed 's/^/| /' conftest.$ac_ext >&5
14459
14460 ac_cv_lib_gpm_Gpm_Open=no
14461fi
14462
14463rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14464 conftest$ac_exeext conftest.$ac_ext
14465LIBS=$ac_check_lib_save_LIBS
14466fi
14467{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14468echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
14469if test $ac_cv_lib_gpm_Gpm_Open = yes; then
14470 HAVE_GPM=yes
14471fi
14472
14473fi
14474
14475
14476fi
14477
14478if test "${HAVE_GPM}" = "yes"; then
14479
14480cat >>confdefs.h <<\_ACEOF
14481#define HAVE_GPM 1
14482_ACEOF
14483
14484fi
14485
cef11da2 14486if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
d6e01aa5
KL
14487 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14488echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14489if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14490 echo $ECHO_N "(cached) $ECHO_C" >&6
14491fi
d6e01aa5
KL
14492{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14493echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14494else
14495 # Is the header compilable?
d6e01aa5
KL
14496{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
14497echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
14498cat >conftest.$ac_ext <<_ACEOF
14499/* confdefs.h. */
14500_ACEOF
14501cat confdefs.h >>conftest.$ac_ext
14502cat >>conftest.$ac_ext <<_ACEOF
14503/* end confdefs.h. */
14504$ac_includes_default
14505#include <malloc/malloc.h>
14506_ACEOF
14507rm -f conftest.$ac_objext
d6e01aa5
KL
14508if { (ac_try="$ac_compile"
14509case "(($ac_try" in
14510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14511 *) ac_try_echo=$ac_try;;
14512esac
14513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14514 (eval "$ac_compile") 2>conftest.er1
cef11da2 14515 ac_status=$?
edfaf76d
LK
14516 grep -v '^ *+' conftest.er1 >conftest.err
14517 rm -f conftest.er1
14518 cat conftest.err >&5
cef11da2 14519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14520 (exit $ac_status); } && {
14521 test -z "$ac_c_werror_flag" ||
14522 test ! -s conftest.err
14523 } && test -s conftest.$ac_objext; then
cef11da2
ST
14524 ac_header_compiler=yes
14525else
14526 echo "$as_me: failed program was:" >&5
14527sed 's/^/| /' conftest.$ac_ext >&5
14528
d6e01aa5 14529 ac_header_compiler=no
cef11da2 14530fi
d6e01aa5
KL
14531
14532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14533{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14534echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14535
14536# Is the header present?
d6e01aa5
KL
14537{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
14538echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
14539cat >conftest.$ac_ext <<_ACEOF
14540/* confdefs.h. */
14541_ACEOF
14542cat confdefs.h >>conftest.$ac_ext
14543cat >>conftest.$ac_ext <<_ACEOF
14544/* end confdefs.h. */
14545#include <malloc/malloc.h>
14546_ACEOF
d6e01aa5
KL
14547if { (ac_try="$ac_cpp conftest.$ac_ext"
14548case "(($ac_try" in
14549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14550 *) ac_try_echo=$ac_try;;
14551esac
14552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14553 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14554 ac_status=$?
14555 grep -v '^ *+' conftest.er1 >conftest.err
14556 rm -f conftest.er1
14557 cat conftest.err >&5
14558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14559 (exit $ac_status); } >/dev/null && {
14560 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14561 test ! -s conftest.err
14562 }; then
cef11da2
ST
14563 ac_header_preproc=yes
14564else
14565 echo "$as_me: failed program was:" >&5
14566sed 's/^/| /' conftest.$ac_ext >&5
14567
14568 ac_header_preproc=no
14569fi
d6e01aa5 14570
cef11da2 14571rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
14572{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14573echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14574
14575# So? What about this header?
edfaf76d
LK
14576case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14577 yes:no: )
cef11da2
ST
14578 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14579echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14580 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14581echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
14582 ac_header_preproc=yes
cef11da2 14583 ;;
edfaf76d 14584 no:yes:* )
cef11da2
ST
14585 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14586echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14587 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14588echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14589 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14590echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14591 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14592echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
14593 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14594echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14595 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14596echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 14597
cef11da2
ST
14598 ;;
14599esac
d6e01aa5
KL
14600{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14601echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14602if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14603 echo $ECHO_N "(cached) $ECHO_C" >&6
14604else
14605 ac_cv_header_malloc_malloc_h=$ac_header_preproc
14606fi
d6e01aa5
KL
14607{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14608echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14609
14610fi
14611if test $ac_cv_header_malloc_malloc_h = yes; then
14612
14613cat >>confdefs.h <<\_ACEOF
14614#define HAVE_MALLOC_MALLOC_H 1
14615_ACEOF
14616
14617fi
14618
14619
14620
5d6da11e 14621### Use Mac OS X Carbon API to implement GUI.
e0f712ba 14622if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 14623
c0d27fcc 14624cat >>confdefs.h <<\_ACEOF
e0f712ba 14625#define HAVE_CARBON 1
c0d27fcc 14626_ACEOF
e0f712ba 14627
6a3a24fa
JD
14628 ## Specify the install directory
14629 carbon_appdir=
14630 if test "${carbon_appdir_x}" != ""; then
14631 case ${carbon_appdir_x} in
14632 y | ye | yes) carbon_appdir=/Applications ;;
14633 * ) carbon_appdir=${carbon_appdir_x} ;;
14634 esac
14635 fi
8f417b3b
AS
14636 # We also have mouse menus.
14637 HAVE_MENUS=yes
e0f712ba
AC
14638fi
14639
98418dba
CW
14640### Use session management (-lSM -lICE) if available
14641HAVE_X_SM=no
14642if test "${HAVE_X11}" = "yes"; then
c0d27fcc 14643 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
d6e01aa5
KL
14644 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14645echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
14646if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14647 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14648fi
d6e01aa5
KL
14649{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14650echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 14651else
c0d27fcc 14652 # Is the header compilable?
d6e01aa5
KL
14653{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
14654echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 14655cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14656/* confdefs.h. */
14657_ACEOF
14658cat confdefs.h >>conftest.$ac_ext
14659cat >>conftest.$ac_ext <<_ACEOF
14660/* end confdefs.h. */
c0d27fcc
MR
14661$ac_includes_default
14662#include <X11/SM/SMlib.h>
14663_ACEOF
14664rm -f conftest.$ac_objext
d6e01aa5
KL
14665if { (ac_try="$ac_compile"
14666case "(($ac_try" in
14667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14668 *) ac_try_echo=$ac_try;;
14669esac
14670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14671 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14672 ac_status=$?
edfaf76d
LK
14673 grep -v '^ *+' conftest.er1 >conftest.err
14674 rm -f conftest.er1
14675 cat conftest.err >&5
c0d27fcc 14676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14677 (exit $ac_status); } && {
14678 test -z "$ac_c_werror_flag" ||
14679 test ! -s conftest.err
14680 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14681 ac_header_compiler=yes
14682else
14683 echo "$as_me: failed program was:" >&5
19650fd6
AS
14684sed 's/^/| /' conftest.$ac_ext >&5
14685
d6e01aa5 14686 ac_header_compiler=no
c0d27fcc 14687fi
d6e01aa5
KL
14688
14689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14690{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14691echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14692
14693# Is the header present?
d6e01aa5
KL
14694{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
14695echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 14696cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14697/* confdefs.h. */
14698_ACEOF
14699cat confdefs.h >>conftest.$ac_ext
14700cat >>conftest.$ac_ext <<_ACEOF
14701/* end confdefs.h. */
98418dba
CW
14702#include <X11/SM/SMlib.h>
14703_ACEOF
d6e01aa5
KL
14704if { (ac_try="$ac_cpp conftest.$ac_ext"
14705case "(($ac_try" in
14706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14707 *) ac_try_echo=$ac_try;;
14708esac
14709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14710 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14711 ac_status=$?
6bae0ccf 14712 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14713 rm -f conftest.er1
14714 cat conftest.err >&5
c0d27fcc 14715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14716 (exit $ac_status); } >/dev/null && {
14717 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14718 test ! -s conftest.err
14719 }; then
c0d27fcc 14720 ac_header_preproc=yes
98418dba
CW
14721else
14722 echo "$as_me: failed program was:" >&5
19650fd6
AS
14723sed 's/^/| /' conftest.$ac_ext >&5
14724
c0d27fcc 14725 ac_header_preproc=no
98418dba 14726fi
d6e01aa5 14727
98418dba 14728rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
14729{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14730echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14731
14732# So? What about this header?
edfaf76d
LK
14733case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14734 yes:no: )
c0d27fcc
MR
14735 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14736echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14737 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
14738echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
14739 ac_header_preproc=yes
19650fd6 14740 ;;
edfaf76d 14741 no:yes:* )
c0d27fcc
MR
14742 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
14743echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14744 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
14745echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
14746 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
14747echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
14748 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
14749echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14750 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 14751echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14752 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
14753echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 14754
19650fd6 14755 ;;
c0d27fcc 14756esac
d6e01aa5
KL
14757{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14758echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14759if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14760 echo $ECHO_N "(cached) $ECHO_C" >&6
14761else
14762 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 14763fi
d6e01aa5
KL
14764{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14765echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
14766
14767fi
98418dba 14768if test $ac_cv_header_X11_SM_SMlib_h = yes; then
d6e01aa5
KL
14769 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
14770echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 14771if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 14772 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14773else
503d2be0 14774 ac_check_lib_save_LIBS=$LIBS
1660500f 14775LIBS="-lSM -lICE $LIBS"
503d2be0 14776cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14777/* confdefs.h. */
14778_ACEOF
14779cat confdefs.h >>conftest.$ac_ext
14780cat >>conftest.$ac_ext <<_ACEOF
14781/* end confdefs.h. */
503d2be0 14782
d6e01aa5
KL
14783/* Override any GCC internal prototype to avoid an error.
14784 Use char because int might match the return type of a GCC
14785 builtin and then its argument prototype would still apply. */
503d2be0
AS
14786#ifdef __cplusplus
14787extern "C"
14788#endif
98418dba 14789char SmcOpenConnection ();
503d2be0
AS
14790int
14791main ()
14792{
d6e01aa5 14793return SmcOpenConnection ();
503d2be0
AS
14794 ;
14795 return 0;
14796}
14797_ACEOF
14798rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14799if { (ac_try="$ac_link"
14800case "(($ac_try" in
14801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14802 *) ac_try_echo=$ac_try;;
14803esac
14804eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14805 (eval "$ac_link") 2>conftest.er1
503d2be0 14806 ac_status=$?
edfaf76d
LK
14807 grep -v '^ *+' conftest.er1 >conftest.err
14808 rm -f conftest.er1
14809 cat conftest.err >&5
c0d27fcc 14810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14811 (exit $ac_status); } && {
14812 test -z "$ac_c_werror_flag" ||
14813 test ! -s conftest.err
14814 } && test -s conftest$ac_exeext &&
14815 $as_test_x conftest$ac_exeext; then
98418dba 14816 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
14817else
14818 echo "$as_me: failed program was:" >&5
19650fd6
AS
14819sed 's/^/| /' conftest.$ac_ext >&5
14820
d6e01aa5 14821 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 14822fi
d6e01aa5
KL
14823
14824rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14825 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14826LIBS=$ac_check_lib_save_LIBS
14827fi
d6e01aa5
KL
14828{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
14829echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
14830if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
14831 HAVE_X_SM=yes
73b77ee5
GM
14832fi
14833
73b77ee5 14834fi
73b77ee5 14835
c0d27fcc
MR
14836
14837
98418dba 14838 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 14839
c0d27fcc 14840cat >>confdefs.h <<\_ACEOF
98418dba 14841#define HAVE_X_SM 1
c0d27fcc 14842_ACEOF
73b77ee5 14843
98418dba
CW
14844 case "$LIBS" in
14845 *-lSM*) ;;
14846 *) LIBS="-lSM -lICE $LIBS" ;;
14847 esac
73b77ee5 14848 fi
98418dba 14849fi
73b77ee5 14850
98418dba 14851# If netdb.h doesn't declare h_errno, we must declare it by hand.
d6e01aa5
KL
14852{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
14853echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
14854if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
14855 echo $ECHO_N "(cached) $ECHO_C" >&6
14856else
14857 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14858/* confdefs.h. */
14859_ACEOF
14860cat confdefs.h >>conftest.$ac_ext
14861cat >>conftest.$ac_ext <<_ACEOF
14862/* end confdefs.h. */
98418dba 14863#include <netdb.h>
503d2be0
AS
14864int
14865main ()
14866{
98418dba 14867return h_errno;
503d2be0
AS
14868 ;
14869 return 0;
14870}
14871_ACEOF
14872rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14873if { (ac_try="$ac_link"
14874case "(($ac_try" in
14875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14876 *) ac_try_echo=$ac_try;;
14877esac
14878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14879 (eval "$ac_link") 2>conftest.er1
503d2be0 14880 ac_status=$?
edfaf76d
LK
14881 grep -v '^ *+' conftest.er1 >conftest.err
14882 rm -f conftest.er1
14883 cat conftest.err >&5
c0d27fcc 14884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14885 (exit $ac_status); } && {
14886 test -z "$ac_c_werror_flag" ||
14887 test ! -s conftest.err
14888 } && test -s conftest$ac_exeext &&
14889 $as_test_x conftest$ac_exeext; then
98418dba 14890 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 14891else
503d2be0 14892 echo "$as_me: failed program was:" >&5
19650fd6
AS
14893sed 's/^/| /' conftest.$ac_ext >&5
14894
d6e01aa5 14895 emacs_cv_netdb_declares_h_errno=no
73b77ee5 14896fi
d6e01aa5
KL
14897
14898rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14899 conftest$ac_exeext conftest.$ac_ext
98418dba 14900fi
d6e01aa5
KL
14901{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
14902echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 14903if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 14904
c0d27fcc 14905cat >>confdefs.h <<\_ACEOF
98418dba 14906#define HAVE_H_ERRNO 1
c0d27fcc 14907_ACEOF
73b77ee5 14908
98418dba
CW
14909fi
14910
14911# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14912# for constant arguments. Useless!
d6e01aa5
KL
14913{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
14914echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
14915if test "${ac_cv_working_alloca_h+set}" = set; then
14916 echo $ECHO_N "(cached) $ECHO_C" >&6
14917else
14918 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14919/* confdefs.h. */
14920_ACEOF
14921cat confdefs.h >>conftest.$ac_ext
14922cat >>conftest.$ac_ext <<_ACEOF
14923/* end confdefs.h. */
98418dba 14924#include <alloca.h>
503d2be0
AS
14925int
14926main ()
14927{
98418dba 14928char *p = (char *) alloca (2 * sizeof (int));
d6e01aa5 14929 if (p) return 0;
503d2be0
AS
14930 ;
14931 return 0;
14932}
14933_ACEOF
14934rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
14935if { (ac_try="$ac_link"
14936case "(($ac_try" in
14937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14938 *) ac_try_echo=$ac_try;;
14939esac
14940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14941 (eval "$ac_link") 2>conftest.er1
503d2be0 14942 ac_status=$?
edfaf76d
LK
14943 grep -v '^ *+' conftest.er1 >conftest.err
14944 rm -f conftest.er1
14945 cat conftest.err >&5
c0d27fcc 14946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
14947 (exit $ac_status); } && {
14948 test -z "$ac_c_werror_flag" ||
14949 test ! -s conftest.err
14950 } && test -s conftest$ac_exeext &&
14951 $as_test_x conftest$ac_exeext; then
98418dba 14952 ac_cv_working_alloca_h=yes
73b77ee5 14953else
503d2be0 14954 echo "$as_me: failed program was:" >&5
19650fd6
AS
14955sed 's/^/| /' conftest.$ac_ext >&5
14956
d6e01aa5 14957 ac_cv_working_alloca_h=no
73b77ee5 14958fi
d6e01aa5
KL
14959
14960rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14961 conftest$ac_exeext conftest.$ac_ext
98418dba 14962fi
d6e01aa5
KL
14963{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
14964echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 14965if test $ac_cv_working_alloca_h = yes; then
73b77ee5 14966
c0d27fcc 14967cat >>confdefs.h <<\_ACEOF
98418dba 14968#define HAVE_ALLOCA_H 1
c0d27fcc 14969_ACEOF
98418dba
CW
14970
14971fi
14972
d6e01aa5
KL
14973{ echo "$as_me:$LINENO: checking for alloca" >&5
14974echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
14975if test "${ac_cv_func_alloca_works+set}" = set; then
14976 echo $ECHO_N "(cached) $ECHO_C" >&6
14977else
503d2be0 14978 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14979/* confdefs.h. */
14980_ACEOF
14981cat confdefs.h >>conftest.$ac_ext
14982cat >>conftest.$ac_ext <<_ACEOF
14983/* end confdefs.h. */
98418dba
CW
14984#ifdef __GNUC__
14985# define alloca __builtin_alloca
14986#else
14987# ifdef _MSC_VER
14988# include <malloc.h>
14989# define alloca _alloca
14990# else
d6e01aa5 14991# ifdef HAVE_ALLOCA_H
98418dba
CW
14992# include <alloca.h>
14993# else
14994# ifdef _AIX
14995 #pragma alloca
14996# else
14997# ifndef alloca /* predefined by HP cc +Olibcalls */
14998char *alloca ();
14999# endif
15000# endif
15001# endif
15002# endif
15003#endif
15004
503d2be0
AS
15005int
15006main ()
15007{
98418dba 15008char *p = (char *) alloca (1);
d6e01aa5 15009 if (p) return 0;
503d2be0
AS
15010 ;
15011 return 0;
15012}
15013_ACEOF
15014rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15015if { (ac_try="$ac_link"
15016case "(($ac_try" in
15017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15018 *) ac_try_echo=$ac_try;;
15019esac
15020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15021 (eval "$ac_link") 2>conftest.er1
503d2be0 15022 ac_status=$?
edfaf76d
LK
15023 grep -v '^ *+' conftest.er1 >conftest.err
15024 rm -f conftest.er1
15025 cat conftest.err >&5
c0d27fcc 15026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15027 (exit $ac_status); } && {
15028 test -z "$ac_c_werror_flag" ||
15029 test ! -s conftest.err
15030 } && test -s conftest$ac_exeext &&
15031 $as_test_x conftest$ac_exeext; then
98418dba 15032 ac_cv_func_alloca_works=yes
ac95a621 15033else
503d2be0 15034 echo "$as_me: failed program was:" >&5
19650fd6
AS
15035sed 's/^/| /' conftest.$ac_ext >&5
15036
d6e01aa5 15037 ac_cv_func_alloca_works=no
ac95a621 15038fi
d6e01aa5
KL
15039
15040rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15041 conftest$ac_exeext conftest.$ac_ext
98418dba 15042fi
d6e01aa5
KL
15043{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
15044echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 15045
98418dba
CW
15046if test $ac_cv_func_alloca_works = yes; then
15047
c0d27fcc 15048cat >>confdefs.h <<\_ACEOF
98418dba 15049#define HAVE_ALLOCA 1
c0d27fcc 15050_ACEOF
98418dba
CW
15051
15052else
15053 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15054# that cause trouble. Some versions do not even contain alloca or
15055# contain a buggy version. If you still want to use their alloca,
15056# use ar to extract alloca.o from them instead of compiling alloca.c.
15057
d6e01aa5 15058ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 15059
c0d27fcc 15060cat >>confdefs.h <<\_ACEOF
98418dba 15061#define C_ALLOCA 1
c0d27fcc 15062_ACEOF
98418dba 15063
c0d27fcc 15064
d6e01aa5
KL
15065{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
15066echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
15067if test "${ac_cv_os_cray+set}" = set; then
15068 echo $ECHO_N "(cached) $ECHO_C" >&6
15069else
15070 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15071/* confdefs.h. */
15072_ACEOF
15073cat confdefs.h >>conftest.$ac_ext
15074cat >>conftest.$ac_ext <<_ACEOF
15075/* end confdefs.h. */
d6e01aa5 15076#if defined CRAY && ! defined CRAY2
98418dba
CW
15077webecray
15078#else
15079wenotbecray
15080#endif
15081
15082_ACEOF
15083if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 15084 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
15085 ac_cv_os_cray=yes
15086else
15087 ac_cv_os_cray=no
15088fi
15089rm -f conftest*
ac95a621 15090
98418dba 15091fi
d6e01aa5
KL
15092{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
15093echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
15094if test $ac_cv_os_cray = yes; then
15095 for ac_func in _getb67 GETB67 getb67; do
15096 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
15097{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15098echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15099if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15100 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15101else
503d2be0 15102 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15103/* confdefs.h. */
15104_ACEOF
15105cat confdefs.h >>conftest.$ac_ext
15106cat >>conftest.$ac_ext <<_ACEOF
15107/* end confdefs.h. */
edfaf76d
LK
15108/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15109 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15110#define $ac_func innocuous_$ac_func
15111
73b77ee5 15112/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15113 which can conflict with char $ac_func (); below.
15114 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15115 <limits.h> exists even on freestanding compilers. */
edfaf76d 15116
19650fd6
AS
15117#ifdef __STDC__
15118# include <limits.h>
15119#else
15120# include <assert.h>
15121#endif
edfaf76d
LK
15122
15123#undef $ac_func
15124
d6e01aa5
KL
15125/* Override any GCC internal prototype to avoid an error.
15126 Use char because int might match the return type of a GCC
15127 builtin and then its argument prototype would still apply. */
503d2be0
AS
15128#ifdef __cplusplus
15129extern "C"
15130#endif
503d2be0 15131char $ac_func ();
73b77ee5
GM
15132/* The GNU C library defines this for functions which it implements
15133 to always fail with ENOSYS. Some functions are actually named
15134 something starting with __ and the normal name is an alias. */
d6e01aa5 15135#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 15136choke me
73b77ee5
GM
15137#endif
15138
19650fd6
AS
15139int
15140main ()
15141{
d6e01aa5 15142return $ac_func ();
503d2be0
AS
15143 ;
15144 return 0;
15145}
15146_ACEOF
15147rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15148if { (ac_try="$ac_link"
15149case "(($ac_try" in
15150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15151 *) ac_try_echo=$ac_try;;
15152esac
15153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15154 (eval "$ac_link") 2>conftest.er1
503d2be0 15155 ac_status=$?
edfaf76d
LK
15156 grep -v '^ *+' conftest.er1 >conftest.err
15157 rm -f conftest.er1
15158 cat conftest.err >&5
c0d27fcc 15159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15160 (exit $ac_status); } && {
15161 test -z "$ac_c_werror_flag" ||
15162 test ! -s conftest.err
15163 } && test -s conftest$ac_exeext &&
15164 $as_test_x conftest$ac_exeext; then
503d2be0
AS
15165 eval "$as_ac_var=yes"
15166else
15167 echo "$as_me: failed program was:" >&5
19650fd6
AS
15168sed 's/^/| /' conftest.$ac_ext >&5
15169
d6e01aa5 15170 eval "$as_ac_var=no"
503d2be0 15171fi
d6e01aa5
KL
15172
15173rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15174 conftest$ac_exeext conftest.$ac_ext
503d2be0 15175fi
d6e01aa5
KL
15176ac_res=`eval echo '${'$as_ac_var'}'`
15177 { echo "$as_me:$LINENO: result: $ac_res" >&5
15178echo "${ECHO_T}$ac_res" >&6; }
503d2be0 15179if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 15180
c0d27fcc 15181cat >>confdefs.h <<_ACEOF
98418dba 15182#define CRAY_STACKSEG_END $ac_func
c0d27fcc 15183_ACEOF
98418dba
CW
15184
15185 break
73b77ee5 15186fi
73b77ee5 15187
98418dba 15188 done
73b77ee5
GM
15189fi
15190
d6e01aa5
KL
15191{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
15192echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 15193if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 15194 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15195else
15196 if test "$cross_compiling" = yes; then
15197 ac_cv_c_stack_direction=0
73b77ee5 15198else
503d2be0 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. */
d6e01aa5 15205$ac_includes_default
503d2be0 15206int
98418dba 15207find_stack_direction ()
503d2be0 15208{
98418dba
CW
15209 static char *addr = 0;
15210 auto char dummy;
15211 if (addr == 0)
15212 {
15213 addr = &dummy;
15214 return find_stack_direction ();
15215 }
73b77ee5 15216 else
98418dba
CW
15217 return (&dummy > addr) ? 1 : -1;
15218}
ba4481b5 15219
503d2be0
AS
15220int
15221main ()
15222{
d6e01aa5 15223 return find_stack_direction () < 0;
503d2be0
AS
15224}
15225_ACEOF
98418dba 15226rm -f conftest$ac_exeext
d6e01aa5
KL
15227if { (ac_try="$ac_link"
15228case "(($ac_try" in
15229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15230 *) ac_try_echo=$ac_try;;
15231esac
15232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15233 (eval "$ac_link") 2>&5
503d2be0 15234 ac_status=$?
c0d27fcc 15235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15236 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
15237 { (case "(($ac_try" in
15238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15239 *) ac_try_echo=$ac_try;;
15240esac
15241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15242 (eval "$ac_try") 2>&5
503d2be0 15243 ac_status=$?
c0d27fcc 15244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15245 (exit $ac_status); }; }; then
98418dba 15246 ac_cv_c_stack_direction=1
ba4481b5 15247else
98418dba
CW
15248 echo "$as_me: program exited with status $ac_status" >&5
15249echo "$as_me: failed program was:" >&5
19650fd6
AS
15250sed 's/^/| /' conftest.$ac_ext >&5
15251
c0d27fcc 15252( exit $ac_status )
98418dba 15253ac_cv_c_stack_direction=-1
ba4481b5 15254fi
d6e01aa5 15255rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 15256fi
d6e01aa5
KL
15257
15258
98418dba 15259fi
d6e01aa5
KL
15260{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
15261echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 15262
c0d27fcc 15263cat >>confdefs.h <<_ACEOF
98418dba 15264#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
15265_ACEOF
15266
ba4481b5 15267
ba4481b5
DL
15268fi
15269
c0d27fcc 15270
611adb3e
GM
15271if test x"$ac_cv_func_alloca_works" != xyes; then
15272 { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
15273echo "$as_me: error: a system implementation of alloca is required " >&2;}
15274 { (exit 1); exit 1; }; }
15275fi
15276
98418dba
CW
15277# fmod, logb, and frexp are found in -lm on most systems.
15278# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
15279
d6e01aa5
KL
15280{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
15281echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 15282if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 15283 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15284else
98418dba
CW
15285 ac_check_lib_save_LIBS=$LIBS
15286LIBS="-lm $LIBS"
15287cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15288/* confdefs.h. */
15289_ACEOF
15290cat confdefs.h >>conftest.$ac_ext
15291cat >>conftest.$ac_ext <<_ACEOF
15292/* end confdefs.h. */
ba4481b5 15293
d6e01aa5
KL
15294/* Override any GCC internal prototype to avoid an error.
15295 Use char because int might match the return type of a GCC
15296 builtin and then its argument prototype would still apply. */
98418dba
CW
15297#ifdef __cplusplus
15298extern "C"
15299#endif
98418dba 15300char sqrt ();
503d2be0
AS
15301int
15302main ()
15303{
d6e01aa5 15304return sqrt ();
503d2be0
AS
15305 ;
15306 return 0;
15307}
15308_ACEOF
15309rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15310if { (ac_try="$ac_link"
15311case "(($ac_try" in
15312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15313 *) ac_try_echo=$ac_try;;
15314esac
15315eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15316 (eval "$ac_link") 2>conftest.er1
503d2be0 15317 ac_status=$?
edfaf76d
LK
15318 grep -v '^ *+' conftest.er1 >conftest.err
15319 rm -f conftest.er1
15320 cat conftest.err >&5
c0d27fcc 15321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15322 (exit $ac_status); } && {
15323 test -z "$ac_c_werror_flag" ||
15324 test ! -s conftest.err
15325 } && test -s conftest$ac_exeext &&
15326 $as_test_x conftest$ac_exeext; then
98418dba 15327 ac_cv_lib_m_sqrt=yes
ba4481b5 15328else
503d2be0 15329 echo "$as_me: failed program was:" >&5
19650fd6
AS
15330sed 's/^/| /' conftest.$ac_ext >&5
15331
d6e01aa5 15332 ac_cv_lib_m_sqrt=no
ba4481b5 15333fi
d6e01aa5
KL
15334
15335rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15336 conftest$ac_exeext conftest.$ac_ext
98418dba 15337LIBS=$ac_check_lib_save_LIBS
ba4481b5 15338fi
d6e01aa5
KL
15339{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
15340echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 15341if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 15342 cat >>confdefs.h <<_ACEOF
98418dba 15343#define HAVE_LIBM 1
c0d27fcc 15344_ACEOF
98418dba
CW
15345
15346 LIBS="-lm $LIBS"
ba4481b5 15347
ba4481b5
DL
15348fi
15349
c0d27fcc 15350
55597d70
DL
15351# Check for mail-locking functions in a "mail" library. Probably this should
15352# have the same check as for liblockfile below.
98418dba 15353
d6e01aa5
KL
15354{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
15355echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 15356if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 15357 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15358else
98418dba
CW
15359 ac_check_lib_save_LIBS=$LIBS
15360LIBS="-lmail $LIBS"
15361cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15362/* confdefs.h. */
15363_ACEOF
15364cat confdefs.h >>conftest.$ac_ext
15365cat >>conftest.$ac_ext <<_ACEOF
15366/* end confdefs.h. */
98418dba 15367
d6e01aa5
KL
15368/* Override any GCC internal prototype to avoid an error.
15369 Use char because int might match the return type of a GCC
15370 builtin and then its argument prototype would still apply. */
98418dba
CW
15371#ifdef __cplusplus
15372extern "C"
15373#endif
98418dba 15374char maillock ();
503d2be0
AS
15375int
15376main ()
15377{
d6e01aa5 15378return maillock ();
503d2be0
AS
15379 ;
15380 return 0;
15381}
15382_ACEOF
15383rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15384if { (ac_try="$ac_link"
15385case "(($ac_try" in
15386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15387 *) ac_try_echo=$ac_try;;
15388esac
15389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15390 (eval "$ac_link") 2>conftest.er1
503d2be0 15391 ac_status=$?
edfaf76d
LK
15392 grep -v '^ *+' conftest.er1 >conftest.err
15393 rm -f conftest.er1
15394 cat conftest.err >&5
c0d27fcc 15395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15396 (exit $ac_status); } && {
15397 test -z "$ac_c_werror_flag" ||
15398 test ! -s conftest.err
15399 } && test -s conftest$ac_exeext &&
15400 $as_test_x conftest$ac_exeext; then
98418dba 15401 ac_cv_lib_mail_maillock=yes
ba4481b5 15402else
503d2be0 15403 echo "$as_me: failed program was:" >&5
19650fd6
AS
15404sed 's/^/| /' conftest.$ac_ext >&5
15405
d6e01aa5 15406 ac_cv_lib_mail_maillock=no
ba4481b5 15407fi
d6e01aa5
KL
15408
15409rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15410 conftest$ac_exeext conftest.$ac_ext
98418dba 15411LIBS=$ac_check_lib_save_LIBS
ba4481b5 15412fi
d6e01aa5
KL
15413{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15414echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 15415if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15416 cat >>confdefs.h <<_ACEOF
98418dba 15417#define HAVE_LIBMAIL 1
c0d27fcc 15418_ACEOF
ba4481b5 15419
98418dba 15420 LIBS="-lmail $LIBS"
ba4481b5 15421
98418dba 15422fi
ba4481b5 15423
c0d27fcc 15424
d6e01aa5
KL
15425{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15426echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15427if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 15428 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15429else
503d2be0 15430 ac_check_lib_save_LIBS=$LIBS
98418dba 15431LIBS="-llockfile $LIBS"
503d2be0 15432cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15433/* confdefs.h. */
15434_ACEOF
15435cat confdefs.h >>conftest.$ac_ext
15436cat >>conftest.$ac_ext <<_ACEOF
15437/* end confdefs.h. */
503d2be0 15438
d6e01aa5
KL
15439/* Override any GCC internal prototype to avoid an error.
15440 Use char because int might match the return type of a GCC
15441 builtin and then its argument prototype would still apply. */
503d2be0
AS
15442#ifdef __cplusplus
15443extern "C"
15444#endif
98418dba 15445char maillock ();
503d2be0
AS
15446int
15447main ()
15448{
d6e01aa5 15449return maillock ();
503d2be0
AS
15450 ;
15451 return 0;
15452}
15453_ACEOF
15454rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15455if { (ac_try="$ac_link"
15456case "(($ac_try" in
15457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15458 *) ac_try_echo=$ac_try;;
15459esac
15460eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15461 (eval "$ac_link") 2>conftest.er1
503d2be0 15462 ac_status=$?
edfaf76d
LK
15463 grep -v '^ *+' conftest.er1 >conftest.err
15464 rm -f conftest.er1
15465 cat conftest.err >&5
c0d27fcc 15466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15467 (exit $ac_status); } && {
15468 test -z "$ac_c_werror_flag" ||
15469 test ! -s conftest.err
15470 } && test -s conftest$ac_exeext &&
15471 $as_test_x conftest$ac_exeext; then
98418dba 15472 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
15473else
15474 echo "$as_me: failed program was:" >&5
19650fd6
AS
15475sed 's/^/| /' conftest.$ac_ext >&5
15476
d6e01aa5 15477 ac_cv_lib_lockfile_maillock=no
98418dba 15478fi
d6e01aa5
KL
15479
15480rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15481 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15482LIBS=$ac_check_lib_save_LIBS
15483fi
d6e01aa5
KL
15484{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
15485echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 15486if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 15487 cat >>confdefs.h <<_ACEOF
98418dba 15488#define HAVE_LIBLOCKFILE 1
c0d27fcc 15489_ACEOF
98418dba
CW
15490
15491 LIBS="-llockfile $LIBS"
15492
15493fi
15494
15495# If we have the shared liblockfile, assume we must use it for mail
15496# locking (e.g. Debian). If we couldn't link against liblockfile
15497# (no liblockfile.a installed), ensure that we don't need to.
15498if test "$ac_cv_lib_lockfile_maillock" = no; then
15499 # Extract the first word of "liblockfile.so", so it can be a program name with args.
15500set dummy liblockfile.so; ac_word=$2
d6e01aa5
KL
15501{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15502echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
15503if test "${ac_cv_prog_liblockfile+set}" = set; then
15504 echo $ECHO_N "(cached) $ECHO_C" >&6
15505else
15506 if test -n "$liblockfile"; then
15507 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
15508else
c0d27fcc 15509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
15510as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
15511for as_dir in $as_dummy
c0d27fcc
MR
15512do
15513 IFS=$as_save_IFS
15514 test -z "$as_dir" && as_dir=.
15515 for ac_exec_ext in '' $ac_executable_extensions; do
d6e01aa5 15516 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
15517 ac_cv_prog_liblockfile="yes"
15518 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15519 break 2
15520 fi
15521done
98418dba 15522done
d6e01aa5 15523IFS=$as_save_IFS
98418dba
CW
15524
15525 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 15526fi
503d2be0 15527fi
98418dba
CW
15528liblockfile=$ac_cv_prog_liblockfile
15529if test -n "$liblockfile"; then
d6e01aa5
KL
15530 { echo "$as_me:$LINENO: result: $liblockfile" >&5
15531echo "${ECHO_T}$liblockfile" >&6; }
98418dba 15532else
d6e01aa5
KL
15533 { echo "$as_me:$LINENO: result: no" >&5
15534echo "${ECHO_T}no" >&6; }
ba4481b5
DL
15535fi
15536
d6e01aa5 15537
98418dba 15538 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 15539 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
15540This probably means that movemail could lose mail.
15541There may be a \`development' package to install containing liblockfile." >&5
15542echo "$as_me: error: Shared liblockfile found but can't link against it.
15543This probably means that movemail could lose mail.
15544There may be a \`development' package to install containing liblockfile." >&2;}
15545 { (exit 1); exit 1; }; }
98418dba 15546 else :
55597d70 15547 fi
98418dba 15548fi
503d2be0 15549
98418dba
CW
15550for ac_func in touchlock
15551do
15552as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
15553{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15554echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15555if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15556 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 15557else
98418dba 15558 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15559/* confdefs.h. */
15560_ACEOF
15561cat confdefs.h >>conftest.$ac_ext
15562cat >>conftest.$ac_ext <<_ACEOF
15563/* end confdefs.h. */
edfaf76d
LK
15564/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15565 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15566#define $ac_func innocuous_$ac_func
15567
98418dba 15568/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15569 which can conflict with char $ac_func (); below.
15570 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15571 <limits.h> exists even on freestanding compilers. */
edfaf76d 15572
19650fd6
AS
15573#ifdef __STDC__
15574# include <limits.h>
15575#else
15576# include <assert.h>
15577#endif
edfaf76d
LK
15578
15579#undef $ac_func
15580
d6e01aa5
KL
15581/* Override any GCC internal prototype to avoid an error.
15582 Use char because int might match the return type of a GCC
15583 builtin and then its argument prototype would still apply. */
503d2be0
AS
15584#ifdef __cplusplus
15585extern "C"
15586#endif
98418dba 15587char $ac_func ();
98418dba
CW
15588/* The GNU C library defines this for functions which it implements
15589 to always fail with ENOSYS. Some functions are actually named
15590 something starting with __ and the normal name is an alias. */
d6e01aa5 15591#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15592choke me
cd958eb3
MB
15593#endif
15594
19650fd6
AS
15595int
15596main ()
15597{
d6e01aa5 15598return $ac_func ();
503d2be0
AS
15599 ;
15600 return 0;
15601}
15602_ACEOF
15603rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15604if { (ac_try="$ac_link"
15605case "(($ac_try" in
15606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15607 *) ac_try_echo=$ac_try;;
15608esac
15609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15610 (eval "$ac_link") 2>conftest.er1
503d2be0 15611 ac_status=$?
edfaf76d
LK
15612 grep -v '^ *+' conftest.er1 >conftest.err
15613 rm -f conftest.er1
15614 cat conftest.err >&5
c0d27fcc 15615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15616 (exit $ac_status); } && {
15617 test -z "$ac_c_werror_flag" ||
15618 test ! -s conftest.err
15619 } && test -s conftest$ac_exeext &&
15620 $as_test_x conftest$ac_exeext; then
98418dba 15621 eval "$as_ac_var=yes"
503d2be0
AS
15622else
15623 echo "$as_me: failed program was:" >&5
19650fd6
AS
15624sed 's/^/| /' conftest.$ac_ext >&5
15625
d6e01aa5 15626 eval "$as_ac_var=no"
503d2be0 15627fi
d6e01aa5
KL
15628
15629rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15630 conftest$ac_exeext conftest.$ac_ext
503d2be0 15631fi
d6e01aa5
KL
15632ac_res=`eval echo '${'$as_ac_var'}'`
15633 { echo "$as_me:$LINENO: result: $ac_res" >&5
15634echo "${ECHO_T}$ac_res" >&6; }
98418dba 15635if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15636 cat >>confdefs.h <<_ACEOF
98418dba 15637#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15638_ACEOF
457b792c 15639
457b792c 15640fi
98418dba 15641done
457b792c 15642
c0d27fcc 15643
98418dba
CW
15644for ac_header in maillock.h
15645do
15646as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
15647if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15648 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15649echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15650if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15651 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15652fi
d6e01aa5
KL
15653ac_res=`eval echo '${'$as_ac_Header'}'`
15654 { echo "$as_me:$LINENO: result: $ac_res" >&5
15655echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 15656else
c0d27fcc 15657 # Is the header compilable?
d6e01aa5
KL
15658{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15659echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15660cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15661/* confdefs.h. */
15662_ACEOF
15663cat confdefs.h >>conftest.$ac_ext
15664cat >>conftest.$ac_ext <<_ACEOF
15665/* end confdefs.h. */
c0d27fcc
MR
15666$ac_includes_default
15667#include <$ac_header>
15668_ACEOF
15669rm -f conftest.$ac_objext
d6e01aa5
KL
15670if { (ac_try="$ac_compile"
15671case "(($ac_try" in
15672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15673 *) ac_try_echo=$ac_try;;
15674esac
15675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15676 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15677 ac_status=$?
edfaf76d
LK
15678 grep -v '^ *+' conftest.er1 >conftest.err
15679 rm -f conftest.er1
15680 cat conftest.err >&5
c0d27fcc 15681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15682 (exit $ac_status); } && {
15683 test -z "$ac_c_werror_flag" ||
15684 test ! -s conftest.err
15685 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15686 ac_header_compiler=yes
15687else
15688 echo "$as_me: failed program was:" >&5
19650fd6
AS
15689sed 's/^/| /' conftest.$ac_ext >&5
15690
d6e01aa5 15691 ac_header_compiler=no
c0d27fcc 15692fi
d6e01aa5
KL
15693
15694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15695{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15696echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15697
15698# Is the header present?
d6e01aa5
KL
15699{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15700echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15701cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15702/* confdefs.h. */
15703_ACEOF
15704cat confdefs.h >>conftest.$ac_ext
15705cat >>conftest.$ac_ext <<_ACEOF
15706/* end confdefs.h. */
98418dba 15707#include <$ac_header>
503d2be0 15708_ACEOF
d6e01aa5
KL
15709if { (ac_try="$ac_cpp conftest.$ac_ext"
15710case "(($ac_try" in
15711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15712 *) ac_try_echo=$ac_try;;
15713esac
15714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15715 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15716 ac_status=$?
6bae0ccf 15717 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15718 rm -f conftest.er1
15719 cat conftest.err >&5
c0d27fcc 15720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15721 (exit $ac_status); } >/dev/null && {
15722 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15723 test ! -s conftest.err
15724 }; then
c0d27fcc 15725 ac_header_preproc=yes
98418dba
CW
15726else
15727 echo "$as_me: failed program was:" >&5
19650fd6
AS
15728sed 's/^/| /' conftest.$ac_ext >&5
15729
c0d27fcc 15730 ac_header_preproc=no
503d2be0 15731fi
d6e01aa5 15732
98418dba 15733rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
15734{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15735echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15736
15737# So? What about this header?
edfaf76d
LK
15738case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15739 yes:no: )
c0d27fcc
MR
15740 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15741echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15742 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15743echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15744 ac_header_preproc=yes
19650fd6 15745 ;;
edfaf76d 15746 no:yes:* )
c0d27fcc
MR
15747 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15748echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15749 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15750echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15751 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15752echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15753 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15754echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15755 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15756echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15757 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15758echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 15759
19650fd6 15760 ;;
c0d27fcc 15761esac
d6e01aa5
KL
15762{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15763echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15764if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15765 echo $ECHO_N "(cached) $ECHO_C" >&6
15766else
edfaf76d 15767 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 15768fi
d6e01aa5
KL
15769ac_res=`eval echo '${'$as_ac_Header'}'`
15770 { echo "$as_me:$LINENO: result: $ac_res" >&5
15771echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15772
15773fi
98418dba 15774if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15775 cat >>confdefs.h <<_ACEOF
98418dba 15776#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15777_ACEOF
48d4b120 15778
ba4481b5 15779fi
c0d27fcc 15780
98418dba
CW
15781done
15782
c0d27fcc
MR
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
22044edf
DL
15838
15839
c0d27fcc 15840
b0e44248
RB
15841
15842
973a76b1
DL
15843
15844
15845
cd958eb3 15846
25ca0bca 15847
ea92fc9f 15848
e2fcf543 15849
c0d27fcc
MR
15850
15851
98418dba 15852for ac_func in gethostname getdomainname dup2 \
e2fcf543 15853rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
bc3512d0 15854random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
98418dba 15855strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 15856utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
15857__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
15858sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 15859gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
4489ece2 15860memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
15861do
15862as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
15863{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15864echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15865if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15866 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15867else
503d2be0 15868 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15869/* confdefs.h. */
15870_ACEOF
15871cat confdefs.h >>conftest.$ac_ext
15872cat >>conftest.$ac_ext <<_ACEOF
15873/* end confdefs.h. */
edfaf76d
LK
15874/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15875 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15876#define $ac_func innocuous_$ac_func
15877
98418dba 15878/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15879 which can conflict with char $ac_func (); below.
15880 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15881 <limits.h> exists even on freestanding compilers. */
edfaf76d 15882
19650fd6
AS
15883#ifdef __STDC__
15884# include <limits.h>
15885#else
15886# include <assert.h>
15887#endif
edfaf76d
LK
15888
15889#undef $ac_func
15890
d6e01aa5
KL
15891/* Override any GCC internal prototype to avoid an error.
15892 Use char because int might match the return type of a GCC
15893 builtin and then its argument prototype would still apply. */
503d2be0
AS
15894#ifdef __cplusplus
15895extern "C"
15896#endif
98418dba 15897char $ac_func ();
98418dba
CW
15898/* The GNU C library defines this for functions which it implements
15899 to always fail with ENOSYS. Some functions are actually named
15900 something starting with __ and the normal name is an alias. */
d6e01aa5 15901#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15902choke me
98418dba
CW
15903#endif
15904
19650fd6
AS
15905int
15906main ()
15907{
d6e01aa5 15908return $ac_func ();
503d2be0
AS
15909 ;
15910 return 0;
15911}
15912_ACEOF
15913rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
15914if { (ac_try="$ac_link"
15915case "(($ac_try" in
15916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15917 *) ac_try_echo=$ac_try;;
15918esac
15919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15920 (eval "$ac_link") 2>conftest.er1
503d2be0 15921 ac_status=$?
edfaf76d
LK
15922 grep -v '^ *+' conftest.er1 >conftest.err
15923 rm -f conftest.er1
15924 cat conftest.err >&5
c0d27fcc 15925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15926 (exit $ac_status); } && {
15927 test -z "$ac_c_werror_flag" ||
15928 test ! -s conftest.err
15929 } && test -s conftest$ac_exeext &&
15930 $as_test_x conftest$ac_exeext; then
98418dba 15931 eval "$as_ac_var=yes"
503d2be0
AS
15932else
15933 echo "$as_me: failed program was:" >&5
19650fd6
AS
15934sed 's/^/| /' conftest.$ac_ext >&5
15935
d6e01aa5 15936 eval "$as_ac_var=no"
503d2be0 15937fi
d6e01aa5
KL
15938
15939rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15940 conftest$ac_exeext conftest.$ac_ext
ba4481b5 15941fi
d6e01aa5
KL
15942ac_res=`eval echo '${'$as_ac_var'}'`
15943 { echo "$as_me:$LINENO: result: $ac_res" >&5
15944echo "${ECHO_T}$ac_res" >&6; }
98418dba 15945if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15946 cat >>confdefs.h <<_ACEOF
98418dba 15947#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15948_ACEOF
ba4481b5 15949
ba4481b5 15950fi
98418dba 15951done
ba4481b5 15952
c0d27fcc
MR
15953
15954
98418dba
CW
15955for ac_header in sys/un.h
15956do
15957as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
15958if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15959 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15960echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15961if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 15962 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15963fi
d6e01aa5
KL
15964ac_res=`eval echo '${'$as_ac_Header'}'`
15965 { echo "$as_me:$LINENO: result: $ac_res" >&5
15966echo "${ECHO_T}$ac_res" >&6; }
98418dba 15967else
c0d27fcc 15968 # Is the header compilable?
d6e01aa5
KL
15969{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15970echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15971cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15972/* confdefs.h. */
15973_ACEOF
15974cat confdefs.h >>conftest.$ac_ext
15975cat >>conftest.$ac_ext <<_ACEOF
15976/* end confdefs.h. */
c0d27fcc
MR
15977$ac_includes_default
15978#include <$ac_header>
15979_ACEOF
15980rm -f conftest.$ac_objext
d6e01aa5
KL
15981if { (ac_try="$ac_compile"
15982case "(($ac_try" in
15983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15984 *) ac_try_echo=$ac_try;;
15985esac
15986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15987 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15988 ac_status=$?
edfaf76d
LK
15989 grep -v '^ *+' conftest.er1 >conftest.err
15990 rm -f conftest.er1
15991 cat conftest.err >&5
c0d27fcc 15992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
15993 (exit $ac_status); } && {
15994 test -z "$ac_c_werror_flag" ||
15995 test ! -s conftest.err
15996 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15997 ac_header_compiler=yes
15998else
15999 echo "$as_me: failed program was:" >&5
19650fd6
AS
16000sed 's/^/| /' conftest.$ac_ext >&5
16001
d6e01aa5 16002 ac_header_compiler=no
c0d27fcc 16003fi
d6e01aa5
KL
16004
16005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16006{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16007echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16008
16009# Is the header present?
d6e01aa5
KL
16010{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16011echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16012cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16013/* confdefs.h. */
16014_ACEOF
16015cat confdefs.h >>conftest.$ac_ext
16016cat >>conftest.$ac_ext <<_ACEOF
16017/* end confdefs.h. */
98418dba 16018#include <$ac_header>
503d2be0 16019_ACEOF
d6e01aa5
KL
16020if { (ac_try="$ac_cpp conftest.$ac_ext"
16021case "(($ac_try" in
16022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16023 *) ac_try_echo=$ac_try;;
16024esac
16025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16026 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16027 ac_status=$?
6bae0ccf 16028 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16029 rm -f conftest.er1
16030 cat conftest.err >&5
c0d27fcc 16031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16032 (exit $ac_status); } >/dev/null && {
16033 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16034 test ! -s conftest.err
16035 }; then
c0d27fcc 16036 ac_header_preproc=yes
ba4481b5 16037else
503d2be0 16038 echo "$as_me: failed program was:" >&5
19650fd6
AS
16039sed 's/^/| /' conftest.$ac_ext >&5
16040
c0d27fcc 16041 ac_header_preproc=no
ba4481b5 16042fi
d6e01aa5 16043
503d2be0 16044rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
16045{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16046echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16047
16048# So? What about this header?
edfaf76d
LK
16049case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16050 yes:no: )
c0d27fcc
MR
16051 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16052echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16053 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16054echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16055 ac_header_preproc=yes
19650fd6 16056 ;;
edfaf76d 16057 no:yes:* )
c0d27fcc
MR
16058 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16059echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16060 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16061echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16062 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16063echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16064 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16065echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16066 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16067echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16068 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16069echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 16070
19650fd6 16071 ;;
c0d27fcc 16072esac
d6e01aa5
KL
16073{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16074echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16075if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16076 echo $ECHO_N "(cached) $ECHO_C" >&6
16077else
edfaf76d 16078 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16079fi
d6e01aa5
KL
16080ac_res=`eval echo '${'$as_ac_Header'}'`
16081 { echo "$as_me:$LINENO: result: $ac_res" >&5
16082echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16083
16084fi
925c2f3f 16085if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16086 cat >>confdefs.h <<_ACEOF
925c2f3f 16087#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16088_ACEOF
503d2be0 16089
925c2f3f 16090fi
c0d27fcc 16091
925c2f3f
EZ
16092done
16093
c0d27fcc
MR
16094
16095
16096
edfaf76d 16097
d6e01aa5
KL
16098
16099for ac_header in $ac_header_list
925c2f3f
EZ
16100do
16101as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
16102if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16103 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16104echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16105if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 16106 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16107fi
d6e01aa5
KL
16108ac_res=`eval echo '${'$as_ac_Header'}'`
16109 { echo "$as_me:$LINENO: result: $ac_res" >&5
16110echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 16111else
c0d27fcc 16112 # Is the header compilable?
d6e01aa5
KL
16113{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16114echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16115cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16116/* confdefs.h. */
16117_ACEOF
16118cat confdefs.h >>conftest.$ac_ext
16119cat >>conftest.$ac_ext <<_ACEOF
16120/* end confdefs.h. */
c0d27fcc
MR
16121$ac_includes_default
16122#include <$ac_header>
16123_ACEOF
16124rm -f conftest.$ac_objext
d6e01aa5
KL
16125if { (ac_try="$ac_compile"
16126case "(($ac_try" in
16127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16128 *) ac_try_echo=$ac_try;;
16129esac
16130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16131 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16132 ac_status=$?
edfaf76d
LK
16133 grep -v '^ *+' conftest.er1 >conftest.err
16134 rm -f conftest.er1
16135 cat conftest.err >&5
c0d27fcc 16136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16137 (exit $ac_status); } && {
16138 test -z "$ac_c_werror_flag" ||
16139 test ! -s conftest.err
16140 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16141 ac_header_compiler=yes
16142else
16143 echo "$as_me: failed program was:" >&5
19650fd6
AS
16144sed 's/^/| /' conftest.$ac_ext >&5
16145
d6e01aa5 16146 ac_header_compiler=no
c0d27fcc 16147fi
d6e01aa5
KL
16148
16149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16150{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16151echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16152
16153# Is the header present?
d6e01aa5
KL
16154{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16155echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16156cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16157/* confdefs.h. */
16158_ACEOF
16159cat confdefs.h >>conftest.$ac_ext
16160cat >>conftest.$ac_ext <<_ACEOF
16161/* end confdefs.h. */
98418dba 16162#include <$ac_header>
503d2be0 16163_ACEOF
d6e01aa5
KL
16164if { (ac_try="$ac_cpp conftest.$ac_ext"
16165case "(($ac_try" in
16166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16167 *) ac_try_echo=$ac_try;;
16168esac
16169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16170 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16171 ac_status=$?
6bae0ccf 16172 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16173 rm -f conftest.er1
16174 cat conftest.err >&5
c0d27fcc 16175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16176 (exit $ac_status); } >/dev/null && {
16177 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16178 test ! -s conftest.err
16179 }; then
c0d27fcc 16180 ac_header_preproc=yes
98418dba
CW
16181else
16182 echo "$as_me: failed program was:" >&5
19650fd6
AS
16183sed 's/^/| /' conftest.$ac_ext >&5
16184
c0d27fcc 16185 ac_header_preproc=no
98418dba 16186fi
d6e01aa5 16187
98418dba 16188rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
16189{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16190echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16191
16192# So? What about this header?
edfaf76d
LK
16193case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16194 yes:no: )
c0d27fcc
MR
16195 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16196echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16197 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16198echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16199 ac_header_preproc=yes
19650fd6 16200 ;;
edfaf76d 16201 no:yes:* )
c0d27fcc
MR
16202 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16203echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16204 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16205echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16206 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16207echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16208 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16209echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16210 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16211echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16212 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16213echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 16214
19650fd6 16215 ;;
c0d27fcc 16216esac
d6e01aa5
KL
16217{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16218echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16219if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16220 echo $ECHO_N "(cached) $ECHO_C" >&6
16221else
edfaf76d 16222 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 16223fi
d6e01aa5
KL
16224ac_res=`eval echo '${'$as_ac_Header'}'`
16225 { echo "$as_me:$LINENO: result: $ac_res" >&5
16226echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16227
16228fi
98418dba 16229if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16230 cat >>confdefs.h <<_ACEOF
98418dba 16231#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16232_ACEOF
98418dba
CW
16233
16234fi
c0d27fcc 16235
98418dba
CW
16236done
16237
c0d27fcc 16238
d6e01aa5
KL
16239
16240
16241
16242
16243
16244
16245
16246for ac_func in $ac_func_list
98418dba
CW
16247do
16248as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
16249{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16250echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16251if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16252 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16253else
98418dba 16254 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16255/* confdefs.h. */
16256_ACEOF
16257cat confdefs.h >>conftest.$ac_ext
16258cat >>conftest.$ac_ext <<_ACEOF
16259/* end confdefs.h. */
edfaf76d
LK
16260/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16261 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16262#define $ac_func innocuous_$ac_func
16263
98418dba 16264/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16265 which can conflict with char $ac_func (); below.
16266 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16267 <limits.h> exists even on freestanding compilers. */
edfaf76d 16268
19650fd6
AS
16269#ifdef __STDC__
16270# include <limits.h>
16271#else
16272# include <assert.h>
16273#endif
edfaf76d
LK
16274
16275#undef $ac_func
16276
d6e01aa5
KL
16277/* Override any GCC internal prototype to avoid an error.
16278 Use char because int might match the return type of a GCC
16279 builtin and then its argument prototype would still apply. */
503d2be0
AS
16280#ifdef __cplusplus
16281extern "C"
16282#endif
98418dba 16283char $ac_func ();
98418dba
CW
16284/* The GNU C library defines this for functions which it implements
16285 to always fail with ENOSYS. Some functions are actually named
16286 something starting with __ and the normal name is an alias. */
d6e01aa5 16287#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16288choke me
98418dba
CW
16289#endif
16290
19650fd6
AS
16291int
16292main ()
16293{
d6e01aa5 16294return $ac_func ();
503d2be0
AS
16295 ;
16296 return 0;
16297}
16298_ACEOF
16299rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16300if { (ac_try="$ac_link"
16301case "(($ac_try" in
16302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16303 *) ac_try_echo=$ac_try;;
16304esac
16305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16306 (eval "$ac_link") 2>conftest.er1
503d2be0 16307 ac_status=$?
edfaf76d
LK
16308 grep -v '^ *+' conftest.er1 >conftest.err
16309 rm -f conftest.er1
16310 cat conftest.err >&5
c0d27fcc 16311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16312 (exit $ac_status); } && {
16313 test -z "$ac_c_werror_flag" ||
16314 test ! -s conftest.err
16315 } && test -s conftest$ac_exeext &&
16316 $as_test_x conftest$ac_exeext; then
98418dba 16317 eval "$as_ac_var=yes"
503d2be0
AS
16318else
16319 echo "$as_me: failed program was:" >&5
19650fd6
AS
16320sed 's/^/| /' conftest.$ac_ext >&5
16321
d6e01aa5 16322 eval "$as_ac_var=no"
503d2be0 16323fi
d6e01aa5
KL
16324
16325rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16326 conftest$ac_exeext conftest.$ac_ext
ffe36136 16327fi
d6e01aa5
KL
16328ac_res=`eval echo '${'$as_ac_var'}'`
16329 { echo "$as_me:$LINENO: result: $ac_res" >&5
16330echo "${ECHO_T}$ac_res" >&6; }
98418dba 16331if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16332 cat >>confdefs.h <<_ACEOF
98418dba 16333#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16334_ACEOF
ffe36136 16335
ba4481b5 16336fi
98418dba 16337done
ba4481b5 16338
d6e01aa5
KL
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355{ echo "$as_me:$LINENO: checking for working mktime" >&5
16356echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
16357if test "${ac_cv_func_working_mktime+set}" = set; then
16358 echo $ECHO_N "(cached) $ECHO_C" >&6
16359else
16360 if test "$cross_compiling" = yes; then
16361 ac_cv_func_working_mktime=no
16362else
16363 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16364/* confdefs.h. */
16365_ACEOF
16366cat confdefs.h >>conftest.$ac_ext
16367cat >>conftest.$ac_ext <<_ACEOF
16368/* end confdefs.h. */
98418dba 16369/* Test program from Paul Eggert and Tony Leneis. */
d6e01aa5 16370#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16371# include <sys/time.h>
16372# include <time.h>
16373#else
d6e01aa5 16374# ifdef HAVE_SYS_TIME_H
98418dba
CW
16375# include <sys/time.h>
16376# else
16377# include <time.h>
16378# endif
16379#endif
ba4481b5 16380
d6e01aa5 16381#include <stdlib.h>
edfaf76d 16382
d6e01aa5 16383#ifdef HAVE_UNISTD_H
98418dba
CW
16384# include <unistd.h>
16385#endif
ba4481b5 16386
d6e01aa5 16387#ifndef HAVE_ALARM
98418dba
CW
16388# define alarm(X) /* empty */
16389#endif
df645f7c 16390
98418dba
CW
16391/* Work around redefinition to rpl_putenv by other config tests. */
16392#undef putenv
df645f7c 16393
98418dba 16394static time_t time_t_max;
edfaf76d 16395static time_t time_t_min;
df645f7c 16396
98418dba 16397/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16398static char *tz_strings[] = {
16399 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16400 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16401};
16402#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16403
d6e01aa5 16404/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16405 Based on a problem report from Andreas Jaeger. */
d6e01aa5 16406static int
98418dba
CW
16407spring_forward_gap ()
16408{
16409 /* glibc (up to about 1998-10-07) failed this test. */
16410 struct tm tm;
16411
16412 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16413 instead of "TZ=America/Vancouver" in order to detect the bug even
16414 on systems that don't support the Olson extension, or don't have the
16415 full zoneinfo tables installed. */
16416 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16417
16418 tm.tm_year = 98;
16419 tm.tm_mon = 3;
16420 tm.tm_mday = 5;
16421 tm.tm_hour = 2;
16422 tm.tm_min = 0;
16423 tm.tm_sec = 0;
16424 tm.tm_isdst = -1;
d6e01aa5 16425 return mktime (&tm) != (time_t) -1;
98418dba
CW
16426}
16427
d6e01aa5 16428static int
edfaf76d 16429mktime_test1 (now)
98418dba
CW
16430 time_t now;
16431{
16432 struct tm *lt;
d6e01aa5 16433 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16434}
16435
d6e01aa5 16436static int
edfaf76d
LK
16437mktime_test (now)
16438 time_t now;
16439{
d6e01aa5
KL
16440 return (mktime_test1 (now)
16441 && mktime_test1 ((time_t) (time_t_max - now))
16442 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16443}
16444
d6e01aa5 16445static int
98418dba
CW
16446irix_6_4_bug ()
16447{
16448 /* Based on code from Ariel Faigon. */
16449 struct tm tm;
16450 tm.tm_year = 96;
16451 tm.tm_mon = 3;
16452 tm.tm_mday = 0;
16453 tm.tm_hour = 0;
16454 tm.tm_min = 0;
16455 tm.tm_sec = 0;
16456 tm.tm_isdst = -1;
16457 mktime (&tm);
d6e01aa5 16458 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16459}
16460
d6e01aa5 16461static int
98418dba
CW
16462bigtime_test (j)
16463 int j;
16464{
16465 struct tm tm;
16466 time_t now;
16467 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16468 now = mktime (&tm);
16469 if (now != (time_t) -1)
16470 {
16471 struct tm *lt = localtime (&now);
16472 if (! (lt
16473 && lt->tm_year == tm.tm_year
16474 && lt->tm_mon == tm.tm_mon
16475 && lt->tm_mday == tm.tm_mday
16476 && lt->tm_hour == tm.tm_hour
16477 && lt->tm_min == tm.tm_min
16478 && lt->tm_sec == tm.tm_sec
16479 && lt->tm_yday == tm.tm_yday
16480 && lt->tm_wday == tm.tm_wday
16481 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16482 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
d6e01aa5 16483 return 0;
98418dba 16484 }
d6e01aa5
KL
16485 return 1;
16486}
16487
16488static int
16489year_2050_test ()
16490{
16491 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16492 ignoring leap seconds. */
16493 unsigned long int answer = 2527315200UL;
16494
16495 struct tm tm;
16496 time_t t;
16497 tm.tm_year = 2050 - 1900;
16498 tm.tm_mon = 2 - 1;
16499 tm.tm_mday = 1;
16500 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16501 tm.tm_isdst = -1;
16502
16503 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16504 instead of "TZ=America/Vancouver" in order to detect the bug even
16505 on systems that don't support the Olson extension, or don't have the
16506 full zoneinfo tables installed. */
16507 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16508
16509 t = mktime (&tm);
16510
16511 /* Check that the result is either a failure, or close enough
16512 to the correct answer that we can assume the discrepancy is
16513 due to leap seconds. */
16514 return (t == (time_t) -1
16515 || (0 < t && answer - 120 <= t && t <= answer + 120));
98418dba
CW
16516}
16517
16518int
16519main ()
16520{
16521 time_t t, delta;
16522 int i, j;
16523
16524 /* This test makes some buggy mktime implementations loop.
16525 Give up after 60 seconds; a mktime slower than that
16526 isn't worth using anyway. */
16527 alarm (60);
16528
16529 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
16530 continue;
16531 time_t_max--;
edfaf76d
LK
16532 if ((time_t) -1 < 0)
16533 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
16534 continue;
98418dba
CW
16535 delta = time_t_max / 997; /* a suitable prime number */
16536 for (i = 0; i < N_STRINGS; i++)
16537 {
16538 if (tz_strings[i])
16539 putenv (tz_strings[i]);
503d2be0 16540
98418dba 16541 for (t = 0; t <= time_t_max - delta; t += delta)
d6e01aa5
KL
16542 if (! mktime_test (t))
16543 return 1;
16544 if (! (mktime_test ((time_t) 1)
16545 && mktime_test ((time_t) (60 * 60))
16546 && mktime_test ((time_t) (60 * 60 * 24))))
16547 return 1;
98418dba
CW
16548
16549 for (j = 1; 0 < j; j *= 2)
d6e01aa5
KL
16550 if (! bigtime_test (j))
16551 return 1;
16552 if (! bigtime_test (j - 1))
16553 return 1;
98418dba 16554 }
d6e01aa5 16555 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
16556}
16557_ACEOF
98418dba 16558rm -f conftest$ac_exeext
d6e01aa5
KL
16559if { (ac_try="$ac_link"
16560case "(($ac_try" in
16561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16562 *) ac_try_echo=$ac_try;;
16563esac
16564eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16565 (eval "$ac_link") 2>&5
503d2be0 16566 ac_status=$?
c0d27fcc 16567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 16568 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
16569 { (case "(($ac_try" in
16570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16571 *) ac_try_echo=$ac_try;;
16572esac
16573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16574 (eval "$ac_try") 2>&5
503d2be0 16575 ac_status=$?
c0d27fcc 16576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16577 (exit $ac_status); }; }; then
98418dba 16578 ac_cv_func_working_mktime=yes
503d2be0 16579else
98418dba
CW
16580 echo "$as_me: program exited with status $ac_status" >&5
16581echo "$as_me: failed program was:" >&5
19650fd6
AS
16582sed 's/^/| /' conftest.$ac_ext >&5
16583
c0d27fcc 16584( exit $ac_status )
98418dba 16585ac_cv_func_working_mktime=no
503d2be0 16586fi
d6e01aa5 16587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 16588fi
d6e01aa5
KL
16589
16590
ba4481b5 16591fi
d6e01aa5
KL
16592{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
16593echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 16594if test $ac_cv_func_working_mktime = no; then
d6e01aa5 16595 case " $LIBOBJS " in
edfaf76d 16596 *" mktime.$ac_objext "* ) ;;
d6e01aa5
KL
16597 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
16598 ;;
edfaf76d
LK
16599esac
16600
ba4481b5
DL
16601fi
16602
98418dba 16603if test "$ac_cv_func_working_mktime" = no; then
b936fae4 16604
c0d27fcc 16605cat >>confdefs.h <<\_ACEOF
98418dba 16606#define BROKEN_MKTIME 1
c0d27fcc 16607_ACEOF
ba4481b5 16608
ba4481b5 16609fi
503d2be0 16610
98418dba
CW
16611ac_have_func=no # yes means we've found a way to get the load average.
16612
6bae0ccf
DL
16613# Make sure getloadavg.c is where it belongs, at configure-time.
16614test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
16615 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
16616echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
16617 { (exit 1); exit 1; }; }
16618
98418dba
CW
16619ac_save_LIBS=$LIBS
16620
16621# Check for getloadavg, but be sure not to touch the cache variable.
d6e01aa5
KL
16622({ echo "$as_me:$LINENO: checking for getloadavg" >&5
16623echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 16624if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 16625 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16626else
503d2be0 16627 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16628/* confdefs.h. */
16629_ACEOF
16630cat confdefs.h >>conftest.$ac_ext
16631cat >>conftest.$ac_ext <<_ACEOF
16632/* end confdefs.h. */
edfaf76d
LK
16633/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
16634 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16635#define getloadavg innocuous_getloadavg
16636
98418dba 16637/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16638 which can conflict with char getloadavg (); below.
16639 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16640 <limits.h> exists even on freestanding compilers. */
edfaf76d 16641
19650fd6
AS
16642#ifdef __STDC__
16643# include <limits.h>
16644#else
16645# include <assert.h>
16646#endif
edfaf76d
LK
16647
16648#undef getloadavg
16649
d6e01aa5
KL
16650/* Override any GCC internal prototype to avoid an error.
16651 Use char because int might match the return type of a GCC
16652 builtin and then its argument prototype would still apply. */
503d2be0
AS
16653#ifdef __cplusplus
16654extern "C"
16655#endif
98418dba 16656char getloadavg ();
98418dba
CW
16657/* The GNU C library defines this for functions which it implements
16658 to always fail with ENOSYS. Some functions are actually named
16659 something starting with __ and the normal name is an alias. */
d6e01aa5 16660#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 16661choke me
cd958eb3
MB
16662#endif
16663
19650fd6
AS
16664int
16665main ()
16666{
d6e01aa5 16667return getloadavg ();
503d2be0
AS
16668 ;
16669 return 0;
16670}
16671_ACEOF
16672rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16673if { (ac_try="$ac_link"
16674case "(($ac_try" in
16675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16676 *) ac_try_echo=$ac_try;;
16677esac
16678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16679 (eval "$ac_link") 2>conftest.er1
503d2be0 16680 ac_status=$?
edfaf76d
LK
16681 grep -v '^ *+' conftest.er1 >conftest.err
16682 rm -f conftest.er1
16683 cat conftest.err >&5
c0d27fcc 16684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16685 (exit $ac_status); } && {
16686 test -z "$ac_c_werror_flag" ||
16687 test ! -s conftest.err
16688 } && test -s conftest$ac_exeext &&
16689 $as_test_x conftest$ac_exeext; then
98418dba 16690 ac_cv_func_getloadavg=yes
503d2be0
AS
16691else
16692 echo "$as_me: failed program was:" >&5
19650fd6
AS
16693sed 's/^/| /' conftest.$ac_ext >&5
16694
d6e01aa5 16695 ac_cv_func_getloadavg=no
503d2be0 16696fi
d6e01aa5
KL
16697
16698rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16699 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16700fi
d6e01aa5
KL
16701{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
16702echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
16703if test $ac_cv_func_getloadavg = yes; then
16704 exit 0
16705else
16706 exit 1
ba4481b5 16707fi
98418dba 16708) && ac_have_func=yes
ba4481b5 16709
98418dba 16710# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 16711
98418dba
CW
16712for ac_func in pstat_getdynamic
16713do
16714as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
16715{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16716echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16717if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16718 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16719else
503d2be0 16720 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16721/* confdefs.h. */
16722_ACEOF
16723cat confdefs.h >>conftest.$ac_ext
16724cat >>conftest.$ac_ext <<_ACEOF
16725/* end confdefs.h. */
edfaf76d
LK
16726/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16727 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16728#define $ac_func innocuous_$ac_func
16729
98418dba 16730/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16731 which can conflict with char $ac_func (); below.
16732 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16733 <limits.h> exists even on freestanding compilers. */
edfaf76d 16734
19650fd6
AS
16735#ifdef __STDC__
16736# include <limits.h>
16737#else
16738# include <assert.h>
16739#endif
edfaf76d
LK
16740
16741#undef $ac_func
16742
d6e01aa5
KL
16743/* Override any GCC internal prototype to avoid an error.
16744 Use char because int might match the return type of a GCC
16745 builtin and then its argument prototype would still apply. */
503d2be0
AS
16746#ifdef __cplusplus
16747extern "C"
16748#endif
98418dba 16749char $ac_func ();
98418dba
CW
16750/* The GNU C library defines this for functions which it implements
16751 to always fail with ENOSYS. Some functions are actually named
16752 something starting with __ and the normal name is an alias. */
d6e01aa5 16753#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16754choke me
98418dba
CW
16755#endif
16756
19650fd6
AS
16757int
16758main ()
16759{
d6e01aa5 16760return $ac_func ();
98418dba
CW
16761 ;
16762 return 0;
16763}
f21fadcc 16764_ACEOF
98418dba 16765rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16766if { (ac_try="$ac_link"
16767case "(($ac_try" in
16768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16769 *) ac_try_echo=$ac_try;;
16770esac
16771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16772 (eval "$ac_link") 2>conftest.er1
f21fadcc 16773 ac_status=$?
edfaf76d
LK
16774 grep -v '^ *+' conftest.er1 >conftest.err
16775 rm -f conftest.er1
16776 cat conftest.err >&5
c0d27fcc 16777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16778 (exit $ac_status); } && {
16779 test -z "$ac_c_werror_flag" ||
16780 test ! -s conftest.err
16781 } && test -s conftest$ac_exeext &&
16782 $as_test_x conftest$ac_exeext; then
98418dba 16783 eval "$as_ac_var=yes"
f21fadcc
JD
16784else
16785 echo "$as_me: failed program was:" >&5
19650fd6
AS
16786sed 's/^/| /' conftest.$ac_ext >&5
16787
d6e01aa5 16788 eval "$as_ac_var=no"
f21fadcc 16789fi
d6e01aa5
KL
16790
16791rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16792 conftest$ac_exeext conftest.$ac_ext
f21fadcc 16793fi
d6e01aa5
KL
16794ac_res=`eval echo '${'$as_ac_var'}'`
16795 { echo "$as_me:$LINENO: result: $ac_res" >&5
16796echo "${ECHO_T}$ac_res" >&6; }
98418dba 16797if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16798 cat >>confdefs.h <<_ACEOF
98418dba 16799#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16800_ACEOF
98418dba
CW
16801
16802fi
16803done
16804
c0d27fcc 16805
98418dba
CW
16806# Solaris has libkstat which does not require root.
16807
d6e01aa5
KL
16808{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
16809echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 16810if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
16811 echo $ECHO_N "(cached) $ECHO_C" >&6
16812else
16813 ac_check_lib_save_LIBS=$LIBS
98418dba 16814LIBS="-lkstat $LIBS"
f21fadcc 16815cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16816/* confdefs.h. */
16817_ACEOF
16818cat confdefs.h >>conftest.$ac_ext
16819cat >>conftest.$ac_ext <<_ACEOF
16820/* end confdefs.h. */
f21fadcc 16821
d6e01aa5
KL
16822/* Override any GCC internal prototype to avoid an error.
16823 Use char because int might match the return type of a GCC
16824 builtin and then its argument prototype would still apply. */
f21fadcc
JD
16825#ifdef __cplusplus
16826extern "C"
16827#endif
98418dba 16828char kstat_open ();
f21fadcc
JD
16829int
16830main ()
16831{
d6e01aa5 16832return kstat_open ();
f21fadcc
JD
16833 ;
16834 return 0;
16835}
16836_ACEOF
16837rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16838if { (ac_try="$ac_link"
16839case "(($ac_try" in
16840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16841 *) ac_try_echo=$ac_try;;
16842esac
16843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16844 (eval "$ac_link") 2>conftest.er1
f21fadcc 16845 ac_status=$?
edfaf76d
LK
16846 grep -v '^ *+' conftest.er1 >conftest.err
16847 rm -f conftest.er1
16848 cat conftest.err >&5
c0d27fcc 16849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16850 (exit $ac_status); } && {
16851 test -z "$ac_c_werror_flag" ||
16852 test ! -s conftest.err
16853 } && test -s conftest$ac_exeext &&
16854 $as_test_x conftest$ac_exeext; then
98418dba 16855 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
16856else
16857 echo "$as_me: failed program was:" >&5
19650fd6
AS
16858sed 's/^/| /' conftest.$ac_ext >&5
16859
d6e01aa5 16860 ac_cv_lib_kstat_kstat_open=no
f21fadcc 16861fi
d6e01aa5
KL
16862
16863rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16864 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
16865LIBS=$ac_check_lib_save_LIBS
16866fi
d6e01aa5
KL
16867{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
16868echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 16869if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 16870 cat >>confdefs.h <<_ACEOF
98418dba 16871#define HAVE_LIBKSTAT 1
c0d27fcc 16872_ACEOF
f21fadcc 16873
98418dba 16874 LIBS="-lkstat $LIBS"
f21fadcc 16875
f21fadcc
JD
16876fi
16877
98418dba
CW
16878test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
16879
16880# Some systems with -lutil have (and need) -lkvm as well, some do not.
16881# On Solaris, -lkvm requires nlist from -lelf, so check that first
16882# to get the right answer into the cache.
16883# For kstat on solaris, we need libelf to force the definition of SVR4 below.
16884if test $ac_have_func = no; then
d6e01aa5
KL
16885 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
16886echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 16887if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 16888 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16889else
98418dba
CW
16890 ac_check_lib_save_LIBS=$LIBS
16891LIBS="-lelf $LIBS"
16892cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16893/* confdefs.h. */
16894_ACEOF
16895cat confdefs.h >>conftest.$ac_ext
16896cat >>conftest.$ac_ext <<_ACEOF
16897/* end confdefs.h. */
98418dba 16898
d6e01aa5
KL
16899/* Override any GCC internal prototype to avoid an error.
16900 Use char because int might match the return type of a GCC
16901 builtin and then its argument prototype would still apply. */
98418dba
CW
16902#ifdef __cplusplus
16903extern "C"
16904#endif
98418dba 16905char elf_begin ();
503d2be0
AS
16906int
16907main ()
16908{
d6e01aa5 16909return elf_begin ();
503d2be0
AS
16910 ;
16911 return 0;
16912}
16913_ACEOF
16914rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16915if { (ac_try="$ac_link"
16916case "(($ac_try" in
16917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16918 *) ac_try_echo=$ac_try;;
16919esac
16920eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16921 (eval "$ac_link") 2>conftest.er1
503d2be0 16922 ac_status=$?
edfaf76d
LK
16923 grep -v '^ *+' conftest.er1 >conftest.err
16924 rm -f conftest.er1
16925 cat conftest.err >&5
c0d27fcc 16926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16927 (exit $ac_status); } && {
16928 test -z "$ac_c_werror_flag" ||
16929 test ! -s conftest.err
16930 } && test -s conftest$ac_exeext &&
16931 $as_test_x conftest$ac_exeext; then
98418dba 16932 ac_cv_lib_elf_elf_begin=yes
ba4481b5 16933else
503d2be0 16934 echo "$as_me: failed program was:" >&5
19650fd6
AS
16935sed 's/^/| /' conftest.$ac_ext >&5
16936
d6e01aa5 16937 ac_cv_lib_elf_elf_begin=no
ba4481b5 16938fi
d6e01aa5
KL
16939
16940rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16941 conftest$ac_exeext conftest.$ac_ext
98418dba 16942LIBS=$ac_check_lib_save_LIBS
ba4481b5 16943fi
d6e01aa5
KL
16944{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
16945echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
16946if test $ac_cv_lib_elf_elf_begin = yes; then
16947 LIBS="-lelf $LIBS"
ba4481b5
DL
16948fi
16949
98418dba
CW
16950fi
16951if test $ac_have_func = no; then
d6e01aa5
KL
16952 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
16953echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 16954if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 16955 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16956else
98418dba
CW
16957 ac_check_lib_save_LIBS=$LIBS
16958LIBS="-lkvm $LIBS"
16959cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16960/* confdefs.h. */
16961_ACEOF
16962cat confdefs.h >>conftest.$ac_ext
16963cat >>conftest.$ac_ext <<_ACEOF
16964/* end confdefs.h. */
98418dba 16965
d6e01aa5
KL
16966/* Override any GCC internal prototype to avoid an error.
16967 Use char because int might match the return type of a GCC
16968 builtin and then its argument prototype would still apply. */
98418dba
CW
16969#ifdef __cplusplus
16970extern "C"
16971#endif
98418dba 16972char kvm_open ();
503d2be0
AS
16973int
16974main ()
16975{
d6e01aa5 16976return kvm_open ();
503d2be0
AS
16977 ;
16978 return 0;
16979}
16980_ACEOF
16981rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
16982if { (ac_try="$ac_link"
16983case "(($ac_try" in
16984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16985 *) ac_try_echo=$ac_try;;
16986esac
16987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16988 (eval "$ac_link") 2>conftest.er1
503d2be0 16989 ac_status=$?
edfaf76d
LK
16990 grep -v '^ *+' conftest.er1 >conftest.err
16991 rm -f conftest.er1
16992 cat conftest.err >&5
c0d27fcc 16993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
16994 (exit $ac_status); } && {
16995 test -z "$ac_c_werror_flag" ||
16996 test ! -s conftest.err
16997 } && test -s conftest$ac_exeext &&
16998 $as_test_x conftest$ac_exeext; then
98418dba 16999 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
17000else
17001 echo "$as_me: failed program was:" >&5
19650fd6
AS
17002sed 's/^/| /' conftest.$ac_ext >&5
17003
d6e01aa5 17004 ac_cv_lib_kvm_kvm_open=no
503d2be0 17005fi
d6e01aa5
KL
17006
17007rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17008 conftest$ac_exeext conftest.$ac_ext
98418dba 17009LIBS=$ac_check_lib_save_LIBS
503d2be0 17010fi
d6e01aa5
KL
17011{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
17012echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
17013if test $ac_cv_lib_kvm_kvm_open = yes; then
17014 LIBS="-lkvm $LIBS"
ba4481b5
DL
17015fi
17016
98418dba 17017 # Check for the 4.4BSD definition of getloadavg.
d6e01aa5
KL
17018 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
17019echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 17020if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 17021 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17022else
98418dba
CW
17023 ac_check_lib_save_LIBS=$LIBS
17024LIBS="-lutil $LIBS"
17025cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17026/* confdefs.h. */
17027_ACEOF
17028cat confdefs.h >>conftest.$ac_ext
17029cat >>conftest.$ac_ext <<_ACEOF
17030/* end confdefs.h. */
98418dba 17031
d6e01aa5
KL
17032/* Override any GCC internal prototype to avoid an error.
17033 Use char because int might match the return type of a GCC
17034 builtin and then its argument prototype would still apply. */
98418dba
CW
17035#ifdef __cplusplus
17036extern "C"
17037#endif
98418dba 17038char getloadavg ();
503d2be0
AS
17039int
17040main ()
17041{
d6e01aa5 17042return getloadavg ();
503d2be0
AS
17043 ;
17044 return 0;
17045}
17046_ACEOF
17047rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17048if { (ac_try="$ac_link"
17049case "(($ac_try" in
17050 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17051 *) ac_try_echo=$ac_try;;
17052esac
17053eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17054 (eval "$ac_link") 2>conftest.er1
503d2be0 17055 ac_status=$?
edfaf76d
LK
17056 grep -v '^ *+' conftest.er1 >conftest.err
17057 rm -f conftest.er1
17058 cat conftest.err >&5
c0d27fcc 17059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17060 (exit $ac_status); } && {
17061 test -z "$ac_c_werror_flag" ||
17062 test ! -s conftest.err
17063 } && test -s conftest$ac_exeext &&
17064 $as_test_x conftest$ac_exeext; then
35996d22
AS
17065 ac_cv_lib_util_getloadavg=yes
17066else
503d2be0 17067 echo "$as_me: failed program was:" >&5
19650fd6
AS
17068sed 's/^/| /' conftest.$ac_ext >&5
17069
d6e01aa5 17070 ac_cv_lib_util_getloadavg=no
ba4481b5 17071fi
d6e01aa5
KL
17072
17073rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17074 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17075LIBS=$ac_check_lib_save_LIBS
17076fi
d6e01aa5
KL
17077{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
17078echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
17079if test $ac_cv_lib_util_getloadavg = yes; then
17080 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 17081fi
503d2be0 17082
98418dba 17083fi
ba4481b5 17084
98418dba
CW
17085if test $ac_have_func = no; then
17086 # There is a commonly available library for RS/6000 AIX.
17087 # Since it is not a standard part of AIX, it might be installed locally.
17088 ac_getloadavg_LIBS=$LIBS
17089 LIBS="-L/usr/local/lib $LIBS"
d6e01aa5
KL
17090 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
17091echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 17092if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 17093 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17094else
98418dba
CW
17095 ac_check_lib_save_LIBS=$LIBS
17096LIBS="-lgetloadavg $LIBS"
17097cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17098/* confdefs.h. */
17099_ACEOF
17100cat confdefs.h >>conftest.$ac_ext
17101cat >>conftest.$ac_ext <<_ACEOF
17102/* end confdefs.h. */
ba4481b5 17103
d6e01aa5
KL
17104/* Override any GCC internal prototype to avoid an error.
17105 Use char because int might match the return type of a GCC
17106 builtin and then its argument prototype would still apply. */
98418dba
CW
17107#ifdef __cplusplus
17108extern "C"
17109#endif
98418dba 17110char getloadavg ();
98418dba
CW
17111int
17112main ()
17113{
d6e01aa5 17114return getloadavg ();
98418dba
CW
17115 ;
17116 return 0;
17117}
503d2be0 17118_ACEOF
98418dba 17119rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17120if { (ac_try="$ac_link"
17121case "(($ac_try" in
17122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17123 *) ac_try_echo=$ac_try;;
17124esac
17125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17126 (eval "$ac_link") 2>conftest.er1
98418dba 17127 ac_status=$?
edfaf76d
LK
17128 grep -v '^ *+' conftest.er1 >conftest.err
17129 rm -f conftest.er1
17130 cat conftest.err >&5
c0d27fcc 17131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17132 (exit $ac_status); } && {
17133 test -z "$ac_c_werror_flag" ||
17134 test ! -s conftest.err
17135 } && test -s conftest$ac_exeext &&
17136 $as_test_x conftest$ac_exeext; then
98418dba 17137 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 17138else
98418dba 17139 echo "$as_me: failed program was:" >&5
19650fd6
AS
17140sed 's/^/| /' conftest.$ac_ext >&5
17141
d6e01aa5 17142 ac_cv_lib_getloadavg_getloadavg=no
98418dba 17143fi
d6e01aa5
KL
17144
17145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17146 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17147LIBS=$ac_check_lib_save_LIBS
17148fi
d6e01aa5
KL
17149{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
17150echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
17151if test $ac_cv_lib_getloadavg_getloadavg = yes; then
17152 LIBS="-lgetloadavg $LIBS"
17153else
17154 LIBS=$ac_getloadavg_LIBS
ba4481b5 17155fi
ba4481b5
DL
17156
17157fi
98418dba
CW
17158
17159# Make sure it is really in the library, if we think we found it,
17160# otherwise set up the replacement function.
17161
17162for ac_func in getloadavg
17163do
17164as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
17165{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17166echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17167if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17168 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17169else
503d2be0 17170 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17171/* confdefs.h. */
17172_ACEOF
17173cat confdefs.h >>conftest.$ac_ext
17174cat >>conftest.$ac_ext <<_ACEOF
17175/* end confdefs.h. */
edfaf76d
LK
17176/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17177 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17178#define $ac_func innocuous_$ac_func
17179
ba4481b5 17180/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17181 which can conflict with char $ac_func (); below.
17182 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17183 <limits.h> exists even on freestanding compilers. */
edfaf76d 17184
19650fd6
AS
17185#ifdef __STDC__
17186# include <limits.h>
17187#else
17188# include <assert.h>
17189#endif
edfaf76d
LK
17190
17191#undef $ac_func
17192
d6e01aa5
KL
17193/* Override any GCC internal prototype to avoid an error.
17194 Use char because int might match the return type of a GCC
17195 builtin and then its argument prototype would still apply. */
503d2be0
AS
17196#ifdef __cplusplus
17197extern "C"
17198#endif
503d2be0 17199char $ac_func ();
ba4481b5
DL
17200/* The GNU C library defines this for functions which it implements
17201 to always fail with ENOSYS. Some functions are actually named
17202 something starting with __ and the normal name is an alias. */
d6e01aa5 17203#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17204choke me
cd958eb3
MB
17205#endif
17206
19650fd6
AS
17207int
17208main ()
17209{
d6e01aa5 17210return $ac_func ();
503d2be0
AS
17211 ;
17212 return 0;
17213}
17214_ACEOF
17215rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17216if { (ac_try="$ac_link"
17217case "(($ac_try" in
17218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17219 *) ac_try_echo=$ac_try;;
17220esac
17221eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17222 (eval "$ac_link") 2>conftest.er1
503d2be0 17223 ac_status=$?
edfaf76d
LK
17224 grep -v '^ *+' conftest.er1 >conftest.err
17225 rm -f conftest.er1
17226 cat conftest.err >&5
c0d27fcc 17227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17228 (exit $ac_status); } && {
17229 test -z "$ac_c_werror_flag" ||
17230 test ! -s conftest.err
17231 } && test -s conftest$ac_exeext &&
17232 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17233 eval "$as_ac_var=yes"
17234else
17235 echo "$as_me: failed program was:" >&5
19650fd6
AS
17236sed 's/^/| /' conftest.$ac_ext >&5
17237
d6e01aa5 17238 eval "$as_ac_var=no"
503d2be0 17239fi
d6e01aa5
KL
17240
17241rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17242 conftest$ac_exeext conftest.$ac_ext
503d2be0 17243fi
d6e01aa5
KL
17244ac_res=`eval echo '${'$as_ac_var'}'`
17245 { echo "$as_me:$LINENO: result: $ac_res" >&5
17246echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17247if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17248 cat >>confdefs.h <<_ACEOF
98418dba 17249#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17250_ACEOF
503d2be0 17251
98418dba 17252else
d6e01aa5 17253 case " $LIBOBJS " in
edfaf76d 17254 *" getloadavg.$ac_objext "* ) ;;
d6e01aa5
KL
17255 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
17256 ;;
edfaf76d
LK
17257esac
17258
ba4481b5 17259
c0d27fcc 17260cat >>confdefs.h <<\_ACEOF
98418dba 17261#define C_GETLOADAVG 1
c0d27fcc 17262_ACEOF
ba4481b5 17263
98418dba
CW
17264# Figure out what our getloadavg.c needs.
17265ac_have_func=no
c0d27fcc 17266if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
d6e01aa5
KL
17267 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17268echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 17269if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 17270 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17271fi
d6e01aa5
KL
17272{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17273echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 17274else
c0d27fcc 17275 # Is the header compilable?
d6e01aa5
KL
17276{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
17277echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 17278cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17279/* confdefs.h. */
17280_ACEOF
17281cat confdefs.h >>conftest.$ac_ext
17282cat >>conftest.$ac_ext <<_ACEOF
17283/* end confdefs.h. */
c0d27fcc
MR
17284$ac_includes_default
17285#include <sys/dg_sys_info.h>
17286_ACEOF
17287rm -f conftest.$ac_objext
d6e01aa5
KL
17288if { (ac_try="$ac_compile"
17289case "(($ac_try" in
17290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17291 *) ac_try_echo=$ac_try;;
17292esac
17293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17294 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17295 ac_status=$?
edfaf76d
LK
17296 grep -v '^ *+' conftest.er1 >conftest.err
17297 rm -f conftest.er1
17298 cat conftest.err >&5
c0d27fcc 17299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17300 (exit $ac_status); } && {
17301 test -z "$ac_c_werror_flag" ||
17302 test ! -s conftest.err
17303 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17304 ac_header_compiler=yes
17305else
17306 echo "$as_me: failed program was:" >&5
19650fd6
AS
17307sed 's/^/| /' conftest.$ac_ext >&5
17308
d6e01aa5 17309 ac_header_compiler=no
c0d27fcc 17310fi
d6e01aa5
KL
17311
17312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17313{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17314echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17315
17316# Is the header present?
d6e01aa5
KL
17317{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
17318echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 17319cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17320/* confdefs.h. */
17321_ACEOF
17322cat confdefs.h >>conftest.$ac_ext
17323cat >>conftest.$ac_ext <<_ACEOF
17324/* end confdefs.h. */
98418dba
CW
17325#include <sys/dg_sys_info.h>
17326_ACEOF
d6e01aa5
KL
17327if { (ac_try="$ac_cpp conftest.$ac_ext"
17328case "(($ac_try" in
17329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17330 *) ac_try_echo=$ac_try;;
17331esac
17332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17333 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17334 ac_status=$?
6bae0ccf 17335 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17336 rm -f conftest.er1
17337 cat conftest.err >&5
c0d27fcc 17338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17339 (exit $ac_status); } >/dev/null && {
17340 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17341 test ! -s conftest.err
17342 }; then
c0d27fcc 17343 ac_header_preproc=yes
98418dba
CW
17344else
17345 echo "$as_me: failed program was:" >&5
19650fd6
AS
17346sed 's/^/| /' conftest.$ac_ext >&5
17347
c0d27fcc 17348 ac_header_preproc=no
ba4481b5 17349fi
d6e01aa5 17350
98418dba 17351rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
17352{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17353echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17354
17355# So? What about this header?
edfaf76d
LK
17356case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17357 yes:no: )
c0d27fcc
MR
17358 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17359echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17360 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17361echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
17362 ac_header_preproc=yes
19650fd6 17363 ;;
edfaf76d 17364 no:yes:* )
c0d27fcc
MR
17365 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17366echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17367 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17368echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17369 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17370echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17371 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17372echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17373 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 17374echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17375 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17376echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 17377
19650fd6 17378 ;;
c0d27fcc 17379esac
d6e01aa5
KL
17380{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17381echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
17382if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
17383 echo $ECHO_N "(cached) $ECHO_C" >&6
17384else
17385 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17386fi
d6e01aa5
KL
17387{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17388echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17389
17390fi
98418dba
CW
17391if test $ac_cv_header_sys_dg_sys_info_h = yes; then
17392 ac_have_func=yes
ba4481b5 17393
c0d27fcc 17394cat >>confdefs.h <<\_ACEOF
98418dba 17395#define DGUX 1
c0d27fcc
MR
17396_ACEOF
17397
503d2be0 17398
d6e01aa5
KL
17399{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17400echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17401if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 17402 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17403else
503d2be0 17404 ac_check_lib_save_LIBS=$LIBS
98418dba 17405LIBS="-ldgc $LIBS"
503d2be0 17406cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17407/* confdefs.h. */
17408_ACEOF
17409cat confdefs.h >>conftest.$ac_ext
17410cat >>conftest.$ac_ext <<_ACEOF
17411/* end confdefs.h. */
503d2be0 17412
d6e01aa5
KL
17413/* Override any GCC internal prototype to avoid an error.
17414 Use char because int might match the return type of a GCC
17415 builtin and then its argument prototype would still apply. */
503d2be0
AS
17416#ifdef __cplusplus
17417extern "C"
17418#endif
98418dba 17419char dg_sys_info ();
503d2be0
AS
17420int
17421main ()
17422{
d6e01aa5 17423return dg_sys_info ();
503d2be0
AS
17424 ;
17425 return 0;
17426}
17427_ACEOF
17428rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17429if { (ac_try="$ac_link"
17430case "(($ac_try" in
17431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17432 *) ac_try_echo=$ac_try;;
17433esac
17434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17435 (eval "$ac_link") 2>conftest.er1
503d2be0 17436 ac_status=$?
edfaf76d
LK
17437 grep -v '^ *+' conftest.er1 >conftest.err
17438 rm -f conftest.er1
17439 cat conftest.err >&5
c0d27fcc 17440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17441 (exit $ac_status); } && {
17442 test -z "$ac_c_werror_flag" ||
17443 test ! -s conftest.err
17444 } && test -s conftest$ac_exeext &&
17445 $as_test_x conftest$ac_exeext; then
98418dba 17446 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
17447else
17448 echo "$as_me: failed program was:" >&5
19650fd6
AS
17449sed 's/^/| /' conftest.$ac_ext >&5
17450
d6e01aa5 17451 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17452fi
d6e01aa5
KL
17453
17454rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17455 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17456LIBS=$ac_check_lib_save_LIBS
17457fi
d6e01aa5
KL
17458{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17459echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 17460if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17461 cat >>confdefs.h <<_ACEOF
98418dba 17462#define HAVE_LIBDGC 1
c0d27fcc 17463_ACEOF
ba4481b5 17464
98418dba 17465 LIBS="-ldgc $LIBS"
ba4481b5 17466
ba4481b5
DL
17467fi
17468
98418dba 17469fi
503d2be0 17470
c0d27fcc
MR
17471
17472
17473if test "${ac_cv_header_locale_h+set}" = set; then
d6e01aa5
KL
17474 { echo "$as_me:$LINENO: checking for locale.h" >&5
17475echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 17476if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 17477 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17478fi
d6e01aa5
KL
17479{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17480echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 17481else
c0d27fcc 17482 # Is the header compilable?
d6e01aa5
KL
17483{ echo "$as_me:$LINENO: checking locale.h usability" >&5
17484echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 17485cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17486/* confdefs.h. */
17487_ACEOF
17488cat confdefs.h >>conftest.$ac_ext
17489cat >>conftest.$ac_ext <<_ACEOF
17490/* end confdefs.h. */
c0d27fcc
MR
17491$ac_includes_default
17492#include <locale.h>
17493_ACEOF
17494rm -f conftest.$ac_objext
d6e01aa5
KL
17495if { (ac_try="$ac_compile"
17496case "(($ac_try" in
17497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17498 *) ac_try_echo=$ac_try;;
17499esac
17500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17501 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17502 ac_status=$?
edfaf76d
LK
17503 grep -v '^ *+' conftest.er1 >conftest.err
17504 rm -f conftest.er1
17505 cat conftest.err >&5
c0d27fcc 17506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17507 (exit $ac_status); } && {
17508 test -z "$ac_c_werror_flag" ||
17509 test ! -s conftest.err
17510 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17511 ac_header_compiler=yes
17512else
17513 echo "$as_me: failed program was:" >&5
19650fd6
AS
17514sed 's/^/| /' conftest.$ac_ext >&5
17515
d6e01aa5 17516 ac_header_compiler=no
c0d27fcc 17517fi
d6e01aa5
KL
17518
17519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17520{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17521echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17522
17523# Is the header present?
d6e01aa5
KL
17524{ echo "$as_me:$LINENO: checking locale.h presence" >&5
17525echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 17526cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17527/* confdefs.h. */
17528_ACEOF
17529cat confdefs.h >>conftest.$ac_ext
17530cat >>conftest.$ac_ext <<_ACEOF
17531/* end confdefs.h. */
98418dba 17532#include <locale.h>
503d2be0 17533_ACEOF
d6e01aa5
KL
17534if { (ac_try="$ac_cpp conftest.$ac_ext"
17535case "(($ac_try" in
17536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17537 *) ac_try_echo=$ac_try;;
17538esac
17539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17540 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17541 ac_status=$?
6bae0ccf 17542 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17543 rm -f conftest.er1
17544 cat conftest.err >&5
c0d27fcc 17545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17546 (exit $ac_status); } >/dev/null && {
17547 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17548 test ! -s conftest.err
17549 }; then
c0d27fcc 17550 ac_header_preproc=yes
98418dba
CW
17551else
17552 echo "$as_me: failed program was:" >&5
19650fd6
AS
17553sed 's/^/| /' conftest.$ac_ext >&5
17554
c0d27fcc 17555 ac_header_preproc=no
ba4481b5 17556fi
d6e01aa5 17557
98418dba 17558rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
17559{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17560echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17561
17562# So? What about this header?
edfaf76d
LK
17563case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17564 yes:no: )
c0d27fcc
MR
17565 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
17566echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17567 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
17568echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
17569 ac_header_preproc=yes
19650fd6 17570 ;;
edfaf76d 17571 no:yes:* )
c0d27fcc
MR
17572 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
17573echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17574 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
17575echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
17576 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
17577echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
17578 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
17579echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17580 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 17581echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17582 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
17583echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 17584
19650fd6 17585 ;;
c0d27fcc 17586esac
d6e01aa5
KL
17587{ echo "$as_me:$LINENO: checking for locale.h" >&5
17588echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
17589if test "${ac_cv_header_locale_h+set}" = set; then
17590 echo $ECHO_N "(cached) $ECHO_C" >&6
17591else
17592 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 17593fi
d6e01aa5
KL
17594{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17595echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 17596
c0d27fcc
MR
17597fi
17598
17599
17600
98418dba 17601for ac_func in setlocale
ba4481b5 17602do
503d2be0 17603as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
17604{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17605echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17606if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17607 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17608else
503d2be0 17609 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17610/* confdefs.h. */
17611_ACEOF
17612cat confdefs.h >>conftest.$ac_ext
17613cat >>conftest.$ac_ext <<_ACEOF
17614/* end confdefs.h. */
edfaf76d
LK
17615/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17616 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17617#define $ac_func innocuous_$ac_func
17618
ba4481b5 17619/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17620 which can conflict with char $ac_func (); below.
17621 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17622 <limits.h> exists even on freestanding compilers. */
edfaf76d 17623
19650fd6
AS
17624#ifdef __STDC__
17625# include <limits.h>
17626#else
17627# include <assert.h>
17628#endif
edfaf76d
LK
17629
17630#undef $ac_func
17631
d6e01aa5
KL
17632/* Override any GCC internal prototype to avoid an error.
17633 Use char because int might match the return type of a GCC
17634 builtin and then its argument prototype would still apply. */
503d2be0
AS
17635#ifdef __cplusplus
17636extern "C"
17637#endif
503d2be0 17638char $ac_func ();
ba4481b5
DL
17639/* The GNU C library defines this for functions which it implements
17640 to always fail with ENOSYS. Some functions are actually named
17641 something starting with __ and the normal name is an alias. */
d6e01aa5 17642#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17643choke me
ba4481b5
DL
17644#endif
17645
19650fd6
AS
17646int
17647main ()
17648{
d6e01aa5 17649return $ac_func ();
503d2be0
AS
17650 ;
17651 return 0;
17652}
17653_ACEOF
17654rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
17655if { (ac_try="$ac_link"
17656case "(($ac_try" in
17657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17658 *) ac_try_echo=$ac_try;;
17659esac
17660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17661 (eval "$ac_link") 2>conftest.er1
503d2be0 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_exeext &&
17671 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17672 eval "$as_ac_var=yes"
17673else
17674 echo "$as_me: failed program was:" >&5
19650fd6
AS
17675sed 's/^/| /' conftest.$ac_ext >&5
17676
d6e01aa5 17677 eval "$as_ac_var=no"
503d2be0 17678fi
d6e01aa5
KL
17679
17680rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17681 conftest$ac_exeext conftest.$ac_ext
503d2be0 17682fi
d6e01aa5
KL
17683ac_res=`eval echo '${'$as_ac_var'}'`
17684 { echo "$as_me:$LINENO: result: $ac_res" >&5
17685echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17686if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17687 cat >>confdefs.h <<_ACEOF
503d2be0 17688#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17689_ACEOF
ba4481b5 17690
ba4481b5
DL
17691fi
17692done
17693
c0d27fcc 17694
98418dba
CW
17695# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
17696# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
17697# Irix 4.0.5F has the header but not the library.
17698if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
17699 ac_have_func=yes
17700
c0d27fcc 17701cat >>confdefs.h <<\_ACEOF
98418dba 17702#define SVR4 1
c0d27fcc 17703_ACEOF
98418dba
CW
17704
17705fi
17706
17707if test $ac_have_func = no; then
c0d27fcc 17708 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
d6e01aa5
KL
17709 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17710echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 17711if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 17712 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17713fi
d6e01aa5
KL
17714{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17715echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 17716else
c0d27fcc 17717 # Is the header compilable?
d6e01aa5
KL
17718{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
17719echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17720cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17721/* confdefs.h. */
17722_ACEOF
17723cat confdefs.h >>conftest.$ac_ext
17724cat >>conftest.$ac_ext <<_ACEOF
17725/* end confdefs.h. */
c0d27fcc
MR
17726$ac_includes_default
17727#include <inq_stats/cpustats.h>
17728_ACEOF
17729rm -f conftest.$ac_objext
d6e01aa5
KL
17730if { (ac_try="$ac_compile"
17731case "(($ac_try" in
17732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17733 *) ac_try_echo=$ac_try;;
17734esac
17735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17736 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17737 ac_status=$?
edfaf76d
LK
17738 grep -v '^ *+' conftest.er1 >conftest.err
17739 rm -f conftest.er1
17740 cat conftest.err >&5
c0d27fcc 17741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17742 (exit $ac_status); } && {
17743 test -z "$ac_c_werror_flag" ||
17744 test ! -s conftest.err
17745 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17746 ac_header_compiler=yes
17747else
17748 echo "$as_me: failed program was:" >&5
19650fd6
AS
17749sed 's/^/| /' conftest.$ac_ext >&5
17750
d6e01aa5 17751 ac_header_compiler=no
c0d27fcc 17752fi
d6e01aa5
KL
17753
17754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17755{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17756echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17757
17758# Is the header present?
d6e01aa5
KL
17759{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
17760echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 17761cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17762/* confdefs.h. */
17763_ACEOF
17764cat confdefs.h >>conftest.$ac_ext
17765cat >>conftest.$ac_ext <<_ACEOF
17766/* end confdefs.h. */
98418dba 17767#include <inq_stats/cpustats.h>
503d2be0 17768_ACEOF
d6e01aa5
KL
17769if { (ac_try="$ac_cpp conftest.$ac_ext"
17770case "(($ac_try" in
17771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17772 *) ac_try_echo=$ac_try;;
17773esac
17774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17775 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17776 ac_status=$?
6bae0ccf 17777 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17778 rm -f conftest.er1
17779 cat conftest.err >&5
c0d27fcc 17780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17781 (exit $ac_status); } >/dev/null && {
17782 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17783 test ! -s conftest.err
17784 }; then
c0d27fcc 17785 ac_header_preproc=yes
503d2be0
AS
17786else
17787 echo "$as_me: failed program was:" >&5
19650fd6
AS
17788sed 's/^/| /' conftest.$ac_ext >&5
17789
c0d27fcc 17790 ac_header_preproc=no
ba4481b5 17791fi
d6e01aa5 17792
503d2be0 17793rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
17794{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17795echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17796
17797# So? What about this header?
edfaf76d
LK
17798case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17799 yes:no: )
c0d27fcc
MR
17800 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
17801echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17802 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
17803echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
17804 ac_header_preproc=yes
19650fd6 17805 ;;
edfaf76d 17806 no:yes:* )
c0d27fcc
MR
17807 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
17808echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17809 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
17810echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
17811 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
17812echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
17813 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
17814echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17815 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 17816echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17817 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
17818echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 17819
19650fd6 17820 ;;
c0d27fcc 17821esac
d6e01aa5
KL
17822{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17823echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
17824if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
17825 echo $ECHO_N "(cached) $ECHO_C" >&6
17826else
17827 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 17828fi
d6e01aa5
KL
17829{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17830echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
17831
17832fi
98418dba
CW
17833if test $ac_cv_header_inq_stats_cpustats_h = yes; then
17834 ac_have_func=yes
ba4481b5 17835
c0d27fcc 17836cat >>confdefs.h <<\_ACEOF
98418dba 17837#define UMAX 1
c0d27fcc 17838_ACEOF
98418dba 17839
c0d27fcc
MR
17840
17841cat >>confdefs.h <<\_ACEOF
98418dba 17842#define UMAX4_3 1
c0d27fcc 17843_ACEOF
98418dba
CW
17844
17845fi
17846
c0d27fcc 17847
98418dba
CW
17848fi
17849
17850if test $ac_have_func = no; then
c0d27fcc 17851 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
d6e01aa5
KL
17852 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
17853echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 17854if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 17855 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17856fi
d6e01aa5
KL
17857{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
17858echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 17859else
c0d27fcc 17860 # Is the header compilable?
d6e01aa5
KL
17861{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
17862echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17863cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17864/* confdefs.h. */
17865_ACEOF
17866cat confdefs.h >>conftest.$ac_ext
17867cat >>conftest.$ac_ext <<_ACEOF
17868/* end confdefs.h. */
c0d27fcc
MR
17869$ac_includes_default
17870#include <sys/cpustats.h>
17871_ACEOF
17872rm -f conftest.$ac_objext
d6e01aa5
KL
17873if { (ac_try="$ac_compile"
17874case "(($ac_try" in
17875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17876 *) ac_try_echo=$ac_try;;
17877esac
17878eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17879 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17880 ac_status=$?
edfaf76d
LK
17881 grep -v '^ *+' conftest.er1 >conftest.err
17882 rm -f conftest.er1
17883 cat conftest.err >&5
c0d27fcc 17884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17885 (exit $ac_status); } && {
17886 test -z "$ac_c_werror_flag" ||
17887 test ! -s conftest.err
17888 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17889 ac_header_compiler=yes
17890else
17891 echo "$as_me: failed program was:" >&5
19650fd6
AS
17892sed 's/^/| /' conftest.$ac_ext >&5
17893
d6e01aa5 17894 ac_header_compiler=no
c0d27fcc 17895fi
d6e01aa5
KL
17896
17897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17898{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17899echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17900
17901# Is the header present?
d6e01aa5
KL
17902{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
17903echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 17904cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17905/* confdefs.h. */
17906_ACEOF
17907cat confdefs.h >>conftest.$ac_ext
17908cat >>conftest.$ac_ext <<_ACEOF
17909/* end confdefs.h. */
98418dba
CW
17910#include <sys/cpustats.h>
17911_ACEOF
d6e01aa5
KL
17912if { (ac_try="$ac_cpp conftest.$ac_ext"
17913case "(($ac_try" in
17914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17915 *) ac_try_echo=$ac_try;;
17916esac
17917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17918 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17919 ac_status=$?
6bae0ccf 17920 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17921 rm -f conftest.er1
17922 cat conftest.err >&5
c0d27fcc 17923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
17924 (exit $ac_status); } >/dev/null && {
17925 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17926 test ! -s conftest.err
17927 }; then
c0d27fcc 17928 ac_header_preproc=yes
98418dba
CW
17929else
17930 echo "$as_me: failed program was:" >&5
19650fd6
AS
17931sed 's/^/| /' conftest.$ac_ext >&5
17932
c0d27fcc 17933 ac_header_preproc=no
98418dba 17934fi
d6e01aa5 17935
98418dba 17936rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
17937{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17938echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17939
17940# So? What about this header?
edfaf76d
LK
17941case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17942 yes:no: )
c0d27fcc
MR
17943 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
17944echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17945 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
17946echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
17947 ac_header_preproc=yes
19650fd6 17948 ;;
edfaf76d 17949 no:yes:* )
c0d27fcc
MR
17950 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
17951echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17952 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
17953echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
17954 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
17955echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
17956 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
17957echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17958 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 17959echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17960 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
17961echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 17962
19650fd6 17963 ;;
c0d27fcc 17964esac
d6e01aa5
KL
17965{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
17966echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
17967if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
17968 echo $ECHO_N "(cached) $ECHO_C" >&6
17969else
17970 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 17971fi
d6e01aa5
KL
17972{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
17973echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
17974
17975fi
98418dba 17976if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 17977 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 17978#define UMAX 1
c0d27fcc 17979_ACEOF
ba4481b5 17980
98418dba
CW
17981fi
17982
c0d27fcc 17983
98418dba
CW
17984fi
17985
17986if test $ac_have_func = no; then
17987
17988for ac_header in mach/mach.h
2c9dccc9
PJ
17989do
17990as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
17991if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17992 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17993echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17994if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 17995 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17996fi
d6e01aa5
KL
17997ac_res=`eval echo '${'$as_ac_Header'}'`
17998 { echo "$as_me:$LINENO: result: $ac_res" >&5
17999echo "${ECHO_T}$ac_res" >&6; }
98418dba 18000else
c0d27fcc 18001 # Is the header compilable?
d6e01aa5
KL
18002{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18003echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18004cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18005/* confdefs.h. */
18006_ACEOF
18007cat confdefs.h >>conftest.$ac_ext
18008cat >>conftest.$ac_ext <<_ACEOF
18009/* end confdefs.h. */
c0d27fcc
MR
18010$ac_includes_default
18011#include <$ac_header>
18012_ACEOF
18013rm -f conftest.$ac_objext
d6e01aa5
KL
18014if { (ac_try="$ac_compile"
18015case "(($ac_try" in
18016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18017 *) ac_try_echo=$ac_try;;
18018esac
18019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18020 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18021 ac_status=$?
edfaf76d
LK
18022 grep -v '^ *+' conftest.er1 >conftest.err
18023 rm -f conftest.er1
18024 cat conftest.err >&5
c0d27fcc 18025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18026 (exit $ac_status); } && {
18027 test -z "$ac_c_werror_flag" ||
18028 test ! -s conftest.err
18029 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18030 ac_header_compiler=yes
18031else
18032 echo "$as_me: failed program was:" >&5
19650fd6
AS
18033sed 's/^/| /' conftest.$ac_ext >&5
18034
d6e01aa5 18035 ac_header_compiler=no
c0d27fcc 18036fi
d6e01aa5
KL
18037
18038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18039{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18040echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18041
18042# Is the header present?
d6e01aa5
KL
18043{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18044echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18045cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18046/* confdefs.h. */
18047_ACEOF
18048cat confdefs.h >>conftest.$ac_ext
18049cat >>conftest.$ac_ext <<_ACEOF
18050/* end confdefs.h. */
2c9dccc9
PJ
18051#include <$ac_header>
18052_ACEOF
d6e01aa5
KL
18053if { (ac_try="$ac_cpp conftest.$ac_ext"
18054case "(($ac_try" in
18055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18056 *) ac_try_echo=$ac_try;;
18057esac
18058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18059 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 18060 ac_status=$?
6bae0ccf 18061 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
18062 rm -f conftest.er1
18063 cat conftest.err >&5
c0d27fcc 18064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18065 (exit $ac_status); } >/dev/null && {
18066 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18067 test ! -s conftest.err
18068 }; then
c0d27fcc
MR
18069 ac_header_preproc=yes
18070else
18071 echo "$as_me: failed program was:" >&5
19650fd6
AS
18072sed 's/^/| /' conftest.$ac_ext >&5
18073
c0d27fcc
MR
18074 ac_header_preproc=no
18075fi
d6e01aa5 18076
c0d27fcc 18077rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
18078{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18079echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18080
18081# So? What about this header?
edfaf76d
LK
18082case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18083 yes:no: )
c0d27fcc
MR
18084 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18085echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18086 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18087echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18088 ac_header_preproc=yes
19650fd6 18089 ;;
edfaf76d 18090 no:yes:* )
c0d27fcc
MR
18091 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18092echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18093 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18094echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18095 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18096echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18097 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18098echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18099 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18100echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18101 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18102echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 18103
19650fd6 18104 ;;
c0d27fcc 18105esac
d6e01aa5
KL
18106{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18107echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18108if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18109 echo $ECHO_N "(cached) $ECHO_C" >&6
18110else
edfaf76d 18111 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 18112fi
d6e01aa5
KL
18113ac_res=`eval echo '${'$as_ac_Header'}'`
18114 { echo "$as_me:$LINENO: result: $ac_res" >&5
18115echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18116
18117fi
18118if test `eval echo '${'$as_ac_Header'}'` = yes; then
18119 cat >>confdefs.h <<_ACEOF
18120#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18121_ACEOF
18122
18123fi
18124
18125done
18126
18127fi
18128
18129
18130for ac_header in nlist.h
18131do
18132as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
18133if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18134 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18135echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18136if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18137 echo $ECHO_N "(cached) $ECHO_C" >&6
18138fi
d6e01aa5
KL
18139ac_res=`eval echo '${'$as_ac_Header'}'`
18140 { echo "$as_me:$LINENO: result: $ac_res" >&5
18141echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18142else
18143 # Is the header compilable?
d6e01aa5
KL
18144{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18145echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18146cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18147/* confdefs.h. */
18148_ACEOF
18149cat confdefs.h >>conftest.$ac_ext
18150cat >>conftest.$ac_ext <<_ACEOF
18151/* end confdefs.h. */
c0d27fcc
MR
18152$ac_includes_default
18153#include <$ac_header>
18154_ACEOF
18155rm -f conftest.$ac_objext
d6e01aa5
KL
18156if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
c0d27fcc 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_objext; then
c0d27fcc 18172 ac_header_compiler=yes
2c9dccc9
PJ
18173else
18174 echo "$as_me: failed program was:" >&5
19650fd6
AS
18175sed 's/^/| /' conftest.$ac_ext >&5
18176
d6e01aa5 18177 ac_header_compiler=no
98418dba 18178fi
d6e01aa5
KL
18179
18180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18181{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18182echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 18183
c0d27fcc 18184# Is the header present?
d6e01aa5
KL
18185{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18186echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18187cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18188/* confdefs.h. */
18189_ACEOF
18190cat confdefs.h >>conftest.$ac_ext
18191cat >>conftest.$ac_ext <<_ACEOF
18192/* end confdefs.h. */
503d2be0
AS
18193#include <$ac_header>
18194_ACEOF
d6e01aa5
KL
18195if { (ac_try="$ac_cpp conftest.$ac_ext"
18196case "(($ac_try" in
18197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18198 *) ac_try_echo=$ac_try;;
18199esac
18200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18201 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18202 ac_status=$?
6bae0ccf 18203 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18204 rm -f conftest.er1
18205 cat conftest.err >&5
c0d27fcc 18206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18207 (exit $ac_status); } >/dev/null && {
18208 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18209 test ! -s conftest.err
18210 }; then
c0d27fcc 18211 ac_header_preproc=yes
503d2be0
AS
18212else
18213 echo "$as_me: failed program was:" >&5
19650fd6
AS
18214sed 's/^/| /' conftest.$ac_ext >&5
18215
c0d27fcc 18216 ac_header_preproc=no
b5de8dc0 18217fi
d6e01aa5 18218
503d2be0 18219rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
18220{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18221echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18222
18223# So? What about this header?
edfaf76d
LK
18224case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18225 yes:no: )
c0d27fcc
MR
18226 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18227echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18228 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18229echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18230 ac_header_preproc=yes
19650fd6 18231 ;;
edfaf76d 18232 no:yes:* )
c0d27fcc
MR
18233 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18234echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18235 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18236echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18237 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18238echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18239 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18240echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18241 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18242echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18243 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18244echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 18245
19650fd6 18246 ;;
c0d27fcc 18247esac
d6e01aa5
KL
18248{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18249echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18250if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18251 echo $ECHO_N "(cached) $ECHO_C" >&6
18252else
edfaf76d 18253 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 18254fi
d6e01aa5
KL
18255ac_res=`eval echo '${'$as_ac_Header'}'`
18256 { echo "$as_me:$LINENO: result: $ac_res" >&5
18257echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18258
18259fi
98418dba 18260if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18261 cat >>confdefs.h <<_ACEOF
98418dba 18262#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18263_ACEOF
d6e01aa5
KL
18264 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
18265echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 18266if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 18267 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 18268else
503d2be0 18269 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18270/* confdefs.h. */
18271_ACEOF
18272cat confdefs.h >>conftest.$ac_ext
18273cat >>conftest.$ac_ext <<_ACEOF
18274/* end confdefs.h. */
98418dba 18275#include <nlist.h>
b5de8dc0 18276
503d2be0
AS
18277int
18278main ()
18279{
98418dba
CW
18280static struct nlist ac_aggr;
18281if (ac_aggr.n_un.n_name)
18282return 0;
503d2be0
AS
18283 ;
18284 return 0;
18285}
18286_ACEOF
98418dba 18287rm -f conftest.$ac_objext
d6e01aa5
KL
18288if { (ac_try="$ac_compile"
18289case "(($ac_try" in
18290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18291 *) ac_try_echo=$ac_try;;
18292esac
18293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18294 (eval "$ac_compile") 2>conftest.er1
503d2be0 18295 ac_status=$?
edfaf76d
LK
18296 grep -v '^ *+' conftest.er1 >conftest.err
18297 rm -f conftest.er1
18298 cat conftest.err >&5
c0d27fcc 18299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18300 (exit $ac_status); } && {
18301 test -z "$ac_c_werror_flag" ||
18302 test ! -s conftest.err
18303 } && test -s conftest.$ac_objext; then
edfaf76d 18304 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
18305else
18306 echo "$as_me: failed program was:" >&5
19650fd6
AS
18307sed 's/^/| /' conftest.$ac_ext >&5
18308
d6e01aa5 18309 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18310/* confdefs.h. */
18311_ACEOF
18312cat confdefs.h >>conftest.$ac_ext
18313cat >>conftest.$ac_ext <<_ACEOF
18314/* end confdefs.h. */
6bae0ccf
DL
18315#include <nlist.h>
18316
18317int
18318main ()
18319{
18320static struct nlist ac_aggr;
18321if (sizeof ac_aggr.n_un.n_name)
18322return 0;
18323 ;
18324 return 0;
18325}
18326_ACEOF
18327rm -f conftest.$ac_objext
d6e01aa5
KL
18328if { (ac_try="$ac_compile"
18329case "(($ac_try" in
18330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18331 *) ac_try_echo=$ac_try;;
18332esac
18333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18334 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 18335 ac_status=$?
edfaf76d
LK
18336 grep -v '^ *+' conftest.er1 >conftest.err
18337 rm -f conftest.er1
18338 cat conftest.err >&5
6bae0ccf 18339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18340 (exit $ac_status); } && {
18341 test -z "$ac_c_werror_flag" ||
18342 test ! -s conftest.err
18343 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
18344 ac_cv_member_struct_nlist_n_un_n_name=yes
18345else
18346 echo "$as_me: failed program was:" >&5
19650fd6
AS
18347sed 's/^/| /' conftest.$ac_ext >&5
18348
d6e01aa5 18349 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 18350fi
d6e01aa5
KL
18351
18352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 18353fi
d6e01aa5
KL
18354
18355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 18356fi
d6e01aa5
KL
18357{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
18358echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 18359if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18360
c0d27fcc 18361cat >>confdefs.h <<_ACEOF
98418dba 18362#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18363_ACEOF
b5de8dc0 18364
c0d27fcc
MR
18365
18366cat >>confdefs.h <<\_ACEOF
98418dba 18367#define NLIST_NAME_UNION 1
c0d27fcc 18368_ACEOF
b5de8dc0 18369
98418dba 18370fi
b5de8dc0 18371
c0d27fcc 18372
98418dba 18373fi
c0d27fcc 18374
98418dba 18375done
b5de8dc0 18376
98418dba
CW
18377fi
18378done
b5de8dc0 18379
c0d27fcc 18380
98418dba 18381# Some definitions of getloadavg require that the program be installed setgid.
d6e01aa5
KL
18382{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18383echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
18384if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
18385 echo $ECHO_N "(cached) $ECHO_C" >&6
18386else
18387 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18388/* confdefs.h. */
18389_ACEOF
18390cat confdefs.h >>conftest.$ac_ext
18391cat >>conftest.$ac_ext <<_ACEOF
18392/* end confdefs.h. */
6bae0ccf 18393#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18394#ifdef LDAV_PRIVILEGED
18395Yowza Am I SETGID yet
18396#endif
18397_ACEOF
18398if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18399 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18400 ac_cv_func_getloadavg_setgid=yes
18401else
18402 ac_cv_func_getloadavg_setgid=no
18403fi
18404rm -f conftest*
b5de8dc0 18405
98418dba 18406fi
d6e01aa5
KL
18407{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18408echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18409if test $ac_cv_func_getloadavg_setgid = yes; then
18410 NEED_SETGID=true
b5de8dc0 18411
c0d27fcc 18412cat >>confdefs.h <<\_ACEOF
98418dba 18413#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18414_ACEOF
98418dba 18415
b5de8dc0 18416else
98418dba 18417 NEED_SETGID=false
b5de8dc0 18418fi
98418dba
CW
18419
18420if test $ac_cv_func_getloadavg_setgid = yes; then
d6e01aa5
KL
18421 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18422echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
18423if test "${ac_cv_group_kmem+set}" = set; then
18424 echo $ECHO_N "(cached) $ECHO_C" >&6
18425else
18426 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18427 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18428 # If we got an error (system does not support symlinks), try without -L.
18429 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
18430 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18431 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18432 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18433 / /s/.* //;p;'`
18434
b5de8dc0 18435fi
d6e01aa5
KL
18436{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18437echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18438 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18439fi
98418dba
CW
18440if test "x$ac_save_LIBS" = x; then
18441 GETLOADAVG_LIBS=$LIBS
18442else
18443 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18444fi
98418dba 18445LIBS=$ac_save_LIBS
b5de8dc0 18446
c0d27fcc
MR
18447
18448
d6e01aa5
KL
18449{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18450echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18451if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 18452 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18453else
b936fae4 18454 while :; do
503d2be0 18455 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18456/* confdefs.h. */
18457_ACEOF
18458cat confdefs.h >>conftest.$ac_ext
18459cat >>conftest.$ac_ext <<_ACEOF
18460/* end confdefs.h. */
bc3512d0 18461#include <stdio.h>
503d2be0
AS
18462int
18463main ()
18464{
bc3512d0 18465return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18466 ;
18467 return 0;
18468}
18469_ACEOF
d6e01aa5
KL
18470rm -f conftest.$ac_objext conftest$ac_exeext
18471if { (ac_try="$ac_link"
18472case "(($ac_try" in
18473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18474 *) ac_try_echo=$ac_try;;
18475esac
18476eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18477 (eval "$ac_link") 2>conftest.er1
b936fae4 18478 ac_status=$?
edfaf76d
LK
18479 grep -v '^ *+' conftest.er1 >conftest.err
18480 rm -f conftest.er1
18481 cat conftest.err >&5
c0d27fcc 18482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18483 (exit $ac_status); } && {
18484 test -z "$ac_c_werror_flag" ||
18485 test ! -s conftest.err
18486 } && test -s conftest$ac_exeext &&
18487 $as_test_x conftest$ac_exeext; then
18488 ac_cv_sys_largefile_source=no; break
b936fae4
AS
18489else
18490 echo "$as_me: failed program was:" >&5
19650fd6
AS
18491sed 's/^/| /' conftest.$ac_ext >&5
18492
d6e01aa5 18493
b936fae4 18494fi
d6e01aa5
KL
18495
18496rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18497 conftest$ac_exeext conftest.$ac_ext
b936fae4 18498 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18499/* confdefs.h. */
18500_ACEOF
18501cat confdefs.h >>conftest.$ac_ext
18502cat >>conftest.$ac_ext <<_ACEOF
18503/* end confdefs.h. */
b936fae4 18504#define _LARGEFILE_SOURCE 1
bc3512d0 18505#include <stdio.h>
b936fae4
AS
18506int
18507main ()
18508{
bc3512d0 18509return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18510 ;
18511 return 0;
18512}
18513_ACEOF
d6e01aa5
KL
18514rm -f conftest.$ac_objext conftest$ac_exeext
18515if { (ac_try="$ac_link"
18516case "(($ac_try" in
18517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18518 *) ac_try_echo=$ac_try;;
18519esac
18520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18521 (eval "$ac_link") 2>conftest.er1
b936fae4 18522 ac_status=$?
edfaf76d
LK
18523 grep -v '^ *+' conftest.er1 >conftest.err
18524 rm -f conftest.er1
18525 cat conftest.err >&5
c0d27fcc 18526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18527 (exit $ac_status); } && {
18528 test -z "$ac_c_werror_flag" ||
18529 test ! -s conftest.err
18530 } && test -s conftest$ac_exeext &&
18531 $as_test_x conftest$ac_exeext; then
b936fae4
AS
18532 ac_cv_sys_largefile_source=1; break
18533else
18534 echo "$as_me: failed program was:" >&5
19650fd6
AS
18535sed 's/^/| /' conftest.$ac_ext >&5
18536
d6e01aa5 18537
b936fae4 18538fi
d6e01aa5
KL
18539
18540rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18541 conftest$ac_exeext conftest.$ac_ext
18542 ac_cv_sys_largefile_source=unknown
b936fae4
AS
18543 break
18544done
18545fi
d6e01aa5
KL
18546{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18547echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
18548case $ac_cv_sys_largefile_source in #(
18549 no | unknown) ;;
18550 *)
c0d27fcc 18551cat >>confdefs.h <<_ACEOF
b936fae4 18552#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 18553_ACEOF
d6e01aa5
KL
18554;;
18555esac
b936fae4 18556rm -f conftest*
4c343001 18557
b936fae4
AS
18558# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18559# in glibc 2.1.3, but that breaks too many other things.
18560# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
d6e01aa5 18561if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 18562
c0d27fcc 18563cat >>confdefs.h <<\_ACEOF
b936fae4 18564#define HAVE_FSEEKO 1
c0d27fcc 18565_ACEOF
b936fae4 18566
4c343001
DL
18567fi
18568
c0d27fcc 18569
52dbaac8
PE
18570# Configure getopt.
18571# getopt.m4 serial 10
18572
18573# The getopt module assume you want GNU getopt, with getopt_long etc,
18574# rather than vanilla POSIX getopt. This means your your code should
18575# always include <getopt.h> for the getopt prototypes.
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587# Prerequisites of lib/getopt*.
18588
18589
18590
10a3b1a1 18591
52dbaac8
PE
18592 GETOPT_H=
18593
18594for ac_header in getopt.h
18595do
18596as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
18597if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18598 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18599echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18600if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18601 echo $ECHO_N "(cached) $ECHO_C" >&6
18602fi
d6e01aa5
KL
18603ac_res=`eval echo '${'$as_ac_Header'}'`
18604 { echo "$as_me:$LINENO: result: $ac_res" >&5
18605echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18606else
18607 # Is the header compilable?
d6e01aa5
KL
18608{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18609echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
18610cat >conftest.$ac_ext <<_ACEOF
18611/* confdefs.h. */
18612_ACEOF
18613cat confdefs.h >>conftest.$ac_ext
18614cat >>conftest.$ac_ext <<_ACEOF
18615/* end confdefs.h. */
18616$ac_includes_default
18617#include <$ac_header>
18618_ACEOF
18619rm -f conftest.$ac_objext
d6e01aa5
KL
18620if { (ac_try="$ac_compile"
18621case "(($ac_try" in
18622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18623 *) ac_try_echo=$ac_try;;
18624esac
18625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18626 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18627 ac_status=$?
18628 grep -v '^ *+' conftest.er1 >conftest.err
18629 rm -f conftest.er1
18630 cat conftest.err >&5
18631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18632 (exit $ac_status); } && {
18633 test -z "$ac_c_werror_flag" ||
18634 test ! -s conftest.err
18635 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18636 ac_header_compiler=yes
18637else
18638 echo "$as_me: failed program was:" >&5
18639sed 's/^/| /' conftest.$ac_ext >&5
18640
d6e01aa5 18641 ac_header_compiler=no
52dbaac8 18642fi
d6e01aa5
KL
18643
18644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18645{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18646echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
18647
18648# Is the header present?
d6e01aa5
KL
18649{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18650echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
18651cat >conftest.$ac_ext <<_ACEOF
18652/* confdefs.h. */
18653_ACEOF
18654cat confdefs.h >>conftest.$ac_ext
18655cat >>conftest.$ac_ext <<_ACEOF
18656/* end confdefs.h. */
18657#include <$ac_header>
18658_ACEOF
d6e01aa5
KL
18659if { (ac_try="$ac_cpp conftest.$ac_ext"
18660case "(($ac_try" in
18661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18662 *) ac_try_echo=$ac_try;;
18663esac
18664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18665 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
18666 ac_status=$?
18667 grep -v '^ *+' conftest.er1 >conftest.err
18668 rm -f conftest.er1
18669 cat conftest.err >&5
18670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18671 (exit $ac_status); } >/dev/null && {
18672 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18673 test ! -s conftest.err
18674 }; then
52dbaac8
PE
18675 ac_header_preproc=yes
18676else
18677 echo "$as_me: failed program was:" >&5
18678sed 's/^/| /' conftest.$ac_ext >&5
18679
18680 ac_header_preproc=no
18681fi
d6e01aa5 18682
52dbaac8 18683rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
18684{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18685echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
18686
18687# So? What about this header?
18688case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18689 yes:no: )
18690 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18691echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18692 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18693echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18694 ac_header_preproc=yes
18695 ;;
18696 no:yes:* )
18697 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18698echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18699 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18700echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18701 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18702echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18703 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18704echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
18705 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18706echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18707 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18708echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 18709
52dbaac8
PE
18710 ;;
18711esac
d6e01aa5
KL
18712{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18713echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18714if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18715 echo $ECHO_N "(cached) $ECHO_C" >&6
18716else
18717 eval "$as_ac_Header=\$ac_header_preproc"
18718fi
d6e01aa5
KL
18719ac_res=`eval echo '${'$as_ac_Header'}'`
18720 { echo "$as_me:$LINENO: result: $ac_res" >&5
18721echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18722
18723fi
18724if test `eval echo '${'$as_ac_Header'}'` = yes; then
18725 cat >>confdefs.h <<_ACEOF
18726#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18727_ACEOF
18728
18729else
18730 GETOPT_H=getopt.h
18731fi
18732
18733done
18734
18735 if test -z "$GETOPT_H"; then
18736
18737for ac_func in getopt_long_only
18738do
18739as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
18740{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18741echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18742if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18743 echo $ECHO_N "(cached) $ECHO_C" >&6
18744else
18745 cat >conftest.$ac_ext <<_ACEOF
18746/* confdefs.h. */
18747_ACEOF
18748cat confdefs.h >>conftest.$ac_ext
18749cat >>conftest.$ac_ext <<_ACEOF
18750/* end confdefs.h. */
18751/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18752 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18753#define $ac_func innocuous_$ac_func
18754
18755/* System header to define __stub macros and hopefully few prototypes,
18756 which can conflict with char $ac_func (); below.
18757 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18758 <limits.h> exists even on freestanding compilers. */
18759
18760#ifdef __STDC__
18761# include <limits.h>
18762#else
18763# include <assert.h>
18764#endif
18765
18766#undef $ac_func
18767
d6e01aa5
KL
18768/* Override any GCC internal prototype to avoid an error.
18769 Use char because int might match the return type of a GCC
18770 builtin and then its argument prototype would still apply. */
52dbaac8
PE
18771#ifdef __cplusplus
18772extern "C"
52dbaac8 18773#endif
52dbaac8
PE
18774char $ac_func ();
18775/* The GNU C library defines this for functions which it implements
18776 to always fail with ENOSYS. Some functions are actually named
18777 something starting with __ and the normal name is an alias. */
d6e01aa5 18778#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 18779choke me
52dbaac8
PE
18780#endif
18781
18782int
18783main ()
18784{
d6e01aa5 18785return $ac_func ();
52dbaac8
PE
18786 ;
18787 return 0;
18788}
18789_ACEOF
18790rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
18791if { (ac_try="$ac_link"
18792case "(($ac_try" in
18793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18794 *) ac_try_echo=$ac_try;;
18795esac
18796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18797 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
18798 ac_status=$?
18799 grep -v '^ *+' conftest.er1 >conftest.err
18800 rm -f conftest.er1
18801 cat conftest.err >&5
18802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18803 (exit $ac_status); } && {
18804 test -z "$ac_c_werror_flag" ||
18805 test ! -s conftest.err
18806 } && test -s conftest$ac_exeext &&
18807 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
18808 eval "$as_ac_var=yes"
18809else
18810 echo "$as_me: failed program was:" >&5
18811sed 's/^/| /' conftest.$ac_ext >&5
18812
d6e01aa5 18813 eval "$as_ac_var=no"
52dbaac8 18814fi
d6e01aa5
KL
18815
18816rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
18817 conftest$ac_exeext conftest.$ac_ext
18818fi
d6e01aa5
KL
18819ac_res=`eval echo '${'$as_ac_var'}'`
18820 { echo "$as_me:$LINENO: result: $ac_res" >&5
18821echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18822if test `eval echo '${'$as_ac_var'}'` = yes; then
18823 cat >>confdefs.h <<_ACEOF
18824#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18825_ACEOF
18826
18827else
18828 GETOPT_H=getopt.h
18829fi
18830done
18831
18832 fi
18833
18834 if test -z "$GETOPT_H"; then
d6e01aa5
KL
18835 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
18836echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
18837if test "${ac_cv_have_decl_optreset+set}" = set; then
18838 echo $ECHO_N "(cached) $ECHO_C" >&6
18839else
18840 cat >conftest.$ac_ext <<_ACEOF
18841/* confdefs.h. */
18842_ACEOF
18843cat confdefs.h >>conftest.$ac_ext
18844cat >>conftest.$ac_ext <<_ACEOF
18845/* end confdefs.h. */
18846#include <getopt.h>
18847
18848int
18849main ()
18850{
18851#ifndef optreset
d6e01aa5 18852 (void) optreset;
52dbaac8
PE
18853#endif
18854
18855 ;
18856 return 0;
18857}
18858_ACEOF
18859rm -f conftest.$ac_objext
d6e01aa5
KL
18860if { (ac_try="$ac_compile"
18861case "(($ac_try" in
18862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18863 *) ac_try_echo=$ac_try;;
18864esac
18865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18866 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18867 ac_status=$?
18868 grep -v '^ *+' conftest.er1 >conftest.err
18869 rm -f conftest.er1
18870 cat conftest.err >&5
18871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18872 (exit $ac_status); } && {
18873 test -z "$ac_c_werror_flag" ||
18874 test ! -s conftest.err
18875 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18876 ac_cv_have_decl_optreset=yes
18877else
18878 echo "$as_me: failed program was:" >&5
18879sed 's/^/| /' conftest.$ac_ext >&5
18880
d6e01aa5 18881 ac_cv_have_decl_optreset=no
52dbaac8 18882fi
d6e01aa5
KL
18883
18884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 18885fi
d6e01aa5
KL
18886{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
18887echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
18888if test $ac_cv_have_decl_optreset = yes; then
18889 GETOPT_H=getopt.h
18890fi
18891
18892 fi
18893
18894 if test -z "$GETOPT_H"; then
d6e01aa5
KL
18895 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
18896echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
18897if test "${gl_cv_func_gnu_getopt+set}" = set; then
18898 echo $ECHO_N "(cached) $ECHO_C" >&6
18899else
18900 if test "$cross_compiling" = yes; then
d6e01aa5
KL
18901 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
18902echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
18903if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
18904 echo $ECHO_N "(cached) $ECHO_C" >&6
18905else
18906 cat >conftest.$ac_ext <<_ACEOF
18907/* confdefs.h. */
18908_ACEOF
18909cat confdefs.h >>conftest.$ac_ext
18910cat >>conftest.$ac_ext <<_ACEOF
18911/* end confdefs.h. */
18912#include <getopt.h>
18913
18914int
18915main ()
18916{
18917#ifndef getopt_clip
d6e01aa5 18918 (void) getopt_clip;
52dbaac8
PE
18919#endif
18920
18921 ;
18922 return 0;
18923}
18924_ACEOF
18925rm -f conftest.$ac_objext
d6e01aa5
KL
18926if { (ac_try="$ac_compile"
18927case "(($ac_try" in
18928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18929 *) ac_try_echo=$ac_try;;
18930esac
18931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18932 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18933 ac_status=$?
18934 grep -v '^ *+' conftest.er1 >conftest.err
18935 rm -f conftest.er1
18936 cat conftest.err >&5
18937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
18938 (exit $ac_status); } && {
18939 test -z "$ac_c_werror_flag" ||
18940 test ! -s conftest.err
18941 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18942 ac_cv_have_decl_getopt_clip=yes
18943else
18944 echo "$as_me: failed program was:" >&5
18945sed 's/^/| /' conftest.$ac_ext >&5
18946
d6e01aa5 18947 ac_cv_have_decl_getopt_clip=no
52dbaac8 18948fi
d6e01aa5
KL
18949
18950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 18951fi
d6e01aa5
KL
18952{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
18953echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
18954if test $ac_cv_have_decl_getopt_clip = yes; then
18955 gl_cv_func_gnu_getopt=no
18956else
18957 gl_cv_func_gnu_getopt=yes
18958fi
18959
18960else
18961 cat >conftest.$ac_ext <<_ACEOF
18962/* confdefs.h. */
18963_ACEOF
18964cat confdefs.h >>conftest.$ac_ext
18965cat >>conftest.$ac_ext <<_ACEOF
18966/* end confdefs.h. */
18967#include <getopt.h>
18968int
18969main ()
18970{
18971
18972 char *myargv[3];
18973 myargv[0] = "conftest";
18974 myargv[1] = "-+";
18975 myargv[2] = 0;
18976 return getopt (2, myargv, "+a") != '?';
18977
18978 ;
18979 return 0;
18980}
18981_ACEOF
18982rm -f conftest$ac_exeext
d6e01aa5
KL
18983if { (ac_try="$ac_link"
18984case "(($ac_try" in
18985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18986 *) ac_try_echo=$ac_try;;
18987esac
18988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18989 (eval "$ac_link") 2>&5
52dbaac8
PE
18990 ac_status=$?
18991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18992 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
18993 { (case "(($ac_try" in
18994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18995 *) ac_try_echo=$ac_try;;
18996esac
18997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18998 (eval "$ac_try") 2>&5
52dbaac8
PE
18999 ac_status=$?
19000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19001 (exit $ac_status); }; }; then
19002 gl_cv_func_gnu_getopt=yes
19003else
19004 echo "$as_me: program exited with status $ac_status" >&5
19005echo "$as_me: failed program was:" >&5
19006sed 's/^/| /' conftest.$ac_ext >&5
19007
19008( exit $ac_status )
19009gl_cv_func_gnu_getopt=no
19010fi
d6e01aa5 19011rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 19012fi
d6e01aa5
KL
19013
19014
52dbaac8 19015fi
d6e01aa5
KL
19016{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
19017echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
19018 if test "$gl_cv_func_gnu_getopt" = "no"; then
19019 GETOPT_H=getopt.h
19020 fi
19021 fi
19022
19023
19024
19025 if test -n "$GETOPT_H"; then
19026
19027
19028 GETOPT_H=getopt.h
19029
19030cat >>confdefs.h <<\_ACEOF
19031#define __GETOPT_PREFIX rpl_
19032_ACEOF
19033
19034
19035
19036 :
19037 GETOPTOBJS='getopt.o getopt1.o'
19038
19039fi
19040
19041
19042
19043
d6e01aa5
KL
19044{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
19045echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
19046if test "${ac_cv_func_getpgrp_void+set}" = set; then
19047 echo $ECHO_N "(cached) $ECHO_C" >&6
19048else
19049 # Use it with a single arg.
19050cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19051/* confdefs.h. */
19052_ACEOF
19053cat confdefs.h >>conftest.$ac_ext
19054cat >>conftest.$ac_ext <<_ACEOF
19055/* end confdefs.h. */
cd958eb3
MB
19056$ac_includes_default
19057int
19058main ()
19059{
19060getpgrp (0);
19061 ;
19062 return 0;
19063}
19064_ACEOF
19065rm -f conftest.$ac_objext
d6e01aa5
KL
19066if { (ac_try="$ac_compile"
19067case "(($ac_try" in
19068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19069 *) ac_try_echo=$ac_try;;
19070esac
19071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19072 (eval "$ac_compile") 2>conftest.er1
cd958eb3 19073 ac_status=$?
edfaf76d
LK
19074 grep -v '^ *+' conftest.er1 >conftest.err
19075 rm -f conftest.er1
19076 cat conftest.err >&5
cd958eb3 19077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19078 (exit $ac_status); } && {
19079 test -z "$ac_c_werror_flag" ||
19080 test ! -s conftest.err
19081 } && test -s conftest.$ac_objext; then
cd958eb3
MB
19082 ac_cv_func_getpgrp_void=no
19083else
19084 echo "$as_me: failed program was:" >&5
19650fd6
AS
19085sed 's/^/| /' conftest.$ac_ext >&5
19086
d6e01aa5 19087 ac_cv_func_getpgrp_void=yes
cd958eb3 19088fi
d6e01aa5
KL
19089
19090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
19091
19092fi
d6e01aa5
KL
19093{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
19094echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
19095if test $ac_cv_func_getpgrp_void = yes; then
19096
19097cat >>confdefs.h <<\_ACEOF
19098#define GETPGRP_VOID 1
19099_ACEOF
19100
19101fi
19102
19103
973a76b1
DL
19104
19105for ac_func in strftime
19106do
19107as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
19108{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19109echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19110if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
19111 echo $ECHO_N "(cached) $ECHO_C" >&6
19112else
19113 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19114/* confdefs.h. */
19115_ACEOF
19116cat confdefs.h >>conftest.$ac_ext
19117cat >>conftest.$ac_ext <<_ACEOF
19118/* end confdefs.h. */
edfaf76d
LK
19119/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19120 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19121#define $ac_func innocuous_$ac_func
19122
973a76b1 19123/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19124 which can conflict with char $ac_func (); below.
19125 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19126 <limits.h> exists even on freestanding compilers. */
edfaf76d 19127
19650fd6
AS
19128#ifdef __STDC__
19129# include <limits.h>
19130#else
19131# include <assert.h>
19132#endif
edfaf76d
LK
19133
19134#undef $ac_func
19135
d6e01aa5
KL
19136/* Override any GCC internal prototype to avoid an error.
19137 Use char because int might match the return type of a GCC
19138 builtin and then its argument prototype would still apply. */
973a76b1
DL
19139#ifdef __cplusplus
19140extern "C"
973a76b1 19141#endif
973a76b1
DL
19142char $ac_func ();
19143/* The GNU C library defines this for functions which it implements
19144 to always fail with ENOSYS. Some functions are actually named
19145 something starting with __ and the normal name is an alias. */
d6e01aa5 19146#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 19147choke me
973a76b1
DL
19148#endif
19149
19650fd6
AS
19150int
19151main ()
19152{
d6e01aa5 19153return $ac_func ();
973a76b1
DL
19154 ;
19155 return 0;
19156}
19157_ACEOF
19158rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19159if { (ac_try="$ac_link"
19160case "(($ac_try" in
19161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19162 *) ac_try_echo=$ac_try;;
19163esac
19164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19165 (eval "$ac_link") 2>conftest.er1
973a76b1 19166 ac_status=$?
edfaf76d
LK
19167 grep -v '^ *+' conftest.er1 >conftest.err
19168 rm -f conftest.er1
19169 cat conftest.err >&5
973a76b1 19170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19171 (exit $ac_status); } && {
19172 test -z "$ac_c_werror_flag" ||
19173 test ! -s conftest.err
19174 } && test -s conftest$ac_exeext &&
19175 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19176 eval "$as_ac_var=yes"
19177else
19178 echo "$as_me: failed program was:" >&5
19650fd6
AS
19179sed 's/^/| /' conftest.$ac_ext >&5
19180
d6e01aa5 19181 eval "$as_ac_var=no"
973a76b1 19182fi
d6e01aa5
KL
19183
19184rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19185 conftest$ac_exeext conftest.$ac_ext
973a76b1 19186fi
d6e01aa5
KL
19187ac_res=`eval echo '${'$as_ac_var'}'`
19188 { echo "$as_me:$LINENO: result: $ac_res" >&5
19189echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
19190if test `eval echo '${'$as_ac_var'}'` = yes; then
19191 cat >>confdefs.h <<_ACEOF
19192#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19193_ACEOF
19194
19195else
19196 # strftime is in -lintl on SCO UNIX.
d6e01aa5
KL
19197{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
19198echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
19199if test "${ac_cv_lib_intl_strftime+set}" = set; then
19200 echo $ECHO_N "(cached) $ECHO_C" >&6
19201else
19202 ac_check_lib_save_LIBS=$LIBS
19203LIBS="-lintl $LIBS"
19204cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19205/* confdefs.h. */
19206_ACEOF
19207cat confdefs.h >>conftest.$ac_ext
19208cat >>conftest.$ac_ext <<_ACEOF
19209/* end confdefs.h. */
973a76b1 19210
d6e01aa5
KL
19211/* Override any GCC internal prototype to avoid an error.
19212 Use char because int might match the return type of a GCC
19213 builtin and then its argument prototype would still apply. */
973a76b1
DL
19214#ifdef __cplusplus
19215extern "C"
19216#endif
973a76b1
DL
19217char strftime ();
19218int
19219main ()
19220{
d6e01aa5 19221return strftime ();
973a76b1
DL
19222 ;
19223 return 0;
19224}
19225_ACEOF
19226rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19227if { (ac_try="$ac_link"
19228case "(($ac_try" in
19229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19230 *) ac_try_echo=$ac_try;;
19231esac
19232eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19233 (eval "$ac_link") 2>conftest.er1
973a76b1 19234 ac_status=$?
edfaf76d
LK
19235 grep -v '^ *+' conftest.er1 >conftest.err
19236 rm -f conftest.er1
19237 cat conftest.err >&5
973a76b1 19238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19239 (exit $ac_status); } && {
19240 test -z "$ac_c_werror_flag" ||
19241 test ! -s conftest.err
19242 } && test -s conftest$ac_exeext &&
19243 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19244 ac_cv_lib_intl_strftime=yes
19245else
19246 echo "$as_me: failed program was:" >&5
19650fd6
AS
19247sed 's/^/| /' conftest.$ac_ext >&5
19248
d6e01aa5 19249 ac_cv_lib_intl_strftime=no
973a76b1 19250fi
d6e01aa5
KL
19251
19252rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19253 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19254LIBS=$ac_check_lib_save_LIBS
19255fi
d6e01aa5
KL
19256{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
19257echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
19258if test $ac_cv_lib_intl_strftime = yes; then
19259 cat >>confdefs.h <<\_ACEOF
19260#define HAVE_STRFTIME 1
19261_ACEOF
19262
19263LIBS="-lintl $LIBS"
19264fi
19265
19266fi
19267done
19268
19269
b936fae4
AS
19270# UNIX98 PTYs.
19271
19272for ac_func in grantpt
503d2be0
AS
19273do
19274as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
19275{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19276echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19277if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19278 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19279else
503d2be0 19280 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19281/* confdefs.h. */
19282_ACEOF
19283cat confdefs.h >>conftest.$ac_ext
19284cat >>conftest.$ac_ext <<_ACEOF
19285/* end confdefs.h. */
edfaf76d
LK
19286/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19287 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19288#define $ac_func innocuous_$ac_func
19289
503d2be0 19290/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19291 which can conflict with char $ac_func (); below.
19292 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19293 <limits.h> exists even on freestanding compilers. */
edfaf76d 19294
19650fd6
AS
19295#ifdef __STDC__
19296# include <limits.h>
19297#else
19298# include <assert.h>
19299#endif
edfaf76d
LK
19300
19301#undef $ac_func
19302
d6e01aa5
KL
19303/* Override any GCC internal prototype to avoid an error.
19304 Use char because int might match the return type of a GCC
19305 builtin and then its argument prototype would still apply. */
503d2be0
AS
19306#ifdef __cplusplus
19307extern "C"
19308#endif
503d2be0 19309char $ac_func ();
503d2be0
AS
19310/* The GNU C library defines this for functions which it implements
19311 to always fail with ENOSYS. Some functions are actually named
19312 something starting with __ and the normal name is an alias. */
d6e01aa5 19313#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 19314choke me
503d2be0 19315#endif
4c343001 19316
19650fd6
AS
19317int
19318main ()
19319{
d6e01aa5 19320return $ac_func ();
503d2be0
AS
19321 ;
19322 return 0;
19323}
19324_ACEOF
19325rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19326if { (ac_try="$ac_link"
19327case "(($ac_try" in
19328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19329 *) ac_try_echo=$ac_try;;
19330esac
19331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19332 (eval "$ac_link") 2>conftest.er1
503d2be0 19333 ac_status=$?
edfaf76d
LK
19334 grep -v '^ *+' conftest.er1 >conftest.err
19335 rm -f conftest.er1
19336 cat conftest.err >&5
c0d27fcc 19337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19338 (exit $ac_status); } && {
19339 test -z "$ac_c_werror_flag" ||
19340 test ! -s conftest.err
19341 } && test -s conftest$ac_exeext &&
19342 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19343 eval "$as_ac_var=yes"
19344else
19345 echo "$as_me: failed program was:" >&5
19650fd6
AS
19346sed 's/^/| /' conftest.$ac_ext >&5
19347
d6e01aa5 19348 eval "$as_ac_var=no"
503d2be0 19349fi
d6e01aa5
KL
19350
19351rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19352 conftest$ac_exeext conftest.$ac_ext
503d2be0 19353fi
d6e01aa5
KL
19354ac_res=`eval echo '${'$as_ac_var'}'`
19355 { echo "$as_me:$LINENO: result: $ac_res" >&5
19356echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19357if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19358 cat >>confdefs.h <<_ACEOF
503d2be0 19359#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19360_ACEOF
4c343001
DL
19361
19362fi
503d2be0
AS
19363done
19364
c0d27fcc 19365
b936fae4 19366# PTY-related GNU extensions.
4c343001 19367
b936fae4
AS
19368for ac_func in getpt
19369do
19370as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
19371{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19372echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19373if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19374 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19375else
b936fae4 19376 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19377/* confdefs.h. */
19378_ACEOF
19379cat confdefs.h >>conftest.$ac_ext
19380cat >>conftest.$ac_ext <<_ACEOF
19381/* end confdefs.h. */
edfaf76d
LK
19382/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19383 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19384#define $ac_func innocuous_$ac_func
19385
087121cc 19386/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19387 which can conflict with char $ac_func (); below.
19388 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19389 <limits.h> exists even on freestanding compilers. */
edfaf76d 19390
19650fd6
AS
19391#ifdef __STDC__
19392# include <limits.h>
19393#else
19394# include <assert.h>
19395#endif
edfaf76d
LK
19396
19397#undef $ac_func
19398
d6e01aa5
KL
19399/* Override any GCC internal prototype to avoid an error.
19400 Use char because int might match the return type of a GCC
19401 builtin and then its argument prototype would still apply. */
503d2be0
AS
19402#ifdef __cplusplus
19403extern "C"
19404#endif
503d2be0 19405char $ac_func ();
087121cc
GM
19406/* The GNU C library defines this for functions which it implements
19407 to always fail with ENOSYS. Some functions are actually named
19408 something starting with __ and the normal name is an alias. */
d6e01aa5 19409#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19410choke me
087121cc
GM
19411#endif
19412
19650fd6
AS
19413int
19414main ()
19415{
d6e01aa5 19416return $ac_func ();
503d2be0
AS
19417 ;
19418 return 0;
19419}
19420_ACEOF
19421rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19422if { (ac_try="$ac_link"
19423case "(($ac_try" in
19424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19425 *) ac_try_echo=$ac_try;;
19426esac
19427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19428 (eval "$ac_link") 2>conftest.er1
503d2be0 19429 ac_status=$?
edfaf76d
LK
19430 grep -v '^ *+' conftest.er1 >conftest.err
19431 rm -f conftest.er1
19432 cat conftest.err >&5
c0d27fcc 19433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19434 (exit $ac_status); } && {
19435 test -z "$ac_c_werror_flag" ||
19436 test ! -s conftest.err
19437 } && test -s conftest$ac_exeext &&
19438 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19439 eval "$as_ac_var=yes"
19440else
19441 echo "$as_me: failed program was:" >&5
19650fd6
AS
19442sed 's/^/| /' conftest.$ac_ext >&5
19443
d6e01aa5 19444 eval "$as_ac_var=no"
503d2be0 19445fi
d6e01aa5
KL
19446
19447rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19448 conftest$ac_exeext conftest.$ac_ext
503d2be0 19449fi
d6e01aa5
KL
19450ac_res=`eval echo '${'$as_ac_var'}'`
19451 { echo "$as_me:$LINENO: result: $ac_res" >&5
19452echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19453if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19454 cat >>confdefs.h <<_ACEOF
503d2be0 19455#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19456_ACEOF
087121cc 19457
087121cc
GM
19458fi
19459done
19460
c0d27fcc 19461
ba4481b5
DL
19462# Check this now, so that we will NOT find the above functions in ncurses.
19463# That is because we have not set up to link ncurses in lib-src.
19464# It's better to believe a function is not available
19465# than to expect to find it in ncurses.
503d2be0 19466
d6e01aa5
KL
19467{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
19468echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
19469if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
19470 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19471else
503d2be0 19472 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19473LIBS="-lncurses $LIBS"
503d2be0 19474cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19475/* confdefs.h. */
19476_ACEOF
19477cat confdefs.h >>conftest.$ac_ext
19478cat >>conftest.$ac_ext <<_ACEOF
19479/* end confdefs.h. */
503d2be0 19480
d6e01aa5
KL
19481/* Override any GCC internal prototype to avoid an error.
19482 Use char because int might match the return type of a GCC
19483 builtin and then its argument prototype would still apply. */
503d2be0
AS
19484#ifdef __cplusplus
19485extern "C"
19486#endif
503d2be0
AS
19487char tparm ();
19488int
19489main ()
19490{
d6e01aa5 19491return tparm ();
503d2be0
AS
19492 ;
19493 return 0;
19494}
19495_ACEOF
19496rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19497if { (ac_try="$ac_link"
19498case "(($ac_try" in
19499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19500 *) ac_try_echo=$ac_try;;
19501esac
19502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19503 (eval "$ac_link") 2>conftest.er1
503d2be0 19504 ac_status=$?
edfaf76d
LK
19505 grep -v '^ *+' conftest.er1 >conftest.err
19506 rm -f conftest.er1
19507 cat conftest.err >&5
c0d27fcc 19508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19509 (exit $ac_status); } && {
19510 test -z "$ac_c_werror_flag" ||
19511 test ! -s conftest.err
19512 } && test -s conftest$ac_exeext &&
19513 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19514 ac_cv_lib_ncurses_tparm=yes
19515else
19516 echo "$as_me: failed program was:" >&5
19650fd6
AS
19517sed 's/^/| /' conftest.$ac_ext >&5
19518
d6e01aa5 19519 ac_cv_lib_ncurses_tparm=no
503d2be0 19520fi
d6e01aa5
KL
19521
19522rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19523 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19524LIBS=$ac_check_lib_save_LIBS
19525fi
d6e01aa5
KL
19526{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
19527echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 19528if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 19529 cat >>confdefs.h <<_ACEOF
503d2be0 19530#define HAVE_LIBNCURSES 1
c0d27fcc 19531_ACEOF
ba4481b5
DL
19532
19533 LIBS="-lncurses $LIBS"
19534
ba4481b5
DL
19535fi
19536
c0d27fcc 19537
bc3512d0
CY
19538# Do we have res_init, for detecting changes in /etc/resolv.conf?
19539
19540resolv=no
19541{ echo "$as_me:$LINENO: checking for res_init" >&5
19542echo $ECHO_N "checking for res_init... $ECHO_C" >&6; }
19543if test "${ac_cv_func_res_init+set}" = set; then
19544 echo $ECHO_N "(cached) $ECHO_C" >&6
19545else
19546 cat >conftest.$ac_ext <<_ACEOF
19547/* confdefs.h. */
19548_ACEOF
19549cat confdefs.h >>conftest.$ac_ext
19550cat >>conftest.$ac_ext <<_ACEOF
19551/* end confdefs.h. */
19552/* Define res_init to an innocuous variant, in case <limits.h> declares res_init.
19553 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19554#define res_init innocuous_res_init
19555
19556/* System header to define __stub macros and hopefully few prototypes,
19557 which can conflict with char res_init (); below.
19558 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19559 <limits.h> exists even on freestanding compilers. */
19560
19561#ifdef __STDC__
19562# include <limits.h>
19563#else
19564# include <assert.h>
19565#endif
19566
19567#undef res_init
19568
19569/* Override any GCC internal prototype to avoid an error.
19570 Use char because int might match the return type of a GCC
19571 builtin and then its argument prototype would still apply. */
19572#ifdef __cplusplus
19573extern "C"
19574#endif
19575char res_init ();
19576/* The GNU C library defines this for functions which it implements
19577 to always fail with ENOSYS. Some functions are actually named
19578 something starting with __ and the normal name is an alias. */
19579#if defined __stub_res_init || defined __stub___res_init
19580choke me
19581#endif
19582
19583int
19584main ()
19585{
19586return res_init ();
19587 ;
19588 return 0;
19589}
19590_ACEOF
19591rm -f conftest.$ac_objext conftest$ac_exeext
19592if { (ac_try="$ac_link"
19593case "(($ac_try" in
19594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19595 *) ac_try_echo=$ac_try;;
19596esac
19597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19598 (eval "$ac_link") 2>conftest.er1
19599 ac_status=$?
19600 grep -v '^ *+' conftest.er1 >conftest.err
19601 rm -f conftest.er1
19602 cat conftest.err >&5
19603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19604 (exit $ac_status); } && {
19605 test -z "$ac_c_werror_flag" ||
19606 test ! -s conftest.err
19607 } && test -s conftest$ac_exeext &&
19608 $as_test_x conftest$ac_exeext; then
19609 ac_cv_func_res_init=yes
19610else
19611 echo "$as_me: failed program was:" >&5
19612sed 's/^/| /' conftest.$ac_ext >&5
19613
19614 ac_cv_func_res_init=no
19615fi
19616
19617rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19618 conftest$ac_exeext conftest.$ac_ext
19619fi
19620{ echo "$as_me:$LINENO: result: $ac_cv_func_res_init" >&5
19621echo "${ECHO_T}$ac_cv_func_res_init" >&6; }
19622if test $ac_cv_func_res_init = yes; then
19623 have_res_init=yes
19624else
19625 have_res_init=no
19626fi
19627
19628if test "$have_res_init" = no; then
19629 OLIBS="$LIBS"
19630 LIBS="$LIBS -lresolv"
19631 { echo "$as_me:$LINENO: checking for res_init with -lresolv" >&5
19632echo $ECHO_N "checking for res_init with -lresolv... $ECHO_C" >&6; }
19633 cat >conftest.$ac_ext <<_ACEOF
19634/* confdefs.h. */
19635_ACEOF
19636cat confdefs.h >>conftest.$ac_ext
19637cat >>conftest.$ac_ext <<_ACEOF
19638/* end confdefs.h. */
19639#include <netinet/in.h>
19640#include <arpa/nameser.h>
19641#include <resolv.h>
19642int
19643main ()
19644{
19645res_init();
19646 ;
19647 return 0;
19648}
19649_ACEOF
19650rm -f conftest.$ac_objext conftest$ac_exeext
19651if { (ac_try="$ac_link"
19652case "(($ac_try" in
19653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19654 *) ac_try_echo=$ac_try;;
19655esac
19656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19657 (eval "$ac_link") 2>conftest.er1
19658 ac_status=$?
19659 grep -v '^ *+' conftest.er1 >conftest.err
19660 rm -f conftest.er1
19661 cat conftest.err >&5
19662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19663 (exit $ac_status); } && {
19664 test -z "$ac_c_werror_flag" ||
19665 test ! -s conftest.err
19666 } && test -s conftest$ac_exeext &&
19667 $as_test_x conftest$ac_exeext; then
19668 have_res_init=yes
19669else
19670 echo "$as_me: failed program was:" >&5
19671sed 's/^/| /' conftest.$ac_ext >&5
19672
19673 have_res_init=no
19674fi
19675
19676rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19677 conftest$ac_exeext conftest.$ac_ext
19678 { echo "$as_me:$LINENO: result: $have_res_init" >&5
19679echo "${ECHO_T}$have_res_init" >&6; }
19680 if test "$have_res_init" = yes ; then
19681 resolv=yes
19682 fi
19683 LIBS="$OLIBS"
19684fi
19685
19686if test "$have_res_init" = yes; then
19687
19688cat >>confdefs.h <<\_ACEOF
19689#define HAVE_RES_INIT 1
19690_ACEOF
19691
19692fi
19693
84e70f78
KR
19694# Do we need the Hesiod library to provide the support routines?
19695if test "$with_hesiod" = yes ; then
19696 # Don't set $LIBS here -- see comments above.
d6e01aa5
KL
19697 { echo "$as_me:$LINENO: checking for res_send" >&5
19698echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
19699if test "${ac_cv_func_res_send+set}" = set; then
19700 echo $ECHO_N "(cached) $ECHO_C" >&6
19701else
19702 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19703/* confdefs.h. */
19704_ACEOF
19705cat confdefs.h >>conftest.$ac_ext
19706cat >>conftest.$ac_ext <<_ACEOF
19707/* end confdefs.h. */
edfaf76d
LK
19708/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
19709 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19710#define res_send innocuous_res_send
19711
84e70f78 19712/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19713 which can conflict with char res_send (); below.
19714 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19715 <limits.h> exists even on freestanding compilers. */
edfaf76d 19716
19650fd6
AS
19717#ifdef __STDC__
19718# include <limits.h>
19719#else
19720# include <assert.h>
19721#endif
edfaf76d
LK
19722
19723#undef res_send
19724
d6e01aa5
KL
19725/* Override any GCC internal prototype to avoid an error.
19726 Use char because int might match the return type of a GCC
19727 builtin and then its argument prototype would still apply. */
84e70f78
KR
19728#ifdef __cplusplus
19729extern "C"
19730#endif
84e70f78 19731char res_send ();
84e70f78
KR
19732/* The GNU C library defines this for functions which it implements
19733 to always fail with ENOSYS. Some functions are actually named
19734 something starting with __ and the normal name is an alias. */
d6e01aa5 19735#if defined __stub_res_send || defined __stub___res_send
84e70f78 19736choke me
cd958eb3
MB
19737#endif
19738
19650fd6
AS
19739int
19740main ()
19741{
d6e01aa5 19742return res_send ();
84e70f78
KR
19743 ;
19744 return 0;
19745}
19746_ACEOF
19747rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19748if { (ac_try="$ac_link"
19749case "(($ac_try" in
19750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19751 *) ac_try_echo=$ac_try;;
19752esac
19753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19754 (eval "$ac_link") 2>conftest.er1
84e70f78 19755 ac_status=$?
edfaf76d
LK
19756 grep -v '^ *+' conftest.er1 >conftest.err
19757 rm -f conftest.er1
19758 cat conftest.err >&5
c0d27fcc 19759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19760 (exit $ac_status); } && {
19761 test -z "$ac_c_werror_flag" ||
19762 test ! -s conftest.err
19763 } && test -s conftest$ac_exeext &&
19764 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19765 ac_cv_func_res_send=yes
19766else
19767 echo "$as_me: failed program was:" >&5
19650fd6
AS
19768sed 's/^/| /' conftest.$ac_ext >&5
19769
d6e01aa5 19770 ac_cv_func_res_send=no
84e70f78 19771fi
d6e01aa5
KL
19772
19773rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19774 conftest$ac_exeext conftest.$ac_ext
84e70f78 19775fi
d6e01aa5
KL
19776{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
19777echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
19778if test $ac_cv_func_res_send = yes; then
19779 :
19780else
d6e01aa5
KL
19781 { echo "$as_me:$LINENO: checking for __res_send" >&5
19782echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
19783if test "${ac_cv_func___res_send+set}" = set; then
19784 echo $ECHO_N "(cached) $ECHO_C" >&6
19785else
19786 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19787/* confdefs.h. */
19788_ACEOF
19789cat confdefs.h >>conftest.$ac_ext
19790cat >>conftest.$ac_ext <<_ACEOF
19791/* end confdefs.h. */
edfaf76d
LK
19792/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
19793 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19794#define __res_send innocuous___res_send
19795
84e70f78 19796/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19797 which can conflict with char __res_send (); below.
19798 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19799 <limits.h> exists even on freestanding compilers. */
edfaf76d 19800
19650fd6
AS
19801#ifdef __STDC__
19802# include <limits.h>
19803#else
19804# include <assert.h>
19805#endif
edfaf76d
LK
19806
19807#undef __res_send
19808
d6e01aa5
KL
19809/* Override any GCC internal prototype to avoid an error.
19810 Use char because int might match the return type of a GCC
19811 builtin and then its argument prototype would still apply. */
84e70f78
KR
19812#ifdef __cplusplus
19813extern "C"
19814#endif
84e70f78 19815char __res_send ();
84e70f78
KR
19816/* The GNU C library defines this for functions which it implements
19817 to always fail with ENOSYS. Some functions are actually named
19818 something starting with __ and the normal name is an alias. */
d6e01aa5 19819#if defined __stub___res_send || defined __stub_____res_send
84e70f78 19820choke me
84e70f78
KR
19821#endif
19822
19650fd6
AS
19823int
19824main ()
19825{
d6e01aa5 19826return __res_send ();
84e70f78
KR
19827 ;
19828 return 0;
19829}
19830_ACEOF
19831rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19832if { (ac_try="$ac_link"
19833case "(($ac_try" in
19834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19835 *) ac_try_echo=$ac_try;;
19836esac
19837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19838 (eval "$ac_link") 2>conftest.er1
84e70f78 19839 ac_status=$?
edfaf76d
LK
19840 grep -v '^ *+' conftest.er1 >conftest.err
19841 rm -f conftest.er1
19842 cat conftest.err >&5
c0d27fcc 19843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19844 (exit $ac_status); } && {
19845 test -z "$ac_c_werror_flag" ||
19846 test ! -s conftest.err
19847 } && test -s conftest$ac_exeext &&
19848 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19849 ac_cv_func___res_send=yes
19850else
19851 echo "$as_me: failed program was:" >&5
19650fd6
AS
19852sed 's/^/| /' conftest.$ac_ext >&5
19853
d6e01aa5 19854 ac_cv_func___res_send=no
84e70f78 19855fi
d6e01aa5
KL
19856
19857rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19858 conftest$ac_exeext conftest.$ac_ext
84e70f78 19859fi
d6e01aa5
KL
19860{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
19861echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
19862if test $ac_cv_func___res_send = yes; then
19863 :
19864else
d6e01aa5
KL
19865 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
19866echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19867if test "${ac_cv_lib_resolv_res_send+set}" = set; then
19868 echo $ECHO_N "(cached) $ECHO_C" >&6
19869else
19870 ac_check_lib_save_LIBS=$LIBS
19871LIBS="-lresolv $LIBS"
19872cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19873/* confdefs.h. */
19874_ACEOF
19875cat confdefs.h >>conftest.$ac_ext
19876cat >>conftest.$ac_ext <<_ACEOF
19877/* end confdefs.h. */
84e70f78 19878
d6e01aa5
KL
19879/* Override any GCC internal prototype to avoid an error.
19880 Use char because int might match the return type of a GCC
19881 builtin and then its argument prototype would still apply. */
84e70f78
KR
19882#ifdef __cplusplus
19883extern "C"
19884#endif
84e70f78
KR
19885char res_send ();
19886int
19887main ()
19888{
d6e01aa5 19889return res_send ();
84e70f78
KR
19890 ;
19891 return 0;
19892}
19893_ACEOF
19894rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19895if { (ac_try="$ac_link"
19896case "(($ac_try" in
19897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19898 *) ac_try_echo=$ac_try;;
19899esac
19900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19901 (eval "$ac_link") 2>conftest.er1
84e70f78 19902 ac_status=$?
edfaf76d
LK
19903 grep -v '^ *+' conftest.er1 >conftest.err
19904 rm -f conftest.er1
19905 cat conftest.err >&5
c0d27fcc 19906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19907 (exit $ac_status); } && {
19908 test -z "$ac_c_werror_flag" ||
19909 test ! -s conftest.err
19910 } && test -s conftest$ac_exeext &&
19911 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19912 ac_cv_lib_resolv_res_send=yes
19913else
19914 echo "$as_me: failed program was:" >&5
19650fd6
AS
19915sed 's/^/| /' conftest.$ac_ext >&5
19916
d6e01aa5 19917 ac_cv_lib_resolv_res_send=no
84e70f78 19918fi
d6e01aa5
KL
19919
19920rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19921 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19922LIBS=$ac_check_lib_save_LIBS
19923fi
d6e01aa5
KL
19924{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
19925echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
19926if test $ac_cv_lib_resolv_res_send = yes; then
19927 resolv=yes
19928else
d6e01aa5
KL
19929 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
19930echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19931if test "${ac_cv_lib_resolv___res_send+set}" = set; then
19932 echo $ECHO_N "(cached) $ECHO_C" >&6
19933else
19934 ac_check_lib_save_LIBS=$LIBS
19935LIBS="-lresolv $LIBS"
19936cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19937/* confdefs.h. */
19938_ACEOF
19939cat confdefs.h >>conftest.$ac_ext
19940cat >>conftest.$ac_ext <<_ACEOF
19941/* end confdefs.h. */
84e70f78 19942
d6e01aa5
KL
19943/* Override any GCC internal prototype to avoid an error.
19944 Use char because int might match the return type of a GCC
19945 builtin and then its argument prototype would still apply. */
84e70f78
KR
19946#ifdef __cplusplus
19947extern "C"
19948#endif
84e70f78
KR
19949char __res_send ();
19950int
19951main ()
19952{
d6e01aa5 19953return __res_send ();
84e70f78
KR
19954 ;
19955 return 0;
19956}
19957_ACEOF
19958rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
19959if { (ac_try="$ac_link"
19960case "(($ac_try" in
19961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19962 *) ac_try_echo=$ac_try;;
19963esac
19964eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19965 (eval "$ac_link") 2>conftest.er1
84e70f78 19966 ac_status=$?
edfaf76d
LK
19967 grep -v '^ *+' conftest.er1 >conftest.err
19968 rm -f conftest.er1
19969 cat conftest.err >&5
c0d27fcc 19970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
19971 (exit $ac_status); } && {
19972 test -z "$ac_c_werror_flag" ||
19973 test ! -s conftest.err
19974 } && test -s conftest$ac_exeext &&
19975 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19976 ac_cv_lib_resolv___res_send=yes
19977else
19978 echo "$as_me: failed program was:" >&5
19650fd6
AS
19979sed 's/^/| /' conftest.$ac_ext >&5
19980
d6e01aa5 19981 ac_cv_lib_resolv___res_send=no
84e70f78 19982fi
d6e01aa5
KL
19983
19984rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19985 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19986LIBS=$ac_check_lib_save_LIBS
19987fi
d6e01aa5
KL
19988{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
19989echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
19990if test $ac_cv_lib_resolv___res_send = yes; then
19991 resolv=yes
19992fi
19993
19994fi
19995
19996fi
19997
19998fi
19999
20000 if test "$resolv" = yes ; then
20001 RESOLVLIB=-lresolv
84e70f78
KR
20002 else
20003 RESOLVLIB=
20004 fi
d6e01aa5
KL
20005 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
20006echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
20007if test "${ac_cv_func_hes_getmailhost+set}" = set; then
20008 echo $ECHO_N "(cached) $ECHO_C" >&6
20009else
20010 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20011/* confdefs.h. */
20012_ACEOF
20013cat confdefs.h >>conftest.$ac_ext
20014cat >>conftest.$ac_ext <<_ACEOF
20015/* end confdefs.h. */
edfaf76d
LK
20016/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
20017 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20018#define hes_getmailhost innocuous_hes_getmailhost
20019
84e70f78 20020/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20021 which can conflict with char hes_getmailhost (); below.
20022 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20023 <limits.h> exists even on freestanding compilers. */
edfaf76d 20024
19650fd6
AS
20025#ifdef __STDC__
20026# include <limits.h>
20027#else
20028# include <assert.h>
20029#endif
edfaf76d
LK
20030
20031#undef hes_getmailhost
20032
d6e01aa5
KL
20033/* Override any GCC internal prototype to avoid an error.
20034 Use char because int might match the return type of a GCC
20035 builtin and then its argument prototype would still apply. */
84e70f78
KR
20036#ifdef __cplusplus
20037extern "C"
20038#endif
84e70f78 20039char hes_getmailhost ();
84e70f78
KR
20040/* The GNU C library defines this for functions which it implements
20041 to always fail with ENOSYS. Some functions are actually named
20042 something starting with __ and the normal name is an alias. */
d6e01aa5 20043#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 20044choke me
cd958eb3
MB
20045#endif
20046
19650fd6
AS
20047int
20048main ()
20049{
d6e01aa5 20050return hes_getmailhost ();
84e70f78
KR
20051 ;
20052 return 0;
20053}
20054_ACEOF
20055rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20056if { (ac_try="$ac_link"
20057case "(($ac_try" in
20058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20059 *) ac_try_echo=$ac_try;;
20060esac
20061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20062 (eval "$ac_link") 2>conftest.er1
84e70f78 20063 ac_status=$?
edfaf76d
LK
20064 grep -v '^ *+' conftest.er1 >conftest.err
20065 rm -f conftest.er1
20066 cat conftest.err >&5
c0d27fcc 20067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20068 (exit $ac_status); } && {
20069 test -z "$ac_c_werror_flag" ||
20070 test ! -s conftest.err
20071 } && test -s conftest$ac_exeext &&
20072 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20073 ac_cv_func_hes_getmailhost=yes
20074else
20075 echo "$as_me: failed program was:" >&5
19650fd6
AS
20076sed 's/^/| /' conftest.$ac_ext >&5
20077
d6e01aa5 20078 ac_cv_func_hes_getmailhost=no
84e70f78 20079fi
d6e01aa5
KL
20080
20081rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20082 conftest$ac_exeext conftest.$ac_ext
84e70f78 20083fi
d6e01aa5
KL
20084{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
20085echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
20086if test $ac_cv_func_hes_getmailhost = yes; then
20087 :
20088else
d6e01aa5
KL
20089 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
20090echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
20091if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
20092 echo $ECHO_N "(cached) $ECHO_C" >&6
20093else
20094 ac_check_lib_save_LIBS=$LIBS
20095LIBS="-lhesiod $RESOLVLIB $LIBS"
20096cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20097/* confdefs.h. */
20098_ACEOF
20099cat confdefs.h >>conftest.$ac_ext
20100cat >>conftest.$ac_ext <<_ACEOF
20101/* end confdefs.h. */
84e70f78 20102
d6e01aa5
KL
20103/* Override any GCC internal prototype to avoid an error.
20104 Use char because int might match the return type of a GCC
20105 builtin and then its argument prototype would still apply. */
84e70f78
KR
20106#ifdef __cplusplus
20107extern "C"
20108#endif
84e70f78
KR
20109char hes_getmailhost ();
20110int
20111main ()
20112{
d6e01aa5 20113return hes_getmailhost ();
84e70f78
KR
20114 ;
20115 return 0;
20116}
20117_ACEOF
20118rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20119if { (ac_try="$ac_link"
20120case "(($ac_try" in
20121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20122 *) ac_try_echo=$ac_try;;
20123esac
20124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20125 (eval "$ac_link") 2>conftest.er1
84e70f78 20126 ac_status=$?
edfaf76d
LK
20127 grep -v '^ *+' conftest.er1 >conftest.err
20128 rm -f conftest.er1
20129 cat conftest.err >&5
c0d27fcc 20130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20131 (exit $ac_status); } && {
20132 test -z "$ac_c_werror_flag" ||
20133 test ! -s conftest.err
20134 } && test -s conftest$ac_exeext &&
20135 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20136 ac_cv_lib_hesiod_hes_getmailhost=yes
20137else
20138 echo "$as_me: failed program was:" >&5
19650fd6
AS
20139sed 's/^/| /' conftest.$ac_ext >&5
20140
d6e01aa5 20141 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 20142fi
d6e01aa5
KL
20143
20144rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20145 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20146LIBS=$ac_check_lib_save_LIBS
20147fi
d6e01aa5
KL
20148{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
20149echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 20150if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 20151
c0d27fcc 20152cat >>confdefs.h <<\_ACEOF
84e70f78 20153#define HAVE_LIBHESIOD 1
c0d27fcc 20154_ACEOF
84e70f78
KR
20155
20156else
20157 :
20158fi
20159
20160fi
20161
20162fi
20163
bc3512d0
CY
20164# Do we need libresolv (due to res_init or Hesiod)?
20165if test "$resolv" = yes ; then
20166
20167cat >>confdefs.h <<\_ACEOF
20168#define HAVE_LIBRESOLV 1
20169_ACEOF
20170
20171fi
20172
a21616bd
KR
20173# These tell us which Kerberos-related libraries to use.
20174if test "${with_kerberos+set}" = set; then
503d2be0 20175
d6e01aa5
KL
20176{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
20177echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
20178if test "${ac_cv_lib_com_err_com_err+set}" = set; then
20179 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20180else
503d2be0 20181 ac_check_lib_save_LIBS=$LIBS
a21616bd 20182LIBS="-lcom_err $LIBS"
503d2be0 20183cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20184/* confdefs.h. */
20185_ACEOF
20186cat confdefs.h >>conftest.$ac_ext
20187cat >>conftest.$ac_ext <<_ACEOF
20188/* end confdefs.h. */
503d2be0 20189
d6e01aa5
KL
20190/* Override any GCC internal prototype to avoid an error.
20191 Use char because int might match the return type of a GCC
20192 builtin and then its argument prototype would still apply. */
503d2be0
AS
20193#ifdef __cplusplus
20194extern "C"
20195#endif
503d2be0
AS
20196char com_err ();
20197int
20198main ()
20199{
d6e01aa5 20200return com_err ();
503d2be0
AS
20201 ;
20202 return 0;
20203}
20204_ACEOF
20205rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20206if { (ac_try="$ac_link"
20207case "(($ac_try" in
20208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20209 *) ac_try_echo=$ac_try;;
20210esac
20211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20212 (eval "$ac_link") 2>conftest.er1
503d2be0 20213 ac_status=$?
edfaf76d
LK
20214 grep -v '^ *+' conftest.er1 >conftest.err
20215 rm -f conftest.er1
20216 cat conftest.err >&5
c0d27fcc 20217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20218 (exit $ac_status); } && {
20219 test -z "$ac_c_werror_flag" ||
20220 test ! -s conftest.err
20221 } && test -s conftest$ac_exeext &&
20222 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20223 ac_cv_lib_com_err_com_err=yes
20224else
20225 echo "$as_me: failed program was:" >&5
19650fd6
AS
20226sed 's/^/| /' conftest.$ac_ext >&5
20227
d6e01aa5 20228 ac_cv_lib_com_err_com_err=no
503d2be0 20229fi
d6e01aa5
KL
20230
20231rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20232 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20233LIBS=$ac_check_lib_save_LIBS
20234fi
d6e01aa5
KL
20235{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
20236echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 20237if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 20238 cat >>confdefs.h <<_ACEOF
503d2be0 20239#define HAVE_LIBCOM_ERR 1
c0d27fcc 20240_ACEOF
a21616bd
KR
20241
20242 LIBS="-lcom_err $LIBS"
20243
a21616bd
KR
20244fi
20245
c0d27fcc 20246
d6e01aa5
KL
20247{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
20248echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
20249if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
20250 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20251else
503d2be0 20252 ac_check_lib_save_LIBS=$LIBS
a21616bd 20253LIBS="-lk5crypto $LIBS"
503d2be0 20254cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20255/* confdefs.h. */
20256_ACEOF
20257cat confdefs.h >>conftest.$ac_ext
20258cat >>conftest.$ac_ext <<_ACEOF
20259/* end confdefs.h. */
503d2be0 20260
d6e01aa5
KL
20261/* Override any GCC internal prototype to avoid an error.
20262 Use char because int might match the return type of a GCC
20263 builtin and then its argument prototype would still apply. */
503d2be0
AS
20264#ifdef __cplusplus
20265extern "C"
20266#endif
503d2be0
AS
20267char mit_des_cbc_encrypt ();
20268int
20269main ()
20270{
d6e01aa5 20271return mit_des_cbc_encrypt ();
503d2be0
AS
20272 ;
20273 return 0;
20274}
20275_ACEOF
20276rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20277if { (ac_try="$ac_link"
20278case "(($ac_try" in
20279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20280 *) ac_try_echo=$ac_try;;
20281esac
20282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20283 (eval "$ac_link") 2>conftest.er1
503d2be0 20284 ac_status=$?
edfaf76d
LK
20285 grep -v '^ *+' conftest.er1 >conftest.err
20286 rm -f conftest.er1
20287 cat conftest.err >&5
c0d27fcc 20288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20289 (exit $ac_status); } && {
20290 test -z "$ac_c_werror_flag" ||
20291 test ! -s conftest.err
20292 } && test -s conftest$ac_exeext &&
20293 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20294 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
20295else
20296 echo "$as_me: failed program was:" >&5
19650fd6
AS
20297sed 's/^/| /' conftest.$ac_ext >&5
20298
d6e01aa5 20299 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 20300fi
d6e01aa5
KL
20301
20302rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20303 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20304LIBS=$ac_check_lib_save_LIBS
20305fi
d6e01aa5
KL
20306{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
20307echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20308if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20309 cat >>confdefs.h <<_ACEOF
503d2be0 20310#define HAVE_LIBK5CRYPTO 1
c0d27fcc 20311_ACEOF
a21616bd
KR
20312
20313 LIBS="-lk5crypto $LIBS"
20314
a21616bd
KR
20315fi
20316
c0d27fcc 20317
d6e01aa5
KL
20318{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
20319echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
20320if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
20321 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20322else
503d2be0 20323 ac_check_lib_save_LIBS=$LIBS
a21616bd 20324LIBS="-lcrypto $LIBS"
503d2be0 20325cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20326/* confdefs.h. */
20327_ACEOF
20328cat confdefs.h >>conftest.$ac_ext
20329cat >>conftest.$ac_ext <<_ACEOF
20330/* end confdefs.h. */
503d2be0 20331
d6e01aa5
KL
20332/* Override any GCC internal prototype to avoid an error.
20333 Use char because int might match the return type of a GCC
20334 builtin and then its argument prototype would still apply. */
503d2be0
AS
20335#ifdef __cplusplus
20336extern "C"
20337#endif
503d2be0
AS
20338char mit_des_cbc_encrypt ();
20339int
20340main ()
20341{
d6e01aa5 20342return mit_des_cbc_encrypt ();
503d2be0
AS
20343 ;
20344 return 0;
20345}
20346_ACEOF
20347rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20348if { (ac_try="$ac_link"
20349case "(($ac_try" in
20350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20351 *) ac_try_echo=$ac_try;;
20352esac
20353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20354 (eval "$ac_link") 2>conftest.er1
503d2be0 20355 ac_status=$?
edfaf76d
LK
20356 grep -v '^ *+' conftest.er1 >conftest.err
20357 rm -f conftest.er1
20358 cat conftest.err >&5
c0d27fcc 20359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20360 (exit $ac_status); } && {
20361 test -z "$ac_c_werror_flag" ||
20362 test ! -s conftest.err
20363 } && test -s conftest$ac_exeext &&
20364 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20365 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
20366else
20367 echo "$as_me: failed program was:" >&5
19650fd6
AS
20368sed 's/^/| /' conftest.$ac_ext >&5
20369
d6e01aa5 20370 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 20371fi
d6e01aa5
KL
20372
20373rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20374 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20375LIBS=$ac_check_lib_save_LIBS
20376fi
d6e01aa5
KL
20377{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
20378echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20379if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20380 cat >>confdefs.h <<_ACEOF
503d2be0 20381#define HAVE_LIBCRYPTO 1
c0d27fcc 20382_ACEOF
a21616bd
KR
20383
20384 LIBS="-lcrypto $LIBS"
20385
a21616bd
KR
20386fi
20387
c0d27fcc 20388
d6e01aa5
KL
20389{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
20390echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
20391if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
20392 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20393else
503d2be0 20394 ac_check_lib_save_LIBS=$LIBS
a21616bd 20395LIBS="-lkrb5 $LIBS"
503d2be0 20396cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20397/* confdefs.h. */
20398_ACEOF
20399cat confdefs.h >>conftest.$ac_ext
20400cat >>conftest.$ac_ext <<_ACEOF
20401/* end confdefs.h. */
a21616bd 20402
d6e01aa5
KL
20403/* Override any GCC internal prototype to avoid an error.
20404 Use char because int might match the return type of a GCC
20405 builtin and then its argument prototype would still apply. */
503d2be0
AS
20406#ifdef __cplusplus
20407extern "C"
20408#endif
503d2be0
AS
20409char krb5_init_context ();
20410int
20411main ()
20412{
d6e01aa5 20413return krb5_init_context ();
503d2be0
AS
20414 ;
20415 return 0;
20416}
20417_ACEOF
20418rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20419if { (ac_try="$ac_link"
20420case "(($ac_try" in
20421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20422 *) ac_try_echo=$ac_try;;
20423esac
20424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20425 (eval "$ac_link") 2>conftest.er1
503d2be0 20426 ac_status=$?
edfaf76d
LK
20427 grep -v '^ *+' conftest.er1 >conftest.err
20428 rm -f conftest.er1
20429 cat conftest.err >&5
c0d27fcc 20430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20431 (exit $ac_status); } && {
20432 test -z "$ac_c_werror_flag" ||
20433 test ! -s conftest.err
20434 } && test -s conftest$ac_exeext &&
20435 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20436 ac_cv_lib_krb5_krb5_init_context=yes
20437else
20438 echo "$as_me: failed program was:" >&5
19650fd6
AS
20439sed 's/^/| /' conftest.$ac_ext >&5
20440
d6e01aa5 20441 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20442fi
d6e01aa5
KL
20443
20444rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20445 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20446LIBS=$ac_check_lib_save_LIBS
20447fi
d6e01aa5
KL
20448{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20449echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 20450if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20451 cat >>confdefs.h <<_ACEOF
503d2be0 20452#define HAVE_LIBKRB5 1
c0d27fcc 20453_ACEOF
a21616bd
KR
20454
20455 LIBS="-lkrb5 $LIBS"
20456
a21616bd
KR
20457fi
20458
20459 if test "${with_kerberos5+set}" != set; then
503d2be0 20460
d6e01aa5
KL
20461{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20462echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
20463if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
20464 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20465else
503d2be0 20466 ac_check_lib_save_LIBS=$LIBS
a21616bd 20467LIBS="-ldes425 $LIBS"
503d2be0 20468cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20469/* confdefs.h. */
20470_ACEOF
20471cat confdefs.h >>conftest.$ac_ext
20472cat >>conftest.$ac_ext <<_ACEOF
20473/* end confdefs.h. */
503d2be0 20474
d6e01aa5
KL
20475/* Override any GCC internal prototype to avoid an error.
20476 Use char because int might match the return type of a GCC
20477 builtin and then its argument prototype would still apply. */
503d2be0
AS
20478#ifdef __cplusplus
20479extern "C"
20480#endif
503d2be0
AS
20481char des_cbc_encrypt ();
20482int
20483main ()
20484{
d6e01aa5 20485return des_cbc_encrypt ();
503d2be0
AS
20486 ;
20487 return 0;
20488}
20489_ACEOF
20490rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20491if { (ac_try="$ac_link"
20492case "(($ac_try" in
20493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20494 *) ac_try_echo=$ac_try;;
20495esac
20496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20497 (eval "$ac_link") 2>conftest.er1
503d2be0 20498 ac_status=$?
edfaf76d
LK
20499 grep -v '^ *+' conftest.er1 >conftest.err
20500 rm -f conftest.er1
20501 cat conftest.err >&5
c0d27fcc 20502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20503 (exit $ac_status); } && {
20504 test -z "$ac_c_werror_flag" ||
20505 test ! -s conftest.err
20506 } && test -s conftest$ac_exeext &&
20507 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20508 ac_cv_lib_des425_des_cbc_encrypt=yes
20509else
20510 echo "$as_me: failed program was:" >&5
19650fd6
AS
20511sed 's/^/| /' conftest.$ac_ext >&5
20512
d6e01aa5 20513 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 20514fi
d6e01aa5
KL
20515
20516rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20517 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20518LIBS=$ac_check_lib_save_LIBS
20519fi
d6e01aa5
KL
20520{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
20521echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 20522if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 20523 cat >>confdefs.h <<_ACEOF
503d2be0 20524#define HAVE_LIBDES425 1
c0d27fcc 20525_ACEOF
a21616bd
KR
20526
20527 LIBS="-ldes425 $LIBS"
20528
20529else
503d2be0 20530
d6e01aa5
KL
20531{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
20532echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
20533if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
20534 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20535else
503d2be0 20536 ac_check_lib_save_LIBS=$LIBS
a21616bd 20537LIBS="-ldes $LIBS"
503d2be0 20538cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20539/* confdefs.h. */
20540_ACEOF
20541cat confdefs.h >>conftest.$ac_ext
20542cat >>conftest.$ac_ext <<_ACEOF
20543/* end confdefs.h. */
503d2be0 20544
d6e01aa5
KL
20545/* Override any GCC internal prototype to avoid an error.
20546 Use char because int might match the return type of a GCC
20547 builtin and then its argument prototype would still apply. */
503d2be0
AS
20548#ifdef __cplusplus
20549extern "C"
20550#endif
503d2be0
AS
20551char des_cbc_encrypt ();
20552int
20553main ()
20554{
d6e01aa5 20555return des_cbc_encrypt ();
503d2be0
AS
20556 ;
20557 return 0;
20558}
20559_ACEOF
20560rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20561if { (ac_try="$ac_link"
20562case "(($ac_try" in
20563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20564 *) ac_try_echo=$ac_try;;
20565esac
20566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20567 (eval "$ac_link") 2>conftest.er1
503d2be0 20568 ac_status=$?
edfaf76d
LK
20569 grep -v '^ *+' conftest.er1 >conftest.err
20570 rm -f conftest.er1
20571 cat conftest.err >&5
c0d27fcc 20572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20573 (exit $ac_status); } && {
20574 test -z "$ac_c_werror_flag" ||
20575 test ! -s conftest.err
20576 } && test -s conftest$ac_exeext &&
20577 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20578 ac_cv_lib_des_des_cbc_encrypt=yes
20579else
20580 echo "$as_me: failed program was:" >&5
19650fd6
AS
20581sed 's/^/| /' conftest.$ac_ext >&5
20582
d6e01aa5 20583 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 20584fi
d6e01aa5
KL
20585
20586rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20587 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20588LIBS=$ac_check_lib_save_LIBS
20589fi
d6e01aa5
KL
20590{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
20591echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 20592if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 20593 cat >>confdefs.h <<_ACEOF
503d2be0 20594#define HAVE_LIBDES 1
c0d27fcc 20595_ACEOF
a21616bd
KR
20596
20597 LIBS="-ldes $LIBS"
20598
a21616bd
KR
20599fi
20600
20601fi
20602
c0d27fcc 20603
d6e01aa5
KL
20604{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
20605echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
20606if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
20607 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20608else
503d2be0 20609 ac_check_lib_save_LIBS=$LIBS
a21616bd 20610LIBS="-lkrb4 $LIBS"
503d2be0 20611cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20612/* confdefs.h. */
20613_ACEOF
20614cat confdefs.h >>conftest.$ac_ext
20615cat >>conftest.$ac_ext <<_ACEOF
20616/* end confdefs.h. */
503d2be0 20617
d6e01aa5
KL
20618/* Override any GCC internal prototype to avoid an error.
20619 Use char because int might match the return type of a GCC
20620 builtin and then its argument prototype would still apply. */
503d2be0
AS
20621#ifdef __cplusplus
20622extern "C"
20623#endif
503d2be0
AS
20624char krb_get_cred ();
20625int
20626main ()
20627{
d6e01aa5 20628return krb_get_cred ();
503d2be0
AS
20629 ;
20630 return 0;
20631}
20632_ACEOF
20633rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20634if { (ac_try="$ac_link"
20635case "(($ac_try" in
20636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20637 *) ac_try_echo=$ac_try;;
20638esac
20639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20640 (eval "$ac_link") 2>conftest.er1
503d2be0 20641 ac_status=$?
edfaf76d
LK
20642 grep -v '^ *+' conftest.er1 >conftest.err
20643 rm -f conftest.er1
20644 cat conftest.err >&5
c0d27fcc 20645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20646 (exit $ac_status); } && {
20647 test -z "$ac_c_werror_flag" ||
20648 test ! -s conftest.err
20649 } && test -s conftest$ac_exeext &&
20650 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20651 ac_cv_lib_krb4_krb_get_cred=yes
20652else
20653 echo "$as_me: failed program was:" >&5
19650fd6
AS
20654sed 's/^/| /' conftest.$ac_ext >&5
20655
d6e01aa5 20656 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 20657fi
d6e01aa5
KL
20658
20659rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20660 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20661LIBS=$ac_check_lib_save_LIBS
20662fi
d6e01aa5
KL
20663{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
20664echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 20665if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 20666 cat >>confdefs.h <<_ACEOF
503d2be0 20667#define HAVE_LIBKRB4 1
c0d27fcc 20668_ACEOF
a21616bd
KR
20669
20670 LIBS="-lkrb4 $LIBS"
20671
20672else
503d2be0 20673
d6e01aa5
KL
20674{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
20675echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
20676if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
20677 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20678else
503d2be0 20679 ac_check_lib_save_LIBS=$LIBS
a21616bd 20680LIBS="-lkrb $LIBS"
503d2be0 20681cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20682/* confdefs.h. */
20683_ACEOF
20684cat confdefs.h >>conftest.$ac_ext
20685cat >>conftest.$ac_ext <<_ACEOF
20686/* end confdefs.h. */
503d2be0 20687
d6e01aa5
KL
20688/* Override any GCC internal prototype to avoid an error.
20689 Use char because int might match the return type of a GCC
20690 builtin and then its argument prototype would still apply. */
503d2be0
AS
20691#ifdef __cplusplus
20692extern "C"
20693#endif
503d2be0
AS
20694char krb_get_cred ();
20695int
20696main ()
20697{
d6e01aa5 20698return krb_get_cred ();
503d2be0
AS
20699 ;
20700 return 0;
20701}
20702_ACEOF
20703rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
20704if { (ac_try="$ac_link"
20705case "(($ac_try" in
20706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20707 *) ac_try_echo=$ac_try;;
20708esac
20709eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20710 (eval "$ac_link") 2>conftest.er1
503d2be0 20711 ac_status=$?
edfaf76d
LK
20712 grep -v '^ *+' conftest.er1 >conftest.err
20713 rm -f conftest.er1
20714 cat conftest.err >&5
c0d27fcc 20715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20716 (exit $ac_status); } && {
20717 test -z "$ac_c_werror_flag" ||
20718 test ! -s conftest.err
20719 } && test -s conftest$ac_exeext &&
20720 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20721 ac_cv_lib_krb_krb_get_cred=yes
20722else
20723 echo "$as_me: failed program was:" >&5
19650fd6
AS
20724sed 's/^/| /' conftest.$ac_ext >&5
20725
d6e01aa5 20726 ac_cv_lib_krb_krb_get_cred=no
503d2be0 20727fi
d6e01aa5
KL
20728
20729rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20730 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20731LIBS=$ac_check_lib_save_LIBS
20732fi
d6e01aa5
KL
20733{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
20734echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 20735if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 20736 cat >>confdefs.h <<_ACEOF
503d2be0 20737#define HAVE_LIBKRB 1
c0d27fcc 20738_ACEOF
a21616bd
KR
20739
20740 LIBS="-lkrb $LIBS"
20741
a21616bd
KR
20742fi
20743
20744fi
20745
20746 fi
20747
20748 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
20749
20750for ac_header in krb5.h
a21616bd 20751do
503d2be0 20752as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
20753if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20754 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20755echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20756if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20757 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20758fi
d6e01aa5
KL
20759ac_res=`eval echo '${'$as_ac_Header'}'`
20760 { echo "$as_me:$LINENO: result: $ac_res" >&5
20761echo "${ECHO_T}$ac_res" >&6; }
98418dba 20762else
c0d27fcc 20763 # Is the header compilable?
d6e01aa5
KL
20764{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20765echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20766cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20767/* confdefs.h. */
20768_ACEOF
20769cat confdefs.h >>conftest.$ac_ext
20770cat >>conftest.$ac_ext <<_ACEOF
20771/* end confdefs.h. */
c0d27fcc
MR
20772$ac_includes_default
20773#include <$ac_header>
20774_ACEOF
20775rm -f conftest.$ac_objext
d6e01aa5
KL
20776if { (ac_try="$ac_compile"
20777case "(($ac_try" in
20778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20779 *) ac_try_echo=$ac_try;;
20780esac
20781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20782 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20783 ac_status=$?
edfaf76d
LK
20784 grep -v '^ *+' conftest.er1 >conftest.err
20785 rm -f conftest.er1
20786 cat conftest.err >&5
c0d27fcc 20787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20788 (exit $ac_status); } && {
20789 test -z "$ac_c_werror_flag" ||
20790 test ! -s conftest.err
20791 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20792 ac_header_compiler=yes
20793else
20794 echo "$as_me: failed program was:" >&5
19650fd6
AS
20795sed 's/^/| /' conftest.$ac_ext >&5
20796
d6e01aa5 20797 ac_header_compiler=no
c0d27fcc 20798fi
d6e01aa5
KL
20799
20800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20801{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20802echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20803
20804# Is the header present?
d6e01aa5
KL
20805{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20806echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20807cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20808/* confdefs.h. */
20809_ACEOF
20810cat confdefs.h >>conftest.$ac_ext
20811cat >>conftest.$ac_ext <<_ACEOF
20812/* end confdefs.h. */
503d2be0
AS
20813#include <$ac_header>
20814_ACEOF
d6e01aa5
KL
20815if { (ac_try="$ac_cpp conftest.$ac_ext"
20816case "(($ac_try" in
20817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20818 *) ac_try_echo=$ac_try;;
20819esac
20820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20821 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20822 ac_status=$?
6bae0ccf 20823 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20824 rm -f conftest.er1
20825 cat conftest.err >&5
c0d27fcc 20826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20827 (exit $ac_status); } >/dev/null && {
20828 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20829 test ! -s conftest.err
20830 }; then
c0d27fcc 20831 ac_header_preproc=yes
503d2be0
AS
20832else
20833 echo "$as_me: failed program was:" >&5
19650fd6
AS
20834sed 's/^/| /' conftest.$ac_ext >&5
20835
c0d27fcc 20836 ac_header_preproc=no
a21616bd 20837fi
d6e01aa5 20838
503d2be0 20839rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
20840{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20841echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20842
20843# So? What about this header?
edfaf76d
LK
20844case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20845 yes:no: )
c0d27fcc
MR
20846 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20847echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20848 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20849echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20850 ac_header_preproc=yes
19650fd6 20851 ;;
edfaf76d 20852 no:yes:* )
c0d27fcc
MR
20853 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20854echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20855 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20856echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20857 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20858echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20859 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20860echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20861 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20862echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20863 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20864echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 20865
19650fd6 20866 ;;
c0d27fcc 20867esac
d6e01aa5
KL
20868{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20869echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20870if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20871 echo $ECHO_N "(cached) $ECHO_C" >&6
20872else
edfaf76d 20873 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20874fi
d6e01aa5
KL
20875ac_res=`eval echo '${'$as_ac_Header'}'`
20876 { echo "$as_me:$LINENO: result: $ac_res" >&5
20877echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20878
20879fi
503d2be0 20880if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20881 cat >>confdefs.h <<_ACEOF
503d2be0 20882#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20883_ACEOF
503d2be0 20884
a21616bd 20885fi
c0d27fcc 20886
a21616bd
KR
20887done
20888
20889 else
503d2be0
AS
20890
20891for ac_header in des.h
a21616bd 20892do
503d2be0 20893as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
20894if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20895 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20896echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20897if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20898 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20899fi
d6e01aa5
KL
20900ac_res=`eval echo '${'$as_ac_Header'}'`
20901 { echo "$as_me:$LINENO: result: $ac_res" >&5
20902echo "${ECHO_T}$ac_res" >&6; }
98418dba 20903else
c0d27fcc 20904 # Is the header compilable?
d6e01aa5
KL
20905{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20906echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20907cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20908/* confdefs.h. */
20909_ACEOF
20910cat confdefs.h >>conftest.$ac_ext
20911cat >>conftest.$ac_ext <<_ACEOF
20912/* end confdefs.h. */
c0d27fcc
MR
20913$ac_includes_default
20914#include <$ac_header>
20915_ACEOF
20916rm -f conftest.$ac_objext
d6e01aa5
KL
20917if { (ac_try="$ac_compile"
20918case "(($ac_try" in
20919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20920 *) ac_try_echo=$ac_try;;
20921esac
20922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20923 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20924 ac_status=$?
edfaf76d
LK
20925 grep -v '^ *+' conftest.er1 >conftest.err
20926 rm -f conftest.er1
20927 cat conftest.err >&5
c0d27fcc 20928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20929 (exit $ac_status); } && {
20930 test -z "$ac_c_werror_flag" ||
20931 test ! -s conftest.err
20932 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20933 ac_header_compiler=yes
20934else
20935 echo "$as_me: failed program was:" >&5
19650fd6
AS
20936sed 's/^/| /' conftest.$ac_ext >&5
20937
d6e01aa5 20938 ac_header_compiler=no
c0d27fcc 20939fi
d6e01aa5
KL
20940
20941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20942{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20943echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20944
20945# Is the header present?
d6e01aa5
KL
20946{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20947echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20948cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20949/* confdefs.h. */
20950_ACEOF
20951cat confdefs.h >>conftest.$ac_ext
20952cat >>conftest.$ac_ext <<_ACEOF
20953/* end confdefs.h. */
503d2be0
AS
20954#include <$ac_header>
20955_ACEOF
d6e01aa5
KL
20956if { (ac_try="$ac_cpp conftest.$ac_ext"
20957case "(($ac_try" in
20958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20959 *) ac_try_echo=$ac_try;;
20960esac
20961eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20962 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20963 ac_status=$?
6bae0ccf 20964 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20965 rm -f conftest.er1
20966 cat conftest.err >&5
c0d27fcc 20967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
20968 (exit $ac_status); } >/dev/null && {
20969 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20970 test ! -s conftest.err
20971 }; then
c0d27fcc 20972 ac_header_preproc=yes
503d2be0
AS
20973else
20974 echo "$as_me: failed program was:" >&5
19650fd6
AS
20975sed 's/^/| /' conftest.$ac_ext >&5
20976
c0d27fcc 20977 ac_header_preproc=no
a21616bd 20978fi
d6e01aa5 20979
503d2be0 20980rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
20981{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20982echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20983
20984# So? What about this header?
edfaf76d
LK
20985case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20986 yes:no: )
c0d27fcc
MR
20987 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20988echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20989 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20990echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20991 ac_header_preproc=yes
19650fd6 20992 ;;
edfaf76d 20993 no:yes:* )
c0d27fcc
MR
20994 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20995echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20996 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20997echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20998 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20999echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21000 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21001echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21002 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21003echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21004 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21005echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21006
19650fd6 21007 ;;
c0d27fcc 21008esac
d6e01aa5
KL
21009{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21010echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21011if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21012 echo $ECHO_N "(cached) $ECHO_C" >&6
21013else
edfaf76d 21014 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21015fi
d6e01aa5
KL
21016ac_res=`eval echo '${'$as_ac_Header'}'`
21017 { echo "$as_me:$LINENO: result: $ac_res" >&5
21018echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21019
21020fi
503d2be0 21021if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21022 cat >>confdefs.h <<_ACEOF
503d2be0 21023#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21024_ACEOF
503d2be0 21025
a21616bd 21026else
503d2be0
AS
21027
21028for ac_header in kerberosIV/des.h
a21616bd 21029do
503d2be0 21030as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21031if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21032 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21033echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21034if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21035 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 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; }
98418dba 21040else
c0d27fcc 21041 # Is the header compilable?
d6e01aa5
KL
21042{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21043echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21044cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21045/* confdefs.h. */
21046_ACEOF
21047cat confdefs.h >>conftest.$ac_ext
21048cat >>conftest.$ac_ext <<_ACEOF
21049/* end confdefs.h. */
c0d27fcc
MR
21050$ac_includes_default
21051#include <$ac_header>
21052_ACEOF
21053rm -f conftest.$ac_objext
d6e01aa5
KL
21054if { (ac_try="$ac_compile"
21055case "(($ac_try" in
21056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21057 *) ac_try_echo=$ac_try;;
21058esac
21059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21060 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21061 ac_status=$?
edfaf76d
LK
21062 grep -v '^ *+' conftest.er1 >conftest.err
21063 rm -f conftest.er1
21064 cat conftest.err >&5
c0d27fcc 21065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21066 (exit $ac_status); } && {
21067 test -z "$ac_c_werror_flag" ||
21068 test ! -s conftest.err
21069 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21070 ac_header_compiler=yes
21071else
21072 echo "$as_me: failed program was:" >&5
19650fd6
AS
21073sed 's/^/| /' conftest.$ac_ext >&5
21074
d6e01aa5 21075 ac_header_compiler=no
c0d27fcc 21076fi
d6e01aa5
KL
21077
21078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21079{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21080echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21081
21082# Is the header present?
d6e01aa5
KL
21083{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21084echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21085cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21086/* confdefs.h. */
21087_ACEOF
21088cat confdefs.h >>conftest.$ac_ext
21089cat >>conftest.$ac_ext <<_ACEOF
21090/* end confdefs.h. */
503d2be0
AS
21091#include <$ac_header>
21092_ACEOF
d6e01aa5
KL
21093if { (ac_try="$ac_cpp conftest.$ac_ext"
21094case "(($ac_try" in
21095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21096 *) ac_try_echo=$ac_try;;
21097esac
21098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21099 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21100 ac_status=$?
6bae0ccf 21101 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21102 rm -f conftest.er1
21103 cat conftest.err >&5
c0d27fcc 21104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21105 (exit $ac_status); } >/dev/null && {
21106 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21107 test ! -s conftest.err
21108 }; then
c0d27fcc 21109 ac_header_preproc=yes
503d2be0
AS
21110else
21111 echo "$as_me: failed program was:" >&5
19650fd6
AS
21112sed 's/^/| /' conftest.$ac_ext >&5
21113
c0d27fcc 21114 ac_header_preproc=no
a21616bd 21115fi
d6e01aa5 21116
503d2be0 21117rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21118{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21119echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21120
21121# So? What about this header?
edfaf76d
LK
21122case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21123 yes:no: )
c0d27fcc
MR
21124 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21125echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21126 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21127echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21128 ac_header_preproc=yes
19650fd6 21129 ;;
edfaf76d 21130 no:yes:* )
c0d27fcc
MR
21131 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21132echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21133 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21134echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21135 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21136echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21137 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21138echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21139 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21140echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21141 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21142echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21143
19650fd6 21144 ;;
c0d27fcc 21145esac
d6e01aa5
KL
21146{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21147echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21148if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21149 echo $ECHO_N "(cached) $ECHO_C" >&6
21150else
edfaf76d 21151 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21152fi
d6e01aa5
KL
21153ac_res=`eval echo '${'$as_ac_Header'}'`
21154 { echo "$as_me:$LINENO: result: $ac_res" >&5
21155echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21156
21157fi
503d2be0 21158if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21159 cat >>confdefs.h <<_ACEOF
503d2be0 21160#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21161_ACEOF
503d2be0 21162
a21616bd 21163else
503d2be0
AS
21164
21165for ac_header in kerberos/des.h
a21616bd 21166do
503d2be0 21167as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21168if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21169 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21170echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21171if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21172 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 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; }
98418dba 21177else
c0d27fcc 21178 # Is the header compilable?
d6e01aa5
KL
21179{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21180echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21181cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21182/* confdefs.h. */
21183_ACEOF
21184cat confdefs.h >>conftest.$ac_ext
21185cat >>conftest.$ac_ext <<_ACEOF
21186/* end confdefs.h. */
c0d27fcc
MR
21187$ac_includes_default
21188#include <$ac_header>
21189_ACEOF
21190rm -f conftest.$ac_objext
d6e01aa5
KL
21191if { (ac_try="$ac_compile"
21192case "(($ac_try" in
21193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21194 *) ac_try_echo=$ac_try;;
21195esac
21196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21197 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21198 ac_status=$?
edfaf76d
LK
21199 grep -v '^ *+' conftest.er1 >conftest.err
21200 rm -f conftest.er1
21201 cat conftest.err >&5
c0d27fcc 21202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21203 (exit $ac_status); } && {
21204 test -z "$ac_c_werror_flag" ||
21205 test ! -s conftest.err
21206 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21207 ac_header_compiler=yes
21208else
21209 echo "$as_me: failed program was:" >&5
19650fd6
AS
21210sed 's/^/| /' conftest.$ac_ext >&5
21211
d6e01aa5 21212 ac_header_compiler=no
c0d27fcc 21213fi
d6e01aa5
KL
21214
21215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21216{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21217echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21218
21219# Is the header present?
d6e01aa5
KL
21220{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21221echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21222cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21223/* confdefs.h. */
21224_ACEOF
21225cat confdefs.h >>conftest.$ac_ext
21226cat >>conftest.$ac_ext <<_ACEOF
21227/* end confdefs.h. */
503d2be0
AS
21228#include <$ac_header>
21229_ACEOF
d6e01aa5
KL
21230if { (ac_try="$ac_cpp conftest.$ac_ext"
21231case "(($ac_try" in
21232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21233 *) ac_try_echo=$ac_try;;
21234esac
21235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21236 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21237 ac_status=$?
6bae0ccf 21238 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21239 rm -f conftest.er1
21240 cat conftest.err >&5
c0d27fcc 21241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21242 (exit $ac_status); } >/dev/null && {
21243 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21244 test ! -s conftest.err
21245 }; then
c0d27fcc 21246 ac_header_preproc=yes
503d2be0
AS
21247else
21248 echo "$as_me: failed program was:" >&5
19650fd6
AS
21249sed 's/^/| /' conftest.$ac_ext >&5
21250
c0d27fcc 21251 ac_header_preproc=no
a21616bd 21252fi
d6e01aa5 21253
503d2be0 21254rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21255{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21256echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21257
21258# So? What about this header?
edfaf76d
LK
21259case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21260 yes:no: )
c0d27fcc
MR
21261 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21262echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21263 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21264echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21265 ac_header_preproc=yes
19650fd6 21266 ;;
edfaf76d 21267 no:yes:* )
c0d27fcc
MR
21268 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21269echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21270 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21271echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21272 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21273echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21274 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21275echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21276 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21277echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21278 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21279echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21280
19650fd6 21281 ;;
c0d27fcc 21282esac
d6e01aa5
KL
21283{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21284echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21285if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21286 echo $ECHO_N "(cached) $ECHO_C" >&6
21287else
edfaf76d 21288 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21289fi
d6e01aa5
KL
21290ac_res=`eval echo '${'$as_ac_Header'}'`
21291 { echo "$as_me:$LINENO: result: $ac_res" >&5
21292echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21293
21294fi
503d2be0 21295if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21296 cat >>confdefs.h <<_ACEOF
503d2be0 21297#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21298_ACEOF
a21616bd
KR
21299
21300fi
c0d27fcc 21301
a21616bd
KR
21302done
21303
98418dba 21304fi
c0d27fcc 21305
925c2f3f
EZ
21306done
21307
98418dba 21308fi
c0d27fcc 21309
925c2f3f 21310done
98418dba 21311
c0d27fcc 21312
925c2f3f
EZ
21313for ac_header in krb.h
21314do
21315as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21316if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21317 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21318echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21319if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 21320 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21321fi
d6e01aa5
KL
21322ac_res=`eval echo '${'$as_ac_Header'}'`
21323 { echo "$as_me:$LINENO: result: $ac_res" >&5
21324echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21325else
21326 # Is the header compilable?
d6e01aa5
KL
21327{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21328echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21329cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21330/* confdefs.h. */
21331_ACEOF
21332cat confdefs.h >>conftest.$ac_ext
21333cat >>conftest.$ac_ext <<_ACEOF
21334/* end confdefs.h. */
c0d27fcc
MR
21335$ac_includes_default
21336#include <$ac_header>
21337_ACEOF
21338rm -f conftest.$ac_objext
d6e01aa5
KL
21339if { (ac_try="$ac_compile"
21340case "(($ac_try" in
21341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21342 *) ac_try_echo=$ac_try;;
21343esac
21344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21345 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21346 ac_status=$?
edfaf76d
LK
21347 grep -v '^ *+' conftest.er1 >conftest.err
21348 rm -f conftest.er1
21349 cat conftest.err >&5
c0d27fcc 21350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21351 (exit $ac_status); } && {
21352 test -z "$ac_c_werror_flag" ||
21353 test ! -s conftest.err
21354 } && test -s conftest.$ac_objext; then
c0d27fcc 21355 ac_header_compiler=yes
925c2f3f 21356else
c0d27fcc 21357 echo "$as_me: failed program was:" >&5
19650fd6
AS
21358sed 's/^/| /' conftest.$ac_ext >&5
21359
d6e01aa5 21360 ac_header_compiler=no
c0d27fcc 21361fi
d6e01aa5
KL
21362
21363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21364{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21365echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21366
21367# Is the header present?
d6e01aa5
KL
21368{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21369echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21370cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21371/* confdefs.h. */
21372_ACEOF
21373cat confdefs.h >>conftest.$ac_ext
21374cat >>conftest.$ac_ext <<_ACEOF
21375/* end confdefs.h. */
503d2be0
AS
21376#include <$ac_header>
21377_ACEOF
d6e01aa5
KL
21378if { (ac_try="$ac_cpp conftest.$ac_ext"
21379case "(($ac_try" in
21380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21381 *) ac_try_echo=$ac_try;;
21382esac
21383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21384 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21385 ac_status=$?
6bae0ccf 21386 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21387 rm -f conftest.er1
21388 cat conftest.err >&5
c0d27fcc 21389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21390 (exit $ac_status); } >/dev/null && {
21391 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21392 test ! -s conftest.err
21393 }; then
c0d27fcc 21394 ac_header_preproc=yes
503d2be0
AS
21395else
21396 echo "$as_me: failed program was:" >&5
19650fd6
AS
21397sed 's/^/| /' conftest.$ac_ext >&5
21398
c0d27fcc 21399 ac_header_preproc=no
a21616bd 21400fi
d6e01aa5 21401
503d2be0 21402rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21403{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21404echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21405
21406# So? What about this header?
edfaf76d
LK
21407case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21408 yes:no: )
c0d27fcc
MR
21409 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21410echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21411 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21412echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21413 ac_header_preproc=yes
19650fd6 21414 ;;
edfaf76d 21415 no:yes:* )
c0d27fcc
MR
21416 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21417echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21418 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21419echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21420 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21421echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21422 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21423echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21424 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21425echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21426 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21427echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21428
19650fd6 21429 ;;
c0d27fcc 21430esac
d6e01aa5
KL
21431{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21432echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21433if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21434 echo $ECHO_N "(cached) $ECHO_C" >&6
21435else
edfaf76d 21436 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21437fi
d6e01aa5
KL
21438ac_res=`eval echo '${'$as_ac_Header'}'`
21439 { echo "$as_me:$LINENO: result: $ac_res" >&5
21440echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21441
21442fi
503d2be0 21443if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21444 cat >>confdefs.h <<_ACEOF
503d2be0 21445#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21446_ACEOF
503d2be0 21447
a21616bd 21448else
503d2be0
AS
21449
21450for ac_header in kerberosIV/krb.h
a21616bd 21451do
503d2be0 21452as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21453if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21454 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21455echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21456if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21457 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21458fi
d6e01aa5
KL
21459ac_res=`eval echo '${'$as_ac_Header'}'`
21460 { echo "$as_me:$LINENO: result: $ac_res" >&5
21461echo "${ECHO_T}$ac_res" >&6; }
98418dba 21462else
c0d27fcc 21463 # Is the header compilable?
d6e01aa5
KL
21464{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21465echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21466cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21467/* confdefs.h. */
21468_ACEOF
21469cat confdefs.h >>conftest.$ac_ext
21470cat >>conftest.$ac_ext <<_ACEOF
21471/* end confdefs.h. */
c0d27fcc
MR
21472$ac_includes_default
21473#include <$ac_header>
21474_ACEOF
21475rm -f conftest.$ac_objext
d6e01aa5
KL
21476if { (ac_try="$ac_compile"
21477case "(($ac_try" in
21478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21479 *) ac_try_echo=$ac_try;;
21480esac
21481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21482 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21483 ac_status=$?
edfaf76d
LK
21484 grep -v '^ *+' conftest.er1 >conftest.err
21485 rm -f conftest.er1
21486 cat conftest.err >&5
c0d27fcc 21487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21488 (exit $ac_status); } && {
21489 test -z "$ac_c_werror_flag" ||
21490 test ! -s conftest.err
21491 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21492 ac_header_compiler=yes
21493else
21494 echo "$as_me: failed program was:" >&5
19650fd6
AS
21495sed 's/^/| /' conftest.$ac_ext >&5
21496
d6e01aa5 21497 ac_header_compiler=no
c0d27fcc 21498fi
d6e01aa5
KL
21499
21500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21501{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21502echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21503
21504# Is the header present?
d6e01aa5
KL
21505{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21506echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21507cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21508/* confdefs.h. */
21509_ACEOF
21510cat confdefs.h >>conftest.$ac_ext
21511cat >>conftest.$ac_ext <<_ACEOF
21512/* end confdefs.h. */
503d2be0
AS
21513#include <$ac_header>
21514_ACEOF
d6e01aa5
KL
21515if { (ac_try="$ac_cpp conftest.$ac_ext"
21516case "(($ac_try" in
21517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21518 *) ac_try_echo=$ac_try;;
21519esac
21520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21521 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21522 ac_status=$?
6bae0ccf 21523 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21524 rm -f conftest.er1
21525 cat conftest.err >&5
c0d27fcc 21526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21527 (exit $ac_status); } >/dev/null && {
21528 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21529 test ! -s conftest.err
21530 }; then
c0d27fcc 21531 ac_header_preproc=yes
503d2be0
AS
21532else
21533 echo "$as_me: failed program was:" >&5
19650fd6
AS
21534sed 's/^/| /' conftest.$ac_ext >&5
21535
c0d27fcc 21536 ac_header_preproc=no
a21616bd 21537fi
d6e01aa5 21538
503d2be0 21539rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21540{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21541echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21542
21543# So? What about this header?
edfaf76d
LK
21544case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21545 yes:no: )
c0d27fcc
MR
21546 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21547echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21548 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21549echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21550 ac_header_preproc=yes
19650fd6 21551 ;;
edfaf76d 21552 no:yes:* )
c0d27fcc
MR
21553 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21554echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21555 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21556echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21557 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21558echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21559 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21560echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21561 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21562echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21563 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21564echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21565
19650fd6 21566 ;;
c0d27fcc 21567esac
d6e01aa5
KL
21568{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21569echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21570if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21571 echo $ECHO_N "(cached) $ECHO_C" >&6
21572else
edfaf76d 21573 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21574fi
d6e01aa5
KL
21575ac_res=`eval echo '${'$as_ac_Header'}'`
21576 { echo "$as_me:$LINENO: result: $ac_res" >&5
21577echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21578
21579fi
503d2be0 21580if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21581 cat >>confdefs.h <<_ACEOF
503d2be0 21582#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21583_ACEOF
503d2be0 21584
a21616bd 21585else
503d2be0
AS
21586
21587for ac_header in kerberos/krb.h
a21616bd 21588do
503d2be0 21589as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21590if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21591 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21592echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21593if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21594 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21595fi
d6e01aa5
KL
21596ac_res=`eval echo '${'$as_ac_Header'}'`
21597 { echo "$as_me:$LINENO: result: $ac_res" >&5
21598echo "${ECHO_T}$ac_res" >&6; }
98418dba 21599else
c0d27fcc 21600 # Is the header compilable?
d6e01aa5
KL
21601{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21602echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21603cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21604/* confdefs.h. */
21605_ACEOF
21606cat confdefs.h >>conftest.$ac_ext
21607cat >>conftest.$ac_ext <<_ACEOF
21608/* end confdefs.h. */
c0d27fcc
MR
21609$ac_includes_default
21610#include <$ac_header>
21611_ACEOF
21612rm -f conftest.$ac_objext
d6e01aa5
KL
21613if { (ac_try="$ac_compile"
21614case "(($ac_try" in
21615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21616 *) ac_try_echo=$ac_try;;
21617esac
21618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21619 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21620 ac_status=$?
edfaf76d
LK
21621 grep -v '^ *+' conftest.er1 >conftest.err
21622 rm -f conftest.er1
21623 cat conftest.err >&5
c0d27fcc 21624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21625 (exit $ac_status); } && {
21626 test -z "$ac_c_werror_flag" ||
21627 test ! -s conftest.err
21628 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21629 ac_header_compiler=yes
21630else
21631 echo "$as_me: failed program was:" >&5
19650fd6
AS
21632sed 's/^/| /' conftest.$ac_ext >&5
21633
d6e01aa5 21634 ac_header_compiler=no
c0d27fcc 21635fi
d6e01aa5
KL
21636
21637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21638{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21639echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21640
21641# Is the header present?
d6e01aa5
KL
21642{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21643echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21644cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21645/* confdefs.h. */
21646_ACEOF
21647cat confdefs.h >>conftest.$ac_ext
21648cat >>conftest.$ac_ext <<_ACEOF
21649/* end confdefs.h. */
503d2be0
AS
21650#include <$ac_header>
21651_ACEOF
d6e01aa5
KL
21652if { (ac_try="$ac_cpp conftest.$ac_ext"
21653case "(($ac_try" in
21654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21655 *) ac_try_echo=$ac_try;;
21656esac
21657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21658 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21659 ac_status=$?
6bae0ccf 21660 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21661 rm -f conftest.er1
21662 cat conftest.err >&5
c0d27fcc 21663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21664 (exit $ac_status); } >/dev/null && {
21665 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21666 test ! -s conftest.err
21667 }; then
c0d27fcc 21668 ac_header_preproc=yes
503d2be0
AS
21669else
21670 echo "$as_me: failed program was:" >&5
19650fd6
AS
21671sed 's/^/| /' conftest.$ac_ext >&5
21672
c0d27fcc 21673 ac_header_preproc=no
a21616bd 21674fi
d6e01aa5 21675
503d2be0 21676rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21677{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21678echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
21679
21680# So? What about this header?
edfaf76d
LK
21681case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21682 yes:no: )
35996d22
AS
21683 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21684echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21685 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21686echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21687 ac_header_preproc=yes
19650fd6 21688 ;;
edfaf76d 21689 no:yes:* )
c0d27fcc
MR
21690 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21691echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21692 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21693echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21694 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21695echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21696 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21697echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21698 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21699echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21700 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21701echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21702
19650fd6 21703 ;;
c0d27fcc 21704esac
d6e01aa5
KL
21705{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21706echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21707if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21708 echo $ECHO_N "(cached) $ECHO_C" >&6
21709else
edfaf76d 21710 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21711fi
d6e01aa5
KL
21712ac_res=`eval echo '${'$as_ac_Header'}'`
21713 { echo "$as_me:$LINENO: result: $ac_res" >&5
21714echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21715
21716fi
503d2be0 21717if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21718 cat >>confdefs.h <<_ACEOF
503d2be0 21719#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21720_ACEOF
503d2be0 21721
a21616bd 21722fi
c0d27fcc 21723
a21616bd
KR
21724done
21725
21726fi
c0d27fcc 21727
a21616bd
KR
21728done
21729
21730fi
c0d27fcc 21731
a21616bd
KR
21732done
21733
21734 fi
503d2be0
AS
21735
21736for ac_header in com_err.h
a21616bd 21737do
503d2be0 21738as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
21739if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21740 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21741echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21742if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21743 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21744fi
d6e01aa5
KL
21745ac_res=`eval echo '${'$as_ac_Header'}'`
21746 { echo "$as_me:$LINENO: result: $ac_res" >&5
21747echo "${ECHO_T}$ac_res" >&6; }
98418dba 21748else
c0d27fcc 21749 # Is the header compilable?
d6e01aa5
KL
21750{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21751echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21752cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21753/* confdefs.h. */
21754_ACEOF
21755cat confdefs.h >>conftest.$ac_ext
21756cat >>conftest.$ac_ext <<_ACEOF
21757/* end confdefs.h. */
c0d27fcc
MR
21758$ac_includes_default
21759#include <$ac_header>
21760_ACEOF
21761rm -f conftest.$ac_objext
d6e01aa5
KL
21762if { (ac_try="$ac_compile"
21763case "(($ac_try" in
21764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21765 *) ac_try_echo=$ac_try;;
21766esac
21767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21768 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
21769 ac_status=$?
21770 grep -v '^ *+' conftest.er1 >conftest.err
21771 rm -f conftest.er1
21772 cat conftest.err >&5
21773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21774 (exit $ac_status); } && {
21775 test -z "$ac_c_werror_flag" ||
21776 test ! -s conftest.err
21777 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21778 ac_header_compiler=yes
21779else
21780 echo "$as_me: failed program was:" >&5
19650fd6
AS
21781sed 's/^/| /' conftest.$ac_ext >&5
21782
d6e01aa5 21783 ac_header_compiler=no
c0d27fcc 21784fi
d6e01aa5
KL
21785
21786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21787{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21788echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21789
21790# Is the header present?
d6e01aa5
KL
21791{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21792echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21793cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21794/* confdefs.h. */
21795_ACEOF
21796cat confdefs.h >>conftest.$ac_ext
21797cat >>conftest.$ac_ext <<_ACEOF
21798/* end confdefs.h. */
503d2be0
AS
21799#include <$ac_header>
21800_ACEOF
d6e01aa5
KL
21801if { (ac_try="$ac_cpp conftest.$ac_ext"
21802case "(($ac_try" in
21803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21804 *) ac_try_echo=$ac_try;;
21805esac
21806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21807 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21808 ac_status=$?
6bae0ccf 21809 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21810 rm -f conftest.er1
21811 cat conftest.err >&5
c0d27fcc 21812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21813 (exit $ac_status); } >/dev/null && {
21814 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21815 test ! -s conftest.err
21816 }; then
c0d27fcc 21817 ac_header_preproc=yes
503d2be0
AS
21818else
21819 echo "$as_me: failed program was:" >&5
19650fd6
AS
21820sed 's/^/| /' conftest.$ac_ext >&5
21821
c0d27fcc 21822 ac_header_preproc=no
a21616bd 21823fi
d6e01aa5 21824
503d2be0 21825rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
21826{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21827echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21828
21829# So? What about this header?
edfaf76d
LK
21830case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21831 yes:no: )
c0d27fcc
MR
21832 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21833echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21834 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21835echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21836 ac_header_preproc=yes
19650fd6 21837 ;;
edfaf76d 21838 no:yes:* )
c0d27fcc
MR
21839 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21840echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21841 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21842echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21843 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21844echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21845 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21846echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21847 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21848echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21849 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21850echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 21851
19650fd6 21852 ;;
c0d27fcc 21853esac
d6e01aa5
KL
21854{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21855echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21856if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21857 echo $ECHO_N "(cached) $ECHO_C" >&6
21858else
edfaf76d 21859 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21860fi
d6e01aa5
KL
21861ac_res=`eval echo '${'$as_ac_Header'}'`
21862 { echo "$as_me:$LINENO: result: $ac_res" >&5
21863echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21864
21865fi
503d2be0 21866if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21867 cat >>confdefs.h <<_ACEOF
503d2be0 21868#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21869_ACEOF
503d2be0 21870
a21616bd 21871fi
c0d27fcc 21872
a21616bd
KR
21873done
21874
21875fi
21876
ba4481b5
DL
21877# Solaris requires -lintl if you want strerror (which calls dgettext)
21878# to return localized messages.
503d2be0 21879
d6e01aa5
KL
21880{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
21881echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
21882if test "${ac_cv_lib_intl_dgettext+set}" = set; then
21883 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21884else
503d2be0 21885 ac_check_lib_save_LIBS=$LIBS
ba4481b5 21886LIBS="-lintl $LIBS"
503d2be0 21887cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21888/* confdefs.h. */
21889_ACEOF
21890cat confdefs.h >>conftest.$ac_ext
21891cat >>conftest.$ac_ext <<_ACEOF
21892/* end confdefs.h. */
503d2be0 21893
d6e01aa5
KL
21894/* Override any GCC internal prototype to avoid an error.
21895 Use char because int might match the return type of a GCC
21896 builtin and then its argument prototype would still apply. */
503d2be0
AS
21897#ifdef __cplusplus
21898extern "C"
21899#endif
503d2be0
AS
21900char dgettext ();
21901int
21902main ()
21903{
d6e01aa5 21904return dgettext ();
503d2be0
AS
21905 ;
21906 return 0;
21907}
21908_ACEOF
21909rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
21910if { (ac_try="$ac_link"
21911case "(($ac_try" in
21912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21913 *) ac_try_echo=$ac_try;;
21914esac
21915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21916 (eval "$ac_link") 2>conftest.er1
503d2be0 21917 ac_status=$?
edfaf76d
LK
21918 grep -v '^ *+' conftest.er1 >conftest.err
21919 rm -f conftest.er1
21920 cat conftest.err >&5
c0d27fcc 21921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
21922 (exit $ac_status); } && {
21923 test -z "$ac_c_werror_flag" ||
21924 test ! -s conftest.err
21925 } && test -s conftest$ac_exeext &&
21926 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21927 ac_cv_lib_intl_dgettext=yes
21928else
21929 echo "$as_me: failed program was:" >&5
19650fd6
AS
21930sed 's/^/| /' conftest.$ac_ext >&5
21931
d6e01aa5 21932 ac_cv_lib_intl_dgettext=no
503d2be0 21933fi
d6e01aa5
KL
21934
21935rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21936 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21937LIBS=$ac_check_lib_save_LIBS
21938fi
d6e01aa5
KL
21939{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
21940echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 21941if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 21942 cat >>confdefs.h <<_ACEOF
503d2be0 21943#define HAVE_LIBINTL 1
c0d27fcc 21944_ACEOF
ba4481b5
DL
21945
21946 LIBS="-lintl $LIBS"
21947
ba4481b5
DL
21948fi
21949
c0d27fcc 21950
d6e01aa5
KL
21951{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
21952echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
21953if test "${emacs_cv_localtime_cache+set}" = set; then
21954 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
21955else
21956 if test x$ac_cv_func_tzset = xyes; then
21957if test "$cross_compiling" = yes; then
21958 # If we have tzset, assume the worst when cross-compiling.
21959emacs_cv_localtime_cache=yes
21960else
503d2be0 21961 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21962/* confdefs.h. */
21963_ACEOF
21964cat confdefs.h >>conftest.$ac_ext
21965cat >>conftest.$ac_ext <<_ACEOF
21966/* end confdefs.h. */
ba4481b5 21967#include <time.h>
ba4481b5
DL
21968extern char **environ;
21969unset_TZ ()
21970{
21971 char **from, **to;
21972 for (to = from = environ; (*to = *from); from++)
21973 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
21974 to++;
21975}
21976char TZ_GMT0[] = "TZ=GMT0";
21977char TZ_PST8[] = "TZ=PST8";
21978main()
21979{
21980 time_t now = time ((time_t *) 0);
21981 int hour_GMT0, hour_unset;
21982 if (putenv (TZ_GMT0) != 0)
21983 exit (1);
21984 hour_GMT0 = localtime (&now)->tm_hour;
21985 unset_TZ ();
21986 hour_unset = localtime (&now)->tm_hour;
21987 if (putenv (TZ_PST8) != 0)
21988 exit (1);
21989 if (localtime (&now)->tm_hour == hour_GMT0)
21990 exit (1);
21991 unset_TZ ();
21992 if (localtime (&now)->tm_hour != hour_unset)
21993 exit (1);
21994 exit (0);
21995}
503d2be0
AS
21996_ACEOF
21997rm -f conftest$ac_exeext
d6e01aa5
KL
21998if { (ac_try="$ac_link"
21999case "(($ac_try" in
22000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22001 *) ac_try_echo=$ac_try;;
22002esac
22003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22004 (eval "$ac_link") 2>&5
503d2be0 22005 ac_status=$?
c0d27fcc 22006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22007 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
22008 { (case "(($ac_try" in
22009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22010 *) ac_try_echo=$ac_try;;
22011esac
22012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22013 (eval "$ac_try") 2>&5
503d2be0 22014 ac_status=$?
c0d27fcc 22015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22016 (exit $ac_status); }; }; then
ba4481b5
DL
22017 emacs_cv_localtime_cache=no
22018else
503d2be0
AS
22019 echo "$as_me: program exited with status $ac_status" >&5
22020echo "$as_me: failed program was:" >&5
19650fd6
AS
22021sed 's/^/| /' conftest.$ac_ext >&5
22022
c0d27fcc 22023( exit $ac_status )
503d2be0 22024emacs_cv_localtime_cache=yes
ba4481b5 22025fi
d6e01aa5 22026rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 22027fi
d6e01aa5
KL
22028
22029
ba4481b5
DL
22030else
22031 # If we lack tzset, report that localtime does not cache TZ,
22032 # since we can't invalidate the cache if we don't have tzset.
22033 emacs_cv_localtime_cache=no
22034fi
22035fi
d6e01aa5
KL
22036{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
22037echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 22038if test $emacs_cv_localtime_cache = yes; then
b936fae4 22039
c0d27fcc 22040cat >>confdefs.h <<\_ACEOF
ba4481b5 22041#define LOCALTIME_CACHE 1
c0d27fcc 22042_ACEOF
ba4481b5
DL
22043
22044fi
22045
22046if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
22047
22048for ac_func in gettimeofday
48d4b120 22049do
503d2be0 22050as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
22051{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22052echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22053if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22054 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 22055else
503d2be0 22056 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22057/* confdefs.h. */
22058_ACEOF
22059cat confdefs.h >>conftest.$ac_ext
22060cat >>conftest.$ac_ext <<_ACEOF
22061/* end confdefs.h. */
edfaf76d
LK
22062/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22063 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22064#define $ac_func innocuous_$ac_func
22065
48d4b120 22066/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22067 which can conflict with char $ac_func (); below.
22068 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22069 <limits.h> exists even on freestanding compilers. */
edfaf76d 22070
19650fd6
AS
22071#ifdef __STDC__
22072# include <limits.h>
22073#else
22074# include <assert.h>
22075#endif
edfaf76d
LK
22076
22077#undef $ac_func
22078
d6e01aa5
KL
22079/* Override any GCC internal prototype to avoid an error.
22080 Use char because int might match the return type of a GCC
22081 builtin and then its argument prototype would still apply. */
503d2be0
AS
22082#ifdef __cplusplus
22083extern "C"
22084#endif
503d2be0 22085char $ac_func ();
48d4b120
DL
22086/* The GNU C library defines this for functions which it implements
22087 to always fail with ENOSYS. Some functions are actually named
22088 something starting with __ and the normal name is an alias. */
d6e01aa5 22089#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 22090choke me
cd958eb3
MB
22091#endif
22092
19650fd6
AS
22093int
22094main ()
22095{
d6e01aa5 22096return $ac_func ();
503d2be0
AS
22097 ;
22098 return 0;
22099}
22100_ACEOF
22101rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
22102if { (ac_try="$ac_link"
22103case "(($ac_try" in
22104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22105 *) ac_try_echo=$ac_try;;
22106esac
22107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22108 (eval "$ac_link") 2>conftest.er1
503d2be0 22109 ac_status=$?
edfaf76d
LK
22110 grep -v '^ *+' conftest.er1 >conftest.err
22111 rm -f conftest.er1
22112 cat conftest.err >&5
c0d27fcc 22113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22114 (exit $ac_status); } && {
22115 test -z "$ac_c_werror_flag" ||
22116 test ! -s conftest.err
22117 } && test -s conftest$ac_exeext &&
22118 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22119 eval "$as_ac_var=yes"
22120else
22121 echo "$as_me: failed program was:" >&5
19650fd6
AS
22122sed 's/^/| /' conftest.$ac_ext >&5
22123
d6e01aa5 22124 eval "$as_ac_var=no"
503d2be0 22125fi
d6e01aa5
KL
22126
22127rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22128 conftest$ac_exeext conftest.$ac_ext
503d2be0 22129fi
d6e01aa5
KL
22130ac_res=`eval echo '${'$as_ac_var'}'`
22131 { echo "$as_me:$LINENO: result: $ac_res" >&5
22132echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22133if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22134 cat >>confdefs.h <<_ACEOF
503d2be0 22135#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22136_ACEOF
48d4b120 22137
48d4b120
DL
22138fi
22139done
22140
b936fae4 22141 if test $ac_cv_func_gettimeofday = yes; then
d6e01aa5
KL
22142 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
22143echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
22144if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
22145 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22146else
503d2be0 22147 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22148/* confdefs.h. */
22149_ACEOF
22150cat confdefs.h >>conftest.$ac_ext
22151cat >>conftest.$ac_ext <<_ACEOF
22152/* end confdefs.h. */
ba4481b5 22153
a3f08d9e
DL
22154#ifdef TIME_WITH_SYS_TIME
22155#include <sys/time.h>
22156#include <time.h>
22157#else
22158#ifdef HAVE_SYS_TIME_H
22159#include <sys/time.h>
22160#else
22161#include <time.h>
22162#endif
22163#endif
503d2be0
AS
22164int
22165main ()
22166{
a3f08d9e 22167struct timeval time;
b936fae4 22168 gettimeofday (&time, 0);
503d2be0
AS
22169 ;
22170 return 0;
22171}
22172_ACEOF
22173rm -f conftest.$ac_objext
d6e01aa5
KL
22174if { (ac_try="$ac_compile"
22175case "(($ac_try" in
22176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22177 *) ac_try_echo=$ac_try;;
22178esac
22179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22180 (eval "$ac_compile") 2>conftest.er1
503d2be0 22181 ac_status=$?
edfaf76d
LK
22182 grep -v '^ *+' conftest.er1 >conftest.err
22183 rm -f conftest.er1
22184 cat conftest.err >&5
c0d27fcc 22185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22186 (exit $ac_status); } && {
22187 test -z "$ac_c_werror_flag" ||
22188 test ! -s conftest.err
22189 } && test -s conftest.$ac_objext; then
ba4481b5
DL
22190 emacs_cv_gettimeofday_two_arguments=yes
22191else
503d2be0 22192 echo "$as_me: failed program was:" >&5
19650fd6
AS
22193sed 's/^/| /' conftest.$ac_ext >&5
22194
d6e01aa5 22195 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 22196fi
d6e01aa5
KL
22197
22198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22199fi
d6e01aa5
KL
22200{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
22201echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
22202 if test $emacs_cv_gettimeofday_two_arguments = no; then
22203
c0d27fcc 22204cat >>confdefs.h <<\_ACEOF
ba4481b5 22205#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 22206_ACEOF
ba4481b5 22207
b936fae4 22208 fi
ba4481b5
DL
22209 fi
22210fi
22211
22212ok_so_far=yes
d6e01aa5
KL
22213{ echo "$as_me:$LINENO: checking for socket" >&5
22214echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
22215if test "${ac_cv_func_socket+set}" = set; then
22216 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22217else
503d2be0 22218 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22219/* confdefs.h. */
22220_ACEOF
22221cat confdefs.h >>conftest.$ac_ext
22222cat >>conftest.$ac_ext <<_ACEOF
22223/* end confdefs.h. */
edfaf76d
LK
22224/* Define socket to an innocuous variant, in case <limits.h> declares socket.
22225 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22226#define socket innocuous_socket
22227
ba4481b5 22228/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22229 which can conflict with char socket (); below.
22230 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22231 <limits.h> exists even on freestanding compilers. */
edfaf76d 22232
19650fd6
AS
22233#ifdef __STDC__
22234# include <limits.h>
22235#else
22236# include <assert.h>
22237#endif
edfaf76d
LK
22238
22239#undef socket
22240
d6e01aa5
KL
22241/* Override any GCC internal prototype to avoid an error.
22242 Use char because int might match the return type of a GCC
22243 builtin and then its argument prototype would still apply. */
503d2be0
AS
22244#ifdef __cplusplus
22245extern "C"
22246#endif
503d2be0 22247char socket ();
ba4481b5
DL
22248/* The GNU C library defines this for functions which it implements
22249 to always fail with ENOSYS. Some functions are actually named
22250 something starting with __ and the normal name is an alias. */
d6e01aa5 22251#if defined __stub_socket || defined __stub___socket
ba4481b5 22252choke me
cd958eb3
MB
22253#endif
22254
19650fd6
AS
22255int
22256main ()
22257{
d6e01aa5 22258return socket ();
503d2be0
AS
22259 ;
22260 return 0;
22261}
22262_ACEOF
22263rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
22264if { (ac_try="$ac_link"
22265case "(($ac_try" in
22266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22267 *) ac_try_echo=$ac_try;;
22268esac
22269eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22270 (eval "$ac_link") 2>conftest.er1
503d2be0 22271 ac_status=$?
edfaf76d
LK
22272 grep -v '^ *+' conftest.er1 >conftest.err
22273 rm -f conftest.er1
22274 cat conftest.err >&5
c0d27fcc 22275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22276 (exit $ac_status); } && {
22277 test -z "$ac_c_werror_flag" ||
22278 test ! -s conftest.err
22279 } && test -s conftest$ac_exeext &&
22280 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22281 ac_cv_func_socket=yes
22282else
22283 echo "$as_me: failed program was:" >&5
19650fd6
AS
22284sed 's/^/| /' conftest.$ac_ext >&5
22285
d6e01aa5 22286 ac_cv_func_socket=no
503d2be0 22287fi
d6e01aa5
KL
22288
22289rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22290 conftest$ac_exeext conftest.$ac_ext
503d2be0 22291fi
d6e01aa5
KL
22292{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
22293echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 22294if test $ac_cv_func_socket = yes; then
ba4481b5
DL
22295 :
22296else
503d2be0 22297 ok_so_far=no
ba4481b5
DL
22298fi
22299
22300if test $ok_so_far = yes; then
c0d27fcc 22301 if test "${ac_cv_header_netinet_in_h+set}" = set; then
d6e01aa5
KL
22302 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22303echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
22304if test "${ac_cv_header_netinet_in_h+set}" = set; then
22305 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22306fi
d6e01aa5
KL
22307{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22308echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 22309else
c0d27fcc 22310 # Is the header compilable?
d6e01aa5
KL
22311{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
22312echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 22313cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22314/* confdefs.h. */
22315_ACEOF
22316cat confdefs.h >>conftest.$ac_ext
22317cat >>conftest.$ac_ext <<_ACEOF
22318/* end confdefs.h. */
c0d27fcc
MR
22319$ac_includes_default
22320#include <netinet/in.h>
22321_ACEOF
22322rm -f conftest.$ac_objext
d6e01aa5
KL
22323if { (ac_try="$ac_compile"
22324case "(($ac_try" in
22325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22326 *) ac_try_echo=$ac_try;;
22327esac
22328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22329 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22330 ac_status=$?
edfaf76d
LK
22331 grep -v '^ *+' conftest.er1 >conftest.err
22332 rm -f conftest.er1
22333 cat conftest.err >&5
c0d27fcc 22334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22335 (exit $ac_status); } && {
22336 test -z "$ac_c_werror_flag" ||
22337 test ! -s conftest.err
22338 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22339 ac_header_compiler=yes
22340else
22341 echo "$as_me: failed program was:" >&5
19650fd6
AS
22342sed 's/^/| /' conftest.$ac_ext >&5
22343
d6e01aa5 22344 ac_header_compiler=no
c0d27fcc 22345fi
d6e01aa5
KL
22346
22347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22348{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22349echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22350
22351# Is the header present?
d6e01aa5
KL
22352{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22353echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22354cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22355/* confdefs.h. */
22356_ACEOF
22357cat confdefs.h >>conftest.$ac_ext
22358cat >>conftest.$ac_ext <<_ACEOF
22359/* end confdefs.h. */
ba4481b5 22360#include <netinet/in.h>
503d2be0 22361_ACEOF
d6e01aa5
KL
22362if { (ac_try="$ac_cpp conftest.$ac_ext"
22363case "(($ac_try" in
22364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22365 *) ac_try_echo=$ac_try;;
22366esac
22367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22368 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22369 ac_status=$?
6bae0ccf 22370 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22371 rm -f conftest.er1
22372 cat conftest.err >&5
c0d27fcc 22373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22374 (exit $ac_status); } >/dev/null && {
22375 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22376 test ! -s conftest.err
22377 }; then
c0d27fcc 22378 ac_header_preproc=yes
ba4481b5 22379else
503d2be0 22380 echo "$as_me: failed program was:" >&5
19650fd6
AS
22381sed 's/^/| /' conftest.$ac_ext >&5
22382
c0d27fcc 22383 ac_header_preproc=no
ba4481b5 22384fi
d6e01aa5 22385
503d2be0 22386rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
22387{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22388echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22389
22390# So? What about this header?
edfaf76d
LK
22391case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22392 yes:no: )
c0d27fcc
MR
22393 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22394echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22395 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22396echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
22397 ac_header_preproc=yes
19650fd6 22398 ;;
edfaf76d 22399 no:yes:* )
c0d27fcc
MR
22400 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22401echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22402 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22403echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22404 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22405echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22406 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22407echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22408 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 22409echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22410 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22411echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 22412
19650fd6 22413 ;;
c0d27fcc 22414esac
d6e01aa5
KL
22415{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22416echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
22417if test "${ac_cv_header_netinet_in_h+set}" = set; then
22418 echo $ECHO_N "(cached) $ECHO_C" >&6
22419else
22420 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22421fi
d6e01aa5
KL
22422{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22423echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22424
22425fi
503d2be0 22426if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22427 :
22428else
503d2be0 22429 ok_so_far=no
ba4481b5
DL
22430fi
22431
c0d27fcc 22432
ba4481b5
DL
22433fi
22434if test $ok_so_far = yes; then
c0d27fcc 22435 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
d6e01aa5
KL
22436 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22437echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
22438if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22439 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22440fi
d6e01aa5
KL
22441{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22442echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 22443else
c0d27fcc 22444 # Is the header compilable?
d6e01aa5
KL
22445{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
22446echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 22447cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22448/* confdefs.h. */
22449_ACEOF
22450cat confdefs.h >>conftest.$ac_ext
22451cat >>conftest.$ac_ext <<_ACEOF
22452/* end confdefs.h. */
c0d27fcc
MR
22453$ac_includes_default
22454#include <arpa/inet.h>
22455_ACEOF
22456rm -f conftest.$ac_objext
d6e01aa5
KL
22457if { (ac_try="$ac_compile"
22458case "(($ac_try" in
22459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22460 *) ac_try_echo=$ac_try;;
22461esac
22462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22463 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22464 ac_status=$?
edfaf76d
LK
22465 grep -v '^ *+' conftest.er1 >conftest.err
22466 rm -f conftest.er1
22467 cat conftest.err >&5
c0d27fcc 22468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22469 (exit $ac_status); } && {
22470 test -z "$ac_c_werror_flag" ||
22471 test ! -s conftest.err
22472 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22473 ac_header_compiler=yes
22474else
22475 echo "$as_me: failed program was:" >&5
19650fd6
AS
22476sed 's/^/| /' conftest.$ac_ext >&5
22477
d6e01aa5 22478 ac_header_compiler=no
c0d27fcc 22479fi
d6e01aa5
KL
22480
22481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22482{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22483echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22484
22485# Is the header present?
d6e01aa5
KL
22486{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
22487echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 22488cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22489/* confdefs.h. */
22490_ACEOF
22491cat confdefs.h >>conftest.$ac_ext
22492cat >>conftest.$ac_ext <<_ACEOF
22493/* end confdefs.h. */
ba4481b5 22494#include <arpa/inet.h>
503d2be0 22495_ACEOF
d6e01aa5
KL
22496if { (ac_try="$ac_cpp conftest.$ac_ext"
22497case "(($ac_try" in
22498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22499 *) ac_try_echo=$ac_try;;
22500esac
22501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22502 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22503 ac_status=$?
6bae0ccf 22504 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22505 rm -f conftest.er1
22506 cat conftest.err >&5
c0d27fcc 22507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22508 (exit $ac_status); } >/dev/null && {
22509 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22510 test ! -s conftest.err
22511 }; then
c0d27fcc 22512 ac_header_preproc=yes
ba4481b5 22513else
503d2be0 22514 echo "$as_me: failed program was:" >&5
19650fd6
AS
22515sed 's/^/| /' conftest.$ac_ext >&5
22516
c0d27fcc 22517 ac_header_preproc=no
ba4481b5 22518fi
d6e01aa5 22519
503d2be0 22520rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
22521{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22522echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22523
22524# So? What about this header?
edfaf76d
LK
22525case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22526 yes:no: )
c0d27fcc
MR
22527 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
22528echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22529 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
22530echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
22531 ac_header_preproc=yes
19650fd6 22532 ;;
edfaf76d 22533 no:yes:* )
c0d27fcc
MR
22534 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
22535echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22536 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
22537echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
22538 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
22539echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
22540 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
22541echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22542 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 22543echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22544 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
22545echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
d6e01aa5 22546
19650fd6 22547 ;;
c0d27fcc 22548esac
d6e01aa5
KL
22549{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22550echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
22551if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22552 echo $ECHO_N "(cached) $ECHO_C" >&6
22553else
22554 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 22555fi
d6e01aa5
KL
22556{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22557echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
22558
22559fi
503d2be0 22560if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
22561 :
22562else
503d2be0 22563 ok_so_far=no
ba4481b5
DL
22564fi
22565
c0d27fcc 22566
ba4481b5
DL
22567fi
22568if test $ok_so_far = yes; then
b936fae4 22569
c0d27fcc 22570cat >>confdefs.h <<\_ACEOF
ba4481b5 22571#define HAVE_INET_SOCKETS 1
c0d27fcc 22572_ACEOF
ba4481b5
DL
22573
22574fi
22575
2d2b6695 22576
7862d3a8 22577for ac_header in sys/ioctl.h
2d2b6695
KS
22578do
22579as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
22580if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22581 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22582echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22583if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
22584 echo $ECHO_N "(cached) $ECHO_C" >&6
22585fi
d6e01aa5
KL
22586ac_res=`eval echo '${'$as_ac_Header'}'`
22587 { echo "$as_me:$LINENO: result: $ac_res" >&5
22588echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
22589else
22590 # Is the header compilable?
d6e01aa5
KL
22591{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22592echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 22593cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
22594/* confdefs.h. */
22595_ACEOF
22596cat confdefs.h >>conftest.$ac_ext
22597cat >>conftest.$ac_ext <<_ACEOF
22598/* end confdefs.h. */
22599$ac_includes_default
22600#include <$ac_header>
22601_ACEOF
22602rm -f conftest.$ac_objext
d6e01aa5
KL
22603if { (ac_try="$ac_compile"
22604case "(($ac_try" in
22605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22606 *) ac_try_echo=$ac_try;;
22607esac
22608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22609 (eval "$ac_compile") 2>conftest.er1
2d2b6695 22610 ac_status=$?
edfaf76d
LK
22611 grep -v '^ *+' conftest.er1 >conftest.err
22612 rm -f conftest.er1
22613 cat conftest.err >&5
2d2b6695 22614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22615 (exit $ac_status); } && {
22616 test -z "$ac_c_werror_flag" ||
22617 test ! -s conftest.err
22618 } && test -s conftest.$ac_objext; then
2d2b6695
KS
22619 ac_header_compiler=yes
22620else
22621 echo "$as_me: failed program was:" >&5
22622sed 's/^/| /' conftest.$ac_ext >&5
22623
d6e01aa5 22624 ac_header_compiler=no
2d2b6695 22625fi
d6e01aa5
KL
22626
22627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22628{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22629echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
22630
22631# Is the header present?
d6e01aa5
KL
22632{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22633echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 22634cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
22635/* confdefs.h. */
22636_ACEOF
22637cat confdefs.h >>conftest.$ac_ext
22638cat >>conftest.$ac_ext <<_ACEOF
22639/* end confdefs.h. */
22640#include <$ac_header>
22641_ACEOF
d6e01aa5
KL
22642if { (ac_try="$ac_cpp conftest.$ac_ext"
22643case "(($ac_try" in
22644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22645 *) ac_try_echo=$ac_try;;
22646esac
22647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22648 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
22649 ac_status=$?
22650 grep -v '^ *+' conftest.er1 >conftest.err
22651 rm -f conftest.er1
22652 cat conftest.err >&5
22653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22654 (exit $ac_status); } >/dev/null && {
22655 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22656 test ! -s conftest.err
22657 }; then
2d2b6695
KS
22658 ac_header_preproc=yes
22659else
22660 echo "$as_me: failed program was:" >&5
22661sed 's/^/| /' conftest.$ac_ext >&5
22662
22663 ac_header_preproc=no
22664fi
d6e01aa5 22665
2d2b6695 22666rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
22667{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22668echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
22669
22670# So? What about this header?
edfaf76d
LK
22671case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22672 yes:no: )
2d2b6695
KS
22673 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22674echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22675 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22676echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22677 ac_header_preproc=yes
2d2b6695 22678 ;;
edfaf76d 22679 no:yes:* )
2d2b6695
KS
22680 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22681echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22682 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22683echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22684 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22685echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22686 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22687echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
22688 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22689echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22690 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22691echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 22692
2d2b6695
KS
22693 ;;
22694esac
d6e01aa5
KL
22695{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22696echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22697if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
22698 echo $ECHO_N "(cached) $ECHO_C" >&6
22699else
edfaf76d 22700 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 22701fi
d6e01aa5
KL
22702ac_res=`eval echo '${'$as_ac_Header'}'`
22703 { echo "$as_me:$LINENO: result: $ac_res" >&5
22704echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
22705
22706fi
22707if test `eval echo '${'$as_ac_Header'}'` = yes; then
22708 cat >>confdefs.h <<_ACEOF
22709#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22710_ACEOF
22711
22712fi
22713
22714done
22715
22716
ba4481b5 22717if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 22718
c0d27fcc 22719cat >>confdefs.h <<\_ACEOF
ba4481b5 22720#define HAVE_AIX_SMT_EXP 1
c0d27fcc 22721_ACEOF
ba4481b5
DL
22722
22723fi
22724
d6e01aa5
KL
22725{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
22726echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 22727if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
d6e01aa5
KL
22728 { echo "$as_me:$LINENO: result: yes" >&5
22729echo "${ECHO_T}yes" >&6; }
b936fae4 22730
c0d27fcc 22731cat >>confdefs.h <<\_ACEOF
3d9fec71 22732#define HAVE_DEV_PTMX 1
c0d27fcc 22733_ACEOF
3d9fec71
DL
22734
22735else
d6e01aa5
KL
22736 { echo "$as_me:$LINENO: result: no" >&5
22737echo "${ECHO_T}no" >&6; }
3d9fec71
DL
22738fi
22739
d6e01aa5
KL
22740{ echo "$as_me:$LINENO: checking for pid_t" >&5
22741echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
22742if test "${ac_cv_type_pid_t+set}" = set; then
22743 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 22744else
503d2be0 22745 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22746/* confdefs.h. */
22747_ACEOF
22748cat confdefs.h >>conftest.$ac_ext
22749cat >>conftest.$ac_ext <<_ACEOF
22750/* end confdefs.h. */
503d2be0 22751$ac_includes_default
d6e01aa5 22752typedef pid_t ac__type_new_;
503d2be0
AS
22753int
22754main ()
22755{
d6e01aa5 22756if ((ac__type_new_ *) 0)
503d2be0 22757 return 0;
d6e01aa5 22758if (sizeof (ac__type_new_))
503d2be0
AS
22759 return 0;
22760 ;
22761 return 0;
22762}
22763_ACEOF
22764rm -f conftest.$ac_objext
d6e01aa5
KL
22765if { (ac_try="$ac_compile"
22766case "(($ac_try" in
22767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22768 *) ac_try_echo=$ac_try;;
22769esac
22770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22771 (eval "$ac_compile") 2>conftest.er1
503d2be0 22772 ac_status=$?
edfaf76d
LK
22773 grep -v '^ *+' conftest.er1 >conftest.err
22774 rm -f conftest.er1
22775 cat conftest.err >&5
c0d27fcc 22776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22777 (exit $ac_status); } && {
22778 test -z "$ac_c_werror_flag" ||
22779 test ! -s conftest.err
22780 } && test -s conftest.$ac_objext; then
647847ea
DL
22781 ac_cv_type_pid_t=yes
22782else
503d2be0 22783 echo "$as_me: failed program was:" >&5
19650fd6
AS
22784sed 's/^/| /' conftest.$ac_ext >&5
22785
d6e01aa5 22786 ac_cv_type_pid_t=no
647847ea 22787fi
d6e01aa5
KL
22788
22789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 22790fi
d6e01aa5
KL
22791{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
22792echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
22793if test $ac_cv_type_pid_t = yes; then
22794 :
22795else
22796
c0d27fcc 22797cat >>confdefs.h <<_ACEOF
647847ea 22798#define pid_t int
c0d27fcc 22799_ACEOF
647847ea
DL
22800
22801fi
22802
c0d27fcc 22803
d6e01aa5 22804for ac_header in vfork.h
503d2be0
AS
22805do
22806as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
d6e01aa5
KL
22807if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22808 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22809echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22810if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22811 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22812fi
d6e01aa5
KL
22813ac_res=`eval echo '${'$as_ac_Header'}'`
22814 { echo "$as_me:$LINENO: result: $ac_res" >&5
22815echo "${ECHO_T}$ac_res" >&6; }
98418dba 22816else
c0d27fcc 22817 # Is the header compilable?
d6e01aa5
KL
22818{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22819echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22820cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22821/* confdefs.h. */
22822_ACEOF
22823cat confdefs.h >>conftest.$ac_ext
22824cat >>conftest.$ac_ext <<_ACEOF
22825/* end confdefs.h. */
c0d27fcc
MR
22826$ac_includes_default
22827#include <$ac_header>
22828_ACEOF
22829rm -f conftest.$ac_objext
d6e01aa5
KL
22830if { (ac_try="$ac_compile"
22831case "(($ac_try" in
22832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22833 *) ac_try_echo=$ac_try;;
22834esac
22835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22836 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22837 ac_status=$?
edfaf76d
LK
22838 grep -v '^ *+' conftest.er1 >conftest.err
22839 rm -f conftest.er1
22840 cat conftest.err >&5
c0d27fcc 22841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22842 (exit $ac_status); } && {
22843 test -z "$ac_c_werror_flag" ||
22844 test ! -s conftest.err
22845 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22846 ac_header_compiler=yes
22847else
22848 echo "$as_me: failed program was:" >&5
19650fd6
AS
22849sed 's/^/| /' conftest.$ac_ext >&5
22850
d6e01aa5 22851 ac_header_compiler=no
c0d27fcc 22852fi
d6e01aa5
KL
22853
22854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22855{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22856echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22857
22858# Is the header present?
d6e01aa5
KL
22859{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22860echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22861cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22862/* confdefs.h. */
22863_ACEOF
22864cat confdefs.h >>conftest.$ac_ext
22865cat >>conftest.$ac_ext <<_ACEOF
22866/* end confdefs.h. */
503d2be0
AS
22867#include <$ac_header>
22868_ACEOF
d6e01aa5
KL
22869if { (ac_try="$ac_cpp conftest.$ac_ext"
22870case "(($ac_try" in
22871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22872 *) ac_try_echo=$ac_try;;
22873esac
22874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22875 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22876 ac_status=$?
6bae0ccf 22877 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22878 rm -f conftest.er1
22879 cat conftest.err >&5
c0d27fcc 22880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
22881 (exit $ac_status); } >/dev/null && {
22882 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22883 test ! -s conftest.err
22884 }; then
c0d27fcc 22885 ac_header_preproc=yes
647847ea 22886else
503d2be0 22887 echo "$as_me: failed program was:" >&5
19650fd6
AS
22888sed 's/^/| /' conftest.$ac_ext >&5
22889
c0d27fcc 22890 ac_header_preproc=no
647847ea 22891fi
d6e01aa5 22892
503d2be0 22893rm -f conftest.err conftest.$ac_ext
d6e01aa5
KL
22894{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22895echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22896
22897# So? What about this header?
edfaf76d
LK
22898case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22899 yes:no: )
c0d27fcc
MR
22900 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22901echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22902 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22903echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22904 ac_header_preproc=yes
19650fd6 22905 ;;
edfaf76d 22906 no:yes:* )
c0d27fcc
MR
22907 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22908echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22909 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22910echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22911 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22912echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22913 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22914echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22915 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22916echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22917 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22918echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
d6e01aa5 22919
19650fd6 22920 ;;
c0d27fcc 22921esac
d6e01aa5
KL
22922{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22923echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22924if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22925 echo $ECHO_N "(cached) $ECHO_C" >&6
22926else
edfaf76d 22927 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 22928fi
d6e01aa5
KL
22929ac_res=`eval echo '${'$as_ac_Header'}'`
22930 { echo "$as_me:$LINENO: result: $ac_res" >&5
22931echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22932
22933fi
503d2be0 22934if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22935 cat >>confdefs.h <<_ACEOF
503d2be0 22936#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22937_ACEOF
647847ea 22938
73b77ee5 22939fi
c0d27fcc 22940
503d2be0 22941done
73b77ee5 22942
c0d27fcc
MR
22943
22944
503d2be0
AS
22945for ac_func in fork vfork
22946do
22947as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
d6e01aa5
KL
22948{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22949echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22950if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22951 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22952else
503d2be0 22953 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22954/* confdefs.h. */
22955_ACEOF
22956cat confdefs.h >>conftest.$ac_ext
22957cat >>conftest.$ac_ext <<_ACEOF
22958/* end confdefs.h. */
edfaf76d
LK
22959/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22960 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22961#define $ac_func innocuous_$ac_func
22962
fa0b693c 22963/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22964 which can conflict with char $ac_func (); below.
22965 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22966 <limits.h> exists even on freestanding compilers. */
edfaf76d 22967
19650fd6
AS
22968#ifdef __STDC__
22969# include <limits.h>
22970#else
22971# include <assert.h>
22972#endif
edfaf76d
LK
22973
22974#undef $ac_func
22975
d6e01aa5
KL
22976/* Override any GCC internal prototype to avoid an error.
22977 Use char because int might match the return type of a GCC
22978 builtin and then its argument prototype would still apply. */
503d2be0
AS
22979#ifdef __cplusplus
22980extern "C"
22981#endif
503d2be0 22982char $ac_func ();
fa0b693c
GM
22983/* The GNU C library defines this for functions which it implements
22984 to always fail with ENOSYS. Some functions are actually named
22985 something starting with __ and the normal name is an alias. */
d6e01aa5 22986#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 22987choke me
fa0b693c
GM
22988#endif
22989
19650fd6
AS
22990int
22991main ()
22992{
d6e01aa5 22993return $ac_func ();
503d2be0
AS
22994 ;
22995 return 0;
22996}
22997_ACEOF
22998rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
22999if { (ac_try="$ac_link"
23000case "(($ac_try" in
23001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23002 *) ac_try_echo=$ac_try;;
23003esac
23004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23005 (eval "$ac_link") 2>conftest.er1
503d2be0 23006 ac_status=$?
edfaf76d
LK
23007 grep -v '^ *+' conftest.er1 >conftest.err
23008 rm -f conftest.er1
23009 cat conftest.err >&5
c0d27fcc 23010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23011 (exit $ac_status); } && {
23012 test -z "$ac_c_werror_flag" ||
23013 test ! -s conftest.err
23014 } && test -s conftest$ac_exeext &&
23015 $as_test_x conftest$ac_exeext; then
503d2be0
AS
23016 eval "$as_ac_var=yes"
23017else
23018 echo "$as_me: failed program was:" >&5
19650fd6
AS
23019sed 's/^/| /' conftest.$ac_ext >&5
23020
d6e01aa5 23021 eval "$as_ac_var=no"
503d2be0 23022fi
d6e01aa5
KL
23023
23024rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23025 conftest$ac_exeext conftest.$ac_ext
503d2be0 23026fi
d6e01aa5
KL
23027ac_res=`eval echo '${'$as_ac_var'}'`
23028 { echo "$as_me:$LINENO: result: $ac_res" >&5
23029echo "${ECHO_T}$ac_res" >&6; }
503d2be0 23030if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 23031 cat >>confdefs.h <<_ACEOF
503d2be0 23032#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 23033_ACEOF
503d2be0 23034
fa0b693c 23035fi
503d2be0 23036done
fa0b693c 23037
503d2be0 23038if test "x$ac_cv_func_fork" = xyes; then
d6e01aa5
KL
23039 { echo "$as_me:$LINENO: checking for working fork" >&5
23040echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
23041if test "${ac_cv_func_fork_works+set}" = set; then
23042 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23043else
503d2be0
AS
23044 if test "$cross_compiling" = yes; then
23045 ac_cv_func_fork_works=cross
23046else
23047 cat >conftest.$ac_ext <<_ACEOF
c3a63088
KL
23048/* confdefs.h. */
23049_ACEOF
23050cat confdefs.h >>conftest.$ac_ext
23051cat >>conftest.$ac_ext <<_ACEOF
23052/* end confdefs.h. */
23053$ac_includes_default
23054int
23055main ()
23056{
23057
23058 /* By Ruediger Kuhlmann. */
d6e01aa5 23059 return fork () < 0;
c3a63088
KL
23060
23061 ;
23062 return 0;
23063}
503d2be0
AS
23064_ACEOF
23065rm -f conftest$ac_exeext
d6e01aa5
KL
23066if { (ac_try="$ac_link"
23067case "(($ac_try" in
23068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23069 *) ac_try_echo=$ac_try;;
23070esac
23071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23072 (eval "$ac_link") 2>&5
503d2be0 23073 ac_status=$?
c0d27fcc 23074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23075 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
23076 { (case "(($ac_try" in
23077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23078 *) ac_try_echo=$ac_try;;
23079esac
23080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23081 (eval "$ac_try") 2>&5
503d2be0 23082 ac_status=$?
c0d27fcc 23083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23084 (exit $ac_status); }; }; then
23085 ac_cv_func_fork_works=yes
23086else
23087 echo "$as_me: program exited with status $ac_status" >&5
23088echo "$as_me: failed program was:" >&5
19650fd6
AS
23089sed 's/^/| /' conftest.$ac_ext >&5
23090
c0d27fcc 23091( exit $ac_status )
503d2be0
AS
23092ac_cv_func_fork_works=no
23093fi
d6e01aa5 23094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 23095fi
d6e01aa5
KL
23096
23097
503d2be0 23098fi
d6e01aa5
KL
23099{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
23100echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 23101
6bae0ccf
DL
23102else
23103 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
23104fi
23105if test "x$ac_cv_func_fork_works" = xcross; then
23106 case $host in
23107 *-*-amigaos* | *-*-msdosdjgpp*)
23108 # Override, as these systems have only a dummy fork() stub
23109 ac_cv_func_fork_works=no
23110 ;;
23111 *)
23112 ac_cv_func_fork_works=yes
23113 ;;
23114 esac
c0d27fcc
MR
23115 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23116echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 23117fi
73b77ee5 23118ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 23119if test "x$ac_cv_func_vfork" = xyes; then
d6e01aa5
KL
23120 { echo "$as_me:$LINENO: checking for working vfork" >&5
23121echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
23122if test "${ac_cv_func_vfork_works+set}" = set; then
23123 echo $ECHO_N "(cached) $ECHO_C" >&6
23124else
23125 if test "$cross_compiling" = yes; then
23126 ac_cv_func_vfork_works=cross
fa0b693c 23127else
503d2be0 23128 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23129/* confdefs.h. */
23130_ACEOF
23131cat confdefs.h >>conftest.$ac_ext
23132cat >>conftest.$ac_ext <<_ACEOF
23133/* end confdefs.h. */
73b77ee5 23134/* Thanks to Paul Eggert for this test. */
d6e01aa5 23135$ac_includes_default
19650fd6 23136#include <sys/wait.h>
d6e01aa5 23137#ifdef HAVE_VFORK_H
503d2be0 23138# include <vfork.h>
73b77ee5
GM
23139#endif
23140/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
23141 argument registers are propagated back to the parent. The compiler
23142 is told about this with #include <vfork.h>, but some compilers
23143 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
23144 static variable whose address is put into a register that is
23145 clobbered by the vfork. */
19650fd6 23146static void
fa0b693c 23147#ifdef __cplusplus
73b77ee5 23148sparc_address_test (int arg)
503d2be0 23149# else
73b77ee5 23150sparc_address_test (arg) int arg;
fa0b693c 23151#endif
fa0b693c 23152{
73b77ee5
GM
23153 static pid_t child;
23154 if (!child) {
23155 child = vfork ();
23156 if (child < 0) {
23157 perror ("vfork");
23158 _exit(2);
23159 }
23160 if (!child) {
23161 arg = getpid();
23162 write(-1, "", 0);
23163 _exit (arg);
23164 }
23165 }
23166}
503d2be0
AS
23167
23168int
23169main ()
23170{
73b77ee5
GM
23171 pid_t parent = getpid ();
23172 pid_t child;
fa0b693c 23173
19650fd6 23174 sparc_address_test (0);
fa0b693c 23175
73b77ee5 23176 child = vfork ();
fa0b693c 23177
73b77ee5 23178 if (child == 0) {
503d2be0
AS
23179 /* Here is another test for sparc vfork register problems. This
23180 test uses lots of local variables, at least as many local
23181 variables as main has allocated so far including compiler
23182 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
23183 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
23184 reuse the register of parent for one of the local variables,
23185 since it will think that parent can't possibly be used any more
23186 in this routine. Assigning to the local variable will thus
23187 munge parent in the parent process. */
73b77ee5
GM
23188 pid_t
23189 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23190 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23191 /* Convince the compiler that p..p7 are live; otherwise, it might
23192 use the same hardware register for all 8 local variables. */
23193 if (p != p1 || p != p2 || p != p3 || p != p4
23194 || p != p5 || p != p6 || p != p7)
23195 _exit(1);
fa0b693c 23196
503d2be0
AS
23197 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23198 from child file descriptors. If the child closes a descriptor
23199 before it execs or exits, this munges the parent's descriptor
23200 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
23201 _exit(close(fileno(stdout)) != 0);
23202 } else {
23203 int status;
23204 struct stat st;
23205
23206 while (wait(&status) != child)
23207 ;
d6e01aa5 23208 return (
73b77ee5
GM
23209 /* Was there some problem with vforking? */
23210 child < 0
23211
23212 /* Did the child fail? (This shouldn't happen.) */
23213 || status
23214
23215 /* Did the vfork/compiler bug occur? */
23216 || parent != getpid()
fa0b693c 23217
73b77ee5
GM
23218 /* Did the file descriptor bug occur? */
23219 || fstat(fileno(stdout), &st) != 0
23220 );
23221 }
23222}
503d2be0
AS
23223_ACEOF
23224rm -f conftest$ac_exeext
d6e01aa5
KL
23225if { (ac_try="$ac_link"
23226case "(($ac_try" in
23227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23228 *) ac_try_echo=$ac_try;;
23229esac
23230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23231 (eval "$ac_link") 2>&5
503d2be0 23232 ac_status=$?
c0d27fcc 23233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23234 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
d6e01aa5
KL
23235 { (case "(($ac_try" in
23236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23237 *) ac_try_echo=$ac_try;;
23238esac
23239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23240 (eval "$ac_try") 2>&5
503d2be0 23241 ac_status=$?
c0d27fcc 23242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23243 (exit $ac_status); }; }; then
73b77ee5 23244 ac_cv_func_vfork_works=yes
fa0b693c 23245else
503d2be0
AS
23246 echo "$as_me: program exited with status $ac_status" >&5
23247echo "$as_me: failed program was:" >&5
19650fd6
AS
23248sed 's/^/| /' conftest.$ac_ext >&5
23249
c0d27fcc 23250( exit $ac_status )
503d2be0
AS
23251ac_cv_func_vfork_works=no
23252fi
d6e01aa5 23253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 23254fi
d6e01aa5
KL
23255
23256
fa0b693c 23257fi
d6e01aa5
KL
23258{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
23259echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 23260
503d2be0
AS
23261fi;
23262if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 23263 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
23264 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23265echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
23266fi
23267
503d2be0
AS
23268if test "x$ac_cv_func_vfork_works" = xyes; then
23269
c0d27fcc 23270cat >>confdefs.h <<\_ACEOF
503d2be0 23271#define HAVE_WORKING_VFORK 1
c0d27fcc 23272_ACEOF
503d2be0
AS
23273
23274else
23275
c0d27fcc 23276cat >>confdefs.h <<\_ACEOF
73b77ee5 23277#define vfork fork
c0d27fcc 23278_ACEOF
fa0b693c
GM
23279
23280fi
503d2be0
AS
23281if test "x$ac_cv_func_fork_works" = xyes; then
23282
c0d27fcc 23283cat >>confdefs.h <<\_ACEOF
503d2be0 23284#define HAVE_WORKING_FORK 1
c0d27fcc 23285_ACEOF
fa0b693c 23286
503d2be0 23287fi
647847ea 23288
c0d27fcc 23289
d6e01aa5
KL
23290{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
23291echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
23292if test "${emacs_cv_langinfo_codeset+set}" = set; then
23293 echo $ECHO_N "(cached) $ECHO_C" >&6
23294else
23295 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23296/* confdefs.h. */
23297_ACEOF
23298cat confdefs.h >>conftest.$ac_ext
23299cat >>conftest.$ac_ext <<_ACEOF
23300/* end confdefs.h. */
6a3a24fa
JD
23301#include <langinfo.h>
23302int
23303main ()
23304{
23305char* cs = nl_langinfo(CODESET);
23306 ;
23307 return 0;
23308}
23309_ACEOF
23310rm -f conftest.$ac_objext conftest$ac_exeext
d6e01aa5
KL
23311if { (ac_try="$ac_link"
23312case "(($ac_try" in
23313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23314 *) ac_try_echo=$ac_try;;
23315esac
23316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23317 (eval "$ac_link") 2>conftest.er1
6a3a24fa 23318 ac_status=$?
edfaf76d
LK
23319 grep -v '^ *+' conftest.er1 >conftest.err
23320 rm -f conftest.er1
23321 cat conftest.err >&5
6a3a24fa 23322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23323 (exit $ac_status); } && {
23324 test -z "$ac_c_werror_flag" ||
23325 test ! -s conftest.err
23326 } && test -s conftest$ac_exeext &&
23327 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23328 emacs_cv_langinfo_codeset=yes
23329else
23330 echo "$as_me: failed program was:" >&5
19650fd6
AS
23331sed 's/^/| /' conftest.$ac_ext >&5
23332
d6e01aa5 23333 emacs_cv_langinfo_codeset=no
6a3a24fa 23334fi
d6e01aa5
KL
23335
23336rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23337 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23338
23339fi
d6e01aa5
KL
23340{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23341echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23342if test $emacs_cv_langinfo_codeset = yes; then
23343
23344cat >>confdefs.h <<\_ACEOF
23345#define HAVE_LANGINFO_CODESET 1
23346_ACEOF
23347
23348fi
23349
d6e01aa5
KL
23350{ echo "$as_me:$LINENO: checking for size_t" >&5
23351echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
23352if test "${ac_cv_type_size_t+set}" = set; then
23353 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23354else
503d2be0 23355 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23356/* confdefs.h. */
23357_ACEOF
23358cat confdefs.h >>conftest.$ac_ext
23359cat >>conftest.$ac_ext <<_ACEOF
23360/* end confdefs.h. */
503d2be0 23361$ac_includes_default
d6e01aa5 23362typedef size_t ac__type_new_;
503d2be0
AS
23363int
23364main ()
23365{
d6e01aa5 23366if ((ac__type_new_ *) 0)
503d2be0 23367 return 0;
d6e01aa5 23368if (sizeof (ac__type_new_))
503d2be0
AS
23369 return 0;
23370 ;
23371 return 0;
23372}
23373_ACEOF
23374rm -f conftest.$ac_objext
d6e01aa5
KL
23375if { (ac_try="$ac_compile"
23376case "(($ac_try" in
23377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23378 *) ac_try_echo=$ac_try;;
23379esac
23380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23381 (eval "$ac_compile") 2>conftest.er1
503d2be0 23382 ac_status=$?
edfaf76d
LK
23383 grep -v '^ *+' conftest.er1 >conftest.err
23384 rm -f conftest.er1
23385 cat conftest.err >&5
c0d27fcc 23386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23387 (exit $ac_status); } && {
23388 test -z "$ac_c_werror_flag" ||
23389 test ! -s conftest.err
23390 } && test -s conftest.$ac_objext; then
8730a8da
DL
23391 ac_cv_type_size_t=yes
23392else
503d2be0 23393 echo "$as_me: failed program was:" >&5
19650fd6
AS
23394sed 's/^/| /' conftest.$ac_ext >&5
23395
d6e01aa5 23396 ac_cv_type_size_t=no
8730a8da 23397fi
d6e01aa5
KL
23398
23399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 23400fi
d6e01aa5
KL
23401{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23402echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 23403if test $ac_cv_type_size_t = yes; then
503d2be0 23404
c0d27fcc
MR
23405cat >>confdefs.h <<_ACEOF
23406#define HAVE_SIZE_T 1
23407_ACEOF
23408
8730a8da
DL
23409
23410fi
23411
c0d27fcc 23412
d6e01aa5
KL
23413{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23414echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
23415if test "${ac_cv_type_mbstate_t+set}" = set; then
23416 echo $ECHO_N "(cached) $ECHO_C" >&6
23417else
23418 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23419/* confdefs.h. */
23420_ACEOF
23421cat confdefs.h >>conftest.$ac_ext
23422cat >>conftest.$ac_ext <<_ACEOF
23423/* end confdefs.h. */
973a76b1
DL
23424$ac_includes_default
23425# include <wchar.h>
23426int
23427main ()
23428{
23429mbstate_t x; return sizeof x;
23430 ;
23431 return 0;
23432}
23433_ACEOF
23434rm -f conftest.$ac_objext
d6e01aa5
KL
23435if { (ac_try="$ac_compile"
23436case "(($ac_try" in
23437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23438 *) ac_try_echo=$ac_try;;
23439esac
23440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23441 (eval "$ac_compile") 2>conftest.er1
973a76b1 23442 ac_status=$?
edfaf76d
LK
23443 grep -v '^ *+' conftest.er1 >conftest.err
23444 rm -f conftest.er1
23445 cat conftest.err >&5
973a76b1 23446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23447 (exit $ac_status); } && {
23448 test -z "$ac_c_werror_flag" ||
23449 test ! -s conftest.err
23450 } && test -s conftest.$ac_objext; then
973a76b1
DL
23451 ac_cv_type_mbstate_t=yes
23452else
23453 echo "$as_me: failed program was:" >&5
19650fd6
AS
23454sed 's/^/| /' conftest.$ac_ext >&5
23455
d6e01aa5 23456 ac_cv_type_mbstate_t=no
973a76b1 23457fi
d6e01aa5
KL
23458
23459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 23460fi
d6e01aa5
KL
23461{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
23462echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
23463 if test $ac_cv_type_mbstate_t = yes; then
23464
23465cat >>confdefs.h <<\_ACEOF
23466#define HAVE_MBSTATE_T 1
23467_ACEOF
23468
23469 else
23470
23471cat >>confdefs.h <<\_ACEOF
23472#define mbstate_t int
23473_ACEOF
23474
23475 fi
23476
d6e01aa5
KL
23477{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
23478echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
23479if test "${emacs_cv_c_restrict+set}" = set; then
23480 echo $ECHO_N "(cached) $ECHO_C" >&6
23481else
23482 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23483/* confdefs.h. */
23484_ACEOF
23485cat confdefs.h >>conftest.$ac_ext
23486cat >>conftest.$ac_ext <<_ACEOF
23487/* end confdefs.h. */
22044edf
DL
23488void fred (int *restrict x);
23489int
23490main ()
23491{
b936fae4 23492
22044edf
DL
23493 ;
23494 return 0;
23495}
c0d27fcc 23496_ACEOF
22044edf 23497rm -f conftest.$ac_objext
d6e01aa5
KL
23498if { (ac_try="$ac_compile"
23499case "(($ac_try" in
23500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23501 *) ac_try_echo=$ac_try;;
23502esac
23503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23504 (eval "$ac_compile") 2>conftest.er1
22044edf 23505 ac_status=$?
edfaf76d
LK
23506 grep -v '^ *+' conftest.er1 >conftest.err
23507 rm -f conftest.er1
23508 cat conftest.err >&5
22044edf 23509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23510 (exit $ac_status); } && {
23511 test -z "$ac_c_werror_flag" ||
23512 test ! -s conftest.err
23513 } && test -s conftest.$ac_objext; then
22044edf
DL
23514 emacs_cv_c_restrict=yes
23515else
23516 echo "$as_me: failed program was:" >&5
19650fd6
AS
23517sed 's/^/| /' conftest.$ac_ext >&5
23518
d6e01aa5 23519 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23520/* confdefs.h. */
23521_ACEOF
23522cat confdefs.h >>conftest.$ac_ext
23523cat >>conftest.$ac_ext <<_ACEOF
23524/* end confdefs.h. */
22044edf
DL
23525void fred (int *__restrict x);
23526int
23527main ()
23528{
c0d27fcc 23529
22044edf
DL
23530 ;
23531 return 0;
23532}
c0d27fcc 23533_ACEOF
22044edf 23534rm -f conftest.$ac_objext
d6e01aa5
KL
23535if { (ac_try="$ac_compile"
23536case "(($ac_try" in
23537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23538 *) ac_try_echo=$ac_try;;
23539esac
23540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23541 (eval "$ac_compile") 2>conftest.er1
22044edf 23542 ac_status=$?
edfaf76d
LK
23543 grep -v '^ *+' conftest.er1 >conftest.err
23544 rm -f conftest.er1
23545 cat conftest.err >&5
22044edf 23546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23547 (exit $ac_status); } && {
23548 test -z "$ac_c_werror_flag" ||
23549 test ! -s conftest.err
23550 } && test -s conftest.$ac_objext; then
22044edf
DL
23551 emacs_cv_c_restrict=__restrict
23552else
23553 echo "$as_me: failed program was:" >&5
19650fd6
AS
23554sed 's/^/| /' conftest.$ac_ext >&5
23555
d6e01aa5 23556 emacs_cv_c_restrict=no
ba4481b5 23557fi
d6e01aa5
KL
23558
23559rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23560fi
d6e01aa5
KL
23561
23562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23563fi
d6e01aa5
KL
23564{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
23565echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
23566case "$emacs_cv_c_restrict" in
23567 yes) emacs_restrict=restrict;;
23568 no) emacs_restrict="";;
23569 *) emacs_restrict="$emacs_cv_c_restrict";;
23570esac
23571if test "$emacs_restrict" != __restrict; then
b936fae4 23572
22044edf
DL
23573cat >>confdefs.h <<_ACEOF
23574#define __restrict $emacs_restrict
c0d27fcc 23575_ACEOF
ba4481b5
DL
23576
23577fi
ba4481b5 23578
d6e01aa5
KL
23579{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
23580echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
23581if test "${emacs_cv_c_restrict_arr+set}" = set; then
23582 echo $ECHO_N "(cached) $ECHO_C" >&6
23583else
23584 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23585/* confdefs.h. */
23586_ACEOF
23587cat confdefs.h >>conftest.$ac_ext
23588cat >>conftest.$ac_ext <<_ACEOF
23589/* end confdefs.h. */
22044edf
DL
23590void fred (int x[__restrict]);
23591int
23592main ()
23593{
b936fae4 23594
22044edf
DL
23595 ;
23596 return 0;
23597}
c0d27fcc 23598_ACEOF
22044edf 23599rm -f conftest.$ac_objext
d6e01aa5
KL
23600if { (ac_try="$ac_compile"
23601case "(($ac_try" in
23602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23603 *) ac_try_echo=$ac_try;;
23604esac
23605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23606 (eval "$ac_compile") 2>conftest.er1
22044edf 23607 ac_status=$?
edfaf76d
LK
23608 grep -v '^ *+' conftest.er1 >conftest.err
23609 rm -f conftest.er1
23610 cat conftest.err >&5
22044edf 23611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
d6e01aa5
KL
23612 (exit $ac_status); } && {
23613 test -z "$ac_c_werror_flag" ||
23614 test ! -s conftest.err
23615 } && test -s conftest.$ac_objext; then
22044edf
DL
23616 emacs_cv_c_restrict_arr=yes
23617else
23618 echo "$as_me: failed program was:" >&5
19650fd6
AS
23619sed 's/^/| /' conftest.$ac_ext >&5
23620
d6e01aa5 23621 emacs_cv_c_restrict_arr=no
ba4481b5 23622fi
d6e01aa5
KL
23623
23624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 23625fi
d6e01aa5
KL
23626{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
23627echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 23628if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 23629
c0d27fcc 23630cat >>confdefs.h <<\_ACEOF
22044edf 23631#define __restrict_arr __restrict
c0d27fcc 23632_ACEOF
ba4481b5 23633
ba4481b5
DL
23634fi
23635
c0d27fcc 23636
c0d27fcc 23637
22044edf
DL
23638# Set up the CFLAGS for real compilation, so we can substitute it.
23639CFLAGS="$REAL_CFLAGS"
23640CPPFLAGS="$REAL_CPPFLAGS"
23641
23642#### Find out which version of Emacs this is.
23643version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
23644 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
23645if test x"${version}" = x; then
23646 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
23647echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
23648 { (exit 1); exit 1; }; }
23649fi
23650
23651### Specify what sort of things we'll be editing into Makefile and config.h.
23652### Use configuration here uncanonicalized to avoid exceeding size limits.
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662
23663
23664
23665
23666
23667
23668
23669
23670
23671
23672
23673
23674
23675
23676
23677
23678
23679
23680
23681
23682
23683
23684
6a3a24fa 23685
22044edf
DL
23686
23687
23688cat >>confdefs.h <<_ACEOF
23689#define EMACS_CONFIGURATION "${canonical}"
23690_ACEOF
23691
23692
23693cat >>confdefs.h <<_ACEOF
23694#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
23695_ACEOF
23696
23697
23698cat >>confdefs.h <<_ACEOF
23699#define config_machfile "${machfile}"
23700_ACEOF
23701
23702
23703cat >>confdefs.h <<_ACEOF
23704#define config_opsysfile "${opsysfile}"
23705_ACEOF
23706
23707
23708cat >>confdefs.h <<_ACEOF
23709#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
23710_ACEOF
23711
23712
23713cat >>confdefs.h <<_ACEOF
23714#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
23715_ACEOF
23716
23717
23718cat >>confdefs.h <<_ACEOF
23719#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
23720_ACEOF
23721
23722
23723cat >>confdefs.h <<_ACEOF
23724#define UNEXEC_SRC ${UNEXEC_SRC}
23725_ACEOF
23726
23727
23728if test "${HAVE_X_WINDOWS}" = "yes" ; then
23729
23730cat >>confdefs.h <<\_ACEOF
23731#define HAVE_X_WINDOWS 1
23732_ACEOF
23733
23734fi
23735if test "${USE_X_TOOLKIT}" != "none" ; then
23736
23737cat >>confdefs.h <<\_ACEOF
23738#define USE_X_TOOLKIT 1
23739_ACEOF
23740
23741fi
23742if test "${HAVE_X11}" = "yes" ; then
23743
23744cat >>confdefs.h <<\_ACEOF
23745#define HAVE_X11 1
23746_ACEOF
23747
23748fi
23749if test "${HAVE_XFREE386}" = "yes" ; then
23750
23751cat >>confdefs.h <<\_ACEOF
23752#define HAVE_XFREE386 1
23753_ACEOF
23754
23755fi
23756if test "${HAVE_MENUS}" = "yes" ; then
23757
23758cat >>confdefs.h <<\_ACEOF
23759#define HAVE_MENUS 1
23760_ACEOF
23761
23762fi
23763if test "${GNU_MALLOC}" = "yes" ; then
23764
23765cat >>confdefs.h <<\_ACEOF
23766#define GNU_MALLOC 1
23767_ACEOF
23768
23769fi
23770if test "${REL_ALLOC}" = "yes" ; then
23771
23772cat >>confdefs.h <<\_ACEOF
23773#define REL_ALLOC 1
23774_ACEOF
23775
23776fi
23777
23778
23779
c0d27fcc
MR
23780
23781
5afbeb22 23782
ba4481b5 23783#### Report on what we decided to do.
488dd4c4
JD
23784#### Report GTK as a toolkit, even if it doesn't use Xt.
23785#### It makes printing result more understandable as using GTK sets
23786#### toolkit_scroll_bars to yes by default.
23787if test "${HAVE_GTK}" = "yes"; then
23788 USE_X_TOOLKIT=GTK
23789fi
23790
ba4481b5
DL
23791echo "
23792Configured for \`${canonical}'.
23793
23794 Where should the build process find the source code? ${srcdir}
23795 What operating system and machine description files should Emacs use?
23796 \`${opsysfile}' and \`${machfile}'
23797 What compiler should emacs be built with? ${CC} ${CFLAGS}
23798 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 23799 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 23800 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 23801 What window system should Emacs use? ${window_system}
8e967cf7 23802 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
23803
23804if test -n "${x_includes}"; then
23805echo " Where do we find X Windows header files? ${x_includes}"
23806else
23807echo " Where do we find X Windows header files? Standard dirs"
23808fi
23809if test -n "${x_libraries}"; then
23810echo " Where do we find X Windows libraries? ${x_libraries}"
23811else
23812echo " Where do we find X Windows libraries? Standard dirs"
23813fi
23814
23815echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
23816echo " Does Emacs use -lXpm? ${HAVE_XPM}"
23817echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
23818echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 23819echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 23820echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 23821echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 23822echo " Does Emacs use -lgpm? ${HAVE_GPM}"
ba4481b5
DL
23823echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
23824echo
23825
d0098f13
JD
23826if test $USE_XASSERTS = yes; then
23827 echo " Compiling with asserts turned on."
d0098f13
JD
23828 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
23829 echo
23830fi
05cf15c6 23831
a2d3b5bd
JD
23832if test "$USE_X_TOOLKIT" = GTK; then
23833 case "$canonical" in
23834 *cygwin*)
23835 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
23836 will probably get a crash on startup. If this happens, please use another
23837 toolkit for Emacs. See etc/PROBLEMS for more information."
23838 ;;
23839 esac
23840fi
23841
05cf15c6 23842
f0e04acc
GM
23843if test "$HAVE_CARBON" = "yes"; then
23844 echo
23845 echo "Warning: The Mac Carbon port is currently unsupported and has
23846known problems. It is not recommended for use by non-developers.
23847Read the emacs-devel archives for more information."
23848 echo
23849fi
23850
05cf15c6 23851
ba4481b5
DL
23852# Remove any trailing slashes in these variables.
23853test "${prefix}" != NONE &&
23854 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
23855test "${exec_prefix}" != NONE &&
23856 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
23857
d0e9bfd2
GM
23858## Check if the C preprocessor will convert `..' to `. .'. If so, set
23859## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
23860## from Makefile.c can correctly provide the arg `-traditional' to the
23861## C preprocessor.
23862
503d2be0 23863cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23864/* confdefs.h. */
23865_ACEOF
23866cat confdefs.h >>conftest.$ac_ext
23867cat >>conftest.$ac_ext <<_ACEOF
23868/* end confdefs.h. */
d0e9bfd2 23869yes..yes
503d2be0 23870_ACEOF
d0e9bfd2 23871if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 23872 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
23873 CPP_NEED_TRADITIONAL=no
23874else
d0e9bfd2
GM
23875 CPP_NEED_TRADITIONAL=yes
23876fi
23877rm -f conftest*
23878
c0d27fcc 23879
f657c21b 23880ac_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
23881
23882ac_config_commands="$ac_config_commands default"
23883
503d2be0 23884cat >confcache <<\_ACEOF
ba4481b5
DL
23885# This file is a shell script that caches the results of configure
23886# tests run on this system so they can be shared between configure
503d2be0
AS
23887# scripts and configure runs, see configure's option --config-cache.
23888# It is not useful on other systems. If it contains results you don't
23889# want to keep, you may remove or edit it.
ba4481b5 23890#
503d2be0
AS
23891# config.status only pays attention to the cache file if you give it
23892# the --recheck option to rerun configure.
ba4481b5 23893#
6bae0ccf 23894# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
23895# loading this file, other *unset* `ac_cv_foo' will be assigned the
23896# following values.
23897
23898_ACEOF
23899
ba4481b5
DL
23900# The following way of writing the cache mishandles newlines in values,
23901# but we know of no workaround that is simple, portable, and efficient.
d6e01aa5 23902# So, we kill variables containing newlines.
ba4481b5
DL
23903# Ultrix sh set writes to stderr and can't be redirected directly,
23904# and sets the high bit in the cache file unless we assign to the vars.
d6e01aa5
KL
23905(
23906 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23907 eval ac_val=\$$ac_var
23908 case $ac_val in #(
23909 *${as_nl}*)
23910 case $ac_var in #(
23911 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23912echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23913 esac
23914 case $ac_var in #(
23915 _ | IFS | as_nl) ;; #(
23916 *) $as_unset $ac_var ;;
23917 esac ;;
23918 esac
23919 done
23920
503d2be0 23921 (set) 2>&1 |
d6e01aa5
KL
23922 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23923 *${as_nl}ac_space=\ *)
503d2be0
AS
23924 # `set' does not quote correctly, so add quotes (double-quote
23925 # substitution turns \\\\ into \\, and sed turns \\ into \).
23926 sed -n \
edfaf76d
LK
23927 "s/'/'\\\\''/g;
23928 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
d6e01aa5 23929 ;; #(
503d2be0
AS
23930 *)
23931 # `set' quotes correctly as required by POSIX, so do not add quotes.
d6e01aa5 23932 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 23933 ;;
d6e01aa5
KL
23934 esac |
23935 sort
23936) |
503d2be0 23937 sed '
d6e01aa5 23938 /^ac_cv_env_/b end
503d2be0 23939 t clear
d6e01aa5 23940 :clear
503d2be0
AS
23941 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23942 t end
d6e01aa5
KL
23943 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23944 :end' >>confcache
23945if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23946 if test -w "$cache_file"; then
23947 test "x$cache_file" != "x/dev/null" &&
23948 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23949echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 23950 cat confcache >$cache_file
ba4481b5 23951 else
d6e01aa5
KL
23952 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23953echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
23954 fi
23955fi
23956rm -f confcache
23957
ba4481b5
DL
23958test "x$prefix" = xNONE && prefix=$ac_default_prefix
23959# Let make expand exec_prefix.
23960test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23961
ba4481b5
DL
23962DEFS=-DHAVE_CONFIG_H
23963
6bae0ccf
DL
23964ac_libobjs=
23965ac_ltlibobjs=
23966for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23967 # 1. Remove the extension, and $U if already installed.
d6e01aa5
KL
23968 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
23969 ac_i=`echo "$ac_i" | sed "$ac_script"`
23970 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
23971 # will be set to the directory where LIBOBJS objects are built.
23972 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23973 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
23974done
23975LIBOBJS=$ac_libobjs
23976
23977LTLIBOBJS=$ac_ltlibobjs
23978
23979
c0d27fcc 23980
ba4481b5 23981: ${CONFIG_STATUS=./config.status}
503d2be0
AS
23982ac_clean_files_save=$ac_clean_files
23983ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 23984{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
23985echo "$as_me: creating $CONFIG_STATUS" >&6;}
23986cat >$CONFIG_STATUS <<_ACEOF
23987#! $SHELL
c0d27fcc 23988# Generated by $as_me.
ba4481b5 23989# Run this file to recreate the current configuration.
ba4481b5 23990# Compiler output produced by configure, useful for debugging
503d2be0 23991# configure, is in config.log if it exists.
ba4481b5 23992
503d2be0 23993debug=false
19650fd6
AS
23994ac_cs_recheck=false
23995ac_cs_silent=false
503d2be0 23996SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
23997_ACEOF
23998
23999cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
24000## --------------------- ##
24001## M4sh Initialization. ##
24002## --------------------- ##
24003
d6e01aa5
KL
24004# Be more Bourne compatible
24005DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
24006if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24007 emulate sh
24008 NULLCMD=:
6bae0ccf
DL
24009 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24010 # is contrary to our usage. Disable this feature.
24011 alias -g '${1+"$@"}'='"$@"'
d6e01aa5
KL
24012 setopt NO_GLOB_SUBST
24013else
24014 case `(set -o) 2>/dev/null` in
24015 *posix*) set -o posix ;;
24016esac
24017
24018fi
24019
24020
24021
24022
24023# PATH needs CR
24024# Avoid depending upon Character Ranges.
24025as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24026as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24027as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24028as_cr_digits='0123456789'
24029as_cr_alnum=$as_cr_Letters$as_cr_digits
24030
24031# The user is always right.
24032if test "${PATH_SEPARATOR+set}" != set; then
24033 echo "#! /bin/sh" >conf$$.sh
24034 echo "exit 0" >>conf$$.sh
24035 chmod +x conf$$.sh
24036 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24037 PATH_SEPARATOR=';'
24038 else
24039 PATH_SEPARATOR=:
24040 fi
24041 rm -f conf$$.sh
503d2be0
AS
24042fi
24043
c0d27fcc 24044# Support unset when possible.
edfaf76d 24045if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
24046 as_unset=unset
24047else
24048 as_unset=false
24049fi
24050
6bae0ccf 24051
d6e01aa5
KL
24052# IFS
24053# We need space, tab and new line, in precisely that order. Quoting is
24054# there to prevent editors from complaining about space-tab.
24055# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24056# splitting by setting IFS to empty value.)
24057as_nl='
24058'
24059IFS=" "" $as_nl"
24060
24061# Find who we are. Look in the path if we contain no directory separator.
24062case $0 in
24063 *[\\/]* ) as_myself=$0 ;;
24064 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24065for as_dir in $PATH
24066do
24067 IFS=$as_save_IFS
24068 test -z "$as_dir" && as_dir=.
24069 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24070done
24071IFS=$as_save_IFS
24072
24073 ;;
24074esac
24075# We did not find ourselves, most probably we were run as `sh COMMAND'
24076# in which case we are not to be found in the path.
24077if test "x$as_myself" = x; then
24078 as_myself=$0
24079fi
24080if test ! -f "$as_myself"; then
24081 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24082 { (exit 1); exit 1; }
24083fi
24084
6bae0ccf 24085# Work around bugs in pre-3.0 UWIN ksh.
d6e01aa5
KL
24086for as_var in ENV MAIL MAILPATH
24087do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24088done
6bae0ccf
DL
24089PS1='$ '
24090PS2='> '
24091PS4='+ '
24092
24093# NLS nuisances.
19650fd6
AS
24094for as_var in \
24095 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24096 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24097 LC_TELEPHONE LC_TIME
6bae0ccf 24098do
edfaf76d 24099 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
24100 eval $as_var=C; export $as_var
24101 else
d6e01aa5 24102 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
24103 fi
24104done
24105
24106# Required to use basename.
d6e01aa5
KL
24107if expr a : '\(a\)' >/dev/null 2>&1 &&
24108 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
24109 as_expr=expr
24110else
24111 as_expr=false
24112fi
24113
d6e01aa5 24114if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
24115 as_basename=basename
24116else
24117 as_basename=false
24118fi
c0d27fcc
MR
24119
24120
503d2be0 24121# Name of the executable.
d6e01aa5 24122as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
24123$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24124 X"$0" : 'X\(//\)$' \| \
d6e01aa5 24125 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 24126echo X/"$0" |
d6e01aa5
KL
24127 sed '/^.*\/\([^/][^/]*\)\/*$/{
24128 s//\1/
24129 q
24130 }
24131 /^X\/\(\/\/\)$/{
24132 s//\1/
24133 q
24134 }
24135 /^X\/\(\/\).*/{
24136 s//\1/
24137 q
24138 }
24139 s/.*/./; q'`
c0d27fcc 24140
d6e01aa5
KL
24141# CDPATH.
24142$as_unset CDPATH
c0d27fcc
MR
24143
24144
c0d27fcc 24145
c0d27fcc
MR
24146 as_lineno_1=$LINENO
24147 as_lineno_2=$LINENO
c0d27fcc 24148 test "x$as_lineno_1" != "x$as_lineno_2" &&
d6e01aa5 24149 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
24150
24151 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24152 # uniformly replaced by the line number. The first 'sed' inserts a
d6e01aa5
KL
24153 # line-number line after each line using $LINENO; the second 'sed'
24154 # does the real work. The second script uses 'N' to pair each
24155 # line-number line with the line containing $LINENO, and appends
24156 # trailing '-' during substitution so that $LINENO is not a special
24157 # case at line end.
c0d27fcc 24158 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
d6e01aa5
KL
24159 # scripts with optimization help from Paolo Bonzini. Blame Lee
24160 # E. McMahon (1931-1989) for sed's syntax. :-)
24161 sed -n '
24162 p
24163 /[$]LINENO/=
24164 ' <$as_myself |
c0d27fcc 24165 sed '
d6e01aa5
KL
24166 s/[$]LINENO.*/&-/
24167 t lineno
24168 b
24169 :lineno
c0d27fcc 24170 N
d6e01aa5
KL
24171 :loop
24172 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 24173 t loop
d6e01aa5 24174 s/-\n.*//
c0d27fcc 24175 ' >$as_me.lineno &&
d6e01aa5
KL
24176 chmod +x "$as_me.lineno" ||
24177 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
24178 { (exit 1); exit 1; }; }
24179
24180 # Don't try to exec as it changes $[0], causing all sort of problems
24181 # (the dirname of $[0] is not the place where we might find the
d6e01aa5
KL
24182 # original and so on. Autoconf is especially sensitive to this).
24183 . "./$as_me.lineno"
c0d27fcc
MR
24184 # Exit status is that of the last command.
24185 exit
24186}
24187
24188
d6e01aa5
KL
24189if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24190 as_dirname=dirname
24191else
24192 as_dirname=false
24193fi
24194
24195ECHO_C= ECHO_N= ECHO_T=
24196case `echo -n x` in
24197-n*)
24198 case `echo 'x\c'` in
24199 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24200 *) ECHO_C='\c';;
24201 esac;;
24202*)
24203 ECHO_N='-n';;
c0d27fcc 24204esac
503d2be0 24205
d6e01aa5
KL
24206if expr a : '\(a\)' >/dev/null 2>&1 &&
24207 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
24208 as_expr=expr
24209else
24210 as_expr=false
24211fi
24212
24213rm -f conf$$ conf$$.exe conf$$.file
d6e01aa5
KL
24214if test -d conf$$.dir; then
24215 rm -f conf$$.dir/conf$$.file
24216else
24217 rm -f conf$$.dir
24218 mkdir conf$$.dir
24219fi
503d2be0
AS
24220echo >conf$$.file
24221if ln -s conf$$.file conf$$ 2>/dev/null; then
d6e01aa5
KL
24222 as_ln_s='ln -s'
24223 # ... but there are two gotchas:
24224 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24225 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24226 # In both cases, we have to default to `cp -p'.
24227 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 24228 as_ln_s='cp -p'
503d2be0
AS
24229elif ln conf$$.file conf$$ 2>/dev/null; then
24230 as_ln_s=ln
24231else
24232 as_ln_s='cp -p'
24233fi
d6e01aa5
KL
24234rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24235rmdir conf$$.dir 2>/dev/null
503d2be0 24236
6bae0ccf
DL
24237if mkdir -p . 2>/dev/null; then
24238 as_mkdir_p=:
24239else
edfaf76d 24240 test -d ./-p && rmdir ./-p
6bae0ccf
DL
24241 as_mkdir_p=false
24242fi
24243
d6e01aa5
KL
24244if test -x / >/dev/null 2>&1; then
24245 as_test_x='test -x'
24246else
24247 if ls -dL / >/dev/null 2>&1; then
24248 as_ls_L_option=L
24249 else
24250 as_ls_L_option=
24251 fi
24252 as_test_x='
24253 eval sh -c '\''
24254 if test -d "$1"; then
24255 test -d "$1/.";
24256 else
24257 case $1 in
24258 -*)set "./$1";;
24259 esac;
24260 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24261 ???[sx]*):;;*)false;;esac;fi
24262 '\'' sh
24263 '
24264fi
24265as_executable_p=$as_test_x
503d2be0 24266
c0d27fcc 24267# Sed expression to map a string onto a valid CPP name.
edfaf76d 24268as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
24269
24270# Sed expression to map a string onto a valid variable name.
edfaf76d 24271as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 24272
503d2be0 24273
503d2be0
AS
24274exec 6>&1
24275
d6e01aa5 24276# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 24277# report actual input values of CONFIG_FILES etc. instead of their
d6e01aa5
KL
24278# values after options handling.
24279ac_log="
c0d27fcc 24280This file was extended by $as_me, which was
d6e01aa5 24281generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
24282
24283 CONFIG_FILES = $CONFIG_FILES
24284 CONFIG_HEADERS = $CONFIG_HEADERS
24285 CONFIG_LINKS = $CONFIG_LINKS
24286 CONFIG_COMMANDS = $CONFIG_COMMANDS
24287 $ $0 $@
24288
d6e01aa5
KL
24289on `(hostname || uname -n) 2>/dev/null | sed 1q`
24290"
24291
503d2be0
AS
24292_ACEOF
24293
d6e01aa5 24294cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24295# Files that config.status was made for.
d6e01aa5
KL
24296config_files="$ac_config_files"
24297config_headers="$ac_config_headers"
24298config_commands="$ac_config_commands"
503d2be0 24299
d6e01aa5 24300_ACEOF
503d2be0 24301
c0d27fcc 24302cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24303ac_cs_usage="\
24304\`$as_me' instantiates files from templates according to the
24305current configuration.
24306
24307Usage: $0 [OPTIONS] [FILE]...
24308
24309 -h, --help print this help, then exit
d6e01aa5 24310 -V, --version print version number and configuration settings, then exit
19650fd6 24311 -q, --quiet do not print progress messages
503d2be0
AS
24312 -d, --debug don't remove temporary files
24313 --recheck update $as_me by reconfiguring in the same conditions
24314 --file=FILE[:TEMPLATE]
edfaf76d 24315 instantiate the configuration file FILE
503d2be0 24316 --header=FILE[:TEMPLATE]
edfaf76d 24317 instantiate the configuration header FILE
503d2be0
AS
24318
24319Configuration files:
24320$config_files
24321
24322Configuration headers:
24323$config_headers
24324
24325Configuration commands:
24326$config_commands
24327
24328Report bugs to <bug-autoconf@gnu.org>."
503d2be0 24329
d6e01aa5 24330_ACEOF
c0d27fcc 24331cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
24332ac_cs_version="\\
24333config.status
d6e01aa5
KL
24334configured by $0, generated by GNU Autoconf 2.61,
24335 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24336
d6e01aa5 24337Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24338This config.status script is free software; the Free Software Foundation
24339gives unlimited permission to copy, distribute and modify it."
d6e01aa5
KL
24340
24341ac_pwd='$ac_pwd'
24342srcdir='$srcdir'
24343INSTALL='$INSTALL'
c0d27fcc 24344_ACEOF
503d2be0 24345
c0d27fcc 24346cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24347# If no file are specified by the user, then we need to provide default
24348# value. By we need to know if files were specified by the user.
24349ac_need_defaults=:
24350while test $# != 0
ba4481b5 24351do
503d2be0
AS
24352 case $1 in
24353 --*=*)
d6e01aa5
KL
24354 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24355 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24356 ac_shift=:
24357 ;;
d6e01aa5 24358 *)
6bae0ccf
DL
24359 ac_option=$1
24360 ac_optarg=$2
24361 ac_shift=shift
503d2be0 24362 ;;
503d2be0
AS
24363 esac
24364
6bae0ccf 24365 case $ac_option in
503d2be0 24366 # Handling of the options.
19650fd6
AS
24367 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24368 ac_cs_recheck=: ;;
d6e01aa5
KL
24369 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24370 echo "$ac_cs_version"; exit ;;
24371 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24372 debug=: ;;
24373 --file | --fil | --fi | --f )
6bae0ccf
DL
24374 $ac_shift
24375 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24376 ac_need_defaults=false;;
24377 --header | --heade | --head | --hea )
6bae0ccf
DL
24378 $ac_shift
24379 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24380 ac_need_defaults=false;;
d6e01aa5
KL
24381 --he | --h)
24382 # Conflict between --help and --header
24383 { echo "$as_me: error: ambiguous option: $1
24384Try \`$0 --help' for more information." >&2
24385 { (exit 1); exit 1; }; };;
24386 --help | --hel | -h )
24387 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
24388 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24389 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24390 ac_cs_silent=: ;;
503d2be0
AS
24391
24392 # This is an error.
d6e01aa5
KL
24393 -*) { echo "$as_me: error: unrecognized option: $1
24394Try \`$0 --help' for more information." >&2
503d2be0
AS
24395 { (exit 1); exit 1; }; } ;;
24396
d6e01aa5
KL
24397 *) ac_config_targets="$ac_config_targets $1"
24398 ac_need_defaults=false ;;
503d2be0 24399
ba4481b5 24400 esac
503d2be0 24401 shift
ba4481b5
DL
24402done
24403
19650fd6
AS
24404ac_configure_extra_args=
24405
24406if $ac_cs_silent; then
24407 exec 6>/dev/null
24408 ac_configure_extra_args="$ac_configure_extra_args --silent"
24409fi
24410
24411_ACEOF
24412cat >>$CONFIG_STATUS <<_ACEOF
24413if \$ac_cs_recheck; then
d6e01aa5
KL
24414 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24415 CONFIG_SHELL=$SHELL
24416 export CONFIG_SHELL
24417 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
24418fi
24419
503d2be0 24420_ACEOF
d6e01aa5
KL
24421cat >>$CONFIG_STATUS <<\_ACEOF
24422exec 5>>config.log
24423{
24424 echo
24425 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24426## Running $as_me. ##
24427_ASBOX
24428 echo "$ac_log"
24429} >&5
ba4481b5 24430
d6e01aa5 24431_ACEOF
c0d27fcc 24432cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24433#
d6e01aa5 24434# INIT-COMMANDS
503d2be0 24435#
503d2be0
AS
24436GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
24437
c0d27fcc
MR
24438_ACEOF
24439
c0d27fcc 24440cat >>$CONFIG_STATUS <<\_ACEOF
d6e01aa5
KL
24441
24442# Handling of arguments.
503d2be0
AS
24443for ac_config_target in $ac_config_targets
24444do
d6e01aa5
KL
24445 case $ac_config_target in
24446 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
24447 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24448 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
24449 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
24450 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
24451 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
24452 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
24453 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
d6e01aa5 24454 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 24455 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
d6e01aa5 24456 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
d6e01aa5
KL
24457 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
24458 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24459
c0d27fcc 24460 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
24461echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24462 { (exit 1); exit 1; }; };;
24463 esac
ba4481b5 24464done
503d2be0 24465
d6e01aa5 24466
503d2be0
AS
24467# If the user did not use the arguments to specify the items to instantiate,
24468# then the envvar interface is used. Set only those that are not.
24469# We use the long form for the default assignment because of an extremely
24470# bizarre bug on SunOS 4.1.3.
24471if $ac_need_defaults; then
24472 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24473 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24474 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 24475fi
503d2be0 24476
19650fd6 24477# Have a temporary directory for convenience. Make it in the build tree
d6e01aa5 24478# simply because there is no reason against having it here, and in addition,
19650fd6 24479# creating and moving files from /tmp can sometimes cause problems.
d6e01aa5
KL
24480# Hook for its removal unless debugging.
24481# Note that there is a small window in which the directory will not be cleaned:
24482# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
24483$debug ||
24484{
d6e01aa5
KL
24485 tmp=
24486 trap 'exit_status=$?
24487 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24488' 0
503d2be0
AS
24489 trap '{ (exit 1); exit 1; }' 1 2 13 15
24490}
503d2be0 24491# Create a (secure) tmp directory for tmp files.
19650fd6 24492
503d2be0 24493{
d6e01aa5 24494 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
24495 test -n "$tmp" && test -d "$tmp"
24496} ||
24497{
d6e01aa5
KL
24498 tmp=./conf$$-$RANDOM
24499 (umask 077 && mkdir "$tmp")
503d2be0
AS
24500} ||
24501{
19650fd6 24502 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
24503 { (exit 1); exit 1; }
24504}
24505
503d2be0 24506#
d6e01aa5 24507# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
24508#
24509
24510# No need to generate the scripts if there are no CONFIG_FILES.
24511# This happens for instance when ./config.status config.h
d6e01aa5
KL
24512if test -n "$CONFIG_FILES"; then
24513
24514_ACEOF
24515
24516
24517
24518ac_delim='%!_!# '
24519for ac_last_try in false false false false false :; do
24520 cat >conf$$subs.sed <<_ACEOF
24521SHELL!$SHELL$ac_delim
24522PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24523PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24524PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24525PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24526PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24527PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24528exec_prefix!$exec_prefix$ac_delim
24529prefix!$prefix$ac_delim
24530program_transform_name!$program_transform_name$ac_delim
24531bindir!$bindir$ac_delim
24532sbindir!$sbindir$ac_delim
24533libexecdir!$libexecdir$ac_delim
24534datarootdir!$datarootdir$ac_delim
24535datadir!$datadir$ac_delim
24536sysconfdir!$sysconfdir$ac_delim
24537sharedstatedir!$sharedstatedir$ac_delim
24538localstatedir!$localstatedir$ac_delim
24539includedir!$includedir$ac_delim
24540oldincludedir!$oldincludedir$ac_delim
24541docdir!$docdir$ac_delim
24542infodir!$infodir$ac_delim
24543htmldir!$htmldir$ac_delim
24544dvidir!$dvidir$ac_delim
24545pdfdir!$pdfdir$ac_delim
24546psdir!$psdir$ac_delim
24547libdir!$libdir$ac_delim
24548localedir!$localedir$ac_delim
24549mandir!$mandir$ac_delim
24550DEFS!$DEFS$ac_delim
24551ECHO_C!$ECHO_C$ac_delim
24552ECHO_N!$ECHO_N$ac_delim
24553ECHO_T!$ECHO_T$ac_delim
24554LIBS!$LIBS$ac_delim
24555build_alias!$build_alias$ac_delim
24556host_alias!$host_alias$ac_delim
24557target_alias!$target_alias$ac_delim
24558MAINT!$MAINT$ac_delim
24559build!$build$ac_delim
24560build_cpu!$build_cpu$ac_delim
24561build_vendor!$build_vendor$ac_delim
24562build_os!$build_os$ac_delim
24563host!$host$ac_delim
24564host_cpu!$host_cpu$ac_delim
24565host_vendor!$host_vendor$ac_delim
24566host_os!$host_os$ac_delim
24567CC!$CC$ac_delim
24568CFLAGS!$CFLAGS$ac_delim
24569LDFLAGS!$LDFLAGS$ac_delim
24570CPPFLAGS!$CPPFLAGS$ac_delim
24571ac_ct_CC!$ac_ct_CC$ac_delim
24572EXEEXT!$EXEEXT$ac_delim
24573OBJEXT!$OBJEXT$ac_delim
24574CPP!$CPP$ac_delim
24575GREP!$GREP$ac_delim
24576EGREP!$EGREP$ac_delim
24577LN_S!$LN_S$ac_delim
24578INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24579INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24580INSTALL_DATA!$INSTALL_DATA$ac_delim
24581RANLIB!$RANLIB$ac_delim
24582INSTALL_INFO!$INSTALL_INFO$ac_delim
24583GZIP_PROG!$GZIP_PROG$ac_delim
c982cf7d 24584MAKEINFO!$MAKEINFO$ac_delim
d6e01aa5
KL
24585LIBSOUND!$LIBSOUND$ac_delim
24586PKG_CONFIG!$PKG_CONFIG$ac_delim
24587ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
24588ALSA_LIBS!$ALSA_LIBS$ac_delim
24589CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
24590SET_MAKE!$SET_MAKE$ac_delim
24591XMKMF!$XMKMF$ac_delim
cfe440b8 24592HAVE_XSERVER!$HAVE_XSERVER$ac_delim
0cfc0546
GM
24593RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
24594RSVG_LIBS!$RSVG_LIBS$ac_delim
d6e01aa5
KL
24595GTK_CFLAGS!$GTK_CFLAGS$ac_delim
24596GTK_LIBS!$GTK_LIBS$ac_delim
9d89ffd0
JD
24597XFT_CFLAGS!$XFT_CFLAGS$ac_delim
24598XFT_LIBS!$XFT_LIBS$ac_delim
d6e01aa5
KL
24599ALLOCA!$ALLOCA$ac_delim
24600liblockfile!$liblockfile$ac_delim
24601LIBOBJS!$LIBOBJS$ac_delim
24602NEED_SETGID!$NEED_SETGID$ac_delim
24603KMEM_GROUP!$KMEM_GROUP$ac_delim
24604GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
24605GETOPT_H!$GETOPT_H$ac_delim
24606GETOPTOBJS!$GETOPTOBJS$ac_delim
24607version!$version$ac_delim
24608configuration!$configuration$ac_delim
24609canonical!$canonical$ac_delim
24610srcdir!$srcdir$ac_delim
24611lispdir!$lispdir$ac_delim
24612locallisppath!$locallisppath$ac_delim
24613lisppath!$lisppath$ac_delim
24614x_default_search_path!$x_default_search_path$ac_delim
24615etcdir!$etcdir$ac_delim
24616archlibdir!$archlibdir$ac_delim
24617bitmapdir!$bitmapdir$ac_delim
d6e01aa5
KL
24618_ACEOF
24619
24620 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24621 break
24622 elif $ac_last_try; then
24623 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24624echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24625 { (exit 1); exit 1; }; }
24626 else
24627 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 24628 fi
d6e01aa5
KL
24629done
24630
24631ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24632if test -n "$ac_eof"; then
24633 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24634 ac_eof=`expr $ac_eof + 1`
24635fi
24636
24637cat >>$CONFIG_STATUS <<_ACEOF
24638cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24639/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24640_ACEOF
24641sed '
24642s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24643s/^/s,@/; s/!/@,|#_!!_#|/
24644:n
24645t n
24646s/'"$ac_delim"'$/,g/; t
24647s/$/\\/; p
24648N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24649' >>$CONFIG_STATUS <conf$$subs.sed
24650rm -f conf$$subs.sed
24651cat >>$CONFIG_STATUS <<_ACEOF
24652CEOF$ac_eof
24653_ACEOF
24654
ba4481b5 24655
d6e01aa5
KL
24656ac_delim='%!_!# '
24657for ac_last_try in false false false false false :; do
24658 cat >conf$$subs.sed <<_ACEOF
c982cf7d 24659gamedir!$gamedir$ac_delim
0cfc0546
GM
24660gameuser!$gameuser$ac_delim
24661c_switch_system!$c_switch_system$ac_delim
cfe440b8 24662c_switch_machine!$c_switch_machine$ac_delim
9d89ffd0
JD
24663LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
24664LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
d6e01aa5
KL
24665C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
24666X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
24667machfile!$machfile$ac_delim
24668opsysfile!$opsysfile$ac_delim
24669carbon_appdir!$carbon_appdir$ac_delim
24670LTLIBOBJS!$LTLIBOBJS$ac_delim
c0d27fcc 24671_ACEOF
d6e01aa5 24672
c982cf7d 24673 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 12; then
d6e01aa5
KL
24674 break
24675 elif $ac_last_try; then
24676 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24677echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24678 { (exit 1); exit 1; }; }
24679 else
24680 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24681 fi
24682done
24683
24684ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24685if test -n "$ac_eof"; then
24686 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24687 ac_eof=`expr $ac_eof + 1`
24688fi
24689
24690cat >>$CONFIG_STATUS <<_ACEOF
24691cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24692/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24693_ACEOF
24694sed '
24695s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24696s/^/s,@/; s/!/@,|#_!!_#|/
24697:n
24698t n
24699s/'"$ac_delim"'$/,g/; t
24700s/$/\\/; p
24701N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24702' >>$CONFIG_STATUS <conf$$subs.sed
24703rm -f conf$$subs.sed
24704cat >>$CONFIG_STATUS <<_ACEOF
24705:end
24706s/|#_!!_#|//g
24707CEOF$ac_eof
24708_ACEOF
24709
24710
24711# VPATH may cause trouble with some makes, so we remove $(srcdir),
24712# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24713# trailing colons and then remove the whole line if VPATH becomes empty
24714# (actually we leave an empty line to preserve line numbers).
24715if test "x$srcdir" = x.; then
24716 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24717s/:*\$(srcdir):*/:/
24718s/:*\${srcdir}:*/:/
24719s/:*@srcdir@:*/:/
24720s/^\([^=]*=[ ]*\):*/\1/
24721s/:*$//
24722s/^[^=]*=[ ]*$//
24723}'
24724fi
24725
c0d27fcc 24726cat >>$CONFIG_STATUS <<\_ACEOF
d6e01aa5
KL
24727fi # test -n "$CONFIG_FILES"
24728
24729
24730for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
24731do
24732 case $ac_tag in
24733 :[FHLC]) ac_mode=$ac_tag; continue;;
24734 esac
24735 case $ac_mode$ac_tag in
24736 :[FHL]*:*);;
24737 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24738echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24739 { (exit 1); exit 1; }; };;
24740 :[FH]-) ac_tag=-:-;;
24741 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
ba4481b5 24742 esac
d6e01aa5
KL
24743 ac_save_IFS=$IFS
24744 IFS=:
24745 set x $ac_tag
24746 IFS=$ac_save_IFS
24747 shift
24748 ac_file=$1
24749 shift
24750
24751 case $ac_mode in
24752 :L) ac_source=$1;;
24753 :[FH])
24754 ac_file_inputs=
24755 for ac_f
24756 do
24757 case $ac_f in
24758 -) ac_f="$tmp/stdin";;
24759 *) # Look for the file first in the build tree, then in the source tree
24760 # (if the path is not absolute). The absolute path cannot be DOS-style,
24761 # because $ac_f cannot contain `:'.
24762 test -f "$ac_f" ||
24763 case $ac_f in
24764 [\\/$]*) false;;
24765 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24766 esac ||
24767 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24768echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24769 { (exit 1); exit 1; }; };;
24770 esac
24771 ac_file_inputs="$ac_file_inputs $ac_f"
24772 done
ba4481b5 24773
d6e01aa5
KL
24774 # Let's still pretend it is `configure' which instantiates (i.e., don't
24775 # use $as_me), people would be surprised to read:
24776 # /* config.h. Generated by config.status. */
24777 configure_input="Generated from "`IFS=:
24778 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24779 if test x"$ac_file" != x-; then
24780 configure_input="$ac_file. $configure_input"
24781 { echo "$as_me:$LINENO: creating $ac_file" >&5
24782echo "$as_me: creating $ac_file" >&6;}
24783 fi
24784
24785 case $ac_tag in
24786 *:-:* | *:-) cat >"$tmp/stdin";;
24787 esac
24788 ;;
ba4481b5
DL
24789 esac
24790
d6e01aa5 24791 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 24792$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24793 X"$ac_file" : 'X\(//\)[^/]' \| \
24794 X"$ac_file" : 'X\(//\)$' \| \
d6e01aa5 24795 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 24796echo X"$ac_file" |
d6e01aa5
KL
24797 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24798 s//\1/
24799 q
24800 }
24801 /^X\(\/\/\)[^/].*/{
24802 s//\1/
24803 q
24804 }
24805 /^X\(\/\/\)$/{
24806 s//\1/
24807 q
24808 }
24809 /^X\(\/\).*/{
24810 s//\1/
24811 q
24812 }
24813 s/.*/./; q'`
24814 { as_dir="$ac_dir"
24815 case $as_dir in #(
24816 -*) as_dir=./$as_dir;;
24817 esac
24818 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 24819 as_dirs=
d6e01aa5
KL
24820 while :; do
24821 case $as_dir in #(
24822 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24823 *) as_qdir=$as_dir;;
24824 esac
24825 as_dirs="'$as_qdir' $as_dirs"
24826 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 24827$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24828 X"$as_dir" : 'X\(//\)[^/]' \| \
24829 X"$as_dir" : 'X\(//\)$' \| \
d6e01aa5 24830 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 24831echo X"$as_dir" |
d6e01aa5
KL
24832 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24833 s//\1/
24834 q
24835 }
24836 /^X\(\/\/\)[^/].*/{
24837 s//\1/
24838 q
24839 }
24840 /^X\(\/\/\)$/{
24841 s//\1/
24842 q
24843 }
24844 /^X\(\/\).*/{
24845 s//\1/
24846 q
24847 }
24848 s/.*/./; q'`
24849 test -d "$as_dir" && break
6bae0ccf 24850 done
d6e01aa5
KL
24851 test -z "$as_dirs" || eval "mkdir $as_dirs"
24852 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24853echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 24854 { (exit 1); exit 1; }; }; }
c0d27fcc 24855 ac_builddir=.
98418dba 24856
d6e01aa5
KL
24857case "$ac_dir" in
24858.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24859*)
c0d27fcc 24860 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
d6e01aa5
KL
24861 # A ".." for each directory in $ac_dir_suffix.
24862 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24863 case $ac_top_builddir_sub in
24864 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24865 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24866 esac ;;
24867esac
24868ac_abs_top_builddir=$ac_pwd
24869ac_abs_builddir=$ac_pwd$ac_dir_suffix
24870# for backward compatibility:
24871ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
24872
24873case $srcdir in
d6e01aa5 24874 .) # We are building in place.
c0d27fcc 24875 ac_srcdir=.
d6e01aa5
KL
24876 ac_top_srcdir=$ac_top_builddir_sub
24877 ac_abs_top_srcdir=$ac_pwd ;;
24878 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 24879 ac_srcdir=$srcdir$ac_dir_suffix;
d6e01aa5
KL
24880 ac_top_srcdir=$srcdir
24881 ac_abs_top_srcdir=$srcdir ;;
24882 *) # Relative name.
24883 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24884 ac_top_srcdir=$ac_top_build_prefix$srcdir
24885 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 24886esac
d6e01aa5 24887ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 24888
c0d27fcc 24889
d6e01aa5
KL
24890 case $ac_mode in
24891 :F)
24892 #
24893 # CONFIG_FILE
24894 #
ba4481b5 24895
503d2be0
AS
24896 case $INSTALL in
24897 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
d6e01aa5 24898 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 24899 esac
d6e01aa5 24900_ACEOF
ba4481b5 24901
d6e01aa5
KL
24902cat >>$CONFIG_STATUS <<\_ACEOF
24903# If the template does not know about datarootdir, expand it.
24904# FIXME: This hack should be removed a few years after 2.60.
24905ac_datarootdir_hack=; ac_datarootdir_seen=
8ae52ca6 24906
d6e01aa5
KL
24907case `sed -n '/datarootdir/ {
24908 p
24909 q
24910}
24911/@datadir@/p
24912/@docdir@/p
24913/@infodir@/p
24914/@localedir@/p
24915/@mandir@/p
24916' $ac_file_inputs` in
24917*datarootdir*) ac_datarootdir_seen=yes;;
24918*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24919 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24920echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
24921_ACEOF
24922cat >>$CONFIG_STATUS <<_ACEOF
24923 ac_datarootdir_hack='
24924 s&@datadir@&$datadir&g
24925 s&@docdir@&$docdir&g
24926 s&@infodir@&$infodir&g
24927 s&@localedir@&$localedir&g
24928 s&@mandir@&$mandir&g
24929 s&\\\${datarootdir}&$datarootdir&g' ;;
24930esac
c0d27fcc 24931_ACEOF
d6e01aa5
KL
24932
24933# Neutralize VPATH when `$srcdir' = `.'.
24934# Shell code in configure.ac might set extrasub.
24935# FIXME: do we really want to maintain this feature?
c0d27fcc 24936cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
24937 sed "$ac_vpsub
24938$extrasub
c0d27fcc
MR
24939_ACEOF
24940cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24941:t
24942/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
d6e01aa5
KL
24943s&@configure_input@&$configure_input&;t t
24944s&@top_builddir@&$ac_top_builddir_sub&;t t
24945s&@srcdir@&$ac_srcdir&;t t
24946s&@abs_srcdir@&$ac_abs_srcdir&;t t
24947s&@top_srcdir@&$ac_top_srcdir&;t t
24948s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24949s&@builddir@&$ac_builddir&;t t
24950s&@abs_builddir@&$ac_abs_builddir&;t t
24951s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24952s&@INSTALL@&$ac_INSTALL&;t t
24953$ac_datarootdir_hack
24954" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
24955
24956test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24957 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24958 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24959 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24960which seems to be undefined. Please make sure it is defined." >&5
24961echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24962which seems to be undefined. Please make sure it is defined." >&2;}
24963
24964 rm -f "$tmp/stdin"
503d2be0 24965 case $ac_file in
d6e01aa5
KL
24966 -) cat "$tmp/out"; rm -f "$tmp/out";;
24967 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 24968 esac
d6e01aa5
KL
24969 ;;
24970 :H)
24971 #
24972 # CONFIG_HEADER
24973 #
24974_ACEOF
24975
24976# Transform confdefs.h into a sed script `conftest.defines', that
24977# substitutes the proper values into config.h.in to produce config.h.
24978rm -f conftest.defines conftest.tail
24979# First, append a space to every undef/define line, to ease matching.
24980echo 's/$/ /' >conftest.defines
24981# Then, protect against being on the right side of a sed subst, or in
24982# an unquoted here document, in config.status. If some macros were
24983# called several times there might be several #defines for the same
24984# symbol, which is useless. But do not sort them, since the last
24985# AC_DEFINE must be honored.
24986ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24987# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
24988# NAME is the cpp macro being defined, VALUE is the value it is being given.
24989# PARAMS is the parameter list in the macro definition--in most cases, it's
24990# just an empty string.
24991ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
24992ac_dB='\\)[ (].*,\\1define\\2'
24993ac_dC=' '
24994ac_dD=' ,'
24995
24996uniq confdefs.h |
24997 sed -n '
24998 t rset
24999 :rset
25000 s/^[ ]*#[ ]*define[ ][ ]*//
25001 t ok
25002 d
25003 :ok
25004 s/[\\&,]/\\&/g
25005 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25006 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25007 ' >>conftest.defines
25008
25009# Remove the space that was appended to ease matching.
25010# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
25011# example, in the case of _POSIX_SOURCE, which is predefined and required
25012# on some systems where configure will not decide to define it.
d6e01aa5
KL
25013# (The regexp can be short, since the line contains either #define or #undef.)
25014echo 's/ $//
25015s,^[ #]*u.*,/* & */,' >>conftest.defines
25016
25017# Break up conftest.defines:
25018ac_max_sed_lines=50
25019
25020# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25021# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25022# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25023# et cetera.
25024ac_in='$ac_file_inputs'
25025ac_out='"$tmp/out1"'
25026ac_nxt='"$tmp/out2"'
25027
25028while :
503d2be0 25029do
d6e01aa5
KL
25030 # Write a here document:
25031 cat >>$CONFIG_STATUS <<_ACEOF
25032 # First, check the format of the line:
25033 cat >"\$tmp/defines.sed" <<\\CEOF
25034/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25035/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25036b
25037:def
25038_ACEOF
25039 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 25040 echo 'CEOF
d6e01aa5
KL
25041 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25042 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25043 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25044 grep . conftest.tail >/dev/null || break
503d2be0
AS
25045 rm -f conftest.defines
25046 mv conftest.tail conftest.defines
25047done
d6e01aa5 25048rm -f conftest.defines conftest.tail
503d2be0 25049
d6e01aa5 25050echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 25051cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 25052 if test x"$ac_file" != x-; then
d6e01aa5
KL
25053 echo "/* $configure_input */" >"$tmp/config.h"
25054 cat "$ac_result" >>"$tmp/config.h"
25055 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 25056 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
25057echo "$as_me: $ac_file is unchanged" >&6;}
25058 else
503d2be0 25059 rm -f $ac_file
d6e01aa5 25060 mv "$tmp/config.h" $ac_file
ba4481b5 25061 fi
503d2be0 25062 else
d6e01aa5
KL
25063 echo "/* $configure_input */"
25064 cat "$ac_result"
ba4481b5 25065 fi
d6e01aa5
KL
25066 rm -f "$tmp/out12"
25067 ;;
edfaf76d 25068
d6e01aa5
KL
25069 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
25070echo "$as_me: executing $ac_file commands" >&6;}
25071 ;;
25072 esac
ba4481b5 25073
c0d27fcc 25074
d6e01aa5
KL
25075 case $ac_file$ac_mode in
25076 "default":C)
ba4481b5
DL
25077
25078### Make the necessary directories, if they don't exist.
25079for dir in etc lisp ; do
25080 test -d ${dir} || mkdir ${dir}
25081done
25082
25083# Build src/Makefile from ${srcdir}/src/Makefile.c
25084# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
25085# This must be done after src/config.h is built, since we rely on that file.
25086
25087# Now get this: Some word that is part of the ${srcdir} directory name
25088# or the ${configuration} value might, just might, happen to be an
25089# identifier like `sun4' or `i386' or something, and be predefined by
25090# the C preprocessor to some helpful value like 1, or maybe the empty
25091# string. Needless to say consequent macro substitutions are less
25092# than conducive to the makefile finding the correct directory.
25093undefs="`echo $top_srcdir $configuration $canonical |
25094sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
25095 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
25096`"
25097
25098echo creating src/epaths.h
4aa6b955 25099${MAKE-make} epaths-force
ba4481b5 25100
1c203d4c
DL
25101# As of 2000-11-19, newest development versions of GNU cpp preprocess
25102# `..' to `. .' unless invoked with -traditional
25103
d0e9bfd2 25104if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
25105 CPPFLAGS="$CPPFLAGS -traditional"
25106fi
25107
ba4481b5
DL
25108echo creating lib-src/Makefile
25109( cd lib-src
25110 rm -f junk.c junk1.c junk2.c
25111 sed -e '/start of cpp stuff/q' \
25112 < Makefile.c > junk1.c
25113 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25114 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25115 < Makefile.c > junk.c
503d2be0 25116 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25117 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25118 cat junk1.c junk2.c > Makefile.new
25119 rm -f junk.c junk1.c junk2.c
25120 chmod 444 Makefile.new
25121 mv -f Makefile.new Makefile
25122)
25123
25124echo creating src/Makefile
25125( cd src
25126 rm -f junk.c junk1.c junk2.c
25127 sed -e '/start of cpp stuff/q' \
25128 < Makefile.c > junk1.c
25129 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25130 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25131 < Makefile.c > junk.c
503d2be0 25132 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25133 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25134 cat junk1.c junk2.c > Makefile.new
25135 rm -f junk.c junk1.c junk2.c
25136 chmod 444 Makefile.new
25137 mv -f Makefile.new Makefile
25138)
25139
503d2be0 25140if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 25141 echo creating src/.gdbinit
503d2be0 25142 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
25143fi
25144
25145# This is how we know whether to re-run configure in certain cases.
25146touch src/config.stamp
25147
503d2be0 25148 ;;
d6e01aa5 25149
503d2be0 25150 esac
d6e01aa5 25151done # for ac_tag
503d2be0 25152
ba4481b5 25153
503d2be0 25154{ (exit 0); exit 0; }
c0d27fcc 25155_ACEOF
ba4481b5 25156chmod +x $CONFIG_STATUS
503d2be0
AS
25157ac_clean_files=$ac_clean_files_save
25158
c0d27fcc 25159
503d2be0
AS
25160# configure is writing to config.log, and then calls config.status.
25161# config.status does its own redirection, appending to config.log.
25162# Unfortunately, on DOS this fails, as config.log is still kept open
25163# by configure, so config.status won't be able to write to it; its
25164# output is simply discarded. So we exec the FD to /dev/null,
25165# effectively closing config.log, so it can be properly (re)opened and
25166# appended to by config.status. When coming back to configure, we
25167# need to make the FD available again.
25168if test "$no_create" != yes; then
25169 ac_cs_success=:
19650fd6
AS
25170 ac_config_status_args=
25171 test "$silent" = yes &&
25172 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 25173 exec 5>/dev/null
19650fd6 25174 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
25175 exec 5>>config.log
25176 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25177 # would make configure fail if this is the last instruction.
25178 $ac_cs_success || { (exit 1); exit 1; }
25179fi
f5f47add 25180
c0d27fcc 25181