Merge from emacs--rel--22
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
f053c89f 3# Generated by GNU Autoconf 2.61.
ba4481b5 4#
ca81d7a0 5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
040c474e 6# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
ba4481b5
DL
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
c0d27fcc
MR
9## --------------------- ##
10## M4sh Initialization. ##
11## --------------------- ##
503d2be0 12
f053c89f
CY
13# Be more Bourne compatible
14DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16 emulate sh
17 NULLCMD=:
6bae0ccf
DL
18 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19 # is contrary to our usage. Disable this feature.
20 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
21 setopt NO_GLOB_SUBST
22else
f053c89f
CY
23 case `(set -o) 2>/dev/null` in
24 *posix*) set -o posix ;;
25esac
26
503d2be0 27fi
f053c89f
CY
28
29
503d2be0 30
ca81d7a0
JD
31
32# PATH needs CR
33# Avoid depending upon Character Ranges.
34as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37as_cr_digits='0123456789'
38as_cr_alnum=$as_cr_Letters$as_cr_digits
39
40# The user is always right.
41if test "${PATH_SEPARATOR+set}" != set; then
42 echo "#! /bin/sh" >conf$$.sh
43 echo "exit 0" >>conf$$.sh
44 chmod +x conf$$.sh
45 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
46 PATH_SEPARATOR=';'
47 else
48 PATH_SEPARATOR=:
49 fi
50 rm -f conf$$.sh
51fi
52
c0d27fcc 53# Support unset when possible.
edfaf76d 54if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
55 as_unset=unset
56else
57 as_unset=false
58fi
59
6bae0ccf 60
ca81d7a0
JD
61# IFS
62# We need space, tab and new line, in precisely that order. Quoting is
63# there to prevent editors from complaining about space-tab.
64# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65# splitting by setting IFS to empty value.)
66as_nl='
67'
68IFS=" "" $as_nl"
69
70# Find who we are. Look in the path if we contain no directory separator.
71case $0 in
72 *[\\/]* ) as_myself=$0 ;;
73 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
74for as_dir in $PATH
75do
76 IFS=$as_save_IFS
77 test -z "$as_dir" && as_dir=.
78 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
79done
80IFS=$as_save_IFS
81
82 ;;
83esac
84# We did not find ourselves, most probably we were run as `sh COMMAND'
85# in which case we are not to be found in the path.
86if test "x$as_myself" = x; then
87 as_myself=$0
88fi
89if test ! -f "$as_myself"; then
90 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
91 { (exit 1); exit 1; }
92fi
93
6bae0ccf 94# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
95for as_var in ENV MAIL MAILPATH
96do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
97done
6bae0ccf
DL
98PS1='$ '
99PS2='> '
100PS4='+ '
101
102# NLS nuisances.
19650fd6
AS
103for as_var in \
104 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
105 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
106 LC_TELEPHONE LC_TIME
6bae0ccf 107do
edfaf76d 108 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
109 eval $as_var=C; export $as_var
110 else
ca81d7a0 111 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
112 fi
113done
114
115# Required to use basename.
ca81d7a0
JD
116if expr a : '\(a\)' >/dev/null 2>&1 &&
117 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
118 as_expr=expr
119else
120 as_expr=false
121fi
122
ca81d7a0 123if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
124 as_basename=basename
125else
126 as_basename=false
127fi
c0d27fcc
MR
128
129
503d2be0 130# Name of the executable.
ca81d7a0 131as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
132$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133 X"$0" : 'X\(//\)$' \| \
ca81d7a0 134 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 135echo X/"$0" |
ca81d7a0
JD
136 sed '/^.*\/\([^/][^/]*\)\/*$/{
137 s//\1/
138 q
139 }
140 /^X\/\(\/\/\)$/{
141 s//\1/
142 q
143 }
144 /^X\/\(\/\).*/{
145 s//\1/
146 q
147 }
148 s/.*/./; q'`
c0d27fcc 149
ca81d7a0
JD
150# CDPATH.
151$as_unset CDPATH
8eeae1c9 152
8eeae1c9 153
ca81d7a0
JD
154if test "x$CONFIG_SHELL" = x; then
155 if (eval ":") 2>/dev/null; then
156 as_have_required=yes
157else
158 as_have_required=no
8eeae1c9
JD
159fi
160
ca81d7a0
JD
161 if test $as_have_required = yes && (eval ":
162(as_func_return () {
163 (exit \$1)
164}
165as_func_success () {
166 as_func_return 0
167}
168as_func_failure () {
169 as_func_return 1
170}
171as_func_ret_success () {
172 return 0
173}
174as_func_ret_failure () {
175 return 1
176}
8eeae1c9 177
ca81d7a0
JD
178exitcode=0
179if as_func_success; then
180 :
181else
182 exitcode=1
183 echo as_func_success failed.
184fi
8eeae1c9 185
ca81d7a0
JD
186if as_func_failure; then
187 exitcode=1
188 echo as_func_failure succeeded.
189fi
190
191if as_func_ret_success; then
192 :
193else
194 exitcode=1
195 echo as_func_ret_success failed.
196fi
197
198if as_func_ret_failure; then
199 exitcode=1
200 echo as_func_ret_failure succeeded.
201fi
202
203if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
204 :
205else
206 exitcode=1
207 echo positional parameters were not saved.
208fi
209
210test \$exitcode = 0) || { (exit 1); exit 1; }
211
212(
213 as_lineno_1=\$LINENO
214 as_lineno_2=\$LINENO
215 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
216 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
217") 2> /dev/null; then
218 :
219else
220 as_candidate_shells=
c0d27fcc 221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
f053c89f 222for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
c0d27fcc
MR
223do
224 IFS=$as_save_IFS
225 test -z "$as_dir" && as_dir=.
ca81d7a0 226 case $as_dir in
c0d27fcc 227 /*)
ca81d7a0
JD
228 for as_base in sh bash ksh sh5; do
229 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
230 done;;
231 esac
232done
233IFS=$as_save_IFS
234
235
236 for as_shell in $as_candidate_shells $SHELL; do
237 # Try only shells that exist, to save several forks.
238 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
239 { ("$as_shell") 2> /dev/null <<\_ASEOF
ca81d7a0
JD
240if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241 emulate sh
242 NULLCMD=:
243 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244 # is contrary to our usage. Disable this feature.
245 alias -g '${1+"$@"}'='"$@"'
246 setopt NO_GLOB_SUBST
247else
f053c89f
CY
248 case `(set -o) 2>/dev/null` in
249 *posix*) set -o posix ;;
250esac
251
ca81d7a0 252fi
f053c89f 253
ca81d7a0
JD
254
255:
256_ASEOF
257}; then
258 CONFIG_SHELL=$as_shell
259 as_have_required=yes
260 if { "$as_shell" 2> /dev/null <<\_ASEOF
ca81d7a0
JD
261if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262 emulate sh
263 NULLCMD=:
264 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
265 # is contrary to our usage. Disable this feature.
266 alias -g '${1+"$@"}'='"$@"'
267 setopt NO_GLOB_SUBST
268else
f053c89f
CY
269 case `(set -o) 2>/dev/null` in
270 *posix*) set -o posix ;;
271esac
272
ca81d7a0 273fi
f053c89f 274
ca81d7a0
JD
275
276:
277(as_func_return () {
278 (exit $1)
279}
280as_func_success () {
281 as_func_return 0
282}
283as_func_failure () {
284 as_func_return 1
285}
286as_func_ret_success () {
287 return 0
288}
289as_func_ret_failure () {
290 return 1
291}
292
293exitcode=0
294if as_func_success; then
295 :
296else
297 exitcode=1
298 echo as_func_success failed.
299fi
300
301if as_func_failure; then
302 exitcode=1
303 echo as_func_failure succeeded.
304fi
305
306if as_func_ret_success; then
307 :
308else
309 exitcode=1
310 echo as_func_ret_success failed.
311fi
312
313if as_func_ret_failure; then
314 exitcode=1
315 echo as_func_ret_failure succeeded.
316fi
317
318if ( set x; as_func_ret_success y && test x = "$1" ); then
319 :
320else
321 exitcode=1
322 echo positional parameters were not saved.
323fi
324
325test $exitcode = 0) || { (exit 1); exit 1; }
326
327(
8eeae1c9
JD
328 as_lineno_1=$LINENO
329 as_lineno_2=$LINENO
330 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0
JD
331 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
332
333_ASEOF
334}; then
335 break
336fi
337
338fi
339
340 done
341
342 if test "x$CONFIG_SHELL" != x; then
343 for as_var in BASH_ENV ENV
344 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
345 done
346 export CONFIG_SHELL
347 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
348fi
349
350
351 if test $as_have_required = no; then
352 echo This script requires a shell more modern than all the
353 echo shells that I found on your system. Please install a
354 echo modern shell, or manually run the script under such a
355 echo shell if you do have one.
356 { (exit 1); exit 1; }
357fi
358
359
360fi
361
362fi
363
364
365
366(eval "as_func_return () {
367 (exit \$1)
368}
369as_func_success () {
370 as_func_return 0
371}
372as_func_failure () {
373 as_func_return 1
374}
375as_func_ret_success () {
376 return 0
377}
378as_func_ret_failure () {
379 return 1
380}
381
382exitcode=0
383if as_func_success; then
384 :
385else
386 exitcode=1
387 echo as_func_success failed.
388fi
389
390if as_func_failure; then
391 exitcode=1
392 echo as_func_failure succeeded.
393fi
394
395if as_func_ret_success; then
396 :
397else
398 exitcode=1
399 echo as_func_ret_success failed.
400fi
401
402if as_func_ret_failure; then
403 exitcode=1
404 echo as_func_ret_failure succeeded.
405fi
406
407if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
408 :
409else
410 exitcode=1
411 echo positional parameters were not saved.
412fi
413
414test \$exitcode = 0") || {
86e73516
JD
415 echo Please tell bug-autoconf@gnu.org about your system,
416 echo including any error possibly output before this message.
417 echo This can help us improve future autoconf versions.
418 echo Configuration will now proceed without shell functions.
ca81d7a0
JD
419}
420
421
422
423 as_lineno_1=$LINENO
424 as_lineno_2=$LINENO
425 test "x$as_lineno_1" != "x$as_lineno_2" &&
426 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
427
428 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
429 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
430 # line-number line after each line using $LINENO; the second 'sed'
431 # does the real work. The second script uses 'N' to pair each
432 # line-number line with the line containing $LINENO, and appends
433 # trailing '-' during substitution so that $LINENO is not a special
434 # case at line end.
c0d27fcc 435 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
436 # scripts with optimization help from Paolo Bonzini. Blame Lee
437 # E. McMahon (1931-1989) for sed's syntax. :-)
438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
c0d27fcc 442 sed '
ca81d7a0
JD
443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
c0d27fcc 447 N
ca81d7a0
JD
448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 450 t loop
ca81d7a0 451 s/-\n.*//
c0d27fcc 452 ' >$as_me.lineno &&
ca81d7a0 453 chmod +x "$as_me.lineno" ||
c0d27fcc
MR
454 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
455 { (exit 1); exit 1; }; }
456
457 # Don't try to exec as it changes $[0], causing all sort of problems
458 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
459 # original and so on. Autoconf is especially sensitive to this).
460 . "./$as_me.lineno"
c0d27fcc
MR
461 # Exit status is that of the last command.
462 exit
463}
464
465
ca81d7a0
JD
466if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
467 as_dirname=dirname
468else
469 as_dirname=false
470fi
471
472ECHO_C= ECHO_N= ECHO_T=
473case `echo -n x` in
474-n*)
475 case `echo 'x\c'` in
476 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
477 *) ECHO_C='\c';;
478 esac;;
479*)
480 ECHO_N='-n';;
c0d27fcc 481esac
503d2be0 482
ca81d7a0
JD
483if expr a : '\(a\)' >/dev/null 2>&1 &&
484 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
485 as_expr=expr
486else
487 as_expr=false
488fi
489
490rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
491if test -d conf$$.dir; then
492 rm -f conf$$.dir/conf$$.file
493else
494 rm -f conf$$.dir
495 mkdir conf$$.dir
496fi
503d2be0
AS
497echo >conf$$.file
498if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
499 as_ln_s='ln -s'
500 # ... but there are two gotchas:
501 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
502 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
503 # In both cases, we have to default to `cp -p'.
504 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 505 as_ln_s='cp -p'
503d2be0
AS
506elif ln conf$$.file conf$$ 2>/dev/null; then
507 as_ln_s=ln
508else
509 as_ln_s='cp -p'
510fi
ca81d7a0
JD
511rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
512rmdir conf$$.dir 2>/dev/null
503d2be0 513
6bae0ccf
DL
514if mkdir -p . 2>/dev/null; then
515 as_mkdir_p=:
516else
edfaf76d 517 test -d ./-p && rmdir ./-p
6bae0ccf
DL
518 as_mkdir_p=false
519fi
520
f053c89f
CY
521if test -x / >/dev/null 2>&1; then
522 as_test_x='test -x'
ca81d7a0 523else
f053c89f
CY
524 if ls -dL / >/dev/null 2>&1; then
525 as_ls_L_option=L
526 else
527 as_ls_L_option=
528 fi
529 as_test_x='
530 eval sh -c '\''
531 if test -d "$1"; then
532 test -d "$1/.";
533 else
534 case $1 in
535 -*)set "./$1";;
536 esac;
537 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
538 ???[sx]*):;;*)false;;esac;fi
539 '\'' sh
540 '
ca81d7a0 541fi
f053c89f 542as_executable_p=$as_test_x
503d2be0 543
c0d27fcc 544# Sed expression to map a string onto a valid CPP name.
edfaf76d 545as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
546
547# Sed expression to map a string onto a valid variable name.
edfaf76d 548as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 549
503d2be0 550
c0d27fcc 551
ca81d7a0 552exec 7<&0 </dev/null 6>&1
503d2be0
AS
553
554# Name of the host.
555# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
556# so uname gets run too.
557ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
558
503d2be0
AS
559#
560# Initializations.
561#
ba4481b5 562ac_default_prefix=/usr/local
ca81d7a0 563ac_clean_files=
6bae0ccf 564ac_config_libobj_dir=.
ca81d7a0 565LIBOBJS=
503d2be0
AS
566cross_compiling=no
567subdirs=
c0d27fcc
MR
568MFLAGS=
569MAKEFLAGS=
503d2be0
AS
570SHELL=${CONFIG_SHELL-/bin/sh}
571
c0d27fcc
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>
f053c89f 584#ifdef HAVE_SYS_TYPES_H
503d2be0
AS
585# include <sys/types.h>
586#endif
f053c89f 587#ifdef HAVE_SYS_STAT_H
503d2be0
AS
588# include <sys/stat.h>
589#endif
f053c89f 590#ifdef STDC_HEADERS
503d2be0
AS
591# include <stdlib.h>
592# include <stddef.h>
593#else
f053c89f 594# ifdef HAVE_STDLIB_H
503d2be0
AS
595# include <stdlib.h>
596# endif
597#endif
f053c89f
CY
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
f053c89f 604#ifdef HAVE_STRINGS_H
503d2be0
AS
605# include <strings.h>
606#endif
f053c89f 607#ifdef HAVE_INTTYPES_H
503d2be0 608# include <inttypes.h>
ca81d7a0 609#endif
f053c89f 610#ifdef HAVE_STDINT_H
ca81d7a0 611# include <stdint.h>
503d2be0 612#endif
f053c89f 613#ifdef HAVE_UNISTD_H
503d2be0
AS
614# include <unistd.h>
615#endif"
ba4481b5 616
f053c89f
CY
617ac_header_list=
618ac_func_list=
ca81d7a0
JD
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
682LIBSOUND
683PKG_CONFIG
684ALSA_CFLAGS
685ALSA_LIBS
ca81d7a0
JD
686CFLAGS_SOUND
687SET_MAKE
688XMKMF
cfe440b8 689HAVE_XSERVER
ca81d7a0
JD
690GTK_CFLAGS
691GTK_LIBS
9d89ffd0
JD
692XFT_CFLAGS
693XFT_LIBS
ca81d7a0
JD
694ALLOCA
695liblockfile
696LIBOBJS
697NEED_SETGID
698KMEM_GROUP
699GETLOADAVG_LIBS
700GETOPT_H
701GETOPTOBJS
702version
703configuration
704canonical
705srcdir
706lispdir
707locallisppath
708lisppath
709x_default_search_path
710etcdir
711archlibdir
712bitmapdir
713gamedir
714gameuser
715c_switch_system
716c_switch_machine
717LD_SWITCH_X_SITE
718LD_SWITCH_X_SITE_AUX
719C_SWITCH_X_SITE
720X_TOOLKIT_TYPE
721machfile
722opsysfile
723carbon_appdir
724LTLIBOBJS'
6bae0ccf 725ac_subst_files=''
ca81d7a0
JD
726 ac_precious_vars='build_alias
727host_alias
728target_alias
729CC
730CFLAGS
731LDFLAGS
f053c89f 732LIBS
ca81d7a0
JD
733CPPFLAGS
734CPP
735XMKMF'
736
c0d27fcc 737
ba4481b5 738# Initialize some variables set by options.
503d2be0
AS
739ac_init_help=
740ac_init_version=false
ba4481b5
DL
741# The variables have the same names as the options, with
742# dashes changed to underlines.
503d2be0 743cache_file=/dev/null
ba4481b5 744exec_prefix=NONE
ba4481b5 745no_create=
ba4481b5
DL
746no_recursion=
747prefix=NONE
748program_prefix=NONE
749program_suffix=NONE
750program_transform_name=s,x,x,
751silent=
752site=
753srcdir=
ba4481b5
DL
754verbose=
755x_includes=NONE
756x_libraries=NONE
503d2be0
AS
757
758# Installation directory options.
759# These are left unexpanded so users can "make install exec_prefix=/foo"
760# and all the variables that are supposed to be based on exec_prefix
761# by default will actually change.
762# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 763# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
764bindir='${exec_prefix}/bin'
765sbindir='${exec_prefix}/sbin'
766libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
767datarootdir='${prefix}/share'
768datadir='${datarootdir}'
ba4481b5
DL
769sysconfdir='${prefix}/etc'
770sharedstatedir='${prefix}/com'
771localstatedir='${prefix}/var'
ba4481b5
DL
772includedir='${prefix}/include'
773oldincludedir='/usr/include'
ca81d7a0
JD
774docdir='${datarootdir}/doc/${PACKAGE}'
775infodir='${datarootdir}/info'
776htmldir='${docdir}'
777dvidir='${docdir}'
778pdfdir='${docdir}'
779psdir='${docdir}'
780libdir='${exec_prefix}/lib'
781localedir='${datarootdir}/locale'
782mandir='${datarootdir}/man'
ba4481b5 783
ba4481b5 784ac_prev=
ca81d7a0 785ac_dashdash=
ba4481b5
DL
786for ac_option
787do
ba4481b5
DL
788 # If the previous option needs an argument, assign it.
789 if test -n "$ac_prev"; then
ca81d7a0 790 eval $ac_prev=\$ac_option
ba4481b5
DL
791 ac_prev=
792 continue
793 fi
794
ca81d7a0
JD
795 case $ac_option in
796 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
797 *) ac_optarg=yes ;;
798 esac
ba4481b5
DL
799
800 # Accept the important Cygnus configure options, so we can diagnose typos.
801
ca81d7a0
JD
802 case $ac_dashdash$ac_option in
803 --)
804 ac_dashdash=yes ;;
ba4481b5
DL
805
806 -bindir | --bindir | --bindi | --bind | --bin | --bi)
807 ac_prev=bindir ;;
808 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 809 bindir=$ac_optarg ;;
ba4481b5
DL
810
811 -build | --build | --buil | --bui | --bu)
503d2be0 812 ac_prev=build_alias ;;
ba4481b5 813 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 814 build_alias=$ac_optarg ;;
ba4481b5
DL
815
816 -cache-file | --cache-file | --cache-fil | --cache-fi \
817 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
818 ac_prev=cache_file ;;
819 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
820 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
821 cache_file=$ac_optarg ;;
822
823 --config-cache | -C)
824 cache_file=config.cache ;;
ba4481b5 825
ca81d7a0 826 -datadir | --datadir | --datadi | --datad)
ba4481b5 827 ac_prev=datadir ;;
ca81d7a0 828 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 829 datadir=$ac_optarg ;;
ba4481b5 830
ca81d7a0
JD
831 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
832 | --dataroo | --dataro | --datar)
833 ac_prev=datarootdir ;;
834 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
835 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
836 datarootdir=$ac_optarg ;;
837
ba4481b5 838 -disable-* | --disable-*)
503d2be0 839 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 840 # Reject names that are not valid shell variable names.
f053c89f 841 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
842 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
843 { (exit 1); exit 1; }; }
f053c89f 844 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0
JD
845 eval enable_$ac_feature=no ;;
846
847 -docdir | --docdir | --docdi | --doc | --do)
848 ac_prev=docdir ;;
849 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
850 docdir=$ac_optarg ;;
851
852 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
853 ac_prev=dvidir ;;
854 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
855 dvidir=$ac_optarg ;;
ba4481b5
DL
856
857 -enable-* | --enable-*)
503d2be0 858 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 859 # Reject names that are not valid shell variable names.
f053c89f 860 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
861 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
862 { (exit 1); exit 1; }; }
f053c89f 863 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0 864 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
865
866 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
867 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
868 | --exec | --exe | --ex)
869 ac_prev=exec_prefix ;;
870 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
871 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
872 | --exec=* | --exe=* | --ex=*)
503d2be0 873 exec_prefix=$ac_optarg ;;
ba4481b5
DL
874
875 -gas | --gas | --ga | --g)
876 # Obsolete; use --with-gas.
877 with_gas=yes ;;
878
503d2be0
AS
879 -help | --help | --hel | --he | -h)
880 ac_init_help=long ;;
881 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
882 ac_init_help=recursive ;;
883 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
884 ac_init_help=short ;;
ba4481b5
DL
885
886 -host | --host | --hos | --ho)
503d2be0 887 ac_prev=host_alias ;;
ba4481b5 888 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 889 host_alias=$ac_optarg ;;
ba4481b5 890
ca81d7a0
JD
891 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
892 ac_prev=htmldir ;;
893 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
894 | --ht=*)
895 htmldir=$ac_optarg ;;
896
ba4481b5
DL
897 -includedir | --includedir | --includedi | --included | --include \
898 | --includ | --inclu | --incl | --inc)
899 ac_prev=includedir ;;
900 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
901 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 902 includedir=$ac_optarg ;;
ba4481b5
DL
903
904 -infodir | --infodir | --infodi | --infod | --info | --inf)
905 ac_prev=infodir ;;
906 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 907 infodir=$ac_optarg ;;
ba4481b5
DL
908
909 -libdir | --libdir | --libdi | --libd)
910 ac_prev=libdir ;;
911 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 912 libdir=$ac_optarg ;;
ba4481b5
DL
913
914 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
915 | --libexe | --libex | --libe)
916 ac_prev=libexecdir ;;
917 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
918 | --libexe=* | --libex=* | --libe=*)
503d2be0 919 libexecdir=$ac_optarg ;;
ba4481b5 920
ca81d7a0
JD
921 -localedir | --localedir | --localedi | --localed | --locale)
922 ac_prev=localedir ;;
923 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
924 localedir=$ac_optarg ;;
925
ba4481b5 926 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 927 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
928 ac_prev=localstatedir ;;
929 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 930 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 931 localstatedir=$ac_optarg ;;
ba4481b5
DL
932
933 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
934 ac_prev=mandir ;;
935 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 936 mandir=$ac_optarg ;;
ba4481b5
DL
937
938 -nfp | --nfp | --nf)
939 # Obsolete; use --without-fp.
940 with_fp=no ;;
941
942 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 943 | --no-cr | --no-c | -n)
ba4481b5
DL
944 no_create=yes ;;
945
946 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
947 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
948 no_recursion=yes ;;
949
950 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
951 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
952 | --oldin | --oldi | --old | --ol | --o)
953 ac_prev=oldincludedir ;;
954 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
955 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
956 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 957 oldincludedir=$ac_optarg ;;
ba4481b5
DL
958
959 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
960 ac_prev=prefix ;;
961 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 962 prefix=$ac_optarg ;;
ba4481b5
DL
963
964 -program-prefix | --program-prefix | --program-prefi | --program-pref \
965 | --program-pre | --program-pr | --program-p)
966 ac_prev=program_prefix ;;
967 -program-prefix=* | --program-prefix=* | --program-prefi=* \
968 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 969 program_prefix=$ac_optarg ;;
ba4481b5
DL
970
971 -program-suffix | --program-suffix | --program-suffi | --program-suff \
972 | --program-suf | --program-su | --program-s)
973 ac_prev=program_suffix ;;
974 -program-suffix=* | --program-suffix=* | --program-suffi=* \
975 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 976 program_suffix=$ac_optarg ;;
ba4481b5
DL
977
978 -program-transform-name | --program-transform-name \
979 | --program-transform-nam | --program-transform-na \
980 | --program-transform-n | --program-transform- \
981 | --program-transform | --program-transfor \
982 | --program-transfo | --program-transf \
983 | --program-trans | --program-tran \
984 | --progr-tra | --program-tr | --program-t)
985 ac_prev=program_transform_name ;;
986 -program-transform-name=* | --program-transform-name=* \
987 | --program-transform-nam=* | --program-transform-na=* \
988 | --program-transform-n=* | --program-transform-=* \
989 | --program-transform=* | --program-transfor=* \
990 | --program-transfo=* | --program-transf=* \
991 | --program-trans=* | --program-tran=* \
992 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 993 program_transform_name=$ac_optarg ;;
ba4481b5 994
ca81d7a0
JD
995 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
996 ac_prev=pdfdir ;;
997 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
998 pdfdir=$ac_optarg ;;
999
1000 -psdir | --psdir | --psdi | --psd | --ps)
1001 ac_prev=psdir ;;
1002 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1003 psdir=$ac_optarg ;;
1004
ba4481b5
DL
1005 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1006 | -silent | --silent | --silen | --sile | --sil)
1007 silent=yes ;;
1008
1009 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1010 ac_prev=sbindir ;;
1011 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1012 | --sbi=* | --sb=*)
503d2be0 1013 sbindir=$ac_optarg ;;
ba4481b5
DL
1014
1015 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1016 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1017 | --sharedst | --shareds | --shared | --share | --shar \
1018 | --sha | --sh)
1019 ac_prev=sharedstatedir ;;
1020 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1021 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1022 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1023 | --sha=* | --sh=*)
503d2be0 1024 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1025
1026 -site | --site | --sit)
1027 ac_prev=site ;;
1028 -site=* | --site=* | --sit=*)
503d2be0 1029 site=$ac_optarg ;;
ba4481b5
DL
1030
1031 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1032 ac_prev=srcdir ;;
1033 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1034 srcdir=$ac_optarg ;;
ba4481b5
DL
1035
1036 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1037 | --syscon | --sysco | --sysc | --sys | --sy)
1038 ac_prev=sysconfdir ;;
1039 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1040 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1041 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1042
1043 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1044 ac_prev=target_alias ;;
ba4481b5 1045 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1046 target_alias=$ac_optarg ;;
ba4481b5
DL
1047
1048 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1049 verbose=yes ;;
1050
503d2be0
AS
1051 -version | --version | --versio | --versi | --vers | -V)
1052 ac_init_version=: ;;
ba4481b5
DL
1053
1054 -with-* | --with-*)
503d2be0 1055 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1056 # Reject names that are not valid shell variable names.
f053c89f 1057 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1058 { echo "$as_me: error: invalid package name: $ac_package" >&2
1059 { (exit 1); exit 1; }; }
f053c89f 1060 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1061 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1062
1063 -without-* | --without-*)
503d2be0 1064 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1065 # Reject names that are not valid shell variable names.
f053c89f 1066 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1067 { echo "$as_me: error: invalid package name: $ac_package" >&2
1068 { (exit 1); exit 1; }; }
f053c89f 1069 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1070 eval with_$ac_package=no ;;
ba4481b5
DL
1071
1072 --x)
1073 # Obsolete; use --with-x.
1074 with_x=yes ;;
1075
1076 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1077 | --x-incl | --x-inc | --x-in | --x-i)
1078 ac_prev=x_includes ;;
1079 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1080 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1081 x_includes=$ac_optarg ;;
ba4481b5
DL
1082
1083 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1084 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1085 ac_prev=x_libraries ;;
1086 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1087 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1088 x_libraries=$ac_optarg ;;
ba4481b5 1089
503d2be0
AS
1090 -*) { echo "$as_me: error: unrecognized option: $ac_option
1091Try \`$0 --help' for more information." >&2
1092 { (exit 1); exit 1; }; }
ba4481b5
DL
1093 ;;
1094
503d2be0
AS
1095 *=*)
1096 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1097 # Reject names that are not valid shell variable names.
1098 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1099 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1100 { (exit 1); exit 1; }; }
ca81d7a0 1101 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1102 export $ac_envvar ;;
1103
ba4481b5 1104 *)
503d2be0
AS
1105 # FIXME: should be removed in autoconf 3.0.
1106 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1107 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1108 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1109 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1110 ;;
1111
1112 esac
1113done
1114
1115if test -n "$ac_prev"; then
503d2be0
AS
1116 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1117 { echo "$as_me: error: missing argument to $ac_option" >&2
1118 { (exit 1); exit 1; }; }
ba4481b5 1119fi
ba4481b5 1120
ca81d7a0
JD
1121# Be sure to have absolute directory names.
1122for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1123 datadir sysconfdir sharedstatedir localstatedir includedir \
1124 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1125 libdir localedir mandir
4b411bfe 1126do
ca81d7a0 1127 eval ac_val=\$$ac_var
4b411bfe 1128 case $ac_val in
ca81d7a0
JD
1129 [\\/$]* | ?:[\\/]* ) continue;;
1130 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1131 esac
ca81d7a0
JD
1132 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1133 { (exit 1); exit 1; }; }
ba4481b5
DL
1134done
1135
503d2be0
AS
1136# There might be people who depend on the old broken behavior: `$host'
1137# used to hold the argument of --host etc.
c0d27fcc 1138# FIXME: To remove some day.
503d2be0
AS
1139build=$build_alias
1140host=$host_alias
1141target=$target_alias
1142
c0d27fcc 1143# FIXME: To remove some day.
503d2be0
AS
1144if test "x$host_alias" != x; then
1145 if test "x$build_alias" = x; then
1146 cross_compiling=maybe
1147 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1148 If a cross compiler is detected then cross compile mode will be used." >&2
1149 elif test "x$build_alias" != "x$host_alias"; then
1150 cross_compiling=yes
1151 fi
1152fi
ba4481b5 1153
503d2be0
AS
1154ac_tool_prefix=
1155test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1156
503d2be0 1157test "$silent" = yes && exec 6>/dev/null
ba4481b5 1158
c0d27fcc 1159
ca81d7a0
JD
1160ac_pwd=`pwd` && test -n "$ac_pwd" &&
1161ac_ls_di=`ls -di .` &&
1162ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1163 { echo "$as_me: error: Working directory cannot be determined" >&2
1164 { (exit 1); exit 1; }; }
1165test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1166 { echo "$as_me: error: pwd does not report name of working directory" >&2
1167 { (exit 1); exit 1; }; }
1168
1169
ba4481b5
DL
1170# Find the source files, if location was not specified.
1171if test -z "$srcdir"; then
1172 ac_srcdir_defaulted=yes
ca81d7a0
JD
1173 # Try the directory containing this script, then the parent directory.
1174 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1175$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1176 X"$0" : 'X\(//\)[^/]' \| \
1177 X"$0" : 'X\(//\)$' \| \
ca81d7a0 1178 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1179echo X"$0" |
ca81d7a0
JD
1180 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1181 s//\1/
1182 q
1183 }
1184 /^X\(\/\/\)[^/].*/{
1185 s//\1/
1186 q
1187 }
1188 /^X\(\/\/\)$/{
1189 s//\1/
1190 q
1191 }
1192 /^X\(\/\).*/{
1193 s//\1/
1194 q
1195 }
1196 s/.*/./; q'`
ba4481b5 1197 srcdir=$ac_confdir
ca81d7a0 1198 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1199 srcdir=..
1200 fi
1201else
1202 ac_srcdir_defaulted=no
1203fi
ca81d7a0
JD
1204if test ! -r "$srcdir/$ac_unique_file"; then
1205 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1206 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1207 { (exit 1); exit 1; }; }
ba4481b5 1208fi
ca81d7a0
JD
1209ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1210ac_abs_confdir=`(
1211 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1212 { (exit 1); exit 1; }; }
ca81d7a0
JD
1213 pwd)`
1214# When building in place, set srcdir=.
1215if test "$ac_abs_confdir" = "$ac_pwd"; then
1216 srcdir=.
1217fi
1218# Remove unnecessary trailing slashes from srcdir.
1219# Double slashes in file names in object file debugging info
1220# mess up M-x gdb in Emacs.
1221case $srcdir in
1222*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1223esac
1224for ac_var in $ac_precious_vars; do
1225 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1226 eval ac_env_${ac_var}_value=\$${ac_var}
1227 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1228 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1229done
503d2be0
AS
1230
1231#
1232# Report the --help message.
1233#
1234if test "$ac_init_help" = "long"; then
1235 # Omit some internal or obsolete options to make the list less imposing.
1236 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1237 cat <<_ACEOF
503d2be0
AS
1238\`configure' configures this package to adapt to many kinds of systems.
1239
1240Usage: $0 [OPTION]... [VAR=VALUE]...
1241
1242To assign environment variables (e.g., CC, CFLAGS...), specify them as
1243VAR=VALUE. See below for descriptions of some of the useful variables.
1244
1245Defaults for the options are specified in brackets.
1246
1247Configuration:
1248 -h, --help display this help and exit
1249 --help=short display options specific to this package
1250 --help=recursive display the short help of all the included packages
1251 -V, --version display version information and exit
1252 -q, --quiet, --silent do not print \`checking...' messages
1253 --cache-file=FILE cache test results in FILE [disabled]
1254 -C, --config-cache alias for \`--cache-file=config.cache'
1255 -n, --no-create do not create output files
1256 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1257
503d2be0
AS
1258Installation directories:
1259 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1260 [$ac_default_prefix]
503d2be0 1261 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1262 [PREFIX]
503d2be0
AS
1263
1264By default, \`make install' will install all the files in
1265\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1266an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1267for instance \`--prefix=\$HOME'.
1268
1269For better control, use the options below.
1270
1271Fine tuning of the installation directories:
1272 --bindir=DIR user executables [EPREFIX/bin]
1273 --sbindir=DIR system admin executables [EPREFIX/sbin]
1274 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1275 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1276 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1277 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1278 --libdir=DIR object code libraries [EPREFIX/lib]
1279 --includedir=DIR C header files [PREFIX/include]
1280 --oldincludedir=DIR C header files for non-gcc [/usr/include]
ca81d7a0
JD
1281 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1282 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1283 --infodir=DIR info documentation [DATAROOTDIR/info]
1284 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1285 --mandir=DIR man documentation [DATAROOTDIR/man]
1286 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1287 --htmldir=DIR html documentation [DOCDIR]
1288 --dvidir=DIR dvi documentation [DOCDIR]
1289 --pdfdir=DIR pdf documentation [DOCDIR]
1290 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1291_ACEOF
503d2be0 1292
c0d27fcc 1293 cat <<\_ACEOF
503d2be0 1294
ba5da88a
PJ
1295Program names:
1296 --program-prefix=PREFIX prepend PREFIX to installed program names
1297 --program-suffix=SUFFIX append SUFFIX to installed program names
1298 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1299
503d2be0
AS
1300X features:
1301 --x-includes=DIR X include files are in DIR
1302 --x-libraries=DIR X library files are in DIR
1303
1304System types:
1305 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1306 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1307_ACEOF
503d2be0
AS
1308fi
1309
1310if test -n "$ac_init_help"; then
1311
c0d27fcc 1312 cat <<\_ACEOF
503d2be0
AS
1313
1314Optional Features:
1315 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1316 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6a3a24fa
JD
1317 --enable-carbon-app[=DIR] [DIR=/Application]
1318 specify install directory for Emacs.app on Mac OS X
d0098f13 1319 --enable-asserts compile code with asserts enabled
19650fd6
AS
1320 --enable-maintainer-mode enable make rules and dependencies not useful
1321 (and sometimes confusing) to the casual installer
9adfabc2
LK
1322 --enable-locallisppath=PATH
1323 directories Emacs should search for lisp files
1324 specific to this site
503d2be0
AS
1325 --disable-largefile omit support for large files
1326
1327Optional Packages:
1328 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1329 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1330 --without-gcc don't use GCC to compile Emacs if GCC is found
1331 --without-pop don't support POP mail retrieval with movemail
1332 --with-kerberos support Kerberos-authenticated POP
1333 --with-kerberos5 support Kerberos version 5 authenticated POP
1334 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1335 --without-sound don't compile with sound support
488dd4c4
JD
1336 --with-x-toolkit=KIT use an X toolkit
1337 (KIT = yes/lucid/athena/motif/gtk/no)
503d2be0
AS
1338 --with-xpm use -lXpm for displaying XPM images
1339 --with-jpeg use -ljpeg for displaying JPEG images
1340 --with-tiff use -ltiff for displaying TIFF images
63175cd2 1341 --with-gif use -lgif (or -lungif) for displaying GIF images
503d2be0 1342 --with-png use -lpng for displaying PNG images
79011b82 1343 --with-gpm use -lgpm for mouse support on a GNU/Linux console
488dd4c4
JD
1344 --with-gtk use GTK (same as --with-x-toolkit=gtk)
1345 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 1346 --without-toolkit-scroll-bars
cc227489
MB
1347 don't use Motif or Xaw3d scroll bars
1348 --without-xim don't use X11 XIM
e0f712ba 1349 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
1350 --with-x use the X Window System
1351
1352Some influential environment variables:
1353 CC C compiler command
1354 CFLAGS C compiler flags
1355 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1356 nonstandard directory <lib dir>
f053c89f 1357 LIBS libraries to pass to the linker, e.g. -l<library>
ca81d7a0
JD
1358 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1359 you have headers in a nonstandard directory <include dir>
503d2be0 1360 CPP C preprocessor
ca81d7a0 1361 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1362
1363Use these variables to override the choices made by `configure' or to help
1364it to find libraries and programs with nonstandard names/locations.
1365
c0d27fcc 1366_ACEOF
ca81d7a0 1367ac_status=$?
503d2be0
AS
1368fi
1369
1370if test "$ac_init_help" = "recursive"; then
1371 # If there are subdirs, report their specific --help.
c0d27fcc 1372 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
ca81d7a0 1373 test -d "$ac_dir" || continue
c0d27fcc
MR
1374 ac_builddir=.
1375
ca81d7a0
JD
1376case "$ac_dir" in
1377.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1378*)
c0d27fcc 1379 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
1380 # A ".." for each directory in $ac_dir_suffix.
1381 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1382 case $ac_top_builddir_sub in
1383 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1384 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1385 esac ;;
1386esac
1387ac_abs_top_builddir=$ac_pwd
1388ac_abs_builddir=$ac_pwd$ac_dir_suffix
1389# for backward compatibility:
1390ac_top_builddir=$ac_top_build_prefix
503d2be0 1391
c0d27fcc 1392case $srcdir in
ca81d7a0 1393 .) # We are building in place.
c0d27fcc 1394 ac_srcdir=.
ca81d7a0
JD
1395 ac_top_srcdir=$ac_top_builddir_sub
1396 ac_abs_top_srcdir=$ac_pwd ;;
1397 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1398 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1399 ac_top_srcdir=$srcdir
1400 ac_abs_top_srcdir=$srcdir ;;
1401 *) # Relative name.
1402 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1403 ac_top_srcdir=$ac_top_build_prefix$srcdir
1404 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1405esac
ca81d7a0
JD
1406ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1407
1408 cd "$ac_dir" || { ac_status=$?; continue; }
1409 # Check for guested configure.
1410 if test -f "$ac_srcdir/configure.gnu"; then
1411 echo &&
1412 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1413 elif test -f "$ac_srcdir/configure"; then
1414 echo &&
1415 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1416 else
c0d27fcc 1417 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1418 fi || ac_status=$?
1419 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1420 done
1421fi
1422
ca81d7a0 1423test -n "$ac_init_help" && exit $ac_status
503d2be0 1424if $ac_init_version; then
c0d27fcc 1425 cat <<\_ACEOF
ca81d7a0 1426configure
f053c89f 1427generated by GNU Autoconf 2.61
503d2be0 1428
ca81d7a0 1429Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
040c474e 14302002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1431This configure script is free software; the Free Software Foundation
1432gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1433_ACEOF
ca81d7a0 1434 exit
503d2be0 1435fi
ca81d7a0 1436cat >config.log <<_ACEOF
503d2be0
AS
1437This file contains any messages produced by compilers while
1438running configure, to aid debugging if configure makes a mistake.
1439
1440It was created by $as_me, which was
f053c89f 1441generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1442
1443 $ $0 $@
1444
c0d27fcc 1445_ACEOF
ca81d7a0 1446exec 5>>config.log
503d2be0
AS
1447{
1448cat <<_ASUNAME
c0d27fcc
MR
1449## --------- ##
1450## Platform. ##
1451## --------- ##
503d2be0
AS
1452
1453hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1454uname -m = `(uname -m) 2>/dev/null || echo unknown`
1455uname -r = `(uname -r) 2>/dev/null || echo unknown`
1456uname -s = `(uname -s) 2>/dev/null || echo unknown`
1457uname -v = `(uname -v) 2>/dev/null || echo unknown`
1458
1459/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1460/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1461
1462/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1463/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1464/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ca81d7a0 1465/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1466/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1467/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1468/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1469
925c2f3f 1470_ASUNAME
c0d27fcc
MR
1471
1472as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1473for as_dir in $PATH
1474do
1475 IFS=$as_save_IFS
1476 test -z "$as_dir" && as_dir=.
1477 echo "PATH: $as_dir"
1478done
ca81d7a0 1479IFS=$as_save_IFS
c0d27fcc 1480
503d2be0
AS
1481} >&5
1482
c0d27fcc
MR
1483cat >&5 <<_ACEOF
1484
1485
1486## ----------- ##
1487## Core tests. ##
1488## ----------- ##
1489
1490_ACEOF
503d2be0 1491
503d2be0
AS
1492
1493# Keep a trace of the command line.
1494# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1495# Strip out --silent because we don't want to record it for future runs.
503d2be0 1496# Also quote any args containing shell meta-characters.
19650fd6 1497# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1498ac_configure_args=
19650fd6
AS
1499ac_configure_args0=
1500ac_configure_args1=
19650fd6
AS
1501ac_must_keep_next=false
1502for ac_pass in 1 2
503d2be0 1503do
19650fd6
AS
1504 for ac_arg
1505 do
1506 case $ac_arg in
1507 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1508 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1509 | -silent | --silent | --silen | --sile | --sil)
1510 continue ;;
ca81d7a0 1511 *\'*)
19650fd6
AS
1512 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1513 esac
1514 case $ac_pass in
1515 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1516 2)
1517 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1518 if test $ac_must_keep_next = true; then
edfaf76d 1519 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1520 else
edfaf76d
LK
1521 case $ac_arg in
1522 *=* | --config-cache | -C | -disable-* | --disable-* \
1523 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1524 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1525 | -with-* | --with-* | -without-* | --without-* | --x)
1526 case "$ac_configure_args0 " in
1527 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1528 esac
1529 ;;
1530 -* ) ac_must_keep_next=true ;;
1531 esac
19650fd6 1532 fi
ca81d7a0 1533 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1534 ;;
1535 esac
1536 done
503d2be0 1537done
19650fd6
AS
1538$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1539$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1540
1541# When interrupted or exit'd, cleanup temporary files, and complete
1542# config.log. We remove comments because anyway the quotes in there
1543# would cause problems or look ugly.
ca81d7a0
JD
1544# WARNING: Use '\'' to represent an apostrophe within the trap.
1545# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1546trap 'exit_status=$?
1547 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1548 {
1549 echo
6bae0ccf 1550
c0d27fcc
MR
1551 cat <<\_ASBOX
1552## ---------------- ##
1553## Cache variables. ##
1554## ---------------- ##
1555_ASBOX
1556 echo
1557 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
1558(
1559 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1560 eval ac_val=\$$ac_var
1561 case $ac_val in #(
1562 *${as_nl}*)
1563 case $ac_var in #(
1564 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1565echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1566 esac
1567 case $ac_var in #(
1568 _ | IFS | as_nl) ;; #(
1569 *) $as_unset $ac_var ;;
1570 esac ;;
1571 esac
1572 done
503d2be0 1573 (set) 2>&1 |
ca81d7a0
JD
1574 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1575 *${as_nl}ac_space=\ *)
503d2be0 1576 sed -n \
ca81d7a0
JD
1577 "s/'\''/'\''\\\\'\'''\''/g;
1578 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1579 ;; #(
503d2be0 1580 *)
ca81d7a0 1581 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1582 ;;
ca81d7a0
JD
1583 esac |
1584 sort
1585)
c0d27fcc 1586 echo
6bae0ccf
DL
1587
1588 cat <<\_ASBOX
1589## ----------------- ##
1590## Output variables. ##
1591## ----------------- ##
1592_ASBOX
1593 echo
1594 for ac_var in $ac_subst_vars
1595 do
ca81d7a0
JD
1596 eval ac_val=\$$ac_var
1597 case $ac_val in
1598 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1599 esac
1600 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1601 done | sort
1602 echo
1603
1604 if test -n "$ac_subst_files"; then
1605 cat <<\_ASBOX
ca81d7a0
JD
1606## ------------------- ##
1607## File substitutions. ##
1608## ------------------- ##
6bae0ccf
DL
1609_ASBOX
1610 echo
1611 for ac_var in $ac_subst_files
1612 do
ca81d7a0
JD
1613 eval ac_val=\$$ac_var
1614 case $ac_val in
1615 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1616 esac
1617 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1618 done | sort
1619 echo
1620 fi
1621
c0d27fcc
MR
1622 if test -s confdefs.h; then
1623 cat <<\_ASBOX
1624## ----------- ##
1625## confdefs.h. ##
1626## ----------- ##
1627_ASBOX
1628 echo
ca81d7a0 1629 cat confdefs.h
c0d27fcc
MR
1630 echo
1631 fi
1632 test "$ac_signal" != 0 &&
1633 echo "$as_me: caught signal $ac_signal"
1634 echo "$as_me: exit $exit_status"
1635 } >&5
ca81d7a0
JD
1636 rm -f core *.core core.conftest.* &&
1637 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1638 exit $exit_status
ca81d7a0 1639' 0
503d2be0
AS
1640for ac_signal in 1 2 13 15; do
1641 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1642done
1643ac_signal=0
1644
1645# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 1646rm -f -r conftest* confdefs.h
ba4481b5 1647
c0d27fcc
MR
1648# Predefined preprocessor variables.
1649
1650cat >>confdefs.h <<_ACEOF
1651#define PACKAGE_NAME "$PACKAGE_NAME"
1652_ACEOF
1653
1654
1655cat >>confdefs.h <<_ACEOF
1656#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1657_ACEOF
1658
1659
1660cat >>confdefs.h <<_ACEOF
1661#define PACKAGE_VERSION "$PACKAGE_VERSION"
1662_ACEOF
1663
1664
1665cat >>confdefs.h <<_ACEOF
1666#define PACKAGE_STRING "$PACKAGE_STRING"
1667_ACEOF
1668
1669
1670cat >>confdefs.h <<_ACEOF
1671#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1672_ACEOF
1673
1674
503d2be0 1675# Let the site file select an alternate cache file if it wants to.
ba4481b5 1676# Prefer explicitly selected file to automatically selected ones.
ca81d7a0
JD
1677if test -n "$CONFIG_SITE"; then
1678 set x "$CONFIG_SITE"
1679elif test "x$prefix" != xNONE; then
1680 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1681else
1682 set x "$ac_default_prefix/share/config.site" \
1683 "$ac_default_prefix/etc/config.site"
ba4481b5 1684fi
ca81d7a0
JD
1685shift
1686for ac_site_file
1687do
ba4481b5 1688 if test -r "$ac_site_file"; then
c0d27fcc 1689 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1690echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1691 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1692 . "$ac_site_file"
1693 fi
1694done
1695
1696if test -r "$cache_file"; then
503d2be0
AS
1697 # Some versions of bash will fail to source /dev/null (special
1698 # files actually), so we avoid doing that.
1699 if test -f "$cache_file"; then
c0d27fcc 1700 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1701echo "$as_me: loading cache $cache_file" >&6;}
1702 case $cache_file in
ca81d7a0
JD
1703 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1704 *) . "./$cache_file";;
503d2be0
AS
1705 esac
1706 fi
ba4481b5 1707else
c0d27fcc 1708 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1709echo "$as_me: creating cache $cache_file" >&6;}
1710 >$cache_file
1711fi
1712
f053c89f
CY
1713ac_header_list="$ac_header_list sys/time.h"
1714ac_header_list="$ac_header_list unistd.h"
1715ac_func_list="$ac_func_list alarm"
503d2be0
AS
1716# Check that the precious variables saved in the cache have kept the same
1717# value.
1718ac_cache_corrupted=false
ca81d7a0 1719for ac_var in $ac_precious_vars; do
503d2be0
AS
1720 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1721 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
1722 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1723 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1724 case $ac_old_set,$ac_new_set in
1725 set,)
c0d27fcc 1726 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1727echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1728 ac_cache_corrupted=: ;;
1729 ,set)
c0d27fcc 1730 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1731echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1732 ac_cache_corrupted=: ;;
1733 ,);;
1734 *)
1735 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1736 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1737echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1738 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1739echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1740 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1741echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1742 ac_cache_corrupted=:
503d2be0
AS
1743 fi;;
1744 esac
c0d27fcc 1745 # Pass precious variables to config.status.
503d2be0
AS
1746 if test "$ac_new_set" = set; then
1747 case $ac_new_val in
ca81d7a0 1748 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1749 *) ac_arg=$ac_var=$ac_new_val ;;
1750 esac
1751 case " $ac_configure_args " in
1752 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1753 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1754 esac
1755 fi
1756done
1757if $ac_cache_corrupted; then
c0d27fcc 1758 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1759echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1760 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1761echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1762 { (exit 1); exit 1; }; }
ba4481b5
DL
1763fi
1764
c0d27fcc
MR
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
ba4481b5 1780
ca81d7a0
JD
1781ac_ext=c
1782ac_cpp='$CPP $CPPFLAGS'
1783ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1784ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1785ac_compiler_gnu=$ac_cv_c_compiler_gnu
6bae0ccf 1786
4b411bfe 1787
ca81d7a0 1788ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1789
c0d27fcc 1790
ba5da88a 1791test "$program_prefix" != NONE &&
ca81d7a0 1792 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1793# Use a double $ so make ignores it.
1794test "$program_suffix" != NONE &&
ca81d7a0 1795 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1796# Double any \ or $. echo might interpret backslashes.
1797# By default was `s,x,x', remove it if useless.
1798cat <<\_ACEOF >conftest.sed
1799s/[\\$]/&&/g;s/;s,x,x,$//
1800_ACEOF
1801program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
ca81d7a0 1802rm -f conftest.sed
ba5da88a 1803
c0d27fcc 1804
ba4481b5
DL
1805lispdir='${datadir}/emacs/${version}/lisp'
1806locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1807'${datadir}/emacs/site-lisp'
1808lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1809etcdir='${datadir}/emacs/${version}/etc'
1810archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1811docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1812gamedir='${localstatedir}/games/emacs'
98418dba
CW
1813
1814gameuser=games
1815
c0d27fcc 1816
ca81d7a0 1817# Check whether --with-gcc was given.
ba4481b5 1818if test "${with_gcc+set}" = set; then
ca81d7a0
JD
1819 withval=$with_gcc;
1820fi
503d2be0 1821
ba4481b5 1822
ca81d7a0 1823# Check whether --with-pop was given.
ba4481b5 1824if test "${with_pop+set}" = set; then
ca81d7a0 1825 withval=$with_pop; if test "$withval" = yes; then
c0d27fcc 1826 cat >>confdefs.h <<\_ACEOF
ba4481b5 1827#define MAIL_USE_POP 1
c0d27fcc 1828_ACEOF
ba4481b5 1829
243cf185
DL
1830else :
1831fi
3d9fec71 1832else
c0d27fcc 1833 cat >>confdefs.h <<\_ACEOF
3d9fec71 1834#define MAIL_USE_POP 1
c0d27fcc 1835_ACEOF
3d9fec71 1836
ca81d7a0
JD
1837fi
1838
ba4481b5 1839
c0d27fcc 1840
ca81d7a0 1841# Check whether --with-kerberos was given.
a21616bd 1842if test "${with_kerberos+set}" = set; then
54e6585f
CY
1843 withval=$with_kerberos; if test "$withval" = yes; then
1844 cat >>confdefs.h <<\_ACEOF
a21616bd 1845#define KERBEROS 1
c0d27fcc 1846_ACEOF
a21616bd 1847
ca81d7a0 1848fi
54e6585f 1849fi
ca81d7a0 1850
a21616bd 1851
c0d27fcc 1852
ca81d7a0 1853# Check whether --with-kerberos5 was given.
a21616bd 1854if test "${with_kerberos5+set}" = set; then
ca81d7a0 1855 withval=$with_kerberos5; if test "${with_kerberos5+set}" = set; then
a21616bd
KR
1856 if test "${with_kerberos+set}" != set; then
1857 with_kerberos=yes
c0d27fcc 1858 cat >>confdefs.h <<\_ACEOF
a21616bd 1859#define KERBEROS 1
c0d27fcc 1860_ACEOF
a21616bd
KR
1861
1862 fi
b936fae4 1863
c0d27fcc 1864cat >>confdefs.h <<\_ACEOF
a21616bd 1865#define KERBEROS5 1
c0d27fcc 1866_ACEOF
a21616bd 1867
ca81d7a0 1868fi
54e6585f 1869fi
b936fae4 1870
4b411bfe 1871
ca81d7a0
JD
1872# Check whether --with-hesiod was given.
1873if test "${with_hesiod+set}" = set; then
54e6585f
CY
1874 withval=$with_hesiod; if test "$withval" = yes; then
1875
c0d27fcc 1876cat >>confdefs.h <<\_ACEOF
ba4481b5 1877#define HESIOD 1
c0d27fcc 1878_ACEOF
ba4481b5 1879
ca81d7a0 1880fi
54e6585f 1881fi
ca81d7a0 1882
ba4481b5 1883
c0d27fcc 1884
ca81d7a0 1885# Check whether --with-sound was given.
2c9dccc9 1886if test "${with_sound+set}" = set; then
ca81d7a0
JD
1887 withval=$with_sound;
1888fi
2c9dccc9 1889
2c9dccc9 1890
c0d27fcc 1891
ca81d7a0 1892# Check whether --with-x-toolkit was given.
ba4481b5 1893if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1894 withval=$with_x_toolkit; case "${withval}" in
089a966d 1895 y | ye | yes ) val=gtk ;;
ba4481b5
DL
1896 n | no ) val=no ;;
1897 l | lu | luc | luci | lucid ) val=lucid ;;
1898 a | at | ath | athe | athen | athena ) val=athena ;;
1899 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1900 g | gt | gtk ) val=gtk ;;
ba4481b5 1901 * )
29d69661 1902{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1903this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661
JD
1904\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
1905echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1906this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1907\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
503d2be0 1908 { (exit 1); exit 1; }; }
ba4481b5
DL
1909 ;;
1910 esac
1911 with_x_toolkit=$val
1912
ca81d7a0 1913fi
8eeae1c9 1914
ca81d7a0
JD
1915
1916# Check whether --with-xpm was given.
ba4481b5 1917if test "${with_xpm+set}" = set; then
ca81d7a0
JD
1918 withval=$with_xpm;
1919fi
503d2be0 1920
ba4481b5 1921
ca81d7a0 1922# Check whether --with-jpeg was given.
ba4481b5 1923if test "${with_jpeg+set}" = set; then
ca81d7a0
JD
1924 withval=$with_jpeg;
1925fi
503d2be0 1926
ba4481b5 1927
ca81d7a0 1928# Check whether --with-tiff was given.
ba4481b5 1929if test "${with_tiff+set}" = set; then
ca81d7a0
JD
1930 withval=$with_tiff;
1931fi
503d2be0 1932
ba4481b5 1933
ca81d7a0 1934# Check whether --with-gif was given.
ba4481b5 1935if test "${with_gif+set}" = set; then
ca81d7a0
JD
1936 withval=$with_gif;
1937fi
503d2be0 1938
ba4481b5 1939
ca81d7a0 1940# Check whether --with-png was given.
ba4481b5 1941if test "${with_png+set}" = set; then
ca81d7a0
JD
1942 withval=$with_png;
1943fi
503d2be0 1944
ba4481b5 1945
79011b82
NR
1946# Check whether --with-gpm was given.
1947if test "${with_gpm+set}" = set; then
1948 withval=$with_gpm;
1949fi
1950
1951
ca81d7a0 1952# Check whether --with-gtk was given.
488dd4c4 1953if test "${with_gtk+set}" = set; then
ca81d7a0
JD
1954 withval=$with_gtk;
1955fi
488dd4c4 1956
488dd4c4 1957
ca81d7a0 1958# Check whether --with-pkg-config-prog was given.
488dd4c4 1959if test "${with_pkg_config_prog+set}" = set; then
ca81d7a0
JD
1960 withval=$with_pkg_config_prog;
1961fi
488dd4c4 1962
488dd4c4 1963
ca81d7a0 1964# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 1965if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0
JD
1966 withval=$with_toolkit_scroll_bars;
1967fi
503d2be0 1968
ba4481b5 1969
ca81d7a0 1970# Check whether --with-xim was given.
1d36487c 1971if test "${with_xim+set}" = set; then
ca81d7a0
JD
1972 withval=$with_xim;
1973fi
1d36487c 1974
ba4481b5 1975
ca81d7a0 1976# Check whether --with-carbon was given.
e0f712ba 1977if test "${with_carbon+set}" = set; then
ca81d7a0
JD
1978 withval=$with_carbon;
1979fi
e0f712ba 1980
ca81d7a0 1981# Check whether --enable-carbon-app was given.
6a3a24fa 1982if test "${enable_carbon_app+set}" = set; then
ca81d7a0
JD
1983 enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
1984fi
1985
e0f712ba 1986
ca81d7a0 1987# Check whether --enable-asserts was given.
d0098f13 1988if test "${enable_asserts+set}" = set; then
ca81d7a0 1989 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
1990else
1991 USE_XASSERTS=no
ca81d7a0 1992fi
8eeae1c9 1993
ca81d7a0
JD
1994
1995# Check whether --enable-maintainer-mode was given.
19650fd6 1996if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 1997 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
1998else
1999 USE_MAINTAINER_MODE=no
ca81d7a0
JD
2000fi
2001
19650fd6
AS
2002if test $USE_MAINTAINER_MODE = yes; then
2003 MAINT=
2004else
2005 MAINT=#
2006fi
2007
2008
ca81d7a0 2009# Check whether --enable-locallisppath was given.
9adfabc2 2010if test "${enable_locallisppath+set}" = set; then
ca81d7a0 2011 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2012 locallisppath=
2013elif test "${enableval}" != "yes"; then
2014 locallisppath=${enableval}
2015fi
ca81d7a0
JD
2016fi
2017
9adfabc2 2018
ba4481b5 2019#### Make srcdir absolute, if it isn't already. It's important to
17494071 2020#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2021#### give you automounter prefixes, which can go away. We do all this
2022#### so Emacs can find its files when run uninstalled.
17494071
GM
2023## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2024unset CDPATH
ba4481b5
DL
2025case "${srcdir}" in
2026 /* ) ;;
2027 . )
2028 ## We may be able to use the $PWD environment variable to make this
2029 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2030 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2031 ## but that tested only for a well-formed and valid PWD,
2032 ## it did not object when PWD was well-formed and valid but just wrong.
2033 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2034 then
2035 srcdir="$PWD"
2036 else
2037 srcdir="`(cd ${srcdir}; pwd)`"
2038 fi
2039 ;;
2040 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2041esac
2042
2043#### Check if the source directory already has a configured system in it.
2044if test `pwd` != `(cd ${srcdir} && pwd)` \
2045 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2046 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2047 as a build directory right now; it has been configured in its own
2048 right. To configure in another directory as well, you MUST
2049 use GNU make. If you do not have GNU make, then you must
2050 now do \`make distclean' in ${srcdir},
2051 and then run $0 again." >&5
2052echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2053 as a build directory right now; it has been configured in its own
2054 right. To configure in another directory as well, you MUST
2055 use GNU make. If you do not have GNU make, then you must
2056 now do \`make distclean' in ${srcdir},
503d2be0 2057 and then run $0 again." >&2;}
ba4481b5
DL
2058fi
2059
2060#### Given the configuration name, set machfile and opsysfile to the
2061#### names of the m/*.h and s/*.h files we should use.
2062
2063### Canonicalize the configuration name.
2064
2065ac_aux_dir=
ca81d7a0
JD
2066for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2067 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2068 ac_aux_dir=$ac_dir
2069 ac_install_sh="$ac_aux_dir/install-sh -c"
2070 break
ca81d7a0 2071 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2072 ac_aux_dir=$ac_dir
2073 ac_install_sh="$ac_aux_dir/install.sh -c"
2074 break
ca81d7a0 2075 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2076 ac_aux_dir=$ac_dir
2077 ac_install_sh="$ac_aux_dir/shtool install -c"
2078 break
ba4481b5
DL
2079 fi
2080done
2081if test -z "$ac_aux_dir"; then
ca81d7a0
JD
2082 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2083echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2084 { (exit 1); exit 1; }; }
ba4481b5 2085fi
ca81d7a0
JD
2086
2087# These three variables are undocumented and unsupported,
2088# and are intended to be withdrawn in a future Autoconf release.
2089# They can cause serious problems if a builder's source tree is in a directory
2090# whose full name contains unusual characters.
2091ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2092ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2093ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2094
ba4481b5
DL
2095
2096# Make sure we can run config.sub.
ca81d7a0
JD
2097$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2098 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2099echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2100 { (exit 1); exit 1; }; }
2101
ca81d7a0
JD
2102{ echo "$as_me:$LINENO: checking build system type" >&5
2103echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2104if test "${ac_cv_build+set}" = set; then
2105 echo $ECHO_N "(cached) $ECHO_C" >&6
2106else
ca81d7a0
JD
2107 ac_build_alias=$build_alias
2108test "x$ac_build_alias" = x &&
2109 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2110test "x$ac_build_alias" = x &&
c0d27fcc 2111 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2112echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2113 { (exit 1); exit 1; }; }
ca81d7a0
JD
2114ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2115 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2116echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2117 { (exit 1); exit 1; }; }
2118
2119fi
ca81d7a0
JD
2120{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2121echo "${ECHO_T}$ac_cv_build" >&6; }
2122case $ac_cv_build in
2123*-*-*) ;;
2124*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2125echo "$as_me: error: invalid value of canonical build" >&2;}
2126 { (exit 1); exit 1; }; };;
2127esac
503d2be0 2128build=$ac_cv_build
ca81d7a0
JD
2129ac_save_IFS=$IFS; IFS='-'
2130set x $ac_cv_build
2131shift
2132build_cpu=$1
2133build_vendor=$2
2134shift; shift
2135# Remember, the first character of IFS is used to create $*,
2136# except with old shells:
2137build_os=$*
2138IFS=$ac_save_IFS
2139case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2140
2141
2142{ echo "$as_me:$LINENO: checking host system type" >&5
2143echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2144if test "${ac_cv_host+set}" = set; then
2145 echo $ECHO_N "(cached) $ECHO_C" >&6
2146else
ca81d7a0
JD
2147 if test "x$host_alias" = x; then
2148 ac_cv_host=$ac_cv_build
2149else
2150 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2151 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2152echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2153 { (exit 1); exit 1; }; }
ca81d7a0 2154fi
503d2be0
AS
2155
2156fi
ca81d7a0
JD
2157{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2158echo "${ECHO_T}$ac_cv_host" >&6; }
2159case $ac_cv_host in
2160*-*-*) ;;
2161*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2162echo "$as_me: error: invalid value of canonical host" >&2;}
2163 { (exit 1); exit 1; }; };;
2164esac
503d2be0 2165host=$ac_cv_host
ca81d7a0
JD
2166ac_save_IFS=$IFS; IFS='-'
2167set x $ac_cv_host
2168shift
2169host_cpu=$1
2170host_vendor=$2
2171shift; shift
2172# Remember, the first character of IFS is used to create $*,
2173# except with old shells:
2174host_os=$*
2175IFS=$ac_save_IFS
2176case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2177
c0d27fcc 2178
ba4481b5 2179canonical=$host
1770dcdc 2180configuration=${host_alias-${build_alias-$host}}
ba4481b5 2181
c0d27fcc 2182
22044edf 2183
ba4481b5
DL
2184### If you add support for a new configuration, add code to this
2185### switch statement to recognize your configuration name and select
2186### the appropriate operating system and machine description files.
2187
2188### You would hope that you could choose an m/*.h file pretty much
2189### based on the machine portion of the configuration name, and an s-
2190### file based on the operating system portion. However, it turns out
2191### that each m/*.h file is pretty manufacturer-specific - for
2192### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
2193### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
2194### machines. So we basically have to have a special case for each
2195### configuration name.
2196###
2197### As far as handling version numbers on operating systems is
2198### concerned, make sure things will fail in a fixable way. If
2199### /etc/MACHINES doesn't say anything about version numbers, be
2200### prepared to handle anything reasonably. If version numbers
2201### matter, be sure /etc/MACHINES says something about it.
2202###
2203### Eric Raymond says we should accept strings like "sysvr4" to mean
2204### "System V Release 4"; he writes, "The old convention encouraged
2205### confusion between `system' and `release' levels'."
2206
2207machine='' opsys='' unported=no
2208case "${canonical}" in
2209
1096bcc0
GM
2210 ## FreeBSD ports
2211 *-*-freebsd* )
2212 opsys=freebsd
2213 case "${canonical}" in
2214 alpha*-*-freebsd*) machine=alpha ;;
ec8fcb10
YM
2215 ia64-*-freebsd*) machine=ia64 ;;
2216 sparc64-*-freebsd*) machine=sparc ;;
2217 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2218 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 2219 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2220 esac
2221 ;;
2222
ba4481b5
DL
2223 ## NetBSD ports
2224 *-*-netbsd* )
2225 opsys=netbsd
dd038e26 2226 if test -f /usr/lib/crti.o; then
f57bd967
DL
2227
2228cat >>confdefs.h <<\_ACEOF
2229#define HAVE_CRTIN
dd038e26
AS
2230_ACEOF
2231
2232 fi
2233
ba4481b5
DL
2234 case "${canonical}" in
2235 alpha*-*-netbsd*) machine=alpha ;;
2236 i[3456]86-*-netbsd*) machine=intel386 ;;
2237 m68k-*-netbsd*)
2238 # This is somewhat bogus.
2239 machine=hp9000s300 ;;
ba4481b5 2240 mips-*-netbsd*) machine=pmax ;;
2df636f4 2241 mipsel-*-netbsd*) machine=pmax ;;
97836269 2242 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 2243 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 2244 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2245 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2246 vax-*-netbsd*) machine=vax ;;
2df636f4 2247 arm-*-netbsd*) machine=arm ;;
d54ee7b4 2248 x86_64-*-netbsd*) machine=amdx86-64 ;;
13aadc96 2249 hppa-*-netbsd*) machine=hp800 ;;
d54ee7b4 2250 shle-*-netbsd*) machine=sh3el ;;
ba4481b5
DL
2251 esac
2252 ;;
2253
2254 ## OpenBSD ports
2255 *-*-openbsd* )
2256 opsys=openbsd
2257 case "${canonical}" in
2258 alpha*-*-openbsd*) machine=alpha ;;
85410b02
CY
2259 arm-*-openbsd*) machine=arm ;;
2260 hppa-*-openbsd*) machine=hp9000s300 ;;
2261 i386-*-openbsd*) machine=intel386 ;;
2262 m68k-*-openbsd*) machine=hp9000s300 ;;
2263 m88k-*-openbsd*) machine=aviion ;;
2264 mips64-*-openbsd*) machine=mips64 ;;
2265 powerpc-*-openbsd*) machine=macppc ;;
2266 sh-*-openbsd*) machine=sh3el ;;
2267 sparc*-*-openbsd*) machine=sparc ;;
2268 vax-*-openbsd*) machine=vax ;;
2269 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2270 esac
2271 ;;
2272
10a3b1a1
EZ
2273 ## LynxOS ports
2274 *-*-lynxos* )
2275 opsys=lynxos
2276 case "${canonical}" in
2277 i[3456]86-*-lynxos*) machine=intel386 ;;
2278 powerpc-*-lynxos*) machine=powerpc ;;
2279 esac
2280 ;;
2281
ba4481b5
DL
2282 ## Acorn RISCiX:
2283 arm-acorn-riscix1.1* )
2284 machine=acorn opsys=riscix1-1
2285 ;;
2286 arm-acorn-riscix1.2* | arm-acorn-riscix )
2287 ## This name is riscix12 instead of riscix1.2
2288 ## to avoid a file name conflict on MSDOS.
2289 machine=acorn opsys=riscix12
2290 ;;
2291
2292 ## BSDI ports
2293 *-*-bsdi* )
2294 opsys=bsdi
2295 case "${canonical}" in
2296 i[345]86-*-bsdi*) machine=intel386 ;;
2297 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 2298 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
2299 esac
2300 case "${canonical}" in
2301 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
2302 *-*-bsdi2.0* ) opsys=bsdos2 ;;
2303 *-*-bsdi2* ) opsys=bsdos2-1 ;;
2304 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 2305 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
2306 esac
2307 ;;
2308
2309 ## Alliant machines
2310 ## Strictly speaking, we need the version of the alliant operating
2311 ## system to choose the right machine file, but currently the
2312 ## configuration name doesn't tell us enough to choose the right
2313 ## one; we need to give alliants their own operating system name to
2314 ## do this right. When someone cares, they can help us.
2315 fx80-alliant-* )
2316 machine=alliant4 opsys=bsd4-2
2317 ;;
2318 i860-alliant-* )
2319 machine=alliant-2800 opsys=bsd4-3
2320 ;;
2321
2322 ## Alpha (DEC) machines.
2323 alpha*-dec-osf* )
2324 machine=alpha opsys=osf1
2325 # This is needed to find X11R6.1 libraries for certain tests.
2326 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
2327 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
2328 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
2329 # due to non-traditional preprocessing with the current compiler
2330 # defaults. OSF 4 can also have that compiler version, and there
2331 # seems always to have been a usable /usr/bin/cpp.
2332 NON_GNU_CPP=/usr/bin/cpp
ca512671 2333 case "${canonical}" in
a55b799a 2334 alpha*-dec-osf[5-9]*)
bb17930d 2335 opsys=osf5-0 ;;
ca512671 2336 esac
ba4481b5
DL
2337 ;;
2338
2339 alpha*-*-linux-gnu* )
2340 machine=alpha opsys=gnu-linux
2341 ;;
2342
c4bb2108
DL
2343 arm*-*-linux-gnu* )
2344 machine=arm opsys=gnu-linux
2345 ;;
2346
ba4481b5
DL
2347 ## Altos 3068
2348 m68*-altos-sysv* )
2349 machine=altos opsys=usg5-2
2350 ;;
2351
2352 ## Amdahl UTS
2353 580-amdahl-sysv* )
2354 machine=amdahl opsys=usg5-2-2
2355 ;;
2356
2357 ## Apollo, Domain/OS
2358 m68*-apollo-* )
2359 machine=apollo opsys=bsd4-3
2360 ;;
2361
040c474e
CY
2362 ## Apple Darwin / Mac OS X
2363 *-apple-darwin* )
2364 case "${canonical}" in
2365 i[3456]86-* ) machine=intel386 ;;
2366 powerpc-* ) machine=powermac ;;
2367 * ) unported=yes ;;
2368 esac
2369 opsys=darwin
2370 # Define CPP as follows to make autoconf work correctly.
2371 CPP="${CC-cc} -E -no-cpp-precomp"
2372 # Use fink packages if available.
2373 if test -d /sw/include && test -d /sw/lib; then
2374 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2375 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2376 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2377 fi
2378 ;;
2379
ba4481b5
DL
2380 ## AT&T 3b2, 3b5, 3b15, 3b20
2381 we32k-att-sysv* )
2382 machine=att3b opsys=usg5-2-2
2383 ;;
2384
2385 ## AT&T 3b1 - The Mighty Unix PC!
2386 m68*-att-sysv* )
2387 machine=7300 opsys=usg5-2-2
2388 ;;
2389
2390 ## Bull dpx20
2391 rs6000-bull-bosx* )
2392 machine=ibmrs6000 opsys=aix3-2
2393 ;;
2394
2395 ## Bull dpx2
2396 m68*-bull-sysv3* )
2397 machine=dpx2 opsys=usg5-3
2398 ;;
2399
2400 ## Bull sps7
2401 m68*-bull-sysv2* )
2402 machine=sps7 opsys=usg5-2
2403 ;;
2404
2405 ## CCI 5/32, 6/32 -- see "Tahoe".
2406
2407 ## Celerity
2408 ## I don't know what configuration name to use for this; config.sub
2409 ## doesn't seem to know anything about it. Hey, Celerity users, get
2410 ## in touch with us!
2411 celerity-celerity-bsd* )
2412 machine=celerity opsys=bsd4-2
2413 ;;
2414
2415 ## Clipper
2416 ## What operating systems does this chip run that Emacs has been
2417 ## tested on?
2418 clipper-* )
2419 machine=clipper
2420 ## We'll use the catch-all code at the bottom to guess the
2421 ## operating system.
2422 ;;
2423
df645f7c
AS
2424 ## Compaq Nonstop
2425 mips-compaq-nonstopux* )
2426 machine=nonstopux opsys=nonstopux
2427 ;;
2428
ba4481b5
DL
2429 ## Convex
2430 *-convex-bsd* | *-convex-convexos* )
2431 machine=convex opsys=bsd4-3
2432 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
2433 NON_GNU_CPP="cc -E -P"
2434 ;;
2435
2436 ## Cubix QBx/386
2437 i[3456]86-cubix-sysv* )
2438 machine=intel386 opsys=usg5-3
2439 ;;
2440
2441 ## Cydra 5
2442 cydra*-cydrome-sysv* )
2443 machine=cydra5 opsys=usg5-3
2444 ;;
2445
2446 ## Data General AViiON Machines
2447 ## DG changed naming conventions with the release of 5.4.4.10, they
2448 ## dropped the initial 5.4 but left the intervening R. Because of the
2449 ## R this shouldn't conflict with older versions of the OS (which I
2450 ## think were named like dgux4.*). In addition, DG new AViiONs series
2451 ## uses either Motorola M88k or Intel Pentium CPUs.
2452 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
2453 machine=aviion opsys=dgux4
2454 ;;
2455 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
2456 ## This name is dgux5-4-3 instead of dgux5-4r3
2457 ## to avoid a file name conflict on MSDOS.
2458 machine=aviion opsys=dgux5-4-3
2459 ;;
2460 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
2461 machine=aviion opsys=dgux5-4r2
2462 ;;
2463 m88k-dg-dgux* )
2464 machine=aviion opsys=dgux
2465 ;;
2466
2467 ## Data General AViiON Intel (x86) Machines
2468 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
2469 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
2470 i[345]86-dg-dguxR4* )
2471 machine=aviion-intel opsys=dgux4
2472 ;;
2473
2474 ## DECstations
2475 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
2476 machine=pmax opsys=bsd4-2
2477 ;;
2478 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
2479 machine=pmax opsys=bsd4-3
2480 ;;
2481 mips-dec-ultrix* )
2482 machine=pmax opsys=ultrix4-3
2483 ;;
2484 mips-dec-osf* )
2485 machine=pmax opsys=osf1
2486 ;;
2487 mips-dec-mach_bsd4.3* )
2488 machine=pmax opsys=mach-bsd4-3
2489 ;;
2490
cd890796
JD
2491 ## Motorola Delta machines
2492 m68k-motorola-sysv* | m68000-motorola-sysv* )
2493 machine=delta opsys=usg5-3
2494 if test -z "`type gnucc | grep 'not found'`"
2495 then
2496 if test -s /etc/167config
2497 then CC="gnucc -m68040"
2498 else CC="gnucc -m68881"
2499 fi
2500 else
2501 if test -z "`type gcc | grep 'not found'`"
2502 then CC=gcc
2503 else CC=cc
2504 fi
2505 fi
2506 ;;
ba4481b5
DL
2507 m88k-motorola-sysv4* )
2508 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
2509 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
2510 # I hope there are not other 4.0 versions for this machine
2511 # which really need usg5-4 instead.
2512 machine=delta88k opsys=usg5-4-2
2513 ;;
2514 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
2515 machine=delta88k opsys=usg5-3
2516 ;;
2517
2518 ## Dual machines
2519 m68*-dual-sysv* )
2520 machine=dual opsys=usg5-2
2521 ;;
2522 m68*-dual-uniplus* )
2523 machine=dual opsys=unipl5-2
2524 ;;
2525
2526 ## Elxsi 6400
2527 elxsi-elxsi-sysv* )
2528 machine=elxsi opsys=usg5-2
2529 ;;
2530
2531 ## Encore machines
2532 ns16k-encore-bsd* )
2533 machine=ns16000 opsys=umax
2534 ;;
2535
65171e3a
DL
2536 ## The GEC 63 - apparently, this port isn't really finished yet.
2537 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
2538
2539 ## Gould Power Node and NP1
2540 pn-gould-bsd4.2* )
2541 machine=gould opsys=bsd4-2
2542 ;;
2543 pn-gould-bsd4.3* )
2544 machine=gould opsys=bsd4-3
2545 ;;
2546 np1-gould-bsd* )
2547 machine=gould-np1 opsys=bsd4-3
2548 ;;
2549
2550 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2551 ## as far as Emacs is concerned).
2552 m88k-harris-cxux* )
2553 # Build needs to be different on 7.0 and later releases
2554 case "`uname -r`" in
2555 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2556 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2557 esac
2558 NON_GNU_CPP="/lib/cpp"
2559 ;;
2560 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2561 m68k-harris-cxux* )
2562 machine=nh3000 opsys=cxux
2563 ;;
2564 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2565 powerpc-harris-powerunix )
2566 machine=nh6000 opsys=powerunix
2567 NON_GNU_CPP="cc -Xo -E -P"
2568 ;;
6fbb6db1
GM
2569 ## SR2001/SR2201 running HI-UX/MPP
2570 hppa1.1-hitachi-hiuxmpp* )
2571 machine=sr2k opsys=hiuxmpp
2572 ;;
2573 hppa1.1-hitachi-hiuxwe2* )
2574 machine=sr2k opsys=hiuxwe2
2575 ;;
ba4481b5
DL
2576 ## Honeywell XPS100
2577 xps*-honeywell-sysv* )
2578 machine=xps100 opsys=usg5-2
2579 ;;
2580
2581 ## HP 9000 series 200 or 300
2582 m68*-hp-bsd* )
2583 machine=hp9000s300 opsys=bsd4-3
2584 ;;
2585 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2586 m68*-hp-hpux* )
2587 case "`uname -r`" in
2588 ## Someone's system reports A.B8.05 for this.
2589 ## I wonder what other possibilities there are.
2590 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2591 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2592 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2593 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2594 *) machine=hp9000s300 opsys=hpux ;;
2595 esac
2596 ;;
2597
6fbb6db1
GM
2598 ## HP 9000 series 700 and 800, running HP/UX
2599 hppa*-hp-hpux7* )
2600 machine=hp800 opsys=hpux
2601 ;;
2602 hppa*-hp-hpux8* )
2603 machine=hp800 opsys=hpux8
2604 ;;
2605 hppa*-hp-hpux9shr* )
2606 machine=hp800 opsys=hpux9shr
2607 ;;
2608 hppa*-hp-hpux9* )
2609 machine=hp800 opsys=hpux9
2610 ;;
2611 hppa*-hp-hpux10.2* )
2612 machine=hp800 opsys=hpux10-20
2613 ;;
2614 hppa*-hp-hpux10* )
2615 machine=hp800 opsys=hpux10
2616 ;;
2617 hppa*-hp-hpux1[1-9]* )
2618 machine=hp800 opsys=hpux11
2619 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2620 ;;
2621
13aadc96
CY
2622 hppa*-*-linux-gnu* )
2623 machine=hp800 opsys=gnu-linux
2624 ;;
2625
6fbb6db1
GM
2626 ## HP 9000 series 700 and 800, running HP/UX
2627 hppa*-hp-hpux* )
2628 ## Cross-compilation? Nah!
2629 case "`uname -r`" in
2630 ## Someone's system reports A.B8.05 for this.
2631 ## I wonder what other possibilities there are.
2632 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2633 *.08.* ) machine=hp800 opsys=hpux8 ;;
2634 *.09.* ) machine=hp800 opsys=hpux9 ;;
2635 *) machine=hp800 opsys=hpux10 ;;
2636 esac
2637 ;;
13aadc96
CY
2638 hppa*-*-nextstep* )
2639 machine=hp800 opsys=nextstep
2640 ;;
2641
ba4481b5
DL
2642 ## Orion machines
2643 orion-orion-bsd* )
2644 machine=orion opsys=bsd4-2
2645 ;;
2646 clipper-orion-bsd* )
2647 machine=orion105 opsys=bsd4-2
2648 ;;
2649
2650 ## IBM machines
2651 i[3456]86-ibm-aix1.1* )
2652 machine=ibmps2-aix opsys=usg5-2-2
2653 ;;
2654 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2655 machine=ibmps2-aix opsys=usg5-3
2656 ;;
2657 i370-ibm-aix*)
2658 machine=ibm370aix opsys=usg5-3
2659 ;;
55597d70 2660 s390-*-linux-gnu* )
138f0859
GM
2661 machine=ibms390 opsys=gnu-linux
2662 ;;
bcdb1378
EZ
2663 s390x-*-linux-gnu* )
2664 machine=ibms390x opsys=gnu-linux
2665 ;;
ba4481b5
DL
2666 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2667 machine=ibmrs6000 opsys=aix3-1
2668 ;;
2669 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2670 machine=ibmrs6000 opsys=aix3-2-5
2671 ;;
2672 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2673 machine=ibmrs6000 opsys=aix4-1
2674 ;;
2675 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2676 machine=ibmrs6000 opsys=aix4-2
2677 ;;
67bf991b
CY
2678 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2679 machine=ibmrs6000 opsys=aix4-2
2680 ;;
55597d70 2681 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2682 machine=ibmrs6000 opsys=aix4-2
2683 ;;
ba4481b5
DL
2684 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2685 machine=ibmrs6000 opsys=aix4
2686 ;;
2687 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2688 machine=ibmrs6000 opsys=aix4-1
2689 ;;
2690 rs6000-ibm-aix* | powerpc-ibm-aix* )
2691 machine=ibmrs6000 opsys=aix3-2
2692 ;;
2693 romp-ibm-bsd4.3* )
2694 machine=ibmrt opsys=bsd4-3
2695 ;;
2696 romp-ibm-bsd4.2* )
2697 machine=ibmrt opsys=bsd4-2
2698 ;;
2699 romp-ibm-aos4.3* )
2700 machine=ibmrt opsys=bsd4-3
2701 ;;
2702 romp-ibm-aos4.2* )
2703 machine=ibmrt opsys=bsd4-2
2704 ;;
2705 romp-ibm-aos* )
2706 machine=ibmrt opsys=bsd4-3
2707 ;;
2708 romp-ibm-bsd* )
2709 machine=ibmrt opsys=bsd4-3
2710 ;;
2711 romp-ibm-aix* )
2712 machine=ibmrt-aix opsys=usg5-2-2
2713 ;;
2714
2715 ## Integrated Solutions `Optimum V'
2716 m68*-isi-bsd4.2* )
2717 machine=isi-ov opsys=bsd4-2
2718 ;;
2719 m68*-isi-bsd4.3* )
2720 machine=isi-ov opsys=bsd4-3
2721 ;;
2722
2723 ## Intel 386 machines where we do care about the manufacturer
2724 i[3456]86-intsys-sysv* )
2725 machine=is386 opsys=usg5-2-2
2726 ;;
2727
2728 ## Prime EXL
2729 i[3456]86-prime-sysv* )
2730 machine=i386 opsys=usg5-3
2731 ;;
2732
2733 ## Sequent Symmetry running Dynix
2734 i[3456]86-sequent-bsd* )
2735 machine=symmetry opsys=bsd4-3
2736 ;;
2737
2738 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2739 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2740 machine=sequent-ptx opsys=ptx4
2741 NON_GNU_CPP=/lib/cpp
2742 ;;
2743
2744 ## Sequent Symmetry running DYNIX/ptx
2745 ## Use the old cpp rather than the newer ANSI one.
2746 i[3456]86-sequent-ptx* )
2747 machine=sequent-ptx opsys=ptx
2748 NON_GNU_CPP="/lib/cpp"
2749 ;;
2750
2751 ## ncr machine running svr4.3.
2752 i[3456]86-ncr-sysv4.3 )
2753 machine=ncr386 opsys=usg5-4-3
2754 ;;
2755
2756 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2757 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2758 i[3456]86-ncr-sysv* )
2759 machine=ncr386 opsys=usg5-4-2
2760 ;;
2761
2762 ## Intel Paragon OSF/1
2763 i860-intel-osf1* )
2764 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2765 ;;
2766
2767 ## Intel 860
2768 i860-*-sysv4* )
2769 machine=i860 opsys=usg5-4
2770 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2771 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2772 ;;
2773
c76e04a8
GM
2774 ## Macintosh PowerPC
2775 powerpc*-*-linux-gnu* )
2776 machine=macppc opsys=gnu-linux
2777 ;;
2778
ba4481b5
DL
2779 ## Masscomp machines
2780 m68*-masscomp-rtu* )
2781 machine=masscomp opsys=rtu
2782 ;;
2783
2784 ## Megatest machines
2785 m68*-megatest-bsd* )
2786 machine=mega68 opsys=bsd4-2
2787 ;;
2788
2789 ## Workstations sold by MIPS
2790 ## This is not necessarily all workstations using the MIPS processor -
2791 ## Irises are produced by SGI, and DECstations by DEC.
2792
2793 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2794 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2795 ## it gives for choosing between the alternatives seems to be "Use
2796 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2797 ## the BSD world." I'll assume that these are instructions for
2798 ## handling two odd situations, and that every other situation
2799 ## should use mips.h and usg5-2-2, they being listed first.
2800 mips-mips-usg* )
2801 machine=mips4
2802 ## Fall through to the general code at the bottom to decide on the OS.
2803 ;;
2804 mips-mips-riscos4* )
2805 machine=mips4 opsys=bsd4-3
2806 NON_GNU_CC="cc -systype bsd43"
2807 NON_GNU_CPP="cc -systype bsd43 -E"
2808 ;;
2809 mips-mips-riscos5* )
2810 machine=mips4 opsys=riscos5
2811 NON_GNU_CC="cc -systype bsd43"
2812 NON_GNU_CPP="cc -systype bsd43 -E"
2813 ;;
2814 mips-mips-bsd* )
2815 machine=mips opsys=bsd4-3
2816 ;;
2817 mips-mips-* )
2818 machine=mips opsys=usg5-2-2
2819 ;;
2820
2821 ## NeXT
2822 m68*-next-* | m68k-*-nextstep* )
2823 machine=m68k opsys=nextstep
2824 ;;
2825
2826 ## The complete machine from National Semiconductor
2827 ns32k-ns-genix* )
2828 machine=ns32000 opsys=usg5-2
2829 ;;
2830
2831 ## NCR machines
2832 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2833 machine=tower32 opsys=usg5-2-2
2834 ;;
2835 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2836 machine=tower32v3 opsys=usg5-3
2837 ;;
2838
2839 ## NEC EWS4800
2840 mips-nec-sysv4*)
2841 machine=ews4800 opsys=ux4800
2842 ;;
2843
2844 ## Nixdorf Targon 31
2845 m68*-nixdorf-sysv* )
2846 machine=targon31 opsys=usg5-2-2
2847 ;;
2848
2849 ## Nu (TI or LMI)
2850 m68*-nu-sysv* )
2851 machine=nu opsys=usg5-2
2852 ;;
2853
2854 ## Plexus
2855 m68*-plexus-sysv* )
2856 machine=plexus opsys=usg5-2
2857 ;;
2858
ba4481b5
DL
2859 ## Pyramid machines
2860 ## I don't really have any idea what sort of processor the Pyramid has,
2861 ## so I'm assuming it is its own architecture.
2862 pyramid-pyramid-bsd* )
2863 machine=pyramid opsys=bsd4-2
2864 ;;
2865
2866 ## Sequent Balance
2867 ns32k-sequent-bsd4.2* )
2868 machine=sequent opsys=bsd4-2
2869 ;;
2870 ns32k-sequent-bsd4.3* )
2871 machine=sequent opsys=bsd4-3
2872 ;;
2873
2874 ## Siemens Nixdorf
2875 mips-siemens-sysv* | mips-sni-sysv*)
2876 machine=mips-siemens opsys=usg5-4
2877 NON_GNU_CC=/usr/ccs/bin/cc
2878 NON_GNU_CPP=/usr/ccs/lib/cpp
2879 ;;
2880
2881 ## Silicon Graphics machines
2882 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2883 m68*-sgi-iris3.5* )
2884 machine=irist opsys=iris3-5
2885 ;;
2886 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2887 machine=irist opsys=iris3-6
2888 ;;
2889 ## Iris 4D
2890 mips-sgi-irix3* )
2891 machine=iris4d opsys=irix3-3
2892 ;;
2893 mips-sgi-irix4* )
2894 machine=iris4d opsys=irix4-0
2895 ;;
2896 mips-sgi-irix6.5 )
2897 machine=iris4d opsys=irix6-5
946173ad
DL
2898 # Without defining _LANGUAGE_C, things get masked out in the headers
2899 # so that, for instance, grepping for `free' in stdlib.h fails and
2900 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2901 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2902 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2903 ;;
2904 mips-sgi-irix6* )
2905 machine=iris4d opsys=irix6-0
c4bb2108 2906 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2907 # but presumably it does no harm.
2908 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2909 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2910 NON_GCC_TEST_OPTIONS=-32
2911 ;;
2912 mips-sgi-irix5.[01]* )
2913 machine=iris4d opsys=irix5-0
2914 ;;
2915 mips-sgi-irix5* | mips-sgi-irix* )
2916 machine=iris4d opsys=irix5-2
2917 ;;
2918
2919 ## SONY machines
2920 m68*-sony-bsd4.2* )
2921 machine=news opsys=bsd4-2
2922 ;;
2923 m68*-sony-bsd4.3* )
2924 machine=news opsys=bsd4-3
2925 ;;
2926 m68*-sony-newsos3* | m68*-sony-news3*)
2927 machine=news opsys=bsd4-3
2928 ;;
2929 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2930 machine=news-risc opsys=bsd4-3
2931 ;;
2932 mips-sony-newsos6* )
2933 machine=news-r6 opsys=newsos6
2934 ;;
2935 mips-sony-news* )
2936 machine=news-risc opsys=newsos5
2937 ;;
2938
2939 ## Stride
2940 m68*-stride-sysv* )
2941 machine=stride opsys=usg5-2
2942 ;;
2943
2944 ## Suns
2945 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2946 machine=sparc opsys=gnu-linux
2947 ;;
2948
d054101f 2949 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2950 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2951 | rs6000-*-solaris2*)
2952 case "${canonical}" in
2953 m68*-sunos1* ) machine=sun1 ;;
2954 m68*-sunos2* ) machine=sun2 ;;
2955 m68* ) machine=sun3 ;;
2956 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2957 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2958 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2959 powerpcle* ) machine=powerpcle ;;
2960 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2961 sparc* ) machine=sparc ;;
2962 * ) unported=yes ;;
2963 esac
2964 case "${canonical}" in
2965 ## The Sun386 didn't get past 4.0.
2966 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2967 *-sunos4.0* ) opsys=sunos4-0 ;;
2968 *-sunos4.1.[3-9]*noshare )
2969 ## This name is sunos413 instead of sunos4-1-3
2970 ## to avoid a file name conflict on MSDOS.
2971 opsys=sunos413
2972 NON_GNU_CPP=/usr/lib/cpp
2973 NON_GCC_TEST_OPTIONS=-Bstatic
2974 GCC_TEST_OPTIONS=-static
2975 ;;
2976 *-sunos4.1.[3-9]* | *-sunos4shr*)
2977 opsys=sunos4shr
2978 NON_GNU_CPP=/usr/lib/cpp
2979 ;;
2980 *-sunos4* | *-sunos )
2981 opsys=sunos4-1
2982 NON_GCC_TEST_OPTIONS=-Bstatic
2983 GCC_TEST_OPTIONS=-static
2984 ;;
2985 *-sunos5.3* | *-solaris2.3* )
2986 opsys=sol2-3
2987 NON_GNU_CPP=/usr/ccs/lib/cpp
2988 ;;
2989 *-sunos5.4* | *-solaris2.4* )
2990 opsys=sol2-4
2991 NON_GNU_CPP=/usr/ccs/lib/cpp
2992 RANLIB="ar -ts"
2993 ;;
2994 *-sunos5.5* | *-solaris2.5* )
2995 opsys=sol2-5
2996 NON_GNU_CPP=/usr/ccs/lib/cpp
2997 RANLIB="ar -ts"
2998 ;;
8e967cf7
MR
2999 *-sunos5.6* | *-solaris2.6* )
3000 opsys=sol2-6
3001 NON_GNU_CPP=/usr/ccs/lib/cpp
3002 RANLIB="ar -ts"
3003 ;;
ba4481b5 3004 *-sunos5* | *-solaris* )
9e71690e 3005 opsys=sol2-6
089a966d
GM
3006 emacs_check_sunpro_c=yes
3007 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5
DL
3008 ;;
3009 * ) opsys=bsd4-2 ;;
3010 esac
3011 ## Watch out for a compiler that we know will not work.
3012 case "${canonical}" in
3013 *-solaris* | *-sunos5* )
3014 if [ "x$CC" = x/usr/ucb/cc ]; then
3015 ## /usr/ucb/cc doesn't work;
3016 ## we should find some other compiler that does work.
3017 unset CC
3018 fi
3019 ;;
3020 *) ;;
3021 esac
3022 ;;
3023 sparc-*-nextstep* )
3024 machine=sparc opsys=nextstep
3025 ;;
3026
3027 ## Tadpole 68k
3028 m68*-tadpole-sysv* )
3029 machine=tad68k opsys=usg5-3
3030 ;;
3031
3032 ## Tahoe machines
3033 tahoe-tahoe-bsd4.2* )
3034 machine=tahoe opsys=bsd4-2
3035 ;;
3036 tahoe-tahoe-bsd4.3* )
3037 machine=tahoe opsys=bsd4-3
3038 ;;
3039
3040 ## Tandem Integrity S2
3041 mips-tandem-sysv* )
3042 machine=tandem-s2 opsys=usg5-3
3043 ;;
3044
3045 ## Tektronix XD88
3046 m88k-tektronix-sysv3* )
3047 machine=tekxd88 opsys=usg5-3
3048 ;;
3049
3050 ## Tektronix 16000 box (6130?)
3051 ns16k-tektronix-bsd* )
3052 machine=ns16000 opsys=bsd4-2
3053 ;;
3054 ## Tektronix 4300
3055 ## src/m/tek4300.h hints that this is a m68k machine.
3056 m68*-tektronix-bsd* )
3057 machine=tek4300 opsys=bsd4-3
3058 ;;
3059
3060 ## Titan P2 or P3
3061 ## We seem to have lost the machine-description file titan.h!
3062 titan-titan-sysv* )
3063 machine=titan opsys=usg5-3
3064 ;;
3065
3066 ## Ustation E30 (SS5E)
3067 m68*-unisys-uniplus* )
3068 machine=ustation opsystem=unipl5-2
3069 ;;
3070
3071 ## Vaxen.
3072 vax-dec-* )
3073 machine=vax
3074 case "${canonical}" in
3075 *-bsd4.1* ) opsys=bsd4-1 ;;
3076 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
3077 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
3078 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
3079 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
3080 *-vms* ) opsys=vms ;;
3081 * ) unported=yes
3082 esac
3083 ;;
3084
3085 ## Whitechapel MG1
3086 ns16k-whitechapel-* )
3087 machine=mg1
3088 ## We don't know what sort of OS runs on these; we'll let the
3089 ## operating system guessing code below try.
3090 ;;
3091
3092 ## Wicat
3093 m68*-wicat-sysv* )
3094 machine=wicat opsys=usg5-2
3095 ;;
3096
f4988be7
GM
3097 ## IA-64
3098 ia64*-*-linux* )
3099 machine=ia64 opsys=gnu-linux
3100 ;;
3101
ba4481b5
DL
3102 ## Intel 386 machines where we don't care about the manufacturer
3103 i[3456]86-*-* )
3104 machine=intel386
3105 case "${canonical}" in
c60ee5e7 3106 *-cygwin ) opsys=cygwin ;;
eae54018 3107 *-darwin* ) opsys=darwin
23fd4483
ST
3108 CPP="${CC-cc} -E -no-cpp-precomp"
3109 ;;
ba4481b5
DL
3110 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
3111 *-isc2.2* ) opsys=isc2-2 ;;
3112 *-isc4.0* ) opsys=isc4-0 ;;
3113 *-isc4.* ) opsys=isc4-1
3114 GCC_TEST_OPTIONS=-posix
3115 NON_GCC_TEST_OPTIONS=-Xp
3116 ;;
3117 *-isc* ) opsys=isc3-0 ;;
3118 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
3119 *-esix* ) opsys=esix ;;
3120 *-xenix* ) opsys=xenix ;;
3121 *-linux-gnu* ) opsys=gnu-linux ;;
3122 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 3123 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
3124 NON_GNU_CPP=/lib/cpp
3125 # Prevent -belf from being passed to $CPP.
3126 # /lib/cpp does not accept it.
3127 OVERRIDE_CPPFLAGS=" "
3128 ;;
3129 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
3130 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3131 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 3132 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
3133 *-nextstep* ) opsys=nextstep ;;
3134 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3135 esac
3136 ;;
3137
3138 ## m68k Linux-based GNU system
3139 m68k-*-linux-gnu* )
3140 machine=m68k opsys=gnu-linux
3141 ;;
3142
3143 ## Mips Linux-based GNU system
cd958eb3 3144 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
3145 machine=mips opsys=gnu-linux
3146 ;;
3147
3148 ## UXP/DS
3149 sparc-fujitsu-sysv4* )
3150 machine=sparc opsys=uxpds
3151 NON_GNU_CPP=/usr/ccs/lib/cpp
3152 RANLIB="ar -ts"
3153 ;;
3154
3155 ## UXP/V
3156 f301-fujitsu-uxpv4.1)
3157 machine=f301 opsys=uxpv
3158 ;;
3159
598a2813
AS
3160 ## AMD x86-64 Linux-based GNU system
3161 x86_64-*-linux-gnu* )
24b01ec4 3162 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
3163 ;;
3164
94218e27
DN
3165 ## Tensilica Xtensa Linux-based GNU system
3166 xtensa-*-linux-gnu* )
3167 machine=xtensa opsys=gnu-linux
3168 ;;
3169
ba4481b5
DL
3170 * )
3171 unported=yes
3172 ;;
3173esac
3174
3175### If the code above didn't choose an operating system, just choose
3176### an operating system based on the configuration name. You really
3177### only want to use this when you have no idea what the right
3178### operating system is; if you know what operating systems a machine
3179### runs, it's cleaner to make it explicit in the case statement
3180### above.
3181if test x"${opsys}" = x; then
3182 case "${canonical}" in
3183 *-gnu* ) opsys=gnu ;;
3184 *-bsd4.[01] ) opsys=bsd4-1 ;;
3185 *-bsd4.2 ) opsys=bsd4-2 ;;
3186 *-bsd4.3 ) opsys=bsd4-3 ;;
3187 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
3188 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
3189 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
3190 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
3191 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
3192 *-sysv5uw* ) opsys=unixware ;;
3193 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
3194 *-sysv4.1* | *-sysvr4.1* )
3195 NON_GNU_CPP=/usr/lib/cpp
3196 opsys=usg5-4 ;;
3197 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
3198 if [ x$NON_GNU_CPP = x ]; then
3199 if [ -f /usr/ccs/lib/cpp ]; then
3200 NON_GNU_CPP=/usr/ccs/lib/cpp
3201 else
3202 NON_GNU_CPP=/lib/cpp
3203 fi
3204 fi
3205 opsys=usg5-4-2 ;;
3206 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
3207 * )
3208 unported=yes
3209 ;;
3210 esac
3211fi
3212
c0d27fcc 3213
22044edf 3214
ba4481b5 3215if test $unported = yes; then
c0d27fcc 3216 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
3217Check \`etc/MACHINES' for recognized configuration names." >&5
3218echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
3219Check \`etc/MACHINES' for recognized configuration names." >&2;}
3220 { (exit 1); exit 1; }; }
ba4481b5
DL
3221fi
3222
3223machfile="m/${machine}.h"
3224opsysfile="s/${opsys}.h"
3225
c0d27fcc 3226
ba4481b5
DL
3227#### Choose a compiler.
3228test -n "$CC" && cc_specified=yes
3229
3230# Save the value of CFLAGS that the user specified.
3231SPECIFIED_CFLAGS="$CFLAGS"
3232
3233case ${with_gcc} in
3234 "yes" ) CC="gcc" GCC=yes ;;
3235 "no" ) : ${CC=cc} ;;
503d2be0
AS
3236 * )
3237esac
3238ac_ext=c
3239ac_cpp='$CPP $CPPFLAGS'
3240ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3241ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3242ac_compiler_gnu=$ac_cv_c_compiler_gnu
3243if test -n "$ac_tool_prefix"; then
3244 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3245set dummy ${ac_tool_prefix}gcc; ac_word=$2
ca81d7a0
JD
3246{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3247echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3248if test "${ac_cv_prog_CC+set}" = set; then
3249 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3250else
3251 if test -n "$CC"; then
3252 ac_cv_prog_CC="$CC" # Let the user override the test.
3253else
c0d27fcc
MR
3254as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3255for as_dir in $PATH
3256do
3257 IFS=$as_save_IFS
3258 test -z "$as_dir" && as_dir=.
3259 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3260 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3261 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3262 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3263 break 2
3264 fi
3265done
503d2be0 3266done
ca81d7a0 3267IFS=$as_save_IFS
503d2be0 3268
ba4481b5
DL
3269fi
3270fi
503d2be0 3271CC=$ac_cv_prog_CC
ba4481b5 3272if test -n "$CC"; then
ca81d7a0
JD
3273 { echo "$as_me:$LINENO: result: $CC" >&5
3274echo "${ECHO_T}$CC" >&6; }
503d2be0 3275else
ca81d7a0
JD
3276 { echo "$as_me:$LINENO: result: no" >&5
3277echo "${ECHO_T}no" >&6; }
503d2be0
AS
3278fi
3279
ca81d7a0 3280
503d2be0
AS
3281fi
3282if test -z "$ac_cv_prog_CC"; then
3283 ac_ct_CC=$CC
3284 # Extract the first word of "gcc", so it can be a program name with args.
3285set dummy gcc; ac_word=$2
ca81d7a0
JD
3286{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3287echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3288if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3289 echo $ECHO_N "(cached) $ECHO_C" >&6
3290else
3291 if test -n "$ac_ct_CC"; then
3292 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3293else
c0d27fcc
MR
3294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3295for as_dir in $PATH
3296do
3297 IFS=$as_save_IFS
3298 test -z "$as_dir" && as_dir=.
3299 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3300 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3301 ac_cv_prog_ac_ct_CC="gcc"
3302 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3303 break 2
3304 fi
3305done
503d2be0 3306done
ca81d7a0 3307IFS=$as_save_IFS
503d2be0
AS
3308
3309fi
3310fi
3311ac_ct_CC=$ac_cv_prog_ac_ct_CC
3312if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3313 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3314echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 3315else
ca81d7a0
JD
3316 { echo "$as_me:$LINENO: result: no" >&5
3317echo "${ECHO_T}no" >&6; }
503d2be0
AS
3318fi
3319
ca81d7a0
JD
3320 if test "x$ac_ct_CC" = x; then
3321 CC=""
3322 else
3323 case $cross_compiling:$ac_tool_warned in
3324yes:)
3325{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3326whose name does not start with the host triplet. If you think this
3327configuration is useful to you, please write to autoconf@gnu.org." >&5
3328echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3329whose name does not start with the host triplet. If you think this
3330configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3331ac_tool_warned=yes ;;
3332esac
3333 CC=$ac_ct_CC
3334 fi
503d2be0
AS
3335else
3336 CC="$ac_cv_prog_CC"
ba4481b5
DL
3337fi
3338
3339if test -z "$CC"; then
ca81d7a0
JD
3340 if test -n "$ac_tool_prefix"; then
3341 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 3342set dummy ${ac_tool_prefix}cc; ac_word=$2
ca81d7a0
JD
3343{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3344echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3345if test "${ac_cv_prog_CC+set}" = set; then
3346 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3347else
3348 if test -n "$CC"; then
3349 ac_cv_prog_CC="$CC" # Let the user override the test.
3350else
c0d27fcc
MR
3351as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3352for as_dir in $PATH
3353do
3354 IFS=$as_save_IFS
3355 test -z "$as_dir" && as_dir=.
3356 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3357 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3358 ac_cv_prog_CC="${ac_tool_prefix}cc"
3359 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3360 break 2
3361 fi
3362done
503d2be0 3363done
ca81d7a0 3364IFS=$as_save_IFS
503d2be0
AS
3365
3366fi
3367fi
3368CC=$ac_cv_prog_CC
3369if test -n "$CC"; then
ca81d7a0
JD
3370 { echo "$as_me:$LINENO: result: $CC" >&5
3371echo "${ECHO_T}$CC" >&6; }
4b411bfe 3372else
ca81d7a0
JD
3373 { echo "$as_me:$LINENO: result: no" >&5
3374echo "${ECHO_T}no" >&6; }
4b411bfe
CY
3375fi
3376
4b411bfe 3377
ca81d7a0 3378 fi
503d2be0
AS
3379fi
3380if test -z "$CC"; then
3381 # Extract the first word of "cc", so it can be a program name with args.
3382set dummy cc; ac_word=$2
ca81d7a0
JD
3383{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3384echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3385if test "${ac_cv_prog_CC+set}" = set; then
3386 echo $ECHO_N "(cached) $ECHO_C" >&6
3387else
3388 if test -n "$CC"; then
3389 ac_cv_prog_CC="$CC" # Let the user override the test.
3390else
3391 ac_prog_rejected=no
c0d27fcc
MR
3392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3393for as_dir in $PATH
3394do
3395 IFS=$as_save_IFS
3396 test -z "$as_dir" && as_dir=.
3397 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3398 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3399 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3400 ac_prog_rejected=yes
3401 continue
3402 fi
3403 ac_cv_prog_CC="cc"
3404 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3405 break 2
3406 fi
3407done
503d2be0 3408done
ca81d7a0 3409IFS=$as_save_IFS
503d2be0 3410
ba4481b5
DL
3411if test $ac_prog_rejected = yes; then
3412 # We found a bogon in the path, so make sure we never use it.
3413 set dummy $ac_cv_prog_CC
3414 shift
503d2be0 3415 if test $# != 0; then
ba4481b5
DL
3416 # We chose a different compiler from the bogus one.
3417 # However, it has the same basename, so the bogon will be chosen
3418 # first if we set CC to just the basename; use the full file name.
3419 shift
6bae0ccf 3420 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
3421 fi
3422fi
3423fi
3424fi
503d2be0 3425CC=$ac_cv_prog_CC
ba4481b5 3426if test -n "$CC"; then
ca81d7a0
JD
3427 { echo "$as_me:$LINENO: result: $CC" >&5
3428echo "${ECHO_T}$CC" >&6; }
ba4481b5 3429else
ca81d7a0
JD
3430 { echo "$as_me:$LINENO: result: no" >&5
3431echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3432fi
3433
ca81d7a0 3434
503d2be0
AS
3435fi
3436if test -z "$CC"; then
3437 if test -n "$ac_tool_prefix"; then
ca81d7a0 3438 for ac_prog in cl.exe
503d2be0
AS
3439 do
3440 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3441set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ca81d7a0
JD
3442{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3443echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3444if test "${ac_cv_prog_CC+set}" = set; then
3445 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
3446else
3447 if test -n "$CC"; then
3448 ac_cv_prog_CC="$CC" # Let the user override the test.
3449else
c0d27fcc
MR
3450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3451for as_dir in $PATH
3452do
3453 IFS=$as_save_IFS
3454 test -z "$as_dir" && as_dir=.
3455 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3456 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3457 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3458 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3459 break 2
3460 fi
3461done
503d2be0 3462done
ca81d7a0 3463IFS=$as_save_IFS
503d2be0 3464
c4bb2108
DL
3465fi
3466fi
503d2be0 3467CC=$ac_cv_prog_CC
c4bb2108 3468if test -n "$CC"; then
ca81d7a0
JD
3469 { echo "$as_me:$LINENO: result: $CC" >&5
3470echo "${ECHO_T}$CC" >&6; }
c4bb2108 3471else
ca81d7a0
JD
3472 { echo "$as_me:$LINENO: result: no" >&5
3473echo "${ECHO_T}no" >&6; }
503d2be0
AS
3474fi
3475
ca81d7a0 3476
503d2be0
AS
3477 test -n "$CC" && break
3478 done
3479fi
3480if test -z "$CC"; then
3481 ac_ct_CC=$CC
ca81d7a0 3482 for ac_prog in cl.exe
503d2be0
AS
3483do
3484 # Extract the first word of "$ac_prog", so it can be a program name with args.
3485set dummy $ac_prog; ac_word=$2
ca81d7a0
JD
3486{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3487echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3488if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3489 echo $ECHO_N "(cached) $ECHO_C" >&6
3490else
3491 if test -n "$ac_ct_CC"; then
3492 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3493else
c0d27fcc
MR
3494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3495for as_dir in $PATH
3496do
3497 IFS=$as_save_IFS
3498 test -z "$as_dir" && as_dir=.
3499 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3500 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3501 ac_cv_prog_ac_ct_CC="$ac_prog"
3502 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3503 break 2
3504 fi
3505done
503d2be0 3506done
ca81d7a0 3507IFS=$as_save_IFS
503d2be0 3508
c4bb2108 3509fi
503d2be0
AS
3510fi
3511ac_ct_CC=$ac_cv_prog_ac_ct_CC
3512if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3513 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3514echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 3515else
ca81d7a0
JD
3516 { echo "$as_me:$LINENO: result: no" >&5
3517echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3518fi
3519
ca81d7a0 3520
503d2be0
AS
3521 test -n "$ac_ct_CC" && break
3522done
ba4481b5 3523
ca81d7a0
JD
3524 if test "x$ac_ct_CC" = x; then
3525 CC=""
3526 else
3527 case $cross_compiling:$ac_tool_warned in
3528yes:)
3529{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3530whose name does not start with the host triplet. If you think this
3531configuration is useful to you, please write to autoconf@gnu.org." >&5
3532echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3533whose name does not start with the host triplet. If you think this
3534configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3535ac_tool_warned=yes ;;
3536esac
3537 CC=$ac_ct_CC
3538 fi
503d2be0
AS
3539fi
3540
3541fi
ba4481b5 3542
c0d27fcc 3543
19650fd6
AS
3544test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3545See \`config.log' for more details." >&5
3546echo "$as_me: error: no acceptable C compiler found in \$PATH
3547See \`config.log' for more details." >&2;}
503d2be0 3548 { (exit 1); exit 1; }; }
c4bb2108 3549
503d2be0 3550# Provide some information about the compiler.
ca81d7a0 3551echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3552ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3553{ (ac_try="$ac_compiler --version >&5"
3554case "(($ac_try" in
3555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3556 *) ac_try_echo=$ac_try;;
3557esac
3558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3559 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3560 ac_status=$?
c0d27fcc 3561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3562 (exit $ac_status); }
ca81d7a0
JD
3563{ (ac_try="$ac_compiler -v >&5"
3564case "(($ac_try" in
3565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3566 *) ac_try_echo=$ac_try;;
3567esac
3568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3569 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3570 ac_status=$?
c0d27fcc 3571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3572 (exit $ac_status); }
ca81d7a0
JD
3573{ (ac_try="$ac_compiler -V >&5"
3574case "(($ac_try" in
3575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3576 *) ac_try_echo=$ac_try;;
3577esac
3578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3579 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3580 ac_status=$?
c0d27fcc 3581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3582 (exit $ac_status); }
3583
3584cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3585/* confdefs.h. */
3586_ACEOF
3587cat confdefs.h >>conftest.$ac_ext
3588cat >>conftest.$ac_ext <<_ACEOF
3589/* end confdefs.h. */
c4bb2108 3590
503d2be0
AS
3591int
3592main ()
3593{
3594
3595 ;
3596 return 0;
3597}
3598_ACEOF
3599ac_clean_files_save=$ac_clean_files
19650fd6 3600ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3601# Try to create an executable without -o first, disregard a.out.
3602# It will help us diagnose broken compilers, and finding out an intuition
3603# of exeext.
ca81d7a0
JD
3604{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3605echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3606ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ca81d7a0
JD
3607#
3608# List of possible output files, starting from the most likely.
3609# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3610# only as a last resort. b.out is created by i960 compilers.
3611ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3612#
3613# The IRIX 6 linker writes into existing files which may not be
3614# executable, retaining their permissions. Remove them first so a
3615# subsequent execution test works.
3616ac_rmfiles=
3617for ac_file in $ac_files
3618do
3619 case $ac_file in
3620 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3621 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3622 esac
3623done
3624rm -f $ac_rmfiles
3625
3626if { (ac_try="$ac_link_default"
3627case "(($ac_try" in
3628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3629 *) ac_try_echo=$ac_try;;
3630esac
3631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3632 (eval "$ac_link_default") 2>&5
503d2be0 3633 ac_status=$?
c0d27fcc 3634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3635 (exit $ac_status); }; then
ca81d7a0
JD
3636 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3637# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3638# in a Makefile. We should not override ac_cv_exeext if it was cached,
3639# so that the user can short-circuit this test for compilers unknown to
3640# Autoconf.
f053c89f 3641for ac_file in $ac_files ''
19650fd6 3642do
6bae0ccf 3643 test -f "$ac_file" || continue
503d2be0 3644 case $ac_file in
ca81d7a0 3645 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3646 ;;
19650fd6 3647 [ab].out )
edfaf76d
LK
3648 # We found the default executable, but exeext='' is most
3649 # certainly right.
3650 break;;
19650fd6 3651 *.* )
ca81d7a0
JD
3652 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3653 then :; else
3654 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3655 fi
3656 # We set ac_cv_exeext here because the later test for it is not
3657 # safe: cross compilers may not add the suffix if given an `-o'
3658 # argument, so we may need to know it at that point already.
3659 # Even if this section looks crufty: it has the advantage of
3660 # actually working.
edfaf76d 3661 break;;
19650fd6 3662 * )
edfaf76d 3663 break;;
503d2be0
AS
3664 esac
3665done
ca81d7a0
JD
3666test "$ac_cv_exeext" = no && ac_cv_exeext=
3667
503d2be0 3668else
f053c89f
CY
3669 ac_file=''
3670fi
3671
3672{ echo "$as_me:$LINENO: result: $ac_file" >&5
3673echo "${ECHO_T}$ac_file" >&6; }
3674if test -z "$ac_file"; then
503d2be0 3675 echo "$as_me: failed program was:" >&5
19650fd6
AS
3676sed 's/^/| /' conftest.$ac_ext >&5
3677
6bae0ccf 3678{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3679See \`config.log' for more details." >&5
6bae0ccf 3680echo "$as_me: error: C compiler cannot create executables
19650fd6 3681See \`config.log' for more details." >&2;}
503d2be0
AS
3682 { (exit 77); exit 77; }; }
3683fi
3684
3685ac_exeext=$ac_cv_exeext
503d2be0 3686
ca81d7a0 3687# Check that the compiler produces executables we can run. If not, either
503d2be0 3688# the compiler is broken, or we cross compile.
ca81d7a0
JD
3689{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3690echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3691# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3692# If not cross compiling, check that we can run a simple program.
3693if test "$cross_compiling" != yes; then
3694 if { ac_try='./$ac_file'
ca81d7a0
JD
3695 { (case "(($ac_try" in
3696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3697 *) ac_try_echo=$ac_try;;
3698esac
3699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3700 (eval "$ac_try") 2>&5
503d2be0 3701 ac_status=$?
c0d27fcc 3702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3703 (exit $ac_status); }; }; then
3704 cross_compiling=no
ba4481b5 3705 else
503d2be0
AS
3706 if test "$cross_compiling" = maybe; then
3707 cross_compiling=yes
3708 else
c0d27fcc 3709 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3710If you meant to cross compile, use \`--host'.
3711See \`config.log' for more details." >&5
503d2be0 3712echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3713If you meant to cross compile, use \`--host'.
3714See \`config.log' for more details." >&2;}
503d2be0
AS
3715 { (exit 1); exit 1; }; }
3716 fi
ba4481b5 3717 fi
503d2be0 3718fi
ca81d7a0
JD
3719{ echo "$as_me:$LINENO: result: yes" >&5
3720echo "${ECHO_T}yes" >&6; }
503d2be0 3721
19650fd6 3722rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3723ac_clean_files=$ac_clean_files_save
ca81d7a0 3724# Check that the compiler produces executables we can run. If not, either
503d2be0 3725# the compiler is broken, or we cross compile.
ca81d7a0
JD
3726{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3727echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3728{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3729echo "${ECHO_T}$cross_compiling" >&6; }
3730
3731{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3732echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3733if { (ac_try="$ac_link"
3734case "(($ac_try" in
3735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3736 *) ac_try_echo=$ac_try;;
3737esac
3738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3739 (eval "$ac_link") 2>&5
503d2be0 3740 ac_status=$?
c0d27fcc 3741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3742 (exit $ac_status); }; then
3743 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3744# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3745# work properly (i.e., refer to `conftest.exe'), while it won't with
3746# `rm'.
6bae0ccf
DL
3747for ac_file in conftest.exe conftest conftest.*; do
3748 test -f "$ac_file" || continue
503d2be0 3749 case $ac_file in
ca81d7a0 3750 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3751 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3752 break;;
503d2be0
AS
3753 * ) break;;
3754 esac
3755done
ba4481b5 3756else
19650fd6
AS
3757 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3758See \`config.log' for more details." >&5
3759echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3760See \`config.log' for more details." >&2;}
503d2be0 3761 { (exit 1); exit 1; }; }
ba4481b5 3762fi
ba4481b5 3763
503d2be0 3764rm -f conftest$ac_cv_exeext
ca81d7a0
JD
3765{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3766echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3767
503d2be0
AS
3768rm -f conftest.$ac_ext
3769EXEEXT=$ac_cv_exeext
3770ac_exeext=$EXEEXT
ca81d7a0
JD
3771{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3772echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3773if test "${ac_cv_objext+set}" = set; then
3774 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3775else
503d2be0 3776 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3777/* confdefs.h. */
3778_ACEOF
3779cat confdefs.h >>conftest.$ac_ext
3780cat >>conftest.$ac_ext <<_ACEOF
3781/* end confdefs.h. */
ba4481b5 3782
503d2be0
AS
3783int
3784main ()
3785{
ba4481b5 3786
503d2be0
AS
3787 ;
3788 return 0;
3789}
3790_ACEOF
3791rm -f conftest.o conftest.obj
ca81d7a0
JD
3792if { (ac_try="$ac_compile"
3793case "(($ac_try" in
3794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3795 *) ac_try_echo=$ac_try;;
3796esac
3797eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3798 (eval "$ac_compile") 2>&5
503d2be0 3799 ac_status=$?
c0d27fcc 3800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3801 (exit $ac_status); }; then
ca81d7a0
JD
3802 for ac_file in conftest.o conftest.obj conftest.*; do
3803 test -f "$ac_file" || continue;
503d2be0 3804 case $ac_file in
ca81d7a0 3805 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3806 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3807 break;;
3808 esac
3809done
c4bb2108 3810else
503d2be0 3811 echo "$as_me: failed program was:" >&5
19650fd6
AS
3812sed 's/^/| /' conftest.$ac_ext >&5
3813
3814{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3815See \`config.log' for more details." >&5
3816echo "$as_me: error: cannot compute suffix of object files: cannot compile
3817See \`config.log' for more details." >&2;}
503d2be0 3818 { (exit 1); exit 1; }; }
c4bb2108
DL
3819fi
3820
503d2be0
AS
3821rm -f conftest.$ac_cv_objext conftest.$ac_ext
3822fi
ca81d7a0
JD
3823{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3824echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3825OBJEXT=$ac_cv_objext
3826ac_objext=$OBJEXT
ca81d7a0
JD
3827{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3828echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3829if test "${ac_cv_c_compiler_gnu+set}" = set; then
3830 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3831else
503d2be0 3832 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3833/* confdefs.h. */
3834_ACEOF
3835cat confdefs.h >>conftest.$ac_ext
3836cat >>conftest.$ac_ext <<_ACEOF
3837/* end confdefs.h. */
503d2be0
AS
3838
3839int
3840main ()
3841{
3842#ifndef __GNUC__
3843 choke me
3844#endif
3845
3846 ;
3847 return 0;
3848}
3849_ACEOF
3850rm -f conftest.$ac_objext
ca81d7a0
JD
3851if { (ac_try="$ac_compile"
3852case "(($ac_try" in
3853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3854 *) ac_try_echo=$ac_try;;
3855esac
3856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3857 (eval "$ac_compile") 2>conftest.er1
503d2be0 3858 ac_status=$?
edfaf76d
LK
3859 grep -v '^ *+' conftest.er1 >conftest.err
3860 rm -f conftest.er1
3861 cat conftest.err >&5
c0d27fcc 3862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3863 (exit $ac_status); } && {
3864 test -z "$ac_c_werror_flag" ||
3865 test ! -s conftest.err
3866 } && test -s conftest.$ac_objext; then
503d2be0
AS
3867 ac_compiler_gnu=yes
3868else
3869 echo "$as_me: failed program was:" >&5
19650fd6
AS
3870sed 's/^/| /' conftest.$ac_ext >&5
3871
ca81d7a0 3872 ac_compiler_gnu=no
503d2be0 3873fi
ca81d7a0
JD
3874
3875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3876ac_cv_c_compiler_gnu=$ac_compiler_gnu
3877
3878fi
ca81d7a0
JD
3879{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3880echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3881GCC=`test $ac_compiler_gnu = yes && echo yes`
3882ac_test_CFLAGS=${CFLAGS+set}
3883ac_save_CFLAGS=$CFLAGS
ca81d7a0
JD
3884{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3885echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3886if test "${ac_cv_prog_cc_g+set}" = set; then
3887 echo $ECHO_N "(cached) $ECHO_C" >&6
3888else
ca81d7a0
JD
3889 ac_save_c_werror_flag=$ac_c_werror_flag
3890 ac_c_werror_flag=yes
3891 ac_cv_prog_cc_g=no
3892 CFLAGS="-g"
3893 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3894/* confdefs.h. */
3895_ACEOF
3896cat confdefs.h >>conftest.$ac_ext
3897cat >>conftest.$ac_ext <<_ACEOF
3898/* end confdefs.h. */
503d2be0
AS
3899
3900int
3901main ()
3902{
3903
3904 ;
3905 return 0;
3906}
3907_ACEOF
3908rm -f conftest.$ac_objext
ca81d7a0
JD
3909if { (ac_try="$ac_compile"
3910case "(($ac_try" in
3911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3912 *) ac_try_echo=$ac_try;;
3913esac
3914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3915 (eval "$ac_compile") 2>conftest.er1
503d2be0 3916 ac_status=$?
edfaf76d
LK
3917 grep -v '^ *+' conftest.er1 >conftest.err
3918 rm -f conftest.er1
3919 cat conftest.err >&5
c0d27fcc 3920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3921 (exit $ac_status); } && {
3922 test -z "$ac_c_werror_flag" ||
3923 test ! -s conftest.err
3924 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3925 ac_cv_prog_cc_g=yes
3926else
503d2be0 3927 echo "$as_me: failed program was:" >&5
19650fd6
AS
3928sed 's/^/| /' conftest.$ac_ext >&5
3929
ca81d7a0
JD
3930 CFLAGS=""
3931 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3932/* confdefs.h. */
3933_ACEOF
3934cat confdefs.h >>conftest.$ac_ext
3935cat >>conftest.$ac_ext <<_ACEOF
3936/* end confdefs.h. */
edfaf76d 3937
6bae0ccf
DL
3938int
3939main ()
3940{
ca81d7a0 3941
6bae0ccf
DL
3942 ;
3943 return 0;
3944}
3945_ACEOF
ca81d7a0
JD
3946rm -f conftest.$ac_objext
3947if { (ac_try="$ac_compile"
3948case "(($ac_try" in
3949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3950 *) ac_try_echo=$ac_try;;
3951esac
3952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3953 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3954 ac_status=$?
edfaf76d
LK
3955 grep -v '^ *+' conftest.er1 >conftest.err
3956 rm -f conftest.er1
3957 cat conftest.err >&5
6bae0ccf 3958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3959 (exit $ac_status); } && {
3960 test -z "$ac_c_werror_flag" ||
3961 test ! -s conftest.err
3962 } && test -s conftest.$ac_objext; then
ca81d7a0 3963 :
6bae0ccf
DL
3964else
3965 echo "$as_me: failed program was:" >&5
19650fd6
AS
3966sed 's/^/| /' conftest.$ac_ext >&5
3967
ca81d7a0
JD
3968 ac_c_werror_flag=$ac_save_c_werror_flag
3969 CFLAGS="-g"
3970 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 3971/* confdefs.h. */
19650fd6
AS
3972_ACEOF
3973cat confdefs.h >>conftest.$ac_ext
3974cat >>conftest.$ac_ext <<_ACEOF
3975/* end confdefs.h. */
ca81d7a0 3976
503d2be0
AS
3977int
3978main ()
3979{
ca81d7a0 3980
503d2be0
AS
3981 ;
3982 return 0;
3983}
3984_ACEOF
3985rm -f conftest.$ac_objext
ca81d7a0
JD
3986if { (ac_try="$ac_compile"
3987case "(($ac_try" in
3988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3989 *) ac_try_echo=$ac_try;;
3990esac
3991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3992 (eval "$ac_compile") 2>conftest.er1
503d2be0 3993 ac_status=$?
edfaf76d
LK
3994 grep -v '^ *+' conftest.er1 >conftest.err
3995 rm -f conftest.er1
3996 cat conftest.err >&5
c0d27fcc 3997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3998 (exit $ac_status); } && {
3999 test -z "$ac_c_werror_flag" ||
4000 test ! -s conftest.err
4001 } && test -s conftest.$ac_objext; then
ca81d7a0 4002 ac_cv_prog_cc_g=yes
503d2be0
AS
4003else
4004 echo "$as_me: failed program was:" >&5
19650fd6
AS
4005sed 's/^/| /' conftest.$ac_ext >&5
4006
ca81d7a0 4007
8eeae1c9 4008fi
ca81d7a0
JD
4009
4010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4011fi
4012
4013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4014fi
4015
4016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4017 ac_c_werror_flag=$ac_save_c_werror_flag
4018fi
4019{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
4020echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
4021if test "$ac_test_CFLAGS" = set; then
4022 CFLAGS=$ac_save_CFLAGS
4023elif test $ac_cv_prog_cc_g = yes; then
4024 if test "$GCC" = yes; then
4025 CFLAGS="-g -O2"
4026 else
4027 CFLAGS="-g"
4028 fi
4029else
4030 if test "$GCC" = yes; then
4031 CFLAGS="-O2"
4032 else
4033 CFLAGS=
4034 fi
4035fi
4036{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
4037echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
4038if test "${ac_cv_prog_cc_c89+set}" = set; then
4039 echo $ECHO_N "(cached) $ECHO_C" >&6
4040else
4041 ac_cv_prog_cc_c89=no
4042ac_save_CC=$CC
4043cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4044/* confdefs.h. */
4045_ACEOF
4046cat confdefs.h >>conftest.$ac_ext
4047cat >>conftest.$ac_ext <<_ACEOF
4048/* end confdefs.h. */
ca81d7a0
JD
4049#include <stdarg.h>
4050#include <stdio.h>
4051#include <sys/types.h>
4052#include <sys/stat.h>
4053/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4054struct buf { int x; };
4055FILE * (*rcsopen) (struct buf *, struct stat *, int);
4056static char *e (p, i)
4057 char **p;
4058 int i;
4059{
4060 return p[i];
4061}
4062static char *f (char * (*g) (char **, int), char **p, ...)
4063{
4064 char *s;
4065 va_list v;
4066 va_start (v,p);
4067 s = g (p, va_arg (v,int));
4068 va_end (v);
4069 return s;
4070}
4071
4072/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4073 function prototypes and stuff, but not '\xHH' hex character constants.
4074 These don't provoke an error unfortunately, instead are silently treated
4075 as 'x'. The following induces an error, until -std is added to get
4076 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4077 array size at least. It's necessary to write '\x00'==0 to get something
4078 that's true only with -std. */
4079int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4080
4081/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4082 inside strings and character constants. */
4083#define FOO(x) 'x'
4084int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4085
4086int test (int i, double x);
4087struct s1 {int (*f) (int a);};
4088struct s2 {int (*f) (double a);};
4089int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4090int argc;
4091char **argv;
503d2be0
AS
4092int
4093main ()
4094{
ca81d7a0 4095return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
503d2be0
AS
4096 ;
4097 return 0;
4098}
4099_ACEOF
ca81d7a0
JD
4100for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4101 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4102do
4103 CC="$ac_save_CC $ac_arg"
4104 rm -f conftest.$ac_objext
4105if { (ac_try="$ac_compile"
4106case "(($ac_try" in
4107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4108 *) ac_try_echo=$ac_try;;
4109esac
4110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4111 (eval "$ac_compile") 2>conftest.er1
503d2be0 4112 ac_status=$?
edfaf76d
LK
4113 grep -v '^ *+' conftest.er1 >conftest.err
4114 rm -f conftest.er1
4115 cat conftest.err >&5
c0d27fcc 4116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4117 (exit $ac_status); } && {
4118 test -z "$ac_c_werror_flag" ||
4119 test ! -s conftest.err
4120 } && test -s conftest.$ac_objext; then
ca81d7a0 4121 ac_cv_prog_cc_c89=$ac_arg
503d2be0
AS
4122else
4123 echo "$as_me: failed program was:" >&5
19650fd6
AS
4124sed 's/^/| /' conftest.$ac_ext >&5
4125
ca81d7a0 4126
503d2be0 4127fi
ca81d7a0
JD
4128
4129rm -f core conftest.err conftest.$ac_objext
4130 test "x$ac_cv_prog_cc_c89" != "xno" && break
503d2be0 4131done
ca81d7a0
JD
4132rm -f conftest.$ac_ext
4133CC=$ac_save_CC
4134
503d2be0 4135fi
ca81d7a0
JD
4136# AC_CACHE_VAL
4137case "x$ac_cv_prog_cc_c89" in
4138 x)
4139 { echo "$as_me:$LINENO: result: none needed" >&5
4140echo "${ECHO_T}none needed" >&6; } ;;
4141 xno)
4142 { echo "$as_me:$LINENO: result: unsupported" >&5
4143echo "${ECHO_T}unsupported" >&6; } ;;
4144 *)
4145 CC="$CC $ac_cv_prog_cc_c89"
4146 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
4147echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
4148esac
ba4481b5 4149
19650fd6 4150
503d2be0
AS
4151ac_ext=c
4152ac_cpp='$CPP $CPPFLAGS'
4153ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4154ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4155ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 4156
c0d27fcc 4157
ba4481b5
DL
4158# On Suns, sometimes $CPP names a directory.
4159if test -n "$CPP" && test -d "$CPP"; then
4160 CPP=
4161fi
4162
089a966d
GM
4163## If not using gcc, and on Solaris, and no CPP specified, see if
4164## using a Sun compiler, which needs -Xs to prevent whitespace.
4165if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
4166 test x"$CPP" = x; then
4167 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
4168echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
4169
4170if test "${emacs_cv_sunpro_c+set}" = set; then
4171 echo $ECHO_N "(cached) $ECHO_C" >&6
4172else
4173 cat >conftest.$ac_ext <<_ACEOF
4174/* confdefs.h. */
4175_ACEOF
4176cat confdefs.h >>conftest.$ac_ext
4177cat >>conftest.$ac_ext <<_ACEOF
4178/* end confdefs.h. */
4179
4180int
4181main ()
4182{
4183#ifndef __SUNPRO_C
4184fail;
4185#endif
4186
4187 ;
4188 return 0;
4189}
4190_ACEOF
4191rm -f conftest.$ac_objext conftest$ac_exeext
4192if { (ac_try="$ac_link"
4193case "(($ac_try" in
4194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4195 *) ac_try_echo=$ac_try;;
4196esac
4197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4198 (eval "$ac_link") 2>conftest.er1
4199 ac_status=$?
4200 grep -v '^ *+' conftest.er1 >conftest.err
4201 rm -f conftest.er1
4202 cat conftest.err >&5
4203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4204 (exit $ac_status); } && {
4205 test -z "$ac_c_werror_flag" ||
4206 test ! -s conftest.err
4207 } && test -s conftest$ac_exeext &&
4208 $as_test_x conftest$ac_exeext; then
4209 emacs_cv_sunpro_c=yes
4210else
4211 echo "$as_me: failed program was:" >&5
4212sed 's/^/| /' conftest.$ac_ext >&5
4213
4214 emacs_cv_sunpro_c=no
4215fi
4216
4217rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4218 conftest$ac_exeext conftest.$ac_ext
4219fi
4220
4221 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
4222echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
4223
4224 if test x"$emacs_cv_sunpro_c" = xyes; then
4225 NON_GNU_CPP="$CC -E -Xs"
4226 fi
4227fi
4228
ba4481b5
DL
4229#### Some systems specify a CPP to use unless we are using GCC.
4230#### Now that we know whether we are using GCC, we can decide whether
4231#### to use that one.
4232if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4233then
4234 CPP="$NON_GNU_CPP"
4235fi
4236
4237#### Some systems specify a CC to use unless we are using GCC.
4238#### Now that we know whether we are using GCC, we can decide whether
4239#### to use that one.
4240if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4241 test x$cc_specified != xyes
4242then
4243 CC="$NON_GNU_CC"
4244fi
4245
4246if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
4247then
4248 CC="$CC $GCC_TEST_OPTIONS"
4249fi
4250
4251if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
4252then
4253 CC="$CC $NON_GCC_TEST_OPTIONS"
4254fi
4255
e143ad11
AS
4256ac_ext=c
4257ac_cpp='$CPP $CPPFLAGS'
4258ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4259ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4260ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4261{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4262echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
4263# On Suns, sometimes $CPP names a directory.
4264if test -n "$CPP" && test -d "$CPP"; then
4265 CPP=
4266fi
4267if test -z "$CPP"; then
4268 if test "${ac_cv_prog_CPP+set}" = set; then
4269 echo $ECHO_N "(cached) $ECHO_C" >&6
4270else
4271 # Double quotes because CPP needs to be expanded
4272 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4273 do
4274 ac_preproc_ok=false
4275for ac_c_preproc_warn_flag in '' yes
4276do
4277 # Use a header file that comes with gcc, so configuring glibc
4278 # with a fresh cross-compiler works.
4279 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4280 # <limits.h> exists even on freestanding compilers.
4281 # On the NeXT, cc -E runs the code through the compiler's parser,
4282 # not just through cpp. "Syntax error" is here to catch this case.
4283 cat >conftest.$ac_ext <<_ACEOF
4284/* confdefs.h. */
4285_ACEOF
4286cat confdefs.h >>conftest.$ac_ext
4287cat >>conftest.$ac_ext <<_ACEOF
4288/* end confdefs.h. */
4289#ifdef __STDC__
4290# include <limits.h>
4291#else
4292# include <assert.h>
4293#endif
4294 Syntax error
4295_ACEOF
ca81d7a0
JD
4296if { (ac_try="$ac_cpp conftest.$ac_ext"
4297case "(($ac_try" in
4298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4299 *) ac_try_echo=$ac_try;;
4300esac
4301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4302 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4303 ac_status=$?
4304 grep -v '^ *+' conftest.er1 >conftest.err
4305 rm -f conftest.er1
4306 cat conftest.err >&5
4307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4308 (exit $ac_status); } >/dev/null && {
4309 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4310 test ! -s conftest.err
4311 }; then
e143ad11
AS
4312 :
4313else
4314 echo "$as_me: failed program was:" >&5
4315sed 's/^/| /' conftest.$ac_ext >&5
4316
4317 # Broken: fails on valid input.
4318continue
4319fi
ca81d7a0 4320
e143ad11
AS
4321rm -f conftest.err conftest.$ac_ext
4322
ca81d7a0 4323 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4324 # can be detected and how.
4325 cat >conftest.$ac_ext <<_ACEOF
4326/* confdefs.h. */
4327_ACEOF
4328cat confdefs.h >>conftest.$ac_ext
4329cat >>conftest.$ac_ext <<_ACEOF
4330/* end confdefs.h. */
4331#include <ac_nonexistent.h>
4332_ACEOF
ca81d7a0
JD
4333if { (ac_try="$ac_cpp conftest.$ac_ext"
4334case "(($ac_try" in
4335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4336 *) ac_try_echo=$ac_try;;
4337esac
4338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4339 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4340 ac_status=$?
4341 grep -v '^ *+' conftest.er1 >conftest.err
4342 rm -f conftest.er1
4343 cat conftest.err >&5
4344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4345 (exit $ac_status); } >/dev/null && {
4346 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4347 test ! -s conftest.err
4348 }; then
e143ad11
AS
4349 # Broken: success on invalid input.
4350continue
4351else
4352 echo "$as_me: failed program was:" >&5
4353sed 's/^/| /' conftest.$ac_ext >&5
4354
4355 # Passes both tests.
4356ac_preproc_ok=:
4357break
4358fi
ca81d7a0 4359
e143ad11
AS
4360rm -f conftest.err conftest.$ac_ext
4361
4362done
4363# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4364rm -f conftest.err conftest.$ac_ext
4365if $ac_preproc_ok; then
4366 break
4367fi
4368
4369 done
4370 ac_cv_prog_CPP=$CPP
4371
4372fi
4373 CPP=$ac_cv_prog_CPP
4374else
4375 ac_cv_prog_CPP=$CPP
4376fi
ca81d7a0
JD
4377{ echo "$as_me:$LINENO: result: $CPP" >&5
4378echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
4379ac_preproc_ok=false
4380for ac_c_preproc_warn_flag in '' yes
4381do
4382 # Use a header file that comes with gcc, so configuring glibc
4383 # with a fresh cross-compiler works.
4384 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4385 # <limits.h> exists even on freestanding compilers.
4386 # On the NeXT, cc -E runs the code through the compiler's parser,
4387 # not just through cpp. "Syntax error" is here to catch this case.
4388 cat >conftest.$ac_ext <<_ACEOF
4389/* confdefs.h. */
4390_ACEOF
4391cat confdefs.h >>conftest.$ac_ext
4392cat >>conftest.$ac_ext <<_ACEOF
4393/* end confdefs.h. */
4394#ifdef __STDC__
4395# include <limits.h>
4396#else
4397# include <assert.h>
4398#endif
4399 Syntax error
4400_ACEOF
ca81d7a0
JD
4401if { (ac_try="$ac_cpp conftest.$ac_ext"
4402case "(($ac_try" in
4403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4404 *) ac_try_echo=$ac_try;;
4405esac
4406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4407 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4408 ac_status=$?
4409 grep -v '^ *+' conftest.er1 >conftest.err
4410 rm -f conftest.er1
4411 cat conftest.err >&5
4412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4413 (exit $ac_status); } >/dev/null && {
4414 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4415 test ! -s conftest.err
4416 }; then
e143ad11
AS
4417 :
4418else
4419 echo "$as_me: failed program was:" >&5
4420sed 's/^/| /' conftest.$ac_ext >&5
4421
4422 # Broken: fails on valid input.
4423continue
4424fi
ca81d7a0 4425
e143ad11
AS
4426rm -f conftest.err conftest.$ac_ext
4427
ca81d7a0 4428 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4429 # can be detected and how.
4430 cat >conftest.$ac_ext <<_ACEOF
4431/* confdefs.h. */
4432_ACEOF
4433cat confdefs.h >>conftest.$ac_ext
4434cat >>conftest.$ac_ext <<_ACEOF
4435/* end confdefs.h. */
4436#include <ac_nonexistent.h>
4437_ACEOF
ca81d7a0
JD
4438if { (ac_try="$ac_cpp conftest.$ac_ext"
4439case "(($ac_try" in
4440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4441 *) ac_try_echo=$ac_try;;
4442esac
4443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4444 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4445 ac_status=$?
4446 grep -v '^ *+' conftest.er1 >conftest.err
4447 rm -f conftest.er1
4448 cat conftest.err >&5
4449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4450 (exit $ac_status); } >/dev/null && {
4451 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4452 test ! -s conftest.err
4453 }; then
e143ad11
AS
4454 # Broken: success on invalid input.
4455continue
4456else
4457 echo "$as_me: failed program was:" >&5
4458sed 's/^/| /' conftest.$ac_ext >&5
4459
4460 # Passes both tests.
4461ac_preproc_ok=:
4462break
4463fi
ca81d7a0 4464
e143ad11
AS
4465rm -f conftest.err conftest.$ac_ext
4466
4467done
4468# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4469rm -f conftest.err conftest.$ac_ext
4470if $ac_preproc_ok; then
4471 :
4472else
4473 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4474See \`config.log' for more details." >&5
4475echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4476See \`config.log' for more details." >&2;}
4477 { (exit 1); exit 1; }; }
4478fi
4479
4480ac_ext=c
4481ac_cpp='$CPP $CPPFLAGS'
4482ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4483ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4484ac_compiler_gnu=$ac_cv_c_compiler_gnu
4485
4486
ca81d7a0
JD
4487{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4488echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4489if test "${ac_cv_path_GREP+set}" = set; then
4490 echo $ECHO_N "(cached) $ECHO_C" >&6
4491else
4492 # Extract the first word of "grep ggrep" to use in msg output
4493if test -z "$GREP"; then
4494set dummy grep ggrep; ac_prog_name=$2
4495if test "${ac_cv_path_GREP+set}" = set; then
4496 echo $ECHO_N "(cached) $ECHO_C" >&6
4497else
4498 ac_path_GREP_found=false
4499# Loop through the user's path and test for each of PROGNAME-LIST
4500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4501for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4502do
4503 IFS=$as_save_IFS
4504 test -z "$as_dir" && as_dir=.
4505 for ac_prog in grep ggrep; do
4506 for ac_exec_ext in '' $ac_executable_extensions; do
4507 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4508 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
ca81d7a0
JD
4509 # Check for GNU ac_path_GREP and select it if it is found.
4510 # Check for GNU $ac_path_GREP
4511case `"$ac_path_GREP" --version 2>&1` in
4512*GNU*)
4513 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4514*)
4515 ac_count=0
4516 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4517 while :
4518 do
4519 cat "conftest.in" "conftest.in" >"conftest.tmp"
4520 mv "conftest.tmp" "conftest.in"
4521 cp "conftest.in" "conftest.nl"
4522 echo 'GREP' >> "conftest.nl"
4523 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4524 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4525 ac_count=`expr $ac_count + 1`
4526 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4527 # Best one so far, save it but keep looking for a better one
4528 ac_cv_path_GREP="$ac_path_GREP"
4529 ac_path_GREP_max=$ac_count
4530 fi
4531 # 10*(2^10) chars as input seems more than enough
4532 test $ac_count -gt 10 && break
4533 done
4534 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4535esac
4536
4537
4538 $ac_path_GREP_found && break 3
4539 done
4540done
4541
4542done
4543IFS=$as_save_IFS
4544
4545
4546fi
4547
4548GREP="$ac_cv_path_GREP"
4549if test -z "$GREP"; then
4550 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4551echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4552 { (exit 1); exit 1; }; }
4553fi
4554
4555else
4556 ac_cv_path_GREP=$GREP
4557fi
4558
4559
4560fi
4561{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4562echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4563 GREP="$ac_cv_path_GREP"
4564
4565
4566{ echo "$as_me:$LINENO: checking for egrep" >&5
4567echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4568if test "${ac_cv_path_EGREP+set}" = set; then
8eeae1c9
JD
4569 echo $ECHO_N "(cached) $ECHO_C" >&6
4570else
ca81d7a0
JD
4571 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4572 then ac_cv_path_EGREP="$GREP -E"
4573 else
4574 # Extract the first word of "egrep" to use in msg output
4575if test -z "$EGREP"; then
4576set dummy egrep; ac_prog_name=$2
4577if test "${ac_cv_path_EGREP+set}" = set; then
4578 echo $ECHO_N "(cached) $ECHO_C" >&6
4579else
4580 ac_path_EGREP_found=false
4581# Loop through the user's path and test for each of PROGNAME-LIST
4582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4583for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4584do
4585 IFS=$as_save_IFS
4586 test -z "$as_dir" && as_dir=.
4587 for ac_prog in egrep; do
4588 for ac_exec_ext in '' $ac_executable_extensions; do
4589 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4590 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
ca81d7a0
JD
4591 # Check for GNU ac_path_EGREP and select it if it is found.
4592 # Check for GNU $ac_path_EGREP
4593case `"$ac_path_EGREP" --version 2>&1` in
4594*GNU*)
4595 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4596*)
4597 ac_count=0
4598 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4599 while :
4600 do
4601 cat "conftest.in" "conftest.in" >"conftest.tmp"
4602 mv "conftest.tmp" "conftest.in"
4603 cp "conftest.in" "conftest.nl"
4604 echo 'EGREP' >> "conftest.nl"
4605 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4606 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4607 ac_count=`expr $ac_count + 1`
4608 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4609 # Best one so far, save it but keep looking for a better one
4610 ac_cv_path_EGREP="$ac_path_EGREP"
4611 ac_path_EGREP_max=$ac_count
e143ad11 4612 fi
ca81d7a0
JD
4613 # 10*(2^10) chars as input seems more than enough
4614 test $ac_count -gt 10 && break
4615 done
4616 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4617esac
4618
4619
4620 $ac_path_EGREP_found && break 3
4621 done
4622done
4623
4624done
4625IFS=$as_save_IFS
4626
4627
4628fi
4629
4630EGREP="$ac_cv_path_EGREP"
4631if test -z "$EGREP"; then
4632 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4633echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4634 { (exit 1); exit 1; }; }
4635fi
4636
4637else
4638 ac_cv_path_EGREP=$EGREP
4639fi
4640
4641
4642 fi
8eeae1c9 4643fi
ca81d7a0
JD
4644{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4645echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4646 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4647
4648
4649
ca81d7a0
JD
4650{ echo "$as_me:$LINENO: checking for AIX" >&5
4651echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4652cat >conftest.$ac_ext <<_ACEOF
4653/* confdefs.h. */
4654_ACEOF
4655cat confdefs.h >>conftest.$ac_ext
4656cat >>conftest.$ac_ext <<_ACEOF
4657/* end confdefs.h. */
4658#ifdef _AIX
4659 yes
4660#endif
4661
4662_ACEOF
4663if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4664 $EGREP "yes" >/dev/null 2>&1; then
ca81d7a0
JD
4665 { echo "$as_me:$LINENO: result: yes" >&5
4666echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4667cat >>confdefs.h <<\_ACEOF
4668#define _ALL_SOURCE 1
4669_ACEOF
4670
4671else
ca81d7a0
JD
4672 { echo "$as_me:$LINENO: result: no" >&5
4673echo "${ECHO_T}no" >&6; }
e143ad11
AS
4674fi
4675rm -f conftest*
4676
4677
4678
4679cat >>confdefs.h <<\_ACEOF
4680#define _GNU_SOURCE 1
4681_ACEOF
4682
4683
4684
01abe918 4685### Use -Wno-pointer-sign if the compiler supports it
ca81d7a0
JD
4686{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4687echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4688SAVE_CFLAGS="$CFLAGS"
4689CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4690cat >conftest.$ac_ext <<_ACEOF
4691/* confdefs.h. */
4692_ACEOF
4693cat confdefs.h >>conftest.$ac_ext
4694cat >>conftest.$ac_ext <<_ACEOF
4695/* end confdefs.h. */
4696
4697int
4698main ()
4699{
4700
4701 ;
4702 return 0;
4703}
4704_ACEOF
4705rm -f conftest.$ac_objext
ca81d7a0
JD
4706if { (ac_try="$ac_compile"
4707case "(($ac_try" in
4708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4709 *) ac_try_echo=$ac_try;;
4710esac
4711eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4712 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4713 ac_status=$?
4714 grep -v '^ *+' conftest.er1 >conftest.err
4715 rm -f conftest.er1
4716 cat conftest.err >&5
4717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4718 (exit $ac_status); } && {
4719 test -z "$ac_c_werror_flag" ||
4720 test ! -s conftest.err
4721 } && test -s conftest.$ac_objext; then
01abe918
CY
4722 has_option=yes
4723else
4724 echo "$as_me: failed program was:" >&5
4725sed 's/^/| /' conftest.$ac_ext >&5
4726
ca81d7a0 4727 has_option=no
01abe918 4728fi
ca81d7a0
JD
4729
4730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4731if test $has_option = yes; then
4732 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4733fi
ca81d7a0
JD
4734{ echo "$as_me:$LINENO: result: $has_option" >&5
4735echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4736CFLAGS="$SAVE_CFLAGS"
4737unset has_option
4738unset SAVE_CFLAGS
4739
6a3a24fa 4740#### Some other nice autoconf tests.
ba4481b5 4741
ca81d7a0
JD
4742{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4743echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4744LN_S=$as_ln_s
4745if test "$LN_S" = "ln -s"; then
ca81d7a0
JD
4746 { echo "$as_me:$LINENO: result: yes" >&5
4747echo "${ECHO_T}yes" >&6; }
ba4481b5 4748else
ca81d7a0
JD
4749 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4750echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4751fi
4752
503d2be0
AS
4753ac_ext=c
4754ac_cpp='$CPP $CPPFLAGS'
4755ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4756ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4757ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4758{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4759echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4760# On Suns, sometimes $CPP names a directory.
4761if test -n "$CPP" && test -d "$CPP"; then
4762 CPP=
4763fi
4764if test -z "$CPP"; then
503d2be0
AS
4765 if test "${ac_cv_prog_CPP+set}" = set; then
4766 echo $ECHO_N "(cached) $ECHO_C" >&6
4767else
4768 # Double quotes because CPP needs to be expanded
4769 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4770 do
4771 ac_preproc_ok=false
4772for ac_c_preproc_warn_flag in '' yes
4773do
4774 # Use a header file that comes with gcc, so configuring glibc
4775 # with a fresh cross-compiler works.
19650fd6
AS
4776 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4777 # <limits.h> exists even on freestanding compilers.
ba4481b5 4778 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4779 # not just through cpp. "Syntax error" is here to catch this case.
4780 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4781/* confdefs.h. */
4782_ACEOF
4783cat confdefs.h >>conftest.$ac_ext
4784cat >>conftest.$ac_ext <<_ACEOF
4785/* end confdefs.h. */
4786#ifdef __STDC__
4787# include <limits.h>
4788#else
4789# include <assert.h>
4790#endif
edfaf76d 4791 Syntax error
503d2be0 4792_ACEOF
ca81d7a0
JD
4793if { (ac_try="$ac_cpp conftest.$ac_ext"
4794case "(($ac_try" in
4795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4796 *) ac_try_echo=$ac_try;;
4797esac
4798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4799 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4800 ac_status=$?
6bae0ccf 4801 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4802 rm -f conftest.er1
4803 cat conftest.err >&5
c0d27fcc 4804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4805 (exit $ac_status); } >/dev/null && {
4806 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4807 test ! -s conftest.err
4808 }; then
ba4481b5
DL
4809 :
4810else
503d2be0 4811 echo "$as_me: failed program was:" >&5
19650fd6
AS
4812sed 's/^/| /' conftest.$ac_ext >&5
4813
503d2be0
AS
4814 # Broken: fails on valid input.
4815continue
4816fi
ca81d7a0 4817
503d2be0
AS
4818rm -f conftest.err conftest.$ac_ext
4819
ca81d7a0 4820 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4821 # can be detected and how.
4822 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4823/* confdefs.h. */
4824_ACEOF
4825cat confdefs.h >>conftest.$ac_ext
4826cat >>conftest.$ac_ext <<_ACEOF
4827/* end confdefs.h. */
503d2be0
AS
4828#include <ac_nonexistent.h>
4829_ACEOF
ca81d7a0
JD
4830if { (ac_try="$ac_cpp conftest.$ac_ext"
4831case "(($ac_try" in
4832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4833 *) ac_try_echo=$ac_try;;
4834esac
4835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4836 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4837 ac_status=$?
6bae0ccf 4838 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4839 rm -f conftest.er1
4840 cat conftest.err >&5
c0d27fcc 4841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4842 (exit $ac_status); } >/dev/null && {
4843 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4844 test ! -s conftest.err
4845 }; then
503d2be0
AS
4846 # Broken: success on invalid input.
4847continue
c4bb2108 4848else
503d2be0 4849 echo "$as_me: failed program was:" >&5
19650fd6
AS
4850sed 's/^/| /' conftest.$ac_ext >&5
4851
503d2be0
AS
4852 # Passes both tests.
4853ac_preproc_ok=:
4854break
4855fi
ca81d7a0 4856
503d2be0
AS
4857rm -f conftest.err conftest.$ac_ext
4858
4859done
4860# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4861rm -f conftest.err conftest.$ac_ext
4862if $ac_preproc_ok; then
4863 break
4864fi
4865
4866 done
4867 ac_cv_prog_CPP=$CPP
4868
4869fi
4870 CPP=$ac_cv_prog_CPP
4871else
4872 ac_cv_prog_CPP=$CPP
4873fi
ca81d7a0
JD
4874{ echo "$as_me:$LINENO: result: $CPP" >&5
4875echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4876ac_preproc_ok=false
4877for ac_c_preproc_warn_flag in '' yes
4878do
4879 # Use a header file that comes with gcc, so configuring glibc
4880 # with a fresh cross-compiler works.
19650fd6
AS
4881 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4882 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4883 # On the NeXT, cc -E runs the code through the compiler's parser,
4884 # not just through cpp. "Syntax error" is here to catch this case.
4885 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4886/* confdefs.h. */
4887_ACEOF
4888cat confdefs.h >>conftest.$ac_ext
4889cat >>conftest.$ac_ext <<_ACEOF
4890/* end confdefs.h. */
4891#ifdef __STDC__
4892# include <limits.h>
4893#else
4894# include <assert.h>
4895#endif
edfaf76d 4896 Syntax error
503d2be0 4897_ACEOF
ca81d7a0
JD
4898if { (ac_try="$ac_cpp conftest.$ac_ext"
4899case "(($ac_try" in
4900 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4901 *) ac_try_echo=$ac_try;;
4902esac
4903eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4904 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4905 ac_status=$?
6bae0ccf 4906 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4907 rm -f conftest.er1
4908 cat conftest.err >&5
c0d27fcc 4909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4910 (exit $ac_status); } >/dev/null && {
4911 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4912 test ! -s conftest.err
4913 }; then
ba4481b5
DL
4914 :
4915else
503d2be0 4916 echo "$as_me: failed program was:" >&5
19650fd6
AS
4917sed 's/^/| /' conftest.$ac_ext >&5
4918
503d2be0
AS
4919 # Broken: fails on valid input.
4920continue
4921fi
ca81d7a0 4922
503d2be0
AS
4923rm -f conftest.err conftest.$ac_ext
4924
ca81d7a0 4925 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4926 # can be detected and how.
4927 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4928/* confdefs.h. */
4929_ACEOF
4930cat confdefs.h >>conftest.$ac_ext
4931cat >>conftest.$ac_ext <<_ACEOF
4932/* end confdefs.h. */
503d2be0
AS
4933#include <ac_nonexistent.h>
4934_ACEOF
ca81d7a0
JD
4935if { (ac_try="$ac_cpp conftest.$ac_ext"
4936case "(($ac_try" in
4937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4938 *) ac_try_echo=$ac_try;;
4939esac
4940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4941 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4942 ac_status=$?
6bae0ccf 4943 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4944 rm -f conftest.er1
4945 cat conftest.err >&5
c0d27fcc 4946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4947 (exit $ac_status); } >/dev/null && {
4948 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4949 test ! -s conftest.err
4950 }; then
503d2be0
AS
4951 # Broken: success on invalid input.
4952continue
4953else
4954 echo "$as_me: failed program was:" >&5
19650fd6
AS
4955sed 's/^/| /' conftest.$ac_ext >&5
4956
503d2be0
AS
4957 # Passes both tests.
4958ac_preproc_ok=:
4959break
ba4481b5 4960fi
ca81d7a0 4961
503d2be0
AS
4962rm -f conftest.err conftest.$ac_ext
4963
4964done
4965# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4966rm -f conftest.err conftest.$ac_ext
4967if $ac_preproc_ok; then
4968 :
ba4481b5 4969else
19650fd6
AS
4970 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4971See \`config.log' for more details." >&5
4972echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4973See \`config.log' for more details." >&2;}
503d2be0 4974 { (exit 1); exit 1; }; }
ba4481b5 4975fi
503d2be0
AS
4976
4977ac_ext=c
4978ac_cpp='$CPP $CPPFLAGS'
4979ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4980ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4981ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4982
4983# Find a good install program. We prefer a C program (faster),
4984# so one script is as good as another. But avoid the broken or
4985# incompatible versions:
4986# SysV /etc/install, /usr/sbin/install
4987# SunOS /usr/etc/install
4988# IRIX /sbin/install
4989# AIX /bin/install
503d2be0 4990# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4991# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4992# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4993# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4994# OS/2's system install, which has a completely different semantic
ba4481b5 4995# ./install, which can be erroneously created by make from ./install.sh.
ca81d7a0
JD
4996{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4997echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 4998if test -z "$INSTALL"; then
503d2be0
AS
4999if test "${ac_cv_path_install+set}" = set; then
5000 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5001else
c0d27fcc
MR
5002 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5003for as_dir in $PATH
5004do
5005 IFS=$as_save_IFS
5006 test -z "$as_dir" && as_dir=.
5007 # Account for people who put trailing slashes in PATH elements.
5008case $as_dir/ in
5009 ./ | .// | /cC/* | \
5010 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 5011 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
5012 /usr/ucb/* ) ;;
5013 *)
5014 # OSF1 and SCO ODT 3.0 have their own names for install.
5015 # Don't use installbsd from OSF since it installs stuff as root
5016 # by default.
5017 for ac_prog in ginstall scoinst install; do
5018 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5019 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
5020 if test $ac_prog = install &&
5021 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5022 # AIX install. It has an incompatible calling convention.
5023 :
5024 elif test $ac_prog = install &&
5025 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5026 # program-specific install script used by HP pwplus--don't use.
5027 :
5028 else
5029 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5030 break 3
5031 fi
5032 fi
ba4481b5 5033 done
c0d27fcc
MR
5034 done
5035 ;;
5036esac
5037done
ca81d7a0 5038IFS=$as_save_IFS
c0d27fcc 5039
ba4481b5
DL
5040
5041fi
5042 if test "${ac_cv_path_install+set}" = set; then
503d2be0 5043 INSTALL=$ac_cv_path_install
ba4481b5 5044 else
ca81d7a0
JD
5045 # As a last resort, use the slow shell script. Don't cache a
5046 # value for INSTALL within a source directory, because that will
ba4481b5 5047 # break other packages using the cache if that directory is
ca81d7a0 5048 # removed, or if the value is a relative name.
503d2be0 5049 INSTALL=$ac_install_sh
ba4481b5
DL
5050 fi
5051fi
ca81d7a0
JD
5052{ echo "$as_me:$LINENO: result: $INSTALL" >&5
5053echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
5054
5055# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5056# It thinks the first close brace ends the variable substitution.
5057test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5058
503d2be0 5059test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 5060
ba4481b5
DL
5061test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5062
c0d27fcc
MR
5063if test "x$RANLIB" = x; then
5064 if test -n "$ac_tool_prefix"; then
5065 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5066set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ca81d7a0
JD
5067{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5068echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5069if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 5070 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5071else
5072 if test -n "$RANLIB"; then
5073 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5074else
c0d27fcc
MR
5075as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5076for as_dir in $PATH
5077do
5078 IFS=$as_save_IFS
5079 test -z "$as_dir" && as_dir=.
5080 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5081 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5082 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5083 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5084 break 2
5085 fi
5086done
503d2be0 5087done
ca81d7a0 5088IFS=$as_save_IFS
503d2be0 5089
7397acc4
DL
5090fi
5091fi
503d2be0 5092RANLIB=$ac_cv_prog_RANLIB
7397acc4 5093if test -n "$RANLIB"; then
ca81d7a0
JD
5094 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5095echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5096else
ca81d7a0
JD
5097 { echo "$as_me:$LINENO: result: no" >&5
5098echo "${ECHO_T}no" >&6; }
503d2be0
AS
5099fi
5100
ca81d7a0 5101
503d2be0
AS
5102fi
5103if test -z "$ac_cv_prog_RANLIB"; then
5104 ac_ct_RANLIB=$RANLIB
5105 # Extract the first word of "ranlib", so it can be a program name with args.
5106set dummy ranlib; ac_word=$2
ca81d7a0
JD
5107{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5108echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5109if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5110 echo $ECHO_N "(cached) $ECHO_C" >&6
5111else
5112 if test -n "$ac_ct_RANLIB"; then
5113 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5114else
c0d27fcc
MR
5115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5116for as_dir in $PATH
5117do
5118 IFS=$as_save_IFS
5119 test -z "$as_dir" && as_dir=.
5120 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5121 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5122 ac_cv_prog_ac_ct_RANLIB="ranlib"
5123 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5124 break 2
5125 fi
5126done
503d2be0 5127done
ca81d7a0 5128IFS=$as_save_IFS
503d2be0 5129
503d2be0
AS
5130fi
5131fi
5132ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5133if test -n "$ac_ct_RANLIB"; then
ca81d7a0
JD
5134 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5135echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5136else
ca81d7a0
JD
5137 { echo "$as_me:$LINENO: result: no" >&5
5138echo "${ECHO_T}no" >&6; }
503d2be0
AS
5139fi
5140
ca81d7a0
JD
5141 if test "x$ac_ct_RANLIB" = x; then
5142 RANLIB=":"
5143 else
5144 case $cross_compiling:$ac_tool_warned in
5145yes:)
5146{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5147whose name does not start with the host triplet. If you think this
5148configuration is useful to you, please write to autoconf@gnu.org." >&5
5149echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5150whose name does not start with the host triplet. If you think this
5151configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5152ac_tool_warned=yes ;;
5153esac
5154 RANLIB=$ac_ct_RANLIB
5155 fi
7397acc4 5156else
503d2be0 5157 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5158fi
5159
5160fi
9e71690e
DK
5161# Extract the first word of "install-info", so it can be a program name with args.
5162set dummy install-info; ac_word=$2
ca81d7a0
JD
5163{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5164echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5165if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5166 echo $ECHO_N "(cached) $ECHO_C" >&6
5167else
5168 case $INSTALL_INFO in
5169 [\\/]* | ?:[\\/]*)
5170 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5171 ;;
5172 *)
5173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5174for as_dir in $PATH
5175do
5176 IFS=$as_save_IFS
5177 test -z "$as_dir" && as_dir=.
5178 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5179 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5180 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5181 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5182 break 2
5183 fi
5184done
5185done
ca81d7a0 5186IFS=$as_save_IFS
9e71690e
DK
5187
5188 ;;
5189esac
5190fi
5191INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5192if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5193 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5194echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5195else
ca81d7a0
JD
5196 { echo "$as_me:$LINENO: result: no" >&5
5197echo "${ECHO_T}no" >&6; }
9e71690e
DK
5198fi
5199
ca81d7a0 5200
9e71690e
DK
5201# Extract the first word of "install-info", so it can be a program name with args.
5202set dummy install-info; ac_word=$2
ca81d7a0
JD
5203{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5204echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5205if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5206 echo $ECHO_N "(cached) $ECHO_C" >&6
5207else
5208 case $INSTALL_INFO in
5209 [\\/]* | ?:[\\/]*)
5210 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5211 ;;
5212 *)
5213 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5214for as_dir in /usr/sbin
5215do
5216 IFS=$as_save_IFS
5217 test -z "$as_dir" && as_dir=.
5218 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5219 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5220 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5221 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5222 break 2
5223 fi
5224done
5225done
ca81d7a0 5226IFS=$as_save_IFS
9e71690e
DK
5227
5228 ;;
5229esac
5230fi
5231INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5232if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5233 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5234echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5235else
ca81d7a0
JD
5236 { echo "$as_me:$LINENO: result: no" >&5
5237echo "${ECHO_T}no" >&6; }
9e71690e
DK
5238fi
5239
ca81d7a0 5240
9e71690e
DK
5241# Extract the first word of "install-info", so it can be a program name with args.
5242set dummy install-info; ac_word=$2
ca81d7a0
JD
5243{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5244echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5245if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5246 echo $ECHO_N "(cached) $ECHO_C" >&6
5247else
5248 case $INSTALL_INFO in
5249 [\\/]* | ?:[\\/]*)
5250 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5251 ;;
5252 *)
5253 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5254for as_dir in /sbin
5255do
5256 IFS=$as_save_IFS
5257 test -z "$as_dir" && as_dir=.
5258 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5259 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5260 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5261 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5262 break 2
5263 fi
5264done
5265done
ca81d7a0 5266IFS=$as_save_IFS
9e71690e
DK
5267
5268 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5269 ;;
5270esac
5271fi
5272INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5273if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5274 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5275echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5276else
ca81d7a0
JD
5277 { echo "$as_me:$LINENO: result: no" >&5
5278echo "${ECHO_T}no" >&6; }
9e71690e
DK
5279fi
5280
ca81d7a0 5281
8ae52ca6
RF
5282# Extract the first word of "gzip", so it can be a program name with args.
5283set dummy gzip; ac_word=$2
ca81d7a0
JD
5284{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5285echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5286if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5287 echo $ECHO_N "(cached) $ECHO_C" >&6
5288else
46e35e9f 5289 case $GZIP_PROG in
8ae52ca6 5290 [\\/]* | ?:[\\/]*)
46e35e9f 5291 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5292 ;;
5293 *)
5294 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5295for as_dir in $PATH
5296do
5297 IFS=$as_save_IFS
5298 test -z "$as_dir" && as_dir=.
5299 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5300 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5301 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5302 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5303 break 2
5304 fi
5305done
5306done
ca81d7a0 5307IFS=$as_save_IFS
8ae52ca6
RF
5308
5309 ;;
5310esac
5311fi
46e35e9f 5312GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5313if test -n "$GZIP_PROG"; then
ca81d7a0
JD
5314 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5315echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5316else
ca81d7a0
JD
5317 { echo "$as_me:$LINENO: result: no" >&5
5318echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5319fi
5320
ba4481b5 5321
c0d27fcc 5322
ca81d7a0 5323
8e967cf7
MR
5324if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5325then
5326 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5327fi
5328
5329if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5330then
5331 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5332fi
5333
c0d27fcc 5334
fe239f0f 5335late_LDFLAGS=$LDFLAGS
4af002d6 5336if test "$GCC" = yes; then
fe239f0f
AS
5337 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5338else
5339 LDFLAGS="$LDFLAGS -znocombreloc"
5340fi
5341
ca81d7a0
JD
5342{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5343echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5344cat >conftest.$ac_ext <<_ACEOF
5345main(){return 0;}
5346_ACEOF
5347rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5348if { (ac_try="$ac_link"
5349case "(($ac_try" in
5350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5351 *) ac_try_echo=$ac_try;;
5352esac
5353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5354 (eval "$ac_link") 2>conftest.er1
fe239f0f 5355 ac_status=$?
edfaf76d
LK
5356 grep -v '^ *+' conftest.er1 >conftest.err
5357 rm -f conftest.er1
5358 cat conftest.err >&5
fe239f0f 5359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5360 (exit $ac_status); } && {
5361 test -z "$ac_c_werror_flag" ||
5362 test ! -s conftest.err
5363 } && test -s conftest$ac_exeext &&
5364 $as_test_x conftest$ac_exeext; then
ca81d7a0
JD
5365 { echo "$as_me:$LINENO: result: yes" >&5
5366echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5367else
5368 echo "$as_me: failed program was:" >&5
5369sed 's/^/| /' conftest.$ac_ext >&5
5370
ca81d7a0
JD
5371 LDFLAGS=$late_LDFLAGS
5372 { echo "$as_me:$LINENO: result: no" >&5
5373echo "${ECHO_T}no" >&6; }
fe239f0f 5374fi
ca81d7a0 5375
f053c89f 5376rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5377 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5378
3b33a005
DL
5379#### Extract some information from the operating system and machine files.
5380
c0d27fcc 5381{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5382 - which libraries the lib-src programs will want, and
503d2be0
AS
5383 - whether the GNU malloc routines are usable..." >&5
5384echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5385 - which libraries the lib-src programs will want, and
503d2be0 5386 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5387
5388### First figure out CFLAGS (which we use for running the compiler here)
5389### and REAL_CFLAGS (which we use for real compilation).
5390### The two are the same except on a few systems, where they are made
5391### different to work around various lossages. For example,
5392### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5393### as implying static linking.
5394
5395### If the CFLAGS env var is specified, we use that value
5396### instead of the default.
5397
5398### It's not important that this name contain the PID; you can't run
5399### two configures in the same directory and have anything work
5400### anyway.
5401tempcname="conftest.c"
5402
5403echo '
5404#include "'${srcdir}'/src/'${opsysfile}'"
5405#include "'${srcdir}'/src/'${machfile}'"
5406#ifndef LIBS_MACHINE
5407#define LIBS_MACHINE
5408#endif
5409#ifndef LIBS_SYSTEM
5410#define LIBS_SYSTEM
5411#endif
5412#ifndef C_SWITCH_SYSTEM
5413#define C_SWITCH_SYSTEM
5414#endif
5415#ifndef C_SWITCH_MACHINE
5416#define C_SWITCH_MACHINE
5417#endif
5418configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5419configure___ c_switch_system=C_SWITCH_SYSTEM
5420configure___ c_switch_machine=C_SWITCH_MACHINE
5421
5422#ifndef LIB_X11_LIB
5423#define LIB_X11_LIB -lX11
5424#endif
5425
5426#ifndef LIBX11_MACHINE
5427#define LIBX11_MACHINE
5428#endif
5429
5430#ifndef LIBX11_SYSTEM
5431#define LIBX11_SYSTEM
5432#endif
5433configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
5434
5435#ifdef UNEXEC
5436configure___ unexec=UNEXEC
5437#else
5438configure___ unexec=unexec.o
5439#endif
5440
5441#ifdef SYSTEM_MALLOC
5442configure___ system_malloc=yes
5443#else
5444configure___ system_malloc=no
5445#endif
5446
ef9e4345
GM
5447#ifdef USE_MMAP_FOR_BUFFERS
5448configure___ use_mmap_for_buffers=yes
73b77ee5 5449#else
ef9e4345 5450configure___ use_mmap_for_buffers=no
73b77ee5
GM
5451#endif
5452
3b33a005
DL
5453#ifndef C_DEBUG_SWITCH
5454#define C_DEBUG_SWITCH -g
5455#endif
5456
5457#ifndef C_OPTIMIZE_SWITCH
5458#ifdef __GNUC__
5459#define C_OPTIMIZE_SWITCH -O2
5460#else
5461#define C_OPTIMIZE_SWITCH -O
5462#endif
5463#endif
5464
01abe918
CY
5465#ifndef C_WARNINGS_SWITCH
5466#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5467#endif
5468
3b33a005
DL
5469#ifndef LD_SWITCH_MACHINE
5470#define LD_SWITCH_MACHINE
5471#endif
5472
5473#ifndef LD_SWITCH_SYSTEM
5474#define LD_SWITCH_SYSTEM
5475#endif
5476
5477#ifndef LD_SWITCH_X_SITE_AUX
5478#define LD_SWITCH_X_SITE_AUX
503d2be0 5479#endif
3b33a005
DL
5480
5481configure___ ld_switch_system=LD_SWITCH_SYSTEM
5482configure___ ld_switch_machine=LD_SWITCH_MACHINE
5483
5484#ifdef THIS_IS_CONFIGURE
5485
5486/* Get the CFLAGS for tests in configure. */
5487#ifdef __GNUC__
5488configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5489#else
5490configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5491#endif
5492
5493#else /* not THIS_IS_CONFIGURE */
5494
5495/* Get the CFLAGS for real compilation. */
5496#ifdef __GNUC__
01abe918 5497configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5498#else
5499configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5500#endif
5501
5502#endif /* not THIS_IS_CONFIGURE */
5503' > ${tempcname}
5504
5505# The value of CPP is a quoted variable reference, so we need to do this
5506# to get its actual value...
5507CPP=`eval "echo $CPP"`
5508eval `${CPP} -Isrc ${tempcname} \
5509 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5510if test "x$SPECIFIED_CFLAGS" = x; then
5511 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5512 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5513else
5514 REAL_CFLAGS="$CFLAGS"
5515fi
5516rm ${tempcname}
5517
5518ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5519
5520### Make sure subsequent tests use flags consistent with the build flags.
5521
5522if test x"${OVERRIDE_CPPFLAGS}" != x; then
5523 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5524else
5525 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5526fi
5527
6bae0ccf
DL
5528
5529
ca81d7a0 5530# Check whether --enable-largefile was given.
f4988be7 5531if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5532 enableval=$enable_largefile;
5533fi
f4988be7 5534
503d2be0 5535if test "$enable_largefile" != no; then
f4988be7 5536
ca81d7a0
JD
5537 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5538echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5539if test "${ac_cv_sys_largefile_CC+set}" = set; then
5540 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5541else
f4988be7 5542 ac_cv_sys_largefile_CC=no
503d2be0
AS
5543 if test "$GCC" != yes; then
5544 ac_save_CC=$CC
5545 while :; do
ca81d7a0
JD
5546 # IRIX 6.2 and later do not support large files by default,
5547 # so use the C compiler's -n32 option if that helps.
edfaf76d 5548 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5549/* confdefs.h. */
5550_ACEOF
5551cat confdefs.h >>conftest.$ac_ext
5552cat >>conftest.$ac_ext <<_ACEOF
5553/* end confdefs.h. */
f4988be7 5554#include <sys/types.h>
503d2be0
AS
5555 /* Check that off_t can represent 2**63 - 1 correctly.
5556 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5557 since some C++ compilers masquerading as C compilers
5558 incorrectly reject 9223372036854775807. */
5559#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5560 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5561 && LARGE_OFF_T % 2147483647 == 1)
5562 ? 1 : -1];
5563int
5564main ()
5565{
f4988be7 5566
503d2be0
AS
5567 ;
5568 return 0;
5569}
5570_ACEOF
ca81d7a0
JD
5571 rm -f conftest.$ac_objext
5572if { (ac_try="$ac_compile"
5573case "(($ac_try" in
5574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5575 *) ac_try_echo=$ac_try;;
5576esac
5577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5578 (eval "$ac_compile") 2>conftest.er1
503d2be0 5579 ac_status=$?
edfaf76d
LK
5580 grep -v '^ *+' conftest.er1 >conftest.err
5581 rm -f conftest.er1
5582 cat conftest.err >&5
c0d27fcc 5583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5584 (exit $ac_status); } && {
5585 test -z "$ac_c_werror_flag" ||
5586 test ! -s conftest.err
5587 } && test -s conftest.$ac_objext; then
503d2be0 5588 break
b192d653 5589else
503d2be0 5590 echo "$as_me: failed program was:" >&5
19650fd6
AS
5591sed 's/^/| /' conftest.$ac_ext >&5
5592
ca81d7a0 5593
503d2be0 5594fi
ca81d7a0
JD
5595
5596rm -f core conftest.err conftest.$ac_objext
5597 CC="$CC -n32"
5598 rm -f conftest.$ac_objext
5599if { (ac_try="$ac_compile"
5600case "(($ac_try" in
5601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5602 *) ac_try_echo=$ac_try;;
5603esac
5604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5605 (eval "$ac_compile") 2>conftest.er1
503d2be0 5606 ac_status=$?
edfaf76d
LK
5607 grep -v '^ *+' conftest.er1 >conftest.err
5608 rm -f conftest.er1
5609 cat conftest.err >&5
c0d27fcc 5610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5611 (exit $ac_status); } && {
5612 test -z "$ac_c_werror_flag" ||
5613 test ! -s conftest.err
5614 } && test -s conftest.$ac_objext; then
503d2be0
AS
5615 ac_cv_sys_largefile_CC=' -n32'; break
5616else
5617 echo "$as_me: failed program was:" >&5
19650fd6
AS
5618sed 's/^/| /' conftest.$ac_ext >&5
5619
ca81d7a0 5620
503d2be0 5621fi
ca81d7a0
JD
5622
5623rm -f core conftest.err conftest.$ac_objext
edfaf76d 5624 break
503d2be0
AS
5625 done
5626 CC=$ac_save_CC
5627 rm -f conftest.$ac_ext
5628 fi
b192d653 5629fi
ca81d7a0
JD
5630{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5631echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5632 if test "$ac_cv_sys_largefile_CC" != no; then
5633 CC=$CC$ac_cv_sys_largefile_CC
5634 fi
b192d653 5635
ca81d7a0
JD
5636 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5637echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5638if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5639 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5640else
503d2be0 5641 while :; do
503d2be0 5642 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5643/* confdefs.h. */
5644_ACEOF
5645cat confdefs.h >>conftest.$ac_ext
5646cat >>conftest.$ac_ext <<_ACEOF
5647/* end confdefs.h. */
f4988be7 5648#include <sys/types.h>
503d2be0
AS
5649 /* Check that off_t can represent 2**63 - 1 correctly.
5650 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5651 since some C++ compilers masquerading as C compilers
5652 incorrectly reject 9223372036854775807. */
5653#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5654 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5655 && LARGE_OFF_T % 2147483647 == 1)
5656 ? 1 : -1];
5657int
5658main ()
5659{
f4988be7 5660
503d2be0
AS
5661 ;
5662 return 0;
5663}
5664_ACEOF
5665rm -f conftest.$ac_objext
ca81d7a0
JD
5666if { (ac_try="$ac_compile"
5667case "(($ac_try" in
5668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5669 *) ac_try_echo=$ac_try;;
5670esac
5671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5672 (eval "$ac_compile") 2>conftest.er1
503d2be0 5673 ac_status=$?
edfaf76d
LK
5674 grep -v '^ *+' conftest.er1 >conftest.err
5675 rm -f conftest.er1
5676 cat conftest.err >&5
c0d27fcc 5677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5678 (exit $ac_status); } && {
5679 test -z "$ac_c_werror_flag" ||
5680 test ! -s conftest.err
5681 } && test -s conftest.$ac_objext; then
5682 ac_cv_sys_file_offset_bits=no; break
f4988be7 5683else
503d2be0 5684 echo "$as_me: failed program was:" >&5
19650fd6
AS
5685sed 's/^/| /' conftest.$ac_ext >&5
5686
ca81d7a0 5687
503d2be0 5688fi
ca81d7a0
JD
5689
5690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5691 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5692/* confdefs.h. */
5693_ACEOF
5694cat confdefs.h >>conftest.$ac_ext
5695cat >>conftest.$ac_ext <<_ACEOF
5696/* end confdefs.h. */
f4988be7
GM
5697#define _FILE_OFFSET_BITS 64
5698#include <sys/types.h>
503d2be0
AS
5699 /* Check that off_t can represent 2**63 - 1 correctly.
5700 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5701 since some C++ compilers masquerading as C compilers
5702 incorrectly reject 9223372036854775807. */
5703#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5704 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5705 && LARGE_OFF_T % 2147483647 == 1)
5706 ? 1 : -1];
5707int
5708main ()
5709{
5710
5711 ;
5712 return 0;
5713}
5714_ACEOF
5715rm -f conftest.$ac_objext
ca81d7a0
JD
5716if { (ac_try="$ac_compile"
5717case "(($ac_try" in
5718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5719 *) ac_try_echo=$ac_try;;
5720esac
5721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5722 (eval "$ac_compile") 2>conftest.er1
503d2be0 5723 ac_status=$?
edfaf76d
LK
5724 grep -v '^ *+' conftest.er1 >conftest.err
5725 rm -f conftest.er1
5726 cat conftest.err >&5
c0d27fcc 5727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5728 (exit $ac_status); } && {
5729 test -z "$ac_c_werror_flag" ||
5730 test ! -s conftest.err
5731 } && test -s conftest.$ac_objext; then
503d2be0
AS
5732 ac_cv_sys_file_offset_bits=64; break
5733else
5734 echo "$as_me: failed program was:" >&5
19650fd6
AS
5735sed 's/^/| /' conftest.$ac_ext >&5
5736
ca81d7a0 5737
503d2be0 5738fi
ca81d7a0
JD
5739
5740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5741 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5742 break
5743done
ba4481b5 5744fi
ca81d7a0
JD
5745{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5746echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5747case $ac_cv_sys_file_offset_bits in #(
5748 no | unknown) ;;
5749 *)
c0d27fcc 5750cat >>confdefs.h <<_ACEOF
f4988be7 5751#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5752_ACEOF
f053c89f
CY
5753;;
5754esac
503d2be0 5755rm -f conftest*
f053c89f
CY
5756 if test $ac_cv_sys_file_offset_bits = unknown; then
5757 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
ca81d7a0 5758echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5759if test "${ac_cv_sys_large_files+set}" = set; then
5760 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5761else
503d2be0 5762 while :; do
503d2be0 5763 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5764/* confdefs.h. */
5765_ACEOF
5766cat confdefs.h >>conftest.$ac_ext
5767cat >>conftest.$ac_ext <<_ACEOF
5768/* end confdefs.h. */
503d2be0
AS
5769#include <sys/types.h>
5770 /* Check that off_t can represent 2**63 - 1 correctly.
5771 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5772 since some C++ compilers masquerading as C compilers
5773 incorrectly reject 9223372036854775807. */
5774#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5775 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5776 && LARGE_OFF_T % 2147483647 == 1)
5777 ? 1 : -1];
5778int
5779main ()
5780{
ba4481b5 5781
503d2be0
AS
5782 ;
5783 return 0;
5784}
5785_ACEOF
5786rm -f conftest.$ac_objext
ca81d7a0
JD
5787if { (ac_try="$ac_compile"
5788case "(($ac_try" in
5789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5790 *) ac_try_echo=$ac_try;;
5791esac
5792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5793 (eval "$ac_compile") 2>conftest.er1
503d2be0 5794 ac_status=$?
edfaf76d
LK
5795 grep -v '^ *+' conftest.er1 >conftest.err
5796 rm -f conftest.er1
5797 cat conftest.err >&5
c0d27fcc 5798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5799 (exit $ac_status); } && {
5800 test -z "$ac_c_werror_flag" ||
5801 test ! -s conftest.err
5802 } && test -s conftest.$ac_objext; then
5803 ac_cv_sys_large_files=no; break
ba4481b5 5804else
503d2be0 5805 echo "$as_me: failed program was:" >&5
19650fd6
AS
5806sed 's/^/| /' conftest.$ac_ext >&5
5807
ca81d7a0 5808
503d2be0 5809fi
ca81d7a0
JD
5810
5811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5812 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5813/* confdefs.h. */
5814_ACEOF
5815cat confdefs.h >>conftest.$ac_ext
5816cat >>conftest.$ac_ext <<_ACEOF
5817/* end confdefs.h. */
f4988be7 5818#define _LARGE_FILES 1
503d2be0
AS
5819#include <sys/types.h>
5820 /* Check that off_t can represent 2**63 - 1 correctly.
5821 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5822 since some C++ compilers masquerading as C compilers
5823 incorrectly reject 9223372036854775807. */
5824#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5825 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5826 && LARGE_OFF_T % 2147483647 == 1)
5827 ? 1 : -1];
5828int
5829main ()
5830{
f4988be7 5831
503d2be0
AS
5832 ;
5833 return 0;
5834}
5835_ACEOF
5836rm -f conftest.$ac_objext
ca81d7a0
JD
5837if { (ac_try="$ac_compile"
5838case "(($ac_try" in
5839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5840 *) ac_try_echo=$ac_try;;
5841esac
5842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5843 (eval "$ac_compile") 2>conftest.er1
503d2be0 5844 ac_status=$?
edfaf76d
LK
5845 grep -v '^ *+' conftest.er1 >conftest.err
5846 rm -f conftest.er1
5847 cat conftest.err >&5
c0d27fcc 5848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5849 (exit $ac_status); } && {
5850 test -z "$ac_c_werror_flag" ||
5851 test ! -s conftest.err
5852 } && test -s conftest.$ac_objext; then
503d2be0
AS
5853 ac_cv_sys_large_files=1; break
5854else
5855 echo "$as_me: failed program was:" >&5
19650fd6
AS
5856sed 's/^/| /' conftest.$ac_ext >&5
5857
ca81d7a0 5858
503d2be0 5859fi
ca81d7a0
JD
5860
5861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5862 ac_cv_sys_large_files=unknown
503d2be0
AS
5863 break
5864done
ba4481b5 5865fi
ca81d7a0
JD
5866{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5867echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5868case $ac_cv_sys_large_files in #(
5869 no | unknown) ;;
5870 *)
c0d27fcc 5871cat >>confdefs.h <<_ACEOF
f4988be7 5872#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5873_ACEOF
f053c89f
CY
5874;;
5875esac
503d2be0 5876rm -f conftest*
f053c89f 5877 fi
503d2be0 5878fi
ba4481b5 5879
c0d27fcc 5880
439f58ee 5881
bc5d9888
CY
5882### The standard library on x86-64 GNU/Linux distributions can
5883### be located in either /usr/lib64 or /usr/lib.
5884case "${canonical}" in
5885 x86_64-*-linux-gnu* )
5886 if test -d /usr/lib64; then
5887
5888cat >>confdefs.h <<\_ACEOF
5889#define HAVE_X86_64_LIB64_DIR 1
5890_ACEOF
5891
5892fi
5893esac
5894
439f58ee
JD
5895
5896
5897
2c9dccc9
PJ
5898if test "${with_sound}" != "no"; then
5899 # Sound support for GNU/Linux and the free BSDs.
ca81d7a0
JD
5900 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5901echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
c0d27fcc
MR
5902if test "${ac_cv_header_stdc+set}" = set; then
5903 echo $ECHO_N "(cached) $ECHO_C" >&6
5904else
5905 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5906/* confdefs.h. */
5907_ACEOF
5908cat confdefs.h >>conftest.$ac_ext
5909cat >>conftest.$ac_ext <<_ACEOF
5910/* end confdefs.h. */
c0d27fcc
MR
5911#include <stdlib.h>
5912#include <stdarg.h>
5913#include <string.h>
5914#include <float.h>
98418dba 5915
19650fd6
AS
5916int
5917main ()
5918{
5919
5920 ;
5921 return 0;
5922}
c0d27fcc 5923_ACEOF
19650fd6 5924rm -f conftest.$ac_objext
ca81d7a0
JD
5925if { (ac_try="$ac_compile"
5926case "(($ac_try" in
5927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5928 *) ac_try_echo=$ac_try;;
5929esac
5930eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5931 (eval "$ac_compile") 2>conftest.er1
cd958eb3 5932 ac_status=$?
edfaf76d
LK
5933 grep -v '^ *+' conftest.er1 >conftest.err
5934 rm -f conftest.er1
5935 cat conftest.err >&5
cd958eb3 5936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5937 (exit $ac_status); } && {
5938 test -z "$ac_c_werror_flag" ||
5939 test ! -s conftest.err
5940 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5941 ac_cv_header_stdc=yes
5942else
5943 echo "$as_me: failed program was:" >&5
19650fd6
AS
5944sed 's/^/| /' conftest.$ac_ext >&5
5945
ca81d7a0 5946 ac_cv_header_stdc=no
c0d27fcc 5947fi
ca81d7a0
JD
5948
5949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5950
5951if test $ac_cv_header_stdc = yes; then
5952 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5953 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5954/* confdefs.h. */
5955_ACEOF
5956cat confdefs.h >>conftest.$ac_ext
5957cat >>conftest.$ac_ext <<_ACEOF
5958/* end confdefs.h. */
c0d27fcc
MR
5959#include <string.h>
5960
5961_ACEOF
5962if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5963 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
5964 :
5965else
5966 ac_cv_header_stdc=no
5967fi
5968rm -f conftest*
5969
5970fi
5971
5972if test $ac_cv_header_stdc = yes; then
5973 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5974 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5975/* confdefs.h. */
5976_ACEOF
5977cat confdefs.h >>conftest.$ac_ext
5978cat >>conftest.$ac_ext <<_ACEOF
5979/* end confdefs.h. */
c0d27fcc
MR
5980#include <stdlib.h>
5981
5982_ACEOF
5983if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5984 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
5985 :
5986else
5987 ac_cv_header_stdc=no
5988fi
5989rm -f conftest*
5990
5991fi
5992
5993if test $ac_cv_header_stdc = yes; then
5994 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5995 if test "$cross_compiling" = yes; then
5996 :
5997else
5998 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5999/* confdefs.h. */
6000_ACEOF
6001cat confdefs.h >>conftest.$ac_ext
6002cat >>conftest.$ac_ext <<_ACEOF
6003/* end confdefs.h. */
c0d27fcc 6004#include <ctype.h>
ca81d7a0 6005#include <stdlib.h>
c0d27fcc
MR
6006#if ((' ' & 0x0FF) == 0x020)
6007# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6008# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6009#else
19650fd6 6010# define ISLOWER(c) \
edfaf76d
LK
6011 (('a' <= (c) && (c) <= 'i') \
6012 || ('j' <= (c) && (c) <= 'r') \
6013 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
6014# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6015#endif
6016
6017#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6018int
6019main ()
6020{
6021 int i;
6022 for (i = 0; i < 256; i++)
6023 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6024 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6025 return 2;
6026 return 0;
c0d27fcc
MR
6027}
6028_ACEOF
6029rm -f conftest$ac_exeext
ca81d7a0
JD
6030if { (ac_try="$ac_link"
6031case "(($ac_try" in
6032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6033 *) ac_try_echo=$ac_try;;
6034esac
6035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6036 (eval "$ac_link") 2>&5
c0d27fcc
MR
6037 ac_status=$?
6038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6039 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6040 { (case "(($ac_try" in
6041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6042 *) ac_try_echo=$ac_try;;
6043esac
6044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6045 (eval "$ac_try") 2>&5
c0d27fcc
MR
6046 ac_status=$?
6047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6048 (exit $ac_status); }; }; then
6049 :
6050else
6051 echo "$as_me: program exited with status $ac_status" >&5
6052echo "$as_me: failed program was:" >&5
19650fd6
AS
6053sed 's/^/| /' conftest.$ac_ext >&5
6054
c0d27fcc
MR
6055( exit $ac_status )
6056ac_cv_header_stdc=no
6057fi
ca81d7a0 6058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6059fi
ca81d7a0
JD
6060
6061
c0d27fcc
MR
6062fi
6063fi
ca81d7a0
JD
6064{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6065echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
c0d27fcc
MR
6066if test $ac_cv_header_stdc = yes; then
6067
6068cat >>confdefs.h <<\_ACEOF
6069#define STDC_HEADERS 1
6070_ACEOF
6071
6072fi
6073
6074# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 6085 inttypes.h stdint.h unistd.h
98418dba
CW
6086do
6087as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6088{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6089echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6090if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6091 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6092else
925c2f3f 6093 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6094/* confdefs.h. */
6095_ACEOF
6096cat confdefs.h >>conftest.$ac_ext
6097cat >>conftest.$ac_ext <<_ACEOF
6098/* end confdefs.h. */
c0d27fcc
MR
6099$ac_includes_default
6100
6101#include <$ac_header>
6102_ACEOF
6103rm -f conftest.$ac_objext
ca81d7a0
JD
6104if { (ac_try="$ac_compile"
6105case "(($ac_try" in
6106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6107 *) ac_try_echo=$ac_try;;
6108esac
6109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6110 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6111 ac_status=$?
edfaf76d
LK
6112 grep -v '^ *+' conftest.er1 >conftest.err
6113 rm -f conftest.er1
6114 cat conftest.err >&5
c0d27fcc 6115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6116 (exit $ac_status); } && {
6117 test -z "$ac_c_werror_flag" ||
6118 test ! -s conftest.err
6119 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6120 eval "$as_ac_Header=yes"
6121else
6122 echo "$as_me: failed program was:" >&5
19650fd6
AS
6123sed 's/^/| /' conftest.$ac_ext >&5
6124
ca81d7a0 6125 eval "$as_ac_Header=no"
c0d27fcc 6126fi
ca81d7a0
JD
6127
6128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6129fi
ca81d7a0
JD
6130ac_res=`eval echo '${'$as_ac_Header'}'`
6131 { echo "$as_me:$LINENO: result: $ac_res" >&5
6132echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6133if test `eval echo '${'$as_ac_Header'}'` = yes; then
6134 cat >>confdefs.h <<_ACEOF
6135#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6136_ACEOF
6137
6138fi
6139
6140done
6141
6142
6143
6144
6145
6146for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
6147do
6148as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6149if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6150 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6151echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6152if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6153 echo $ECHO_N "(cached) $ECHO_C" >&6
6154fi
ca81d7a0
JD
6155ac_res=`eval echo '${'$as_ac_Header'}'`
6156 { echo "$as_me:$LINENO: result: $ac_res" >&5
6157echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6158else
6159 # Is the header compilable?
ca81d7a0
JD
6160{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6161echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6162cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6163/* confdefs.h. */
6164_ACEOF
6165cat confdefs.h >>conftest.$ac_ext
6166cat >>conftest.$ac_ext <<_ACEOF
6167/* end confdefs.h. */
c0d27fcc 6168$ac_includes_default
98418dba 6169#include <$ac_header>
503d2be0 6170_ACEOF
c0d27fcc 6171rm -f conftest.$ac_objext
ca81d7a0
JD
6172if { (ac_try="$ac_compile"
6173case "(($ac_try" in
6174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6175 *) ac_try_echo=$ac_try;;
6176esac
6177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6178 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6179 ac_status=$?
edfaf76d
LK
6180 grep -v '^ *+' conftest.er1 >conftest.err
6181 rm -f conftest.er1
6182 cat conftest.err >&5
c0d27fcc 6183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6184 (exit $ac_status); } && {
6185 test -z "$ac_c_werror_flag" ||
6186 test ! -s conftest.err
6187 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6188 ac_header_compiler=yes
6189else
6190 echo "$as_me: failed program was:" >&5
19650fd6
AS
6191sed 's/^/| /' conftest.$ac_ext >&5
6192
ca81d7a0 6193 ac_header_compiler=no
c0d27fcc 6194fi
ca81d7a0
JD
6195
6196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6197{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6198echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6199
6200# Is the header present?
ca81d7a0
JD
6201{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6202echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6203cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6204/* confdefs.h. */
6205_ACEOF
6206cat confdefs.h >>conftest.$ac_ext
6207cat >>conftest.$ac_ext <<_ACEOF
6208/* end confdefs.h. */
c0d27fcc
MR
6209#include <$ac_header>
6210_ACEOF
ca81d7a0
JD
6211if { (ac_try="$ac_cpp conftest.$ac_ext"
6212case "(($ac_try" in
6213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6214 *) ac_try_echo=$ac_try;;
6215esac
6216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6217 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6218 ac_status=$?
6bae0ccf 6219 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6220 rm -f conftest.er1
6221 cat conftest.err >&5
c0d27fcc 6222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6223 (exit $ac_status); } >/dev/null && {
6224 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6225 test ! -s conftest.err
6226 }; then
c0d27fcc 6227 ac_header_preproc=yes
f4988be7 6228else
503d2be0 6229 echo "$as_me: failed program was:" >&5
19650fd6
AS
6230sed 's/^/| /' conftest.$ac_ext >&5
6231
c0d27fcc 6232 ac_header_preproc=no
f4988be7 6233fi
ca81d7a0 6234
98418dba 6235rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6236{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6237echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6238
6239# So? What about this header?
edfaf76d
LK
6240case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6241 yes:no: )
c0d27fcc
MR
6242 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6243echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6244 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6245echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6246 ac_header_preproc=yes
19650fd6 6247 ;;
edfaf76d 6248 no:yes:* )
c0d27fcc
MR
6249 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6250echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6251 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6252echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6253 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6254echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6255 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6256echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6257 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6258echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6259 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6260echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6261
19650fd6 6262 ;;
c0d27fcc 6263esac
ca81d7a0
JD
6264{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6265echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6266if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6267 echo $ECHO_N "(cached) $ECHO_C" >&6
6268else
edfaf76d 6269 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6270fi
ca81d7a0
JD
6271ac_res=`eval echo '${'$as_ac_Header'}'`
6272 { echo "$as_me:$LINENO: result: $ac_res" >&5
6273echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6274
6275fi
98418dba 6276if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6277 cat >>confdefs.h <<_ACEOF
98418dba 6278#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6279_ACEOF
f4988be7
GM
6280
6281fi
c0d27fcc 6282
98418dba
CW
6283done
6284
6285 # Emulation library used on NetBSD.
ca81d7a0
JD
6286 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6287echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6288if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6289 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6290else
98418dba
CW
6291 ac_check_lib_save_LIBS=$LIBS
6292LIBS="-lossaudio $LIBS"
6293cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6294/* confdefs.h. */
6295_ACEOF
6296cat confdefs.h >>conftest.$ac_ext
6297cat >>conftest.$ac_ext <<_ACEOF
6298/* end confdefs.h. */
98418dba 6299
ca81d7a0
JD
6300/* Override any GCC internal prototype to avoid an error.
6301 Use char because int might match the return type of a GCC
6302 builtin and then its argument prototype would still apply. */
98418dba
CW
6303#ifdef __cplusplus
6304extern "C"
f4988be7 6305#endif
98418dba 6306char _oss_ioctl ();
503d2be0
AS
6307int
6308main ()
6309{
ca81d7a0 6310return _oss_ioctl ();
503d2be0
AS
6311 ;
6312 return 0;
6313}
6314_ACEOF
98418dba 6315rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6316if { (ac_try="$ac_link"
6317case "(($ac_try" in
6318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6319 *) ac_try_echo=$ac_try;;
6320esac
6321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6322 (eval "$ac_link") 2>conftest.er1
503d2be0 6323 ac_status=$?
edfaf76d
LK
6324 grep -v '^ *+' conftest.er1 >conftest.err
6325 rm -f conftest.er1
6326 cat conftest.err >&5
c0d27fcc 6327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6328 (exit $ac_status); } && {
6329 test -z "$ac_c_werror_flag" ||
6330 test ! -s conftest.err
6331 } && test -s conftest$ac_exeext &&
6332 $as_test_x conftest$ac_exeext; then
98418dba 6333 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6334else
503d2be0 6335 echo "$as_me: failed program was:" >&5
19650fd6
AS
6336sed 's/^/| /' conftest.$ac_ext >&5
6337
ca81d7a0 6338 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6339fi
ca81d7a0 6340
f053c89f 6341rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6342 conftest$ac_exeext conftest.$ac_ext
98418dba 6343LIBS=$ac_check_lib_save_LIBS
f4988be7 6344fi
ca81d7a0
JD
6345{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6346echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6347if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6348 LIBSOUND=-lossaudio
6349else
6350 LIBSOUND=
6351fi
6352
c0d27fcc 6353
439f58ee
JD
6354
6355 ALSA_REQUIRED=1.0.0
6356 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
6357 if test "X${with_pkg_config_prog}" != X; then
6358 PKG_CONFIG="${with_pkg_config_prog}"
6359 fi
6360
6361 succeeded=no
6362
6363 if test -z "$PKG_CONFIG"; then
6364 # Extract the first word of "pkg-config", so it can be a program name with args.
6365set dummy pkg-config; ac_word=$2
ca81d7a0
JD
6366{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6367echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6368if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6369 echo $ECHO_N "(cached) $ECHO_C" >&6
6370else
6371 case $PKG_CONFIG in
6372 [\\/]* | ?:[\\/]*)
6373 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6374 ;;
6375 *)
6376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6377for as_dir in $PATH
6378do
6379 IFS=$as_save_IFS
6380 test -z "$as_dir" && as_dir=.
6381 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6382 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6383 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6384 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6385 break 2
6386 fi
6387done
6388done
ca81d7a0 6389IFS=$as_save_IFS
439f58ee
JD
6390
6391 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6392 ;;
6393esac
6394fi
6395PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6396if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
6397 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6398echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6399else
ca81d7a0
JD
6400 { echo "$as_me:$LINENO: result: no" >&5
6401echo "${ECHO_T}no" >&6; }
439f58ee
JD
6402fi
6403
ca81d7a0 6404
439f58ee
JD
6405 fi
6406
6407 if test "$PKG_CONFIG" = "no" ; then
6408 HAVE_ALSA=no
6409 else
6410 PKG_CONFIG_MIN_VERSION=0.9.0
6411 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
6412 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6413echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6414
67db6aa2 6415 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ca81d7a0
JD
6416 { echo "$as_me:$LINENO: result: yes" >&5
6417echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6418 succeeded=yes
6419
ca81d7a0
JD
6420 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6421echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6422 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6423 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6424echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6425
ca81d7a0
JD
6426 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6427echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6428 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6429 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6430echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6431 else
ca81d7a0
JD
6432 { echo "$as_me:$LINENO: result: no" >&5
6433echo "${ECHO_T}no" >&6; }
439f58ee
JD
6434 ALSA_CFLAGS=""
6435 ALSA_LIBS=""
6436 ## If we have a custom action on failure, don't print errors, but
6437 ## do set a variable so people can do so.
6438 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6439
6440 fi
6441
6442
6443
6444 else
6445 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6446 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6447 fi
6448 fi
6449
6450 if test $succeeded = yes; then
6451 HAVE_ALSA=yes
6452 else
6453 HAVE_ALSA=no
6454 fi
6455
6456 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6457 SAVE_CFLAGS="$CFLAGS"
6458 SAVE_LDFLAGS="$LDFLAGS"
6459 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6460 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6461 cat >conftest.$ac_ext <<_ACEOF
6462/* confdefs.h. */
6463_ACEOF
6464cat confdefs.h >>conftest.$ac_ext
6465cat >>conftest.$ac_ext <<_ACEOF
6466/* end confdefs.h. */
6467#include <asoundlib.h>
6468int
6469main ()
6470{
6471snd_lib_error_set_handler (0);
6472 ;
6473 return 0;
6474}
6475_ACEOF
6476rm -f conftest.$ac_objext
6477if { (ac_try="$ac_compile"
6478case "(($ac_try" in
6479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6480 *) ac_try_echo=$ac_try;;
6481esac
6482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6483 (eval "$ac_compile") 2>conftest.er1
6484 ac_status=$?
6485 grep -v '^ *+' conftest.er1 >conftest.err
6486 rm -f conftest.er1
6487 cat conftest.err >&5
6488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6489 (exit $ac_status); } && {
6490 test -z "$ac_c_werror_flag" ||
6491 test ! -s conftest.err
6492 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6493 emacs_alsa_normal=yes
6494else
6495 echo "$as_me: failed program was:" >&5
6496sed 's/^/| /' conftest.$ac_ext >&5
6497
6498 emacs_alsa_normal=no
6499fi
6500
6501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6502 if test "$emacs_alsa_normal" != yes; then
6503 cat >conftest.$ac_ext <<_ACEOF
6504/* confdefs.h. */
6505_ACEOF
6506cat confdefs.h >>conftest.$ac_ext
6507cat >>conftest.$ac_ext <<_ACEOF
6508/* end confdefs.h. */
6509#include <alsa/asoundlib.h>
6510int
6511main ()
6512{
6513snd_lib_error_set_handler (0);
6514 ;
6515 return 0;
6516}
6517_ACEOF
6518rm -f conftest.$ac_objext
6519if { (ac_try="$ac_compile"
6520case "(($ac_try" in
6521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6522 *) ac_try_echo=$ac_try;;
6523esac
6524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6525 (eval "$ac_compile") 2>conftest.er1
6526 ac_status=$?
6527 grep -v '^ *+' conftest.er1 >conftest.err
6528 rm -f conftest.er1
6529 cat conftest.err >&5
6530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6531 (exit $ac_status); } && {
6532 test -z "$ac_c_werror_flag" ||
6533 test ! -s conftest.err
6534 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6535 emacs_alsa_subdir=yes
6536else
6537 echo "$as_me: failed program was:" >&5
6538sed 's/^/| /' conftest.$ac_ext >&5
6539
6540 emacs_alsa_subdir=no
6541fi
6542
6543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6544 if test "$emacs_alsa_subdir" != yes; then
6545 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6546echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6547 { (exit 1); exit 1; }; }
6548 fi
6549 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6550 fi
6551
6552 CFLAGS="$SAVE_CFLAGS"
6553 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6554 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6555 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6556
6557cat >>confdefs.h <<\_ACEOF
6558#define HAVE_ALSA 1
6559_ACEOF
6560
6561 fi
6562
f4988be7 6563fi
c0d27fcc
MR
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
22044edf
DL
6582
6583
973a76b1 6584
cffcede7 6585
551ffc27 6586
226e2359 6587
c0d27fcc 6588
f4988be7 6589
98418dba
CW
6590for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6591 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6592 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6593 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
79011b82 6594 sys/utsname.h pwd.h
98418dba
CW
6595do
6596as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6597if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6598 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6599echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6600if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6601 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6602fi
ca81d7a0
JD
6603ac_res=`eval echo '${'$as_ac_Header'}'`
6604 { echo "$as_me:$LINENO: result: $ac_res" >&5
6605echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6606else
c0d27fcc 6607 # Is the header compilable?
ca81d7a0
JD
6608{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6609echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6610cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6611/* confdefs.h. */
6612_ACEOF
6613cat confdefs.h >>conftest.$ac_ext
6614cat >>conftest.$ac_ext <<_ACEOF
6615/* end confdefs.h. */
c0d27fcc
MR
6616$ac_includes_default
6617#include <$ac_header>
6618_ACEOF
6619rm -f conftest.$ac_objext
ca81d7a0
JD
6620if { (ac_try="$ac_compile"
6621case "(($ac_try" in
6622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6623 *) ac_try_echo=$ac_try;;
6624esac
6625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6626 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6627 ac_status=$?
edfaf76d
LK
6628 grep -v '^ *+' conftest.er1 >conftest.err
6629 rm -f conftest.er1
6630 cat conftest.err >&5
c0d27fcc 6631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6632 (exit $ac_status); } && {
6633 test -z "$ac_c_werror_flag" ||
6634 test ! -s conftest.err
6635 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6636 ac_header_compiler=yes
6637else
6638 echo "$as_me: failed program was:" >&5
19650fd6
AS
6639sed 's/^/| /' conftest.$ac_ext >&5
6640
ca81d7a0 6641 ac_header_compiler=no
c0d27fcc 6642fi
ca81d7a0
JD
6643
6644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6645{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6646echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6647
6648# Is the header present?
ca81d7a0
JD
6649{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6650echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6651cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6652/* confdefs.h. */
6653_ACEOF
6654cat confdefs.h >>conftest.$ac_ext
6655cat >>conftest.$ac_ext <<_ACEOF
6656/* end confdefs.h. */
98418dba 6657#include <$ac_header>
503d2be0 6658_ACEOF
ca81d7a0
JD
6659if { (ac_try="$ac_cpp conftest.$ac_ext"
6660case "(($ac_try" in
6661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6662 *) ac_try_echo=$ac_try;;
6663esac
6664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6665 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6666 ac_status=$?
6bae0ccf 6667 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6668 rm -f conftest.er1
6669 cat conftest.err >&5
c0d27fcc 6670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6671 (exit $ac_status); } >/dev/null && {
6672 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6673 test ! -s conftest.err
6674 }; then
c0d27fcc 6675 ac_header_preproc=yes
34ec9ebe 6676else
503d2be0 6677 echo "$as_me: failed program was:" >&5
19650fd6
AS
6678sed 's/^/| /' conftest.$ac_ext >&5
6679
c0d27fcc 6680 ac_header_preproc=no
34ec9ebe 6681fi
ca81d7a0 6682
98418dba 6683rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6684{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6685echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6686
6687# So? What about this header?
edfaf76d
LK
6688case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6689 yes:no: )
c0d27fcc
MR
6690 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6691echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6692 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6693echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6694 ac_header_preproc=yes
19650fd6 6695 ;;
edfaf76d 6696 no:yes:* )
c0d27fcc
MR
6697 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6698echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6699 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6700echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6701 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6702echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6703 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6704echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6705 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6706echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6707 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6708echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6709
19650fd6 6710 ;;
c0d27fcc 6711esac
ca81d7a0
JD
6712{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6713echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6714if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6715 echo $ECHO_N "(cached) $ECHO_C" >&6
6716else
edfaf76d 6717 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6718fi
ca81d7a0
JD
6719ac_res=`eval echo '${'$as_ac_Header'}'`
6720 { echo "$as_me:$LINENO: result: $ac_res" >&5
6721echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6722
6723fi
98418dba 6724if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6725 cat >>confdefs.h <<_ACEOF
98418dba 6726#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6727_ACEOF
34ec9ebe 6728
98418dba 6729fi
c0d27fcc 6730
98418dba
CW
6731done
6732
22044edf 6733
ca81d7a0
JD
6734{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6735echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6736cat >conftest.$ac_ext <<_ACEOF
6737/* confdefs.h. */
6738_ACEOF
6739cat confdefs.h >>conftest.$ac_ext
6740cat >>conftest.$ac_ext <<_ACEOF
6741/* end confdefs.h. */
6742#include <sys/personality.h>
6743int
6744main ()
6745{
6746personality (PER_LINUX32)
6747 ;
6748 return 0;
6749}
6750_ACEOF
6751rm -f conftest.$ac_objext
ca81d7a0
JD
6752if { (ac_try="$ac_compile"
6753case "(($ac_try" in
6754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6755 *) ac_try_echo=$ac_try;;
6756esac
6757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6758 (eval "$ac_compile") 2>conftest.er1
f17e308a 6759 ac_status=$?
edfaf76d
LK
6760 grep -v '^ *+' conftest.er1 >conftest.err
6761 rm -f conftest.er1
6762 cat conftest.err >&5
f17e308a 6763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6764 (exit $ac_status); } && {
6765 test -z "$ac_c_werror_flag" ||
6766 test ! -s conftest.err
6767 } && test -s conftest.$ac_objext; then
f17e308a
JD
6768 emacs_cv_personality_linux32=yes
6769else
6770 echo "$as_me: failed program was:" >&5
6771sed 's/^/| /' conftest.$ac_ext >&5
6772
ca81d7a0 6773 emacs_cv_personality_linux32=no
f17e308a 6774fi
ca81d7a0
JD
6775
6776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6777{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6778echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6779
6780if test $emacs_cv_personality_linux32 = yes; then
6781
6782cat >>confdefs.h <<\_ACEOF
6783#define HAVE_PERSONALITY_LINUX32 1
6784_ACEOF
6785
6786fi
6787
6788
22044edf
DL
6789for ac_header in term.h
6790do
6791as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6792{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6793echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6794if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6795 echo $ECHO_N "(cached) $ECHO_C" >&6
6796else
6797 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6798/* confdefs.h. */
6799_ACEOF
6800cat confdefs.h >>conftest.$ac_ext
6801cat >>conftest.$ac_ext <<_ACEOF
6802/* end confdefs.h. */
22044edf
DL
6803#include <$ac_header>
6804_ACEOF
ca81d7a0
JD
6805if { (ac_try="$ac_cpp conftest.$ac_ext"
6806case "(($ac_try" in
6807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6808 *) ac_try_echo=$ac_try;;
6809esac
6810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6811 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6812 ac_status=$?
6813 grep -v '^ *+' conftest.er1 >conftest.err
6814 rm -f conftest.er1
6815 cat conftest.err >&5
6816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6817 (exit $ac_status); } >/dev/null && {
6818 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6819 test ! -s conftest.err
6820 }; then
22044edf
DL
6821 eval "$as_ac_Header=yes"
6822else
6823 echo "$as_me: failed program was:" >&5
19650fd6
AS
6824sed 's/^/| /' conftest.$ac_ext >&5
6825
22044edf
DL
6826 eval "$as_ac_Header=no"
6827fi
ca81d7a0 6828
22044edf
DL
6829rm -f conftest.err conftest.$ac_ext
6830fi
ca81d7a0
JD
6831ac_res=`eval echo '${'$as_ac_Header'}'`
6832 { echo "$as_me:$LINENO: result: $ac_res" >&5
6833echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6834if test `eval echo '${'$as_ac_Header'}'` = yes; then
6835 cat >>confdefs.h <<_ACEOF
6836#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6837_ACEOF
6838
6839fi
6840
6841done
6842
ca81d7a0
JD
6843{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6844echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6845if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6846 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6847else
503d2be0 6848 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6849/* confdefs.h. */
6850_ACEOF
6851cat confdefs.h >>conftest.$ac_ext
6852cat >>conftest.$ac_ext <<_ACEOF
6853/* end confdefs.h. */
98418dba
CW
6854#include <stdlib.h>
6855#include <stdarg.h>
6856#include <string.h>
6857#include <float.h>
6858
19650fd6
AS
6859int
6860main ()
6861{
6862
6863 ;
6864 return 0;
6865}
98418dba 6866_ACEOF
19650fd6 6867rm -f conftest.$ac_objext
ca81d7a0
JD
6868if { (ac_try="$ac_compile"
6869case "(($ac_try" in
6870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6871 *) ac_try_echo=$ac_try;;
6872esac
6873eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6874 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6875 ac_status=$?
edfaf76d
LK
6876 grep -v '^ *+' conftest.er1 >conftest.err
6877 rm -f conftest.er1
6878 cat conftest.err >&5
cd958eb3 6879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6880 (exit $ac_status); } && {
6881 test -z "$ac_c_werror_flag" ||
6882 test ! -s conftest.err
6883 } && test -s conftest.$ac_objext; then
98418dba 6884 ac_cv_header_stdc=yes
ba4481b5 6885else
503d2be0 6886 echo "$as_me: failed program was:" >&5
19650fd6
AS
6887sed 's/^/| /' conftest.$ac_ext >&5
6888
ca81d7a0 6889 ac_cv_header_stdc=no
ba4481b5 6890fi
ca81d7a0
JD
6891
6892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6893
6894if test $ac_cv_header_stdc = yes; then
6895 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6896 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6897/* confdefs.h. */
6898_ACEOF
6899cat confdefs.h >>conftest.$ac_ext
6900cat >>conftest.$ac_ext <<_ACEOF
6901/* end confdefs.h. */
98418dba
CW
6902#include <string.h>
6903
6904_ACEOF
6905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6906 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6907 :
6908else
6909 ac_cv_header_stdc=no
ba4481b5 6910fi
98418dba 6911rm -f conftest*
ba4481b5
DL
6912
6913fi
6914
98418dba
CW
6915if test $ac_cv_header_stdc = yes; then
6916 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6917 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6918/* confdefs.h. */
6919_ACEOF
6920cat confdefs.h >>conftest.$ac_ext
6921cat >>conftest.$ac_ext <<_ACEOF
6922/* end confdefs.h. */
98418dba
CW
6923#include <stdlib.h>
6924
6925_ACEOF
6926if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6927 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6928 :
6929else
6930 ac_cv_header_stdc=no
6931fi
6932rm -f conftest*
6933
6934fi
6935
6936if test $ac_cv_header_stdc = yes; then
6937 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6938 if test "$cross_compiling" = yes; then
6939 :
d42122a3 6940else
503d2be0 6941 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6942/* confdefs.h. */
6943_ACEOF
6944cat confdefs.h >>conftest.$ac_ext
6945cat >>conftest.$ac_ext <<_ACEOF
6946/* end confdefs.h. */
98418dba 6947#include <ctype.h>
ca81d7a0 6948#include <stdlib.h>
98418dba
CW
6949#if ((' ' & 0x0FF) == 0x020)
6950# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6951# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6952#else
19650fd6 6953# define ISLOWER(c) \
edfaf76d
LK
6954 (('a' <= (c) && (c) <= 'i') \
6955 || ('j' <= (c) && (c) <= 'r') \
6956 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6957# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6958#endif
6959
6960#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6961int
6962main ()
6963{
98418dba
CW
6964 int i;
6965 for (i = 0; i < 256; i++)
6966 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6967 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6968 return 2;
6969 return 0;
503d2be0
AS
6970}
6971_ACEOF
98418dba 6972rm -f conftest$ac_exeext
ca81d7a0
JD
6973if { (ac_try="$ac_link"
6974case "(($ac_try" in
6975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6976 *) ac_try_echo=$ac_try;;
6977esac
6978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6979 (eval "$ac_link") 2>&5
503d2be0 6980 ac_status=$?
c0d27fcc 6981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6982 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6983 { (case "(($ac_try" in
6984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6985 *) ac_try_echo=$ac_try;;
6986esac
6987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6988 (eval "$ac_try") 2>&5
503d2be0 6989 ac_status=$?
c0d27fcc 6990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6991 (exit $ac_status); }; }; then
98418dba 6992 :
d42122a3 6993else
98418dba
CW
6994 echo "$as_me: program exited with status $ac_status" >&5
6995echo "$as_me: failed program was:" >&5
19650fd6
AS
6996sed 's/^/| /' conftest.$ac_ext >&5
6997
c0d27fcc 6998( exit $ac_status )
98418dba 6999ac_cv_header_stdc=no
d42122a3 7000fi
ca81d7a0 7001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 7002fi
ca81d7a0
JD
7003
7004
98418dba
CW
7005fi
7006fi
ca81d7a0
JD
7007{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
7008echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
7009if test $ac_cv_header_stdc = yes; then
7010
c0d27fcc 7011cat >>confdefs.h <<\_ACEOF
98418dba 7012#define STDC_HEADERS 1
c0d27fcc 7013_ACEOF
d42122a3
DL
7014
7015fi
7016
ca81d7a0
JD
7017{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
7018echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 7019if test "${ac_cv_header_time+set}" = set; then
503d2be0 7020 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 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. */
ba4481b5 7028#include <sys/types.h>
98418dba 7029#include <sys/time.h>
ba4481b5 7030#include <time.h>
503d2be0
AS
7031
7032int
7033main ()
7034{
98418dba
CW
7035if ((struct tm *) 0)
7036return 0;
503d2be0
AS
7037 ;
7038 return 0;
7039}
7040_ACEOF
7041rm -f conftest.$ac_objext
ca81d7a0
JD
7042if { (ac_try="$ac_compile"
7043case "(($ac_try" in
7044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7045 *) ac_try_echo=$ac_try;;
7046esac
7047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7048 (eval "$ac_compile") 2>conftest.er1
503d2be0 7049 ac_status=$?
edfaf76d
LK
7050 grep -v '^ *+' conftest.er1 >conftest.err
7051 rm -f conftest.er1
7052 cat conftest.err >&5
c0d27fcc 7053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7054 (exit $ac_status); } && {
7055 test -z "$ac_c_werror_flag" ||
7056 test ! -s conftest.err
7057 } && test -s conftest.$ac_objext; then
98418dba 7058 ac_cv_header_time=yes
ba4481b5 7059else
503d2be0 7060 echo "$as_me: failed program was:" >&5
19650fd6
AS
7061sed 's/^/| /' conftest.$ac_ext >&5
7062
ca81d7a0 7063 ac_cv_header_time=no
ba4481b5 7064fi
ca81d7a0
JD
7065
7066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7067fi
ca81d7a0
JD
7068{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7069echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 7070if test $ac_cv_header_time = yes; then
503d2be0 7071
c0d27fcc 7072cat >>confdefs.h <<\_ACEOF
98418dba 7073#define TIME_WITH_SYS_TIME 1
c0d27fcc 7074_ACEOF
ba4481b5
DL
7075
7076fi
7077
ca81d7a0
JD
7078{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
7079echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 7080if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 7081 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7082else
503d2be0 7083 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7084/* confdefs.h. */
7085_ACEOF
7086cat confdefs.h >>conftest.$ac_ext
7087cat >>conftest.$ac_ext <<_ACEOF
7088/* end confdefs.h. */
cd958eb3
MB
7089$ac_includes_default
7090int
7091main ()
7092{
7093#ifndef sys_siglist
f053c89f 7094 (void) sys_siglist;
98418dba 7095#endif
503d2be0 7096
cd958eb3
MB
7097 ;
7098 return 0;
7099}
7100_ACEOF
7101rm -f conftest.$ac_objext
ca81d7a0
JD
7102if { (ac_try="$ac_compile"
7103case "(($ac_try" in
7104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7105 *) ac_try_echo=$ac_try;;
7106esac
7107eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7108 (eval "$ac_compile") 2>conftest.er1
cd958eb3 7109 ac_status=$?
edfaf76d
LK
7110 grep -v '^ *+' conftest.er1 >conftest.err
7111 rm -f conftest.er1
7112 cat conftest.err >&5
cd958eb3 7113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7114 (exit $ac_status); } && {
7115 test -z "$ac_c_werror_flag" ||
7116 test ! -s conftest.err
7117 } && test -s conftest.$ac_objext; then
cd958eb3
MB
7118 ac_cv_have_decl_sys_siglist=yes
7119else
7120 echo "$as_me: failed program was:" >&5
19650fd6
AS
7121sed 's/^/| /' conftest.$ac_ext >&5
7122
ca81d7a0 7123 ac_cv_have_decl_sys_siglist=no
cd958eb3 7124fi
ca81d7a0
JD
7125
7126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 7127fi
ca81d7a0
JD
7128{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
7129echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
7130if test $ac_cv_have_decl_sys_siglist = yes; then
7131
7132cat >>confdefs.h <<_ACEOF
7133#define HAVE_DECL_SYS_SIGLIST 1
7134_ACEOF
7135
7136
7137else
7138 cat >>confdefs.h <<_ACEOF
7139#define HAVE_DECL_SYS_SIGLIST 0
7140_ACEOF
7141
7142
7143fi
7144
7145
7146if test $ac_cv_have_decl_sys_siglist != yes; then
7147 # For Tru64, at least:
ca81d7a0
JD
7148 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
7149echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
7150if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
7151 echo $ECHO_N "(cached) $ECHO_C" >&6
7152else
7153 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7154/* confdefs.h. */
7155_ACEOF
7156cat confdefs.h >>conftest.$ac_ext
7157cat >>conftest.$ac_ext <<_ACEOF
7158/* end confdefs.h. */
cd958eb3 7159$ac_includes_default
503d2be0
AS
7160int
7161main ()
7162{
cd958eb3 7163#ifndef __sys_siglist
f053c89f 7164 (void) __sys_siglist;
cd958eb3
MB
7165#endif
7166
503d2be0
AS
7167 ;
7168 return 0;
7169}
7170_ACEOF
7171rm -f conftest.$ac_objext
ca81d7a0
JD
7172if { (ac_try="$ac_compile"
7173case "(($ac_try" in
7174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7175 *) ac_try_echo=$ac_try;;
7176esac
7177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7178 (eval "$ac_compile") 2>conftest.er1
503d2be0 7179 ac_status=$?
edfaf76d
LK
7180 grep -v '^ *+' conftest.er1 >conftest.err
7181 rm -f conftest.er1
7182 cat conftest.err >&5
c0d27fcc 7183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7184 (exit $ac_status); } && {
7185 test -z "$ac_c_werror_flag" ||
7186 test ! -s conftest.err
7187 } && test -s conftest.$ac_objext; then
cd958eb3 7188 ac_cv_have_decl___sys_siglist=yes
ba4481b5 7189else
503d2be0 7190 echo "$as_me: failed program was:" >&5
19650fd6
AS
7191sed 's/^/| /' conftest.$ac_ext >&5
7192
ca81d7a0 7193 ac_cv_have_decl___sys_siglist=no
ba4481b5 7194fi
ca81d7a0
JD
7195
7196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 7197fi
ca81d7a0
JD
7198{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
7199echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 7200if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 7201
cd958eb3
MB
7202cat >>confdefs.h <<_ACEOF
7203#define HAVE_DECL___SYS_SIGLIST 1
7204_ACEOF
7205
7206
7207else
7208 cat >>confdefs.h <<_ACEOF
7209#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 7210_ACEOF
503d2be0 7211
cd958eb3 7212
ba4481b5
DL
7213fi
7214
cd958eb3
MB
7215
7216 if test $ac_cv_have_decl___sys_siglist = yes; then
7217
7218cat >>confdefs.h <<\_ACEOF
7219#define sys_siglist __sys_siglist
7220_ACEOF
7221
7222 fi
7223fi
ca81d7a0
JD
7224{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7225echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 7226if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 7227 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7228else
503d2be0 7229 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7230/* confdefs.h. */
7231_ACEOF
7232cat confdefs.h >>conftest.$ac_ext
7233cat >>conftest.$ac_ext <<_ACEOF
7234/* end confdefs.h. */
98418dba
CW
7235#include <sys/types.h>
7236#include <sys/wait.h>
7237#ifndef WEXITSTATUS
ca81d7a0 7238# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7239#endif
7240#ifndef WIFEXITED
7241# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7242#endif
503d2be0
AS
7243
7244int
7245main ()
7246{
98418dba
CW
7247 int s;
7248 wait (&s);
7249 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7250 ;
7251 return 0;
7252}
7253_ACEOF
98418dba 7254rm -f conftest.$ac_objext
ca81d7a0
JD
7255if { (ac_try="$ac_compile"
7256case "(($ac_try" in
7257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7258 *) ac_try_echo=$ac_try;;
7259esac
7260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7261 (eval "$ac_compile") 2>conftest.er1
503d2be0 7262 ac_status=$?
edfaf76d
LK
7263 grep -v '^ *+' conftest.er1 >conftest.err
7264 rm -f conftest.er1
7265 cat conftest.err >&5
c0d27fcc 7266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7267 (exit $ac_status); } && {
7268 test -z "$ac_c_werror_flag" ||
7269 test ! -s conftest.err
7270 } && test -s conftest.$ac_objext; then
98418dba 7271 ac_cv_header_sys_wait_h=yes
ba4481b5 7272else
503d2be0 7273 echo "$as_me: failed program was:" >&5
19650fd6
AS
7274sed 's/^/| /' conftest.$ac_ext >&5
7275
ca81d7a0 7276 ac_cv_header_sys_wait_h=no
ba4481b5 7277fi
ca81d7a0
JD
7278
7279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7280fi
ca81d7a0
JD
7281{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7282echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7283if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7284
c0d27fcc 7285cat >>confdefs.h <<\_ACEOF
98418dba 7286#define HAVE_SYS_WAIT_H 1
c0d27fcc 7287_ACEOF
ba4481b5 7288
ba4481b5
DL
7289fi
7290
c0d27fcc 7291
ca81d7a0
JD
7292{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7293echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7294if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7295 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7296else
503d2be0 7297 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7298/* confdefs.h. */
7299_ACEOF
7300cat confdefs.h >>conftest.$ac_ext
7301cat >>conftest.$ac_ext <<_ACEOF
7302/* end confdefs.h. */
98418dba
CW
7303#ifdef TIME_WITH_SYS_TIME
7304#include <sys/time.h>
7305#include <time.h>
7306#else
7307#ifdef HAVE_SYS_TIME_H
7308#include <sys/time.h>
7309#else
1113b624 7310#include <time.h>
98418dba
CW
7311#endif
7312#endif
7313#ifdef HAVE_UTIME_H
7314#include <utime.h>
7315#endif
503d2be0
AS
7316int
7317main ()
7318{
98418dba 7319static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7320 ;
7321 return 0;
7322}
7323_ACEOF
98418dba 7324rm -f conftest.$ac_objext
ca81d7a0
JD
7325if { (ac_try="$ac_compile"
7326case "(($ac_try" in
7327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7328 *) ac_try_echo=$ac_try;;
7329esac
7330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7331 (eval "$ac_compile") 2>conftest.er1
503d2be0 7332 ac_status=$?
edfaf76d
LK
7333 grep -v '^ *+' conftest.er1 >conftest.err
7334 rm -f conftest.er1
7335 cat conftest.err >&5
c0d27fcc 7336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7337 (exit $ac_status); } && {
7338 test -z "$ac_c_werror_flag" ||
7339 test ! -s conftest.err
7340 } && test -s conftest.$ac_objext; then
98418dba 7341 emacs_cv_struct_utimbuf=yes
1113b624 7342else
503d2be0 7343 echo "$as_me: failed program was:" >&5
19650fd6
AS
7344sed 's/^/| /' conftest.$ac_ext >&5
7345
ca81d7a0 7346 emacs_cv_struct_utimbuf=no
1113b624 7347fi
ca81d7a0
JD
7348
7349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7350fi
ca81d7a0
JD
7351{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7352echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7353if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7354
c0d27fcc 7355cat >>confdefs.h <<\_ACEOF
98418dba 7356#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7357_ACEOF
1113b624
PE
7358
7359fi
ba4481b5 7360
ca81d7a0
JD
7361{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7362echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7363if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7364 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7365else
98418dba 7366 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7367/* confdefs.h. */
7368_ACEOF
7369cat confdefs.h >>conftest.$ac_ext
7370cat >>conftest.$ac_ext <<_ACEOF
7371/* end confdefs.h. */
7397acc4 7372#include <sys/types.h>
98418dba 7373#include <signal.h>
98418dba 7374
503d2be0
AS
7375int
7376main ()
7377{
ca81d7a0 7378return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7379 ;
7380 return 0;
7381}
7382_ACEOF
98418dba 7383rm -f conftest.$ac_objext
ca81d7a0
JD
7384if { (ac_try="$ac_compile"
7385case "(($ac_try" in
7386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7387 *) ac_try_echo=$ac_try;;
7388esac
7389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7390 (eval "$ac_compile") 2>conftest.er1
503d2be0 7391 ac_status=$?
edfaf76d
LK
7392 grep -v '^ *+' conftest.er1 >conftest.err
7393 rm -f conftest.er1
7394 cat conftest.err >&5
c0d27fcc 7395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7396 (exit $ac_status); } && {
7397 test -z "$ac_c_werror_flag" ||
7398 test ! -s conftest.err
7399 } && test -s conftest.$ac_objext; then
ca81d7a0 7400 ac_cv_type_signal=int
503d2be0
AS
7401else
7402 echo "$as_me: failed program was:" >&5
19650fd6
AS
7403sed 's/^/| /' conftest.$ac_ext >&5
7404
ca81d7a0 7405 ac_cv_type_signal=void
503d2be0 7406fi
ca81d7a0
JD
7407
7408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7409fi
ca81d7a0
JD
7410{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7411echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7412
c0d27fcc 7413cat >>confdefs.h <<_ACEOF
98418dba 7414#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7415_ACEOF
7416
503d2be0 7417
c0d27fcc 7418
ca81d7a0
JD
7419{ echo "$as_me:$LINENO: checking for speed_t" >&5
7420echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7421if test "${emacs_cv_speed_t+set}" = set; then
7422 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7423else
98418dba 7424 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7425/* confdefs.h. */
7426_ACEOF
7427cat confdefs.h >>conftest.$ac_ext
7428cat >>conftest.$ac_ext <<_ACEOF
7429/* end confdefs.h. */
98418dba 7430#include <termios.h>
98418dba
CW
7431int
7432main ()
7433{
7434speed_t x = 1;
7435 ;
7436 return 0;
7437}
7438_ACEOF
7439rm -f conftest.$ac_objext
ca81d7a0
JD
7440if { (ac_try="$ac_compile"
7441case "(($ac_try" in
7442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7443 *) ac_try_echo=$ac_try;;
7444esac
7445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7446 (eval "$ac_compile") 2>conftest.er1
98418dba 7447 ac_status=$?
edfaf76d
LK
7448 grep -v '^ *+' conftest.er1 >conftest.err
7449 rm -f conftest.er1
7450 cat conftest.err >&5
c0d27fcc 7451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7452 (exit $ac_status); } && {
7453 test -z "$ac_c_werror_flag" ||
7454 test ! -s conftest.err
7455 } && test -s conftest.$ac_objext; then
98418dba
CW
7456 emacs_cv_speed_t=yes
7457else
7458 echo "$as_me: failed program was:" >&5
19650fd6
AS
7459sed 's/^/| /' conftest.$ac_ext >&5
7460
ca81d7a0 7461 emacs_cv_speed_t=no
98418dba 7462fi
ca81d7a0
JD
7463
7464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7465fi
ca81d7a0
JD
7466{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7467echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7468if test $emacs_cv_speed_t = yes; then
b936fae4 7469
c0d27fcc 7470cat >>confdefs.h <<\_ACEOF
98418dba 7471#define HAVE_SPEED_T 1
c0d27fcc 7472_ACEOF
98418dba 7473
7397acc4
DL
7474fi
7475
ca81d7a0
JD
7476{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7477echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7478if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7479 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7480else
503d2be0 7481 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7482/* confdefs.h. */
7483_ACEOF
7484cat confdefs.h >>conftest.$ac_ext
7485cat >>conftest.$ac_ext <<_ACEOF
7486/* end confdefs.h. */
98418dba
CW
7487#ifdef TIME_WITH_SYS_TIME
7488#include <sys/time.h>
7489#include <time.h>
7490#else
7491#ifdef HAVE_SYS_TIME_H
7492#include <sys/time.h>
7493#else
7494#include <time.h>
7495#endif
7496#endif
503d2be0
AS
7497int
7498main ()
7499{
98418dba 7500static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7501 ;
7502 return 0;
7503}
7504_ACEOF
7505rm -f conftest.$ac_objext
ca81d7a0
JD
7506if { (ac_try="$ac_compile"
7507case "(($ac_try" in
7508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7509 *) ac_try_echo=$ac_try;;
7510esac
7511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7512 (eval "$ac_compile") 2>conftest.er1
503d2be0 7513 ac_status=$?
edfaf76d
LK
7514 grep -v '^ *+' conftest.er1 >conftest.err
7515 rm -f conftest.er1
7516 cat conftest.err >&5
c0d27fcc 7517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7518 (exit $ac_status); } && {
7519 test -z "$ac_c_werror_flag" ||
7520 test ! -s conftest.err
7521 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7522 emacs_cv_struct_timeval=yes
7523else
503d2be0 7524 echo "$as_me: failed program was:" >&5
19650fd6
AS
7525sed 's/^/| /' conftest.$ac_ext >&5
7526
ca81d7a0 7527 emacs_cv_struct_timeval=no
7397acc4 7528fi
ca81d7a0
JD
7529
7530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7531fi
ca81d7a0
JD
7532{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7533echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7534HAVE_TIMEVAL=$emacs_cv_struct_timeval
7535if test $emacs_cv_struct_timeval = yes; then
b936fae4 7536
c0d27fcc 7537cat >>confdefs.h <<\_ACEOF
98418dba 7538#define HAVE_TIMEVAL 1
c0d27fcc 7539_ACEOF
7397acc4
DL
7540
7541fi
7542
ca81d7a0
JD
7543{ echo "$as_me:$LINENO: checking for struct exception" >&5
7544echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7545if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7546 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7547else
503d2be0 7548 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7549/* confdefs.h. */
7550_ACEOF
7551cat confdefs.h >>conftest.$ac_ext
7552cat >>conftest.$ac_ext <<_ACEOF
7553/* end confdefs.h. */
98418dba 7554#include <math.h>
503d2be0
AS
7555int
7556main ()
7557{
98418dba 7558static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7559 ;
7560 return 0;
ba4481b5 7561}
503d2be0
AS
7562_ACEOF
7563rm -f conftest.$ac_objext
ca81d7a0
JD
7564if { (ac_try="$ac_compile"
7565case "(($ac_try" in
7566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7567 *) ac_try_echo=$ac_try;;
7568esac
7569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7570 (eval "$ac_compile") 2>conftest.er1
503d2be0 7571 ac_status=$?
edfaf76d
LK
7572 grep -v '^ *+' conftest.er1 >conftest.err
7573 rm -f conftest.er1
7574 cat conftest.err >&5
c0d27fcc 7575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7576 (exit $ac_status); } && {
7577 test -z "$ac_c_werror_flag" ||
7578 test ! -s conftest.err
7579 } && test -s conftest.$ac_objext; then
98418dba 7580 emacs_cv_struct_exception=yes
ba4481b5 7581else
503d2be0 7582 echo "$as_me: failed program was:" >&5
19650fd6
AS
7583sed 's/^/| /' conftest.$ac_ext >&5
7584
ca81d7a0 7585 emacs_cv_struct_exception=no
ba4481b5 7586fi
ca81d7a0
JD
7587
7588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7589fi
ca81d7a0
JD
7590{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7591echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7592HAVE_EXCEPTION=$emacs_cv_struct_exception
7593if test $emacs_cv_struct_exception != yes; then
b936fae4 7594
c0d27fcc 7595cat >>confdefs.h <<\_ACEOF
98418dba 7596#define NO_MATHERR 1
c0d27fcc 7597_ACEOF
ba4481b5
DL
7598
7599fi
7600
7862d3a8
AS
7601
7602for ac_header in sys/socket.h
7603do
7604as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7605if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7606 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7607echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7608if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7609 echo $ECHO_N "(cached) $ECHO_C" >&6
7610fi
ca81d7a0
JD
7611ac_res=`eval echo '${'$as_ac_Header'}'`
7612 { echo "$as_me:$LINENO: result: $ac_res" >&5
7613echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7614else
7615 # Is the header compilable?
ca81d7a0
JD
7616{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7617echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7618cat >conftest.$ac_ext <<_ACEOF
7619/* confdefs.h. */
7620_ACEOF
7621cat confdefs.h >>conftest.$ac_ext
7622cat >>conftest.$ac_ext <<_ACEOF
7623/* end confdefs.h. */
7624$ac_includes_default
7625#include <$ac_header>
7626_ACEOF
7627rm -f conftest.$ac_objext
ca81d7a0
JD
7628if { (ac_try="$ac_compile"
7629case "(($ac_try" in
7630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7631 *) ac_try_echo=$ac_try;;
7632esac
7633eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7634 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7635 ac_status=$?
edfaf76d
LK
7636 grep -v '^ *+' conftest.er1 >conftest.err
7637 rm -f conftest.er1
7638 cat conftest.err >&5
7862d3a8 7639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7640 (exit $ac_status); } && {
7641 test -z "$ac_c_werror_flag" ||
7642 test ! -s conftest.err
7643 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7644 ac_header_compiler=yes
7645else
7646 echo "$as_me: failed program was:" >&5
7647sed 's/^/| /' conftest.$ac_ext >&5
7648
ca81d7a0 7649 ac_header_compiler=no
7862d3a8 7650fi
ca81d7a0
JD
7651
7652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7653{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7654echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7655
7656# Is the header present?
ca81d7a0
JD
7657{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7658echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7659cat >conftest.$ac_ext <<_ACEOF
7660/* confdefs.h. */
7661_ACEOF
7662cat confdefs.h >>conftest.$ac_ext
7663cat >>conftest.$ac_ext <<_ACEOF
7664/* end confdefs.h. */
7665#include <$ac_header>
7666_ACEOF
ca81d7a0
JD
7667if { (ac_try="$ac_cpp conftest.$ac_ext"
7668case "(($ac_try" in
7669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7670 *) ac_try_echo=$ac_try;;
7671esac
7672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7673 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7674 ac_status=$?
7675 grep -v '^ *+' conftest.er1 >conftest.err
7676 rm -f conftest.er1
7677 cat conftest.err >&5
7678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7679 (exit $ac_status); } >/dev/null && {
7680 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7681 test ! -s conftest.err
7682 }; then
7862d3a8
AS
7683 ac_header_preproc=yes
7684else
7685 echo "$as_me: failed program was:" >&5
7686sed 's/^/| /' conftest.$ac_ext >&5
7687
7688 ac_header_preproc=no
7689fi
ca81d7a0 7690
7862d3a8 7691rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
7692{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7693echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7694
7695# So? What about this header?
edfaf76d
LK
7696case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7697 yes:no: )
7862d3a8
AS
7698 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7699echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7700 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7701echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7702 ac_header_preproc=yes
7862d3a8 7703 ;;
edfaf76d 7704 no:yes:* )
7862d3a8
AS
7705 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7706echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7707 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7708echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7709 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7710echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7711 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7712echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7713 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7714echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7715 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7716echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7717
7862d3a8
AS
7718 ;;
7719esac
ca81d7a0
JD
7720{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7721echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7722if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7723 echo $ECHO_N "(cached) $ECHO_C" >&6
7724else
edfaf76d 7725 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7726fi
ca81d7a0
JD
7727ac_res=`eval echo '${'$as_ac_Header'}'`
7728 { echo "$as_me:$LINENO: result: $ac_res" >&5
7729echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7730
7731fi
7732if test `eval echo '${'$as_ac_Header'}'` = yes; then
7733 cat >>confdefs.h <<_ACEOF
7734#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7735_ACEOF
7736
7737fi
7738
7739done
7740
7741
7742for ac_header in net/if.h
7743do
7744as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7745{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7746echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7747if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7748 echo $ECHO_N "(cached) $ECHO_C" >&6
7749else
7750 cat >conftest.$ac_ext <<_ACEOF
7751/* confdefs.h. */
7752_ACEOF
7753cat confdefs.h >>conftest.$ac_ext
7754cat >>conftest.$ac_ext <<_ACEOF
7755/* end confdefs.h. */
7756$ac_includes_default
7757#if HAVE_SYS_SOCKET_H
7758#include <sys/socket.h>
7759#endif
7760
7761#include <$ac_header>
7762_ACEOF
7763rm -f conftest.$ac_objext
ca81d7a0
JD
7764if { (ac_try="$ac_compile"
7765case "(($ac_try" in
7766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7767 *) ac_try_echo=$ac_try;;
7768esac
7769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7770 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7771 ac_status=$?
edfaf76d
LK
7772 grep -v '^ *+' conftest.er1 >conftest.err
7773 rm -f conftest.er1
7774 cat conftest.err >&5
7862d3a8 7775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7776 (exit $ac_status); } && {
7777 test -z "$ac_c_werror_flag" ||
7778 test ! -s conftest.err
7779 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7780 eval "$as_ac_Header=yes"
7781else
7782 echo "$as_me: failed program was:" >&5
7783sed 's/^/| /' conftest.$ac_ext >&5
7784
ca81d7a0 7785 eval "$as_ac_Header=no"
7862d3a8 7786fi
ca81d7a0
JD
7787
7788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7789fi
ca81d7a0
JD
7790ac_res=`eval echo '${'$as_ac_Header'}'`
7791 { echo "$as_me:$LINENO: result: $ac_res" >&5
7792echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7793if test `eval echo '${'$as_ac_Header'}'` = yes; then
7794 cat >>confdefs.h <<_ACEOF
7795#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7796_ACEOF
7797
7798fi
7799
7800done
7801
7802
ca81d7a0
JD
7803{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7804echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7805if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7806 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7807else
503d2be0 7808 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7809/* confdefs.h. */
7810_ACEOF
7811cat confdefs.h >>conftest.$ac_ext
7812cat >>conftest.$ac_ext <<_ACEOF
7813/* end confdefs.h. */
98418dba
CW
7814#include <sys/types.h>
7815#include <time.h>
7397acc4 7816
503d2be0
AS
7817int
7818main ()
7819{
f053c89f
CY
7820struct tm tm;
7821 int *p = &tm.tm_sec;
7822 return !p;
503d2be0
AS
7823 ;
7824 return 0;
7825}
7826_ACEOF
7827rm -f conftest.$ac_objext
ca81d7a0
JD
7828if { (ac_try="$ac_compile"
7829case "(($ac_try" in
7830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7831 *) ac_try_echo=$ac_try;;
7832esac
7833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7834 (eval "$ac_compile") 2>conftest.er1
503d2be0 7835 ac_status=$?
edfaf76d
LK
7836 grep -v '^ *+' conftest.er1 >conftest.err
7837 rm -f conftest.er1
7838 cat conftest.err >&5
c0d27fcc 7839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7840 (exit $ac_status); } && {
7841 test -z "$ac_c_werror_flag" ||
7842 test ! -s conftest.err
7843 } && test -s conftest.$ac_objext; then
35996d22
AS
7844 ac_cv_struct_tm=time.h
7845else
503d2be0 7846 echo "$as_me: failed program was:" >&5
19650fd6
AS
7847sed 's/^/| /' conftest.$ac_ext >&5
7848
ca81d7a0 7849 ac_cv_struct_tm=sys/time.h
7397acc4 7850fi
ca81d7a0
JD
7851
7852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7853fi
ca81d7a0
JD
7854{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7855echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7856if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7857
c0d27fcc 7858cat >>confdefs.h <<\_ACEOF
98418dba 7859#define TM_IN_SYS_TIME 1
c0d27fcc 7860_ACEOF
7397acc4
DL
7861
7862fi
ba4481b5 7863
ca81d7a0
JD
7864{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7865echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7866if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7867 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7868else
98418dba 7869 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7870/* confdefs.h. */
7871_ACEOF
7872cat confdefs.h >>conftest.$ac_ext
7873cat >>conftest.$ac_ext <<_ACEOF
7874/* end confdefs.h. */
98418dba
CW
7875#include <sys/types.h>
7876#include <$ac_cv_struct_tm>
ba4481b5 7877
c0d27fcc 7878
98418dba
CW
7879int
7880main ()
7881{
7882static struct tm ac_aggr;
7883if (ac_aggr.tm_zone)
7884return 0;
7885 ;
7886 return 0;
7887}
7888_ACEOF
7889rm -f conftest.$ac_objext
ca81d7a0
JD
7890if { (ac_try="$ac_compile"
7891case "(($ac_try" in
7892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7893 *) ac_try_echo=$ac_try;;
7894esac
7895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7896 (eval "$ac_compile") 2>conftest.er1
98418dba 7897 ac_status=$?
edfaf76d
LK
7898 grep -v '^ *+' conftest.er1 >conftest.err
7899 rm -f conftest.er1
7900 cat conftest.err >&5
c0d27fcc 7901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7902 (exit $ac_status); } && {
7903 test -z "$ac_c_werror_flag" ||
7904 test ! -s conftest.err
7905 } && test -s conftest.$ac_objext; then
98418dba 7906 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7907else
98418dba 7908 echo "$as_me: failed program was:" >&5
19650fd6
AS
7909sed 's/^/| /' conftest.$ac_ext >&5
7910
ca81d7a0 7911 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7912/* confdefs.h. */
7913_ACEOF
7914cat confdefs.h >>conftest.$ac_ext
7915cat >>conftest.$ac_ext <<_ACEOF
7916/* end confdefs.h. */
6bae0ccf
DL
7917#include <sys/types.h>
7918#include <$ac_cv_struct_tm>
7919
7920
7921int
7922main ()
7923{
7924static struct tm ac_aggr;
7925if (sizeof ac_aggr.tm_zone)
7926return 0;
7927 ;
7928 return 0;
7929}
7930_ACEOF
7931rm -f conftest.$ac_objext
ca81d7a0
JD
7932if { (ac_try="$ac_compile"
7933case "(($ac_try" in
7934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7935 *) ac_try_echo=$ac_try;;
7936esac
7937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7938 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7939 ac_status=$?
edfaf76d
LK
7940 grep -v '^ *+' conftest.er1 >conftest.err
7941 rm -f conftest.er1
7942 cat conftest.err >&5
6bae0ccf 7943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7944 (exit $ac_status); } && {
7945 test -z "$ac_c_werror_flag" ||
7946 test ! -s conftest.err
7947 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7948 ac_cv_member_struct_tm_tm_zone=yes
7949else
7950 echo "$as_me: failed program was:" >&5
19650fd6
AS
7951sed 's/^/| /' conftest.$ac_ext >&5
7952
ca81d7a0 7953 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7954fi
ca81d7a0
JD
7955
7956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7957fi
ca81d7a0
JD
7958
7959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7960fi
ca81d7a0
JD
7961{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7962echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 7963if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7964
c0d27fcc 7965cat >>confdefs.h <<_ACEOF
98418dba 7966#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7967_ACEOF
7968
ba4481b5 7969
98418dba 7970fi
ba4481b5 7971
98418dba 7972if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7973
c0d27fcc 7974cat >>confdefs.h <<\_ACEOF
98418dba 7975#define HAVE_TM_ZONE 1
c0d27fcc 7976_ACEOF
ba4481b5 7977
ba4481b5 7978else
ca81d7a0
JD
7979 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7980echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
7981if test "${ac_cv_have_decl_tzname+set}" = set; then
503d2be0 7982 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7983else
98418dba 7984 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7985/* confdefs.h. */
7986_ACEOF
7987cat confdefs.h >>conftest.$ac_ext
7988cat >>conftest.$ac_ext <<_ACEOF
7989/* end confdefs.h. */
98418dba 7990#include <time.h>
98418dba 7991
98418dba
CW
7992int
7993main ()
7994{
ca81d7a0 7995#ifndef tzname
f053c89f 7996 (void) tzname;
ca81d7a0
JD
7997#endif
7998
98418dba
CW
7999 ;
8000 return 0;
8001}
8002_ACEOF
ca81d7a0
JD
8003rm -f conftest.$ac_objext
8004if { (ac_try="$ac_compile"
8005case "(($ac_try" in
8006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8007 *) ac_try_echo=$ac_try;;
8008esac
8009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8010 (eval "$ac_compile") 2>conftest.er1
98418dba 8011 ac_status=$?
edfaf76d
LK
8012 grep -v '^ *+' conftest.er1 >conftest.err
8013 rm -f conftest.er1
8014 cat conftest.err >&5
c0d27fcc 8015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8016 (exit $ac_status); } && {
8017 test -z "$ac_c_werror_flag" ||
8018 test ! -s conftest.err
8019 } && test -s conftest.$ac_objext; then
ca81d7a0 8020 ac_cv_have_decl_tzname=yes
98418dba
CW
8021else
8022 echo "$as_me: failed program was:" >&5
19650fd6
AS
8023sed 's/^/| /' conftest.$ac_ext >&5
8024
ca81d7a0 8025 ac_cv_have_decl_tzname=no
ba4481b5 8026fi
ca81d7a0
JD
8027
8028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8029fi
ca81d7a0
JD
8030{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
8031echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
8032if test $ac_cv_have_decl_tzname = yes; then
ba4481b5 8033
ca81d7a0
JD
8034cat >>confdefs.h <<_ACEOF
8035#define HAVE_DECL_TZNAME 1
c0d27fcc 8036_ACEOF
503d2be0 8037
ca81d7a0
JD
8038
8039else
8040 cat >>confdefs.h <<_ACEOF
8041#define HAVE_DECL_TZNAME 0
8042_ACEOF
8043
8044
98418dba 8045fi
503d2be0 8046
ca81d7a0
JD
8047
8048 { echo "$as_me:$LINENO: checking for tzname" >&5
8049echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
8050if test "${ac_cv_var_tzname+set}" = set; then
98418dba
CW
8051 echo $ECHO_N "(cached) $ECHO_C" >&6
8052else
8053 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8054/* confdefs.h. */
8055_ACEOF
8056cat confdefs.h >>conftest.$ac_ext
8057cat >>conftest.$ac_ext <<_ACEOF
8058/* end confdefs.h. */
98418dba 8059#include <time.h>
ca81d7a0
JD
8060#if !HAVE_DECL_TZNAME
8061extern char *tzname[];
8062#endif
b936fae4 8063
98418dba
CW
8064int
8065main ()
8066{
ca81d7a0 8067return tzname[0][0];
98418dba
CW
8068 ;
8069 return 0;
8070}
8071_ACEOF
ca81d7a0
JD
8072rm -f conftest.$ac_objext conftest$ac_exeext
8073if { (ac_try="$ac_link"
8074case "(($ac_try" in
8075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8076 *) ac_try_echo=$ac_try;;
8077esac
8078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8079 (eval "$ac_link") 2>conftest.er1
98418dba 8080 ac_status=$?
edfaf76d
LK
8081 grep -v '^ *+' conftest.er1 >conftest.err
8082 rm -f conftest.er1
8083 cat conftest.err >&5
c0d27fcc 8084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8085 (exit $ac_status); } && {
8086 test -z "$ac_c_werror_flag" ||
8087 test ! -s conftest.err
8088 } && test -s conftest$ac_exeext &&
8089 $as_test_x conftest$ac_exeext; then
ca81d7a0 8090 ac_cv_var_tzname=yes
98418dba
CW
8091else
8092 echo "$as_me: failed program was:" >&5
19650fd6
AS
8093sed 's/^/| /' conftest.$ac_ext >&5
8094
ca81d7a0
JD
8095 ac_cv_var_tzname=no
8096fi
6bae0ccf 8097
f053c89f 8098rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
ca81d7a0
JD
8099 conftest$ac_exeext conftest.$ac_ext
8100fi
8101{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
8102echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
8103 if test $ac_cv_var_tzname = yes; then
8104
8105cat >>confdefs.h <<\_ACEOF
8106#define HAVE_TZNAME 1
8107_ACEOF
8108
8109 fi
8110fi
8111
8112{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
8113echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
8114if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
8115 echo $ECHO_N "(cached) $ECHO_C" >&6
8116else
8117 cat >conftest.$ac_ext <<_ACEOF
8118/* confdefs.h. */
8119_ACEOF
8120cat confdefs.h >>conftest.$ac_ext
8121cat >>conftest.$ac_ext <<_ACEOF
8122/* end confdefs.h. */
8123#include <time.h>
8124
8125int
8126main ()
8127{
8128static struct tm ac_aggr;
8129if (ac_aggr.tm_gmtoff)
8130return 0;
8131 ;
8132 return 0;
8133}
8134_ACEOF
8135rm -f conftest.$ac_objext
8136if { (ac_try="$ac_compile"
8137case "(($ac_try" in
8138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8139 *) ac_try_echo=$ac_try;;
8140esac
8141eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8142 (eval "$ac_compile") 2>conftest.er1
8143 ac_status=$?
8144 grep -v '^ *+' conftest.er1 >conftest.err
8145 rm -f conftest.er1
8146 cat conftest.err >&5
8147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8148 (exit $ac_status); } && {
8149 test -z "$ac_c_werror_flag" ||
8150 test ! -s conftest.err
8151 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
8152 ac_cv_member_struct_tm_tm_gmtoff=yes
8153else
8154 echo "$as_me: failed program was:" >&5
8155sed 's/^/| /' conftest.$ac_ext >&5
8156
8157 cat >conftest.$ac_ext <<_ACEOF
8158/* confdefs.h. */
8159_ACEOF
8160cat confdefs.h >>conftest.$ac_ext
8161cat >>conftest.$ac_ext <<_ACEOF
8162/* end confdefs.h. */
8163#include <time.h>
8164
8165int
8166main ()
8167{
8168static struct tm ac_aggr;
8169if (sizeof ac_aggr.tm_gmtoff)
6bae0ccf 8170return 0;
8799b3e4
CW
8171 ;
8172 return 0;
8173}
8174_ACEOF
6bae0ccf 8175rm -f conftest.$ac_objext
ca81d7a0
JD
8176if { (ac_try="$ac_compile"
8177case "(($ac_try" in
8178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8179 *) ac_try_echo=$ac_try;;
8180esac
8181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8182 (eval "$ac_compile") 2>conftest.er1
8799b3e4 8183 ac_status=$?
edfaf76d
LK
8184 grep -v '^ *+' conftest.er1 >conftest.err
8185 rm -f conftest.er1
8186 cat conftest.err >&5
c0d27fcc 8187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8188 (exit $ac_status); } && {
8189 test -z "$ac_c_werror_flag" ||
8190 test ! -s conftest.err
8191 } && test -s conftest.$ac_objext; then
6bae0ccf 8192 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
8193else
8194 echo "$as_me: failed program was:" >&5
19650fd6
AS
8195sed 's/^/| /' conftest.$ac_ext >&5
8196
ca81d7a0 8197 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 8198fi
ca81d7a0
JD
8199
8200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8201fi
ca81d7a0
JD
8202
8203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 8204fi
ca81d7a0
JD
8205{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
8206echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
8207if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
8208
8209cat >>confdefs.h <<\_ACEOF
8210#define HAVE_TM_GMTOFF 1
8211_ACEOF
8212
8213fi
8214
ca81d7a0
JD
8215{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
8216echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
8217if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
8218 echo $ECHO_N "(cached) $ECHO_C" >&6
8219else
8220 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8221/* confdefs.h. */
8222_ACEOF
8223cat confdefs.h >>conftest.$ac_ext
8224cat >>conftest.$ac_ext <<_ACEOF
8225/* end confdefs.h. */
7862d3a8
AS
8226$ac_includes_default
8227#if HAVE_SYS_SOCKET_H
8228#include <sys/socket.h>
8229#endif
8230#if HAVE_NET_IF_H
96f3a036 8231#include <net/if.h>
7862d3a8 8232#endif
96f3a036
DL
8233
8234int
8235main ()
8236{
8237static struct ifreq ac_aggr;
8238if (ac_aggr.ifr_flags)
8239return 0;
8240 ;
8241 return 0;
8242}
8243_ACEOF
8244rm -f conftest.$ac_objext
ca81d7a0
JD
8245if { (ac_try="$ac_compile"
8246case "(($ac_try" in
8247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8248 *) ac_try_echo=$ac_try;;
8249esac
8250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8251 (eval "$ac_compile") 2>conftest.er1
96f3a036 8252 ac_status=$?
edfaf76d
LK
8253 grep -v '^ *+' conftest.er1 >conftest.err
8254 rm -f conftest.er1
8255 cat conftest.err >&5
96f3a036 8256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8257 (exit $ac_status); } && {
8258 test -z "$ac_c_werror_flag" ||
8259 test ! -s conftest.err
8260 } && test -s conftest.$ac_objext; then
96f3a036
DL
8261 ac_cv_member_struct_ifreq_ifr_flags=yes
8262else
8263 echo "$as_me: failed program was:" >&5
8264sed 's/^/| /' conftest.$ac_ext >&5
8265
ca81d7a0 8266 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8267/* confdefs.h. */
8268_ACEOF
8269cat confdefs.h >>conftest.$ac_ext
8270cat >>conftest.$ac_ext <<_ACEOF
8271/* end confdefs.h. */
7862d3a8
AS
8272$ac_includes_default
8273#if HAVE_SYS_SOCKET_H
8274#include <sys/socket.h>
8275#endif
8276#if HAVE_NET_IF_H
96f3a036 8277#include <net/if.h>
7862d3a8 8278#endif
96f3a036
DL
8279
8280int
8281main ()
8282{
8283static struct ifreq ac_aggr;
8284if (sizeof ac_aggr.ifr_flags)
8285return 0;
8286 ;
8287 return 0;
8288}
8289_ACEOF
8290rm -f conftest.$ac_objext
ca81d7a0
JD
8291if { (ac_try="$ac_compile"
8292case "(($ac_try" in
8293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8294 *) ac_try_echo=$ac_try;;
8295esac
8296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8297 (eval "$ac_compile") 2>conftest.er1
96f3a036 8298 ac_status=$?
edfaf76d
LK
8299 grep -v '^ *+' conftest.er1 >conftest.err
8300 rm -f conftest.er1
8301 cat conftest.err >&5
96f3a036 8302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8303 (exit $ac_status); } && {
8304 test -z "$ac_c_werror_flag" ||
8305 test ! -s conftest.err
8306 } && test -s conftest.$ac_objext; then
96f3a036
DL
8307 ac_cv_member_struct_ifreq_ifr_flags=yes
8308else
8309 echo "$as_me: failed program was:" >&5
8310sed 's/^/| /' conftest.$ac_ext >&5
8311
ca81d7a0 8312 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8313fi
ca81d7a0
JD
8314
8315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8316fi
ca81d7a0
JD
8317
8318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8319fi
ca81d7a0
JD
8320{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8321echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8322if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8323
8324cat >>confdefs.h <<_ACEOF
8325#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8326_ACEOF
8327
8328
8329fi
ca81d7a0
JD
8330{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8331echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8332if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8333 echo $ECHO_N "(cached) $ECHO_C" >&6
8334else
8335 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8336/* confdefs.h. */
8337_ACEOF
8338cat confdefs.h >>conftest.$ac_ext
8339cat >>conftest.$ac_ext <<_ACEOF
8340/* end confdefs.h. */
7862d3a8
AS
8341$ac_includes_default
8342#if HAVE_SYS_SOCKET_H
8343#include <sys/socket.h>
8344#endif
8345#if HAVE_NET_IF_H
96f3a036 8346#include <net/if.h>
7862d3a8 8347#endif
96f3a036
DL
8348
8349int
8350main ()
8351{
8352static struct ifreq ac_aggr;
8353if (ac_aggr.ifr_hwaddr)
8354return 0;
8355 ;
8356 return 0;
8357}
8358_ACEOF
8359rm -f conftest.$ac_objext
ca81d7a0
JD
8360if { (ac_try="$ac_compile"
8361case "(($ac_try" in
8362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8363 *) ac_try_echo=$ac_try;;
8364esac
8365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8366 (eval "$ac_compile") 2>conftest.er1
96f3a036 8367 ac_status=$?
edfaf76d
LK
8368 grep -v '^ *+' conftest.er1 >conftest.err
8369 rm -f conftest.er1
8370 cat conftest.err >&5
96f3a036 8371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8372 (exit $ac_status); } && {
8373 test -z "$ac_c_werror_flag" ||
8374 test ! -s conftest.err
8375 } && test -s conftest.$ac_objext; then
96f3a036
DL
8376 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8377else
8378 echo "$as_me: failed program was:" >&5
8379sed 's/^/| /' conftest.$ac_ext >&5
8380
ca81d7a0 8381 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8382/* confdefs.h. */
8383_ACEOF
8384cat confdefs.h >>conftest.$ac_ext
8385cat >>conftest.$ac_ext <<_ACEOF
8386/* end confdefs.h. */
7862d3a8
AS
8387$ac_includes_default
8388#if HAVE_SYS_SOCKET_H
8389#include <sys/socket.h>
8390#endif
8391#if HAVE_NET_IF_H
96f3a036 8392#include <net/if.h>
7862d3a8 8393#endif
96f3a036
DL
8394
8395int
8396main ()
8397{
8398static struct ifreq ac_aggr;
8399if (sizeof ac_aggr.ifr_hwaddr)
8400return 0;
8401 ;
8402 return 0;
8403}
8404_ACEOF
8405rm -f conftest.$ac_objext
ca81d7a0
JD
8406if { (ac_try="$ac_compile"
8407case "(($ac_try" in
8408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8409 *) ac_try_echo=$ac_try;;
8410esac
8411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8412 (eval "$ac_compile") 2>conftest.er1
96f3a036 8413 ac_status=$?
edfaf76d
LK
8414 grep -v '^ *+' conftest.er1 >conftest.err
8415 rm -f conftest.er1
8416 cat conftest.err >&5
96f3a036 8417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8418 (exit $ac_status); } && {
8419 test -z "$ac_c_werror_flag" ||
8420 test ! -s conftest.err
8421 } && test -s conftest.$ac_objext; then
96f3a036
DL
8422 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8423else
8424 echo "$as_me: failed program was:" >&5
8425sed 's/^/| /' conftest.$ac_ext >&5
8426
ca81d7a0 8427 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8428fi
ca81d7a0
JD
8429
8430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8431fi
ca81d7a0
JD
8432
8433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8434fi
ca81d7a0
JD
8435{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8436echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8437if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8438
8439cat >>confdefs.h <<_ACEOF
8440#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8441_ACEOF
8442
8443
8444fi
ca81d7a0
JD
8445{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8446echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8447if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8448 echo $ECHO_N "(cached) $ECHO_C" >&6
8449else
8450 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8451/* confdefs.h. */
8452_ACEOF
8453cat confdefs.h >>conftest.$ac_ext
8454cat >>conftest.$ac_ext <<_ACEOF
8455/* end confdefs.h. */
7862d3a8
AS
8456$ac_includes_default
8457#if HAVE_SYS_SOCKET_H
8458#include <sys/socket.h>
8459#endif
8460#if HAVE_NET_IF_H
96f3a036 8461#include <net/if.h>
7862d3a8 8462#endif
96f3a036
DL
8463
8464int
8465main ()
8466{
8467static struct ifreq ac_aggr;
8468if (ac_aggr.ifr_netmask)
8469return 0;
8470 ;
8471 return 0;
8472}
8473_ACEOF
8474rm -f conftest.$ac_objext
ca81d7a0
JD
8475if { (ac_try="$ac_compile"
8476case "(($ac_try" in
8477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8478 *) ac_try_echo=$ac_try;;
8479esac
8480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8481 (eval "$ac_compile") 2>conftest.er1
96f3a036 8482 ac_status=$?
edfaf76d
LK
8483 grep -v '^ *+' conftest.er1 >conftest.err
8484 rm -f conftest.er1
8485 cat conftest.err >&5
96f3a036 8486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8487 (exit $ac_status); } && {
8488 test -z "$ac_c_werror_flag" ||
8489 test ! -s conftest.err
8490 } && test -s conftest.$ac_objext; then
96f3a036
DL
8491 ac_cv_member_struct_ifreq_ifr_netmask=yes
8492else
8493 echo "$as_me: failed program was:" >&5
8494sed 's/^/| /' conftest.$ac_ext >&5
8495
ca81d7a0 8496 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8497/* confdefs.h. */
8498_ACEOF
8499cat confdefs.h >>conftest.$ac_ext
8500cat >>conftest.$ac_ext <<_ACEOF
8501/* end confdefs.h. */
7862d3a8
AS
8502$ac_includes_default
8503#if HAVE_SYS_SOCKET_H
8504#include <sys/socket.h>
8505#endif
8506#if HAVE_NET_IF_H
96f3a036 8507#include <net/if.h>
7862d3a8 8508#endif
96f3a036
DL
8509
8510int
8511main ()
8512{
8513static struct ifreq ac_aggr;
8514if (sizeof ac_aggr.ifr_netmask)
8515return 0;
8516 ;
8517 return 0;
8518}
8519_ACEOF
8520rm -f conftest.$ac_objext
ca81d7a0
JD
8521if { (ac_try="$ac_compile"
8522case "(($ac_try" in
8523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8524 *) ac_try_echo=$ac_try;;
8525esac
8526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8527 (eval "$ac_compile") 2>conftest.er1
96f3a036 8528 ac_status=$?
edfaf76d
LK
8529 grep -v '^ *+' conftest.er1 >conftest.err
8530 rm -f conftest.er1
8531 cat conftest.err >&5
96f3a036 8532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8533 (exit $ac_status); } && {
8534 test -z "$ac_c_werror_flag" ||
8535 test ! -s conftest.err
8536 } && test -s conftest.$ac_objext; then
96f3a036
DL
8537 ac_cv_member_struct_ifreq_ifr_netmask=yes
8538else
8539 echo "$as_me: failed program was:" >&5
8540sed 's/^/| /' conftest.$ac_ext >&5
8541
ca81d7a0 8542 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8543fi
ca81d7a0
JD
8544
8545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8546fi
ca81d7a0
JD
8547
8548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8549fi
ca81d7a0
JD
8550{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8551echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8552if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8553
8554cat >>confdefs.h <<_ACEOF
8555#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8556_ACEOF
8557
8558
8559fi
ca81d7a0
JD
8560{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8561echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8562if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8563 echo $ECHO_N "(cached) $ECHO_C" >&6
8564else
8565 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8566/* confdefs.h. */
8567_ACEOF
8568cat confdefs.h >>conftest.$ac_ext
8569cat >>conftest.$ac_ext <<_ACEOF
8570/* end confdefs.h. */
7862d3a8
AS
8571$ac_includes_default
8572#if HAVE_SYS_SOCKET_H
8573#include <sys/socket.h>
8574#endif
8575#if HAVE_NET_IF_H
96f3a036 8576#include <net/if.h>
7862d3a8 8577#endif
96f3a036
DL
8578
8579int
8580main ()
8581{
8582static struct ifreq ac_aggr;
8583if (ac_aggr.ifr_broadaddr)
8584return 0;
8585 ;
8586 return 0;
8587}
8588_ACEOF
8589rm -f conftest.$ac_objext
ca81d7a0
JD
8590if { (ac_try="$ac_compile"
8591case "(($ac_try" in
8592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8593 *) ac_try_echo=$ac_try;;
8594esac
8595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8596 (eval "$ac_compile") 2>conftest.er1
96f3a036 8597 ac_status=$?
edfaf76d
LK
8598 grep -v '^ *+' conftest.er1 >conftest.err
8599 rm -f conftest.er1
8600 cat conftest.err >&5
96f3a036 8601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8602 (exit $ac_status); } && {
8603 test -z "$ac_c_werror_flag" ||
8604 test ! -s conftest.err
8605 } && test -s conftest.$ac_objext; then
96f3a036
DL
8606 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8607else
8608 echo "$as_me: failed program was:" >&5
8609sed 's/^/| /' conftest.$ac_ext >&5
8610
ca81d7a0 8611 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8612/* confdefs.h. */
8613_ACEOF
8614cat confdefs.h >>conftest.$ac_ext
8615cat >>conftest.$ac_ext <<_ACEOF
8616/* end confdefs.h. */
7862d3a8
AS
8617$ac_includes_default
8618#if HAVE_SYS_SOCKET_H
8619#include <sys/socket.h>
8620#endif
8621#if HAVE_NET_IF_H
96f3a036 8622#include <net/if.h>
7862d3a8 8623#endif
96f3a036
DL
8624
8625int
8626main ()
8627{
8628static struct ifreq ac_aggr;
8629if (sizeof ac_aggr.ifr_broadaddr)
8630return 0;
8631 ;
8632 return 0;
8633}
8634_ACEOF
8635rm -f conftest.$ac_objext
ca81d7a0
JD
8636if { (ac_try="$ac_compile"
8637case "(($ac_try" in
8638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8639 *) ac_try_echo=$ac_try;;
8640esac
8641eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8642 (eval "$ac_compile") 2>conftest.er1
96f3a036 8643 ac_status=$?
edfaf76d
LK
8644 grep -v '^ *+' conftest.er1 >conftest.err
8645 rm -f conftest.er1
8646 cat conftest.err >&5
96f3a036 8647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8648 (exit $ac_status); } && {
8649 test -z "$ac_c_werror_flag" ||
8650 test ! -s conftest.err
8651 } && test -s conftest.$ac_objext; then
96f3a036
DL
8652 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8653else
8654 echo "$as_me: failed program was:" >&5
8655sed 's/^/| /' conftest.$ac_ext >&5
8656
ca81d7a0 8657 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8658fi
ca81d7a0
JD
8659
8660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8661fi
ca81d7a0
JD
8662
8663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8664fi
ca81d7a0
JD
8665{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8666echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8667if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8668
8669cat >>confdefs.h <<_ACEOF
8670#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8671_ACEOF
8672
8673
8674fi
ca81d7a0
JD
8675{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8676echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8677if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8678 echo $ECHO_N "(cached) $ECHO_C" >&6
8679else
8680 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8681/* confdefs.h. */
8682_ACEOF
8683cat confdefs.h >>conftest.$ac_ext
8684cat >>conftest.$ac_ext <<_ACEOF
8685/* end confdefs.h. */
7862d3a8
AS
8686$ac_includes_default
8687#if HAVE_SYS_SOCKET_H
8688#include <sys/socket.h>
8689#endif
8690#if HAVE_NET_IF_H
96f3a036 8691#include <net/if.h>
7862d3a8 8692#endif
96f3a036
DL
8693
8694int
8695main ()
8696{
8697static struct ifreq ac_aggr;
8698if (ac_aggr.ifr_addr)
8699return 0;
8700 ;
8701 return 0;
8702}
8703_ACEOF
8704rm -f conftest.$ac_objext
ca81d7a0
JD
8705if { (ac_try="$ac_compile"
8706case "(($ac_try" in
8707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8708 *) ac_try_echo=$ac_try;;
8709esac
8710eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8711 (eval "$ac_compile") 2>conftest.er1
96f3a036 8712 ac_status=$?
edfaf76d
LK
8713 grep -v '^ *+' conftest.er1 >conftest.err
8714 rm -f conftest.er1
8715 cat conftest.err >&5
96f3a036 8716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8717 (exit $ac_status); } && {
8718 test -z "$ac_c_werror_flag" ||
8719 test ! -s conftest.err
8720 } && test -s conftest.$ac_objext; then
96f3a036
DL
8721 ac_cv_member_struct_ifreq_ifr_addr=yes
8722else
8723 echo "$as_me: failed program was:" >&5
8724sed 's/^/| /' conftest.$ac_ext >&5
8725
ca81d7a0 8726 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8727/* confdefs.h. */
8728_ACEOF
8729cat confdefs.h >>conftest.$ac_ext
8730cat >>conftest.$ac_ext <<_ACEOF
8731/* end confdefs.h. */
7862d3a8
AS
8732$ac_includes_default
8733#if HAVE_SYS_SOCKET_H
8734#include <sys/socket.h>
8735#endif
8736#if HAVE_NET_IF_H
96f3a036 8737#include <net/if.h>
7862d3a8 8738#endif
96f3a036
DL
8739
8740int
8741main ()
8742{
8743static struct ifreq ac_aggr;
8744if (sizeof ac_aggr.ifr_addr)
8745return 0;
8746 ;
8747 return 0;
8748}
8749_ACEOF
8750rm -f conftest.$ac_objext
ca81d7a0
JD
8751if { (ac_try="$ac_compile"
8752case "(($ac_try" in
8753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8754 *) ac_try_echo=$ac_try;;
8755esac
8756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8757 (eval "$ac_compile") 2>conftest.er1
96f3a036 8758 ac_status=$?
edfaf76d
LK
8759 grep -v '^ *+' conftest.er1 >conftest.err
8760 rm -f conftest.er1
8761 cat conftest.err >&5
96f3a036 8762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8763 (exit $ac_status); } && {
8764 test -z "$ac_c_werror_flag" ||
8765 test ! -s conftest.err
8766 } && test -s conftest.$ac_objext; then
96f3a036
DL
8767 ac_cv_member_struct_ifreq_ifr_addr=yes
8768else
8769 echo "$as_me: failed program was:" >&5
8770sed 's/^/| /' conftest.$ac_ext >&5
8771
ca81d7a0 8772 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8773fi
ca81d7a0
JD
8774
8775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8776fi
ca81d7a0
JD
8777
8778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8779fi
ca81d7a0
JD
8780{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8781echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8782if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8783
8784cat >>confdefs.h <<_ACEOF
8785#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8786_ACEOF
8787
8788
8789fi
8790
8799b3e4 8791
8799b3e4 8792
ca81d7a0
JD
8793{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8794echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8795if test "$ac_cv_prog_cc_c89" != no; then
8796 { echo "$as_me:$LINENO: result: yes" >&5
8797echo "${ECHO_T}yes" >&6; }
98418dba 8798
c0d27fcc 8799cat >>confdefs.h <<\_ACEOF
98418dba 8800#define PROTOTYPES 1
c0d27fcc
MR
8801_ACEOF
8802
8803
8804cat >>confdefs.h <<\_ACEOF
8805#define __PROTOTYPES 1
8806_ACEOF
98418dba
CW
8807
8808else
ca81d7a0
JD
8809 { echo "$as_me:$LINENO: result: no" >&5
8810echo "${ECHO_T}no" >&6; }
98418dba
CW
8811fi
8812
ca81d7a0
JD
8813{ echo "$as_me:$LINENO: checking for working volatile" >&5
8814echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8815if test "${ac_cv_c_volatile+set}" = set; then
8816 echo $ECHO_N "(cached) $ECHO_C" >&6
8817else
8818 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8819/* confdefs.h. */
8820_ACEOF
8821cat confdefs.h >>conftest.$ac_ext
8822cat >>conftest.$ac_ext <<_ACEOF
8823/* end confdefs.h. */
98418dba 8824
98418dba
CW
8825int
8826main ()
8827{
8828
8829volatile int x;
ca81d7a0
JD
8830int * volatile y = (int *) 0;
8831return !x && !y;
98418dba
CW
8832 ;
8833 return 0;
8834}
8835_ACEOF
8836rm -f conftest.$ac_objext
ca81d7a0
JD
8837if { (ac_try="$ac_compile"
8838case "(($ac_try" in
8839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8840 *) ac_try_echo=$ac_try;;
8841esac
8842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8843 (eval "$ac_compile") 2>conftest.er1
98418dba 8844 ac_status=$?
edfaf76d
LK
8845 grep -v '^ *+' conftest.er1 >conftest.err
8846 rm -f conftest.er1
8847 cat conftest.err >&5
c0d27fcc 8848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8849 (exit $ac_status); } && {
8850 test -z "$ac_c_werror_flag" ||
8851 test ! -s conftest.err
8852 } && test -s conftest.$ac_objext; then
98418dba
CW
8853 ac_cv_c_volatile=yes
8854else
8855 echo "$as_me: failed program was:" >&5
19650fd6
AS
8856sed 's/^/| /' conftest.$ac_ext >&5
8857
ca81d7a0 8858 ac_cv_c_volatile=no
98418dba 8859fi
ca81d7a0
JD
8860
8861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8862fi
ca81d7a0
JD
8863{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8864echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8865if test $ac_cv_c_volatile = no; then
8866
c0d27fcc 8867cat >>confdefs.h <<\_ACEOF
98418dba 8868#define volatile
c0d27fcc 8869_ACEOF
98418dba
CW
8870
8871fi
8872
ca81d7a0
JD
8873{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8874echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8875if test "${ac_cv_c_const+set}" = set; then
8876 echo $ECHO_N "(cached) $ECHO_C" >&6
8877else
8878 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8879/* confdefs.h. */
8880_ACEOF
8881cat confdefs.h >>conftest.$ac_ext
8882cat >>conftest.$ac_ext <<_ACEOF
8883/* end confdefs.h. */
98418dba 8884
98418dba
CW
8885int
8886main ()
8887{
8888/* FIXME: Include the comments suggested by Paul. */
8889#ifndef __cplusplus
8890 /* Ultrix mips cc rejects this. */
8891 typedef int charset[2];
f053c89f 8892 const charset cs;
98418dba 8893 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
8894 char const *const *pcpcc;
8895 char **ppc;
98418dba
CW
8896 /* NEC SVR4.0.2 mips cc rejects this. */
8897 struct point {int x, y;};
8898 static struct point const zero = {0,0};
8899 /* AIX XL C 1.02.0.0 rejects this.
8900 It does not let you subtract one const X* pointer from another in
8901 an arm of an if-expression whose if-part is not a constant
8902 expression */
8903 const char *g = "string";
f053c89f 8904 pcpcc = &g + (g ? g-g : 0);
98418dba 8905 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
8906 ++pcpcc;
8907 ppc = (char**) pcpcc;
8908 pcpcc = (char const *const *) ppc;
98418dba
CW
8909 { /* SCO 3.2v4 cc rejects this. */
8910 char *t;
8911 char const *s = 0 ? (char *) 0 : (char const *) 0;
8912
8913 *t++ = 0;
ca81d7a0 8914 if (s) return 0;
98418dba
CW
8915 }
8916 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8917 int x[] = {25, 17};
8918 const int *foo = &x[0];
8919 ++foo;
8920 }
8921 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8922 typedef const int *iptr;
8923 iptr p = 0;
8924 ++p;
8925 }
8926 { /* AIX XL C 1.02.0.0 rejects this saying
8927 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8928 struct s { int j; const int *ap[3]; };
8929 struct s *b; b->j = 5;
8930 }
8931 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8932 const int foo = 10;
ca81d7a0 8933 if (!foo) return 0;
98418dba 8934 }
f053c89f 8935 return !cs[0] && !zero.x;
98418dba
CW
8936#endif
8937
8938 ;
8939 return 0;
8940}
8941_ACEOF
8942rm -f conftest.$ac_objext
ca81d7a0
JD
8943if { (ac_try="$ac_compile"
8944case "(($ac_try" in
8945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8946 *) ac_try_echo=$ac_try;;
8947esac
8948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8949 (eval "$ac_compile") 2>conftest.er1
98418dba 8950 ac_status=$?
edfaf76d
LK
8951 grep -v '^ *+' conftest.er1 >conftest.err
8952 rm -f conftest.er1
8953 cat conftest.err >&5
c0d27fcc 8954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8955 (exit $ac_status); } && {
8956 test -z "$ac_c_werror_flag" ||
8957 test ! -s conftest.err
8958 } && test -s conftest.$ac_objext; then
98418dba
CW
8959 ac_cv_c_const=yes
8960else
8961 echo "$as_me: failed program was:" >&5
19650fd6
AS
8962sed 's/^/| /' conftest.$ac_ext >&5
8963
ca81d7a0 8964 ac_cv_c_const=no
98418dba 8965fi
ca81d7a0
JD
8966
8967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8968fi
ca81d7a0
JD
8969{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8970echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8971if test $ac_cv_c_const = no; then
8972
c0d27fcc 8973cat >>confdefs.h <<\_ACEOF
98418dba 8974#define const
c0d27fcc 8975_ACEOF
98418dba
CW
8976
8977fi
8978
ca81d7a0
JD
8979{ echo "$as_me:$LINENO: checking for void * support" >&5
8980echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
8981if test "${emacs_cv_void_star+set}" = set; then
8982 echo $ECHO_N "(cached) $ECHO_C" >&6
8983else
8984 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8985/* confdefs.h. */
8986_ACEOF
8987cat confdefs.h >>conftest.$ac_ext
8988cat >>conftest.$ac_ext <<_ACEOF
8989/* end confdefs.h. */
98418dba 8990
98418dba
CW
8991int
8992main ()
8993{
8994void * foo;
8995 ;
8996 return 0;
8997}
8998_ACEOF
8999rm -f conftest.$ac_objext
ca81d7a0
JD
9000if { (ac_try="$ac_compile"
9001case "(($ac_try" in
9002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9003 *) ac_try_echo=$ac_try;;
9004esac
9005eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9006 (eval "$ac_compile") 2>conftest.er1
98418dba 9007 ac_status=$?
edfaf76d
LK
9008 grep -v '^ *+' conftest.er1 >conftest.err
9009 rm -f conftest.er1
9010 cat conftest.err >&5
c0d27fcc 9011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9012 (exit $ac_status); } && {
9013 test -z "$ac_c_werror_flag" ||
9014 test ! -s conftest.err
9015 } && test -s conftest.$ac_objext; then
98418dba
CW
9016 emacs_cv_void_star=yes
9017else
9018 echo "$as_me: failed program was:" >&5
19650fd6
AS
9019sed 's/^/| /' conftest.$ac_ext >&5
9020
ca81d7a0 9021 emacs_cv_void_star=no
98418dba 9022fi
ca81d7a0
JD
9023
9024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 9025fi
ca81d7a0
JD
9026{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
9027echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 9028if test $emacs_cv_void_star = yes; then
c0d27fcc 9029 cat >>confdefs.h <<\_ACEOF
98418dba 9030#define POINTER_TYPE void
c0d27fcc 9031_ACEOF
98418dba
CW
9032
9033else
c0d27fcc 9034 cat >>confdefs.h <<\_ACEOF
98418dba 9035#define POINTER_TYPE char
c0d27fcc 9036_ACEOF
98418dba
CW
9037
9038fi
9039
c0d27fcc 9040
4494a266
JD
9041
9042
cd958eb3 9043
ca81d7a0
JD
9044{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
9045echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
9046set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
9047if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9048 echo $ECHO_N "(cached) $ECHO_C" >&6
9049else
c0d27fcc 9050 cat >conftest.make <<\_ACEOF
ca81d7a0 9051SHELL = /bin/sh
98418dba 9052all:
ca81d7a0 9053 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 9054_ACEOF
98418dba 9055# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
9056case `${MAKE-make} -f conftest.make 2>/dev/null` in
9057 *@@@%%%=?*=@@@%%%*)
9058 eval ac_cv_prog_make_${ac_make}_set=yes;;
9059 *)
9060 eval ac_cv_prog_make_${ac_make}_set=no;;
9061esac
4b411bfe 9062rm -f conftest.make
98418dba 9063fi
ca81d7a0
JD
9064if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
9065 { echo "$as_me:$LINENO: result: yes" >&5
9066echo "${ECHO_T}yes" >&6; }
98418dba
CW
9067 SET_MAKE=
9068else
ca81d7a0
JD
9069 { echo "$as_me:$LINENO: result: no" >&5
9070echo "${ECHO_T}no" >&6; }
98418dba
CW
9071 SET_MAKE="MAKE=${MAKE-make}"
9072fi
9073
c0d27fcc 9074
ca81d7a0
JD
9075{ echo "$as_me:$LINENO: checking for long file names" >&5
9076echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
9077if test "${ac_cv_sys_long_file_names+set}" = set; then
9078 echo $ECHO_N "(cached) $ECHO_C" >&6
9079else
9080 ac_cv_sys_long_file_names=yes
9081# Test for long file names in all the places we know might matter:
9082# . the current directory, where building will happen
9083# $prefix/lib where we will be installing things
9084# $exec_prefix/lib likewise
98418dba 9085# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
9086# /tmp where it might want to write temporary files
9087# /var/tmp likewise
9088# /usr/tmp likewise
ca81d7a0
JD
9089for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9090 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9091 # in the usual case where exec_prefix is '${prefix}'.
9092 case $ac_dir in #(
9093 . | /* | ?:[\\/]*) ;; #(
9094 *) continue;;
9095 esac
9096 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 9097 ac_xdir=$ac_dir/cf$$
ca81d7a0 9098 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
9099 ac_tf1=$ac_xdir/conftest9012345
9100 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 9101 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 9102 ac_cv_sys_long_file_names=no
ca81d7a0
JD
9103 rm -f -r "$ac_xdir" 2>/dev/null
9104 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
9105done
9106fi
ca81d7a0
JD
9107{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
9108echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
9109if test $ac_cv_sys_long_file_names = yes; then
9110
c0d27fcc 9111cat >>confdefs.h <<\_ACEOF
98418dba 9112#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 9113_ACEOF
98418dba
CW
9114
9115fi
9116
c0d27fcc 9117
98418dba
CW
9118#### Choose a window system.
9119
ca81d7a0
JD
9120{ echo "$as_me:$LINENO: checking for X" >&5
9121echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 9122
c0d27fcc 9123
ca81d7a0 9124# Check whether --with-x was given.
98418dba 9125if test "${with_x+set}" = set; then
ca81d7a0
JD
9126 withval=$with_x;
9127fi
98418dba 9128
98418dba
CW
9129# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9130if test "x$with_x" = xno; then
9131 # The user explicitly disabled X.
9132 have_x=disabled
9133else
ca81d7a0
JD
9134 case $x_includes,$x_libraries in #(
9135 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
9136echo "$as_me: error: Cannot use X directory names containing '" >&2;}
9137 { (exit 1); exit 1; }; };; #(
9138 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
9139 echo $ECHO_N "(cached) $ECHO_C" >&6
9140else
9141 # One or both of the vars are not set, and there is no cached value.
9142ac_x_includes=no ac_x_libraries=no
ca81d7a0 9143rm -f -r conftest.dir
98418dba
CW
9144if mkdir conftest.dir; then
9145 cd conftest.dir
c0d27fcc 9146 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
9147incroot:
9148 @echo incroot='${INCROOT}'
9149usrlibdir:
9150 @echo usrlibdir='${USRLIBDIR}'
9151libdir:
9152 @echo libdir='${LIBDIR}'
9153_ACEOF
9154 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 9155 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
9156 for ac_var in incroot usrlibdir libdir; do
9157 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9158 done
98418dba
CW
9159 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9160 for ac_extension in a so sl; do
ca81d7a0
JD
9161 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9162 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 9163 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
9164 fi
9165 done
9166 # Screen out bogus values from the imake configuration. They are
9167 # bogus both because they are the default anyway, and because
9168 # using them would break gcc on systems where it needs fixed includes.
9169 case $ac_im_incroot in
ca81d7a0 9170 /usr/include) ac_x_includes= ;;
98418dba
CW
9171 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9172 esac
9173 case $ac_im_usrlibdir in
9174 /usr/lib | /lib) ;;
9175 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9176 esac
9177 fi
9178 cd ..
ca81d7a0 9179 rm -f -r conftest.dir
98418dba
CW
9180fi
9181
9182# Standard set of common directories for X headers.
9183# Check X11 before X11Rn because it is often a symlink to the current release.
9184ac_x_header_dirs='
9185/usr/X11/include
9186/usr/X11R6/include
9187/usr/X11R5/include
9188/usr/X11R4/include
9189
9190/usr/include/X11
9191/usr/include/X11R6
9192/usr/include/X11R5
9193/usr/include/X11R4
9194
9195/usr/local/X11/include
9196/usr/local/X11R6/include
9197/usr/local/X11R5/include
9198/usr/local/X11R4/include
9199
9200/usr/local/include/X11
9201/usr/local/include/X11R6
9202/usr/local/include/X11R5
9203/usr/local/include/X11R4
9204
9205/usr/X386/include
9206/usr/x386/include
9207/usr/XFree86/include/X11
9208
9209/usr/include
9210/usr/local/include
9211/usr/unsupported/include
9212/usr/athena/include
9213/usr/local/x11r5/include
9214/usr/lpp/Xamples/include
9215
9216/usr/openwin/include
9217/usr/openwin/share/include'
9218
9219if test "$ac_x_includes" = no; then
ca81d7a0 9220 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
9221 # First, try using that file with no special directory specified.
9222 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9223/* confdefs.h. */
9224_ACEOF
9225cat confdefs.h >>conftest.$ac_ext
9226cat >>conftest.$ac_ext <<_ACEOF
9227/* end confdefs.h. */
ca81d7a0 9228#include <X11/Xlib.h>
98418dba 9229_ACEOF
ca81d7a0
JD
9230if { (ac_try="$ac_cpp conftest.$ac_ext"
9231case "(($ac_try" in
9232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9233 *) ac_try_echo=$ac_try;;
9234esac
9235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9236 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9237 ac_status=$?
6bae0ccf 9238 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9239 rm -f conftest.er1
9240 cat conftest.err >&5
c0d27fcc 9241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9242 (exit $ac_status); } >/dev/null && {
9243 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9244 test ! -s conftest.err
9245 }; then
98418dba
CW
9246 # We can compile using X headers with no special include directory.
9247ac_x_includes=
9248else
9249 echo "$as_me: failed program was:" >&5
19650fd6
AS
9250sed 's/^/| /' conftest.$ac_ext >&5
9251
98418dba 9252 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 9253 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9254 ac_x_includes=$ac_dir
9255 break
9256 fi
9257done
9258fi
ca81d7a0 9259
98418dba
CW
9260rm -f conftest.err conftest.$ac_ext
9261fi # $ac_x_includes = no
9262
9263if test "$ac_x_libraries" = no; then
9264 # Check for the libraries.
9265 # See if we find them without any special options.
9266 # Don't add to $LIBS permanently.
9267 ac_save_LIBS=$LIBS
f053c89f 9268 LIBS="-lX11 $LIBS"
98418dba 9269 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9270/* confdefs.h. */
9271_ACEOF
9272cat confdefs.h >>conftest.$ac_ext
9273cat >>conftest.$ac_ext <<_ACEOF
9274/* end confdefs.h. */
ca81d7a0 9275#include <X11/Xlib.h>
98418dba
CW
9276int
9277main ()
9278{
ca81d7a0 9279XrmInitialize ()
98418dba
CW
9280 ;
9281 return 0;
9282}
9283_ACEOF
9284rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9285if { (ac_try="$ac_link"
9286case "(($ac_try" in
9287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9288 *) ac_try_echo=$ac_try;;
9289esac
9290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9291 (eval "$ac_link") 2>conftest.er1
98418dba 9292 ac_status=$?
edfaf76d
LK
9293 grep -v '^ *+' conftest.er1 >conftest.err
9294 rm -f conftest.er1
9295 cat conftest.err >&5
c0d27fcc 9296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9297 (exit $ac_status); } && {
9298 test -z "$ac_c_werror_flag" ||
9299 test ! -s conftest.err
9300 } && test -s conftest$ac_exeext &&
9301 $as_test_x conftest$ac_exeext; then
98418dba
CW
9302 LIBS=$ac_save_LIBS
9303# We can link X programs with no special library path.
9304ac_x_libraries=
9305else
9306 echo "$as_me: failed program was:" >&5
19650fd6
AS
9307sed 's/^/| /' conftest.$ac_ext >&5
9308
ca81d7a0 9309 LIBS=$ac_save_LIBS
98418dba
CW
9310for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9311do
9312 # Don't even attempt the hair of trying to link an X program!
9313 for ac_extension in a so sl; do
f053c89f 9314 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9315 ac_x_libraries=$ac_dir
9316 break 2
9317 fi
9318 done
9319done
9320fi
ca81d7a0 9321
f053c89f 9322rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9323 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9324fi # $ac_x_libraries = no
9325
ca81d7a0
JD
9326case $ac_x_includes,$ac_x_libraries in #(
9327 no,* | *,no | *\'*)
9328 # Didn't find X, or a directory has "'" in its name.
9329 ac_cv_have_x="have_x=no";; #(
9330 *)
9331 # Record where we found X for the cache.
9332 ac_cv_have_x="have_x=yes\
9333 ac_x_includes='$ac_x_includes'\
9334 ac_x_libraries='$ac_x_libraries'"
9335esac
4b411bfe 9336fi
ca81d7a0
JD
9337;; #(
9338 *) have_x=yes;;
9339 esac
98418dba
CW
9340 eval "$ac_cv_have_x"
9341fi # $with_x != no
9342
9343if test "$have_x" != yes; then
ca81d7a0
JD
9344 { echo "$as_me:$LINENO: result: $have_x" >&5
9345echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9346 no_x=yes
9347else
9348 # If each of the values was on the command line, it overrides each guess.
9349 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9350 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9351 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9352 ac_cv_have_x="have_x=yes\
9353 ac_x_includes='$x_includes'\
9354 ac_x_libraries='$x_libraries'"
9355 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9356echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9357fi
9358
9359if test "$no_x" = yes; then
9360 window_system=none
9361else
9362 window_system=x11
9363fi
9364
92d1ccf4
AS
9365if test "${x_libraries}" != NONE; then
9366 if test -n "${x_libraries}"; then
9367 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9368 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9369 fi
98418dba 9370 x_default_search_path=""
92d1ccf4
AS
9371 x_search_path=${x_libraries}
9372 if test -z "${x_search_path}"; then
9373 x_search_path=/usr/lib
9374 fi
9375 for x_library in `echo ${x_search_path}: | \
9376 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9377 x_search_path="\
9378${x_library}/X11/%L/%T/%N%C%S:\
9379${x_library}/X11/%l/%T/%N%C%S:\
9380${x_library}/X11/%T/%N%C%S:\
9381${x_library}/X11/%L/%T/%N%S:\
9382${x_library}/X11/%l/%T/%N%S:\
9383${x_library}/X11/%T/%N%S"
9384 if test x"${x_default_search_path}" = x; then
9385 x_default_search_path=${x_search_path}
9386 else
9387 x_default_search_path="${x_search_path}:${x_default_search_path}"
9388 fi
9389 done
9390fi
9391if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9392 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9393fi
9394
9395if test x"${x_includes}" = x; then
9396 bitmapdir=/usr/include/X11/bitmaps
9397else
9398 # accumulate include directories that have X11 bitmap subdirectories
9399 bmd_acc="dummyval"
9400 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9401 if test -d "${bmd}/X11/bitmaps"; then
9402 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9403 fi
9404 if test -d "${bmd}/bitmaps"; then
9405 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9406 fi
9407 done
9408 if test ${bmd_acc} != "dummyval"; then
9409 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9410 fi
9411fi
9412
5d6da11e 9413HAVE_CARBON=no
1d4d5604
YM
9414if test "${with_carbon}" != no; then
9415 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
ca81d7a0
JD
9416 { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9417echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9418if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9419 echo $ECHO_N "(cached) $ECHO_C" >&6
9420fi
ca81d7a0
JD
9421{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9422echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9423else
9424 # Is the header compilable?
ca81d7a0
JD
9425{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9426echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
5d6da11e
YM
9427cat >conftest.$ac_ext <<_ACEOF
9428/* confdefs.h. */
9429_ACEOF
9430cat confdefs.h >>conftest.$ac_ext
9431cat >>conftest.$ac_ext <<_ACEOF
9432/* end confdefs.h. */
9433$ac_includes_default
9434#include <Carbon/Carbon.h>
9435_ACEOF
9436rm -f conftest.$ac_objext
ca81d7a0
JD
9437if { (ac_try="$ac_compile"
9438case "(($ac_try" in
9439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9440 *) ac_try_echo=$ac_try;;
9441esac
9442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9443 (eval "$ac_compile") 2>conftest.er1
5d6da11e 9444 ac_status=$?
edfaf76d
LK
9445 grep -v '^ *+' conftest.er1 >conftest.err
9446 rm -f conftest.er1
9447 cat conftest.err >&5
5d6da11e 9448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9449 (exit $ac_status); } && {
9450 test -z "$ac_c_werror_flag" ||
9451 test ! -s conftest.err
9452 } && test -s conftest.$ac_objext; then
5d6da11e
YM
9453 ac_header_compiler=yes
9454else
9455 echo "$as_me: failed program was:" >&5
9456sed 's/^/| /' conftest.$ac_ext >&5
9457
ca81d7a0 9458 ac_header_compiler=no
5d6da11e 9459fi
ca81d7a0
JD
9460
9461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9462{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9463echo "${ECHO_T}$ac_header_compiler" >&6; }
5d6da11e
YM
9464
9465# Is the header present?
ca81d7a0
JD
9466{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9467echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
5d6da11e
YM
9468cat >conftest.$ac_ext <<_ACEOF
9469/* confdefs.h. */
9470_ACEOF
9471cat confdefs.h >>conftest.$ac_ext
9472cat >>conftest.$ac_ext <<_ACEOF
9473/* end confdefs.h. */
9474#include <Carbon/Carbon.h>
9475_ACEOF
ca81d7a0
JD
9476if { (ac_try="$ac_cpp conftest.$ac_ext"
9477case "(($ac_try" in
9478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9479 *) ac_try_echo=$ac_try;;
9480esac
9481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9482 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5d6da11e
YM
9483 ac_status=$?
9484 grep -v '^ *+' conftest.er1 >conftest.err
9485 rm -f conftest.er1
9486 cat conftest.err >&5
9487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9488 (exit $ac_status); } >/dev/null && {
9489 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9490 test ! -s conftest.err
9491 }; then
5d6da11e
YM
9492 ac_header_preproc=yes
9493else
9494 echo "$as_me: failed program was:" >&5
9495sed 's/^/| /' conftest.$ac_ext >&5
9496
9497 ac_header_preproc=no
9498fi
ca81d7a0 9499
5d6da11e 9500rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9501{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9502echo "${ECHO_T}$ac_header_preproc" >&6; }
5d6da11e
YM
9503
9504# So? What about this header?
edfaf76d
LK
9505case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9506 yes:no: )
5d6da11e
YM
9507 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9508echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9509 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
9510echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
9511 ac_header_preproc=yes
5d6da11e 9512 ;;
edfaf76d 9513 no:yes:* )
5d6da11e
YM
9514 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9515echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
9516 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9517echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9518 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
9519echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
9520 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
9521echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
9522 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9523echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9524 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
9525echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9526
5d6da11e
YM
9527 ;;
9528esac
ca81d7a0
JD
9529{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9530echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9531if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9532 echo $ECHO_N "(cached) $ECHO_C" >&6
9533else
9534 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
9535fi
ca81d7a0
JD
9536{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9537echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9538
9539fi
9540if test $ac_cv_header_Carbon_Carbon_h = yes; then
9541 HAVE_CARBON=yes
9542fi
9543
9544
1d4d5604
YM
9545fi
9546if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
9547 if test "${with_carbon+set}" != set \
9548 && test "${carbon_appdir_x+set}" != set; then
ec8fcb10
YM
9549 for var in with_x with_x_toolkit with_gtk with_xim \
9550 with_xpm with_jpeg with_tiff with_gif with_png; do
9551 if eval test \"\${$var+set}\" = set; then
9552 HAVE_CARBON=no
9553 break
9554 fi
9555 done
5d6da11e
YM
9556 fi
9557fi
1d4d5604
YM
9558if test "${HAVE_CARBON}" = yes; then
9559 window_system=mac
9560fi
9561
9562case "${window_system}" in
9563 x11 )
9564 HAVE_X_WINDOWS=yes
9565 HAVE_X11=yes
9566 case "${with_x_toolkit}" in
9567 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9568 motif ) USE_X_TOOLKIT=MOTIF ;;
9569 gtk ) with_gtk=yes
9570 USE_X_TOOLKIT=none ;;
9571 no ) USE_X_TOOLKIT=none ;;
089a966d
GM
9572 * )
9573 if test x"$with_gtk" = xyes; then
9574 USE_X_TOOLKIT=none
9575 else
9576 USE_X_TOOLKIT=maybe
9577 fi
9578 ;;
1d4d5604
YM
9579 esac
9580 ;;
9581 mac | none )
9582 HAVE_X_WINDOWS=no
9583 HAVE_X11=no
9584 USE_X_TOOLKIT=none
9585 ;;
9586esac
9587
cfe440b8
JD
9588if test "$window_system" = none && test "X$with_x" != "Xno"; then
9589 # Extract the first word of "X", so it can be a program name with args.
9590set dummy X; ac_word=$2
9591{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9592echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9593if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
9594 echo $ECHO_N "(cached) $ECHO_C" >&6
9595else
9596 if test -n "$HAVE_XSERVER"; then
9597 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9598else
9599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9600for as_dir in $PATH
9601do
9602 IFS=$as_save_IFS
9603 test -z "$as_dir" && as_dir=.
9604 for ac_exec_ext in '' $ac_executable_extensions; do
9605 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9606 ac_cv_prog_HAVE_XSERVER="true"
9607 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9608 break 2
9609 fi
9610done
9611done
9612IFS=$as_save_IFS
9613
9614 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9615fi
9616fi
9617HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9618if test -n "$HAVE_XSERVER"; then
9619 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9620echo "${ECHO_T}$HAVE_XSERVER" >&6; }
9621else
9622 { echo "$as_me:$LINENO: result: no" >&5
9623echo "${ECHO_T}no" >&6; }
9624fi
9625
9626
9627 if test "$HAVE_XSERVER" = true ||
9628 test -n "$DISPLAY" ||
9629 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9630 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
9631where found. You should install the relevant development files for X
9632and the for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
9633sure you have development files for image handling, i.e.
9634tiff, gif, jpeg, png and xpm.
9635If you are sure you want Emacs compiled without X window support, pass
9636 --without-x
9637to configure." >&5
9638echo "$as_me: error: You seem to be running X, but no X development libraries
9639where found. You should install the relevant development files for X
9640and the for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
9641sure you have development files for image handling, i.e.
9642tiff, gif, jpeg, png and xpm.
9643If you are sure you want Emacs compiled without X window support, pass
9644 --without-x
9645to configure." >&2;}
9646 { (exit 1); exit 1; }; }
9647 fi
9648fi
9649
1d4d5604
YM
9650### If we're using X11, we should use the X menu package.
9651HAVE_MENUS=no
9652case ${HAVE_X11} in
9653 yes ) HAVE_MENUS=yes ;;
9654esac
9655
9656if test "${opsys}" = "hpux9"; then
9657 case "${x_libraries}" in
9658 *X11R4* )
9659 opsysfile="s/hpux9-x11r4.h"
9660 ;;
9661 esac
9662fi
9663
9664if test "${opsys}" = "hpux9shr"; then
9665 case "${x_libraries}" in
9666 *X11R4* )
9667 opsysfile="s/hpux9shxr4.h"
9668 ;;
9669 esac
9670fi
5d6da11e 9671
98418dba
CW
9672### Compute the unexec source name from the object name.
9673UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
9674
9675# Do the opsystem or machine files prohibit the use of the GNU malloc?
9676# Assume not, until told otherwise.
9677GNU_MALLOC=yes
9678doug_lea_malloc=yes
ca81d7a0
JD
9679{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9680echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9681if test "${ac_cv_func_malloc_get_state+set}" = set; then
9682 echo $ECHO_N "(cached) $ECHO_C" >&6
9683else
9684 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9685/* confdefs.h. */
9686_ACEOF
9687cat confdefs.h >>conftest.$ac_ext
9688cat >>conftest.$ac_ext <<_ACEOF
9689/* end confdefs.h. */
edfaf76d
LK
9690/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9691 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9692#define malloc_get_state innocuous_malloc_get_state
9693
98418dba 9694/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9695 which can conflict with char malloc_get_state (); below.
9696 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9697 <limits.h> exists even on freestanding compilers. */
edfaf76d 9698
19650fd6
AS
9699#ifdef __STDC__
9700# include <limits.h>
9701#else
9702# include <assert.h>
9703#endif
edfaf76d
LK
9704
9705#undef malloc_get_state
9706
ca81d7a0
JD
9707/* Override any GCC internal prototype to avoid an error.
9708 Use char because int might match the return type of a GCC
9709 builtin and then its argument prototype would still apply. */
98418dba
CW
9710#ifdef __cplusplus
9711extern "C"
9712#endif
98418dba 9713char malloc_get_state ();
98418dba
CW
9714/* The GNU C library defines this for functions which it implements
9715 to always fail with ENOSYS. Some functions are actually named
9716 something starting with __ and the normal name is an alias. */
ca81d7a0 9717#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9718choke me
98418dba
CW
9719#endif
9720
19650fd6
AS
9721int
9722main ()
9723{
ca81d7a0 9724return malloc_get_state ();
98418dba
CW
9725 ;
9726 return 0;
9727}
9728_ACEOF
9729rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9730if { (ac_try="$ac_link"
9731case "(($ac_try" in
9732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9733 *) ac_try_echo=$ac_try;;
9734esac
9735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9736 (eval "$ac_link") 2>conftest.er1
98418dba 9737 ac_status=$?
edfaf76d
LK
9738 grep -v '^ *+' conftest.er1 >conftest.err
9739 rm -f conftest.er1
9740 cat conftest.err >&5
c0d27fcc 9741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9742 (exit $ac_status); } && {
9743 test -z "$ac_c_werror_flag" ||
9744 test ! -s conftest.err
9745 } && test -s conftest$ac_exeext &&
9746 $as_test_x conftest$ac_exeext; then
98418dba
CW
9747 ac_cv_func_malloc_get_state=yes
9748else
9749 echo "$as_me: failed program was:" >&5
19650fd6
AS
9750sed 's/^/| /' conftest.$ac_ext >&5
9751
ca81d7a0 9752 ac_cv_func_malloc_get_state=no
98418dba 9753fi
ca81d7a0 9754
f053c89f 9755rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9756 conftest$ac_exeext conftest.$ac_ext
98418dba 9757fi
ca81d7a0
JD
9758{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9759echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9760if test $ac_cv_func_malloc_get_state = yes; then
9761 :
9762else
9763 doug_lea_malloc=no
9764fi
9765
ca81d7a0
JD
9766{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9767echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9768if test "${ac_cv_func_malloc_set_state+set}" = set; then
9769 echo $ECHO_N "(cached) $ECHO_C" >&6
9770else
9771 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9772/* confdefs.h. */
9773_ACEOF
9774cat confdefs.h >>conftest.$ac_ext
9775cat >>conftest.$ac_ext <<_ACEOF
9776/* end confdefs.h. */
edfaf76d
LK
9777/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9778 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9779#define malloc_set_state innocuous_malloc_set_state
9780
98418dba 9781/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9782 which can conflict with char malloc_set_state (); below.
9783 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9784 <limits.h> exists even on freestanding compilers. */
edfaf76d 9785
19650fd6
AS
9786#ifdef __STDC__
9787# include <limits.h>
9788#else
9789# include <assert.h>
9790#endif
edfaf76d
LK
9791
9792#undef malloc_set_state
9793
ca81d7a0
JD
9794/* Override any GCC internal prototype to avoid an error.
9795 Use char because int might match the return type of a GCC
9796 builtin and then its argument prototype would still apply. */
98418dba
CW
9797#ifdef __cplusplus
9798extern "C"
9799#endif
98418dba 9800char malloc_set_state ();
98418dba
CW
9801/* The GNU C library defines this for functions which it implements
9802 to always fail with ENOSYS. Some functions are actually named
9803 something starting with __ and the normal name is an alias. */
ca81d7a0 9804#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9805choke me
98418dba
CW
9806#endif
9807
19650fd6
AS
9808int
9809main ()
9810{
ca81d7a0 9811return malloc_set_state ();
98418dba
CW
9812 ;
9813 return 0;
9814}
9815_ACEOF
9816rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9817if { (ac_try="$ac_link"
9818case "(($ac_try" in
9819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9820 *) ac_try_echo=$ac_try;;
9821esac
9822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9823 (eval "$ac_link") 2>conftest.er1
98418dba 9824 ac_status=$?
edfaf76d
LK
9825 grep -v '^ *+' conftest.er1 >conftest.err
9826 rm -f conftest.er1
9827 cat conftest.err >&5
c0d27fcc 9828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9829 (exit $ac_status); } && {
9830 test -z "$ac_c_werror_flag" ||
9831 test ! -s conftest.err
9832 } && test -s conftest$ac_exeext &&
9833 $as_test_x conftest$ac_exeext; then
98418dba
CW
9834 ac_cv_func_malloc_set_state=yes
9835else
9836 echo "$as_me: failed program was:" >&5
19650fd6
AS
9837sed 's/^/| /' conftest.$ac_ext >&5
9838
ca81d7a0 9839 ac_cv_func_malloc_set_state=no
98418dba 9840fi
ca81d7a0 9841
f053c89f 9842rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9843 conftest$ac_exeext conftest.$ac_ext
98418dba 9844fi
ca81d7a0
JD
9845{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9846echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9847if test $ac_cv_func_malloc_set_state = yes; then
9848 :
9849else
9850 doug_lea_malloc=no
9851fi
9852
ca81d7a0
JD
9853{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9854echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9855if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9856 echo $ECHO_N "(cached) $ECHO_C" >&6
9857else
9858 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9859/* confdefs.h. */
9860_ACEOF
9861cat confdefs.h >>conftest.$ac_ext
9862cat >>conftest.$ac_ext <<_ACEOF
9863/* end confdefs.h. */
98418dba 9864extern void (* __after_morecore_hook)();
98418dba
CW
9865int
9866main ()
9867{
9868__after_morecore_hook = 0
9869 ;
9870 return 0;
9871}
9872_ACEOF
9873rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9874if { (ac_try="$ac_link"
9875case "(($ac_try" in
9876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9877 *) ac_try_echo=$ac_try;;
9878esac
9879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9880 (eval "$ac_link") 2>conftest.er1
98418dba 9881 ac_status=$?
edfaf76d
LK
9882 grep -v '^ *+' conftest.er1 >conftest.err
9883 rm -f conftest.er1
9884 cat conftest.err >&5
c0d27fcc 9885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9886 (exit $ac_status); } && {
9887 test -z "$ac_c_werror_flag" ||
9888 test ! -s conftest.err
9889 } && test -s conftest$ac_exeext &&
9890 $as_test_x conftest$ac_exeext; then
98418dba
CW
9891 emacs_cv_var___after_morecore_hook=yes
9892else
9893 echo "$as_me: failed program was:" >&5
19650fd6
AS
9894sed 's/^/| /' conftest.$ac_ext >&5
9895
ca81d7a0 9896 emacs_cv_var___after_morecore_hook=no
98418dba 9897fi
ca81d7a0 9898
f053c89f 9899rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9900 conftest$ac_exeext conftest.$ac_ext
98418dba 9901fi
ca81d7a0
JD
9902{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9903echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9904if test $emacs_cv_var___after_morecore_hook = no; then
9905 doug_lea_malloc=no
9906fi
9907if test "${system_malloc}" = "yes"; then
9908 GNU_MALLOC=no
9909 GNU_MALLOC_reason="
9910 (The GNU allocators don't work with this system configuration.)"
9911fi
9912if test "$doug_lea_malloc" = "yes" ; then
9913 if test "$GNU_MALLOC" = yes ; then
9914 GNU_MALLOC_reason="
9915 (Using Doug Lea's new malloc from the GNU C Library.)"
9916 fi
b936fae4 9917
c0d27fcc 9918cat >>confdefs.h <<\_ACEOF
98418dba 9919#define DOUG_LEA_MALLOC 1
c0d27fcc 9920_ACEOF
98418dba
CW
9921
9922fi
9923
9924if test x"${REL_ALLOC}" = x; then
9925 REL_ALLOC=${GNU_MALLOC}
9926fi
9927
9928
c0d27fcc
MR
9929
9930
9931for ac_header in stdlib.h unistd.h
98418dba
CW
9932do
9933as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
9934if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9935 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9936echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9937if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 9938 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9939fi
ca81d7a0
JD
9940ac_res=`eval echo '${'$as_ac_Header'}'`
9941 { echo "$as_me:$LINENO: result: $ac_res" >&5
9942echo "${ECHO_T}$ac_res" >&6; }
98418dba 9943else
c0d27fcc 9944 # Is the header compilable?
ca81d7a0
JD
9945{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9946echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9947cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9948/* confdefs.h. */
9949_ACEOF
9950cat confdefs.h >>conftest.$ac_ext
9951cat >>conftest.$ac_ext <<_ACEOF
9952/* end confdefs.h. */
98418dba
CW
9953$ac_includes_default
9954#include <$ac_header>
9955_ACEOF
9956rm -f conftest.$ac_objext
ca81d7a0
JD
9957if { (ac_try="$ac_compile"
9958case "(($ac_try" in
9959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9960 *) ac_try_echo=$ac_try;;
9961esac
9962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9963 (eval "$ac_compile") 2>conftest.er1
98418dba 9964 ac_status=$?
edfaf76d
LK
9965 grep -v '^ *+' conftest.er1 >conftest.err
9966 rm -f conftest.er1
9967 cat conftest.err >&5
c0d27fcc 9968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9969 (exit $ac_status); } && {
9970 test -z "$ac_c_werror_flag" ||
9971 test ! -s conftest.err
9972 } && test -s conftest.$ac_objext; then
c0d27fcc 9973 ac_header_compiler=yes
98418dba
CW
9974else
9975 echo "$as_me: failed program was:" >&5
19650fd6
AS
9976sed 's/^/| /' conftest.$ac_ext >&5
9977
ca81d7a0 9978 ac_header_compiler=no
98418dba 9979fi
ca81d7a0
JD
9980
9981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9982{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9983echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9984
c0d27fcc 9985# Is the header present?
ca81d7a0
JD
9986{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9987echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9988cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9989/* confdefs.h. */
9990_ACEOF
9991cat confdefs.h >>conftest.$ac_ext
9992cat >>conftest.$ac_ext <<_ACEOF
9993/* end confdefs.h. */
98418dba
CW
9994#include <$ac_header>
9995_ACEOF
ca81d7a0
JD
9996if { (ac_try="$ac_cpp conftest.$ac_ext"
9997case "(($ac_try" in
9998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9999 *) ac_try_echo=$ac_try;;
10000esac
10001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10002 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 10003 ac_status=$?
6bae0ccf 10004 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
10005 rm -f conftest.er1
10006 cat conftest.err >&5
c0d27fcc 10007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10008 (exit $ac_status); } >/dev/null && {
10009 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10010 test ! -s conftest.err
10011 }; then
c0d27fcc 10012 ac_header_preproc=yes
98418dba
CW
10013else
10014 echo "$as_me: failed program was:" >&5
19650fd6
AS
10015sed 's/^/| /' conftest.$ac_ext >&5
10016
c0d27fcc 10017 ac_header_preproc=no
98418dba 10018fi
ca81d7a0 10019
98418dba 10020rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
10021{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10022echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
10023
10024# So? What about this header?
edfaf76d
LK
10025case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10026 yes:no: )
c0d27fcc
MR
10027 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10028echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
10029 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10030echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10031 ac_header_preproc=yes
10032 ;;
10033 no:yes:* )
10034 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10035echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10036 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10037echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10038 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10039echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10040 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10041echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
10042 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10043echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
10044 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10045echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 10046
19650fd6 10047 ;;
c0d27fcc 10048esac
ca81d7a0
JD
10049{ echo "$as_me:$LINENO: checking for $ac_header" >&5
10050echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10051if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
10052 echo $ECHO_N "(cached) $ECHO_C" >&6
10053else
edfaf76d 10054 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 10055fi
ca81d7a0
JD
10056ac_res=`eval echo '${'$as_ac_Header'}'`
10057 { echo "$as_me:$LINENO: result: $ac_res" >&5
10058echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
10059
10060fi
98418dba 10061if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 10062 cat >>confdefs.h <<_ACEOF
98418dba 10063#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 10064_ACEOF
98418dba
CW
10065
10066fi
c0d27fcc 10067
98418dba
CW
10068done
10069
c0d27fcc 10070
98418dba
CW
10071for ac_func in getpagesize
10072do
10073as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10074{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10075echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10076if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10077 echo $ECHO_N "(cached) $ECHO_C" >&6
10078else
10079 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10080/* confdefs.h. */
10081_ACEOF
10082cat confdefs.h >>conftest.$ac_ext
10083cat >>conftest.$ac_ext <<_ACEOF
10084/* end confdefs.h. */
edfaf76d
LK
10085/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10086 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10087#define $ac_func innocuous_$ac_func
10088
98418dba 10089/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10090 which can conflict with char $ac_func (); below.
10091 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10092 <limits.h> exists even on freestanding compilers. */
edfaf76d 10093
19650fd6
AS
10094#ifdef __STDC__
10095# include <limits.h>
10096#else
10097# include <assert.h>
10098#endif
edfaf76d
LK
10099
10100#undef $ac_func
10101
ca81d7a0
JD
10102/* Override any GCC internal prototype to avoid an error.
10103 Use char because int might match the return type of a GCC
10104 builtin and then its argument prototype would still apply. */
98418dba
CW
10105#ifdef __cplusplus
10106extern "C"
10107#endif
98418dba 10108char $ac_func ();
98418dba
CW
10109/* The GNU C library defines this for functions which it implements
10110 to always fail with ENOSYS. Some functions are actually named
10111 something starting with __ and the normal name is an alias. */
ca81d7a0 10112#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10113choke me
98418dba
CW
10114#endif
10115
19650fd6
AS
10116int
10117main ()
10118{
ca81d7a0 10119return $ac_func ();
98418dba
CW
10120 ;
10121 return 0;
10122}
10123_ACEOF
10124rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10125if { (ac_try="$ac_link"
10126case "(($ac_try" in
10127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10128 *) ac_try_echo=$ac_try;;
10129esac
10130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10131 (eval "$ac_link") 2>conftest.er1
98418dba 10132 ac_status=$?
edfaf76d
LK
10133 grep -v '^ *+' conftest.er1 >conftest.err
10134 rm -f conftest.er1
10135 cat conftest.err >&5
c0d27fcc 10136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10137 (exit $ac_status); } && {
10138 test -z "$ac_c_werror_flag" ||
10139 test ! -s conftest.err
10140 } && test -s conftest$ac_exeext &&
10141 $as_test_x conftest$ac_exeext; then
98418dba
CW
10142 eval "$as_ac_var=yes"
10143else
10144 echo "$as_me: failed program was:" >&5
19650fd6
AS
10145sed 's/^/| /' conftest.$ac_ext >&5
10146
ca81d7a0 10147 eval "$as_ac_var=no"
98418dba 10148fi
ca81d7a0 10149
f053c89f 10150rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10151 conftest$ac_exeext conftest.$ac_ext
98418dba 10152fi
ca81d7a0
JD
10153ac_res=`eval echo '${'$as_ac_var'}'`
10154 { echo "$as_me:$LINENO: result: $ac_res" >&5
10155echo "${ECHO_T}$ac_res" >&6; }
98418dba 10156if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10157 cat >>confdefs.h <<_ACEOF
98418dba 10158#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10159_ACEOF
98418dba
CW
10160
10161fi
10162done
10163
ca81d7a0
JD
10164{ echo "$as_me:$LINENO: checking for working mmap" >&5
10165echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
10166if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
10167 echo $ECHO_N "(cached) $ECHO_C" >&6
10168else
10169 if test "$cross_compiling" = yes; then
10170 ac_cv_func_mmap_fixed_mapped=no
10171else
10172 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10173/* confdefs.h. */
10174_ACEOF
10175cat confdefs.h >>conftest.$ac_ext
10176cat >>conftest.$ac_ext <<_ACEOF
10177/* end confdefs.h. */
98418dba 10178$ac_includes_default
c0d27fcc
MR
10179/* malloc might have been renamed as rpl_malloc. */
10180#undef malloc
10181
98418dba
CW
10182/* Thanks to Mike Haertel and Jim Avera for this test.
10183 Here is a matrix of mmap possibilities:
10184 mmap private not fixed
10185 mmap private fixed at somewhere currently unmapped
10186 mmap private fixed at somewhere already mapped
10187 mmap shared not fixed
10188 mmap shared fixed at somewhere currently unmapped
10189 mmap shared fixed at somewhere already mapped
10190 For private mappings, we should verify that changes cannot be read()
10191 back from the file, nor mmap's back from the file at a different
10192 address. (There have been systems where private was not correctly
10193 implemented like the infamous i386 svr4.0, and systems where the
10194 VM page cache was not coherent with the file system buffer cache
10195 like early versions of FreeBSD and possibly contemporary NetBSD.)
10196 For shared mappings, we should conversely verify that changes get
c0d27fcc 10197 propagated back to all the places they're supposed to be.
98418dba
CW
10198
10199 Grep wants private fixed already mapped.
10200 The main things grep needs to know about mmap are:
10201 * does it exist and is it safe to write into the mmap'd area
10202 * how to use it (BSD variants) */
10203
10204#include <fcntl.h>
10205#include <sys/mman.h>
10206
f053c89f 10207#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10208char *malloc ();
10209#endif
10210
10211/* This mess was copied from the GNU getpagesize.h. */
f053c89f 10212#ifndef HAVE_GETPAGESIZE
98418dba 10213/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 10214# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10215# define HAVE_SYS_PARAM_H 1
10216# endif
10217
10218# ifdef _SC_PAGESIZE
10219# define getpagesize() sysconf(_SC_PAGESIZE)
10220# else /* no _SC_PAGESIZE */
f053c89f 10221# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10222# include <sys/param.h>
10223# ifdef EXEC_PAGESIZE
10224# define getpagesize() EXEC_PAGESIZE
10225# else /* no EXEC_PAGESIZE */
10226# ifdef NBPG
10227# define getpagesize() NBPG * CLSIZE
10228# ifndef CLSIZE
10229# define CLSIZE 1
10230# endif /* no CLSIZE */
10231# else /* no NBPG */
10232# ifdef NBPC
10233# define getpagesize() NBPC
10234# else /* no NBPC */
10235# ifdef PAGESIZE
10236# define getpagesize() PAGESIZE
10237# endif /* PAGESIZE */
10238# endif /* no NBPC */
10239# endif /* no NBPG */
10240# endif /* no EXEC_PAGESIZE */
10241# else /* no HAVE_SYS_PARAM_H */
10242# define getpagesize() 8192 /* punt totally */
10243# endif /* no HAVE_SYS_PARAM_H */
10244# endif /* no _SC_PAGESIZE */
10245
10246#endif /* no HAVE_GETPAGESIZE */
10247
10248int
10249main ()
10250{
10251 char *data, *data2, *data3;
10252 int i, pagesize;
10253 int fd;
10254
10255 pagesize = getpagesize ();
10256
10257 /* First, make a file with some known garbage in it. */
10258 data = (char *) malloc (pagesize);
10259 if (!data)
ca81d7a0 10260 return 1;
98418dba
CW
10261 for (i = 0; i < pagesize; ++i)
10262 *(data + i) = rand ();
10263 umask (0);
10264 fd = creat ("conftest.mmap", 0600);
10265 if (fd < 0)
ca81d7a0 10266 return 1;
98418dba 10267 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 10268 return 1;
98418dba
CW
10269 close (fd);
10270
10271 /* Next, try to mmap the file at a fixed address which already has
10272 something else allocated at it. If we can, also make sure that
10273 we see the same garbage. */
10274 fd = open ("conftest.mmap", O_RDWR);
10275 if (fd < 0)
ca81d7a0 10276 return 1;
98418dba
CW
10277 data2 = (char *) malloc (2 * pagesize);
10278 if (!data2)
ca81d7a0
JD
10279 return 1;
10280 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10281 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10282 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 10283 return 1;
98418dba
CW
10284 for (i = 0; i < pagesize; ++i)
10285 if (*(data + i) != *(data2 + i))
ca81d7a0 10286 return 1;
98418dba
CW
10287
10288 /* Finally, make sure that changes to the mapped area do not
10289 percolate back to the file as seen by read(). (This is a bug on
10290 some variants of i386 svr4.0.) */
10291 for (i = 0; i < pagesize; ++i)
10292 *(data2 + i) = *(data2 + i) + 1;
10293 data3 = (char *) malloc (pagesize);
10294 if (!data3)
ca81d7a0 10295 return 1;
98418dba 10296 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 10297 return 1;
98418dba
CW
10298 for (i = 0; i < pagesize; ++i)
10299 if (*(data + i) != *(data3 + i))
ca81d7a0 10300 return 1;
98418dba 10301 close (fd);
ca81d7a0 10302 return 0;
98418dba
CW
10303}
10304_ACEOF
10305rm -f conftest$ac_exeext
ca81d7a0
JD
10306if { (ac_try="$ac_link"
10307case "(($ac_try" in
10308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10309 *) ac_try_echo=$ac_try;;
10310esac
10311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10312 (eval "$ac_link") 2>&5
98418dba 10313 ac_status=$?
c0d27fcc 10314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10315 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
10316 { (case "(($ac_try" in
10317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10318 *) ac_try_echo=$ac_try;;
10319esac
10320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10321 (eval "$ac_try") 2>&5
98418dba 10322 ac_status=$?
c0d27fcc 10323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10324 (exit $ac_status); }; }; then
10325 ac_cv_func_mmap_fixed_mapped=yes
10326else
10327 echo "$as_me: program exited with status $ac_status" >&5
10328echo "$as_me: failed program was:" >&5
19650fd6
AS
10329sed 's/^/| /' conftest.$ac_ext >&5
10330
c0d27fcc 10331( exit $ac_status )
98418dba
CW
10332ac_cv_func_mmap_fixed_mapped=no
10333fi
ca81d7a0 10334rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10335fi
ca81d7a0
JD
10336
10337
98418dba 10338fi
ca81d7a0
JD
10339{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10340echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10341if test $ac_cv_func_mmap_fixed_mapped = yes; then
10342
c0d27fcc 10343cat >>confdefs.h <<\_ACEOF
98418dba 10344#define HAVE_MMAP 1
c0d27fcc 10345_ACEOF
98418dba
CW
10346
10347fi
10348rm -f conftest.mmap
10349
10350if test $use_mmap_for_buffers = yes; then
10351 REL_ALLOC=no
10352fi
10353
10354LIBS="$libsrc_libs $LIBS"
10355
c0d27fcc 10356
ca81d7a0
JD
10357{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10358echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10359if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10360 echo $ECHO_N "(cached) $ECHO_C" >&6
10361else
10362 ac_check_lib_save_LIBS=$LIBS
10363LIBS="-ldnet $LIBS"
10364cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10365/* confdefs.h. */
10366_ACEOF
10367cat confdefs.h >>conftest.$ac_ext
10368cat >>conftest.$ac_ext <<_ACEOF
10369/* end confdefs.h. */
98418dba 10370
ca81d7a0
JD
10371/* Override any GCC internal prototype to avoid an error.
10372 Use char because int might match the return type of a GCC
10373 builtin and then its argument prototype would still apply. */
98418dba
CW
10374#ifdef __cplusplus
10375extern "C"
10376#endif
98418dba 10377char dnet_ntoa ();
98418dba
CW
10378int
10379main ()
10380{
ca81d7a0 10381return dnet_ntoa ();
98418dba
CW
10382 ;
10383 return 0;
10384}
10385_ACEOF
10386rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
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>conftest.er1
98418dba 10394 ac_status=$?
edfaf76d
LK
10395 grep -v '^ *+' conftest.er1 >conftest.err
10396 rm -f conftest.er1
10397 cat conftest.err >&5
c0d27fcc 10398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10399 (exit $ac_status); } && {
10400 test -z "$ac_c_werror_flag" ||
10401 test ! -s conftest.err
10402 } && test -s conftest$ac_exeext &&
10403 $as_test_x conftest$ac_exeext; then
98418dba
CW
10404 ac_cv_lib_dnet_dnet_ntoa=yes
10405else
10406 echo "$as_me: failed program was:" >&5
19650fd6
AS
10407sed 's/^/| /' conftest.$ac_ext >&5
10408
ca81d7a0 10409 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10410fi
ca81d7a0 10411
f053c89f 10412rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10413 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10414LIBS=$ac_check_lib_save_LIBS
10415fi
ca81d7a0
JD
10416{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10417echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10418if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10419 cat >>confdefs.h <<_ACEOF
98418dba 10420#define HAVE_LIBDNET 1
c0d27fcc 10421_ACEOF
98418dba
CW
10422
10423 LIBS="-ldnet $LIBS"
10424
10425fi
10426
c0d27fcc 10427
ca81d7a0
JD
10428{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10429echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10430if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10431 echo $ECHO_N "(cached) $ECHO_C" >&6
10432else
10433 ac_check_lib_save_LIBS=$LIBS
10434LIBS="-lXbsd $LIBS"
10435cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10436/* confdefs.h. */
10437_ACEOF
10438cat confdefs.h >>conftest.$ac_ext
10439cat >>conftest.$ac_ext <<_ACEOF
10440/* end confdefs.h. */
98418dba 10441
c0d27fcc 10442
98418dba
CW
10443int
10444main ()
10445{
ca81d7a0 10446return main ();
98418dba
CW
10447 ;
10448 return 0;
10449}
10450_ACEOF
10451rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10452if { (ac_try="$ac_link"
10453case "(($ac_try" in
10454 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10455 *) ac_try_echo=$ac_try;;
10456esac
10457eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10458 (eval "$ac_link") 2>conftest.er1
98418dba 10459 ac_status=$?
edfaf76d
LK
10460 grep -v '^ *+' conftest.er1 >conftest.err
10461 rm -f conftest.er1
10462 cat conftest.err >&5
c0d27fcc 10463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10464 (exit $ac_status); } && {
10465 test -z "$ac_c_werror_flag" ||
10466 test ! -s conftest.err
10467 } && test -s conftest$ac_exeext &&
10468 $as_test_x conftest$ac_exeext; then
98418dba
CW
10469 ac_cv_lib_Xbsd_main=yes
10470else
10471 echo "$as_me: failed program was:" >&5
19650fd6
AS
10472sed 's/^/| /' conftest.$ac_ext >&5
10473
ca81d7a0 10474 ac_cv_lib_Xbsd_main=no
98418dba 10475fi
ca81d7a0 10476
f053c89f 10477rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10478 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10479LIBS=$ac_check_lib_save_LIBS
10480fi
ca81d7a0
JD
10481{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10482echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10483if test $ac_cv_lib_Xbsd_main = yes; then
10484 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10485fi
10486
c0d27fcc
MR
10487
10488
ca81d7a0
JD
10489{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10490echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10491if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10492 echo $ECHO_N "(cached) $ECHO_C" >&6
10493else
10494 ac_check_lib_save_LIBS=$LIBS
10495LIBS="-lpthreads $LIBS"
10496cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10497/* confdefs.h. */
10498_ACEOF
10499cat confdefs.h >>conftest.$ac_ext
10500cat >>conftest.$ac_ext <<_ACEOF
10501/* end confdefs.h. */
98418dba 10502
ca81d7a0
JD
10503/* Override any GCC internal prototype to avoid an error.
10504 Use char because int might match the return type of a GCC
10505 builtin and then its argument prototype would still apply. */
98418dba
CW
10506#ifdef __cplusplus
10507extern "C"
10508#endif
98418dba 10509char cma_open ();
98418dba
CW
10510int
10511main ()
10512{
ca81d7a0 10513return cma_open ();
98418dba
CW
10514 ;
10515 return 0;
10516}
10517_ACEOF
10518rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10519if { (ac_try="$ac_link"
10520case "(($ac_try" in
10521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10522 *) ac_try_echo=$ac_try;;
10523esac
10524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10525 (eval "$ac_link") 2>conftest.er1
98418dba 10526 ac_status=$?
edfaf76d
LK
10527 grep -v '^ *+' conftest.er1 >conftest.err
10528 rm -f conftest.er1
10529 cat conftest.err >&5
c0d27fcc 10530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10531 (exit $ac_status); } && {
10532 test -z "$ac_c_werror_flag" ||
10533 test ! -s conftest.err
10534 } && test -s conftest$ac_exeext &&
10535 $as_test_x conftest$ac_exeext; then
98418dba
CW
10536 ac_cv_lib_pthreads_cma_open=yes
10537else
10538 echo "$as_me: failed program was:" >&5
19650fd6
AS
10539sed 's/^/| /' conftest.$ac_ext >&5
10540
ca81d7a0 10541 ac_cv_lib_pthreads_cma_open=no
98418dba 10542fi
ca81d7a0 10543
f053c89f 10544rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10545 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10546LIBS=$ac_check_lib_save_LIBS
10547fi
ca81d7a0
JD
10548{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10549echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10550if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10551 cat >>confdefs.h <<_ACEOF
98418dba 10552#define HAVE_LIBPTHREADS 1
c0d27fcc 10553_ACEOF
98418dba
CW
10554
10555 LIBS="-lpthreads $LIBS"
10556
10557fi
10558
c0d27fcc 10559
ca81d7a0
JD
10560{ echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
10561echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6; }
98418dba
CW
10562if test -d /usr/X386/include; then
10563 HAVE_XFREE386=yes
10564 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
10565else
10566 HAVE_XFREE386=no
10567fi
ca81d7a0
JD
10568{ echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
10569echo "${ECHO_T}$HAVE_XFREE386" >&6; }
98418dba 10570
55597d70
DL
10571
10572case ${host_os} in
10573aix*)
ca81d7a0
JD
10574 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10575echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10576if test "${gdb_cv_bigtoc+set}" = set; then
10577 echo $ECHO_N "(cached) $ECHO_C" >&6
10578else
10579
10580 case $GCC in
10581 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10582 *) gdb_cv_bigtoc=-bbigtoc ;;
10583 esac
10584
10585 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10586 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10587/* confdefs.h. */
10588_ACEOF
10589cat confdefs.h >>conftest.$ac_ext
10590cat >>conftest.$ac_ext <<_ACEOF
10591/* end confdefs.h. */
55597d70
DL
10592
10593int
10594main ()
10595{
10596int i;
10597 ;
10598 return 0;
10599}
10600_ACEOF
10601rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10602if { (ac_try="$ac_link"
10603case "(($ac_try" in
10604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10605 *) ac_try_echo=$ac_try;;
10606esac
10607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10608 (eval "$ac_link") 2>conftest.er1
55597d70 10609 ac_status=$?
edfaf76d
LK
10610 grep -v '^ *+' conftest.er1 >conftest.err
10611 rm -f conftest.er1
10612 cat conftest.err >&5
55597d70 10613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10614 (exit $ac_status); } && {
10615 test -z "$ac_c_werror_flag" ||
10616 test ! -s conftest.err
10617 } && test -s conftest$ac_exeext &&
10618 $as_test_x conftest$ac_exeext; then
55597d70
DL
10619 :
10620else
10621 echo "$as_me: failed program was:" >&5
19650fd6
AS
10622sed 's/^/| /' conftest.$ac_ext >&5
10623
ca81d7a0 10624 gdb_cv_bigtoc=
55597d70 10625fi
ca81d7a0 10626
f053c89f 10627rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10628 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10629
10630fi
ca81d7a0
JD
10631{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10632echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10633 ;;
10634esac
10635
ae1a998c
RS
10636# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10637# used for the tests that follow. We set them back to REAL_CFLAGS and
10638# REAL_CPPFLAGS later on.
98418dba
CW
10639
10640REAL_CPPFLAGS="$CPPFLAGS"
10641
10642if test "${HAVE_X11}" = "yes"; then
10643 DEFS="$C_SWITCH_X_SITE $DEFS"
10644 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10645 LIBS="$LIBX $LIBS"
10646 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10647 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10648
10649 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10650 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10651 # but it's more convenient here to set LD_RUN_PATH
10652 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10653 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10654 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10655 export LD_RUN_PATH
10656 fi
10657
10658 if test "${opsys}" = "gnu-linux"; then
ca81d7a0
JD
10659 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10660echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10661 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10662/* confdefs.h. */
10663_ACEOF
10664cat confdefs.h >>conftest.$ac_ext
10665cat >>conftest.$ac_ext <<_ACEOF
10666/* end confdefs.h. */
98418dba 10667
98418dba
CW
10668int
10669main ()
10670{
10671XOpenDisplay ("foo");
10672 ;
10673 return 0;
10674}
10675_ACEOF
10676rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10677if { (ac_try="$ac_link"
10678case "(($ac_try" in
10679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10680 *) ac_try_echo=$ac_try;;
10681esac
10682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10683 (eval "$ac_link") 2>conftest.er1
98418dba 10684 ac_status=$?
edfaf76d
LK
10685 grep -v '^ *+' conftest.er1 >conftest.err
10686 rm -f conftest.er1
10687 cat conftest.err >&5
c0d27fcc 10688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10689 (exit $ac_status); } && {
10690 test -z "$ac_c_werror_flag" ||
10691 test ! -s conftest.err
10692 } && test -s conftest$ac_exeext &&
10693 $as_test_x conftest$ac_exeext; then
35996d22 10694 xlinux_first_failure=no
98418dba
CW
10695else
10696 echo "$as_me: failed program was:" >&5
19650fd6
AS
10697sed 's/^/| /' conftest.$ac_ext >&5
10698
ca81d7a0 10699 xlinux_first_failure=yes
98418dba 10700fi
ca81d7a0 10701
f053c89f 10702rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10703 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10704 if test "${xlinux_first_failure}" = "yes"; then
10705 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10706 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10707 OLD_CPPFLAGS="$CPPFLAGS"
10708 OLD_LIBS="$LIBS"
10709 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10710 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10711 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10712 LIBS="$LIBS -b i486-linuxaout"
10713 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10714/* confdefs.h. */
10715_ACEOF
10716cat confdefs.h >>conftest.$ac_ext
10717cat >>conftest.$ac_ext <<_ACEOF
10718/* end confdefs.h. */
98418dba 10719
98418dba
CW
10720int
10721main ()
10722{
10723XOpenDisplay ("foo");
10724 ;
10725 return 0;
10726}
10727_ACEOF
10728rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10729if { (ac_try="$ac_link"
10730case "(($ac_try" in
10731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10732 *) ac_try_echo=$ac_try;;
10733esac
10734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10735 (eval "$ac_link") 2>conftest.er1
98418dba 10736 ac_status=$?
edfaf76d
LK
10737 grep -v '^ *+' conftest.er1 >conftest.err
10738 rm -f conftest.er1
10739 cat conftest.err >&5
c0d27fcc 10740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10741 (exit $ac_status); } && {
10742 test -z "$ac_c_werror_flag" ||
10743 test ! -s conftest.err
10744 } && test -s conftest$ac_exeext &&
10745 $as_test_x conftest$ac_exeext; then
98418dba
CW
10746 xlinux_second_failure=no
10747else
10748 echo "$as_me: failed program was:" >&5
19650fd6
AS
10749sed 's/^/| /' conftest.$ac_ext >&5
10750
ca81d7a0 10751 xlinux_second_failure=yes
98418dba 10752fi
ca81d7a0 10753
f053c89f 10754rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10755 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10756 if test "${xlinux_second_failure}" = "yes"; then
10757 # If we get the same failure with -b, there is no use adding -b.
10758 # So take it out. This plays safe.
10759 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10760 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10761 CPPFLAGS="$OLD_CPPFLAGS"
10762 LIBS="$OLD_LIBS"
ca81d7a0
JD
10763 { echo "$as_me:$LINENO: result: no" >&5
10764echo "${ECHO_T}no" >&6; }
98418dba 10765 else
ca81d7a0
JD
10766 { echo "$as_me:$LINENO: result: yes" >&5
10767echo "${ECHO_T}yes" >&6; }
98418dba
CW
10768 fi
10769 else
ca81d7a0
JD
10770 { echo "$as_me:$LINENO: result: no" >&5
10771echo "${ECHO_T}no" >&6; }
98418dba
CW
10772 fi
10773 fi
10774
10775 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10776 # header files included from there.
ca81d7a0
JD
10777 { echo "$as_me:$LINENO: checking for Xkb" >&5
10778echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10779 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10780/* confdefs.h. */
10781_ACEOF
10782cat confdefs.h >>conftest.$ac_ext
10783cat >>conftest.$ac_ext <<_ACEOF
10784/* end confdefs.h. */
98418dba
CW
10785#include <X11/Xlib.h>
10786#include <X11/XKBlib.h>
98418dba
CW
10787int
10788main ()
10789{
10790XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10791 ;
10792 return 0;
10793}
10794_ACEOF
10795rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10796if { (ac_try="$ac_link"
10797case "(($ac_try" in
10798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10799 *) ac_try_echo=$ac_try;;
10800esac
10801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10802 (eval "$ac_link") 2>conftest.er1
98418dba 10803 ac_status=$?
edfaf76d
LK
10804 grep -v '^ *+' conftest.er1 >conftest.err
10805 rm -f conftest.er1
10806 cat conftest.err >&5
c0d27fcc 10807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10808 (exit $ac_status); } && {
10809 test -z "$ac_c_werror_flag" ||
10810 test ! -s conftest.err
10811 } && test -s conftest$ac_exeext &&
10812 $as_test_x conftest$ac_exeext; then
98418dba
CW
10813 emacs_xkb=yes
10814else
10815 echo "$as_me: failed program was:" >&5
19650fd6
AS
10816sed 's/^/| /' conftest.$ac_ext >&5
10817
ca81d7a0 10818 emacs_xkb=no
98418dba 10819fi
ca81d7a0 10820
f053c89f 10821rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10822 conftest$ac_exeext conftest.$ac_ext
ca81d7a0
JD
10823 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10824echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10825 if test $emacs_xkb = yes; then
b936fae4 10826
c0d27fcc 10827cat >>confdefs.h <<\_ACEOF
98418dba 10828#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10829_ACEOF
98418dba
CW
10830
10831 fi
10832
c0d27fcc
MR
10833
10834
10835
10836
98418dba
CW
10837for ac_func in XrmSetDatabase XScreenResourceString \
10838XScreenNumberOfScreen XSetWMProtocols
10839do
10840as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10841{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10842echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10843if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10844 echo $ECHO_N "(cached) $ECHO_C" >&6
10845else
10846 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10847/* confdefs.h. */
10848_ACEOF
10849cat confdefs.h >>conftest.$ac_ext
10850cat >>conftest.$ac_ext <<_ACEOF
10851/* end confdefs.h. */
edfaf76d
LK
10852/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10853 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10854#define $ac_func innocuous_$ac_func
10855
98418dba 10856/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10857 which can conflict with char $ac_func (); below.
10858 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10859 <limits.h> exists even on freestanding compilers. */
edfaf76d 10860
19650fd6
AS
10861#ifdef __STDC__
10862# include <limits.h>
10863#else
10864# include <assert.h>
10865#endif
edfaf76d
LK
10866
10867#undef $ac_func
10868
ca81d7a0
JD
10869/* Override any GCC internal prototype to avoid an error.
10870 Use char because int might match the return type of a GCC
10871 builtin and then its argument prototype would still apply. */
98418dba
CW
10872#ifdef __cplusplus
10873extern "C"
10874#endif
98418dba 10875char $ac_func ();
98418dba
CW
10876/* The GNU C library defines this for functions which it implements
10877 to always fail with ENOSYS. Some functions are actually named
10878 something starting with __ and the normal name is an alias. */
ca81d7a0 10879#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10880choke me
98418dba
CW
10881#endif
10882
19650fd6
AS
10883int
10884main ()
10885{
ca81d7a0 10886return $ac_func ();
98418dba
CW
10887 ;
10888 return 0;
10889}
10890_ACEOF
10891rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10892if { (ac_try="$ac_link"
10893case "(($ac_try" in
10894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10895 *) ac_try_echo=$ac_try;;
10896esac
10897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10898 (eval "$ac_link") 2>conftest.er1
98418dba 10899 ac_status=$?
edfaf76d
LK
10900 grep -v '^ *+' conftest.er1 >conftest.err
10901 rm -f conftest.er1
10902 cat conftest.err >&5
c0d27fcc 10903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10904 (exit $ac_status); } && {
10905 test -z "$ac_c_werror_flag" ||
10906 test ! -s conftest.err
10907 } && test -s conftest$ac_exeext &&
10908 $as_test_x conftest$ac_exeext; then
98418dba
CW
10909 eval "$as_ac_var=yes"
10910else
10911 echo "$as_me: failed program was:" >&5
19650fd6
AS
10912sed 's/^/| /' conftest.$ac_ext >&5
10913
ca81d7a0 10914 eval "$as_ac_var=no"
98418dba 10915fi
ca81d7a0 10916
f053c89f 10917rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10918 conftest$ac_exeext conftest.$ac_ext
98418dba 10919fi
ca81d7a0
JD
10920ac_res=`eval echo '${'$as_ac_var'}'`
10921 { echo "$as_me:$LINENO: result: $ac_res" >&5
10922echo "${ECHO_T}$ac_res" >&6; }
98418dba 10923if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10924 cat >>confdefs.h <<_ACEOF
98418dba 10925#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10926_ACEOF
98418dba
CW
10927
10928fi
10929done
10930
10931fi
10932
10933if test "${window_system}" = "x11"; then
ca81d7a0
JD
10934 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10935echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
10936 if test "${emacs_cv_x11_version_6+set}" = set; then
10937 echo $ECHO_N "(cached) $ECHO_C" >&6
10938else
10939 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10940/* confdefs.h. */
10941_ACEOF
10942cat confdefs.h >>conftest.$ac_ext
10943cat >>conftest.$ac_ext <<_ACEOF
10944/* end confdefs.h. */
98418dba 10945#include <X11/Xlib.h>
98418dba
CW
10946int
10947main ()
10948{
10949#if XlibSpecificationRelease < 6
10950fail;
10951#endif
10952
10953 ;
10954 return 0;
10955}
10956_ACEOF
10957rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10958if { (ac_try="$ac_link"
10959case "(($ac_try" in
10960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10961 *) ac_try_echo=$ac_try;;
10962esac
10963eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10964 (eval "$ac_link") 2>conftest.er1
98418dba 10965 ac_status=$?
edfaf76d
LK
10966 grep -v '^ *+' conftest.er1 >conftest.err
10967 rm -f conftest.er1
10968 cat conftest.err >&5
c0d27fcc 10969 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10970 (exit $ac_status); } && {
10971 test -z "$ac_c_werror_flag" ||
10972 test ! -s conftest.err
10973 } && test -s conftest$ac_exeext &&
10974 $as_test_x conftest$ac_exeext; then
98418dba
CW
10975 emacs_cv_x11_version_6=yes
10976else
10977 echo "$as_me: failed program was:" >&5
19650fd6
AS
10978sed 's/^/| /' conftest.$ac_ext >&5
10979
ca81d7a0 10980 emacs_cv_x11_version_6=no
98418dba 10981fi
ca81d7a0 10982
f053c89f 10983rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10984 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10985fi
10986
10987 if test $emacs_cv_x11_version_6 = yes; then
ca81d7a0
JD
10988 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10989echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10990
c0d27fcc 10991cat >>confdefs.h <<\_ACEOF
98418dba 10992#define HAVE_X11R6 1
c0d27fcc 10993_ACEOF
98418dba
CW
10994
10995 else
ca81d7a0
JD
10996 { echo "$as_me:$LINENO: result: before 6" >&5
10997echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10998 fi
10999fi
11000
11001if test "${window_system}" = "x11"; then
ca81d7a0
JD
11002 { echo "$as_me:$LINENO: checking X11 version 5" >&5
11003echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6; }
98418dba
CW
11004 if test "${emacs_cv_x11_version_5+set}" = set; then
11005 echo $ECHO_N "(cached) $ECHO_C" >&6
11006else
11007 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11008/* confdefs.h. */
11009_ACEOF
11010cat confdefs.h >>conftest.$ac_ext
11011cat >>conftest.$ac_ext <<_ACEOF
11012/* end confdefs.h. */
98418dba 11013#include <X11/Xlib.h>
98418dba
CW
11014int
11015main ()
11016{
11017#if XlibSpecificationRelease < 5
11018fail;
11019#endif
11020
11021 ;
11022 return 0;
11023}
11024_ACEOF
11025rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11026if { (ac_try="$ac_link"
11027case "(($ac_try" in
11028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11029 *) ac_try_echo=$ac_try;;
11030esac
11031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11032 (eval "$ac_link") 2>conftest.er1
98418dba 11033 ac_status=$?
edfaf76d
LK
11034 grep -v '^ *+' conftest.er1 >conftest.err
11035 rm -f conftest.er1
11036 cat conftest.err >&5
c0d27fcc 11037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11038 (exit $ac_status); } && {
11039 test -z "$ac_c_werror_flag" ||
11040 test ! -s conftest.err
11041 } && test -s conftest$ac_exeext &&
11042 $as_test_x conftest$ac_exeext; then
98418dba
CW
11043 emacs_cv_x11_version_5=yes
11044else
11045 echo "$as_me: failed program was:" >&5
19650fd6
AS
11046sed 's/^/| /' conftest.$ac_ext >&5
11047
ca81d7a0 11048 emacs_cv_x11_version_5=no
98418dba 11049fi
ca81d7a0 11050
f053c89f 11051rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11052 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11053fi
11054
11055 if test $emacs_cv_x11_version_5 = yes; then
ca81d7a0
JD
11056 { echo "$as_me:$LINENO: result: 5 or newer" >&5
11057echo "${ECHO_T}5 or newer" >&6; }
98418dba 11058 HAVE_X11R5=yes
b936fae4 11059
c0d27fcc 11060cat >>confdefs.h <<\_ACEOF
98418dba 11061#define HAVE_X11R5 1
c0d27fcc 11062_ACEOF
98418dba
CW
11063
11064 else
11065 HAVE_X11R5=no
ca81d7a0
JD
11066 { echo "$as_me:$LINENO: result: before 5" >&5
11067echo "${ECHO_T}before 5" >&6; }
98418dba
CW
11068 fi
11069fi
11070
488dd4c4 11071HAVE_GTK=no
8eeae1c9
JD
11072if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then
11073 USE_X_TOOLKIT=none
11074fi
089a966d
GM
11075if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk" || \
11076 test "$USE_X_TOOLKIT" = "maybe"; then
cd890796 11077 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
11078 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
11079echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
11080 { (exit 1); exit 1; }; };
11081 fi
448541bc
JD
11082 GLIB_REQUIRED=2.4
11083 GTK_REQUIRED=2.4
488dd4c4
JD
11084 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
11085
11086 if test "X${with_pkg_config_prog}" != X; then
11087 PKG_CONFIG="${with_pkg_config_prog}"
11088 fi
11089
11090 succeeded=no
11091
11092 if test -z "$PKG_CONFIG"; then
11093 # Extract the first word of "pkg-config", so it can be a program name with args.
11094set dummy pkg-config; ac_word=$2
ca81d7a0
JD
11095{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11096echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
11097if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11098 echo $ECHO_N "(cached) $ECHO_C" >&6
11099else
11100 case $PKG_CONFIG in
11101 [\\/]* | ?:[\\/]*)
11102 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11103 ;;
11104 *)
11105 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11106for as_dir in $PATH
11107do
11108 IFS=$as_save_IFS
11109 test -z "$as_dir" && as_dir=.
11110 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 11111 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
11112 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11113 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11114 break 2
11115 fi
11116done
11117done
ca81d7a0 11118IFS=$as_save_IFS
488dd4c4
JD
11119
11120 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11121 ;;
11122esac
11123fi
11124PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 11125if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
11126 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11127echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 11128else
ca81d7a0
JD
11129 { echo "$as_me:$LINENO: result: no" >&5
11130echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11131fi
11132
ca81d7a0 11133
488dd4c4
JD
11134 fi
11135
11136 if test "$PKG_CONFIG" = "no" ; then
089a966d 11137 pkg_check_gtk=no
488dd4c4
JD
11138 else
11139 PKG_CONFIG_MIN_VERSION=0.9.0
11140 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
11141 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
11142echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 11143
67db6aa2 11144 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
ca81d7a0
JD
11145 { echo "$as_me:$LINENO: result: yes" >&5
11146echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
11147 succeeded=yes
11148
ca81d7a0
JD
11149 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
11150echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 11151 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11152 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
11153echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 11154
ca81d7a0
JD
11155 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
11156echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 11157 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11158 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
11159echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 11160 else
ca81d7a0
JD
11161 { echo "$as_me:$LINENO: result: no" >&5
11162echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11163 GTK_CFLAGS=""
11164 GTK_LIBS=""
11165 ## If we have a custom action on failure, don't print errors, but
11166 ## do set a variable so people can do so.
11167 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 11168
488dd4c4
JD
11169 fi
11170
11171
11172
11173 else
11174 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11175 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11176 fi
11177 fi
11178
11179 if test $succeeded = yes; then
089a966d 11180 pkg_check_gtk=yes
488dd4c4 11181 else
089a966d
GM
11182 pkg_check_gtk=no
11183 fi
11184
11185 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
11186 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
11187echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
11188 { (exit 1); exit 1; }; }
11189 fi
089a966d
GM
11190fi
11191
11192
11193if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
11194
11195
11196
11197 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11198 CFLAGS="$CFLAGS $GTK_CFLAGS"
11199 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11200 GTK_COMPILES=no
57669b57 11201
8eeae1c9 11202for ac_func in gtk_main
57669b57
JD
11203do
11204as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11205{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11206echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11207if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11208 echo $ECHO_N "(cached) $ECHO_C" >&6
11209else
11210 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11211/* confdefs.h. */
11212_ACEOF
11213cat confdefs.h >>conftest.$ac_ext
11214cat >>conftest.$ac_ext <<_ACEOF
11215/* end confdefs.h. */
edfaf76d
LK
11216/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11217 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11218#define $ac_func innocuous_$ac_func
11219
57669b57
JD
11220/* System header to define __stub macros and hopefully few prototypes,
11221 which can conflict with char $ac_func (); below.
11222 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11223 <limits.h> exists even on freestanding compilers. */
edfaf76d 11224
57669b57
JD
11225#ifdef __STDC__
11226# include <limits.h>
11227#else
11228# include <assert.h>
11229#endif
edfaf76d
LK
11230
11231#undef $ac_func
11232
ca81d7a0
JD
11233/* Override any GCC internal prototype to avoid an error.
11234 Use char because int might match the return type of a GCC
11235 builtin and then its argument prototype would still apply. */
57669b57
JD
11236#ifdef __cplusplus
11237extern "C"
57669b57 11238#endif
57669b57
JD
11239char $ac_func ();
11240/* The GNU C library defines this for functions which it implements
11241 to always fail with ENOSYS. Some functions are actually named
11242 something starting with __ and the normal name is an alias. */
ca81d7a0 11243#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11244choke me
57669b57
JD
11245#endif
11246
11247int
11248main ()
11249{
ca81d7a0 11250return $ac_func ();
57669b57
JD
11251 ;
11252 return 0;
11253}
11254_ACEOF
11255rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11256if { (ac_try="$ac_link"
11257case "(($ac_try" in
11258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11259 *) ac_try_echo=$ac_try;;
11260esac
11261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11262 (eval "$ac_link") 2>conftest.er1
57669b57 11263 ac_status=$?
edfaf76d
LK
11264 grep -v '^ *+' conftest.er1 >conftest.err
11265 rm -f conftest.er1
11266 cat conftest.err >&5
57669b57 11267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11268 (exit $ac_status); } && {
11269 test -z "$ac_c_werror_flag" ||
11270 test ! -s conftest.err
11271 } && test -s conftest$ac_exeext &&
11272 $as_test_x conftest$ac_exeext; then
57669b57
JD
11273 eval "$as_ac_var=yes"
11274else
11275 echo "$as_me: failed program was:" >&5
11276sed 's/^/| /' conftest.$ac_ext >&5
11277
ca81d7a0 11278 eval "$as_ac_var=no"
57669b57 11279fi
ca81d7a0 11280
f053c89f 11281rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11282 conftest$ac_exeext conftest.$ac_ext
57669b57 11283fi
ca81d7a0
JD
11284ac_res=`eval echo '${'$as_ac_var'}'`
11285 { echo "$as_me:$LINENO: result: $ac_res" >&5
11286echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11287if test `eval echo '${'$as_ac_var'}'` = yes; then
11288 cat >>confdefs.h <<_ACEOF
11289#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11290_ACEOF
8eeae1c9 11291 GTK_COMPILES=yes
57669b57
JD
11292fi
11293done
11294
8eeae1c9 11295 if test "${GTK_COMPILES}" != "yes"; then
089a966d
GM
11296 if test "$USE_X_TOOLKIT" != "maybe"; then
11297 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
8eeae1c9
JD
11298echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11299 { (exit 1); exit 1; }; };
089a966d
GM
11300 fi
11301 else
11302 HAVE_GTK=yes
57669b57
JD
11303
11304cat >>confdefs.h <<\_ACEOF
8eeae1c9 11305#define HAVE_GTK 1
572a3cc2
JD
11306_ACEOF
11307
089a966d
GM
11308 USE_X_TOOLKIT=none
11309 fi
11310
11311fi
11312
11313
11314if test "${HAVE_GTK}" = "yes"; then
8eeae1c9
JD
11315
11316 if test "$with_toolkit_scroll_bars" != no; then
11317 with_toolkit_scroll_bars=yes
572a3cc2 11318 fi
572a3cc2 11319
8eeae1c9
JD
11320 HAVE_GTK_MULTIDISPLAY=no
11321
11322for ac_func in gdk_display_open
572a3cc2
JD
11323do
11324as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11325{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11326echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11327if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11328 echo $ECHO_N "(cached) $ECHO_C" >&6
11329else
11330 cat >conftest.$ac_ext <<_ACEOF
11331/* confdefs.h. */
11332_ACEOF
11333cat confdefs.h >>conftest.$ac_ext
11334cat >>conftest.$ac_ext <<_ACEOF
11335/* end confdefs.h. */
edfaf76d
LK
11336/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11337 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11338#define $ac_func innocuous_$ac_func
11339
572a3cc2
JD
11340/* System header to define __stub macros and hopefully few prototypes,
11341 which can conflict with char $ac_func (); below.
11342 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11343 <limits.h> exists even on freestanding compilers. */
edfaf76d 11344
572a3cc2
JD
11345#ifdef __STDC__
11346# include <limits.h>
11347#else
11348# include <assert.h>
11349#endif
edfaf76d
LK
11350
11351#undef $ac_func
11352
ca81d7a0
JD
11353/* Override any GCC internal prototype to avoid an error.
11354 Use char because int might match the return type of a GCC
11355 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11356#ifdef __cplusplus
11357extern "C"
572a3cc2 11358#endif
572a3cc2
JD
11359char $ac_func ();
11360/* The GNU C library defines this for functions which it implements
11361 to always fail with ENOSYS. Some functions are actually named
11362 something starting with __ and the normal name is an alias. */
ca81d7a0 11363#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11364choke me
572a3cc2
JD
11365#endif
11366
11367int
11368main ()
11369{
ca81d7a0 11370return $ac_func ();
572a3cc2
JD
11371 ;
11372 return 0;
11373}
11374_ACEOF
11375rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11376if { (ac_try="$ac_link"
11377case "(($ac_try" in
11378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11379 *) ac_try_echo=$ac_try;;
11380esac
11381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11382 (eval "$ac_link") 2>conftest.er1
572a3cc2 11383 ac_status=$?
edfaf76d
LK
11384 grep -v '^ *+' conftest.er1 >conftest.err
11385 rm -f conftest.er1
11386 cat conftest.err >&5
572a3cc2 11387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11388 (exit $ac_status); } && {
11389 test -z "$ac_c_werror_flag" ||
11390 test ! -s conftest.err
11391 } && test -s conftest$ac_exeext &&
11392 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11393 eval "$as_ac_var=yes"
11394else
11395 echo "$as_me: failed program was:" >&5
11396sed 's/^/| /' conftest.$ac_ext >&5
11397
ca81d7a0 11398 eval "$as_ac_var=no"
572a3cc2 11399fi
ca81d7a0 11400
f053c89f 11401rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11402 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11403fi
ca81d7a0
JD
11404ac_res=`eval echo '${'$as_ac_var'}'`
11405 { echo "$as_me:$LINENO: result: $ac_res" >&5
11406echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11407if test `eval echo '${'$as_ac_var'}'` = yes; then
11408 cat >>confdefs.h <<_ACEOF
11409#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11410_ACEOF
8eeae1c9 11411 HAVE_GTK_MULTIDISPLAY=yes
572a3cc2
JD
11412fi
11413done
11414
8eeae1c9 11415 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
572a3cc2 11416
8eeae1c9
JD
11417cat >>confdefs.h <<\_ACEOF
11418#define HAVE_GTK_MULTIDISPLAY 1
11419_ACEOF
572a3cc2 11420
8eeae1c9
JD
11421 fi
11422 HAVE_GTK_FILE_SELECTION=no
11423
11424for ac_func in gtk_file_selection_new
572a3cc2
JD
11425do
11426as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11427{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11428echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11429if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11430 echo $ECHO_N "(cached) $ECHO_C" >&6
11431else
11432 cat >conftest.$ac_ext <<_ACEOF
11433/* confdefs.h. */
11434_ACEOF
11435cat confdefs.h >>conftest.$ac_ext
11436cat >>conftest.$ac_ext <<_ACEOF
11437/* end confdefs.h. */
edfaf76d
LK
11438/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11439 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11440#define $ac_func innocuous_$ac_func
11441
572a3cc2
JD
11442/* System header to define __stub macros and hopefully few prototypes,
11443 which can conflict with char $ac_func (); below.
11444 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11445 <limits.h> exists even on freestanding compilers. */
edfaf76d 11446
572a3cc2
JD
11447#ifdef __STDC__
11448# include <limits.h>
11449#else
11450# include <assert.h>
11451#endif
edfaf76d
LK
11452
11453#undef $ac_func
11454
ca81d7a0
JD
11455/* Override any GCC internal prototype to avoid an error.
11456 Use char because int might match the return type of a GCC
11457 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11458#ifdef __cplusplus
11459extern "C"
572a3cc2 11460#endif
572a3cc2
JD
11461char $ac_func ();
11462/* The GNU C library defines this for functions which it implements
11463 to always fail with ENOSYS. Some functions are actually named
11464 something starting with __ and the normal name is an alias. */
ca81d7a0 11465#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11466choke me
572a3cc2
JD
11467#endif
11468
11469int
11470main ()
11471{
ca81d7a0 11472return $ac_func ();
572a3cc2
JD
11473 ;
11474 return 0;
11475}
11476_ACEOF
11477rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11478if { (ac_try="$ac_link"
11479case "(($ac_try" in
11480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11481 *) ac_try_echo=$ac_try;;
11482esac
11483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11484 (eval "$ac_link") 2>conftest.er1
572a3cc2 11485 ac_status=$?
edfaf76d
LK
11486 grep -v '^ *+' conftest.er1 >conftest.err
11487 rm -f conftest.er1
11488 cat conftest.err >&5
572a3cc2 11489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11490 (exit $ac_status); } && {
11491 test -z "$ac_c_werror_flag" ||
11492 test ! -s conftest.err
11493 } && test -s conftest$ac_exeext &&
11494 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11495 eval "$as_ac_var=yes"
11496else
11497 echo "$as_me: failed program was:" >&5
11498sed 's/^/| /' conftest.$ac_ext >&5
11499
ca81d7a0 11500 eval "$as_ac_var=no"
572a3cc2 11501fi
ca81d7a0 11502
f053c89f 11503rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11504 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11505fi
ca81d7a0
JD
11506ac_res=`eval echo '${'$as_ac_var'}'`
11507 { echo "$as_me:$LINENO: result: $ac_res" >&5
11508echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11509if test `eval echo '${'$as_ac_var'}'` = yes; then
11510 cat >>confdefs.h <<_ACEOF
11511#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11512_ACEOF
8eeae1c9 11513 HAVE_GTK_FILE_SELECTION=yes
572a3cc2
JD
11514fi
11515done
11516
11517
8eeae1c9 11518 HAVE_GTK_FILE_CHOOSER=no
b8bdffbe 11519
8eeae1c9 11520for ac_func in gtk_file_chooser_dialog_new
b8bdffbe 11521do
8eeae1c9 11522as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11523{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11524echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11525if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe 11526 echo $ECHO_N "(cached) $ECHO_C" >&6
b8bdffbe 11527else
8eeae1c9 11528 cat >conftest.$ac_ext <<_ACEOF
b8bdffbe
JD
11529/* confdefs.h. */
11530_ACEOF
11531cat confdefs.h >>conftest.$ac_ext
11532cat >>conftest.$ac_ext <<_ACEOF
11533/* end confdefs.h. */
8eeae1c9
JD
11534/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11535 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11536#define $ac_func innocuous_$ac_func
11537
11538/* System header to define __stub macros and hopefully few prototypes,
11539 which can conflict with char $ac_func (); below.
11540 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11541 <limits.h> exists even on freestanding compilers. */
11542
11543#ifdef __STDC__
11544# include <limits.h>
11545#else
11546# include <assert.h>
11547#endif
11548
11549#undef $ac_func
11550
ca81d7a0
JD
11551/* Override any GCC internal prototype to avoid an error.
11552 Use char because int might match the return type of a GCC
11553 builtin and then its argument prototype would still apply. */
8eeae1c9
JD
11554#ifdef __cplusplus
11555extern "C"
11556#endif
11557char $ac_func ();
11558/* The GNU C library defines this for functions which it implements
11559 to always fail with ENOSYS. Some functions are actually named
11560 something starting with __ and the normal name is an alias. */
ca81d7a0 11561#if defined __stub_$ac_func || defined __stub___$ac_func
8eeae1c9
JD
11562choke me
11563#endif
11564
11565int
11566main ()
11567{
ca81d7a0 11568return $ac_func ();
8eeae1c9
JD
11569 ;
11570 return 0;
11571}
11572_ACEOF
11573rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11574if { (ac_try="$ac_link"
11575case "(($ac_try" in
11576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11577 *) ac_try_echo=$ac_try;;
11578esac
11579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11580 (eval "$ac_link") 2>conftest.er1
8eeae1c9
JD
11581 ac_status=$?
11582 grep -v '^ *+' conftest.er1 >conftest.err
11583 rm -f conftest.er1
11584 cat conftest.err >&5
11585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11586 (exit $ac_status); } && {
11587 test -z "$ac_c_werror_flag" ||
11588 test ! -s conftest.err
11589 } && test -s conftest$ac_exeext &&
11590 $as_test_x conftest$ac_exeext; then
8eeae1c9
JD
11591 eval "$as_ac_var=yes"
11592else
11593 echo "$as_me: failed program was:" >&5
11594sed 's/^/| /' conftest.$ac_ext >&5
11595
ca81d7a0 11596 eval "$as_ac_var=no"
8eeae1c9 11597fi
ca81d7a0 11598
f053c89f 11599rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8eeae1c9
JD
11600 conftest$ac_exeext conftest.$ac_ext
11601fi
ca81d7a0
JD
11602ac_res=`eval echo '${'$as_ac_var'}'`
11603 { echo "$as_me:$LINENO: result: $ac_res" >&5
11604echo "${ECHO_T}$ac_res" >&6; }
8eeae1c9
JD
11605if test `eval echo '${'$as_ac_var'}'` = yes; then
11606 cat >>confdefs.h <<_ACEOF
11607#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11608_ACEOF
11609 HAVE_GTK_FILE_CHOOSER=yes
11610fi
11611done
11612
11613
11614 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11615 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11616
11617cat >>confdefs.h <<\_ACEOF
11618#define HAVE_GTK_FILE_BOTH 1
11619_ACEOF
11620
11621 fi
11622
11623 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11624 HAVE_GTK_AND_PTHREAD=no
11625
11626for ac_header in pthread.h
11627do
11628as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
11629if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11630 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11631echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11632if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8eeae1c9
JD
11633 echo $ECHO_N "(cached) $ECHO_C" >&6
11634fi
ca81d7a0
JD
11635ac_res=`eval echo '${'$as_ac_Header'}'`
11636 { echo "$as_me:$LINENO: result: $ac_res" >&5
11637echo "${ECHO_T}$ac_res" >&6; }
8eeae1c9
JD
11638else
11639 # Is the header compilable?
ca81d7a0
JD
11640{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11641echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8eeae1c9
JD
11642cat >conftest.$ac_ext <<_ACEOF
11643/* confdefs.h. */
11644_ACEOF
11645cat confdefs.h >>conftest.$ac_ext
11646cat >>conftest.$ac_ext <<_ACEOF
11647/* end confdefs.h. */
11648$ac_includes_default
11649#include <$ac_header>
11650_ACEOF
11651rm -f conftest.$ac_objext
ca81d7a0
JD
11652if { (ac_try="$ac_compile"
11653case "(($ac_try" in
11654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11655 *) ac_try_echo=$ac_try;;
11656esac
11657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11658 (eval "$ac_compile") 2>conftest.er1
8eeae1c9
JD
11659 ac_status=$?
11660 grep -v '^ *+' conftest.er1 >conftest.err
11661 rm -f conftest.er1
edfaf76d 11662 cat conftest.err >&5
b8bdffbe 11663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11664 (exit $ac_status); } && {
11665 test -z "$ac_c_werror_flag" ||
11666 test ! -s conftest.err
11667 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11668 ac_header_compiler=yes
11669else
11670 echo "$as_me: failed program was:" >&5
11671sed 's/^/| /' conftest.$ac_ext >&5
11672
ca81d7a0 11673 ac_header_compiler=no
b8bdffbe 11674fi
ca81d7a0
JD
11675
11676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11677{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11678echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11679
11680# Is the header present?
ca81d7a0
JD
11681{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11682echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11683cat >conftest.$ac_ext <<_ACEOF
11684/* confdefs.h. */
11685_ACEOF
11686cat confdefs.h >>conftest.$ac_ext
11687cat >>conftest.$ac_ext <<_ACEOF
11688/* end confdefs.h. */
11689#include <$ac_header>
11690_ACEOF
ca81d7a0
JD
11691if { (ac_try="$ac_cpp conftest.$ac_ext"
11692case "(($ac_try" in
11693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11694 *) ac_try_echo=$ac_try;;
11695esac
11696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11697 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11698 ac_status=$?
11699 grep -v '^ *+' conftest.er1 >conftest.err
11700 rm -f conftest.er1
11701 cat conftest.err >&5
11702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11703 (exit $ac_status); } >/dev/null && {
11704 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11705 test ! -s conftest.err
11706 }; then
b8bdffbe
JD
11707 ac_header_preproc=yes
11708else
11709 echo "$as_me: failed program was:" >&5
11710sed 's/^/| /' conftest.$ac_ext >&5
11711
11712 ac_header_preproc=no
11713fi
ca81d7a0 11714
b8bdffbe 11715rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
11716{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11717echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11718
11719# So? What about this header?
edfaf76d
LK
11720case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11721 yes:no: )
b8bdffbe
JD
11722 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11723echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11724 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11725echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11726 ac_header_preproc=yes
b8bdffbe 11727 ;;
edfaf76d 11728 no:yes:* )
b8bdffbe
JD
11729 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11730echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11731 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11732echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11733 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11734echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11735 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11736echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11737 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11738echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11739 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11740echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11741
b8bdffbe
JD
11742 ;;
11743esac
ca81d7a0
JD
11744{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11745echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11746if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11747 echo $ECHO_N "(cached) $ECHO_C" >&6
11748else
edfaf76d 11749 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11750fi
ca81d7a0
JD
11751ac_res=`eval echo '${'$as_ac_Header'}'`
11752 { echo "$as_me:$LINENO: result: $ac_res" >&5
11753echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11754
11755fi
11756if test `eval echo '${'$as_ac_Header'}'` = yes; then
11757 cat >>confdefs.h <<_ACEOF
11758#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11759_ACEOF
11760
11761fi
11762
11763done
11764
11765 if test "$ac_cv_header_pthread_h"; then
ca81d7a0
JD
11766 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11767echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11768if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11769 echo $ECHO_N "(cached) $ECHO_C" >&6
11770else
11771 ac_check_lib_save_LIBS=$LIBS
11772LIBS="-lpthread $LIBS"
11773cat >conftest.$ac_ext <<_ACEOF
11774/* confdefs.h. */
11775_ACEOF
11776cat confdefs.h >>conftest.$ac_ext
11777cat >>conftest.$ac_ext <<_ACEOF
11778/* end confdefs.h. */
11779
ca81d7a0
JD
11780/* Override any GCC internal prototype to avoid an error.
11781 Use char because int might match the return type of a GCC
11782 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11783#ifdef __cplusplus
11784extern "C"
11785#endif
b8bdffbe
JD
11786char pthread_self ();
11787int
11788main ()
11789{
ca81d7a0 11790return pthread_self ();
b8bdffbe
JD
11791 ;
11792 return 0;
11793}
11794_ACEOF
11795rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11796if { (ac_try="$ac_link"
11797case "(($ac_try" in
11798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11799 *) ac_try_echo=$ac_try;;
11800esac
11801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11802 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11803 ac_status=$?
edfaf76d
LK
11804 grep -v '^ *+' conftest.er1 >conftest.err
11805 rm -f conftest.er1
11806 cat conftest.err >&5
b8bdffbe 11807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11808 (exit $ac_status); } && {
11809 test -z "$ac_c_werror_flag" ||
11810 test ! -s conftest.err
11811 } && test -s conftest$ac_exeext &&
11812 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11813 ac_cv_lib_pthread_pthread_self=yes
11814else
11815 echo "$as_me: failed program was:" >&5
11816sed 's/^/| /' conftest.$ac_ext >&5
11817
ca81d7a0 11818 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11819fi
ca81d7a0 11820
f053c89f 11821rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11822 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11823LIBS=$ac_check_lib_save_LIBS
11824fi
ca81d7a0
JD
11825{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11826echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11827if test $ac_cv_lib_pthread_pthread_self = yes; then
11828 HAVE_GTK_AND_PTHREAD=yes
11829fi
11830
11831 fi
11832 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
11833 GTK_LIBS="$GTK_LIBS -lpthread"
11834
11835cat >>confdefs.h <<\_ACEOF
11836#define HAVE_GTK_AND_PTHREAD 1
11837_ACEOF
11838
11839 fi
57669b57 11840 fi
488dd4c4
JD
11841fi
11842
9d89ffd0
JD
11843### Link with -lXft if available to work around a bug.
11844HAVE_XFT=maybe
11845if test "${HAVE_GTK}" = "yes"; then
11846 if test "X${with_pkg_config_prog}" != X; then
11847 PKG_CONFIG="${with_pkg_config_prog}"
11848 fi
11849
11850
11851 succeeded=no
11852
11853 if test -z "$PKG_CONFIG"; then
11854 # Extract the first word of "pkg-config", so it can be a program name with args.
11855set dummy pkg-config; ac_word=$2
11856{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11857echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11858if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11859 echo $ECHO_N "(cached) $ECHO_C" >&6
11860else
11861 case $PKG_CONFIG in
11862 [\\/]* | ?:[\\/]*)
11863 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11864 ;;
11865 *)
11866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11867for as_dir in $PATH
11868do
11869 IFS=$as_save_IFS
11870 test -z "$as_dir" && as_dir=.
11871 for ac_exec_ext in '' $ac_executable_extensions; do
11872 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11873 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11874 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11875 break 2
11876 fi
11877done
11878done
11879IFS=$as_save_IFS
11880
11881 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11882 ;;
11883esac
11884fi
11885PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11886if test -n "$PKG_CONFIG"; then
11887 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11888echo "${ECHO_T}$PKG_CONFIG" >&6; }
11889else
11890 { echo "$as_me:$LINENO: result: no" >&5
11891echo "${ECHO_T}no" >&6; }
11892fi
11893
11894
11895 fi
11896
11897 if test "$PKG_CONFIG" = "no" ; then
11898 HAVE_XFT=no
11899 else
11900 PKG_CONFIG_MIN_VERSION=0.9.0
11901 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11902 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
11903echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
11904
11905 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
11906 { echo "$as_me:$LINENO: result: yes" >&5
11907echo "${ECHO_T}yes" >&6; }
11908 succeeded=yes
11909
11910 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
11911echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
94315858 11912 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9d89ffd0
JD
11913 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
11914echo "${ECHO_T}$XFT_CFLAGS" >&6; }
11915
11916 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
11917echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
94315858 11918 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9d89ffd0
JD
11919 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
11920echo "${ECHO_T}$XFT_LIBS" >&6; }
11921 else
11922 { echo "$as_me:$LINENO: result: no" >&5
11923echo "${ECHO_T}no" >&6; }
11924 XFT_CFLAGS=""
11925 XFT_LIBS=""
11926 ## If we have a custom action on failure, don't print errors, but
11927 ## do set a variable so people can do so.
11928 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
11929
11930 fi
11931
11932
11933
11934 else
11935 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11936 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11937 fi
11938 fi
11939
11940 if test $succeeded = yes; then
11941 :
11942 else
11943 HAVE_XFT=no
11944 fi
11945
11946 if test "$HAVE_XFT" != no; then
11947 OLD_CFLAGS="$CPPFLAGS"
f23323c5 11948 OLD_CPPFLAGS="$CFLAGS"
9d89ffd0
JD
11949 OLD_LIBS="$LIBS"
11950 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
11951 CFLAGS="$CFLAGS $XFT_CFLAGS"
11952 LIBS="$XFT_LIBS $LIBS"
11953 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
11954 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
11955echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
11956if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
11957 echo $ECHO_N "(cached) $ECHO_C" >&6
11958fi
11959{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
11960echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
11961else
11962 # Is the header compilable?
11963{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
11964echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
11965cat >conftest.$ac_ext <<_ACEOF
11966/* confdefs.h. */
11967_ACEOF
11968cat confdefs.h >>conftest.$ac_ext
11969cat >>conftest.$ac_ext <<_ACEOF
11970/* end confdefs.h. */
11971$ac_includes_default
11972#include <X11/Xft/Xft.h>
11973_ACEOF
11974rm -f conftest.$ac_objext
11975if { (ac_try="$ac_compile"
11976case "(($ac_try" in
11977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11978 *) ac_try_echo=$ac_try;;
11979esac
11980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11981 (eval "$ac_compile") 2>conftest.er1
11982 ac_status=$?
11983 grep -v '^ *+' conftest.er1 >conftest.err
11984 rm -f conftest.er1
11985 cat conftest.err >&5
11986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11987 (exit $ac_status); } && {
11988 test -z "$ac_c_werror_flag" ||
11989 test ! -s conftest.err
11990 } && test -s conftest.$ac_objext; then
11991 ac_header_compiler=yes
11992else
11993 echo "$as_me: failed program was:" >&5
11994sed 's/^/| /' conftest.$ac_ext >&5
11995
11996 ac_header_compiler=no
11997fi
11998
11999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12000{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12001echo "${ECHO_T}$ac_header_compiler" >&6; }
12002
12003# Is the header present?
12004{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
12005echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
12006cat >conftest.$ac_ext <<_ACEOF
12007/* confdefs.h. */
12008_ACEOF
12009cat confdefs.h >>conftest.$ac_ext
12010cat >>conftest.$ac_ext <<_ACEOF
12011/* end confdefs.h. */
12012#include <X11/Xft/Xft.h>
12013_ACEOF
12014if { (ac_try="$ac_cpp conftest.$ac_ext"
12015case "(($ac_try" in
12016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12017 *) ac_try_echo=$ac_try;;
12018esac
12019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12020 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12021 ac_status=$?
12022 grep -v '^ *+' conftest.er1 >conftest.err
12023 rm -f conftest.er1
12024 cat conftest.err >&5
12025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12026 (exit $ac_status); } >/dev/null && {
12027 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12028 test ! -s conftest.err
12029 }; then
12030 ac_header_preproc=yes
12031else
12032 echo "$as_me: failed program was:" >&5
12033sed 's/^/| /' conftest.$ac_ext >&5
12034
12035 ac_header_preproc=no
12036fi
12037
12038rm -f conftest.err conftest.$ac_ext
12039{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12040echo "${ECHO_T}$ac_header_preproc" >&6; }
12041
12042# So? What about this header?
12043case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12044 yes:no: )
12045 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
12046echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12047 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
12048echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
12049 ac_header_preproc=yes
12050 ;;
12051 no:yes:* )
12052 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
12053echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
12054 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
12055echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
12056 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
12057echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
12058 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
12059echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
12060 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
12061echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
12062 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
12063echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
12064
12065 ;;
12066esac
12067{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12068echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
12069if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12070 echo $ECHO_N "(cached) $ECHO_C" >&6
12071else
12072 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
12073fi
12074{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12075echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
12076
12077fi
12078if test $ac_cv_header_X11_Xft_Xft_h = yes; then
12079 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
12080echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
12081if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
12082 echo $ECHO_N "(cached) $ECHO_C" >&6
12083else
12084 ac_check_lib_save_LIBS=$LIBS
12085LIBS="-lXft $XFT_LIBS $LIBS"
12086cat >conftest.$ac_ext <<_ACEOF
12087/* confdefs.h. */
12088_ACEOF
12089cat confdefs.h >>conftest.$ac_ext
12090cat >>conftest.$ac_ext <<_ACEOF
12091/* end confdefs.h. */
12092
12093/* Override any GCC internal prototype to avoid an error.
12094 Use char because int might match the return type of a GCC
12095 builtin and then its argument prototype would still apply. */
12096#ifdef __cplusplus
12097extern "C"
12098#endif
12099char XftFontOpen ();
12100int
12101main ()
12102{
12103return XftFontOpen ();
12104 ;
12105 return 0;
12106}
12107_ACEOF
12108rm -f conftest.$ac_objext conftest$ac_exeext
12109if { (ac_try="$ac_link"
12110case "(($ac_try" in
12111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12112 *) ac_try_echo=$ac_try;;
12113esac
12114eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12115 (eval "$ac_link") 2>conftest.er1
12116 ac_status=$?
12117 grep -v '^ *+' conftest.er1 >conftest.err
12118 rm -f conftest.er1
12119 cat conftest.err >&5
12120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12121 (exit $ac_status); } && {
12122 test -z "$ac_c_werror_flag" ||
12123 test ! -s conftest.err
12124 } && test -s conftest$ac_exeext &&
12125 $as_test_x conftest$ac_exeext; then
12126 ac_cv_lib_Xft_XftFontOpen=yes
12127else
12128 echo "$as_me: failed program was:" >&5
12129sed 's/^/| /' conftest.$ac_ext >&5
12130
12131 ac_cv_lib_Xft_XftFontOpen=no
12132fi
12133
12134rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12135 conftest$ac_exeext conftest.$ac_ext
12136LIBS=$ac_check_lib_save_LIBS
12137fi
12138{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12139echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
12140if test $ac_cv_lib_Xft_XftFontOpen = yes; then
12141 HAVE_XFT=yes
12142fi
12143
12144fi
12145
12146
12147
12148 if test "${HAVE_XFT}" = "yes"; then
12149
12150cat >>confdefs.h <<\_ACEOF
12151#define HAVE_XFT 1
12152_ACEOF
12153
12154
12155 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12156 else
12157 CFLAGS="$OLD_CPPFLAGS"
12158 CFLAGS="$OLD_CFLAGS"
12159 LIBS="$OLD_LIBS"
12160 fi
12161 fi
12162fi
12163
dba7bae0 12164HAVE_XAW3D=no
3685ba3f 12165if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
dba7bae0
CY
12166 if test x"${HAVE_X11R5}" != xyes; then
12167 USE_X_TOOLKIT=none
12168 else
12169 { echo "$as_me:$LINENO: checking for xaw3d" >&5
12170echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
12171 if test "${emacs_cv_xaw3d+set}" = set; then
98418dba
CW
12172 echo $ECHO_N "(cached) $ECHO_C" >&6
12173else
12174 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12175/* confdefs.h. */
12176_ACEOF
12177cat confdefs.h >>conftest.$ac_ext
12178cat >>conftest.$ac_ext <<_ACEOF
12179/* end confdefs.h. */
98418dba
CW
12180
12181#include <X11/Intrinsic.h>
dba7bae0 12182#include <X11/Xaw3d/Simple.h>
98418dba
CW
12183int
12184main ()
12185{
12186
12187 ;
12188 return 0;
12189}
12190_ACEOF
12191rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12192if { (ac_try="$ac_link"
12193case "(($ac_try" in
12194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12195 *) ac_try_echo=$ac_try;;
12196esac
12197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12198 (eval "$ac_link") 2>conftest.er1
98418dba 12199 ac_status=$?
edfaf76d
LK
12200 grep -v '^ *+' conftest.er1 >conftest.err
12201 rm -f conftest.er1
12202 cat conftest.err >&5
c0d27fcc 12203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12204 (exit $ac_status); } && {
12205 test -z "$ac_c_werror_flag" ||
12206 test ! -s conftest.err
12207 } && test -s conftest$ac_exeext &&
12208 $as_test_x conftest$ac_exeext; then
dba7bae0 12209 emacs_cv_xaw3d=yes
98418dba
CW
12210else
12211 echo "$as_me: failed program was:" >&5
19650fd6
AS
12212sed 's/^/| /' conftest.$ac_ext >&5
12213
dba7bae0 12214 emacs_cv_xaw3d=no
98418dba 12215fi
ca81d7a0 12216
f053c89f 12217rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12218 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12219fi
12220
dba7bae0
CY
12221 if test $emacs_cv_xaw3d = yes; then
12222 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
12223echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
98418dba 12224 USE_X_TOOLKIT=LUCID
dba7bae0
CY
12225 HAVE_XAW3D=yes
12226
12227cat >>confdefs.h <<\_ACEOF
12228#define HAVE_XAW3D 1
12229_ACEOF
12230
98418dba 12231 else
dba7bae0
CY
12232 { echo "$as_me:$LINENO: result: no" >&5
12233echo "${ECHO_T}no" >&6; }
12234 { echo "$as_me:$LINENO: checking for libXaw" >&5
12235echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
12236 if test "${emacs_cv_xaw+set}" = set; then
12237 echo $ECHO_N "(cached) $ECHO_C" >&6
12238else
12239 cat >conftest.$ac_ext <<_ACEOF
12240/* confdefs.h. */
12241_ACEOF
12242cat confdefs.h >>conftest.$ac_ext
12243cat >>conftest.$ac_ext <<_ACEOF
12244/* end confdefs.h. */
12245
12246#include <X11/Intrinsic.h>
12247#include <X11/Xaw/Simple.h>
12248int
12249main ()
12250{
12251
12252 ;
12253 return 0;
12254}
12255_ACEOF
12256rm -f conftest.$ac_objext conftest$ac_exeext
12257if { (ac_try="$ac_link"
12258case "(($ac_try" in
12259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12260 *) ac_try_echo=$ac_try;;
12261esac
12262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12263 (eval "$ac_link") 2>conftest.er1
12264 ac_status=$?
12265 grep -v '^ *+' conftest.er1 >conftest.err
12266 rm -f conftest.er1
12267 cat conftest.err >&5
12268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12269 (exit $ac_status); } && {
12270 test -z "$ac_c_werror_flag" ||
12271 test ! -s conftest.err
12272 } && test -s conftest$ac_exeext &&
12273 $as_test_x conftest$ac_exeext; then
12274 emacs_cv_xaw=yes
12275else
12276 echo "$as_me: failed program was:" >&5
12277sed 's/^/| /' conftest.$ac_ext >&5
12278
12279 emacs_cv_xaw=no
12280fi
12281
12282rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12283 conftest$ac_exeext conftest.$ac_ext
12284fi
12285
12286 if test $emacs_cv_xaw = yes; then
12287 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
12288echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
12289 USE_X_TOOLKIT=LUCID
12290 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
3685ba3f
CY
12291 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
12292echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
12293 { (exit 1); exit 1; }; }
12294 else
dba7bae0
CY
12295 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
12296echo "${ECHO_T}no; do not use toolkit by default" >&6; }
3685ba3f
CY
12297 USE_X_TOOLKIT=none
12298 fi
98418dba 12299 fi
98418dba
CW
12300 fi
12301fi
12302
12303X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12304
12305if test "${USE_X_TOOLKIT}" != "none"; then
ca81d7a0
JD
12306 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
12307echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
12308 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
12309 echo $ECHO_N "(cached) $ECHO_C" >&6
12310else
12311 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12312/* confdefs.h. */
12313_ACEOF
12314cat confdefs.h >>conftest.$ac_ext
12315cat >>conftest.$ac_ext <<_ACEOF
12316/* end confdefs.h. */
98418dba 12317#include <X11/Intrinsic.h>
98418dba
CW
12318int
12319main ()
12320{
12321#if XtSpecificationRelease < 6
12322fail;
12323#endif
12324
12325 ;
12326 return 0;
12327}
12328_ACEOF
12329rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
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
f053c89f
CY
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
98418dba
CW
12347 emacs_cv_x11_toolkit_version_6=yes
12348else
12349 echo "$as_me: failed program was:" >&5
19650fd6
AS
12350sed 's/^/| /' conftest.$ac_ext >&5
12351
ca81d7a0 12352 emacs_cv_x11_toolkit_version_6=no
98418dba 12353fi
ca81d7a0 12354
f053c89f 12355rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12356 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12357fi
12358
12359 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12360 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ca81d7a0
JD
12361 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12362echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12363
c0d27fcc 12364cat >>confdefs.h <<\_ACEOF
98418dba 12365#define HAVE_X11XTR6 1
c0d27fcc 12366_ACEOF
98418dba
CW
12367
12368 else
ca81d7a0
JD
12369 { echo "$as_me:$LINENO: result: before 6" >&5
12370echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12371 fi
12372
12373 OLDLIBS="$LIBS"
12374 if test x$HAVE_X11XTR6 = xyes; then
12375 LIBS="-lXt -lSM -lICE $LIBS"
12376 else
12377 LIBS="-lXt $LIBS"
12378 fi
12379
ca81d7a0
JD
12380{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12381echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
12382if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
12383 echo $ECHO_N "(cached) $ECHO_C" >&6
12384else
12385 ac_check_lib_save_LIBS=$LIBS
12386LIBS="-lXmu $LIBS"
12387cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12388/* confdefs.h. */
12389_ACEOF
12390cat confdefs.h >>conftest.$ac_ext
12391cat >>conftest.$ac_ext <<_ACEOF
12392/* end confdefs.h. */
98418dba 12393
ca81d7a0
JD
12394/* Override any GCC internal prototype to avoid an error.
12395 Use char because int might match the return type of a GCC
12396 builtin and then its argument prototype would still apply. */
98418dba
CW
12397#ifdef __cplusplus
12398extern "C"
12399#endif
98418dba 12400char XmuConvertStandardSelection ();
98418dba
CW
12401int
12402main ()
12403{
ca81d7a0 12404return XmuConvertStandardSelection ();
98418dba
CW
12405 ;
12406 return 0;
12407}
12408_ACEOF
12409rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12410if { (ac_try="$ac_link"
12411case "(($ac_try" in
12412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12413 *) ac_try_echo=$ac_try;;
12414esac
12415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12416 (eval "$ac_link") 2>conftest.er1
98418dba 12417 ac_status=$?
edfaf76d
LK
12418 grep -v '^ *+' conftest.er1 >conftest.err
12419 rm -f conftest.er1
12420 cat conftest.err >&5
c0d27fcc 12421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12422 (exit $ac_status); } && {
12423 test -z "$ac_c_werror_flag" ||
12424 test ! -s conftest.err
12425 } && test -s conftest$ac_exeext &&
12426 $as_test_x conftest$ac_exeext; then
98418dba
CW
12427 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12428else
12429 echo "$as_me: failed program was:" >&5
19650fd6
AS
12430sed 's/^/| /' conftest.$ac_ext >&5
12431
ca81d7a0 12432 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12433fi
ca81d7a0 12434
f053c89f 12435rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12436 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12437LIBS=$ac_check_lib_save_LIBS
12438fi
ca81d7a0
JD
12439{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12440echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 12441if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12442 cat >>confdefs.h <<_ACEOF
98418dba 12443#define HAVE_LIBXMU 1
c0d27fcc 12444_ACEOF
98418dba
CW
12445
12446 LIBS="-lXmu $LIBS"
12447
12448fi
12449
12450 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12451fi
12452
12453# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12454if test "${HAVE_X11}" = "yes"; then
12455 if test "${USE_X_TOOLKIT}" != "none"; then
12456
ca81d7a0
JD
12457{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12458echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12459if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12460 echo $ECHO_N "(cached) $ECHO_C" >&6
12461else
12462 ac_check_lib_save_LIBS=$LIBS
12463LIBS="-lXext $LIBS"
12464cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12465/* confdefs.h. */
12466_ACEOF
12467cat confdefs.h >>conftest.$ac_ext
12468cat >>conftest.$ac_ext <<_ACEOF
12469/* end confdefs.h. */
98418dba 12470
ca81d7a0
JD
12471/* Override any GCC internal prototype to avoid an error.
12472 Use char because int might match the return type of a GCC
12473 builtin and then its argument prototype would still apply. */
98418dba
CW
12474#ifdef __cplusplus
12475extern "C"
12476#endif
98418dba 12477char XShapeQueryExtension ();
98418dba
CW
12478int
12479main ()
12480{
ca81d7a0 12481return XShapeQueryExtension ();
98418dba
CW
12482 ;
12483 return 0;
12484}
12485_ACEOF
12486rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12487if { (ac_try="$ac_link"
12488case "(($ac_try" in
12489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12490 *) ac_try_echo=$ac_try;;
12491esac
12492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12493 (eval "$ac_link") 2>conftest.er1
98418dba 12494 ac_status=$?
edfaf76d
LK
12495 grep -v '^ *+' conftest.er1 >conftest.err
12496 rm -f conftest.er1
12497 cat conftest.err >&5
c0d27fcc 12498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12499 (exit $ac_status); } && {
12500 test -z "$ac_c_werror_flag" ||
12501 test ! -s conftest.err
12502 } && test -s conftest$ac_exeext &&
12503 $as_test_x conftest$ac_exeext; then
98418dba
CW
12504 ac_cv_lib_Xext_XShapeQueryExtension=yes
12505else
12506 echo "$as_me: failed program was:" >&5
19650fd6
AS
12507sed 's/^/| /' conftest.$ac_ext >&5
12508
ca81d7a0 12509 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12510fi
ca81d7a0 12511
f053c89f 12512rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12513 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12514LIBS=$ac_check_lib_save_LIBS
12515fi
ca81d7a0
JD
12516{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12517echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12518if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12519 cat >>confdefs.h <<_ACEOF
98418dba 12520#define HAVE_LIBXEXT 1
c0d27fcc 12521_ACEOF
98418dba
CW
12522
12523 LIBS="-lXext $LIBS"
12524
12525fi
12526
12527 fi
12528fi
12529
12530if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ca81d7a0
JD
12531 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12532echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12533if test "${emacs_cv_motif_version_2_1+set}" = set; then
12534 echo $ECHO_N "(cached) $ECHO_C" >&6
12535else
12536 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12537/* confdefs.h. */
12538_ACEOF
12539cat confdefs.h >>conftest.$ac_ext
12540cat >>conftest.$ac_ext <<_ACEOF
12541/* end confdefs.h. */
98418dba 12542#include <Xm/Xm.h>
98418dba
CW
12543int
12544main ()
12545{
12546#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12547int x = 5;
12548#else
12549Motif version prior to 2.1.
12550#endif
12551 ;
12552 return 0;
12553}
12554_ACEOF
12555rm -f conftest.$ac_objext
ca81d7a0
JD
12556if { (ac_try="$ac_compile"
12557case "(($ac_try" in
12558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12559 *) ac_try_echo=$ac_try;;
12560esac
12561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12562 (eval "$ac_compile") 2>conftest.er1
98418dba 12563 ac_status=$?
edfaf76d
LK
12564 grep -v '^ *+' conftest.er1 >conftest.err
12565 rm -f conftest.er1
12566 cat conftest.err >&5
c0d27fcc 12567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12568 (exit $ac_status); } && {
12569 test -z "$ac_c_werror_flag" ||
12570 test ! -s conftest.err
12571 } && test -s conftest.$ac_objext; then
98418dba
CW
12572 emacs_cv_motif_version_2_1=yes
12573else
12574 echo "$as_me: failed program was:" >&5
19650fd6
AS
12575sed 's/^/| /' conftest.$ac_ext >&5
12576
ca81d7a0 12577 emacs_cv_motif_version_2_1=no
98418dba 12578fi
ca81d7a0
JD
12579
12580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12581fi
ca81d7a0
JD
12582{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12583echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12584 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12585 if test $emacs_cv_motif_version_2_1 = yes; then
12586 HAVE_LIBXP=no
b936fae4 12587
c0d27fcc 12588cat >>confdefs.h <<\_ACEOF
98418dba 12589#define HAVE_MOTIF_2_1 1
c0d27fcc 12590_ACEOF
98418dba 12591
ca81d7a0
JD
12592 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12593echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12594if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12595 echo $ECHO_N "(cached) $ECHO_C" >&6
12596else
12597 ac_check_lib_save_LIBS=$LIBS
12598LIBS="-lXp $LIBS"
12599cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12600/* confdefs.h. */
12601_ACEOF
12602cat confdefs.h >>conftest.$ac_ext
12603cat >>conftest.$ac_ext <<_ACEOF
12604/* end confdefs.h. */
98418dba 12605
ca81d7a0
JD
12606/* Override any GCC internal prototype to avoid an error.
12607 Use char because int might match the return type of a GCC
12608 builtin and then its argument prototype would still apply. */
98418dba
CW
12609#ifdef __cplusplus
12610extern "C"
12611#endif
98418dba 12612char XpCreateContext ();
98418dba
CW
12613int
12614main ()
12615{
ca81d7a0 12616return XpCreateContext ();
98418dba
CW
12617 ;
12618 return 0;
12619}
12620_ACEOF
12621rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12622if { (ac_try="$ac_link"
12623case "(($ac_try" in
12624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12625 *) ac_try_echo=$ac_try;;
12626esac
12627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12628 (eval "$ac_link") 2>conftest.er1
98418dba 12629 ac_status=$?
edfaf76d
LK
12630 grep -v '^ *+' conftest.er1 >conftest.err
12631 rm -f conftest.er1
12632 cat conftest.err >&5
c0d27fcc 12633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12634 (exit $ac_status); } && {
12635 test -z "$ac_c_werror_flag" ||
12636 test ! -s conftest.err
12637 } && test -s conftest$ac_exeext &&
12638 $as_test_x conftest$ac_exeext; then
98418dba
CW
12639 ac_cv_lib_Xp_XpCreateContext=yes
12640else
12641 echo "$as_me: failed program was:" >&5
19650fd6
AS
12642sed 's/^/| /' conftest.$ac_ext >&5
12643
ca81d7a0 12644 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12645fi
ca81d7a0 12646
f053c89f 12647rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12648 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12649LIBS=$ac_check_lib_save_LIBS
12650fi
ca81d7a0
JD
12651{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12652echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12653if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12654 HAVE_LIBXP=yes
12655fi
503d2be0 12656
98418dba 12657 if test ${HAVE_LIBXP} = yes; then
b936fae4 12658
c0d27fcc 12659cat >>confdefs.h <<\_ACEOF
98418dba 12660#define HAVE_LIBXP 1
c0d27fcc 12661_ACEOF
503d2be0 12662
98418dba 12663 fi
4693dbc9 12664 else
ca81d7a0
JD
12665 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12666echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12667if test "${emacs_cv_lesstif+set}" = set; then
12668 echo $ECHO_N "(cached) $ECHO_C" >&6
12669else
12670 # We put this in CFLAGS temporarily to precede other -I options
12671 # that might be in CFLAGS temporarily.
12672 # We put this in CPPFLAGS where it precedes the other -I options.
12673 OLD_CPPFLAGS=$CPPFLAGS
12674 OLD_CFLAGS=$CFLAGS
12675 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12676 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12677 cat >conftest.$ac_ext <<_ACEOF
12678/* confdefs.h. */
12679_ACEOF
12680cat confdefs.h >>conftest.$ac_ext
12681cat >>conftest.$ac_ext <<_ACEOF
12682/* end confdefs.h. */
12683#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12684int
12685main ()
12686{
12687int x = 5;
12688 ;
12689 return 0;
12690}
12691_ACEOF
12692rm -f conftest.$ac_objext
ca81d7a0
JD
12693if { (ac_try="$ac_compile"
12694case "(($ac_try" in
12695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12696 *) ac_try_echo=$ac_try;;
12697esac
12698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12699 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12700 ac_status=$?
edfaf76d
LK
12701 grep -v '^ *+' conftest.er1 >conftest.err
12702 rm -f conftest.er1
12703 cat conftest.err >&5
4693dbc9 12704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12705 (exit $ac_status); } && {
12706 test -z "$ac_c_werror_flag" ||
12707 test ! -s conftest.err
12708 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12709 emacs_cv_lesstif=yes
12710else
12711 echo "$as_me: failed program was:" >&5
12712sed 's/^/| /' conftest.$ac_ext >&5
12713
ca81d7a0 12714 emacs_cv_lesstif=no
4693dbc9 12715fi
ca81d7a0
JD
12716
12717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12718fi
ca81d7a0
JD
12719{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12720echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12721 if test $emacs_cv_lesstif = yes; then
12722 # Make sure this -I option remains in CPPFLAGS after it is set
12723 # back to REAL_CPPFLAGS.
12724 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12725 # have those other -I options anyway. Ultimately, having this
12726 # directory ultimately in CPPFLAGS will be enough.
12727 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12728 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12729 else
12730 CFLAGS=$OLD_CFLAGS
12731 CPPFLAGS=$OLD_CPPFLAGS
12732 fi
98418dba
CW
12733 fi
12734fi
12735
c0d27fcc
MR
12736
12737
98418dba
CW
12738USE_TOOLKIT_SCROLL_BARS=no
12739if test "${with_toolkit_scroll_bars}" != "no"; then
12740 if test "${USE_X_TOOLKIT}" != "none"; then
12741 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12742 cat >>confdefs.h <<\_ACEOF
98418dba 12743#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12744_ACEOF
98418dba
CW
12745
12746 HAVE_XAW3D=no
12747 USE_TOOLKIT_SCROLL_BARS=yes
12748 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12749 cat >>confdefs.h <<\_ACEOF
98418dba 12750#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12751_ACEOF
98418dba
CW
12752
12753 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12754 fi
488dd4c4
JD
12755 elif test "${HAVE_GTK}" = "yes"; then
12756 cat >>confdefs.h <<\_ACEOF
12757#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
12758_ACEOF
12759
12760 USE_TOOLKIT_SCROLL_BARS=yes
12761 elif test "${HAVE_CARBON}" = "yes"; then
12762 cat >>confdefs.h <<\_ACEOF
12763#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12764_ACEOF
12765
12766 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12767 fi
12768fi
12769
abd39b57 12770cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12771/* confdefs.h. */
12772_ACEOF
12773cat confdefs.h >>conftest.$ac_ext
12774cat >>conftest.$ac_ext <<_ACEOF
12775/* end confdefs.h. */
12776
12777 #include <X11/Xlib.h>
12778 #include <X11/Xresource.h>
12779int
12780main ()
12781{
12782XIMProc callback;
12783 ;
12784 return 0;
12785}
12786_ACEOF
12787rm -f conftest.$ac_objext
ca81d7a0
JD
12788if { (ac_try="$ac_compile"
12789case "(($ac_try" in
12790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12791 *) ac_try_echo=$ac_try;;
12792esac
12793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12794 (eval "$ac_compile") 2>conftest.er1
abd39b57 12795 ac_status=$?
edfaf76d
LK
12796 grep -v '^ *+' conftest.er1 >conftest.err
12797 rm -f conftest.er1
12798 cat conftest.err >&5
abd39b57 12799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12800 (exit $ac_status); } && {
12801 test -z "$ac_c_werror_flag" ||
12802 test ! -s conftest.err
12803 } && test -s conftest.$ac_objext; then
abd39b57
AC
12804 HAVE_XIM=yes
12805
12806cat >>confdefs.h <<\_ACEOF
12807#define HAVE_XIM 1
12808_ACEOF
12809
12810else
12811 echo "$as_me: failed program was:" >&5
12812sed 's/^/| /' conftest.$ac_ext >&5
12813
ca81d7a0 12814 HAVE_XIM=no
abd39b57 12815fi
ca81d7a0
JD
12816
12817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12818
c0d27fcc 12819
98418dba 12820if test "${with_xim}" != "no"; then
b936fae4 12821
c0d27fcc 12822cat >>confdefs.h <<\_ACEOF
98418dba 12823#define USE_XIM 1
c0d27fcc 12824_ACEOF
98418dba 12825
793fa0d7 12826fi
abd39b57
AC
12827
12828
12829if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12830 late_CFLAGS=$CFLAGS
12831 if test "$GCC" = yes; then
12832 CFLAGS="$CFLAGS --pedantic-errors"
12833 fi
cffcede7 12834 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12835/* confdefs.h. */
12836_ACEOF
12837cat confdefs.h >>conftest.$ac_ext
12838cat >>conftest.$ac_ext <<_ACEOF
12839/* end confdefs.h. */
cffcede7
JD
12840
12841#include <X11/Xlib.h>
12842#include <X11/Xresource.h>
12843int
12844main ()
12845{
12846Display *display;
12847XrmDatabase db;
12848char *res_name;
12849char *res_class;
12850XIMProc callback;
12851XPointer *client_data;
849d80cf
DL
12852#ifndef __GNUC__
12853/* If we're not using GCC, it's probably not XFree86, and this is
12854 probably right, but we can't use something like --pedantic-errors. */
12855extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12856 char*, XIMProc, XPointer*);
12857#endif
cffcede7
JD
12858(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12859 client_data);
12860 ;
12861 return 0;
12862}
12863_ACEOF
12864rm -f conftest.$ac_objext
ca81d7a0
JD
12865if { (ac_try="$ac_compile"
12866case "(($ac_try" in
12867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12868 *) ac_try_echo=$ac_try;;
12869esac
12870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12871 (eval "$ac_compile") 2>conftest.er1
cffcede7 12872 ac_status=$?
edfaf76d
LK
12873 grep -v '^ *+' conftest.er1 >conftest.err
12874 rm -f conftest.er1
12875 cat conftest.err >&5
cffcede7 12876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12877 (exit $ac_status); } && {
12878 test -z "$ac_c_werror_flag" ||
12879 test ! -s conftest.err
12880 } && test -s conftest.$ac_objext; then
cffcede7
JD
12881 emacs_cv_arg6_star=yes
12882else
12883 echo "$as_me: failed program was:" >&5
19650fd6
AS
12884sed 's/^/| /' conftest.$ac_ext >&5
12885
ca81d7a0 12886
cffcede7 12887fi
ca81d7a0
JD
12888
12889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12890
12891 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12892 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12893#define XRegisterIMInstantiateCallback_arg6 XPointer*
12894_ACEOF
12895
12896 else
f57bd967 12897 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12898#define XRegisterIMInstantiateCallback_arg6 XPointer
12899_ACEOF
12900
12901 fi
849d80cf 12902 CFLAGS=$late_CFLAGS
98418dba
CW
12903fi
12904
12905### Use -lXpm if available, unless `--with-xpm=no'.
12906HAVE_XPM=no
12907if test "${HAVE_X11}" = "yes"; then
12908 if test "${with_xpm}" != "no"; then
c0d27fcc 12909 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
ca81d7a0
JD
12910 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
12911echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
12912if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12913 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 12914fi
ca81d7a0
JD
12915{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
12916echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 12917else
c0d27fcc 12918 # Is the header compilable?
ca81d7a0
JD
12919{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
12920echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 12921cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12922/* confdefs.h. */
12923_ACEOF
12924cat confdefs.h >>conftest.$ac_ext
12925cat >>conftest.$ac_ext <<_ACEOF
12926/* end confdefs.h. */
c0d27fcc
MR
12927$ac_includes_default
12928#include <X11/xpm.h>
12929_ACEOF
12930rm -f conftest.$ac_objext
ca81d7a0
JD
12931if { (ac_try="$ac_compile"
12932case "(($ac_try" in
12933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12934 *) ac_try_echo=$ac_try;;
12935esac
12936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12937 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 12938 ac_status=$?
edfaf76d
LK
12939 grep -v '^ *+' conftest.er1 >conftest.err
12940 rm -f conftest.er1
12941 cat conftest.err >&5
c0d27fcc 12942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12943 (exit $ac_status); } && {
12944 test -z "$ac_c_werror_flag" ||
12945 test ! -s conftest.err
12946 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
12947 ac_header_compiler=yes
12948else
12949 echo "$as_me: failed program was:" >&5
19650fd6
AS
12950sed 's/^/| /' conftest.$ac_ext >&5
12951
ca81d7a0 12952 ac_header_compiler=no
c0d27fcc 12953fi
ca81d7a0
JD
12954
12955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12956{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12957echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
12958
12959# Is the header present?
ca81d7a0
JD
12960{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
12961echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 12962cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12963/* confdefs.h. */
12964_ACEOF
12965cat confdefs.h >>conftest.$ac_ext
12966cat >>conftest.$ac_ext <<_ACEOF
12967/* end confdefs.h. */
98418dba
CW
12968#include <X11/xpm.h>
12969_ACEOF
ca81d7a0
JD
12970if { (ac_try="$ac_cpp conftest.$ac_ext"
12971case "(($ac_try" in
12972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12973 *) ac_try_echo=$ac_try;;
12974esac
12975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12976 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 12977 ac_status=$?
6bae0ccf 12978 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12979 rm -f conftest.er1
12980 cat conftest.err >&5
c0d27fcc 12981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12982 (exit $ac_status); } >/dev/null && {
12983 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12984 test ! -s conftest.err
12985 }; then
c0d27fcc 12986 ac_header_preproc=yes
98418dba
CW
12987else
12988 echo "$as_me: failed program was:" >&5
19650fd6
AS
12989sed 's/^/| /' conftest.$ac_ext >&5
12990
c0d27fcc 12991 ac_header_preproc=no
98418dba 12992fi
ca81d7a0 12993
98418dba 12994rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
12995{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12996echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
12997
12998# So? What about this header?
edfaf76d
LK
12999case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13000 yes:no: )
c0d27fcc
MR
13001 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
13002echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13003 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
13004echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
13005 ac_header_preproc=yes
13006 ;;
13007 no:yes:* )
13008 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
13009echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
13010 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
13011echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
13012 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
13013echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
13014 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
13015echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
13016 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
13017echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13018 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
13019echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13020
19650fd6 13021 ;;
c0d27fcc 13022esac
ca81d7a0
JD
13023{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13024echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
13025if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13026 echo $ECHO_N "(cached) $ECHO_C" >&6
13027else
13028 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 13029fi
ca81d7a0
JD
13030{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13031echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
13032
13033fi
98418dba 13034if test $ac_cv_header_X11_xpm_h = yes; then
ca81d7a0
JD
13035 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
13036echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 13037if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 13038 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13039else
98418dba
CW
13040 ac_check_lib_save_LIBS=$LIBS
13041LIBS="-lXpm -lX11 $LIBS"
13042cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13043/* confdefs.h. */
13044_ACEOF
13045cat confdefs.h >>conftest.$ac_ext
13046cat >>conftest.$ac_ext <<_ACEOF
13047/* end confdefs.h. */
98418dba 13048
ca81d7a0
JD
13049/* Override any GCC internal prototype to avoid an error.
13050 Use char because int might match the return type of a GCC
13051 builtin and then its argument prototype would still apply. */
503d2be0
AS
13052#ifdef __cplusplus
13053extern "C"
13054#endif
98418dba 13055char XpmReadFileToPixmap ();
503d2be0
AS
13056int
13057main ()
13058{
ca81d7a0 13059return XpmReadFileToPixmap ();
503d2be0
AS
13060 ;
13061 return 0;
13062}
13063_ACEOF
13064rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13065if { (ac_try="$ac_link"
13066case "(($ac_try" in
13067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13068 *) ac_try_echo=$ac_try;;
13069esac
13070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13071 (eval "$ac_link") 2>conftest.er1
503d2be0 13072 ac_status=$?
edfaf76d
LK
13073 grep -v '^ *+' conftest.er1 >conftest.err
13074 rm -f conftest.er1
13075 cat conftest.err >&5
c0d27fcc 13076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13077 (exit $ac_status); } && {
13078 test -z "$ac_c_werror_flag" ||
13079 test ! -s conftest.err
13080 } && test -s conftest$ac_exeext &&
13081 $as_test_x conftest$ac_exeext; then
98418dba 13082 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
13083else
13084 echo "$as_me: failed program was:" >&5
19650fd6
AS
13085sed 's/^/| /' conftest.$ac_ext >&5
13086
ca81d7a0 13087 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13088fi
ca81d7a0 13089
f053c89f 13090rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13091 conftest$ac_exeext conftest.$ac_ext
98418dba 13092LIBS=$ac_check_lib_save_LIBS
503d2be0 13093fi
ca81d7a0
JD
13094{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13095echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
13096if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
13097 HAVE_XPM=yes
ba4481b5
DL
13098fi
13099
98418dba
CW
13100fi
13101
c0d27fcc 13102
98418dba 13103 if test "${HAVE_XPM}" = "yes"; then
ca81d7a0
JD
13104 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13105echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13106 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13107/* confdefs.h. */
13108_ACEOF
13109cat confdefs.h >>conftest.$ac_ext
13110cat >>conftest.$ac_ext <<_ACEOF
13111/* end confdefs.h. */
98418dba
CW
13112#include "X11/xpm.h"
13113#ifndef XpmReturnAllocPixels
13114no_return_alloc_pixels
503d2be0 13115#endif
ba4481b5 13116
98418dba
CW
13117_ACEOF
13118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13119 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13120 HAVE_XPM=no
13121else
13122 HAVE_XPM=yes
13123fi
13124rm -f conftest*
ba4481b5 13125
c0d27fcc 13126
98418dba 13127 if test "${HAVE_XPM}" = "yes"; then
ca81d7a0
JD
13128 { echo "$as_me:$LINENO: result: yes" >&5
13129echo "${ECHO_T}yes" >&6; }
98418dba 13130 else
ca81d7a0
JD
13131 { echo "$as_me:$LINENO: result: no" >&5
13132echo "${ECHO_T}no" >&6; }
98418dba
CW
13133 fi
13134 fi
13135 fi
13136
13137 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13138
c0d27fcc 13139cat >>confdefs.h <<\_ACEOF
98418dba 13140#define HAVE_XPM 1
c0d27fcc 13141_ACEOF
98418dba
CW
13142
13143 fi
13144fi
13145
13146### Use -ljpeg if available, unless `--with-jpeg=no'.
13147HAVE_JPEG=no
13148if test "${HAVE_X11}" = "yes"; then
13149 if test "${with_jpeg}" != "no"; then
c0d27fcc 13150 if test "${ac_cv_header_jerror_h+set}" = set; then
ca81d7a0
JD
13151 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13152echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
13153if test "${ac_cv_header_jerror_h+set}" = set; then
13154 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13155fi
ca81d7a0
JD
13156{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13157echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13158else
c0d27fcc 13159 # Is the header compilable?
ca81d7a0
JD
13160{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13161echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13162cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13163/* confdefs.h. */
13164_ACEOF
13165cat confdefs.h >>conftest.$ac_ext
13166cat >>conftest.$ac_ext <<_ACEOF
13167/* end confdefs.h. */
c0d27fcc
MR
13168$ac_includes_default
13169#include <jerror.h>
13170_ACEOF
13171rm -f conftest.$ac_objext
ca81d7a0
JD
13172if { (ac_try="$ac_compile"
13173case "(($ac_try" in
13174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13175 *) ac_try_echo=$ac_try;;
13176esac
13177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13178 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13179 ac_status=$?
edfaf76d
LK
13180 grep -v '^ *+' conftest.er1 >conftest.err
13181 rm -f conftest.er1
13182 cat conftest.err >&5
c0d27fcc 13183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13184 (exit $ac_status); } && {
13185 test -z "$ac_c_werror_flag" ||
13186 test ! -s conftest.err
13187 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13188 ac_header_compiler=yes
13189else
13190 echo "$as_me: failed program was:" >&5
19650fd6
AS
13191sed 's/^/| /' conftest.$ac_ext >&5
13192
ca81d7a0 13193 ac_header_compiler=no
c0d27fcc 13194fi
ca81d7a0
JD
13195
13196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13197{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13198echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13199
13200# Is the header present?
ca81d7a0
JD
13201{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13202echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13203cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13204/* confdefs.h. */
13205_ACEOF
13206cat confdefs.h >>conftest.$ac_ext
13207cat >>conftest.$ac_ext <<_ACEOF
13208/* end confdefs.h. */
98418dba
CW
13209#include <jerror.h>
13210_ACEOF
ca81d7a0
JD
13211if { (ac_try="$ac_cpp conftest.$ac_ext"
13212case "(($ac_try" in
13213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13214 *) ac_try_echo=$ac_try;;
13215esac
13216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13217 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13218 ac_status=$?
6bae0ccf 13219 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13220 rm -f conftest.er1
13221 cat conftest.err >&5
c0d27fcc 13222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13223 (exit $ac_status); } >/dev/null && {
13224 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13225 test ! -s conftest.err
13226 }; then
c0d27fcc 13227 ac_header_preproc=yes
ba4481b5 13228else
98418dba 13229 echo "$as_me: failed program was:" >&5
19650fd6
AS
13230sed 's/^/| /' conftest.$ac_ext >&5
13231
c0d27fcc 13232 ac_header_preproc=no
98418dba 13233fi
ca81d7a0 13234
98418dba 13235rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13236{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13237echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13238
13239# So? What about this header?
edfaf76d
LK
13240case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13241 yes:no: )
c0d27fcc
MR
13242 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13243echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13244 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13245echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13246 ac_header_preproc=yes
19650fd6 13247 ;;
edfaf76d 13248 no:yes:* )
c0d27fcc
MR
13249 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13250echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13251 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13252echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13253 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13254echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13255 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13256echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13257 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13258echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13259 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13260echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13261
19650fd6 13262 ;;
c0d27fcc 13263esac
ca81d7a0
JD
13264{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13265echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13266if test "${ac_cv_header_jerror_h+set}" = set; then
13267 echo $ECHO_N "(cached) $ECHO_C" >&6
13268else
13269 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13270fi
ca81d7a0
JD
13271{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13272echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13273
13274fi
98418dba 13275if test $ac_cv_header_jerror_h = yes; then
ca81d7a0
JD
13276 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13277echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13278if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13279 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13280else
98418dba
CW
13281 ac_check_lib_save_LIBS=$LIBS
13282LIBS="-ljpeg $LIBS"
13283cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13284/* confdefs.h. */
13285_ACEOF
13286cat confdefs.h >>conftest.$ac_ext
13287cat >>conftest.$ac_ext <<_ACEOF
13288/* end confdefs.h. */
98418dba 13289
ca81d7a0
JD
13290/* Override any GCC internal prototype to avoid an error.
13291 Use char because int might match the return type of a GCC
13292 builtin and then its argument prototype would still apply. */
98418dba
CW
13293#ifdef __cplusplus
13294extern "C"
13295#endif
98418dba 13296char jpeg_destroy_compress ();
503d2be0
AS
13297int
13298main ()
13299{
ca81d7a0 13300return jpeg_destroy_compress ();
503d2be0
AS
13301 ;
13302 return 0;
13303}
13304_ACEOF
13305rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13306if { (ac_try="$ac_link"
13307case "(($ac_try" in
13308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13309 *) ac_try_echo=$ac_try;;
13310esac
13311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13312 (eval "$ac_link") 2>conftest.er1
503d2be0 13313 ac_status=$?
edfaf76d
LK
13314 grep -v '^ *+' conftest.er1 >conftest.err
13315 rm -f conftest.er1
13316 cat conftest.err >&5
c0d27fcc 13317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13318 (exit $ac_status); } && {
13319 test -z "$ac_c_werror_flag" ||
13320 test ! -s conftest.err
13321 } && test -s conftest$ac_exeext &&
13322 $as_test_x conftest$ac_exeext; then
98418dba 13323 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13324else
503d2be0 13325 echo "$as_me: failed program was:" >&5
19650fd6
AS
13326sed 's/^/| /' conftest.$ac_ext >&5
13327
ca81d7a0 13328 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13329fi
ca81d7a0 13330
f053c89f 13331rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13332 conftest$ac_exeext conftest.$ac_ext
98418dba 13333LIBS=$ac_check_lib_save_LIBS
ba4481b5 13334fi
ca81d7a0
JD
13335{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13336echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13337if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13338 HAVE_JPEG=yes
ba4481b5 13339fi
98418dba 13340
ba4481b5 13341fi
98418dba 13342
c0d27fcc 13343
ba4481b5 13344 fi
ba4481b5 13345
c0d27fcc 13346
98418dba 13347 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13348 cat >>confdefs.h <<\_ACEOF
98418dba 13349#define HAVE_JPEG 1
c0d27fcc 13350_ACEOF
98418dba
CW
13351
13352 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13353/* confdefs.h. */
13354_ACEOF
13355cat confdefs.h >>conftest.$ac_ext
13356cat >>conftest.$ac_ext <<_ACEOF
13357/* end confdefs.h. */
22044edf 13358#include <jpeglib.h>
98418dba
CW
13359 version=JPEG_LIB_VERSION
13360
13361_ACEOF
13362if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13363 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13364 cat >>confdefs.h <<\_ACEOF
98418dba 13365#define HAVE_JPEG 1
c0d27fcc 13366_ACEOF
ba4481b5 13367
98418dba 13368else
c0d27fcc 13369 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13370echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13371 HAVE_JPEG=no
ba4481b5 13372fi
98418dba 13373rm -f conftest*
ba4481b5 13374
98418dba
CW
13375 fi
13376fi
503d2be0 13377
98418dba
CW
13378### Use -lpng if available, unless `--with-png=no'.
13379HAVE_PNG=no
13380if test "${HAVE_X11}" = "yes"; then
13381 if test "${with_png}" != "no"; then
f57bd967
DL
13382 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13383 # in /usr/include/libpng.
13384
13385
13386for ac_header in png.h libpng/png.h
13387do
13388as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
13389if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13390 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13391echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13392if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13393 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13394fi
ca81d7a0
JD
13395ac_res=`eval echo '${'$as_ac_Header'}'`
13396 { echo "$as_me:$LINENO: result: $ac_res" >&5
13397echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13398else
c0d27fcc 13399 # Is the header compilable?
ca81d7a0
JD
13400{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13401echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13402cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13403/* confdefs.h. */
13404_ACEOF
13405cat confdefs.h >>conftest.$ac_ext
13406cat >>conftest.$ac_ext <<_ACEOF
13407/* end confdefs.h. */
c0d27fcc 13408$ac_includes_default
f57bd967 13409#include <$ac_header>
c0d27fcc
MR
13410_ACEOF
13411rm -f conftest.$ac_objext
ca81d7a0
JD
13412if { (ac_try="$ac_compile"
13413case "(($ac_try" in
13414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13415 *) ac_try_echo=$ac_try;;
13416esac
13417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13418 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13419 ac_status=$?
edfaf76d
LK
13420 grep -v '^ *+' conftest.er1 >conftest.err
13421 rm -f conftest.er1
13422 cat conftest.err >&5
c0d27fcc 13423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13424 (exit $ac_status); } && {
13425 test -z "$ac_c_werror_flag" ||
13426 test ! -s conftest.err
13427 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13428 ac_header_compiler=yes
13429else
13430 echo "$as_me: failed program was:" >&5
19650fd6
AS
13431sed 's/^/| /' conftest.$ac_ext >&5
13432
ca81d7a0 13433 ac_header_compiler=no
c0d27fcc 13434fi
ca81d7a0
JD
13435
13436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13437{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13438echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13439
13440# Is the header present?
ca81d7a0
JD
13441{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13442echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13443cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13444/* confdefs.h. */
13445_ACEOF
13446cat confdefs.h >>conftest.$ac_ext
13447cat >>conftest.$ac_ext <<_ACEOF
13448/* end confdefs.h. */
f57bd967 13449#include <$ac_header>
503d2be0 13450_ACEOF
ca81d7a0
JD
13451if { (ac_try="$ac_cpp conftest.$ac_ext"
13452case "(($ac_try" in
13453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13454 *) ac_try_echo=$ac_try;;
13455esac
13456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13457 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13458 ac_status=$?
6bae0ccf 13459 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13460 rm -f conftest.er1
13461 cat conftest.err >&5
c0d27fcc 13462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13463 (exit $ac_status); } >/dev/null && {
13464 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13465 test ! -s conftest.err
13466 }; then
c0d27fcc 13467 ac_header_preproc=yes
503d2be0
AS
13468else
13469 echo "$as_me: failed program was:" >&5
19650fd6
AS
13470sed 's/^/| /' conftest.$ac_ext >&5
13471
c0d27fcc 13472 ac_header_preproc=no
ba4481b5 13473fi
ca81d7a0 13474
503d2be0 13475rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13476{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13477echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13478
13479# So? What about this header?
edfaf76d
LK
13480case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13481 yes:no: )
f57bd967
DL
13482 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13483echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13484 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13485echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13486 ac_header_preproc=yes
19650fd6 13487 ;;
edfaf76d 13488 no:yes:* )
f57bd967
DL
13489 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13490echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13491 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13492echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13493 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13494echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13495 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13496echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 13497 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13498echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13499 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13500echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13501
19650fd6 13502 ;;
c0d27fcc 13503esac
ca81d7a0
JD
13504{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13505echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13506if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
13507 echo $ECHO_N "(cached) $ECHO_C" >&6
13508else
edfaf76d 13509 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 13510fi
ca81d7a0
JD
13511ac_res=`eval echo '${'$as_ac_Header'}'`
13512 { echo "$as_me:$LINENO: result: $ac_res" >&5
13513echo "${ECHO_T}$ac_res" >&6; }
f57bd967 13514
ba4481b5 13515fi
f57bd967
DL
13516if test `eval echo '${'$as_ac_Header'}'` = yes; then
13517 cat >>confdefs.h <<_ACEOF
13518#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13519_ACEOF
c0d27fcc
MR
13520
13521fi
f57bd967
DL
13522
13523done
13524
13525 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
ca81d7a0
JD
13526 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
13527echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 13528if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 13529 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13530else
98418dba
CW
13531 ac_check_lib_save_LIBS=$LIBS
13532LIBS="-lpng -lz -lm $LIBS"
13533cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13534/* confdefs.h. */
13535_ACEOF
13536cat confdefs.h >>conftest.$ac_ext
13537cat >>conftest.$ac_ext <<_ACEOF
13538/* end confdefs.h. */
98418dba 13539
ca81d7a0
JD
13540/* Override any GCC internal prototype to avoid an error.
13541 Use char because int might match the return type of a GCC
13542 builtin and then its argument prototype would still apply. */
503d2be0
AS
13543#ifdef __cplusplus
13544extern "C"
13545#endif
98418dba 13546char png_get_channels ();
503d2be0
AS
13547int
13548main ()
13549{
ca81d7a0 13550return png_get_channels ();
503d2be0
AS
13551 ;
13552 return 0;
13553}
13554_ACEOF
13555rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13556if { (ac_try="$ac_link"
13557case "(($ac_try" in
13558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13559 *) ac_try_echo=$ac_try;;
13560esac
13561eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13562 (eval "$ac_link") 2>conftest.er1
503d2be0 13563 ac_status=$?
edfaf76d
LK
13564 grep -v '^ *+' conftest.er1 >conftest.err
13565 rm -f conftest.er1
13566 cat conftest.err >&5
c0d27fcc 13567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13568 (exit $ac_status); } && {
13569 test -z "$ac_c_werror_flag" ||
13570 test ! -s conftest.err
13571 } && test -s conftest$ac_exeext &&
13572 $as_test_x conftest$ac_exeext; then
98418dba 13573 ac_cv_lib_png_png_get_channels=yes
73b77ee5 13574else
98418dba 13575 echo "$as_me: failed program was:" >&5
19650fd6
AS
13576sed 's/^/| /' conftest.$ac_ext >&5
13577
ca81d7a0 13578 ac_cv_lib_png_png_get_channels=no
73b77ee5 13579fi
ca81d7a0 13580
f053c89f 13581rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13582 conftest$ac_exeext conftest.$ac_ext
98418dba 13583LIBS=$ac_check_lib_save_LIBS
73b77ee5 13584fi
ca81d7a0
JD
13585{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
13586echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
13587if test $ac_cv_lib_png_png_get_channels = yes; then
13588 HAVE_PNG=yes
73b77ee5 13589fi
503d2be0 13590
f57bd967 13591 fi
98418dba
CW
13592 fi
13593
13594 if test "${HAVE_PNG}" = "yes"; then
b936fae4 13595
c0d27fcc 13596cat >>confdefs.h <<\_ACEOF
98418dba 13597#define HAVE_PNG 1
c0d27fcc 13598_ACEOF
73b77ee5 13599
98418dba 13600 fi
73b77ee5
GM
13601fi
13602
98418dba
CW
13603### Use -ltiff if available, unless `--with-tiff=no'.
13604HAVE_TIFF=no
13605if test "${HAVE_X11}" = "yes"; then
13606 if test "${with_tiff}" != "no"; then
c0d27fcc 13607 if test "${ac_cv_header_tiffio_h+set}" = set; then
ca81d7a0
JD
13608 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
13609echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
13610if test "${ac_cv_header_tiffio_h+set}" = set; then
13611 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13612fi
ca81d7a0
JD
13613{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13614echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 13615else
c0d27fcc 13616 # Is the header compilable?
ca81d7a0
JD
13617{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
13618echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 13619cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13620/* confdefs.h. */
13621_ACEOF
13622cat confdefs.h >>conftest.$ac_ext
13623cat >>conftest.$ac_ext <<_ACEOF
13624/* end confdefs.h. */
c0d27fcc
MR
13625$ac_includes_default
13626#include <tiffio.h>
13627_ACEOF
13628rm -f conftest.$ac_objext
ca81d7a0
JD
13629if { (ac_try="$ac_compile"
13630case "(($ac_try" in
13631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13632 *) ac_try_echo=$ac_try;;
13633esac
13634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13635 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13636 ac_status=$?
edfaf76d
LK
13637 grep -v '^ *+' conftest.er1 >conftest.err
13638 rm -f conftest.er1
13639 cat conftest.err >&5
c0d27fcc 13640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13641 (exit $ac_status); } && {
13642 test -z "$ac_c_werror_flag" ||
13643 test ! -s conftest.err
13644 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13645 ac_header_compiler=yes
13646else
13647 echo "$as_me: failed program was:" >&5
19650fd6
AS
13648sed 's/^/| /' conftest.$ac_ext >&5
13649
ca81d7a0 13650 ac_header_compiler=no
c0d27fcc 13651fi
ca81d7a0
JD
13652
13653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13654{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13655echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13656
13657# Is the header present?
ca81d7a0
JD
13658{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
13659echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 13660cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13661/* confdefs.h. */
13662_ACEOF
13663cat confdefs.h >>conftest.$ac_ext
13664cat >>conftest.$ac_ext <<_ACEOF
13665/* end confdefs.h. */
98418dba
CW
13666#include <tiffio.h>
13667_ACEOF
ca81d7a0
JD
13668if { (ac_try="$ac_cpp conftest.$ac_ext"
13669case "(($ac_try" in
13670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13671 *) ac_try_echo=$ac_try;;
13672esac
13673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13674 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13675 ac_status=$?
6bae0ccf 13676 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13677 rm -f conftest.er1
13678 cat conftest.err >&5
c0d27fcc 13679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13680 (exit $ac_status); } >/dev/null && {
13681 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13682 test ! -s conftest.err
13683 }; then
c0d27fcc 13684 ac_header_preproc=yes
98418dba
CW
13685else
13686 echo "$as_me: failed program was:" >&5
19650fd6
AS
13687sed 's/^/| /' conftest.$ac_ext >&5
13688
c0d27fcc 13689 ac_header_preproc=no
98418dba 13690fi
ca81d7a0 13691
98418dba 13692rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13693{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13694echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13695
13696# So? What about this header?
edfaf76d
LK
13697case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13698 yes:no: )
c0d27fcc
MR
13699 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
13700echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13701 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
13702echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
13703 ac_header_preproc=yes
19650fd6 13704 ;;
edfaf76d 13705 no:yes:* )
c0d27fcc
MR
13706 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
13707echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13708 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
13709echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
13710 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
13711echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
13712 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
13713echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13714 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 13715echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13716 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
13717echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13718
19650fd6 13719 ;;
c0d27fcc 13720esac
ca81d7a0
JD
13721{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
13722echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
13723if test "${ac_cv_header_tiffio_h+set}" = set; then
13724 echo $ECHO_N "(cached) $ECHO_C" >&6
13725else
13726 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 13727fi
ca81d7a0
JD
13728{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13729echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
13730
13731fi
98418dba
CW
13732if test $ac_cv_header_tiffio_h = yes; then
13733 tifflibs="-lz -lm"
13734 # At least one tiff package requires the jpeg library.
13735 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
ca81d7a0
JD
13736 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
13737echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 13738if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 13739 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13740else
503d2be0 13741 ac_check_lib_save_LIBS=$LIBS
98418dba 13742LIBS="-ltiff $tifflibs $LIBS"
503d2be0 13743cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13744/* confdefs.h. */
13745_ACEOF
13746cat confdefs.h >>conftest.$ac_ext
13747cat >>conftest.$ac_ext <<_ACEOF
13748/* end confdefs.h. */
503d2be0 13749
ca81d7a0
JD
13750/* Override any GCC internal prototype to avoid an error.
13751 Use char because int might match the return type of a GCC
13752 builtin and then its argument prototype would still apply. */
503d2be0
AS
13753#ifdef __cplusplus
13754extern "C"
13755#endif
98418dba 13756char TIFFGetVersion ();
503d2be0
AS
13757int
13758main ()
13759{
ca81d7a0 13760return TIFFGetVersion ();
503d2be0
AS
13761 ;
13762 return 0;
13763}
13764_ACEOF
13765rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13766if { (ac_try="$ac_link"
13767case "(($ac_try" in
13768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13769 *) ac_try_echo=$ac_try;;
13770esac
13771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13772 (eval "$ac_link") 2>conftest.er1
503d2be0 13773 ac_status=$?
edfaf76d
LK
13774 grep -v '^ *+' conftest.er1 >conftest.err
13775 rm -f conftest.er1
13776 cat conftest.err >&5
c0d27fcc 13777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13778 (exit $ac_status); } && {
13779 test -z "$ac_c_werror_flag" ||
13780 test ! -s conftest.err
13781 } && test -s conftest$ac_exeext &&
13782 $as_test_x conftest$ac_exeext; then
98418dba 13783 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
13784else
13785 echo "$as_me: failed program was:" >&5
19650fd6
AS
13786sed 's/^/| /' conftest.$ac_ext >&5
13787
ca81d7a0 13788 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 13789fi
ca81d7a0 13790
f053c89f 13791rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13792 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
13793LIBS=$ac_check_lib_save_LIBS
13794fi
ca81d7a0
JD
13795{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13796echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
13797if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
13798 HAVE_TIFF=yes
13799fi
13800
13801fi
73b77ee5 13802
c0d27fcc 13803
98418dba
CW
13804 fi
13805
13806 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 13807
c0d27fcc 13808cat >>confdefs.h <<\_ACEOF
98418dba 13809#define HAVE_TIFF 1
c0d27fcc 13810_ACEOF
98418dba
CW
13811
13812 fi
73b77ee5
GM
13813fi
13814
9aeb8aaa 13815### Use -lgif or -lungif if available, unless `--with-gif=no'.
98418dba 13816HAVE_GIF=no
9aeb8aaa
GM
13817if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
13818 if test "${ac_cv_header_gif_lib_h+set}" = set; then
ca81d7a0
JD
13819 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
13820echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
13821if test "${ac_cv_header_gif_lib_h+set}" = set; then
13822 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13823fi
ca81d7a0
JD
13824{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
13825echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 13826else
c0d27fcc 13827 # Is the header compilable?
ca81d7a0
JD
13828{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
13829echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 13830cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13831/* confdefs.h. */
13832_ACEOF
13833cat confdefs.h >>conftest.$ac_ext
13834cat >>conftest.$ac_ext <<_ACEOF
13835/* end confdefs.h. */
c0d27fcc
MR
13836$ac_includes_default
13837#include <gif_lib.h>
13838_ACEOF
13839rm -f conftest.$ac_objext
ca81d7a0
JD
13840if { (ac_try="$ac_compile"
13841case "(($ac_try" in
13842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13843 *) ac_try_echo=$ac_try;;
13844esac
13845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13846 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13847 ac_status=$?
edfaf76d
LK
13848 grep -v '^ *+' conftest.er1 >conftest.err
13849 rm -f conftest.er1
13850 cat conftest.err >&5
c0d27fcc 13851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13852 (exit $ac_status); } && {
13853 test -z "$ac_c_werror_flag" ||
13854 test ! -s conftest.err
13855 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13856 ac_header_compiler=yes
13857else
13858 echo "$as_me: failed program was:" >&5
19650fd6
AS
13859sed 's/^/| /' conftest.$ac_ext >&5
13860
ca81d7a0 13861 ac_header_compiler=no
c0d27fcc 13862fi
ca81d7a0
JD
13863
13864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13865{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13866echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13867
13868# Is the header present?
ca81d7a0
JD
13869{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
13870echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 13871cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13872/* confdefs.h. */
13873_ACEOF
13874cat confdefs.h >>conftest.$ac_ext
13875cat >>conftest.$ac_ext <<_ACEOF
13876/* end confdefs.h. */
98418dba
CW
13877#include <gif_lib.h>
13878_ACEOF
ca81d7a0
JD
13879if { (ac_try="$ac_cpp conftest.$ac_ext"
13880case "(($ac_try" in
13881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13882 *) ac_try_echo=$ac_try;;
13883esac
13884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13885 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13886 ac_status=$?
6bae0ccf 13887 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13888 rm -f conftest.er1
13889 cat conftest.err >&5
c0d27fcc 13890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13891 (exit $ac_status); } >/dev/null && {
13892 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13893 test ! -s conftest.err
13894 }; then
c0d27fcc 13895 ac_header_preproc=yes
98418dba
CW
13896else
13897 echo "$as_me: failed program was:" >&5
19650fd6
AS
13898sed 's/^/| /' conftest.$ac_ext >&5
13899
c0d27fcc 13900 ac_header_preproc=no
98418dba 13901fi
ca81d7a0 13902
98418dba 13903rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13904{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13905echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13906
13907# So? What about this header?
edfaf76d
LK
13908case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13909 yes:no: )
c0d27fcc
MR
13910 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
13911echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13912 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
13913echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
13914 ac_header_preproc=yes
19650fd6 13915 ;;
edfaf76d 13916 no:yes:* )
c0d27fcc
MR
13917 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
13918echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13919 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
13920echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
13921 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
13922echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
13923 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
13924echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13925 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 13926echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13927 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
13928echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13929
19650fd6 13930 ;;
c0d27fcc 13931esac
ca81d7a0
JD
13932{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
13933echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
13934if test "${ac_cv_header_gif_lib_h+set}" = set; then
13935 echo $ECHO_N "(cached) $ECHO_C" >&6
13936else
13937 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 13938fi
ca81d7a0
JD
13939{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
13940echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
13941
13942fi
98418dba
CW
13943if test $ac_cv_header_gif_lib_h = yes; then
13944 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13945# Earlier versions can crash Emacs.
63175cd2
GM
13946 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
13947echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
13948if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
503d2be0 13949 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13950else
503d2be0 13951 ac_check_lib_save_LIBS=$LIBS
63175cd2 13952LIBS="-lgif $LIBS"
503d2be0 13953cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13954/* confdefs.h. */
13955_ACEOF
13956cat confdefs.h >>conftest.$ac_ext
13957cat >>conftest.$ac_ext <<_ACEOF
13958/* end confdefs.h. */
73b77ee5 13959
ca81d7a0
JD
13960/* Override any GCC internal prototype to avoid an error.
13961 Use char because int might match the return type of a GCC
13962 builtin and then its argument prototype would still apply. */
98418dba
CW
13963#ifdef __cplusplus
13964extern "C"
13965#endif
98418dba 13966char EGifPutExtensionLast ();
503d2be0
AS
13967int
13968main ()
13969{
ca81d7a0 13970return EGifPutExtensionLast ();
503d2be0
AS
13971 ;
13972 return 0;
13973}
13974_ACEOF
13975rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13976if { (ac_try="$ac_link"
13977case "(($ac_try" in
13978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13979 *) ac_try_echo=$ac_try;;
13980esac
13981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13982 (eval "$ac_link") 2>conftest.er1
503d2be0 13983 ac_status=$?
edfaf76d
LK
13984 grep -v '^ *+' conftest.er1 >conftest.err
13985 rm -f conftest.er1
13986 cat conftest.err >&5
c0d27fcc 13987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13988 (exit $ac_status); } && {
13989 test -z "$ac_c_werror_flag" ||
13990 test ! -s conftest.err
13991 } && test -s conftest$ac_exeext &&
13992 $as_test_x conftest$ac_exeext; then
63175cd2 13993 ac_cv_lib_gif_EGifPutExtensionLast=yes
35996d22 13994else
98418dba 13995 echo "$as_me: failed program was:" >&5
19650fd6
AS
13996sed 's/^/| /' conftest.$ac_ext >&5
13997
63175cd2 13998 ac_cv_lib_gif_EGifPutExtensionLast=no
98418dba 13999fi
ca81d7a0 14000
f053c89f 14001rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14002 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14003LIBS=$ac_check_lib_save_LIBS
14004fi
63175cd2
GM
14005{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14006echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14007if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
98418dba 14008 HAVE_GIF=yes
9aeb8aaa 14009else
63175cd2 14010 try_libungif=yes
98418dba
CW
14011fi
14012
14013fi
14014
c0d27fcc 14015
9aeb8aaa
GM
14016
14017 if test "$HAVE_GIF" = yes; then
63175cd2 14018 ac_gif_lib_name="-lgif"
9aeb8aaa
GM
14019 fi
14020
63175cd2
GM
14021# If gif_lib.h but no libgif, try libungif.
14022 if test x"$try_libungif" = xyes; then
14023 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
14024echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
14025if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
9aeb8aaa
GM
14026 echo $ECHO_N "(cached) $ECHO_C" >&6
14027else
14028 ac_check_lib_save_LIBS=$LIBS
63175cd2 14029LIBS="-lungif $LIBS"
9aeb8aaa
GM
14030cat >conftest.$ac_ext <<_ACEOF
14031/* confdefs.h. */
14032_ACEOF
14033cat confdefs.h >>conftest.$ac_ext
14034cat >>conftest.$ac_ext <<_ACEOF
14035/* end confdefs.h. */
14036
14037/* Override any GCC internal prototype to avoid an error.
14038 Use char because int might match the return type of a GCC
14039 builtin and then its argument prototype would still apply. */
14040#ifdef __cplusplus
14041extern "C"
14042#endif
14043char EGifPutExtensionLast ();
14044int
14045main ()
14046{
14047return EGifPutExtensionLast ();
14048 ;
14049 return 0;
14050}
14051_ACEOF
14052rm -f conftest.$ac_objext conftest$ac_exeext
14053if { (ac_try="$ac_link"
14054case "(($ac_try" in
14055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14056 *) ac_try_echo=$ac_try;;
14057esac
14058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14059 (eval "$ac_link") 2>conftest.er1
14060 ac_status=$?
14061 grep -v '^ *+' conftest.er1 >conftest.err
14062 rm -f conftest.er1
14063 cat conftest.err >&5
14064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14065 (exit $ac_status); } && {
14066 test -z "$ac_c_werror_flag" ||
14067 test ! -s conftest.err
14068 } && test -s conftest$ac_exeext &&
14069 $as_test_x conftest$ac_exeext; then
63175cd2 14070 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9aeb8aaa
GM
14071else
14072 echo "$as_me: failed program was:" >&5
14073sed 's/^/| /' conftest.$ac_ext >&5
14074
63175cd2 14075 ac_cv_lib_ungif_EGifPutExtensionLast=no
9aeb8aaa
GM
14076fi
14077
14078rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14079 conftest$ac_exeext conftest.$ac_ext
14080LIBS=$ac_check_lib_save_LIBS
14081fi
63175cd2
GM
14082{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14083echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14084if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9aeb8aaa
GM
14085 HAVE_GIF=yes
14086fi
14087
14088
14089 if test "$HAVE_GIF" = yes; then
14090
14091cat >>confdefs.h <<\_ACEOF
63175cd2 14092#define LIBGIF -lungif
9aeb8aaa
GM
14093_ACEOF
14094
63175cd2 14095 ac_gif_lib_name="-lungif"
9aeb8aaa 14096 fi
98418dba
CW
14097 fi
14098
14099 if test "${HAVE_GIF}" = "yes"; then
b936fae4 14100
c0d27fcc 14101cat >>confdefs.h <<\_ACEOF
98418dba 14102#define HAVE_GIF 1
c0d27fcc 14103_ACEOF
98418dba 14104
5afbeb22
JD
14105 fi
14106fi
14107
14108if test "${HAVE_X11}" = "yes"; then
14109 MISSING=""
14110 WITH_NO=""
14111 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14112 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14113 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14114 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14115 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14116 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14117 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14118 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14119 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14120 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14121
14122 if test "X${MISSING}" != X; then
14123 { { echo "$as_me:$LINENO: error: The following required libraries was not found:
14124 $MISSING
86e73516 14125Maybe some development libraries/packages are missing?
5afbeb22
JD
14126If you don't want to link with them give
14127 $WITH_NO
14128as options to configure" >&5
14129echo "$as_me: error: The following required libraries was not found:
14130 $MISSING
86e73516 14131Maybe some development libraries/packages are missing?
5afbeb22
JD
14132If you don't want to link with them give
14133 $WITH_NO
14134as options to configure" >&2;}
86e73516 14135 { (exit 1); exit 1; }; }
98418dba
CW
14136 fi
14137fi
14138
79011b82
NR
14139### Use -lgpm if available, unless `--with-gpm=no'.
14140HAVE_GPM=no
14141if test "${with_gpm}" != "no"; then
14142 if test "${ac_cv_header_gpm_h+set}" = set; then
14143 { echo "$as_me:$LINENO: checking for gpm.h" >&5
14144echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14145if test "${ac_cv_header_gpm_h+set}" = set; then
14146 echo $ECHO_N "(cached) $ECHO_C" >&6
14147fi
14148{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14149echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14150else
14151 # Is the header compilable?
14152{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
14153echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
14154cat >conftest.$ac_ext <<_ACEOF
14155/* confdefs.h. */
14156_ACEOF
14157cat confdefs.h >>conftest.$ac_ext
14158cat >>conftest.$ac_ext <<_ACEOF
14159/* end confdefs.h. */
14160$ac_includes_default
14161#include <gpm.h>
14162_ACEOF
14163rm -f conftest.$ac_objext
14164if { (ac_try="$ac_compile"
14165case "(($ac_try" in
14166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14167 *) ac_try_echo=$ac_try;;
14168esac
14169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14170 (eval "$ac_compile") 2>conftest.er1
14171 ac_status=$?
14172 grep -v '^ *+' conftest.er1 >conftest.err
14173 rm -f conftest.er1
14174 cat conftest.err >&5
14175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14176 (exit $ac_status); } && {
14177 test -z "$ac_c_werror_flag" ||
14178 test ! -s conftest.err
14179 } && test -s conftest.$ac_objext; then
14180 ac_header_compiler=yes
14181else
14182 echo "$as_me: failed program was:" >&5
14183sed 's/^/| /' conftest.$ac_ext >&5
14184
14185 ac_header_compiler=no
14186fi
14187
14188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14189{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14190echo "${ECHO_T}$ac_header_compiler" >&6; }
14191
14192# Is the header present?
14193{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
14194echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
14195cat >conftest.$ac_ext <<_ACEOF
14196/* confdefs.h. */
14197_ACEOF
14198cat confdefs.h >>conftest.$ac_ext
14199cat >>conftest.$ac_ext <<_ACEOF
14200/* end confdefs.h. */
14201#include <gpm.h>
14202_ACEOF
14203if { (ac_try="$ac_cpp conftest.$ac_ext"
14204case "(($ac_try" in
14205 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14206 *) ac_try_echo=$ac_try;;
14207esac
14208eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14209 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14210 ac_status=$?
14211 grep -v '^ *+' conftest.er1 >conftest.err
14212 rm -f conftest.er1
14213 cat conftest.err >&5
14214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14215 (exit $ac_status); } >/dev/null && {
14216 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14217 test ! -s conftest.err
14218 }; then
14219 ac_header_preproc=yes
14220else
14221 echo "$as_me: failed program was:" >&5
14222sed 's/^/| /' conftest.$ac_ext >&5
14223
14224 ac_header_preproc=no
14225fi
14226
14227rm -f conftest.err conftest.$ac_ext
14228{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14229echo "${ECHO_T}$ac_header_preproc" >&6; }
14230
14231# So? What about this header?
14232case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14233 yes:no: )
14234 { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14235echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14236 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
14237echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
14238 ac_header_preproc=yes
14239 ;;
14240 no:yes:* )
14241 { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
14242echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
14243 { echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
14244echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
14245 { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
14246echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
14247 { echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
14248echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
14249 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
14250echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
14251 { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
14252echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
14253
14254 ;;
14255esac
14256{ echo "$as_me:$LINENO: checking for gpm.h" >&5
14257echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14258if test "${ac_cv_header_gpm_h+set}" = set; then
14259 echo $ECHO_N "(cached) $ECHO_C" >&6
14260else
14261 ac_cv_header_gpm_h=$ac_header_preproc
14262fi
14263{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14264echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14265
14266fi
14267if test $ac_cv_header_gpm_h = yes; then
14268 { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
14269echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
14270if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
14271 echo $ECHO_N "(cached) $ECHO_C" >&6
14272else
14273 ac_check_lib_save_LIBS=$LIBS
14274LIBS="-lgpm $LIBS"
14275cat >conftest.$ac_ext <<_ACEOF
14276/* confdefs.h. */
14277_ACEOF
14278cat confdefs.h >>conftest.$ac_ext
14279cat >>conftest.$ac_ext <<_ACEOF
14280/* end confdefs.h. */
14281
14282/* Override any GCC internal prototype to avoid an error.
14283 Use char because int might match the return type of a GCC
14284 builtin and then its argument prototype would still apply. */
14285#ifdef __cplusplus
14286extern "C"
14287#endif
14288char Gpm_Open ();
14289int
14290main ()
14291{
14292return Gpm_Open ();
14293 ;
14294 return 0;
14295}
14296_ACEOF
14297rm -f conftest.$ac_objext conftest$ac_exeext
14298if { (ac_try="$ac_link"
14299case "(($ac_try" in
14300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14301 *) ac_try_echo=$ac_try;;
14302esac
14303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14304 (eval "$ac_link") 2>conftest.er1
14305 ac_status=$?
14306 grep -v '^ *+' conftest.er1 >conftest.err
14307 rm -f conftest.er1
14308 cat conftest.err >&5
14309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14310 (exit $ac_status); } && {
14311 test -z "$ac_c_werror_flag" ||
14312 test ! -s conftest.err
14313 } && test -s conftest$ac_exeext &&
14314 $as_test_x conftest$ac_exeext; then
14315 ac_cv_lib_gpm_Gpm_Open=yes
14316else
14317 echo "$as_me: failed program was:" >&5
14318sed 's/^/| /' conftest.$ac_ext >&5
14319
14320 ac_cv_lib_gpm_Gpm_Open=no
14321fi
14322
14323rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14324 conftest$ac_exeext conftest.$ac_ext
14325LIBS=$ac_check_lib_save_LIBS
14326fi
14327{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14328echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
14329if test $ac_cv_lib_gpm_Gpm_Open = yes; then
14330 HAVE_GPM=yes
14331fi
14332
14333fi
14334
14335
14336fi
14337
14338if test "${HAVE_GPM}" = "yes"; then
14339
14340cat >>confdefs.h <<\_ACEOF
14341#define HAVE_GPM 1
14342_ACEOF
14343
14344fi
14345
cef11da2 14346if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
ca81d7a0
JD
14347 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14348echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14349if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14350 echo $ECHO_N "(cached) $ECHO_C" >&6
14351fi
ca81d7a0
JD
14352{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14353echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14354else
14355 # Is the header compilable?
ca81d7a0
JD
14356{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
14357echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
14358cat >conftest.$ac_ext <<_ACEOF
14359/* confdefs.h. */
14360_ACEOF
14361cat confdefs.h >>conftest.$ac_ext
14362cat >>conftest.$ac_ext <<_ACEOF
14363/* end confdefs.h. */
14364$ac_includes_default
14365#include <malloc/malloc.h>
14366_ACEOF
14367rm -f conftest.$ac_objext
ca81d7a0
JD
14368if { (ac_try="$ac_compile"
14369case "(($ac_try" in
14370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14371 *) ac_try_echo=$ac_try;;
14372esac
14373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14374 (eval "$ac_compile") 2>conftest.er1
cef11da2 14375 ac_status=$?
edfaf76d
LK
14376 grep -v '^ *+' conftest.er1 >conftest.err
14377 rm -f conftest.er1
14378 cat conftest.err >&5
cef11da2 14379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14380 (exit $ac_status); } && {
14381 test -z "$ac_c_werror_flag" ||
14382 test ! -s conftest.err
14383 } && test -s conftest.$ac_objext; then
cef11da2
ST
14384 ac_header_compiler=yes
14385else
14386 echo "$as_me: failed program was:" >&5
14387sed 's/^/| /' conftest.$ac_ext >&5
14388
ca81d7a0 14389 ac_header_compiler=no
cef11da2 14390fi
ca81d7a0
JD
14391
14392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14393{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14394echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14395
14396# Is the header present?
ca81d7a0
JD
14397{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
14398echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
14399cat >conftest.$ac_ext <<_ACEOF
14400/* confdefs.h. */
14401_ACEOF
14402cat confdefs.h >>conftest.$ac_ext
14403cat >>conftest.$ac_ext <<_ACEOF
14404/* end confdefs.h. */
14405#include <malloc/malloc.h>
14406_ACEOF
ca81d7a0
JD
14407if { (ac_try="$ac_cpp conftest.$ac_ext"
14408case "(($ac_try" in
14409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14410 *) ac_try_echo=$ac_try;;
14411esac
14412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14413 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14414 ac_status=$?
14415 grep -v '^ *+' conftest.er1 >conftest.err
14416 rm -f conftest.er1
14417 cat conftest.err >&5
14418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14419 (exit $ac_status); } >/dev/null && {
14420 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14421 test ! -s conftest.err
14422 }; then
cef11da2
ST
14423 ac_header_preproc=yes
14424else
14425 echo "$as_me: failed program was:" >&5
14426sed 's/^/| /' conftest.$ac_ext >&5
14427
14428 ac_header_preproc=no
14429fi
ca81d7a0 14430
cef11da2 14431rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14432{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14433echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14434
14435# So? What about this header?
edfaf76d
LK
14436case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14437 yes:no: )
cef11da2
ST
14438 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14439echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14440 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14441echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
14442 ac_header_preproc=yes
cef11da2 14443 ;;
edfaf76d 14444 no:yes:* )
cef11da2
ST
14445 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14446echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14447 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14448echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14449 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14450echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14451 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14452echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
14453 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14454echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14455 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14456echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14457
cef11da2
ST
14458 ;;
14459esac
ca81d7a0
JD
14460{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14461echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14462if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14463 echo $ECHO_N "(cached) $ECHO_C" >&6
14464else
14465 ac_cv_header_malloc_malloc_h=$ac_header_preproc
14466fi
ca81d7a0
JD
14467{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14468echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14469
14470fi
14471if test $ac_cv_header_malloc_malloc_h = yes; then
14472
14473cat >>confdefs.h <<\_ACEOF
14474#define HAVE_MALLOC_MALLOC_H 1
14475_ACEOF
14476
14477fi
14478
14479
14480
5d6da11e 14481### Use Mac OS X Carbon API to implement GUI.
e0f712ba 14482if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 14483
c0d27fcc 14484cat >>confdefs.h <<\_ACEOF
e0f712ba 14485#define HAVE_CARBON 1
c0d27fcc 14486_ACEOF
e0f712ba 14487
6a3a24fa
JD
14488 ## Specify the install directory
14489 carbon_appdir=
14490 if test "${carbon_appdir_x}" != ""; then
14491 case ${carbon_appdir_x} in
14492 y | ye | yes) carbon_appdir=/Applications ;;
14493 * ) carbon_appdir=${carbon_appdir_x} ;;
14494 esac
14495 fi
8f417b3b
AS
14496 # We also have mouse menus.
14497 HAVE_MENUS=yes
e0f712ba
AC
14498fi
14499
98418dba
CW
14500### Use session management (-lSM -lICE) if available
14501HAVE_X_SM=no
14502if test "${HAVE_X11}" = "yes"; then
c0d27fcc 14503 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
ca81d7a0
JD
14504 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14505echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
14506if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14507 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14508fi
ca81d7a0
JD
14509{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14510echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 14511else
c0d27fcc 14512 # Is the header compilable?
ca81d7a0
JD
14513{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
14514echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 14515cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14516/* confdefs.h. */
14517_ACEOF
14518cat confdefs.h >>conftest.$ac_ext
14519cat >>conftest.$ac_ext <<_ACEOF
14520/* end confdefs.h. */
c0d27fcc
MR
14521$ac_includes_default
14522#include <X11/SM/SMlib.h>
14523_ACEOF
14524rm -f conftest.$ac_objext
ca81d7a0
JD
14525if { (ac_try="$ac_compile"
14526case "(($ac_try" in
14527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14528 *) ac_try_echo=$ac_try;;
14529esac
14530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14531 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14532 ac_status=$?
edfaf76d
LK
14533 grep -v '^ *+' conftest.er1 >conftest.err
14534 rm -f conftest.er1
14535 cat conftest.err >&5
c0d27fcc 14536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14537 (exit $ac_status); } && {
14538 test -z "$ac_c_werror_flag" ||
14539 test ! -s conftest.err
14540 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14541 ac_header_compiler=yes
14542else
14543 echo "$as_me: failed program was:" >&5
19650fd6
AS
14544sed 's/^/| /' conftest.$ac_ext >&5
14545
ca81d7a0 14546 ac_header_compiler=no
c0d27fcc 14547fi
ca81d7a0
JD
14548
14549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14550{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14551echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14552
14553# Is the header present?
ca81d7a0
JD
14554{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
14555echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 14556cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14557/* confdefs.h. */
14558_ACEOF
14559cat confdefs.h >>conftest.$ac_ext
14560cat >>conftest.$ac_ext <<_ACEOF
14561/* end confdefs.h. */
98418dba
CW
14562#include <X11/SM/SMlib.h>
14563_ACEOF
ca81d7a0
JD
14564if { (ac_try="$ac_cpp conftest.$ac_ext"
14565case "(($ac_try" in
14566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14567 *) ac_try_echo=$ac_try;;
14568esac
14569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14570 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14571 ac_status=$?
6bae0ccf 14572 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14573 rm -f conftest.er1
14574 cat conftest.err >&5
c0d27fcc 14575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14576 (exit $ac_status); } >/dev/null && {
14577 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14578 test ! -s conftest.err
14579 }; then
c0d27fcc 14580 ac_header_preproc=yes
98418dba
CW
14581else
14582 echo "$as_me: failed program was:" >&5
19650fd6
AS
14583sed 's/^/| /' conftest.$ac_ext >&5
14584
c0d27fcc 14585 ac_header_preproc=no
98418dba 14586fi
ca81d7a0 14587
98418dba 14588rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14589{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14590echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14591
14592# So? What about this header?
edfaf76d
LK
14593case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14594 yes:no: )
c0d27fcc
MR
14595 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14596echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14597 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
14598echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
14599 ac_header_preproc=yes
19650fd6 14600 ;;
edfaf76d 14601 no:yes:* )
c0d27fcc
MR
14602 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
14603echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14604 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
14605echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
14606 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
14607echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
14608 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
14609echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14610 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 14611echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14612 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
14613echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14614
19650fd6 14615 ;;
c0d27fcc 14616esac
ca81d7a0
JD
14617{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14618echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14619if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14620 echo $ECHO_N "(cached) $ECHO_C" >&6
14621else
14622 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 14623fi
ca81d7a0
JD
14624{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14625echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
14626
14627fi
98418dba 14628if test $ac_cv_header_X11_SM_SMlib_h = yes; then
ca81d7a0
JD
14629 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
14630echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 14631if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 14632 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14633else
503d2be0 14634 ac_check_lib_save_LIBS=$LIBS
1660500f 14635LIBS="-lSM -lICE $LIBS"
503d2be0 14636cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14637/* confdefs.h. */
14638_ACEOF
14639cat confdefs.h >>conftest.$ac_ext
14640cat >>conftest.$ac_ext <<_ACEOF
14641/* end confdefs.h. */
503d2be0 14642
ca81d7a0
JD
14643/* Override any GCC internal prototype to avoid an error.
14644 Use char because int might match the return type of a GCC
14645 builtin and then its argument prototype would still apply. */
503d2be0
AS
14646#ifdef __cplusplus
14647extern "C"
14648#endif
98418dba 14649char SmcOpenConnection ();
503d2be0
AS
14650int
14651main ()
14652{
ca81d7a0 14653return SmcOpenConnection ();
503d2be0
AS
14654 ;
14655 return 0;
14656}
14657_ACEOF
14658rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14659if { (ac_try="$ac_link"
14660case "(($ac_try" in
14661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14662 *) ac_try_echo=$ac_try;;
14663esac
14664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14665 (eval "$ac_link") 2>conftest.er1
503d2be0 14666 ac_status=$?
edfaf76d
LK
14667 grep -v '^ *+' conftest.er1 >conftest.err
14668 rm -f conftest.er1
14669 cat conftest.err >&5
c0d27fcc 14670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14671 (exit $ac_status); } && {
14672 test -z "$ac_c_werror_flag" ||
14673 test ! -s conftest.err
14674 } && test -s conftest$ac_exeext &&
14675 $as_test_x conftest$ac_exeext; then
98418dba 14676 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
14677else
14678 echo "$as_me: failed program was:" >&5
19650fd6
AS
14679sed 's/^/| /' conftest.$ac_ext >&5
14680
ca81d7a0 14681 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 14682fi
ca81d7a0 14683
f053c89f 14684rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14685 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14686LIBS=$ac_check_lib_save_LIBS
14687fi
ca81d7a0
JD
14688{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
14689echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
14690if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
14691 HAVE_X_SM=yes
73b77ee5
GM
14692fi
14693
73b77ee5 14694fi
73b77ee5 14695
c0d27fcc
MR
14696
14697
98418dba 14698 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 14699
c0d27fcc 14700cat >>confdefs.h <<\_ACEOF
98418dba 14701#define HAVE_X_SM 1
c0d27fcc 14702_ACEOF
73b77ee5 14703
98418dba
CW
14704 case "$LIBS" in
14705 *-lSM*) ;;
14706 *) LIBS="-lSM -lICE $LIBS" ;;
14707 esac
73b77ee5 14708 fi
98418dba 14709fi
73b77ee5 14710
98418dba 14711# If netdb.h doesn't declare h_errno, we must declare it by hand.
ca81d7a0
JD
14712{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
14713echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
14714if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
14715 echo $ECHO_N "(cached) $ECHO_C" >&6
14716else
14717 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14718/* confdefs.h. */
14719_ACEOF
14720cat confdefs.h >>conftest.$ac_ext
14721cat >>conftest.$ac_ext <<_ACEOF
14722/* end confdefs.h. */
98418dba 14723#include <netdb.h>
503d2be0
AS
14724int
14725main ()
14726{
98418dba 14727return h_errno;
503d2be0
AS
14728 ;
14729 return 0;
14730}
14731_ACEOF
14732rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14733if { (ac_try="$ac_link"
14734case "(($ac_try" in
14735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14736 *) ac_try_echo=$ac_try;;
14737esac
14738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14739 (eval "$ac_link") 2>conftest.er1
503d2be0 14740 ac_status=$?
edfaf76d
LK
14741 grep -v '^ *+' conftest.er1 >conftest.err
14742 rm -f conftest.er1
14743 cat conftest.err >&5
c0d27fcc 14744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14745 (exit $ac_status); } && {
14746 test -z "$ac_c_werror_flag" ||
14747 test ! -s conftest.err
14748 } && test -s conftest$ac_exeext &&
14749 $as_test_x conftest$ac_exeext; then
98418dba 14750 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 14751else
503d2be0 14752 echo "$as_me: failed program was:" >&5
19650fd6
AS
14753sed 's/^/| /' conftest.$ac_ext >&5
14754
ca81d7a0 14755 emacs_cv_netdb_declares_h_errno=no
73b77ee5 14756fi
ca81d7a0 14757
f053c89f 14758rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14759 conftest$ac_exeext conftest.$ac_ext
98418dba 14760fi
ca81d7a0
JD
14761{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
14762echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 14763if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 14764
c0d27fcc 14765cat >>confdefs.h <<\_ACEOF
98418dba 14766#define HAVE_H_ERRNO 1
c0d27fcc 14767_ACEOF
73b77ee5 14768
98418dba
CW
14769fi
14770
14771# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14772# for constant arguments. Useless!
ca81d7a0
JD
14773{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
14774echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
14775if test "${ac_cv_working_alloca_h+set}" = set; then
14776 echo $ECHO_N "(cached) $ECHO_C" >&6
14777else
14778 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14779/* confdefs.h. */
14780_ACEOF
14781cat confdefs.h >>conftest.$ac_ext
14782cat >>conftest.$ac_ext <<_ACEOF
14783/* end confdefs.h. */
98418dba 14784#include <alloca.h>
503d2be0
AS
14785int
14786main ()
14787{
98418dba 14788char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 14789 if (p) return 0;
503d2be0
AS
14790 ;
14791 return 0;
14792}
14793_ACEOF
14794rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14795if { (ac_try="$ac_link"
14796case "(($ac_try" in
14797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14798 *) ac_try_echo=$ac_try;;
14799esac
14800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14801 (eval "$ac_link") 2>conftest.er1
503d2be0 14802 ac_status=$?
edfaf76d
LK
14803 grep -v '^ *+' conftest.er1 >conftest.err
14804 rm -f conftest.er1
14805 cat conftest.err >&5
c0d27fcc 14806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14807 (exit $ac_status); } && {
14808 test -z "$ac_c_werror_flag" ||
14809 test ! -s conftest.err
14810 } && test -s conftest$ac_exeext &&
14811 $as_test_x conftest$ac_exeext; then
98418dba 14812 ac_cv_working_alloca_h=yes
73b77ee5 14813else
503d2be0 14814 echo "$as_me: failed program was:" >&5
19650fd6
AS
14815sed 's/^/| /' conftest.$ac_ext >&5
14816
ca81d7a0 14817 ac_cv_working_alloca_h=no
73b77ee5 14818fi
ca81d7a0 14819
f053c89f 14820rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14821 conftest$ac_exeext conftest.$ac_ext
98418dba 14822fi
ca81d7a0
JD
14823{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
14824echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 14825if test $ac_cv_working_alloca_h = yes; then
73b77ee5 14826
c0d27fcc 14827cat >>confdefs.h <<\_ACEOF
98418dba 14828#define HAVE_ALLOCA_H 1
c0d27fcc 14829_ACEOF
98418dba
CW
14830
14831fi
14832
ca81d7a0
JD
14833{ echo "$as_me:$LINENO: checking for alloca" >&5
14834echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
14835if test "${ac_cv_func_alloca_works+set}" = set; then
14836 echo $ECHO_N "(cached) $ECHO_C" >&6
14837else
503d2be0 14838 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14839/* confdefs.h. */
14840_ACEOF
14841cat confdefs.h >>conftest.$ac_ext
14842cat >>conftest.$ac_ext <<_ACEOF
14843/* end confdefs.h. */
98418dba
CW
14844#ifdef __GNUC__
14845# define alloca __builtin_alloca
14846#else
14847# ifdef _MSC_VER
14848# include <malloc.h>
14849# define alloca _alloca
14850# else
f053c89f 14851# ifdef HAVE_ALLOCA_H
98418dba
CW
14852# include <alloca.h>
14853# else
14854# ifdef _AIX
14855 #pragma alloca
14856# else
14857# ifndef alloca /* predefined by HP cc +Olibcalls */
14858char *alloca ();
14859# endif
14860# endif
14861# endif
14862# endif
14863#endif
14864
503d2be0
AS
14865int
14866main ()
14867{
98418dba 14868char *p = (char *) alloca (1);
ca81d7a0 14869 if (p) return 0;
503d2be0
AS
14870 ;
14871 return 0;
14872}
14873_ACEOF
14874rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14875if { (ac_try="$ac_link"
14876case "(($ac_try" in
14877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14878 *) ac_try_echo=$ac_try;;
14879esac
14880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14881 (eval "$ac_link") 2>conftest.er1
503d2be0 14882 ac_status=$?
edfaf76d
LK
14883 grep -v '^ *+' conftest.er1 >conftest.err
14884 rm -f conftest.er1
14885 cat conftest.err >&5
c0d27fcc 14886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14887 (exit $ac_status); } && {
14888 test -z "$ac_c_werror_flag" ||
14889 test ! -s conftest.err
14890 } && test -s conftest$ac_exeext &&
14891 $as_test_x conftest$ac_exeext; then
98418dba 14892 ac_cv_func_alloca_works=yes
ac95a621 14893else
503d2be0 14894 echo "$as_me: failed program was:" >&5
19650fd6
AS
14895sed 's/^/| /' conftest.$ac_ext >&5
14896
ca81d7a0 14897 ac_cv_func_alloca_works=no
ac95a621 14898fi
ca81d7a0 14899
f053c89f 14900rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14901 conftest$ac_exeext conftest.$ac_ext
98418dba 14902fi
ca81d7a0
JD
14903{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
14904echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 14905
98418dba
CW
14906if test $ac_cv_func_alloca_works = yes; then
14907
c0d27fcc 14908cat >>confdefs.h <<\_ACEOF
98418dba 14909#define HAVE_ALLOCA 1
c0d27fcc 14910_ACEOF
98418dba
CW
14911
14912else
14913 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
14914# that cause trouble. Some versions do not even contain alloca or
14915# contain a buggy version. If you still want to use their alloca,
14916# use ar to extract alloca.o from them instead of compiling alloca.c.
14917
ca81d7a0 14918ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 14919
c0d27fcc 14920cat >>confdefs.h <<\_ACEOF
98418dba 14921#define C_ALLOCA 1
c0d27fcc 14922_ACEOF
98418dba 14923
c0d27fcc 14924
ca81d7a0
JD
14925{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
14926echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
14927if test "${ac_cv_os_cray+set}" = set; then
14928 echo $ECHO_N "(cached) $ECHO_C" >&6
14929else
14930 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14931/* confdefs.h. */
14932_ACEOF
14933cat confdefs.h >>conftest.$ac_ext
14934cat >>conftest.$ac_ext <<_ACEOF
14935/* end confdefs.h. */
ca81d7a0 14936#if defined CRAY && ! defined CRAY2
98418dba
CW
14937webecray
14938#else
14939wenotbecray
14940#endif
14941
14942_ACEOF
14943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 14944 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
14945 ac_cv_os_cray=yes
14946else
14947 ac_cv_os_cray=no
14948fi
14949rm -f conftest*
ac95a621 14950
98418dba 14951fi
ca81d7a0
JD
14952{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
14953echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
14954if test $ac_cv_os_cray = yes; then
14955 for ac_func in _getb67 GETB67 getb67; do
14956 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
14957{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14958echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14959if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 14960 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14961else
503d2be0 14962 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14963/* confdefs.h. */
14964_ACEOF
14965cat confdefs.h >>conftest.$ac_ext
14966cat >>conftest.$ac_ext <<_ACEOF
14967/* end confdefs.h. */
edfaf76d
LK
14968/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14969 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14970#define $ac_func innocuous_$ac_func
14971
73b77ee5 14972/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14973 which can conflict with char $ac_func (); below.
14974 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14975 <limits.h> exists even on freestanding compilers. */
edfaf76d 14976
19650fd6
AS
14977#ifdef __STDC__
14978# include <limits.h>
14979#else
14980# include <assert.h>
14981#endif
edfaf76d
LK
14982
14983#undef $ac_func
14984
ca81d7a0
JD
14985/* Override any GCC internal prototype to avoid an error.
14986 Use char because int might match the return type of a GCC
14987 builtin and then its argument prototype would still apply. */
503d2be0
AS
14988#ifdef __cplusplus
14989extern "C"
14990#endif
503d2be0 14991char $ac_func ();
73b77ee5
GM
14992/* The GNU C library defines this for functions which it implements
14993 to always fail with ENOSYS. Some functions are actually named
14994 something starting with __ and the normal name is an alias. */
ca81d7a0 14995#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 14996choke me
73b77ee5
GM
14997#endif
14998
19650fd6
AS
14999int
15000main ()
15001{
ca81d7a0 15002return $ac_func ();
503d2be0
AS
15003 ;
15004 return 0;
15005}
15006_ACEOF
15007rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15008if { (ac_try="$ac_link"
15009case "(($ac_try" in
15010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15011 *) ac_try_echo=$ac_try;;
15012esac
15013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15014 (eval "$ac_link") 2>conftest.er1
503d2be0 15015 ac_status=$?
edfaf76d
LK
15016 grep -v '^ *+' conftest.er1 >conftest.err
15017 rm -f conftest.er1
15018 cat conftest.err >&5
c0d27fcc 15019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15020 (exit $ac_status); } && {
15021 test -z "$ac_c_werror_flag" ||
15022 test ! -s conftest.err
15023 } && test -s conftest$ac_exeext &&
15024 $as_test_x conftest$ac_exeext; then
503d2be0
AS
15025 eval "$as_ac_var=yes"
15026else
15027 echo "$as_me: failed program was:" >&5
19650fd6
AS
15028sed 's/^/| /' conftest.$ac_ext >&5
15029
ca81d7a0 15030 eval "$as_ac_var=no"
503d2be0 15031fi
ca81d7a0 15032
f053c89f 15033rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15034 conftest$ac_exeext conftest.$ac_ext
503d2be0 15035fi
ca81d7a0
JD
15036ac_res=`eval echo '${'$as_ac_var'}'`
15037 { echo "$as_me:$LINENO: result: $ac_res" >&5
15038echo "${ECHO_T}$ac_res" >&6; }
503d2be0 15039if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 15040
c0d27fcc 15041cat >>confdefs.h <<_ACEOF
98418dba 15042#define CRAY_STACKSEG_END $ac_func
c0d27fcc 15043_ACEOF
98418dba
CW
15044
15045 break
73b77ee5 15046fi
73b77ee5 15047
98418dba 15048 done
73b77ee5
GM
15049fi
15050
ca81d7a0
JD
15051{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
15052echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 15053if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 15054 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15055else
15056 if test "$cross_compiling" = yes; then
15057 ac_cv_c_stack_direction=0
73b77ee5 15058else
503d2be0 15059 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15060/* confdefs.h. */
15061_ACEOF
15062cat confdefs.h >>conftest.$ac_ext
15063cat >>conftest.$ac_ext <<_ACEOF
15064/* end confdefs.h. */
ca81d7a0 15065$ac_includes_default
503d2be0 15066int
98418dba 15067find_stack_direction ()
503d2be0 15068{
98418dba
CW
15069 static char *addr = 0;
15070 auto char dummy;
15071 if (addr == 0)
15072 {
15073 addr = &dummy;
15074 return find_stack_direction ();
15075 }
73b77ee5 15076 else
98418dba
CW
15077 return (&dummy > addr) ? 1 : -1;
15078}
ba4481b5 15079
503d2be0
AS
15080int
15081main ()
15082{
ca81d7a0 15083 return find_stack_direction () < 0;
503d2be0
AS
15084}
15085_ACEOF
98418dba 15086rm -f conftest$ac_exeext
ca81d7a0
JD
15087if { (ac_try="$ac_link"
15088case "(($ac_try" in
15089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15090 *) ac_try_echo=$ac_try;;
15091esac
15092eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15093 (eval "$ac_link") 2>&5
503d2be0 15094 ac_status=$?
c0d27fcc 15095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15096 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
15097 { (case "(($ac_try" in
15098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15099 *) ac_try_echo=$ac_try;;
15100esac
15101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15102 (eval "$ac_try") 2>&5
503d2be0 15103 ac_status=$?
c0d27fcc 15104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15105 (exit $ac_status); }; }; then
98418dba 15106 ac_cv_c_stack_direction=1
ba4481b5 15107else
98418dba
CW
15108 echo "$as_me: program exited with status $ac_status" >&5
15109echo "$as_me: failed program was:" >&5
19650fd6
AS
15110sed 's/^/| /' conftest.$ac_ext >&5
15111
c0d27fcc 15112( exit $ac_status )
98418dba 15113ac_cv_c_stack_direction=-1
ba4481b5 15114fi
ca81d7a0 15115rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 15116fi
ca81d7a0
JD
15117
15118
98418dba 15119fi
ca81d7a0
JD
15120{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
15121echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 15122
c0d27fcc 15123cat >>confdefs.h <<_ACEOF
98418dba 15124#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
15125_ACEOF
15126
ba4481b5 15127
ba4481b5
DL
15128fi
15129
c0d27fcc 15130
98418dba
CW
15131# fmod, logb, and frexp are found in -lm on most systems.
15132# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
15133
ca81d7a0
JD
15134{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
15135echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 15136if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 15137 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15138else
98418dba
CW
15139 ac_check_lib_save_LIBS=$LIBS
15140LIBS="-lm $LIBS"
15141cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15142/* confdefs.h. */
15143_ACEOF
15144cat confdefs.h >>conftest.$ac_ext
15145cat >>conftest.$ac_ext <<_ACEOF
15146/* end confdefs.h. */
ba4481b5 15147
ca81d7a0
JD
15148/* Override any GCC internal prototype to avoid an error.
15149 Use char because int might match the return type of a GCC
15150 builtin and then its argument prototype would still apply. */
98418dba
CW
15151#ifdef __cplusplus
15152extern "C"
15153#endif
98418dba 15154char sqrt ();
503d2be0
AS
15155int
15156main ()
15157{
ca81d7a0 15158return sqrt ();
503d2be0
AS
15159 ;
15160 return 0;
15161}
15162_ACEOF
15163rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15164if { (ac_try="$ac_link"
15165case "(($ac_try" in
15166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15167 *) ac_try_echo=$ac_try;;
15168esac
15169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15170 (eval "$ac_link") 2>conftest.er1
503d2be0 15171 ac_status=$?
edfaf76d
LK
15172 grep -v '^ *+' conftest.er1 >conftest.err
15173 rm -f conftest.er1
15174 cat conftest.err >&5
c0d27fcc 15175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15176 (exit $ac_status); } && {
15177 test -z "$ac_c_werror_flag" ||
15178 test ! -s conftest.err
15179 } && test -s conftest$ac_exeext &&
15180 $as_test_x conftest$ac_exeext; then
98418dba 15181 ac_cv_lib_m_sqrt=yes
ba4481b5 15182else
503d2be0 15183 echo "$as_me: failed program was:" >&5
19650fd6
AS
15184sed 's/^/| /' conftest.$ac_ext >&5
15185
ca81d7a0 15186 ac_cv_lib_m_sqrt=no
ba4481b5 15187fi
ca81d7a0 15188
f053c89f 15189rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15190 conftest$ac_exeext conftest.$ac_ext
98418dba 15191LIBS=$ac_check_lib_save_LIBS
ba4481b5 15192fi
ca81d7a0
JD
15193{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
15194echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 15195if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 15196 cat >>confdefs.h <<_ACEOF
98418dba 15197#define HAVE_LIBM 1
c0d27fcc 15198_ACEOF
98418dba
CW
15199
15200 LIBS="-lm $LIBS"
ba4481b5 15201
ba4481b5
DL
15202fi
15203
c0d27fcc 15204
55597d70
DL
15205# Check for mail-locking functions in a "mail" library. Probably this should
15206# have the same check as for liblockfile below.
98418dba 15207
ca81d7a0
JD
15208{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
15209echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 15210if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 15211 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15212else
98418dba
CW
15213 ac_check_lib_save_LIBS=$LIBS
15214LIBS="-lmail $LIBS"
15215cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15216/* confdefs.h. */
15217_ACEOF
15218cat confdefs.h >>conftest.$ac_ext
15219cat >>conftest.$ac_ext <<_ACEOF
15220/* end confdefs.h. */
98418dba 15221
ca81d7a0
JD
15222/* Override any GCC internal prototype to avoid an error.
15223 Use char because int might match the return type of a GCC
15224 builtin and then its argument prototype would still apply. */
98418dba
CW
15225#ifdef __cplusplus
15226extern "C"
15227#endif
98418dba 15228char maillock ();
503d2be0
AS
15229int
15230main ()
15231{
ca81d7a0 15232return maillock ();
503d2be0
AS
15233 ;
15234 return 0;
15235}
15236_ACEOF
15237rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15238if { (ac_try="$ac_link"
15239case "(($ac_try" in
15240 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15241 *) ac_try_echo=$ac_try;;
15242esac
15243eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15244 (eval "$ac_link") 2>conftest.er1
503d2be0 15245 ac_status=$?
edfaf76d
LK
15246 grep -v '^ *+' conftest.er1 >conftest.err
15247 rm -f conftest.er1
15248 cat conftest.err >&5
c0d27fcc 15249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15250 (exit $ac_status); } && {
15251 test -z "$ac_c_werror_flag" ||
15252 test ! -s conftest.err
15253 } && test -s conftest$ac_exeext &&
15254 $as_test_x conftest$ac_exeext; then
98418dba 15255 ac_cv_lib_mail_maillock=yes
ba4481b5 15256else
503d2be0 15257 echo "$as_me: failed program was:" >&5
19650fd6
AS
15258sed 's/^/| /' conftest.$ac_ext >&5
15259
ca81d7a0 15260 ac_cv_lib_mail_maillock=no
ba4481b5 15261fi
ca81d7a0 15262
f053c89f 15263rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15264 conftest$ac_exeext conftest.$ac_ext
98418dba 15265LIBS=$ac_check_lib_save_LIBS
ba4481b5 15266fi
ca81d7a0
JD
15267{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15268echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 15269if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15270 cat >>confdefs.h <<_ACEOF
98418dba 15271#define HAVE_LIBMAIL 1
c0d27fcc 15272_ACEOF
ba4481b5 15273
98418dba 15274 LIBS="-lmail $LIBS"
ba4481b5 15275
98418dba 15276fi
ba4481b5 15277
c0d27fcc 15278
ca81d7a0
JD
15279{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15280echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15281if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 15282 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15283else
503d2be0 15284 ac_check_lib_save_LIBS=$LIBS
98418dba 15285LIBS="-llockfile $LIBS"
503d2be0 15286cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15287/* confdefs.h. */
15288_ACEOF
15289cat confdefs.h >>conftest.$ac_ext
15290cat >>conftest.$ac_ext <<_ACEOF
15291/* end confdefs.h. */
503d2be0 15292
ca81d7a0
JD
15293/* Override any GCC internal prototype to avoid an error.
15294 Use char because int might match the return type of a GCC
15295 builtin and then its argument prototype would still apply. */
503d2be0
AS
15296#ifdef __cplusplus
15297extern "C"
15298#endif
98418dba 15299char maillock ();
503d2be0
AS
15300int
15301main ()
15302{
ca81d7a0 15303return maillock ();
503d2be0
AS
15304 ;
15305 return 0;
15306}
15307_ACEOF
15308rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15309if { (ac_try="$ac_link"
15310case "(($ac_try" in
15311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15312 *) ac_try_echo=$ac_try;;
15313esac
15314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15315 (eval "$ac_link") 2>conftest.er1
503d2be0 15316 ac_status=$?
edfaf76d
LK
15317 grep -v '^ *+' conftest.er1 >conftest.err
15318 rm -f conftest.er1
15319 cat conftest.err >&5
c0d27fcc 15320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15321 (exit $ac_status); } && {
15322 test -z "$ac_c_werror_flag" ||
15323 test ! -s conftest.err
15324 } && test -s conftest$ac_exeext &&
15325 $as_test_x conftest$ac_exeext; then
98418dba 15326 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
15327else
15328 echo "$as_me: failed program was:" >&5
19650fd6
AS
15329sed 's/^/| /' conftest.$ac_ext >&5
15330
ca81d7a0 15331 ac_cv_lib_lockfile_maillock=no
98418dba 15332fi
ca81d7a0 15333
f053c89f 15334rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15335 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15336LIBS=$ac_check_lib_save_LIBS
15337fi
ca81d7a0
JD
15338{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
15339echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 15340if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 15341 cat >>confdefs.h <<_ACEOF
98418dba 15342#define HAVE_LIBLOCKFILE 1
c0d27fcc 15343_ACEOF
98418dba
CW
15344
15345 LIBS="-llockfile $LIBS"
15346
15347fi
15348
15349# If we have the shared liblockfile, assume we must use it for mail
15350# locking (e.g. Debian). If we couldn't link against liblockfile
15351# (no liblockfile.a installed), ensure that we don't need to.
15352if test "$ac_cv_lib_lockfile_maillock" = no; then
15353 # Extract the first word of "liblockfile.so", so it can be a program name with args.
15354set dummy liblockfile.so; ac_word=$2
ca81d7a0
JD
15355{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15356echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
15357if test "${ac_cv_prog_liblockfile+set}" = set; then
15358 echo $ECHO_N "(cached) $ECHO_C" >&6
15359else
15360 if test -n "$liblockfile"; then
15361 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
15362else
c0d27fcc 15363as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
15364as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
15365for as_dir in $as_dummy
c0d27fcc
MR
15366do
15367 IFS=$as_save_IFS
15368 test -z "$as_dir" && as_dir=.
15369 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 15370 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
15371 ac_cv_prog_liblockfile="yes"
15372 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15373 break 2
15374 fi
15375done
98418dba 15376done
ca81d7a0 15377IFS=$as_save_IFS
98418dba
CW
15378
15379 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 15380fi
503d2be0 15381fi
98418dba
CW
15382liblockfile=$ac_cv_prog_liblockfile
15383if test -n "$liblockfile"; then
ca81d7a0
JD
15384 { echo "$as_me:$LINENO: result: $liblockfile" >&5
15385echo "${ECHO_T}$liblockfile" >&6; }
98418dba 15386else
ca81d7a0
JD
15387 { echo "$as_me:$LINENO: result: no" >&5
15388echo "${ECHO_T}no" >&6; }
ba4481b5
DL
15389fi
15390
ca81d7a0 15391
98418dba 15392 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 15393 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
15394This probably means that movemail could lose mail.
15395There may be a \`development' package to install containing liblockfile." >&5
15396echo "$as_me: error: Shared liblockfile found but can't link against it.
15397This probably means that movemail could lose mail.
15398There may be a \`development' package to install containing liblockfile." >&2;}
15399 { (exit 1); exit 1; }; }
98418dba 15400 else :
55597d70 15401 fi
98418dba 15402fi
503d2be0 15403
98418dba
CW
15404for ac_func in touchlock
15405do
15406as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15407{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15408echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15409if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15410 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 15411else
98418dba 15412 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15413/* confdefs.h. */
15414_ACEOF
15415cat confdefs.h >>conftest.$ac_ext
15416cat >>conftest.$ac_ext <<_ACEOF
15417/* end confdefs.h. */
edfaf76d
LK
15418/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15419 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15420#define $ac_func innocuous_$ac_func
15421
98418dba 15422/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15423 which can conflict with char $ac_func (); below.
15424 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15425 <limits.h> exists even on freestanding compilers. */
edfaf76d 15426
19650fd6
AS
15427#ifdef __STDC__
15428# include <limits.h>
15429#else
15430# include <assert.h>
15431#endif
edfaf76d
LK
15432
15433#undef $ac_func
15434
ca81d7a0
JD
15435/* Override any GCC internal prototype to avoid an error.
15436 Use char because int might match the return type of a GCC
15437 builtin and then its argument prototype would still apply. */
503d2be0
AS
15438#ifdef __cplusplus
15439extern "C"
15440#endif
98418dba 15441char $ac_func ();
98418dba
CW
15442/* The GNU C library defines this for functions which it implements
15443 to always fail with ENOSYS. Some functions are actually named
15444 something starting with __ and the normal name is an alias. */
ca81d7a0 15445#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15446choke me
cd958eb3
MB
15447#endif
15448
19650fd6
AS
15449int
15450main ()
15451{
ca81d7a0 15452return $ac_func ();
503d2be0
AS
15453 ;
15454 return 0;
15455}
15456_ACEOF
15457rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15458if { (ac_try="$ac_link"
15459case "(($ac_try" in
15460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15461 *) ac_try_echo=$ac_try;;
15462esac
15463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15464 (eval "$ac_link") 2>conftest.er1
503d2be0 15465 ac_status=$?
edfaf76d
LK
15466 grep -v '^ *+' conftest.er1 >conftest.err
15467 rm -f conftest.er1
15468 cat conftest.err >&5
c0d27fcc 15469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15470 (exit $ac_status); } && {
15471 test -z "$ac_c_werror_flag" ||
15472 test ! -s conftest.err
15473 } && test -s conftest$ac_exeext &&
15474 $as_test_x conftest$ac_exeext; then
98418dba 15475 eval "$as_ac_var=yes"
503d2be0
AS
15476else
15477 echo "$as_me: failed program was:" >&5
19650fd6
AS
15478sed 's/^/| /' conftest.$ac_ext >&5
15479
ca81d7a0 15480 eval "$as_ac_var=no"
503d2be0 15481fi
ca81d7a0 15482
f053c89f 15483rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15484 conftest$ac_exeext conftest.$ac_ext
503d2be0 15485fi
ca81d7a0
JD
15486ac_res=`eval echo '${'$as_ac_var'}'`
15487 { echo "$as_me:$LINENO: result: $ac_res" >&5
15488echo "${ECHO_T}$ac_res" >&6; }
98418dba 15489if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15490 cat >>confdefs.h <<_ACEOF
98418dba 15491#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15492_ACEOF
457b792c 15493
457b792c 15494fi
98418dba 15495done
457b792c 15496
c0d27fcc 15497
98418dba
CW
15498for ac_header in maillock.h
15499do
15500as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15501if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15502 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15503echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15504if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15505 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15506fi
ca81d7a0
JD
15507ac_res=`eval echo '${'$as_ac_Header'}'`
15508 { echo "$as_me:$LINENO: result: $ac_res" >&5
15509echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 15510else
c0d27fcc 15511 # Is the header compilable?
ca81d7a0
JD
15512{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15513echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15514cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15515/* confdefs.h. */
15516_ACEOF
15517cat confdefs.h >>conftest.$ac_ext
15518cat >>conftest.$ac_ext <<_ACEOF
15519/* end confdefs.h. */
c0d27fcc
MR
15520$ac_includes_default
15521#include <$ac_header>
15522_ACEOF
15523rm -f conftest.$ac_objext
ca81d7a0
JD
15524if { (ac_try="$ac_compile"
15525case "(($ac_try" in
15526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15527 *) ac_try_echo=$ac_try;;
15528esac
15529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15530 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15531 ac_status=$?
edfaf76d
LK
15532 grep -v '^ *+' conftest.er1 >conftest.err
15533 rm -f conftest.er1
15534 cat conftest.err >&5
c0d27fcc 15535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15536 (exit $ac_status); } && {
15537 test -z "$ac_c_werror_flag" ||
15538 test ! -s conftest.err
15539 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15540 ac_header_compiler=yes
15541else
15542 echo "$as_me: failed program was:" >&5
19650fd6
AS
15543sed 's/^/| /' conftest.$ac_ext >&5
15544
ca81d7a0 15545 ac_header_compiler=no
c0d27fcc 15546fi
ca81d7a0
JD
15547
15548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15549{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15550echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15551
15552# Is the header present?
ca81d7a0
JD
15553{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15554echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15555cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15556/* confdefs.h. */
15557_ACEOF
15558cat confdefs.h >>conftest.$ac_ext
15559cat >>conftest.$ac_ext <<_ACEOF
15560/* end confdefs.h. */
98418dba 15561#include <$ac_header>
503d2be0 15562_ACEOF
ca81d7a0
JD
15563if { (ac_try="$ac_cpp conftest.$ac_ext"
15564case "(($ac_try" in
15565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15566 *) ac_try_echo=$ac_try;;
15567esac
15568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15569 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15570 ac_status=$?
6bae0ccf 15571 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15572 rm -f conftest.er1
15573 cat conftest.err >&5
c0d27fcc 15574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15575 (exit $ac_status); } >/dev/null && {
15576 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15577 test ! -s conftest.err
15578 }; then
c0d27fcc 15579 ac_header_preproc=yes
98418dba
CW
15580else
15581 echo "$as_me: failed program was:" >&5
19650fd6
AS
15582sed 's/^/| /' conftest.$ac_ext >&5
15583
c0d27fcc 15584 ac_header_preproc=no
503d2be0 15585fi
ca81d7a0 15586
98418dba 15587rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15588{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15589echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15590
15591# So? What about this header?
edfaf76d
LK
15592case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15593 yes:no: )
c0d27fcc
MR
15594 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15595echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15596 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15597echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15598 ac_header_preproc=yes
19650fd6 15599 ;;
edfaf76d 15600 no:yes:* )
c0d27fcc
MR
15601 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15602echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15603 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15604echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15605 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15606echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15607 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15608echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15609 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15610echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15611 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15612echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15613
19650fd6 15614 ;;
c0d27fcc 15615esac
ca81d7a0
JD
15616{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15617echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15618if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15619 echo $ECHO_N "(cached) $ECHO_C" >&6
15620else
edfaf76d 15621 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 15622fi
ca81d7a0
JD
15623ac_res=`eval echo '${'$as_ac_Header'}'`
15624 { echo "$as_me:$LINENO: result: $ac_res" >&5
15625echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15626
15627fi
98418dba 15628if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15629 cat >>confdefs.h <<_ACEOF
98418dba 15630#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15631_ACEOF
48d4b120 15632
ba4481b5 15633fi
c0d27fcc 15634
98418dba
CW
15635done
15636
c0d27fcc
MR
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
22044edf
DL
15692
15693
c0d27fcc 15694
b0e44248
RB
15695
15696
973a76b1
DL
15697
15698
15699
cd958eb3 15700
25ca0bca 15701
ea92fc9f 15702
e2fcf543 15703
190956b3 15704
c0d27fcc
MR
15705
15706
98418dba 15707for ac_func in gethostname getdomainname dup2 \
e2fcf543 15708rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
98418dba
CW
15709random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
15710strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 15711utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
15712__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
15713sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 15714gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
4489ece2 15715memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
15716do
15717as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15718{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15719echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15720if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15721 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15722else
503d2be0 15723 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15724/* confdefs.h. */
15725_ACEOF
15726cat confdefs.h >>conftest.$ac_ext
15727cat >>conftest.$ac_ext <<_ACEOF
15728/* end confdefs.h. */
edfaf76d
LK
15729/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15730 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15731#define $ac_func innocuous_$ac_func
15732
98418dba 15733/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15734 which can conflict with char $ac_func (); below.
15735 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15736 <limits.h> exists even on freestanding compilers. */
edfaf76d 15737
19650fd6
AS
15738#ifdef __STDC__
15739# include <limits.h>
15740#else
15741# include <assert.h>
15742#endif
edfaf76d
LK
15743
15744#undef $ac_func
15745
ca81d7a0
JD
15746/* Override any GCC internal prototype to avoid an error.
15747 Use char because int might match the return type of a GCC
15748 builtin and then its argument prototype would still apply. */
503d2be0
AS
15749#ifdef __cplusplus
15750extern "C"
15751#endif
98418dba 15752char $ac_func ();
98418dba
CW
15753/* The GNU C library defines this for functions which it implements
15754 to always fail with ENOSYS. Some functions are actually named
15755 something starting with __ and the normal name is an alias. */
ca81d7a0 15756#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15757choke me
98418dba
CW
15758#endif
15759
19650fd6
AS
15760int
15761main ()
15762{
ca81d7a0 15763return $ac_func ();
503d2be0
AS
15764 ;
15765 return 0;
15766}
15767_ACEOF
15768rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15769if { (ac_try="$ac_link"
15770case "(($ac_try" in
15771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15772 *) ac_try_echo=$ac_try;;
15773esac
15774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15775 (eval "$ac_link") 2>conftest.er1
503d2be0 15776 ac_status=$?
edfaf76d
LK
15777 grep -v '^ *+' conftest.er1 >conftest.err
15778 rm -f conftest.er1
15779 cat conftest.err >&5
c0d27fcc 15780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15781 (exit $ac_status); } && {
15782 test -z "$ac_c_werror_flag" ||
15783 test ! -s conftest.err
15784 } && test -s conftest$ac_exeext &&
15785 $as_test_x conftest$ac_exeext; then
98418dba 15786 eval "$as_ac_var=yes"
503d2be0
AS
15787else
15788 echo "$as_me: failed program was:" >&5
19650fd6
AS
15789sed 's/^/| /' conftest.$ac_ext >&5
15790
ca81d7a0 15791 eval "$as_ac_var=no"
503d2be0 15792fi
ca81d7a0 15793
f053c89f 15794rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15795 conftest$ac_exeext conftest.$ac_ext
ba4481b5 15796fi
ca81d7a0
JD
15797ac_res=`eval echo '${'$as_ac_var'}'`
15798 { echo "$as_me:$LINENO: result: $ac_res" >&5
15799echo "${ECHO_T}$ac_res" >&6; }
98418dba 15800if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15801 cat >>confdefs.h <<_ACEOF
98418dba 15802#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15803_ACEOF
ba4481b5 15804
ba4481b5 15805fi
98418dba 15806done
ba4481b5 15807
c0d27fcc
MR
15808
15809
98418dba
CW
15810for ac_header in sys/un.h
15811do
15812as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15813if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15814 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15815echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15816if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 15817 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15818fi
ca81d7a0
JD
15819ac_res=`eval echo '${'$as_ac_Header'}'`
15820 { echo "$as_me:$LINENO: result: $ac_res" >&5
15821echo "${ECHO_T}$ac_res" >&6; }
98418dba 15822else
c0d27fcc 15823 # Is the header compilable?
ca81d7a0
JD
15824{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15825echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15826cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15827/* confdefs.h. */
15828_ACEOF
15829cat confdefs.h >>conftest.$ac_ext
15830cat >>conftest.$ac_ext <<_ACEOF
15831/* end confdefs.h. */
c0d27fcc
MR
15832$ac_includes_default
15833#include <$ac_header>
15834_ACEOF
15835rm -f conftest.$ac_objext
ca81d7a0
JD
15836if { (ac_try="$ac_compile"
15837case "(($ac_try" in
15838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15839 *) ac_try_echo=$ac_try;;
15840esac
15841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15842 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15843 ac_status=$?
edfaf76d
LK
15844 grep -v '^ *+' conftest.er1 >conftest.err
15845 rm -f conftest.er1
15846 cat conftest.err >&5
c0d27fcc 15847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15848 (exit $ac_status); } && {
15849 test -z "$ac_c_werror_flag" ||
15850 test ! -s conftest.err
15851 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15852 ac_header_compiler=yes
15853else
15854 echo "$as_me: failed program was:" >&5
19650fd6
AS
15855sed 's/^/| /' conftest.$ac_ext >&5
15856
ca81d7a0 15857 ac_header_compiler=no
c0d27fcc 15858fi
ca81d7a0
JD
15859
15860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15861{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15862echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15863
15864# Is the header present?
ca81d7a0
JD
15865{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15866echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15867cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15868/* confdefs.h. */
15869_ACEOF
15870cat confdefs.h >>conftest.$ac_ext
15871cat >>conftest.$ac_ext <<_ACEOF
15872/* end confdefs.h. */
98418dba 15873#include <$ac_header>
503d2be0 15874_ACEOF
ca81d7a0
JD
15875if { (ac_try="$ac_cpp conftest.$ac_ext"
15876case "(($ac_try" in
15877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15878 *) ac_try_echo=$ac_try;;
15879esac
15880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15881 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15882 ac_status=$?
6bae0ccf 15883 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15884 rm -f conftest.er1
15885 cat conftest.err >&5
c0d27fcc 15886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15887 (exit $ac_status); } >/dev/null && {
15888 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15889 test ! -s conftest.err
15890 }; then
c0d27fcc 15891 ac_header_preproc=yes
ba4481b5 15892else
503d2be0 15893 echo "$as_me: failed program was:" >&5
19650fd6
AS
15894sed 's/^/| /' conftest.$ac_ext >&5
15895
c0d27fcc 15896 ac_header_preproc=no
ba4481b5 15897fi
ca81d7a0 15898
503d2be0 15899rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15900{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15901echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15902
15903# So? What about this header?
edfaf76d
LK
15904case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15905 yes:no: )
c0d27fcc
MR
15906 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15907echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15908 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15909echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15910 ac_header_preproc=yes
19650fd6 15911 ;;
edfaf76d 15912 no:yes:* )
c0d27fcc
MR
15913 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15914echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15915 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15916echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15917 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15918echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15919 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15920echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15921 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15922echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15923 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15924echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15925
19650fd6 15926 ;;
c0d27fcc 15927esac
ca81d7a0
JD
15928{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15929echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15930if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15931 echo $ECHO_N "(cached) $ECHO_C" >&6
15932else
edfaf76d 15933 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 15934fi
ca81d7a0
JD
15935ac_res=`eval echo '${'$as_ac_Header'}'`
15936 { echo "$as_me:$LINENO: result: $ac_res" >&5
15937echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15938
15939fi
925c2f3f 15940if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15941 cat >>confdefs.h <<_ACEOF
925c2f3f 15942#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15943_ACEOF
503d2be0 15944
925c2f3f 15945fi
c0d27fcc 15946
925c2f3f
EZ
15947done
15948
c0d27fcc
MR
15949
15950
15951
edfaf76d 15952
f053c89f
CY
15953
15954for ac_header in $ac_header_list
925c2f3f
EZ
15955do
15956as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15957if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15958 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15959echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15960if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 15961 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15962fi
ca81d7a0
JD
15963ac_res=`eval echo '${'$as_ac_Header'}'`
15964 { echo "$as_me:$LINENO: result: $ac_res" >&5
15965echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 15966else
c0d27fcc 15967 # Is the header compilable?
ca81d7a0
JD
15968{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15969echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15970cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15971/* confdefs.h. */
15972_ACEOF
15973cat confdefs.h >>conftest.$ac_ext
15974cat >>conftest.$ac_ext <<_ACEOF
15975/* end confdefs.h. */
c0d27fcc
MR
15976$ac_includes_default
15977#include <$ac_header>
15978_ACEOF
15979rm -f conftest.$ac_objext
ca81d7a0
JD
15980if { (ac_try="$ac_compile"
15981case "(($ac_try" in
15982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15983 *) ac_try_echo=$ac_try;;
15984esac
15985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15986 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15987 ac_status=$?
edfaf76d
LK
15988 grep -v '^ *+' conftest.er1 >conftest.err
15989 rm -f conftest.er1
15990 cat conftest.err >&5
c0d27fcc 15991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15992 (exit $ac_status); } && {
15993 test -z "$ac_c_werror_flag" ||
15994 test ! -s conftest.err
15995 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15996 ac_header_compiler=yes
15997else
15998 echo "$as_me: failed program was:" >&5
19650fd6
AS
15999sed 's/^/| /' conftest.$ac_ext >&5
16000
ca81d7a0 16001 ac_header_compiler=no
c0d27fcc 16002fi
ca81d7a0
JD
16003
16004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16005{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16006echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16007
16008# Is the header present?
ca81d7a0
JD
16009{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16010echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16011cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16012/* confdefs.h. */
16013_ACEOF
16014cat confdefs.h >>conftest.$ac_ext
16015cat >>conftest.$ac_ext <<_ACEOF
16016/* end confdefs.h. */
98418dba 16017#include <$ac_header>
503d2be0 16018_ACEOF
ca81d7a0
JD
16019if { (ac_try="$ac_cpp conftest.$ac_ext"
16020case "(($ac_try" in
16021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16022 *) ac_try_echo=$ac_try;;
16023esac
16024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16025 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16026 ac_status=$?
6bae0ccf 16027 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16028 rm -f conftest.er1
16029 cat conftest.err >&5
c0d27fcc 16030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16031 (exit $ac_status); } >/dev/null && {
16032 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16033 test ! -s conftest.err
16034 }; then
c0d27fcc 16035 ac_header_preproc=yes
98418dba
CW
16036else
16037 echo "$as_me: failed program was:" >&5
19650fd6
AS
16038sed 's/^/| /' conftest.$ac_ext >&5
16039
c0d27fcc 16040 ac_header_preproc=no
98418dba 16041fi
ca81d7a0 16042
98418dba 16043rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16044{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16045echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16046
16047# So? What about this header?
edfaf76d
LK
16048case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16049 yes:no: )
c0d27fcc
MR
16050 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16051echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16052 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16053echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16054 ac_header_preproc=yes
19650fd6 16055 ;;
edfaf76d 16056 no:yes:* )
c0d27fcc
MR
16057 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16058echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16059 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16060echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16061 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16062echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16063 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16064echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16065 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16066echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16067 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16068echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16069
19650fd6 16070 ;;
c0d27fcc 16071esac
ca81d7a0
JD
16072{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16073echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16074if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16075 echo $ECHO_N "(cached) $ECHO_C" >&6
16076else
edfaf76d 16077 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 16078fi
ca81d7a0
JD
16079ac_res=`eval echo '${'$as_ac_Header'}'`
16080 { echo "$as_me:$LINENO: result: $ac_res" >&5
16081echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16082
16083fi
98418dba 16084if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16085 cat >>confdefs.h <<_ACEOF
98418dba 16086#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16087_ACEOF
98418dba
CW
16088
16089fi
c0d27fcc 16090
98418dba
CW
16091done
16092
c0d27fcc 16093
f053c89f
CY
16094
16095
16096
16097
16098
16099
16100
16101for ac_func in $ac_func_list
98418dba
CW
16102do
16103as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16104{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16105echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16106if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16107 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16108else
98418dba 16109 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16110/* confdefs.h. */
16111_ACEOF
16112cat confdefs.h >>conftest.$ac_ext
16113cat >>conftest.$ac_ext <<_ACEOF
16114/* end confdefs.h. */
edfaf76d
LK
16115/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16116 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16117#define $ac_func innocuous_$ac_func
16118
98418dba 16119/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16120 which can conflict with char $ac_func (); below.
16121 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16122 <limits.h> exists even on freestanding compilers. */
edfaf76d 16123
19650fd6
AS
16124#ifdef __STDC__
16125# include <limits.h>
16126#else
16127# include <assert.h>
16128#endif
edfaf76d
LK
16129
16130#undef $ac_func
16131
ca81d7a0
JD
16132/* Override any GCC internal prototype to avoid an error.
16133 Use char because int might match the return type of a GCC
16134 builtin and then its argument prototype would still apply. */
503d2be0
AS
16135#ifdef __cplusplus
16136extern "C"
16137#endif
98418dba 16138char $ac_func ();
98418dba
CW
16139/* The GNU C library defines this for functions which it implements
16140 to always fail with ENOSYS. Some functions are actually named
16141 something starting with __ and the normal name is an alias. */
ca81d7a0 16142#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16143choke me
98418dba
CW
16144#endif
16145
19650fd6
AS
16146int
16147main ()
16148{
ca81d7a0 16149return $ac_func ();
503d2be0
AS
16150 ;
16151 return 0;
16152}
16153_ACEOF
16154rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16155if { (ac_try="$ac_link"
16156case "(($ac_try" in
16157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16158 *) ac_try_echo=$ac_try;;
16159esac
16160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16161 (eval "$ac_link") 2>conftest.er1
503d2be0 16162 ac_status=$?
edfaf76d
LK
16163 grep -v '^ *+' conftest.er1 >conftest.err
16164 rm -f conftest.er1
16165 cat conftest.err >&5
c0d27fcc 16166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16167 (exit $ac_status); } && {
16168 test -z "$ac_c_werror_flag" ||
16169 test ! -s conftest.err
16170 } && test -s conftest$ac_exeext &&
16171 $as_test_x conftest$ac_exeext; then
98418dba 16172 eval "$as_ac_var=yes"
503d2be0
AS
16173else
16174 echo "$as_me: failed program was:" >&5
19650fd6
AS
16175sed 's/^/| /' conftest.$ac_ext >&5
16176
ca81d7a0 16177 eval "$as_ac_var=no"
503d2be0 16178fi
ca81d7a0 16179
f053c89f 16180rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16181 conftest$ac_exeext conftest.$ac_ext
ffe36136 16182fi
ca81d7a0
JD
16183ac_res=`eval echo '${'$as_ac_var'}'`
16184 { echo "$as_me:$LINENO: result: $ac_res" >&5
16185echo "${ECHO_T}$ac_res" >&6; }
98418dba 16186if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16187 cat >>confdefs.h <<_ACEOF
98418dba 16188#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16189_ACEOF
ffe36136 16190
ba4481b5 16191fi
98418dba 16192done
ba4481b5 16193
f053c89f
CY
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
ca81d7a0
JD
16210{ echo "$as_me:$LINENO: checking for working mktime" >&5
16211echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
16212if test "${ac_cv_func_working_mktime+set}" = set; then
16213 echo $ECHO_N "(cached) $ECHO_C" >&6
16214else
16215 if test "$cross_compiling" = yes; then
16216 ac_cv_func_working_mktime=no
16217else
16218 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16219/* confdefs.h. */
16220_ACEOF
16221cat confdefs.h >>conftest.$ac_ext
16222cat >>conftest.$ac_ext <<_ACEOF
16223/* end confdefs.h. */
98418dba 16224/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 16225#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16226# include <sys/time.h>
16227# include <time.h>
16228#else
f053c89f 16229# ifdef HAVE_SYS_TIME_H
98418dba
CW
16230# include <sys/time.h>
16231# else
16232# include <time.h>
16233# endif
16234#endif
ba4481b5 16235
f053c89f 16236#include <stdlib.h>
edfaf76d 16237
f053c89f 16238#ifdef HAVE_UNISTD_H
98418dba
CW
16239# include <unistd.h>
16240#endif
ba4481b5 16241
f053c89f 16242#ifndef HAVE_ALARM
98418dba
CW
16243# define alarm(X) /* empty */
16244#endif
df645f7c 16245
98418dba
CW
16246/* Work around redefinition to rpl_putenv by other config tests. */
16247#undef putenv
df645f7c 16248
98418dba 16249static time_t time_t_max;
edfaf76d 16250static time_t time_t_min;
df645f7c 16251
98418dba 16252/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16253static char *tz_strings[] = {
16254 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16255 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16256};
16257#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16258
ca81d7a0 16259/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16260 Based on a problem report from Andreas Jaeger. */
ca81d7a0 16261static int
98418dba
CW
16262spring_forward_gap ()
16263{
16264 /* glibc (up to about 1998-10-07) failed this test. */
16265 struct tm tm;
16266
16267 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16268 instead of "TZ=America/Vancouver" in order to detect the bug even
16269 on systems that don't support the Olson extension, or don't have the
16270 full zoneinfo tables installed. */
16271 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16272
16273 tm.tm_year = 98;
16274 tm.tm_mon = 3;
16275 tm.tm_mday = 5;
16276 tm.tm_hour = 2;
16277 tm.tm_min = 0;
16278 tm.tm_sec = 0;
16279 tm.tm_isdst = -1;
ca81d7a0 16280 return mktime (&tm) != (time_t) -1;
98418dba
CW
16281}
16282
ca81d7a0 16283static int
edfaf76d 16284mktime_test1 (now)
98418dba
CW
16285 time_t now;
16286{
16287 struct tm *lt;
ca81d7a0 16288 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16289}
16290
ca81d7a0 16291static int
edfaf76d
LK
16292mktime_test (now)
16293 time_t now;
16294{
ca81d7a0
JD
16295 return (mktime_test1 (now)
16296 && mktime_test1 ((time_t) (time_t_max - now))
16297 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16298}
16299
ca81d7a0 16300static int
98418dba
CW
16301irix_6_4_bug ()
16302{
16303 /* Based on code from Ariel Faigon. */
16304 struct tm tm;
16305 tm.tm_year = 96;
16306 tm.tm_mon = 3;
16307 tm.tm_mday = 0;
16308 tm.tm_hour = 0;
16309 tm.tm_min = 0;
16310 tm.tm_sec = 0;
16311 tm.tm_isdst = -1;
16312 mktime (&tm);
ca81d7a0 16313 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16314}
16315
ca81d7a0 16316static int
98418dba
CW
16317bigtime_test (j)
16318 int j;
16319{
16320 struct tm tm;
16321 time_t now;
16322 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16323 now = mktime (&tm);
16324 if (now != (time_t) -1)
16325 {
16326 struct tm *lt = localtime (&now);
16327 if (! (lt
16328 && lt->tm_year == tm.tm_year
16329 && lt->tm_mon == tm.tm_mon
16330 && lt->tm_mday == tm.tm_mday
16331 && lt->tm_hour == tm.tm_hour
16332 && lt->tm_min == tm.tm_min
16333 && lt->tm_sec == tm.tm_sec
16334 && lt->tm_yday == tm.tm_yday
16335 && lt->tm_wday == tm.tm_wday
16336 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16337 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 16338 return 0;
98418dba 16339 }
ca81d7a0 16340 return 1;
98418dba
CW
16341}
16342
f053c89f
CY
16343static int
16344year_2050_test ()
16345{
16346 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16347 ignoring leap seconds. */
16348 unsigned long int answer = 2527315200UL;
16349
16350 struct tm tm;
16351 time_t t;
16352 tm.tm_year = 2050 - 1900;
16353 tm.tm_mon = 2 - 1;
16354 tm.tm_mday = 1;
16355 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16356 tm.tm_isdst = -1;
16357
16358 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16359 instead of "TZ=America/Vancouver" in order to detect the bug even
16360 on systems that don't support the Olson extension, or don't have the
16361 full zoneinfo tables installed. */
16362 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16363
16364 t = mktime (&tm);
16365
16366 /* Check that the result is either a failure, or close enough
16367 to the correct answer that we can assume the discrepancy is
16368 due to leap seconds. */
16369 return (t == (time_t) -1
16370 || (0 < t && answer - 120 <= t && t <= answer + 120));
16371}
16372
98418dba
CW
16373int
16374main ()
16375{
16376 time_t t, delta;
16377 int i, j;
16378
16379 /* This test makes some buggy mktime implementations loop.
16380 Give up after 60 seconds; a mktime slower than that
16381 isn't worth using anyway. */
16382 alarm (60);
16383
16384 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
16385 continue;
16386 time_t_max--;
edfaf76d
LK
16387 if ((time_t) -1 < 0)
16388 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
16389 continue;
98418dba
CW
16390 delta = time_t_max / 997; /* a suitable prime number */
16391 for (i = 0; i < N_STRINGS; i++)
16392 {
16393 if (tz_strings[i])
16394 putenv (tz_strings[i]);
503d2be0 16395
98418dba 16396 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
16397 if (! mktime_test (t))
16398 return 1;
16399 if (! (mktime_test ((time_t) 1)
16400 && mktime_test ((time_t) (60 * 60))
16401 && mktime_test ((time_t) (60 * 60 * 24))))
16402 return 1;
98418dba
CW
16403
16404 for (j = 1; 0 < j; j *= 2)
ca81d7a0
JD
16405 if (! bigtime_test (j))
16406 return 1;
16407 if (! bigtime_test (j - 1))
16408 return 1;
98418dba 16409 }
f053c89f 16410 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
16411}
16412_ACEOF
98418dba 16413rm -f conftest$ac_exeext
ca81d7a0
JD
16414if { (ac_try="$ac_link"
16415case "(($ac_try" in
16416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16417 *) ac_try_echo=$ac_try;;
16418esac
16419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16420 (eval "$ac_link") 2>&5
503d2be0 16421 ac_status=$?
c0d27fcc 16422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 16423 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
16424 { (case "(($ac_try" in
16425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16426 *) ac_try_echo=$ac_try;;
16427esac
16428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16429 (eval "$ac_try") 2>&5
503d2be0 16430 ac_status=$?
c0d27fcc 16431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16432 (exit $ac_status); }; }; then
98418dba 16433 ac_cv_func_working_mktime=yes
503d2be0 16434else
98418dba
CW
16435 echo "$as_me: program exited with status $ac_status" >&5
16436echo "$as_me: failed program was:" >&5
19650fd6
AS
16437sed 's/^/| /' conftest.$ac_ext >&5
16438
c0d27fcc 16439( exit $ac_status )
98418dba 16440ac_cv_func_working_mktime=no
503d2be0 16441fi
ca81d7a0 16442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 16443fi
ca81d7a0
JD
16444
16445
ba4481b5 16446fi
ca81d7a0
JD
16447{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
16448echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 16449if test $ac_cv_func_working_mktime = no; then
ca81d7a0 16450 case " $LIBOBJS " in
edfaf76d 16451 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
16452 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
16453 ;;
edfaf76d
LK
16454esac
16455
ba4481b5
DL
16456fi
16457
98418dba 16458if test "$ac_cv_func_working_mktime" = no; then
b936fae4 16459
c0d27fcc 16460cat >>confdefs.h <<\_ACEOF
98418dba 16461#define BROKEN_MKTIME 1
c0d27fcc 16462_ACEOF
ba4481b5 16463
ba4481b5 16464fi
503d2be0 16465
98418dba
CW
16466ac_have_func=no # yes means we've found a way to get the load average.
16467
6bae0ccf
DL
16468# Make sure getloadavg.c is where it belongs, at configure-time.
16469test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
16470 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
16471echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
16472 { (exit 1); exit 1; }; }
16473
98418dba
CW
16474ac_save_LIBS=$LIBS
16475
16476# Check for getloadavg, but be sure not to touch the cache variable.
ca81d7a0
JD
16477({ echo "$as_me:$LINENO: checking for getloadavg" >&5
16478echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 16479if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 16480 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16481else
503d2be0 16482 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16483/* confdefs.h. */
16484_ACEOF
16485cat confdefs.h >>conftest.$ac_ext
16486cat >>conftest.$ac_ext <<_ACEOF
16487/* end confdefs.h. */
edfaf76d
LK
16488/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
16489 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16490#define getloadavg innocuous_getloadavg
16491
98418dba 16492/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16493 which can conflict with char getloadavg (); below.
16494 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16495 <limits.h> exists even on freestanding compilers. */
edfaf76d 16496
19650fd6
AS
16497#ifdef __STDC__
16498# include <limits.h>
16499#else
16500# include <assert.h>
16501#endif
edfaf76d
LK
16502
16503#undef getloadavg
16504
ca81d7a0
JD
16505/* Override any GCC internal prototype to avoid an error.
16506 Use char because int might match the return type of a GCC
16507 builtin and then its argument prototype would still apply. */
503d2be0
AS
16508#ifdef __cplusplus
16509extern "C"
16510#endif
98418dba 16511char getloadavg ();
98418dba
CW
16512/* The GNU C library defines this for functions which it implements
16513 to always fail with ENOSYS. Some functions are actually named
16514 something starting with __ and the normal name is an alias. */
ca81d7a0 16515#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 16516choke me
cd958eb3
MB
16517#endif
16518
19650fd6
AS
16519int
16520main ()
16521{
ca81d7a0 16522return getloadavg ();
503d2be0
AS
16523 ;
16524 return 0;
16525}
16526_ACEOF
16527rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16528if { (ac_try="$ac_link"
16529case "(($ac_try" in
16530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16531 *) ac_try_echo=$ac_try;;
16532esac
16533eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16534 (eval "$ac_link") 2>conftest.er1
503d2be0 16535 ac_status=$?
edfaf76d
LK
16536 grep -v '^ *+' conftest.er1 >conftest.err
16537 rm -f conftest.er1
16538 cat conftest.err >&5
c0d27fcc 16539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16540 (exit $ac_status); } && {
16541 test -z "$ac_c_werror_flag" ||
16542 test ! -s conftest.err
16543 } && test -s conftest$ac_exeext &&
16544 $as_test_x conftest$ac_exeext; then
98418dba 16545 ac_cv_func_getloadavg=yes
503d2be0
AS
16546else
16547 echo "$as_me: failed program was:" >&5
19650fd6
AS
16548sed 's/^/| /' conftest.$ac_ext >&5
16549
ca81d7a0 16550 ac_cv_func_getloadavg=no
503d2be0 16551fi
ca81d7a0 16552
f053c89f 16553rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16554 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16555fi
ca81d7a0
JD
16556{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
16557echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
16558if test $ac_cv_func_getloadavg = yes; then
16559 exit 0
16560else
16561 exit 1
ba4481b5 16562fi
98418dba 16563) && ac_have_func=yes
ba4481b5 16564
98418dba 16565# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 16566
98418dba
CW
16567for ac_func in pstat_getdynamic
16568do
16569as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16570{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16571echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16572if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16573 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16574else
503d2be0 16575 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16576/* confdefs.h. */
16577_ACEOF
16578cat confdefs.h >>conftest.$ac_ext
16579cat >>conftest.$ac_ext <<_ACEOF
16580/* end confdefs.h. */
edfaf76d
LK
16581/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16582 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16583#define $ac_func innocuous_$ac_func
16584
98418dba 16585/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16586 which can conflict with char $ac_func (); below.
16587 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16588 <limits.h> exists even on freestanding compilers. */
edfaf76d 16589
19650fd6
AS
16590#ifdef __STDC__
16591# include <limits.h>
16592#else
16593# include <assert.h>
16594#endif
edfaf76d
LK
16595
16596#undef $ac_func
16597
ca81d7a0
JD
16598/* Override any GCC internal prototype to avoid an error.
16599 Use char because int might match the return type of a GCC
16600 builtin and then its argument prototype would still apply. */
503d2be0
AS
16601#ifdef __cplusplus
16602extern "C"
16603#endif
98418dba 16604char $ac_func ();
98418dba
CW
16605/* The GNU C library defines this for functions which it implements
16606 to always fail with ENOSYS. Some functions are actually named
16607 something starting with __ and the normal name is an alias. */
ca81d7a0 16608#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16609choke me
98418dba
CW
16610#endif
16611
19650fd6
AS
16612int
16613main ()
16614{
ca81d7a0 16615return $ac_func ();
98418dba
CW
16616 ;
16617 return 0;
16618}
f21fadcc 16619_ACEOF
98418dba 16620rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16621if { (ac_try="$ac_link"
16622case "(($ac_try" in
16623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16624 *) ac_try_echo=$ac_try;;
16625esac
16626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16627 (eval "$ac_link") 2>conftest.er1
f21fadcc 16628 ac_status=$?
edfaf76d
LK
16629 grep -v '^ *+' conftest.er1 >conftest.err
16630 rm -f conftest.er1
16631 cat conftest.err >&5
c0d27fcc 16632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16633 (exit $ac_status); } && {
16634 test -z "$ac_c_werror_flag" ||
16635 test ! -s conftest.err
16636 } && test -s conftest$ac_exeext &&
16637 $as_test_x conftest$ac_exeext; then
98418dba 16638 eval "$as_ac_var=yes"
f21fadcc
JD
16639else
16640 echo "$as_me: failed program was:" >&5
19650fd6
AS
16641sed 's/^/| /' conftest.$ac_ext >&5
16642
ca81d7a0 16643 eval "$as_ac_var=no"
f21fadcc 16644fi
ca81d7a0 16645
f053c89f 16646rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16647 conftest$ac_exeext conftest.$ac_ext
f21fadcc 16648fi
ca81d7a0
JD
16649ac_res=`eval echo '${'$as_ac_var'}'`
16650 { echo "$as_me:$LINENO: result: $ac_res" >&5
16651echo "${ECHO_T}$ac_res" >&6; }
98418dba 16652if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16653 cat >>confdefs.h <<_ACEOF
98418dba 16654#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16655_ACEOF
98418dba
CW
16656
16657fi
16658done
16659
c0d27fcc 16660
98418dba
CW
16661# Solaris has libkstat which does not require root.
16662
ca81d7a0
JD
16663{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
16664echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 16665if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
16666 echo $ECHO_N "(cached) $ECHO_C" >&6
16667else
16668 ac_check_lib_save_LIBS=$LIBS
98418dba 16669LIBS="-lkstat $LIBS"
f21fadcc 16670cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16671/* confdefs.h. */
16672_ACEOF
16673cat confdefs.h >>conftest.$ac_ext
16674cat >>conftest.$ac_ext <<_ACEOF
16675/* end confdefs.h. */
f21fadcc 16676
ca81d7a0
JD
16677/* Override any GCC internal prototype to avoid an error.
16678 Use char because int might match the return type of a GCC
16679 builtin and then its argument prototype would still apply. */
f21fadcc
JD
16680#ifdef __cplusplus
16681extern "C"
16682#endif
98418dba 16683char kstat_open ();
f21fadcc
JD
16684int
16685main ()
16686{
ca81d7a0 16687return kstat_open ();
f21fadcc
JD
16688 ;
16689 return 0;
16690}
16691_ACEOF
16692rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16693if { (ac_try="$ac_link"
16694case "(($ac_try" in
16695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16696 *) ac_try_echo=$ac_try;;
16697esac
16698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16699 (eval "$ac_link") 2>conftest.er1
f21fadcc 16700 ac_status=$?
edfaf76d
LK
16701 grep -v '^ *+' conftest.er1 >conftest.err
16702 rm -f conftest.er1
16703 cat conftest.err >&5
c0d27fcc 16704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16705 (exit $ac_status); } && {
16706 test -z "$ac_c_werror_flag" ||
16707 test ! -s conftest.err
16708 } && test -s conftest$ac_exeext &&
16709 $as_test_x conftest$ac_exeext; then
98418dba 16710 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
16711else
16712 echo "$as_me: failed program was:" >&5
19650fd6
AS
16713sed 's/^/| /' conftest.$ac_ext >&5
16714
ca81d7a0 16715 ac_cv_lib_kstat_kstat_open=no
f21fadcc 16716fi
ca81d7a0 16717
f053c89f 16718rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16719 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
16720LIBS=$ac_check_lib_save_LIBS
16721fi
ca81d7a0
JD
16722{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
16723echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 16724if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 16725 cat >>confdefs.h <<_ACEOF
98418dba 16726#define HAVE_LIBKSTAT 1
c0d27fcc 16727_ACEOF
f21fadcc 16728
98418dba 16729 LIBS="-lkstat $LIBS"
f21fadcc 16730
f21fadcc
JD
16731fi
16732
98418dba
CW
16733test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
16734
16735# Some systems with -lutil have (and need) -lkvm as well, some do not.
16736# On Solaris, -lkvm requires nlist from -lelf, so check that first
16737# to get the right answer into the cache.
16738# For kstat on solaris, we need libelf to force the definition of SVR4 below.
16739if test $ac_have_func = no; then
ca81d7a0
JD
16740 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
16741echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 16742if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 16743 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16744else
98418dba
CW
16745 ac_check_lib_save_LIBS=$LIBS
16746LIBS="-lelf $LIBS"
16747cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16748/* confdefs.h. */
16749_ACEOF
16750cat confdefs.h >>conftest.$ac_ext
16751cat >>conftest.$ac_ext <<_ACEOF
16752/* end confdefs.h. */
98418dba 16753
ca81d7a0
JD
16754/* Override any GCC internal prototype to avoid an error.
16755 Use char because int might match the return type of a GCC
16756 builtin and then its argument prototype would still apply. */
98418dba
CW
16757#ifdef __cplusplus
16758extern "C"
16759#endif
98418dba 16760char elf_begin ();
503d2be0
AS
16761int
16762main ()
16763{
ca81d7a0 16764return elf_begin ();
503d2be0
AS
16765 ;
16766 return 0;
16767}
16768_ACEOF
16769rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16770if { (ac_try="$ac_link"
16771case "(($ac_try" in
16772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16773 *) ac_try_echo=$ac_try;;
16774esac
16775eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16776 (eval "$ac_link") 2>conftest.er1
503d2be0 16777 ac_status=$?
edfaf76d
LK
16778 grep -v '^ *+' conftest.er1 >conftest.err
16779 rm -f conftest.er1
16780 cat conftest.err >&5
c0d27fcc 16781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16782 (exit $ac_status); } && {
16783 test -z "$ac_c_werror_flag" ||
16784 test ! -s conftest.err
16785 } && test -s conftest$ac_exeext &&
16786 $as_test_x conftest$ac_exeext; then
98418dba 16787 ac_cv_lib_elf_elf_begin=yes
ba4481b5 16788else
503d2be0 16789 echo "$as_me: failed program was:" >&5
19650fd6
AS
16790sed 's/^/| /' conftest.$ac_ext >&5
16791
ca81d7a0 16792 ac_cv_lib_elf_elf_begin=no
ba4481b5 16793fi
ca81d7a0 16794
f053c89f 16795rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16796 conftest$ac_exeext conftest.$ac_ext
98418dba 16797LIBS=$ac_check_lib_save_LIBS
ba4481b5 16798fi
ca81d7a0
JD
16799{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
16800echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
16801if test $ac_cv_lib_elf_elf_begin = yes; then
16802 LIBS="-lelf $LIBS"
ba4481b5
DL
16803fi
16804
98418dba
CW
16805fi
16806if test $ac_have_func = no; then
ca81d7a0
JD
16807 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
16808echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 16809if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 16810 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16811else
98418dba
CW
16812 ac_check_lib_save_LIBS=$LIBS
16813LIBS="-lkvm $LIBS"
16814cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16815/* confdefs.h. */
16816_ACEOF
16817cat confdefs.h >>conftest.$ac_ext
16818cat >>conftest.$ac_ext <<_ACEOF
16819/* end confdefs.h. */
98418dba 16820
ca81d7a0
JD
16821/* Override any GCC internal prototype to avoid an error.
16822 Use char because int might match the return type of a GCC
16823 builtin and then its argument prototype would still apply. */
98418dba
CW
16824#ifdef __cplusplus
16825extern "C"
16826#endif
98418dba 16827char kvm_open ();
503d2be0
AS
16828int
16829main ()
16830{
ca81d7a0 16831return kvm_open ();
503d2be0
AS
16832 ;
16833 return 0;
16834}
16835_ACEOF
16836rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16837if { (ac_try="$ac_link"
16838case "(($ac_try" in
16839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16840 *) ac_try_echo=$ac_try;;
16841esac
16842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16843 (eval "$ac_link") 2>conftest.er1
503d2be0 16844 ac_status=$?
edfaf76d
LK
16845 grep -v '^ *+' conftest.er1 >conftest.err
16846 rm -f conftest.er1
16847 cat conftest.err >&5
c0d27fcc 16848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16849 (exit $ac_status); } && {
16850 test -z "$ac_c_werror_flag" ||
16851 test ! -s conftest.err
16852 } && test -s conftest$ac_exeext &&
16853 $as_test_x conftest$ac_exeext; then
98418dba 16854 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
16855else
16856 echo "$as_me: failed program was:" >&5
19650fd6
AS
16857sed 's/^/| /' conftest.$ac_ext >&5
16858
ca81d7a0 16859 ac_cv_lib_kvm_kvm_open=no
503d2be0 16860fi
ca81d7a0 16861
f053c89f 16862rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16863 conftest$ac_exeext conftest.$ac_ext
98418dba 16864LIBS=$ac_check_lib_save_LIBS
503d2be0 16865fi
ca81d7a0
JD
16866{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
16867echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
16868if test $ac_cv_lib_kvm_kvm_open = yes; then
16869 LIBS="-lkvm $LIBS"
ba4481b5
DL
16870fi
16871
98418dba 16872 # Check for the 4.4BSD definition of getloadavg.
ca81d7a0
JD
16873 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
16874echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 16875if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 16876 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16877else
98418dba
CW
16878 ac_check_lib_save_LIBS=$LIBS
16879LIBS="-lutil $LIBS"
16880cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16881/* confdefs.h. */
16882_ACEOF
16883cat confdefs.h >>conftest.$ac_ext
16884cat >>conftest.$ac_ext <<_ACEOF
16885/* end confdefs.h. */
98418dba 16886
ca81d7a0
JD
16887/* Override any GCC internal prototype to avoid an error.
16888 Use char because int might match the return type of a GCC
16889 builtin and then its argument prototype would still apply. */
98418dba
CW
16890#ifdef __cplusplus
16891extern "C"
16892#endif
98418dba 16893char getloadavg ();
503d2be0
AS
16894int
16895main ()
16896{
ca81d7a0 16897return getloadavg ();
503d2be0
AS
16898 ;
16899 return 0;
16900}
16901_ACEOF
16902rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16903if { (ac_try="$ac_link"
16904case "(($ac_try" in
16905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16906 *) ac_try_echo=$ac_try;;
16907esac
16908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16909 (eval "$ac_link") 2>conftest.er1
503d2be0 16910 ac_status=$?
edfaf76d
LK
16911 grep -v '^ *+' conftest.er1 >conftest.err
16912 rm -f conftest.er1
16913 cat conftest.err >&5
c0d27fcc 16914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16915 (exit $ac_status); } && {
16916 test -z "$ac_c_werror_flag" ||
16917 test ! -s conftest.err
16918 } && test -s conftest$ac_exeext &&
16919 $as_test_x conftest$ac_exeext; then
35996d22
AS
16920 ac_cv_lib_util_getloadavg=yes
16921else
503d2be0 16922 echo "$as_me: failed program was:" >&5
19650fd6
AS
16923sed 's/^/| /' conftest.$ac_ext >&5
16924
ca81d7a0 16925 ac_cv_lib_util_getloadavg=no
ba4481b5 16926fi
ca81d7a0 16927
f053c89f 16928rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16929 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
16930LIBS=$ac_check_lib_save_LIBS
16931fi
ca81d7a0
JD
16932{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
16933echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
16934if test $ac_cv_lib_util_getloadavg = yes; then
16935 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 16936fi
503d2be0 16937
98418dba 16938fi
ba4481b5 16939
98418dba
CW
16940if test $ac_have_func = no; then
16941 # There is a commonly available library for RS/6000 AIX.
16942 # Since it is not a standard part of AIX, it might be installed locally.
16943 ac_getloadavg_LIBS=$LIBS
16944 LIBS="-L/usr/local/lib $LIBS"
ca81d7a0
JD
16945 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
16946echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 16947if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 16948 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16949else
98418dba
CW
16950 ac_check_lib_save_LIBS=$LIBS
16951LIBS="-lgetloadavg $LIBS"
16952cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16953/* confdefs.h. */
16954_ACEOF
16955cat confdefs.h >>conftest.$ac_ext
16956cat >>conftest.$ac_ext <<_ACEOF
16957/* end confdefs.h. */
ba4481b5 16958
ca81d7a0
JD
16959/* Override any GCC internal prototype to avoid an error.
16960 Use char because int might match the return type of a GCC
16961 builtin and then its argument prototype would still apply. */
98418dba
CW
16962#ifdef __cplusplus
16963extern "C"
16964#endif
98418dba 16965char getloadavg ();
98418dba
CW
16966int
16967main ()
16968{
ca81d7a0 16969return getloadavg ();
98418dba
CW
16970 ;
16971 return 0;
16972}
503d2be0 16973_ACEOF
98418dba 16974rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16975if { (ac_try="$ac_link"
16976case "(($ac_try" in
16977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16978 *) ac_try_echo=$ac_try;;
16979esac
16980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16981 (eval "$ac_link") 2>conftest.er1
98418dba 16982 ac_status=$?
edfaf76d
LK
16983 grep -v '^ *+' conftest.er1 >conftest.err
16984 rm -f conftest.er1
16985 cat conftest.err >&5
c0d27fcc 16986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16987 (exit $ac_status); } && {
16988 test -z "$ac_c_werror_flag" ||
16989 test ! -s conftest.err
16990 } && test -s conftest$ac_exeext &&
16991 $as_test_x conftest$ac_exeext; then
98418dba 16992 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 16993else
98418dba 16994 echo "$as_me: failed program was:" >&5
19650fd6
AS
16995sed 's/^/| /' conftest.$ac_ext >&5
16996
ca81d7a0 16997 ac_cv_lib_getloadavg_getloadavg=no
98418dba 16998fi
ca81d7a0 16999
f053c89f 17000rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17001 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17002LIBS=$ac_check_lib_save_LIBS
17003fi
ca81d7a0
JD
17004{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
17005echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
17006if test $ac_cv_lib_getloadavg_getloadavg = yes; then
17007 LIBS="-lgetloadavg $LIBS"
17008else
17009 LIBS=$ac_getloadavg_LIBS
ba4481b5 17010fi
ba4481b5
DL
17011
17012fi
98418dba
CW
17013
17014# Make sure it is really in the library, if we think we found it,
17015# otherwise set up the replacement function.
17016
17017for ac_func in getloadavg
17018do
17019as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17020{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17021echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17022if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17023 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17024else
503d2be0 17025 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17026/* confdefs.h. */
17027_ACEOF
17028cat confdefs.h >>conftest.$ac_ext
17029cat >>conftest.$ac_ext <<_ACEOF
17030/* end confdefs.h. */
edfaf76d
LK
17031/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17032 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17033#define $ac_func innocuous_$ac_func
17034
ba4481b5 17035/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17036 which can conflict with char $ac_func (); below.
17037 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17038 <limits.h> exists even on freestanding compilers. */
edfaf76d 17039
19650fd6
AS
17040#ifdef __STDC__
17041# include <limits.h>
17042#else
17043# include <assert.h>
17044#endif
edfaf76d
LK
17045
17046#undef $ac_func
17047
ca81d7a0
JD
17048/* Override any GCC internal prototype to avoid an error.
17049 Use char because int might match the return type of a GCC
17050 builtin and then its argument prototype would still apply. */
503d2be0
AS
17051#ifdef __cplusplus
17052extern "C"
17053#endif
503d2be0 17054char $ac_func ();
ba4481b5
DL
17055/* The GNU C library defines this for functions which it implements
17056 to always fail with ENOSYS. Some functions are actually named
17057 something starting with __ and the normal name is an alias. */
ca81d7a0 17058#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17059choke me
cd958eb3
MB
17060#endif
17061
19650fd6
AS
17062int
17063main ()
17064{
ca81d7a0 17065return $ac_func ();
503d2be0
AS
17066 ;
17067 return 0;
17068}
17069_ACEOF
17070rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17071if { (ac_try="$ac_link"
17072case "(($ac_try" in
17073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17074 *) ac_try_echo=$ac_try;;
17075esac
17076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17077 (eval "$ac_link") 2>conftest.er1
503d2be0 17078 ac_status=$?
edfaf76d
LK
17079 grep -v '^ *+' conftest.er1 >conftest.err
17080 rm -f conftest.er1
17081 cat conftest.err >&5
c0d27fcc 17082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17083 (exit $ac_status); } && {
17084 test -z "$ac_c_werror_flag" ||
17085 test ! -s conftest.err
17086 } && test -s conftest$ac_exeext &&
17087 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17088 eval "$as_ac_var=yes"
17089else
17090 echo "$as_me: failed program was:" >&5
19650fd6
AS
17091sed 's/^/| /' conftest.$ac_ext >&5
17092
ca81d7a0 17093 eval "$as_ac_var=no"
503d2be0 17094fi
ca81d7a0 17095
f053c89f 17096rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17097 conftest$ac_exeext conftest.$ac_ext
503d2be0 17098fi
ca81d7a0
JD
17099ac_res=`eval echo '${'$as_ac_var'}'`
17100 { echo "$as_me:$LINENO: result: $ac_res" >&5
17101echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17102if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17103 cat >>confdefs.h <<_ACEOF
98418dba 17104#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17105_ACEOF
503d2be0 17106
98418dba 17107else
ca81d7a0 17108 case " $LIBOBJS " in
edfaf76d 17109 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
17110 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
17111 ;;
edfaf76d
LK
17112esac
17113
ba4481b5 17114
c0d27fcc 17115cat >>confdefs.h <<\_ACEOF
98418dba 17116#define C_GETLOADAVG 1
c0d27fcc 17117_ACEOF
ba4481b5 17118
98418dba
CW
17119# Figure out what our getloadavg.c needs.
17120ac_have_func=no
c0d27fcc 17121if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
ca81d7a0
JD
17122 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17123echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 17124if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 17125 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17126fi
ca81d7a0
JD
17127{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17128echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 17129else
c0d27fcc 17130 # Is the header compilable?
ca81d7a0
JD
17131{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
17132echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 17133cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17134/* confdefs.h. */
17135_ACEOF
17136cat confdefs.h >>conftest.$ac_ext
17137cat >>conftest.$ac_ext <<_ACEOF
17138/* end confdefs.h. */
c0d27fcc
MR
17139$ac_includes_default
17140#include <sys/dg_sys_info.h>
17141_ACEOF
17142rm -f conftest.$ac_objext
ca81d7a0
JD
17143if { (ac_try="$ac_compile"
17144case "(($ac_try" in
17145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17146 *) ac_try_echo=$ac_try;;
17147esac
17148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17149 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17150 ac_status=$?
edfaf76d
LK
17151 grep -v '^ *+' conftest.er1 >conftest.err
17152 rm -f conftest.er1
17153 cat conftest.err >&5
c0d27fcc 17154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17155 (exit $ac_status); } && {
17156 test -z "$ac_c_werror_flag" ||
17157 test ! -s conftest.err
17158 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17159 ac_header_compiler=yes
17160else
17161 echo "$as_me: failed program was:" >&5
19650fd6
AS
17162sed 's/^/| /' conftest.$ac_ext >&5
17163
ca81d7a0 17164 ac_header_compiler=no
c0d27fcc 17165fi
ca81d7a0
JD
17166
17167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17168{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17169echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17170
17171# Is the header present?
ca81d7a0
JD
17172{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
17173echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 17174cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17175/* confdefs.h. */
17176_ACEOF
17177cat confdefs.h >>conftest.$ac_ext
17178cat >>conftest.$ac_ext <<_ACEOF
17179/* end confdefs.h. */
98418dba
CW
17180#include <sys/dg_sys_info.h>
17181_ACEOF
ca81d7a0
JD
17182if { (ac_try="$ac_cpp conftest.$ac_ext"
17183case "(($ac_try" in
17184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17185 *) ac_try_echo=$ac_try;;
17186esac
17187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17188 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17189 ac_status=$?
6bae0ccf 17190 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17191 rm -f conftest.er1
17192 cat conftest.err >&5
c0d27fcc 17193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17194 (exit $ac_status); } >/dev/null && {
17195 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17196 test ! -s conftest.err
17197 }; then
c0d27fcc 17198 ac_header_preproc=yes
98418dba
CW
17199else
17200 echo "$as_me: failed program was:" >&5
19650fd6
AS
17201sed 's/^/| /' conftest.$ac_ext >&5
17202
c0d27fcc 17203 ac_header_preproc=no
ba4481b5 17204fi
ca81d7a0 17205
98418dba 17206rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17207{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17208echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17209
17210# So? What about this header?
edfaf76d
LK
17211case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17212 yes:no: )
c0d27fcc
MR
17213 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17214echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17215 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17216echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
17217 ac_header_preproc=yes
19650fd6 17218 ;;
edfaf76d 17219 no:yes:* )
c0d27fcc
MR
17220 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17221echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17222 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17223echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17224 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17225echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17226 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17227echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17228 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 17229echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17230 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17231echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17232
19650fd6 17233 ;;
c0d27fcc 17234esac
ca81d7a0
JD
17235{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17236echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
17237if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
17238 echo $ECHO_N "(cached) $ECHO_C" >&6
17239else
17240 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17241fi
ca81d7a0
JD
17242{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17243echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17244
17245fi
98418dba
CW
17246if test $ac_cv_header_sys_dg_sys_info_h = yes; then
17247 ac_have_func=yes
ba4481b5 17248
c0d27fcc 17249cat >>confdefs.h <<\_ACEOF
98418dba 17250#define DGUX 1
c0d27fcc
MR
17251_ACEOF
17252
503d2be0 17253
ca81d7a0
JD
17254{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17255echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17256if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 17257 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17258else
503d2be0 17259 ac_check_lib_save_LIBS=$LIBS
98418dba 17260LIBS="-ldgc $LIBS"
503d2be0 17261cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17262/* confdefs.h. */
17263_ACEOF
17264cat confdefs.h >>conftest.$ac_ext
17265cat >>conftest.$ac_ext <<_ACEOF
17266/* end confdefs.h. */
503d2be0 17267
ca81d7a0
JD
17268/* Override any GCC internal prototype to avoid an error.
17269 Use char because int might match the return type of a GCC
17270 builtin and then its argument prototype would still apply. */
503d2be0
AS
17271#ifdef __cplusplus
17272extern "C"
17273#endif
98418dba 17274char dg_sys_info ();
503d2be0
AS
17275int
17276main ()
17277{
ca81d7a0 17278return dg_sys_info ();
503d2be0
AS
17279 ;
17280 return 0;
17281}
17282_ACEOF
17283rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17284if { (ac_try="$ac_link"
17285case "(($ac_try" in
17286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17287 *) ac_try_echo=$ac_try;;
17288esac
17289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17290 (eval "$ac_link") 2>conftest.er1
503d2be0 17291 ac_status=$?
edfaf76d
LK
17292 grep -v '^ *+' conftest.er1 >conftest.err
17293 rm -f conftest.er1
17294 cat conftest.err >&5
c0d27fcc 17295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17296 (exit $ac_status); } && {
17297 test -z "$ac_c_werror_flag" ||
17298 test ! -s conftest.err
17299 } && test -s conftest$ac_exeext &&
17300 $as_test_x conftest$ac_exeext; then
98418dba 17301 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
17302else
17303 echo "$as_me: failed program was:" >&5
19650fd6
AS
17304sed 's/^/| /' conftest.$ac_ext >&5
17305
ca81d7a0 17306 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17307fi
ca81d7a0 17308
f053c89f 17309rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17310 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17311LIBS=$ac_check_lib_save_LIBS
17312fi
ca81d7a0
JD
17313{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17314echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 17315if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17316 cat >>confdefs.h <<_ACEOF
98418dba 17317#define HAVE_LIBDGC 1
c0d27fcc 17318_ACEOF
ba4481b5 17319
98418dba 17320 LIBS="-ldgc $LIBS"
ba4481b5 17321
ba4481b5
DL
17322fi
17323
98418dba 17324fi
503d2be0 17325
c0d27fcc
MR
17326
17327
17328if test "${ac_cv_header_locale_h+set}" = set; then
ca81d7a0
JD
17329 { echo "$as_me:$LINENO: checking for locale.h" >&5
17330echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 17331if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 17332 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17333fi
ca81d7a0
JD
17334{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17335echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 17336else
c0d27fcc 17337 # Is the header compilable?
ca81d7a0
JD
17338{ echo "$as_me:$LINENO: checking locale.h usability" >&5
17339echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 17340cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17341/* confdefs.h. */
17342_ACEOF
17343cat confdefs.h >>conftest.$ac_ext
17344cat >>conftest.$ac_ext <<_ACEOF
17345/* end confdefs.h. */
c0d27fcc
MR
17346$ac_includes_default
17347#include <locale.h>
17348_ACEOF
17349rm -f conftest.$ac_objext
ca81d7a0
JD
17350if { (ac_try="$ac_compile"
17351case "(($ac_try" in
17352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17353 *) ac_try_echo=$ac_try;;
17354esac
17355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17356 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17357 ac_status=$?
edfaf76d
LK
17358 grep -v '^ *+' conftest.er1 >conftest.err
17359 rm -f conftest.er1
17360 cat conftest.err >&5
c0d27fcc 17361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17362 (exit $ac_status); } && {
17363 test -z "$ac_c_werror_flag" ||
17364 test ! -s conftest.err
17365 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17366 ac_header_compiler=yes
17367else
17368 echo "$as_me: failed program was:" >&5
19650fd6
AS
17369sed 's/^/| /' conftest.$ac_ext >&5
17370
ca81d7a0 17371 ac_header_compiler=no
c0d27fcc 17372fi
ca81d7a0
JD
17373
17374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17375{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17376echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17377
17378# Is the header present?
ca81d7a0
JD
17379{ echo "$as_me:$LINENO: checking locale.h presence" >&5
17380echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 17381cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17382/* confdefs.h. */
17383_ACEOF
17384cat confdefs.h >>conftest.$ac_ext
17385cat >>conftest.$ac_ext <<_ACEOF
17386/* end confdefs.h. */
98418dba 17387#include <locale.h>
503d2be0 17388_ACEOF
ca81d7a0
JD
17389if { (ac_try="$ac_cpp conftest.$ac_ext"
17390case "(($ac_try" in
17391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17392 *) ac_try_echo=$ac_try;;
17393esac
17394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17395 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17396 ac_status=$?
6bae0ccf 17397 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17398 rm -f conftest.er1
17399 cat conftest.err >&5
c0d27fcc 17400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17401 (exit $ac_status); } >/dev/null && {
17402 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17403 test ! -s conftest.err
17404 }; then
c0d27fcc 17405 ac_header_preproc=yes
98418dba
CW
17406else
17407 echo "$as_me: failed program was:" >&5
19650fd6
AS
17408sed 's/^/| /' conftest.$ac_ext >&5
17409
c0d27fcc 17410 ac_header_preproc=no
ba4481b5 17411fi
ca81d7a0 17412
98418dba 17413rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17414{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17415echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17416
17417# So? What about this header?
edfaf76d
LK
17418case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17419 yes:no: )
c0d27fcc
MR
17420 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
17421echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17422 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
17423echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
17424 ac_header_preproc=yes
19650fd6 17425 ;;
edfaf76d 17426 no:yes:* )
c0d27fcc
MR
17427 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
17428echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17429 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
17430echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
17431 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
17432echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
17433 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
17434echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17435 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 17436echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17437 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
17438echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17439
19650fd6 17440 ;;
c0d27fcc 17441esac
ca81d7a0
JD
17442{ echo "$as_me:$LINENO: checking for locale.h" >&5
17443echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
17444if test "${ac_cv_header_locale_h+set}" = set; then
17445 echo $ECHO_N "(cached) $ECHO_C" >&6
17446else
17447 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 17448fi
ca81d7a0
JD
17449{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17450echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 17451
c0d27fcc
MR
17452fi
17453
17454
17455
98418dba 17456for ac_func in setlocale
ba4481b5 17457do
503d2be0 17458as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17459{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17460echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17461if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17462 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17463else
503d2be0 17464 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17465/* confdefs.h. */
17466_ACEOF
17467cat confdefs.h >>conftest.$ac_ext
17468cat >>conftest.$ac_ext <<_ACEOF
17469/* end confdefs.h. */
edfaf76d
LK
17470/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17471 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17472#define $ac_func innocuous_$ac_func
17473
ba4481b5 17474/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17475 which can conflict with char $ac_func (); below.
17476 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17477 <limits.h> exists even on freestanding compilers. */
edfaf76d 17478
19650fd6
AS
17479#ifdef __STDC__
17480# include <limits.h>
17481#else
17482# include <assert.h>
17483#endif
edfaf76d
LK
17484
17485#undef $ac_func
17486
ca81d7a0
JD
17487/* Override any GCC internal prototype to avoid an error.
17488 Use char because int might match the return type of a GCC
17489 builtin and then its argument prototype would still apply. */
503d2be0
AS
17490#ifdef __cplusplus
17491extern "C"
17492#endif
503d2be0 17493char $ac_func ();
ba4481b5
DL
17494/* The GNU C library defines this for functions which it implements
17495 to always fail with ENOSYS. Some functions are actually named
17496 something starting with __ and the normal name is an alias. */
ca81d7a0 17497#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17498choke me
ba4481b5
DL
17499#endif
17500
19650fd6
AS
17501int
17502main ()
17503{
ca81d7a0 17504return $ac_func ();
503d2be0
AS
17505 ;
17506 return 0;
17507}
17508_ACEOF
17509rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17510if { (ac_try="$ac_link"
17511case "(($ac_try" in
17512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17513 *) ac_try_echo=$ac_try;;
17514esac
17515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17516 (eval "$ac_link") 2>conftest.er1
503d2be0 17517 ac_status=$?
edfaf76d
LK
17518 grep -v '^ *+' conftest.er1 >conftest.err
17519 rm -f conftest.er1
17520 cat conftest.err >&5
c0d27fcc 17521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17522 (exit $ac_status); } && {
17523 test -z "$ac_c_werror_flag" ||
17524 test ! -s conftest.err
17525 } && test -s conftest$ac_exeext &&
17526 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17527 eval "$as_ac_var=yes"
17528else
17529 echo "$as_me: failed program was:" >&5
19650fd6
AS
17530sed 's/^/| /' conftest.$ac_ext >&5
17531
ca81d7a0 17532 eval "$as_ac_var=no"
503d2be0 17533fi
ca81d7a0 17534
f053c89f 17535rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17536 conftest$ac_exeext conftest.$ac_ext
503d2be0 17537fi
ca81d7a0
JD
17538ac_res=`eval echo '${'$as_ac_var'}'`
17539 { echo "$as_me:$LINENO: result: $ac_res" >&5
17540echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17541if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17542 cat >>confdefs.h <<_ACEOF
503d2be0 17543#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17544_ACEOF
ba4481b5 17545
ba4481b5
DL
17546fi
17547done
17548
c0d27fcc 17549
98418dba
CW
17550# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
17551# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
17552# Irix 4.0.5F has the header but not the library.
17553if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
17554 ac_have_func=yes
17555
c0d27fcc 17556cat >>confdefs.h <<\_ACEOF
98418dba 17557#define SVR4 1
c0d27fcc 17558_ACEOF
98418dba
CW
17559
17560fi
17561
17562if test $ac_have_func = no; then
c0d27fcc 17563 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
ca81d7a0
JD
17564 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17565echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 17566if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 17567 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17568fi
ca81d7a0
JD
17569{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17570echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 17571else
c0d27fcc 17572 # Is the header compilable?
ca81d7a0
JD
17573{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
17574echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17575cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17576/* confdefs.h. */
17577_ACEOF
17578cat confdefs.h >>conftest.$ac_ext
17579cat >>conftest.$ac_ext <<_ACEOF
17580/* end confdefs.h. */
c0d27fcc
MR
17581$ac_includes_default
17582#include <inq_stats/cpustats.h>
17583_ACEOF
17584rm -f conftest.$ac_objext
ca81d7a0
JD
17585if { (ac_try="$ac_compile"
17586case "(($ac_try" in
17587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17588 *) ac_try_echo=$ac_try;;
17589esac
17590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17591 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17592 ac_status=$?
edfaf76d
LK
17593 grep -v '^ *+' conftest.er1 >conftest.err
17594 rm -f conftest.er1
17595 cat conftest.err >&5
c0d27fcc 17596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17597 (exit $ac_status); } && {
17598 test -z "$ac_c_werror_flag" ||
17599 test ! -s conftest.err
17600 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17601 ac_header_compiler=yes
17602else
17603 echo "$as_me: failed program was:" >&5
19650fd6
AS
17604sed 's/^/| /' conftest.$ac_ext >&5
17605
ca81d7a0 17606 ac_header_compiler=no
c0d27fcc 17607fi
ca81d7a0
JD
17608
17609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17610{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17611echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17612
17613# Is the header present?
ca81d7a0
JD
17614{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
17615echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 17616cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17617/* confdefs.h. */
17618_ACEOF
17619cat confdefs.h >>conftest.$ac_ext
17620cat >>conftest.$ac_ext <<_ACEOF
17621/* end confdefs.h. */
98418dba 17622#include <inq_stats/cpustats.h>
503d2be0 17623_ACEOF
ca81d7a0
JD
17624if { (ac_try="$ac_cpp conftest.$ac_ext"
17625case "(($ac_try" in
17626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17627 *) ac_try_echo=$ac_try;;
17628esac
17629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17630 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17631 ac_status=$?
6bae0ccf 17632 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17633 rm -f conftest.er1
17634 cat conftest.err >&5
c0d27fcc 17635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17636 (exit $ac_status); } >/dev/null && {
17637 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17638 test ! -s conftest.err
17639 }; then
c0d27fcc 17640 ac_header_preproc=yes
503d2be0
AS
17641else
17642 echo "$as_me: failed program was:" >&5
19650fd6
AS
17643sed 's/^/| /' conftest.$ac_ext >&5
17644
c0d27fcc 17645 ac_header_preproc=no
ba4481b5 17646fi
ca81d7a0 17647
503d2be0 17648rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17649{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17650echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17651
17652# So? What about this header?
edfaf76d
LK
17653case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17654 yes:no: )
c0d27fcc
MR
17655 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
17656echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17657 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
17658echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
17659 ac_header_preproc=yes
19650fd6 17660 ;;
edfaf76d 17661 no:yes:* )
c0d27fcc
MR
17662 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
17663echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17664 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
17665echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
17666 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
17667echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
17668 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
17669echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17670 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 17671echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17672 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
17673echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17674
19650fd6 17675 ;;
c0d27fcc 17676esac
ca81d7a0
JD
17677{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17678echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
17679if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
17680 echo $ECHO_N "(cached) $ECHO_C" >&6
17681else
17682 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 17683fi
ca81d7a0
JD
17684{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17685echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
17686
17687fi
98418dba
CW
17688if test $ac_cv_header_inq_stats_cpustats_h = yes; then
17689 ac_have_func=yes
ba4481b5 17690
c0d27fcc 17691cat >>confdefs.h <<\_ACEOF
98418dba 17692#define UMAX 1
c0d27fcc 17693_ACEOF
98418dba 17694
c0d27fcc
MR
17695
17696cat >>confdefs.h <<\_ACEOF
98418dba 17697#define UMAX4_3 1
c0d27fcc 17698_ACEOF
98418dba
CW
17699
17700fi
17701
c0d27fcc 17702
98418dba
CW
17703fi
17704
17705if test $ac_have_func = no; then
c0d27fcc 17706 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
ca81d7a0
JD
17707 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
17708echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 17709if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 17710 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17711fi
ca81d7a0
JD
17712{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
17713echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 17714else
c0d27fcc 17715 # Is the header compilable?
ca81d7a0
JD
17716{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
17717echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17718cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17719/* confdefs.h. */
17720_ACEOF
17721cat confdefs.h >>conftest.$ac_ext
17722cat >>conftest.$ac_ext <<_ACEOF
17723/* end confdefs.h. */
c0d27fcc
MR
17724$ac_includes_default
17725#include <sys/cpustats.h>
17726_ACEOF
17727rm -f conftest.$ac_objext
ca81d7a0
JD
17728if { (ac_try="$ac_compile"
17729case "(($ac_try" in
17730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17731 *) ac_try_echo=$ac_try;;
17732esac
17733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17734 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17735 ac_status=$?
edfaf76d
LK
17736 grep -v '^ *+' conftest.er1 >conftest.err
17737 rm -f conftest.er1
17738 cat conftest.err >&5
c0d27fcc 17739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17740 (exit $ac_status); } && {
17741 test -z "$ac_c_werror_flag" ||
17742 test ! -s conftest.err
17743 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17744 ac_header_compiler=yes
17745else
17746 echo "$as_me: failed program was:" >&5
19650fd6
AS
17747sed 's/^/| /' conftest.$ac_ext >&5
17748
ca81d7a0 17749 ac_header_compiler=no
c0d27fcc 17750fi
ca81d7a0
JD
17751
17752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17753{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17754echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17755
17756# Is the header present?
ca81d7a0
JD
17757{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
17758echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 17759cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17760/* confdefs.h. */
17761_ACEOF
17762cat confdefs.h >>conftest.$ac_ext
17763cat >>conftest.$ac_ext <<_ACEOF
17764/* end confdefs.h. */
98418dba
CW
17765#include <sys/cpustats.h>
17766_ACEOF
ca81d7a0
JD
17767if { (ac_try="$ac_cpp conftest.$ac_ext"
17768case "(($ac_try" in
17769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17770 *) ac_try_echo=$ac_try;;
17771esac
17772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17773 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17774 ac_status=$?
6bae0ccf 17775 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17776 rm -f conftest.er1
17777 cat conftest.err >&5
c0d27fcc 17778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17779 (exit $ac_status); } >/dev/null && {
17780 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17781 test ! -s conftest.err
17782 }; then
c0d27fcc 17783 ac_header_preproc=yes
98418dba
CW
17784else
17785 echo "$as_me: failed program was:" >&5
19650fd6
AS
17786sed 's/^/| /' conftest.$ac_ext >&5
17787
c0d27fcc 17788 ac_header_preproc=no
98418dba 17789fi
ca81d7a0 17790
98418dba 17791rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17792{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17793echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17794
17795# So? What about this header?
edfaf76d
LK
17796case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17797 yes:no: )
c0d27fcc
MR
17798 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
17799echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17800 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
17801echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
17802 ac_header_preproc=yes
19650fd6 17803 ;;
edfaf76d 17804 no:yes:* )
c0d27fcc
MR
17805 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
17806echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17807 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
17808echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
17809 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
17810echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
17811 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
17812echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17813 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 17814echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17815 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
17816echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17817
19650fd6 17818 ;;
c0d27fcc 17819esac
ca81d7a0
JD
17820{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
17821echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
17822if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
17823 echo $ECHO_N "(cached) $ECHO_C" >&6
17824else
17825 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 17826fi
ca81d7a0
JD
17827{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
17828echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
17829
17830fi
98418dba 17831if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 17832 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 17833#define UMAX 1
c0d27fcc 17834_ACEOF
ba4481b5 17835
98418dba
CW
17836fi
17837
c0d27fcc 17838
98418dba
CW
17839fi
17840
17841if test $ac_have_func = no; then
17842
17843for ac_header in mach/mach.h
2c9dccc9
PJ
17844do
17845as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
17846if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17847 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17848echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17849if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 17850 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17851fi
ca81d7a0
JD
17852ac_res=`eval echo '${'$as_ac_Header'}'`
17853 { echo "$as_me:$LINENO: result: $ac_res" >&5
17854echo "${ECHO_T}$ac_res" >&6; }
98418dba 17855else
c0d27fcc 17856 # Is the header compilable?
ca81d7a0
JD
17857{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17858echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 17859cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17860/* confdefs.h. */
17861_ACEOF
17862cat confdefs.h >>conftest.$ac_ext
17863cat >>conftest.$ac_ext <<_ACEOF
17864/* end confdefs.h. */
c0d27fcc
MR
17865$ac_includes_default
17866#include <$ac_header>
17867_ACEOF
17868rm -f conftest.$ac_objext
ca81d7a0
JD
17869if { (ac_try="$ac_compile"
17870case "(($ac_try" in
17871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17872 *) ac_try_echo=$ac_try;;
17873esac
17874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17875 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17876 ac_status=$?
edfaf76d
LK
17877 grep -v '^ *+' conftest.er1 >conftest.err
17878 rm -f conftest.er1
17879 cat conftest.err >&5
c0d27fcc 17880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17881 (exit $ac_status); } && {
17882 test -z "$ac_c_werror_flag" ||
17883 test ! -s conftest.err
17884 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17885 ac_header_compiler=yes
17886else
17887 echo "$as_me: failed program was:" >&5
19650fd6
AS
17888sed 's/^/| /' conftest.$ac_ext >&5
17889
ca81d7a0 17890 ac_header_compiler=no
c0d27fcc 17891fi
ca81d7a0
JD
17892
17893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17894{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17895echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17896
17897# Is the header present?
ca81d7a0
JD
17898{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
17899echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 17900cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17901/* confdefs.h. */
17902_ACEOF
17903cat confdefs.h >>conftest.$ac_ext
17904cat >>conftest.$ac_ext <<_ACEOF
17905/* end confdefs.h. */
2c9dccc9
PJ
17906#include <$ac_header>
17907_ACEOF
ca81d7a0
JD
17908if { (ac_try="$ac_cpp conftest.$ac_ext"
17909case "(($ac_try" in
17910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17911 *) ac_try_echo=$ac_try;;
17912esac
17913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17914 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 17915 ac_status=$?
6bae0ccf 17916 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
17917 rm -f conftest.er1
17918 cat conftest.err >&5
c0d27fcc 17919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17920 (exit $ac_status); } >/dev/null && {
17921 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17922 test ! -s conftest.err
17923 }; then
c0d27fcc
MR
17924 ac_header_preproc=yes
17925else
17926 echo "$as_me: failed program was:" >&5
19650fd6
AS
17927sed 's/^/| /' conftest.$ac_ext >&5
17928
c0d27fcc
MR
17929 ac_header_preproc=no
17930fi
ca81d7a0 17931
c0d27fcc 17932rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17933{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17934echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17935
17936# So? What about this header?
edfaf76d
LK
17937case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17938 yes:no: )
c0d27fcc
MR
17939 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17940echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17941 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17942echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17943 ac_header_preproc=yes
19650fd6 17944 ;;
edfaf76d 17945 no:yes:* )
c0d27fcc
MR
17946 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17947echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
17948 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17949echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17950 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17951echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17952 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17953echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17954 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 17955echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17956 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17957echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17958
19650fd6 17959 ;;
c0d27fcc 17960esac
ca81d7a0
JD
17961{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17962echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17963if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17964 echo $ECHO_N "(cached) $ECHO_C" >&6
17965else
edfaf76d 17966 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 17967fi
ca81d7a0
JD
17968ac_res=`eval echo '${'$as_ac_Header'}'`
17969 { echo "$as_me:$LINENO: result: $ac_res" >&5
17970echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17971
17972fi
17973if test `eval echo '${'$as_ac_Header'}'` = yes; then
17974 cat >>confdefs.h <<_ACEOF
17975#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17976_ACEOF
17977
17978fi
17979
17980done
17981
17982fi
17983
17984
17985for ac_header in nlist.h
17986do
17987as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
17988if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17989 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17990echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17991if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17992 echo $ECHO_N "(cached) $ECHO_C" >&6
17993fi
ca81d7a0
JD
17994ac_res=`eval echo '${'$as_ac_Header'}'`
17995 { echo "$as_me:$LINENO: result: $ac_res" >&5
17996echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17997else
17998 # Is the header compilable?
ca81d7a0
JD
17999{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18000echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18001cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18002/* confdefs.h. */
18003_ACEOF
18004cat confdefs.h >>conftest.$ac_ext
18005cat >>conftest.$ac_ext <<_ACEOF
18006/* end confdefs.h. */
c0d27fcc
MR
18007$ac_includes_default
18008#include <$ac_header>
18009_ACEOF
18010rm -f conftest.$ac_objext
ca81d7a0
JD
18011if { (ac_try="$ac_compile"
18012case "(($ac_try" in
18013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18014 *) ac_try_echo=$ac_try;;
18015esac
18016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18017 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18018 ac_status=$?
edfaf76d
LK
18019 grep -v '^ *+' conftest.er1 >conftest.err
18020 rm -f conftest.er1
18021 cat conftest.err >&5
c0d27fcc 18022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18023 (exit $ac_status); } && {
18024 test -z "$ac_c_werror_flag" ||
18025 test ! -s conftest.err
18026 } && test -s conftest.$ac_objext; then
c0d27fcc 18027 ac_header_compiler=yes
2c9dccc9
PJ
18028else
18029 echo "$as_me: failed program was:" >&5
19650fd6
AS
18030sed 's/^/| /' conftest.$ac_ext >&5
18031
ca81d7a0 18032 ac_header_compiler=no
98418dba 18033fi
ca81d7a0
JD
18034
18035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18036{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18037echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 18038
c0d27fcc 18039# Is the header present?
ca81d7a0
JD
18040{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18041echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18042cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18043/* confdefs.h. */
18044_ACEOF
18045cat confdefs.h >>conftest.$ac_ext
18046cat >>conftest.$ac_ext <<_ACEOF
18047/* end confdefs.h. */
503d2be0
AS
18048#include <$ac_header>
18049_ACEOF
ca81d7a0
JD
18050if { (ac_try="$ac_cpp conftest.$ac_ext"
18051case "(($ac_try" in
18052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18053 *) ac_try_echo=$ac_try;;
18054esac
18055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18056 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18057 ac_status=$?
6bae0ccf 18058 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18059 rm -f conftest.er1
18060 cat conftest.err >&5
c0d27fcc 18061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18062 (exit $ac_status); } >/dev/null && {
18063 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18064 test ! -s conftest.err
18065 }; then
c0d27fcc 18066 ac_header_preproc=yes
503d2be0
AS
18067else
18068 echo "$as_me: failed program was:" >&5
19650fd6
AS
18069sed 's/^/| /' conftest.$ac_ext >&5
18070
c0d27fcc 18071 ac_header_preproc=no
b5de8dc0 18072fi
ca81d7a0 18073
503d2be0 18074rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18075{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18076echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18077
18078# So? What about this header?
edfaf76d
LK
18079case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18080 yes:no: )
c0d27fcc
MR
18081 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18082echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18083 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18084echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18085 ac_header_preproc=yes
19650fd6 18086 ;;
edfaf76d 18087 no:yes:* )
c0d27fcc
MR
18088 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18089echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18090 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18091echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18092 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18093echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18094 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18095echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18096 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18097echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18098 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18099echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18100
19650fd6 18101 ;;
c0d27fcc 18102esac
ca81d7a0
JD
18103{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18104echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18105if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18106 echo $ECHO_N "(cached) $ECHO_C" >&6
18107else
edfaf76d 18108 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 18109fi
ca81d7a0
JD
18110ac_res=`eval echo '${'$as_ac_Header'}'`
18111 { echo "$as_me:$LINENO: result: $ac_res" >&5
18112echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18113
18114fi
98418dba 18115if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18116 cat >>confdefs.h <<_ACEOF
98418dba 18117#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18118_ACEOF
ca81d7a0
JD
18119 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
18120echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 18121if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 18122 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 18123else
503d2be0 18124 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18125/* confdefs.h. */
18126_ACEOF
18127cat confdefs.h >>conftest.$ac_ext
18128cat >>conftest.$ac_ext <<_ACEOF
18129/* end confdefs.h. */
98418dba 18130#include <nlist.h>
b5de8dc0 18131
503d2be0
AS
18132int
18133main ()
18134{
98418dba
CW
18135static struct nlist ac_aggr;
18136if (ac_aggr.n_un.n_name)
18137return 0;
503d2be0
AS
18138 ;
18139 return 0;
18140}
18141_ACEOF
98418dba 18142rm -f conftest.$ac_objext
ca81d7a0
JD
18143if { (ac_try="$ac_compile"
18144case "(($ac_try" in
18145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18146 *) ac_try_echo=$ac_try;;
18147esac
18148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18149 (eval "$ac_compile") 2>conftest.er1
503d2be0 18150 ac_status=$?
edfaf76d
LK
18151 grep -v '^ *+' conftest.er1 >conftest.err
18152 rm -f conftest.er1
18153 cat conftest.err >&5
c0d27fcc 18154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18155 (exit $ac_status); } && {
18156 test -z "$ac_c_werror_flag" ||
18157 test ! -s conftest.err
18158 } && test -s conftest.$ac_objext; then
edfaf76d 18159 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
18160else
18161 echo "$as_me: failed program was:" >&5
19650fd6
AS
18162sed 's/^/| /' conftest.$ac_ext >&5
18163
ca81d7a0 18164 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18165/* confdefs.h. */
18166_ACEOF
18167cat confdefs.h >>conftest.$ac_ext
18168cat >>conftest.$ac_ext <<_ACEOF
18169/* end confdefs.h. */
6bae0ccf
DL
18170#include <nlist.h>
18171
18172int
18173main ()
18174{
18175static struct nlist ac_aggr;
18176if (sizeof ac_aggr.n_un.n_name)
18177return 0;
18178 ;
18179 return 0;
18180}
18181_ACEOF
18182rm -f conftest.$ac_objext
ca81d7a0
JD
18183if { (ac_try="$ac_compile"
18184case "(($ac_try" in
18185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18186 *) ac_try_echo=$ac_try;;
18187esac
18188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18189 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 18190 ac_status=$?
edfaf76d
LK
18191 grep -v '^ *+' conftest.er1 >conftest.err
18192 rm -f conftest.er1
18193 cat conftest.err >&5
6bae0ccf 18194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18195 (exit $ac_status); } && {
18196 test -z "$ac_c_werror_flag" ||
18197 test ! -s conftest.err
18198 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
18199 ac_cv_member_struct_nlist_n_un_n_name=yes
18200else
18201 echo "$as_me: failed program was:" >&5
19650fd6
AS
18202sed 's/^/| /' conftest.$ac_ext >&5
18203
ca81d7a0 18204 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 18205fi
ca81d7a0
JD
18206
18207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 18208fi
ca81d7a0
JD
18209
18210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 18211fi
ca81d7a0
JD
18212{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
18213echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 18214if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18215
c0d27fcc 18216cat >>confdefs.h <<_ACEOF
98418dba 18217#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18218_ACEOF
b5de8dc0 18219
c0d27fcc
MR
18220
18221cat >>confdefs.h <<\_ACEOF
98418dba 18222#define NLIST_NAME_UNION 1
c0d27fcc 18223_ACEOF
b5de8dc0 18224
98418dba 18225fi
b5de8dc0 18226
c0d27fcc 18227
98418dba 18228fi
c0d27fcc 18229
98418dba 18230done
b5de8dc0 18231
98418dba
CW
18232fi
18233done
b5de8dc0 18234
c0d27fcc 18235
98418dba 18236# Some definitions of getloadavg require that the program be installed setgid.
ca81d7a0
JD
18237{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18238echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
18239if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
18240 echo $ECHO_N "(cached) $ECHO_C" >&6
18241else
18242 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18243/* confdefs.h. */
18244_ACEOF
18245cat confdefs.h >>conftest.$ac_ext
18246cat >>conftest.$ac_ext <<_ACEOF
18247/* end confdefs.h. */
6bae0ccf 18248#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18249#ifdef LDAV_PRIVILEGED
18250Yowza Am I SETGID yet
18251#endif
18252_ACEOF
18253if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18254 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18255 ac_cv_func_getloadavg_setgid=yes
18256else
18257 ac_cv_func_getloadavg_setgid=no
18258fi
18259rm -f conftest*
b5de8dc0 18260
98418dba 18261fi
ca81d7a0
JD
18262{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18263echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18264if test $ac_cv_func_getloadavg_setgid = yes; then
18265 NEED_SETGID=true
b5de8dc0 18266
c0d27fcc 18267cat >>confdefs.h <<\_ACEOF
98418dba 18268#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18269_ACEOF
98418dba 18270
b5de8dc0 18271else
98418dba 18272 NEED_SETGID=false
b5de8dc0 18273fi
98418dba
CW
18274
18275if test $ac_cv_func_getloadavg_setgid = yes; then
ca81d7a0
JD
18276 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18277echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
18278if test "${ac_cv_group_kmem+set}" = set; then
18279 echo $ECHO_N "(cached) $ECHO_C" >&6
18280else
18281 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18282 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18283 # If we got an error (system does not support symlinks), try without -L.
18284 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
18285 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18286 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18287 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18288 / /s/.* //;p;'`
18289
b5de8dc0 18290fi
ca81d7a0
JD
18291{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18292echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18293 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18294fi
98418dba
CW
18295if test "x$ac_save_LIBS" = x; then
18296 GETLOADAVG_LIBS=$LIBS
18297else
18298 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18299fi
98418dba 18300LIBS=$ac_save_LIBS
b5de8dc0 18301
c0d27fcc
MR
18302
18303
ca81d7a0
JD
18304{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18305echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18306if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 18307 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18308else
b936fae4 18309 while :; do
503d2be0 18310 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18311/* confdefs.h. */
18312_ACEOF
18313cat confdefs.h >>conftest.$ac_ext
18314cat >>conftest.$ac_ext <<_ACEOF
18315/* end confdefs.h. */
e31c9a09 18316#include <stdio.h>
503d2be0
AS
18317int
18318main ()
18319{
e31c9a09 18320return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18321 ;
18322 return 0;
18323}
18324_ACEOF
f053c89f
CY
18325rm -f conftest.$ac_objext conftest$ac_exeext
18326if { (ac_try="$ac_link"
ca81d7a0
JD
18327case "(($ac_try" in
18328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18329 *) ac_try_echo=$ac_try;;
18330esac
18331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18332 (eval "$ac_link") 2>conftest.er1
b936fae4 18333 ac_status=$?
edfaf76d
LK
18334 grep -v '^ *+' conftest.er1 >conftest.err
18335 rm -f conftest.er1
18336 cat conftest.err >&5
c0d27fcc 18337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18338 (exit $ac_status); } && {
18339 test -z "$ac_c_werror_flag" ||
18340 test ! -s conftest.err
18341 } && test -s conftest$ac_exeext &&
18342 $as_test_x conftest$ac_exeext; then
18343 ac_cv_sys_largefile_source=no; break
b936fae4
AS
18344else
18345 echo "$as_me: failed program was:" >&5
19650fd6
AS
18346sed 's/^/| /' conftest.$ac_ext >&5
18347
ca81d7a0 18348
b936fae4 18349fi
ca81d7a0 18350
f053c89f
CY
18351rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18352 conftest$ac_exeext conftest.$ac_ext
b936fae4 18353 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18354/* confdefs.h. */
18355_ACEOF
18356cat confdefs.h >>conftest.$ac_ext
18357cat >>conftest.$ac_ext <<_ACEOF
18358/* end confdefs.h. */
b936fae4 18359#define _LARGEFILE_SOURCE 1
e31c9a09 18360#include <stdio.h>
b936fae4
AS
18361int
18362main ()
18363{
e31c9a09 18364return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18365 ;
18366 return 0;
18367}
18368_ACEOF
f053c89f
CY
18369rm -f conftest.$ac_objext conftest$ac_exeext
18370if { (ac_try="$ac_link"
ca81d7a0
JD
18371case "(($ac_try" in
18372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18373 *) ac_try_echo=$ac_try;;
18374esac
18375eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18376 (eval "$ac_link") 2>conftest.er1
b936fae4 18377 ac_status=$?
edfaf76d
LK
18378 grep -v '^ *+' conftest.er1 >conftest.err
18379 rm -f conftest.er1
18380 cat conftest.err >&5
c0d27fcc 18381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18382 (exit $ac_status); } && {
18383 test -z "$ac_c_werror_flag" ||
18384 test ! -s conftest.err
18385 } && test -s conftest$ac_exeext &&
18386 $as_test_x conftest$ac_exeext; then
b936fae4
AS
18387 ac_cv_sys_largefile_source=1; break
18388else
18389 echo "$as_me: failed program was:" >&5
19650fd6
AS
18390sed 's/^/| /' conftest.$ac_ext >&5
18391
ca81d7a0 18392
b936fae4 18393fi
ca81d7a0 18394
f053c89f
CY
18395rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18396 conftest$ac_exeext conftest.$ac_ext
18397 ac_cv_sys_largefile_source=unknown
b936fae4
AS
18398 break
18399done
18400fi
ca81d7a0
JD
18401{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18402echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
18403case $ac_cv_sys_largefile_source in #(
18404 no | unknown) ;;
18405 *)
c0d27fcc 18406cat >>confdefs.h <<_ACEOF
b936fae4 18407#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 18408_ACEOF
f053c89f
CY
18409;;
18410esac
b936fae4 18411rm -f conftest*
4c343001 18412
b936fae4
AS
18413# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18414# in glibc 2.1.3, but that breaks too many other things.
18415# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
f053c89f 18416if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 18417
c0d27fcc 18418cat >>confdefs.h <<\_ACEOF
b936fae4 18419#define HAVE_FSEEKO 1
c0d27fcc 18420_ACEOF
b936fae4 18421
4c343001
DL
18422fi
18423
c0d27fcc 18424
52dbaac8
PE
18425# Configure getopt.
18426# getopt.m4 serial 10
18427
18428# The getopt module assume you want GNU getopt, with getopt_long etc,
18429# rather than vanilla POSIX getopt. This means your your code should
18430# always include <getopt.h> for the getopt prototypes.
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442# Prerequisites of lib/getopt*.
18443
18444
18445
10a3b1a1 18446
52dbaac8
PE
18447 GETOPT_H=
18448
18449for ac_header in getopt.h
18450do
18451as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18452if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18453 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18454echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18455if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18456 echo $ECHO_N "(cached) $ECHO_C" >&6
18457fi
ca81d7a0
JD
18458ac_res=`eval echo '${'$as_ac_Header'}'`
18459 { echo "$as_me:$LINENO: result: $ac_res" >&5
18460echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18461else
18462 # Is the header compilable?
ca81d7a0
JD
18463{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18464echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
18465cat >conftest.$ac_ext <<_ACEOF
18466/* confdefs.h. */
18467_ACEOF
18468cat confdefs.h >>conftest.$ac_ext
18469cat >>conftest.$ac_ext <<_ACEOF
18470/* end confdefs.h. */
18471$ac_includes_default
18472#include <$ac_header>
18473_ACEOF
18474rm -f conftest.$ac_objext
ca81d7a0
JD
18475if { (ac_try="$ac_compile"
18476case "(($ac_try" in
18477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18478 *) ac_try_echo=$ac_try;;
18479esac
18480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18481 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18482 ac_status=$?
18483 grep -v '^ *+' conftest.er1 >conftest.err
18484 rm -f conftest.er1
18485 cat conftest.err >&5
18486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18487 (exit $ac_status); } && {
18488 test -z "$ac_c_werror_flag" ||
18489 test ! -s conftest.err
18490 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18491 ac_header_compiler=yes
18492else
18493 echo "$as_me: failed program was:" >&5
18494sed 's/^/| /' conftest.$ac_ext >&5
18495
ca81d7a0 18496 ac_header_compiler=no
52dbaac8 18497fi
ca81d7a0
JD
18498
18499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18500{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18501echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
18502
18503# Is the header present?
ca81d7a0
JD
18504{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18505echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
18506cat >conftest.$ac_ext <<_ACEOF
18507/* confdefs.h. */
18508_ACEOF
18509cat confdefs.h >>conftest.$ac_ext
18510cat >>conftest.$ac_ext <<_ACEOF
18511/* end confdefs.h. */
18512#include <$ac_header>
18513_ACEOF
ca81d7a0
JD
18514if { (ac_try="$ac_cpp conftest.$ac_ext"
18515case "(($ac_try" in
18516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18517 *) ac_try_echo=$ac_try;;
18518esac
18519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18520 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
18521 ac_status=$?
18522 grep -v '^ *+' conftest.er1 >conftest.err
18523 rm -f conftest.er1
18524 cat conftest.err >&5
18525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18526 (exit $ac_status); } >/dev/null && {
18527 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18528 test ! -s conftest.err
18529 }; then
52dbaac8
PE
18530 ac_header_preproc=yes
18531else
18532 echo "$as_me: failed program was:" >&5
18533sed 's/^/| /' conftest.$ac_ext >&5
18534
18535 ac_header_preproc=no
18536fi
ca81d7a0 18537
52dbaac8 18538rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18539{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18540echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
18541
18542# So? What about this header?
18543case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18544 yes:no: )
18545 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18546echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18547 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18548echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18549 ac_header_preproc=yes
18550 ;;
18551 no:yes:* )
18552 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18553echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18554 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18555echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18556 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18557echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18558 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18559echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
18560 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18561echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18562 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18563echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18564
52dbaac8
PE
18565 ;;
18566esac
ca81d7a0
JD
18567{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18568echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18569if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18570 echo $ECHO_N "(cached) $ECHO_C" >&6
18571else
18572 eval "$as_ac_Header=\$ac_header_preproc"
18573fi
ca81d7a0
JD
18574ac_res=`eval echo '${'$as_ac_Header'}'`
18575 { echo "$as_me:$LINENO: result: $ac_res" >&5
18576echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18577
18578fi
18579if test `eval echo '${'$as_ac_Header'}'` = yes; then
18580 cat >>confdefs.h <<_ACEOF
18581#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18582_ACEOF
18583
18584else
18585 GETOPT_H=getopt.h
18586fi
18587
18588done
18589
18590 if test -z "$GETOPT_H"; then
18591
18592for ac_func in getopt_long_only
18593do
18594as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18595{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18596echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18597if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18598 echo $ECHO_N "(cached) $ECHO_C" >&6
18599else
18600 cat >conftest.$ac_ext <<_ACEOF
18601/* confdefs.h. */
18602_ACEOF
18603cat confdefs.h >>conftest.$ac_ext
18604cat >>conftest.$ac_ext <<_ACEOF
18605/* end confdefs.h. */
18606/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18607 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18608#define $ac_func innocuous_$ac_func
18609
18610/* System header to define __stub macros and hopefully few prototypes,
18611 which can conflict with char $ac_func (); below.
18612 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18613 <limits.h> exists even on freestanding compilers. */
18614
18615#ifdef __STDC__
18616# include <limits.h>
18617#else
18618# include <assert.h>
18619#endif
18620
18621#undef $ac_func
18622
ca81d7a0
JD
18623/* Override any GCC internal prototype to avoid an error.
18624 Use char because int might match the return type of a GCC
18625 builtin and then its argument prototype would still apply. */
52dbaac8
PE
18626#ifdef __cplusplus
18627extern "C"
52dbaac8 18628#endif
52dbaac8
PE
18629char $ac_func ();
18630/* The GNU C library defines this for functions which it implements
18631 to always fail with ENOSYS. Some functions are actually named
18632 something starting with __ and the normal name is an alias. */
ca81d7a0 18633#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 18634choke me
52dbaac8
PE
18635#endif
18636
18637int
18638main ()
18639{
ca81d7a0 18640return $ac_func ();
52dbaac8
PE
18641 ;
18642 return 0;
18643}
18644_ACEOF
18645rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18646if { (ac_try="$ac_link"
18647case "(($ac_try" in
18648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18649 *) ac_try_echo=$ac_try;;
18650esac
18651eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18652 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
18653 ac_status=$?
18654 grep -v '^ *+' conftest.er1 >conftest.err
18655 rm -f conftest.er1
18656 cat conftest.err >&5
18657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18658 (exit $ac_status); } && {
18659 test -z "$ac_c_werror_flag" ||
18660 test ! -s conftest.err
18661 } && test -s conftest$ac_exeext &&
18662 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
18663 eval "$as_ac_var=yes"
18664else
18665 echo "$as_me: failed program was:" >&5
18666sed 's/^/| /' conftest.$ac_ext >&5
18667
ca81d7a0 18668 eval "$as_ac_var=no"
52dbaac8 18669fi
ca81d7a0 18670
f053c89f 18671rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
18672 conftest$ac_exeext conftest.$ac_ext
18673fi
ca81d7a0
JD
18674ac_res=`eval echo '${'$as_ac_var'}'`
18675 { echo "$as_me:$LINENO: result: $ac_res" >&5
18676echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18677if test `eval echo '${'$as_ac_var'}'` = yes; then
18678 cat >>confdefs.h <<_ACEOF
18679#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18680_ACEOF
18681
18682else
18683 GETOPT_H=getopt.h
18684fi
18685done
18686
18687 fi
18688
18689 if test -z "$GETOPT_H"; then
ca81d7a0
JD
18690 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
18691echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
18692if test "${ac_cv_have_decl_optreset+set}" = set; then
18693 echo $ECHO_N "(cached) $ECHO_C" >&6
18694else
18695 cat >conftest.$ac_ext <<_ACEOF
18696/* confdefs.h. */
18697_ACEOF
18698cat confdefs.h >>conftest.$ac_ext
18699cat >>conftest.$ac_ext <<_ACEOF
18700/* end confdefs.h. */
18701#include <getopt.h>
18702
18703int
18704main ()
18705{
18706#ifndef optreset
f053c89f 18707 (void) optreset;
52dbaac8
PE
18708#endif
18709
18710 ;
18711 return 0;
18712}
18713_ACEOF
18714rm -f conftest.$ac_objext
ca81d7a0
JD
18715if { (ac_try="$ac_compile"
18716case "(($ac_try" in
18717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18718 *) ac_try_echo=$ac_try;;
18719esac
18720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18721 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18722 ac_status=$?
18723 grep -v '^ *+' conftest.er1 >conftest.err
18724 rm -f conftest.er1
18725 cat conftest.err >&5
18726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18727 (exit $ac_status); } && {
18728 test -z "$ac_c_werror_flag" ||
18729 test ! -s conftest.err
18730 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18731 ac_cv_have_decl_optreset=yes
18732else
18733 echo "$as_me: failed program was:" >&5
18734sed 's/^/| /' conftest.$ac_ext >&5
18735
ca81d7a0 18736 ac_cv_have_decl_optreset=no
52dbaac8 18737fi
ca81d7a0
JD
18738
18739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 18740fi
ca81d7a0
JD
18741{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
18742echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
18743if test $ac_cv_have_decl_optreset = yes; then
18744 GETOPT_H=getopt.h
18745fi
18746
18747 fi
18748
18749 if test -z "$GETOPT_H"; then
ca81d7a0
JD
18750 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
18751echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
18752if test "${gl_cv_func_gnu_getopt+set}" = set; then
18753 echo $ECHO_N "(cached) $ECHO_C" >&6
18754else
18755 if test "$cross_compiling" = yes; then
ca81d7a0
JD
18756 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
18757echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
18758if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
18759 echo $ECHO_N "(cached) $ECHO_C" >&6
18760else
18761 cat >conftest.$ac_ext <<_ACEOF
18762/* confdefs.h. */
18763_ACEOF
18764cat confdefs.h >>conftest.$ac_ext
18765cat >>conftest.$ac_ext <<_ACEOF
18766/* end confdefs.h. */
18767#include <getopt.h>
18768
18769int
18770main ()
18771{
18772#ifndef getopt_clip
f053c89f 18773 (void) getopt_clip;
52dbaac8
PE
18774#endif
18775
18776 ;
18777 return 0;
18778}
18779_ACEOF
18780rm -f conftest.$ac_objext
ca81d7a0
JD
18781if { (ac_try="$ac_compile"
18782case "(($ac_try" in
18783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18784 *) ac_try_echo=$ac_try;;
18785esac
18786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18787 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18788 ac_status=$?
18789 grep -v '^ *+' conftest.er1 >conftest.err
18790 rm -f conftest.er1
18791 cat conftest.err >&5
18792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18793 (exit $ac_status); } && {
18794 test -z "$ac_c_werror_flag" ||
18795 test ! -s conftest.err
18796 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18797 ac_cv_have_decl_getopt_clip=yes
18798else
18799 echo "$as_me: failed program was:" >&5
18800sed 's/^/| /' conftest.$ac_ext >&5
18801
ca81d7a0 18802 ac_cv_have_decl_getopt_clip=no
52dbaac8 18803fi
ca81d7a0
JD
18804
18805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 18806fi
ca81d7a0
JD
18807{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
18808echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
18809if test $ac_cv_have_decl_getopt_clip = yes; then
18810 gl_cv_func_gnu_getopt=no
18811else
18812 gl_cv_func_gnu_getopt=yes
18813fi
18814
18815else
18816 cat >conftest.$ac_ext <<_ACEOF
18817/* confdefs.h. */
18818_ACEOF
18819cat confdefs.h >>conftest.$ac_ext
18820cat >>conftest.$ac_ext <<_ACEOF
18821/* end confdefs.h. */
18822#include <getopt.h>
18823int
18824main ()
18825{
18826
18827 char *myargv[3];
18828 myargv[0] = "conftest";
18829 myargv[1] = "-+";
18830 myargv[2] = 0;
18831 return getopt (2, myargv, "+a") != '?';
18832
18833 ;
18834 return 0;
18835}
18836_ACEOF
18837rm -f conftest$ac_exeext
ca81d7a0
JD
18838if { (ac_try="$ac_link"
18839case "(($ac_try" in
18840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18841 *) ac_try_echo=$ac_try;;
18842esac
18843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18844 (eval "$ac_link") 2>&5
52dbaac8
PE
18845 ac_status=$?
18846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18847 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
18848 { (case "(($ac_try" in
18849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18850 *) ac_try_echo=$ac_try;;
18851esac
18852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18853 (eval "$ac_try") 2>&5
52dbaac8
PE
18854 ac_status=$?
18855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18856 (exit $ac_status); }; }; then
18857 gl_cv_func_gnu_getopt=yes
18858else
18859 echo "$as_me: program exited with status $ac_status" >&5
18860echo "$as_me: failed program was:" >&5
18861sed 's/^/| /' conftest.$ac_ext >&5
18862
18863( exit $ac_status )
18864gl_cv_func_gnu_getopt=no
18865fi
ca81d7a0 18866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 18867fi
ca81d7a0
JD
18868
18869
52dbaac8 18870fi
ca81d7a0
JD
18871{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
18872echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
18873 if test "$gl_cv_func_gnu_getopt" = "no"; then
18874 GETOPT_H=getopt.h
18875 fi
18876 fi
18877
18878
18879
18880 if test -n "$GETOPT_H"; then
18881
18882
18883 GETOPT_H=getopt.h
18884
18885cat >>confdefs.h <<\_ACEOF
18886#define __GETOPT_PREFIX rpl_
18887_ACEOF
18888
18889
18890
18891 :
18892 GETOPTOBJS='getopt.o getopt1.o'
18893
18894fi
18895
18896
18897
18898
ca81d7a0
JD
18899{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
18900echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
18901if test "${ac_cv_func_getpgrp_void+set}" = set; then
18902 echo $ECHO_N "(cached) $ECHO_C" >&6
18903else
18904 # Use it with a single arg.
18905cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18906/* confdefs.h. */
18907_ACEOF
18908cat confdefs.h >>conftest.$ac_ext
18909cat >>conftest.$ac_ext <<_ACEOF
18910/* end confdefs.h. */
cd958eb3
MB
18911$ac_includes_default
18912int
18913main ()
18914{
18915getpgrp (0);
18916 ;
18917 return 0;
18918}
18919_ACEOF
18920rm -f conftest.$ac_objext
ca81d7a0
JD
18921if { (ac_try="$ac_compile"
18922case "(($ac_try" in
18923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18924 *) ac_try_echo=$ac_try;;
18925esac
18926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18927 (eval "$ac_compile") 2>conftest.er1
cd958eb3 18928 ac_status=$?
edfaf76d
LK
18929 grep -v '^ *+' conftest.er1 >conftest.err
18930 rm -f conftest.er1
18931 cat conftest.err >&5
cd958eb3 18932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18933 (exit $ac_status); } && {
18934 test -z "$ac_c_werror_flag" ||
18935 test ! -s conftest.err
18936 } && test -s conftest.$ac_objext; then
cd958eb3
MB
18937 ac_cv_func_getpgrp_void=no
18938else
18939 echo "$as_me: failed program was:" >&5
19650fd6
AS
18940sed 's/^/| /' conftest.$ac_ext >&5
18941
ca81d7a0 18942 ac_cv_func_getpgrp_void=yes
cd958eb3 18943fi
ca81d7a0
JD
18944
18945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
18946
18947fi
ca81d7a0
JD
18948{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
18949echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
18950if test $ac_cv_func_getpgrp_void = yes; then
18951
18952cat >>confdefs.h <<\_ACEOF
18953#define GETPGRP_VOID 1
18954_ACEOF
18955
18956fi
18957
18958
973a76b1
DL
18959
18960for ac_func in strftime
18961do
18962as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18963{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18964echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18965if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
18966 echo $ECHO_N "(cached) $ECHO_C" >&6
18967else
18968 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18969/* confdefs.h. */
18970_ACEOF
18971cat confdefs.h >>conftest.$ac_ext
18972cat >>conftest.$ac_ext <<_ACEOF
18973/* end confdefs.h. */
edfaf76d
LK
18974/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18975 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18976#define $ac_func innocuous_$ac_func
18977
973a76b1 18978/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18979 which can conflict with char $ac_func (); below.
18980 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18981 <limits.h> exists even on freestanding compilers. */
edfaf76d 18982
19650fd6
AS
18983#ifdef __STDC__
18984# include <limits.h>
18985#else
18986# include <assert.h>
18987#endif
edfaf76d
LK
18988
18989#undef $ac_func
18990
ca81d7a0
JD
18991/* Override any GCC internal prototype to avoid an error.
18992 Use char because int might match the return type of a GCC
18993 builtin and then its argument prototype would still apply. */
973a76b1
DL
18994#ifdef __cplusplus
18995extern "C"
973a76b1 18996#endif
973a76b1
DL
18997char $ac_func ();
18998/* The GNU C library defines this for functions which it implements
18999 to always fail with ENOSYS. Some functions are actually named
19000 something starting with __ and the normal name is an alias. */
ca81d7a0 19001#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 19002choke me
973a76b1
DL
19003#endif
19004
19650fd6
AS
19005int
19006main ()
19007{
ca81d7a0 19008return $ac_func ();
973a76b1
DL
19009 ;
19010 return 0;
19011}
19012_ACEOF
19013rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19014if { (ac_try="$ac_link"
19015case "(($ac_try" in
19016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19017 *) ac_try_echo=$ac_try;;
19018esac
19019eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19020 (eval "$ac_link") 2>conftest.er1
973a76b1 19021 ac_status=$?
edfaf76d
LK
19022 grep -v '^ *+' conftest.er1 >conftest.err
19023 rm -f conftest.er1
19024 cat conftest.err >&5
973a76b1 19025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19026 (exit $ac_status); } && {
19027 test -z "$ac_c_werror_flag" ||
19028 test ! -s conftest.err
19029 } && test -s conftest$ac_exeext &&
19030 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19031 eval "$as_ac_var=yes"
19032else
19033 echo "$as_me: failed program was:" >&5
19650fd6
AS
19034sed 's/^/| /' conftest.$ac_ext >&5
19035
ca81d7a0 19036 eval "$as_ac_var=no"
973a76b1 19037fi
ca81d7a0 19038
f053c89f 19039rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19040 conftest$ac_exeext conftest.$ac_ext
973a76b1 19041fi
ca81d7a0
JD
19042ac_res=`eval echo '${'$as_ac_var'}'`
19043 { echo "$as_me:$LINENO: result: $ac_res" >&5
19044echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
19045if test `eval echo '${'$as_ac_var'}'` = yes; then
19046 cat >>confdefs.h <<_ACEOF
19047#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19048_ACEOF
19049
19050else
19051 # strftime is in -lintl on SCO UNIX.
ca81d7a0
JD
19052{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
19053echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
19054if test "${ac_cv_lib_intl_strftime+set}" = set; then
19055 echo $ECHO_N "(cached) $ECHO_C" >&6
19056else
19057 ac_check_lib_save_LIBS=$LIBS
19058LIBS="-lintl $LIBS"
19059cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19060/* confdefs.h. */
19061_ACEOF
19062cat confdefs.h >>conftest.$ac_ext
19063cat >>conftest.$ac_ext <<_ACEOF
19064/* end confdefs.h. */
973a76b1 19065
ca81d7a0
JD
19066/* Override any GCC internal prototype to avoid an error.
19067 Use char because int might match the return type of a GCC
19068 builtin and then its argument prototype would still apply. */
973a76b1
DL
19069#ifdef __cplusplus
19070extern "C"
19071#endif
973a76b1
DL
19072char strftime ();
19073int
19074main ()
19075{
ca81d7a0 19076return strftime ();
973a76b1
DL
19077 ;
19078 return 0;
19079}
19080_ACEOF
19081rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19082if { (ac_try="$ac_link"
19083case "(($ac_try" in
19084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19085 *) ac_try_echo=$ac_try;;
19086esac
19087eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19088 (eval "$ac_link") 2>conftest.er1
973a76b1 19089 ac_status=$?
edfaf76d
LK
19090 grep -v '^ *+' conftest.er1 >conftest.err
19091 rm -f conftest.er1
19092 cat conftest.err >&5
973a76b1 19093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19094 (exit $ac_status); } && {
19095 test -z "$ac_c_werror_flag" ||
19096 test ! -s conftest.err
19097 } && test -s conftest$ac_exeext &&
19098 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19099 ac_cv_lib_intl_strftime=yes
19100else
19101 echo "$as_me: failed program was:" >&5
19650fd6
AS
19102sed 's/^/| /' conftest.$ac_ext >&5
19103
ca81d7a0 19104 ac_cv_lib_intl_strftime=no
973a76b1 19105fi
ca81d7a0 19106
f053c89f 19107rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19108 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19109LIBS=$ac_check_lib_save_LIBS
19110fi
ca81d7a0
JD
19111{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
19112echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
19113if test $ac_cv_lib_intl_strftime = yes; then
19114 cat >>confdefs.h <<\_ACEOF
19115#define HAVE_STRFTIME 1
19116_ACEOF
19117
19118LIBS="-lintl $LIBS"
19119fi
19120
19121fi
19122done
19123
19124
b936fae4
AS
19125# UNIX98 PTYs.
19126
19127for ac_func in grantpt
503d2be0
AS
19128do
19129as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19130{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19131echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19132if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19133 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19134else
503d2be0 19135 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19136/* confdefs.h. */
19137_ACEOF
19138cat confdefs.h >>conftest.$ac_ext
19139cat >>conftest.$ac_ext <<_ACEOF
19140/* end confdefs.h. */
edfaf76d
LK
19141/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19142 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19143#define $ac_func innocuous_$ac_func
19144
503d2be0 19145/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19146 which can conflict with char $ac_func (); below.
19147 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19148 <limits.h> exists even on freestanding compilers. */
edfaf76d 19149
19650fd6
AS
19150#ifdef __STDC__
19151# include <limits.h>
19152#else
19153# include <assert.h>
19154#endif
edfaf76d
LK
19155
19156#undef $ac_func
19157
ca81d7a0
JD
19158/* Override any GCC internal prototype to avoid an error.
19159 Use char because int might match the return type of a GCC
19160 builtin and then its argument prototype would still apply. */
503d2be0
AS
19161#ifdef __cplusplus
19162extern "C"
19163#endif
503d2be0 19164char $ac_func ();
503d2be0
AS
19165/* The GNU C library defines this for functions which it implements
19166 to always fail with ENOSYS. Some functions are actually named
19167 something starting with __ and the normal name is an alias. */
ca81d7a0 19168#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 19169choke me
503d2be0 19170#endif
4c343001 19171
19650fd6
AS
19172int
19173main ()
19174{
ca81d7a0 19175return $ac_func ();
503d2be0
AS
19176 ;
19177 return 0;
19178}
19179_ACEOF
19180rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19181if { (ac_try="$ac_link"
19182case "(($ac_try" in
19183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19184 *) ac_try_echo=$ac_try;;
19185esac
19186eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19187 (eval "$ac_link") 2>conftest.er1
503d2be0 19188 ac_status=$?
edfaf76d
LK
19189 grep -v '^ *+' conftest.er1 >conftest.err
19190 rm -f conftest.er1
19191 cat conftest.err >&5
c0d27fcc 19192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19193 (exit $ac_status); } && {
19194 test -z "$ac_c_werror_flag" ||
19195 test ! -s conftest.err
19196 } && test -s conftest$ac_exeext &&
19197 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19198 eval "$as_ac_var=yes"
19199else
19200 echo "$as_me: failed program was:" >&5
19650fd6
AS
19201sed 's/^/| /' conftest.$ac_ext >&5
19202
ca81d7a0 19203 eval "$as_ac_var=no"
503d2be0 19204fi
ca81d7a0 19205
f053c89f 19206rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19207 conftest$ac_exeext conftest.$ac_ext
503d2be0 19208fi
ca81d7a0
JD
19209ac_res=`eval echo '${'$as_ac_var'}'`
19210 { echo "$as_me:$LINENO: result: $ac_res" >&5
19211echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19212if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19213 cat >>confdefs.h <<_ACEOF
503d2be0 19214#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19215_ACEOF
4c343001
DL
19216
19217fi
503d2be0
AS
19218done
19219
c0d27fcc 19220
b936fae4 19221# PTY-related GNU extensions.
4c343001 19222
b936fae4
AS
19223for ac_func in getpt
19224do
19225as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19226{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19227echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19228if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19229 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19230else
b936fae4 19231 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19232/* confdefs.h. */
19233_ACEOF
19234cat confdefs.h >>conftest.$ac_ext
19235cat >>conftest.$ac_ext <<_ACEOF
19236/* end confdefs.h. */
edfaf76d
LK
19237/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19238 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19239#define $ac_func innocuous_$ac_func
19240
087121cc 19241/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19242 which can conflict with char $ac_func (); below.
19243 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19244 <limits.h> exists even on freestanding compilers. */
edfaf76d 19245
19650fd6
AS
19246#ifdef __STDC__
19247# include <limits.h>
19248#else
19249# include <assert.h>
19250#endif
edfaf76d
LK
19251
19252#undef $ac_func
19253
ca81d7a0
JD
19254/* Override any GCC internal prototype to avoid an error.
19255 Use char because int might match the return type of a GCC
19256 builtin and then its argument prototype would still apply. */
503d2be0
AS
19257#ifdef __cplusplus
19258extern "C"
19259#endif
503d2be0 19260char $ac_func ();
087121cc
GM
19261/* The GNU C library defines this for functions which it implements
19262 to always fail with ENOSYS. Some functions are actually named
19263 something starting with __ and the normal name is an alias. */
ca81d7a0 19264#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19265choke me
087121cc
GM
19266#endif
19267
19650fd6
AS
19268int
19269main ()
19270{
ca81d7a0 19271return $ac_func ();
503d2be0
AS
19272 ;
19273 return 0;
19274}
19275_ACEOF
19276rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19277if { (ac_try="$ac_link"
19278case "(($ac_try" in
19279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19280 *) ac_try_echo=$ac_try;;
19281esac
19282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19283 (eval "$ac_link") 2>conftest.er1
503d2be0 19284 ac_status=$?
f053c89f
CY
19285 grep -v '^ *+' conftest.er1 >conftest.err
19286 rm -f conftest.er1
19287 cat conftest.err >&5
c0d27fcc 19288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19289 (exit $ac_status); } && {
19290 test -z "$ac_c_werror_flag" ||
19291 test ! -s conftest.err
19292 } && test -s conftest$ac_exeext &&
19293 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19294 eval "$as_ac_var=yes"
19295else
19296 echo "$as_me: failed program was:" >&5
19650fd6
AS
19297sed 's/^/| /' conftest.$ac_ext >&5
19298
ca81d7a0 19299 eval "$as_ac_var=no"
503d2be0 19300fi
ca81d7a0 19301
f053c89f 19302rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19303 conftest$ac_exeext conftest.$ac_ext
503d2be0 19304fi
ca81d7a0
JD
19305ac_res=`eval echo '${'$as_ac_var'}'`
19306 { echo "$as_me:$LINENO: result: $ac_res" >&5
19307echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19308if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19309 cat >>confdefs.h <<_ACEOF
503d2be0 19310#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19311_ACEOF
087121cc 19312
087121cc
GM
19313fi
19314done
19315
c0d27fcc 19316
ba4481b5
DL
19317# Check this now, so that we will NOT find the above functions in ncurses.
19318# That is because we have not set up to link ncurses in lib-src.
19319# It's better to believe a function is not available
19320# than to expect to find it in ncurses.
503d2be0 19321
ca81d7a0
JD
19322{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
19323echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
19324if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
19325 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19326else
503d2be0 19327 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19328LIBS="-lncurses $LIBS"
503d2be0 19329cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19330/* confdefs.h. */
19331_ACEOF
19332cat confdefs.h >>conftest.$ac_ext
19333cat >>conftest.$ac_ext <<_ACEOF
19334/* end confdefs.h. */
503d2be0 19335
ca81d7a0
JD
19336/* Override any GCC internal prototype to avoid an error.
19337 Use char because int might match the return type of a GCC
19338 builtin and then its argument prototype would still apply. */
503d2be0
AS
19339#ifdef __cplusplus
19340extern "C"
19341#endif
503d2be0
AS
19342char tparm ();
19343int
19344main ()
19345{
ca81d7a0 19346return tparm ();
503d2be0
AS
19347 ;
19348 return 0;
19349}
19350_ACEOF
19351rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19352if { (ac_try="$ac_link"
19353case "(($ac_try" in
19354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19355 *) ac_try_echo=$ac_try;;
19356esac
19357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19358 (eval "$ac_link") 2>conftest.er1
503d2be0 19359 ac_status=$?
edfaf76d
LK
19360 grep -v '^ *+' conftest.er1 >conftest.err
19361 rm -f conftest.er1
19362 cat conftest.err >&5
c0d27fcc 19363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19364 (exit $ac_status); } && {
19365 test -z "$ac_c_werror_flag" ||
19366 test ! -s conftest.err
19367 } && test -s conftest$ac_exeext &&
19368 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19369 ac_cv_lib_ncurses_tparm=yes
19370else
19371 echo "$as_me: failed program was:" >&5
19650fd6
AS
19372sed 's/^/| /' conftest.$ac_ext >&5
19373
ca81d7a0 19374 ac_cv_lib_ncurses_tparm=no
503d2be0 19375fi
ca81d7a0 19376
f053c89f 19377rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19378 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19379LIBS=$ac_check_lib_save_LIBS
19380fi
ca81d7a0
JD
19381{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
19382echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 19383if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 19384 cat >>confdefs.h <<_ACEOF
503d2be0 19385#define HAVE_LIBNCURSES 1
c0d27fcc 19386_ACEOF
ba4481b5
DL
19387
19388 LIBS="-lncurses $LIBS"
19389
ba4481b5
DL
19390fi
19391
c0d27fcc 19392
84e70f78
KR
19393# Do we need the Hesiod library to provide the support routines?
19394if test "$with_hesiod" = yes ; then
19395 # Don't set $LIBS here -- see comments above.
19396 resolv=no
ca81d7a0
JD
19397 { echo "$as_me:$LINENO: checking for res_send" >&5
19398echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
19399if test "${ac_cv_func_res_send+set}" = set; then
19400 echo $ECHO_N "(cached) $ECHO_C" >&6
19401else
19402 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19403/* confdefs.h. */
19404_ACEOF
19405cat confdefs.h >>conftest.$ac_ext
19406cat >>conftest.$ac_ext <<_ACEOF
19407/* end confdefs.h. */
edfaf76d
LK
19408/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
19409 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19410#define res_send innocuous_res_send
19411
84e70f78 19412/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19413 which can conflict with char res_send (); below.
19414 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19415 <limits.h> exists even on freestanding compilers. */
edfaf76d 19416
19650fd6
AS
19417#ifdef __STDC__
19418# include <limits.h>
19419#else
19420# include <assert.h>
19421#endif
edfaf76d
LK
19422
19423#undef res_send
19424
ca81d7a0
JD
19425/* Override any GCC internal prototype to avoid an error.
19426 Use char because int might match the return type of a GCC
19427 builtin and then its argument prototype would still apply. */
84e70f78
KR
19428#ifdef __cplusplus
19429extern "C"
19430#endif
84e70f78 19431char res_send ();
84e70f78
KR
19432/* The GNU C library defines this for functions which it implements
19433 to always fail with ENOSYS. Some functions are actually named
19434 something starting with __ and the normal name is an alias. */
ca81d7a0 19435#if defined __stub_res_send || defined __stub___res_send
84e70f78 19436choke me
cd958eb3
MB
19437#endif
19438
19650fd6
AS
19439int
19440main ()
19441{
ca81d7a0 19442return res_send ();
84e70f78
KR
19443 ;
19444 return 0;
19445}
19446_ACEOF
19447rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19448if { (ac_try="$ac_link"
19449case "(($ac_try" in
19450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19451 *) ac_try_echo=$ac_try;;
19452esac
19453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19454 (eval "$ac_link") 2>conftest.er1
84e70f78 19455 ac_status=$?
edfaf76d
LK
19456 grep -v '^ *+' conftest.er1 >conftest.err
19457 rm -f conftest.er1
19458 cat conftest.err >&5
c0d27fcc 19459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19460 (exit $ac_status); } && {
19461 test -z "$ac_c_werror_flag" ||
19462 test ! -s conftest.err
19463 } && test -s conftest$ac_exeext &&
19464 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19465 ac_cv_func_res_send=yes
19466else
19467 echo "$as_me: failed program was:" >&5
19650fd6
AS
19468sed 's/^/| /' conftest.$ac_ext >&5
19469
ca81d7a0 19470 ac_cv_func_res_send=no
84e70f78 19471fi
ca81d7a0 19472
f053c89f 19473rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19474 conftest$ac_exeext conftest.$ac_ext
84e70f78 19475fi
ca81d7a0
JD
19476{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
19477echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
19478if test $ac_cv_func_res_send = yes; then
19479 :
19480else
ca81d7a0
JD
19481 { echo "$as_me:$LINENO: checking for __res_send" >&5
19482echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
19483if test "${ac_cv_func___res_send+set}" = set; then
19484 echo $ECHO_N "(cached) $ECHO_C" >&6
19485else
19486 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19487/* confdefs.h. */
19488_ACEOF
19489cat confdefs.h >>conftest.$ac_ext
19490cat >>conftest.$ac_ext <<_ACEOF
19491/* end confdefs.h. */
edfaf76d
LK
19492/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
19493 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19494#define __res_send innocuous___res_send
19495
84e70f78 19496/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19497 which can conflict with char __res_send (); below.
19498 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19499 <limits.h> exists even on freestanding compilers. */
edfaf76d 19500
19650fd6
AS
19501#ifdef __STDC__
19502# include <limits.h>
19503#else
19504# include <assert.h>
19505#endif
edfaf76d
LK
19506
19507#undef __res_send
19508
ca81d7a0
JD
19509/* Override any GCC internal prototype to avoid an error.
19510 Use char because int might match the return type of a GCC
19511 builtin and then its argument prototype would still apply. */
84e70f78
KR
19512#ifdef __cplusplus
19513extern "C"
19514#endif
84e70f78 19515char __res_send ();
84e70f78
KR
19516/* The GNU C library defines this for functions which it implements
19517 to always fail with ENOSYS. Some functions are actually named
19518 something starting with __ and the normal name is an alias. */
ca81d7a0 19519#if defined __stub___res_send || defined __stub_____res_send
84e70f78 19520choke me
84e70f78
KR
19521#endif
19522
19650fd6
AS
19523int
19524main ()
19525{
ca81d7a0 19526return __res_send ();
84e70f78
KR
19527 ;
19528 return 0;
19529}
19530_ACEOF
19531rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19532if { (ac_try="$ac_link"
19533case "(($ac_try" in
19534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19535 *) ac_try_echo=$ac_try;;
19536esac
19537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19538 (eval "$ac_link") 2>conftest.er1
84e70f78 19539 ac_status=$?
edfaf76d
LK
19540 grep -v '^ *+' conftest.er1 >conftest.err
19541 rm -f conftest.er1
19542 cat conftest.err >&5
c0d27fcc 19543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19544 (exit $ac_status); } && {
19545 test -z "$ac_c_werror_flag" ||
19546 test ! -s conftest.err
19547 } && test -s conftest$ac_exeext &&
19548 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19549 ac_cv_func___res_send=yes
19550else
19551 echo "$as_me: failed program was:" >&5
19650fd6
AS
19552sed 's/^/| /' conftest.$ac_ext >&5
19553
ca81d7a0 19554 ac_cv_func___res_send=no
84e70f78 19555fi
ca81d7a0 19556
f053c89f 19557rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19558 conftest$ac_exeext conftest.$ac_ext
84e70f78 19559fi
ca81d7a0
JD
19560{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
19561echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
19562if test $ac_cv_func___res_send = yes; then
19563 :
19564else
ca81d7a0
JD
19565 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
19566echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19567if test "${ac_cv_lib_resolv_res_send+set}" = set; then
19568 echo $ECHO_N "(cached) $ECHO_C" >&6
19569else
19570 ac_check_lib_save_LIBS=$LIBS
19571LIBS="-lresolv $LIBS"
19572cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19573/* confdefs.h. */
19574_ACEOF
19575cat confdefs.h >>conftest.$ac_ext
19576cat >>conftest.$ac_ext <<_ACEOF
19577/* end confdefs.h. */
84e70f78 19578
ca81d7a0
JD
19579/* Override any GCC internal prototype to avoid an error.
19580 Use char because int might match the return type of a GCC
19581 builtin and then its argument prototype would still apply. */
84e70f78
KR
19582#ifdef __cplusplus
19583extern "C"
19584#endif
84e70f78
KR
19585char res_send ();
19586int
19587main ()
19588{
ca81d7a0 19589return res_send ();
84e70f78
KR
19590 ;
19591 return 0;
19592}
19593_ACEOF
19594rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19595if { (ac_try="$ac_link"
19596case "(($ac_try" in
19597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19598 *) ac_try_echo=$ac_try;;
19599esac
19600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19601 (eval "$ac_link") 2>conftest.er1
84e70f78 19602 ac_status=$?
edfaf76d
LK
19603 grep -v '^ *+' conftest.er1 >conftest.err
19604 rm -f conftest.er1
19605 cat conftest.err >&5
c0d27fcc 19606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19607 (exit $ac_status); } && {
19608 test -z "$ac_c_werror_flag" ||
19609 test ! -s conftest.err
19610 } && test -s conftest$ac_exeext &&
19611 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19612 ac_cv_lib_resolv_res_send=yes
19613else
19614 echo "$as_me: failed program was:" >&5
19650fd6
AS
19615sed 's/^/| /' conftest.$ac_ext >&5
19616
ca81d7a0 19617 ac_cv_lib_resolv_res_send=no
84e70f78 19618fi
ca81d7a0 19619
f053c89f 19620rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19621 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19622LIBS=$ac_check_lib_save_LIBS
19623fi
ca81d7a0
JD
19624{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
19625echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
19626if test $ac_cv_lib_resolv_res_send = yes; then
19627 resolv=yes
19628else
ca81d7a0
JD
19629 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
19630echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19631if test "${ac_cv_lib_resolv___res_send+set}" = set; then
19632 echo $ECHO_N "(cached) $ECHO_C" >&6
19633else
19634 ac_check_lib_save_LIBS=$LIBS
19635LIBS="-lresolv $LIBS"
19636cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19637/* confdefs.h. */
19638_ACEOF
19639cat confdefs.h >>conftest.$ac_ext
19640cat >>conftest.$ac_ext <<_ACEOF
19641/* end confdefs.h. */
84e70f78 19642
ca81d7a0
JD
19643/* Override any GCC internal prototype to avoid an error.
19644 Use char because int might match the return type of a GCC
19645 builtin and then its argument prototype would still apply. */
84e70f78
KR
19646#ifdef __cplusplus
19647extern "C"
19648#endif
84e70f78
KR
19649char __res_send ();
19650int
19651main ()
19652{
ca81d7a0 19653return __res_send ();
84e70f78
KR
19654 ;
19655 return 0;
19656}
19657_ACEOF
19658rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19659if { (ac_try="$ac_link"
19660case "(($ac_try" in
19661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19662 *) ac_try_echo=$ac_try;;
19663esac
19664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19665 (eval "$ac_link") 2>conftest.er1
84e70f78 19666 ac_status=$?
edfaf76d
LK
19667 grep -v '^ *+' conftest.er1 >conftest.err
19668 rm -f conftest.er1
19669 cat conftest.err >&5
c0d27fcc 19670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19671 (exit $ac_status); } && {
19672 test -z "$ac_c_werror_flag" ||
19673 test ! -s conftest.err
19674 } && test -s conftest$ac_exeext &&
19675 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19676 ac_cv_lib_resolv___res_send=yes
19677else
19678 echo "$as_me: failed program was:" >&5
19650fd6
AS
19679sed 's/^/| /' conftest.$ac_ext >&5
19680
ca81d7a0 19681 ac_cv_lib_resolv___res_send=no
84e70f78 19682fi
ca81d7a0 19683
f053c89f 19684rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19685 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19686LIBS=$ac_check_lib_save_LIBS
19687fi
ca81d7a0
JD
19688{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
19689echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
19690if test $ac_cv_lib_resolv___res_send = yes; then
19691 resolv=yes
19692fi
19693
19694fi
19695
19696fi
19697
19698fi
19699
19700 if test "$resolv" = yes ; then
19701 RESOLVLIB=-lresolv
b936fae4 19702
c0d27fcc 19703cat >>confdefs.h <<\_ACEOF
84e70f78 19704#define HAVE_LIBRESOLV 1
c0d27fcc 19705_ACEOF
84e70f78
KR
19706
19707 else
19708 RESOLVLIB=
19709 fi
ca81d7a0
JD
19710 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
19711echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
19712if test "${ac_cv_func_hes_getmailhost+set}" = set; then
19713 echo $ECHO_N "(cached) $ECHO_C" >&6
19714else
19715 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19716/* confdefs.h. */
19717_ACEOF
19718cat confdefs.h >>conftest.$ac_ext
19719cat >>conftest.$ac_ext <<_ACEOF
19720/* end confdefs.h. */
edfaf76d
LK
19721/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
19722 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19723#define hes_getmailhost innocuous_hes_getmailhost
19724
84e70f78 19725/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19726 which can conflict with char hes_getmailhost (); below.
19727 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19728 <limits.h> exists even on freestanding compilers. */
edfaf76d 19729
19650fd6
AS
19730#ifdef __STDC__
19731# include <limits.h>
19732#else
19733# include <assert.h>
19734#endif
edfaf76d
LK
19735
19736#undef hes_getmailhost
19737
ca81d7a0
JD
19738/* Override any GCC internal prototype to avoid an error.
19739 Use char because int might match the return type of a GCC
19740 builtin and then its argument prototype would still apply. */
84e70f78
KR
19741#ifdef __cplusplus
19742extern "C"
19743#endif
84e70f78 19744char hes_getmailhost ();
84e70f78
KR
19745/* The GNU C library defines this for functions which it implements
19746 to always fail with ENOSYS. Some functions are actually named
19747 something starting with __ and the normal name is an alias. */
ca81d7a0 19748#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 19749choke me
cd958eb3
MB
19750#endif
19751
19650fd6
AS
19752int
19753main ()
19754{
ca81d7a0 19755return hes_getmailhost ();
84e70f78
KR
19756 ;
19757 return 0;
19758}
19759_ACEOF
19760rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19761if { (ac_try="$ac_link"
19762case "(($ac_try" in
19763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19764 *) ac_try_echo=$ac_try;;
19765esac
19766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19767 (eval "$ac_link") 2>conftest.er1
84e70f78 19768 ac_status=$?
edfaf76d
LK
19769 grep -v '^ *+' conftest.er1 >conftest.err
19770 rm -f conftest.er1
19771 cat conftest.err >&5
c0d27fcc 19772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19773 (exit $ac_status); } && {
19774 test -z "$ac_c_werror_flag" ||
19775 test ! -s conftest.err
19776 } && test -s conftest$ac_exeext &&
19777 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19778 ac_cv_func_hes_getmailhost=yes
19779else
19780 echo "$as_me: failed program was:" >&5
19650fd6
AS
19781sed 's/^/| /' conftest.$ac_ext >&5
19782
ca81d7a0 19783 ac_cv_func_hes_getmailhost=no
84e70f78 19784fi
ca81d7a0 19785
f053c89f 19786rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19787 conftest$ac_exeext conftest.$ac_ext
84e70f78 19788fi
ca81d7a0
JD
19789{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
19790echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
19791if test $ac_cv_func_hes_getmailhost = yes; then
19792 :
19793else
ca81d7a0
JD
19794 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
19795echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
19796if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
19797 echo $ECHO_N "(cached) $ECHO_C" >&6
19798else
19799 ac_check_lib_save_LIBS=$LIBS
19800LIBS="-lhesiod $RESOLVLIB $LIBS"
19801cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19802/* confdefs.h. */
19803_ACEOF
19804cat confdefs.h >>conftest.$ac_ext
19805cat >>conftest.$ac_ext <<_ACEOF
19806/* end confdefs.h. */
84e70f78 19807
ca81d7a0
JD
19808/* Override any GCC internal prototype to avoid an error.
19809 Use char because int might match the return type of a GCC
19810 builtin and then its argument prototype would still apply. */
84e70f78
KR
19811#ifdef __cplusplus
19812extern "C"
19813#endif
84e70f78
KR
19814char hes_getmailhost ();
19815int
19816main ()
19817{
ca81d7a0 19818return hes_getmailhost ();
84e70f78
KR
19819 ;
19820 return 0;
19821}
19822_ACEOF
19823rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19824if { (ac_try="$ac_link"
19825case "(($ac_try" in
19826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19827 *) ac_try_echo=$ac_try;;
19828esac
19829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19830 (eval "$ac_link") 2>conftest.er1
84e70f78 19831 ac_status=$?
edfaf76d
LK
19832 grep -v '^ *+' conftest.er1 >conftest.err
19833 rm -f conftest.er1
19834 cat conftest.err >&5
c0d27fcc 19835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19836 (exit $ac_status); } && {
19837 test -z "$ac_c_werror_flag" ||
19838 test ! -s conftest.err
19839 } && test -s conftest$ac_exeext &&
19840 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19841 ac_cv_lib_hesiod_hes_getmailhost=yes
19842else
19843 echo "$as_me: failed program was:" >&5
19650fd6
AS
19844sed 's/^/| /' conftest.$ac_ext >&5
19845
ca81d7a0 19846 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 19847fi
ca81d7a0 19848
f053c89f 19849rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19850 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19851LIBS=$ac_check_lib_save_LIBS
19852fi
ca81d7a0
JD
19853{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
19854echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 19855if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 19856
c0d27fcc 19857cat >>confdefs.h <<\_ACEOF
84e70f78 19858#define HAVE_LIBHESIOD 1
c0d27fcc 19859_ACEOF
84e70f78
KR
19860
19861else
19862 :
19863fi
19864
19865fi
19866
19867fi
19868
a21616bd
KR
19869# These tell us which Kerberos-related libraries to use.
19870if test "${with_kerberos+set}" = set; then
503d2be0 19871
ca81d7a0
JD
19872{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
19873echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
19874if test "${ac_cv_lib_com_err_com_err+set}" = set; then
19875 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19876else
503d2be0 19877 ac_check_lib_save_LIBS=$LIBS
a21616bd 19878LIBS="-lcom_err $LIBS"
503d2be0 19879cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19880/* confdefs.h. */
19881_ACEOF
19882cat confdefs.h >>conftest.$ac_ext
19883cat >>conftest.$ac_ext <<_ACEOF
19884/* end confdefs.h. */
503d2be0 19885
ca81d7a0
JD
19886/* Override any GCC internal prototype to avoid an error.
19887 Use char because int might match the return type of a GCC
19888 builtin and then its argument prototype would still apply. */
503d2be0
AS
19889#ifdef __cplusplus
19890extern "C"
19891#endif
503d2be0
AS
19892char com_err ();
19893int
19894main ()
19895{
ca81d7a0 19896return com_err ();
503d2be0
AS
19897 ;
19898 return 0;
19899}
19900_ACEOF
19901rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19902if { (ac_try="$ac_link"
19903case "(($ac_try" in
19904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19905 *) ac_try_echo=$ac_try;;
19906esac
19907eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19908 (eval "$ac_link") 2>conftest.er1
503d2be0 19909 ac_status=$?
edfaf76d
LK
19910 grep -v '^ *+' conftest.er1 >conftest.err
19911 rm -f conftest.er1
19912 cat conftest.err >&5
c0d27fcc 19913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19914 (exit $ac_status); } && {
19915 test -z "$ac_c_werror_flag" ||
19916 test ! -s conftest.err
19917 } && test -s conftest$ac_exeext &&
19918 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19919 ac_cv_lib_com_err_com_err=yes
19920else
19921 echo "$as_me: failed program was:" >&5
19650fd6
AS
19922sed 's/^/| /' conftest.$ac_ext >&5
19923
ca81d7a0 19924 ac_cv_lib_com_err_com_err=no
503d2be0 19925fi
ca81d7a0 19926
f053c89f 19927rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19928 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19929LIBS=$ac_check_lib_save_LIBS
19930fi
ca81d7a0
JD
19931{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
19932echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 19933if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 19934 cat >>confdefs.h <<_ACEOF
503d2be0 19935#define HAVE_LIBCOM_ERR 1
c0d27fcc 19936_ACEOF
a21616bd
KR
19937
19938 LIBS="-lcom_err $LIBS"
19939
a21616bd
KR
19940fi
19941
c0d27fcc 19942
ca81d7a0
JD
19943{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
19944echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
19945if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
19946 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19947else
503d2be0 19948 ac_check_lib_save_LIBS=$LIBS
a21616bd 19949LIBS="-lk5crypto $LIBS"
503d2be0 19950cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19951/* confdefs.h. */
19952_ACEOF
19953cat confdefs.h >>conftest.$ac_ext
19954cat >>conftest.$ac_ext <<_ACEOF
19955/* end confdefs.h. */
503d2be0 19956
ca81d7a0
JD
19957/* Override any GCC internal prototype to avoid an error.
19958 Use char because int might match the return type of a GCC
19959 builtin and then its argument prototype would still apply. */
503d2be0
AS
19960#ifdef __cplusplus
19961extern "C"
19962#endif
503d2be0
AS
19963char mit_des_cbc_encrypt ();
19964int
19965main ()
19966{
ca81d7a0 19967return mit_des_cbc_encrypt ();
503d2be0
AS
19968 ;
19969 return 0;
19970}
19971_ACEOF
19972rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19973if { (ac_try="$ac_link"
19974case "(($ac_try" in
19975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19976 *) ac_try_echo=$ac_try;;
19977esac
19978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19979 (eval "$ac_link") 2>conftest.er1
503d2be0 19980 ac_status=$?
edfaf76d
LK
19981 grep -v '^ *+' conftest.er1 >conftest.err
19982 rm -f conftest.er1
19983 cat conftest.err >&5
c0d27fcc 19984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19985 (exit $ac_status); } && {
19986 test -z "$ac_c_werror_flag" ||
19987 test ! -s conftest.err
19988 } && test -s conftest$ac_exeext &&
19989 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19990 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
19991else
19992 echo "$as_me: failed program was:" >&5
19650fd6
AS
19993sed 's/^/| /' conftest.$ac_ext >&5
19994
ca81d7a0 19995 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 19996fi
ca81d7a0 19997
f053c89f 19998rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19999 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20000LIBS=$ac_check_lib_save_LIBS
20001fi
ca81d7a0
JD
20002{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
20003echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20004if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20005 cat >>confdefs.h <<_ACEOF
503d2be0 20006#define HAVE_LIBK5CRYPTO 1
c0d27fcc 20007_ACEOF
a21616bd
KR
20008
20009 LIBS="-lk5crypto $LIBS"
20010
a21616bd
KR
20011fi
20012
c0d27fcc 20013
ca81d7a0
JD
20014{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
20015echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
20016if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
20017 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20018else
503d2be0 20019 ac_check_lib_save_LIBS=$LIBS
a21616bd 20020LIBS="-lcrypto $LIBS"
503d2be0 20021cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20022/* confdefs.h. */
20023_ACEOF
20024cat confdefs.h >>conftest.$ac_ext
20025cat >>conftest.$ac_ext <<_ACEOF
20026/* end confdefs.h. */
503d2be0 20027
ca81d7a0
JD
20028/* Override any GCC internal prototype to avoid an error.
20029 Use char because int might match the return type of a GCC
20030 builtin and then its argument prototype would still apply. */
503d2be0
AS
20031#ifdef __cplusplus
20032extern "C"
20033#endif
503d2be0
AS
20034char mit_des_cbc_encrypt ();
20035int
20036main ()
20037{
ca81d7a0 20038return mit_des_cbc_encrypt ();
503d2be0
AS
20039 ;
20040 return 0;
20041}
20042_ACEOF
20043rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20044if { (ac_try="$ac_link"
20045case "(($ac_try" in
20046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20047 *) ac_try_echo=$ac_try;;
20048esac
20049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20050 (eval "$ac_link") 2>conftest.er1
503d2be0 20051 ac_status=$?
edfaf76d
LK
20052 grep -v '^ *+' conftest.er1 >conftest.err
20053 rm -f conftest.er1
20054 cat conftest.err >&5
c0d27fcc 20055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20056 (exit $ac_status); } && {
20057 test -z "$ac_c_werror_flag" ||
20058 test ! -s conftest.err
20059 } && test -s conftest$ac_exeext &&
20060 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20061 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
20062else
20063 echo "$as_me: failed program was:" >&5
19650fd6
AS
20064sed 's/^/| /' conftest.$ac_ext >&5
20065
ca81d7a0 20066 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 20067fi
ca81d7a0 20068
f053c89f 20069rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20070 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20071LIBS=$ac_check_lib_save_LIBS
20072fi
ca81d7a0
JD
20073{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
20074echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20075if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20076 cat >>confdefs.h <<_ACEOF
503d2be0 20077#define HAVE_LIBCRYPTO 1
c0d27fcc 20078_ACEOF
a21616bd
KR
20079
20080 LIBS="-lcrypto $LIBS"
20081
a21616bd
KR
20082fi
20083
c0d27fcc 20084
ca81d7a0
JD
20085{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
20086echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
20087if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
20088 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20089else
503d2be0 20090 ac_check_lib_save_LIBS=$LIBS
a21616bd 20091LIBS="-lkrb5 $LIBS"
503d2be0 20092cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20093/* confdefs.h. */
20094_ACEOF
20095cat confdefs.h >>conftest.$ac_ext
20096cat >>conftest.$ac_ext <<_ACEOF
20097/* end confdefs.h. */
a21616bd 20098
ca81d7a0
JD
20099/* Override any GCC internal prototype to avoid an error.
20100 Use char because int might match the return type of a GCC
20101 builtin and then its argument prototype would still apply. */
503d2be0
AS
20102#ifdef __cplusplus
20103extern "C"
20104#endif
503d2be0
AS
20105char krb5_init_context ();
20106int
20107main ()
20108{
ca81d7a0 20109return krb5_init_context ();
503d2be0
AS
20110 ;
20111 return 0;
20112}
20113_ACEOF
20114rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20115if { (ac_try="$ac_link"
20116case "(($ac_try" in
20117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20118 *) ac_try_echo=$ac_try;;
20119esac
20120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20121 (eval "$ac_link") 2>conftest.er1
503d2be0 20122 ac_status=$?
edfaf76d
LK
20123 grep -v '^ *+' conftest.er1 >conftest.err
20124 rm -f conftest.er1
20125 cat conftest.err >&5
c0d27fcc 20126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20127 (exit $ac_status); } && {
20128 test -z "$ac_c_werror_flag" ||
20129 test ! -s conftest.err
20130 } && test -s conftest$ac_exeext &&
20131 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20132 ac_cv_lib_krb5_krb5_init_context=yes
20133else
20134 echo "$as_me: failed program was:" >&5
19650fd6
AS
20135sed 's/^/| /' conftest.$ac_ext >&5
20136
ca81d7a0 20137 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20138fi
ca81d7a0 20139
f053c89f 20140rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20141 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20142LIBS=$ac_check_lib_save_LIBS
20143fi
ca81d7a0
JD
20144{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20145echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 20146if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20147 cat >>confdefs.h <<_ACEOF
503d2be0 20148#define HAVE_LIBKRB5 1
c0d27fcc 20149_ACEOF
a21616bd
KR
20150
20151 LIBS="-lkrb5 $LIBS"
20152
a21616bd
KR
20153fi
20154
20155 if test "${with_kerberos5+set}" != set; then
503d2be0 20156
ca81d7a0
JD
20157{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20158echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
20159if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
20160 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20161else
503d2be0 20162 ac_check_lib_save_LIBS=$LIBS
a21616bd 20163LIBS="-ldes425 $LIBS"
503d2be0 20164cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20165/* confdefs.h. */
20166_ACEOF
20167cat confdefs.h >>conftest.$ac_ext
20168cat >>conftest.$ac_ext <<_ACEOF
20169/* end confdefs.h. */
503d2be0 20170
ca81d7a0
JD
20171/* Override any GCC internal prototype to avoid an error.
20172 Use char because int might match the return type of a GCC
20173 builtin and then its argument prototype would still apply. */
503d2be0
AS
20174#ifdef __cplusplus
20175extern "C"
20176#endif
503d2be0
AS
20177char des_cbc_encrypt ();
20178int
20179main ()
20180{
ca81d7a0 20181return des_cbc_encrypt ();
503d2be0
AS
20182 ;
20183 return 0;
20184}
20185_ACEOF
20186rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20187if { (ac_try="$ac_link"
20188case "(($ac_try" in
20189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20190 *) ac_try_echo=$ac_try;;
20191esac
20192eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20193 (eval "$ac_link") 2>conftest.er1
503d2be0 20194 ac_status=$?
edfaf76d
LK
20195 grep -v '^ *+' conftest.er1 >conftest.err
20196 rm -f conftest.er1
20197 cat conftest.err >&5
c0d27fcc 20198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20199 (exit $ac_status); } && {
20200 test -z "$ac_c_werror_flag" ||
20201 test ! -s conftest.err
20202 } && test -s conftest$ac_exeext &&
20203 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20204 ac_cv_lib_des425_des_cbc_encrypt=yes
20205else
20206 echo "$as_me: failed program was:" >&5
19650fd6
AS
20207sed 's/^/| /' conftest.$ac_ext >&5
20208
ca81d7a0 20209 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 20210fi
ca81d7a0 20211
f053c89f 20212rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20213 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20214LIBS=$ac_check_lib_save_LIBS
20215fi
ca81d7a0
JD
20216{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
20217echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 20218if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 20219 cat >>confdefs.h <<_ACEOF
503d2be0 20220#define HAVE_LIBDES425 1
c0d27fcc 20221_ACEOF
a21616bd
KR
20222
20223 LIBS="-ldes425 $LIBS"
20224
20225else
503d2be0 20226
ca81d7a0
JD
20227{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
20228echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
20229if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
20230 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20231else
503d2be0 20232 ac_check_lib_save_LIBS=$LIBS
a21616bd 20233LIBS="-ldes $LIBS"
503d2be0 20234cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20235/* confdefs.h. */
20236_ACEOF
20237cat confdefs.h >>conftest.$ac_ext
20238cat >>conftest.$ac_ext <<_ACEOF
20239/* end confdefs.h. */
503d2be0 20240
ca81d7a0
JD
20241/* Override any GCC internal prototype to avoid an error.
20242 Use char because int might match the return type of a GCC
20243 builtin and then its argument prototype would still apply. */
503d2be0
AS
20244#ifdef __cplusplus
20245extern "C"
20246#endif
503d2be0
AS
20247char des_cbc_encrypt ();
20248int
20249main ()
20250{
ca81d7a0 20251return des_cbc_encrypt ();
503d2be0
AS
20252 ;
20253 return 0;
20254}
20255_ACEOF
20256rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20257if { (ac_try="$ac_link"
20258case "(($ac_try" in
20259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20260 *) ac_try_echo=$ac_try;;
20261esac
20262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20263 (eval "$ac_link") 2>conftest.er1
503d2be0 20264 ac_status=$?
edfaf76d
LK
20265 grep -v '^ *+' conftest.er1 >conftest.err
20266 rm -f conftest.er1
20267 cat conftest.err >&5
c0d27fcc 20268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20269 (exit $ac_status); } && {
20270 test -z "$ac_c_werror_flag" ||
20271 test ! -s conftest.err
20272 } && test -s conftest$ac_exeext &&
20273 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20274 ac_cv_lib_des_des_cbc_encrypt=yes
20275else
20276 echo "$as_me: failed program was:" >&5
19650fd6
AS
20277sed 's/^/| /' conftest.$ac_ext >&5
20278
ca81d7a0 20279 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 20280fi
ca81d7a0 20281
f053c89f 20282rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20283 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20284LIBS=$ac_check_lib_save_LIBS
20285fi
ca81d7a0
JD
20286{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
20287echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 20288if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 20289 cat >>confdefs.h <<_ACEOF
503d2be0 20290#define HAVE_LIBDES 1
c0d27fcc 20291_ACEOF
a21616bd
KR
20292
20293 LIBS="-ldes $LIBS"
20294
a21616bd
KR
20295fi
20296
20297fi
20298
c0d27fcc 20299
ca81d7a0
JD
20300{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
20301echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
20302if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
20303 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20304else
503d2be0 20305 ac_check_lib_save_LIBS=$LIBS
a21616bd 20306LIBS="-lkrb4 $LIBS"
503d2be0 20307cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20308/* confdefs.h. */
20309_ACEOF
20310cat confdefs.h >>conftest.$ac_ext
20311cat >>conftest.$ac_ext <<_ACEOF
20312/* end confdefs.h. */
503d2be0 20313
ca81d7a0
JD
20314/* Override any GCC internal prototype to avoid an error.
20315 Use char because int might match the return type of a GCC
20316 builtin and then its argument prototype would still apply. */
503d2be0
AS
20317#ifdef __cplusplus
20318extern "C"
20319#endif
503d2be0
AS
20320char krb_get_cred ();
20321int
f053c89f
CY
20322main ()
20323{
20324return krb_get_cred ();
20325 ;
20326 return 0;
20327}
20328_ACEOF
20329rm -f conftest.$ac_objext conftest$ac_exeext
20330if { (ac_try="$ac_link"
20331case "(($ac_try" in
ca81d7a0
JD
20332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20333 *) ac_try_echo=$ac_try;;
20334esac
20335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 20336 (eval "$ac_link") 2>conftest.er1
503d2be0 20337 ac_status=$?
f053c89f
CY
20338 grep -v '^ *+' conftest.er1 >conftest.err
20339 rm -f conftest.er1
20340 cat conftest.err >&5
c0d27fcc 20341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20342 (exit $ac_status); } && {
20343 test -z "$ac_c_werror_flag" ||
20344 test ! -s conftest.err
20345 } && test -s conftest$ac_exeext &&
20346 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20347 ac_cv_lib_krb4_krb_get_cred=yes
20348else
20349 echo "$as_me: failed program was:" >&5
19650fd6
AS
20350sed 's/^/| /' conftest.$ac_ext >&5
20351
ca81d7a0 20352 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 20353fi
ca81d7a0 20354
f053c89f 20355rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20356 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20357LIBS=$ac_check_lib_save_LIBS
20358fi
ca81d7a0
JD
20359{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
20360echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 20361if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 20362 cat >>confdefs.h <<_ACEOF
503d2be0 20363#define HAVE_LIBKRB4 1
c0d27fcc 20364_ACEOF
a21616bd
KR
20365
20366 LIBS="-lkrb4 $LIBS"
20367
20368else
503d2be0 20369
ca81d7a0
JD
20370{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
20371echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
20372if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
20373 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20374else
503d2be0 20375 ac_check_lib_save_LIBS=$LIBS
a21616bd 20376LIBS="-lkrb $LIBS"
503d2be0 20377cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20378/* confdefs.h. */
20379_ACEOF
20380cat confdefs.h >>conftest.$ac_ext
20381cat >>conftest.$ac_ext <<_ACEOF
20382/* end confdefs.h. */
503d2be0 20383
ca81d7a0
JD
20384/* Override any GCC internal prototype to avoid an error.
20385 Use char because int might match the return type of a GCC
20386 builtin and then its argument prototype would still apply. */
503d2be0
AS
20387#ifdef __cplusplus
20388extern "C"
20389#endif
503d2be0
AS
20390char krb_get_cred ();
20391int
20392main ()
20393{
ca81d7a0 20394return krb_get_cred ();
503d2be0
AS
20395 ;
20396 return 0;
20397}
20398_ACEOF
20399rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20400if { (ac_try="$ac_link"
20401case "(($ac_try" in
20402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20403 *) ac_try_echo=$ac_try;;
20404esac
20405eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20406 (eval "$ac_link") 2>conftest.er1
503d2be0 20407 ac_status=$?
edfaf76d
LK
20408 grep -v '^ *+' conftest.er1 >conftest.err
20409 rm -f conftest.er1
20410 cat conftest.err >&5
c0d27fcc 20411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20412 (exit $ac_status); } && {
20413 test -z "$ac_c_werror_flag" ||
20414 test ! -s conftest.err
20415 } && test -s conftest$ac_exeext &&
20416 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20417 ac_cv_lib_krb_krb_get_cred=yes
20418else
20419 echo "$as_me: failed program was:" >&5
19650fd6
AS
20420sed 's/^/| /' conftest.$ac_ext >&5
20421
ca81d7a0 20422 ac_cv_lib_krb_krb_get_cred=no
503d2be0 20423fi
ca81d7a0 20424
f053c89f 20425rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20426 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20427LIBS=$ac_check_lib_save_LIBS
20428fi
ca81d7a0
JD
20429{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
20430echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 20431if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 20432 cat >>confdefs.h <<_ACEOF
503d2be0 20433#define HAVE_LIBKRB 1
c0d27fcc 20434_ACEOF
a21616bd
KR
20435
20436 LIBS="-lkrb $LIBS"
20437
a21616bd
KR
20438fi
20439
20440fi
20441
20442 fi
20443
20444 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
20445
20446for ac_header in krb5.h
a21616bd 20447do
503d2be0 20448as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20449if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20450 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20451echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20452if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20453 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20454fi
ca81d7a0
JD
20455ac_res=`eval echo '${'$as_ac_Header'}'`
20456 { echo "$as_me:$LINENO: result: $ac_res" >&5
20457echo "${ECHO_T}$ac_res" >&6; }
98418dba 20458else
c0d27fcc 20459 # Is the header compilable?
ca81d7a0
JD
20460{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20461echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20462cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20463/* confdefs.h. */
20464_ACEOF
20465cat confdefs.h >>conftest.$ac_ext
20466cat >>conftest.$ac_ext <<_ACEOF
20467/* end confdefs.h. */
c0d27fcc
MR
20468$ac_includes_default
20469#include <$ac_header>
20470_ACEOF
20471rm -f conftest.$ac_objext
ca81d7a0
JD
20472if { (ac_try="$ac_compile"
20473case "(($ac_try" in
20474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20475 *) ac_try_echo=$ac_try;;
20476esac
20477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20478 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20479 ac_status=$?
edfaf76d
LK
20480 grep -v '^ *+' conftest.er1 >conftest.err
20481 rm -f conftest.er1
20482 cat conftest.err >&5
c0d27fcc 20483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20484 (exit $ac_status); } && {
20485 test -z "$ac_c_werror_flag" ||
20486 test ! -s conftest.err
20487 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20488 ac_header_compiler=yes
20489else
20490 echo "$as_me: failed program was:" >&5
19650fd6
AS
20491sed 's/^/| /' conftest.$ac_ext >&5
20492
ca81d7a0 20493 ac_header_compiler=no
c0d27fcc 20494fi
ca81d7a0
JD
20495
20496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20497{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20498echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20499
20500# Is the header present?
ca81d7a0
JD
20501{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20502echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20503cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20504/* confdefs.h. */
20505_ACEOF
20506cat confdefs.h >>conftest.$ac_ext
20507cat >>conftest.$ac_ext <<_ACEOF
20508/* end confdefs.h. */
503d2be0
AS
20509#include <$ac_header>
20510_ACEOF
ca81d7a0
JD
20511if { (ac_try="$ac_cpp conftest.$ac_ext"
20512case "(($ac_try" in
20513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20514 *) ac_try_echo=$ac_try;;
20515esac
20516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20517 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20518 ac_status=$?
6bae0ccf 20519 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20520 rm -f conftest.er1
20521 cat conftest.err >&5
c0d27fcc 20522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20523 (exit $ac_status); } >/dev/null && {
20524 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20525 test ! -s conftest.err
20526 }; then
c0d27fcc 20527 ac_header_preproc=yes
503d2be0
AS
20528else
20529 echo "$as_me: failed program was:" >&5
19650fd6
AS
20530sed 's/^/| /' conftest.$ac_ext >&5
20531
c0d27fcc 20532 ac_header_preproc=no
a21616bd 20533fi
ca81d7a0 20534
503d2be0 20535rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20536{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20537echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20538
20539# So? What about this header?
edfaf76d
LK
20540case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20541 yes:no: )
c0d27fcc
MR
20542 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20543echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20544 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20545echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20546 ac_header_preproc=yes
19650fd6 20547 ;;
edfaf76d 20548 no:yes:* )
c0d27fcc
MR
20549 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20550echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20551 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20552echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20553 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20554echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20555 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20556echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20557 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20558echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20559 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20560echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20561
19650fd6 20562 ;;
c0d27fcc 20563esac
ca81d7a0
JD
20564{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20565echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20566if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20567 echo $ECHO_N "(cached) $ECHO_C" >&6
20568else
edfaf76d 20569 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20570fi
ca81d7a0
JD
20571ac_res=`eval echo '${'$as_ac_Header'}'`
20572 { echo "$as_me:$LINENO: result: $ac_res" >&5
20573echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20574
20575fi
503d2be0 20576if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20577 cat >>confdefs.h <<_ACEOF
503d2be0 20578#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20579_ACEOF
503d2be0 20580
a21616bd 20581fi
c0d27fcc 20582
a21616bd
KR
20583done
20584
20585 else
503d2be0
AS
20586
20587for ac_header in des.h
a21616bd 20588do
503d2be0 20589as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20590if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20591 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20592echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20593if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20594 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20595fi
ca81d7a0
JD
20596ac_res=`eval echo '${'$as_ac_Header'}'`
20597 { echo "$as_me:$LINENO: result: $ac_res" >&5
20598echo "${ECHO_T}$ac_res" >&6; }
98418dba 20599else
c0d27fcc 20600 # Is the header compilable?
ca81d7a0
JD
20601{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20602echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20603cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20604/* confdefs.h. */
20605_ACEOF
20606cat confdefs.h >>conftest.$ac_ext
20607cat >>conftest.$ac_ext <<_ACEOF
20608/* end confdefs.h. */
c0d27fcc
MR
20609$ac_includes_default
20610#include <$ac_header>
20611_ACEOF
20612rm -f conftest.$ac_objext
ca81d7a0
JD
20613if { (ac_try="$ac_compile"
20614case "(($ac_try" in
20615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20616 *) ac_try_echo=$ac_try;;
20617esac
20618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20619 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20620 ac_status=$?
edfaf76d
LK
20621 grep -v '^ *+' conftest.er1 >conftest.err
20622 rm -f conftest.er1
20623 cat conftest.err >&5
c0d27fcc 20624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20625 (exit $ac_status); } && {
20626 test -z "$ac_c_werror_flag" ||
20627 test ! -s conftest.err
20628 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20629 ac_header_compiler=yes
20630else
20631 echo "$as_me: failed program was:" >&5
19650fd6
AS
20632sed 's/^/| /' conftest.$ac_ext >&5
20633
ca81d7a0 20634 ac_header_compiler=no
c0d27fcc 20635fi
ca81d7a0
JD
20636
20637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20638{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20639echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20640
20641# Is the header present?
ca81d7a0
JD
20642{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20643echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20644cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20645/* confdefs.h. */
20646_ACEOF
20647cat confdefs.h >>conftest.$ac_ext
20648cat >>conftest.$ac_ext <<_ACEOF
20649/* end confdefs.h. */
503d2be0
AS
20650#include <$ac_header>
20651_ACEOF
ca81d7a0
JD
20652if { (ac_try="$ac_cpp conftest.$ac_ext"
20653case "(($ac_try" in
20654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20655 *) ac_try_echo=$ac_try;;
20656esac
20657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20658 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20659 ac_status=$?
6bae0ccf 20660 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20661 rm -f conftest.er1
20662 cat conftest.err >&5
c0d27fcc 20663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20664 (exit $ac_status); } >/dev/null && {
20665 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20666 test ! -s conftest.err
20667 }; then
c0d27fcc 20668 ac_header_preproc=yes
503d2be0
AS
20669else
20670 echo "$as_me: failed program was:" >&5
19650fd6
AS
20671sed 's/^/| /' conftest.$ac_ext >&5
20672
c0d27fcc 20673 ac_header_preproc=no
a21616bd 20674fi
ca81d7a0 20675
503d2be0 20676rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20677{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20678echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20679
20680# So? What about this header?
edfaf76d
LK
20681case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20682 yes:no: )
c0d27fcc
MR
20683 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20684echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20685 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20686echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20687 ac_header_preproc=yes
19650fd6 20688 ;;
edfaf76d 20689 no:yes:* )
c0d27fcc
MR
20690 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20691echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20692 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20693echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20694 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20695echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20696 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20697echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20698 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20699echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20700 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20701echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20702
19650fd6 20703 ;;
c0d27fcc 20704esac
ca81d7a0
JD
20705{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20706echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20707if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20708 echo $ECHO_N "(cached) $ECHO_C" >&6
20709else
edfaf76d 20710 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20711fi
ca81d7a0
JD
20712ac_res=`eval echo '${'$as_ac_Header'}'`
20713 { echo "$as_me:$LINENO: result: $ac_res" >&5
20714echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20715
20716fi
503d2be0 20717if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20718 cat >>confdefs.h <<_ACEOF
503d2be0 20719#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20720_ACEOF
503d2be0 20721
a21616bd 20722else
503d2be0
AS
20723
20724for ac_header in kerberosIV/des.h
a21616bd 20725do
503d2be0 20726as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20727if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20728 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20729echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20730if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20731 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20732fi
ca81d7a0
JD
20733ac_res=`eval echo '${'$as_ac_Header'}'`
20734 { echo "$as_me:$LINENO: result: $ac_res" >&5
20735echo "${ECHO_T}$ac_res" >&6; }
98418dba 20736else
c0d27fcc 20737 # Is the header compilable?
ca81d7a0
JD
20738{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20739echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20740cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20741/* confdefs.h. */
20742_ACEOF
20743cat confdefs.h >>conftest.$ac_ext
20744cat >>conftest.$ac_ext <<_ACEOF
20745/* end confdefs.h. */
c0d27fcc
MR
20746$ac_includes_default
20747#include <$ac_header>
20748_ACEOF
20749rm -f conftest.$ac_objext
ca81d7a0
JD
20750if { (ac_try="$ac_compile"
20751case "(($ac_try" in
20752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20753 *) ac_try_echo=$ac_try;;
20754esac
20755eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20756 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20757 ac_status=$?
edfaf76d
LK
20758 grep -v '^ *+' conftest.er1 >conftest.err
20759 rm -f conftest.er1
20760 cat conftest.err >&5
c0d27fcc 20761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20762 (exit $ac_status); } && {
20763 test -z "$ac_c_werror_flag" ||
20764 test ! -s conftest.err
20765 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20766 ac_header_compiler=yes
20767else
20768 echo "$as_me: failed program was:" >&5
19650fd6
AS
20769sed 's/^/| /' conftest.$ac_ext >&5
20770
ca81d7a0 20771 ac_header_compiler=no
c0d27fcc 20772fi
ca81d7a0
JD
20773
20774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20775{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20776echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20777
20778# Is the header present?
ca81d7a0
JD
20779{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20780echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20781cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20782/* confdefs.h. */
20783_ACEOF
20784cat confdefs.h >>conftest.$ac_ext
20785cat >>conftest.$ac_ext <<_ACEOF
20786/* end confdefs.h. */
503d2be0
AS
20787#include <$ac_header>
20788_ACEOF
ca81d7a0
JD
20789if { (ac_try="$ac_cpp conftest.$ac_ext"
20790case "(($ac_try" in
20791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20792 *) ac_try_echo=$ac_try;;
20793esac
20794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20795 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20796 ac_status=$?
6bae0ccf 20797 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20798 rm -f conftest.er1
20799 cat conftest.err >&5
c0d27fcc 20800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20801 (exit $ac_status); } >/dev/null && {
20802 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20803 test ! -s conftest.err
20804 }; then
c0d27fcc 20805 ac_header_preproc=yes
503d2be0
AS
20806else
20807 echo "$as_me: failed program was:" >&5
19650fd6
AS
20808sed 's/^/| /' conftest.$ac_ext >&5
20809
c0d27fcc 20810 ac_header_preproc=no
a21616bd 20811fi
ca81d7a0 20812
503d2be0 20813rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20814{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20815echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20816
20817# So? What about this header?
edfaf76d
LK
20818case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20819 yes:no: )
c0d27fcc
MR
20820 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20821echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20822 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20823echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20824 ac_header_preproc=yes
19650fd6 20825 ;;
edfaf76d 20826 no:yes:* )
c0d27fcc
MR
20827 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20828echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20829 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20830echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20831 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20832echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20833 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20834echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20835 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20836echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20837 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20838echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20839
19650fd6 20840 ;;
c0d27fcc 20841esac
ca81d7a0
JD
20842{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20843echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20844if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20845 echo $ECHO_N "(cached) $ECHO_C" >&6
20846else
edfaf76d 20847 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20848fi
ca81d7a0
JD
20849ac_res=`eval echo '${'$as_ac_Header'}'`
20850 { echo "$as_me:$LINENO: result: $ac_res" >&5
20851echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20852
20853fi
503d2be0 20854if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20855 cat >>confdefs.h <<_ACEOF
503d2be0 20856#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20857_ACEOF
503d2be0 20858
a21616bd 20859else
503d2be0
AS
20860
20861for ac_header in kerberos/des.h
a21616bd 20862do
503d2be0 20863as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20864if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20865 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20866echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20867if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20868 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20869fi
ca81d7a0
JD
20870ac_res=`eval echo '${'$as_ac_Header'}'`
20871 { echo "$as_me:$LINENO: result: $ac_res" >&5
20872echo "${ECHO_T}$ac_res" >&6; }
98418dba 20873else
c0d27fcc 20874 # Is the header compilable?
ca81d7a0
JD
20875{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20876echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20877cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20878/* confdefs.h. */
20879_ACEOF
20880cat confdefs.h >>conftest.$ac_ext
20881cat >>conftest.$ac_ext <<_ACEOF
20882/* end confdefs.h. */
c0d27fcc
MR
20883$ac_includes_default
20884#include <$ac_header>
20885_ACEOF
20886rm -f conftest.$ac_objext
ca81d7a0
JD
20887if { (ac_try="$ac_compile"
20888case "(($ac_try" in
20889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20890 *) ac_try_echo=$ac_try;;
20891esac
20892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20893 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20894 ac_status=$?
edfaf76d
LK
20895 grep -v '^ *+' conftest.er1 >conftest.err
20896 rm -f conftest.er1
20897 cat conftest.err >&5
c0d27fcc 20898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20899 (exit $ac_status); } && {
20900 test -z "$ac_c_werror_flag" ||
20901 test ! -s conftest.err
20902 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20903 ac_header_compiler=yes
20904else
20905 echo "$as_me: failed program was:" >&5
19650fd6
AS
20906sed 's/^/| /' conftest.$ac_ext >&5
20907
ca81d7a0 20908 ac_header_compiler=no
c0d27fcc 20909fi
ca81d7a0
JD
20910
20911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20912{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20913echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20914
20915# Is the header present?
ca81d7a0
JD
20916{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20917echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20918cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20919/* confdefs.h. */
20920_ACEOF
20921cat confdefs.h >>conftest.$ac_ext
20922cat >>conftest.$ac_ext <<_ACEOF
20923/* end confdefs.h. */
503d2be0
AS
20924#include <$ac_header>
20925_ACEOF
ca81d7a0
JD
20926if { (ac_try="$ac_cpp conftest.$ac_ext"
20927case "(($ac_try" in
20928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20929 *) ac_try_echo=$ac_try;;
20930esac
20931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20932 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20933 ac_status=$?
6bae0ccf 20934 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20935 rm -f conftest.er1
20936 cat conftest.err >&5
c0d27fcc 20937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20938 (exit $ac_status); } >/dev/null && {
20939 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20940 test ! -s conftest.err
20941 }; then
c0d27fcc 20942 ac_header_preproc=yes
503d2be0
AS
20943else
20944 echo "$as_me: failed program was:" >&5
19650fd6
AS
20945sed 's/^/| /' conftest.$ac_ext >&5
20946
c0d27fcc 20947 ac_header_preproc=no
a21616bd 20948fi
ca81d7a0 20949
503d2be0 20950rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20951{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20952echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20953
20954# So? What about this header?
edfaf76d
LK
20955case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20956 yes:no: )
c0d27fcc
MR
20957 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20958echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20959 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20960echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20961 ac_header_preproc=yes
19650fd6 20962 ;;
edfaf76d 20963 no:yes:* )
c0d27fcc
MR
20964 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20965echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20966 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20967echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20968 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20969echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20970 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20971echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20972 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20973echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20974 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20975echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20976
19650fd6 20977 ;;
c0d27fcc 20978esac
ca81d7a0
JD
20979{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20980echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20981if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20982 echo $ECHO_N "(cached) $ECHO_C" >&6
20983else
edfaf76d 20984 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20985fi
ca81d7a0
JD
20986ac_res=`eval echo '${'$as_ac_Header'}'`
20987 { echo "$as_me:$LINENO: result: $ac_res" >&5
20988echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20989
20990fi
503d2be0 20991if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20992 cat >>confdefs.h <<_ACEOF
503d2be0 20993#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20994_ACEOF
a21616bd
KR
20995
20996fi
c0d27fcc 20997
a21616bd
KR
20998done
20999
98418dba 21000fi
c0d27fcc 21001
925c2f3f
EZ
21002done
21003
98418dba 21004fi
c0d27fcc 21005
925c2f3f 21006done
98418dba 21007
c0d27fcc 21008
925c2f3f
EZ
21009for ac_header in krb.h
21010do
21011as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21012if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21013 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21014echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21015if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 21016 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21017fi
ca81d7a0
JD
21018ac_res=`eval echo '${'$as_ac_Header'}'`
21019 { echo "$as_me:$LINENO: result: $ac_res" >&5
21020echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21021else
21022 # Is the header compilable?
ca81d7a0
JD
21023{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21024echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21025cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21026/* confdefs.h. */
21027_ACEOF
21028cat confdefs.h >>conftest.$ac_ext
21029cat >>conftest.$ac_ext <<_ACEOF
21030/* end confdefs.h. */
c0d27fcc
MR
21031$ac_includes_default
21032#include <$ac_header>
21033_ACEOF
21034rm -f conftest.$ac_objext
ca81d7a0
JD
21035if { (ac_try="$ac_compile"
21036case "(($ac_try" in
21037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21038 *) ac_try_echo=$ac_try;;
21039esac
21040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21041 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21042 ac_status=$?
edfaf76d
LK
21043 grep -v '^ *+' conftest.er1 >conftest.err
21044 rm -f conftest.er1
21045 cat conftest.err >&5
c0d27fcc 21046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21047 (exit $ac_status); } && {
21048 test -z "$ac_c_werror_flag" ||
21049 test ! -s conftest.err
21050 } && test -s conftest.$ac_objext; then
c0d27fcc 21051 ac_header_compiler=yes
925c2f3f 21052else
c0d27fcc 21053 echo "$as_me: failed program was:" >&5
19650fd6
AS
21054sed 's/^/| /' conftest.$ac_ext >&5
21055
ca81d7a0 21056 ac_header_compiler=no
c0d27fcc 21057fi
ca81d7a0
JD
21058
21059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21060{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21061echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21062
21063# Is the header present?
ca81d7a0
JD
21064{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21065echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21066cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21067/* confdefs.h. */
21068_ACEOF
21069cat confdefs.h >>conftest.$ac_ext
21070cat >>conftest.$ac_ext <<_ACEOF
21071/* end confdefs.h. */
503d2be0
AS
21072#include <$ac_header>
21073_ACEOF
ca81d7a0
JD
21074if { (ac_try="$ac_cpp conftest.$ac_ext"
21075case "(($ac_try" in
21076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21077 *) ac_try_echo=$ac_try;;
21078esac
21079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21080 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21081 ac_status=$?
6bae0ccf 21082 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21083 rm -f conftest.er1
21084 cat conftest.err >&5
c0d27fcc 21085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21086 (exit $ac_status); } >/dev/null && {
21087 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21088 test ! -s conftest.err
21089 }; then
c0d27fcc 21090 ac_header_preproc=yes
503d2be0
AS
21091else
21092 echo "$as_me: failed program was:" >&5
19650fd6
AS
21093sed 's/^/| /' conftest.$ac_ext >&5
21094
c0d27fcc 21095 ac_header_preproc=no
a21616bd 21096fi
ca81d7a0 21097
503d2be0 21098rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21099{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21100echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21101
21102# So? What about this header?
edfaf76d
LK
21103case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21104 yes:no: )
c0d27fcc
MR
21105 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21106echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21107 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21108echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21109 ac_header_preproc=yes
19650fd6 21110 ;;
edfaf76d 21111 no:yes:* )
c0d27fcc
MR
21112 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21113echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21114 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21115echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21116 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21117echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21118 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21119echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21120 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21121echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21122 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21123echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21124
19650fd6 21125 ;;
c0d27fcc 21126esac
ca81d7a0
JD
21127{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21128echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21129if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21130 echo $ECHO_N "(cached) $ECHO_C" >&6
21131else
edfaf76d 21132 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21133fi
ca81d7a0
JD
21134ac_res=`eval echo '${'$as_ac_Header'}'`
21135 { echo "$as_me:$LINENO: result: $ac_res" >&5
21136echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21137
21138fi
503d2be0 21139if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21140 cat >>confdefs.h <<_ACEOF
503d2be0 21141#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21142_ACEOF
503d2be0 21143
a21616bd 21144else
503d2be0
AS
21145
21146for ac_header in kerberosIV/krb.h
a21616bd 21147do
503d2be0 21148as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21149if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21150 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21151echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21152if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21153 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21154fi
ca81d7a0
JD
21155ac_res=`eval echo '${'$as_ac_Header'}'`
21156 { echo "$as_me:$LINENO: result: $ac_res" >&5
21157echo "${ECHO_T}$ac_res" >&6; }
98418dba 21158else
c0d27fcc 21159 # Is the header compilable?
ca81d7a0
JD
21160{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21161echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21162cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21163/* confdefs.h. */
21164_ACEOF
21165cat confdefs.h >>conftest.$ac_ext
21166cat >>conftest.$ac_ext <<_ACEOF
21167/* end confdefs.h. */
c0d27fcc
MR
21168$ac_includes_default
21169#include <$ac_header>
21170_ACEOF
21171rm -f conftest.$ac_objext
ca81d7a0
JD
21172if { (ac_try="$ac_compile"
21173case "(($ac_try" in
21174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21175 *) ac_try_echo=$ac_try;;
21176esac
21177eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21178 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21179 ac_status=$?
edfaf76d
LK
21180 grep -v '^ *+' conftest.er1 >conftest.err
21181 rm -f conftest.er1
21182 cat conftest.err >&5
c0d27fcc 21183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21184 (exit $ac_status); } && {
21185 test -z "$ac_c_werror_flag" ||
21186 test ! -s conftest.err
21187 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21188 ac_header_compiler=yes
21189else
21190 echo "$as_me: failed program was:" >&5
19650fd6
AS
21191sed 's/^/| /' conftest.$ac_ext >&5
21192
ca81d7a0 21193 ac_header_compiler=no
c0d27fcc 21194fi
ca81d7a0
JD
21195
21196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21197{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21198echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21199
21200# Is the header present?
ca81d7a0
JD
21201{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21202echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21203cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21204/* confdefs.h. */
21205_ACEOF
21206cat confdefs.h >>conftest.$ac_ext
21207cat >>conftest.$ac_ext <<_ACEOF
21208/* end confdefs.h. */
503d2be0
AS
21209#include <$ac_header>
21210_ACEOF
ca81d7a0
JD
21211if { (ac_try="$ac_cpp conftest.$ac_ext"
21212case "(($ac_try" in
21213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21214 *) ac_try_echo=$ac_try;;
21215esac
21216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21217 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21218 ac_status=$?
6bae0ccf 21219 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21220 rm -f conftest.er1
21221 cat conftest.err >&5
c0d27fcc 21222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21223 (exit $ac_status); } >/dev/null && {
21224 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21225 test ! -s conftest.err
21226 }; then
c0d27fcc 21227 ac_header_preproc=yes
503d2be0
AS
21228else
21229 echo "$as_me: failed program was:" >&5
19650fd6
AS
21230sed 's/^/| /' conftest.$ac_ext >&5
21231
c0d27fcc 21232 ac_header_preproc=no
a21616bd 21233fi
ca81d7a0 21234
503d2be0 21235rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21236{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21237echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21238
21239# So? What about this header?
edfaf76d
LK
21240case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21241 yes:no: )
c0d27fcc
MR
21242 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21243echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21244 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21245echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21246 ac_header_preproc=yes
19650fd6 21247 ;;
edfaf76d 21248 no:yes:* )
c0d27fcc
MR
21249 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21250echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21251 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21252echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21253 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21254echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21255 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21256echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21257 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21258echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21259 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21260echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21261
19650fd6 21262 ;;
c0d27fcc 21263esac
ca81d7a0
JD
21264{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21265echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21266if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21267 echo $ECHO_N "(cached) $ECHO_C" >&6
21268else
edfaf76d 21269 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21270fi
ca81d7a0
JD
21271ac_res=`eval echo '${'$as_ac_Header'}'`
21272 { echo "$as_me:$LINENO: result: $ac_res" >&5
21273echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21274
21275fi
503d2be0 21276if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21277 cat >>confdefs.h <<_ACEOF
503d2be0 21278#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21279_ACEOF
503d2be0 21280
a21616bd 21281else
503d2be0
AS
21282
21283for ac_header in kerberos/krb.h
a21616bd 21284do
503d2be0 21285as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21286if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21287 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21288echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21289if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21290 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21291fi
ca81d7a0
JD
21292ac_res=`eval echo '${'$as_ac_Header'}'`
21293 { echo "$as_me:$LINENO: result: $ac_res" >&5
21294echo "${ECHO_T}$ac_res" >&6; }
98418dba 21295else
c0d27fcc 21296 # Is the header compilable?
ca81d7a0
JD
21297{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21298echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21299cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21300/* confdefs.h. */
21301_ACEOF
21302cat confdefs.h >>conftest.$ac_ext
21303cat >>conftest.$ac_ext <<_ACEOF
21304/* end confdefs.h. */
c0d27fcc
MR
21305$ac_includes_default
21306#include <$ac_header>
21307_ACEOF
21308rm -f conftest.$ac_objext
ca81d7a0
JD
21309if { (ac_try="$ac_compile"
21310case "(($ac_try" in
21311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21312 *) ac_try_echo=$ac_try;;
21313esac
21314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21315 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21316 ac_status=$?
edfaf76d
LK
21317 grep -v '^ *+' conftest.er1 >conftest.err
21318 rm -f conftest.er1
21319 cat conftest.err >&5
c0d27fcc 21320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21321 (exit $ac_status); } && {
21322 test -z "$ac_c_werror_flag" ||
21323 test ! -s conftest.err
21324 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21325 ac_header_compiler=yes
21326else
21327 echo "$as_me: failed program was:" >&5
19650fd6
AS
21328sed 's/^/| /' conftest.$ac_ext >&5
21329
ca81d7a0 21330 ac_header_compiler=no
c0d27fcc 21331fi
ca81d7a0
JD
21332
21333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21334{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21335echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21336
21337# Is the header present?
ca81d7a0
JD
21338{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21339echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21340cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21341/* confdefs.h. */
21342_ACEOF
21343cat confdefs.h >>conftest.$ac_ext
21344cat >>conftest.$ac_ext <<_ACEOF
21345/* end confdefs.h. */
503d2be0
AS
21346#include <$ac_header>
21347_ACEOF
ca81d7a0
JD
21348if { (ac_try="$ac_cpp conftest.$ac_ext"
21349case "(($ac_try" in
21350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21351 *) ac_try_echo=$ac_try;;
21352esac
21353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21354 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21355 ac_status=$?
6bae0ccf 21356 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21357 rm -f conftest.er1
21358 cat conftest.err >&5
c0d27fcc 21359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21360 (exit $ac_status); } >/dev/null && {
21361 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21362 test ! -s conftest.err
21363 }; then
c0d27fcc 21364 ac_header_preproc=yes
503d2be0
AS
21365else
21366 echo "$as_me: failed program was:" >&5
19650fd6
AS
21367sed 's/^/| /' conftest.$ac_ext >&5
21368
c0d27fcc 21369 ac_header_preproc=no
a21616bd 21370fi
ca81d7a0 21371
503d2be0 21372rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21373{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21374echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
21375
21376# So? What about this header?
edfaf76d
LK
21377case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21378 yes:no: )
35996d22
AS
21379 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21380echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21381 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21382echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21383 ac_header_preproc=yes
19650fd6 21384 ;;
edfaf76d 21385 no:yes:* )
c0d27fcc
MR
21386 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21387echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21388 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21389echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21390 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21391echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21392 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21393echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21394 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21395echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21396 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21397echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21398
19650fd6 21399 ;;
c0d27fcc 21400esac
ca81d7a0
JD
21401{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21402echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21403if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21404 echo $ECHO_N "(cached) $ECHO_C" >&6
21405else
edfaf76d 21406 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21407fi
ca81d7a0
JD
21408ac_res=`eval echo '${'$as_ac_Header'}'`
21409 { echo "$as_me:$LINENO: result: $ac_res" >&5
21410echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21411
21412fi
503d2be0 21413if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21414 cat >>confdefs.h <<_ACEOF
503d2be0 21415#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21416_ACEOF
503d2be0 21417
a21616bd 21418fi
c0d27fcc 21419
a21616bd
KR
21420done
21421
21422fi
c0d27fcc 21423
a21616bd
KR
21424done
21425
21426fi
c0d27fcc 21427
a21616bd
KR
21428done
21429
21430 fi
503d2be0
AS
21431
21432for ac_header in com_err.h
a21616bd 21433do
503d2be0 21434as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21435if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21436 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21437echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21438if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21439 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21440fi
ca81d7a0
JD
21441ac_res=`eval echo '${'$as_ac_Header'}'`
21442 { echo "$as_me:$LINENO: result: $ac_res" >&5
21443echo "${ECHO_T}$ac_res" >&6; }
98418dba 21444else
c0d27fcc 21445 # Is the header compilable?
ca81d7a0
JD
21446{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21447echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21448cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21449/* confdefs.h. */
21450_ACEOF
21451cat confdefs.h >>conftest.$ac_ext
21452cat >>conftest.$ac_ext <<_ACEOF
21453/* end confdefs.h. */
c0d27fcc
MR
21454$ac_includes_default
21455#include <$ac_header>
21456_ACEOF
21457rm -f conftest.$ac_objext
ca81d7a0
JD
21458if { (ac_try="$ac_compile"
21459case "(($ac_try" in
21460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21461 *) ac_try_echo=$ac_try;;
21462esac
21463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21464 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
21465 ac_status=$?
21466 grep -v '^ *+' conftest.er1 >conftest.err
21467 rm -f conftest.er1
21468 cat conftest.err >&5
21469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21470 (exit $ac_status); } && {
21471 test -z "$ac_c_werror_flag" ||
21472 test ! -s conftest.err
21473 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21474 ac_header_compiler=yes
21475else
21476 echo "$as_me: failed program was:" >&5
19650fd6
AS
21477sed 's/^/| /' conftest.$ac_ext >&5
21478
ca81d7a0 21479 ac_header_compiler=no
c0d27fcc 21480fi
ca81d7a0
JD
21481
21482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21483{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21484echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21485
21486# Is the header present?
ca81d7a0
JD
21487{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21488echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21489cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21490/* confdefs.h. */
21491_ACEOF
21492cat confdefs.h >>conftest.$ac_ext
21493cat >>conftest.$ac_ext <<_ACEOF
21494/* end confdefs.h. */
503d2be0
AS
21495#include <$ac_header>
21496_ACEOF
ca81d7a0
JD
21497if { (ac_try="$ac_cpp conftest.$ac_ext"
21498case "(($ac_try" in
21499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21500 *) ac_try_echo=$ac_try;;
21501esac
21502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21503 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21504 ac_status=$?
6bae0ccf 21505 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21506 rm -f conftest.er1
21507 cat conftest.err >&5
c0d27fcc 21508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21509 (exit $ac_status); } >/dev/null && {
21510 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21511 test ! -s conftest.err
21512 }; then
c0d27fcc 21513 ac_header_preproc=yes
503d2be0
AS
21514else
21515 echo "$as_me: failed program was:" >&5
19650fd6
AS
21516sed 's/^/| /' conftest.$ac_ext >&5
21517
c0d27fcc 21518 ac_header_preproc=no
a21616bd 21519fi
ca81d7a0 21520
503d2be0 21521rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21522{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21523echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21524
21525# So? What about this header?
edfaf76d
LK
21526case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21527 yes:no: )
c0d27fcc
MR
21528 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21529echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21530 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21531echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21532 ac_header_preproc=yes
19650fd6 21533 ;;
edfaf76d 21534 no:yes:* )
c0d27fcc
MR
21535 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21536echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21537 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21538echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21539 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21540echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21541 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21542echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21543 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21544echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21545 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21546echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21547
19650fd6 21548 ;;
c0d27fcc 21549esac
ca81d7a0
JD
21550{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21551echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21552if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21553 echo $ECHO_N "(cached) $ECHO_C" >&6
21554else
edfaf76d 21555 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21556fi
ca81d7a0
JD
21557ac_res=`eval echo '${'$as_ac_Header'}'`
21558 { echo "$as_me:$LINENO: result: $ac_res" >&5
21559echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21560
21561fi
503d2be0 21562if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21563 cat >>confdefs.h <<_ACEOF
503d2be0 21564#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21565_ACEOF
503d2be0 21566
a21616bd 21567fi
c0d27fcc 21568
a21616bd
KR
21569done
21570
21571fi
21572
ba4481b5
DL
21573# Solaris requires -lintl if you want strerror (which calls dgettext)
21574# to return localized messages.
503d2be0 21575
ca81d7a0
JD
21576{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
21577echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
21578if test "${ac_cv_lib_intl_dgettext+set}" = set; then
21579 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21580else
503d2be0 21581 ac_check_lib_save_LIBS=$LIBS
ba4481b5 21582LIBS="-lintl $LIBS"
503d2be0 21583cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21584/* confdefs.h. */
21585_ACEOF
21586cat confdefs.h >>conftest.$ac_ext
21587cat >>conftest.$ac_ext <<_ACEOF
21588/* end confdefs.h. */
503d2be0 21589
ca81d7a0
JD
21590/* Override any GCC internal prototype to avoid an error.
21591 Use char because int might match the return type of a GCC
21592 builtin and then its argument prototype would still apply. */
503d2be0
AS
21593#ifdef __cplusplus
21594extern "C"
21595#endif
503d2be0
AS
21596char dgettext ();
21597int
21598main ()
21599{
ca81d7a0 21600return dgettext ();
503d2be0
AS
21601 ;
21602 return 0;
21603}
21604_ACEOF
21605rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21606if { (ac_try="$ac_link"
21607case "(($ac_try" in
21608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21609 *) ac_try_echo=$ac_try;;
21610esac
21611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21612 (eval "$ac_link") 2>conftest.er1
503d2be0 21613 ac_status=$?
edfaf76d
LK
21614 grep -v '^ *+' conftest.er1 >conftest.err
21615 rm -f conftest.er1
21616 cat conftest.err >&5
c0d27fcc 21617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21618 (exit $ac_status); } && {
21619 test -z "$ac_c_werror_flag" ||
21620 test ! -s conftest.err
21621 } && test -s conftest$ac_exeext &&
21622 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21623 ac_cv_lib_intl_dgettext=yes
21624else
21625 echo "$as_me: failed program was:" >&5
19650fd6
AS
21626sed 's/^/| /' conftest.$ac_ext >&5
21627
ca81d7a0 21628 ac_cv_lib_intl_dgettext=no
503d2be0 21629fi
ca81d7a0 21630
f053c89f 21631rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21632 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21633LIBS=$ac_check_lib_save_LIBS
21634fi
ca81d7a0
JD
21635{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
21636echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 21637if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 21638 cat >>confdefs.h <<_ACEOF
503d2be0 21639#define HAVE_LIBINTL 1
c0d27fcc 21640_ACEOF
ba4481b5
DL
21641
21642 LIBS="-lintl $LIBS"
21643
ba4481b5
DL
21644fi
21645
c0d27fcc 21646
ca81d7a0
JD
21647{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
21648echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
21649if test "${emacs_cv_localtime_cache+set}" = set; then
21650 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
21651else
21652 if test x$ac_cv_func_tzset = xyes; then
21653if test "$cross_compiling" = yes; then
21654 # If we have tzset, assume the worst when cross-compiling.
21655emacs_cv_localtime_cache=yes
21656else
503d2be0 21657 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21658/* confdefs.h. */
21659_ACEOF
21660cat confdefs.h >>conftest.$ac_ext
21661cat >>conftest.$ac_ext <<_ACEOF
21662/* end confdefs.h. */
ba4481b5 21663#include <time.h>
ba4481b5
DL
21664extern char **environ;
21665unset_TZ ()
21666{
21667 char **from, **to;
21668 for (to = from = environ; (*to = *from); from++)
21669 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
21670 to++;
21671}
21672char TZ_GMT0[] = "TZ=GMT0";
21673char TZ_PST8[] = "TZ=PST8";
21674main()
21675{
21676 time_t now = time ((time_t *) 0);
21677 int hour_GMT0, hour_unset;
21678 if (putenv (TZ_GMT0) != 0)
21679 exit (1);
21680 hour_GMT0 = localtime (&now)->tm_hour;
21681 unset_TZ ();
21682 hour_unset = localtime (&now)->tm_hour;
21683 if (putenv (TZ_PST8) != 0)
21684 exit (1);
21685 if (localtime (&now)->tm_hour == hour_GMT0)
21686 exit (1);
21687 unset_TZ ();
21688 if (localtime (&now)->tm_hour != hour_unset)
21689 exit (1);
21690 exit (0);
21691}
503d2be0
AS
21692_ACEOF
21693rm -f conftest$ac_exeext
ca81d7a0
JD
21694if { (ac_try="$ac_link"
21695case "(($ac_try" in
21696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21697 *) ac_try_echo=$ac_try;;
21698esac
21699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21700 (eval "$ac_link") 2>&5
503d2be0 21701 ac_status=$?
c0d27fcc 21702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21703 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
21704 { (case "(($ac_try" in
21705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21706 *) ac_try_echo=$ac_try;;
21707esac
21708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21709 (eval "$ac_try") 2>&5
503d2be0 21710 ac_status=$?
c0d27fcc 21711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21712 (exit $ac_status); }; }; then
ba4481b5
DL
21713 emacs_cv_localtime_cache=no
21714else
503d2be0
AS
21715 echo "$as_me: program exited with status $ac_status" >&5
21716echo "$as_me: failed program was:" >&5
19650fd6
AS
21717sed 's/^/| /' conftest.$ac_ext >&5
21718
c0d27fcc 21719( exit $ac_status )
503d2be0 21720emacs_cv_localtime_cache=yes
ba4481b5 21721fi
ca81d7a0 21722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 21723fi
ca81d7a0
JD
21724
21725
ba4481b5
DL
21726else
21727 # If we lack tzset, report that localtime does not cache TZ,
21728 # since we can't invalidate the cache if we don't have tzset.
21729 emacs_cv_localtime_cache=no
21730fi
21731fi
ca81d7a0
JD
21732{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
21733echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 21734if test $emacs_cv_localtime_cache = yes; then
b936fae4 21735
c0d27fcc 21736cat >>confdefs.h <<\_ACEOF
ba4481b5 21737#define LOCALTIME_CACHE 1
c0d27fcc 21738_ACEOF
ba4481b5
DL
21739
21740fi
21741
21742if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
21743
21744for ac_func in gettimeofday
48d4b120 21745do
503d2be0 21746as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
21747{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21748echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21749if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21750 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 21751else
503d2be0 21752 cat >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. */
edfaf76d
LK
21758/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21759 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21760#define $ac_func innocuous_$ac_func
21761
48d4b120 21762/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21763 which can conflict with char $ac_func (); below.
21764 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21765 <limits.h> exists even on freestanding compilers. */
edfaf76d 21766
19650fd6
AS
21767#ifdef __STDC__
21768# include <limits.h>
21769#else
21770# include <assert.h>
21771#endif
edfaf76d
LK
21772
21773#undef $ac_func
21774
ca81d7a0
JD
21775/* Override any GCC internal prototype to avoid an error.
21776 Use char because int might match the return type of a GCC
21777 builtin and then its argument prototype would still apply. */
503d2be0
AS
21778#ifdef __cplusplus
21779extern "C"
21780#endif
503d2be0 21781char $ac_func ();
48d4b120
DL
21782/* The GNU C library defines this for functions which it implements
21783 to always fail with ENOSYS. Some functions are actually named
21784 something starting with __ and the normal name is an alias. */
ca81d7a0 21785#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 21786choke me
cd958eb3
MB
21787#endif
21788
19650fd6
AS
21789int
21790main ()
21791{
ca81d7a0 21792return $ac_func ();
503d2be0
AS
21793 ;
21794 return 0;
21795}
21796_ACEOF
21797rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21798if { (ac_try="$ac_link"
21799case "(($ac_try" in
21800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21801 *) ac_try_echo=$ac_try;;
21802esac
21803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21804 (eval "$ac_link") 2>conftest.er1
503d2be0 21805 ac_status=$?
edfaf76d
LK
21806 grep -v '^ *+' conftest.er1 >conftest.err
21807 rm -f conftest.er1
21808 cat conftest.err >&5
c0d27fcc 21809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21810 (exit $ac_status); } && {
21811 test -z "$ac_c_werror_flag" ||
21812 test ! -s conftest.err
21813 } && test -s conftest$ac_exeext &&
21814 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21815 eval "$as_ac_var=yes"
21816else
21817 echo "$as_me: failed program was:" >&5
19650fd6
AS
21818sed 's/^/| /' conftest.$ac_ext >&5
21819
ca81d7a0 21820 eval "$as_ac_var=no"
503d2be0 21821fi
ca81d7a0 21822
f053c89f 21823rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21824 conftest$ac_exeext conftest.$ac_ext
503d2be0 21825fi
ca81d7a0
JD
21826ac_res=`eval echo '${'$as_ac_var'}'`
21827 { echo "$as_me:$LINENO: result: $ac_res" >&5
21828echo "${ECHO_T}$ac_res" >&6; }
503d2be0 21829if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 21830 cat >>confdefs.h <<_ACEOF
503d2be0 21831#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 21832_ACEOF
48d4b120 21833
48d4b120
DL
21834fi
21835done
21836
b936fae4 21837 if test $ac_cv_func_gettimeofday = yes; then
ca81d7a0
JD
21838 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
21839echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
21840if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
21841 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21842else
503d2be0 21843 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21844/* confdefs.h. */
21845_ACEOF
21846cat confdefs.h >>conftest.$ac_ext
21847cat >>conftest.$ac_ext <<_ACEOF
21848/* end confdefs.h. */
ba4481b5 21849
a3f08d9e
DL
21850#ifdef TIME_WITH_SYS_TIME
21851#include <sys/time.h>
21852#include <time.h>
21853#else
21854#ifdef HAVE_SYS_TIME_H
21855#include <sys/time.h>
21856#else
21857#include <time.h>
21858#endif
21859#endif
503d2be0
AS
21860int
21861main ()
21862{
a3f08d9e 21863struct timeval time;
b936fae4 21864 gettimeofday (&time, 0);
503d2be0
AS
21865 ;
21866 return 0;
21867}
21868_ACEOF
21869rm -f conftest.$ac_objext
f053c89f
CY
21870if { (ac_try="$ac_compile"
21871case "(($ac_try" in
ca81d7a0
JD
21872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21873 *) ac_try_echo=$ac_try;;
21874esac
21875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 21876 (eval "$ac_compile") 2>conftest.er1
503d2be0 21877 ac_status=$?
f053c89f
CY
21878 grep -v '^ *+' conftest.er1 >conftest.err
21879 rm -f conftest.er1
21880 cat conftest.err >&5
c0d27fcc 21881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21882 (exit $ac_status); } && {
21883 test -z "$ac_c_werror_flag" ||
21884 test ! -s conftest.err
21885 } && test -s conftest.$ac_objext; then
ba4481b5
DL
21886 emacs_cv_gettimeofday_two_arguments=yes
21887else
503d2be0 21888 echo "$as_me: failed program was:" >&5
19650fd6
AS
21889sed 's/^/| /' conftest.$ac_ext >&5
21890
ca81d7a0 21891 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 21892fi
ca81d7a0
JD
21893
21894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21895fi
ca81d7a0
JD
21896{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
21897echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
21898 if test $emacs_cv_gettimeofday_two_arguments = no; then
21899
c0d27fcc 21900cat >>confdefs.h <<\_ACEOF
ba4481b5 21901#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 21902_ACEOF
ba4481b5 21903
b936fae4 21904 fi
ba4481b5
DL
21905 fi
21906fi
21907
21908ok_so_far=yes
ca81d7a0
JD
21909{ echo "$as_me:$LINENO: checking for socket" >&5
21910echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
21911if test "${ac_cv_func_socket+set}" = set; then
21912 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21913else
503d2be0 21914 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21915/* confdefs.h. */
21916_ACEOF
21917cat confdefs.h >>conftest.$ac_ext
21918cat >>conftest.$ac_ext <<_ACEOF
21919/* end confdefs.h. */
edfaf76d
LK
21920/* Define socket to an innocuous variant, in case <limits.h> declares socket.
21921 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21922#define socket innocuous_socket
21923
ba4481b5 21924/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21925 which can conflict with char socket (); below.
21926 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21927 <limits.h> exists even on freestanding compilers. */
edfaf76d 21928
19650fd6
AS
21929#ifdef __STDC__
21930# include <limits.h>
21931#else
21932# include <assert.h>
21933#endif
edfaf76d
LK
21934
21935#undef socket
21936
ca81d7a0
JD
21937/* Override any GCC internal prototype to avoid an error.
21938 Use char because int might match the return type of a GCC
21939 builtin and then its argument prototype would still apply. */
503d2be0
AS
21940#ifdef __cplusplus
21941extern "C"
21942#endif
503d2be0 21943char socket ();
ba4481b5
DL
21944/* The GNU C library defines this for functions which it implements
21945 to always fail with ENOSYS. Some functions are actually named
21946 something starting with __ and the normal name is an alias. */
ca81d7a0 21947#if defined __stub_socket || defined __stub___socket
ba4481b5 21948choke me
cd958eb3
MB
21949#endif
21950
19650fd6
AS
21951int
21952main ()
21953{
ca81d7a0 21954return socket ();
503d2be0
AS
21955 ;
21956 return 0;
21957}
21958_ACEOF
21959rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21960if { (ac_try="$ac_link"
21961case "(($ac_try" in
21962 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21963 *) ac_try_echo=$ac_try;;
21964esac
21965eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21966 (eval "$ac_link") 2>conftest.er1
503d2be0 21967 ac_status=$?
edfaf76d
LK
21968 grep -v '^ *+' conftest.er1 >conftest.err
21969 rm -f conftest.er1
21970 cat conftest.err >&5
c0d27fcc 21971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21972 (exit $ac_status); } && {
21973 test -z "$ac_c_werror_flag" ||
21974 test ! -s conftest.err
21975 } && test -s conftest$ac_exeext &&
21976 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21977 ac_cv_func_socket=yes
21978else
21979 echo "$as_me: failed program was:" >&5
19650fd6
AS
21980sed 's/^/| /' conftest.$ac_ext >&5
21981
ca81d7a0 21982 ac_cv_func_socket=no
503d2be0 21983fi
ca81d7a0 21984
f053c89f 21985rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21986 conftest$ac_exeext conftest.$ac_ext
503d2be0 21987fi
ca81d7a0
JD
21988{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
21989echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 21990if test $ac_cv_func_socket = yes; then
ba4481b5
DL
21991 :
21992else
503d2be0 21993 ok_so_far=no
ba4481b5
DL
21994fi
21995
21996if test $ok_so_far = yes; then
c0d27fcc 21997 if test "${ac_cv_header_netinet_in_h+set}" = set; then
ca81d7a0
JD
21998 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
21999echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
22000if test "${ac_cv_header_netinet_in_h+set}" = set; then
22001 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22002fi
ca81d7a0
JD
22003{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22004echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 22005else
c0d27fcc 22006 # Is the header compilable?
ca81d7a0
JD
22007{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
22008echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 22009cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22010/* confdefs.h. */
22011_ACEOF
22012cat confdefs.h >>conftest.$ac_ext
22013cat >>conftest.$ac_ext <<_ACEOF
22014/* end confdefs.h. */
c0d27fcc
MR
22015$ac_includes_default
22016#include <netinet/in.h>
22017_ACEOF
22018rm -f conftest.$ac_objext
ca81d7a0
JD
22019if { (ac_try="$ac_compile"
22020case "(($ac_try" in
22021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22022 *) ac_try_echo=$ac_try;;
22023esac
22024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22025 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22026 ac_status=$?
edfaf76d
LK
22027 grep -v '^ *+' conftest.er1 >conftest.err
22028 rm -f conftest.er1
22029 cat conftest.err >&5
c0d27fcc 22030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22031 (exit $ac_status); } && {
22032 test -z "$ac_c_werror_flag" ||
22033 test ! -s conftest.err
22034 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22035 ac_header_compiler=yes
22036else
22037 echo "$as_me: failed program was:" >&5
19650fd6
AS
22038sed 's/^/| /' conftest.$ac_ext >&5
22039
ca81d7a0 22040 ac_header_compiler=no
c0d27fcc 22041fi
ca81d7a0
JD
22042
22043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22045echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22046
22047# Is the header present?
ca81d7a0
JD
22048{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22049echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22050cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22051/* confdefs.h. */
22052_ACEOF
22053cat confdefs.h >>conftest.$ac_ext
22054cat >>conftest.$ac_ext <<_ACEOF
22055/* end confdefs.h. */
ba4481b5 22056#include <netinet/in.h>
503d2be0 22057_ACEOF
ca81d7a0
JD
22058if { (ac_try="$ac_cpp conftest.$ac_ext"
22059case "(($ac_try" in
22060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22061 *) ac_try_echo=$ac_try;;
22062esac
22063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22064 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22065 ac_status=$?
6bae0ccf 22066 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22067 rm -f conftest.er1
22068 cat conftest.err >&5
c0d27fcc 22069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22070 (exit $ac_status); } >/dev/null && {
22071 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22072 test ! -s conftest.err
22073 }; then
c0d27fcc 22074 ac_header_preproc=yes
ba4481b5 22075else
503d2be0 22076 echo "$as_me: failed program was:" >&5
19650fd6
AS
22077sed 's/^/| /' conftest.$ac_ext >&5
22078
c0d27fcc 22079 ac_header_preproc=no
ba4481b5 22080fi
ca81d7a0 22081
503d2be0 22082rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22083{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22084echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22085
22086# So? What about this header?
edfaf76d
LK
22087case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22088 yes:no: )
c0d27fcc
MR
22089 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22090echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22091 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22092echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
22093 ac_header_preproc=yes
19650fd6 22094 ;;
edfaf76d 22095 no:yes:* )
c0d27fcc
MR
22096 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22097echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22098 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22099echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22100 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22101echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22102 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22103echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22104 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 22105echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22106 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22107echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22108
19650fd6 22109 ;;
c0d27fcc 22110esac
ca81d7a0
JD
22111{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22112echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
22113if test "${ac_cv_header_netinet_in_h+set}" = set; then
22114 echo $ECHO_N "(cached) $ECHO_C" >&6
22115else
22116 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22117fi
ca81d7a0
JD
22118{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22119echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22120
22121fi
503d2be0 22122if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22123 :
22124else
503d2be0 22125 ok_so_far=no
ba4481b5
DL
22126fi
22127
c0d27fcc 22128
ba4481b5
DL
22129fi
22130if test $ok_so_far = yes; then
c0d27fcc 22131 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
ca81d7a0
JD
22132 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22133echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
22134if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22135 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22136fi
ca81d7a0
JD
22137{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22138echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 22139else
c0d27fcc 22140 # Is the header compilable?
ca81d7a0
JD
22141{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
22142echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 22143cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22144/* confdefs.h. */
22145_ACEOF
22146cat confdefs.h >>conftest.$ac_ext
22147cat >>conftest.$ac_ext <<_ACEOF
22148/* end confdefs.h. */
c0d27fcc
MR
22149$ac_includes_default
22150#include <arpa/inet.h>
22151_ACEOF
22152rm -f conftest.$ac_objext
ca81d7a0
JD
22153if { (ac_try="$ac_compile"
22154case "(($ac_try" in
22155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22156 *) ac_try_echo=$ac_try;;
22157esac
22158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22159 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22160 ac_status=$?
edfaf76d
LK
22161 grep -v '^ *+' conftest.er1 >conftest.err
22162 rm -f conftest.er1
22163 cat conftest.err >&5
c0d27fcc 22164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22165 (exit $ac_status); } && {
22166 test -z "$ac_c_werror_flag" ||
22167 test ! -s conftest.err
22168 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22169 ac_header_compiler=yes
22170else
22171 echo "$as_me: failed program was:" >&5
19650fd6
AS
22172sed 's/^/| /' conftest.$ac_ext >&5
22173
ca81d7a0 22174 ac_header_compiler=no
c0d27fcc 22175fi
ca81d7a0
JD
22176
22177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22178{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22179echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22180
22181# Is the header present?
ca81d7a0
JD
22182{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
22183echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 22184cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22185/* confdefs.h. */
22186_ACEOF
22187cat confdefs.h >>conftest.$ac_ext
22188cat >>conftest.$ac_ext <<_ACEOF
22189/* end confdefs.h. */
ba4481b5 22190#include <arpa/inet.h>
503d2be0 22191_ACEOF
ca81d7a0
JD
22192if { (ac_try="$ac_cpp conftest.$ac_ext"
22193case "(($ac_try" in
22194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22195 *) ac_try_echo=$ac_try;;
22196esac
22197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22198 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22199 ac_status=$?
6bae0ccf 22200 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22201 rm -f conftest.er1
22202 cat conftest.err >&5
c0d27fcc 22203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22204 (exit $ac_status); } >/dev/null && {
22205 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22206 test ! -s conftest.err
22207 }; then
c0d27fcc 22208 ac_header_preproc=yes
ba4481b5 22209else
503d2be0 22210 echo "$as_me: failed program was:" >&5
19650fd6
AS
22211sed 's/^/| /' conftest.$ac_ext >&5
22212
c0d27fcc 22213 ac_header_preproc=no
ba4481b5 22214fi
ca81d7a0 22215
503d2be0 22216rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22217{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22218echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22219
22220# So? What about this header?
edfaf76d
LK
22221case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22222 yes:no: )
c0d27fcc
MR
22223 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
22224echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22225 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
22226echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
22227 ac_header_preproc=yes
19650fd6 22228 ;;
edfaf76d 22229 no:yes:* )
c0d27fcc
MR
22230 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
22231echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22232 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
22233echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
22234 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
22235echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
22236 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
22237echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22238 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 22239echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22240 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
22241echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22242
19650fd6 22243 ;;
c0d27fcc 22244esac
ca81d7a0
JD
22245{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22246echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
22247if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22248 echo $ECHO_N "(cached) $ECHO_C" >&6
22249else
22250 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 22251fi
ca81d7a0
JD
22252{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22253echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
22254
22255fi
503d2be0 22256if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
22257 :
22258else
503d2be0 22259 ok_so_far=no
ba4481b5
DL
22260fi
22261
c0d27fcc 22262
ba4481b5
DL
22263fi
22264if test $ok_so_far = yes; then
b936fae4 22265
c0d27fcc 22266cat >>confdefs.h <<\_ACEOF
ba4481b5 22267#define HAVE_INET_SOCKETS 1
c0d27fcc 22268_ACEOF
ba4481b5
DL
22269
22270fi
22271
2d2b6695 22272
7862d3a8 22273for ac_header in sys/ioctl.h
2d2b6695
KS
22274do
22275as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22276if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22277 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22278echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22279if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
22280 echo $ECHO_N "(cached) $ECHO_C" >&6
22281fi
ca81d7a0
JD
22282ac_res=`eval echo '${'$as_ac_Header'}'`
22283 { echo "$as_me:$LINENO: result: $ac_res" >&5
22284echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
22285else
22286 # Is the header compilable?
ca81d7a0
JD
22287{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22288echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 22289cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
22290/* confdefs.h. */
22291_ACEOF
22292cat confdefs.h >>conftest.$ac_ext
22293cat >>conftest.$ac_ext <<_ACEOF
22294/* end confdefs.h. */
22295$ac_includes_default
22296#include <$ac_header>
22297_ACEOF
22298rm -f conftest.$ac_objext
ca81d7a0
JD
22299if { (ac_try="$ac_compile"
22300case "(($ac_try" in
22301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22302 *) ac_try_echo=$ac_try;;
22303esac
22304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22305 (eval "$ac_compile") 2>conftest.er1
2d2b6695 22306 ac_status=$?
edfaf76d
LK
22307 grep -v '^ *+' conftest.er1 >conftest.err
22308 rm -f conftest.er1
22309 cat conftest.err >&5
2d2b6695 22310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22311 (exit $ac_status); } && {
22312 test -z "$ac_c_werror_flag" ||
22313 test ! -s conftest.err
22314 } && test -s conftest.$ac_objext; then
2d2b6695
KS
22315 ac_header_compiler=yes
22316else
22317 echo "$as_me: failed program was:" >&5
22318sed 's/^/| /' conftest.$ac_ext >&5
22319
ca81d7a0 22320 ac_header_compiler=no
2d2b6695 22321fi
ca81d7a0
JD
22322
22323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22324{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22325echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
22326
22327# Is the header present?
ca81d7a0
JD
22328{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22329echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 22330cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
22331/* confdefs.h. */
22332_ACEOF
22333cat confdefs.h >>conftest.$ac_ext
22334cat >>conftest.$ac_ext <<_ACEOF
22335/* end confdefs.h. */
22336#include <$ac_header>
22337_ACEOF
ca81d7a0
JD
22338if { (ac_try="$ac_cpp conftest.$ac_ext"
22339case "(($ac_try" in
22340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22341 *) ac_try_echo=$ac_try;;
22342esac
22343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22344 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
22345 ac_status=$?
22346 grep -v '^ *+' conftest.er1 >conftest.err
22347 rm -f conftest.er1
22348 cat conftest.err >&5
22349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22350 (exit $ac_status); } >/dev/null && {
22351 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22352 test ! -s conftest.err
22353 }; then
2d2b6695
KS
22354 ac_header_preproc=yes
22355else
22356 echo "$as_me: failed program was:" >&5
22357sed 's/^/| /' conftest.$ac_ext >&5
22358
22359 ac_header_preproc=no
22360fi
ca81d7a0 22361
2d2b6695 22362rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22363{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22364echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
22365
22366# So? What about this header?
edfaf76d
LK
22367case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22368 yes:no: )
2d2b6695
KS
22369 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22370echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22371 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22372echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22373 ac_header_preproc=yes
2d2b6695 22374 ;;
edfaf76d 22375 no:yes:* )
2d2b6695
KS
22376 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22377echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22378 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22379echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22380 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22381echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22382 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22383echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
22384 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22385echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22386 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22387echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22388
2d2b6695
KS
22389 ;;
22390esac
ca81d7a0
JD
22391{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22392echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22393if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
22394 echo $ECHO_N "(cached) $ECHO_C" >&6
22395else
edfaf76d 22396 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 22397fi
ca81d7a0
JD
22398ac_res=`eval echo '${'$as_ac_Header'}'`
22399 { echo "$as_me:$LINENO: result: $ac_res" >&5
22400echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
22401
22402fi
22403if test `eval echo '${'$as_ac_Header'}'` = yes; then
22404 cat >>confdefs.h <<_ACEOF
22405#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22406_ACEOF
22407
22408fi
22409
22410done
22411
22412
ba4481b5 22413if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 22414
c0d27fcc 22415cat >>confdefs.h <<\_ACEOF
ba4481b5 22416#define HAVE_AIX_SMT_EXP 1
c0d27fcc 22417_ACEOF
ba4481b5
DL
22418
22419fi
22420
ca81d7a0
JD
22421{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
22422echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 22423if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ca81d7a0
JD
22424 { echo "$as_me:$LINENO: result: yes" >&5
22425echo "${ECHO_T}yes" >&6; }
b936fae4 22426
c0d27fcc 22427cat >>confdefs.h <<\_ACEOF
3d9fec71 22428#define HAVE_DEV_PTMX 1
c0d27fcc 22429_ACEOF
3d9fec71
DL
22430
22431else
ca81d7a0
JD
22432 { echo "$as_me:$LINENO: result: no" >&5
22433echo "${ECHO_T}no" >&6; }
3d9fec71
DL
22434fi
22435
ca81d7a0
JD
22436{ echo "$as_me:$LINENO: checking for pid_t" >&5
22437echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
22438if test "${ac_cv_type_pid_t+set}" = set; then
22439 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 22440else
503d2be0 22441 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22442/* confdefs.h. */
22443_ACEOF
22444cat confdefs.h >>conftest.$ac_ext
22445cat >>conftest.$ac_ext <<_ACEOF
22446/* end confdefs.h. */
503d2be0 22447$ac_includes_default
ca81d7a0 22448typedef pid_t ac__type_new_;
503d2be0
AS
22449int
22450main ()
22451{
ca81d7a0 22452if ((ac__type_new_ *) 0)
503d2be0 22453 return 0;
ca81d7a0 22454if (sizeof (ac__type_new_))
503d2be0
AS
22455 return 0;
22456 ;
22457 return 0;
22458}
22459_ACEOF
22460rm -f conftest.$ac_objext
ca81d7a0
JD
22461if { (ac_try="$ac_compile"
22462case "(($ac_try" in
22463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22464 *) ac_try_echo=$ac_try;;
22465esac
22466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22467 (eval "$ac_compile") 2>conftest.er1
503d2be0 22468 ac_status=$?
edfaf76d
LK
22469 grep -v '^ *+' conftest.er1 >conftest.err
22470 rm -f conftest.er1
22471 cat conftest.err >&5
c0d27fcc 22472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22473 (exit $ac_status); } && {
22474 test -z "$ac_c_werror_flag" ||
22475 test ! -s conftest.err
22476 } && test -s conftest.$ac_objext; then
647847ea
DL
22477 ac_cv_type_pid_t=yes
22478else
503d2be0 22479 echo "$as_me: failed program was:" >&5
19650fd6
AS
22480sed 's/^/| /' conftest.$ac_ext >&5
22481
ca81d7a0 22482 ac_cv_type_pid_t=no
647847ea 22483fi
ca81d7a0
JD
22484
22485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 22486fi
ca81d7a0
JD
22487{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
22488echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
22489if test $ac_cv_type_pid_t = yes; then
22490 :
22491else
22492
c0d27fcc 22493cat >>confdefs.h <<_ACEOF
647847ea 22494#define pid_t int
c0d27fcc 22495_ACEOF
647847ea
DL
22496
22497fi
22498
c0d27fcc 22499
ca81d7a0 22500for ac_header in vfork.h
503d2be0
AS
22501do
22502as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22503if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22504 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22505echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22506if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22507 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22508fi
ca81d7a0
JD
22509ac_res=`eval echo '${'$as_ac_Header'}'`
22510 { echo "$as_me:$LINENO: result: $ac_res" >&5
22511echo "${ECHO_T}$ac_res" >&6; }
98418dba 22512else
c0d27fcc 22513 # Is the header compilable?
ca81d7a0
JD
22514{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22515echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22516cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22517/* confdefs.h. */
22518_ACEOF
22519cat confdefs.h >>conftest.$ac_ext
22520cat >>conftest.$ac_ext <<_ACEOF
22521/* end confdefs.h. */
c0d27fcc
MR
22522$ac_includes_default
22523#include <$ac_header>
22524_ACEOF
22525rm -f conftest.$ac_objext
ca81d7a0
JD
22526if { (ac_try="$ac_compile"
22527case "(($ac_try" in
22528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22529 *) ac_try_echo=$ac_try;;
22530esac
22531eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22532 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22533 ac_status=$?
edfaf76d
LK
22534 grep -v '^ *+' conftest.er1 >conftest.err
22535 rm -f conftest.er1
22536 cat conftest.err >&5
c0d27fcc 22537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22538 (exit $ac_status); } && {
22539 test -z "$ac_c_werror_flag" ||
22540 test ! -s conftest.err
22541 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22542 ac_header_compiler=yes
22543else
22544 echo "$as_me: failed program was:" >&5
19650fd6
AS
22545sed 's/^/| /' conftest.$ac_ext >&5
22546
ca81d7a0 22547 ac_header_compiler=no
c0d27fcc 22548fi
ca81d7a0
JD
22549
22550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22551{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22552echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22553
22554# Is the header present?
ca81d7a0
JD
22555{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22556echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22557cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22558/* confdefs.h. */
22559_ACEOF
22560cat confdefs.h >>conftest.$ac_ext
22561cat >>conftest.$ac_ext <<_ACEOF
22562/* end confdefs.h. */
503d2be0
AS
22563#include <$ac_header>
22564_ACEOF
ca81d7a0
JD
22565if { (ac_try="$ac_cpp conftest.$ac_ext"
22566case "(($ac_try" in
22567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22568 *) ac_try_echo=$ac_try;;
22569esac
22570eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22571 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22572 ac_status=$?
6bae0ccf 22573 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22574 rm -f conftest.er1
22575 cat conftest.err >&5
c0d27fcc 22576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22577 (exit $ac_status); } >/dev/null && {
22578 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22579 test ! -s conftest.err
22580 }; then
c0d27fcc 22581 ac_header_preproc=yes
647847ea 22582else
503d2be0 22583 echo "$as_me: failed program was:" >&5
19650fd6
AS
22584sed 's/^/| /' conftest.$ac_ext >&5
22585
c0d27fcc 22586 ac_header_preproc=no
647847ea 22587fi
ca81d7a0 22588
503d2be0 22589rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22590{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22591echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22592
22593# So? What about this header?
edfaf76d
LK
22594case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22595 yes:no: )
c0d27fcc
MR
22596 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22597echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22598 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22599echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22600 ac_header_preproc=yes
19650fd6 22601 ;;
edfaf76d 22602 no:yes:* )
c0d27fcc
MR
22603 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22604echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22605 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22606echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22607 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22608echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22609 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22610echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22611 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22612echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22613 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22614echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22615
19650fd6 22616 ;;
c0d27fcc 22617esac
ca81d7a0
JD
22618{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22619echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22620if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22621 echo $ECHO_N "(cached) $ECHO_C" >&6
22622else
edfaf76d 22623 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 22624fi
ca81d7a0
JD
22625ac_res=`eval echo '${'$as_ac_Header'}'`
22626 { echo "$as_me:$LINENO: result: $ac_res" >&5
22627echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22628
22629fi
503d2be0 22630if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22631 cat >>confdefs.h <<_ACEOF
503d2be0 22632#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22633_ACEOF
647847ea 22634
73b77ee5 22635fi
c0d27fcc 22636
503d2be0 22637done
73b77ee5 22638
c0d27fcc
MR
22639
22640
503d2be0
AS
22641for ac_func in fork vfork
22642do
22643as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
22644{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22645echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22646if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22647 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22648else
503d2be0 22649 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22650/* confdefs.h. */
22651_ACEOF
22652cat confdefs.h >>conftest.$ac_ext
22653cat >>conftest.$ac_ext <<_ACEOF
22654/* end confdefs.h. */
edfaf76d
LK
22655/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22656 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22657#define $ac_func innocuous_$ac_func
22658
fa0b693c 22659/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22660 which can conflict with char $ac_func (); below.
22661 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22662 <limits.h> exists even on freestanding compilers. */
edfaf76d 22663
19650fd6
AS
22664#ifdef __STDC__
22665# include <limits.h>
22666#else
22667# include <assert.h>
22668#endif
edfaf76d
LK
22669
22670#undef $ac_func
22671
ca81d7a0
JD
22672/* Override any GCC internal prototype to avoid an error.
22673 Use char because int might match the return type of a GCC
22674 builtin and then its argument prototype would still apply. */
503d2be0
AS
22675#ifdef __cplusplus
22676extern "C"
22677#endif
503d2be0 22678char $ac_func ();
fa0b693c
GM
22679/* The GNU C library defines this for functions which it implements
22680 to always fail with ENOSYS. Some functions are actually named
22681 something starting with __ and the normal name is an alias. */
ca81d7a0 22682#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 22683choke me
fa0b693c
GM
22684#endif
22685
19650fd6
AS
22686int
22687main ()
22688{
ca81d7a0 22689return $ac_func ();
503d2be0
AS
22690 ;
22691 return 0;
22692}
22693_ACEOF
22694rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22695if { (ac_try="$ac_link"
22696case "(($ac_try" in
22697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22698 *) ac_try_echo=$ac_try;;
22699esac
22700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22701 (eval "$ac_link") 2>conftest.er1
503d2be0 22702 ac_status=$?
edfaf76d
LK
22703 grep -v '^ *+' conftest.er1 >conftest.err
22704 rm -f conftest.er1
22705 cat conftest.err >&5
c0d27fcc 22706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22707 (exit $ac_status); } && {
22708 test -z "$ac_c_werror_flag" ||
22709 test ! -s conftest.err
22710 } && test -s conftest$ac_exeext &&
22711 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22712 eval "$as_ac_var=yes"
22713else
22714 echo "$as_me: failed program was:" >&5
19650fd6
AS
22715sed 's/^/| /' conftest.$ac_ext >&5
22716
ca81d7a0 22717 eval "$as_ac_var=no"
503d2be0 22718fi
ca81d7a0 22719
f053c89f 22720rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22721 conftest$ac_exeext conftest.$ac_ext
503d2be0 22722fi
ca81d7a0
JD
22723ac_res=`eval echo '${'$as_ac_var'}'`
22724 { echo "$as_me:$LINENO: result: $ac_res" >&5
22725echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22726if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22727 cat >>confdefs.h <<_ACEOF
503d2be0 22728#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22729_ACEOF
503d2be0 22730
fa0b693c 22731fi
503d2be0 22732done
fa0b693c 22733
503d2be0 22734if test "x$ac_cv_func_fork" = xyes; then
ca81d7a0
JD
22735 { echo "$as_me:$LINENO: checking for working fork" >&5
22736echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
22737if test "${ac_cv_func_fork_works+set}" = set; then
22738 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22739else
503d2be0
AS
22740 if test "$cross_compiling" = yes; then
22741 ac_cv_func_fork_works=cross
22742else
22743 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
22744/* confdefs.h. */
22745_ACEOF
22746cat confdefs.h >>conftest.$ac_ext
22747cat >>conftest.$ac_ext <<_ACEOF
22748/* end confdefs.h. */
22749$ac_includes_default
22750int
22751main ()
22752{
22753
22754 /* By Ruediger Kuhlmann. */
22755 return fork () < 0;
22756
22757 ;
22758 return 0;
22759}
503d2be0
AS
22760_ACEOF
22761rm -f conftest$ac_exeext
ca81d7a0
JD
22762if { (ac_try="$ac_link"
22763case "(($ac_try" in
22764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22765 *) ac_try_echo=$ac_try;;
22766esac
22767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22768 (eval "$ac_link") 2>&5
503d2be0 22769 ac_status=$?
c0d27fcc 22770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22771 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22772 { (case "(($ac_try" in
22773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22774 *) ac_try_echo=$ac_try;;
22775esac
22776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22777 (eval "$ac_try") 2>&5
503d2be0 22778 ac_status=$?
c0d27fcc 22779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22780 (exit $ac_status); }; }; then
22781 ac_cv_func_fork_works=yes
22782else
22783 echo "$as_me: program exited with status $ac_status" >&5
22784echo "$as_me: failed program was:" >&5
19650fd6
AS
22785sed 's/^/| /' conftest.$ac_ext >&5
22786
c0d27fcc 22787( exit $ac_status )
503d2be0
AS
22788ac_cv_func_fork_works=no
22789fi
ca81d7a0 22790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 22791fi
ca81d7a0
JD
22792
22793
503d2be0 22794fi
ca81d7a0
JD
22795{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
22796echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 22797
6bae0ccf
DL
22798else
22799 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
22800fi
22801if test "x$ac_cv_func_fork_works" = xcross; then
22802 case $host in
22803 *-*-amigaos* | *-*-msdosdjgpp*)
22804 # Override, as these systems have only a dummy fork() stub
22805 ac_cv_func_fork_works=no
22806 ;;
22807 *)
22808 ac_cv_func_fork_works=yes
22809 ;;
22810 esac
c0d27fcc
MR
22811 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
22812echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 22813fi
73b77ee5 22814ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 22815if test "x$ac_cv_func_vfork" = xyes; then
ca81d7a0
JD
22816 { echo "$as_me:$LINENO: checking for working vfork" >&5
22817echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
22818if test "${ac_cv_func_vfork_works+set}" = set; then
22819 echo $ECHO_N "(cached) $ECHO_C" >&6
22820else
22821 if test "$cross_compiling" = yes; then
22822 ac_cv_func_vfork_works=cross
fa0b693c 22823else
503d2be0 22824 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22825/* confdefs.h. */
22826_ACEOF
22827cat confdefs.h >>conftest.$ac_ext
22828cat >>conftest.$ac_ext <<_ACEOF
22829/* end confdefs.h. */
73b77ee5 22830/* Thanks to Paul Eggert for this test. */
ca81d7a0 22831$ac_includes_default
19650fd6 22832#include <sys/wait.h>
f053c89f 22833#ifdef HAVE_VFORK_H
503d2be0 22834# include <vfork.h>
73b77ee5
GM
22835#endif
22836/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
22837 argument registers are propagated back to the parent. The compiler
22838 is told about this with #include <vfork.h>, but some compilers
22839 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
22840 static variable whose address is put into a register that is
22841 clobbered by the vfork. */
19650fd6 22842static void
fa0b693c 22843#ifdef __cplusplus
73b77ee5 22844sparc_address_test (int arg)
503d2be0 22845# else
73b77ee5 22846sparc_address_test (arg) int arg;
fa0b693c 22847#endif
fa0b693c 22848{
73b77ee5
GM
22849 static pid_t child;
22850 if (!child) {
22851 child = vfork ();
22852 if (child < 0) {
22853 perror ("vfork");
22854 _exit(2);
22855 }
22856 if (!child) {
22857 arg = getpid();
22858 write(-1, "", 0);
22859 _exit (arg);
22860 }
22861 }
22862}
503d2be0
AS
22863
22864int
22865main ()
22866{
73b77ee5
GM
22867 pid_t parent = getpid ();
22868 pid_t child;
fa0b693c 22869
19650fd6 22870 sparc_address_test (0);
fa0b693c 22871
73b77ee5 22872 child = vfork ();
fa0b693c 22873
73b77ee5 22874 if (child == 0) {
503d2be0
AS
22875 /* Here is another test for sparc vfork register problems. This
22876 test uses lots of local variables, at least as many local
22877 variables as main has allocated so far including compiler
22878 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
22879 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
22880 reuse the register of parent for one of the local variables,
22881 since it will think that parent can't possibly be used any more
22882 in this routine. Assigning to the local variable will thus
22883 munge parent in the parent process. */
73b77ee5
GM
22884 pid_t
22885 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22886 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22887 /* Convince the compiler that p..p7 are live; otherwise, it might
22888 use the same hardware register for all 8 local variables. */
22889 if (p != p1 || p != p2 || p != p3 || p != p4
22890 || p != p5 || p != p6 || p != p7)
22891 _exit(1);
fa0b693c 22892
503d2be0
AS
22893 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22894 from child file descriptors. If the child closes a descriptor
22895 before it execs or exits, this munges the parent's descriptor
22896 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
22897 _exit(close(fileno(stdout)) != 0);
22898 } else {
22899 int status;
22900 struct stat st;
22901
22902 while (wait(&status) != child)
22903 ;
ca81d7a0 22904 return (
73b77ee5
GM
22905 /* Was there some problem with vforking? */
22906 child < 0
22907
22908 /* Did the child fail? (This shouldn't happen.) */
22909 || status
22910
22911 /* Did the vfork/compiler bug occur? */
22912 || parent != getpid()
fa0b693c 22913
73b77ee5
GM
22914 /* Did the file descriptor bug occur? */
22915 || fstat(fileno(stdout), &st) != 0
22916 );
22917 }
22918}
503d2be0
AS
22919_ACEOF
22920rm -f conftest$ac_exeext
ca81d7a0
JD
22921if { (ac_try="$ac_link"
22922case "(($ac_try" in
22923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22924 *) ac_try_echo=$ac_try;;
22925esac
22926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22927 (eval "$ac_link") 2>&5
503d2be0 22928 ac_status=$?
c0d27fcc 22929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22930 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22931 { (case "(($ac_try" in
22932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22933 *) ac_try_echo=$ac_try;;
22934esac
22935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22936 (eval "$ac_try") 2>&5
503d2be0 22937 ac_status=$?
c0d27fcc 22938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22939 (exit $ac_status); }; }; then
73b77ee5 22940 ac_cv_func_vfork_works=yes
fa0b693c 22941else
503d2be0
AS
22942 echo "$as_me: program exited with status $ac_status" >&5
22943echo "$as_me: failed program was:" >&5
19650fd6
AS
22944sed 's/^/| /' conftest.$ac_ext >&5
22945
c0d27fcc 22946( exit $ac_status )
503d2be0
AS
22947ac_cv_func_vfork_works=no
22948fi
ca81d7a0 22949rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 22950fi
ca81d7a0
JD
22951
22952
fa0b693c 22953fi
ca81d7a0
JD
22954{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
22955echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 22956
503d2be0
AS
22957fi;
22958if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 22959 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
22960 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
22961echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
22962fi
22963
503d2be0
AS
22964if test "x$ac_cv_func_vfork_works" = xyes; then
22965
c0d27fcc 22966cat >>confdefs.h <<\_ACEOF
503d2be0 22967#define HAVE_WORKING_VFORK 1
c0d27fcc 22968_ACEOF
503d2be0
AS
22969
22970else
22971
c0d27fcc 22972cat >>confdefs.h <<\_ACEOF
73b77ee5 22973#define vfork fork
c0d27fcc 22974_ACEOF
fa0b693c
GM
22975
22976fi
503d2be0
AS
22977if test "x$ac_cv_func_fork_works" = xyes; then
22978
c0d27fcc 22979cat >>confdefs.h <<\_ACEOF
503d2be0 22980#define HAVE_WORKING_FORK 1
c0d27fcc 22981_ACEOF
fa0b693c 22982
503d2be0 22983fi
647847ea 22984
c0d27fcc 22985
ca81d7a0
JD
22986{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
22987echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
22988if test "${emacs_cv_langinfo_codeset+set}" = set; then
22989 echo $ECHO_N "(cached) $ECHO_C" >&6
22990else
22991 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22992/* confdefs.h. */
22993_ACEOF
22994cat confdefs.h >>conftest.$ac_ext
22995cat >>conftest.$ac_ext <<_ACEOF
22996/* end confdefs.h. */
6a3a24fa
JD
22997#include <langinfo.h>
22998int
22999main ()
23000{
23001char* cs = nl_langinfo(CODESET);
23002 ;
23003 return 0;
23004}
23005_ACEOF
23006rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23007if { (ac_try="$ac_link"
23008case "(($ac_try" in
23009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23010 *) ac_try_echo=$ac_try;;
23011esac
23012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23013 (eval "$ac_link") 2>conftest.er1
6a3a24fa 23014 ac_status=$?
edfaf76d
LK
23015 grep -v '^ *+' conftest.er1 >conftest.err
23016 rm -f conftest.er1
23017 cat conftest.err >&5
6a3a24fa 23018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23019 (exit $ac_status); } && {
23020 test -z "$ac_c_werror_flag" ||
23021 test ! -s conftest.err
23022 } && test -s conftest$ac_exeext &&
23023 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23024 emacs_cv_langinfo_codeset=yes
23025else
23026 echo "$as_me: failed program was:" >&5
19650fd6
AS
23027sed 's/^/| /' conftest.$ac_ext >&5
23028
ca81d7a0 23029 emacs_cv_langinfo_codeset=no
6a3a24fa 23030fi
ca81d7a0 23031
f053c89f 23032rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23033 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23034
23035fi
ca81d7a0
JD
23036{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23037echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23038if test $emacs_cv_langinfo_codeset = yes; then
23039
23040cat >>confdefs.h <<\_ACEOF
23041#define HAVE_LANGINFO_CODESET 1
23042_ACEOF
23043
23044fi
23045
ca81d7a0
JD
23046{ echo "$as_me:$LINENO: checking for size_t" >&5
23047echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
23048if test "${ac_cv_type_size_t+set}" = set; then
23049 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23050else
503d2be0 23051 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23052/* confdefs.h. */
23053_ACEOF
23054cat confdefs.h >>conftest.$ac_ext
23055cat >>conftest.$ac_ext <<_ACEOF
23056/* end confdefs.h. */
503d2be0 23057$ac_includes_default
ca81d7a0 23058typedef size_t ac__type_new_;
503d2be0
AS
23059int
23060main ()
23061{
ca81d7a0 23062if ((ac__type_new_ *) 0)
503d2be0 23063 return 0;
ca81d7a0 23064if (sizeof (ac__type_new_))
503d2be0
AS
23065 return 0;
23066 ;
23067 return 0;
23068}
23069_ACEOF
23070rm -f conftest.$ac_objext
ca81d7a0
JD
23071if { (ac_try="$ac_compile"
23072case "(($ac_try" in
23073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23074 *) ac_try_echo=$ac_try;;
23075esac
23076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23077 (eval "$ac_compile") 2>conftest.er1
503d2be0 23078 ac_status=$?
edfaf76d
LK
23079 grep -v '^ *+' conftest.er1 >conftest.err
23080 rm -f conftest.er1
23081 cat conftest.err >&5
c0d27fcc 23082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23083 (exit $ac_status); } && {
23084 test -z "$ac_c_werror_flag" ||
23085 test ! -s conftest.err
23086 } && test -s conftest.$ac_objext; then
8730a8da
DL
23087 ac_cv_type_size_t=yes
23088else
503d2be0 23089 echo "$as_me: failed program was:" >&5
19650fd6
AS
23090sed 's/^/| /' conftest.$ac_ext >&5
23091
ca81d7a0 23092 ac_cv_type_size_t=no
8730a8da 23093fi
ca81d7a0
JD
23094
23095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 23096fi
ca81d7a0
JD
23097{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23098echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 23099if test $ac_cv_type_size_t = yes; then
503d2be0 23100
c0d27fcc
MR
23101cat >>confdefs.h <<_ACEOF
23102#define HAVE_SIZE_T 1
23103_ACEOF
23104
8730a8da
DL
23105
23106fi
23107
c0d27fcc 23108
ca81d7a0
JD
23109{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23110echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
23111if test "${ac_cv_type_mbstate_t+set}" = set; then
23112 echo $ECHO_N "(cached) $ECHO_C" >&6
23113else
23114 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23115/* confdefs.h. */
23116_ACEOF
23117cat confdefs.h >>conftest.$ac_ext
23118cat >>conftest.$ac_ext <<_ACEOF
23119/* end confdefs.h. */
973a76b1
DL
23120$ac_includes_default
23121# include <wchar.h>
23122int
23123main ()
23124{
23125mbstate_t x; return sizeof x;
23126 ;
23127 return 0;
23128}
23129_ACEOF
23130rm -f conftest.$ac_objext
ca81d7a0
JD
23131if { (ac_try="$ac_compile"
23132case "(($ac_try" in
23133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23134 *) ac_try_echo=$ac_try;;
23135esac
23136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23137 (eval "$ac_compile") 2>conftest.er1
973a76b1 23138 ac_status=$?
edfaf76d
LK
23139 grep -v '^ *+' conftest.er1 >conftest.err
23140 rm -f conftest.er1
23141 cat conftest.err >&5
973a76b1 23142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23143 (exit $ac_status); } && {
23144 test -z "$ac_c_werror_flag" ||
23145 test ! -s conftest.err
23146 } && test -s conftest.$ac_objext; then
973a76b1
DL
23147 ac_cv_type_mbstate_t=yes
23148else
23149 echo "$as_me: failed program was:" >&5
19650fd6
AS
23150sed 's/^/| /' conftest.$ac_ext >&5
23151
ca81d7a0 23152 ac_cv_type_mbstate_t=no
973a76b1 23153fi
ca81d7a0
JD
23154
23155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 23156fi
ca81d7a0
JD
23157{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
23158echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
23159 if test $ac_cv_type_mbstate_t = yes; then
23160
23161cat >>confdefs.h <<\_ACEOF
23162#define HAVE_MBSTATE_T 1
23163_ACEOF
23164
23165 else
23166
23167cat >>confdefs.h <<\_ACEOF
23168#define mbstate_t int
23169_ACEOF
23170
23171 fi
23172
ca81d7a0
JD
23173{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
23174echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
23175if test "${emacs_cv_c_restrict+set}" = set; then
23176 echo $ECHO_N "(cached) $ECHO_C" >&6
23177else
23178 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23179/* confdefs.h. */
23180_ACEOF
23181cat confdefs.h >>conftest.$ac_ext
23182cat >>conftest.$ac_ext <<_ACEOF
23183/* end confdefs.h. */
22044edf
DL
23184void fred (int *restrict x);
23185int
23186main ()
23187{
b936fae4 23188
22044edf
DL
23189 ;
23190 return 0;
23191}
c0d27fcc 23192_ACEOF
22044edf 23193rm -f conftest.$ac_objext
ca81d7a0
JD
23194if { (ac_try="$ac_compile"
23195case "(($ac_try" in
23196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23197 *) ac_try_echo=$ac_try;;
23198esac
23199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23200 (eval "$ac_compile") 2>conftest.er1
22044edf 23201 ac_status=$?
edfaf76d
LK
23202 grep -v '^ *+' conftest.er1 >conftest.err
23203 rm -f conftest.er1
23204 cat conftest.err >&5
22044edf 23205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23206 (exit $ac_status); } && {
23207 test -z "$ac_c_werror_flag" ||
23208 test ! -s conftest.err
23209 } && test -s conftest.$ac_objext; then
22044edf
DL
23210 emacs_cv_c_restrict=yes
23211else
23212 echo "$as_me: failed program was:" >&5
19650fd6
AS
23213sed 's/^/| /' conftest.$ac_ext >&5
23214
ca81d7a0 23215 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23216/* confdefs.h. */
23217_ACEOF
23218cat confdefs.h >>conftest.$ac_ext
23219cat >>conftest.$ac_ext <<_ACEOF
23220/* end confdefs.h. */
22044edf
DL
23221void fred (int *__restrict x);
23222int
23223main ()
23224{
c0d27fcc 23225
22044edf
DL
23226 ;
23227 return 0;
23228}
c0d27fcc 23229_ACEOF
22044edf 23230rm -f conftest.$ac_objext
ca81d7a0
JD
23231if { (ac_try="$ac_compile"
23232case "(($ac_try" in
23233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23234 *) ac_try_echo=$ac_try;;
23235esac
23236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23237 (eval "$ac_compile") 2>conftest.er1
22044edf 23238 ac_status=$?
edfaf76d
LK
23239 grep -v '^ *+' conftest.er1 >conftest.err
23240 rm -f conftest.er1
23241 cat conftest.err >&5
22044edf 23242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23243 (exit $ac_status); } && {
23244 test -z "$ac_c_werror_flag" ||
23245 test ! -s conftest.err
23246 } && test -s conftest.$ac_objext; then
22044edf
DL
23247 emacs_cv_c_restrict=__restrict
23248else
23249 echo "$as_me: failed program was:" >&5
19650fd6
AS
23250sed 's/^/| /' conftest.$ac_ext >&5
23251
ca81d7a0 23252 emacs_cv_c_restrict=no
ba4481b5 23253fi
ca81d7a0
JD
23254
23255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23256fi
ca81d7a0
JD
23257
23258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23259fi
ca81d7a0
JD
23260{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
23261echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
23262case "$emacs_cv_c_restrict" in
23263 yes) emacs_restrict=restrict;;
23264 no) emacs_restrict="";;
23265 *) emacs_restrict="$emacs_cv_c_restrict";;
23266esac
23267if test "$emacs_restrict" != __restrict; then
b936fae4 23268
22044edf
DL
23269cat >>confdefs.h <<_ACEOF
23270#define __restrict $emacs_restrict
c0d27fcc 23271_ACEOF
ba4481b5
DL
23272
23273fi
ba4481b5 23274
ca81d7a0
JD
23275{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
23276echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
23277if test "${emacs_cv_c_restrict_arr+set}" = set; then
23278 echo $ECHO_N "(cached) $ECHO_C" >&6
23279else
23280 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23281/* confdefs.h. */
23282_ACEOF
23283cat confdefs.h >>conftest.$ac_ext
23284cat >>conftest.$ac_ext <<_ACEOF
23285/* end confdefs.h. */
22044edf
DL
23286void fred (int x[__restrict]);
23287int
23288main ()
23289{
b936fae4 23290
22044edf
DL
23291 ;
23292 return 0;
23293}
c0d27fcc 23294_ACEOF
22044edf 23295rm -f conftest.$ac_objext
ca81d7a0
JD
23296if { (ac_try="$ac_compile"
23297case "(($ac_try" in
23298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23299 *) ac_try_echo=$ac_try;;
23300esac
23301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23302 (eval "$ac_compile") 2>conftest.er1
22044edf 23303 ac_status=$?
edfaf76d
LK
23304 grep -v '^ *+' conftest.er1 >conftest.err
23305 rm -f conftest.er1
23306 cat conftest.err >&5
22044edf 23307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23308 (exit $ac_status); } && {
23309 test -z "$ac_c_werror_flag" ||
23310 test ! -s conftest.err
23311 } && test -s conftest.$ac_objext; then
22044edf
DL
23312 emacs_cv_c_restrict_arr=yes
23313else
23314 echo "$as_me: failed program was:" >&5
19650fd6
AS
23315sed 's/^/| /' conftest.$ac_ext >&5
23316
ca81d7a0 23317 emacs_cv_c_restrict_arr=no
ba4481b5 23318fi
ca81d7a0
JD
23319
23320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 23321fi
ca81d7a0
JD
23322{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
23323echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 23324if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 23325
c0d27fcc 23326cat >>confdefs.h <<\_ACEOF
22044edf 23327#define __restrict_arr __restrict
c0d27fcc 23328_ACEOF
ba4481b5 23329
ba4481b5
DL
23330fi
23331
c0d27fcc 23332
c0d27fcc 23333
22044edf
DL
23334# Set up the CFLAGS for real compilation, so we can substitute it.
23335CFLAGS="$REAL_CFLAGS"
23336CPPFLAGS="$REAL_CPPFLAGS"
23337
23338#### Find out which version of Emacs this is.
23339version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
23340 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
23341if test x"${version}" = x; then
23342 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
23343echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
23344 { (exit 1); exit 1; }; }
23345fi
23346
23347### Specify what sort of things we'll be editing into Makefile and config.h.
23348### Use configuration here uncanonicalized to avoid exceeding size limits.
23349
23350
23351
23352
23353
23354
23355
23356
23357
23358
23359
23360
23361
23362
23363
23364
23365
23366
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
6a3a24fa 23381
22044edf
DL
23382
23383
23384cat >>confdefs.h <<_ACEOF
23385#define EMACS_CONFIGURATION "${canonical}"
23386_ACEOF
23387
23388
23389cat >>confdefs.h <<_ACEOF
23390#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
23391_ACEOF
23392
23393
23394cat >>confdefs.h <<_ACEOF
23395#define config_machfile "${machfile}"
23396_ACEOF
23397
23398
23399cat >>confdefs.h <<_ACEOF
23400#define config_opsysfile "${opsysfile}"
23401_ACEOF
23402
23403
23404cat >>confdefs.h <<_ACEOF
23405#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
23406_ACEOF
23407
23408
23409cat >>confdefs.h <<_ACEOF
23410#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
23411_ACEOF
23412
23413
23414cat >>confdefs.h <<_ACEOF
23415#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
23416_ACEOF
23417
23418
23419cat >>confdefs.h <<_ACEOF
23420#define UNEXEC_SRC ${UNEXEC_SRC}
23421_ACEOF
23422
23423
23424if test "${HAVE_X_WINDOWS}" = "yes" ; then
23425
23426cat >>confdefs.h <<\_ACEOF
23427#define HAVE_X_WINDOWS 1
23428_ACEOF
23429
23430fi
23431if test "${USE_X_TOOLKIT}" != "none" ; then
23432
23433cat >>confdefs.h <<\_ACEOF
23434#define USE_X_TOOLKIT 1
23435_ACEOF
23436
23437fi
23438if test "${HAVE_X11}" = "yes" ; then
23439
23440cat >>confdefs.h <<\_ACEOF
23441#define HAVE_X11 1
23442_ACEOF
23443
23444fi
23445if test "${HAVE_XFREE386}" = "yes" ; then
23446
23447cat >>confdefs.h <<\_ACEOF
23448#define HAVE_XFREE386 1
23449_ACEOF
23450
23451fi
23452if test "${HAVE_MENUS}" = "yes" ; then
23453
23454cat >>confdefs.h <<\_ACEOF
23455#define HAVE_MENUS 1
23456_ACEOF
23457
23458fi
23459if test "${GNU_MALLOC}" = "yes" ; then
23460
23461cat >>confdefs.h <<\_ACEOF
23462#define GNU_MALLOC 1
23463_ACEOF
23464
23465fi
23466if test "${REL_ALLOC}" = "yes" ; then
23467
23468cat >>confdefs.h <<\_ACEOF
23469#define REL_ALLOC 1
23470_ACEOF
23471
23472fi
23473
23474
23475
c0d27fcc
MR
23476
23477
5afbeb22 23478
ba4481b5 23479#### Report on what we decided to do.
488dd4c4
JD
23480#### Report GTK as a toolkit, even if it doesn't use Xt.
23481#### It makes printing result more understandable as using GTK sets
23482#### toolkit_scroll_bars to yes by default.
23483if test "${HAVE_GTK}" = "yes"; then
23484 USE_X_TOOLKIT=GTK
23485fi
23486
ba4481b5
DL
23487echo "
23488Configured for \`${canonical}'.
23489
23490 Where should the build process find the source code? ${srcdir}
23491 What operating system and machine description files should Emacs use?
23492 \`${opsysfile}' and \`${machfile}'
23493 What compiler should emacs be built with? ${CC} ${CFLAGS}
23494 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 23495 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 23496 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 23497 What window system should Emacs use? ${window_system}
8e967cf7 23498 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
23499
23500if test -n "${x_includes}"; then
23501echo " Where do we find X Windows header files? ${x_includes}"
23502else
23503echo " Where do we find X Windows header files? Standard dirs"
23504fi
23505if test -n "${x_libraries}"; then
23506echo " Where do we find X Windows libraries? ${x_libraries}"
23507else
23508echo " Where do we find X Windows libraries? Standard dirs"
23509fi
23510
23511echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
23512echo " Does Emacs use -lXpm? ${HAVE_XPM}"
23513echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
23514echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 23515echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 23516echo " Does Emacs use -lpng? ${HAVE_PNG}"
79011b82 23517echo " Does Emacs use -lgpm? ${HAVE_GPM}"
ba4481b5
DL
23518echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
23519echo
23520
d0098f13
JD
23521if test $USE_XASSERTS = yes; then
23522 echo " Compiling with asserts turned on."
d0098f13
JD
23523 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
23524 echo
23525fi
05cf15c6 23526
a2d3b5bd
JD
23527if test "$USE_X_TOOLKIT" = GTK; then
23528 case "$canonical" in
23529 *cygwin*)
23530 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
23531 will probably get a crash on startup. If this happens, please use another
23532 toolkit for Emacs. See etc/PROBLEMS for more information."
23533 ;;
23534 esac
23535fi
23536
05cf15c6 23537
05cf15c6 23538
ba4481b5
DL
23539# Remove any trailing slashes in these variables.
23540test "${prefix}" != NONE &&
23541 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
23542test "${exec_prefix}" != NONE &&
23543 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
23544
d0e9bfd2
GM
23545## Check if the C preprocessor will convert `..' to `. .'. If so, set
23546## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
23547## from Makefile.c can correctly provide the arg `-traditional' to the
23548## C preprocessor.
23549
503d2be0 23550cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23551/* confdefs.h. */
23552_ACEOF
23553cat confdefs.h >>conftest.$ac_ext
23554cat >>conftest.$ac_ext <<_ACEOF
23555/* end confdefs.h. */
d0e9bfd2 23556yes..yes
503d2be0 23557_ACEOF
d0e9bfd2 23558if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 23559 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
23560 CPP_NEED_TRADITIONAL=no
23561else
d0e9bfd2
GM
23562 CPP_NEED_TRADITIONAL=yes
23563fi
23564rm -f conftest*
23565
c0d27fcc 23566
ca81d7a0
JD
23567ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile man/Makefile lwlib/Makefile src/Makefile.c:src/Makefile.in lisp/Makefile lispref/Makefile lispintro/Makefile leim/Makefile"
23568
23569ac_config_commands="$ac_config_commands default"
23570
503d2be0 23571cat >confcache <<\_ACEOF
ba4481b5
DL
23572# This file is a shell script that caches the results of configure
23573# tests run on this system so they can be shared between configure
503d2be0
AS
23574# scripts and configure runs, see configure's option --config-cache.
23575# It is not useful on other systems. If it contains results you don't
23576# want to keep, you may remove or edit it.
ba4481b5 23577#
503d2be0
AS
23578# config.status only pays attention to the cache file if you give it
23579# the --recheck option to rerun configure.
ba4481b5 23580#
6bae0ccf 23581# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
23582# loading this file, other *unset* `ac_cv_foo' will be assigned the
23583# following values.
23584
23585_ACEOF
23586
ba4481b5
DL
23587# The following way of writing the cache mishandles newlines in values,
23588# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 23589# So, we kill variables containing newlines.
ba4481b5
DL
23590# Ultrix sh set writes to stderr and can't be redirected directly,
23591# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
23592(
23593 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23594 eval ac_val=\$$ac_var
23595 case $ac_val in #(
23596 *${as_nl}*)
23597 case $ac_var in #(
23598 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23599echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23600 esac
23601 case $ac_var in #(
23602 _ | IFS | as_nl) ;; #(
23603 *) $as_unset $ac_var ;;
23604 esac ;;
23605 esac
23606 done
23607
503d2be0 23608 (set) 2>&1 |
ca81d7a0
JD
23609 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23610 *${as_nl}ac_space=\ *)
503d2be0
AS
23611 # `set' does not quote correctly, so add quotes (double-quote
23612 # substitution turns \\\\ into \\, and sed turns \\ into \).
23613 sed -n \
edfaf76d
LK
23614 "s/'/'\\\\''/g;
23615 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 23616 ;; #(
503d2be0
AS
23617 *)
23618 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 23619 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 23620 ;;
ca81d7a0
JD
23621 esac |
23622 sort
23623) |
503d2be0 23624 sed '
ca81d7a0 23625 /^ac_cv_env_/b end
503d2be0 23626 t clear
ca81d7a0 23627 :clear
503d2be0
AS
23628 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23629 t end
ca81d7a0
JD
23630 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23631 :end' >>confcache
23632if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23633 if test -w "$cache_file"; then
23634 test "x$cache_file" != "x/dev/null" &&
23635 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23636echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 23637 cat confcache >$cache_file
ba4481b5 23638 else
ca81d7a0
JD
23639 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23640echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
23641 fi
23642fi
23643rm -f confcache
23644
ba4481b5
DL
23645test "x$prefix" = xNONE && prefix=$ac_default_prefix
23646# Let make expand exec_prefix.
23647test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23648
ba4481b5
DL
23649DEFS=-DHAVE_CONFIG_H
23650
6bae0ccf
DL
23651ac_libobjs=
23652ac_ltlibobjs=
23653for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23654 # 1. Remove the extension, and $U if already installed.
ca81d7a0
JD
23655 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
23656 ac_i=`echo "$ac_i" | sed "$ac_script"`
23657 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
23658 # will be set to the directory where LIBOBJS objects are built.
23659 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23660 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
23661done
23662LIBOBJS=$ac_libobjs
23663
23664LTLIBOBJS=$ac_ltlibobjs
23665
23666
c0d27fcc 23667
ba4481b5 23668: ${CONFIG_STATUS=./config.status}
503d2be0
AS
23669ac_clean_files_save=$ac_clean_files
23670ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 23671{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
23672echo "$as_me: creating $CONFIG_STATUS" >&6;}
23673cat >$CONFIG_STATUS <<_ACEOF
23674#! $SHELL
c0d27fcc 23675# Generated by $as_me.
ba4481b5 23676# Run this file to recreate the current configuration.
ba4481b5 23677# Compiler output produced by configure, useful for debugging
503d2be0 23678# configure, is in config.log if it exists.
ba4481b5 23679
503d2be0 23680debug=false
19650fd6
AS
23681ac_cs_recheck=false
23682ac_cs_silent=false
503d2be0 23683SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
23684_ACEOF
23685
23686cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
23687## --------------------- ##
23688## M4sh Initialization. ##
23689## --------------------- ##
23690
f053c89f
CY
23691# Be more Bourne compatible
23692DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
23693if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23694 emulate sh
23695 NULLCMD=:
6bae0ccf
DL
23696 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23697 # is contrary to our usage. Disable this feature.
23698 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
23699 setopt NO_GLOB_SUBST
23700else
f053c89f
CY
23701 case `(set -o) 2>/dev/null` in
23702 *posix*) set -o posix ;;
23703esac
23704
503d2be0 23705fi
f053c89f
CY
23706
23707
503d2be0 23708
ca81d7a0
JD
23709
23710# PATH needs CR
23711# Avoid depending upon Character Ranges.
23712as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23713as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23714as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23715as_cr_digits='0123456789'
23716as_cr_alnum=$as_cr_Letters$as_cr_digits
23717
23718# The user is always right.
23719if test "${PATH_SEPARATOR+set}" != set; then
23720 echo "#! /bin/sh" >conf$$.sh
23721 echo "exit 0" >>conf$$.sh
23722 chmod +x conf$$.sh
23723 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23724 PATH_SEPARATOR=';'
23725 else
23726 PATH_SEPARATOR=:
23727 fi
23728 rm -f conf$$.sh
23729fi
23730
c0d27fcc 23731# Support unset when possible.
edfaf76d 23732if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
23733 as_unset=unset
23734else
23735 as_unset=false
23736fi
23737
6bae0ccf 23738
ca81d7a0
JD
23739# IFS
23740# We need space, tab and new line, in precisely that order. Quoting is
23741# there to prevent editors from complaining about space-tab.
23742# (If _AS_PATH_WALK were called with IFS unset, it would disable word
23743# splitting by setting IFS to empty value.)
23744as_nl='
23745'
23746IFS=" "" $as_nl"
23747
23748# Find who we are. Look in the path if we contain no directory separator.
23749case $0 in
23750 *[\\/]* ) as_myself=$0 ;;
23751 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23752for as_dir in $PATH
23753do
23754 IFS=$as_save_IFS
23755 test -z "$as_dir" && as_dir=.
23756 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23757done
23758IFS=$as_save_IFS
23759
23760 ;;
23761esac
23762# We did not find ourselves, most probably we were run as `sh COMMAND'
23763# in which case we are not to be found in the path.
23764if test "x$as_myself" = x; then
23765 as_myself=$0
23766fi
23767if test ! -f "$as_myself"; then
23768 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
23769 { (exit 1); exit 1; }
23770fi
23771
6bae0ccf 23772# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
23773for as_var in ENV MAIL MAILPATH
23774do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23775done
6bae0ccf
DL
23776PS1='$ '
23777PS2='> '
23778PS4='+ '
23779
23780# NLS nuisances.
19650fd6
AS
23781for as_var in \
23782 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23783 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23784 LC_TELEPHONE LC_TIME
6bae0ccf 23785do
edfaf76d 23786 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
23787 eval $as_var=C; export $as_var
23788 else
ca81d7a0 23789 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
23790 fi
23791done
23792
23793# Required to use basename.
ca81d7a0
JD
23794if expr a : '\(a\)' >/dev/null 2>&1 &&
23795 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
23796 as_expr=expr
23797else
23798 as_expr=false
23799fi
23800
ca81d7a0 23801if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
23802 as_basename=basename
23803else
23804 as_basename=false
23805fi
c0d27fcc
MR
23806
23807
503d2be0 23808# Name of the executable.
ca81d7a0 23809as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
23810$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23811 X"$0" : 'X\(//\)$' \| \
ca81d7a0 23812 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 23813echo X/"$0" |
ca81d7a0
JD
23814 sed '/^.*\/\([^/][^/]*\)\/*$/{
23815 s//\1/
23816 q
23817 }
23818 /^X\/\(\/\/\)$/{
23819 s//\1/
23820 q
23821 }
23822 /^X\/\(\/\).*/{
23823 s//\1/
23824 q
23825 }
23826 s/.*/./; q'`
c0d27fcc 23827
ca81d7a0
JD
23828# CDPATH.
23829$as_unset CDPATH
4b411bfe
CY
23830
23831
c0d27fcc
MR
23832
23833 as_lineno_1=$LINENO
23834 as_lineno_2=$LINENO
c0d27fcc 23835 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 23836 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
23837
23838 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23839 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
23840 # line-number line after each line using $LINENO; the second 'sed'
23841 # does the real work. The second script uses 'N' to pair each
23842 # line-number line with the line containing $LINENO, and appends
23843 # trailing '-' during substitution so that $LINENO is not a special
23844 # case at line end.
c0d27fcc 23845 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
23846 # scripts with optimization help from Paolo Bonzini. Blame Lee
23847 # E. McMahon (1931-1989) for sed's syntax. :-)
23848 sed -n '
23849 p
23850 /[$]LINENO/=
23851 ' <$as_myself |
c0d27fcc 23852 sed '
ca81d7a0
JD
23853 s/[$]LINENO.*/&-/
23854 t lineno
23855 b
23856 :lineno
c0d27fcc 23857 N
ca81d7a0
JD
23858 :loop
23859 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 23860 t loop
ca81d7a0 23861 s/-\n.*//
c0d27fcc 23862 ' >$as_me.lineno &&
ca81d7a0
JD
23863 chmod +x "$as_me.lineno" ||
23864 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
23865 { (exit 1); exit 1; }; }
23866
23867 # Don't try to exec as it changes $[0], causing all sort of problems
23868 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
23869 # original and so on. Autoconf is especially sensitive to this).
23870 . "./$as_me.lineno"
c0d27fcc
MR
23871 # Exit status is that of the last command.
23872 exit
23873}
23874
23875
ca81d7a0
JD
23876if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
23877 as_dirname=dirname
23878else
23879 as_dirname=false
23880fi
23881
23882ECHO_C= ECHO_N= ECHO_T=
23883case `echo -n x` in
23884-n*)
23885 case `echo 'x\c'` in
23886 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
23887 *) ECHO_C='\c';;
23888 esac;;
23889*)
23890 ECHO_N='-n';;
c0d27fcc 23891esac
503d2be0 23892
ca81d7a0
JD
23893if expr a : '\(a\)' >/dev/null 2>&1 &&
23894 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
23895 as_expr=expr
23896else
23897 as_expr=false
23898fi
23899
23900rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
23901if test -d conf$$.dir; then
23902 rm -f conf$$.dir/conf$$.file
23903else
23904 rm -f conf$$.dir
23905 mkdir conf$$.dir
23906fi
503d2be0
AS
23907echo >conf$$.file
23908if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
23909 as_ln_s='ln -s'
23910 # ... but there are two gotchas:
23911 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
23912 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
23913 # In both cases, we have to default to `cp -p'.
23914 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 23915 as_ln_s='cp -p'
503d2be0
AS
23916elif ln conf$$.file conf$$ 2>/dev/null; then
23917 as_ln_s=ln
23918else
23919 as_ln_s='cp -p'
23920fi
ca81d7a0
JD
23921rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
23922rmdir conf$$.dir 2>/dev/null
503d2be0 23923
6bae0ccf
DL
23924if mkdir -p . 2>/dev/null; then
23925 as_mkdir_p=:
23926else
edfaf76d 23927 test -d ./-p && rmdir ./-p
6bae0ccf
DL
23928 as_mkdir_p=false
23929fi
23930
f053c89f
CY
23931if test -x / >/dev/null 2>&1; then
23932 as_test_x='test -x'
ca81d7a0 23933else
f053c89f
CY
23934 if ls -dL / >/dev/null 2>&1; then
23935 as_ls_L_option=L
23936 else
23937 as_ls_L_option=
23938 fi
23939 as_test_x='
23940 eval sh -c '\''
23941 if test -d "$1"; then
23942 test -d "$1/.";
23943 else
23944 case $1 in
23945 -*)set "./$1";;
23946 esac;
23947 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
23948 ???[sx]*):;;*)false;;esac;fi
23949 '\'' sh
23950 '
ca81d7a0 23951fi
f053c89f 23952as_executable_p=$as_test_x
503d2be0 23953
c0d27fcc 23954# Sed expression to map a string onto a valid CPP name.
edfaf76d 23955as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
23956
23957# Sed expression to map a string onto a valid variable name.
edfaf76d 23958as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 23959
503d2be0 23960
503d2be0
AS
23961exec 6>&1
23962
ca81d7a0 23963# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 23964# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
23965# values after options handling.
23966ac_log="
c0d27fcc 23967This file was extended by $as_me, which was
f053c89f 23968generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
23969
23970 CONFIG_FILES = $CONFIG_FILES
23971 CONFIG_HEADERS = $CONFIG_HEADERS
23972 CONFIG_LINKS = $CONFIG_LINKS
23973 CONFIG_COMMANDS = $CONFIG_COMMANDS
23974 $ $0 $@
23975
ca81d7a0
JD
23976on `(hostname || uname -n) 2>/dev/null | sed 1q`
23977"
23978
503d2be0
AS
23979_ACEOF
23980
ca81d7a0 23981cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 23982# Files that config.status was made for.
ca81d7a0
JD
23983config_files="$ac_config_files"
23984config_headers="$ac_config_headers"
23985config_commands="$ac_config_commands"
4b411bfe 23986
ca81d7a0 23987_ACEOF
503d2be0 23988
c0d27fcc 23989cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23990ac_cs_usage="\
23991\`$as_me' instantiates files from templates according to the
23992current configuration.
23993
23994Usage: $0 [OPTIONS] [FILE]...
23995
23996 -h, --help print this help, then exit
f053c89f 23997 -V, --version print version number and configuration settings, then exit
19650fd6 23998 -q, --quiet do not print progress messages
503d2be0
AS
23999 -d, --debug don't remove temporary files
24000 --recheck update $as_me by reconfiguring in the same conditions
24001 --file=FILE[:TEMPLATE]
edfaf76d 24002 instantiate the configuration file FILE
503d2be0 24003 --header=FILE[:TEMPLATE]
edfaf76d 24004 instantiate the configuration header FILE
503d2be0
AS
24005
24006Configuration files:
24007$config_files
24008
24009Configuration headers:
24010$config_headers
24011
24012Configuration commands:
24013$config_commands
24014
24015Report bugs to <bug-autoconf@gnu.org>."
4b411bfe 24016
ca81d7a0 24017_ACEOF
c0d27fcc 24018cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
24019ac_cs_version="\\
24020config.status
f053c89f 24021configured by $0, generated by GNU Autoconf 2.61,
ca81d7a0 24022 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24023
040c474e 24024Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24025This config.status script is free software; the Free Software Foundation
24026gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
24027
24028ac_pwd='$ac_pwd'
24029srcdir='$srcdir'
24030INSTALL='$INSTALL'
c0d27fcc 24031_ACEOF
503d2be0 24032
c0d27fcc 24033cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24034# If no file are specified by the user, then we need to provide default
24035# value. By we need to know if files were specified by the user.
24036ac_need_defaults=:
24037while test $# != 0
ba4481b5 24038do
503d2be0
AS
24039 case $1 in
24040 --*=*)
ca81d7a0
JD
24041 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24042 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24043 ac_shift=:
24044 ;;
ca81d7a0 24045 *)
6bae0ccf
DL
24046 ac_option=$1
24047 ac_optarg=$2
24048 ac_shift=shift
503d2be0 24049 ;;
503d2be0
AS
24050 esac
24051
6bae0ccf 24052 case $ac_option in
503d2be0 24053 # Handling of the options.
19650fd6
AS
24054 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24055 ac_cs_recheck=: ;;
ca81d7a0
JD
24056 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24057 echo "$ac_cs_version"; exit ;;
24058 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24059 debug=: ;;
24060 --file | --fil | --fi | --f )
6bae0ccf
DL
24061 $ac_shift
24062 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24063 ac_need_defaults=false;;
24064 --header | --heade | --head | --hea )
6bae0ccf
DL
24065 $ac_shift
24066 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24067 ac_need_defaults=false;;
ca81d7a0
JD
24068 --he | --h)
24069 # Conflict between --help and --header
24070 { echo "$as_me: error: ambiguous option: $1
24071Try \`$0 --help' for more information." >&2
24072 { (exit 1); exit 1; }; };;
24073 --help | --hel | -h )
24074 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
24075 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24076 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24077 ac_cs_silent=: ;;
503d2be0
AS
24078
24079 # This is an error.
ca81d7a0
JD
24080 -*) { echo "$as_me: error: unrecognized option: $1
24081Try \`$0 --help' for more information." >&2
503d2be0
AS
24082 { (exit 1); exit 1; }; } ;;
24083
ca81d7a0
JD
24084 *) ac_config_targets="$ac_config_targets $1"
24085 ac_need_defaults=false ;;
503d2be0 24086
ba4481b5 24087 esac
503d2be0 24088 shift
ba4481b5
DL
24089done
24090
19650fd6
AS
24091ac_configure_extra_args=
24092
24093if $ac_cs_silent; then
24094 exec 6>/dev/null
24095 ac_configure_extra_args="$ac_configure_extra_args --silent"
24096fi
24097
24098_ACEOF
24099cat >>$CONFIG_STATUS <<_ACEOF
24100if \$ac_cs_recheck; then
ca81d7a0
JD
24101 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24102 CONFIG_SHELL=$SHELL
24103 export CONFIG_SHELL
24104 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
24105fi
24106
503d2be0 24107_ACEOF
ca81d7a0
JD
24108cat >>$CONFIG_STATUS <<\_ACEOF
24109exec 5>>config.log
24110{
24111 echo
24112 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24113## Running $as_me. ##
24114_ASBOX
24115 echo "$ac_log"
24116} >&5
ba4481b5 24117
ca81d7a0 24118_ACEOF
c0d27fcc 24119cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24120#
ca81d7a0 24121# INIT-COMMANDS
503d2be0 24122#
503d2be0
AS
24123GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
24124
c0d27fcc
MR
24125_ACEOF
24126
4b411bfe 24127cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
24128
24129# Handling of arguments.
503d2be0
AS
24130for ac_config_target in $ac_config_targets
24131do
ca81d7a0
JD
24132 case $ac_config_target in
24133 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
24134 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24135 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
24136 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
24137 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
24138 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
24139 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
24140 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
24141 "lispref/Makefile") CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
24142 "lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
24143 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
24144 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24145
c0d27fcc 24146 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
24147echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24148 { (exit 1); exit 1; }; };;
24149 esac
ba4481b5 24150done
503d2be0 24151
ca81d7a0 24152
503d2be0
AS
24153# If the user did not use the arguments to specify the items to instantiate,
24154# then the envvar interface is used. Set only those that are not.
24155# We use the long form for the default assignment because of an extremely
24156# bizarre bug on SunOS 4.1.3.
24157if $ac_need_defaults; then
24158 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24159 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24160 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 24161fi
503d2be0 24162
19650fd6 24163# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 24164# simply because there is no reason against having it here, and in addition,
19650fd6 24165# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
24166# Hook for its removal unless debugging.
24167# Note that there is a small window in which the directory will not be cleaned:
24168# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
24169$debug ||
24170{
ca81d7a0
JD
24171 tmp=
24172 trap 'exit_status=$?
24173 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24174' 0
503d2be0
AS
24175 trap '{ (exit 1); exit 1; }' 1 2 13 15
24176}
503d2be0 24177# Create a (secure) tmp directory for tmp files.
19650fd6 24178
503d2be0 24179{
ca81d7a0 24180 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
24181 test -n "$tmp" && test -d "$tmp"
24182} ||
24183{
ca81d7a0
JD
24184 tmp=./conf$$-$RANDOM
24185 (umask 077 && mkdir "$tmp")
503d2be0
AS
24186} ||
24187{
19650fd6 24188 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
24189 { (exit 1); exit 1; }
24190}
24191
503d2be0 24192#
ca81d7a0 24193# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
24194#
24195
24196# No need to generate the scripts if there are no CONFIG_FILES.
24197# This happens for instance when ./config.status config.h
ca81d7a0
JD
24198if test -n "$CONFIG_FILES"; then
24199
24200_ACEOF
24201
24202
24203
24204ac_delim='%!_!# '
24205for ac_last_try in false false false false false :; do
24206 cat >conf$$subs.sed <<_ACEOF
24207SHELL!$SHELL$ac_delim
24208PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24209PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24210PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24211PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24212PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24213PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24214exec_prefix!$exec_prefix$ac_delim
24215prefix!$prefix$ac_delim
24216program_transform_name!$program_transform_name$ac_delim
24217bindir!$bindir$ac_delim
24218sbindir!$sbindir$ac_delim
24219libexecdir!$libexecdir$ac_delim
24220datarootdir!$datarootdir$ac_delim
24221datadir!$datadir$ac_delim
24222sysconfdir!$sysconfdir$ac_delim
24223sharedstatedir!$sharedstatedir$ac_delim
24224localstatedir!$localstatedir$ac_delim
24225includedir!$includedir$ac_delim
24226oldincludedir!$oldincludedir$ac_delim
24227docdir!$docdir$ac_delim
24228infodir!$infodir$ac_delim
24229htmldir!$htmldir$ac_delim
24230dvidir!$dvidir$ac_delim
24231pdfdir!$pdfdir$ac_delim
24232psdir!$psdir$ac_delim
24233libdir!$libdir$ac_delim
24234localedir!$localedir$ac_delim
24235mandir!$mandir$ac_delim
24236DEFS!$DEFS$ac_delim
24237ECHO_C!$ECHO_C$ac_delim
24238ECHO_N!$ECHO_N$ac_delim
24239ECHO_T!$ECHO_T$ac_delim
24240LIBS!$LIBS$ac_delim
24241build_alias!$build_alias$ac_delim
24242host_alias!$host_alias$ac_delim
24243target_alias!$target_alias$ac_delim
24244MAINT!$MAINT$ac_delim
24245build!$build$ac_delim
24246build_cpu!$build_cpu$ac_delim
24247build_vendor!$build_vendor$ac_delim
24248build_os!$build_os$ac_delim
24249host!$host$ac_delim
24250host_cpu!$host_cpu$ac_delim
24251host_vendor!$host_vendor$ac_delim
24252host_os!$host_os$ac_delim
24253CC!$CC$ac_delim
24254CFLAGS!$CFLAGS$ac_delim
24255LDFLAGS!$LDFLAGS$ac_delim
24256CPPFLAGS!$CPPFLAGS$ac_delim
24257ac_ct_CC!$ac_ct_CC$ac_delim
24258EXEEXT!$EXEEXT$ac_delim
24259OBJEXT!$OBJEXT$ac_delim
24260CPP!$CPP$ac_delim
24261GREP!$GREP$ac_delim
24262EGREP!$EGREP$ac_delim
24263LN_S!$LN_S$ac_delim
24264INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24265INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24266INSTALL_DATA!$INSTALL_DATA$ac_delim
24267RANLIB!$RANLIB$ac_delim
24268INSTALL_INFO!$INSTALL_INFO$ac_delim
24269GZIP_PROG!$GZIP_PROG$ac_delim
24270LIBSOUND!$LIBSOUND$ac_delim
24271PKG_CONFIG!$PKG_CONFIG$ac_delim
24272ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
24273ALSA_LIBS!$ALSA_LIBS$ac_delim
24274CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
24275SET_MAKE!$SET_MAKE$ac_delim
24276XMKMF!$XMKMF$ac_delim
cfe440b8 24277HAVE_XSERVER!$HAVE_XSERVER$ac_delim
ca81d7a0
JD
24278GTK_CFLAGS!$GTK_CFLAGS$ac_delim
24279GTK_LIBS!$GTK_LIBS$ac_delim
9d89ffd0
JD
24280XFT_CFLAGS!$XFT_CFLAGS$ac_delim
24281XFT_LIBS!$XFT_LIBS$ac_delim
ca81d7a0
JD
24282ALLOCA!$ALLOCA$ac_delim
24283liblockfile!$liblockfile$ac_delim
24284LIBOBJS!$LIBOBJS$ac_delim
24285NEED_SETGID!$NEED_SETGID$ac_delim
24286KMEM_GROUP!$KMEM_GROUP$ac_delim
24287GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
24288GETOPT_H!$GETOPT_H$ac_delim
24289GETOPTOBJS!$GETOPTOBJS$ac_delim
24290version!$version$ac_delim
24291configuration!$configuration$ac_delim
24292canonical!$canonical$ac_delim
24293srcdir!$srcdir$ac_delim
24294lispdir!$lispdir$ac_delim
24295locallisppath!$locallisppath$ac_delim
24296lisppath!$lisppath$ac_delim
24297x_default_search_path!$x_default_search_path$ac_delim
24298etcdir!$etcdir$ac_delim
24299archlibdir!$archlibdir$ac_delim
24300bitmapdir!$bitmapdir$ac_delim
24301gamedir!$gamedir$ac_delim
24302gameuser!$gameuser$ac_delim
24303c_switch_system!$c_switch_system$ac_delim
ca81d7a0
JD
24304_ACEOF
24305
24306 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24307 break
24308 elif $ac_last_try; then
24309 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24310echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24311 { (exit 1); exit 1; }; }
24312 else
24313 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8eeae1c9 24314 fi
ca81d7a0
JD
24315done
24316
24317ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24318if test -n "$ac_eof"; then
24319 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24320 ac_eof=`expr $ac_eof + 1`
24321fi
24322
24323cat >>$CONFIG_STATUS <<_ACEOF
24324cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24325/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24326_ACEOF
24327sed '
24328s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24329s/^/s,@/; s/!/@,|#_!!_#|/
24330:n
24331t n
24332s/'"$ac_delim"'$/,g/; t
24333s/$/\\/; p
24334N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24335' >>$CONFIG_STATUS <conf$$subs.sed
24336rm -f conf$$subs.sed
24337cat >>$CONFIG_STATUS <<_ACEOF
24338CEOF$ac_eof
24339_ACEOF
24340
24341
24342ac_delim='%!_!# '
24343for ac_last_try in false false false false false :; do
24344 cat >conf$$subs.sed <<_ACEOF
cfe440b8 24345c_switch_machine!$c_switch_machine$ac_delim
9d89ffd0
JD
24346LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
24347LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
ca81d7a0
JD
24348C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
24349X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
24350machfile!$machfile$ac_delim
24351opsysfile!$opsysfile$ac_delim
24352carbon_appdir!$carbon_appdir$ac_delim
24353LTLIBOBJS!$LTLIBOBJS$ac_delim
24354_ACEOF
24355
cfe440b8 24356 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 9; then
ca81d7a0
JD
24357 break
24358 elif $ac_last_try; then
24359 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24360echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24361 { (exit 1); exit 1; }; }
24362 else
24363 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24364 fi
24365done
24366
24367ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24368if test -n "$ac_eof"; then
24369 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24370 ac_eof=`expr $ac_eof + 1`
24371fi
8eeae1c9 24372
ca81d7a0
JD
24373cat >>$CONFIG_STATUS <<_ACEOF
24374cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24375/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24376_ACEOF
24377sed '
24378s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24379s/^/s,@/; s/!/@,|#_!!_#|/
24380:n
24381t n
24382s/'"$ac_delim"'$/,g/; t
24383s/$/\\/; p
24384N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24385' >>$CONFIG_STATUS <conf$$subs.sed
24386rm -f conf$$subs.sed
24387cat >>$CONFIG_STATUS <<_ACEOF
24388:end
24389s/|#_!!_#|//g
24390CEOF$ac_eof
c0d27fcc 24391_ACEOF
ca81d7a0
JD
24392
24393
24394# VPATH may cause trouble with some makes, so we remove $(srcdir),
24395# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24396# trailing colons and then remove the whole line if VPATH becomes empty
24397# (actually we leave an empty line to preserve line numbers).
24398if test "x$srcdir" = x.; then
24399 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24400s/:*\$(srcdir):*/:/
24401s/:*\${srcdir}:*/:/
24402s/:*@srcdir@:*/:/
24403s/^\([^=]*=[ ]*\):*/\1/
24404s/:*$//
24405s/^[^=]*=[ ]*$//
24406}'
24407fi
24408
c0d27fcc 24409cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
24410fi # test -n "$CONFIG_FILES"
24411
24412
24413for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
24414do
24415 case $ac_tag in
24416 :[FHLC]) ac_mode=$ac_tag; continue;;
24417 esac
24418 case $ac_mode$ac_tag in
24419 :[FHL]*:*);;
24420 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24421echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24422 { (exit 1); exit 1; }; };;
24423 :[FH]-) ac_tag=-:-;;
24424 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24425 esac
24426 ac_save_IFS=$IFS
24427 IFS=:
24428 set x $ac_tag
24429 IFS=$ac_save_IFS
24430 shift
24431 ac_file=$1
24432 shift
24433
24434 case $ac_mode in
24435 :L) ac_source=$1;;
24436 :[FH])
24437 ac_file_inputs=
24438 for ac_f
24439 do
24440 case $ac_f in
24441 -) ac_f="$tmp/stdin";;
24442 *) # Look for the file first in the build tree, then in the source tree
24443 # (if the path is not absolute). The absolute path cannot be DOS-style,
24444 # because $ac_f cannot contain `:'.
24445 test -f "$ac_f" ||
24446 case $ac_f in
24447 [\\/$]*) false;;
24448 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24449 esac ||
24450 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24451echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24452 { (exit 1); exit 1; }; };;
24453 esac
24454 ac_file_inputs="$ac_file_inputs $ac_f"
24455 done
24456
24457 # Let's still pretend it is `configure' which instantiates (i.e., don't
24458 # use $as_me), people would be surprised to read:
24459 # /* config.h. Generated by config.status. */
24460 configure_input="Generated from "`IFS=:
24461 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24462 if test x"$ac_file" != x-; then
24463 configure_input="$ac_file. $configure_input"
24464 { echo "$as_me:$LINENO: creating $ac_file" >&5
24465echo "$as_me: creating $ac_file" >&6;}
24466 fi
24467
24468 case $ac_tag in
24469 *:-:* | *:-) cat >"$tmp/stdin";;
24470 esac
24471 ;;
ba4481b5
DL
24472 esac
24473
ca81d7a0 24474 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 24475$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24476 X"$ac_file" : 'X\(//\)[^/]' \| \
24477 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 24478 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 24479echo X"$ac_file" |
ca81d7a0
JD
24480 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24481 s//\1/
24482 q
24483 }
24484 /^X\(\/\/\)[^/].*/{
24485 s//\1/
24486 q
24487 }
24488 /^X\(\/\/\)$/{
24489 s//\1/
24490 q
24491 }
24492 /^X\(\/\).*/{
24493 s//\1/
24494 q
24495 }
24496 s/.*/./; q'`
24497 { as_dir="$ac_dir"
24498 case $as_dir in #(
24499 -*) as_dir=./$as_dir;;
24500 esac
24501 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 24502 as_dirs=
ca81d7a0
JD
24503 while :; do
24504 case $as_dir in #(
24505 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24506 *) as_qdir=$as_dir;;
24507 esac
24508 as_dirs="'$as_qdir' $as_dirs"
24509 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 24510$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24511 X"$as_dir" : 'X\(//\)[^/]' \| \
24512 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 24513 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 24514echo X"$as_dir" |
ca81d7a0
JD
24515 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24516 s//\1/
24517 q
24518 }
24519 /^X\(\/\/\)[^/].*/{
24520 s//\1/
24521 q
24522 }
24523 /^X\(\/\/\)$/{
24524 s//\1/
24525 q
24526 }
24527 /^X\(\/\).*/{
24528 s//\1/
24529 q
24530 }
24531 s/.*/./; q'`
24532 test -d "$as_dir" && break
6bae0ccf 24533 done
ca81d7a0
JD
24534 test -z "$as_dirs" || eval "mkdir $as_dirs"
24535 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24536echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 24537 { (exit 1); exit 1; }; }; }
c0d27fcc 24538 ac_builddir=.
98418dba 24539
ca81d7a0
JD
24540case "$ac_dir" in
24541.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24542*)
c0d27fcc 24543 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
24544 # A ".." for each directory in $ac_dir_suffix.
24545 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24546 case $ac_top_builddir_sub in
24547 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24548 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24549 esac ;;
24550esac
24551ac_abs_top_builddir=$ac_pwd
24552ac_abs_builddir=$ac_pwd$ac_dir_suffix
24553# for backward compatibility:
24554ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
24555
24556case $srcdir in
ca81d7a0 24557 .) # We are building in place.
c0d27fcc 24558 ac_srcdir=.
ca81d7a0
JD
24559 ac_top_srcdir=$ac_top_builddir_sub
24560 ac_abs_top_srcdir=$ac_pwd ;;
24561 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 24562 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
24563 ac_top_srcdir=$srcdir
24564 ac_abs_top_srcdir=$srcdir ;;
24565 *) # Relative name.
24566 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24567 ac_top_srcdir=$ac_top_build_prefix$srcdir
24568 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 24569esac
ca81d7a0 24570ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 24571
c0d27fcc 24572
ca81d7a0
JD
24573 case $ac_mode in
24574 :F)
24575 #
24576 # CONFIG_FILE
24577 #
ba4481b5 24578
503d2be0
AS
24579 case $INSTALL in
24580 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 24581 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 24582 esac
ca81d7a0 24583_ACEOF
ba4481b5 24584
ca81d7a0
JD
24585cat >>$CONFIG_STATUS <<\_ACEOF
24586# If the template does not know about datarootdir, expand it.
24587# FIXME: This hack should be removed a few years after 2.60.
24588ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 24589
ca81d7a0
JD
24590case `sed -n '/datarootdir/ {
24591 p
24592 q
24593}
24594/@datadir@/p
24595/@docdir@/p
24596/@infodir@/p
24597/@localedir@/p
24598/@mandir@/p
24599' $ac_file_inputs` in
24600*datarootdir*) ac_datarootdir_seen=yes;;
24601*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24602 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24603echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 24604_ACEOF
ca81d7a0
JD
24605cat >>$CONFIG_STATUS <<_ACEOF
24606 ac_datarootdir_hack='
24607 s&@datadir@&$datadir&g
24608 s&@docdir@&$docdir&g
24609 s&@infodir@&$infodir&g
24610 s&@localedir@&$localedir&g
24611 s&@mandir@&$mandir&g
24612 s&\\\${datarootdir}&$datarootdir&g' ;;
24613esac
24614_ACEOF
24615
24616# Neutralize VPATH when `$srcdir' = `.'.
24617# Shell code in configure.ac might set extrasub.
24618# FIXME: do we really want to maintain this feature?
c0d27fcc 24619cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
24620 sed "$ac_vpsub
24621$extrasub
c0d27fcc
MR
24622_ACEOF
24623cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24624:t
24625/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ca81d7a0
JD
24626s&@configure_input@&$configure_input&;t t
24627s&@top_builddir@&$ac_top_builddir_sub&;t t
24628s&@srcdir@&$ac_srcdir&;t t
24629s&@abs_srcdir@&$ac_abs_srcdir&;t t
24630s&@top_srcdir@&$ac_top_srcdir&;t t
24631s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24632s&@builddir@&$ac_builddir&;t t
24633s&@abs_builddir@&$ac_abs_builddir&;t t
24634s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24635s&@INSTALL@&$ac_INSTALL&;t t
24636$ac_datarootdir_hack
24637" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
24638
24639test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24640 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24641 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24642 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24643which seems to be undefined. Please make sure it is defined." >&5
24644echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24645which seems to be undefined. Please make sure it is defined." >&2;}
24646
24647 rm -f "$tmp/stdin"
503d2be0 24648 case $ac_file in
ca81d7a0
JD
24649 -) cat "$tmp/out"; rm -f "$tmp/out";;
24650 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 24651 esac
ca81d7a0
JD
24652 ;;
24653 :H)
24654 #
24655 # CONFIG_HEADER
24656 #
24657_ACEOF
24658
24659# Transform confdefs.h into a sed script `conftest.defines', that
24660# substitutes the proper values into config.h.in to produce config.h.
24661rm -f conftest.defines conftest.tail
24662# First, append a space to every undef/define line, to ease matching.
24663echo 's/$/ /' >conftest.defines
24664# Then, protect against being on the right side of a sed subst, or in
24665# an unquoted here document, in config.status. If some macros were
24666# called several times there might be several #defines for the same
24667# symbol, which is useless. But do not sort them, since the last
24668# AC_DEFINE must be honored.
24669ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24670# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
24671# NAME is the cpp macro being defined, VALUE is the value it is being given.
24672# PARAMS is the parameter list in the macro definition--in most cases, it's
24673# just an empty string.
24674ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
24675ac_dB='\\)[ (].*,\\1define\\2'
24676ac_dC=' '
24677ac_dD=' ,'
24678
24679uniq confdefs.h |
24680 sed -n '
24681 t rset
24682 :rset
24683 s/^[ ]*#[ ]*define[ ][ ]*//
24684 t ok
24685 d
24686 :ok
24687 s/[\\&,]/\\&/g
24688 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
24689 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
24690 ' >>conftest.defines
24691
24692# Remove the space that was appended to ease matching.
24693# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
24694# example, in the case of _POSIX_SOURCE, which is predefined and required
24695# on some systems where configure will not decide to define it.
ca81d7a0
JD
24696# (The regexp can be short, since the line contains either #define or #undef.)
24697echo 's/ $//
24698s,^[ #]*u.*,/* & */,' >>conftest.defines
24699
24700# Break up conftest.defines:
24701ac_max_sed_lines=50
24702
24703# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
24704# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
24705# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
24706# et cetera.
24707ac_in='$ac_file_inputs'
24708ac_out='"$tmp/out1"'
24709ac_nxt='"$tmp/out2"'
24710
24711while :
503d2be0 24712do
ca81d7a0
JD
24713 # Write a here document:
24714 cat >>$CONFIG_STATUS <<_ACEOF
24715 # First, check the format of the line:
24716 cat >"\$tmp/defines.sed" <<\\CEOF
24717/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
24718/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
24719b
24720:def
24721_ACEOF
24722 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 24723 echo 'CEOF
ca81d7a0
JD
24724 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
24725 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
24726 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
24727 grep . conftest.tail >/dev/null || break
503d2be0
AS
24728 rm -f conftest.defines
24729 mv conftest.tail conftest.defines
24730done
ca81d7a0 24731rm -f conftest.defines conftest.tail
503d2be0 24732
ca81d7a0 24733echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 24734cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 24735 if test x"$ac_file" != x-; then
ca81d7a0
JD
24736 echo "/* $configure_input */" >"$tmp/config.h"
24737 cat "$ac_result" >>"$tmp/config.h"
24738 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 24739 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
24740echo "$as_me: $ac_file is unchanged" >&6;}
24741 else
503d2be0 24742 rm -f $ac_file
ca81d7a0 24743 mv "$tmp/config.h" $ac_file
ba4481b5 24744 fi
503d2be0 24745 else
ca81d7a0
JD
24746 echo "/* $configure_input */"
24747 cat "$ac_result"
ba4481b5 24748 fi
ca81d7a0
JD
24749 rm -f "$tmp/out12"
24750 ;;
4b411bfe 24751
ca81d7a0
JD
24752 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
24753echo "$as_me: executing $ac_file commands" >&6;}
24754 ;;
24755 esac
c0d27fcc 24756
4b411bfe 24757
ca81d7a0
JD
24758 case $ac_file$ac_mode in
24759 "default":C)
ba4481b5
DL
24760
24761### Make the necessary directories, if they don't exist.
24762for dir in etc lisp ; do
24763 test -d ${dir} || mkdir ${dir}
24764done
24765
24766# Build src/Makefile from ${srcdir}/src/Makefile.c
24767# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
24768# This must be done after src/config.h is built, since we rely on that file.
24769
24770# Now get this: Some word that is part of the ${srcdir} directory name
24771# or the ${configuration} value might, just might, happen to be an
24772# identifier like `sun4' or `i386' or something, and be predefined by
24773# the C preprocessor to some helpful value like 1, or maybe the empty
24774# string. Needless to say consequent macro substitutions are less
24775# than conducive to the makefile finding the correct directory.
24776undefs="`echo $top_srcdir $configuration $canonical |
24777sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24778 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
24779`"
24780
24781echo creating src/epaths.h
4aa6b955 24782${MAKE-make} epaths-force
ba4481b5 24783
1c203d4c
DL
24784# As of 2000-11-19, newest development versions of GNU cpp preprocess
24785# `..' to `. .' unless invoked with -traditional
24786
d0e9bfd2 24787if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
24788 CPPFLAGS="$CPPFLAGS -traditional"
24789fi
24790
ba4481b5
DL
24791echo creating lib-src/Makefile
24792( cd lib-src
24793 rm -f junk.c junk1.c junk2.c
24794 sed -e '/start of cpp stuff/q' \
24795 < Makefile.c > junk1.c
24796 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24797 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24798 < Makefile.c > junk.c
503d2be0 24799 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24800 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24801 cat junk1.c junk2.c > Makefile.new
24802 rm -f junk.c junk1.c junk2.c
24803 chmod 444 Makefile.new
24804 mv -f Makefile.new Makefile
24805)
24806
24807echo creating src/Makefile
24808( cd src
24809 rm -f junk.c junk1.c junk2.c
24810 sed -e '/start of cpp stuff/q' \
24811 < Makefile.c > junk1.c
24812 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24813 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24814 < Makefile.c > junk.c
503d2be0 24815 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24816 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24817 cat junk1.c junk2.c > Makefile.new
24818 rm -f junk.c junk1.c junk2.c
24819 chmod 444 Makefile.new
24820 mv -f Makefile.new Makefile
24821)
24822
503d2be0 24823if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 24824 echo creating src/.gdbinit
503d2be0 24825 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
24826fi
24827
24828# This is how we know whether to re-run configure in certain cases.
24829touch src/config.stamp
24830
503d2be0 24831 ;;
ca81d7a0 24832
503d2be0 24833 esac
ca81d7a0 24834done # for ac_tag
503d2be0 24835
ba4481b5 24836
503d2be0 24837{ (exit 0); exit 0; }
c0d27fcc 24838_ACEOF
ba4481b5 24839chmod +x $CONFIG_STATUS
503d2be0
AS
24840ac_clean_files=$ac_clean_files_save
24841
c0d27fcc 24842
503d2be0
AS
24843# configure is writing to config.log, and then calls config.status.
24844# config.status does its own redirection, appending to config.log.
24845# Unfortunately, on DOS this fails, as config.log is still kept open
24846# by configure, so config.status won't be able to write to it; its
24847# output is simply discarded. So we exec the FD to /dev/null,
24848# effectively closing config.log, so it can be properly (re)opened and
24849# appended to by config.status. When coming back to configure, we
24850# need to make the FD available again.
24851if test "$no_create" != yes; then
24852 ac_cs_success=:
19650fd6
AS
24853 ac_config_status_args=
24854 test "$silent" = yes &&
24855 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 24856 exec 5>/dev/null
19650fd6 24857 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
24858 exec 5>>config.log
24859 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24860 # would make configure fail if this is the last instruction.
24861 $ac_cs_success || { (exit 1); exit 1; }
24862fi
f5f47add 24863
c0d27fcc 24864