* image.c (pbm_load): Signal error for invalid image size.
[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") || {
415 echo No shell found that supports shell functions.
416 echo Please tell autoconf@gnu.org about your system,
417 echo including any error possibly output before this
418 echo message
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
686
687CFLAGS_SOUND
688SET_MAKE
689XMKMF
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
1341 --with-gif use -lungif for displaying GIF images
1342 --with-png use -lpng for displaying PNG images
488dd4c4
JD
1343 --with-gtk use GTK (same as --with-x-toolkit=gtk)
1344 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 1345 --without-toolkit-scroll-bars
cc227489
MB
1346 don't use Motif or Xaw3d scroll bars
1347 --without-xim don't use X11 XIM
e0f712ba 1348 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
1349 --with-x use the X Window System
1350
1351Some influential environment variables:
1352 CC C compiler command
1353 CFLAGS C compiler flags
1354 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1355 nonstandard directory <lib dir>
f053c89f 1356 LIBS libraries to pass to the linker, e.g. -l<library>
ca81d7a0
JD
1357 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1358 you have headers in a nonstandard directory <include dir>
503d2be0 1359 CPP C preprocessor
ca81d7a0 1360 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1361
1362Use these variables to override the choices made by `configure' or to help
1363it to find libraries and programs with nonstandard names/locations.
1364
c0d27fcc 1365_ACEOF
ca81d7a0 1366ac_status=$?
503d2be0
AS
1367fi
1368
1369if test "$ac_init_help" = "recursive"; then
1370 # If there are subdirs, report their specific --help.
c0d27fcc 1371 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
ca81d7a0 1372 test -d "$ac_dir" || continue
c0d27fcc
MR
1373 ac_builddir=.
1374
ca81d7a0
JD
1375case "$ac_dir" in
1376.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1377*)
c0d27fcc 1378 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
1379 # A ".." for each directory in $ac_dir_suffix.
1380 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1381 case $ac_top_builddir_sub in
1382 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1383 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1384 esac ;;
1385esac
1386ac_abs_top_builddir=$ac_pwd
1387ac_abs_builddir=$ac_pwd$ac_dir_suffix
1388# for backward compatibility:
1389ac_top_builddir=$ac_top_build_prefix
503d2be0 1390
c0d27fcc 1391case $srcdir in
ca81d7a0 1392 .) # We are building in place.
c0d27fcc 1393 ac_srcdir=.
ca81d7a0
JD
1394 ac_top_srcdir=$ac_top_builddir_sub
1395 ac_abs_top_srcdir=$ac_pwd ;;
1396 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1397 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1398 ac_top_srcdir=$srcdir
1399 ac_abs_top_srcdir=$srcdir ;;
1400 *) # Relative name.
1401 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1402 ac_top_srcdir=$ac_top_build_prefix$srcdir
1403 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1404esac
ca81d7a0
JD
1405ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1406
1407 cd "$ac_dir" || { ac_status=$?; continue; }
1408 # Check for guested configure.
1409 if test -f "$ac_srcdir/configure.gnu"; then
1410 echo &&
1411 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1412 elif test -f "$ac_srcdir/configure"; then
1413 echo &&
1414 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1415 else
c0d27fcc 1416 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1417 fi || ac_status=$?
1418 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1419 done
1420fi
1421
ca81d7a0 1422test -n "$ac_init_help" && exit $ac_status
503d2be0 1423if $ac_init_version; then
c0d27fcc 1424 cat <<\_ACEOF
ca81d7a0 1425configure
f053c89f 1426generated by GNU Autoconf 2.61
503d2be0 1427
ca81d7a0 1428Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
040c474e 14292002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1430This configure script is free software; the Free Software Foundation
1431gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1432_ACEOF
ca81d7a0 1433 exit
503d2be0 1434fi
ca81d7a0 1435cat >config.log <<_ACEOF
503d2be0
AS
1436This file contains any messages produced by compilers while
1437running configure, to aid debugging if configure makes a mistake.
1438
1439It was created by $as_me, which was
f053c89f 1440generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1441
1442 $ $0 $@
1443
c0d27fcc 1444_ACEOF
ca81d7a0 1445exec 5>>config.log
503d2be0
AS
1446{
1447cat <<_ASUNAME
c0d27fcc
MR
1448## --------- ##
1449## Platform. ##
1450## --------- ##
503d2be0
AS
1451
1452hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1453uname -m = `(uname -m) 2>/dev/null || echo unknown`
1454uname -r = `(uname -r) 2>/dev/null || echo unknown`
1455uname -s = `(uname -s) 2>/dev/null || echo unknown`
1456uname -v = `(uname -v) 2>/dev/null || echo unknown`
1457
1458/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1459/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1460
1461/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1462/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1463/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ca81d7a0 1464/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1465/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1466/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1467/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1468
925c2f3f 1469_ASUNAME
c0d27fcc
MR
1470
1471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1472for as_dir in $PATH
1473do
1474 IFS=$as_save_IFS
1475 test -z "$as_dir" && as_dir=.
1476 echo "PATH: $as_dir"
1477done
ca81d7a0 1478IFS=$as_save_IFS
c0d27fcc 1479
503d2be0
AS
1480} >&5
1481
c0d27fcc
MR
1482cat >&5 <<_ACEOF
1483
1484
1485## ----------- ##
1486## Core tests. ##
1487## ----------- ##
1488
1489_ACEOF
503d2be0 1490
503d2be0
AS
1491
1492# Keep a trace of the command line.
1493# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1494# Strip out --silent because we don't want to record it for future runs.
503d2be0 1495# Also quote any args containing shell meta-characters.
19650fd6 1496# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1497ac_configure_args=
19650fd6
AS
1498ac_configure_args0=
1499ac_configure_args1=
19650fd6
AS
1500ac_must_keep_next=false
1501for ac_pass in 1 2
503d2be0 1502do
19650fd6
AS
1503 for ac_arg
1504 do
1505 case $ac_arg in
1506 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1507 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1508 | -silent | --silent | --silen | --sile | --sil)
1509 continue ;;
ca81d7a0 1510 *\'*)
19650fd6
AS
1511 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1512 esac
1513 case $ac_pass in
1514 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1515 2)
1516 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1517 if test $ac_must_keep_next = true; then
edfaf76d 1518 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1519 else
edfaf76d
LK
1520 case $ac_arg in
1521 *=* | --config-cache | -C | -disable-* | --disable-* \
1522 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1523 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1524 | -with-* | --with-* | -without-* | --without-* | --x)
1525 case "$ac_configure_args0 " in
1526 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1527 esac
1528 ;;
1529 -* ) ac_must_keep_next=true ;;
1530 esac
19650fd6 1531 fi
ca81d7a0 1532 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1533 ;;
1534 esac
1535 done
503d2be0 1536done
19650fd6
AS
1537$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1538$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1539
1540# When interrupted or exit'd, cleanup temporary files, and complete
1541# config.log. We remove comments because anyway the quotes in there
1542# would cause problems or look ugly.
ca81d7a0
JD
1543# WARNING: Use '\'' to represent an apostrophe within the trap.
1544# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1545trap 'exit_status=$?
1546 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1547 {
1548 echo
6bae0ccf 1549
c0d27fcc
MR
1550 cat <<\_ASBOX
1551## ---------------- ##
1552## Cache variables. ##
1553## ---------------- ##
1554_ASBOX
1555 echo
1556 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
1557(
1558 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1559 eval ac_val=\$$ac_var
1560 case $ac_val in #(
1561 *${as_nl}*)
1562 case $ac_var in #(
1563 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1564echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1565 esac
1566 case $ac_var in #(
1567 _ | IFS | as_nl) ;; #(
1568 *) $as_unset $ac_var ;;
1569 esac ;;
1570 esac
1571 done
503d2be0 1572 (set) 2>&1 |
ca81d7a0
JD
1573 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1574 *${as_nl}ac_space=\ *)
503d2be0 1575 sed -n \
ca81d7a0
JD
1576 "s/'\''/'\''\\\\'\'''\''/g;
1577 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1578 ;; #(
503d2be0 1579 *)
ca81d7a0 1580 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1581 ;;
ca81d7a0
JD
1582 esac |
1583 sort
1584)
c0d27fcc 1585 echo
6bae0ccf
DL
1586
1587 cat <<\_ASBOX
1588## ----------------- ##
1589## Output variables. ##
1590## ----------------- ##
1591_ASBOX
1592 echo
1593 for ac_var in $ac_subst_vars
1594 do
ca81d7a0
JD
1595 eval ac_val=\$$ac_var
1596 case $ac_val in
1597 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1598 esac
1599 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1600 done | sort
1601 echo
1602
1603 if test -n "$ac_subst_files"; then
1604 cat <<\_ASBOX
ca81d7a0
JD
1605## ------------------- ##
1606## File substitutions. ##
1607## ------------------- ##
6bae0ccf
DL
1608_ASBOX
1609 echo
1610 for ac_var in $ac_subst_files
1611 do
ca81d7a0
JD
1612 eval ac_val=\$$ac_var
1613 case $ac_val in
1614 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1615 esac
1616 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1617 done | sort
1618 echo
1619 fi
1620
c0d27fcc
MR
1621 if test -s confdefs.h; then
1622 cat <<\_ASBOX
1623## ----------- ##
1624## confdefs.h. ##
1625## ----------- ##
1626_ASBOX
1627 echo
ca81d7a0 1628 cat confdefs.h
c0d27fcc
MR
1629 echo
1630 fi
1631 test "$ac_signal" != 0 &&
1632 echo "$as_me: caught signal $ac_signal"
1633 echo "$as_me: exit $exit_status"
1634 } >&5
ca81d7a0
JD
1635 rm -f core *.core core.conftest.* &&
1636 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1637 exit $exit_status
ca81d7a0 1638' 0
503d2be0
AS
1639for ac_signal in 1 2 13 15; do
1640 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1641done
1642ac_signal=0
1643
1644# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 1645rm -f -r conftest* confdefs.h
ba4481b5 1646
c0d27fcc
MR
1647# Predefined preprocessor variables.
1648
1649cat >>confdefs.h <<_ACEOF
1650#define PACKAGE_NAME "$PACKAGE_NAME"
1651_ACEOF
1652
1653
1654cat >>confdefs.h <<_ACEOF
1655#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1656_ACEOF
1657
1658
1659cat >>confdefs.h <<_ACEOF
1660#define PACKAGE_VERSION "$PACKAGE_VERSION"
1661_ACEOF
1662
1663
1664cat >>confdefs.h <<_ACEOF
1665#define PACKAGE_STRING "$PACKAGE_STRING"
1666_ACEOF
1667
1668
1669cat >>confdefs.h <<_ACEOF
1670#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1671_ACEOF
1672
1673
503d2be0 1674# Let the site file select an alternate cache file if it wants to.
ba4481b5 1675# Prefer explicitly selected file to automatically selected ones.
ca81d7a0
JD
1676if test -n "$CONFIG_SITE"; then
1677 set x "$CONFIG_SITE"
1678elif test "x$prefix" != xNONE; then
1679 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1680else
1681 set x "$ac_default_prefix/share/config.site" \
1682 "$ac_default_prefix/etc/config.site"
ba4481b5 1683fi
ca81d7a0
JD
1684shift
1685for ac_site_file
1686do
ba4481b5 1687 if test -r "$ac_site_file"; then
c0d27fcc 1688 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1689echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1690 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1691 . "$ac_site_file"
1692 fi
1693done
1694
1695if test -r "$cache_file"; then
503d2be0
AS
1696 # Some versions of bash will fail to source /dev/null (special
1697 # files actually), so we avoid doing that.
1698 if test -f "$cache_file"; then
c0d27fcc 1699 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1700echo "$as_me: loading cache $cache_file" >&6;}
1701 case $cache_file in
ca81d7a0
JD
1702 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1703 *) . "./$cache_file";;
503d2be0
AS
1704 esac
1705 fi
ba4481b5 1706else
c0d27fcc 1707 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1708echo "$as_me: creating cache $cache_file" >&6;}
1709 >$cache_file
1710fi
1711
f053c89f
CY
1712ac_header_list="$ac_header_list sys/time.h"
1713ac_header_list="$ac_header_list unistd.h"
1714ac_func_list="$ac_func_list alarm"
503d2be0
AS
1715# Check that the precious variables saved in the cache have kept the same
1716# value.
1717ac_cache_corrupted=false
ca81d7a0 1718for ac_var in $ac_precious_vars; do
503d2be0
AS
1719 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1720 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
1721 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1722 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1723 case $ac_old_set,$ac_new_set in
1724 set,)
c0d27fcc 1725 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1726echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1727 ac_cache_corrupted=: ;;
1728 ,set)
c0d27fcc 1729 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1730echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1731 ac_cache_corrupted=: ;;
1732 ,);;
1733 *)
1734 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1735 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1736echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1737 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1738echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1739 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1740echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1741 ac_cache_corrupted=:
503d2be0
AS
1742 fi;;
1743 esac
c0d27fcc 1744 # Pass precious variables to config.status.
503d2be0
AS
1745 if test "$ac_new_set" = set; then
1746 case $ac_new_val in
ca81d7a0 1747 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1748 *) ac_arg=$ac_var=$ac_new_val ;;
1749 esac
1750 case " $ac_configure_args " in
1751 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1752 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1753 esac
1754 fi
1755done
1756if $ac_cache_corrupted; then
c0d27fcc 1757 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1758echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1759 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1760echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1761 { (exit 1); exit 1; }; }
ba4481b5
DL
1762fi
1763
c0d27fcc
MR
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
ba4481b5 1779
ca81d7a0
JD
1780ac_ext=c
1781ac_cpp='$CPP $CPPFLAGS'
1782ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1783ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1784ac_compiler_gnu=$ac_cv_c_compiler_gnu
6bae0ccf 1785
4b411bfe 1786
ca81d7a0 1787ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1788
c0d27fcc 1789
ba5da88a 1790test "$program_prefix" != NONE &&
ca81d7a0 1791 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1792# Use a double $ so make ignores it.
1793test "$program_suffix" != NONE &&
ca81d7a0 1794 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1795# Double any \ or $. echo might interpret backslashes.
1796# By default was `s,x,x', remove it if useless.
1797cat <<\_ACEOF >conftest.sed
1798s/[\\$]/&&/g;s/;s,x,x,$//
1799_ACEOF
1800program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
ca81d7a0 1801rm -f conftest.sed
ba5da88a 1802
c0d27fcc 1803
ba4481b5
DL
1804lispdir='${datadir}/emacs/${version}/lisp'
1805locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1806'${datadir}/emacs/site-lisp'
1807lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1808etcdir='${datadir}/emacs/${version}/etc'
1809archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1810docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1811gamedir='${localstatedir}/games/emacs'
98418dba
CW
1812
1813gameuser=games
1814
c0d27fcc 1815
ca81d7a0 1816# Check whether --with-gcc was given.
ba4481b5 1817if test "${with_gcc+set}" = set; then
ca81d7a0
JD
1818 withval=$with_gcc;
1819fi
503d2be0 1820
ba4481b5 1821
ca81d7a0 1822# Check whether --with-pop was given.
ba4481b5 1823if test "${with_pop+set}" = set; then
ca81d7a0 1824 withval=$with_pop; if test "$withval" = yes; then
c0d27fcc 1825 cat >>confdefs.h <<\_ACEOF
ba4481b5 1826#define MAIL_USE_POP 1
c0d27fcc 1827_ACEOF
ba4481b5 1828
243cf185
DL
1829else :
1830fi
3d9fec71 1831else
c0d27fcc 1832 cat >>confdefs.h <<\_ACEOF
3d9fec71 1833#define MAIL_USE_POP 1
c0d27fcc 1834_ACEOF
3d9fec71 1835
ca81d7a0
JD
1836fi
1837
ba4481b5 1838
c0d27fcc 1839
ca81d7a0 1840# Check whether --with-kerberos was given.
a21616bd 1841if test "${with_kerberos+set}" = set; then
ca81d7a0 1842 withval=$with_kerberos; cat >>confdefs.h <<\_ACEOF
a21616bd 1843#define KERBEROS 1
c0d27fcc 1844_ACEOF
a21616bd 1845
ca81d7a0
JD
1846fi
1847
a21616bd 1848
c0d27fcc 1849
ca81d7a0 1850# Check whether --with-kerberos5 was given.
a21616bd 1851if test "${with_kerberos5+set}" = set; then
ca81d7a0 1852 withval=$with_kerberos5; if test "${with_kerberos5+set}" = set; then
a21616bd
KR
1853 if test "${with_kerberos+set}" != set; then
1854 with_kerberos=yes
c0d27fcc 1855 cat >>confdefs.h <<\_ACEOF
a21616bd 1856#define KERBEROS 1
c0d27fcc 1857_ACEOF
a21616bd
KR
1858
1859 fi
1860fi
b936fae4 1861
c0d27fcc 1862cat >>confdefs.h <<\_ACEOF
a21616bd 1863#define KERBEROS5 1
c0d27fcc 1864_ACEOF
a21616bd 1865
ca81d7a0 1866fi
b936fae4 1867
4b411bfe 1868
ca81d7a0
JD
1869# Check whether --with-hesiod was given.
1870if test "${with_hesiod+set}" = set; then
1871 withval=$with_hesiod;
c0d27fcc 1872cat >>confdefs.h <<\_ACEOF
ba4481b5 1873#define HESIOD 1
c0d27fcc 1874_ACEOF
ba4481b5 1875
ca81d7a0
JD
1876fi
1877
ba4481b5 1878
c0d27fcc 1879
ca81d7a0 1880# Check whether --with-sound was given.
2c9dccc9 1881if test "${with_sound+set}" = set; then
ca81d7a0
JD
1882 withval=$with_sound;
1883fi
2c9dccc9 1884
2c9dccc9 1885
c0d27fcc 1886
ca81d7a0 1887# Check whether --with-x-toolkit was given.
ba4481b5 1888if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1889 withval=$with_x_toolkit; case "${withval}" in
ba4481b5
DL
1890 y | ye | yes ) val=athena ;;
1891 n | no ) val=no ;;
1892 l | lu | luc | luci | lucid ) val=lucid ;;
1893 a | at | ath | athe | athen | athena ) val=athena ;;
1894 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1895 g | gt | gtk ) val=gtk ;;
ba4481b5 1896 * )
c0d27fcc 1897{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1898this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1899Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1900echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1901this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1902Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1903 { (exit 1); exit 1; }; }
ba4481b5
DL
1904 ;;
1905 esac
1906 with_x_toolkit=$val
1907
ca81d7a0 1908fi
8eeae1c9 1909
ca81d7a0
JD
1910
1911# Check whether --with-xpm was given.
ba4481b5 1912if test "${with_xpm+set}" = set; then
ca81d7a0
JD
1913 withval=$with_xpm;
1914fi
503d2be0 1915
ba4481b5 1916
ca81d7a0 1917# Check whether --with-jpeg was given.
ba4481b5 1918if test "${with_jpeg+set}" = set; then
ca81d7a0
JD
1919 withval=$with_jpeg;
1920fi
503d2be0 1921
ba4481b5 1922
ca81d7a0 1923# Check whether --with-tiff was given.
ba4481b5 1924if test "${with_tiff+set}" = set; then
ca81d7a0
JD
1925 withval=$with_tiff;
1926fi
503d2be0 1927
ba4481b5 1928
ca81d7a0 1929# Check whether --with-gif was given.
ba4481b5 1930if test "${with_gif+set}" = set; then
ca81d7a0
JD
1931 withval=$with_gif;
1932fi
503d2be0 1933
ba4481b5 1934
ca81d7a0 1935# Check whether --with-png was given.
ba4481b5 1936if test "${with_png+set}" = set; then
ca81d7a0
JD
1937 withval=$with_png;
1938fi
503d2be0 1939
ba4481b5 1940
ca81d7a0 1941# Check whether --with-gtk was given.
488dd4c4 1942if test "${with_gtk+set}" = set; then
ca81d7a0
JD
1943 withval=$with_gtk;
1944fi
488dd4c4 1945
488dd4c4 1946
ca81d7a0 1947# Check whether --with-pkg-config-prog was given.
488dd4c4 1948if test "${with_pkg_config_prog+set}" = set; then
ca81d7a0
JD
1949 withval=$with_pkg_config_prog;
1950fi
488dd4c4 1951
488dd4c4 1952
ca81d7a0 1953# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 1954if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0
JD
1955 withval=$with_toolkit_scroll_bars;
1956fi
503d2be0 1957
ba4481b5 1958
ca81d7a0 1959# Check whether --with-xim was given.
1d36487c 1960if test "${with_xim+set}" = set; then
ca81d7a0
JD
1961 withval=$with_xim;
1962fi
1d36487c 1963
ba4481b5 1964
ca81d7a0 1965# Check whether --with-carbon was given.
e0f712ba 1966if test "${with_carbon+set}" = set; then
ca81d7a0
JD
1967 withval=$with_carbon;
1968fi
e0f712ba 1969
ca81d7a0 1970# Check whether --enable-carbon-app was given.
6a3a24fa 1971if test "${enable_carbon_app+set}" = set; then
ca81d7a0
JD
1972 enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
1973fi
1974
e0f712ba 1975
ca81d7a0 1976# Check whether --enable-asserts was given.
d0098f13 1977if test "${enable_asserts+set}" = set; then
ca81d7a0 1978 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
1979else
1980 USE_XASSERTS=no
ca81d7a0 1981fi
8eeae1c9 1982
ca81d7a0
JD
1983
1984# Check whether --enable-maintainer-mode was given.
19650fd6 1985if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 1986 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
1987else
1988 USE_MAINTAINER_MODE=no
ca81d7a0
JD
1989fi
1990
19650fd6
AS
1991if test $USE_MAINTAINER_MODE = yes; then
1992 MAINT=
1993else
1994 MAINT=#
1995fi
1996
1997
ca81d7a0 1998# Check whether --enable-locallisppath was given.
9adfabc2 1999if test "${enable_locallisppath+set}" = set; then
ca81d7a0 2000 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2001 locallisppath=
2002elif test "${enableval}" != "yes"; then
2003 locallisppath=${enableval}
2004fi
ca81d7a0
JD
2005fi
2006
9adfabc2 2007
ba4481b5 2008#### Make srcdir absolute, if it isn't already. It's important to
17494071 2009#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2010#### give you automounter prefixes, which can go away. We do all this
2011#### so Emacs can find its files when run uninstalled.
17494071
GM
2012## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2013unset CDPATH
ba4481b5
DL
2014case "${srcdir}" in
2015 /* ) ;;
2016 . )
2017 ## We may be able to use the $PWD environment variable to make this
2018 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2019 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2020 ## but that tested only for a well-formed and valid PWD,
2021 ## it did not object when PWD was well-formed and valid but just wrong.
2022 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2023 then
2024 srcdir="$PWD"
2025 else
2026 srcdir="`(cd ${srcdir}; pwd)`"
2027 fi
2028 ;;
2029 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2030esac
2031
2032#### Check if the source directory already has a configured system in it.
2033if test `pwd` != `(cd ${srcdir} && pwd)` \
2034 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2035 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2036 as a build directory right now; it has been configured in its own
2037 right. To configure in another directory as well, you MUST
2038 use GNU make. If you do not have GNU make, then you must
2039 now do \`make distclean' in ${srcdir},
2040 and then run $0 again." >&5
2041echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2042 as a build directory right now; it has been configured in its own
2043 right. To configure in another directory as well, you MUST
2044 use GNU make. If you do not have GNU make, then you must
2045 now do \`make distclean' in ${srcdir},
503d2be0 2046 and then run $0 again." >&2;}
ba4481b5
DL
2047fi
2048
2049#### Given the configuration name, set machfile and opsysfile to the
2050#### names of the m/*.h and s/*.h files we should use.
2051
2052### Canonicalize the configuration name.
2053
2054ac_aux_dir=
ca81d7a0
JD
2055for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2056 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2057 ac_aux_dir=$ac_dir
2058 ac_install_sh="$ac_aux_dir/install-sh -c"
2059 break
ca81d7a0 2060 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2061 ac_aux_dir=$ac_dir
2062 ac_install_sh="$ac_aux_dir/install.sh -c"
2063 break
ca81d7a0 2064 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2065 ac_aux_dir=$ac_dir
2066 ac_install_sh="$ac_aux_dir/shtool install -c"
2067 break
ba4481b5
DL
2068 fi
2069done
2070if test -z "$ac_aux_dir"; then
ca81d7a0
JD
2071 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2072echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2073 { (exit 1); exit 1; }; }
ba4481b5 2074fi
ca81d7a0
JD
2075
2076# These three variables are undocumented and unsupported,
2077# and are intended to be withdrawn in a future Autoconf release.
2078# They can cause serious problems if a builder's source tree is in a directory
2079# whose full name contains unusual characters.
2080ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2081ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2082ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2083
ba4481b5
DL
2084
2085# Make sure we can run config.sub.
ca81d7a0
JD
2086$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2087 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2088echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2089 { (exit 1); exit 1; }; }
2090
ca81d7a0
JD
2091{ echo "$as_me:$LINENO: checking build system type" >&5
2092echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2093if test "${ac_cv_build+set}" = set; then
2094 echo $ECHO_N "(cached) $ECHO_C" >&6
2095else
ca81d7a0
JD
2096 ac_build_alias=$build_alias
2097test "x$ac_build_alias" = x &&
2098 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2099test "x$ac_build_alias" = x &&
c0d27fcc 2100 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2101echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2102 { (exit 1); exit 1; }; }
ca81d7a0
JD
2103ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2104 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2105echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2106 { (exit 1); exit 1; }; }
2107
2108fi
ca81d7a0
JD
2109{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2110echo "${ECHO_T}$ac_cv_build" >&6; }
2111case $ac_cv_build in
2112*-*-*) ;;
2113*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2114echo "$as_me: error: invalid value of canonical build" >&2;}
2115 { (exit 1); exit 1; }; };;
2116esac
503d2be0 2117build=$ac_cv_build
ca81d7a0
JD
2118ac_save_IFS=$IFS; IFS='-'
2119set x $ac_cv_build
2120shift
2121build_cpu=$1
2122build_vendor=$2
2123shift; shift
2124# Remember, the first character of IFS is used to create $*,
2125# except with old shells:
2126build_os=$*
2127IFS=$ac_save_IFS
2128case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2129
2130
2131{ echo "$as_me:$LINENO: checking host system type" >&5
2132echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2133if test "${ac_cv_host+set}" = set; then
2134 echo $ECHO_N "(cached) $ECHO_C" >&6
2135else
ca81d7a0
JD
2136 if test "x$host_alias" = x; then
2137 ac_cv_host=$ac_cv_build
2138else
2139 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2140 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2141echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2142 { (exit 1); exit 1; }; }
ca81d7a0 2143fi
503d2be0
AS
2144
2145fi
ca81d7a0
JD
2146{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2147echo "${ECHO_T}$ac_cv_host" >&6; }
2148case $ac_cv_host in
2149*-*-*) ;;
2150*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2151echo "$as_me: error: invalid value of canonical host" >&2;}
2152 { (exit 1); exit 1; }; };;
2153esac
503d2be0 2154host=$ac_cv_host
ca81d7a0
JD
2155ac_save_IFS=$IFS; IFS='-'
2156set x $ac_cv_host
2157shift
2158host_cpu=$1
2159host_vendor=$2
2160shift; shift
2161# Remember, the first character of IFS is used to create $*,
2162# except with old shells:
2163host_os=$*
2164IFS=$ac_save_IFS
2165case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2166
c0d27fcc 2167
ba4481b5 2168canonical=$host
531a3336 2169configuration=${host_alias-$host}
ba4481b5 2170
c0d27fcc 2171
22044edf 2172
ba4481b5
DL
2173### If you add support for a new configuration, add code to this
2174### switch statement to recognize your configuration name and select
2175### the appropriate operating system and machine description files.
2176
2177### You would hope that you could choose an m/*.h file pretty much
2178### based on the machine portion of the configuration name, and an s-
2179### file based on the operating system portion. However, it turns out
2180### that each m/*.h file is pretty manufacturer-specific - for
2181### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
2182### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
2183### machines. So we basically have to have a special case for each
2184### configuration name.
2185###
2186### As far as handling version numbers on operating systems is
2187### concerned, make sure things will fail in a fixable way. If
2188### /etc/MACHINES doesn't say anything about version numbers, be
2189### prepared to handle anything reasonably. If version numbers
2190### matter, be sure /etc/MACHINES says something about it.
2191###
2192### Eric Raymond says we should accept strings like "sysvr4" to mean
2193### "System V Release 4"; he writes, "The old convention encouraged
2194### confusion between `system' and `release' levels'."
2195
2196machine='' opsys='' unported=no
2197case "${canonical}" in
2198
1096bcc0
GM
2199 ## FreeBSD ports
2200 *-*-freebsd* )
2201 opsys=freebsd
2202 case "${canonical}" in
2203 alpha*-*-freebsd*) machine=alpha ;;
ec8fcb10
YM
2204 ia64-*-freebsd*) machine=ia64 ;;
2205 sparc64-*-freebsd*) machine=sparc ;;
2206 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2207 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 2208 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2209 esac
2210 ;;
2211
ba4481b5
DL
2212 ## NetBSD ports
2213 *-*-netbsd* )
2214 opsys=netbsd
dd038e26 2215 if test -f /usr/lib/crti.o; then
f57bd967
DL
2216
2217cat >>confdefs.h <<\_ACEOF
2218#define HAVE_CRTIN
dd038e26
AS
2219_ACEOF
2220
2221 fi
2222
ba4481b5
DL
2223 case "${canonical}" in
2224 alpha*-*-netbsd*) machine=alpha ;;
2225 i[3456]86-*-netbsd*) machine=intel386 ;;
2226 m68k-*-netbsd*)
2227 # This is somewhat bogus.
2228 machine=hp9000s300 ;;
ba4481b5 2229 mips-*-netbsd*) machine=pmax ;;
2df636f4 2230 mipsel-*-netbsd*) machine=pmax ;;
97836269 2231 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 2232 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 2233 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2234 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2235 vax-*-netbsd*) machine=vax ;;
2df636f4 2236 arm-*-netbsd*) machine=arm ;;
d54ee7b4 2237 x86_64-*-netbsd*) machine=amdx86-64 ;;
13aadc96 2238 hppa-*-netbsd*) machine=hp800 ;;
d54ee7b4 2239 shle-*-netbsd*) machine=sh3el ;;
ba4481b5
DL
2240 esac
2241 ;;
2242
2243 ## OpenBSD ports
2244 *-*-openbsd* )
2245 opsys=openbsd
2246 case "${canonical}" in
2247 alpha*-*-openbsd*) machine=alpha ;;
2248 i386-*-openbsd*) machine=intel386 ;;
4713fa76 2249 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2250 m68k-*-openbsd*) machine=hp9000s300 ;;
2251 mipsel-*-openbsd*) machine=pmax ;;
2252 ns32k-*-openbsd*) machine=ns32000 ;;
2253 sparc-*-openbsd*) machine=sparc ;;
2254 vax-*-openbsd*) machine=vax ;;
2255 esac
2256 ;;
2257
10a3b1a1
EZ
2258 ## LynxOS ports
2259 *-*-lynxos* )
2260 opsys=lynxos
2261 case "${canonical}" in
2262 i[3456]86-*-lynxos*) machine=intel386 ;;
2263 powerpc-*-lynxos*) machine=powerpc ;;
2264 esac
2265 ;;
2266
ba4481b5
DL
2267 ## Acorn RISCiX:
2268 arm-acorn-riscix1.1* )
2269 machine=acorn opsys=riscix1-1
2270 ;;
2271 arm-acorn-riscix1.2* | arm-acorn-riscix )
2272 ## This name is riscix12 instead of riscix1.2
2273 ## to avoid a file name conflict on MSDOS.
2274 machine=acorn opsys=riscix12
2275 ;;
2276
2277 ## BSDI ports
2278 *-*-bsdi* )
2279 opsys=bsdi
2280 case "${canonical}" in
2281 i[345]86-*-bsdi*) machine=intel386 ;;
2282 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 2283 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
2284 esac
2285 case "${canonical}" in
2286 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
2287 *-*-bsdi2.0* ) opsys=bsdos2 ;;
2288 *-*-bsdi2* ) opsys=bsdos2-1 ;;
2289 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 2290 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
2291 esac
2292 ;;
2293
2294 ## Alliant machines
2295 ## Strictly speaking, we need the version of the alliant operating
2296 ## system to choose the right machine file, but currently the
2297 ## configuration name doesn't tell us enough to choose the right
2298 ## one; we need to give alliants their own operating system name to
2299 ## do this right. When someone cares, they can help us.
2300 fx80-alliant-* )
2301 machine=alliant4 opsys=bsd4-2
2302 ;;
2303 i860-alliant-* )
2304 machine=alliant-2800 opsys=bsd4-3
2305 ;;
2306
2307 ## Alpha (DEC) machines.
2308 alpha*-dec-osf* )
2309 machine=alpha opsys=osf1
2310 # This is needed to find X11R6.1 libraries for certain tests.
2311 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
2312 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
2313 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
2314 # due to non-traditional preprocessing with the current compiler
2315 # defaults. OSF 4 can also have that compiler version, and there
2316 # seems always to have been a usable /usr/bin/cpp.
2317 NON_GNU_CPP=/usr/bin/cpp
ca512671 2318 case "${canonical}" in
a55b799a 2319 alpha*-dec-osf[5-9]*)
bb17930d 2320 opsys=osf5-0 ;;
ca512671 2321 esac
ba4481b5
DL
2322 ;;
2323
2324 alpha*-*-linux-gnu* )
2325 machine=alpha opsys=gnu-linux
2326 ;;
2327
c4bb2108
DL
2328 arm*-*-linux-gnu* )
2329 machine=arm opsys=gnu-linux
2330 ;;
2331
ba4481b5
DL
2332 ## Altos 3068
2333 m68*-altos-sysv* )
2334 machine=altos opsys=usg5-2
2335 ;;
2336
2337 ## Amdahl UTS
2338 580-amdahl-sysv* )
2339 machine=amdahl opsys=usg5-2-2
2340 ;;
2341
2342 ## Apollo, Domain/OS
2343 m68*-apollo-* )
2344 machine=apollo opsys=bsd4-3
2345 ;;
2346
040c474e
CY
2347 ## Apple Darwin / Mac OS X
2348 *-apple-darwin* )
2349 case "${canonical}" in
2350 i[3456]86-* ) machine=intel386 ;;
2351 powerpc-* ) machine=powermac ;;
2352 * ) unported=yes ;;
2353 esac
2354 opsys=darwin
2355 # Define CPP as follows to make autoconf work correctly.
2356 CPP="${CC-cc} -E -no-cpp-precomp"
2357 # Use fink packages if available.
2358 if test -d /sw/include && test -d /sw/lib; then
2359 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2360 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2361 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2362 fi
2363 ;;
2364
ba4481b5
DL
2365 ## AT&T 3b2, 3b5, 3b15, 3b20
2366 we32k-att-sysv* )
2367 machine=att3b opsys=usg5-2-2
2368 ;;
2369
2370 ## AT&T 3b1 - The Mighty Unix PC!
2371 m68*-att-sysv* )
2372 machine=7300 opsys=usg5-2-2
2373 ;;
2374
2375 ## Bull dpx20
2376 rs6000-bull-bosx* )
2377 machine=ibmrs6000 opsys=aix3-2
2378 ;;
2379
2380 ## Bull dpx2
2381 m68*-bull-sysv3* )
2382 machine=dpx2 opsys=usg5-3
2383 ;;
2384
2385 ## Bull sps7
2386 m68*-bull-sysv2* )
2387 machine=sps7 opsys=usg5-2
2388 ;;
2389
2390 ## CCI 5/32, 6/32 -- see "Tahoe".
2391
2392 ## Celerity
2393 ## I don't know what configuration name to use for this; config.sub
2394 ## doesn't seem to know anything about it. Hey, Celerity users, get
2395 ## in touch with us!
2396 celerity-celerity-bsd* )
2397 machine=celerity opsys=bsd4-2
2398 ;;
2399
2400 ## Clipper
2401 ## What operating systems does this chip run that Emacs has been
2402 ## tested on?
2403 clipper-* )
2404 machine=clipper
2405 ## We'll use the catch-all code at the bottom to guess the
2406 ## operating system.
2407 ;;
2408
df645f7c
AS
2409 ## Compaq Nonstop
2410 mips-compaq-nonstopux* )
2411 machine=nonstopux opsys=nonstopux
2412 ;;
2413
ba4481b5
DL
2414 ## Convex
2415 *-convex-bsd* | *-convex-convexos* )
2416 machine=convex opsys=bsd4-3
2417 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
2418 NON_GNU_CPP="cc -E -P"
2419 ;;
2420
2421 ## Cubix QBx/386
2422 i[3456]86-cubix-sysv* )
2423 machine=intel386 opsys=usg5-3
2424 ;;
2425
2426 ## Cydra 5
2427 cydra*-cydrome-sysv* )
2428 machine=cydra5 opsys=usg5-3
2429 ;;
2430
2431 ## Data General AViiON Machines
2432 ## DG changed naming conventions with the release of 5.4.4.10, they
2433 ## dropped the initial 5.4 but left the intervening R. Because of the
2434 ## R this shouldn't conflict with older versions of the OS (which I
2435 ## think were named like dgux4.*). In addition, DG new AViiONs series
2436 ## uses either Motorola M88k or Intel Pentium CPUs.
2437 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
2438 machine=aviion opsys=dgux4
2439 ;;
2440 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
2441 ## This name is dgux5-4-3 instead of dgux5-4r3
2442 ## to avoid a file name conflict on MSDOS.
2443 machine=aviion opsys=dgux5-4-3
2444 ;;
2445 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
2446 machine=aviion opsys=dgux5-4r2
2447 ;;
2448 m88k-dg-dgux* )
2449 machine=aviion opsys=dgux
2450 ;;
2451
2452 ## Data General AViiON Intel (x86) Machines
2453 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
2454 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
2455 i[345]86-dg-dguxR4* )
2456 machine=aviion-intel opsys=dgux4
2457 ;;
2458
2459 ## DECstations
2460 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
2461 machine=pmax opsys=bsd4-2
2462 ;;
2463 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
2464 machine=pmax opsys=bsd4-3
2465 ;;
2466 mips-dec-ultrix* )
2467 machine=pmax opsys=ultrix4-3
2468 ;;
2469 mips-dec-osf* )
2470 machine=pmax opsys=osf1
2471 ;;
2472 mips-dec-mach_bsd4.3* )
2473 machine=pmax opsys=mach-bsd4-3
2474 ;;
2475
cd890796
JD
2476 ## Motorola Delta machines
2477 m68k-motorola-sysv* | m68000-motorola-sysv* )
2478 machine=delta opsys=usg5-3
2479 if test -z "`type gnucc | grep 'not found'`"
2480 then
2481 if test -s /etc/167config
2482 then CC="gnucc -m68040"
2483 else CC="gnucc -m68881"
2484 fi
2485 else
2486 if test -z "`type gcc | grep 'not found'`"
2487 then CC=gcc
2488 else CC=cc
2489 fi
2490 fi
2491 ;;
ba4481b5
DL
2492 m88k-motorola-sysv4* )
2493 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
2494 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
2495 # I hope there are not other 4.0 versions for this machine
2496 # which really need usg5-4 instead.
2497 machine=delta88k opsys=usg5-4-2
2498 ;;
2499 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
2500 machine=delta88k opsys=usg5-3
2501 ;;
2502
2503 ## Dual machines
2504 m68*-dual-sysv* )
2505 machine=dual opsys=usg5-2
2506 ;;
2507 m68*-dual-uniplus* )
2508 machine=dual opsys=unipl5-2
2509 ;;
2510
2511 ## Elxsi 6400
2512 elxsi-elxsi-sysv* )
2513 machine=elxsi opsys=usg5-2
2514 ;;
2515
2516 ## Encore machines
2517 ns16k-encore-bsd* )
2518 machine=ns16000 opsys=umax
2519 ;;
2520
65171e3a
DL
2521 ## The GEC 63 - apparently, this port isn't really finished yet.
2522 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
2523
2524 ## Gould Power Node and NP1
2525 pn-gould-bsd4.2* )
2526 machine=gould opsys=bsd4-2
2527 ;;
2528 pn-gould-bsd4.3* )
2529 machine=gould opsys=bsd4-3
2530 ;;
2531 np1-gould-bsd* )
2532 machine=gould-np1 opsys=bsd4-3
2533 ;;
2534
2535 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2536 ## as far as Emacs is concerned).
2537 m88k-harris-cxux* )
2538 # Build needs to be different on 7.0 and later releases
2539 case "`uname -r`" in
2540 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2541 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2542 esac
2543 NON_GNU_CPP="/lib/cpp"
2544 ;;
2545 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2546 m68k-harris-cxux* )
2547 machine=nh3000 opsys=cxux
2548 ;;
2549 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2550 powerpc-harris-powerunix )
2551 machine=nh6000 opsys=powerunix
2552 NON_GNU_CPP="cc -Xo -E -P"
2553 ;;
ba4481b5
DL
2554 ## Honeywell XPS100
2555 xps*-honeywell-sysv* )
2556 machine=xps100 opsys=usg5-2
2557 ;;
2558
2559 ## HP 9000 series 200 or 300
2560 m68*-hp-bsd* )
2561 machine=hp9000s300 opsys=bsd4-3
2562 ;;
2563 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2564 m68*-hp-hpux* )
2565 case "`uname -r`" in
2566 ## Someone's system reports A.B8.05 for this.
2567 ## I wonder what other possibilities there are.
2568 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2569 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2570 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2571 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2572 *) machine=hp9000s300 opsys=hpux ;;
2573 esac
2574 ;;
2575
13aadc96
CY
2576 hppa*-*-linux-gnu* )
2577 machine=hp800 opsys=gnu-linux
2578 ;;
2579
2580 hppa*-*-nextstep* )
2581 machine=hp800 opsys=nextstep
2582 ;;
2583
ba4481b5
DL
2584 ## Orion machines
2585 orion-orion-bsd* )
2586 machine=orion opsys=bsd4-2
2587 ;;
2588 clipper-orion-bsd* )
2589 machine=orion105 opsys=bsd4-2
2590 ;;
2591
2592 ## IBM machines
2593 i[3456]86-ibm-aix1.1* )
2594 machine=ibmps2-aix opsys=usg5-2-2
2595 ;;
2596 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2597 machine=ibmps2-aix opsys=usg5-3
2598 ;;
2599 i370-ibm-aix*)
2600 machine=ibm370aix opsys=usg5-3
2601 ;;
55597d70 2602 s390-*-linux-gnu* )
138f0859
GM
2603 machine=ibms390 opsys=gnu-linux
2604 ;;
bcdb1378
EZ
2605 s390x-*-linux-gnu* )
2606 machine=ibms390x opsys=gnu-linux
2607 ;;
ba4481b5
DL
2608 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2609 machine=ibmrs6000 opsys=aix3-1
2610 ;;
2611 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2612 machine=ibmrs6000 opsys=aix3-2-5
2613 ;;
2614 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2615 machine=ibmrs6000 opsys=aix4-1
2616 ;;
2617 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2618 machine=ibmrs6000 opsys=aix4-2
2619 ;;
55597d70 2620 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2621 machine=ibmrs6000 opsys=aix4-2
2622 ;;
ba4481b5
DL
2623 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2624 machine=ibmrs6000 opsys=aix4
2625 ;;
2626 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2627 machine=ibmrs6000 opsys=aix4-1
2628 ;;
2629 rs6000-ibm-aix* | powerpc-ibm-aix* )
2630 machine=ibmrs6000 opsys=aix3-2
2631 ;;
2632 romp-ibm-bsd4.3* )
2633 machine=ibmrt opsys=bsd4-3
2634 ;;
2635 romp-ibm-bsd4.2* )
2636 machine=ibmrt opsys=bsd4-2
2637 ;;
2638 romp-ibm-aos4.3* )
2639 machine=ibmrt opsys=bsd4-3
2640 ;;
2641 romp-ibm-aos4.2* )
2642 machine=ibmrt opsys=bsd4-2
2643 ;;
2644 romp-ibm-aos* )
2645 machine=ibmrt opsys=bsd4-3
2646 ;;
2647 romp-ibm-bsd* )
2648 machine=ibmrt opsys=bsd4-3
2649 ;;
2650 romp-ibm-aix* )
2651 machine=ibmrt-aix opsys=usg5-2-2
2652 ;;
2653
2654 ## Integrated Solutions `Optimum V'
2655 m68*-isi-bsd4.2* )
2656 machine=isi-ov opsys=bsd4-2
2657 ;;
2658 m68*-isi-bsd4.3* )
2659 machine=isi-ov opsys=bsd4-3
2660 ;;
2661
2662 ## Intel 386 machines where we do care about the manufacturer
2663 i[3456]86-intsys-sysv* )
2664 machine=is386 opsys=usg5-2-2
2665 ;;
2666
2667 ## Prime EXL
2668 i[3456]86-prime-sysv* )
2669 machine=i386 opsys=usg5-3
2670 ;;
2671
2672 ## Sequent Symmetry running Dynix
2673 i[3456]86-sequent-bsd* )
2674 machine=symmetry opsys=bsd4-3
2675 ;;
2676
2677 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2678 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2679 machine=sequent-ptx opsys=ptx4
2680 NON_GNU_CPP=/lib/cpp
2681 ;;
2682
2683 ## Sequent Symmetry running DYNIX/ptx
2684 ## Use the old cpp rather than the newer ANSI one.
2685 i[3456]86-sequent-ptx* )
2686 machine=sequent-ptx opsys=ptx
2687 NON_GNU_CPP="/lib/cpp"
2688 ;;
2689
2690 ## ncr machine running svr4.3.
2691 i[3456]86-ncr-sysv4.3 )
2692 machine=ncr386 opsys=usg5-4-3
2693 ;;
2694
2695 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2696 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2697 i[3456]86-ncr-sysv* )
2698 machine=ncr386 opsys=usg5-4-2
2699 ;;
2700
2701 ## Intel Paragon OSF/1
2702 i860-intel-osf1* )
2703 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2704 ;;
2705
2706 ## Intel 860
2707 i860-*-sysv4* )
2708 machine=i860 opsys=usg5-4
2709 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2710 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2711 ;;
2712
c76e04a8
GM
2713 ## Macintosh PowerPC
2714 powerpc*-*-linux-gnu* )
2715 machine=macppc opsys=gnu-linux
2716 ;;
2717
ba4481b5
DL
2718 ## Masscomp machines
2719 m68*-masscomp-rtu* )
2720 machine=masscomp opsys=rtu
2721 ;;
2722
2723 ## Megatest machines
2724 m68*-megatest-bsd* )
2725 machine=mega68 opsys=bsd4-2
2726 ;;
2727
2728 ## Workstations sold by MIPS
2729 ## This is not necessarily all workstations using the MIPS processor -
2730 ## Irises are produced by SGI, and DECstations by DEC.
2731
2732 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2733 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2734 ## it gives for choosing between the alternatives seems to be "Use
2735 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2736 ## the BSD world." I'll assume that these are instructions for
2737 ## handling two odd situations, and that every other situation
2738 ## should use mips.h and usg5-2-2, they being listed first.
2739 mips-mips-usg* )
2740 machine=mips4
2741 ## Fall through to the general code at the bottom to decide on the OS.
2742 ;;
2743 mips-mips-riscos4* )
2744 machine=mips4 opsys=bsd4-3
2745 NON_GNU_CC="cc -systype bsd43"
2746 NON_GNU_CPP="cc -systype bsd43 -E"
2747 ;;
2748 mips-mips-riscos5* )
2749 machine=mips4 opsys=riscos5
2750 NON_GNU_CC="cc -systype bsd43"
2751 NON_GNU_CPP="cc -systype bsd43 -E"
2752 ;;
2753 mips-mips-bsd* )
2754 machine=mips opsys=bsd4-3
2755 ;;
2756 mips-mips-* )
2757 machine=mips opsys=usg5-2-2
2758 ;;
2759
2760 ## NeXT
2761 m68*-next-* | m68k-*-nextstep* )
2762 machine=m68k opsys=nextstep
2763 ;;
2764
2765 ## The complete machine from National Semiconductor
2766 ns32k-ns-genix* )
2767 machine=ns32000 opsys=usg5-2
2768 ;;
2769
2770 ## NCR machines
2771 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2772 machine=tower32 opsys=usg5-2-2
2773 ;;
2774 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2775 machine=tower32v3 opsys=usg5-3
2776 ;;
2777
2778 ## NEC EWS4800
2779 mips-nec-sysv4*)
2780 machine=ews4800 opsys=ux4800
2781 ;;
2782
2783 ## Nixdorf Targon 31
2784 m68*-nixdorf-sysv* )
2785 machine=targon31 opsys=usg5-2-2
2786 ;;
2787
2788 ## Nu (TI or LMI)
2789 m68*-nu-sysv* )
2790 machine=nu opsys=usg5-2
2791 ;;
2792
2793 ## Plexus
2794 m68*-plexus-sysv* )
2795 machine=plexus opsys=usg5-2
2796 ;;
2797
ba4481b5
DL
2798 ## Pyramid machines
2799 ## I don't really have any idea what sort of processor the Pyramid has,
2800 ## so I'm assuming it is its own architecture.
2801 pyramid-pyramid-bsd* )
2802 machine=pyramid opsys=bsd4-2
2803 ;;
2804
2805 ## Sequent Balance
2806 ns32k-sequent-bsd4.2* )
2807 machine=sequent opsys=bsd4-2
2808 ;;
2809 ns32k-sequent-bsd4.3* )
2810 machine=sequent opsys=bsd4-3
2811 ;;
2812
2813 ## Siemens Nixdorf
2814 mips-siemens-sysv* | mips-sni-sysv*)
2815 machine=mips-siemens opsys=usg5-4
2816 NON_GNU_CC=/usr/ccs/bin/cc
2817 NON_GNU_CPP=/usr/ccs/lib/cpp
2818 ;;
2819
2820 ## Silicon Graphics machines
2821 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2822 m68*-sgi-iris3.5* )
2823 machine=irist opsys=iris3-5
2824 ;;
2825 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2826 machine=irist opsys=iris3-6
2827 ;;
2828 ## Iris 4D
2829 mips-sgi-irix3* )
2830 machine=iris4d opsys=irix3-3
2831 ;;
2832 mips-sgi-irix4* )
2833 machine=iris4d opsys=irix4-0
2834 ;;
2835 mips-sgi-irix6.5 )
2836 machine=iris4d opsys=irix6-5
946173ad
DL
2837 # Without defining _LANGUAGE_C, things get masked out in the headers
2838 # so that, for instance, grepping for `free' in stdlib.h fails and
2839 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2840 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2841 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2842 ;;
2843 mips-sgi-irix6* )
2844 machine=iris4d opsys=irix6-0
c4bb2108 2845 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2846 # but presumably it does no harm.
2847 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2848 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2849 NON_GCC_TEST_OPTIONS=-32
2850 ;;
2851 mips-sgi-irix5.[01]* )
2852 machine=iris4d opsys=irix5-0
2853 ;;
2854 mips-sgi-irix5* | mips-sgi-irix* )
2855 machine=iris4d opsys=irix5-2
2856 ;;
2857
2858 ## SONY machines
2859 m68*-sony-bsd4.2* )
2860 machine=news opsys=bsd4-2
2861 ;;
2862 m68*-sony-bsd4.3* )
2863 machine=news opsys=bsd4-3
2864 ;;
2865 m68*-sony-newsos3* | m68*-sony-news3*)
2866 machine=news opsys=bsd4-3
2867 ;;
2868 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2869 machine=news-risc opsys=bsd4-3
2870 ;;
2871 mips-sony-newsos6* )
2872 machine=news-r6 opsys=newsos6
2873 ;;
2874 mips-sony-news* )
2875 machine=news-risc opsys=newsos5
2876 ;;
2877
2878 ## Stride
2879 m68*-stride-sysv* )
2880 machine=stride opsys=usg5-2
2881 ;;
2882
2883 ## Suns
2884 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2885 machine=sparc opsys=gnu-linux
2886 ;;
2887
d054101f 2888 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2889 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2890 | rs6000-*-solaris2*)
2891 case "${canonical}" in
2892 m68*-sunos1* ) machine=sun1 ;;
2893 m68*-sunos2* ) machine=sun2 ;;
2894 m68* ) machine=sun3 ;;
2895 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2896 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2897 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2898 powerpcle* ) machine=powerpcle ;;
2899 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2900 sparc* ) machine=sparc ;;
2901 * ) unported=yes ;;
2902 esac
2903 case "${canonical}" in
2904 ## The Sun386 didn't get past 4.0.
2905 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2906 *-sunos4.0* ) opsys=sunos4-0 ;;
2907 *-sunos4.1.[3-9]*noshare )
2908 ## This name is sunos413 instead of sunos4-1-3
2909 ## to avoid a file name conflict on MSDOS.
2910 opsys=sunos413
2911 NON_GNU_CPP=/usr/lib/cpp
2912 NON_GCC_TEST_OPTIONS=-Bstatic
2913 GCC_TEST_OPTIONS=-static
2914 ;;
2915 *-sunos4.1.[3-9]* | *-sunos4shr*)
2916 opsys=sunos4shr
2917 NON_GNU_CPP=/usr/lib/cpp
2918 ;;
2919 *-sunos4* | *-sunos )
2920 opsys=sunos4-1
2921 NON_GCC_TEST_OPTIONS=-Bstatic
2922 GCC_TEST_OPTIONS=-static
2923 ;;
2924 *-sunos5.3* | *-solaris2.3* )
2925 opsys=sol2-3
2926 NON_GNU_CPP=/usr/ccs/lib/cpp
2927 ;;
2928 *-sunos5.4* | *-solaris2.4* )
2929 opsys=sol2-4
2930 NON_GNU_CPP=/usr/ccs/lib/cpp
2931 RANLIB="ar -ts"
2932 ;;
2933 *-sunos5.5* | *-solaris2.5* )
2934 opsys=sol2-5
2935 NON_GNU_CPP=/usr/ccs/lib/cpp
2936 RANLIB="ar -ts"
2937 ;;
8e967cf7
MR
2938 *-sunos5.6* | *-solaris2.6* )
2939 opsys=sol2-6
2940 NON_GNU_CPP=/usr/ccs/lib/cpp
2941 RANLIB="ar -ts"
2942 ;;
ba4481b5 2943 *-sunos5* | *-solaris* )
9e71690e 2944 opsys=sol2-6
ba4481b5
DL
2945 NON_GNU_CPP=/usr/ccs/lib/cpp
2946 ;;
2947 * ) opsys=bsd4-2 ;;
2948 esac
2949 ## Watch out for a compiler that we know will not work.
2950 case "${canonical}" in
2951 *-solaris* | *-sunos5* )
2952 if [ "x$CC" = x/usr/ucb/cc ]; then
2953 ## /usr/ucb/cc doesn't work;
2954 ## we should find some other compiler that does work.
2955 unset CC
2956 fi
2957 ;;
2958 *) ;;
2959 esac
2960 ;;
2961 sparc-*-nextstep* )
2962 machine=sparc opsys=nextstep
2963 ;;
2964
2965 ## Tadpole 68k
2966 m68*-tadpole-sysv* )
2967 machine=tad68k opsys=usg5-3
2968 ;;
2969
2970 ## Tahoe machines
2971 tahoe-tahoe-bsd4.2* )
2972 machine=tahoe opsys=bsd4-2
2973 ;;
2974 tahoe-tahoe-bsd4.3* )
2975 machine=tahoe opsys=bsd4-3
2976 ;;
2977
2978 ## Tandem Integrity S2
2979 mips-tandem-sysv* )
2980 machine=tandem-s2 opsys=usg5-3
2981 ;;
2982
2983 ## Tektronix XD88
2984 m88k-tektronix-sysv3* )
2985 machine=tekxd88 opsys=usg5-3
2986 ;;
2987
2988 ## Tektronix 16000 box (6130?)
2989 ns16k-tektronix-bsd* )
2990 machine=ns16000 opsys=bsd4-2
2991 ;;
2992 ## Tektronix 4300
2993 ## src/m/tek4300.h hints that this is a m68k machine.
2994 m68*-tektronix-bsd* )
2995 machine=tek4300 opsys=bsd4-3
2996 ;;
2997
2998 ## Titan P2 or P3
2999 ## We seem to have lost the machine-description file titan.h!
3000 titan-titan-sysv* )
3001 machine=titan opsys=usg5-3
3002 ;;
3003
3004 ## Ustation E30 (SS5E)
3005 m68*-unisys-uniplus* )
3006 machine=ustation opsystem=unipl5-2
3007 ;;
3008
3009 ## Vaxen.
3010 vax-dec-* )
3011 machine=vax
3012 case "${canonical}" in
3013 *-bsd4.1* ) opsys=bsd4-1 ;;
3014 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
3015 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
3016 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
3017 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
3018 *-vms* ) opsys=vms ;;
3019 * ) unported=yes
3020 esac
3021 ;;
3022
3023 ## Whitechapel MG1
3024 ns16k-whitechapel-* )
3025 machine=mg1
3026 ## We don't know what sort of OS runs on these; we'll let the
3027 ## operating system guessing code below try.
3028 ;;
3029
3030 ## Wicat
3031 m68*-wicat-sysv* )
3032 machine=wicat opsys=usg5-2
3033 ;;
3034
f4988be7
GM
3035 ## IA-64
3036 ia64*-*-linux* )
3037 machine=ia64 opsys=gnu-linux
3038 ;;
3039
ba4481b5
DL
3040 ## Intel 386 machines where we don't care about the manufacturer
3041 i[3456]86-*-* )
3042 machine=intel386
3043 case "${canonical}" in
c60ee5e7 3044 *-cygwin ) opsys=cygwin ;;
eae54018 3045 *-darwin* ) opsys=darwin
23fd4483
ST
3046 CPP="${CC-cc} -E -no-cpp-precomp"
3047 ;;
ba4481b5
DL
3048 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
3049 *-isc2.2* ) opsys=isc2-2 ;;
3050 *-isc4.0* ) opsys=isc4-0 ;;
3051 *-isc4.* ) opsys=isc4-1
3052 GCC_TEST_OPTIONS=-posix
3053 NON_GCC_TEST_OPTIONS=-Xp
3054 ;;
3055 *-isc* ) opsys=isc3-0 ;;
3056 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
3057 *-esix* ) opsys=esix ;;
3058 *-xenix* ) opsys=xenix ;;
3059 *-linux-gnu* ) opsys=gnu-linux ;;
3060 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 3061 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
3062 NON_GNU_CPP=/lib/cpp
3063 # Prevent -belf from being passed to $CPP.
3064 # /lib/cpp does not accept it.
3065 OVERRIDE_CPPFLAGS=" "
3066 ;;
3067 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
3068 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3069 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 3070 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
3071 *-nextstep* ) opsys=nextstep ;;
3072 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3073 esac
3074 ;;
3075
3076 ## m68k Linux-based GNU system
3077 m68k-*-linux-gnu* )
3078 machine=m68k opsys=gnu-linux
3079 ;;
3080
3081 ## Mips Linux-based GNU system
cd958eb3 3082 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
3083 machine=mips opsys=gnu-linux
3084 ;;
3085
3086 ## UXP/DS
3087 sparc-fujitsu-sysv4* )
3088 machine=sparc opsys=uxpds
3089 NON_GNU_CPP=/usr/ccs/lib/cpp
3090 RANLIB="ar -ts"
3091 ;;
3092
3093 ## UXP/V
3094 f301-fujitsu-uxpv4.1)
3095 machine=f301 opsys=uxpv
3096 ;;
3097
598a2813
AS
3098 ## AMD x86-64 Linux-based GNU system
3099 x86_64-*-linux-gnu* )
24b01ec4 3100 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
3101 ;;
3102
94218e27
DN
3103 ## Tensilica Xtensa Linux-based GNU system
3104 xtensa-*-linux-gnu* )
3105 machine=xtensa opsys=gnu-linux
3106 ;;
3107
ba4481b5
DL
3108 * )
3109 unported=yes
3110 ;;
3111esac
3112
3113### If the code above didn't choose an operating system, just choose
3114### an operating system based on the configuration name. You really
3115### only want to use this when you have no idea what the right
3116### operating system is; if you know what operating systems a machine
3117### runs, it's cleaner to make it explicit in the case statement
3118### above.
3119if test x"${opsys}" = x; then
3120 case "${canonical}" in
3121 *-gnu* ) opsys=gnu ;;
3122 *-bsd4.[01] ) opsys=bsd4-1 ;;
3123 *-bsd4.2 ) opsys=bsd4-2 ;;
3124 *-bsd4.3 ) opsys=bsd4-3 ;;
3125 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
3126 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
3127 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
3128 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
3129 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
3130 *-sysv5uw* ) opsys=unixware ;;
3131 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
3132 *-sysv4.1* | *-sysvr4.1* )
3133 NON_GNU_CPP=/usr/lib/cpp
3134 opsys=usg5-4 ;;
3135 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
3136 if [ x$NON_GNU_CPP = x ]; then
3137 if [ -f /usr/ccs/lib/cpp ]; then
3138 NON_GNU_CPP=/usr/ccs/lib/cpp
3139 else
3140 NON_GNU_CPP=/lib/cpp
3141 fi
3142 fi
3143 opsys=usg5-4-2 ;;
3144 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
3145 * )
3146 unported=yes
3147 ;;
3148 esac
3149fi
3150
c0d27fcc 3151
22044edf 3152
ba4481b5 3153if test $unported = yes; then
c0d27fcc 3154 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
3155Check \`etc/MACHINES' for recognized configuration names." >&5
3156echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
3157Check \`etc/MACHINES' for recognized configuration names." >&2;}
3158 { (exit 1); exit 1; }; }
ba4481b5
DL
3159fi
3160
3161machfile="m/${machine}.h"
3162opsysfile="s/${opsys}.h"
3163
c0d27fcc 3164
ba4481b5
DL
3165#### Choose a compiler.
3166test -n "$CC" && cc_specified=yes
3167
3168# Save the value of CFLAGS that the user specified.
3169SPECIFIED_CFLAGS="$CFLAGS"
3170
3171case ${with_gcc} in
3172 "yes" ) CC="gcc" GCC=yes ;;
3173 "no" ) : ${CC=cc} ;;
503d2be0
AS
3174 * )
3175esac
3176ac_ext=c
3177ac_cpp='$CPP $CPPFLAGS'
3178ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3179ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3180ac_compiler_gnu=$ac_cv_c_compiler_gnu
3181if test -n "$ac_tool_prefix"; then
3182 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3183set dummy ${ac_tool_prefix}gcc; ac_word=$2
ca81d7a0
JD
3184{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3185echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3186if test "${ac_cv_prog_CC+set}" = set; then
3187 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3188else
3189 if test -n "$CC"; then
3190 ac_cv_prog_CC="$CC" # Let the user override the test.
3191else
c0d27fcc
MR
3192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3193for as_dir in $PATH
3194do
3195 IFS=$as_save_IFS
3196 test -z "$as_dir" && as_dir=.
3197 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3198 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3199 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3200 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3201 break 2
3202 fi
3203done
503d2be0 3204done
ca81d7a0 3205IFS=$as_save_IFS
503d2be0 3206
ba4481b5
DL
3207fi
3208fi
503d2be0 3209CC=$ac_cv_prog_CC
ba4481b5 3210if test -n "$CC"; then
ca81d7a0
JD
3211 { echo "$as_me:$LINENO: result: $CC" >&5
3212echo "${ECHO_T}$CC" >&6; }
503d2be0 3213else
ca81d7a0
JD
3214 { echo "$as_me:$LINENO: result: no" >&5
3215echo "${ECHO_T}no" >&6; }
503d2be0
AS
3216fi
3217
ca81d7a0 3218
503d2be0
AS
3219fi
3220if test -z "$ac_cv_prog_CC"; then
3221 ac_ct_CC=$CC
3222 # Extract the first word of "gcc", so it can be a program name with args.
3223set dummy gcc; ac_word=$2
ca81d7a0
JD
3224{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3225echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3226if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3227 echo $ECHO_N "(cached) $ECHO_C" >&6
3228else
3229 if test -n "$ac_ct_CC"; then
3230 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3231else
c0d27fcc
MR
3232as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3233for as_dir in $PATH
3234do
3235 IFS=$as_save_IFS
3236 test -z "$as_dir" && as_dir=.
3237 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3238 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3239 ac_cv_prog_ac_ct_CC="gcc"
3240 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3241 break 2
3242 fi
3243done
503d2be0 3244done
ca81d7a0 3245IFS=$as_save_IFS
503d2be0
AS
3246
3247fi
3248fi
3249ac_ct_CC=$ac_cv_prog_ac_ct_CC
3250if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3251 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3252echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 3253else
ca81d7a0
JD
3254 { echo "$as_me:$LINENO: result: no" >&5
3255echo "${ECHO_T}no" >&6; }
503d2be0
AS
3256fi
3257
ca81d7a0
JD
3258 if test "x$ac_ct_CC" = x; then
3259 CC=""
3260 else
3261 case $cross_compiling:$ac_tool_warned in
3262yes:)
3263{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3264whose name does not start with the host triplet. If you think this
3265configuration is useful to you, please write to autoconf@gnu.org." >&5
3266echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3267whose name does not start with the host triplet. If you think this
3268configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3269ac_tool_warned=yes ;;
3270esac
3271 CC=$ac_ct_CC
3272 fi
503d2be0
AS
3273else
3274 CC="$ac_cv_prog_CC"
ba4481b5
DL
3275fi
3276
3277if test -z "$CC"; then
ca81d7a0
JD
3278 if test -n "$ac_tool_prefix"; then
3279 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 3280set dummy ${ac_tool_prefix}cc; ac_word=$2
ca81d7a0
JD
3281{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3282echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3283if test "${ac_cv_prog_CC+set}" = set; then
3284 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3285else
3286 if test -n "$CC"; then
3287 ac_cv_prog_CC="$CC" # Let the user override the test.
3288else
c0d27fcc
MR
3289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3290for as_dir in $PATH
3291do
3292 IFS=$as_save_IFS
3293 test -z "$as_dir" && as_dir=.
3294 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3295 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3296 ac_cv_prog_CC="${ac_tool_prefix}cc"
3297 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3298 break 2
3299 fi
3300done
503d2be0 3301done
ca81d7a0 3302IFS=$as_save_IFS
503d2be0
AS
3303
3304fi
3305fi
3306CC=$ac_cv_prog_CC
3307if test -n "$CC"; then
ca81d7a0
JD
3308 { echo "$as_me:$LINENO: result: $CC" >&5
3309echo "${ECHO_T}$CC" >&6; }
4b411bfe 3310else
ca81d7a0
JD
3311 { echo "$as_me:$LINENO: result: no" >&5
3312echo "${ECHO_T}no" >&6; }
4b411bfe
CY
3313fi
3314
4b411bfe 3315
ca81d7a0 3316 fi
503d2be0
AS
3317fi
3318if test -z "$CC"; then
3319 # Extract the first word of "cc", so it can be a program name with args.
3320set dummy cc; ac_word=$2
ca81d7a0
JD
3321{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3322echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3323if test "${ac_cv_prog_CC+set}" = set; then
3324 echo $ECHO_N "(cached) $ECHO_C" >&6
3325else
3326 if test -n "$CC"; then
3327 ac_cv_prog_CC="$CC" # Let the user override the test.
3328else
3329 ac_prog_rejected=no
c0d27fcc
MR
3330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3331for as_dir in $PATH
3332do
3333 IFS=$as_save_IFS
3334 test -z "$as_dir" && as_dir=.
3335 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3336 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3337 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3338 ac_prog_rejected=yes
3339 continue
3340 fi
3341 ac_cv_prog_CC="cc"
3342 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3343 break 2
3344 fi
3345done
503d2be0 3346done
ca81d7a0 3347IFS=$as_save_IFS
503d2be0 3348
ba4481b5
DL
3349if test $ac_prog_rejected = yes; then
3350 # We found a bogon in the path, so make sure we never use it.
3351 set dummy $ac_cv_prog_CC
3352 shift
503d2be0 3353 if test $# != 0; then
ba4481b5
DL
3354 # We chose a different compiler from the bogus one.
3355 # However, it has the same basename, so the bogon will be chosen
3356 # first if we set CC to just the basename; use the full file name.
3357 shift
6bae0ccf 3358 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
3359 fi
3360fi
3361fi
3362fi
503d2be0 3363CC=$ac_cv_prog_CC
ba4481b5 3364if test -n "$CC"; then
ca81d7a0
JD
3365 { echo "$as_me:$LINENO: result: $CC" >&5
3366echo "${ECHO_T}$CC" >&6; }
ba4481b5 3367else
ca81d7a0
JD
3368 { echo "$as_me:$LINENO: result: no" >&5
3369echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3370fi
3371
ca81d7a0 3372
503d2be0
AS
3373fi
3374if test -z "$CC"; then
3375 if test -n "$ac_tool_prefix"; then
ca81d7a0 3376 for ac_prog in cl.exe
503d2be0
AS
3377 do
3378 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3379set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ca81d7a0
JD
3380{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3381echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3382if test "${ac_cv_prog_CC+set}" = set; then
3383 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
3384else
3385 if test -n "$CC"; then
3386 ac_cv_prog_CC="$CC" # Let the user override the test.
3387else
c0d27fcc
MR
3388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3389for as_dir in $PATH
3390do
3391 IFS=$as_save_IFS
3392 test -z "$as_dir" && as_dir=.
3393 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3394 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3395 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3396 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3397 break 2
3398 fi
3399done
503d2be0 3400done
ca81d7a0 3401IFS=$as_save_IFS
503d2be0 3402
c4bb2108
DL
3403fi
3404fi
503d2be0 3405CC=$ac_cv_prog_CC
c4bb2108 3406if test -n "$CC"; then
ca81d7a0
JD
3407 { echo "$as_me:$LINENO: result: $CC" >&5
3408echo "${ECHO_T}$CC" >&6; }
c4bb2108 3409else
ca81d7a0
JD
3410 { echo "$as_me:$LINENO: result: no" >&5
3411echo "${ECHO_T}no" >&6; }
503d2be0
AS
3412fi
3413
ca81d7a0 3414
503d2be0
AS
3415 test -n "$CC" && break
3416 done
3417fi
3418if test -z "$CC"; then
3419 ac_ct_CC=$CC
ca81d7a0 3420 for ac_prog in cl.exe
503d2be0
AS
3421do
3422 # Extract the first word of "$ac_prog", so it can be a program name with args.
3423set dummy $ac_prog; ac_word=$2
ca81d7a0
JD
3424{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3425echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3426if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3427 echo $ECHO_N "(cached) $ECHO_C" >&6
3428else
3429 if test -n "$ac_ct_CC"; then
3430 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3431else
c0d27fcc
MR
3432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3433for as_dir in $PATH
3434do
3435 IFS=$as_save_IFS
3436 test -z "$as_dir" && as_dir=.
3437 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3438 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3439 ac_cv_prog_ac_ct_CC="$ac_prog"
3440 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3441 break 2
3442 fi
3443done
503d2be0 3444done
ca81d7a0 3445IFS=$as_save_IFS
503d2be0 3446
c4bb2108 3447fi
503d2be0
AS
3448fi
3449ac_ct_CC=$ac_cv_prog_ac_ct_CC
3450if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3451 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3452echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 3453else
ca81d7a0
JD
3454 { echo "$as_me:$LINENO: result: no" >&5
3455echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3456fi
3457
ca81d7a0 3458
503d2be0
AS
3459 test -n "$ac_ct_CC" && break
3460done
ba4481b5 3461
ca81d7a0
JD
3462 if test "x$ac_ct_CC" = x; then
3463 CC=""
3464 else
3465 case $cross_compiling:$ac_tool_warned in
3466yes:)
3467{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3468whose name does not start with the host triplet. If you think this
3469configuration is useful to you, please write to autoconf@gnu.org." >&5
3470echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3471whose name does not start with the host triplet. If you think this
3472configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3473ac_tool_warned=yes ;;
3474esac
3475 CC=$ac_ct_CC
3476 fi
503d2be0
AS
3477fi
3478
3479fi
ba4481b5 3480
c0d27fcc 3481
19650fd6
AS
3482test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3483See \`config.log' for more details." >&5
3484echo "$as_me: error: no acceptable C compiler found in \$PATH
3485See \`config.log' for more details." >&2;}
503d2be0 3486 { (exit 1); exit 1; }; }
c4bb2108 3487
503d2be0 3488# Provide some information about the compiler.
ca81d7a0 3489echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3490ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3491{ (ac_try="$ac_compiler --version >&5"
3492case "(($ac_try" in
3493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3494 *) ac_try_echo=$ac_try;;
3495esac
3496eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3497 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3498 ac_status=$?
c0d27fcc 3499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3500 (exit $ac_status); }
ca81d7a0
JD
3501{ (ac_try="$ac_compiler -v >&5"
3502case "(($ac_try" in
3503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3504 *) ac_try_echo=$ac_try;;
3505esac
3506eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3507 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3508 ac_status=$?
c0d27fcc 3509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3510 (exit $ac_status); }
ca81d7a0
JD
3511{ (ac_try="$ac_compiler -V >&5"
3512case "(($ac_try" in
3513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3514 *) ac_try_echo=$ac_try;;
3515esac
3516eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3517 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3518 ac_status=$?
c0d27fcc 3519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3520 (exit $ac_status); }
3521
3522cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3523/* confdefs.h. */
3524_ACEOF
3525cat confdefs.h >>conftest.$ac_ext
3526cat >>conftest.$ac_ext <<_ACEOF
3527/* end confdefs.h. */
c4bb2108 3528
503d2be0
AS
3529int
3530main ()
3531{
3532
3533 ;
3534 return 0;
3535}
3536_ACEOF
3537ac_clean_files_save=$ac_clean_files
19650fd6 3538ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3539# Try to create an executable without -o first, disregard a.out.
3540# It will help us diagnose broken compilers, and finding out an intuition
3541# of exeext.
ca81d7a0
JD
3542{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3543echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3544ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ca81d7a0
JD
3545#
3546# List of possible output files, starting from the most likely.
3547# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3548# only as a last resort. b.out is created by i960 compilers.
3549ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3550#
3551# The IRIX 6 linker writes into existing files which may not be
3552# executable, retaining their permissions. Remove them first so a
3553# subsequent execution test works.
3554ac_rmfiles=
3555for ac_file in $ac_files
3556do
3557 case $ac_file in
3558 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3559 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3560 esac
3561done
3562rm -f $ac_rmfiles
3563
3564if { (ac_try="$ac_link_default"
3565case "(($ac_try" in
3566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3567 *) ac_try_echo=$ac_try;;
3568esac
3569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3570 (eval "$ac_link_default") 2>&5
503d2be0 3571 ac_status=$?
c0d27fcc 3572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3573 (exit $ac_status); }; then
ca81d7a0
JD
3574 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3575# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3576# in a Makefile. We should not override ac_cv_exeext if it was cached,
3577# so that the user can short-circuit this test for compilers unknown to
3578# Autoconf.
f053c89f 3579for ac_file in $ac_files ''
19650fd6 3580do
6bae0ccf 3581 test -f "$ac_file" || continue
503d2be0 3582 case $ac_file in
ca81d7a0 3583 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3584 ;;
19650fd6 3585 [ab].out )
edfaf76d
LK
3586 # We found the default executable, but exeext='' is most
3587 # certainly right.
3588 break;;
19650fd6 3589 *.* )
ca81d7a0
JD
3590 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3591 then :; else
3592 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3593 fi
3594 # We set ac_cv_exeext here because the later test for it is not
3595 # safe: cross compilers may not add the suffix if given an `-o'
3596 # argument, so we may need to know it at that point already.
3597 # Even if this section looks crufty: it has the advantage of
3598 # actually working.
edfaf76d 3599 break;;
19650fd6 3600 * )
edfaf76d 3601 break;;
503d2be0
AS
3602 esac
3603done
ca81d7a0
JD
3604test "$ac_cv_exeext" = no && ac_cv_exeext=
3605
503d2be0 3606else
f053c89f
CY
3607 ac_file=''
3608fi
3609
3610{ echo "$as_me:$LINENO: result: $ac_file" >&5
3611echo "${ECHO_T}$ac_file" >&6; }
3612if test -z "$ac_file"; then
503d2be0 3613 echo "$as_me: failed program was:" >&5
19650fd6
AS
3614sed 's/^/| /' conftest.$ac_ext >&5
3615
6bae0ccf 3616{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3617See \`config.log' for more details." >&5
6bae0ccf 3618echo "$as_me: error: C compiler cannot create executables
19650fd6 3619See \`config.log' for more details." >&2;}
503d2be0
AS
3620 { (exit 77); exit 77; }; }
3621fi
3622
3623ac_exeext=$ac_cv_exeext
503d2be0 3624
ca81d7a0 3625# Check that the compiler produces executables we can run. If not, either
503d2be0 3626# the compiler is broken, or we cross compile.
ca81d7a0
JD
3627{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3628echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3629# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3630# If not cross compiling, check that we can run a simple program.
3631if test "$cross_compiling" != yes; then
3632 if { ac_try='./$ac_file'
ca81d7a0
JD
3633 { (case "(($ac_try" in
3634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3635 *) ac_try_echo=$ac_try;;
3636esac
3637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3638 (eval "$ac_try") 2>&5
503d2be0 3639 ac_status=$?
c0d27fcc 3640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3641 (exit $ac_status); }; }; then
3642 cross_compiling=no
ba4481b5 3643 else
503d2be0
AS
3644 if test "$cross_compiling" = maybe; then
3645 cross_compiling=yes
3646 else
c0d27fcc 3647 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3648If you meant to cross compile, use \`--host'.
3649See \`config.log' for more details." >&5
503d2be0 3650echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3651If you meant to cross compile, use \`--host'.
3652See \`config.log' for more details." >&2;}
503d2be0
AS
3653 { (exit 1); exit 1; }; }
3654 fi
ba4481b5 3655 fi
503d2be0 3656fi
ca81d7a0
JD
3657{ echo "$as_me:$LINENO: result: yes" >&5
3658echo "${ECHO_T}yes" >&6; }
503d2be0 3659
19650fd6 3660rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3661ac_clean_files=$ac_clean_files_save
ca81d7a0 3662# Check that the compiler produces executables we can run. If not, either
503d2be0 3663# the compiler is broken, or we cross compile.
ca81d7a0
JD
3664{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3665echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3666{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3667echo "${ECHO_T}$cross_compiling" >&6; }
3668
3669{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3670echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3671if { (ac_try="$ac_link"
3672case "(($ac_try" in
3673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3674 *) ac_try_echo=$ac_try;;
3675esac
3676eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3677 (eval "$ac_link") 2>&5
503d2be0 3678 ac_status=$?
c0d27fcc 3679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3680 (exit $ac_status); }; then
3681 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3682# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3683# work properly (i.e., refer to `conftest.exe'), while it won't with
3684# `rm'.
6bae0ccf
DL
3685for ac_file in conftest.exe conftest conftest.*; do
3686 test -f "$ac_file" || continue
503d2be0 3687 case $ac_file in
ca81d7a0 3688 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3689 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3690 break;;
503d2be0
AS
3691 * ) break;;
3692 esac
3693done
ba4481b5 3694else
19650fd6
AS
3695 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3696See \`config.log' for more details." >&5
3697echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3698See \`config.log' for more details." >&2;}
503d2be0 3699 { (exit 1); exit 1; }; }
ba4481b5 3700fi
ba4481b5 3701
503d2be0 3702rm -f conftest$ac_cv_exeext
ca81d7a0
JD
3703{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3704echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3705
503d2be0
AS
3706rm -f conftest.$ac_ext
3707EXEEXT=$ac_cv_exeext
3708ac_exeext=$EXEEXT
ca81d7a0
JD
3709{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3710echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3711if test "${ac_cv_objext+set}" = set; then
3712 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3713else
503d2be0 3714 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3715/* confdefs.h. */
3716_ACEOF
3717cat confdefs.h >>conftest.$ac_ext
3718cat >>conftest.$ac_ext <<_ACEOF
3719/* end confdefs.h. */
ba4481b5 3720
503d2be0
AS
3721int
3722main ()
3723{
ba4481b5 3724
503d2be0
AS
3725 ;
3726 return 0;
3727}
3728_ACEOF
3729rm -f conftest.o conftest.obj
ca81d7a0
JD
3730if { (ac_try="$ac_compile"
3731case "(($ac_try" in
3732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3733 *) ac_try_echo=$ac_try;;
3734esac
3735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3736 (eval "$ac_compile") 2>&5
503d2be0 3737 ac_status=$?
c0d27fcc 3738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3739 (exit $ac_status); }; then
ca81d7a0
JD
3740 for ac_file in conftest.o conftest.obj conftest.*; do
3741 test -f "$ac_file" || continue;
503d2be0 3742 case $ac_file in
ca81d7a0 3743 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3744 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3745 break;;
3746 esac
3747done
c4bb2108 3748else
503d2be0 3749 echo "$as_me: failed program was:" >&5
19650fd6
AS
3750sed 's/^/| /' conftest.$ac_ext >&5
3751
3752{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3753See \`config.log' for more details." >&5
3754echo "$as_me: error: cannot compute suffix of object files: cannot compile
3755See \`config.log' for more details." >&2;}
503d2be0 3756 { (exit 1); exit 1; }; }
c4bb2108
DL
3757fi
3758
503d2be0
AS
3759rm -f conftest.$ac_cv_objext conftest.$ac_ext
3760fi
ca81d7a0
JD
3761{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3762echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3763OBJEXT=$ac_cv_objext
3764ac_objext=$OBJEXT
ca81d7a0
JD
3765{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3766echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3767if test "${ac_cv_c_compiler_gnu+set}" = set; then
3768 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3769else
503d2be0 3770 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3771/* confdefs.h. */
3772_ACEOF
3773cat confdefs.h >>conftest.$ac_ext
3774cat >>conftest.$ac_ext <<_ACEOF
3775/* end confdefs.h. */
503d2be0
AS
3776
3777int
3778main ()
3779{
3780#ifndef __GNUC__
3781 choke me
3782#endif
3783
3784 ;
3785 return 0;
3786}
3787_ACEOF
3788rm -f conftest.$ac_objext
ca81d7a0
JD
3789if { (ac_try="$ac_compile"
3790case "(($ac_try" in
3791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3792 *) ac_try_echo=$ac_try;;
3793esac
3794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3795 (eval "$ac_compile") 2>conftest.er1
503d2be0 3796 ac_status=$?
edfaf76d
LK
3797 grep -v '^ *+' conftest.er1 >conftest.err
3798 rm -f conftest.er1
3799 cat conftest.err >&5
c0d27fcc 3800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3801 (exit $ac_status); } && {
3802 test -z "$ac_c_werror_flag" ||
3803 test ! -s conftest.err
3804 } && test -s conftest.$ac_objext; then
503d2be0
AS
3805 ac_compiler_gnu=yes
3806else
3807 echo "$as_me: failed program was:" >&5
19650fd6
AS
3808sed 's/^/| /' conftest.$ac_ext >&5
3809
ca81d7a0 3810 ac_compiler_gnu=no
503d2be0 3811fi
ca81d7a0
JD
3812
3813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3814ac_cv_c_compiler_gnu=$ac_compiler_gnu
3815
3816fi
ca81d7a0
JD
3817{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3818echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3819GCC=`test $ac_compiler_gnu = yes && echo yes`
3820ac_test_CFLAGS=${CFLAGS+set}
3821ac_save_CFLAGS=$CFLAGS
ca81d7a0
JD
3822{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3823echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3824if test "${ac_cv_prog_cc_g+set}" = set; then
3825 echo $ECHO_N "(cached) $ECHO_C" >&6
3826else
ca81d7a0
JD
3827 ac_save_c_werror_flag=$ac_c_werror_flag
3828 ac_c_werror_flag=yes
3829 ac_cv_prog_cc_g=no
3830 CFLAGS="-g"
3831 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3832/* confdefs.h. */
3833_ACEOF
3834cat confdefs.h >>conftest.$ac_ext
3835cat >>conftest.$ac_ext <<_ACEOF
3836/* end confdefs.h. */
503d2be0
AS
3837
3838int
3839main ()
3840{
3841
3842 ;
3843 return 0;
3844}
3845_ACEOF
3846rm -f conftest.$ac_objext
ca81d7a0
JD
3847if { (ac_try="$ac_compile"
3848case "(($ac_try" in
3849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3850 *) ac_try_echo=$ac_try;;
3851esac
3852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3853 (eval "$ac_compile") 2>conftest.er1
503d2be0 3854 ac_status=$?
edfaf76d
LK
3855 grep -v '^ *+' conftest.er1 >conftest.err
3856 rm -f conftest.er1
3857 cat conftest.err >&5
c0d27fcc 3858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3859 (exit $ac_status); } && {
3860 test -z "$ac_c_werror_flag" ||
3861 test ! -s conftest.err
3862 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3863 ac_cv_prog_cc_g=yes
3864else
503d2be0 3865 echo "$as_me: failed program was:" >&5
19650fd6
AS
3866sed 's/^/| /' conftest.$ac_ext >&5
3867
ca81d7a0
JD
3868 CFLAGS=""
3869 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3870/* confdefs.h. */
3871_ACEOF
3872cat confdefs.h >>conftest.$ac_ext
3873cat >>conftest.$ac_ext <<_ACEOF
3874/* end confdefs.h. */
edfaf76d 3875
6bae0ccf
DL
3876int
3877main ()
3878{
ca81d7a0 3879
6bae0ccf
DL
3880 ;
3881 return 0;
3882}
3883_ACEOF
ca81d7a0
JD
3884rm -f conftest.$ac_objext
3885if { (ac_try="$ac_compile"
3886case "(($ac_try" in
3887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3888 *) ac_try_echo=$ac_try;;
3889esac
3890eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3891 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3892 ac_status=$?
edfaf76d
LK
3893 grep -v '^ *+' conftest.er1 >conftest.err
3894 rm -f conftest.er1
3895 cat conftest.err >&5
6bae0ccf 3896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3897 (exit $ac_status); } && {
3898 test -z "$ac_c_werror_flag" ||
3899 test ! -s conftest.err
3900 } && test -s conftest.$ac_objext; then
ca81d7a0 3901 :
6bae0ccf
DL
3902else
3903 echo "$as_me: failed program was:" >&5
19650fd6
AS
3904sed 's/^/| /' conftest.$ac_ext >&5
3905
ca81d7a0
JD
3906 ac_c_werror_flag=$ac_save_c_werror_flag
3907 CFLAGS="-g"
3908 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 3909/* confdefs.h. */
19650fd6
AS
3910_ACEOF
3911cat confdefs.h >>conftest.$ac_ext
3912cat >>conftest.$ac_ext <<_ACEOF
3913/* end confdefs.h. */
ca81d7a0 3914
503d2be0
AS
3915int
3916main ()
3917{
ca81d7a0 3918
503d2be0
AS
3919 ;
3920 return 0;
3921}
3922_ACEOF
3923rm -f conftest.$ac_objext
ca81d7a0
JD
3924if { (ac_try="$ac_compile"
3925case "(($ac_try" in
3926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3927 *) ac_try_echo=$ac_try;;
3928esac
3929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3930 (eval "$ac_compile") 2>conftest.er1
503d2be0 3931 ac_status=$?
edfaf76d
LK
3932 grep -v '^ *+' conftest.er1 >conftest.err
3933 rm -f conftest.er1
3934 cat conftest.err >&5
c0d27fcc 3935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3936 (exit $ac_status); } && {
3937 test -z "$ac_c_werror_flag" ||
3938 test ! -s conftest.err
3939 } && test -s conftest.$ac_objext; then
ca81d7a0 3940 ac_cv_prog_cc_g=yes
503d2be0
AS
3941else
3942 echo "$as_me: failed program was:" >&5
19650fd6
AS
3943sed 's/^/| /' conftest.$ac_ext >&5
3944
ca81d7a0 3945
8eeae1c9 3946fi
ca81d7a0
JD
3947
3948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3949fi
3950
3951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3952fi
3953
3954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3955 ac_c_werror_flag=$ac_save_c_werror_flag
3956fi
3957{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3958echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3959if test "$ac_test_CFLAGS" = set; then
3960 CFLAGS=$ac_save_CFLAGS
3961elif test $ac_cv_prog_cc_g = yes; then
3962 if test "$GCC" = yes; then
3963 CFLAGS="-g -O2"
3964 else
3965 CFLAGS="-g"
3966 fi
3967else
3968 if test "$GCC" = yes; then
3969 CFLAGS="-O2"
3970 else
3971 CFLAGS=
3972 fi
3973fi
3974{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3975echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3976if test "${ac_cv_prog_cc_c89+set}" = set; then
3977 echo $ECHO_N "(cached) $ECHO_C" >&6
3978else
3979 ac_cv_prog_cc_c89=no
3980ac_save_CC=$CC
3981cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3982/* confdefs.h. */
3983_ACEOF
3984cat confdefs.h >>conftest.$ac_ext
3985cat >>conftest.$ac_ext <<_ACEOF
3986/* end confdefs.h. */
ca81d7a0
JD
3987#include <stdarg.h>
3988#include <stdio.h>
3989#include <sys/types.h>
3990#include <sys/stat.h>
3991/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3992struct buf { int x; };
3993FILE * (*rcsopen) (struct buf *, struct stat *, int);
3994static char *e (p, i)
3995 char **p;
3996 int i;
3997{
3998 return p[i];
3999}
4000static char *f (char * (*g) (char **, int), char **p, ...)
4001{
4002 char *s;
4003 va_list v;
4004 va_start (v,p);
4005 s = g (p, va_arg (v,int));
4006 va_end (v);
4007 return s;
4008}
4009
4010/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4011 function prototypes and stuff, but not '\xHH' hex character constants.
4012 These don't provoke an error unfortunately, instead are silently treated
4013 as 'x'. The following induces an error, until -std is added to get
4014 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4015 array size at least. It's necessary to write '\x00'==0 to get something
4016 that's true only with -std. */
4017int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4018
4019/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4020 inside strings and character constants. */
4021#define FOO(x) 'x'
4022int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4023
4024int test (int i, double x);
4025struct s1 {int (*f) (int a);};
4026struct s2 {int (*f) (double a);};
4027int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4028int argc;
4029char **argv;
503d2be0
AS
4030int
4031main ()
4032{
ca81d7a0 4033return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
503d2be0
AS
4034 ;
4035 return 0;
4036}
4037_ACEOF
ca81d7a0
JD
4038for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4039 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4040do
4041 CC="$ac_save_CC $ac_arg"
4042 rm -f conftest.$ac_objext
4043if { (ac_try="$ac_compile"
4044case "(($ac_try" in
4045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4046 *) ac_try_echo=$ac_try;;
4047esac
4048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4049 (eval "$ac_compile") 2>conftest.er1
503d2be0 4050 ac_status=$?
edfaf76d
LK
4051 grep -v '^ *+' conftest.er1 >conftest.err
4052 rm -f conftest.er1
4053 cat conftest.err >&5
c0d27fcc 4054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4055 (exit $ac_status); } && {
4056 test -z "$ac_c_werror_flag" ||
4057 test ! -s conftest.err
4058 } && test -s conftest.$ac_objext; then
ca81d7a0 4059 ac_cv_prog_cc_c89=$ac_arg
503d2be0
AS
4060else
4061 echo "$as_me: failed program was:" >&5
19650fd6
AS
4062sed 's/^/| /' conftest.$ac_ext >&5
4063
ca81d7a0 4064
503d2be0 4065fi
ca81d7a0
JD
4066
4067rm -f core conftest.err conftest.$ac_objext
4068 test "x$ac_cv_prog_cc_c89" != "xno" && break
503d2be0 4069done
ca81d7a0
JD
4070rm -f conftest.$ac_ext
4071CC=$ac_save_CC
4072
503d2be0 4073fi
ca81d7a0
JD
4074# AC_CACHE_VAL
4075case "x$ac_cv_prog_cc_c89" in
4076 x)
4077 { echo "$as_me:$LINENO: result: none needed" >&5
4078echo "${ECHO_T}none needed" >&6; } ;;
4079 xno)
4080 { echo "$as_me:$LINENO: result: unsupported" >&5
4081echo "${ECHO_T}unsupported" >&6; } ;;
4082 *)
4083 CC="$CC $ac_cv_prog_cc_c89"
4084 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
4085echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
4086esac
ba4481b5 4087
19650fd6 4088
503d2be0
AS
4089ac_ext=c
4090ac_cpp='$CPP $CPPFLAGS'
4091ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4092ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4093ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 4094
c0d27fcc 4095
ba4481b5
DL
4096# On Suns, sometimes $CPP names a directory.
4097if test -n "$CPP" && test -d "$CPP"; then
4098 CPP=
4099fi
4100
4101#### Some systems specify a CPP to use unless we are using GCC.
4102#### Now that we know whether we are using GCC, we can decide whether
4103#### to use that one.
4104if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4105then
4106 CPP="$NON_GNU_CPP"
4107fi
4108
4109#### Some systems specify a CC to use unless we are using GCC.
4110#### Now that we know whether we are using GCC, we can decide whether
4111#### to use that one.
4112if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4113 test x$cc_specified != xyes
4114then
4115 CC="$NON_GNU_CC"
4116fi
4117
4118if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
4119then
4120 CC="$CC $GCC_TEST_OPTIONS"
4121fi
4122
4123if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
4124then
4125 CC="$CC $NON_GCC_TEST_OPTIONS"
4126fi
4127
e143ad11
AS
4128
4129ac_ext=c
4130ac_cpp='$CPP $CPPFLAGS'
4131ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4132ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4133ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4134{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4135echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
4136# On Suns, sometimes $CPP names a directory.
4137if test -n "$CPP" && test -d "$CPP"; then
4138 CPP=
4139fi
4140if test -z "$CPP"; then
4141 if test "${ac_cv_prog_CPP+set}" = set; then
4142 echo $ECHO_N "(cached) $ECHO_C" >&6
4143else
4144 # Double quotes because CPP needs to be expanded
4145 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4146 do
4147 ac_preproc_ok=false
4148for ac_c_preproc_warn_flag in '' yes
4149do
4150 # Use a header file that comes with gcc, so configuring glibc
4151 # with a fresh cross-compiler works.
4152 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4153 # <limits.h> exists even on freestanding compilers.
4154 # On the NeXT, cc -E runs the code through the compiler's parser,
4155 # not just through cpp. "Syntax error" is here to catch this case.
4156 cat >conftest.$ac_ext <<_ACEOF
4157/* confdefs.h. */
4158_ACEOF
4159cat confdefs.h >>conftest.$ac_ext
4160cat >>conftest.$ac_ext <<_ACEOF
4161/* end confdefs.h. */
4162#ifdef __STDC__
4163# include <limits.h>
4164#else
4165# include <assert.h>
4166#endif
4167 Syntax error
4168_ACEOF
ca81d7a0
JD
4169if { (ac_try="$ac_cpp conftest.$ac_ext"
4170case "(($ac_try" in
4171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4172 *) ac_try_echo=$ac_try;;
4173esac
4174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4175 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4176 ac_status=$?
4177 grep -v '^ *+' conftest.er1 >conftest.err
4178 rm -f conftest.er1
4179 cat conftest.err >&5
4180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4181 (exit $ac_status); } >/dev/null && {
4182 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4183 test ! -s conftest.err
4184 }; then
e143ad11
AS
4185 :
4186else
4187 echo "$as_me: failed program was:" >&5
4188sed 's/^/| /' conftest.$ac_ext >&5
4189
4190 # Broken: fails on valid input.
4191continue
4192fi
ca81d7a0 4193
e143ad11
AS
4194rm -f conftest.err conftest.$ac_ext
4195
ca81d7a0 4196 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4197 # can be detected and how.
4198 cat >conftest.$ac_ext <<_ACEOF
4199/* confdefs.h. */
4200_ACEOF
4201cat confdefs.h >>conftest.$ac_ext
4202cat >>conftest.$ac_ext <<_ACEOF
4203/* end confdefs.h. */
4204#include <ac_nonexistent.h>
4205_ACEOF
ca81d7a0
JD
4206if { (ac_try="$ac_cpp conftest.$ac_ext"
4207case "(($ac_try" in
4208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4209 *) ac_try_echo=$ac_try;;
4210esac
4211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4212 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4213 ac_status=$?
4214 grep -v '^ *+' conftest.er1 >conftest.err
4215 rm -f conftest.er1
4216 cat conftest.err >&5
4217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4218 (exit $ac_status); } >/dev/null && {
4219 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4220 test ! -s conftest.err
4221 }; then
e143ad11
AS
4222 # Broken: success on invalid input.
4223continue
4224else
4225 echo "$as_me: failed program was:" >&5
4226sed 's/^/| /' conftest.$ac_ext >&5
4227
4228 # Passes both tests.
4229ac_preproc_ok=:
4230break
4231fi
ca81d7a0 4232
e143ad11
AS
4233rm -f conftest.err conftest.$ac_ext
4234
4235done
4236# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4237rm -f conftest.err conftest.$ac_ext
4238if $ac_preproc_ok; then
4239 break
4240fi
4241
4242 done
4243 ac_cv_prog_CPP=$CPP
4244
4245fi
4246 CPP=$ac_cv_prog_CPP
4247else
4248 ac_cv_prog_CPP=$CPP
4249fi
ca81d7a0
JD
4250{ echo "$as_me:$LINENO: result: $CPP" >&5
4251echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
4252ac_preproc_ok=false
4253for ac_c_preproc_warn_flag in '' yes
4254do
4255 # Use a header file that comes with gcc, so configuring glibc
4256 # with a fresh cross-compiler works.
4257 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4258 # <limits.h> exists even on freestanding compilers.
4259 # On the NeXT, cc -E runs the code through the compiler's parser,
4260 # not just through cpp. "Syntax error" is here to catch this case.
4261 cat >conftest.$ac_ext <<_ACEOF
4262/* confdefs.h. */
4263_ACEOF
4264cat confdefs.h >>conftest.$ac_ext
4265cat >>conftest.$ac_ext <<_ACEOF
4266/* end confdefs.h. */
4267#ifdef __STDC__
4268# include <limits.h>
4269#else
4270# include <assert.h>
4271#endif
4272 Syntax error
4273_ACEOF
ca81d7a0
JD
4274if { (ac_try="$ac_cpp conftest.$ac_ext"
4275case "(($ac_try" in
4276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4277 *) ac_try_echo=$ac_try;;
4278esac
4279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4280 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4281 ac_status=$?
4282 grep -v '^ *+' conftest.er1 >conftest.err
4283 rm -f conftest.er1
4284 cat conftest.err >&5
4285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4286 (exit $ac_status); } >/dev/null && {
4287 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4288 test ! -s conftest.err
4289 }; then
e143ad11
AS
4290 :
4291else
4292 echo "$as_me: failed program was:" >&5
4293sed 's/^/| /' conftest.$ac_ext >&5
4294
4295 # Broken: fails on valid input.
4296continue
4297fi
ca81d7a0 4298
e143ad11
AS
4299rm -f conftest.err conftest.$ac_ext
4300
ca81d7a0 4301 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4302 # can be detected and how.
4303 cat >conftest.$ac_ext <<_ACEOF
4304/* confdefs.h. */
4305_ACEOF
4306cat confdefs.h >>conftest.$ac_ext
4307cat >>conftest.$ac_ext <<_ACEOF
4308/* end confdefs.h. */
4309#include <ac_nonexistent.h>
4310_ACEOF
ca81d7a0
JD
4311if { (ac_try="$ac_cpp conftest.$ac_ext"
4312case "(($ac_try" in
4313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4314 *) ac_try_echo=$ac_try;;
4315esac
4316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4317 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4318 ac_status=$?
4319 grep -v '^ *+' conftest.er1 >conftest.err
4320 rm -f conftest.er1
4321 cat conftest.err >&5
4322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4323 (exit $ac_status); } >/dev/null && {
4324 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4325 test ! -s conftest.err
4326 }; then
e143ad11
AS
4327 # Broken: success on invalid input.
4328continue
4329else
4330 echo "$as_me: failed program was:" >&5
4331sed 's/^/| /' conftest.$ac_ext >&5
4332
4333 # Passes both tests.
4334ac_preproc_ok=:
4335break
4336fi
ca81d7a0 4337
e143ad11
AS
4338rm -f conftest.err conftest.$ac_ext
4339
4340done
4341# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4342rm -f conftest.err conftest.$ac_ext
4343if $ac_preproc_ok; then
4344 :
4345else
4346 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4347See \`config.log' for more details." >&5
4348echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4349See \`config.log' for more details." >&2;}
4350 { (exit 1); exit 1; }; }
4351fi
4352
4353ac_ext=c
4354ac_cpp='$CPP $CPPFLAGS'
4355ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4356ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4357ac_compiler_gnu=$ac_cv_c_compiler_gnu
4358
4359
ca81d7a0
JD
4360{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4361echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4362if test "${ac_cv_path_GREP+set}" = set; then
4363 echo $ECHO_N "(cached) $ECHO_C" >&6
4364else
4365 # Extract the first word of "grep ggrep" to use in msg output
4366if test -z "$GREP"; then
4367set dummy grep ggrep; ac_prog_name=$2
4368if test "${ac_cv_path_GREP+set}" = set; then
4369 echo $ECHO_N "(cached) $ECHO_C" >&6
4370else
4371 ac_path_GREP_found=false
4372# Loop through the user's path and test for each of PROGNAME-LIST
4373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4374for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4375do
4376 IFS=$as_save_IFS
4377 test -z "$as_dir" && as_dir=.
4378 for ac_prog in grep ggrep; do
4379 for ac_exec_ext in '' $ac_executable_extensions; do
4380 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4381 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
ca81d7a0
JD
4382 # Check for GNU ac_path_GREP and select it if it is found.
4383 # Check for GNU $ac_path_GREP
4384case `"$ac_path_GREP" --version 2>&1` in
4385*GNU*)
4386 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4387*)
4388 ac_count=0
4389 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4390 while :
4391 do
4392 cat "conftest.in" "conftest.in" >"conftest.tmp"
4393 mv "conftest.tmp" "conftest.in"
4394 cp "conftest.in" "conftest.nl"
4395 echo 'GREP' >> "conftest.nl"
4396 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4397 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4398 ac_count=`expr $ac_count + 1`
4399 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4400 # Best one so far, save it but keep looking for a better one
4401 ac_cv_path_GREP="$ac_path_GREP"
4402 ac_path_GREP_max=$ac_count
4403 fi
4404 # 10*(2^10) chars as input seems more than enough
4405 test $ac_count -gt 10 && break
4406 done
4407 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4408esac
4409
4410
4411 $ac_path_GREP_found && break 3
4412 done
4413done
4414
4415done
4416IFS=$as_save_IFS
4417
4418
4419fi
4420
4421GREP="$ac_cv_path_GREP"
4422if test -z "$GREP"; then
4423 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4424echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4425 { (exit 1); exit 1; }; }
4426fi
4427
4428else
4429 ac_cv_path_GREP=$GREP
4430fi
4431
4432
4433fi
4434{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4435echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4436 GREP="$ac_cv_path_GREP"
4437
4438
4439{ echo "$as_me:$LINENO: checking for egrep" >&5
4440echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4441if test "${ac_cv_path_EGREP+set}" = set; then
8eeae1c9
JD
4442 echo $ECHO_N "(cached) $ECHO_C" >&6
4443else
ca81d7a0
JD
4444 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4445 then ac_cv_path_EGREP="$GREP -E"
4446 else
4447 # Extract the first word of "egrep" to use in msg output
4448if test -z "$EGREP"; then
4449set dummy egrep; ac_prog_name=$2
4450if test "${ac_cv_path_EGREP+set}" = set; then
4451 echo $ECHO_N "(cached) $ECHO_C" >&6
4452else
4453 ac_path_EGREP_found=false
4454# Loop through the user's path and test for each of PROGNAME-LIST
4455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4456for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4457do
4458 IFS=$as_save_IFS
4459 test -z "$as_dir" && as_dir=.
4460 for ac_prog in egrep; do
4461 for ac_exec_ext in '' $ac_executable_extensions; do
4462 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4463 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
ca81d7a0
JD
4464 # Check for GNU ac_path_EGREP and select it if it is found.
4465 # Check for GNU $ac_path_EGREP
4466case `"$ac_path_EGREP" --version 2>&1` in
4467*GNU*)
4468 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4469*)
4470 ac_count=0
4471 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4472 while :
4473 do
4474 cat "conftest.in" "conftest.in" >"conftest.tmp"
4475 mv "conftest.tmp" "conftest.in"
4476 cp "conftest.in" "conftest.nl"
4477 echo 'EGREP' >> "conftest.nl"
4478 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4479 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4480 ac_count=`expr $ac_count + 1`
4481 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4482 # Best one so far, save it but keep looking for a better one
4483 ac_cv_path_EGREP="$ac_path_EGREP"
4484 ac_path_EGREP_max=$ac_count
e143ad11 4485 fi
ca81d7a0
JD
4486 # 10*(2^10) chars as input seems more than enough
4487 test $ac_count -gt 10 && break
4488 done
4489 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4490esac
4491
4492
4493 $ac_path_EGREP_found && break 3
4494 done
4495done
4496
4497done
4498IFS=$as_save_IFS
4499
4500
4501fi
4502
4503EGREP="$ac_cv_path_EGREP"
4504if test -z "$EGREP"; then
4505 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4506echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4507 { (exit 1); exit 1; }; }
4508fi
4509
4510else
4511 ac_cv_path_EGREP=$EGREP
4512fi
4513
4514
4515 fi
8eeae1c9 4516fi
ca81d7a0
JD
4517{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4518echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4519 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4520
4521
4522
ca81d7a0
JD
4523{ echo "$as_me:$LINENO: checking for AIX" >&5
4524echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4525cat >conftest.$ac_ext <<_ACEOF
4526/* confdefs.h. */
4527_ACEOF
4528cat confdefs.h >>conftest.$ac_ext
4529cat >>conftest.$ac_ext <<_ACEOF
4530/* end confdefs.h. */
4531#ifdef _AIX
4532 yes
4533#endif
4534
4535_ACEOF
4536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4537 $EGREP "yes" >/dev/null 2>&1; then
ca81d7a0
JD
4538 { echo "$as_me:$LINENO: result: yes" >&5
4539echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4540cat >>confdefs.h <<\_ACEOF
4541#define _ALL_SOURCE 1
4542_ACEOF
4543
4544else
ca81d7a0
JD
4545 { echo "$as_me:$LINENO: result: no" >&5
4546echo "${ECHO_T}no" >&6; }
e143ad11
AS
4547fi
4548rm -f conftest*
4549
4550
4551
4552cat >>confdefs.h <<\_ACEOF
4553#define _GNU_SOURCE 1
4554_ACEOF
4555
4556
4557
01abe918 4558### Use -Wno-pointer-sign if the compiler supports it
ca81d7a0
JD
4559{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4560echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4561SAVE_CFLAGS="$CFLAGS"
4562CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4563cat >conftest.$ac_ext <<_ACEOF
4564/* confdefs.h. */
4565_ACEOF
4566cat confdefs.h >>conftest.$ac_ext
4567cat >>conftest.$ac_ext <<_ACEOF
4568/* end confdefs.h. */
4569
4570int
4571main ()
4572{
4573
4574 ;
4575 return 0;
4576}
4577_ACEOF
4578rm -f conftest.$ac_objext
ca81d7a0
JD
4579if { (ac_try="$ac_compile"
4580case "(($ac_try" in
4581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4582 *) ac_try_echo=$ac_try;;
4583esac
4584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4585 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4586 ac_status=$?
4587 grep -v '^ *+' conftest.er1 >conftest.err
4588 rm -f conftest.er1
4589 cat conftest.err >&5
4590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4591 (exit $ac_status); } && {
4592 test -z "$ac_c_werror_flag" ||
4593 test ! -s conftest.err
4594 } && test -s conftest.$ac_objext; then
01abe918
CY
4595 has_option=yes
4596else
4597 echo "$as_me: failed program was:" >&5
4598sed 's/^/| /' conftest.$ac_ext >&5
4599
ca81d7a0 4600 has_option=no
01abe918 4601fi
ca81d7a0
JD
4602
4603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4604if test $has_option = yes; then
4605 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4606fi
ca81d7a0
JD
4607{ echo "$as_me:$LINENO: result: $has_option" >&5
4608echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4609CFLAGS="$SAVE_CFLAGS"
4610unset has_option
4611unset SAVE_CFLAGS
4612
6a3a24fa 4613#### Some other nice autoconf tests.
ba4481b5 4614
ca81d7a0
JD
4615{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4616echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4617LN_S=$as_ln_s
4618if test "$LN_S" = "ln -s"; then
ca81d7a0
JD
4619 { echo "$as_me:$LINENO: result: yes" >&5
4620echo "${ECHO_T}yes" >&6; }
ba4481b5 4621else
ca81d7a0
JD
4622 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4623echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4624fi
4625
503d2be0
AS
4626ac_ext=c
4627ac_cpp='$CPP $CPPFLAGS'
4628ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4629ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4630ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4631{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4632echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4633# On Suns, sometimes $CPP names a directory.
4634if test -n "$CPP" && test -d "$CPP"; then
4635 CPP=
4636fi
4637if test -z "$CPP"; then
503d2be0
AS
4638 if test "${ac_cv_prog_CPP+set}" = set; then
4639 echo $ECHO_N "(cached) $ECHO_C" >&6
4640else
4641 # Double quotes because CPP needs to be expanded
4642 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4643 do
4644 ac_preproc_ok=false
4645for ac_c_preproc_warn_flag in '' yes
4646do
4647 # Use a header file that comes with gcc, so configuring glibc
4648 # with a fresh cross-compiler works.
19650fd6
AS
4649 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4650 # <limits.h> exists even on freestanding compilers.
ba4481b5 4651 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4652 # not just through cpp. "Syntax error" is here to catch this case.
4653 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4654/* confdefs.h. */
4655_ACEOF
4656cat confdefs.h >>conftest.$ac_ext
4657cat >>conftest.$ac_ext <<_ACEOF
4658/* end confdefs.h. */
4659#ifdef __STDC__
4660# include <limits.h>
4661#else
4662# include <assert.h>
4663#endif
edfaf76d 4664 Syntax error
503d2be0 4665_ACEOF
ca81d7a0
JD
4666if { (ac_try="$ac_cpp conftest.$ac_ext"
4667case "(($ac_try" in
4668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4669 *) ac_try_echo=$ac_try;;
4670esac
4671eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4672 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4673 ac_status=$?
6bae0ccf 4674 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4675 rm -f conftest.er1
4676 cat conftest.err >&5
c0d27fcc 4677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4678 (exit $ac_status); } >/dev/null && {
4679 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4680 test ! -s conftest.err
4681 }; then
ba4481b5
DL
4682 :
4683else
503d2be0 4684 echo "$as_me: failed program was:" >&5
19650fd6
AS
4685sed 's/^/| /' conftest.$ac_ext >&5
4686
503d2be0
AS
4687 # Broken: fails on valid input.
4688continue
4689fi
ca81d7a0 4690
503d2be0
AS
4691rm -f conftest.err conftest.$ac_ext
4692
ca81d7a0 4693 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4694 # can be detected and how.
4695 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4696/* confdefs.h. */
4697_ACEOF
4698cat confdefs.h >>conftest.$ac_ext
4699cat >>conftest.$ac_ext <<_ACEOF
4700/* end confdefs.h. */
503d2be0
AS
4701#include <ac_nonexistent.h>
4702_ACEOF
ca81d7a0
JD
4703if { (ac_try="$ac_cpp conftest.$ac_ext"
4704case "(($ac_try" in
4705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4706 *) ac_try_echo=$ac_try;;
4707esac
4708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4709 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4710 ac_status=$?
6bae0ccf 4711 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4712 rm -f conftest.er1
4713 cat conftest.err >&5
c0d27fcc 4714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4715 (exit $ac_status); } >/dev/null && {
4716 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4717 test ! -s conftest.err
4718 }; then
503d2be0
AS
4719 # Broken: success on invalid input.
4720continue
c4bb2108 4721else
503d2be0 4722 echo "$as_me: failed program was:" >&5
19650fd6
AS
4723sed 's/^/| /' conftest.$ac_ext >&5
4724
503d2be0
AS
4725 # Passes both tests.
4726ac_preproc_ok=:
4727break
4728fi
ca81d7a0 4729
503d2be0
AS
4730rm -f conftest.err conftest.$ac_ext
4731
4732done
4733# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4734rm -f conftest.err conftest.$ac_ext
4735if $ac_preproc_ok; then
4736 break
4737fi
4738
4739 done
4740 ac_cv_prog_CPP=$CPP
4741
4742fi
4743 CPP=$ac_cv_prog_CPP
4744else
4745 ac_cv_prog_CPP=$CPP
4746fi
ca81d7a0
JD
4747{ echo "$as_me:$LINENO: result: $CPP" >&5
4748echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4749ac_preproc_ok=false
4750for ac_c_preproc_warn_flag in '' yes
4751do
4752 # Use a header file that comes with gcc, so configuring glibc
4753 # with a fresh cross-compiler works.
19650fd6
AS
4754 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4755 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4756 # On the NeXT, cc -E runs the code through the compiler's parser,
4757 # not just through cpp. "Syntax error" is here to catch this case.
4758 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4759/* confdefs.h. */
4760_ACEOF
4761cat confdefs.h >>conftest.$ac_ext
4762cat >>conftest.$ac_ext <<_ACEOF
4763/* end confdefs.h. */
4764#ifdef __STDC__
4765# include <limits.h>
4766#else
4767# include <assert.h>
4768#endif
edfaf76d 4769 Syntax error
503d2be0 4770_ACEOF
ca81d7a0
JD
4771if { (ac_try="$ac_cpp conftest.$ac_ext"
4772case "(($ac_try" in
4773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4774 *) ac_try_echo=$ac_try;;
4775esac
4776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4777 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4778 ac_status=$?
6bae0ccf 4779 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4780 rm -f conftest.er1
4781 cat conftest.err >&5
c0d27fcc 4782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4783 (exit $ac_status); } >/dev/null && {
4784 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4785 test ! -s conftest.err
4786 }; then
ba4481b5
DL
4787 :
4788else
503d2be0 4789 echo "$as_me: failed program was:" >&5
19650fd6
AS
4790sed 's/^/| /' conftest.$ac_ext >&5
4791
503d2be0
AS
4792 # Broken: fails on valid input.
4793continue
4794fi
ca81d7a0 4795
503d2be0
AS
4796rm -f conftest.err conftest.$ac_ext
4797
ca81d7a0 4798 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4799 # can be detected and how.
4800 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4801/* confdefs.h. */
4802_ACEOF
4803cat confdefs.h >>conftest.$ac_ext
4804cat >>conftest.$ac_ext <<_ACEOF
4805/* end confdefs.h. */
503d2be0
AS
4806#include <ac_nonexistent.h>
4807_ACEOF
ca81d7a0
JD
4808if { (ac_try="$ac_cpp conftest.$ac_ext"
4809case "(($ac_try" in
4810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4811 *) ac_try_echo=$ac_try;;
4812esac
4813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4814 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4815 ac_status=$?
6bae0ccf 4816 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4817 rm -f conftest.er1
4818 cat conftest.err >&5
c0d27fcc 4819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4820 (exit $ac_status); } >/dev/null && {
4821 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4822 test ! -s conftest.err
4823 }; then
503d2be0
AS
4824 # Broken: success on invalid input.
4825continue
4826else
4827 echo "$as_me: failed program was:" >&5
19650fd6
AS
4828sed 's/^/| /' conftest.$ac_ext >&5
4829
503d2be0
AS
4830 # Passes both tests.
4831ac_preproc_ok=:
4832break
ba4481b5 4833fi
ca81d7a0 4834
503d2be0
AS
4835rm -f conftest.err conftest.$ac_ext
4836
4837done
4838# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4839rm -f conftest.err conftest.$ac_ext
4840if $ac_preproc_ok; then
4841 :
ba4481b5 4842else
19650fd6
AS
4843 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4844See \`config.log' for more details." >&5
4845echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4846See \`config.log' for more details." >&2;}
503d2be0 4847 { (exit 1); exit 1; }; }
ba4481b5 4848fi
503d2be0
AS
4849
4850ac_ext=c
4851ac_cpp='$CPP $CPPFLAGS'
4852ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4853ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4854ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4855
4856# Find a good install program. We prefer a C program (faster),
4857# so one script is as good as another. But avoid the broken or
4858# incompatible versions:
4859# SysV /etc/install, /usr/sbin/install
4860# SunOS /usr/etc/install
4861# IRIX /sbin/install
4862# AIX /bin/install
503d2be0 4863# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4864# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4865# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4866# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4867# OS/2's system install, which has a completely different semantic
ba4481b5 4868# ./install, which can be erroneously created by make from ./install.sh.
ca81d7a0
JD
4869{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4870echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 4871if test -z "$INSTALL"; then
503d2be0
AS
4872if test "${ac_cv_path_install+set}" = set; then
4873 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4874else
c0d27fcc
MR
4875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4876for as_dir in $PATH
4877do
4878 IFS=$as_save_IFS
4879 test -z "$as_dir" && as_dir=.
4880 # Account for people who put trailing slashes in PATH elements.
4881case $as_dir/ in
4882 ./ | .// | /cC/* | \
4883 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4884 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4885 /usr/ucb/* ) ;;
4886 *)
4887 # OSF1 and SCO ODT 3.0 have their own names for install.
4888 # Don't use installbsd from OSF since it installs stuff as root
4889 # by default.
4890 for ac_prog in ginstall scoinst install; do
4891 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4892 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4893 if test $ac_prog = install &&
4894 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4895 # AIX install. It has an incompatible calling convention.
4896 :
4897 elif test $ac_prog = install &&
4898 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4899 # program-specific install script used by HP pwplus--don't use.
4900 :
4901 else
4902 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4903 break 3
4904 fi
4905 fi
ba4481b5 4906 done
c0d27fcc
MR
4907 done
4908 ;;
4909esac
4910done
ca81d7a0 4911IFS=$as_save_IFS
c0d27fcc 4912
ba4481b5
DL
4913
4914fi
4915 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4916 INSTALL=$ac_cv_path_install
ba4481b5 4917 else
ca81d7a0
JD
4918 # As a last resort, use the slow shell script. Don't cache a
4919 # value for INSTALL within a source directory, because that will
ba4481b5 4920 # break other packages using the cache if that directory is
ca81d7a0 4921 # removed, or if the value is a relative name.
503d2be0 4922 INSTALL=$ac_install_sh
ba4481b5
DL
4923 fi
4924fi
ca81d7a0
JD
4925{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4926echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
4927
4928# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4929# It thinks the first close brace ends the variable substitution.
4930test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4931
503d2be0 4932test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 4933
ba4481b5
DL
4934test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4935
c0d27fcc
MR
4936if test "x$RANLIB" = x; then
4937 if test -n "$ac_tool_prefix"; then
4938 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4939set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ca81d7a0
JD
4940{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4941echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 4942if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 4943 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
4944else
4945 if test -n "$RANLIB"; then
4946 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4947else
c0d27fcc
MR
4948as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4949for as_dir in $PATH
4950do
4951 IFS=$as_save_IFS
4952 test -z "$as_dir" && as_dir=.
4953 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4954 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
4955 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4956 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4957 break 2
4958 fi
4959done
503d2be0 4960done
ca81d7a0 4961IFS=$as_save_IFS
503d2be0 4962
7397acc4
DL
4963fi
4964fi
503d2be0 4965RANLIB=$ac_cv_prog_RANLIB
7397acc4 4966if test -n "$RANLIB"; then
ca81d7a0
JD
4967 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4968echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 4969else
ca81d7a0
JD
4970 { echo "$as_me:$LINENO: result: no" >&5
4971echo "${ECHO_T}no" >&6; }
503d2be0
AS
4972fi
4973
ca81d7a0 4974
503d2be0
AS
4975fi
4976if test -z "$ac_cv_prog_RANLIB"; then
4977 ac_ct_RANLIB=$RANLIB
4978 # Extract the first word of "ranlib", so it can be a program name with args.
4979set dummy ranlib; ac_word=$2
ca81d7a0
JD
4980{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4981echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
4982if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4983 echo $ECHO_N "(cached) $ECHO_C" >&6
4984else
4985 if test -n "$ac_ct_RANLIB"; then
4986 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4987else
c0d27fcc
MR
4988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4989for as_dir in $PATH
4990do
4991 IFS=$as_save_IFS
4992 test -z "$as_dir" && as_dir=.
4993 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4994 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
4995 ac_cv_prog_ac_ct_RANLIB="ranlib"
4996 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4997 break 2
4998 fi
4999done
503d2be0 5000done
ca81d7a0 5001IFS=$as_save_IFS
503d2be0 5002
503d2be0
AS
5003fi
5004fi
5005ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5006if test -n "$ac_ct_RANLIB"; then
ca81d7a0
JD
5007 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5008echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5009else
ca81d7a0
JD
5010 { echo "$as_me:$LINENO: result: no" >&5
5011echo "${ECHO_T}no" >&6; }
503d2be0
AS
5012fi
5013
ca81d7a0
JD
5014 if test "x$ac_ct_RANLIB" = x; then
5015 RANLIB=":"
5016 else
5017 case $cross_compiling:$ac_tool_warned in
5018yes:)
5019{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5020whose name does not start with the host triplet. If you think this
5021configuration is useful to you, please write to autoconf@gnu.org." >&5
5022echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5023whose name does not start with the host triplet. If you think this
5024configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5025ac_tool_warned=yes ;;
5026esac
5027 RANLIB=$ac_ct_RANLIB
5028 fi
7397acc4 5029else
503d2be0 5030 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5031fi
5032
5033fi
9e71690e
DK
5034# Extract the first word of "install-info", so it can be a program name with args.
5035set dummy install-info; ac_word=$2
ca81d7a0
JD
5036{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5037echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5038if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5039 echo $ECHO_N "(cached) $ECHO_C" >&6
5040else
5041 case $INSTALL_INFO in
5042 [\\/]* | ?:[\\/]*)
5043 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5044 ;;
5045 *)
5046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5047for as_dir in $PATH
5048do
5049 IFS=$as_save_IFS
5050 test -z "$as_dir" && as_dir=.
5051 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5052 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5053 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5054 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5055 break 2
5056 fi
5057done
5058done
ca81d7a0 5059IFS=$as_save_IFS
9e71690e
DK
5060
5061 ;;
5062esac
5063fi
5064INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5065if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5066 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5067echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5068else
ca81d7a0
JD
5069 { echo "$as_me:$LINENO: result: no" >&5
5070echo "${ECHO_T}no" >&6; }
9e71690e
DK
5071fi
5072
ca81d7a0 5073
9e71690e
DK
5074# Extract the first word of "install-info", so it can be a program name with args.
5075set dummy install-info; ac_word=$2
ca81d7a0
JD
5076{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5077echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5078if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5079 echo $ECHO_N "(cached) $ECHO_C" >&6
5080else
5081 case $INSTALL_INFO in
5082 [\\/]* | ?:[\\/]*)
5083 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5084 ;;
5085 *)
5086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5087for as_dir in /usr/sbin
5088do
5089 IFS=$as_save_IFS
5090 test -z "$as_dir" && as_dir=.
5091 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5092 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5093 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5094 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5095 break 2
5096 fi
5097done
5098done
ca81d7a0 5099IFS=$as_save_IFS
9e71690e
DK
5100
5101 ;;
5102esac
5103fi
5104INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5105if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5106 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5107echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5108else
ca81d7a0
JD
5109 { echo "$as_me:$LINENO: result: no" >&5
5110echo "${ECHO_T}no" >&6; }
9e71690e
DK
5111fi
5112
ca81d7a0 5113
9e71690e
DK
5114# Extract the first word of "install-info", so it can be a program name with args.
5115set dummy install-info; ac_word=$2
ca81d7a0
JD
5116{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5117echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5118if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5119 echo $ECHO_N "(cached) $ECHO_C" >&6
5120else
5121 case $INSTALL_INFO in
5122 [\\/]* | ?:[\\/]*)
5123 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5124 ;;
5125 *)
5126 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5127for as_dir in /sbin
5128do
5129 IFS=$as_save_IFS
5130 test -z "$as_dir" && as_dir=.
5131 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5132 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5133 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5134 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5135 break 2
5136 fi
5137done
5138done
ca81d7a0 5139IFS=$as_save_IFS
9e71690e
DK
5140
5141 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5142 ;;
5143esac
5144fi
5145INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5146if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5147 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5148echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5149else
ca81d7a0
JD
5150 { echo "$as_me:$LINENO: result: no" >&5
5151echo "${ECHO_T}no" >&6; }
9e71690e
DK
5152fi
5153
ca81d7a0 5154
8ae52ca6
RF
5155# Extract the first word of "gzip", so it can be a program name with args.
5156set dummy gzip; ac_word=$2
ca81d7a0
JD
5157{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5158echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5159if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5160 echo $ECHO_N "(cached) $ECHO_C" >&6
5161else
46e35e9f 5162 case $GZIP_PROG in
8ae52ca6 5163 [\\/]* | ?:[\\/]*)
46e35e9f 5164 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5165 ;;
5166 *)
5167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5168for as_dir in $PATH
5169do
5170 IFS=$as_save_IFS
5171 test -z "$as_dir" && as_dir=.
5172 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5173 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5174 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5175 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5176 break 2
5177 fi
5178done
5179done
ca81d7a0 5180IFS=$as_save_IFS
8ae52ca6
RF
5181
5182 ;;
5183esac
5184fi
46e35e9f 5185GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5186if test -n "$GZIP_PROG"; then
ca81d7a0
JD
5187 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5188echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5189else
ca81d7a0
JD
5190 { echo "$as_me:$LINENO: result: no" >&5
5191echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5192fi
5193
ba4481b5 5194
c0d27fcc 5195
ca81d7a0 5196
8e967cf7
MR
5197if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5198then
5199 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5200fi
5201
5202if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5203then
5204 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5205fi
5206
c0d27fcc 5207
fe239f0f 5208late_LDFLAGS=$LDFLAGS
4af002d6 5209if test "$GCC" = yes; then
fe239f0f
AS
5210 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5211else
5212 LDFLAGS="$LDFLAGS -znocombreloc"
5213fi
5214
ca81d7a0
JD
5215{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5216echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5217cat >conftest.$ac_ext <<_ACEOF
5218main(){return 0;}
5219_ACEOF
5220rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5221if { (ac_try="$ac_link"
5222case "(($ac_try" in
5223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5224 *) ac_try_echo=$ac_try;;
5225esac
5226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5227 (eval "$ac_link") 2>conftest.er1
fe239f0f 5228 ac_status=$?
edfaf76d
LK
5229 grep -v '^ *+' conftest.er1 >conftest.err
5230 rm -f conftest.er1
5231 cat conftest.err >&5
fe239f0f 5232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5233 (exit $ac_status); } && {
5234 test -z "$ac_c_werror_flag" ||
5235 test ! -s conftest.err
5236 } && test -s conftest$ac_exeext &&
5237 $as_test_x conftest$ac_exeext; then
ca81d7a0
JD
5238 { echo "$as_me:$LINENO: result: yes" >&5
5239echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5240else
5241 echo "$as_me: failed program was:" >&5
5242sed 's/^/| /' conftest.$ac_ext >&5
5243
ca81d7a0
JD
5244 LDFLAGS=$late_LDFLAGS
5245 { echo "$as_me:$LINENO: result: no" >&5
5246echo "${ECHO_T}no" >&6; }
fe239f0f 5247fi
ca81d7a0 5248
f053c89f 5249rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5250 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5251
3b33a005
DL
5252#### Extract some information from the operating system and machine files.
5253
c0d27fcc 5254{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5255 - which libraries the lib-src programs will want, and
503d2be0
AS
5256 - whether the GNU malloc routines are usable..." >&5
5257echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5258 - which libraries the lib-src programs will want, and
503d2be0 5259 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5260
5261### First figure out CFLAGS (which we use for running the compiler here)
5262### and REAL_CFLAGS (which we use for real compilation).
5263### The two are the same except on a few systems, where they are made
5264### different to work around various lossages. For example,
5265### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5266### as implying static linking.
5267
5268### If the CFLAGS env var is specified, we use that value
5269### instead of the default.
5270
5271### It's not important that this name contain the PID; you can't run
5272### two configures in the same directory and have anything work
5273### anyway.
5274tempcname="conftest.c"
5275
5276echo '
5277#include "'${srcdir}'/src/'${opsysfile}'"
5278#include "'${srcdir}'/src/'${machfile}'"
5279#ifndef LIBS_MACHINE
5280#define LIBS_MACHINE
5281#endif
5282#ifndef LIBS_SYSTEM
5283#define LIBS_SYSTEM
5284#endif
5285#ifndef C_SWITCH_SYSTEM
5286#define C_SWITCH_SYSTEM
5287#endif
5288#ifndef C_SWITCH_MACHINE
5289#define C_SWITCH_MACHINE
5290#endif
5291configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5292configure___ c_switch_system=C_SWITCH_SYSTEM
5293configure___ c_switch_machine=C_SWITCH_MACHINE
5294
5295#ifndef LIB_X11_LIB
5296#define LIB_X11_LIB -lX11
5297#endif
5298
5299#ifndef LIBX11_MACHINE
5300#define LIBX11_MACHINE
5301#endif
5302
5303#ifndef LIBX11_SYSTEM
5304#define LIBX11_SYSTEM
5305#endif
5306configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
5307
5308#ifdef UNEXEC
5309configure___ unexec=UNEXEC
5310#else
5311configure___ unexec=unexec.o
5312#endif
5313
5314#ifdef SYSTEM_MALLOC
5315configure___ system_malloc=yes
5316#else
5317configure___ system_malloc=no
5318#endif
5319
ef9e4345
GM
5320#ifdef USE_MMAP_FOR_BUFFERS
5321configure___ use_mmap_for_buffers=yes
73b77ee5 5322#else
ef9e4345 5323configure___ use_mmap_for_buffers=no
73b77ee5
GM
5324#endif
5325
3b33a005
DL
5326#ifndef C_DEBUG_SWITCH
5327#define C_DEBUG_SWITCH -g
5328#endif
5329
5330#ifndef C_OPTIMIZE_SWITCH
5331#ifdef __GNUC__
5332#define C_OPTIMIZE_SWITCH -O2
5333#else
5334#define C_OPTIMIZE_SWITCH -O
5335#endif
5336#endif
5337
01abe918
CY
5338#ifndef C_WARNINGS_SWITCH
5339#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5340#endif
5341
3b33a005
DL
5342#ifndef LD_SWITCH_MACHINE
5343#define LD_SWITCH_MACHINE
5344#endif
5345
5346#ifndef LD_SWITCH_SYSTEM
5347#define LD_SWITCH_SYSTEM
5348#endif
5349
5350#ifndef LD_SWITCH_X_SITE_AUX
5351#define LD_SWITCH_X_SITE_AUX
503d2be0 5352#endif
3b33a005
DL
5353
5354configure___ ld_switch_system=LD_SWITCH_SYSTEM
5355configure___ ld_switch_machine=LD_SWITCH_MACHINE
5356
5357#ifdef THIS_IS_CONFIGURE
5358
5359/* Get the CFLAGS for tests in configure. */
5360#ifdef __GNUC__
5361configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5362#else
5363configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5364#endif
5365
5366#else /* not THIS_IS_CONFIGURE */
5367
5368/* Get the CFLAGS for real compilation. */
5369#ifdef __GNUC__
01abe918 5370configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5371#else
5372configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5373#endif
5374
5375#endif /* not THIS_IS_CONFIGURE */
5376' > ${tempcname}
5377
5378# The value of CPP is a quoted variable reference, so we need to do this
5379# to get its actual value...
5380CPP=`eval "echo $CPP"`
5381eval `${CPP} -Isrc ${tempcname} \
5382 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5383if test "x$SPECIFIED_CFLAGS" = x; then
5384 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5385 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5386else
5387 REAL_CFLAGS="$CFLAGS"
5388fi
5389rm ${tempcname}
5390
5391ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5392
5393### Make sure subsequent tests use flags consistent with the build flags.
5394
5395if test x"${OVERRIDE_CPPFLAGS}" != x; then
5396 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5397else
5398 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5399fi
5400
6bae0ccf
DL
5401
5402
ca81d7a0 5403# Check whether --enable-largefile was given.
f4988be7 5404if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5405 enableval=$enable_largefile;
5406fi
f4988be7 5407
503d2be0 5408if test "$enable_largefile" != no; then
f4988be7 5409
ca81d7a0
JD
5410 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5411echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5412if test "${ac_cv_sys_largefile_CC+set}" = set; then
5413 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5414else
f4988be7 5415 ac_cv_sys_largefile_CC=no
503d2be0
AS
5416 if test "$GCC" != yes; then
5417 ac_save_CC=$CC
5418 while :; do
ca81d7a0
JD
5419 # IRIX 6.2 and later do not support large files by default,
5420 # so use the C compiler's -n32 option if that helps.
edfaf76d 5421 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5422/* confdefs.h. */
5423_ACEOF
5424cat confdefs.h >>conftest.$ac_ext
5425cat >>conftest.$ac_ext <<_ACEOF
5426/* end confdefs.h. */
f4988be7 5427#include <sys/types.h>
503d2be0
AS
5428 /* Check that off_t can represent 2**63 - 1 correctly.
5429 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5430 since some C++ compilers masquerading as C compilers
5431 incorrectly reject 9223372036854775807. */
5432#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5433 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5434 && LARGE_OFF_T % 2147483647 == 1)
5435 ? 1 : -1];
5436int
5437main ()
5438{
f4988be7 5439
503d2be0
AS
5440 ;
5441 return 0;
5442}
5443_ACEOF
ca81d7a0
JD
5444 rm -f conftest.$ac_objext
5445if { (ac_try="$ac_compile"
5446case "(($ac_try" in
5447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5448 *) ac_try_echo=$ac_try;;
5449esac
5450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5451 (eval "$ac_compile") 2>conftest.er1
503d2be0 5452 ac_status=$?
edfaf76d
LK
5453 grep -v '^ *+' conftest.er1 >conftest.err
5454 rm -f conftest.er1
5455 cat conftest.err >&5
c0d27fcc 5456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5457 (exit $ac_status); } && {
5458 test -z "$ac_c_werror_flag" ||
5459 test ! -s conftest.err
5460 } && test -s conftest.$ac_objext; then
503d2be0 5461 break
b192d653 5462else
503d2be0 5463 echo "$as_me: failed program was:" >&5
19650fd6
AS
5464sed 's/^/| /' conftest.$ac_ext >&5
5465
ca81d7a0 5466
503d2be0 5467fi
ca81d7a0
JD
5468
5469rm -f core conftest.err conftest.$ac_objext
5470 CC="$CC -n32"
5471 rm -f conftest.$ac_objext
5472if { (ac_try="$ac_compile"
5473case "(($ac_try" in
5474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5475 *) ac_try_echo=$ac_try;;
5476esac
5477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5478 (eval "$ac_compile") 2>conftest.er1
503d2be0 5479 ac_status=$?
edfaf76d
LK
5480 grep -v '^ *+' conftest.er1 >conftest.err
5481 rm -f conftest.er1
5482 cat conftest.err >&5
c0d27fcc 5483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5484 (exit $ac_status); } && {
5485 test -z "$ac_c_werror_flag" ||
5486 test ! -s conftest.err
5487 } && test -s conftest.$ac_objext; then
503d2be0
AS
5488 ac_cv_sys_largefile_CC=' -n32'; break
5489else
5490 echo "$as_me: failed program was:" >&5
19650fd6
AS
5491sed 's/^/| /' conftest.$ac_ext >&5
5492
ca81d7a0 5493
503d2be0 5494fi
ca81d7a0
JD
5495
5496rm -f core conftest.err conftest.$ac_objext
edfaf76d 5497 break
503d2be0
AS
5498 done
5499 CC=$ac_save_CC
5500 rm -f conftest.$ac_ext
5501 fi
b192d653 5502fi
ca81d7a0
JD
5503{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5504echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5505 if test "$ac_cv_sys_largefile_CC" != no; then
5506 CC=$CC$ac_cv_sys_largefile_CC
5507 fi
b192d653 5508
ca81d7a0
JD
5509 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5510echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5511if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5512 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5513else
503d2be0 5514 while :; do
503d2be0 5515 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5516/* confdefs.h. */
5517_ACEOF
5518cat confdefs.h >>conftest.$ac_ext
5519cat >>conftest.$ac_ext <<_ACEOF
5520/* end confdefs.h. */
f4988be7 5521#include <sys/types.h>
503d2be0
AS
5522 /* Check that off_t can represent 2**63 - 1 correctly.
5523 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5524 since some C++ compilers masquerading as C compilers
5525 incorrectly reject 9223372036854775807. */
5526#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5527 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5528 && LARGE_OFF_T % 2147483647 == 1)
5529 ? 1 : -1];
5530int
5531main ()
5532{
f4988be7 5533
503d2be0
AS
5534 ;
5535 return 0;
5536}
5537_ACEOF
5538rm -f conftest.$ac_objext
ca81d7a0
JD
5539if { (ac_try="$ac_compile"
5540case "(($ac_try" in
5541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5542 *) ac_try_echo=$ac_try;;
5543esac
5544eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5545 (eval "$ac_compile") 2>conftest.er1
503d2be0 5546 ac_status=$?
edfaf76d
LK
5547 grep -v '^ *+' conftest.er1 >conftest.err
5548 rm -f conftest.er1
5549 cat conftest.err >&5
c0d27fcc 5550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5551 (exit $ac_status); } && {
5552 test -z "$ac_c_werror_flag" ||
5553 test ! -s conftest.err
5554 } && test -s conftest.$ac_objext; then
5555 ac_cv_sys_file_offset_bits=no; break
f4988be7 5556else
503d2be0 5557 echo "$as_me: failed program was:" >&5
19650fd6
AS
5558sed 's/^/| /' conftest.$ac_ext >&5
5559
ca81d7a0 5560
503d2be0 5561fi
ca81d7a0
JD
5562
5563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5564 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5565/* confdefs.h. */
5566_ACEOF
5567cat confdefs.h >>conftest.$ac_ext
5568cat >>conftest.$ac_ext <<_ACEOF
5569/* end confdefs.h. */
f4988be7
GM
5570#define _FILE_OFFSET_BITS 64
5571#include <sys/types.h>
503d2be0
AS
5572 /* Check that off_t can represent 2**63 - 1 correctly.
5573 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5574 since some C++ compilers masquerading as C compilers
5575 incorrectly reject 9223372036854775807. */
5576#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5577 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5578 && LARGE_OFF_T % 2147483647 == 1)
5579 ? 1 : -1];
5580int
5581main ()
5582{
5583
5584 ;
5585 return 0;
5586}
5587_ACEOF
5588rm -f conftest.$ac_objext
ca81d7a0
JD
5589if { (ac_try="$ac_compile"
5590case "(($ac_try" in
5591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5592 *) ac_try_echo=$ac_try;;
5593esac
5594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5595 (eval "$ac_compile") 2>conftest.er1
503d2be0 5596 ac_status=$?
edfaf76d
LK
5597 grep -v '^ *+' conftest.er1 >conftest.err
5598 rm -f conftest.er1
5599 cat conftest.err >&5
c0d27fcc 5600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5601 (exit $ac_status); } && {
5602 test -z "$ac_c_werror_flag" ||
5603 test ! -s conftest.err
5604 } && test -s conftest.$ac_objext; then
503d2be0
AS
5605 ac_cv_sys_file_offset_bits=64; break
5606else
5607 echo "$as_me: failed program was:" >&5
19650fd6
AS
5608sed 's/^/| /' conftest.$ac_ext >&5
5609
ca81d7a0 5610
503d2be0 5611fi
ca81d7a0
JD
5612
5613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5614 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5615 break
5616done
ba4481b5 5617fi
ca81d7a0
JD
5618{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5619echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5620case $ac_cv_sys_file_offset_bits in #(
5621 no | unknown) ;;
5622 *)
c0d27fcc 5623cat >>confdefs.h <<_ACEOF
f4988be7 5624#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5625_ACEOF
f053c89f
CY
5626;;
5627esac
503d2be0 5628rm -f conftest*
f053c89f
CY
5629 if test $ac_cv_sys_file_offset_bits = unknown; then
5630 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
ca81d7a0 5631echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5632if test "${ac_cv_sys_large_files+set}" = set; then
5633 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5634else
503d2be0 5635 while :; do
503d2be0 5636 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5637/* confdefs.h. */
5638_ACEOF
5639cat confdefs.h >>conftest.$ac_ext
5640cat >>conftest.$ac_ext <<_ACEOF
5641/* end confdefs.h. */
503d2be0
AS
5642#include <sys/types.h>
5643 /* Check that off_t can represent 2**63 - 1 correctly.
5644 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5645 since some C++ compilers masquerading as C compilers
5646 incorrectly reject 9223372036854775807. */
5647#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5648 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5649 && LARGE_OFF_T % 2147483647 == 1)
5650 ? 1 : -1];
5651int
5652main ()
5653{
ba4481b5 5654
503d2be0
AS
5655 ;
5656 return 0;
5657}
5658_ACEOF
5659rm -f conftest.$ac_objext
ca81d7a0
JD
5660if { (ac_try="$ac_compile"
5661case "(($ac_try" in
5662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5663 *) ac_try_echo=$ac_try;;
5664esac
5665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5666 (eval "$ac_compile") 2>conftest.er1
503d2be0 5667 ac_status=$?
edfaf76d
LK
5668 grep -v '^ *+' conftest.er1 >conftest.err
5669 rm -f conftest.er1
5670 cat conftest.err >&5
c0d27fcc 5671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5672 (exit $ac_status); } && {
5673 test -z "$ac_c_werror_flag" ||
5674 test ! -s conftest.err
5675 } && test -s conftest.$ac_objext; then
5676 ac_cv_sys_large_files=no; break
ba4481b5 5677else
503d2be0 5678 echo "$as_me: failed program was:" >&5
19650fd6
AS
5679sed 's/^/| /' conftest.$ac_ext >&5
5680
ca81d7a0 5681
503d2be0 5682fi
ca81d7a0
JD
5683
5684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5685 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5686/* confdefs.h. */
5687_ACEOF
5688cat confdefs.h >>conftest.$ac_ext
5689cat >>conftest.$ac_ext <<_ACEOF
5690/* end confdefs.h. */
f4988be7 5691#define _LARGE_FILES 1
503d2be0
AS
5692#include <sys/types.h>
5693 /* Check that off_t can represent 2**63 - 1 correctly.
5694 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5695 since some C++ compilers masquerading as C compilers
5696 incorrectly reject 9223372036854775807. */
5697#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5698 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5699 && LARGE_OFF_T % 2147483647 == 1)
5700 ? 1 : -1];
5701int
5702main ()
5703{
f4988be7 5704
503d2be0
AS
5705 ;
5706 return 0;
5707}
5708_ACEOF
5709rm -f conftest.$ac_objext
ca81d7a0
JD
5710if { (ac_try="$ac_compile"
5711case "(($ac_try" in
5712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5713 *) ac_try_echo=$ac_try;;
5714esac
5715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5716 (eval "$ac_compile") 2>conftest.er1
503d2be0 5717 ac_status=$?
edfaf76d
LK
5718 grep -v '^ *+' conftest.er1 >conftest.err
5719 rm -f conftest.er1
5720 cat conftest.err >&5
c0d27fcc 5721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5722 (exit $ac_status); } && {
5723 test -z "$ac_c_werror_flag" ||
5724 test ! -s conftest.err
5725 } && test -s conftest.$ac_objext; then
503d2be0
AS
5726 ac_cv_sys_large_files=1; break
5727else
5728 echo "$as_me: failed program was:" >&5
19650fd6
AS
5729sed 's/^/| /' conftest.$ac_ext >&5
5730
ca81d7a0 5731
503d2be0 5732fi
ca81d7a0
JD
5733
5734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5735 ac_cv_sys_large_files=unknown
503d2be0
AS
5736 break
5737done
ba4481b5 5738fi
ca81d7a0
JD
5739{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5740echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5741case $ac_cv_sys_large_files in #(
5742 no | unknown) ;;
5743 *)
c0d27fcc 5744cat >>confdefs.h <<_ACEOF
f4988be7 5745#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5746_ACEOF
f053c89f
CY
5747;;
5748esac
503d2be0 5749rm -f conftest*
f053c89f 5750 fi
503d2be0 5751fi
ba4481b5 5752
c0d27fcc 5753
439f58ee 5754
bc5d9888
CY
5755### The standard library on x86-64 GNU/Linux distributions can
5756### be located in either /usr/lib64 or /usr/lib.
5757case "${canonical}" in
5758 x86_64-*-linux-gnu* )
5759 if test -d /usr/lib64; then
5760
5761cat >>confdefs.h <<\_ACEOF
5762#define HAVE_X86_64_LIB64_DIR 1
5763_ACEOF
5764
5765fi
5766esac
5767
439f58ee
JD
5768
5769
5770
2c9dccc9
PJ
5771if test "${with_sound}" != "no"; then
5772 # Sound support for GNU/Linux and the free BSDs.
ca81d7a0
JD
5773 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5774echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
c0d27fcc
MR
5775if test "${ac_cv_header_stdc+set}" = set; then
5776 echo $ECHO_N "(cached) $ECHO_C" >&6
5777else
5778 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5779/* confdefs.h. */
5780_ACEOF
5781cat confdefs.h >>conftest.$ac_ext
5782cat >>conftest.$ac_ext <<_ACEOF
5783/* end confdefs.h. */
c0d27fcc
MR
5784#include <stdlib.h>
5785#include <stdarg.h>
5786#include <string.h>
5787#include <float.h>
98418dba 5788
19650fd6
AS
5789int
5790main ()
5791{
5792
5793 ;
5794 return 0;
5795}
c0d27fcc 5796_ACEOF
19650fd6 5797rm -f conftest.$ac_objext
ca81d7a0
JD
5798if { (ac_try="$ac_compile"
5799case "(($ac_try" in
5800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5801 *) ac_try_echo=$ac_try;;
5802esac
5803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5804 (eval "$ac_compile") 2>conftest.er1
cd958eb3 5805 ac_status=$?
edfaf76d
LK
5806 grep -v '^ *+' conftest.er1 >conftest.err
5807 rm -f conftest.er1
5808 cat conftest.err >&5
cd958eb3 5809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5810 (exit $ac_status); } && {
5811 test -z "$ac_c_werror_flag" ||
5812 test ! -s conftest.err
5813 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5814 ac_cv_header_stdc=yes
5815else
5816 echo "$as_me: failed program was:" >&5
19650fd6
AS
5817sed 's/^/| /' conftest.$ac_ext >&5
5818
ca81d7a0 5819 ac_cv_header_stdc=no
c0d27fcc 5820fi
ca81d7a0
JD
5821
5822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5823
5824if test $ac_cv_header_stdc = yes; then
5825 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5826 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5827/* confdefs.h. */
5828_ACEOF
5829cat confdefs.h >>conftest.$ac_ext
5830cat >>conftest.$ac_ext <<_ACEOF
5831/* end confdefs.h. */
c0d27fcc
MR
5832#include <string.h>
5833
5834_ACEOF
5835if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5836 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
5837 :
5838else
5839 ac_cv_header_stdc=no
5840fi
5841rm -f conftest*
5842
5843fi
5844
5845if test $ac_cv_header_stdc = yes; then
5846 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5847 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5848/* confdefs.h. */
5849_ACEOF
5850cat confdefs.h >>conftest.$ac_ext
5851cat >>conftest.$ac_ext <<_ACEOF
5852/* end confdefs.h. */
c0d27fcc
MR
5853#include <stdlib.h>
5854
5855_ACEOF
5856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5857 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
5858 :
5859else
5860 ac_cv_header_stdc=no
5861fi
5862rm -f conftest*
5863
5864fi
5865
5866if test $ac_cv_header_stdc = yes; then
5867 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5868 if test "$cross_compiling" = yes; then
5869 :
5870else
5871 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5872/* confdefs.h. */
5873_ACEOF
5874cat confdefs.h >>conftest.$ac_ext
5875cat >>conftest.$ac_ext <<_ACEOF
5876/* end confdefs.h. */
c0d27fcc 5877#include <ctype.h>
ca81d7a0 5878#include <stdlib.h>
c0d27fcc
MR
5879#if ((' ' & 0x0FF) == 0x020)
5880# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5881# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5882#else
19650fd6 5883# define ISLOWER(c) \
edfaf76d
LK
5884 (('a' <= (c) && (c) <= 'i') \
5885 || ('j' <= (c) && (c) <= 'r') \
5886 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
5887# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5888#endif
5889
5890#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5891int
5892main ()
5893{
5894 int i;
5895 for (i = 0; i < 256; i++)
5896 if (XOR (islower (i), ISLOWER (i))
edfaf76d 5897 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
5898 return 2;
5899 return 0;
c0d27fcc
MR
5900}
5901_ACEOF
5902rm -f conftest$ac_exeext
ca81d7a0
JD
5903if { (ac_try="$ac_link"
5904case "(($ac_try" in
5905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5906 *) ac_try_echo=$ac_try;;
5907esac
5908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5909 (eval "$ac_link") 2>&5
c0d27fcc
MR
5910 ac_status=$?
5911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5912 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
5913 { (case "(($ac_try" in
5914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5915 *) ac_try_echo=$ac_try;;
5916esac
5917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5918 (eval "$ac_try") 2>&5
c0d27fcc
MR
5919 ac_status=$?
5920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5921 (exit $ac_status); }; }; then
5922 :
5923else
5924 echo "$as_me: program exited with status $ac_status" >&5
5925echo "$as_me: failed program was:" >&5
19650fd6
AS
5926sed 's/^/| /' conftest.$ac_ext >&5
5927
c0d27fcc
MR
5928( exit $ac_status )
5929ac_cv_header_stdc=no
5930fi
ca81d7a0 5931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc 5932fi
ca81d7a0
JD
5933
5934
c0d27fcc
MR
5935fi
5936fi
ca81d7a0
JD
5937{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5938echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
c0d27fcc
MR
5939if test $ac_cv_header_stdc = yes; then
5940
5941cat >>confdefs.h <<\_ACEOF
5942#define STDC_HEADERS 1
5943_ACEOF
5944
5945fi
5946
5947# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 5958 inttypes.h stdint.h unistd.h
98418dba
CW
5959do
5960as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
5961{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5962echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5963if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 5964 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5965else
925c2f3f 5966 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5967/* confdefs.h. */
5968_ACEOF
5969cat confdefs.h >>conftest.$ac_ext
5970cat >>conftest.$ac_ext <<_ACEOF
5971/* end confdefs.h. */
c0d27fcc
MR
5972$ac_includes_default
5973
5974#include <$ac_header>
5975_ACEOF
5976rm -f conftest.$ac_objext
ca81d7a0
JD
5977if { (ac_try="$ac_compile"
5978case "(($ac_try" in
5979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5980 *) ac_try_echo=$ac_try;;
5981esac
5982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5983 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 5984 ac_status=$?
edfaf76d
LK
5985 grep -v '^ *+' conftest.er1 >conftest.err
5986 rm -f conftest.er1
5987 cat conftest.err >&5
c0d27fcc 5988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5989 (exit $ac_status); } && {
5990 test -z "$ac_c_werror_flag" ||
5991 test ! -s conftest.err
5992 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5993 eval "$as_ac_Header=yes"
5994else
5995 echo "$as_me: failed program was:" >&5
19650fd6
AS
5996sed 's/^/| /' conftest.$ac_ext >&5
5997
ca81d7a0 5998 eval "$as_ac_Header=no"
c0d27fcc 5999fi
ca81d7a0
JD
6000
6001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6002fi
ca81d7a0
JD
6003ac_res=`eval echo '${'$as_ac_Header'}'`
6004 { echo "$as_me:$LINENO: result: $ac_res" >&5
6005echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6006if test `eval echo '${'$as_ac_Header'}'` = yes; then
6007 cat >>confdefs.h <<_ACEOF
6008#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6009_ACEOF
6010
6011fi
6012
6013done
6014
6015
6016
6017
6018
6019for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
6020do
6021as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6022if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6023 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6024echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6025if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6026 echo $ECHO_N "(cached) $ECHO_C" >&6
6027fi
ca81d7a0
JD
6028ac_res=`eval echo '${'$as_ac_Header'}'`
6029 { echo "$as_me:$LINENO: result: $ac_res" >&5
6030echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6031else
6032 # Is the header compilable?
ca81d7a0
JD
6033{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6034echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6035cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6036/* confdefs.h. */
6037_ACEOF
6038cat confdefs.h >>conftest.$ac_ext
6039cat >>conftest.$ac_ext <<_ACEOF
6040/* end confdefs.h. */
c0d27fcc 6041$ac_includes_default
98418dba 6042#include <$ac_header>
503d2be0 6043_ACEOF
c0d27fcc 6044rm -f conftest.$ac_objext
ca81d7a0
JD
6045if { (ac_try="$ac_compile"
6046case "(($ac_try" in
6047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6048 *) ac_try_echo=$ac_try;;
6049esac
6050eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6051 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6052 ac_status=$?
edfaf76d
LK
6053 grep -v '^ *+' conftest.er1 >conftest.err
6054 rm -f conftest.er1
6055 cat conftest.err >&5
c0d27fcc 6056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6057 (exit $ac_status); } && {
6058 test -z "$ac_c_werror_flag" ||
6059 test ! -s conftest.err
6060 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6061 ac_header_compiler=yes
6062else
6063 echo "$as_me: failed program was:" >&5
19650fd6
AS
6064sed 's/^/| /' conftest.$ac_ext >&5
6065
ca81d7a0 6066 ac_header_compiler=no
c0d27fcc 6067fi
ca81d7a0
JD
6068
6069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6070{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6071echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6072
6073# Is the header present?
ca81d7a0
JD
6074{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6075echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6076cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6077/* confdefs.h. */
6078_ACEOF
6079cat confdefs.h >>conftest.$ac_ext
6080cat >>conftest.$ac_ext <<_ACEOF
6081/* end confdefs.h. */
c0d27fcc
MR
6082#include <$ac_header>
6083_ACEOF
ca81d7a0
JD
6084if { (ac_try="$ac_cpp conftest.$ac_ext"
6085case "(($ac_try" in
6086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6087 *) ac_try_echo=$ac_try;;
6088esac
6089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6090 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6091 ac_status=$?
6bae0ccf 6092 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6093 rm -f conftest.er1
6094 cat conftest.err >&5
c0d27fcc 6095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6096 (exit $ac_status); } >/dev/null && {
6097 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6098 test ! -s conftest.err
6099 }; then
c0d27fcc 6100 ac_header_preproc=yes
f4988be7 6101else
503d2be0 6102 echo "$as_me: failed program was:" >&5
19650fd6
AS
6103sed 's/^/| /' conftest.$ac_ext >&5
6104
c0d27fcc 6105 ac_header_preproc=no
f4988be7 6106fi
ca81d7a0 6107
98418dba 6108rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6109{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6110echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6111
6112# So? What about this header?
edfaf76d
LK
6113case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6114 yes:no: )
c0d27fcc
MR
6115 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6116echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6117 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6118echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6119 ac_header_preproc=yes
19650fd6 6120 ;;
edfaf76d 6121 no:yes:* )
c0d27fcc
MR
6122 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6123echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6124 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6125echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6126 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6127echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6128 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6129echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6130 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6131echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6132 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6133echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6134
19650fd6 6135 ;;
c0d27fcc 6136esac
ca81d7a0
JD
6137{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6138echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6139if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6140 echo $ECHO_N "(cached) $ECHO_C" >&6
6141else
edfaf76d 6142 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6143fi
ca81d7a0
JD
6144ac_res=`eval echo '${'$as_ac_Header'}'`
6145 { echo "$as_me:$LINENO: result: $ac_res" >&5
6146echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6147
6148fi
98418dba 6149if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6150 cat >>confdefs.h <<_ACEOF
98418dba 6151#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6152_ACEOF
f4988be7
GM
6153
6154fi
c0d27fcc 6155
98418dba
CW
6156done
6157
6158 # Emulation library used on NetBSD.
ca81d7a0
JD
6159 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6160echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6161if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6162 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6163else
98418dba
CW
6164 ac_check_lib_save_LIBS=$LIBS
6165LIBS="-lossaudio $LIBS"
6166cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6167/* confdefs.h. */
6168_ACEOF
6169cat confdefs.h >>conftest.$ac_ext
6170cat >>conftest.$ac_ext <<_ACEOF
6171/* end confdefs.h. */
98418dba 6172
ca81d7a0
JD
6173/* Override any GCC internal prototype to avoid an error.
6174 Use char because int might match the return type of a GCC
6175 builtin and then its argument prototype would still apply. */
98418dba
CW
6176#ifdef __cplusplus
6177extern "C"
f4988be7 6178#endif
98418dba 6179char _oss_ioctl ();
503d2be0
AS
6180int
6181main ()
6182{
ca81d7a0 6183return _oss_ioctl ();
503d2be0
AS
6184 ;
6185 return 0;
6186}
6187_ACEOF
98418dba 6188rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6189if { (ac_try="$ac_link"
6190case "(($ac_try" in
6191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6192 *) ac_try_echo=$ac_try;;
6193esac
6194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6195 (eval "$ac_link") 2>conftest.er1
503d2be0 6196 ac_status=$?
edfaf76d
LK
6197 grep -v '^ *+' conftest.er1 >conftest.err
6198 rm -f conftest.er1
6199 cat conftest.err >&5
c0d27fcc 6200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6201 (exit $ac_status); } && {
6202 test -z "$ac_c_werror_flag" ||
6203 test ! -s conftest.err
6204 } && test -s conftest$ac_exeext &&
6205 $as_test_x conftest$ac_exeext; then
98418dba 6206 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6207else
503d2be0 6208 echo "$as_me: failed program was:" >&5
19650fd6
AS
6209sed 's/^/| /' conftest.$ac_ext >&5
6210
ca81d7a0 6211 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6212fi
ca81d7a0 6213
f053c89f 6214rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6215 conftest$ac_exeext conftest.$ac_ext
98418dba 6216LIBS=$ac_check_lib_save_LIBS
f4988be7 6217fi
ca81d7a0
JD
6218{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6219echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6220if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6221 LIBSOUND=-lossaudio
6222else
6223 LIBSOUND=
6224fi
6225
c0d27fcc 6226
439f58ee
JD
6227
6228 ALSA_REQUIRED=1.0.0
6229 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
6230 if test "X${with_pkg_config_prog}" != X; then
6231 PKG_CONFIG="${with_pkg_config_prog}"
6232 fi
6233
6234 succeeded=no
6235
6236 if test -z "$PKG_CONFIG"; then
6237 # Extract the first word of "pkg-config", so it can be a program name with args.
6238set dummy pkg-config; ac_word=$2
ca81d7a0
JD
6239{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6240echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6241if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6242 echo $ECHO_N "(cached) $ECHO_C" >&6
6243else
6244 case $PKG_CONFIG in
6245 [\\/]* | ?:[\\/]*)
6246 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6247 ;;
6248 *)
6249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6250for as_dir in $PATH
6251do
6252 IFS=$as_save_IFS
6253 test -z "$as_dir" && as_dir=.
6254 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6255 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6256 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6257 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6258 break 2
6259 fi
6260done
6261done
ca81d7a0 6262IFS=$as_save_IFS
439f58ee
JD
6263
6264 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6265 ;;
6266esac
6267fi
6268PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6269if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
6270 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6271echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6272else
ca81d7a0
JD
6273 { echo "$as_me:$LINENO: result: no" >&5
6274echo "${ECHO_T}no" >&6; }
439f58ee
JD
6275fi
6276
ca81d7a0 6277
439f58ee
JD
6278 fi
6279
6280 if test "$PKG_CONFIG" = "no" ; then
6281 HAVE_ALSA=no
6282 else
6283 PKG_CONFIG_MIN_VERSION=0.9.0
6284 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
6285 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6286echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6287
67db6aa2 6288 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ca81d7a0
JD
6289 { echo "$as_me:$LINENO: result: yes" >&5
6290echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6291 succeeded=yes
6292
ca81d7a0
JD
6293 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6294echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6295 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6296 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6297echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6298
ca81d7a0
JD
6299 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6300echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6301 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6302 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6303echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6304 else
ca81d7a0
JD
6305 { echo "$as_me:$LINENO: result: no" >&5
6306echo "${ECHO_T}no" >&6; }
439f58ee
JD
6307 ALSA_CFLAGS=""
6308 ALSA_LIBS=""
6309 ## If we have a custom action on failure, don't print errors, but
6310 ## do set a variable so people can do so.
6311 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6312
6313 fi
6314
6315
6316
6317 else
6318 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6319 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6320 fi
6321 fi
6322
6323 if test $succeeded = yes; then
6324 HAVE_ALSA=yes
6325 else
6326 HAVE_ALSA=no
6327 fi
6328
6329 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6330 SAVE_CFLAGS="$CFLAGS"
6331 SAVE_LDFLAGS="$LDFLAGS"
6332 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6333 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6334 cat >conftest.$ac_ext <<_ACEOF
6335/* confdefs.h. */
6336_ACEOF
6337cat confdefs.h >>conftest.$ac_ext
6338cat >>conftest.$ac_ext <<_ACEOF
6339/* end confdefs.h. */
6340#include <asoundlib.h>
6341int
6342main ()
6343{
6344snd_lib_error_set_handler (0);
6345 ;
6346 return 0;
6347}
6348_ACEOF
6349rm -f conftest.$ac_objext
6350if { (ac_try="$ac_compile"
6351case "(($ac_try" in
6352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6353 *) ac_try_echo=$ac_try;;
6354esac
6355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6356 (eval "$ac_compile") 2>conftest.er1
6357 ac_status=$?
6358 grep -v '^ *+' conftest.er1 >conftest.err
6359 rm -f conftest.er1
6360 cat conftest.err >&5
6361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6362 (exit $ac_status); } && {
6363 test -z "$ac_c_werror_flag" ||
6364 test ! -s conftest.err
6365 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6366 emacs_alsa_normal=yes
6367else
6368 echo "$as_me: failed program was:" >&5
6369sed 's/^/| /' conftest.$ac_ext >&5
6370
6371 emacs_alsa_normal=no
6372fi
6373
6374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6375 if test "$emacs_alsa_normal" != yes; then
6376 cat >conftest.$ac_ext <<_ACEOF
6377/* confdefs.h. */
6378_ACEOF
6379cat confdefs.h >>conftest.$ac_ext
6380cat >>conftest.$ac_ext <<_ACEOF
6381/* end confdefs.h. */
6382#include <alsa/asoundlib.h>
6383int
6384main ()
6385{
6386snd_lib_error_set_handler (0);
6387 ;
6388 return 0;
6389}
6390_ACEOF
6391rm -f conftest.$ac_objext
6392if { (ac_try="$ac_compile"
6393case "(($ac_try" in
6394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6395 *) ac_try_echo=$ac_try;;
6396esac
6397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6398 (eval "$ac_compile") 2>conftest.er1
6399 ac_status=$?
6400 grep -v '^ *+' conftest.er1 >conftest.err
6401 rm -f conftest.er1
6402 cat conftest.err >&5
6403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6404 (exit $ac_status); } && {
6405 test -z "$ac_c_werror_flag" ||
6406 test ! -s conftest.err
6407 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6408 emacs_alsa_subdir=yes
6409else
6410 echo "$as_me: failed program was:" >&5
6411sed 's/^/| /' conftest.$ac_ext >&5
6412
6413 emacs_alsa_subdir=no
6414fi
6415
6416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6417 if test "$emacs_alsa_subdir" != yes; then
6418 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6419echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6420 { (exit 1); exit 1; }; }
6421 fi
6422 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6423 fi
6424
6425 CFLAGS="$SAVE_CFLAGS"
6426 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6427 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6428 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6429
6430cat >>confdefs.h <<\_ACEOF
6431#define HAVE_ALSA 1
6432_ACEOF
6433
ca81d7a0 6434
439f58ee
JD
6435 fi
6436
f4988be7 6437fi
c0d27fcc
MR
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
22044edf
DL
6456
6457
973a76b1 6458
cffcede7 6459
551ffc27 6460
226e2359 6461
c0d27fcc 6462
f4988be7 6463
98418dba
CW
6464for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6465 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6466 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6467 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6468 sys/utsname.h pwd.h
98418dba
CW
6469do
6470as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6471if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6472 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6473echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6474if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6475 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6476fi
ca81d7a0
JD
6477ac_res=`eval echo '${'$as_ac_Header'}'`
6478 { echo "$as_me:$LINENO: result: $ac_res" >&5
6479echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6480else
c0d27fcc 6481 # Is the header compilable?
ca81d7a0
JD
6482{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6483echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6484cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6485/* confdefs.h. */
6486_ACEOF
6487cat confdefs.h >>conftest.$ac_ext
6488cat >>conftest.$ac_ext <<_ACEOF
6489/* end confdefs.h. */
c0d27fcc
MR
6490$ac_includes_default
6491#include <$ac_header>
6492_ACEOF
6493rm -f conftest.$ac_objext
ca81d7a0
JD
6494if { (ac_try="$ac_compile"
6495case "(($ac_try" in
6496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6497 *) ac_try_echo=$ac_try;;
6498esac
6499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6500 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6501 ac_status=$?
edfaf76d
LK
6502 grep -v '^ *+' conftest.er1 >conftest.err
6503 rm -f conftest.er1
6504 cat conftest.err >&5
c0d27fcc 6505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6506 (exit $ac_status); } && {
6507 test -z "$ac_c_werror_flag" ||
6508 test ! -s conftest.err
6509 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6510 ac_header_compiler=yes
6511else
6512 echo "$as_me: failed program was:" >&5
19650fd6
AS
6513sed 's/^/| /' conftest.$ac_ext >&5
6514
ca81d7a0 6515 ac_header_compiler=no
c0d27fcc 6516fi
ca81d7a0
JD
6517
6518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6519{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6520echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6521
6522# Is the header present?
ca81d7a0
JD
6523{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6524echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6525cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6526/* confdefs.h. */
6527_ACEOF
6528cat confdefs.h >>conftest.$ac_ext
6529cat >>conftest.$ac_ext <<_ACEOF
6530/* end confdefs.h. */
98418dba 6531#include <$ac_header>
503d2be0 6532_ACEOF
ca81d7a0
JD
6533if { (ac_try="$ac_cpp conftest.$ac_ext"
6534case "(($ac_try" in
6535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6536 *) ac_try_echo=$ac_try;;
6537esac
6538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6539 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6540 ac_status=$?
6bae0ccf 6541 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6542 rm -f conftest.er1
6543 cat conftest.err >&5
c0d27fcc 6544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6545 (exit $ac_status); } >/dev/null && {
6546 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6547 test ! -s conftest.err
6548 }; then
c0d27fcc 6549 ac_header_preproc=yes
34ec9ebe 6550else
503d2be0 6551 echo "$as_me: failed program was:" >&5
19650fd6
AS
6552sed 's/^/| /' conftest.$ac_ext >&5
6553
c0d27fcc 6554 ac_header_preproc=no
34ec9ebe 6555fi
ca81d7a0 6556
98418dba 6557rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6558{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6559echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6560
6561# So? What about this header?
edfaf76d
LK
6562case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6563 yes:no: )
c0d27fcc
MR
6564 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6565echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6566 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6567echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6568 ac_header_preproc=yes
19650fd6 6569 ;;
edfaf76d 6570 no:yes:* )
c0d27fcc
MR
6571 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6572echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6573 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6574echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6575 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6576echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6577 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6578echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6579 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6580echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6581 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6582echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6583
19650fd6 6584 ;;
c0d27fcc 6585esac
ca81d7a0
JD
6586{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6587echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6588if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6589 echo $ECHO_N "(cached) $ECHO_C" >&6
6590else
edfaf76d 6591 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6592fi
ca81d7a0
JD
6593ac_res=`eval echo '${'$as_ac_Header'}'`
6594 { echo "$as_me:$LINENO: result: $ac_res" >&5
6595echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6596
6597fi
98418dba 6598if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6599 cat >>confdefs.h <<_ACEOF
98418dba 6600#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6601_ACEOF
34ec9ebe 6602
98418dba 6603fi
c0d27fcc 6604
98418dba
CW
6605done
6606
22044edf 6607
ca81d7a0
JD
6608{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6609echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6610cat >conftest.$ac_ext <<_ACEOF
6611/* confdefs.h. */
6612_ACEOF
6613cat confdefs.h >>conftest.$ac_ext
6614cat >>conftest.$ac_ext <<_ACEOF
6615/* end confdefs.h. */
6616#include <sys/personality.h>
6617int
6618main ()
6619{
6620personality (PER_LINUX32)
6621 ;
6622 return 0;
6623}
6624_ACEOF
6625rm -f conftest.$ac_objext
ca81d7a0
JD
6626if { (ac_try="$ac_compile"
6627case "(($ac_try" in
6628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6629 *) ac_try_echo=$ac_try;;
6630esac
6631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6632 (eval "$ac_compile") 2>conftest.er1
f17e308a 6633 ac_status=$?
edfaf76d
LK
6634 grep -v '^ *+' conftest.er1 >conftest.err
6635 rm -f conftest.er1
6636 cat conftest.err >&5
f17e308a 6637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6638 (exit $ac_status); } && {
6639 test -z "$ac_c_werror_flag" ||
6640 test ! -s conftest.err
6641 } && test -s conftest.$ac_objext; then
f17e308a
JD
6642 emacs_cv_personality_linux32=yes
6643else
6644 echo "$as_me: failed program was:" >&5
6645sed 's/^/| /' conftest.$ac_ext >&5
6646
ca81d7a0 6647 emacs_cv_personality_linux32=no
f17e308a 6648fi
ca81d7a0
JD
6649
6650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6651{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6652echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6653
6654if test $emacs_cv_personality_linux32 = yes; then
6655
6656cat >>confdefs.h <<\_ACEOF
6657#define HAVE_PERSONALITY_LINUX32 1
6658_ACEOF
6659
6660fi
6661
6662
22044edf
DL
6663for ac_header in term.h
6664do
6665as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6666{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6667echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6668if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6669 echo $ECHO_N "(cached) $ECHO_C" >&6
6670else
6671 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6672/* confdefs.h. */
6673_ACEOF
6674cat confdefs.h >>conftest.$ac_ext
6675cat >>conftest.$ac_ext <<_ACEOF
6676/* end confdefs.h. */
22044edf
DL
6677#include <$ac_header>
6678_ACEOF
ca81d7a0
JD
6679if { (ac_try="$ac_cpp conftest.$ac_ext"
6680case "(($ac_try" in
6681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6682 *) ac_try_echo=$ac_try;;
6683esac
6684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6685 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6686 ac_status=$?
6687 grep -v '^ *+' conftest.er1 >conftest.err
6688 rm -f conftest.er1
6689 cat conftest.err >&5
6690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6691 (exit $ac_status); } >/dev/null && {
6692 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6693 test ! -s conftest.err
6694 }; then
22044edf
DL
6695 eval "$as_ac_Header=yes"
6696else
6697 echo "$as_me: failed program was:" >&5
19650fd6
AS
6698sed 's/^/| /' conftest.$ac_ext >&5
6699
22044edf
DL
6700 eval "$as_ac_Header=no"
6701fi
ca81d7a0 6702
22044edf
DL
6703rm -f conftest.err conftest.$ac_ext
6704fi
ca81d7a0
JD
6705ac_res=`eval echo '${'$as_ac_Header'}'`
6706 { echo "$as_me:$LINENO: result: $ac_res" >&5
6707echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6708if test `eval echo '${'$as_ac_Header'}'` = yes; then
6709 cat >>confdefs.h <<_ACEOF
6710#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6711_ACEOF
6712
6713fi
6714
6715done
6716
ca81d7a0
JD
6717{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6718echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6719if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6720 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6721else
503d2be0 6722 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6723/* confdefs.h. */
6724_ACEOF
6725cat confdefs.h >>conftest.$ac_ext
6726cat >>conftest.$ac_ext <<_ACEOF
6727/* end confdefs.h. */
98418dba
CW
6728#include <stdlib.h>
6729#include <stdarg.h>
6730#include <string.h>
6731#include <float.h>
6732
19650fd6
AS
6733int
6734main ()
6735{
6736
6737 ;
6738 return 0;
6739}
98418dba 6740_ACEOF
19650fd6 6741rm -f conftest.$ac_objext
ca81d7a0
JD
6742if { (ac_try="$ac_compile"
6743case "(($ac_try" in
6744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6745 *) ac_try_echo=$ac_try;;
6746esac
6747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6748 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6749 ac_status=$?
edfaf76d
LK
6750 grep -v '^ *+' conftest.er1 >conftest.err
6751 rm -f conftest.er1
6752 cat conftest.err >&5
cd958eb3 6753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6754 (exit $ac_status); } && {
6755 test -z "$ac_c_werror_flag" ||
6756 test ! -s conftest.err
6757 } && test -s conftest.$ac_objext; then
98418dba 6758 ac_cv_header_stdc=yes
ba4481b5 6759else
503d2be0 6760 echo "$as_me: failed program was:" >&5
19650fd6
AS
6761sed 's/^/| /' conftest.$ac_ext >&5
6762
ca81d7a0 6763 ac_cv_header_stdc=no
ba4481b5 6764fi
ca81d7a0
JD
6765
6766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6767
6768if test $ac_cv_header_stdc = yes; then
6769 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6770 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6771/* confdefs.h. */
6772_ACEOF
6773cat confdefs.h >>conftest.$ac_ext
6774cat >>conftest.$ac_ext <<_ACEOF
6775/* end confdefs.h. */
98418dba
CW
6776#include <string.h>
6777
6778_ACEOF
6779if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6780 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6781 :
6782else
6783 ac_cv_header_stdc=no
ba4481b5 6784fi
98418dba 6785rm -f conftest*
ba4481b5
DL
6786
6787fi
6788
98418dba
CW
6789if test $ac_cv_header_stdc = yes; then
6790 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6791 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6792/* confdefs.h. */
6793_ACEOF
6794cat confdefs.h >>conftest.$ac_ext
6795cat >>conftest.$ac_ext <<_ACEOF
6796/* end confdefs.h. */
98418dba
CW
6797#include <stdlib.h>
6798
6799_ACEOF
6800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6801 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6802 :
6803else
6804 ac_cv_header_stdc=no
6805fi
6806rm -f conftest*
6807
6808fi
6809
6810if test $ac_cv_header_stdc = yes; then
6811 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6812 if test "$cross_compiling" = yes; then
6813 :
d42122a3 6814else
503d2be0 6815 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6816/* confdefs.h. */
6817_ACEOF
6818cat confdefs.h >>conftest.$ac_ext
6819cat >>conftest.$ac_ext <<_ACEOF
6820/* end confdefs.h. */
98418dba 6821#include <ctype.h>
ca81d7a0 6822#include <stdlib.h>
98418dba
CW
6823#if ((' ' & 0x0FF) == 0x020)
6824# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6825# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6826#else
19650fd6 6827# define ISLOWER(c) \
edfaf76d
LK
6828 (('a' <= (c) && (c) <= 'i') \
6829 || ('j' <= (c) && (c) <= 'r') \
6830 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6831# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6832#endif
6833
6834#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6835int
6836main ()
6837{
98418dba
CW
6838 int i;
6839 for (i = 0; i < 256; i++)
6840 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6841 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6842 return 2;
6843 return 0;
503d2be0
AS
6844}
6845_ACEOF
98418dba 6846rm -f conftest$ac_exeext
ca81d7a0
JD
6847if { (ac_try="$ac_link"
6848case "(($ac_try" in
6849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6850 *) ac_try_echo=$ac_try;;
6851esac
6852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6853 (eval "$ac_link") 2>&5
503d2be0 6854 ac_status=$?
c0d27fcc 6855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6856 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6857 { (case "(($ac_try" in
6858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6859 *) ac_try_echo=$ac_try;;
6860esac
6861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6862 (eval "$ac_try") 2>&5
503d2be0 6863 ac_status=$?
c0d27fcc 6864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6865 (exit $ac_status); }; }; then
98418dba 6866 :
d42122a3 6867else
98418dba
CW
6868 echo "$as_me: program exited with status $ac_status" >&5
6869echo "$as_me: failed program was:" >&5
19650fd6
AS
6870sed 's/^/| /' conftest.$ac_ext >&5
6871
c0d27fcc 6872( exit $ac_status )
98418dba 6873ac_cv_header_stdc=no
d42122a3 6874fi
ca81d7a0 6875rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6876fi
ca81d7a0
JD
6877
6878
98418dba
CW
6879fi
6880fi
ca81d7a0
JD
6881{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6882echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
6883if test $ac_cv_header_stdc = yes; then
6884
c0d27fcc 6885cat >>confdefs.h <<\_ACEOF
98418dba 6886#define STDC_HEADERS 1
c0d27fcc 6887_ACEOF
d42122a3
DL
6888
6889fi
6890
ca81d7a0
JD
6891{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
6892echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 6893if test "${ac_cv_header_time+set}" = set; then
503d2be0 6894 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6895else
503d2be0 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. */
ba4481b5 6902#include <sys/types.h>
98418dba 6903#include <sys/time.h>
ba4481b5 6904#include <time.h>
503d2be0
AS
6905
6906int
6907main ()
6908{
98418dba
CW
6909if ((struct tm *) 0)
6910return 0;
503d2be0
AS
6911 ;
6912 return 0;
6913}
6914_ACEOF
6915rm -f conftest.$ac_objext
ca81d7a0
JD
6916if { (ac_try="$ac_compile"
6917case "(($ac_try" in
6918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6919 *) ac_try_echo=$ac_try;;
6920esac
6921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6922 (eval "$ac_compile") 2>conftest.er1
503d2be0 6923 ac_status=$?
edfaf76d
LK
6924 grep -v '^ *+' conftest.er1 >conftest.err
6925 rm -f conftest.er1
6926 cat conftest.err >&5
c0d27fcc 6927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6928 (exit $ac_status); } && {
6929 test -z "$ac_c_werror_flag" ||
6930 test ! -s conftest.err
6931 } && test -s conftest.$ac_objext; then
98418dba 6932 ac_cv_header_time=yes
ba4481b5 6933else
503d2be0 6934 echo "$as_me: failed program was:" >&5
19650fd6
AS
6935sed 's/^/| /' conftest.$ac_ext >&5
6936
ca81d7a0 6937 ac_cv_header_time=no
ba4481b5 6938fi
ca81d7a0
JD
6939
6940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6941fi
ca81d7a0
JD
6942{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
6943echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 6944if test $ac_cv_header_time = yes; then
503d2be0 6945
c0d27fcc 6946cat >>confdefs.h <<\_ACEOF
98418dba 6947#define TIME_WITH_SYS_TIME 1
c0d27fcc 6948_ACEOF
ba4481b5
DL
6949
6950fi
6951
ca81d7a0
JD
6952{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6953echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 6954if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 6955 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6956else
503d2be0 6957 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6958/* confdefs.h. */
6959_ACEOF
6960cat confdefs.h >>conftest.$ac_ext
6961cat >>conftest.$ac_ext <<_ACEOF
6962/* end confdefs.h. */
cd958eb3
MB
6963$ac_includes_default
6964int
6965main ()
6966{
6967#ifndef sys_siglist
f053c89f 6968 (void) sys_siglist;
98418dba 6969#endif
503d2be0 6970
cd958eb3
MB
6971 ;
6972 return 0;
6973}
6974_ACEOF
6975rm -f conftest.$ac_objext
ca81d7a0
JD
6976if { (ac_try="$ac_compile"
6977case "(($ac_try" in
6978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6979 *) ac_try_echo=$ac_try;;
6980esac
6981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6982 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6983 ac_status=$?
edfaf76d
LK
6984 grep -v '^ *+' conftest.er1 >conftest.err
6985 rm -f conftest.er1
6986 cat conftest.err >&5
cd958eb3 6987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6988 (exit $ac_status); } && {
6989 test -z "$ac_c_werror_flag" ||
6990 test ! -s conftest.err
6991 } && test -s conftest.$ac_objext; then
cd958eb3
MB
6992 ac_cv_have_decl_sys_siglist=yes
6993else
6994 echo "$as_me: failed program was:" >&5
19650fd6
AS
6995sed 's/^/| /' conftest.$ac_ext >&5
6996
ca81d7a0 6997 ac_cv_have_decl_sys_siglist=no
cd958eb3 6998fi
ca81d7a0
JD
6999
7000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 7001fi
ca81d7a0
JD
7002{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
7003echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
7004if test $ac_cv_have_decl_sys_siglist = yes; then
7005
7006cat >>confdefs.h <<_ACEOF
7007#define HAVE_DECL_SYS_SIGLIST 1
7008_ACEOF
7009
7010
7011else
7012 cat >>confdefs.h <<_ACEOF
7013#define HAVE_DECL_SYS_SIGLIST 0
7014_ACEOF
7015
7016
7017fi
7018
7019
7020if test $ac_cv_have_decl_sys_siglist != yes; then
7021 # For Tru64, at least:
ca81d7a0
JD
7022 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
7023echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
7024if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
7025 echo $ECHO_N "(cached) $ECHO_C" >&6
7026else
7027 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7028/* confdefs.h. */
7029_ACEOF
7030cat confdefs.h >>conftest.$ac_ext
7031cat >>conftest.$ac_ext <<_ACEOF
7032/* end confdefs.h. */
cd958eb3 7033$ac_includes_default
503d2be0
AS
7034int
7035main ()
7036{
cd958eb3 7037#ifndef __sys_siglist
f053c89f 7038 (void) __sys_siglist;
cd958eb3
MB
7039#endif
7040
503d2be0
AS
7041 ;
7042 return 0;
7043}
7044_ACEOF
7045rm -f conftest.$ac_objext
ca81d7a0
JD
7046if { (ac_try="$ac_compile"
7047case "(($ac_try" in
7048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7049 *) ac_try_echo=$ac_try;;
7050esac
7051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7052 (eval "$ac_compile") 2>conftest.er1
503d2be0 7053 ac_status=$?
edfaf76d
LK
7054 grep -v '^ *+' conftest.er1 >conftest.err
7055 rm -f conftest.er1
7056 cat conftest.err >&5
c0d27fcc 7057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7058 (exit $ac_status); } && {
7059 test -z "$ac_c_werror_flag" ||
7060 test ! -s conftest.err
7061 } && test -s conftest.$ac_objext; then
cd958eb3 7062 ac_cv_have_decl___sys_siglist=yes
ba4481b5 7063else
503d2be0 7064 echo "$as_me: failed program was:" >&5
19650fd6
AS
7065sed 's/^/| /' conftest.$ac_ext >&5
7066
ca81d7a0 7067 ac_cv_have_decl___sys_siglist=no
ba4481b5 7068fi
ca81d7a0
JD
7069
7070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 7071fi
ca81d7a0
JD
7072{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
7073echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 7074if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 7075
cd958eb3
MB
7076cat >>confdefs.h <<_ACEOF
7077#define HAVE_DECL___SYS_SIGLIST 1
7078_ACEOF
7079
7080
7081else
7082 cat >>confdefs.h <<_ACEOF
7083#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 7084_ACEOF
503d2be0 7085
cd958eb3 7086
ba4481b5
DL
7087fi
7088
cd958eb3
MB
7089
7090 if test $ac_cv_have_decl___sys_siglist = yes; then
7091
7092cat >>confdefs.h <<\_ACEOF
7093#define sys_siglist __sys_siglist
7094_ACEOF
7095
7096 fi
7097fi
ca81d7a0
JD
7098{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7099echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 7100if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 7101 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7102else
503d2be0 7103 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7104/* confdefs.h. */
7105_ACEOF
7106cat confdefs.h >>conftest.$ac_ext
7107cat >>conftest.$ac_ext <<_ACEOF
7108/* end confdefs.h. */
98418dba
CW
7109#include <sys/types.h>
7110#include <sys/wait.h>
7111#ifndef WEXITSTATUS
ca81d7a0 7112# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7113#endif
7114#ifndef WIFEXITED
7115# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7116#endif
503d2be0
AS
7117
7118int
7119main ()
7120{
98418dba
CW
7121 int s;
7122 wait (&s);
7123 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7124 ;
7125 return 0;
7126}
7127_ACEOF
98418dba 7128rm -f conftest.$ac_objext
ca81d7a0
JD
7129if { (ac_try="$ac_compile"
7130case "(($ac_try" in
7131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7132 *) ac_try_echo=$ac_try;;
7133esac
7134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7135 (eval "$ac_compile") 2>conftest.er1
503d2be0 7136 ac_status=$?
edfaf76d
LK
7137 grep -v '^ *+' conftest.er1 >conftest.err
7138 rm -f conftest.er1
7139 cat conftest.err >&5
c0d27fcc 7140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7141 (exit $ac_status); } && {
7142 test -z "$ac_c_werror_flag" ||
7143 test ! -s conftest.err
7144 } && test -s conftest.$ac_objext; then
98418dba 7145 ac_cv_header_sys_wait_h=yes
ba4481b5 7146else
503d2be0 7147 echo "$as_me: failed program was:" >&5
19650fd6
AS
7148sed 's/^/| /' conftest.$ac_ext >&5
7149
ca81d7a0 7150 ac_cv_header_sys_wait_h=no
ba4481b5 7151fi
ca81d7a0
JD
7152
7153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7154fi
ca81d7a0
JD
7155{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7156echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7157if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7158
c0d27fcc 7159cat >>confdefs.h <<\_ACEOF
98418dba 7160#define HAVE_SYS_WAIT_H 1
c0d27fcc 7161_ACEOF
ba4481b5 7162
ba4481b5
DL
7163fi
7164
c0d27fcc 7165
ca81d7a0
JD
7166{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7167echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7168if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7169 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7170else
503d2be0 7171 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7172/* confdefs.h. */
7173_ACEOF
7174cat confdefs.h >>conftest.$ac_ext
7175cat >>conftest.$ac_ext <<_ACEOF
7176/* end confdefs.h. */
98418dba
CW
7177#ifdef TIME_WITH_SYS_TIME
7178#include <sys/time.h>
7179#include <time.h>
7180#else
7181#ifdef HAVE_SYS_TIME_H
7182#include <sys/time.h>
7183#else
1113b624 7184#include <time.h>
98418dba
CW
7185#endif
7186#endif
7187#ifdef HAVE_UTIME_H
7188#include <utime.h>
7189#endif
503d2be0
AS
7190int
7191main ()
7192{
98418dba 7193static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7194 ;
7195 return 0;
7196}
7197_ACEOF
98418dba 7198rm -f conftest.$ac_objext
ca81d7a0
JD
7199if { (ac_try="$ac_compile"
7200case "(($ac_try" in
7201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7202 *) ac_try_echo=$ac_try;;
7203esac
7204eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7205 (eval "$ac_compile") 2>conftest.er1
503d2be0 7206 ac_status=$?
edfaf76d
LK
7207 grep -v '^ *+' conftest.er1 >conftest.err
7208 rm -f conftest.er1
7209 cat conftest.err >&5
c0d27fcc 7210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7211 (exit $ac_status); } && {
7212 test -z "$ac_c_werror_flag" ||
7213 test ! -s conftest.err
7214 } && test -s conftest.$ac_objext; then
98418dba 7215 emacs_cv_struct_utimbuf=yes
1113b624 7216else
503d2be0 7217 echo "$as_me: failed program was:" >&5
19650fd6
AS
7218sed 's/^/| /' conftest.$ac_ext >&5
7219
ca81d7a0 7220 emacs_cv_struct_utimbuf=no
1113b624 7221fi
ca81d7a0
JD
7222
7223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7224fi
ca81d7a0
JD
7225{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7226echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7227if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7228
c0d27fcc 7229cat >>confdefs.h <<\_ACEOF
98418dba 7230#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7231_ACEOF
1113b624
PE
7232
7233fi
ba4481b5 7234
ca81d7a0
JD
7235{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7236echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7237if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7238 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7239else
98418dba 7240 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7241/* confdefs.h. */
7242_ACEOF
7243cat confdefs.h >>conftest.$ac_ext
7244cat >>conftest.$ac_ext <<_ACEOF
7245/* end confdefs.h. */
7397acc4 7246#include <sys/types.h>
98418dba 7247#include <signal.h>
98418dba 7248
503d2be0
AS
7249int
7250main ()
7251{
ca81d7a0 7252return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7253 ;
7254 return 0;
7255}
7256_ACEOF
98418dba 7257rm -f conftest.$ac_objext
ca81d7a0
JD
7258if { (ac_try="$ac_compile"
7259case "(($ac_try" in
7260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7261 *) ac_try_echo=$ac_try;;
7262esac
7263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7264 (eval "$ac_compile") 2>conftest.er1
503d2be0 7265 ac_status=$?
edfaf76d
LK
7266 grep -v '^ *+' conftest.er1 >conftest.err
7267 rm -f conftest.er1
7268 cat conftest.err >&5
c0d27fcc 7269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7270 (exit $ac_status); } && {
7271 test -z "$ac_c_werror_flag" ||
7272 test ! -s conftest.err
7273 } && test -s conftest.$ac_objext; then
ca81d7a0 7274 ac_cv_type_signal=int
503d2be0
AS
7275else
7276 echo "$as_me: failed program was:" >&5
19650fd6
AS
7277sed 's/^/| /' conftest.$ac_ext >&5
7278
ca81d7a0 7279 ac_cv_type_signal=void
503d2be0 7280fi
ca81d7a0
JD
7281
7282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7283fi
ca81d7a0
JD
7284{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7285echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7286
c0d27fcc 7287cat >>confdefs.h <<_ACEOF
98418dba 7288#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7289_ACEOF
7290
503d2be0 7291
c0d27fcc 7292
ca81d7a0
JD
7293{ echo "$as_me:$LINENO: checking for speed_t" >&5
7294echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7295if test "${emacs_cv_speed_t+set}" = set; then
7296 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7297else
98418dba 7298 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7299/* confdefs.h. */
7300_ACEOF
7301cat confdefs.h >>conftest.$ac_ext
7302cat >>conftest.$ac_ext <<_ACEOF
7303/* end confdefs.h. */
98418dba 7304#include <termios.h>
98418dba
CW
7305int
7306main ()
7307{
7308speed_t x = 1;
7309 ;
7310 return 0;
7311}
7312_ACEOF
7313rm -f conftest.$ac_objext
ca81d7a0
JD
7314if { (ac_try="$ac_compile"
7315case "(($ac_try" in
7316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7317 *) ac_try_echo=$ac_try;;
7318esac
7319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7320 (eval "$ac_compile") 2>conftest.er1
98418dba 7321 ac_status=$?
edfaf76d
LK
7322 grep -v '^ *+' conftest.er1 >conftest.err
7323 rm -f conftest.er1
7324 cat conftest.err >&5
c0d27fcc 7325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7326 (exit $ac_status); } && {
7327 test -z "$ac_c_werror_flag" ||
7328 test ! -s conftest.err
7329 } && test -s conftest.$ac_objext; then
98418dba
CW
7330 emacs_cv_speed_t=yes
7331else
7332 echo "$as_me: failed program was:" >&5
19650fd6
AS
7333sed 's/^/| /' conftest.$ac_ext >&5
7334
ca81d7a0 7335 emacs_cv_speed_t=no
98418dba 7336fi
ca81d7a0
JD
7337
7338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7339fi
ca81d7a0
JD
7340{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7341echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7342if test $emacs_cv_speed_t = yes; then
b936fae4 7343
c0d27fcc 7344cat >>confdefs.h <<\_ACEOF
98418dba 7345#define HAVE_SPEED_T 1
c0d27fcc 7346_ACEOF
98418dba 7347
7397acc4
DL
7348fi
7349
ca81d7a0
JD
7350{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7351echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7352if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7353 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7354else
503d2be0 7355 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7356/* confdefs.h. */
7357_ACEOF
7358cat confdefs.h >>conftest.$ac_ext
7359cat >>conftest.$ac_ext <<_ACEOF
7360/* end confdefs.h. */
98418dba
CW
7361#ifdef TIME_WITH_SYS_TIME
7362#include <sys/time.h>
7363#include <time.h>
7364#else
7365#ifdef HAVE_SYS_TIME_H
7366#include <sys/time.h>
7367#else
7368#include <time.h>
7369#endif
7370#endif
503d2be0
AS
7371int
7372main ()
7373{
98418dba 7374static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7375 ;
7376 return 0;
7377}
7378_ACEOF
7379rm -f conftest.$ac_objext
ca81d7a0
JD
7380if { (ac_try="$ac_compile"
7381case "(($ac_try" in
7382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7383 *) ac_try_echo=$ac_try;;
7384esac
7385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7386 (eval "$ac_compile") 2>conftest.er1
503d2be0 7387 ac_status=$?
edfaf76d
LK
7388 grep -v '^ *+' conftest.er1 >conftest.err
7389 rm -f conftest.er1
7390 cat conftest.err >&5
c0d27fcc 7391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7392 (exit $ac_status); } && {
7393 test -z "$ac_c_werror_flag" ||
7394 test ! -s conftest.err
7395 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7396 emacs_cv_struct_timeval=yes
7397else
503d2be0 7398 echo "$as_me: failed program was:" >&5
19650fd6
AS
7399sed 's/^/| /' conftest.$ac_ext >&5
7400
ca81d7a0 7401 emacs_cv_struct_timeval=no
7397acc4 7402fi
ca81d7a0
JD
7403
7404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7405fi
ca81d7a0
JD
7406{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7407echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7408HAVE_TIMEVAL=$emacs_cv_struct_timeval
7409if test $emacs_cv_struct_timeval = yes; then
b936fae4 7410
c0d27fcc 7411cat >>confdefs.h <<\_ACEOF
98418dba 7412#define HAVE_TIMEVAL 1
c0d27fcc 7413_ACEOF
7397acc4
DL
7414
7415fi
7416
ca81d7a0
JD
7417{ echo "$as_me:$LINENO: checking for struct exception" >&5
7418echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7419if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7420 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7421else
503d2be0 7422 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7423/* confdefs.h. */
7424_ACEOF
7425cat confdefs.h >>conftest.$ac_ext
7426cat >>conftest.$ac_ext <<_ACEOF
7427/* end confdefs.h. */
98418dba 7428#include <math.h>
503d2be0
AS
7429int
7430main ()
7431{
98418dba 7432static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7433 ;
7434 return 0;
ba4481b5 7435}
503d2be0
AS
7436_ACEOF
7437rm -f conftest.$ac_objext
ca81d7a0
JD
7438if { (ac_try="$ac_compile"
7439case "(($ac_try" in
7440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7441 *) ac_try_echo=$ac_try;;
7442esac
7443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7444 (eval "$ac_compile") 2>conftest.er1
503d2be0 7445 ac_status=$?
edfaf76d
LK
7446 grep -v '^ *+' conftest.er1 >conftest.err
7447 rm -f conftest.er1
7448 cat conftest.err >&5
c0d27fcc 7449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7450 (exit $ac_status); } && {
7451 test -z "$ac_c_werror_flag" ||
7452 test ! -s conftest.err
7453 } && test -s conftest.$ac_objext; then
98418dba 7454 emacs_cv_struct_exception=yes
ba4481b5 7455else
503d2be0 7456 echo "$as_me: failed program was:" >&5
19650fd6
AS
7457sed 's/^/| /' conftest.$ac_ext >&5
7458
ca81d7a0 7459 emacs_cv_struct_exception=no
ba4481b5 7460fi
ca81d7a0
JD
7461
7462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7463fi
ca81d7a0
JD
7464{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7465echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7466HAVE_EXCEPTION=$emacs_cv_struct_exception
7467if test $emacs_cv_struct_exception != yes; then
b936fae4 7468
c0d27fcc 7469cat >>confdefs.h <<\_ACEOF
98418dba 7470#define NO_MATHERR 1
c0d27fcc 7471_ACEOF
ba4481b5
DL
7472
7473fi
7474
7862d3a8
AS
7475
7476for ac_header in sys/socket.h
7477do
7478as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7479if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7480 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7481echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7482if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7483 echo $ECHO_N "(cached) $ECHO_C" >&6
7484fi
ca81d7a0
JD
7485ac_res=`eval echo '${'$as_ac_Header'}'`
7486 { echo "$as_me:$LINENO: result: $ac_res" >&5
7487echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7488else
7489 # Is the header compilable?
ca81d7a0
JD
7490{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7491echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7492cat >conftest.$ac_ext <<_ACEOF
7493/* confdefs.h. */
7494_ACEOF
7495cat confdefs.h >>conftest.$ac_ext
7496cat >>conftest.$ac_ext <<_ACEOF
7497/* end confdefs.h. */
7498$ac_includes_default
7499#include <$ac_header>
7500_ACEOF
7501rm -f conftest.$ac_objext
ca81d7a0
JD
7502if { (ac_try="$ac_compile"
7503case "(($ac_try" in
7504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7505 *) ac_try_echo=$ac_try;;
7506esac
7507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7508 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7509 ac_status=$?
edfaf76d
LK
7510 grep -v '^ *+' conftest.er1 >conftest.err
7511 rm -f conftest.er1
7512 cat conftest.err >&5
7862d3a8 7513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7514 (exit $ac_status); } && {
7515 test -z "$ac_c_werror_flag" ||
7516 test ! -s conftest.err
7517 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7518 ac_header_compiler=yes
7519else
7520 echo "$as_me: failed program was:" >&5
7521sed 's/^/| /' conftest.$ac_ext >&5
7522
ca81d7a0 7523 ac_header_compiler=no
7862d3a8 7524fi
ca81d7a0
JD
7525
7526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7527{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7528echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7529
7530# Is the header present?
ca81d7a0
JD
7531{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7532echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7533cat >conftest.$ac_ext <<_ACEOF
7534/* confdefs.h. */
7535_ACEOF
7536cat confdefs.h >>conftest.$ac_ext
7537cat >>conftest.$ac_ext <<_ACEOF
7538/* end confdefs.h. */
7539#include <$ac_header>
7540_ACEOF
ca81d7a0
JD
7541if { (ac_try="$ac_cpp conftest.$ac_ext"
7542case "(($ac_try" in
7543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7544 *) ac_try_echo=$ac_try;;
7545esac
7546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7547 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7548 ac_status=$?
7549 grep -v '^ *+' conftest.er1 >conftest.err
7550 rm -f conftest.er1
7551 cat conftest.err >&5
7552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7553 (exit $ac_status); } >/dev/null && {
7554 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7555 test ! -s conftest.err
7556 }; then
7862d3a8
AS
7557 ac_header_preproc=yes
7558else
7559 echo "$as_me: failed program was:" >&5
7560sed 's/^/| /' conftest.$ac_ext >&5
7561
7562 ac_header_preproc=no
7563fi
ca81d7a0 7564
7862d3a8 7565rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
7566{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7567echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7568
7569# So? What about this header?
edfaf76d
LK
7570case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7571 yes:no: )
7862d3a8
AS
7572 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7573echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7574 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7575echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7576 ac_header_preproc=yes
7862d3a8 7577 ;;
edfaf76d 7578 no:yes:* )
7862d3a8
AS
7579 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7580echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7581 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7582echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7583 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7584echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7585 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7586echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7587 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7588echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7589 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7590echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7591
7862d3a8
AS
7592 ;;
7593esac
ca81d7a0
JD
7594{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7595echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7596if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7597 echo $ECHO_N "(cached) $ECHO_C" >&6
7598else
edfaf76d 7599 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7600fi
ca81d7a0
JD
7601ac_res=`eval echo '${'$as_ac_Header'}'`
7602 { echo "$as_me:$LINENO: result: $ac_res" >&5
7603echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7604
7605fi
7606if test `eval echo '${'$as_ac_Header'}'` = yes; then
7607 cat >>confdefs.h <<_ACEOF
7608#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7609_ACEOF
7610
7611fi
7612
7613done
7614
7615
7616for ac_header in net/if.h
7617do
7618as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7619{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7620echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7621if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7622 echo $ECHO_N "(cached) $ECHO_C" >&6
7623else
7624 cat >conftest.$ac_ext <<_ACEOF
7625/* confdefs.h. */
7626_ACEOF
7627cat confdefs.h >>conftest.$ac_ext
7628cat >>conftest.$ac_ext <<_ACEOF
7629/* end confdefs.h. */
7630$ac_includes_default
7631#if HAVE_SYS_SOCKET_H
7632#include <sys/socket.h>
7633#endif
7634
7635#include <$ac_header>
7636_ACEOF
7637rm -f conftest.$ac_objext
ca81d7a0
JD
7638if { (ac_try="$ac_compile"
7639case "(($ac_try" in
7640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7641 *) ac_try_echo=$ac_try;;
7642esac
7643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7644 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7645 ac_status=$?
edfaf76d
LK
7646 grep -v '^ *+' conftest.er1 >conftest.err
7647 rm -f conftest.er1
7648 cat conftest.err >&5
7862d3a8 7649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7650 (exit $ac_status); } && {
7651 test -z "$ac_c_werror_flag" ||
7652 test ! -s conftest.err
7653 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7654 eval "$as_ac_Header=yes"
7655else
7656 echo "$as_me: failed program was:" >&5
7657sed 's/^/| /' conftest.$ac_ext >&5
7658
ca81d7a0 7659 eval "$as_ac_Header=no"
7862d3a8 7660fi
ca81d7a0
JD
7661
7662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7663fi
ca81d7a0
JD
7664ac_res=`eval echo '${'$as_ac_Header'}'`
7665 { echo "$as_me:$LINENO: result: $ac_res" >&5
7666echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7667if test `eval echo '${'$as_ac_Header'}'` = yes; then
7668 cat >>confdefs.h <<_ACEOF
7669#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7670_ACEOF
7671
7672fi
7673
7674done
7675
7676
ca81d7a0
JD
7677{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7678echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7679if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7680 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7681else
503d2be0 7682 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7683/* confdefs.h. */
7684_ACEOF
7685cat confdefs.h >>conftest.$ac_ext
7686cat >>conftest.$ac_ext <<_ACEOF
7687/* end confdefs.h. */
98418dba
CW
7688#include <sys/types.h>
7689#include <time.h>
7397acc4 7690
503d2be0
AS
7691int
7692main ()
7693{
f053c89f
CY
7694struct tm tm;
7695 int *p = &tm.tm_sec;
7696 return !p;
503d2be0
AS
7697 ;
7698 return 0;
7699}
7700_ACEOF
7701rm -f conftest.$ac_objext
ca81d7a0
JD
7702if { (ac_try="$ac_compile"
7703case "(($ac_try" in
7704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7705 *) ac_try_echo=$ac_try;;
7706esac
7707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7708 (eval "$ac_compile") 2>conftest.er1
503d2be0 7709 ac_status=$?
edfaf76d
LK
7710 grep -v '^ *+' conftest.er1 >conftest.err
7711 rm -f conftest.er1
7712 cat conftest.err >&5
c0d27fcc 7713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7714 (exit $ac_status); } && {
7715 test -z "$ac_c_werror_flag" ||
7716 test ! -s conftest.err
7717 } && test -s conftest.$ac_objext; then
35996d22
AS
7718 ac_cv_struct_tm=time.h
7719else
503d2be0 7720 echo "$as_me: failed program was:" >&5
19650fd6
AS
7721sed 's/^/| /' conftest.$ac_ext >&5
7722
ca81d7a0 7723 ac_cv_struct_tm=sys/time.h
7397acc4 7724fi
ca81d7a0
JD
7725
7726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7727fi
ca81d7a0
JD
7728{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7729echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7730if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7731
c0d27fcc 7732cat >>confdefs.h <<\_ACEOF
98418dba 7733#define TM_IN_SYS_TIME 1
c0d27fcc 7734_ACEOF
7397acc4
DL
7735
7736fi
ba4481b5 7737
ca81d7a0
JD
7738{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7739echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7740if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7741 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7742else
98418dba 7743 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7744/* confdefs.h. */
7745_ACEOF
7746cat confdefs.h >>conftest.$ac_ext
7747cat >>conftest.$ac_ext <<_ACEOF
7748/* end confdefs.h. */
98418dba
CW
7749#include <sys/types.h>
7750#include <$ac_cv_struct_tm>
ba4481b5 7751
c0d27fcc 7752
98418dba
CW
7753int
7754main ()
7755{
7756static struct tm ac_aggr;
7757if (ac_aggr.tm_zone)
7758return 0;
7759 ;
7760 return 0;
7761}
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
98418dba 7771 ac_status=$?
edfaf76d
LK
7772 grep -v '^ *+' conftest.er1 >conftest.err
7773 rm -f conftest.er1
7774 cat conftest.err >&5
c0d27fcc 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
98418dba 7780 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7781else
98418dba 7782 echo "$as_me: failed program was:" >&5
19650fd6
AS
7783sed 's/^/| /' conftest.$ac_ext >&5
7784
ca81d7a0 7785 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7786/* confdefs.h. */
7787_ACEOF
7788cat confdefs.h >>conftest.$ac_ext
7789cat >>conftest.$ac_ext <<_ACEOF
7790/* end confdefs.h. */
6bae0ccf
DL
7791#include <sys/types.h>
7792#include <$ac_cv_struct_tm>
7793
7794
7795int
7796main ()
7797{
7798static struct tm ac_aggr;
7799if (sizeof ac_aggr.tm_zone)
7800return 0;
7801 ;
7802 return 0;
7803}
7804_ACEOF
7805rm -f conftest.$ac_objext
ca81d7a0
JD
7806if { (ac_try="$ac_compile"
7807case "(($ac_try" in
7808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7809 *) ac_try_echo=$ac_try;;
7810esac
7811eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7812 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7813 ac_status=$?
edfaf76d
LK
7814 grep -v '^ *+' conftest.er1 >conftest.err
7815 rm -f conftest.er1
7816 cat conftest.err >&5
6bae0ccf 7817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7818 (exit $ac_status); } && {
7819 test -z "$ac_c_werror_flag" ||
7820 test ! -s conftest.err
7821 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7822 ac_cv_member_struct_tm_tm_zone=yes
7823else
7824 echo "$as_me: failed program was:" >&5
19650fd6
AS
7825sed 's/^/| /' conftest.$ac_ext >&5
7826
ca81d7a0 7827 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7828fi
ca81d7a0
JD
7829
7830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7831fi
ca81d7a0
JD
7832
7833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7834fi
ca81d7a0
JD
7835{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7836echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 7837if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7838
c0d27fcc 7839cat >>confdefs.h <<_ACEOF
98418dba 7840#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7841_ACEOF
7842
ba4481b5 7843
98418dba 7844fi
ba4481b5 7845
98418dba 7846if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7847
c0d27fcc 7848cat >>confdefs.h <<\_ACEOF
98418dba 7849#define HAVE_TM_ZONE 1
c0d27fcc 7850_ACEOF
ba4481b5 7851
ba4481b5 7852else
ca81d7a0
JD
7853 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7854echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
7855if test "${ac_cv_have_decl_tzname+set}" = set; then
503d2be0 7856 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7857else
98418dba 7858 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7859/* confdefs.h. */
7860_ACEOF
7861cat confdefs.h >>conftest.$ac_ext
7862cat >>conftest.$ac_ext <<_ACEOF
7863/* end confdefs.h. */
98418dba 7864#include <time.h>
98418dba 7865
98418dba
CW
7866int
7867main ()
7868{
ca81d7a0 7869#ifndef tzname
f053c89f 7870 (void) tzname;
ca81d7a0
JD
7871#endif
7872
98418dba
CW
7873 ;
7874 return 0;
7875}
7876_ACEOF
ca81d7a0
JD
7877rm -f conftest.$ac_objext
7878if { (ac_try="$ac_compile"
7879case "(($ac_try" in
7880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7881 *) ac_try_echo=$ac_try;;
7882esac
7883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7884 (eval "$ac_compile") 2>conftest.er1
98418dba 7885 ac_status=$?
edfaf76d
LK
7886 grep -v '^ *+' conftest.er1 >conftest.err
7887 rm -f conftest.er1
7888 cat conftest.err >&5
c0d27fcc 7889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7890 (exit $ac_status); } && {
7891 test -z "$ac_c_werror_flag" ||
7892 test ! -s conftest.err
7893 } && test -s conftest.$ac_objext; then
ca81d7a0 7894 ac_cv_have_decl_tzname=yes
98418dba
CW
7895else
7896 echo "$as_me: failed program was:" >&5
19650fd6
AS
7897sed 's/^/| /' conftest.$ac_ext >&5
7898
ca81d7a0 7899 ac_cv_have_decl_tzname=no
ba4481b5 7900fi
ca81d7a0
JD
7901
7902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7903fi
ca81d7a0
JD
7904{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
7905echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
7906if test $ac_cv_have_decl_tzname = yes; then
ba4481b5 7907
ca81d7a0
JD
7908cat >>confdefs.h <<_ACEOF
7909#define HAVE_DECL_TZNAME 1
c0d27fcc 7910_ACEOF
503d2be0 7911
ca81d7a0
JD
7912
7913else
7914 cat >>confdefs.h <<_ACEOF
7915#define HAVE_DECL_TZNAME 0
7916_ACEOF
7917
7918
98418dba 7919fi
503d2be0 7920
ca81d7a0
JD
7921
7922 { echo "$as_me:$LINENO: checking for tzname" >&5
7923echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
7924if test "${ac_cv_var_tzname+set}" = set; then
98418dba
CW
7925 echo $ECHO_N "(cached) $ECHO_C" >&6
7926else
7927 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7928/* confdefs.h. */
7929_ACEOF
7930cat confdefs.h >>conftest.$ac_ext
7931cat >>conftest.$ac_ext <<_ACEOF
7932/* end confdefs.h. */
98418dba 7933#include <time.h>
ca81d7a0
JD
7934#if !HAVE_DECL_TZNAME
7935extern char *tzname[];
7936#endif
b936fae4 7937
98418dba
CW
7938int
7939main ()
7940{
ca81d7a0 7941return tzname[0][0];
98418dba
CW
7942 ;
7943 return 0;
7944}
7945_ACEOF
ca81d7a0
JD
7946rm -f conftest.$ac_objext conftest$ac_exeext
7947if { (ac_try="$ac_link"
7948case "(($ac_try" in
7949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7950 *) ac_try_echo=$ac_try;;
7951esac
7952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7953 (eval "$ac_link") 2>conftest.er1
98418dba 7954 ac_status=$?
edfaf76d
LK
7955 grep -v '^ *+' conftest.er1 >conftest.err
7956 rm -f conftest.er1
7957 cat conftest.err >&5
c0d27fcc 7958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7959 (exit $ac_status); } && {
7960 test -z "$ac_c_werror_flag" ||
7961 test ! -s conftest.err
7962 } && test -s conftest$ac_exeext &&
7963 $as_test_x conftest$ac_exeext; then
ca81d7a0 7964 ac_cv_var_tzname=yes
98418dba
CW
7965else
7966 echo "$as_me: failed program was:" >&5
19650fd6
AS
7967sed 's/^/| /' conftest.$ac_ext >&5
7968
ca81d7a0
JD
7969 ac_cv_var_tzname=no
7970fi
6bae0ccf 7971
f053c89f 7972rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
ca81d7a0
JD
7973 conftest$ac_exeext conftest.$ac_ext
7974fi
7975{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
7976echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
7977 if test $ac_cv_var_tzname = yes; then
7978
7979cat >>confdefs.h <<\_ACEOF
7980#define HAVE_TZNAME 1
7981_ACEOF
7982
7983 fi
7984fi
7985
7986{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
7987echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
7988if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
7989 echo $ECHO_N "(cached) $ECHO_C" >&6
7990else
7991 cat >conftest.$ac_ext <<_ACEOF
7992/* confdefs.h. */
7993_ACEOF
7994cat confdefs.h >>conftest.$ac_ext
7995cat >>conftest.$ac_ext <<_ACEOF
7996/* end confdefs.h. */
7997#include <time.h>
7998
7999int
8000main ()
8001{
8002static struct tm ac_aggr;
8003if (ac_aggr.tm_gmtoff)
8004return 0;
8005 ;
8006 return 0;
8007}
8008_ACEOF
8009rm -f conftest.$ac_objext
8010if { (ac_try="$ac_compile"
8011case "(($ac_try" in
8012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8013 *) ac_try_echo=$ac_try;;
8014esac
8015eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8016 (eval "$ac_compile") 2>conftest.er1
8017 ac_status=$?
8018 grep -v '^ *+' conftest.er1 >conftest.err
8019 rm -f conftest.er1
8020 cat conftest.err >&5
8021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8022 (exit $ac_status); } && {
8023 test -z "$ac_c_werror_flag" ||
8024 test ! -s conftest.err
8025 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
8026 ac_cv_member_struct_tm_tm_gmtoff=yes
8027else
8028 echo "$as_me: failed program was:" >&5
8029sed 's/^/| /' conftest.$ac_ext >&5
8030
8031 cat >conftest.$ac_ext <<_ACEOF
8032/* confdefs.h. */
8033_ACEOF
8034cat confdefs.h >>conftest.$ac_ext
8035cat >>conftest.$ac_ext <<_ACEOF
8036/* end confdefs.h. */
8037#include <time.h>
8038
8039int
8040main ()
8041{
8042static struct tm ac_aggr;
8043if (sizeof ac_aggr.tm_gmtoff)
6bae0ccf 8044return 0;
8799b3e4
CW
8045 ;
8046 return 0;
8047}
8048_ACEOF
6bae0ccf 8049rm -f conftest.$ac_objext
ca81d7a0
JD
8050if { (ac_try="$ac_compile"
8051case "(($ac_try" in
8052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8053 *) ac_try_echo=$ac_try;;
8054esac
8055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8056 (eval "$ac_compile") 2>conftest.er1
8799b3e4 8057 ac_status=$?
edfaf76d
LK
8058 grep -v '^ *+' conftest.er1 >conftest.err
8059 rm -f conftest.er1
8060 cat conftest.err >&5
c0d27fcc 8061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8062 (exit $ac_status); } && {
8063 test -z "$ac_c_werror_flag" ||
8064 test ! -s conftest.err
8065 } && test -s conftest.$ac_objext; then
6bae0ccf 8066 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
8067else
8068 echo "$as_me: failed program was:" >&5
19650fd6
AS
8069sed 's/^/| /' conftest.$ac_ext >&5
8070
ca81d7a0 8071 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 8072fi
ca81d7a0
JD
8073
8074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8075fi
ca81d7a0
JD
8076
8077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 8078fi
ca81d7a0
JD
8079{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
8080echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
8081if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
8082
8083cat >>confdefs.h <<\_ACEOF
8084#define HAVE_TM_GMTOFF 1
8085_ACEOF
8086
8087fi
8088
ca81d7a0
JD
8089{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
8090echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
8091if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
8092 echo $ECHO_N "(cached) $ECHO_C" >&6
8093else
8094 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8095/* confdefs.h. */
8096_ACEOF
8097cat confdefs.h >>conftest.$ac_ext
8098cat >>conftest.$ac_ext <<_ACEOF
8099/* end confdefs.h. */
7862d3a8
AS
8100$ac_includes_default
8101#if HAVE_SYS_SOCKET_H
8102#include <sys/socket.h>
8103#endif
8104#if HAVE_NET_IF_H
96f3a036 8105#include <net/if.h>
7862d3a8 8106#endif
96f3a036
DL
8107
8108int
8109main ()
8110{
8111static struct ifreq ac_aggr;
8112if (ac_aggr.ifr_flags)
8113return 0;
8114 ;
8115 return 0;
8116}
8117_ACEOF
8118rm -f conftest.$ac_objext
ca81d7a0
JD
8119if { (ac_try="$ac_compile"
8120case "(($ac_try" in
8121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8122 *) ac_try_echo=$ac_try;;
8123esac
8124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8125 (eval "$ac_compile") 2>conftest.er1
96f3a036 8126 ac_status=$?
edfaf76d
LK
8127 grep -v '^ *+' conftest.er1 >conftest.err
8128 rm -f conftest.er1
8129 cat conftest.err >&5
96f3a036 8130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8131 (exit $ac_status); } && {
8132 test -z "$ac_c_werror_flag" ||
8133 test ! -s conftest.err
8134 } && test -s conftest.$ac_objext; then
96f3a036
DL
8135 ac_cv_member_struct_ifreq_ifr_flags=yes
8136else
8137 echo "$as_me: failed program was:" >&5
8138sed 's/^/| /' conftest.$ac_ext >&5
8139
ca81d7a0 8140 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8141/* confdefs.h. */
8142_ACEOF
8143cat confdefs.h >>conftest.$ac_ext
8144cat >>conftest.$ac_ext <<_ACEOF
8145/* end confdefs.h. */
7862d3a8
AS
8146$ac_includes_default
8147#if HAVE_SYS_SOCKET_H
8148#include <sys/socket.h>
8149#endif
8150#if HAVE_NET_IF_H
96f3a036 8151#include <net/if.h>
7862d3a8 8152#endif
96f3a036
DL
8153
8154int
8155main ()
8156{
8157static struct ifreq ac_aggr;
8158if (sizeof ac_aggr.ifr_flags)
8159return 0;
8160 ;
8161 return 0;
8162}
8163_ACEOF
8164rm -f conftest.$ac_objext
ca81d7a0
JD
8165if { (ac_try="$ac_compile"
8166case "(($ac_try" in
8167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8168 *) ac_try_echo=$ac_try;;
8169esac
8170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8171 (eval "$ac_compile") 2>conftest.er1
96f3a036 8172 ac_status=$?
edfaf76d
LK
8173 grep -v '^ *+' conftest.er1 >conftest.err
8174 rm -f conftest.er1
8175 cat conftest.err >&5
96f3a036 8176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8177 (exit $ac_status); } && {
8178 test -z "$ac_c_werror_flag" ||
8179 test ! -s conftest.err
8180 } && test -s conftest.$ac_objext; then
96f3a036
DL
8181 ac_cv_member_struct_ifreq_ifr_flags=yes
8182else
8183 echo "$as_me: failed program was:" >&5
8184sed 's/^/| /' conftest.$ac_ext >&5
8185
ca81d7a0 8186 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8187fi
ca81d7a0
JD
8188
8189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8190fi
ca81d7a0
JD
8191
8192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8193fi
ca81d7a0
JD
8194{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8195echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8196if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8197
8198cat >>confdefs.h <<_ACEOF
8199#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8200_ACEOF
8201
8202
8203fi
ca81d7a0
JD
8204{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8205echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8206if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8207 echo $ECHO_N "(cached) $ECHO_C" >&6
8208else
8209 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8210/* confdefs.h. */
8211_ACEOF
8212cat confdefs.h >>conftest.$ac_ext
8213cat >>conftest.$ac_ext <<_ACEOF
8214/* end confdefs.h. */
7862d3a8
AS
8215$ac_includes_default
8216#if HAVE_SYS_SOCKET_H
8217#include <sys/socket.h>
8218#endif
8219#if HAVE_NET_IF_H
96f3a036 8220#include <net/if.h>
7862d3a8 8221#endif
96f3a036
DL
8222
8223int
8224main ()
8225{
8226static struct ifreq ac_aggr;
8227if (ac_aggr.ifr_hwaddr)
8228return 0;
8229 ;
8230 return 0;
8231}
8232_ACEOF
8233rm -f conftest.$ac_objext
ca81d7a0
JD
8234if { (ac_try="$ac_compile"
8235case "(($ac_try" in
8236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8237 *) ac_try_echo=$ac_try;;
8238esac
8239eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8240 (eval "$ac_compile") 2>conftest.er1
96f3a036 8241 ac_status=$?
edfaf76d
LK
8242 grep -v '^ *+' conftest.er1 >conftest.err
8243 rm -f conftest.er1
8244 cat conftest.err >&5
96f3a036 8245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8246 (exit $ac_status); } && {
8247 test -z "$ac_c_werror_flag" ||
8248 test ! -s conftest.err
8249 } && test -s conftest.$ac_objext; then
96f3a036
DL
8250 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8251else
8252 echo "$as_me: failed program was:" >&5
8253sed 's/^/| /' conftest.$ac_ext >&5
8254
ca81d7a0 8255 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8256/* confdefs.h. */
8257_ACEOF
8258cat confdefs.h >>conftest.$ac_ext
8259cat >>conftest.$ac_ext <<_ACEOF
8260/* end confdefs.h. */
7862d3a8
AS
8261$ac_includes_default
8262#if HAVE_SYS_SOCKET_H
8263#include <sys/socket.h>
8264#endif
8265#if HAVE_NET_IF_H
96f3a036 8266#include <net/if.h>
7862d3a8 8267#endif
96f3a036
DL
8268
8269int
8270main ()
8271{
8272static struct ifreq ac_aggr;
8273if (sizeof ac_aggr.ifr_hwaddr)
8274return 0;
8275 ;
8276 return 0;
8277}
8278_ACEOF
8279rm -f conftest.$ac_objext
ca81d7a0
JD
8280if { (ac_try="$ac_compile"
8281case "(($ac_try" in
8282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8283 *) ac_try_echo=$ac_try;;
8284esac
8285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8286 (eval "$ac_compile") 2>conftest.er1
96f3a036 8287 ac_status=$?
edfaf76d
LK
8288 grep -v '^ *+' conftest.er1 >conftest.err
8289 rm -f conftest.er1
8290 cat conftest.err >&5
96f3a036 8291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8292 (exit $ac_status); } && {
8293 test -z "$ac_c_werror_flag" ||
8294 test ! -s conftest.err
8295 } && test -s conftest.$ac_objext; then
96f3a036
DL
8296 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8297else
8298 echo "$as_me: failed program was:" >&5
8299sed 's/^/| /' conftest.$ac_ext >&5
8300
ca81d7a0 8301 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8302fi
ca81d7a0
JD
8303
8304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8305fi
ca81d7a0
JD
8306
8307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8308fi
ca81d7a0
JD
8309{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8310echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8311if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8312
8313cat >>confdefs.h <<_ACEOF
8314#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8315_ACEOF
8316
8317
8318fi
ca81d7a0
JD
8319{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8320echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8321if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8322 echo $ECHO_N "(cached) $ECHO_C" >&6
8323else
8324 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8325/* confdefs.h. */
8326_ACEOF
8327cat confdefs.h >>conftest.$ac_ext
8328cat >>conftest.$ac_ext <<_ACEOF
8329/* end confdefs.h. */
7862d3a8
AS
8330$ac_includes_default
8331#if HAVE_SYS_SOCKET_H
8332#include <sys/socket.h>
8333#endif
8334#if HAVE_NET_IF_H
96f3a036 8335#include <net/if.h>
7862d3a8 8336#endif
96f3a036
DL
8337
8338int
8339main ()
8340{
8341static struct ifreq ac_aggr;
8342if (ac_aggr.ifr_netmask)
8343return 0;
8344 ;
8345 return 0;
8346}
8347_ACEOF
8348rm -f conftest.$ac_objext
ca81d7a0
JD
8349if { (ac_try="$ac_compile"
8350case "(($ac_try" in
8351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8352 *) ac_try_echo=$ac_try;;
8353esac
8354eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8355 (eval "$ac_compile") 2>conftest.er1
96f3a036 8356 ac_status=$?
edfaf76d
LK
8357 grep -v '^ *+' conftest.er1 >conftest.err
8358 rm -f conftest.er1
8359 cat conftest.err >&5
96f3a036 8360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8361 (exit $ac_status); } && {
8362 test -z "$ac_c_werror_flag" ||
8363 test ! -s conftest.err
8364 } && test -s conftest.$ac_objext; then
96f3a036
DL
8365 ac_cv_member_struct_ifreq_ifr_netmask=yes
8366else
8367 echo "$as_me: failed program was:" >&5
8368sed 's/^/| /' conftest.$ac_ext >&5
8369
ca81d7a0 8370 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8371/* confdefs.h. */
8372_ACEOF
8373cat confdefs.h >>conftest.$ac_ext
8374cat >>conftest.$ac_ext <<_ACEOF
8375/* end confdefs.h. */
7862d3a8
AS
8376$ac_includes_default
8377#if HAVE_SYS_SOCKET_H
8378#include <sys/socket.h>
8379#endif
8380#if HAVE_NET_IF_H
96f3a036 8381#include <net/if.h>
7862d3a8 8382#endif
96f3a036
DL
8383
8384int
8385main ()
8386{
8387static struct ifreq ac_aggr;
8388if (sizeof ac_aggr.ifr_netmask)
8389return 0;
8390 ;
8391 return 0;
8392}
8393_ACEOF
8394rm -f conftest.$ac_objext
ca81d7a0
JD
8395if { (ac_try="$ac_compile"
8396case "(($ac_try" in
8397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8398 *) ac_try_echo=$ac_try;;
8399esac
8400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8401 (eval "$ac_compile") 2>conftest.er1
96f3a036 8402 ac_status=$?
edfaf76d
LK
8403 grep -v '^ *+' conftest.er1 >conftest.err
8404 rm -f conftest.er1
8405 cat conftest.err >&5
96f3a036 8406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8407 (exit $ac_status); } && {
8408 test -z "$ac_c_werror_flag" ||
8409 test ! -s conftest.err
8410 } && test -s conftest.$ac_objext; then
96f3a036
DL
8411 ac_cv_member_struct_ifreq_ifr_netmask=yes
8412else
8413 echo "$as_me: failed program was:" >&5
8414sed 's/^/| /' conftest.$ac_ext >&5
8415
ca81d7a0 8416 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8417fi
ca81d7a0
JD
8418
8419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8420fi
ca81d7a0
JD
8421
8422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8423fi
ca81d7a0
JD
8424{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8425echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8426if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8427
8428cat >>confdefs.h <<_ACEOF
8429#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8430_ACEOF
8431
8432
8433fi
ca81d7a0
JD
8434{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8435echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8436if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8437 echo $ECHO_N "(cached) $ECHO_C" >&6
8438else
8439 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8440/* confdefs.h. */
8441_ACEOF
8442cat confdefs.h >>conftest.$ac_ext
8443cat >>conftest.$ac_ext <<_ACEOF
8444/* end confdefs.h. */
7862d3a8
AS
8445$ac_includes_default
8446#if HAVE_SYS_SOCKET_H
8447#include <sys/socket.h>
8448#endif
8449#if HAVE_NET_IF_H
96f3a036 8450#include <net/if.h>
7862d3a8 8451#endif
96f3a036
DL
8452
8453int
8454main ()
8455{
8456static struct ifreq ac_aggr;
8457if (ac_aggr.ifr_broadaddr)
8458return 0;
8459 ;
8460 return 0;
8461}
8462_ACEOF
8463rm -f conftest.$ac_objext
ca81d7a0
JD
8464if { (ac_try="$ac_compile"
8465case "(($ac_try" in
8466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8467 *) ac_try_echo=$ac_try;;
8468esac
8469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8470 (eval "$ac_compile") 2>conftest.er1
96f3a036 8471 ac_status=$?
edfaf76d
LK
8472 grep -v '^ *+' conftest.er1 >conftest.err
8473 rm -f conftest.er1
8474 cat conftest.err >&5
96f3a036 8475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8476 (exit $ac_status); } && {
8477 test -z "$ac_c_werror_flag" ||
8478 test ! -s conftest.err
8479 } && test -s conftest.$ac_objext; then
96f3a036
DL
8480 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8481else
8482 echo "$as_me: failed program was:" >&5
8483sed 's/^/| /' conftest.$ac_ext >&5
8484
ca81d7a0 8485 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8486/* confdefs.h. */
8487_ACEOF
8488cat confdefs.h >>conftest.$ac_ext
8489cat >>conftest.$ac_ext <<_ACEOF
8490/* end confdefs.h. */
7862d3a8
AS
8491$ac_includes_default
8492#if HAVE_SYS_SOCKET_H
8493#include <sys/socket.h>
8494#endif
8495#if HAVE_NET_IF_H
96f3a036 8496#include <net/if.h>
7862d3a8 8497#endif
96f3a036
DL
8498
8499int
8500main ()
8501{
8502static struct ifreq ac_aggr;
8503if (sizeof ac_aggr.ifr_broadaddr)
8504return 0;
8505 ;
8506 return 0;
8507}
8508_ACEOF
8509rm -f conftest.$ac_objext
ca81d7a0
JD
8510if { (ac_try="$ac_compile"
8511case "(($ac_try" in
8512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8513 *) ac_try_echo=$ac_try;;
8514esac
8515eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8516 (eval "$ac_compile") 2>conftest.er1
96f3a036 8517 ac_status=$?
edfaf76d
LK
8518 grep -v '^ *+' conftest.er1 >conftest.err
8519 rm -f conftest.er1
8520 cat conftest.err >&5
96f3a036 8521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8522 (exit $ac_status); } && {
8523 test -z "$ac_c_werror_flag" ||
8524 test ! -s conftest.err
8525 } && test -s conftest.$ac_objext; then
96f3a036
DL
8526 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8527else
8528 echo "$as_me: failed program was:" >&5
8529sed 's/^/| /' conftest.$ac_ext >&5
8530
ca81d7a0 8531 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8532fi
ca81d7a0
JD
8533
8534rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8535fi
ca81d7a0
JD
8536
8537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8538fi
ca81d7a0
JD
8539{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8540echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8541if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8542
8543cat >>confdefs.h <<_ACEOF
8544#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8545_ACEOF
8546
8547
8548fi
ca81d7a0
JD
8549{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8550echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8551if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8552 echo $ECHO_N "(cached) $ECHO_C" >&6
8553else
8554 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8555/* confdefs.h. */
8556_ACEOF
8557cat confdefs.h >>conftest.$ac_ext
8558cat >>conftest.$ac_ext <<_ACEOF
8559/* end confdefs.h. */
7862d3a8
AS
8560$ac_includes_default
8561#if HAVE_SYS_SOCKET_H
8562#include <sys/socket.h>
8563#endif
8564#if HAVE_NET_IF_H
96f3a036 8565#include <net/if.h>
7862d3a8 8566#endif
96f3a036
DL
8567
8568int
8569main ()
8570{
8571static struct ifreq ac_aggr;
8572if (ac_aggr.ifr_addr)
8573return 0;
8574 ;
8575 return 0;
8576}
8577_ACEOF
8578rm -f conftest.$ac_objext
ca81d7a0
JD
8579if { (ac_try="$ac_compile"
8580case "(($ac_try" in
8581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8582 *) ac_try_echo=$ac_try;;
8583esac
8584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8585 (eval "$ac_compile") 2>conftest.er1
96f3a036 8586 ac_status=$?
edfaf76d
LK
8587 grep -v '^ *+' conftest.er1 >conftest.err
8588 rm -f conftest.er1
8589 cat conftest.err >&5
96f3a036 8590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8591 (exit $ac_status); } && {
8592 test -z "$ac_c_werror_flag" ||
8593 test ! -s conftest.err
8594 } && test -s conftest.$ac_objext; then
96f3a036
DL
8595 ac_cv_member_struct_ifreq_ifr_addr=yes
8596else
8597 echo "$as_me: failed program was:" >&5
8598sed 's/^/| /' conftest.$ac_ext >&5
8599
ca81d7a0 8600 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8601/* confdefs.h. */
8602_ACEOF
8603cat confdefs.h >>conftest.$ac_ext
8604cat >>conftest.$ac_ext <<_ACEOF
8605/* end confdefs.h. */
7862d3a8
AS
8606$ac_includes_default
8607#if HAVE_SYS_SOCKET_H
8608#include <sys/socket.h>
8609#endif
8610#if HAVE_NET_IF_H
96f3a036 8611#include <net/if.h>
7862d3a8 8612#endif
96f3a036
DL
8613
8614int
8615main ()
8616{
8617static struct ifreq ac_aggr;
8618if (sizeof ac_aggr.ifr_addr)
8619return 0;
8620 ;
8621 return 0;
8622}
8623_ACEOF
8624rm -f conftest.$ac_objext
ca81d7a0
JD
8625if { (ac_try="$ac_compile"
8626case "(($ac_try" in
8627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8628 *) ac_try_echo=$ac_try;;
8629esac
8630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8631 (eval "$ac_compile") 2>conftest.er1
96f3a036 8632 ac_status=$?
edfaf76d
LK
8633 grep -v '^ *+' conftest.er1 >conftest.err
8634 rm -f conftest.er1
8635 cat conftest.err >&5
96f3a036 8636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8637 (exit $ac_status); } && {
8638 test -z "$ac_c_werror_flag" ||
8639 test ! -s conftest.err
8640 } && test -s conftest.$ac_objext; then
96f3a036
DL
8641 ac_cv_member_struct_ifreq_ifr_addr=yes
8642else
8643 echo "$as_me: failed program was:" >&5
8644sed 's/^/| /' conftest.$ac_ext >&5
8645
ca81d7a0 8646 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8647fi
ca81d7a0
JD
8648
8649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8650fi
ca81d7a0
JD
8651
8652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8653fi
ca81d7a0
JD
8654{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8655echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8656if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8657
8658cat >>confdefs.h <<_ACEOF
8659#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8660_ACEOF
8661
8662
8663fi
8664
8799b3e4 8665
8799b3e4 8666
ca81d7a0
JD
8667{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8668echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8669if test "$ac_cv_prog_cc_c89" != no; then
8670 { echo "$as_me:$LINENO: result: yes" >&5
8671echo "${ECHO_T}yes" >&6; }
98418dba 8672
c0d27fcc 8673cat >>confdefs.h <<\_ACEOF
98418dba 8674#define PROTOTYPES 1
c0d27fcc
MR
8675_ACEOF
8676
8677
8678cat >>confdefs.h <<\_ACEOF
8679#define __PROTOTYPES 1
8680_ACEOF
98418dba
CW
8681
8682else
ca81d7a0
JD
8683 { echo "$as_me:$LINENO: result: no" >&5
8684echo "${ECHO_T}no" >&6; }
98418dba
CW
8685fi
8686
ca81d7a0
JD
8687{ echo "$as_me:$LINENO: checking for working volatile" >&5
8688echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8689if test "${ac_cv_c_volatile+set}" = set; then
8690 echo $ECHO_N "(cached) $ECHO_C" >&6
8691else
8692 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8693/* confdefs.h. */
8694_ACEOF
8695cat confdefs.h >>conftest.$ac_ext
8696cat >>conftest.$ac_ext <<_ACEOF
8697/* end confdefs.h. */
98418dba 8698
98418dba
CW
8699int
8700main ()
8701{
8702
8703volatile int x;
ca81d7a0
JD
8704int * volatile y = (int *) 0;
8705return !x && !y;
98418dba
CW
8706 ;
8707 return 0;
8708}
8709_ACEOF
8710rm -f conftest.$ac_objext
ca81d7a0
JD
8711if { (ac_try="$ac_compile"
8712case "(($ac_try" in
8713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8714 *) ac_try_echo=$ac_try;;
8715esac
8716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8717 (eval "$ac_compile") 2>conftest.er1
98418dba 8718 ac_status=$?
edfaf76d
LK
8719 grep -v '^ *+' conftest.er1 >conftest.err
8720 rm -f conftest.er1
8721 cat conftest.err >&5
c0d27fcc 8722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8723 (exit $ac_status); } && {
8724 test -z "$ac_c_werror_flag" ||
8725 test ! -s conftest.err
8726 } && test -s conftest.$ac_objext; then
98418dba
CW
8727 ac_cv_c_volatile=yes
8728else
8729 echo "$as_me: failed program was:" >&5
19650fd6
AS
8730sed 's/^/| /' conftest.$ac_ext >&5
8731
ca81d7a0 8732 ac_cv_c_volatile=no
98418dba 8733fi
ca81d7a0
JD
8734
8735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8736fi
ca81d7a0
JD
8737{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8738echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8739if test $ac_cv_c_volatile = no; then
8740
c0d27fcc 8741cat >>confdefs.h <<\_ACEOF
98418dba 8742#define volatile
c0d27fcc 8743_ACEOF
98418dba
CW
8744
8745fi
8746
ca81d7a0
JD
8747{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8748echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8749if test "${ac_cv_c_const+set}" = set; then
8750 echo $ECHO_N "(cached) $ECHO_C" >&6
8751else
8752 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8753/* confdefs.h. */
8754_ACEOF
8755cat confdefs.h >>conftest.$ac_ext
8756cat >>conftest.$ac_ext <<_ACEOF
8757/* end confdefs.h. */
98418dba 8758
98418dba
CW
8759int
8760main ()
8761{
8762/* FIXME: Include the comments suggested by Paul. */
8763#ifndef __cplusplus
8764 /* Ultrix mips cc rejects this. */
8765 typedef int charset[2];
f053c89f 8766 const charset cs;
98418dba 8767 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
8768 char const *const *pcpcc;
8769 char **ppc;
98418dba
CW
8770 /* NEC SVR4.0.2 mips cc rejects this. */
8771 struct point {int x, y;};
8772 static struct point const zero = {0,0};
8773 /* AIX XL C 1.02.0.0 rejects this.
8774 It does not let you subtract one const X* pointer from another in
8775 an arm of an if-expression whose if-part is not a constant
8776 expression */
8777 const char *g = "string";
f053c89f 8778 pcpcc = &g + (g ? g-g : 0);
98418dba 8779 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
8780 ++pcpcc;
8781 ppc = (char**) pcpcc;
8782 pcpcc = (char const *const *) ppc;
98418dba
CW
8783 { /* SCO 3.2v4 cc rejects this. */
8784 char *t;
8785 char const *s = 0 ? (char *) 0 : (char const *) 0;
8786
8787 *t++ = 0;
ca81d7a0 8788 if (s) return 0;
98418dba
CW
8789 }
8790 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8791 int x[] = {25, 17};
8792 const int *foo = &x[0];
8793 ++foo;
8794 }
8795 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8796 typedef const int *iptr;
8797 iptr p = 0;
8798 ++p;
8799 }
8800 { /* AIX XL C 1.02.0.0 rejects this saying
8801 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8802 struct s { int j; const int *ap[3]; };
8803 struct s *b; b->j = 5;
8804 }
8805 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8806 const int foo = 10;
ca81d7a0 8807 if (!foo) return 0;
98418dba 8808 }
f053c89f 8809 return !cs[0] && !zero.x;
98418dba
CW
8810#endif
8811
8812 ;
8813 return 0;
8814}
8815_ACEOF
8816rm -f conftest.$ac_objext
ca81d7a0
JD
8817if { (ac_try="$ac_compile"
8818case "(($ac_try" in
8819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8820 *) ac_try_echo=$ac_try;;
8821esac
8822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8823 (eval "$ac_compile") 2>conftest.er1
98418dba 8824 ac_status=$?
edfaf76d
LK
8825 grep -v '^ *+' conftest.er1 >conftest.err
8826 rm -f conftest.er1
8827 cat conftest.err >&5
c0d27fcc 8828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8829 (exit $ac_status); } && {
8830 test -z "$ac_c_werror_flag" ||
8831 test ! -s conftest.err
8832 } && test -s conftest.$ac_objext; then
98418dba
CW
8833 ac_cv_c_const=yes
8834else
8835 echo "$as_me: failed program was:" >&5
19650fd6
AS
8836sed 's/^/| /' conftest.$ac_ext >&5
8837
ca81d7a0 8838 ac_cv_c_const=no
98418dba 8839fi
ca81d7a0
JD
8840
8841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8842fi
ca81d7a0
JD
8843{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8844echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8845if test $ac_cv_c_const = no; then
8846
c0d27fcc 8847cat >>confdefs.h <<\_ACEOF
98418dba 8848#define const
c0d27fcc 8849_ACEOF
98418dba
CW
8850
8851fi
8852
ca81d7a0
JD
8853{ echo "$as_me:$LINENO: checking for void * support" >&5
8854echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
8855if test "${emacs_cv_void_star+set}" = set; then
8856 echo $ECHO_N "(cached) $ECHO_C" >&6
8857else
8858 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8859/* confdefs.h. */
8860_ACEOF
8861cat confdefs.h >>conftest.$ac_ext
8862cat >>conftest.$ac_ext <<_ACEOF
8863/* end confdefs.h. */
98418dba 8864
98418dba
CW
8865int
8866main ()
8867{
8868void * foo;
8869 ;
8870 return 0;
8871}
8872_ACEOF
8873rm -f conftest.$ac_objext
ca81d7a0
JD
8874if { (ac_try="$ac_compile"
8875case "(($ac_try" in
8876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8877 *) ac_try_echo=$ac_try;;
8878esac
8879eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8880 (eval "$ac_compile") 2>conftest.er1
98418dba 8881 ac_status=$?
edfaf76d
LK
8882 grep -v '^ *+' conftest.er1 >conftest.err
8883 rm -f conftest.er1
8884 cat conftest.err >&5
c0d27fcc 8885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8886 (exit $ac_status); } && {
8887 test -z "$ac_c_werror_flag" ||
8888 test ! -s conftest.err
8889 } && test -s conftest.$ac_objext; then
98418dba
CW
8890 emacs_cv_void_star=yes
8891else
8892 echo "$as_me: failed program was:" >&5
19650fd6
AS
8893sed 's/^/| /' conftest.$ac_ext >&5
8894
ca81d7a0 8895 emacs_cv_void_star=no
98418dba 8896fi
ca81d7a0
JD
8897
8898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8899fi
ca81d7a0
JD
8900{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
8901echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 8902if test $emacs_cv_void_star = yes; then
c0d27fcc 8903 cat >>confdefs.h <<\_ACEOF
98418dba 8904#define POINTER_TYPE void
c0d27fcc 8905_ACEOF
98418dba
CW
8906
8907else
c0d27fcc 8908 cat >>confdefs.h <<\_ACEOF
98418dba 8909#define POINTER_TYPE char
c0d27fcc 8910_ACEOF
98418dba
CW
8911
8912fi
8913
c0d27fcc 8914
4494a266
JD
8915
8916
cd958eb3 8917
ca81d7a0
JD
8918{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8919echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
8920set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
8921if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
8922 echo $ECHO_N "(cached) $ECHO_C" >&6
8923else
c0d27fcc 8924 cat >conftest.make <<\_ACEOF
ca81d7a0 8925SHELL = /bin/sh
98418dba 8926all:
ca81d7a0 8927 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 8928_ACEOF
98418dba 8929# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8930case `${MAKE-make} -f conftest.make 2>/dev/null` in
8931 *@@@%%%=?*=@@@%%%*)
8932 eval ac_cv_prog_make_${ac_make}_set=yes;;
8933 *)
8934 eval ac_cv_prog_make_${ac_make}_set=no;;
8935esac
4b411bfe 8936rm -f conftest.make
98418dba 8937fi
ca81d7a0
JD
8938if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
8939 { echo "$as_me:$LINENO: result: yes" >&5
8940echo "${ECHO_T}yes" >&6; }
98418dba
CW
8941 SET_MAKE=
8942else
ca81d7a0
JD
8943 { echo "$as_me:$LINENO: result: no" >&5
8944echo "${ECHO_T}no" >&6; }
98418dba
CW
8945 SET_MAKE="MAKE=${MAKE-make}"
8946fi
8947
c0d27fcc 8948
ca81d7a0
JD
8949{ echo "$as_me:$LINENO: checking for long file names" >&5
8950echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
8951if test "${ac_cv_sys_long_file_names+set}" = set; then
8952 echo $ECHO_N "(cached) $ECHO_C" >&6
8953else
8954 ac_cv_sys_long_file_names=yes
8955# Test for long file names in all the places we know might matter:
8956# . the current directory, where building will happen
8957# $prefix/lib where we will be installing things
8958# $exec_prefix/lib likewise
98418dba 8959# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
8960# /tmp where it might want to write temporary files
8961# /var/tmp likewise
8962# /usr/tmp likewise
ca81d7a0
JD
8963for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8964 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8965 # in the usual case where exec_prefix is '${prefix}'.
8966 case $ac_dir in #(
8967 . | /* | ?:[\\/]*) ;; #(
8968 *) continue;;
8969 esac
8970 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 8971 ac_xdir=$ac_dir/cf$$
ca81d7a0 8972 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
8973 ac_tf1=$ac_xdir/conftest9012345
8974 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 8975 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 8976 ac_cv_sys_long_file_names=no
ca81d7a0
JD
8977 rm -f -r "$ac_xdir" 2>/dev/null
8978 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
8979done
8980fi
ca81d7a0
JD
8981{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
8982echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
8983if test $ac_cv_sys_long_file_names = yes; then
8984
c0d27fcc 8985cat >>confdefs.h <<\_ACEOF
98418dba 8986#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8987_ACEOF
98418dba
CW
8988
8989fi
8990
c0d27fcc 8991
98418dba
CW
8992#### Choose a window system.
8993
ca81d7a0
JD
8994{ echo "$as_me:$LINENO: checking for X" >&5
8995echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 8996
c0d27fcc 8997
ca81d7a0 8998# Check whether --with-x was given.
98418dba 8999if test "${with_x+set}" = set; then
ca81d7a0
JD
9000 withval=$with_x;
9001fi
98418dba 9002
98418dba
CW
9003# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9004if test "x$with_x" = xno; then
9005 # The user explicitly disabled X.
9006 have_x=disabled
9007else
ca81d7a0
JD
9008 case $x_includes,$x_libraries in #(
9009 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
9010echo "$as_me: error: Cannot use X directory names containing '" >&2;}
9011 { (exit 1); exit 1; }; };; #(
9012 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
9013 echo $ECHO_N "(cached) $ECHO_C" >&6
9014else
9015 # One or both of the vars are not set, and there is no cached value.
9016ac_x_includes=no ac_x_libraries=no
ca81d7a0 9017rm -f -r conftest.dir
98418dba
CW
9018if mkdir conftest.dir; then
9019 cd conftest.dir
c0d27fcc 9020 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
9021incroot:
9022 @echo incroot='${INCROOT}'
9023usrlibdir:
9024 @echo usrlibdir='${USRLIBDIR}'
9025libdir:
9026 @echo libdir='${LIBDIR}'
9027_ACEOF
9028 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 9029 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
9030 for ac_var in incroot usrlibdir libdir; do
9031 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9032 done
98418dba
CW
9033 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9034 for ac_extension in a so sl; do
ca81d7a0
JD
9035 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9036 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 9037 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
9038 fi
9039 done
9040 # Screen out bogus values from the imake configuration. They are
9041 # bogus both because they are the default anyway, and because
9042 # using them would break gcc on systems where it needs fixed includes.
9043 case $ac_im_incroot in
ca81d7a0 9044 /usr/include) ac_x_includes= ;;
98418dba
CW
9045 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9046 esac
9047 case $ac_im_usrlibdir in
9048 /usr/lib | /lib) ;;
9049 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9050 esac
9051 fi
9052 cd ..
ca81d7a0 9053 rm -f -r conftest.dir
98418dba
CW
9054fi
9055
9056# Standard set of common directories for X headers.
9057# Check X11 before X11Rn because it is often a symlink to the current release.
9058ac_x_header_dirs='
9059/usr/X11/include
9060/usr/X11R6/include
9061/usr/X11R5/include
9062/usr/X11R4/include
9063
9064/usr/include/X11
9065/usr/include/X11R6
9066/usr/include/X11R5
9067/usr/include/X11R4
9068
9069/usr/local/X11/include
9070/usr/local/X11R6/include
9071/usr/local/X11R5/include
9072/usr/local/X11R4/include
9073
9074/usr/local/include/X11
9075/usr/local/include/X11R6
9076/usr/local/include/X11R5
9077/usr/local/include/X11R4
9078
9079/usr/X386/include
9080/usr/x386/include
9081/usr/XFree86/include/X11
9082
9083/usr/include
9084/usr/local/include
9085/usr/unsupported/include
9086/usr/athena/include
9087/usr/local/x11r5/include
9088/usr/lpp/Xamples/include
9089
9090/usr/openwin/include
9091/usr/openwin/share/include'
9092
9093if test "$ac_x_includes" = no; then
ca81d7a0 9094 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
9095 # First, try using that file with no special directory specified.
9096 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9097/* confdefs.h. */
9098_ACEOF
9099cat confdefs.h >>conftest.$ac_ext
9100cat >>conftest.$ac_ext <<_ACEOF
9101/* end confdefs.h. */
ca81d7a0 9102#include <X11/Xlib.h>
98418dba 9103_ACEOF
ca81d7a0
JD
9104if { (ac_try="$ac_cpp conftest.$ac_ext"
9105case "(($ac_try" in
9106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9107 *) ac_try_echo=$ac_try;;
9108esac
9109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9110 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9111 ac_status=$?
6bae0ccf 9112 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9113 rm -f conftest.er1
9114 cat conftest.err >&5
c0d27fcc 9115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9116 (exit $ac_status); } >/dev/null && {
9117 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9118 test ! -s conftest.err
9119 }; then
98418dba
CW
9120 # We can compile using X headers with no special include directory.
9121ac_x_includes=
9122else
9123 echo "$as_me: failed program was:" >&5
19650fd6
AS
9124sed 's/^/| /' conftest.$ac_ext >&5
9125
98418dba 9126 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 9127 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9128 ac_x_includes=$ac_dir
9129 break
9130 fi
9131done
9132fi
ca81d7a0 9133
98418dba
CW
9134rm -f conftest.err conftest.$ac_ext
9135fi # $ac_x_includes = no
9136
9137if test "$ac_x_libraries" = no; then
9138 # Check for the libraries.
9139 # See if we find them without any special options.
9140 # Don't add to $LIBS permanently.
9141 ac_save_LIBS=$LIBS
f053c89f 9142 LIBS="-lX11 $LIBS"
98418dba 9143 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9144/* confdefs.h. */
9145_ACEOF
9146cat confdefs.h >>conftest.$ac_ext
9147cat >>conftest.$ac_ext <<_ACEOF
9148/* end confdefs.h. */
ca81d7a0 9149#include <X11/Xlib.h>
98418dba
CW
9150int
9151main ()
9152{
ca81d7a0 9153XrmInitialize ()
98418dba
CW
9154 ;
9155 return 0;
9156}
9157_ACEOF
9158rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9159if { (ac_try="$ac_link"
9160case "(($ac_try" in
9161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9162 *) ac_try_echo=$ac_try;;
9163esac
9164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9165 (eval "$ac_link") 2>conftest.er1
98418dba 9166 ac_status=$?
edfaf76d
LK
9167 grep -v '^ *+' conftest.er1 >conftest.err
9168 rm -f conftest.er1
9169 cat conftest.err >&5
c0d27fcc 9170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9171 (exit $ac_status); } && {
9172 test -z "$ac_c_werror_flag" ||
9173 test ! -s conftest.err
9174 } && test -s conftest$ac_exeext &&
9175 $as_test_x conftest$ac_exeext; then
98418dba
CW
9176 LIBS=$ac_save_LIBS
9177# We can link X programs with no special library path.
9178ac_x_libraries=
9179else
9180 echo "$as_me: failed program was:" >&5
19650fd6
AS
9181sed 's/^/| /' conftest.$ac_ext >&5
9182
ca81d7a0 9183 LIBS=$ac_save_LIBS
98418dba
CW
9184for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9185do
9186 # Don't even attempt the hair of trying to link an X program!
9187 for ac_extension in a so sl; do
f053c89f 9188 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9189 ac_x_libraries=$ac_dir
9190 break 2
9191 fi
9192 done
9193done
9194fi
ca81d7a0 9195
f053c89f 9196rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9197 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9198fi # $ac_x_libraries = no
9199
ca81d7a0
JD
9200case $ac_x_includes,$ac_x_libraries in #(
9201 no,* | *,no | *\'*)
9202 # Didn't find X, or a directory has "'" in its name.
9203 ac_cv_have_x="have_x=no";; #(
9204 *)
9205 # Record where we found X for the cache.
9206 ac_cv_have_x="have_x=yes\
9207 ac_x_includes='$ac_x_includes'\
9208 ac_x_libraries='$ac_x_libraries'"
9209esac
4b411bfe 9210fi
ca81d7a0
JD
9211;; #(
9212 *) have_x=yes;;
9213 esac
98418dba
CW
9214 eval "$ac_cv_have_x"
9215fi # $with_x != no
9216
9217if test "$have_x" != yes; then
ca81d7a0
JD
9218 { echo "$as_me:$LINENO: result: $have_x" >&5
9219echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9220 no_x=yes
9221else
9222 # If each of the values was on the command line, it overrides each guess.
9223 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9224 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9225 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9226 ac_cv_have_x="have_x=yes\
9227 ac_x_includes='$x_includes'\
9228 ac_x_libraries='$x_libraries'"
9229 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9230echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9231fi
9232
9233if test "$no_x" = yes; then
9234 window_system=none
9235else
9236 window_system=x11
9237fi
9238
92d1ccf4
AS
9239if test "${x_libraries}" != NONE; then
9240 if test -n "${x_libraries}"; then
9241 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9242 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9243 fi
98418dba 9244 x_default_search_path=""
92d1ccf4
AS
9245 x_search_path=${x_libraries}
9246 if test -z "${x_search_path}"; then
9247 x_search_path=/usr/lib
9248 fi
9249 for x_library in `echo ${x_search_path}: | \
9250 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9251 x_search_path="\
9252${x_library}/X11/%L/%T/%N%C%S:\
9253${x_library}/X11/%l/%T/%N%C%S:\
9254${x_library}/X11/%T/%N%C%S:\
9255${x_library}/X11/%L/%T/%N%S:\
9256${x_library}/X11/%l/%T/%N%S:\
9257${x_library}/X11/%T/%N%S"
9258 if test x"${x_default_search_path}" = x; then
9259 x_default_search_path=${x_search_path}
9260 else
9261 x_default_search_path="${x_search_path}:${x_default_search_path}"
9262 fi
9263 done
9264fi
9265if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9266 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9267fi
9268
9269if test x"${x_includes}" = x; then
9270 bitmapdir=/usr/include/X11/bitmaps
9271else
9272 # accumulate include directories that have X11 bitmap subdirectories
9273 bmd_acc="dummyval"
9274 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9275 if test -d "${bmd}/X11/bitmaps"; then
9276 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9277 fi
9278 if test -d "${bmd}/bitmaps"; then
9279 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9280 fi
9281 done
9282 if test ${bmd_acc} != "dummyval"; then
9283 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9284 fi
9285fi
9286
5d6da11e 9287HAVE_CARBON=no
1d4d5604
YM
9288if test "${with_carbon}" != no; then
9289 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
ca81d7a0
JD
9290 { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9291echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9292if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9293 echo $ECHO_N "(cached) $ECHO_C" >&6
9294fi
ca81d7a0
JD
9295{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9296echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9297else
9298 # Is the header compilable?
ca81d7a0
JD
9299{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9300echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
5d6da11e
YM
9301cat >conftest.$ac_ext <<_ACEOF
9302/* confdefs.h. */
9303_ACEOF
9304cat confdefs.h >>conftest.$ac_ext
9305cat >>conftest.$ac_ext <<_ACEOF
9306/* end confdefs.h. */
9307$ac_includes_default
9308#include <Carbon/Carbon.h>
9309_ACEOF
9310rm -f conftest.$ac_objext
ca81d7a0
JD
9311if { (ac_try="$ac_compile"
9312case "(($ac_try" in
9313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9314 *) ac_try_echo=$ac_try;;
9315esac
9316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9317 (eval "$ac_compile") 2>conftest.er1
5d6da11e 9318 ac_status=$?
edfaf76d
LK
9319 grep -v '^ *+' conftest.er1 >conftest.err
9320 rm -f conftest.er1
9321 cat conftest.err >&5
5d6da11e 9322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9323 (exit $ac_status); } && {
9324 test -z "$ac_c_werror_flag" ||
9325 test ! -s conftest.err
9326 } && test -s conftest.$ac_objext; then
5d6da11e
YM
9327 ac_header_compiler=yes
9328else
9329 echo "$as_me: failed program was:" >&5
9330sed 's/^/| /' conftest.$ac_ext >&5
9331
ca81d7a0 9332 ac_header_compiler=no
5d6da11e 9333fi
ca81d7a0
JD
9334
9335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9336{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9337echo "${ECHO_T}$ac_header_compiler" >&6; }
5d6da11e
YM
9338
9339# Is the header present?
ca81d7a0
JD
9340{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9341echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
5d6da11e
YM
9342cat >conftest.$ac_ext <<_ACEOF
9343/* confdefs.h. */
9344_ACEOF
9345cat confdefs.h >>conftest.$ac_ext
9346cat >>conftest.$ac_ext <<_ACEOF
9347/* end confdefs.h. */
9348#include <Carbon/Carbon.h>
9349_ACEOF
ca81d7a0
JD
9350if { (ac_try="$ac_cpp conftest.$ac_ext"
9351case "(($ac_try" in
9352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9353 *) ac_try_echo=$ac_try;;
9354esac
9355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9356 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5d6da11e
YM
9357 ac_status=$?
9358 grep -v '^ *+' conftest.er1 >conftest.err
9359 rm -f conftest.er1
9360 cat conftest.err >&5
9361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9362 (exit $ac_status); } >/dev/null && {
9363 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9364 test ! -s conftest.err
9365 }; then
5d6da11e
YM
9366 ac_header_preproc=yes
9367else
9368 echo "$as_me: failed program was:" >&5
9369sed 's/^/| /' conftest.$ac_ext >&5
9370
9371 ac_header_preproc=no
9372fi
ca81d7a0 9373
5d6da11e 9374rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9375{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9376echo "${ECHO_T}$ac_header_preproc" >&6; }
5d6da11e
YM
9377
9378# So? What about this header?
edfaf76d
LK
9379case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9380 yes:no: )
5d6da11e
YM
9381 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9382echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9383 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
9384echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
9385 ac_header_preproc=yes
5d6da11e 9386 ;;
edfaf76d 9387 no:yes:* )
5d6da11e
YM
9388 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9389echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
9390 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9391echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9392 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
9393echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
9394 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
9395echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
9396 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9397echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9398 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
9399echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9400
5d6da11e
YM
9401 ;;
9402esac
ca81d7a0
JD
9403{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9404echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9405if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9406 echo $ECHO_N "(cached) $ECHO_C" >&6
9407else
9408 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
9409fi
ca81d7a0
JD
9410{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9411echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9412
9413fi
9414if test $ac_cv_header_Carbon_Carbon_h = yes; then
9415 HAVE_CARBON=yes
9416fi
9417
9418
1d4d5604
YM
9419fi
9420if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
9421 if test "${with_carbon+set}" != set \
9422 && test "${carbon_appdir_x+set}" != set; then
ec8fcb10
YM
9423 for var in with_x with_x_toolkit with_gtk with_xim \
9424 with_xpm with_jpeg with_tiff with_gif with_png; do
9425 if eval test \"\${$var+set}\" = set; then
9426 HAVE_CARBON=no
9427 break
9428 fi
9429 done
5d6da11e
YM
9430 fi
9431fi
1d4d5604
YM
9432if test "${HAVE_CARBON}" = yes; then
9433 window_system=mac
9434fi
9435
9436case "${window_system}" in
9437 x11 )
9438 HAVE_X_WINDOWS=yes
9439 HAVE_X11=yes
9440 case "${with_x_toolkit}" in
9441 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9442 motif ) USE_X_TOOLKIT=MOTIF ;;
9443 gtk ) with_gtk=yes
9444 USE_X_TOOLKIT=none ;;
9445 no ) USE_X_TOOLKIT=none ;;
9446 * ) USE_X_TOOLKIT=maybe ;;
9447 esac
9448 ;;
9449 mac | none )
9450 HAVE_X_WINDOWS=no
9451 HAVE_X11=no
9452 USE_X_TOOLKIT=none
9453 ;;
9454esac
9455
9456### If we're using X11, we should use the X menu package.
9457HAVE_MENUS=no
9458case ${HAVE_X11} in
9459 yes ) HAVE_MENUS=yes ;;
9460esac
9461
9462if test "${opsys}" = "hpux9"; then
9463 case "${x_libraries}" in
9464 *X11R4* )
9465 opsysfile="s/hpux9-x11r4.h"
9466 ;;
9467 esac
9468fi
9469
9470if test "${opsys}" = "hpux9shr"; then
9471 case "${x_libraries}" in
9472 *X11R4* )
9473 opsysfile="s/hpux9shxr4.h"
9474 ;;
9475 esac
9476fi
5d6da11e 9477
98418dba
CW
9478### Compute the unexec source name from the object name.
9479UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
9480
9481# Do the opsystem or machine files prohibit the use of the GNU malloc?
9482# Assume not, until told otherwise.
9483GNU_MALLOC=yes
9484doug_lea_malloc=yes
ca81d7a0
JD
9485{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9486echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9487if test "${ac_cv_func_malloc_get_state+set}" = set; then
9488 echo $ECHO_N "(cached) $ECHO_C" >&6
9489else
9490 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9491/* confdefs.h. */
9492_ACEOF
9493cat confdefs.h >>conftest.$ac_ext
9494cat >>conftest.$ac_ext <<_ACEOF
9495/* end confdefs.h. */
edfaf76d
LK
9496/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9497 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9498#define malloc_get_state innocuous_malloc_get_state
9499
98418dba 9500/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9501 which can conflict with char malloc_get_state (); below.
9502 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9503 <limits.h> exists even on freestanding compilers. */
edfaf76d 9504
19650fd6
AS
9505#ifdef __STDC__
9506# include <limits.h>
9507#else
9508# include <assert.h>
9509#endif
edfaf76d
LK
9510
9511#undef malloc_get_state
9512
ca81d7a0
JD
9513/* Override any GCC internal prototype to avoid an error.
9514 Use char because int might match the return type of a GCC
9515 builtin and then its argument prototype would still apply. */
98418dba
CW
9516#ifdef __cplusplus
9517extern "C"
9518#endif
98418dba 9519char malloc_get_state ();
98418dba
CW
9520/* The GNU C library defines this for functions which it implements
9521 to always fail with ENOSYS. Some functions are actually named
9522 something starting with __ and the normal name is an alias. */
ca81d7a0 9523#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9524choke me
98418dba
CW
9525#endif
9526
19650fd6
AS
9527int
9528main ()
9529{
ca81d7a0 9530return malloc_get_state ();
98418dba
CW
9531 ;
9532 return 0;
9533}
9534_ACEOF
9535rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9536if { (ac_try="$ac_link"
9537case "(($ac_try" in
9538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9539 *) ac_try_echo=$ac_try;;
9540esac
9541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9542 (eval "$ac_link") 2>conftest.er1
98418dba 9543 ac_status=$?
edfaf76d
LK
9544 grep -v '^ *+' conftest.er1 >conftest.err
9545 rm -f conftest.er1
9546 cat conftest.err >&5
c0d27fcc 9547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9548 (exit $ac_status); } && {
9549 test -z "$ac_c_werror_flag" ||
9550 test ! -s conftest.err
9551 } && test -s conftest$ac_exeext &&
9552 $as_test_x conftest$ac_exeext; then
98418dba
CW
9553 ac_cv_func_malloc_get_state=yes
9554else
9555 echo "$as_me: failed program was:" >&5
19650fd6
AS
9556sed 's/^/| /' conftest.$ac_ext >&5
9557
ca81d7a0 9558 ac_cv_func_malloc_get_state=no
98418dba 9559fi
ca81d7a0 9560
f053c89f 9561rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9562 conftest$ac_exeext conftest.$ac_ext
98418dba 9563fi
ca81d7a0
JD
9564{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9565echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9566if test $ac_cv_func_malloc_get_state = yes; then
9567 :
9568else
9569 doug_lea_malloc=no
9570fi
9571
ca81d7a0
JD
9572{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9573echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9574if test "${ac_cv_func_malloc_set_state+set}" = set; then
9575 echo $ECHO_N "(cached) $ECHO_C" >&6
9576else
9577 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9578/* confdefs.h. */
9579_ACEOF
9580cat confdefs.h >>conftest.$ac_ext
9581cat >>conftest.$ac_ext <<_ACEOF
9582/* end confdefs.h. */
edfaf76d
LK
9583/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9584 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9585#define malloc_set_state innocuous_malloc_set_state
9586
98418dba 9587/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9588 which can conflict with char malloc_set_state (); below.
9589 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9590 <limits.h> exists even on freestanding compilers. */
edfaf76d 9591
19650fd6
AS
9592#ifdef __STDC__
9593# include <limits.h>
9594#else
9595# include <assert.h>
9596#endif
edfaf76d
LK
9597
9598#undef malloc_set_state
9599
ca81d7a0
JD
9600/* Override any GCC internal prototype to avoid an error.
9601 Use char because int might match the return type of a GCC
9602 builtin and then its argument prototype would still apply. */
98418dba
CW
9603#ifdef __cplusplus
9604extern "C"
9605#endif
98418dba 9606char malloc_set_state ();
98418dba
CW
9607/* The GNU C library defines this for functions which it implements
9608 to always fail with ENOSYS. Some functions are actually named
9609 something starting with __ and the normal name is an alias. */
ca81d7a0 9610#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9611choke me
98418dba
CW
9612#endif
9613
19650fd6
AS
9614int
9615main ()
9616{
ca81d7a0 9617return malloc_set_state ();
98418dba
CW
9618 ;
9619 return 0;
9620}
9621_ACEOF
9622rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9623if { (ac_try="$ac_link"
9624case "(($ac_try" in
9625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9626 *) ac_try_echo=$ac_try;;
9627esac
9628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9629 (eval "$ac_link") 2>conftest.er1
98418dba 9630 ac_status=$?
edfaf76d
LK
9631 grep -v '^ *+' conftest.er1 >conftest.err
9632 rm -f conftest.er1
9633 cat conftest.err >&5
c0d27fcc 9634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9635 (exit $ac_status); } && {
9636 test -z "$ac_c_werror_flag" ||
9637 test ! -s conftest.err
9638 } && test -s conftest$ac_exeext &&
9639 $as_test_x conftest$ac_exeext; then
98418dba
CW
9640 ac_cv_func_malloc_set_state=yes
9641else
9642 echo "$as_me: failed program was:" >&5
19650fd6
AS
9643sed 's/^/| /' conftest.$ac_ext >&5
9644
ca81d7a0 9645 ac_cv_func_malloc_set_state=no
98418dba 9646fi
ca81d7a0 9647
f053c89f 9648rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9649 conftest$ac_exeext conftest.$ac_ext
98418dba 9650fi
ca81d7a0
JD
9651{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9652echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9653if test $ac_cv_func_malloc_set_state = yes; then
9654 :
9655else
9656 doug_lea_malloc=no
9657fi
9658
ca81d7a0
JD
9659{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9660echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9661if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9662 echo $ECHO_N "(cached) $ECHO_C" >&6
9663else
9664 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9665/* confdefs.h. */
9666_ACEOF
9667cat confdefs.h >>conftest.$ac_ext
9668cat >>conftest.$ac_ext <<_ACEOF
9669/* end confdefs.h. */
98418dba 9670extern void (* __after_morecore_hook)();
98418dba
CW
9671int
9672main ()
9673{
9674__after_morecore_hook = 0
9675 ;
9676 return 0;
9677}
9678_ACEOF
9679rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9680if { (ac_try="$ac_link"
9681case "(($ac_try" in
9682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9683 *) ac_try_echo=$ac_try;;
9684esac
9685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9686 (eval "$ac_link") 2>conftest.er1
98418dba 9687 ac_status=$?
edfaf76d
LK
9688 grep -v '^ *+' conftest.er1 >conftest.err
9689 rm -f conftest.er1
9690 cat conftest.err >&5
c0d27fcc 9691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9692 (exit $ac_status); } && {
9693 test -z "$ac_c_werror_flag" ||
9694 test ! -s conftest.err
9695 } && test -s conftest$ac_exeext &&
9696 $as_test_x conftest$ac_exeext; then
98418dba
CW
9697 emacs_cv_var___after_morecore_hook=yes
9698else
9699 echo "$as_me: failed program was:" >&5
19650fd6
AS
9700sed 's/^/| /' conftest.$ac_ext >&5
9701
ca81d7a0 9702 emacs_cv_var___after_morecore_hook=no
98418dba 9703fi
ca81d7a0 9704
f053c89f 9705rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9706 conftest$ac_exeext conftest.$ac_ext
98418dba 9707fi
ca81d7a0
JD
9708{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9709echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9710if test $emacs_cv_var___after_morecore_hook = no; then
9711 doug_lea_malloc=no
9712fi
9713if test "${system_malloc}" = "yes"; then
9714 GNU_MALLOC=no
9715 GNU_MALLOC_reason="
9716 (The GNU allocators don't work with this system configuration.)"
9717fi
9718if test "$doug_lea_malloc" = "yes" ; then
9719 if test "$GNU_MALLOC" = yes ; then
9720 GNU_MALLOC_reason="
9721 (Using Doug Lea's new malloc from the GNU C Library.)"
9722 fi
b936fae4 9723
c0d27fcc 9724cat >>confdefs.h <<\_ACEOF
98418dba 9725#define DOUG_LEA_MALLOC 1
c0d27fcc 9726_ACEOF
98418dba
CW
9727
9728fi
9729
9730if test x"${REL_ALLOC}" = x; then
9731 REL_ALLOC=${GNU_MALLOC}
9732fi
9733
9734
c0d27fcc
MR
9735
9736
9737for ac_header in stdlib.h unistd.h
98418dba
CW
9738do
9739as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
9740if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9741 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9742echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9743if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 9744 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9745fi
ca81d7a0
JD
9746ac_res=`eval echo '${'$as_ac_Header'}'`
9747 { echo "$as_me:$LINENO: result: $ac_res" >&5
9748echo "${ECHO_T}$ac_res" >&6; }
98418dba 9749else
c0d27fcc 9750 # Is the header compilable?
ca81d7a0
JD
9751{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9752echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9753cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9754/* confdefs.h. */
9755_ACEOF
9756cat confdefs.h >>conftest.$ac_ext
9757cat >>conftest.$ac_ext <<_ACEOF
9758/* end confdefs.h. */
98418dba
CW
9759$ac_includes_default
9760#include <$ac_header>
9761_ACEOF
9762rm -f conftest.$ac_objext
ca81d7a0
JD
9763if { (ac_try="$ac_compile"
9764case "(($ac_try" in
9765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9766 *) ac_try_echo=$ac_try;;
9767esac
9768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9769 (eval "$ac_compile") 2>conftest.er1
98418dba 9770 ac_status=$?
edfaf76d
LK
9771 grep -v '^ *+' conftest.er1 >conftest.err
9772 rm -f conftest.er1
9773 cat conftest.err >&5
c0d27fcc 9774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9775 (exit $ac_status); } && {
9776 test -z "$ac_c_werror_flag" ||
9777 test ! -s conftest.err
9778 } && test -s conftest.$ac_objext; then
c0d27fcc 9779 ac_header_compiler=yes
98418dba
CW
9780else
9781 echo "$as_me: failed program was:" >&5
19650fd6
AS
9782sed 's/^/| /' conftest.$ac_ext >&5
9783
ca81d7a0 9784 ac_header_compiler=no
98418dba 9785fi
ca81d7a0
JD
9786
9787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9788{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9789echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9790
c0d27fcc 9791# Is the header present?
ca81d7a0
JD
9792{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9793echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9794cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9795/* confdefs.h. */
9796_ACEOF
9797cat confdefs.h >>conftest.$ac_ext
9798cat >>conftest.$ac_ext <<_ACEOF
9799/* end confdefs.h. */
98418dba
CW
9800#include <$ac_header>
9801_ACEOF
ca81d7a0
JD
9802if { (ac_try="$ac_cpp conftest.$ac_ext"
9803case "(($ac_try" in
9804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9805 *) ac_try_echo=$ac_try;;
9806esac
9807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9808 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9809 ac_status=$?
6bae0ccf 9810 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9811 rm -f conftest.er1
9812 cat conftest.err >&5
c0d27fcc 9813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9814 (exit $ac_status); } >/dev/null && {
9815 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9816 test ! -s conftest.err
9817 }; then
c0d27fcc 9818 ac_header_preproc=yes
98418dba
CW
9819else
9820 echo "$as_me: failed program was:" >&5
19650fd6
AS
9821sed 's/^/| /' conftest.$ac_ext >&5
9822
c0d27fcc 9823 ac_header_preproc=no
98418dba 9824fi
ca81d7a0 9825
98418dba 9826rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9827{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9828echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
9829
9830# So? What about this header?
edfaf76d
LK
9831case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9832 yes:no: )
c0d27fcc
MR
9833 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9834echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9835 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9836echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9837 ac_header_preproc=yes
9838 ;;
9839 no:yes:* )
9840 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9841echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9842 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9843echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9844 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9845echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9846 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9847echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9848 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9849echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9850 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9851echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9852
19650fd6 9853 ;;
c0d27fcc 9854esac
ca81d7a0
JD
9855{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9856echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9857if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
9858 echo $ECHO_N "(cached) $ECHO_C" >&6
9859else
edfaf76d 9860 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9861fi
ca81d7a0
JD
9862ac_res=`eval echo '${'$as_ac_Header'}'`
9863 { echo "$as_me:$LINENO: result: $ac_res" >&5
9864echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
9865
9866fi
98418dba 9867if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9868 cat >>confdefs.h <<_ACEOF
98418dba 9869#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9870_ACEOF
98418dba
CW
9871
9872fi
c0d27fcc 9873
98418dba
CW
9874done
9875
c0d27fcc 9876
98418dba
CW
9877for ac_func in getpagesize
9878do
9879as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
9880{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9881echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9882if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9883 echo $ECHO_N "(cached) $ECHO_C" >&6
9884else
9885 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9886/* confdefs.h. */
9887_ACEOF
9888cat confdefs.h >>conftest.$ac_ext
9889cat >>conftest.$ac_ext <<_ACEOF
9890/* end confdefs.h. */
edfaf76d
LK
9891/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9892 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9893#define $ac_func innocuous_$ac_func
9894
98418dba 9895/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9896 which can conflict with char $ac_func (); below.
9897 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9898 <limits.h> exists even on freestanding compilers. */
edfaf76d 9899
19650fd6
AS
9900#ifdef __STDC__
9901# include <limits.h>
9902#else
9903# include <assert.h>
9904#endif
edfaf76d
LK
9905
9906#undef $ac_func
9907
ca81d7a0
JD
9908/* Override any GCC internal prototype to avoid an error.
9909 Use char because int might match the return type of a GCC
9910 builtin and then its argument prototype would still apply. */
98418dba
CW
9911#ifdef __cplusplus
9912extern "C"
9913#endif
98418dba 9914char $ac_func ();
98418dba
CW
9915/* The GNU C library defines this for functions which it implements
9916 to always fail with ENOSYS. Some functions are actually named
9917 something starting with __ and the normal name is an alias. */
ca81d7a0 9918#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 9919choke me
98418dba
CW
9920#endif
9921
19650fd6
AS
9922int
9923main ()
9924{
ca81d7a0 9925return $ac_func ();
98418dba
CW
9926 ;
9927 return 0;
9928}
9929_ACEOF
9930rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9931if { (ac_try="$ac_link"
9932case "(($ac_try" in
9933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9934 *) ac_try_echo=$ac_try;;
9935esac
9936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9937 (eval "$ac_link") 2>conftest.er1
98418dba 9938 ac_status=$?
edfaf76d
LK
9939 grep -v '^ *+' conftest.er1 >conftest.err
9940 rm -f conftest.er1
9941 cat conftest.err >&5
c0d27fcc 9942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9943 (exit $ac_status); } && {
9944 test -z "$ac_c_werror_flag" ||
9945 test ! -s conftest.err
9946 } && test -s conftest$ac_exeext &&
9947 $as_test_x conftest$ac_exeext; then
98418dba
CW
9948 eval "$as_ac_var=yes"
9949else
9950 echo "$as_me: failed program was:" >&5
19650fd6
AS
9951sed 's/^/| /' conftest.$ac_ext >&5
9952
ca81d7a0 9953 eval "$as_ac_var=no"
98418dba 9954fi
ca81d7a0 9955
f053c89f 9956rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9957 conftest$ac_exeext conftest.$ac_ext
98418dba 9958fi
ca81d7a0
JD
9959ac_res=`eval echo '${'$as_ac_var'}'`
9960 { echo "$as_me:$LINENO: result: $ac_res" >&5
9961echo "${ECHO_T}$ac_res" >&6; }
98418dba 9962if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9963 cat >>confdefs.h <<_ACEOF
98418dba 9964#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9965_ACEOF
98418dba
CW
9966
9967fi
9968done
9969
ca81d7a0
JD
9970{ echo "$as_me:$LINENO: checking for working mmap" >&5
9971echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
9972if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9973 echo $ECHO_N "(cached) $ECHO_C" >&6
9974else
9975 if test "$cross_compiling" = yes; then
9976 ac_cv_func_mmap_fixed_mapped=no
9977else
9978 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9979/* confdefs.h. */
9980_ACEOF
9981cat confdefs.h >>conftest.$ac_ext
9982cat >>conftest.$ac_ext <<_ACEOF
9983/* end confdefs.h. */
98418dba 9984$ac_includes_default
c0d27fcc
MR
9985/* malloc might have been renamed as rpl_malloc. */
9986#undef malloc
9987
98418dba
CW
9988/* Thanks to Mike Haertel and Jim Avera for this test.
9989 Here is a matrix of mmap possibilities:
9990 mmap private not fixed
9991 mmap private fixed at somewhere currently unmapped
9992 mmap private fixed at somewhere already mapped
9993 mmap shared not fixed
9994 mmap shared fixed at somewhere currently unmapped
9995 mmap shared fixed at somewhere already mapped
9996 For private mappings, we should verify that changes cannot be read()
9997 back from the file, nor mmap's back from the file at a different
9998 address. (There have been systems where private was not correctly
9999 implemented like the infamous i386 svr4.0, and systems where the
10000 VM page cache was not coherent with the file system buffer cache
10001 like early versions of FreeBSD and possibly contemporary NetBSD.)
10002 For shared mappings, we should conversely verify that changes get
c0d27fcc 10003 propagated back to all the places they're supposed to be.
98418dba
CW
10004
10005 Grep wants private fixed already mapped.
10006 The main things grep needs to know about mmap are:
10007 * does it exist and is it safe to write into the mmap'd area
10008 * how to use it (BSD variants) */
10009
10010#include <fcntl.h>
10011#include <sys/mman.h>
10012
f053c89f 10013#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10014char *malloc ();
10015#endif
10016
10017/* This mess was copied from the GNU getpagesize.h. */
f053c89f 10018#ifndef HAVE_GETPAGESIZE
98418dba 10019/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 10020# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10021# define HAVE_SYS_PARAM_H 1
10022# endif
10023
10024# ifdef _SC_PAGESIZE
10025# define getpagesize() sysconf(_SC_PAGESIZE)
10026# else /* no _SC_PAGESIZE */
f053c89f 10027# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10028# include <sys/param.h>
10029# ifdef EXEC_PAGESIZE
10030# define getpagesize() EXEC_PAGESIZE
10031# else /* no EXEC_PAGESIZE */
10032# ifdef NBPG
10033# define getpagesize() NBPG * CLSIZE
10034# ifndef CLSIZE
10035# define CLSIZE 1
10036# endif /* no CLSIZE */
10037# else /* no NBPG */
10038# ifdef NBPC
10039# define getpagesize() NBPC
10040# else /* no NBPC */
10041# ifdef PAGESIZE
10042# define getpagesize() PAGESIZE
10043# endif /* PAGESIZE */
10044# endif /* no NBPC */
10045# endif /* no NBPG */
10046# endif /* no EXEC_PAGESIZE */
10047# else /* no HAVE_SYS_PARAM_H */
10048# define getpagesize() 8192 /* punt totally */
10049# endif /* no HAVE_SYS_PARAM_H */
10050# endif /* no _SC_PAGESIZE */
10051
10052#endif /* no HAVE_GETPAGESIZE */
10053
10054int
10055main ()
10056{
10057 char *data, *data2, *data3;
10058 int i, pagesize;
10059 int fd;
10060
10061 pagesize = getpagesize ();
10062
10063 /* First, make a file with some known garbage in it. */
10064 data = (char *) malloc (pagesize);
10065 if (!data)
ca81d7a0 10066 return 1;
98418dba
CW
10067 for (i = 0; i < pagesize; ++i)
10068 *(data + i) = rand ();
10069 umask (0);
10070 fd = creat ("conftest.mmap", 0600);
10071 if (fd < 0)
ca81d7a0 10072 return 1;
98418dba 10073 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 10074 return 1;
98418dba
CW
10075 close (fd);
10076
10077 /* Next, try to mmap the file at a fixed address which already has
10078 something else allocated at it. If we can, also make sure that
10079 we see the same garbage. */
10080 fd = open ("conftest.mmap", O_RDWR);
10081 if (fd < 0)
ca81d7a0 10082 return 1;
98418dba
CW
10083 data2 = (char *) malloc (2 * pagesize);
10084 if (!data2)
ca81d7a0
JD
10085 return 1;
10086 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10087 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10088 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 10089 return 1;
98418dba
CW
10090 for (i = 0; i < pagesize; ++i)
10091 if (*(data + i) != *(data2 + i))
ca81d7a0 10092 return 1;
98418dba
CW
10093
10094 /* Finally, make sure that changes to the mapped area do not
10095 percolate back to the file as seen by read(). (This is a bug on
10096 some variants of i386 svr4.0.) */
10097 for (i = 0; i < pagesize; ++i)
10098 *(data2 + i) = *(data2 + i) + 1;
10099 data3 = (char *) malloc (pagesize);
10100 if (!data3)
ca81d7a0 10101 return 1;
98418dba 10102 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 10103 return 1;
98418dba
CW
10104 for (i = 0; i < pagesize; ++i)
10105 if (*(data + i) != *(data3 + i))
ca81d7a0 10106 return 1;
98418dba 10107 close (fd);
ca81d7a0 10108 return 0;
98418dba
CW
10109}
10110_ACEOF
10111rm -f conftest$ac_exeext
ca81d7a0
JD
10112if { (ac_try="$ac_link"
10113case "(($ac_try" in
10114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10115 *) ac_try_echo=$ac_try;;
10116esac
10117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10118 (eval "$ac_link") 2>&5
98418dba 10119 ac_status=$?
c0d27fcc 10120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10121 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
10122 { (case "(($ac_try" in
10123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10124 *) ac_try_echo=$ac_try;;
10125esac
10126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10127 (eval "$ac_try") 2>&5
98418dba 10128 ac_status=$?
c0d27fcc 10129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10130 (exit $ac_status); }; }; then
10131 ac_cv_func_mmap_fixed_mapped=yes
10132else
10133 echo "$as_me: program exited with status $ac_status" >&5
10134echo "$as_me: failed program was:" >&5
19650fd6
AS
10135sed 's/^/| /' conftest.$ac_ext >&5
10136
c0d27fcc 10137( exit $ac_status )
98418dba
CW
10138ac_cv_func_mmap_fixed_mapped=no
10139fi
ca81d7a0 10140rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10141fi
ca81d7a0
JD
10142
10143
98418dba 10144fi
ca81d7a0
JD
10145{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10146echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10147if test $ac_cv_func_mmap_fixed_mapped = yes; then
10148
c0d27fcc 10149cat >>confdefs.h <<\_ACEOF
98418dba 10150#define HAVE_MMAP 1
c0d27fcc 10151_ACEOF
98418dba
CW
10152
10153fi
10154rm -f conftest.mmap
10155
10156if test $use_mmap_for_buffers = yes; then
10157 REL_ALLOC=no
10158fi
10159
10160LIBS="$libsrc_libs $LIBS"
10161
c0d27fcc 10162
ca81d7a0
JD
10163{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10164echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10165if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10166 echo $ECHO_N "(cached) $ECHO_C" >&6
10167else
10168 ac_check_lib_save_LIBS=$LIBS
10169LIBS="-ldnet $LIBS"
10170cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10171/* confdefs.h. */
10172_ACEOF
10173cat confdefs.h >>conftest.$ac_ext
10174cat >>conftest.$ac_ext <<_ACEOF
10175/* end confdefs.h. */
98418dba 10176
ca81d7a0
JD
10177/* Override any GCC internal prototype to avoid an error.
10178 Use char because int might match the return type of a GCC
10179 builtin and then its argument prototype would still apply. */
98418dba
CW
10180#ifdef __cplusplus
10181extern "C"
10182#endif
98418dba 10183char dnet_ntoa ();
98418dba
CW
10184int
10185main ()
10186{
ca81d7a0 10187return dnet_ntoa ();
98418dba
CW
10188 ;
10189 return 0;
10190}
10191_ACEOF
10192rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10193if { (ac_try="$ac_link"
10194case "(($ac_try" in
10195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10196 *) ac_try_echo=$ac_try;;
10197esac
10198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10199 (eval "$ac_link") 2>conftest.er1
98418dba 10200 ac_status=$?
edfaf76d
LK
10201 grep -v '^ *+' conftest.er1 >conftest.err
10202 rm -f conftest.er1
10203 cat conftest.err >&5
c0d27fcc 10204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10205 (exit $ac_status); } && {
10206 test -z "$ac_c_werror_flag" ||
10207 test ! -s conftest.err
10208 } && test -s conftest$ac_exeext &&
10209 $as_test_x conftest$ac_exeext; then
98418dba
CW
10210 ac_cv_lib_dnet_dnet_ntoa=yes
10211else
10212 echo "$as_me: failed program was:" >&5
19650fd6
AS
10213sed 's/^/| /' conftest.$ac_ext >&5
10214
ca81d7a0 10215 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10216fi
ca81d7a0 10217
f053c89f 10218rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10219 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10220LIBS=$ac_check_lib_save_LIBS
10221fi
ca81d7a0
JD
10222{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10223echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10224if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10225 cat >>confdefs.h <<_ACEOF
98418dba 10226#define HAVE_LIBDNET 1
c0d27fcc 10227_ACEOF
98418dba
CW
10228
10229 LIBS="-ldnet $LIBS"
10230
10231fi
10232
c0d27fcc 10233
ca81d7a0
JD
10234{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10235echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10236if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10237 echo $ECHO_N "(cached) $ECHO_C" >&6
10238else
10239 ac_check_lib_save_LIBS=$LIBS
10240LIBS="-lXbsd $LIBS"
10241cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10242/* confdefs.h. */
10243_ACEOF
10244cat confdefs.h >>conftest.$ac_ext
10245cat >>conftest.$ac_ext <<_ACEOF
10246/* end confdefs.h. */
98418dba 10247
c0d27fcc 10248
98418dba
CW
10249int
10250main ()
10251{
ca81d7a0 10252return main ();
98418dba
CW
10253 ;
10254 return 0;
10255}
10256_ACEOF
10257rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10258if { (ac_try="$ac_link"
10259case "(($ac_try" in
10260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10261 *) ac_try_echo=$ac_try;;
10262esac
10263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10264 (eval "$ac_link") 2>conftest.er1
98418dba 10265 ac_status=$?
edfaf76d
LK
10266 grep -v '^ *+' conftest.er1 >conftest.err
10267 rm -f conftest.er1
10268 cat conftest.err >&5
c0d27fcc 10269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10270 (exit $ac_status); } && {
10271 test -z "$ac_c_werror_flag" ||
10272 test ! -s conftest.err
10273 } && test -s conftest$ac_exeext &&
10274 $as_test_x conftest$ac_exeext; then
98418dba
CW
10275 ac_cv_lib_Xbsd_main=yes
10276else
10277 echo "$as_me: failed program was:" >&5
19650fd6
AS
10278sed 's/^/| /' conftest.$ac_ext >&5
10279
ca81d7a0 10280 ac_cv_lib_Xbsd_main=no
98418dba 10281fi
ca81d7a0 10282
f053c89f 10283rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10284 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10285LIBS=$ac_check_lib_save_LIBS
10286fi
ca81d7a0
JD
10287{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10288echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10289if test $ac_cv_lib_Xbsd_main = yes; then
10290 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10291fi
10292
c0d27fcc
MR
10293
10294
ca81d7a0
JD
10295{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10296echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10297if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10298 echo $ECHO_N "(cached) $ECHO_C" >&6
10299else
10300 ac_check_lib_save_LIBS=$LIBS
10301LIBS="-lpthreads $LIBS"
10302cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10303/* confdefs.h. */
10304_ACEOF
10305cat confdefs.h >>conftest.$ac_ext
10306cat >>conftest.$ac_ext <<_ACEOF
10307/* end confdefs.h. */
98418dba 10308
ca81d7a0
JD
10309/* Override any GCC internal prototype to avoid an error.
10310 Use char because int might match the return type of a GCC
10311 builtin and then its argument prototype would still apply. */
98418dba
CW
10312#ifdef __cplusplus
10313extern "C"
10314#endif
98418dba 10315char cma_open ();
98418dba
CW
10316int
10317main ()
10318{
ca81d7a0 10319return cma_open ();
98418dba
CW
10320 ;
10321 return 0;
10322}
10323_ACEOF
10324rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10325if { (ac_try="$ac_link"
10326case "(($ac_try" in
10327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10328 *) ac_try_echo=$ac_try;;
10329esac
10330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10331 (eval "$ac_link") 2>conftest.er1
98418dba 10332 ac_status=$?
edfaf76d
LK
10333 grep -v '^ *+' conftest.er1 >conftest.err
10334 rm -f conftest.er1
10335 cat conftest.err >&5
c0d27fcc 10336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10337 (exit $ac_status); } && {
10338 test -z "$ac_c_werror_flag" ||
10339 test ! -s conftest.err
10340 } && test -s conftest$ac_exeext &&
10341 $as_test_x conftest$ac_exeext; then
98418dba
CW
10342 ac_cv_lib_pthreads_cma_open=yes
10343else
10344 echo "$as_me: failed program was:" >&5
19650fd6
AS
10345sed 's/^/| /' conftest.$ac_ext >&5
10346
ca81d7a0 10347 ac_cv_lib_pthreads_cma_open=no
98418dba 10348fi
ca81d7a0 10349
f053c89f 10350rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10351 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10352LIBS=$ac_check_lib_save_LIBS
10353fi
ca81d7a0
JD
10354{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10355echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10356if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10357 cat >>confdefs.h <<_ACEOF
98418dba 10358#define HAVE_LIBPTHREADS 1
c0d27fcc 10359_ACEOF
98418dba
CW
10360
10361 LIBS="-lpthreads $LIBS"
10362
10363fi
10364
c0d27fcc 10365
ca81d7a0
JD
10366{ echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
10367echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6; }
98418dba
CW
10368if test -d /usr/X386/include; then
10369 HAVE_XFREE386=yes
10370 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
10371else
10372 HAVE_XFREE386=no
10373fi
ca81d7a0
JD
10374{ echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
10375echo "${ECHO_T}$HAVE_XFREE386" >&6; }
98418dba 10376
55597d70
DL
10377
10378case ${host_os} in
10379aix*)
ca81d7a0
JD
10380 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10381echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10382if test "${gdb_cv_bigtoc+set}" = set; then
10383 echo $ECHO_N "(cached) $ECHO_C" >&6
10384else
10385
10386 case $GCC in
10387 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10388 *) gdb_cv_bigtoc=-bbigtoc ;;
10389 esac
10390
10391 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10392 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10393/* confdefs.h. */
10394_ACEOF
10395cat confdefs.h >>conftest.$ac_ext
10396cat >>conftest.$ac_ext <<_ACEOF
10397/* end confdefs.h. */
55597d70
DL
10398
10399int
10400main ()
10401{
10402int i;
10403 ;
10404 return 0;
10405}
10406_ACEOF
10407rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10408if { (ac_try="$ac_link"
10409case "(($ac_try" in
10410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10411 *) ac_try_echo=$ac_try;;
10412esac
10413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10414 (eval "$ac_link") 2>conftest.er1
55597d70 10415 ac_status=$?
edfaf76d
LK
10416 grep -v '^ *+' conftest.er1 >conftest.err
10417 rm -f conftest.er1
10418 cat conftest.err >&5
55597d70 10419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10420 (exit $ac_status); } && {
10421 test -z "$ac_c_werror_flag" ||
10422 test ! -s conftest.err
10423 } && test -s conftest$ac_exeext &&
10424 $as_test_x conftest$ac_exeext; then
55597d70
DL
10425 :
10426else
10427 echo "$as_me: failed program was:" >&5
19650fd6
AS
10428sed 's/^/| /' conftest.$ac_ext >&5
10429
ca81d7a0 10430 gdb_cv_bigtoc=
55597d70 10431fi
ca81d7a0 10432
f053c89f 10433rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10434 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10435
10436fi
ca81d7a0
JD
10437{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10438echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10439 ;;
10440esac
10441
ae1a998c
RS
10442# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10443# used for the tests that follow. We set them back to REAL_CFLAGS and
10444# REAL_CPPFLAGS later on.
98418dba
CW
10445
10446REAL_CPPFLAGS="$CPPFLAGS"
10447
10448if test "${HAVE_X11}" = "yes"; then
10449 DEFS="$C_SWITCH_X_SITE $DEFS"
10450 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10451 LIBS="$LIBX $LIBS"
10452 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10453 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10454
10455 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10456 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10457 # but it's more convenient here to set LD_RUN_PATH
10458 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10459 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10460 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10461 export LD_RUN_PATH
10462 fi
10463
10464 if test "${opsys}" = "gnu-linux"; then
ca81d7a0
JD
10465 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10466echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10467 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10468/* confdefs.h. */
10469_ACEOF
10470cat confdefs.h >>conftest.$ac_ext
10471cat >>conftest.$ac_ext <<_ACEOF
10472/* end confdefs.h. */
98418dba 10473
98418dba
CW
10474int
10475main ()
10476{
10477XOpenDisplay ("foo");
10478 ;
10479 return 0;
10480}
10481_ACEOF
10482rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10483if { (ac_try="$ac_link"
10484case "(($ac_try" in
10485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10486 *) ac_try_echo=$ac_try;;
10487esac
10488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10489 (eval "$ac_link") 2>conftest.er1
98418dba 10490 ac_status=$?
edfaf76d
LK
10491 grep -v '^ *+' conftest.er1 >conftest.err
10492 rm -f conftest.er1
10493 cat conftest.err >&5
c0d27fcc 10494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10495 (exit $ac_status); } && {
10496 test -z "$ac_c_werror_flag" ||
10497 test ! -s conftest.err
10498 } && test -s conftest$ac_exeext &&
10499 $as_test_x conftest$ac_exeext; then
35996d22 10500 xlinux_first_failure=no
98418dba
CW
10501else
10502 echo "$as_me: failed program was:" >&5
19650fd6
AS
10503sed 's/^/| /' conftest.$ac_ext >&5
10504
ca81d7a0 10505 xlinux_first_failure=yes
98418dba 10506fi
ca81d7a0 10507
f053c89f 10508rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10509 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10510 if test "${xlinux_first_failure}" = "yes"; then
10511 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10512 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10513 OLD_CPPFLAGS="$CPPFLAGS"
10514 OLD_LIBS="$LIBS"
10515 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10516 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10517 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10518 LIBS="$LIBS -b i486-linuxaout"
10519 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10520/* confdefs.h. */
10521_ACEOF
10522cat confdefs.h >>conftest.$ac_ext
10523cat >>conftest.$ac_ext <<_ACEOF
10524/* end confdefs.h. */
98418dba 10525
98418dba
CW
10526int
10527main ()
10528{
10529XOpenDisplay ("foo");
10530 ;
10531 return 0;
10532}
10533_ACEOF
10534rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10535if { (ac_try="$ac_link"
10536case "(($ac_try" in
10537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10538 *) ac_try_echo=$ac_try;;
10539esac
10540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10541 (eval "$ac_link") 2>conftest.er1
98418dba 10542 ac_status=$?
edfaf76d
LK
10543 grep -v '^ *+' conftest.er1 >conftest.err
10544 rm -f conftest.er1
10545 cat conftest.err >&5
c0d27fcc 10546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10547 (exit $ac_status); } && {
10548 test -z "$ac_c_werror_flag" ||
10549 test ! -s conftest.err
10550 } && test -s conftest$ac_exeext &&
10551 $as_test_x conftest$ac_exeext; then
98418dba
CW
10552 xlinux_second_failure=no
10553else
10554 echo "$as_me: failed program was:" >&5
19650fd6
AS
10555sed 's/^/| /' conftest.$ac_ext >&5
10556
ca81d7a0 10557 xlinux_second_failure=yes
98418dba 10558fi
ca81d7a0 10559
f053c89f 10560rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10561 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10562 if test "${xlinux_second_failure}" = "yes"; then
10563 # If we get the same failure with -b, there is no use adding -b.
10564 # So take it out. This plays safe.
10565 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10566 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10567 CPPFLAGS="$OLD_CPPFLAGS"
10568 LIBS="$OLD_LIBS"
ca81d7a0
JD
10569 { echo "$as_me:$LINENO: result: no" >&5
10570echo "${ECHO_T}no" >&6; }
98418dba 10571 else
ca81d7a0
JD
10572 { echo "$as_me:$LINENO: result: yes" >&5
10573echo "${ECHO_T}yes" >&6; }
98418dba
CW
10574 fi
10575 else
ca81d7a0
JD
10576 { echo "$as_me:$LINENO: result: no" >&5
10577echo "${ECHO_T}no" >&6; }
98418dba
CW
10578 fi
10579 fi
10580
10581 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10582 # header files included from there.
ca81d7a0
JD
10583 { echo "$as_me:$LINENO: checking for Xkb" >&5
10584echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10585 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10586/* confdefs.h. */
10587_ACEOF
10588cat confdefs.h >>conftest.$ac_ext
10589cat >>conftest.$ac_ext <<_ACEOF
10590/* end confdefs.h. */
98418dba
CW
10591#include <X11/Xlib.h>
10592#include <X11/XKBlib.h>
98418dba
CW
10593int
10594main ()
10595{
10596XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
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
98418dba 10609 ac_status=$?
edfaf76d
LK
10610 grep -v '^ *+' conftest.er1 >conftest.err
10611 rm -f conftest.er1
10612 cat conftest.err >&5
c0d27fcc 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
98418dba
CW
10619 emacs_xkb=yes
10620else
10621 echo "$as_me: failed program was:" >&5
19650fd6
AS
10622sed 's/^/| /' conftest.$ac_ext >&5
10623
ca81d7a0 10624 emacs_xkb=no
98418dba 10625fi
ca81d7a0 10626
f053c89f 10627rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10628 conftest$ac_exeext conftest.$ac_ext
ca81d7a0
JD
10629 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10630echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10631 if test $emacs_xkb = yes; then
b936fae4 10632
c0d27fcc 10633cat >>confdefs.h <<\_ACEOF
98418dba 10634#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10635_ACEOF
98418dba
CW
10636
10637 fi
10638
c0d27fcc
MR
10639
10640
10641
10642
98418dba
CW
10643for ac_func in XrmSetDatabase XScreenResourceString \
10644XScreenNumberOfScreen XSetWMProtocols
10645do
10646as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10647{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10648echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10649if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10650 echo $ECHO_N "(cached) $ECHO_C" >&6
10651else
10652 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10653/* confdefs.h. */
10654_ACEOF
10655cat confdefs.h >>conftest.$ac_ext
10656cat >>conftest.$ac_ext <<_ACEOF
10657/* end confdefs.h. */
edfaf76d
LK
10658/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10659 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10660#define $ac_func innocuous_$ac_func
10661
98418dba 10662/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10663 which can conflict with char $ac_func (); below.
10664 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10665 <limits.h> exists even on freestanding compilers. */
edfaf76d 10666
19650fd6
AS
10667#ifdef __STDC__
10668# include <limits.h>
10669#else
10670# include <assert.h>
10671#endif
edfaf76d
LK
10672
10673#undef $ac_func
10674
ca81d7a0
JD
10675/* Override any GCC internal prototype to avoid an error.
10676 Use char because int might match the return type of a GCC
10677 builtin and then its argument prototype would still apply. */
98418dba
CW
10678#ifdef __cplusplus
10679extern "C"
10680#endif
98418dba 10681char $ac_func ();
98418dba
CW
10682/* The GNU C library defines this for functions which it implements
10683 to always fail with ENOSYS. Some functions are actually named
10684 something starting with __ and the normal name is an alias. */
ca81d7a0 10685#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10686choke me
98418dba
CW
10687#endif
10688
19650fd6
AS
10689int
10690main ()
10691{
ca81d7a0 10692return $ac_func ();
98418dba
CW
10693 ;
10694 return 0;
10695}
10696_ACEOF
10697rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10698if { (ac_try="$ac_link"
10699case "(($ac_try" in
10700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10701 *) ac_try_echo=$ac_try;;
10702esac
10703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10704 (eval "$ac_link") 2>conftest.er1
98418dba 10705 ac_status=$?
edfaf76d
LK
10706 grep -v '^ *+' conftest.er1 >conftest.err
10707 rm -f conftest.er1
10708 cat conftest.err >&5
c0d27fcc 10709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10710 (exit $ac_status); } && {
10711 test -z "$ac_c_werror_flag" ||
10712 test ! -s conftest.err
10713 } && test -s conftest$ac_exeext &&
10714 $as_test_x conftest$ac_exeext; then
98418dba
CW
10715 eval "$as_ac_var=yes"
10716else
10717 echo "$as_me: failed program was:" >&5
19650fd6
AS
10718sed 's/^/| /' conftest.$ac_ext >&5
10719
ca81d7a0 10720 eval "$as_ac_var=no"
98418dba 10721fi
ca81d7a0 10722
f053c89f 10723rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10724 conftest$ac_exeext conftest.$ac_ext
98418dba 10725fi
ca81d7a0
JD
10726ac_res=`eval echo '${'$as_ac_var'}'`
10727 { echo "$as_me:$LINENO: result: $ac_res" >&5
10728echo "${ECHO_T}$ac_res" >&6; }
98418dba 10729if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10730 cat >>confdefs.h <<_ACEOF
98418dba 10731#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10732_ACEOF
98418dba
CW
10733
10734fi
10735done
10736
10737fi
10738
10739if test "${window_system}" = "x11"; then
ca81d7a0
JD
10740 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10741echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
10742 if test "${emacs_cv_x11_version_6+set}" = set; then
10743 echo $ECHO_N "(cached) $ECHO_C" >&6
10744else
10745 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10746/* confdefs.h. */
10747_ACEOF
10748cat confdefs.h >>conftest.$ac_ext
10749cat >>conftest.$ac_ext <<_ACEOF
10750/* end confdefs.h. */
98418dba 10751#include <X11/Xlib.h>
98418dba
CW
10752int
10753main ()
10754{
10755#if XlibSpecificationRelease < 6
10756fail;
10757#endif
10758
10759 ;
10760 return 0;
10761}
10762_ACEOF
10763rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10764if { (ac_try="$ac_link"
10765case "(($ac_try" in
10766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10767 *) ac_try_echo=$ac_try;;
10768esac
10769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10770 (eval "$ac_link") 2>conftest.er1
98418dba 10771 ac_status=$?
edfaf76d
LK
10772 grep -v '^ *+' conftest.er1 >conftest.err
10773 rm -f conftest.er1
10774 cat conftest.err >&5
c0d27fcc 10775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10776 (exit $ac_status); } && {
10777 test -z "$ac_c_werror_flag" ||
10778 test ! -s conftest.err
10779 } && test -s conftest$ac_exeext &&
10780 $as_test_x conftest$ac_exeext; then
98418dba
CW
10781 emacs_cv_x11_version_6=yes
10782else
10783 echo "$as_me: failed program was:" >&5
19650fd6
AS
10784sed 's/^/| /' conftest.$ac_ext >&5
10785
ca81d7a0 10786 emacs_cv_x11_version_6=no
98418dba 10787fi
ca81d7a0 10788
f053c89f 10789rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10790 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10791fi
10792
10793 if test $emacs_cv_x11_version_6 = yes; then
ca81d7a0
JD
10794 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10795echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10796
c0d27fcc 10797cat >>confdefs.h <<\_ACEOF
98418dba 10798#define HAVE_X11R6 1
c0d27fcc 10799_ACEOF
98418dba
CW
10800
10801 else
ca81d7a0
JD
10802 { echo "$as_me:$LINENO: result: before 6" >&5
10803echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10804 fi
10805fi
10806
10807if test "${window_system}" = "x11"; then
ca81d7a0
JD
10808 { echo "$as_me:$LINENO: checking X11 version 5" >&5
10809echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6; }
98418dba
CW
10810 if test "${emacs_cv_x11_version_5+set}" = set; then
10811 echo $ECHO_N "(cached) $ECHO_C" >&6
10812else
10813 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10814/* confdefs.h. */
10815_ACEOF
10816cat confdefs.h >>conftest.$ac_ext
10817cat >>conftest.$ac_ext <<_ACEOF
10818/* end confdefs.h. */
98418dba 10819#include <X11/Xlib.h>
98418dba
CW
10820int
10821main ()
10822{
10823#if XlibSpecificationRelease < 5
10824fail;
10825#endif
10826
10827 ;
10828 return 0;
10829}
10830_ACEOF
10831rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10832if { (ac_try="$ac_link"
10833case "(($ac_try" in
10834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10835 *) ac_try_echo=$ac_try;;
10836esac
10837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10838 (eval "$ac_link") 2>conftest.er1
98418dba 10839 ac_status=$?
edfaf76d
LK
10840 grep -v '^ *+' conftest.er1 >conftest.err
10841 rm -f conftest.er1
10842 cat conftest.err >&5
c0d27fcc 10843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10844 (exit $ac_status); } && {
10845 test -z "$ac_c_werror_flag" ||
10846 test ! -s conftest.err
10847 } && test -s conftest$ac_exeext &&
10848 $as_test_x conftest$ac_exeext; then
98418dba
CW
10849 emacs_cv_x11_version_5=yes
10850else
10851 echo "$as_me: failed program was:" >&5
19650fd6
AS
10852sed 's/^/| /' conftest.$ac_ext >&5
10853
ca81d7a0 10854 emacs_cv_x11_version_5=no
98418dba 10855fi
ca81d7a0 10856
f053c89f 10857rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10858 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10859fi
10860
10861 if test $emacs_cv_x11_version_5 = yes; then
ca81d7a0
JD
10862 { echo "$as_me:$LINENO: result: 5 or newer" >&5
10863echo "${ECHO_T}5 or newer" >&6; }
98418dba 10864 HAVE_X11R5=yes
b936fae4 10865
c0d27fcc 10866cat >>confdefs.h <<\_ACEOF
98418dba 10867#define HAVE_X11R5 1
c0d27fcc 10868_ACEOF
98418dba
CW
10869
10870 else
10871 HAVE_X11R5=no
ca81d7a0
JD
10872 { echo "$as_me:$LINENO: result: before 5" >&5
10873echo "${ECHO_T}before 5" >&6; }
98418dba
CW
10874 fi
10875fi
10876
488dd4c4 10877HAVE_GTK=no
8eeae1c9
JD
10878if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then
10879 USE_X_TOOLKIT=none
10880fi
488dd4c4 10881if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 10882 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
10883 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
10884echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
10885 { (exit 1); exit 1; }; };
10886 fi
448541bc
JD
10887 GLIB_REQUIRED=2.4
10888 GTK_REQUIRED=2.4
488dd4c4
JD
10889 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10890
10891 if test "X${with_pkg_config_prog}" != X; then
10892 PKG_CONFIG="${with_pkg_config_prog}"
10893 fi
10894
10895 succeeded=no
10896
10897 if test -z "$PKG_CONFIG"; then
10898 # Extract the first word of "pkg-config", so it can be a program name with args.
10899set dummy pkg-config; ac_word=$2
ca81d7a0
JD
10900{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10901echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
10902if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10903 echo $ECHO_N "(cached) $ECHO_C" >&6
10904else
10905 case $PKG_CONFIG in
10906 [\\/]* | ?:[\\/]*)
10907 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10908 ;;
10909 *)
10910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10911for as_dir in $PATH
10912do
10913 IFS=$as_save_IFS
10914 test -z "$as_dir" && as_dir=.
10915 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 10916 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
10917 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10918 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10919 break 2
10920 fi
10921done
10922done
ca81d7a0 10923IFS=$as_save_IFS
488dd4c4
JD
10924
10925 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10926 ;;
10927esac
10928fi
10929PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 10930if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
10931 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10932echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 10933else
ca81d7a0
JD
10934 { echo "$as_me:$LINENO: result: no" >&5
10935echo "${ECHO_T}no" >&6; }
488dd4c4
JD
10936fi
10937
ca81d7a0 10938
488dd4c4
JD
10939 fi
10940
10941 if test "$PKG_CONFIG" = "no" ; then
439f58ee
JD
10942 { { echo "$as_me:$LINENO: error:
10943 *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog. Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." >&5
10944echo "$as_me: error:
10945 *** The pkg-config script could not be found. Make sure it is in your path, or give the full path to pkg-config with the PKG_CONFIG environment variable or --with-pkg-config-prog. Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." >&2;}
10946 { (exit 1); exit 1; }; }
488dd4c4
JD
10947 else
10948 PKG_CONFIG_MIN_VERSION=0.9.0
10949 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
10950 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
10951echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 10952
67db6aa2 10953 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
ca81d7a0
JD
10954 { echo "$as_me:$LINENO: result: yes" >&5
10955echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
10956 succeeded=yes
10957
ca81d7a0
JD
10958 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
10959echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 10960 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
10961 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
10962echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 10963
ca81d7a0
JD
10964 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
10965echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 10966 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
10967 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
10968echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 10969 else
ca81d7a0
JD
10970 { echo "$as_me:$LINENO: result: no" >&5
10971echo "${ECHO_T}no" >&6; }
488dd4c4
JD
10972 GTK_CFLAGS=""
10973 GTK_LIBS=""
10974 ## If we have a custom action on failure, don't print errors, but
10975 ## do set a variable so people can do so.
10976 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
10977 echo $GTK_PKG_ERRORS
10978 fi
10979
10980
10981
10982 else
10983 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10984 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10985 fi
10986 fi
10987
10988 if test $succeeded = yes; then
10989 :
10990 else
10991 { { echo "$as_me:$LINENO: error: Library requirements ($GTK_MODULES) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5
10992echo "$as_me: error: Library requirements ($GTK_MODULES) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;}
10993 { (exit 1); exit 1; }; }
10994 fi
10995
10996
10997
10998 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
10999 CFLAGS="$CFLAGS $GTK_CFLAGS"
11000 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11001 GTK_COMPILES=no
57669b57 11002
8eeae1c9 11003for ac_func in gtk_main
57669b57
JD
11004do
11005as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11006{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11007echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11008if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11009 echo $ECHO_N "(cached) $ECHO_C" >&6
11010else
11011 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11012/* confdefs.h. */
11013_ACEOF
11014cat confdefs.h >>conftest.$ac_ext
11015cat >>conftest.$ac_ext <<_ACEOF
11016/* end confdefs.h. */
edfaf76d
LK
11017/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11018 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11019#define $ac_func innocuous_$ac_func
11020
57669b57
JD
11021/* System header to define __stub macros and hopefully few prototypes,
11022 which can conflict with char $ac_func (); below.
11023 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11024 <limits.h> exists even on freestanding compilers. */
edfaf76d 11025
57669b57
JD
11026#ifdef __STDC__
11027# include <limits.h>
11028#else
11029# include <assert.h>
11030#endif
edfaf76d
LK
11031
11032#undef $ac_func
11033
ca81d7a0
JD
11034/* Override any GCC internal prototype to avoid an error.
11035 Use char because int might match the return type of a GCC
11036 builtin and then its argument prototype would still apply. */
57669b57
JD
11037#ifdef __cplusplus
11038extern "C"
57669b57 11039#endif
57669b57
JD
11040char $ac_func ();
11041/* The GNU C library defines this for functions which it implements
11042 to always fail with ENOSYS. Some functions are actually named
11043 something starting with __ and the normal name is an alias. */
ca81d7a0 11044#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11045choke me
57669b57
JD
11046#endif
11047
11048int
11049main ()
11050{
ca81d7a0 11051return $ac_func ();
57669b57
JD
11052 ;
11053 return 0;
11054}
11055_ACEOF
11056rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11057if { (ac_try="$ac_link"
11058case "(($ac_try" in
11059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11060 *) ac_try_echo=$ac_try;;
11061esac
11062eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11063 (eval "$ac_link") 2>conftest.er1
57669b57 11064 ac_status=$?
edfaf76d
LK
11065 grep -v '^ *+' conftest.er1 >conftest.err
11066 rm -f conftest.er1
11067 cat conftest.err >&5
57669b57 11068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11069 (exit $ac_status); } && {
11070 test -z "$ac_c_werror_flag" ||
11071 test ! -s conftest.err
11072 } && test -s conftest$ac_exeext &&
11073 $as_test_x conftest$ac_exeext; then
57669b57
JD
11074 eval "$as_ac_var=yes"
11075else
11076 echo "$as_me: failed program was:" >&5
11077sed 's/^/| /' conftest.$ac_ext >&5
11078
ca81d7a0 11079 eval "$as_ac_var=no"
57669b57 11080fi
ca81d7a0 11081
f053c89f 11082rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11083 conftest$ac_exeext conftest.$ac_ext
57669b57 11084fi
ca81d7a0
JD
11085ac_res=`eval echo '${'$as_ac_var'}'`
11086 { echo "$as_me:$LINENO: result: $ac_res" >&5
11087echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11088if test `eval echo '${'$as_ac_var'}'` = yes; then
11089 cat >>confdefs.h <<_ACEOF
11090#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11091_ACEOF
8eeae1c9 11092 GTK_COMPILES=yes
57669b57
JD
11093fi
11094done
11095
8eeae1c9
JD
11096 if test "${GTK_COMPILES}" != "yes"; then
11097 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
11098echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11099 { (exit 1); exit 1; }; };
11100 fi
11101
11102 HAVE_GTK=yes
57669b57
JD
11103
11104cat >>confdefs.h <<\_ACEOF
8eeae1c9 11105#define HAVE_GTK 1
572a3cc2
JD
11106_ACEOF
11107
8eeae1c9
JD
11108 USE_X_TOOLKIT=none
11109
11110 if test "$with_toolkit_scroll_bars" != no; then
11111 with_toolkit_scroll_bars=yes
572a3cc2 11112 fi
572a3cc2 11113
8eeae1c9
JD
11114 HAVE_GTK_MULTIDISPLAY=no
11115
11116for ac_func in gdk_display_open
572a3cc2
JD
11117do
11118as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11119{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11120echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11121if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11122 echo $ECHO_N "(cached) $ECHO_C" >&6
11123else
11124 cat >conftest.$ac_ext <<_ACEOF
11125/* confdefs.h. */
11126_ACEOF
11127cat confdefs.h >>conftest.$ac_ext
11128cat >>conftest.$ac_ext <<_ACEOF
11129/* end confdefs.h. */
edfaf76d
LK
11130/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11131 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11132#define $ac_func innocuous_$ac_func
11133
572a3cc2
JD
11134/* System header to define __stub macros and hopefully few prototypes,
11135 which can conflict with char $ac_func (); below.
11136 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11137 <limits.h> exists even on freestanding compilers. */
edfaf76d 11138
572a3cc2
JD
11139#ifdef __STDC__
11140# include <limits.h>
11141#else
11142# include <assert.h>
11143#endif
edfaf76d
LK
11144
11145#undef $ac_func
11146
ca81d7a0
JD
11147/* Override any GCC internal prototype to avoid an error.
11148 Use char because int might match the return type of a GCC
11149 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11150#ifdef __cplusplus
11151extern "C"
572a3cc2 11152#endif
572a3cc2
JD
11153char $ac_func ();
11154/* The GNU C library defines this for functions which it implements
11155 to always fail with ENOSYS. Some functions are actually named
11156 something starting with __ and the normal name is an alias. */
ca81d7a0 11157#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11158choke me
572a3cc2
JD
11159#endif
11160
11161int
11162main ()
11163{
ca81d7a0 11164return $ac_func ();
572a3cc2
JD
11165 ;
11166 return 0;
11167}
11168_ACEOF
11169rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11170if { (ac_try="$ac_link"
11171case "(($ac_try" in
11172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11173 *) ac_try_echo=$ac_try;;
11174esac
11175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11176 (eval "$ac_link") 2>conftest.er1
572a3cc2 11177 ac_status=$?
edfaf76d
LK
11178 grep -v '^ *+' conftest.er1 >conftest.err
11179 rm -f conftest.er1
11180 cat conftest.err >&5
572a3cc2 11181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11182 (exit $ac_status); } && {
11183 test -z "$ac_c_werror_flag" ||
11184 test ! -s conftest.err
11185 } && test -s conftest$ac_exeext &&
11186 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11187 eval "$as_ac_var=yes"
11188else
11189 echo "$as_me: failed program was:" >&5
11190sed 's/^/| /' conftest.$ac_ext >&5
11191
ca81d7a0 11192 eval "$as_ac_var=no"
572a3cc2 11193fi
ca81d7a0 11194
f053c89f 11195rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11196 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11197fi
ca81d7a0
JD
11198ac_res=`eval echo '${'$as_ac_var'}'`
11199 { echo "$as_me:$LINENO: result: $ac_res" >&5
11200echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11201if test `eval echo '${'$as_ac_var'}'` = yes; then
11202 cat >>confdefs.h <<_ACEOF
11203#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11204_ACEOF
8eeae1c9 11205 HAVE_GTK_MULTIDISPLAY=yes
572a3cc2
JD
11206fi
11207done
11208
8eeae1c9 11209 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
572a3cc2 11210
8eeae1c9
JD
11211cat >>confdefs.h <<\_ACEOF
11212#define HAVE_GTK_MULTIDISPLAY 1
11213_ACEOF
572a3cc2 11214
8eeae1c9
JD
11215 fi
11216 HAVE_GTK_FILE_SELECTION=no
11217
11218for ac_func in gtk_file_selection_new
572a3cc2
JD
11219do
11220as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11221{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11222echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11223if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11224 echo $ECHO_N "(cached) $ECHO_C" >&6
11225else
11226 cat >conftest.$ac_ext <<_ACEOF
11227/* confdefs.h. */
11228_ACEOF
11229cat confdefs.h >>conftest.$ac_ext
11230cat >>conftest.$ac_ext <<_ACEOF
11231/* end confdefs.h. */
edfaf76d
LK
11232/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11233 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11234#define $ac_func innocuous_$ac_func
11235
572a3cc2
JD
11236/* System header to define __stub macros and hopefully few prototypes,
11237 which can conflict with char $ac_func (); below.
11238 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11239 <limits.h> exists even on freestanding compilers. */
edfaf76d 11240
572a3cc2
JD
11241#ifdef __STDC__
11242# include <limits.h>
11243#else
11244# include <assert.h>
11245#endif
edfaf76d
LK
11246
11247#undef $ac_func
11248
ca81d7a0
JD
11249/* Override any GCC internal prototype to avoid an error.
11250 Use char because int might match the return type of a GCC
11251 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11252#ifdef __cplusplus
11253extern "C"
572a3cc2 11254#endif
572a3cc2
JD
11255char $ac_func ();
11256/* The GNU C library defines this for functions which it implements
11257 to always fail with ENOSYS. Some functions are actually named
11258 something starting with __ and the normal name is an alias. */
ca81d7a0 11259#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11260choke me
572a3cc2
JD
11261#endif
11262
11263int
11264main ()
11265{
ca81d7a0 11266return $ac_func ();
572a3cc2
JD
11267 ;
11268 return 0;
11269}
11270_ACEOF
11271rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11272if { (ac_try="$ac_link"
11273case "(($ac_try" in
11274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11275 *) ac_try_echo=$ac_try;;
11276esac
11277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11278 (eval "$ac_link") 2>conftest.er1
572a3cc2 11279 ac_status=$?
edfaf76d
LK
11280 grep -v '^ *+' conftest.er1 >conftest.err
11281 rm -f conftest.er1
11282 cat conftest.err >&5
572a3cc2 11283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11284 (exit $ac_status); } && {
11285 test -z "$ac_c_werror_flag" ||
11286 test ! -s conftest.err
11287 } && test -s conftest$ac_exeext &&
11288 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11289 eval "$as_ac_var=yes"
11290else
11291 echo "$as_me: failed program was:" >&5
11292sed 's/^/| /' conftest.$ac_ext >&5
11293
ca81d7a0 11294 eval "$as_ac_var=no"
572a3cc2 11295fi
ca81d7a0 11296
f053c89f 11297rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11298 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11299fi
ca81d7a0
JD
11300ac_res=`eval echo '${'$as_ac_var'}'`
11301 { echo "$as_me:$LINENO: result: $ac_res" >&5
11302echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11303if test `eval echo '${'$as_ac_var'}'` = yes; then
11304 cat >>confdefs.h <<_ACEOF
11305#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11306_ACEOF
8eeae1c9 11307 HAVE_GTK_FILE_SELECTION=yes
572a3cc2
JD
11308fi
11309done
11310
11311
8eeae1c9 11312 HAVE_GTK_FILE_CHOOSER=no
b8bdffbe 11313
8eeae1c9 11314for ac_func in gtk_file_chooser_dialog_new
b8bdffbe 11315do
8eeae1c9 11316as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11317{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11318echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11319if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe 11320 echo $ECHO_N "(cached) $ECHO_C" >&6
b8bdffbe 11321else
8eeae1c9 11322 cat >conftest.$ac_ext <<_ACEOF
b8bdffbe
JD
11323/* confdefs.h. */
11324_ACEOF
11325cat confdefs.h >>conftest.$ac_ext
11326cat >>conftest.$ac_ext <<_ACEOF
11327/* end confdefs.h. */
8eeae1c9
JD
11328/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11329 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11330#define $ac_func innocuous_$ac_func
11331
11332/* System header to define __stub macros and hopefully few prototypes,
11333 which can conflict with char $ac_func (); below.
11334 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11335 <limits.h> exists even on freestanding compilers. */
11336
11337#ifdef __STDC__
11338# include <limits.h>
11339#else
11340# include <assert.h>
11341#endif
11342
11343#undef $ac_func
11344
ca81d7a0
JD
11345/* Override any GCC internal prototype to avoid an error.
11346 Use char because int might match the return type of a GCC
11347 builtin and then its argument prototype would still apply. */
8eeae1c9
JD
11348#ifdef __cplusplus
11349extern "C"
11350#endif
11351char $ac_func ();
11352/* The GNU C library defines this for functions which it implements
11353 to always fail with ENOSYS. Some functions are actually named
11354 something starting with __ and the normal name is an alias. */
ca81d7a0 11355#if defined __stub_$ac_func || defined __stub___$ac_func
8eeae1c9
JD
11356choke me
11357#endif
11358
11359int
11360main ()
11361{
ca81d7a0 11362return $ac_func ();
8eeae1c9
JD
11363 ;
11364 return 0;
11365}
11366_ACEOF
11367rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11368if { (ac_try="$ac_link"
11369case "(($ac_try" in
11370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11371 *) ac_try_echo=$ac_try;;
11372esac
11373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11374 (eval "$ac_link") 2>conftest.er1
8eeae1c9
JD
11375 ac_status=$?
11376 grep -v '^ *+' conftest.er1 >conftest.err
11377 rm -f conftest.er1
11378 cat conftest.err >&5
11379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11380 (exit $ac_status); } && {
11381 test -z "$ac_c_werror_flag" ||
11382 test ! -s conftest.err
11383 } && test -s conftest$ac_exeext &&
11384 $as_test_x conftest$ac_exeext; then
8eeae1c9
JD
11385 eval "$as_ac_var=yes"
11386else
11387 echo "$as_me: failed program was:" >&5
11388sed 's/^/| /' conftest.$ac_ext >&5
11389
ca81d7a0 11390 eval "$as_ac_var=no"
8eeae1c9 11391fi
ca81d7a0 11392
f053c89f 11393rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8eeae1c9
JD
11394 conftest$ac_exeext conftest.$ac_ext
11395fi
ca81d7a0
JD
11396ac_res=`eval echo '${'$as_ac_var'}'`
11397 { echo "$as_me:$LINENO: result: $ac_res" >&5
11398echo "${ECHO_T}$ac_res" >&6; }
8eeae1c9
JD
11399if test `eval echo '${'$as_ac_var'}'` = yes; then
11400 cat >>confdefs.h <<_ACEOF
11401#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11402_ACEOF
11403 HAVE_GTK_FILE_CHOOSER=yes
11404fi
11405done
11406
11407
11408 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11409 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11410
11411cat >>confdefs.h <<\_ACEOF
11412#define HAVE_GTK_FILE_BOTH 1
11413_ACEOF
11414
11415 fi
11416
11417 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11418 HAVE_GTK_AND_PTHREAD=no
11419
11420for ac_header in pthread.h
11421do
11422as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
11423if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11424 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11425echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11426if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8eeae1c9
JD
11427 echo $ECHO_N "(cached) $ECHO_C" >&6
11428fi
ca81d7a0
JD
11429ac_res=`eval echo '${'$as_ac_Header'}'`
11430 { echo "$as_me:$LINENO: result: $ac_res" >&5
11431echo "${ECHO_T}$ac_res" >&6; }
8eeae1c9
JD
11432else
11433 # Is the header compilable?
ca81d7a0
JD
11434{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11435echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8eeae1c9
JD
11436cat >conftest.$ac_ext <<_ACEOF
11437/* confdefs.h. */
11438_ACEOF
11439cat confdefs.h >>conftest.$ac_ext
11440cat >>conftest.$ac_ext <<_ACEOF
11441/* end confdefs.h. */
11442$ac_includes_default
11443#include <$ac_header>
11444_ACEOF
11445rm -f conftest.$ac_objext
ca81d7a0
JD
11446if { (ac_try="$ac_compile"
11447case "(($ac_try" in
11448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11449 *) ac_try_echo=$ac_try;;
11450esac
11451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11452 (eval "$ac_compile") 2>conftest.er1
8eeae1c9
JD
11453 ac_status=$?
11454 grep -v '^ *+' conftest.er1 >conftest.err
11455 rm -f conftest.er1
edfaf76d 11456 cat conftest.err >&5
b8bdffbe 11457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11458 (exit $ac_status); } && {
11459 test -z "$ac_c_werror_flag" ||
11460 test ! -s conftest.err
11461 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11462 ac_header_compiler=yes
11463else
11464 echo "$as_me: failed program was:" >&5
11465sed 's/^/| /' conftest.$ac_ext >&5
11466
ca81d7a0 11467 ac_header_compiler=no
b8bdffbe 11468fi
ca81d7a0
JD
11469
11470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11471{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11472echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11473
11474# Is the header present?
ca81d7a0
JD
11475{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11476echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11477cat >conftest.$ac_ext <<_ACEOF
11478/* confdefs.h. */
11479_ACEOF
11480cat confdefs.h >>conftest.$ac_ext
11481cat >>conftest.$ac_ext <<_ACEOF
11482/* end confdefs.h. */
11483#include <$ac_header>
11484_ACEOF
ca81d7a0
JD
11485if { (ac_try="$ac_cpp conftest.$ac_ext"
11486case "(($ac_try" in
11487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11488 *) ac_try_echo=$ac_try;;
11489esac
11490eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11491 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11492 ac_status=$?
11493 grep -v '^ *+' conftest.er1 >conftest.err
11494 rm -f conftest.er1
11495 cat conftest.err >&5
11496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11497 (exit $ac_status); } >/dev/null && {
11498 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11499 test ! -s conftest.err
11500 }; then
b8bdffbe
JD
11501 ac_header_preproc=yes
11502else
11503 echo "$as_me: failed program was:" >&5
11504sed 's/^/| /' conftest.$ac_ext >&5
11505
11506 ac_header_preproc=no
11507fi
ca81d7a0 11508
b8bdffbe 11509rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
11510{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11511echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11512
11513# So? What about this header?
edfaf76d
LK
11514case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11515 yes:no: )
b8bdffbe
JD
11516 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11517echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11518 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11519echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11520 ac_header_preproc=yes
b8bdffbe 11521 ;;
edfaf76d 11522 no:yes:* )
b8bdffbe
JD
11523 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11524echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11525 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11526echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11527 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11528echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11529 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11530echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11531 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11532echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11533 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11534echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11535
b8bdffbe
JD
11536 ;;
11537esac
ca81d7a0
JD
11538{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11539echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11540if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11541 echo $ECHO_N "(cached) $ECHO_C" >&6
11542else
edfaf76d 11543 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11544fi
ca81d7a0
JD
11545ac_res=`eval echo '${'$as_ac_Header'}'`
11546 { echo "$as_me:$LINENO: result: $ac_res" >&5
11547echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11548
11549fi
11550if test `eval echo '${'$as_ac_Header'}'` = yes; then
11551 cat >>confdefs.h <<_ACEOF
11552#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11553_ACEOF
11554
11555fi
11556
11557done
11558
11559 if test "$ac_cv_header_pthread_h"; then
ca81d7a0
JD
11560 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11561echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11562if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11563 echo $ECHO_N "(cached) $ECHO_C" >&6
11564else
11565 ac_check_lib_save_LIBS=$LIBS
11566LIBS="-lpthread $LIBS"
11567cat >conftest.$ac_ext <<_ACEOF
11568/* confdefs.h. */
11569_ACEOF
11570cat confdefs.h >>conftest.$ac_ext
11571cat >>conftest.$ac_ext <<_ACEOF
11572/* end confdefs.h. */
11573
ca81d7a0
JD
11574/* Override any GCC internal prototype to avoid an error.
11575 Use char because int might match the return type of a GCC
11576 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11577#ifdef __cplusplus
11578extern "C"
11579#endif
b8bdffbe
JD
11580char pthread_self ();
11581int
11582main ()
11583{
ca81d7a0 11584return pthread_self ();
b8bdffbe
JD
11585 ;
11586 return 0;
11587}
11588_ACEOF
11589rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11590if { (ac_try="$ac_link"
11591case "(($ac_try" in
11592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11593 *) ac_try_echo=$ac_try;;
11594esac
11595eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11596 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11597 ac_status=$?
edfaf76d
LK
11598 grep -v '^ *+' conftest.er1 >conftest.err
11599 rm -f conftest.er1
11600 cat conftest.err >&5
b8bdffbe 11601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11602 (exit $ac_status); } && {
11603 test -z "$ac_c_werror_flag" ||
11604 test ! -s conftest.err
11605 } && test -s conftest$ac_exeext &&
11606 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11607 ac_cv_lib_pthread_pthread_self=yes
11608else
11609 echo "$as_me: failed program was:" >&5
11610sed 's/^/| /' conftest.$ac_ext >&5
11611
ca81d7a0 11612 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11613fi
ca81d7a0 11614
f053c89f 11615rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11616 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11617LIBS=$ac_check_lib_save_LIBS
11618fi
ca81d7a0
JD
11619{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11620echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11621if test $ac_cv_lib_pthread_pthread_self = yes; then
11622 HAVE_GTK_AND_PTHREAD=yes
11623fi
11624
11625 fi
11626 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
11627 GTK_LIBS="$GTK_LIBS -lpthread"
11628
11629cat >>confdefs.h <<\_ACEOF
11630#define HAVE_GTK_AND_PTHREAD 1
11631_ACEOF
11632
11633 fi
57669b57 11634 fi
488dd4c4
JD
11635fi
11636
9d89ffd0
JD
11637### Link with -lXft if available to work around a bug.
11638HAVE_XFT=maybe
11639if test "${HAVE_GTK}" = "yes"; then
11640 if test "X${with_pkg_config_prog}" != X; then
11641 PKG_CONFIG="${with_pkg_config_prog}"
11642 fi
11643
11644
11645 succeeded=no
11646
11647 if test -z "$PKG_CONFIG"; then
11648 # Extract the first word of "pkg-config", so it can be a program name with args.
11649set dummy pkg-config; ac_word=$2
11650{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11651echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11652if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11653 echo $ECHO_N "(cached) $ECHO_C" >&6
11654else
11655 case $PKG_CONFIG in
11656 [\\/]* | ?:[\\/]*)
11657 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11658 ;;
11659 *)
11660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11661for as_dir in $PATH
11662do
11663 IFS=$as_save_IFS
11664 test -z "$as_dir" && as_dir=.
11665 for ac_exec_ext in '' $ac_executable_extensions; do
11666 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11667 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11668 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11669 break 2
11670 fi
11671done
11672done
11673IFS=$as_save_IFS
11674
11675 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11676 ;;
11677esac
11678fi
11679PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11680if test -n "$PKG_CONFIG"; then
11681 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11682echo "${ECHO_T}$PKG_CONFIG" >&6; }
11683else
11684 { echo "$as_me:$LINENO: result: no" >&5
11685echo "${ECHO_T}no" >&6; }
11686fi
11687
11688
11689 fi
11690
11691 if test "$PKG_CONFIG" = "no" ; then
11692 HAVE_XFT=no
11693 else
11694 PKG_CONFIG_MIN_VERSION=0.9.0
11695 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11696 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
11697echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
11698
11699 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
11700 { echo "$as_me:$LINENO: result: yes" >&5
11701echo "${ECHO_T}yes" >&6; }
11702 succeeded=yes
11703
11704 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
11705echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
94315858 11706 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9d89ffd0
JD
11707 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
11708echo "${ECHO_T}$XFT_CFLAGS" >&6; }
11709
11710 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
11711echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
94315858 11712 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9d89ffd0
JD
11713 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
11714echo "${ECHO_T}$XFT_LIBS" >&6; }
11715 else
11716 { echo "$as_me:$LINENO: result: no" >&5
11717echo "${ECHO_T}no" >&6; }
11718 XFT_CFLAGS=""
11719 XFT_LIBS=""
11720 ## If we have a custom action on failure, don't print errors, but
11721 ## do set a variable so people can do so.
11722 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
11723
11724 fi
11725
11726
11727
11728 else
11729 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11730 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11731 fi
11732 fi
11733
11734 if test $succeeded = yes; then
11735 :
11736 else
11737 HAVE_XFT=no
11738 fi
11739
11740 if test "$HAVE_XFT" != no; then
11741 OLD_CFLAGS="$CPPFLAGS"
f23323c5 11742 OLD_CPPFLAGS="$CFLAGS"
9d89ffd0
JD
11743 OLD_LIBS="$LIBS"
11744 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
11745 CFLAGS="$CFLAGS $XFT_CFLAGS"
11746 LIBS="$XFT_LIBS $LIBS"
11747 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
11748 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
11749echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
11750if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
11751 echo $ECHO_N "(cached) $ECHO_C" >&6
11752fi
11753{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
11754echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
11755else
11756 # Is the header compilable?
11757{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
11758echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
11759cat >conftest.$ac_ext <<_ACEOF
11760/* confdefs.h. */
11761_ACEOF
11762cat confdefs.h >>conftest.$ac_ext
11763cat >>conftest.$ac_ext <<_ACEOF
11764/* end confdefs.h. */
11765$ac_includes_default
11766#include <X11/Xft/Xft.h>
11767_ACEOF
11768rm -f conftest.$ac_objext
11769if { (ac_try="$ac_compile"
11770case "(($ac_try" in
11771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11772 *) ac_try_echo=$ac_try;;
11773esac
11774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11775 (eval "$ac_compile") 2>conftest.er1
11776 ac_status=$?
11777 grep -v '^ *+' conftest.er1 >conftest.err
11778 rm -f conftest.er1
11779 cat conftest.err >&5
11780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11781 (exit $ac_status); } && {
11782 test -z "$ac_c_werror_flag" ||
11783 test ! -s conftest.err
11784 } && test -s conftest.$ac_objext; then
11785 ac_header_compiler=yes
11786else
11787 echo "$as_me: failed program was:" >&5
11788sed 's/^/| /' conftest.$ac_ext >&5
11789
11790 ac_header_compiler=no
11791fi
11792
11793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11794{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11795echo "${ECHO_T}$ac_header_compiler" >&6; }
11796
11797# Is the header present?
11798{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
11799echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
11800cat >conftest.$ac_ext <<_ACEOF
11801/* confdefs.h. */
11802_ACEOF
11803cat confdefs.h >>conftest.$ac_ext
11804cat >>conftest.$ac_ext <<_ACEOF
11805/* end confdefs.h. */
11806#include <X11/Xft/Xft.h>
11807_ACEOF
11808if { (ac_try="$ac_cpp conftest.$ac_ext"
11809case "(($ac_try" in
11810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11811 *) ac_try_echo=$ac_try;;
11812esac
11813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11814 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11815 ac_status=$?
11816 grep -v '^ *+' conftest.er1 >conftest.err
11817 rm -f conftest.er1
11818 cat conftest.err >&5
11819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11820 (exit $ac_status); } >/dev/null && {
11821 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11822 test ! -s conftest.err
11823 }; then
11824 ac_header_preproc=yes
11825else
11826 echo "$as_me: failed program was:" >&5
11827sed 's/^/| /' conftest.$ac_ext >&5
11828
11829 ac_header_preproc=no
11830fi
11831
11832rm -f conftest.err conftest.$ac_ext
11833{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11834echo "${ECHO_T}$ac_header_preproc" >&6; }
11835
11836# So? What about this header?
11837case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11838 yes:no: )
11839 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
11840echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11841 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
11842echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
11843 ac_header_preproc=yes
11844 ;;
11845 no:yes:* )
11846 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
11847echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
11848 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
11849echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
11850 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
11851echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
11852 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
11853echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
11854 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
11855echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
11856 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
11857echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
11858
11859 ;;
11860esac
11861{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
11862echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
11863if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
11864 echo $ECHO_N "(cached) $ECHO_C" >&6
11865else
11866 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
11867fi
11868{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
11869echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
11870
11871fi
11872if test $ac_cv_header_X11_Xft_Xft_h = yes; then
11873 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
11874echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
11875if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
11876 echo $ECHO_N "(cached) $ECHO_C" >&6
11877else
11878 ac_check_lib_save_LIBS=$LIBS
11879LIBS="-lXft $XFT_LIBS $LIBS"
11880cat >conftest.$ac_ext <<_ACEOF
11881/* confdefs.h. */
11882_ACEOF
11883cat confdefs.h >>conftest.$ac_ext
11884cat >>conftest.$ac_ext <<_ACEOF
11885/* end confdefs.h. */
11886
11887/* Override any GCC internal prototype to avoid an error.
11888 Use char because int might match the return type of a GCC
11889 builtin and then its argument prototype would still apply. */
11890#ifdef __cplusplus
11891extern "C"
11892#endif
11893char XftFontOpen ();
11894int
11895main ()
11896{
11897return XftFontOpen ();
11898 ;
11899 return 0;
11900}
11901_ACEOF
11902rm -f conftest.$ac_objext conftest$ac_exeext
11903if { (ac_try="$ac_link"
11904case "(($ac_try" in
11905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11906 *) ac_try_echo=$ac_try;;
11907esac
11908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11909 (eval "$ac_link") 2>conftest.er1
11910 ac_status=$?
11911 grep -v '^ *+' conftest.er1 >conftest.err
11912 rm -f conftest.er1
11913 cat conftest.err >&5
11914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11915 (exit $ac_status); } && {
11916 test -z "$ac_c_werror_flag" ||
11917 test ! -s conftest.err
11918 } && test -s conftest$ac_exeext &&
11919 $as_test_x conftest$ac_exeext; then
11920 ac_cv_lib_Xft_XftFontOpen=yes
11921else
11922 echo "$as_me: failed program was:" >&5
11923sed 's/^/| /' conftest.$ac_ext >&5
11924
11925 ac_cv_lib_Xft_XftFontOpen=no
11926fi
11927
11928rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11929 conftest$ac_exeext conftest.$ac_ext
11930LIBS=$ac_check_lib_save_LIBS
11931fi
11932{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
11933echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
11934if test $ac_cv_lib_Xft_XftFontOpen = yes; then
11935 HAVE_XFT=yes
11936fi
11937
11938fi
11939
11940
11941
11942 if test "${HAVE_XFT}" = "yes"; then
11943
11944cat >>confdefs.h <<\_ACEOF
11945#define HAVE_XFT 1
11946_ACEOF
11947
11948
11949 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
11950 else
11951 CFLAGS="$OLD_CPPFLAGS"
11952 CFLAGS="$OLD_CFLAGS"
11953 LIBS="$OLD_LIBS"
11954 fi
11955 fi
11956fi
11957
98418dba
CW
11958if test x"${USE_X_TOOLKIT}" = xmaybe; then
11959 if test x"${HAVE_X11R5}" = xyes; then
ca81d7a0
JD
11960 { echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
11961echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6; }
98418dba
CW
11962 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
11963 echo $ECHO_N "(cached) $ECHO_C" >&6
11964else
11965 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11966/* confdefs.h. */
11967_ACEOF
11968cat confdefs.h >>conftest.$ac_ext
11969cat >>conftest.$ac_ext <<_ACEOF
11970/* end confdefs.h. */
98418dba
CW
11971
11972#include <X11/Intrinsic.h>
11973#include <X11/Xaw/Simple.h>
98418dba
CW
11974int
11975main ()
11976{
11977
11978 ;
11979 return 0;
11980}
11981_ACEOF
11982rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11983if { (ac_try="$ac_link"
11984case "(($ac_try" in
11985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11986 *) ac_try_echo=$ac_try;;
11987esac
11988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11989 (eval "$ac_link") 2>conftest.er1
98418dba 11990 ac_status=$?
edfaf76d
LK
11991 grep -v '^ *+' conftest.er1 >conftest.err
11992 rm -f conftest.er1
11993 cat conftest.err >&5
c0d27fcc 11994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11995 (exit $ac_status); } && {
11996 test -z "$ac_c_werror_flag" ||
11997 test ! -s conftest.err
11998 } && test -s conftest$ac_exeext &&
11999 $as_test_x conftest$ac_exeext; then
98418dba
CW
12000 emacs_cv_x11_version_5_with_xaw=yes
12001else
12002 echo "$as_me: failed program was:" >&5
19650fd6
AS
12003sed 's/^/| /' conftest.$ac_ext >&5
12004
ca81d7a0 12005 emacs_cv_x11_version_5_with_xaw=no
98418dba 12006fi
ca81d7a0 12007
f053c89f 12008rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12009 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12010fi
12011
12012 if test $emacs_cv_x11_version_5_with_xaw = yes; then
ca81d7a0
JD
12013 { echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
12014echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6; }
98418dba
CW
12015 USE_X_TOOLKIT=LUCID
12016 else
ca81d7a0
JD
12017 { echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
12018echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6; }
98418dba
CW
12019 USE_X_TOOLKIT=none
12020 fi
12021 else
12022 USE_X_TOOLKIT=none
12023 fi
12024fi
12025
12026X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12027
12028if test "${USE_X_TOOLKIT}" != "none"; then
ca81d7a0
JD
12029 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
12030echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
12031 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
12032 echo $ECHO_N "(cached) $ECHO_C" >&6
12033else
12034 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12035/* confdefs.h. */
12036_ACEOF
12037cat confdefs.h >>conftest.$ac_ext
12038cat >>conftest.$ac_ext <<_ACEOF
12039/* end confdefs.h. */
98418dba 12040#include <X11/Intrinsic.h>
98418dba
CW
12041int
12042main ()
12043{
12044#if XtSpecificationRelease < 6
12045fail;
12046#endif
12047
12048 ;
12049 return 0;
12050}
12051_ACEOF
12052rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12053if { (ac_try="$ac_link"
12054case "(($ac_try" in
12055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12056 *) ac_try_echo=$ac_try;;
12057esac
12058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12059 (eval "$ac_link") 2>conftest.er1
98418dba 12060 ac_status=$?
edfaf76d
LK
12061 grep -v '^ *+' conftest.er1 >conftest.err
12062 rm -f conftest.er1
12063 cat conftest.err >&5
c0d27fcc 12064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12065 (exit $ac_status); } && {
12066 test -z "$ac_c_werror_flag" ||
12067 test ! -s conftest.err
12068 } && test -s conftest$ac_exeext &&
12069 $as_test_x conftest$ac_exeext; then
98418dba
CW
12070 emacs_cv_x11_toolkit_version_6=yes
12071else
12072 echo "$as_me: failed program was:" >&5
19650fd6
AS
12073sed 's/^/| /' conftest.$ac_ext >&5
12074
ca81d7a0 12075 emacs_cv_x11_toolkit_version_6=no
98418dba 12076fi
ca81d7a0 12077
f053c89f 12078rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12079 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12080fi
12081
12082 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12083 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ca81d7a0
JD
12084 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12085echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12086
c0d27fcc 12087cat >>confdefs.h <<\_ACEOF
98418dba 12088#define HAVE_X11XTR6 1
c0d27fcc 12089_ACEOF
98418dba
CW
12090
12091 else
ca81d7a0
JD
12092 { echo "$as_me:$LINENO: result: before 6" >&5
12093echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12094 fi
12095
12096 OLDLIBS="$LIBS"
12097 if test x$HAVE_X11XTR6 = xyes; then
12098 LIBS="-lXt -lSM -lICE $LIBS"
12099 else
12100 LIBS="-lXt $LIBS"
12101 fi
12102
ca81d7a0
JD
12103{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12104echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
12105if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
12106 echo $ECHO_N "(cached) $ECHO_C" >&6
12107else
12108 ac_check_lib_save_LIBS=$LIBS
12109LIBS="-lXmu $LIBS"
12110cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12111/* confdefs.h. */
12112_ACEOF
12113cat confdefs.h >>conftest.$ac_ext
12114cat >>conftest.$ac_ext <<_ACEOF
12115/* end confdefs.h. */
98418dba 12116
ca81d7a0
JD
12117/* Override any GCC internal prototype to avoid an error.
12118 Use char because int might match the return type of a GCC
12119 builtin and then its argument prototype would still apply. */
98418dba
CW
12120#ifdef __cplusplus
12121extern "C"
12122#endif
98418dba 12123char XmuConvertStandardSelection ();
98418dba
CW
12124int
12125main ()
12126{
ca81d7a0 12127return XmuConvertStandardSelection ();
98418dba
CW
12128 ;
12129 return 0;
12130}
12131_ACEOF
12132rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12133if { (ac_try="$ac_link"
12134case "(($ac_try" in
12135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12136 *) ac_try_echo=$ac_try;;
12137esac
12138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12139 (eval "$ac_link") 2>conftest.er1
98418dba 12140 ac_status=$?
edfaf76d
LK
12141 grep -v '^ *+' conftest.er1 >conftest.err
12142 rm -f conftest.er1
12143 cat conftest.err >&5
c0d27fcc 12144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12145 (exit $ac_status); } && {
12146 test -z "$ac_c_werror_flag" ||
12147 test ! -s conftest.err
12148 } && test -s conftest$ac_exeext &&
12149 $as_test_x conftest$ac_exeext; then
98418dba
CW
12150 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12151else
12152 echo "$as_me: failed program was:" >&5
19650fd6
AS
12153sed 's/^/| /' conftest.$ac_ext >&5
12154
ca81d7a0 12155 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12156fi
ca81d7a0 12157
f053c89f 12158rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12159 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12160LIBS=$ac_check_lib_save_LIBS
12161fi
ca81d7a0
JD
12162{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12163echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 12164if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12165 cat >>confdefs.h <<_ACEOF
98418dba 12166#define HAVE_LIBXMU 1
c0d27fcc 12167_ACEOF
98418dba
CW
12168
12169 LIBS="-lXmu $LIBS"
12170
12171fi
12172
12173 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12174fi
12175
12176# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12177if test "${HAVE_X11}" = "yes"; then
12178 if test "${USE_X_TOOLKIT}" != "none"; then
12179
ca81d7a0
JD
12180{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12181echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12182if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12183 echo $ECHO_N "(cached) $ECHO_C" >&6
12184else
12185 ac_check_lib_save_LIBS=$LIBS
12186LIBS="-lXext $LIBS"
12187cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12188/* confdefs.h. */
12189_ACEOF
12190cat confdefs.h >>conftest.$ac_ext
12191cat >>conftest.$ac_ext <<_ACEOF
12192/* end confdefs.h. */
98418dba 12193
ca81d7a0
JD
12194/* Override any GCC internal prototype to avoid an error.
12195 Use char because int might match the return type of a GCC
12196 builtin and then its argument prototype would still apply. */
98418dba
CW
12197#ifdef __cplusplus
12198extern "C"
12199#endif
98418dba 12200char XShapeQueryExtension ();
98418dba
CW
12201int
12202main ()
12203{
ca81d7a0 12204return XShapeQueryExtension ();
98418dba
CW
12205 ;
12206 return 0;
12207}
12208_ACEOF
12209rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12210if { (ac_try="$ac_link"
12211case "(($ac_try" in
12212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12213 *) ac_try_echo=$ac_try;;
12214esac
12215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12216 (eval "$ac_link") 2>conftest.er1
98418dba 12217 ac_status=$?
edfaf76d
LK
12218 grep -v '^ *+' conftest.er1 >conftest.err
12219 rm -f conftest.er1
12220 cat conftest.err >&5
c0d27fcc 12221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12222 (exit $ac_status); } && {
12223 test -z "$ac_c_werror_flag" ||
12224 test ! -s conftest.err
12225 } && test -s conftest$ac_exeext &&
12226 $as_test_x conftest$ac_exeext; then
98418dba
CW
12227 ac_cv_lib_Xext_XShapeQueryExtension=yes
12228else
12229 echo "$as_me: failed program was:" >&5
19650fd6
AS
12230sed 's/^/| /' conftest.$ac_ext >&5
12231
ca81d7a0 12232 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12233fi
ca81d7a0 12234
f053c89f 12235rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12236 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12237LIBS=$ac_check_lib_save_LIBS
12238fi
ca81d7a0
JD
12239{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12240echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12241if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12242 cat >>confdefs.h <<_ACEOF
98418dba 12243#define HAVE_LIBXEXT 1
c0d27fcc 12244_ACEOF
98418dba
CW
12245
12246 LIBS="-lXext $LIBS"
12247
12248fi
12249
12250 fi
12251fi
12252
12253if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ca81d7a0
JD
12254 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12255echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12256if test "${emacs_cv_motif_version_2_1+set}" = set; then
12257 echo $ECHO_N "(cached) $ECHO_C" >&6
12258else
12259 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12260/* confdefs.h. */
12261_ACEOF
12262cat confdefs.h >>conftest.$ac_ext
12263cat >>conftest.$ac_ext <<_ACEOF
12264/* end confdefs.h. */
98418dba 12265#include <Xm/Xm.h>
98418dba
CW
12266int
12267main ()
12268{
12269#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12270int x = 5;
12271#else
12272Motif version prior to 2.1.
12273#endif
12274 ;
12275 return 0;
12276}
12277_ACEOF
12278rm -f conftest.$ac_objext
ca81d7a0
JD
12279if { (ac_try="$ac_compile"
12280case "(($ac_try" in
12281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12282 *) ac_try_echo=$ac_try;;
12283esac
12284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12285 (eval "$ac_compile") 2>conftest.er1
98418dba 12286 ac_status=$?
edfaf76d
LK
12287 grep -v '^ *+' conftest.er1 >conftest.err
12288 rm -f conftest.er1
12289 cat conftest.err >&5
c0d27fcc 12290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12291 (exit $ac_status); } && {
12292 test -z "$ac_c_werror_flag" ||
12293 test ! -s conftest.err
12294 } && test -s conftest.$ac_objext; then
98418dba
CW
12295 emacs_cv_motif_version_2_1=yes
12296else
12297 echo "$as_me: failed program was:" >&5
19650fd6
AS
12298sed 's/^/| /' conftest.$ac_ext >&5
12299
ca81d7a0 12300 emacs_cv_motif_version_2_1=no
98418dba 12301fi
ca81d7a0
JD
12302
12303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12304fi
ca81d7a0
JD
12305{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12306echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12307 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12308 if test $emacs_cv_motif_version_2_1 = yes; then
12309 HAVE_LIBXP=no
b936fae4 12310
c0d27fcc 12311cat >>confdefs.h <<\_ACEOF
98418dba 12312#define HAVE_MOTIF_2_1 1
c0d27fcc 12313_ACEOF
98418dba 12314
ca81d7a0
JD
12315 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12316echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12317if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12318 echo $ECHO_N "(cached) $ECHO_C" >&6
12319else
12320 ac_check_lib_save_LIBS=$LIBS
12321LIBS="-lXp $LIBS"
12322cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12323/* confdefs.h. */
12324_ACEOF
12325cat confdefs.h >>conftest.$ac_ext
12326cat >>conftest.$ac_ext <<_ACEOF
12327/* end confdefs.h. */
98418dba 12328
ca81d7a0
JD
12329/* Override any GCC internal prototype to avoid an error.
12330 Use char because int might match the return type of a GCC
12331 builtin and then its argument prototype would still apply. */
98418dba
CW
12332#ifdef __cplusplus
12333extern "C"
12334#endif
98418dba 12335char XpCreateContext ();
98418dba
CW
12336int
12337main ()
12338{
ca81d7a0 12339return XpCreateContext ();
98418dba
CW
12340 ;
12341 return 0;
12342}
12343_ACEOF
12344rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12345if { (ac_try="$ac_link"
12346case "(($ac_try" in
12347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12348 *) ac_try_echo=$ac_try;;
12349esac
12350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12351 (eval "$ac_link") 2>conftest.er1
98418dba 12352 ac_status=$?
edfaf76d
LK
12353 grep -v '^ *+' conftest.er1 >conftest.err
12354 rm -f conftest.er1
12355 cat conftest.err >&5
c0d27fcc 12356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12357 (exit $ac_status); } && {
12358 test -z "$ac_c_werror_flag" ||
12359 test ! -s conftest.err
12360 } && test -s conftest$ac_exeext &&
12361 $as_test_x conftest$ac_exeext; then
98418dba
CW
12362 ac_cv_lib_Xp_XpCreateContext=yes
12363else
12364 echo "$as_me: failed program was:" >&5
19650fd6
AS
12365sed 's/^/| /' conftest.$ac_ext >&5
12366
ca81d7a0 12367 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12368fi
ca81d7a0 12369
f053c89f 12370rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12371 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12372LIBS=$ac_check_lib_save_LIBS
12373fi
ca81d7a0
JD
12374{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12375echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12376if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12377 HAVE_LIBXP=yes
12378fi
503d2be0 12379
98418dba 12380 if test ${HAVE_LIBXP} = yes; then
b936fae4 12381
c0d27fcc 12382cat >>confdefs.h <<\_ACEOF
98418dba 12383#define HAVE_LIBXP 1
c0d27fcc 12384_ACEOF
503d2be0 12385
98418dba 12386 fi
4693dbc9 12387 else
ca81d7a0
JD
12388 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12389echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12390if test "${emacs_cv_lesstif+set}" = set; then
12391 echo $ECHO_N "(cached) $ECHO_C" >&6
12392else
12393 # We put this in CFLAGS temporarily to precede other -I options
12394 # that might be in CFLAGS temporarily.
12395 # We put this in CPPFLAGS where it precedes the other -I options.
12396 OLD_CPPFLAGS=$CPPFLAGS
12397 OLD_CFLAGS=$CFLAGS
12398 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12399 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12400 cat >conftest.$ac_ext <<_ACEOF
12401/* confdefs.h. */
12402_ACEOF
12403cat confdefs.h >>conftest.$ac_ext
12404cat >>conftest.$ac_ext <<_ACEOF
12405/* end confdefs.h. */
12406#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12407int
12408main ()
12409{
12410int x = 5;
12411 ;
12412 return 0;
12413}
12414_ACEOF
12415rm -f conftest.$ac_objext
ca81d7a0
JD
12416if { (ac_try="$ac_compile"
12417case "(($ac_try" in
12418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12419 *) ac_try_echo=$ac_try;;
12420esac
12421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12422 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12423 ac_status=$?
edfaf76d
LK
12424 grep -v '^ *+' conftest.er1 >conftest.err
12425 rm -f conftest.er1
12426 cat conftest.err >&5
4693dbc9 12427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12428 (exit $ac_status); } && {
12429 test -z "$ac_c_werror_flag" ||
12430 test ! -s conftest.err
12431 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12432 emacs_cv_lesstif=yes
12433else
12434 echo "$as_me: failed program was:" >&5
12435sed 's/^/| /' conftest.$ac_ext >&5
12436
ca81d7a0 12437 emacs_cv_lesstif=no
4693dbc9 12438fi
ca81d7a0
JD
12439
12440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12441fi
ca81d7a0
JD
12442{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12443echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12444 if test $emacs_cv_lesstif = yes; then
12445 # Make sure this -I option remains in CPPFLAGS after it is set
12446 # back to REAL_CPPFLAGS.
12447 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12448 # have those other -I options anyway. Ultimately, having this
12449 # directory ultimately in CPPFLAGS will be enough.
12450 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12451 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12452 else
12453 CFLAGS=$OLD_CFLAGS
12454 CPPFLAGS=$OLD_CPPFLAGS
12455 fi
98418dba
CW
12456 fi
12457fi
12458
12459### Is -lXaw3d available?
12460HAVE_XAW3D=no
12461if test "${HAVE_X11}" = "yes"; then
7c00e1e9 12462 if test "${USE_X_TOOLKIT}" != "none" && test "${with_toolkit_scroll_bars}" != "no"; then
ca81d7a0
JD
12463 { echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
12464echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6; }
98418dba
CW
12465if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
12466 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 12467else
22044edf 12468 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12469/* confdefs.h. */
12470_ACEOF
12471cat confdefs.h >>conftest.$ac_ext
12472cat >>conftest.$ac_ext <<_ACEOF
12473/* end confdefs.h. */
98418dba 12474#include <X11/Xaw3d/Scrollbar.h>
503d2be0 12475_ACEOF
ca81d7a0
JD
12476if { (ac_try="$ac_cpp conftest.$ac_ext"
12477case "(($ac_try" in
12478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12479 *) ac_try_echo=$ac_try;;
12480esac
12481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12482 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 12483 ac_status=$?
6bae0ccf 12484 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
12485 rm -f conftest.er1
12486 cat conftest.err >&5
c0d27fcc 12487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12488 (exit $ac_status); } >/dev/null && {
12489 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12490 test ! -s conftest.err
12491 }; then
22044edf 12492 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 12493else
503d2be0 12494 echo "$as_me: failed program was:" >&5
19650fd6
AS
12495sed 's/^/| /' conftest.$ac_ext >&5
12496
22044edf 12497 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 12498fi
ca81d7a0 12499
503d2be0 12500rm -f conftest.err conftest.$ac_ext
98418dba 12501fi
ca81d7a0
JD
12502{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
12503echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6; }
98418dba 12504if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
ca81d7a0
JD
12505 { echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
12506echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6; }
98418dba
CW
12507if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
12508 echo $ECHO_N "(cached) $ECHO_C" >&6
12509else
12510 ac_check_lib_save_LIBS=$LIBS
12511LIBS="-lXaw3d $LIBS"
12512cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12513/* confdefs.h. */
12514_ACEOF
12515cat confdefs.h >>conftest.$ac_ext
12516cat >>conftest.$ac_ext <<_ACEOF
12517/* end confdefs.h. */
98418dba 12518
ca81d7a0
JD
12519/* Override any GCC internal prototype to avoid an error.
12520 Use char because int might match the return type of a GCC
12521 builtin and then its argument prototype would still apply. */
98418dba
CW
12522#ifdef __cplusplus
12523extern "C"
12524#endif
98418dba 12525char XawScrollbarSetThumb ();
503d2be0
AS
12526int
12527main ()
12528{
ca81d7a0 12529return XawScrollbarSetThumb ();
503d2be0
AS
12530 ;
12531 return 0;
12532}
12533_ACEOF
12534rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12535if { (ac_try="$ac_link"
12536case "(($ac_try" in
12537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12538 *) ac_try_echo=$ac_try;;
12539esac
12540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12541 (eval "$ac_link") 2>conftest.er1
503d2be0 12542 ac_status=$?
edfaf76d
LK
12543 grep -v '^ *+' conftest.er1 >conftest.err
12544 rm -f conftest.er1
12545 cat conftest.err >&5
c0d27fcc 12546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12547 (exit $ac_status); } && {
12548 test -z "$ac_c_werror_flag" ||
12549 test ! -s conftest.err
12550 } && test -s conftest$ac_exeext &&
12551 $as_test_x conftest$ac_exeext; then
98418dba 12552 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 12553else
503d2be0 12554 echo "$as_me: failed program was:" >&5
19650fd6
AS
12555sed 's/^/| /' conftest.$ac_ext >&5
12556
ca81d7a0 12557 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 12558fi
ca81d7a0 12559
f053c89f 12560rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12561 conftest$ac_exeext conftest.$ac_ext
98418dba 12562LIBS=$ac_check_lib_save_LIBS
ba4481b5 12563fi
ca81d7a0
JD
12564{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
12565echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
98418dba
CW
12566if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
12567 HAVE_XAW3D=yes
ba4481b5 12568fi
503d2be0 12569
ba4481b5
DL
12570fi
12571
c0d27fcc 12572
98418dba 12573 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 12574
c0d27fcc 12575cat >>confdefs.h <<\_ACEOF
98418dba 12576#define HAVE_XAW3D 1
c0d27fcc 12577_ACEOF
98418dba 12578
ba4481b5 12579 fi
98418dba 12580 fi
ba4481b5
DL
12581fi
12582
c0d27fcc
MR
12583
12584
98418dba
CW
12585USE_TOOLKIT_SCROLL_BARS=no
12586if test "${with_toolkit_scroll_bars}" != "no"; then
12587 if test "${USE_X_TOOLKIT}" != "none"; then
12588 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12589 cat >>confdefs.h <<\_ACEOF
98418dba 12590#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12591_ACEOF
98418dba
CW
12592
12593 HAVE_XAW3D=no
12594 USE_TOOLKIT_SCROLL_BARS=yes
12595 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12596 cat >>confdefs.h <<\_ACEOF
98418dba 12597#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12598_ACEOF
98418dba
CW
12599
12600 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12601 fi
488dd4c4
JD
12602 elif test "${HAVE_GTK}" = "yes"; then
12603 cat >>confdefs.h <<\_ACEOF
12604#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
12605_ACEOF
12606
12607 USE_TOOLKIT_SCROLL_BARS=yes
12608 elif test "${HAVE_CARBON}" = "yes"; then
12609 cat >>confdefs.h <<\_ACEOF
12610#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12611_ACEOF
12612
12613 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12614 fi
12615fi
12616
abd39b57 12617cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12618/* confdefs.h. */
12619_ACEOF
12620cat confdefs.h >>conftest.$ac_ext
12621cat >>conftest.$ac_ext <<_ACEOF
12622/* end confdefs.h. */
12623
12624 #include <X11/Xlib.h>
12625 #include <X11/Xresource.h>
12626int
12627main ()
12628{
12629XIMProc callback;
12630 ;
12631 return 0;
12632}
12633_ACEOF
12634rm -f conftest.$ac_objext
ca81d7a0
JD
12635if { (ac_try="$ac_compile"
12636case "(($ac_try" in
12637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12638 *) ac_try_echo=$ac_try;;
12639esac
12640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12641 (eval "$ac_compile") 2>conftest.er1
abd39b57 12642 ac_status=$?
edfaf76d
LK
12643 grep -v '^ *+' conftest.er1 >conftest.err
12644 rm -f conftest.er1
12645 cat conftest.err >&5
abd39b57 12646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12647 (exit $ac_status); } && {
12648 test -z "$ac_c_werror_flag" ||
12649 test ! -s conftest.err
12650 } && test -s conftest.$ac_objext; then
abd39b57
AC
12651 HAVE_XIM=yes
12652
12653cat >>confdefs.h <<\_ACEOF
12654#define HAVE_XIM 1
12655_ACEOF
12656
12657else
12658 echo "$as_me: failed program was:" >&5
12659sed 's/^/| /' conftest.$ac_ext >&5
12660
ca81d7a0 12661 HAVE_XIM=no
abd39b57 12662fi
ca81d7a0
JD
12663
12664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12665
c0d27fcc 12666
98418dba 12667if test "${with_xim}" != "no"; then
b936fae4 12668
c0d27fcc 12669cat >>confdefs.h <<\_ACEOF
98418dba 12670#define USE_XIM 1
c0d27fcc 12671_ACEOF
98418dba 12672
793fa0d7 12673fi
abd39b57
AC
12674
12675
12676if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12677 late_CFLAGS=$CFLAGS
12678 if test "$GCC" = yes; then
12679 CFLAGS="$CFLAGS --pedantic-errors"
12680 fi
cffcede7 12681 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12682/* confdefs.h. */
12683_ACEOF
12684cat confdefs.h >>conftest.$ac_ext
12685cat >>conftest.$ac_ext <<_ACEOF
12686/* end confdefs.h. */
cffcede7
JD
12687
12688#include <X11/Xlib.h>
12689#include <X11/Xresource.h>
12690int
12691main ()
12692{
12693Display *display;
12694XrmDatabase db;
12695char *res_name;
12696char *res_class;
12697XIMProc callback;
12698XPointer *client_data;
849d80cf
DL
12699#ifndef __GNUC__
12700/* If we're not using GCC, it's probably not XFree86, and this is
12701 probably right, but we can't use something like --pedantic-errors. */
12702extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12703 char*, XIMProc, XPointer*);
12704#endif
cffcede7
JD
12705(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12706 client_data);
12707 ;
12708 return 0;
12709}
12710_ACEOF
12711rm -f conftest.$ac_objext
ca81d7a0
JD
12712if { (ac_try="$ac_compile"
12713case "(($ac_try" in
12714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12715 *) ac_try_echo=$ac_try;;
12716esac
12717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12718 (eval "$ac_compile") 2>conftest.er1
cffcede7 12719 ac_status=$?
edfaf76d
LK
12720 grep -v '^ *+' conftest.er1 >conftest.err
12721 rm -f conftest.er1
12722 cat conftest.err >&5
cffcede7 12723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12724 (exit $ac_status); } && {
12725 test -z "$ac_c_werror_flag" ||
12726 test ! -s conftest.err
12727 } && test -s conftest.$ac_objext; then
cffcede7
JD
12728 emacs_cv_arg6_star=yes
12729else
12730 echo "$as_me: failed program was:" >&5
19650fd6
AS
12731sed 's/^/| /' conftest.$ac_ext >&5
12732
ca81d7a0 12733
cffcede7 12734fi
ca81d7a0
JD
12735
12736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12737
12738 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12739 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12740#define XRegisterIMInstantiateCallback_arg6 XPointer*
12741_ACEOF
12742
12743 else
f57bd967 12744 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12745#define XRegisterIMInstantiateCallback_arg6 XPointer
12746_ACEOF
12747
12748 fi
849d80cf 12749 CFLAGS=$late_CFLAGS
98418dba
CW
12750fi
12751
12752### Use -lXpm if available, unless `--with-xpm=no'.
12753HAVE_XPM=no
12754if test "${HAVE_X11}" = "yes"; then
12755 if test "${with_xpm}" != "no"; then
c0d27fcc 12756 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
ca81d7a0
JD
12757 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
12758echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
12759if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12760 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 12761fi
ca81d7a0
JD
12762{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
12763echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 12764else
c0d27fcc 12765 # Is the header compilable?
ca81d7a0
JD
12766{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
12767echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 12768cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12769/* confdefs.h. */
12770_ACEOF
12771cat confdefs.h >>conftest.$ac_ext
12772cat >>conftest.$ac_ext <<_ACEOF
12773/* end confdefs.h. */
c0d27fcc
MR
12774$ac_includes_default
12775#include <X11/xpm.h>
12776_ACEOF
12777rm -f conftest.$ac_objext
ca81d7a0
JD
12778if { (ac_try="$ac_compile"
12779case "(($ac_try" in
12780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12781 *) ac_try_echo=$ac_try;;
12782esac
12783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12784 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 12785 ac_status=$?
edfaf76d
LK
12786 grep -v '^ *+' conftest.er1 >conftest.err
12787 rm -f conftest.er1
12788 cat conftest.err >&5
c0d27fcc 12789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12790 (exit $ac_status); } && {
12791 test -z "$ac_c_werror_flag" ||
12792 test ! -s conftest.err
12793 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
12794 ac_header_compiler=yes
12795else
12796 echo "$as_me: failed program was:" >&5
19650fd6
AS
12797sed 's/^/| /' conftest.$ac_ext >&5
12798
ca81d7a0 12799 ac_header_compiler=no
c0d27fcc 12800fi
ca81d7a0
JD
12801
12802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12803{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12804echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
12805
12806# Is the header present?
ca81d7a0
JD
12807{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
12808echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 12809cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12810/* confdefs.h. */
12811_ACEOF
12812cat confdefs.h >>conftest.$ac_ext
12813cat >>conftest.$ac_ext <<_ACEOF
12814/* end confdefs.h. */
98418dba
CW
12815#include <X11/xpm.h>
12816_ACEOF
ca81d7a0
JD
12817if { (ac_try="$ac_cpp conftest.$ac_ext"
12818case "(($ac_try" in
12819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12820 *) ac_try_echo=$ac_try;;
12821esac
12822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12823 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 12824 ac_status=$?
6bae0ccf 12825 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12826 rm -f conftest.er1
12827 cat conftest.err >&5
c0d27fcc 12828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12829 (exit $ac_status); } >/dev/null && {
12830 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12831 test ! -s conftest.err
12832 }; then
c0d27fcc 12833 ac_header_preproc=yes
98418dba
CW
12834else
12835 echo "$as_me: failed program was:" >&5
19650fd6
AS
12836sed 's/^/| /' conftest.$ac_ext >&5
12837
c0d27fcc 12838 ac_header_preproc=no
98418dba 12839fi
ca81d7a0 12840
98418dba 12841rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
12842{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12843echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
12844
12845# So? What about this header?
edfaf76d
LK
12846case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12847 yes:no: )
c0d27fcc
MR
12848 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
12849echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12850 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
12851echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
12852 ac_header_preproc=yes
12853 ;;
12854 no:yes:* )
12855 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
12856echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
12857 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
12858echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
12859 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
12860echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
12861 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
12862echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
12863 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
12864echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12865 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
12866echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 12867
19650fd6 12868 ;;
c0d27fcc 12869esac
ca81d7a0
JD
12870{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
12871echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
12872if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12873 echo $ECHO_N "(cached) $ECHO_C" >&6
12874else
12875 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 12876fi
ca81d7a0
JD
12877{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
12878echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
12879
12880fi
98418dba 12881if test $ac_cv_header_X11_xpm_h = yes; then
ca81d7a0
JD
12882 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
12883echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 12884if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 12885 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12886else
98418dba
CW
12887 ac_check_lib_save_LIBS=$LIBS
12888LIBS="-lXpm -lX11 $LIBS"
12889cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12890/* confdefs.h. */
12891_ACEOF
12892cat confdefs.h >>conftest.$ac_ext
12893cat >>conftest.$ac_ext <<_ACEOF
12894/* end confdefs.h. */
98418dba 12895
ca81d7a0
JD
12896/* Override any GCC internal prototype to avoid an error.
12897 Use char because int might match the return type of a GCC
12898 builtin and then its argument prototype would still apply. */
503d2be0
AS
12899#ifdef __cplusplus
12900extern "C"
12901#endif
98418dba 12902char XpmReadFileToPixmap ();
503d2be0
AS
12903int
12904main ()
12905{
ca81d7a0 12906return XpmReadFileToPixmap ();
503d2be0
AS
12907 ;
12908 return 0;
12909}
12910_ACEOF
12911rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12912if { (ac_try="$ac_link"
12913case "(($ac_try" in
12914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12915 *) ac_try_echo=$ac_try;;
12916esac
12917eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12918 (eval "$ac_link") 2>conftest.er1
503d2be0 12919 ac_status=$?
edfaf76d
LK
12920 grep -v '^ *+' conftest.er1 >conftest.err
12921 rm -f conftest.er1
12922 cat conftest.err >&5
c0d27fcc 12923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12924 (exit $ac_status); } && {
12925 test -z "$ac_c_werror_flag" ||
12926 test ! -s conftest.err
12927 } && test -s conftest$ac_exeext &&
12928 $as_test_x conftest$ac_exeext; then
98418dba 12929 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
12930else
12931 echo "$as_me: failed program was:" >&5
19650fd6
AS
12932sed 's/^/| /' conftest.$ac_ext >&5
12933
ca81d7a0 12934 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 12935fi
ca81d7a0 12936
f053c89f 12937rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12938 conftest$ac_exeext conftest.$ac_ext
98418dba 12939LIBS=$ac_check_lib_save_LIBS
503d2be0 12940fi
ca81d7a0
JD
12941{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
12942echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
12943if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
12944 HAVE_XPM=yes
ba4481b5
DL
12945fi
12946
98418dba
CW
12947fi
12948
c0d27fcc 12949
98418dba 12950 if test "${HAVE_XPM}" = "yes"; then
ca81d7a0
JD
12951 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
12952echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 12953 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12954/* confdefs.h. */
12955_ACEOF
12956cat confdefs.h >>conftest.$ac_ext
12957cat >>conftest.$ac_ext <<_ACEOF
12958/* end confdefs.h. */
98418dba
CW
12959#include "X11/xpm.h"
12960#ifndef XpmReturnAllocPixels
12961no_return_alloc_pixels
503d2be0 12962#endif
ba4481b5 12963
98418dba
CW
12964_ACEOF
12965if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 12966 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
12967 HAVE_XPM=no
12968else
12969 HAVE_XPM=yes
12970fi
12971rm -f conftest*
ba4481b5 12972
c0d27fcc 12973
98418dba 12974 if test "${HAVE_XPM}" = "yes"; then
ca81d7a0
JD
12975 { echo "$as_me:$LINENO: result: yes" >&5
12976echo "${ECHO_T}yes" >&6; }
98418dba 12977 else
ca81d7a0
JD
12978 { echo "$as_me:$LINENO: result: no" >&5
12979echo "${ECHO_T}no" >&6; }
98418dba
CW
12980 fi
12981 fi
12982 fi
12983
12984 if test "${HAVE_XPM}" = "yes"; then
b936fae4 12985
c0d27fcc 12986cat >>confdefs.h <<\_ACEOF
98418dba 12987#define HAVE_XPM 1
c0d27fcc 12988_ACEOF
98418dba
CW
12989
12990 fi
12991fi
12992
12993### Use -ljpeg if available, unless `--with-jpeg=no'.
12994HAVE_JPEG=no
12995if test "${HAVE_X11}" = "yes"; then
12996 if test "${with_jpeg}" != "no"; then
c0d27fcc 12997 if test "${ac_cv_header_jerror_h+set}" = set; then
ca81d7a0
JD
12998 { echo "$as_me:$LINENO: checking for jerror.h" >&5
12999echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
13000if test "${ac_cv_header_jerror_h+set}" = set; then
13001 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13002fi
ca81d7a0
JD
13003{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13004echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13005else
c0d27fcc 13006 # Is the header compilable?
ca81d7a0
JD
13007{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13008echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13009cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13010/* confdefs.h. */
13011_ACEOF
13012cat confdefs.h >>conftest.$ac_ext
13013cat >>conftest.$ac_ext <<_ACEOF
13014/* end confdefs.h. */
c0d27fcc
MR
13015$ac_includes_default
13016#include <jerror.h>
13017_ACEOF
13018rm -f conftest.$ac_objext
ca81d7a0
JD
13019if { (ac_try="$ac_compile"
13020case "(($ac_try" in
13021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13022 *) ac_try_echo=$ac_try;;
13023esac
13024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13025 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13026 ac_status=$?
edfaf76d
LK
13027 grep -v '^ *+' conftest.er1 >conftest.err
13028 rm -f conftest.er1
13029 cat conftest.err >&5
c0d27fcc 13030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13031 (exit $ac_status); } && {
13032 test -z "$ac_c_werror_flag" ||
13033 test ! -s conftest.err
13034 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13035 ac_header_compiler=yes
13036else
13037 echo "$as_me: failed program was:" >&5
19650fd6
AS
13038sed 's/^/| /' conftest.$ac_ext >&5
13039
ca81d7a0 13040 ac_header_compiler=no
c0d27fcc 13041fi
ca81d7a0
JD
13042
13043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13044{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13045echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13046
13047# Is the header present?
ca81d7a0
JD
13048{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13049echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13050cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13051/* confdefs.h. */
13052_ACEOF
13053cat confdefs.h >>conftest.$ac_ext
13054cat >>conftest.$ac_ext <<_ACEOF
13055/* end confdefs.h. */
98418dba
CW
13056#include <jerror.h>
13057_ACEOF
ca81d7a0
JD
13058if { (ac_try="$ac_cpp conftest.$ac_ext"
13059case "(($ac_try" in
13060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13061 *) ac_try_echo=$ac_try;;
13062esac
13063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13064 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13065 ac_status=$?
6bae0ccf 13066 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13067 rm -f conftest.er1
13068 cat conftest.err >&5
c0d27fcc 13069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13070 (exit $ac_status); } >/dev/null && {
13071 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13072 test ! -s conftest.err
13073 }; then
c0d27fcc 13074 ac_header_preproc=yes
ba4481b5 13075else
98418dba 13076 echo "$as_me: failed program was:" >&5
19650fd6
AS
13077sed 's/^/| /' conftest.$ac_ext >&5
13078
c0d27fcc 13079 ac_header_preproc=no
98418dba 13080fi
ca81d7a0 13081
98418dba 13082rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13083{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13084echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13085
13086# So? What about this header?
edfaf76d
LK
13087case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13088 yes:no: )
c0d27fcc
MR
13089 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13090echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13091 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13092echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13093 ac_header_preproc=yes
19650fd6 13094 ;;
edfaf76d 13095 no:yes:* )
c0d27fcc
MR
13096 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13097echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13098 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13099echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13100 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13101echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13102 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13103echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13104 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13105echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13106 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13107echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13108
19650fd6 13109 ;;
c0d27fcc 13110esac
ca81d7a0
JD
13111{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13112echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13113if test "${ac_cv_header_jerror_h+set}" = set; then
13114 echo $ECHO_N "(cached) $ECHO_C" >&6
13115else
13116 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13117fi
ca81d7a0
JD
13118{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13119echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13120
13121fi
98418dba 13122if test $ac_cv_header_jerror_h = yes; then
ca81d7a0
JD
13123 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13124echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13125if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13126 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13127else
98418dba
CW
13128 ac_check_lib_save_LIBS=$LIBS
13129LIBS="-ljpeg $LIBS"
13130cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13131/* confdefs.h. */
13132_ACEOF
13133cat confdefs.h >>conftest.$ac_ext
13134cat >>conftest.$ac_ext <<_ACEOF
13135/* end confdefs.h. */
98418dba 13136
ca81d7a0
JD
13137/* Override any GCC internal prototype to avoid an error.
13138 Use char because int might match the return type of a GCC
13139 builtin and then its argument prototype would still apply. */
98418dba
CW
13140#ifdef __cplusplus
13141extern "C"
13142#endif
98418dba 13143char jpeg_destroy_compress ();
503d2be0
AS
13144int
13145main ()
13146{
ca81d7a0 13147return jpeg_destroy_compress ();
503d2be0
AS
13148 ;
13149 return 0;
13150}
13151_ACEOF
13152rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13153if { (ac_try="$ac_link"
13154case "(($ac_try" in
13155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13156 *) ac_try_echo=$ac_try;;
13157esac
13158eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13159 (eval "$ac_link") 2>conftest.er1
503d2be0 13160 ac_status=$?
edfaf76d
LK
13161 grep -v '^ *+' conftest.er1 >conftest.err
13162 rm -f conftest.er1
13163 cat conftest.err >&5
c0d27fcc 13164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13165 (exit $ac_status); } && {
13166 test -z "$ac_c_werror_flag" ||
13167 test ! -s conftest.err
13168 } && test -s conftest$ac_exeext &&
13169 $as_test_x conftest$ac_exeext; then
98418dba 13170 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13171else
503d2be0 13172 echo "$as_me: failed program was:" >&5
19650fd6
AS
13173sed 's/^/| /' conftest.$ac_ext >&5
13174
ca81d7a0 13175 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13176fi
ca81d7a0 13177
f053c89f 13178rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13179 conftest$ac_exeext conftest.$ac_ext
98418dba 13180LIBS=$ac_check_lib_save_LIBS
ba4481b5 13181fi
ca81d7a0
JD
13182{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13183echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13184if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13185 HAVE_JPEG=yes
ba4481b5 13186fi
98418dba 13187
ba4481b5 13188fi
98418dba 13189
c0d27fcc 13190
ba4481b5 13191 fi
ba4481b5 13192
c0d27fcc 13193
98418dba 13194 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13195 cat >>confdefs.h <<\_ACEOF
98418dba 13196#define HAVE_JPEG 1
c0d27fcc 13197_ACEOF
98418dba
CW
13198
13199 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13200/* confdefs.h. */
13201_ACEOF
13202cat confdefs.h >>conftest.$ac_ext
13203cat >>conftest.$ac_ext <<_ACEOF
13204/* end confdefs.h. */
22044edf 13205#include <jpeglib.h>
98418dba
CW
13206 version=JPEG_LIB_VERSION
13207
13208_ACEOF
13209if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13210 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13211 cat >>confdefs.h <<\_ACEOF
98418dba 13212#define HAVE_JPEG 1
c0d27fcc 13213_ACEOF
ba4481b5 13214
98418dba 13215else
c0d27fcc 13216 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13217echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13218 HAVE_JPEG=no
ba4481b5 13219fi
98418dba 13220rm -f conftest*
ba4481b5 13221
98418dba
CW
13222 fi
13223fi
503d2be0 13224
98418dba
CW
13225### Use -lpng if available, unless `--with-png=no'.
13226HAVE_PNG=no
13227if test "${HAVE_X11}" = "yes"; then
13228 if test "${with_png}" != "no"; then
f57bd967
DL
13229 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13230 # in /usr/include/libpng.
13231
13232
13233for ac_header in png.h libpng/png.h
13234do
13235as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
13236if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13237 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13238echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13239if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13240 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13241fi
ca81d7a0
JD
13242ac_res=`eval echo '${'$as_ac_Header'}'`
13243 { echo "$as_me:$LINENO: result: $ac_res" >&5
13244echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13245else
c0d27fcc 13246 # Is the header compilable?
ca81d7a0
JD
13247{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13248echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13249cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13250/* confdefs.h. */
13251_ACEOF
13252cat confdefs.h >>conftest.$ac_ext
13253cat >>conftest.$ac_ext <<_ACEOF
13254/* end confdefs.h. */
c0d27fcc 13255$ac_includes_default
f57bd967 13256#include <$ac_header>
c0d27fcc
MR
13257_ACEOF
13258rm -f conftest.$ac_objext
ca81d7a0
JD
13259if { (ac_try="$ac_compile"
13260case "(($ac_try" in
13261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13262 *) ac_try_echo=$ac_try;;
13263esac
13264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13265 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13266 ac_status=$?
edfaf76d
LK
13267 grep -v '^ *+' conftest.er1 >conftest.err
13268 rm -f conftest.er1
13269 cat conftest.err >&5
c0d27fcc 13270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13271 (exit $ac_status); } && {
13272 test -z "$ac_c_werror_flag" ||
13273 test ! -s conftest.err
13274 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13275 ac_header_compiler=yes
13276else
13277 echo "$as_me: failed program was:" >&5
19650fd6
AS
13278sed 's/^/| /' conftest.$ac_ext >&5
13279
ca81d7a0 13280 ac_header_compiler=no
c0d27fcc 13281fi
ca81d7a0
JD
13282
13283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13284{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13285echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13286
13287# Is the header present?
ca81d7a0
JD
13288{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13289echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13290cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13291/* confdefs.h. */
13292_ACEOF
13293cat confdefs.h >>conftest.$ac_ext
13294cat >>conftest.$ac_ext <<_ACEOF
13295/* end confdefs.h. */
f57bd967 13296#include <$ac_header>
503d2be0 13297_ACEOF
ca81d7a0
JD
13298if { (ac_try="$ac_cpp conftest.$ac_ext"
13299case "(($ac_try" in
13300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13301 *) ac_try_echo=$ac_try;;
13302esac
13303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13304 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13305 ac_status=$?
6bae0ccf 13306 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13307 rm -f conftest.er1
13308 cat conftest.err >&5
c0d27fcc 13309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13310 (exit $ac_status); } >/dev/null && {
13311 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13312 test ! -s conftest.err
13313 }; then
c0d27fcc 13314 ac_header_preproc=yes
503d2be0
AS
13315else
13316 echo "$as_me: failed program was:" >&5
19650fd6
AS
13317sed 's/^/| /' conftest.$ac_ext >&5
13318
c0d27fcc 13319 ac_header_preproc=no
ba4481b5 13320fi
ca81d7a0 13321
503d2be0 13322rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13323{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13324echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13325
13326# So? What about this header?
edfaf76d
LK
13327case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13328 yes:no: )
f57bd967
DL
13329 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13330echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13331 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13332echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13333 ac_header_preproc=yes
19650fd6 13334 ;;
edfaf76d 13335 no:yes:* )
f57bd967
DL
13336 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13337echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13338 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13339echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13340 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13341echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13342 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13343echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 13344 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13345echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13346 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13347echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13348
19650fd6 13349 ;;
c0d27fcc 13350esac
ca81d7a0
JD
13351{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13352echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13353if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
13354 echo $ECHO_N "(cached) $ECHO_C" >&6
13355else
edfaf76d 13356 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 13357fi
ca81d7a0
JD
13358ac_res=`eval echo '${'$as_ac_Header'}'`
13359 { echo "$as_me:$LINENO: result: $ac_res" >&5
13360echo "${ECHO_T}$ac_res" >&6; }
f57bd967 13361
ba4481b5 13362fi
f57bd967
DL
13363if test `eval echo '${'$as_ac_Header'}'` = yes; then
13364 cat >>confdefs.h <<_ACEOF
13365#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13366_ACEOF
c0d27fcc
MR
13367
13368fi
f57bd967
DL
13369
13370done
13371
13372 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
ca81d7a0
JD
13373 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
13374echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 13375if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 13376 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13377else
98418dba
CW
13378 ac_check_lib_save_LIBS=$LIBS
13379LIBS="-lpng -lz -lm $LIBS"
13380cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13381/* confdefs.h. */
13382_ACEOF
13383cat confdefs.h >>conftest.$ac_ext
13384cat >>conftest.$ac_ext <<_ACEOF
13385/* end confdefs.h. */
98418dba 13386
ca81d7a0
JD
13387/* Override any GCC internal prototype to avoid an error.
13388 Use char because int might match the return type of a GCC
13389 builtin and then its argument prototype would still apply. */
503d2be0
AS
13390#ifdef __cplusplus
13391extern "C"
13392#endif
98418dba 13393char png_get_channels ();
503d2be0
AS
13394int
13395main ()
13396{
ca81d7a0 13397return png_get_channels ();
503d2be0
AS
13398 ;
13399 return 0;
13400}
13401_ACEOF
13402rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13403if { (ac_try="$ac_link"
13404case "(($ac_try" in
13405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13406 *) ac_try_echo=$ac_try;;
13407esac
13408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13409 (eval "$ac_link") 2>conftest.er1
503d2be0 13410 ac_status=$?
edfaf76d
LK
13411 grep -v '^ *+' conftest.er1 >conftest.err
13412 rm -f conftest.er1
13413 cat conftest.err >&5
c0d27fcc 13414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13415 (exit $ac_status); } && {
13416 test -z "$ac_c_werror_flag" ||
13417 test ! -s conftest.err
13418 } && test -s conftest$ac_exeext &&
13419 $as_test_x conftest$ac_exeext; then
98418dba 13420 ac_cv_lib_png_png_get_channels=yes
73b77ee5 13421else
98418dba 13422 echo "$as_me: failed program was:" >&5
19650fd6
AS
13423sed 's/^/| /' conftest.$ac_ext >&5
13424
ca81d7a0 13425 ac_cv_lib_png_png_get_channels=no
73b77ee5 13426fi
ca81d7a0 13427
f053c89f 13428rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13429 conftest$ac_exeext conftest.$ac_ext
98418dba 13430LIBS=$ac_check_lib_save_LIBS
73b77ee5 13431fi
ca81d7a0
JD
13432{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
13433echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
13434if test $ac_cv_lib_png_png_get_channels = yes; then
13435 HAVE_PNG=yes
73b77ee5 13436fi
503d2be0 13437
f57bd967 13438 fi
98418dba
CW
13439 fi
13440
13441 if test "${HAVE_PNG}" = "yes"; then
b936fae4 13442
c0d27fcc 13443cat >>confdefs.h <<\_ACEOF
98418dba 13444#define HAVE_PNG 1
c0d27fcc 13445_ACEOF
73b77ee5 13446
98418dba 13447 fi
73b77ee5
GM
13448fi
13449
98418dba
CW
13450### Use -ltiff if available, unless `--with-tiff=no'.
13451HAVE_TIFF=no
13452if test "${HAVE_X11}" = "yes"; then
13453 if test "${with_tiff}" != "no"; then
c0d27fcc 13454 if test "${ac_cv_header_tiffio_h+set}" = set; then
ca81d7a0
JD
13455 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
13456echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
13457if test "${ac_cv_header_tiffio_h+set}" = set; then
13458 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13459fi
ca81d7a0
JD
13460{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13461echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 13462else
c0d27fcc 13463 # Is the header compilable?
ca81d7a0
JD
13464{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
13465echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 13466cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13467/* confdefs.h. */
13468_ACEOF
13469cat confdefs.h >>conftest.$ac_ext
13470cat >>conftest.$ac_ext <<_ACEOF
13471/* end confdefs.h. */
c0d27fcc
MR
13472$ac_includes_default
13473#include <tiffio.h>
13474_ACEOF
13475rm -f conftest.$ac_objext
ca81d7a0
JD
13476if { (ac_try="$ac_compile"
13477case "(($ac_try" in
13478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13479 *) ac_try_echo=$ac_try;;
13480esac
13481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13482 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13483 ac_status=$?
edfaf76d
LK
13484 grep -v '^ *+' conftest.er1 >conftest.err
13485 rm -f conftest.er1
13486 cat conftest.err >&5
c0d27fcc 13487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13488 (exit $ac_status); } && {
13489 test -z "$ac_c_werror_flag" ||
13490 test ! -s conftest.err
13491 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13492 ac_header_compiler=yes
13493else
13494 echo "$as_me: failed program was:" >&5
19650fd6
AS
13495sed 's/^/| /' conftest.$ac_ext >&5
13496
ca81d7a0 13497 ac_header_compiler=no
c0d27fcc 13498fi
ca81d7a0
JD
13499
13500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13501{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13502echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13503
13504# Is the header present?
ca81d7a0
JD
13505{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
13506echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 13507cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13508/* confdefs.h. */
13509_ACEOF
13510cat confdefs.h >>conftest.$ac_ext
13511cat >>conftest.$ac_ext <<_ACEOF
13512/* end confdefs.h. */
98418dba
CW
13513#include <tiffio.h>
13514_ACEOF
ca81d7a0
JD
13515if { (ac_try="$ac_cpp conftest.$ac_ext"
13516case "(($ac_try" in
13517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13518 *) ac_try_echo=$ac_try;;
13519esac
13520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13521 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13522 ac_status=$?
6bae0ccf 13523 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13524 rm -f conftest.er1
13525 cat conftest.err >&5
c0d27fcc 13526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13527 (exit $ac_status); } >/dev/null && {
13528 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13529 test ! -s conftest.err
13530 }; then
c0d27fcc 13531 ac_header_preproc=yes
98418dba
CW
13532else
13533 echo "$as_me: failed program was:" >&5
19650fd6
AS
13534sed 's/^/| /' conftest.$ac_ext >&5
13535
c0d27fcc 13536 ac_header_preproc=no
98418dba 13537fi
ca81d7a0 13538
98418dba 13539rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13540{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13541echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13542
13543# So? What about this header?
edfaf76d
LK
13544case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13545 yes:no: )
c0d27fcc
MR
13546 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
13547echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13548 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
13549echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
13550 ac_header_preproc=yes
19650fd6 13551 ;;
edfaf76d 13552 no:yes:* )
c0d27fcc
MR
13553 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
13554echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13555 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
13556echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
13557 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
13558echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
13559 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
13560echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13561 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 13562echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13563 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
13564echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13565
19650fd6 13566 ;;
c0d27fcc 13567esac
ca81d7a0
JD
13568{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
13569echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
13570if test "${ac_cv_header_tiffio_h+set}" = set; then
13571 echo $ECHO_N "(cached) $ECHO_C" >&6
13572else
13573 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 13574fi
ca81d7a0
JD
13575{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13576echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
13577
13578fi
98418dba
CW
13579if test $ac_cv_header_tiffio_h = yes; then
13580 tifflibs="-lz -lm"
13581 # At least one tiff package requires the jpeg library.
13582 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
ca81d7a0
JD
13583 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
13584echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 13585if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 13586 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13587else
503d2be0 13588 ac_check_lib_save_LIBS=$LIBS
98418dba 13589LIBS="-ltiff $tifflibs $LIBS"
503d2be0 13590cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13591/* confdefs.h. */
13592_ACEOF
13593cat confdefs.h >>conftest.$ac_ext
13594cat >>conftest.$ac_ext <<_ACEOF
13595/* end confdefs.h. */
503d2be0 13596
ca81d7a0
JD
13597/* Override any GCC internal prototype to avoid an error.
13598 Use char because int might match the return type of a GCC
13599 builtin and then its argument prototype would still apply. */
503d2be0
AS
13600#ifdef __cplusplus
13601extern "C"
13602#endif
98418dba 13603char TIFFGetVersion ();
503d2be0
AS
13604int
13605main ()
13606{
ca81d7a0 13607return TIFFGetVersion ();
503d2be0
AS
13608 ;
13609 return 0;
13610}
13611_ACEOF
13612rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13613if { (ac_try="$ac_link"
13614case "(($ac_try" in
13615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13616 *) ac_try_echo=$ac_try;;
13617esac
13618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13619 (eval "$ac_link") 2>conftest.er1
503d2be0 13620 ac_status=$?
edfaf76d
LK
13621 grep -v '^ *+' conftest.er1 >conftest.err
13622 rm -f conftest.er1
13623 cat conftest.err >&5
c0d27fcc 13624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13625 (exit $ac_status); } && {
13626 test -z "$ac_c_werror_flag" ||
13627 test ! -s conftest.err
13628 } && test -s conftest$ac_exeext &&
13629 $as_test_x conftest$ac_exeext; then
98418dba 13630 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
13631else
13632 echo "$as_me: failed program was:" >&5
19650fd6
AS
13633sed 's/^/| /' conftest.$ac_ext >&5
13634
ca81d7a0 13635 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 13636fi
ca81d7a0 13637
f053c89f 13638rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13639 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
13640LIBS=$ac_check_lib_save_LIBS
13641fi
ca81d7a0
JD
13642{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13643echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
13644if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
13645 HAVE_TIFF=yes
13646fi
13647
13648fi
73b77ee5 13649
c0d27fcc 13650
98418dba
CW
13651 fi
13652
13653 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 13654
c0d27fcc 13655cat >>confdefs.h <<\_ACEOF
98418dba 13656#define HAVE_TIFF 1
c0d27fcc 13657_ACEOF
98418dba
CW
13658
13659 fi
73b77ee5
GM
13660fi
13661
98418dba
CW
13662### Use -lgif if available, unless `--with-gif=no'.
13663HAVE_GIF=no
13664if test "${HAVE_X11}" = "yes"; then
13665 if test "${with_gif}" != "no"; then
c0d27fcc 13666 if test "${ac_cv_header_gif_lib_h+set}" = set; then
ca81d7a0
JD
13667 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
13668echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
13669if test "${ac_cv_header_gif_lib_h+set}" = set; then
13670 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13671fi
ca81d7a0
JD
13672{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
13673echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 13674else
c0d27fcc 13675 # Is the header compilable?
ca81d7a0
JD
13676{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
13677echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 13678cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13679/* confdefs.h. */
13680_ACEOF
13681cat confdefs.h >>conftest.$ac_ext
13682cat >>conftest.$ac_ext <<_ACEOF
13683/* end confdefs.h. */
c0d27fcc
MR
13684$ac_includes_default
13685#include <gif_lib.h>
13686_ACEOF
13687rm -f conftest.$ac_objext
ca81d7a0
JD
13688if { (ac_try="$ac_compile"
13689case "(($ac_try" in
13690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13691 *) ac_try_echo=$ac_try;;
13692esac
13693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13694 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13695 ac_status=$?
edfaf76d
LK
13696 grep -v '^ *+' conftest.er1 >conftest.err
13697 rm -f conftest.er1
13698 cat conftest.err >&5
c0d27fcc 13699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13700 (exit $ac_status); } && {
13701 test -z "$ac_c_werror_flag" ||
13702 test ! -s conftest.err
13703 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13704 ac_header_compiler=yes
13705else
13706 echo "$as_me: failed program was:" >&5
19650fd6
AS
13707sed 's/^/| /' conftest.$ac_ext >&5
13708
ca81d7a0 13709 ac_header_compiler=no
c0d27fcc 13710fi
ca81d7a0
JD
13711
13712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13713{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13714echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13715
13716# Is the header present?
ca81d7a0
JD
13717{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
13718echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 13719cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13720/* confdefs.h. */
13721_ACEOF
13722cat confdefs.h >>conftest.$ac_ext
13723cat >>conftest.$ac_ext <<_ACEOF
13724/* end confdefs.h. */
98418dba
CW
13725#include <gif_lib.h>
13726_ACEOF
ca81d7a0
JD
13727if { (ac_try="$ac_cpp conftest.$ac_ext"
13728case "(($ac_try" in
13729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13730 *) ac_try_echo=$ac_try;;
13731esac
13732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13733 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13734 ac_status=$?
6bae0ccf 13735 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13736 rm -f conftest.er1
13737 cat conftest.err >&5
c0d27fcc 13738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13739 (exit $ac_status); } >/dev/null && {
13740 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13741 test ! -s conftest.err
13742 }; then
c0d27fcc 13743 ac_header_preproc=yes
98418dba
CW
13744else
13745 echo "$as_me: failed program was:" >&5
19650fd6
AS
13746sed 's/^/| /' conftest.$ac_ext >&5
13747
c0d27fcc 13748 ac_header_preproc=no
98418dba 13749fi
ca81d7a0 13750
98418dba 13751rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13752{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13753echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13754
13755# So? What about this header?
edfaf76d
LK
13756case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13757 yes:no: )
c0d27fcc
MR
13758 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
13759echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13760 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
13761echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
13762 ac_header_preproc=yes
19650fd6 13763 ;;
edfaf76d 13764 no:yes:* )
c0d27fcc
MR
13765 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
13766echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13767 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
13768echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
13769 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
13770echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
13771 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
13772echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13773 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 13774echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13775 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
13776echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13777
19650fd6 13778 ;;
c0d27fcc 13779esac
ca81d7a0
JD
13780{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
13781echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
13782if test "${ac_cv_header_gif_lib_h+set}" = set; then
13783 echo $ECHO_N "(cached) $ECHO_C" >&6
13784else
13785 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 13786fi
ca81d7a0
JD
13787{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
13788echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
13789
13790fi
98418dba
CW
13791if test $ac_cv_header_gif_lib_h = yes; then
13792 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13793# Earlier versions can crash Emacs.
ca81d7a0
JD
13794 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
13795echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
98418dba 13796if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 13797 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13798else
503d2be0 13799 ac_check_lib_save_LIBS=$LIBS
98418dba 13800LIBS="-lungif $LIBS"
503d2be0 13801cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13802/* confdefs.h. */
13803_ACEOF
13804cat confdefs.h >>conftest.$ac_ext
13805cat >>conftest.$ac_ext <<_ACEOF
13806/* end confdefs.h. */
73b77ee5 13807
ca81d7a0
JD
13808/* Override any GCC internal prototype to avoid an error.
13809 Use char because int might match the return type of a GCC
13810 builtin and then its argument prototype would still apply. */
98418dba
CW
13811#ifdef __cplusplus
13812extern "C"
13813#endif
98418dba 13814char EGifPutExtensionLast ();
503d2be0
AS
13815int
13816main ()
13817{
ca81d7a0 13818return EGifPutExtensionLast ();
503d2be0
AS
13819 ;
13820 return 0;
13821}
13822_ACEOF
13823rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13824if { (ac_try="$ac_link"
13825case "(($ac_try" in
13826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13827 *) ac_try_echo=$ac_try;;
13828esac
13829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13830 (eval "$ac_link") 2>conftest.er1
503d2be0 13831 ac_status=$?
edfaf76d
LK
13832 grep -v '^ *+' conftest.er1 >conftest.err
13833 rm -f conftest.er1
13834 cat conftest.err >&5
c0d27fcc 13835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13836 (exit $ac_status); } && {
13837 test -z "$ac_c_werror_flag" ||
13838 test ! -s conftest.err
13839 } && test -s conftest$ac_exeext &&
13840 $as_test_x conftest$ac_exeext; then
35996d22
AS
13841 ac_cv_lib_ungif_EGifPutExtensionLast=yes
13842else
98418dba 13843 echo "$as_me: failed program was:" >&5
19650fd6
AS
13844sed 's/^/| /' conftest.$ac_ext >&5
13845
ca81d7a0 13846 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba 13847fi
ca81d7a0 13848
f053c89f 13849rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13850 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13851LIBS=$ac_check_lib_save_LIBS
13852fi
ca81d7a0
JD
13853{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13854echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
98418dba
CW
13855if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
13856 HAVE_GIF=yes
13857fi
13858
13859fi
13860
c0d27fcc 13861
98418dba
CW
13862 fi
13863
13864 if test "${HAVE_GIF}" = "yes"; then
b936fae4 13865
c0d27fcc 13866cat >>confdefs.h <<\_ACEOF
98418dba 13867#define HAVE_GIF 1
c0d27fcc 13868_ACEOF
98418dba
CW
13869
13870 fi
13871fi
13872
cef11da2 13873if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
ca81d7a0
JD
13874 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
13875echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
13876if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
13877 echo $ECHO_N "(cached) $ECHO_C" >&6
13878fi
ca81d7a0
JD
13879{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
13880echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
13881else
13882 # Is the header compilable?
ca81d7a0
JD
13883{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
13884echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
13885cat >conftest.$ac_ext <<_ACEOF
13886/* confdefs.h. */
13887_ACEOF
13888cat confdefs.h >>conftest.$ac_ext
13889cat >>conftest.$ac_ext <<_ACEOF
13890/* end confdefs.h. */
13891$ac_includes_default
13892#include <malloc/malloc.h>
13893_ACEOF
13894rm -f conftest.$ac_objext
ca81d7a0
JD
13895if { (ac_try="$ac_compile"
13896case "(($ac_try" in
13897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13898 *) ac_try_echo=$ac_try;;
13899esac
13900eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13901 (eval "$ac_compile") 2>conftest.er1
cef11da2 13902 ac_status=$?
edfaf76d
LK
13903 grep -v '^ *+' conftest.er1 >conftest.err
13904 rm -f conftest.er1
13905 cat conftest.err >&5
cef11da2 13906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13907 (exit $ac_status); } && {
13908 test -z "$ac_c_werror_flag" ||
13909 test ! -s conftest.err
13910 } && test -s conftest.$ac_objext; then
cef11da2
ST
13911 ac_header_compiler=yes
13912else
13913 echo "$as_me: failed program was:" >&5
13914sed 's/^/| /' conftest.$ac_ext >&5
13915
ca81d7a0 13916 ac_header_compiler=no
cef11da2 13917fi
ca81d7a0
JD
13918
13919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13920{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13921echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
13922
13923# Is the header present?
ca81d7a0
JD
13924{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
13925echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
13926cat >conftest.$ac_ext <<_ACEOF
13927/* confdefs.h. */
13928_ACEOF
13929cat confdefs.h >>conftest.$ac_ext
13930cat >>conftest.$ac_ext <<_ACEOF
13931/* end confdefs.h. */
13932#include <malloc/malloc.h>
13933_ACEOF
ca81d7a0
JD
13934if { (ac_try="$ac_cpp conftest.$ac_ext"
13935case "(($ac_try" in
13936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13937 *) ac_try_echo=$ac_try;;
13938esac
13939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13940 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
13941 ac_status=$?
13942 grep -v '^ *+' conftest.er1 >conftest.err
13943 rm -f conftest.er1
13944 cat conftest.err >&5
13945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13946 (exit $ac_status); } >/dev/null && {
13947 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13948 test ! -s conftest.err
13949 }; then
cef11da2
ST
13950 ac_header_preproc=yes
13951else
13952 echo "$as_me: failed program was:" >&5
13953sed 's/^/| /' conftest.$ac_ext >&5
13954
13955 ac_header_preproc=no
13956fi
ca81d7a0 13957
cef11da2 13958rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13959{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13960echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
13961
13962# So? What about this header?
edfaf76d
LK
13963case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13964 yes:no: )
cef11da2
ST
13965 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
13966echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13967 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
13968echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
13969 ac_header_preproc=yes
cef11da2 13970 ;;
edfaf76d 13971 no:yes:* )
cef11da2
ST
13972 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
13973echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13974 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
13975echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
13976 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
13977echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
13978 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
13979echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
13980 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
13981echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13982 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
13983echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13984
cef11da2
ST
13985 ;;
13986esac
ca81d7a0
JD
13987{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
13988echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
13989if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
13990 echo $ECHO_N "(cached) $ECHO_C" >&6
13991else
13992 ac_cv_header_malloc_malloc_h=$ac_header_preproc
13993fi
ca81d7a0
JD
13994{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
13995echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
13996
13997fi
13998if test $ac_cv_header_malloc_malloc_h = yes; then
13999
14000cat >>confdefs.h <<\_ACEOF
14001#define HAVE_MALLOC_MALLOC_H 1
14002_ACEOF
14003
14004fi
14005
14006
14007
5d6da11e 14008### Use Mac OS X Carbon API to implement GUI.
e0f712ba 14009if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 14010
c0d27fcc 14011cat >>confdefs.h <<\_ACEOF
e0f712ba 14012#define HAVE_CARBON 1
c0d27fcc 14013_ACEOF
e0f712ba 14014
6a3a24fa
JD
14015 ## Specify the install directory
14016 carbon_appdir=
14017 if test "${carbon_appdir_x}" != ""; then
14018 case ${carbon_appdir_x} in
14019 y | ye | yes) carbon_appdir=/Applications ;;
14020 * ) carbon_appdir=${carbon_appdir_x} ;;
14021 esac
14022 fi
8f417b3b
AS
14023 # We also have mouse menus.
14024 HAVE_MENUS=yes
e0f712ba
AC
14025fi
14026
98418dba
CW
14027### Use session management (-lSM -lICE) if available
14028HAVE_X_SM=no
14029if test "${HAVE_X11}" = "yes"; then
c0d27fcc 14030 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
ca81d7a0
JD
14031 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14032echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
14033if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14034 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14035fi
ca81d7a0
JD
14036{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14037echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 14038else
c0d27fcc 14039 # Is the header compilable?
ca81d7a0
JD
14040{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
14041echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 14042cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14043/* confdefs.h. */
14044_ACEOF
14045cat confdefs.h >>conftest.$ac_ext
14046cat >>conftest.$ac_ext <<_ACEOF
14047/* end confdefs.h. */
c0d27fcc
MR
14048$ac_includes_default
14049#include <X11/SM/SMlib.h>
14050_ACEOF
14051rm -f conftest.$ac_objext
ca81d7a0
JD
14052if { (ac_try="$ac_compile"
14053case "(($ac_try" in
14054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14055 *) ac_try_echo=$ac_try;;
14056esac
14057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14058 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14059 ac_status=$?
edfaf76d
LK
14060 grep -v '^ *+' conftest.er1 >conftest.err
14061 rm -f conftest.er1
14062 cat conftest.err >&5
c0d27fcc 14063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14064 (exit $ac_status); } && {
14065 test -z "$ac_c_werror_flag" ||
14066 test ! -s conftest.err
14067 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14068 ac_header_compiler=yes
14069else
14070 echo "$as_me: failed program was:" >&5
19650fd6
AS
14071sed 's/^/| /' conftest.$ac_ext >&5
14072
ca81d7a0 14073 ac_header_compiler=no
c0d27fcc 14074fi
ca81d7a0
JD
14075
14076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14077{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14078echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14079
14080# Is the header present?
ca81d7a0
JD
14081{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
14082echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 14083cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14084/* confdefs.h. */
14085_ACEOF
14086cat confdefs.h >>conftest.$ac_ext
14087cat >>conftest.$ac_ext <<_ACEOF
14088/* end confdefs.h. */
98418dba
CW
14089#include <X11/SM/SMlib.h>
14090_ACEOF
ca81d7a0
JD
14091if { (ac_try="$ac_cpp conftest.$ac_ext"
14092case "(($ac_try" in
14093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14094 *) ac_try_echo=$ac_try;;
14095esac
14096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14097 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14098 ac_status=$?
6bae0ccf 14099 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14100 rm -f conftest.er1
14101 cat conftest.err >&5
c0d27fcc 14102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14103 (exit $ac_status); } >/dev/null && {
14104 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14105 test ! -s conftest.err
14106 }; then
c0d27fcc 14107 ac_header_preproc=yes
98418dba
CW
14108else
14109 echo "$as_me: failed program was:" >&5
19650fd6
AS
14110sed 's/^/| /' conftest.$ac_ext >&5
14111
c0d27fcc 14112 ac_header_preproc=no
98418dba 14113fi
ca81d7a0 14114
98418dba 14115rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14116{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14117echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14118
14119# So? What about this header?
edfaf76d
LK
14120case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14121 yes:no: )
c0d27fcc
MR
14122 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14123echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14124 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
14125echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
14126 ac_header_preproc=yes
19650fd6 14127 ;;
edfaf76d 14128 no:yes:* )
c0d27fcc
MR
14129 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
14130echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14131 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
14132echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
14133 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
14134echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
14135 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
14136echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14137 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 14138echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14139 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
14140echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14141
19650fd6 14142 ;;
c0d27fcc 14143esac
ca81d7a0
JD
14144{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14145echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14146if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14147 echo $ECHO_N "(cached) $ECHO_C" >&6
14148else
14149 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 14150fi
ca81d7a0
JD
14151{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14152echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
14153
14154fi
98418dba 14155if test $ac_cv_header_X11_SM_SMlib_h = yes; then
ca81d7a0
JD
14156 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
14157echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 14158if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 14159 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14160else
503d2be0 14161 ac_check_lib_save_LIBS=$LIBS
1660500f 14162LIBS="-lSM -lICE $LIBS"
503d2be0 14163cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14164/* confdefs.h. */
14165_ACEOF
14166cat confdefs.h >>conftest.$ac_ext
14167cat >>conftest.$ac_ext <<_ACEOF
14168/* end confdefs.h. */
503d2be0 14169
ca81d7a0
JD
14170/* Override any GCC internal prototype to avoid an error.
14171 Use char because int might match the return type of a GCC
14172 builtin and then its argument prototype would still apply. */
503d2be0
AS
14173#ifdef __cplusplus
14174extern "C"
14175#endif
98418dba 14176char SmcOpenConnection ();
503d2be0
AS
14177int
14178main ()
14179{
ca81d7a0 14180return SmcOpenConnection ();
503d2be0
AS
14181 ;
14182 return 0;
14183}
14184_ACEOF
14185rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14186if { (ac_try="$ac_link"
14187case "(($ac_try" in
14188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14189 *) ac_try_echo=$ac_try;;
14190esac
14191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14192 (eval "$ac_link") 2>conftest.er1
503d2be0 14193 ac_status=$?
edfaf76d
LK
14194 grep -v '^ *+' conftest.er1 >conftest.err
14195 rm -f conftest.er1
14196 cat conftest.err >&5
c0d27fcc 14197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14198 (exit $ac_status); } && {
14199 test -z "$ac_c_werror_flag" ||
14200 test ! -s conftest.err
14201 } && test -s conftest$ac_exeext &&
14202 $as_test_x conftest$ac_exeext; then
98418dba 14203 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
14204else
14205 echo "$as_me: failed program was:" >&5
19650fd6
AS
14206sed 's/^/| /' conftest.$ac_ext >&5
14207
ca81d7a0 14208 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 14209fi
ca81d7a0 14210
f053c89f 14211rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14212 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14213LIBS=$ac_check_lib_save_LIBS
14214fi
ca81d7a0
JD
14215{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
14216echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
14217if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
14218 HAVE_X_SM=yes
73b77ee5
GM
14219fi
14220
73b77ee5 14221fi
73b77ee5 14222
c0d27fcc
MR
14223
14224
98418dba 14225 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 14226
c0d27fcc 14227cat >>confdefs.h <<\_ACEOF
98418dba 14228#define HAVE_X_SM 1
c0d27fcc 14229_ACEOF
73b77ee5 14230
98418dba
CW
14231 case "$LIBS" in
14232 *-lSM*) ;;
14233 *) LIBS="-lSM -lICE $LIBS" ;;
14234 esac
73b77ee5 14235 fi
98418dba 14236fi
73b77ee5 14237
98418dba 14238# If netdb.h doesn't declare h_errno, we must declare it by hand.
ca81d7a0
JD
14239{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
14240echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
14241if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
14242 echo $ECHO_N "(cached) $ECHO_C" >&6
14243else
14244 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14245/* confdefs.h. */
14246_ACEOF
14247cat confdefs.h >>conftest.$ac_ext
14248cat >>conftest.$ac_ext <<_ACEOF
14249/* end confdefs.h. */
98418dba 14250#include <netdb.h>
503d2be0
AS
14251int
14252main ()
14253{
98418dba 14254return h_errno;
503d2be0
AS
14255 ;
14256 return 0;
14257}
14258_ACEOF
14259rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14260if { (ac_try="$ac_link"
14261case "(($ac_try" in
14262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14263 *) ac_try_echo=$ac_try;;
14264esac
14265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14266 (eval "$ac_link") 2>conftest.er1
503d2be0 14267 ac_status=$?
edfaf76d
LK
14268 grep -v '^ *+' conftest.er1 >conftest.err
14269 rm -f conftest.er1
14270 cat conftest.err >&5
c0d27fcc 14271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14272 (exit $ac_status); } && {
14273 test -z "$ac_c_werror_flag" ||
14274 test ! -s conftest.err
14275 } && test -s conftest$ac_exeext &&
14276 $as_test_x conftest$ac_exeext; then
98418dba 14277 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 14278else
503d2be0 14279 echo "$as_me: failed program was:" >&5
19650fd6
AS
14280sed 's/^/| /' conftest.$ac_ext >&5
14281
ca81d7a0 14282 emacs_cv_netdb_declares_h_errno=no
73b77ee5 14283fi
ca81d7a0 14284
f053c89f 14285rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14286 conftest$ac_exeext conftest.$ac_ext
98418dba 14287fi
ca81d7a0
JD
14288{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
14289echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 14290if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 14291
c0d27fcc 14292cat >>confdefs.h <<\_ACEOF
98418dba 14293#define HAVE_H_ERRNO 1
c0d27fcc 14294_ACEOF
73b77ee5 14295
98418dba
CW
14296fi
14297
14298# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14299# for constant arguments. Useless!
ca81d7a0
JD
14300{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
14301echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
14302if test "${ac_cv_working_alloca_h+set}" = set; then
14303 echo $ECHO_N "(cached) $ECHO_C" >&6
14304else
14305 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14306/* confdefs.h. */
14307_ACEOF
14308cat confdefs.h >>conftest.$ac_ext
14309cat >>conftest.$ac_ext <<_ACEOF
14310/* end confdefs.h. */
98418dba 14311#include <alloca.h>
503d2be0
AS
14312int
14313main ()
14314{
98418dba 14315char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 14316 if (p) return 0;
503d2be0
AS
14317 ;
14318 return 0;
14319}
14320_ACEOF
14321rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14322if { (ac_try="$ac_link"
14323case "(($ac_try" in
14324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14325 *) ac_try_echo=$ac_try;;
14326esac
14327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14328 (eval "$ac_link") 2>conftest.er1
503d2be0 14329 ac_status=$?
edfaf76d
LK
14330 grep -v '^ *+' conftest.er1 >conftest.err
14331 rm -f conftest.er1
14332 cat conftest.err >&5
c0d27fcc 14333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14334 (exit $ac_status); } && {
14335 test -z "$ac_c_werror_flag" ||
14336 test ! -s conftest.err
14337 } && test -s conftest$ac_exeext &&
14338 $as_test_x conftest$ac_exeext; then
98418dba 14339 ac_cv_working_alloca_h=yes
73b77ee5 14340else
503d2be0 14341 echo "$as_me: failed program was:" >&5
19650fd6
AS
14342sed 's/^/| /' conftest.$ac_ext >&5
14343
ca81d7a0 14344 ac_cv_working_alloca_h=no
73b77ee5 14345fi
ca81d7a0 14346
f053c89f 14347rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14348 conftest$ac_exeext conftest.$ac_ext
98418dba 14349fi
ca81d7a0
JD
14350{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
14351echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 14352if test $ac_cv_working_alloca_h = yes; then
73b77ee5 14353
c0d27fcc 14354cat >>confdefs.h <<\_ACEOF
98418dba 14355#define HAVE_ALLOCA_H 1
c0d27fcc 14356_ACEOF
98418dba
CW
14357
14358fi
14359
ca81d7a0
JD
14360{ echo "$as_me:$LINENO: checking for alloca" >&5
14361echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
14362if test "${ac_cv_func_alloca_works+set}" = set; then
14363 echo $ECHO_N "(cached) $ECHO_C" >&6
14364else
503d2be0 14365 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14366/* confdefs.h. */
14367_ACEOF
14368cat confdefs.h >>conftest.$ac_ext
14369cat >>conftest.$ac_ext <<_ACEOF
14370/* end confdefs.h. */
98418dba
CW
14371#ifdef __GNUC__
14372# define alloca __builtin_alloca
14373#else
14374# ifdef _MSC_VER
14375# include <malloc.h>
14376# define alloca _alloca
14377# else
f053c89f 14378# ifdef HAVE_ALLOCA_H
98418dba
CW
14379# include <alloca.h>
14380# else
14381# ifdef _AIX
14382 #pragma alloca
14383# else
14384# ifndef alloca /* predefined by HP cc +Olibcalls */
14385char *alloca ();
14386# endif
14387# endif
14388# endif
14389# endif
14390#endif
14391
503d2be0
AS
14392int
14393main ()
14394{
98418dba 14395char *p = (char *) alloca (1);
ca81d7a0 14396 if (p) return 0;
503d2be0
AS
14397 ;
14398 return 0;
14399}
14400_ACEOF
14401rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14402if { (ac_try="$ac_link"
14403case "(($ac_try" in
14404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14405 *) ac_try_echo=$ac_try;;
14406esac
14407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14408 (eval "$ac_link") 2>conftest.er1
503d2be0 14409 ac_status=$?
edfaf76d
LK
14410 grep -v '^ *+' conftest.er1 >conftest.err
14411 rm -f conftest.er1
14412 cat conftest.err >&5
c0d27fcc 14413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14414 (exit $ac_status); } && {
14415 test -z "$ac_c_werror_flag" ||
14416 test ! -s conftest.err
14417 } && test -s conftest$ac_exeext &&
14418 $as_test_x conftest$ac_exeext; then
98418dba 14419 ac_cv_func_alloca_works=yes
ac95a621 14420else
503d2be0 14421 echo "$as_me: failed program was:" >&5
19650fd6
AS
14422sed 's/^/| /' conftest.$ac_ext >&5
14423
ca81d7a0 14424 ac_cv_func_alloca_works=no
ac95a621 14425fi
ca81d7a0 14426
f053c89f 14427rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14428 conftest$ac_exeext conftest.$ac_ext
98418dba 14429fi
ca81d7a0
JD
14430{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
14431echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 14432
98418dba
CW
14433if test $ac_cv_func_alloca_works = yes; then
14434
c0d27fcc 14435cat >>confdefs.h <<\_ACEOF
98418dba 14436#define HAVE_ALLOCA 1
c0d27fcc 14437_ACEOF
98418dba
CW
14438
14439else
14440 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
14441# that cause trouble. Some versions do not even contain alloca or
14442# contain a buggy version. If you still want to use their alloca,
14443# use ar to extract alloca.o from them instead of compiling alloca.c.
14444
ca81d7a0 14445ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 14446
c0d27fcc 14447cat >>confdefs.h <<\_ACEOF
98418dba 14448#define C_ALLOCA 1
c0d27fcc 14449_ACEOF
98418dba 14450
c0d27fcc 14451
ca81d7a0
JD
14452{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
14453echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
14454if test "${ac_cv_os_cray+set}" = set; then
14455 echo $ECHO_N "(cached) $ECHO_C" >&6
14456else
14457 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14458/* confdefs.h. */
14459_ACEOF
14460cat confdefs.h >>conftest.$ac_ext
14461cat >>conftest.$ac_ext <<_ACEOF
14462/* end confdefs.h. */
ca81d7a0 14463#if defined CRAY && ! defined CRAY2
98418dba
CW
14464webecray
14465#else
14466wenotbecray
14467#endif
14468
14469_ACEOF
14470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 14471 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
14472 ac_cv_os_cray=yes
14473else
14474 ac_cv_os_cray=no
14475fi
14476rm -f conftest*
ac95a621 14477
98418dba 14478fi
ca81d7a0
JD
14479{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
14480echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
14481if test $ac_cv_os_cray = yes; then
14482 for ac_func in _getb67 GETB67 getb67; do
14483 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
14484{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14485echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14486if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 14487 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14488else
503d2be0 14489 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14490/* confdefs.h. */
14491_ACEOF
14492cat confdefs.h >>conftest.$ac_ext
14493cat >>conftest.$ac_ext <<_ACEOF
14494/* end confdefs.h. */
edfaf76d
LK
14495/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14496 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14497#define $ac_func innocuous_$ac_func
14498
73b77ee5 14499/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14500 which can conflict with char $ac_func (); below.
14501 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14502 <limits.h> exists even on freestanding compilers. */
edfaf76d 14503
19650fd6
AS
14504#ifdef __STDC__
14505# include <limits.h>
14506#else
14507# include <assert.h>
14508#endif
edfaf76d
LK
14509
14510#undef $ac_func
14511
ca81d7a0
JD
14512/* Override any GCC internal prototype to avoid an error.
14513 Use char because int might match the return type of a GCC
14514 builtin and then its argument prototype would still apply. */
503d2be0
AS
14515#ifdef __cplusplus
14516extern "C"
14517#endif
503d2be0 14518char $ac_func ();
73b77ee5
GM
14519/* The GNU C library defines this for functions which it implements
14520 to always fail with ENOSYS. Some functions are actually named
14521 something starting with __ and the normal name is an alias. */
ca81d7a0 14522#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 14523choke me
73b77ee5
GM
14524#endif
14525
19650fd6
AS
14526int
14527main ()
14528{
ca81d7a0 14529return $ac_func ();
503d2be0
AS
14530 ;
14531 return 0;
14532}
14533_ACEOF
14534rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14535if { (ac_try="$ac_link"
14536case "(($ac_try" in
14537 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14538 *) ac_try_echo=$ac_try;;
14539esac
14540eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14541 (eval "$ac_link") 2>conftest.er1
503d2be0 14542 ac_status=$?
edfaf76d
LK
14543 grep -v '^ *+' conftest.er1 >conftest.err
14544 rm -f conftest.er1
14545 cat conftest.err >&5
c0d27fcc 14546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14547 (exit $ac_status); } && {
14548 test -z "$ac_c_werror_flag" ||
14549 test ! -s conftest.err
14550 } && test -s conftest$ac_exeext &&
14551 $as_test_x conftest$ac_exeext; then
503d2be0
AS
14552 eval "$as_ac_var=yes"
14553else
14554 echo "$as_me: failed program was:" >&5
19650fd6
AS
14555sed 's/^/| /' conftest.$ac_ext >&5
14556
ca81d7a0 14557 eval "$as_ac_var=no"
503d2be0 14558fi
ca81d7a0 14559
f053c89f 14560rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14561 conftest$ac_exeext conftest.$ac_ext
503d2be0 14562fi
ca81d7a0
JD
14563ac_res=`eval echo '${'$as_ac_var'}'`
14564 { echo "$as_me:$LINENO: result: $ac_res" >&5
14565echo "${ECHO_T}$ac_res" >&6; }
503d2be0 14566if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 14567
c0d27fcc 14568cat >>confdefs.h <<_ACEOF
98418dba 14569#define CRAY_STACKSEG_END $ac_func
c0d27fcc 14570_ACEOF
98418dba
CW
14571
14572 break
73b77ee5 14573fi
73b77ee5 14574
98418dba 14575 done
73b77ee5
GM
14576fi
14577
ca81d7a0
JD
14578{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
14579echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 14580if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 14581 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
14582else
14583 if test "$cross_compiling" = yes; then
14584 ac_cv_c_stack_direction=0
73b77ee5 14585else
503d2be0 14586 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14587/* confdefs.h. */
14588_ACEOF
14589cat confdefs.h >>conftest.$ac_ext
14590cat >>conftest.$ac_ext <<_ACEOF
14591/* end confdefs.h. */
ca81d7a0 14592$ac_includes_default
503d2be0 14593int
98418dba 14594find_stack_direction ()
503d2be0 14595{
98418dba
CW
14596 static char *addr = 0;
14597 auto char dummy;
14598 if (addr == 0)
14599 {
14600 addr = &dummy;
14601 return find_stack_direction ();
14602 }
73b77ee5 14603 else
98418dba
CW
14604 return (&dummy > addr) ? 1 : -1;
14605}
ba4481b5 14606
503d2be0
AS
14607int
14608main ()
14609{
ca81d7a0 14610 return find_stack_direction () < 0;
503d2be0
AS
14611}
14612_ACEOF
98418dba 14613rm -f conftest$ac_exeext
ca81d7a0
JD
14614if { (ac_try="$ac_link"
14615case "(($ac_try" in
14616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14617 *) ac_try_echo=$ac_try;;
14618esac
14619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14620 (eval "$ac_link") 2>&5
503d2be0 14621 ac_status=$?
c0d27fcc 14622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14623 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
14624 { (case "(($ac_try" in
14625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14626 *) ac_try_echo=$ac_try;;
14627esac
14628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14629 (eval "$ac_try") 2>&5
503d2be0 14630 ac_status=$?
c0d27fcc 14631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14632 (exit $ac_status); }; }; then
98418dba 14633 ac_cv_c_stack_direction=1
ba4481b5 14634else
98418dba
CW
14635 echo "$as_me: program exited with status $ac_status" >&5
14636echo "$as_me: failed program was:" >&5
19650fd6
AS
14637sed 's/^/| /' conftest.$ac_ext >&5
14638
c0d27fcc 14639( exit $ac_status )
98418dba 14640ac_cv_c_stack_direction=-1
ba4481b5 14641fi
ca81d7a0 14642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 14643fi
ca81d7a0
JD
14644
14645
98418dba 14646fi
ca81d7a0
JD
14647{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
14648echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 14649
c0d27fcc 14650cat >>confdefs.h <<_ACEOF
98418dba 14651#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
14652_ACEOF
14653
ba4481b5 14654
ba4481b5
DL
14655fi
14656
c0d27fcc 14657
98418dba
CW
14658# fmod, logb, and frexp are found in -lm on most systems.
14659# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
14660
ca81d7a0
JD
14661{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
14662echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 14663if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 14664 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14665else
98418dba
CW
14666 ac_check_lib_save_LIBS=$LIBS
14667LIBS="-lm $LIBS"
14668cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14669/* confdefs.h. */
14670_ACEOF
14671cat confdefs.h >>conftest.$ac_ext
14672cat >>conftest.$ac_ext <<_ACEOF
14673/* end confdefs.h. */
ba4481b5 14674
ca81d7a0
JD
14675/* Override any GCC internal prototype to avoid an error.
14676 Use char because int might match the return type of a GCC
14677 builtin and then its argument prototype would still apply. */
98418dba
CW
14678#ifdef __cplusplus
14679extern "C"
14680#endif
98418dba 14681char sqrt ();
503d2be0
AS
14682int
14683main ()
14684{
ca81d7a0 14685return sqrt ();
503d2be0
AS
14686 ;
14687 return 0;
14688}
14689_ACEOF
14690rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14691if { (ac_try="$ac_link"
14692case "(($ac_try" in
14693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14694 *) ac_try_echo=$ac_try;;
14695esac
14696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14697 (eval "$ac_link") 2>conftest.er1
503d2be0 14698 ac_status=$?
edfaf76d
LK
14699 grep -v '^ *+' conftest.er1 >conftest.err
14700 rm -f conftest.er1
14701 cat conftest.err >&5
c0d27fcc 14702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14703 (exit $ac_status); } && {
14704 test -z "$ac_c_werror_flag" ||
14705 test ! -s conftest.err
14706 } && test -s conftest$ac_exeext &&
14707 $as_test_x conftest$ac_exeext; then
98418dba 14708 ac_cv_lib_m_sqrt=yes
ba4481b5 14709else
503d2be0 14710 echo "$as_me: failed program was:" >&5
19650fd6
AS
14711sed 's/^/| /' conftest.$ac_ext >&5
14712
ca81d7a0 14713 ac_cv_lib_m_sqrt=no
ba4481b5 14714fi
ca81d7a0 14715
f053c89f 14716rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14717 conftest$ac_exeext conftest.$ac_ext
98418dba 14718LIBS=$ac_check_lib_save_LIBS
ba4481b5 14719fi
ca81d7a0
JD
14720{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
14721echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 14722if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 14723 cat >>confdefs.h <<_ACEOF
98418dba 14724#define HAVE_LIBM 1
c0d27fcc 14725_ACEOF
98418dba
CW
14726
14727 LIBS="-lm $LIBS"
ba4481b5 14728
ba4481b5
DL
14729fi
14730
c0d27fcc 14731
55597d70
DL
14732# Check for mail-locking functions in a "mail" library. Probably this should
14733# have the same check as for liblockfile below.
98418dba 14734
ca81d7a0
JD
14735{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
14736echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 14737if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 14738 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14739else
98418dba
CW
14740 ac_check_lib_save_LIBS=$LIBS
14741LIBS="-lmail $LIBS"
14742cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14743/* confdefs.h. */
14744_ACEOF
14745cat confdefs.h >>conftest.$ac_ext
14746cat >>conftest.$ac_ext <<_ACEOF
14747/* end confdefs.h. */
98418dba 14748
ca81d7a0
JD
14749/* Override any GCC internal prototype to avoid an error.
14750 Use char because int might match the return type of a GCC
14751 builtin and then its argument prototype would still apply. */
98418dba
CW
14752#ifdef __cplusplus
14753extern "C"
14754#endif
98418dba 14755char maillock ();
503d2be0
AS
14756int
14757main ()
14758{
ca81d7a0 14759return maillock ();
503d2be0
AS
14760 ;
14761 return 0;
14762}
14763_ACEOF
14764rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14765if { (ac_try="$ac_link"
14766case "(($ac_try" in
14767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14768 *) ac_try_echo=$ac_try;;
14769esac
14770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14771 (eval "$ac_link") 2>conftest.er1
503d2be0 14772 ac_status=$?
edfaf76d
LK
14773 grep -v '^ *+' conftest.er1 >conftest.err
14774 rm -f conftest.er1
14775 cat conftest.err >&5
c0d27fcc 14776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14777 (exit $ac_status); } && {
14778 test -z "$ac_c_werror_flag" ||
14779 test ! -s conftest.err
14780 } && test -s conftest$ac_exeext &&
14781 $as_test_x conftest$ac_exeext; then
98418dba 14782 ac_cv_lib_mail_maillock=yes
ba4481b5 14783else
503d2be0 14784 echo "$as_me: failed program was:" >&5
19650fd6
AS
14785sed 's/^/| /' conftest.$ac_ext >&5
14786
ca81d7a0 14787 ac_cv_lib_mail_maillock=no
ba4481b5 14788fi
ca81d7a0 14789
f053c89f 14790rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14791 conftest$ac_exeext conftest.$ac_ext
98418dba 14792LIBS=$ac_check_lib_save_LIBS
ba4481b5 14793fi
ca81d7a0
JD
14794{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
14795echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 14796if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 14797 cat >>confdefs.h <<_ACEOF
98418dba 14798#define HAVE_LIBMAIL 1
c0d27fcc 14799_ACEOF
ba4481b5 14800
98418dba 14801 LIBS="-lmail $LIBS"
ba4481b5 14802
98418dba 14803fi
ba4481b5 14804
c0d27fcc 14805
ca81d7a0
JD
14806{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
14807echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 14808if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 14809 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14810else
503d2be0 14811 ac_check_lib_save_LIBS=$LIBS
98418dba 14812LIBS="-llockfile $LIBS"
503d2be0 14813cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14814/* confdefs.h. */
14815_ACEOF
14816cat confdefs.h >>conftest.$ac_ext
14817cat >>conftest.$ac_ext <<_ACEOF
14818/* end confdefs.h. */
503d2be0 14819
ca81d7a0
JD
14820/* Override any GCC internal prototype to avoid an error.
14821 Use char because int might match the return type of a GCC
14822 builtin and then its argument prototype would still apply. */
503d2be0
AS
14823#ifdef __cplusplus
14824extern "C"
14825#endif
98418dba 14826char maillock ();
503d2be0
AS
14827int
14828main ()
14829{
ca81d7a0 14830return maillock ();
503d2be0
AS
14831 ;
14832 return 0;
14833}
14834_ACEOF
14835rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14836if { (ac_try="$ac_link"
14837case "(($ac_try" in
14838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14839 *) ac_try_echo=$ac_try;;
14840esac
14841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14842 (eval "$ac_link") 2>conftest.er1
503d2be0 14843 ac_status=$?
edfaf76d
LK
14844 grep -v '^ *+' conftest.er1 >conftest.err
14845 rm -f conftest.er1
14846 cat conftest.err >&5
c0d27fcc 14847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14848 (exit $ac_status); } && {
14849 test -z "$ac_c_werror_flag" ||
14850 test ! -s conftest.err
14851 } && test -s conftest$ac_exeext &&
14852 $as_test_x conftest$ac_exeext; then
98418dba 14853 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
14854else
14855 echo "$as_me: failed program was:" >&5
19650fd6
AS
14856sed 's/^/| /' conftest.$ac_ext >&5
14857
ca81d7a0 14858 ac_cv_lib_lockfile_maillock=no
98418dba 14859fi
ca81d7a0 14860
f053c89f 14861rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14862 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14863LIBS=$ac_check_lib_save_LIBS
14864fi
ca81d7a0
JD
14865{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
14866echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 14867if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 14868 cat >>confdefs.h <<_ACEOF
98418dba 14869#define HAVE_LIBLOCKFILE 1
c0d27fcc 14870_ACEOF
98418dba
CW
14871
14872 LIBS="-llockfile $LIBS"
14873
14874fi
14875
14876# If we have the shared liblockfile, assume we must use it for mail
14877# locking (e.g. Debian). If we couldn't link against liblockfile
14878# (no liblockfile.a installed), ensure that we don't need to.
14879if test "$ac_cv_lib_lockfile_maillock" = no; then
14880 # Extract the first word of "liblockfile.so", so it can be a program name with args.
14881set dummy liblockfile.so; ac_word=$2
ca81d7a0
JD
14882{ echo "$as_me:$LINENO: checking for $ac_word" >&5
14883echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
14884if test "${ac_cv_prog_liblockfile+set}" = set; then
14885 echo $ECHO_N "(cached) $ECHO_C" >&6
14886else
14887 if test -n "$liblockfile"; then
14888 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
14889else
c0d27fcc 14890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
14891as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
14892for as_dir in $as_dummy
c0d27fcc
MR
14893do
14894 IFS=$as_save_IFS
14895 test -z "$as_dir" && as_dir=.
14896 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 14897 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
14898 ac_cv_prog_liblockfile="yes"
14899 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14900 break 2
14901 fi
14902done
98418dba 14903done
ca81d7a0 14904IFS=$as_save_IFS
98418dba
CW
14905
14906 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 14907fi
503d2be0 14908fi
98418dba
CW
14909liblockfile=$ac_cv_prog_liblockfile
14910if test -n "$liblockfile"; then
ca81d7a0
JD
14911 { echo "$as_me:$LINENO: result: $liblockfile" >&5
14912echo "${ECHO_T}$liblockfile" >&6; }
98418dba 14913else
ca81d7a0
JD
14914 { echo "$as_me:$LINENO: result: no" >&5
14915echo "${ECHO_T}no" >&6; }
ba4481b5
DL
14916fi
14917
ca81d7a0 14918
98418dba 14919 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 14920 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
14921This probably means that movemail could lose mail.
14922There may be a \`development' package to install containing liblockfile." >&5
14923echo "$as_me: error: Shared liblockfile found but can't link against it.
14924This probably means that movemail could lose mail.
14925There may be a \`development' package to install containing liblockfile." >&2;}
14926 { (exit 1); exit 1; }; }
98418dba 14927 else :
55597d70 14928 fi
98418dba 14929fi
503d2be0 14930
98418dba
CW
14931for ac_func in touchlock
14932do
14933as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
14934{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14935echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14936if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 14937 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 14938else
98418dba 14939 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14940/* confdefs.h. */
14941_ACEOF
14942cat confdefs.h >>conftest.$ac_ext
14943cat >>conftest.$ac_ext <<_ACEOF
14944/* end confdefs.h. */
edfaf76d
LK
14945/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14946 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14947#define $ac_func innocuous_$ac_func
14948
98418dba 14949/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14950 which can conflict with char $ac_func (); below.
14951 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14952 <limits.h> exists even on freestanding compilers. */
edfaf76d 14953
19650fd6
AS
14954#ifdef __STDC__
14955# include <limits.h>
14956#else
14957# include <assert.h>
14958#endif
edfaf76d
LK
14959
14960#undef $ac_func
14961
ca81d7a0
JD
14962/* Override any GCC internal prototype to avoid an error.
14963 Use char because int might match the return type of a GCC
14964 builtin and then its argument prototype would still apply. */
503d2be0
AS
14965#ifdef __cplusplus
14966extern "C"
14967#endif
98418dba 14968char $ac_func ();
98418dba
CW
14969/* The GNU C library defines this for functions which it implements
14970 to always fail with ENOSYS. Some functions are actually named
14971 something starting with __ and the normal name is an alias. */
ca81d7a0 14972#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 14973choke me
cd958eb3
MB
14974#endif
14975
19650fd6
AS
14976int
14977main ()
14978{
ca81d7a0 14979return $ac_func ();
503d2be0
AS
14980 ;
14981 return 0;
14982}
14983_ACEOF
14984rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14985if { (ac_try="$ac_link"
14986case "(($ac_try" in
14987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14988 *) ac_try_echo=$ac_try;;
14989esac
14990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14991 (eval "$ac_link") 2>conftest.er1
503d2be0 14992 ac_status=$?
edfaf76d
LK
14993 grep -v '^ *+' conftest.er1 >conftest.err
14994 rm -f conftest.er1
14995 cat conftest.err >&5
c0d27fcc 14996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14997 (exit $ac_status); } && {
14998 test -z "$ac_c_werror_flag" ||
14999 test ! -s conftest.err
15000 } && test -s conftest$ac_exeext &&
15001 $as_test_x conftest$ac_exeext; then
98418dba 15002 eval "$as_ac_var=yes"
503d2be0
AS
15003else
15004 echo "$as_me: failed program was:" >&5
19650fd6
AS
15005sed 's/^/| /' conftest.$ac_ext >&5
15006
ca81d7a0 15007 eval "$as_ac_var=no"
503d2be0 15008fi
ca81d7a0 15009
f053c89f 15010rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15011 conftest$ac_exeext conftest.$ac_ext
503d2be0 15012fi
ca81d7a0
JD
15013ac_res=`eval echo '${'$as_ac_var'}'`
15014 { echo "$as_me:$LINENO: result: $ac_res" >&5
15015echo "${ECHO_T}$ac_res" >&6; }
98418dba 15016if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15017 cat >>confdefs.h <<_ACEOF
98418dba 15018#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15019_ACEOF
457b792c 15020
457b792c 15021fi
98418dba 15022done
457b792c 15023
c0d27fcc 15024
98418dba
CW
15025for ac_header in maillock.h
15026do
15027as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15028if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15029 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15030echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15031if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15032 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15033fi
ca81d7a0
JD
15034ac_res=`eval echo '${'$as_ac_Header'}'`
15035 { echo "$as_me:$LINENO: result: $ac_res" >&5
15036echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 15037else
c0d27fcc 15038 # Is the header compilable?
ca81d7a0
JD
15039{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15040echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15041cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15042/* confdefs.h. */
15043_ACEOF
15044cat confdefs.h >>conftest.$ac_ext
15045cat >>conftest.$ac_ext <<_ACEOF
15046/* end confdefs.h. */
c0d27fcc
MR
15047$ac_includes_default
15048#include <$ac_header>
15049_ACEOF
15050rm -f conftest.$ac_objext
ca81d7a0
JD
15051if { (ac_try="$ac_compile"
15052case "(($ac_try" in
15053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15054 *) ac_try_echo=$ac_try;;
15055esac
15056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15057 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15058 ac_status=$?
edfaf76d
LK
15059 grep -v '^ *+' conftest.er1 >conftest.err
15060 rm -f conftest.er1
15061 cat conftest.err >&5
c0d27fcc 15062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15063 (exit $ac_status); } && {
15064 test -z "$ac_c_werror_flag" ||
15065 test ! -s conftest.err
15066 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15067 ac_header_compiler=yes
15068else
15069 echo "$as_me: failed program was:" >&5
19650fd6
AS
15070sed 's/^/| /' conftest.$ac_ext >&5
15071
ca81d7a0 15072 ac_header_compiler=no
c0d27fcc 15073fi
ca81d7a0
JD
15074
15075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15076{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15077echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15078
15079# Is the header present?
ca81d7a0
JD
15080{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15081echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15082cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15083/* confdefs.h. */
15084_ACEOF
15085cat confdefs.h >>conftest.$ac_ext
15086cat >>conftest.$ac_ext <<_ACEOF
15087/* end confdefs.h. */
98418dba 15088#include <$ac_header>
503d2be0 15089_ACEOF
ca81d7a0
JD
15090if { (ac_try="$ac_cpp conftest.$ac_ext"
15091case "(($ac_try" in
15092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15093 *) ac_try_echo=$ac_try;;
15094esac
15095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15096 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15097 ac_status=$?
6bae0ccf 15098 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15099 rm -f conftest.er1
15100 cat conftest.err >&5
c0d27fcc 15101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15102 (exit $ac_status); } >/dev/null && {
15103 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15104 test ! -s conftest.err
15105 }; then
c0d27fcc 15106 ac_header_preproc=yes
98418dba
CW
15107else
15108 echo "$as_me: failed program was:" >&5
19650fd6
AS
15109sed 's/^/| /' conftest.$ac_ext >&5
15110
c0d27fcc 15111 ac_header_preproc=no
503d2be0 15112fi
ca81d7a0 15113
98418dba 15114rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15115{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15116echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15117
15118# So? What about this header?
edfaf76d
LK
15119case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15120 yes:no: )
c0d27fcc
MR
15121 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15122echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15123 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15124echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15125 ac_header_preproc=yes
19650fd6 15126 ;;
edfaf76d 15127 no:yes:* )
c0d27fcc
MR
15128 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15129echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15130 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15131echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15132 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15133echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15134 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15135echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15136 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15137echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15138 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15139echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15140
19650fd6 15141 ;;
c0d27fcc 15142esac
ca81d7a0
JD
15143{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15144echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15145if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15146 echo $ECHO_N "(cached) $ECHO_C" >&6
15147else
edfaf76d 15148 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 15149fi
ca81d7a0
JD
15150ac_res=`eval echo '${'$as_ac_Header'}'`
15151 { echo "$as_me:$LINENO: result: $ac_res" >&5
15152echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15153
15154fi
98418dba 15155if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15156 cat >>confdefs.h <<_ACEOF
98418dba 15157#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15158_ACEOF
48d4b120 15159
ba4481b5 15160fi
c0d27fcc 15161
98418dba
CW
15162done
15163
c0d27fcc
MR
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
22044edf
DL
15219
15220
c0d27fcc 15221
b0e44248
RB
15222
15223
973a76b1
DL
15224
15225
15226
cd958eb3 15227
25ca0bca 15228
ea92fc9f 15229
e2fcf543 15230
190956b3 15231
c0d27fcc
MR
15232
15233
98418dba 15234for ac_func in gethostname getdomainname dup2 \
e2fcf543 15235rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
98418dba
CW
15236random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
15237strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 15238utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
15239__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
15240sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 15241gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
4489ece2 15242memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
15243do
15244as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15245{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15246echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15247if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15248 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15249else
503d2be0 15250 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15251/* confdefs.h. */
15252_ACEOF
15253cat confdefs.h >>conftest.$ac_ext
15254cat >>conftest.$ac_ext <<_ACEOF
15255/* end confdefs.h. */
edfaf76d
LK
15256/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15257 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15258#define $ac_func innocuous_$ac_func
15259
98418dba 15260/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15261 which can conflict with char $ac_func (); below.
15262 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15263 <limits.h> exists even on freestanding compilers. */
edfaf76d 15264
19650fd6
AS
15265#ifdef __STDC__
15266# include <limits.h>
15267#else
15268# include <assert.h>
15269#endif
edfaf76d
LK
15270
15271#undef $ac_func
15272
ca81d7a0
JD
15273/* Override any GCC internal prototype to avoid an error.
15274 Use char because int might match the return type of a GCC
15275 builtin and then its argument prototype would still apply. */
503d2be0
AS
15276#ifdef __cplusplus
15277extern "C"
15278#endif
98418dba 15279char $ac_func ();
98418dba
CW
15280/* The GNU C library defines this for functions which it implements
15281 to always fail with ENOSYS. Some functions are actually named
15282 something starting with __ and the normal name is an alias. */
ca81d7a0 15283#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15284choke me
98418dba
CW
15285#endif
15286
19650fd6
AS
15287int
15288main ()
15289{
ca81d7a0 15290return $ac_func ();
503d2be0
AS
15291 ;
15292 return 0;
15293}
15294_ACEOF
15295rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15296if { (ac_try="$ac_link"
15297case "(($ac_try" in
15298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15299 *) ac_try_echo=$ac_try;;
15300esac
15301eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15302 (eval "$ac_link") 2>conftest.er1
503d2be0 15303 ac_status=$?
edfaf76d
LK
15304 grep -v '^ *+' conftest.er1 >conftest.err
15305 rm -f conftest.er1
15306 cat conftest.err >&5
c0d27fcc 15307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15308 (exit $ac_status); } && {
15309 test -z "$ac_c_werror_flag" ||
15310 test ! -s conftest.err
15311 } && test -s conftest$ac_exeext &&
15312 $as_test_x conftest$ac_exeext; then
98418dba 15313 eval "$as_ac_var=yes"
503d2be0
AS
15314else
15315 echo "$as_me: failed program was:" >&5
19650fd6
AS
15316sed 's/^/| /' conftest.$ac_ext >&5
15317
ca81d7a0 15318 eval "$as_ac_var=no"
503d2be0 15319fi
ca81d7a0 15320
f053c89f 15321rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15322 conftest$ac_exeext conftest.$ac_ext
ba4481b5 15323fi
ca81d7a0
JD
15324ac_res=`eval echo '${'$as_ac_var'}'`
15325 { echo "$as_me:$LINENO: result: $ac_res" >&5
15326echo "${ECHO_T}$ac_res" >&6; }
98418dba 15327if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15328 cat >>confdefs.h <<_ACEOF
98418dba 15329#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15330_ACEOF
ba4481b5 15331
ba4481b5 15332fi
98418dba 15333done
ba4481b5 15334
c0d27fcc
MR
15335
15336
98418dba
CW
15337for ac_header in sys/un.h
15338do
15339as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15340if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15341 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15342echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15343if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 15344 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15345fi
ca81d7a0
JD
15346ac_res=`eval echo '${'$as_ac_Header'}'`
15347 { echo "$as_me:$LINENO: result: $ac_res" >&5
15348echo "${ECHO_T}$ac_res" >&6; }
98418dba 15349else
c0d27fcc 15350 # Is the header compilable?
ca81d7a0
JD
15351{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15352echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15353cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15354/* confdefs.h. */
15355_ACEOF
15356cat confdefs.h >>conftest.$ac_ext
15357cat >>conftest.$ac_ext <<_ACEOF
15358/* end confdefs.h. */
c0d27fcc
MR
15359$ac_includes_default
15360#include <$ac_header>
15361_ACEOF
15362rm -f conftest.$ac_objext
ca81d7a0
JD
15363if { (ac_try="$ac_compile"
15364case "(($ac_try" in
15365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15366 *) ac_try_echo=$ac_try;;
15367esac
15368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15369 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15370 ac_status=$?
edfaf76d
LK
15371 grep -v '^ *+' conftest.er1 >conftest.err
15372 rm -f conftest.er1
15373 cat conftest.err >&5
c0d27fcc 15374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15375 (exit $ac_status); } && {
15376 test -z "$ac_c_werror_flag" ||
15377 test ! -s conftest.err
15378 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15379 ac_header_compiler=yes
15380else
15381 echo "$as_me: failed program was:" >&5
19650fd6
AS
15382sed 's/^/| /' conftest.$ac_ext >&5
15383
ca81d7a0 15384 ac_header_compiler=no
c0d27fcc 15385fi
ca81d7a0
JD
15386
15387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15388{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15389echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15390
15391# Is the header present?
ca81d7a0
JD
15392{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15393echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15394cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15395/* confdefs.h. */
15396_ACEOF
15397cat confdefs.h >>conftest.$ac_ext
15398cat >>conftest.$ac_ext <<_ACEOF
15399/* end confdefs.h. */
98418dba 15400#include <$ac_header>
503d2be0 15401_ACEOF
ca81d7a0
JD
15402if { (ac_try="$ac_cpp conftest.$ac_ext"
15403case "(($ac_try" in
15404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15405 *) ac_try_echo=$ac_try;;
15406esac
15407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15408 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15409 ac_status=$?
6bae0ccf 15410 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15411 rm -f conftest.er1
15412 cat conftest.err >&5
c0d27fcc 15413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15414 (exit $ac_status); } >/dev/null && {
15415 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15416 test ! -s conftest.err
15417 }; then
c0d27fcc 15418 ac_header_preproc=yes
ba4481b5 15419else
503d2be0 15420 echo "$as_me: failed program was:" >&5
19650fd6
AS
15421sed 's/^/| /' conftest.$ac_ext >&5
15422
c0d27fcc 15423 ac_header_preproc=no
ba4481b5 15424fi
ca81d7a0 15425
503d2be0 15426rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15427{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15428echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15429
15430# So? What about this header?
edfaf76d
LK
15431case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15432 yes:no: )
c0d27fcc
MR
15433 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15434echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15435 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15436echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15437 ac_header_preproc=yes
19650fd6 15438 ;;
edfaf76d 15439 no:yes:* )
c0d27fcc
MR
15440 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15441echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15442 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15443echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15444 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15445echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15446 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15447echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15448 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15449echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15450 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15451echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15452
19650fd6 15453 ;;
c0d27fcc 15454esac
ca81d7a0
JD
15455{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15456echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15457if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15458 echo $ECHO_N "(cached) $ECHO_C" >&6
15459else
edfaf76d 15460 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 15461fi
ca81d7a0
JD
15462ac_res=`eval echo '${'$as_ac_Header'}'`
15463 { echo "$as_me:$LINENO: result: $ac_res" >&5
15464echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15465
15466fi
925c2f3f 15467if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15468 cat >>confdefs.h <<_ACEOF
925c2f3f 15469#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15470_ACEOF
503d2be0 15471
925c2f3f 15472fi
c0d27fcc 15473
925c2f3f
EZ
15474done
15475
c0d27fcc
MR
15476
15477
15478
edfaf76d 15479
f053c89f
CY
15480
15481for ac_header in $ac_header_list
925c2f3f
EZ
15482do
15483as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15484if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15485 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15486echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15487if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 15488 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15489fi
ca81d7a0
JD
15490ac_res=`eval echo '${'$as_ac_Header'}'`
15491 { echo "$as_me:$LINENO: result: $ac_res" >&5
15492echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 15493else
c0d27fcc 15494 # Is the header compilable?
ca81d7a0
JD
15495{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15496echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15497cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15498/* confdefs.h. */
15499_ACEOF
15500cat confdefs.h >>conftest.$ac_ext
15501cat >>conftest.$ac_ext <<_ACEOF
15502/* end confdefs.h. */
c0d27fcc
MR
15503$ac_includes_default
15504#include <$ac_header>
15505_ACEOF
15506rm -f conftest.$ac_objext
ca81d7a0
JD
15507if { (ac_try="$ac_compile"
15508case "(($ac_try" in
15509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15510 *) ac_try_echo=$ac_try;;
15511esac
15512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15513 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15514 ac_status=$?
edfaf76d
LK
15515 grep -v '^ *+' conftest.er1 >conftest.err
15516 rm -f conftest.er1
15517 cat conftest.err >&5
c0d27fcc 15518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15519 (exit $ac_status); } && {
15520 test -z "$ac_c_werror_flag" ||
15521 test ! -s conftest.err
15522 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15523 ac_header_compiler=yes
15524else
15525 echo "$as_me: failed program was:" >&5
19650fd6
AS
15526sed 's/^/| /' conftest.$ac_ext >&5
15527
ca81d7a0 15528 ac_header_compiler=no
c0d27fcc 15529fi
ca81d7a0
JD
15530
15531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15532{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15533echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15534
15535# Is the header present?
ca81d7a0
JD
15536{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15537echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15538cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15539/* confdefs.h. */
15540_ACEOF
15541cat confdefs.h >>conftest.$ac_ext
15542cat >>conftest.$ac_ext <<_ACEOF
15543/* end confdefs.h. */
98418dba 15544#include <$ac_header>
503d2be0 15545_ACEOF
ca81d7a0
JD
15546if { (ac_try="$ac_cpp conftest.$ac_ext"
15547case "(($ac_try" in
15548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15549 *) ac_try_echo=$ac_try;;
15550esac
15551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15552 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15553 ac_status=$?
6bae0ccf 15554 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15555 rm -f conftest.er1
15556 cat conftest.err >&5
c0d27fcc 15557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15558 (exit $ac_status); } >/dev/null && {
15559 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15560 test ! -s conftest.err
15561 }; then
c0d27fcc 15562 ac_header_preproc=yes
98418dba
CW
15563else
15564 echo "$as_me: failed program was:" >&5
19650fd6
AS
15565sed 's/^/| /' conftest.$ac_ext >&5
15566
c0d27fcc 15567 ac_header_preproc=no
98418dba 15568fi
ca81d7a0 15569
98418dba 15570rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15571{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15572echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15573
15574# So? What about this header?
edfaf76d
LK
15575case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15576 yes:no: )
c0d27fcc
MR
15577 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15578echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15579 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15580echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15581 ac_header_preproc=yes
19650fd6 15582 ;;
edfaf76d 15583 no:yes:* )
c0d27fcc
MR
15584 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15585echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15586 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15587echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15588 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15589echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15590 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15591echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15592 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15593echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15594 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15595echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15596
19650fd6 15597 ;;
c0d27fcc 15598esac
ca81d7a0
JD
15599{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15600echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15601if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15602 echo $ECHO_N "(cached) $ECHO_C" >&6
15603else
edfaf76d 15604 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 15605fi
ca81d7a0
JD
15606ac_res=`eval echo '${'$as_ac_Header'}'`
15607 { echo "$as_me:$LINENO: result: $ac_res" >&5
15608echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15609
15610fi
98418dba 15611if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15612 cat >>confdefs.h <<_ACEOF
98418dba 15613#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15614_ACEOF
98418dba
CW
15615
15616fi
c0d27fcc 15617
98418dba
CW
15618done
15619
c0d27fcc 15620
f053c89f
CY
15621
15622
15623
15624
15625
15626
15627
15628for ac_func in $ac_func_list
98418dba
CW
15629do
15630as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15631{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15632echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15633if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15634 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15635else
98418dba 15636 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15637/* confdefs.h. */
15638_ACEOF
15639cat confdefs.h >>conftest.$ac_ext
15640cat >>conftest.$ac_ext <<_ACEOF
15641/* end confdefs.h. */
edfaf76d
LK
15642/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15643 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15644#define $ac_func innocuous_$ac_func
15645
98418dba 15646/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15647 which can conflict with char $ac_func (); below.
15648 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15649 <limits.h> exists even on freestanding compilers. */
edfaf76d 15650
19650fd6
AS
15651#ifdef __STDC__
15652# include <limits.h>
15653#else
15654# include <assert.h>
15655#endif
edfaf76d
LK
15656
15657#undef $ac_func
15658
ca81d7a0
JD
15659/* Override any GCC internal prototype to avoid an error.
15660 Use char because int might match the return type of a GCC
15661 builtin and then its argument prototype would still apply. */
503d2be0
AS
15662#ifdef __cplusplus
15663extern "C"
15664#endif
98418dba 15665char $ac_func ();
98418dba
CW
15666/* The GNU C library defines this for functions which it implements
15667 to always fail with ENOSYS. Some functions are actually named
15668 something starting with __ and the normal name is an alias. */
ca81d7a0 15669#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15670choke me
98418dba
CW
15671#endif
15672
19650fd6
AS
15673int
15674main ()
15675{
ca81d7a0 15676return $ac_func ();
503d2be0
AS
15677 ;
15678 return 0;
15679}
15680_ACEOF
15681rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15682if { (ac_try="$ac_link"
15683case "(($ac_try" in
15684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15685 *) ac_try_echo=$ac_try;;
15686esac
15687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15688 (eval "$ac_link") 2>conftest.er1
503d2be0 15689 ac_status=$?
edfaf76d
LK
15690 grep -v '^ *+' conftest.er1 >conftest.err
15691 rm -f conftest.er1
15692 cat conftest.err >&5
c0d27fcc 15693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15694 (exit $ac_status); } && {
15695 test -z "$ac_c_werror_flag" ||
15696 test ! -s conftest.err
15697 } && test -s conftest$ac_exeext &&
15698 $as_test_x conftest$ac_exeext; then
98418dba 15699 eval "$as_ac_var=yes"
503d2be0
AS
15700else
15701 echo "$as_me: failed program was:" >&5
19650fd6
AS
15702sed 's/^/| /' conftest.$ac_ext >&5
15703
ca81d7a0 15704 eval "$as_ac_var=no"
503d2be0 15705fi
ca81d7a0 15706
f053c89f 15707rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15708 conftest$ac_exeext conftest.$ac_ext
ffe36136 15709fi
ca81d7a0
JD
15710ac_res=`eval echo '${'$as_ac_var'}'`
15711 { echo "$as_me:$LINENO: result: $ac_res" >&5
15712echo "${ECHO_T}$ac_res" >&6; }
98418dba 15713if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15714 cat >>confdefs.h <<_ACEOF
98418dba 15715#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15716_ACEOF
ffe36136 15717
ba4481b5 15718fi
98418dba 15719done
ba4481b5 15720
f053c89f
CY
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
ca81d7a0
JD
15737{ echo "$as_me:$LINENO: checking for working mktime" >&5
15738echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
15739if test "${ac_cv_func_working_mktime+set}" = set; then
15740 echo $ECHO_N "(cached) $ECHO_C" >&6
15741else
15742 if test "$cross_compiling" = yes; then
15743 ac_cv_func_working_mktime=no
15744else
15745 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15746/* confdefs.h. */
15747_ACEOF
15748cat confdefs.h >>conftest.$ac_ext
15749cat >>conftest.$ac_ext <<_ACEOF
15750/* end confdefs.h. */
98418dba 15751/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 15752#ifdef TIME_WITH_SYS_TIME
98418dba
CW
15753# include <sys/time.h>
15754# include <time.h>
15755#else
f053c89f 15756# ifdef HAVE_SYS_TIME_H
98418dba
CW
15757# include <sys/time.h>
15758# else
15759# include <time.h>
15760# endif
15761#endif
ba4481b5 15762
f053c89f 15763#include <stdlib.h>
edfaf76d 15764
f053c89f 15765#ifdef HAVE_UNISTD_H
98418dba
CW
15766# include <unistd.h>
15767#endif
ba4481b5 15768
f053c89f 15769#ifndef HAVE_ALARM
98418dba
CW
15770# define alarm(X) /* empty */
15771#endif
df645f7c 15772
98418dba
CW
15773/* Work around redefinition to rpl_putenv by other config tests. */
15774#undef putenv
df645f7c 15775
98418dba 15776static time_t time_t_max;
edfaf76d 15777static time_t time_t_min;
df645f7c 15778
98418dba 15779/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
15780static char *tz_strings[] = {
15781 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
15782 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
15783};
15784#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 15785
ca81d7a0 15786/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 15787 Based on a problem report from Andreas Jaeger. */
ca81d7a0 15788static int
98418dba
CW
15789spring_forward_gap ()
15790{
15791 /* glibc (up to about 1998-10-07) failed this test. */
15792 struct tm tm;
15793
15794 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
15795 instead of "TZ=America/Vancouver" in order to detect the bug even
15796 on systems that don't support the Olson extension, or don't have the
15797 full zoneinfo tables installed. */
15798 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
15799
15800 tm.tm_year = 98;
15801 tm.tm_mon = 3;
15802 tm.tm_mday = 5;
15803 tm.tm_hour = 2;
15804 tm.tm_min = 0;
15805 tm.tm_sec = 0;
15806 tm.tm_isdst = -1;
ca81d7a0 15807 return mktime (&tm) != (time_t) -1;
98418dba
CW
15808}
15809
ca81d7a0 15810static int
edfaf76d 15811mktime_test1 (now)
98418dba
CW
15812 time_t now;
15813{
15814 struct tm *lt;
ca81d7a0 15815 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
15816}
15817
ca81d7a0 15818static int
edfaf76d
LK
15819mktime_test (now)
15820 time_t now;
15821{
ca81d7a0
JD
15822 return (mktime_test1 (now)
15823 && mktime_test1 ((time_t) (time_t_max - now))
15824 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
15825}
15826
ca81d7a0 15827static int
98418dba
CW
15828irix_6_4_bug ()
15829{
15830 /* Based on code from Ariel Faigon. */
15831 struct tm tm;
15832 tm.tm_year = 96;
15833 tm.tm_mon = 3;
15834 tm.tm_mday = 0;
15835 tm.tm_hour = 0;
15836 tm.tm_min = 0;
15837 tm.tm_sec = 0;
15838 tm.tm_isdst = -1;
15839 mktime (&tm);
ca81d7a0 15840 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
15841}
15842
ca81d7a0 15843static int
98418dba
CW
15844bigtime_test (j)
15845 int j;
15846{
15847 struct tm tm;
15848 time_t now;
15849 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
15850 now = mktime (&tm);
15851 if (now != (time_t) -1)
15852 {
15853 struct tm *lt = localtime (&now);
15854 if (! (lt
15855 && lt->tm_year == tm.tm_year
15856 && lt->tm_mon == tm.tm_mon
15857 && lt->tm_mday == tm.tm_mday
15858 && lt->tm_hour == tm.tm_hour
15859 && lt->tm_min == tm.tm_min
15860 && lt->tm_sec == tm.tm_sec
15861 && lt->tm_yday == tm.tm_yday
15862 && lt->tm_wday == tm.tm_wday
15863 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
15864 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 15865 return 0;
98418dba 15866 }
ca81d7a0 15867 return 1;
98418dba
CW
15868}
15869
f053c89f
CY
15870static int
15871year_2050_test ()
15872{
15873 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
15874 ignoring leap seconds. */
15875 unsigned long int answer = 2527315200UL;
15876
15877 struct tm tm;
15878 time_t t;
15879 tm.tm_year = 2050 - 1900;
15880 tm.tm_mon = 2 - 1;
15881 tm.tm_mday = 1;
15882 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
15883 tm.tm_isdst = -1;
15884
15885 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
15886 instead of "TZ=America/Vancouver" in order to detect the bug even
15887 on systems that don't support the Olson extension, or don't have the
15888 full zoneinfo tables installed. */
15889 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
15890
15891 t = mktime (&tm);
15892
15893 /* Check that the result is either a failure, or close enough
15894 to the correct answer that we can assume the discrepancy is
15895 due to leap seconds. */
15896 return (t == (time_t) -1
15897 || (0 < t && answer - 120 <= t && t <= answer + 120));
15898}
15899
98418dba
CW
15900int
15901main ()
15902{
15903 time_t t, delta;
15904 int i, j;
15905
15906 /* This test makes some buggy mktime implementations loop.
15907 Give up after 60 seconds; a mktime slower than that
15908 isn't worth using anyway. */
15909 alarm (60);
15910
15911 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
15912 continue;
15913 time_t_max--;
edfaf76d
LK
15914 if ((time_t) -1 < 0)
15915 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
15916 continue;
98418dba
CW
15917 delta = time_t_max / 997; /* a suitable prime number */
15918 for (i = 0; i < N_STRINGS; i++)
15919 {
15920 if (tz_strings[i])
15921 putenv (tz_strings[i]);
503d2be0 15922
98418dba 15923 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
15924 if (! mktime_test (t))
15925 return 1;
15926 if (! (mktime_test ((time_t) 1)
15927 && mktime_test ((time_t) (60 * 60))
15928 && mktime_test ((time_t) (60 * 60 * 24))))
15929 return 1;
98418dba
CW
15930
15931 for (j = 1; 0 < j; j *= 2)
ca81d7a0
JD
15932 if (! bigtime_test (j))
15933 return 1;
15934 if (! bigtime_test (j - 1))
15935 return 1;
98418dba 15936 }
f053c89f 15937 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
15938}
15939_ACEOF
98418dba 15940rm -f conftest$ac_exeext
ca81d7a0
JD
15941if { (ac_try="$ac_link"
15942case "(($ac_try" in
15943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15944 *) ac_try_echo=$ac_try;;
15945esac
15946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15947 (eval "$ac_link") 2>&5
503d2be0 15948 ac_status=$?
c0d27fcc 15949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15950 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
15951 { (case "(($ac_try" in
15952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15953 *) ac_try_echo=$ac_try;;
15954esac
15955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15956 (eval "$ac_try") 2>&5
503d2be0 15957 ac_status=$?
c0d27fcc 15958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15959 (exit $ac_status); }; }; then
98418dba 15960 ac_cv_func_working_mktime=yes
503d2be0 15961else
98418dba
CW
15962 echo "$as_me: program exited with status $ac_status" >&5
15963echo "$as_me: failed program was:" >&5
19650fd6
AS
15964sed 's/^/| /' conftest.$ac_ext >&5
15965
c0d27fcc 15966( exit $ac_status )
98418dba 15967ac_cv_func_working_mktime=no
503d2be0 15968fi
ca81d7a0 15969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 15970fi
ca81d7a0
JD
15971
15972
ba4481b5 15973fi
ca81d7a0
JD
15974{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
15975echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 15976if test $ac_cv_func_working_mktime = no; then
ca81d7a0 15977 case " $LIBOBJS " in
edfaf76d 15978 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
15979 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
15980 ;;
edfaf76d
LK
15981esac
15982
ba4481b5
DL
15983fi
15984
98418dba 15985if test "$ac_cv_func_working_mktime" = no; then
b936fae4 15986
c0d27fcc 15987cat >>confdefs.h <<\_ACEOF
98418dba 15988#define BROKEN_MKTIME 1
c0d27fcc 15989_ACEOF
ba4481b5 15990
ba4481b5 15991fi
503d2be0 15992
98418dba
CW
15993ac_have_func=no # yes means we've found a way to get the load average.
15994
6bae0ccf
DL
15995# Make sure getloadavg.c is where it belongs, at configure-time.
15996test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
15997 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
15998echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
15999 { (exit 1); exit 1; }; }
16000
98418dba
CW
16001ac_save_LIBS=$LIBS
16002
16003# Check for getloadavg, but be sure not to touch the cache variable.
ca81d7a0
JD
16004({ echo "$as_me:$LINENO: checking for getloadavg" >&5
16005echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 16006if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 16007 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16008else
503d2be0 16009 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16010/* confdefs.h. */
16011_ACEOF
16012cat confdefs.h >>conftest.$ac_ext
16013cat >>conftest.$ac_ext <<_ACEOF
16014/* end confdefs.h. */
edfaf76d
LK
16015/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
16016 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16017#define getloadavg innocuous_getloadavg
16018
98418dba 16019/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16020 which can conflict with char getloadavg (); below.
16021 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16022 <limits.h> exists even on freestanding compilers. */
edfaf76d 16023
19650fd6
AS
16024#ifdef __STDC__
16025# include <limits.h>
16026#else
16027# include <assert.h>
16028#endif
edfaf76d
LK
16029
16030#undef getloadavg
16031
ca81d7a0
JD
16032/* Override any GCC internal prototype to avoid an error.
16033 Use char because int might match the return type of a GCC
16034 builtin and then its argument prototype would still apply. */
503d2be0
AS
16035#ifdef __cplusplus
16036extern "C"
16037#endif
98418dba 16038char getloadavg ();
98418dba
CW
16039/* The GNU C library defines this for functions which it implements
16040 to always fail with ENOSYS. Some functions are actually named
16041 something starting with __ and the normal name is an alias. */
ca81d7a0 16042#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 16043choke me
cd958eb3
MB
16044#endif
16045
19650fd6
AS
16046int
16047main ()
16048{
ca81d7a0 16049return getloadavg ();
503d2be0
AS
16050 ;
16051 return 0;
16052}
16053_ACEOF
16054rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16055if { (ac_try="$ac_link"
16056case "(($ac_try" in
16057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16058 *) ac_try_echo=$ac_try;;
16059esac
16060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16061 (eval "$ac_link") 2>conftest.er1
503d2be0 16062 ac_status=$?
edfaf76d
LK
16063 grep -v '^ *+' conftest.er1 >conftest.err
16064 rm -f conftest.er1
16065 cat conftest.err >&5
c0d27fcc 16066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16067 (exit $ac_status); } && {
16068 test -z "$ac_c_werror_flag" ||
16069 test ! -s conftest.err
16070 } && test -s conftest$ac_exeext &&
16071 $as_test_x conftest$ac_exeext; then
98418dba 16072 ac_cv_func_getloadavg=yes
503d2be0
AS
16073else
16074 echo "$as_me: failed program was:" >&5
19650fd6
AS
16075sed 's/^/| /' conftest.$ac_ext >&5
16076
ca81d7a0 16077 ac_cv_func_getloadavg=no
503d2be0 16078fi
ca81d7a0 16079
f053c89f 16080rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16081 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16082fi
ca81d7a0
JD
16083{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
16084echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
16085if test $ac_cv_func_getloadavg = yes; then
16086 exit 0
16087else
16088 exit 1
ba4481b5 16089fi
98418dba 16090) && ac_have_func=yes
ba4481b5 16091
98418dba 16092# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 16093
98418dba
CW
16094for ac_func in pstat_getdynamic
16095do
16096as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16097{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16098echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16099if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16100 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16101else
503d2be0 16102 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16103/* confdefs.h. */
16104_ACEOF
16105cat confdefs.h >>conftest.$ac_ext
16106cat >>conftest.$ac_ext <<_ACEOF
16107/* end confdefs.h. */
edfaf76d
LK
16108/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16109 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16110#define $ac_func innocuous_$ac_func
16111
98418dba 16112/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16113 which can conflict with char $ac_func (); below.
16114 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16115 <limits.h> exists even on freestanding compilers. */
edfaf76d 16116
19650fd6
AS
16117#ifdef __STDC__
16118# include <limits.h>
16119#else
16120# include <assert.h>
16121#endif
edfaf76d
LK
16122
16123#undef $ac_func
16124
ca81d7a0
JD
16125/* Override any GCC internal prototype to avoid an error.
16126 Use char because int might match the return type of a GCC
16127 builtin and then its argument prototype would still apply. */
503d2be0
AS
16128#ifdef __cplusplus
16129extern "C"
16130#endif
98418dba 16131char $ac_func ();
98418dba
CW
16132/* The GNU C library defines this for functions which it implements
16133 to always fail with ENOSYS. Some functions are actually named
16134 something starting with __ and the normal name is an alias. */
ca81d7a0 16135#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16136choke me
98418dba
CW
16137#endif
16138
19650fd6
AS
16139int
16140main ()
16141{
ca81d7a0 16142return $ac_func ();
98418dba
CW
16143 ;
16144 return 0;
16145}
f21fadcc 16146_ACEOF
98418dba 16147rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16148if { (ac_try="$ac_link"
16149case "(($ac_try" in
16150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16151 *) ac_try_echo=$ac_try;;
16152esac
16153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16154 (eval "$ac_link") 2>conftest.er1
f21fadcc 16155 ac_status=$?
edfaf76d
LK
16156 grep -v '^ *+' conftest.er1 >conftest.err
16157 rm -f conftest.er1
16158 cat conftest.err >&5
c0d27fcc 16159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16160 (exit $ac_status); } && {
16161 test -z "$ac_c_werror_flag" ||
16162 test ! -s conftest.err
16163 } && test -s conftest$ac_exeext &&
16164 $as_test_x conftest$ac_exeext; then
98418dba 16165 eval "$as_ac_var=yes"
f21fadcc
JD
16166else
16167 echo "$as_me: failed program was:" >&5
19650fd6
AS
16168sed 's/^/| /' conftest.$ac_ext >&5
16169
ca81d7a0 16170 eval "$as_ac_var=no"
f21fadcc 16171fi
ca81d7a0 16172
f053c89f 16173rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16174 conftest$ac_exeext conftest.$ac_ext
f21fadcc 16175fi
ca81d7a0
JD
16176ac_res=`eval echo '${'$as_ac_var'}'`
16177 { echo "$as_me:$LINENO: result: $ac_res" >&5
16178echo "${ECHO_T}$ac_res" >&6; }
98418dba 16179if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16180 cat >>confdefs.h <<_ACEOF
98418dba 16181#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16182_ACEOF
98418dba
CW
16183
16184fi
16185done
16186
c0d27fcc 16187
98418dba
CW
16188# Solaris has libkstat which does not require root.
16189
ca81d7a0
JD
16190{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
16191echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 16192if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
16193 echo $ECHO_N "(cached) $ECHO_C" >&6
16194else
16195 ac_check_lib_save_LIBS=$LIBS
98418dba 16196LIBS="-lkstat $LIBS"
f21fadcc 16197cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16198/* confdefs.h. */
16199_ACEOF
16200cat confdefs.h >>conftest.$ac_ext
16201cat >>conftest.$ac_ext <<_ACEOF
16202/* end confdefs.h. */
f21fadcc 16203
ca81d7a0
JD
16204/* Override any GCC internal prototype to avoid an error.
16205 Use char because int might match the return type of a GCC
16206 builtin and then its argument prototype would still apply. */
f21fadcc
JD
16207#ifdef __cplusplus
16208extern "C"
16209#endif
98418dba 16210char kstat_open ();
f21fadcc
JD
16211int
16212main ()
16213{
ca81d7a0 16214return kstat_open ();
f21fadcc
JD
16215 ;
16216 return 0;
16217}
16218_ACEOF
16219rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16220if { (ac_try="$ac_link"
16221case "(($ac_try" in
16222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16223 *) ac_try_echo=$ac_try;;
16224esac
16225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16226 (eval "$ac_link") 2>conftest.er1
f21fadcc 16227 ac_status=$?
edfaf76d
LK
16228 grep -v '^ *+' conftest.er1 >conftest.err
16229 rm -f conftest.er1
16230 cat conftest.err >&5
c0d27fcc 16231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16232 (exit $ac_status); } && {
16233 test -z "$ac_c_werror_flag" ||
16234 test ! -s conftest.err
16235 } && test -s conftest$ac_exeext &&
16236 $as_test_x conftest$ac_exeext; then
98418dba 16237 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
16238else
16239 echo "$as_me: failed program was:" >&5
19650fd6
AS
16240sed 's/^/| /' conftest.$ac_ext >&5
16241
ca81d7a0 16242 ac_cv_lib_kstat_kstat_open=no
f21fadcc 16243fi
ca81d7a0 16244
f053c89f 16245rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16246 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
16247LIBS=$ac_check_lib_save_LIBS
16248fi
ca81d7a0
JD
16249{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
16250echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 16251if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 16252 cat >>confdefs.h <<_ACEOF
98418dba 16253#define HAVE_LIBKSTAT 1
c0d27fcc 16254_ACEOF
f21fadcc 16255
98418dba 16256 LIBS="-lkstat $LIBS"
f21fadcc 16257
f21fadcc
JD
16258fi
16259
98418dba
CW
16260test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
16261
16262# Some systems with -lutil have (and need) -lkvm as well, some do not.
16263# On Solaris, -lkvm requires nlist from -lelf, so check that first
16264# to get the right answer into the cache.
16265# For kstat on solaris, we need libelf to force the definition of SVR4 below.
16266if test $ac_have_func = no; then
ca81d7a0
JD
16267 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
16268echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 16269if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 16270 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16271else
98418dba
CW
16272 ac_check_lib_save_LIBS=$LIBS
16273LIBS="-lelf $LIBS"
16274cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16275/* confdefs.h. */
16276_ACEOF
16277cat confdefs.h >>conftest.$ac_ext
16278cat >>conftest.$ac_ext <<_ACEOF
16279/* end confdefs.h. */
98418dba 16280
ca81d7a0
JD
16281/* Override any GCC internal prototype to avoid an error.
16282 Use char because int might match the return type of a GCC
16283 builtin and then its argument prototype would still apply. */
98418dba
CW
16284#ifdef __cplusplus
16285extern "C"
16286#endif
98418dba 16287char elf_begin ();
503d2be0
AS
16288int
16289main ()
16290{
ca81d7a0 16291return elf_begin ();
503d2be0
AS
16292 ;
16293 return 0;
16294}
16295_ACEOF
16296rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16297if { (ac_try="$ac_link"
16298case "(($ac_try" in
16299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16300 *) ac_try_echo=$ac_try;;
16301esac
16302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16303 (eval "$ac_link") 2>conftest.er1
503d2be0 16304 ac_status=$?
edfaf76d
LK
16305 grep -v '^ *+' conftest.er1 >conftest.err
16306 rm -f conftest.er1
16307 cat conftest.err >&5
c0d27fcc 16308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16309 (exit $ac_status); } && {
16310 test -z "$ac_c_werror_flag" ||
16311 test ! -s conftest.err
16312 } && test -s conftest$ac_exeext &&
16313 $as_test_x conftest$ac_exeext; then
98418dba 16314 ac_cv_lib_elf_elf_begin=yes
ba4481b5 16315else
503d2be0 16316 echo "$as_me: failed program was:" >&5
19650fd6
AS
16317sed 's/^/| /' conftest.$ac_ext >&5
16318
ca81d7a0 16319 ac_cv_lib_elf_elf_begin=no
ba4481b5 16320fi
ca81d7a0 16321
f053c89f 16322rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16323 conftest$ac_exeext conftest.$ac_ext
98418dba 16324LIBS=$ac_check_lib_save_LIBS
ba4481b5 16325fi
ca81d7a0
JD
16326{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
16327echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
16328if test $ac_cv_lib_elf_elf_begin = yes; then
16329 LIBS="-lelf $LIBS"
ba4481b5
DL
16330fi
16331
98418dba
CW
16332fi
16333if test $ac_have_func = no; then
ca81d7a0
JD
16334 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
16335echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 16336if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 16337 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16338else
98418dba
CW
16339 ac_check_lib_save_LIBS=$LIBS
16340LIBS="-lkvm $LIBS"
16341cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16342/* confdefs.h. */
16343_ACEOF
16344cat confdefs.h >>conftest.$ac_ext
16345cat >>conftest.$ac_ext <<_ACEOF
16346/* end confdefs.h. */
98418dba 16347
ca81d7a0
JD
16348/* Override any GCC internal prototype to avoid an error.
16349 Use char because int might match the return type of a GCC
16350 builtin and then its argument prototype would still apply. */
98418dba
CW
16351#ifdef __cplusplus
16352extern "C"
16353#endif
98418dba 16354char kvm_open ();
503d2be0
AS
16355int
16356main ()
16357{
ca81d7a0 16358return kvm_open ();
503d2be0
AS
16359 ;
16360 return 0;
16361}
16362_ACEOF
16363rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16364if { (ac_try="$ac_link"
16365case "(($ac_try" in
16366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16367 *) ac_try_echo=$ac_try;;
16368esac
16369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16370 (eval "$ac_link") 2>conftest.er1
503d2be0 16371 ac_status=$?
edfaf76d
LK
16372 grep -v '^ *+' conftest.er1 >conftest.err
16373 rm -f conftest.er1
16374 cat conftest.err >&5
c0d27fcc 16375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16376 (exit $ac_status); } && {
16377 test -z "$ac_c_werror_flag" ||
16378 test ! -s conftest.err
16379 } && test -s conftest$ac_exeext &&
16380 $as_test_x conftest$ac_exeext; then
98418dba 16381 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
16382else
16383 echo "$as_me: failed program was:" >&5
19650fd6
AS
16384sed 's/^/| /' conftest.$ac_ext >&5
16385
ca81d7a0 16386 ac_cv_lib_kvm_kvm_open=no
503d2be0 16387fi
ca81d7a0 16388
f053c89f 16389rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16390 conftest$ac_exeext conftest.$ac_ext
98418dba 16391LIBS=$ac_check_lib_save_LIBS
503d2be0 16392fi
ca81d7a0
JD
16393{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
16394echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
16395if test $ac_cv_lib_kvm_kvm_open = yes; then
16396 LIBS="-lkvm $LIBS"
ba4481b5
DL
16397fi
16398
98418dba 16399 # Check for the 4.4BSD definition of getloadavg.
ca81d7a0
JD
16400 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
16401echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 16402if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 16403 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16404else
98418dba
CW
16405 ac_check_lib_save_LIBS=$LIBS
16406LIBS="-lutil $LIBS"
16407cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16408/* confdefs.h. */
16409_ACEOF
16410cat confdefs.h >>conftest.$ac_ext
16411cat >>conftest.$ac_ext <<_ACEOF
16412/* end confdefs.h. */
98418dba 16413
ca81d7a0
JD
16414/* Override any GCC internal prototype to avoid an error.
16415 Use char because int might match the return type of a GCC
16416 builtin and then its argument prototype would still apply. */
98418dba
CW
16417#ifdef __cplusplus
16418extern "C"
16419#endif
98418dba 16420char getloadavg ();
503d2be0
AS
16421int
16422main ()
16423{
ca81d7a0 16424return getloadavg ();
503d2be0
AS
16425 ;
16426 return 0;
16427}
16428_ACEOF
16429rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16430if { (ac_try="$ac_link"
16431case "(($ac_try" in
16432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16433 *) ac_try_echo=$ac_try;;
16434esac
16435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16436 (eval "$ac_link") 2>conftest.er1
503d2be0 16437 ac_status=$?
edfaf76d
LK
16438 grep -v '^ *+' conftest.er1 >conftest.err
16439 rm -f conftest.er1
16440 cat conftest.err >&5
c0d27fcc 16441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16442 (exit $ac_status); } && {
16443 test -z "$ac_c_werror_flag" ||
16444 test ! -s conftest.err
16445 } && test -s conftest$ac_exeext &&
16446 $as_test_x conftest$ac_exeext; then
35996d22
AS
16447 ac_cv_lib_util_getloadavg=yes
16448else
503d2be0 16449 echo "$as_me: failed program was:" >&5
19650fd6
AS
16450sed 's/^/| /' conftest.$ac_ext >&5
16451
ca81d7a0 16452 ac_cv_lib_util_getloadavg=no
ba4481b5 16453fi
ca81d7a0 16454
f053c89f 16455rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16456 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
16457LIBS=$ac_check_lib_save_LIBS
16458fi
ca81d7a0
JD
16459{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
16460echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
16461if test $ac_cv_lib_util_getloadavg = yes; then
16462 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 16463fi
503d2be0 16464
98418dba 16465fi
ba4481b5 16466
98418dba
CW
16467if test $ac_have_func = no; then
16468 # There is a commonly available library for RS/6000 AIX.
16469 # Since it is not a standard part of AIX, it might be installed locally.
16470 ac_getloadavg_LIBS=$LIBS
16471 LIBS="-L/usr/local/lib $LIBS"
ca81d7a0
JD
16472 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
16473echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 16474if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 16475 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16476else
98418dba
CW
16477 ac_check_lib_save_LIBS=$LIBS
16478LIBS="-lgetloadavg $LIBS"
16479cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16480/* confdefs.h. */
16481_ACEOF
16482cat confdefs.h >>conftest.$ac_ext
16483cat >>conftest.$ac_ext <<_ACEOF
16484/* end confdefs.h. */
ba4481b5 16485
ca81d7a0
JD
16486/* Override any GCC internal prototype to avoid an error.
16487 Use char because int might match the return type of a GCC
16488 builtin and then its argument prototype would still apply. */
98418dba
CW
16489#ifdef __cplusplus
16490extern "C"
16491#endif
98418dba 16492char getloadavg ();
98418dba
CW
16493int
16494main ()
16495{
ca81d7a0 16496return getloadavg ();
98418dba
CW
16497 ;
16498 return 0;
16499}
503d2be0 16500_ACEOF
98418dba 16501rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16502if { (ac_try="$ac_link"
16503case "(($ac_try" in
16504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16505 *) ac_try_echo=$ac_try;;
16506esac
16507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16508 (eval "$ac_link") 2>conftest.er1
98418dba 16509 ac_status=$?
edfaf76d
LK
16510 grep -v '^ *+' conftest.er1 >conftest.err
16511 rm -f conftest.er1
16512 cat conftest.err >&5
c0d27fcc 16513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16514 (exit $ac_status); } && {
16515 test -z "$ac_c_werror_flag" ||
16516 test ! -s conftest.err
16517 } && test -s conftest$ac_exeext &&
16518 $as_test_x conftest$ac_exeext; then
98418dba 16519 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 16520else
98418dba 16521 echo "$as_me: failed program was:" >&5
19650fd6
AS
16522sed 's/^/| /' conftest.$ac_ext >&5
16523
ca81d7a0 16524 ac_cv_lib_getloadavg_getloadavg=no
98418dba 16525fi
ca81d7a0 16526
f053c89f 16527rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16528 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
16529LIBS=$ac_check_lib_save_LIBS
16530fi
ca81d7a0
JD
16531{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
16532echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
16533if test $ac_cv_lib_getloadavg_getloadavg = yes; then
16534 LIBS="-lgetloadavg $LIBS"
16535else
16536 LIBS=$ac_getloadavg_LIBS
ba4481b5 16537fi
ba4481b5
DL
16538
16539fi
98418dba
CW
16540
16541# Make sure it is really in the library, if we think we found it,
16542# otherwise set up the replacement function.
16543
16544for ac_func in getloadavg
16545do
16546as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16547{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16548echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16549if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16550 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16551else
503d2be0 16552 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16553/* confdefs.h. */
16554_ACEOF
16555cat confdefs.h >>conftest.$ac_ext
16556cat >>conftest.$ac_ext <<_ACEOF
16557/* end confdefs.h. */
edfaf76d
LK
16558/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16559 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16560#define $ac_func innocuous_$ac_func
16561
ba4481b5 16562/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16563 which can conflict with char $ac_func (); below.
16564 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16565 <limits.h> exists even on freestanding compilers. */
edfaf76d 16566
19650fd6
AS
16567#ifdef __STDC__
16568# include <limits.h>
16569#else
16570# include <assert.h>
16571#endif
edfaf76d
LK
16572
16573#undef $ac_func
16574
ca81d7a0
JD
16575/* Override any GCC internal prototype to avoid an error.
16576 Use char because int might match the return type of a GCC
16577 builtin and then its argument prototype would still apply. */
503d2be0
AS
16578#ifdef __cplusplus
16579extern "C"
16580#endif
503d2be0 16581char $ac_func ();
ba4481b5
DL
16582/* The GNU C library defines this for functions which it implements
16583 to always fail with ENOSYS. Some functions are actually named
16584 something starting with __ and the normal name is an alias. */
ca81d7a0 16585#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 16586choke me
cd958eb3
MB
16587#endif
16588
19650fd6
AS
16589int
16590main ()
16591{
ca81d7a0 16592return $ac_func ();
503d2be0
AS
16593 ;
16594 return 0;
16595}
16596_ACEOF
16597rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16598if { (ac_try="$ac_link"
16599case "(($ac_try" in
16600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16601 *) ac_try_echo=$ac_try;;
16602esac
16603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16604 (eval "$ac_link") 2>conftest.er1
503d2be0 16605 ac_status=$?
edfaf76d
LK
16606 grep -v '^ *+' conftest.er1 >conftest.err
16607 rm -f conftest.er1
16608 cat conftest.err >&5
c0d27fcc 16609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16610 (exit $ac_status); } && {
16611 test -z "$ac_c_werror_flag" ||
16612 test ! -s conftest.err
16613 } && test -s conftest$ac_exeext &&
16614 $as_test_x conftest$ac_exeext; then
503d2be0
AS
16615 eval "$as_ac_var=yes"
16616else
16617 echo "$as_me: failed program was:" >&5
19650fd6
AS
16618sed 's/^/| /' conftest.$ac_ext >&5
16619
ca81d7a0 16620 eval "$as_ac_var=no"
503d2be0 16621fi
ca81d7a0 16622
f053c89f 16623rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16624 conftest$ac_exeext conftest.$ac_ext
503d2be0 16625fi
ca81d7a0
JD
16626ac_res=`eval echo '${'$as_ac_var'}'`
16627 { echo "$as_me:$LINENO: result: $ac_res" >&5
16628echo "${ECHO_T}$ac_res" >&6; }
503d2be0 16629if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16630 cat >>confdefs.h <<_ACEOF
98418dba 16631#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16632_ACEOF
503d2be0 16633
98418dba 16634else
ca81d7a0 16635 case " $LIBOBJS " in
edfaf76d 16636 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
16637 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
16638 ;;
edfaf76d
LK
16639esac
16640
ba4481b5 16641
c0d27fcc 16642cat >>confdefs.h <<\_ACEOF
98418dba 16643#define C_GETLOADAVG 1
c0d27fcc 16644_ACEOF
ba4481b5 16645
98418dba
CW
16646# Figure out what our getloadavg.c needs.
16647ac_have_func=no
c0d27fcc 16648if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
ca81d7a0
JD
16649 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
16650echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 16651if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 16652 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16653fi
ca81d7a0
JD
16654{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
16655echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 16656else
c0d27fcc 16657 # Is the header compilable?
ca81d7a0
JD
16658{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
16659echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 16660cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16661/* confdefs.h. */
16662_ACEOF
16663cat confdefs.h >>conftest.$ac_ext
16664cat >>conftest.$ac_ext <<_ACEOF
16665/* end confdefs.h. */
c0d27fcc
MR
16666$ac_includes_default
16667#include <sys/dg_sys_info.h>
16668_ACEOF
16669rm -f conftest.$ac_objext
ca81d7a0
JD
16670if { (ac_try="$ac_compile"
16671case "(($ac_try" in
16672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16673 *) ac_try_echo=$ac_try;;
16674esac
16675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16676 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16677 ac_status=$?
edfaf76d
LK
16678 grep -v '^ *+' conftest.er1 >conftest.err
16679 rm -f conftest.er1
16680 cat conftest.err >&5
c0d27fcc 16681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16682 (exit $ac_status); } && {
16683 test -z "$ac_c_werror_flag" ||
16684 test ! -s conftest.err
16685 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16686 ac_header_compiler=yes
16687else
16688 echo "$as_me: failed program was:" >&5
19650fd6
AS
16689sed 's/^/| /' conftest.$ac_ext >&5
16690
ca81d7a0 16691 ac_header_compiler=no
c0d27fcc 16692fi
ca81d7a0
JD
16693
16694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16695{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16696echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16697
16698# Is the header present?
ca81d7a0
JD
16699{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
16700echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 16701cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16702/* confdefs.h. */
16703_ACEOF
16704cat confdefs.h >>conftest.$ac_ext
16705cat >>conftest.$ac_ext <<_ACEOF
16706/* end confdefs.h. */
98418dba
CW
16707#include <sys/dg_sys_info.h>
16708_ACEOF
ca81d7a0
JD
16709if { (ac_try="$ac_cpp conftest.$ac_ext"
16710case "(($ac_try" in
16711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16712 *) ac_try_echo=$ac_try;;
16713esac
16714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16715 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 16716 ac_status=$?
6bae0ccf 16717 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16718 rm -f conftest.er1
16719 cat conftest.err >&5
c0d27fcc 16720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16721 (exit $ac_status); } >/dev/null && {
16722 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16723 test ! -s conftest.err
16724 }; then
c0d27fcc 16725 ac_header_preproc=yes
98418dba
CW
16726else
16727 echo "$as_me: failed program was:" >&5
19650fd6
AS
16728sed 's/^/| /' conftest.$ac_ext >&5
16729
c0d27fcc 16730 ac_header_preproc=no
ba4481b5 16731fi
ca81d7a0 16732
98418dba 16733rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16734{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16735echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16736
16737# So? What about this header?
edfaf76d
LK
16738case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16739 yes:no: )
c0d27fcc
MR
16740 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
16741echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16742 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
16743echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
16744 ac_header_preproc=yes
19650fd6 16745 ;;
edfaf76d 16746 no:yes:* )
c0d27fcc
MR
16747 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
16748echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16749 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
16750echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
16751 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
16752echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
16753 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
16754echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16755 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 16756echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16757 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
16758echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16759
19650fd6 16760 ;;
c0d27fcc 16761esac
ca81d7a0
JD
16762{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
16763echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
16764if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
16765 echo $ECHO_N "(cached) $ECHO_C" >&6
16766else
16767 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 16768fi
ca81d7a0
JD
16769{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
16770echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
16771
16772fi
98418dba
CW
16773if test $ac_cv_header_sys_dg_sys_info_h = yes; then
16774 ac_have_func=yes
ba4481b5 16775
c0d27fcc 16776cat >>confdefs.h <<\_ACEOF
98418dba 16777#define DGUX 1
c0d27fcc
MR
16778_ACEOF
16779
503d2be0 16780
ca81d7a0
JD
16781{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
16782echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 16783if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 16784 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16785else
503d2be0 16786 ac_check_lib_save_LIBS=$LIBS
98418dba 16787LIBS="-ldgc $LIBS"
503d2be0 16788cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16789/* confdefs.h. */
16790_ACEOF
16791cat confdefs.h >>conftest.$ac_ext
16792cat >>conftest.$ac_ext <<_ACEOF
16793/* end confdefs.h. */
503d2be0 16794
ca81d7a0
JD
16795/* Override any GCC internal prototype to avoid an error.
16796 Use char because int might match the return type of a GCC
16797 builtin and then its argument prototype would still apply. */
503d2be0
AS
16798#ifdef __cplusplus
16799extern "C"
16800#endif
98418dba 16801char dg_sys_info ();
503d2be0
AS
16802int
16803main ()
16804{
ca81d7a0 16805return dg_sys_info ();
503d2be0
AS
16806 ;
16807 return 0;
16808}
16809_ACEOF
16810rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16811if { (ac_try="$ac_link"
16812case "(($ac_try" in
16813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16814 *) ac_try_echo=$ac_try;;
16815esac
16816eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16817 (eval "$ac_link") 2>conftest.er1
503d2be0 16818 ac_status=$?
edfaf76d
LK
16819 grep -v '^ *+' conftest.er1 >conftest.err
16820 rm -f conftest.er1
16821 cat conftest.err >&5
c0d27fcc 16822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16823 (exit $ac_status); } && {
16824 test -z "$ac_c_werror_flag" ||
16825 test ! -s conftest.err
16826 } && test -s conftest$ac_exeext &&
16827 $as_test_x conftest$ac_exeext; then
98418dba 16828 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
16829else
16830 echo "$as_me: failed program was:" >&5
19650fd6
AS
16831sed 's/^/| /' conftest.$ac_ext >&5
16832
ca81d7a0 16833 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 16834fi
ca81d7a0 16835
f053c89f 16836rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16837 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
16838LIBS=$ac_check_lib_save_LIBS
16839fi
ca81d7a0
JD
16840{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
16841echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 16842if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 16843 cat >>confdefs.h <<_ACEOF
98418dba 16844#define HAVE_LIBDGC 1
c0d27fcc 16845_ACEOF
ba4481b5 16846
98418dba 16847 LIBS="-ldgc $LIBS"
ba4481b5 16848
ba4481b5
DL
16849fi
16850
98418dba 16851fi
503d2be0 16852
c0d27fcc
MR
16853
16854
16855if test "${ac_cv_header_locale_h+set}" = set; then
ca81d7a0
JD
16856 { echo "$as_me:$LINENO: checking for locale.h" >&5
16857echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 16858if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 16859 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16860fi
ca81d7a0
JD
16861{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
16862echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 16863else
c0d27fcc 16864 # Is the header compilable?
ca81d7a0
JD
16865{ echo "$as_me:$LINENO: checking locale.h usability" >&5
16866echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 16867cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16868/* confdefs.h. */
16869_ACEOF
16870cat confdefs.h >>conftest.$ac_ext
16871cat >>conftest.$ac_ext <<_ACEOF
16872/* end confdefs.h. */
c0d27fcc
MR
16873$ac_includes_default
16874#include <locale.h>
16875_ACEOF
16876rm -f conftest.$ac_objext
ca81d7a0
JD
16877if { (ac_try="$ac_compile"
16878case "(($ac_try" in
16879 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16880 *) ac_try_echo=$ac_try;;
16881esac
16882eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16883 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16884 ac_status=$?
edfaf76d
LK
16885 grep -v '^ *+' conftest.er1 >conftest.err
16886 rm -f conftest.er1
16887 cat conftest.err >&5
c0d27fcc 16888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16889 (exit $ac_status); } && {
16890 test -z "$ac_c_werror_flag" ||
16891 test ! -s conftest.err
16892 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16893 ac_header_compiler=yes
16894else
16895 echo "$as_me: failed program was:" >&5
19650fd6
AS
16896sed 's/^/| /' conftest.$ac_ext >&5
16897
ca81d7a0 16898 ac_header_compiler=no
c0d27fcc 16899fi
ca81d7a0
JD
16900
16901rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16902{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16903echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16904
16905# Is the header present?
ca81d7a0
JD
16906{ echo "$as_me:$LINENO: checking locale.h presence" >&5
16907echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 16908cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16909/* confdefs.h. */
16910_ACEOF
16911cat confdefs.h >>conftest.$ac_ext
16912cat >>conftest.$ac_ext <<_ACEOF
16913/* end confdefs.h. */
98418dba 16914#include <locale.h>
503d2be0 16915_ACEOF
ca81d7a0
JD
16916if { (ac_try="$ac_cpp conftest.$ac_ext"
16917case "(($ac_try" in
16918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16919 *) ac_try_echo=$ac_try;;
16920esac
16921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16922 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16923 ac_status=$?
6bae0ccf 16924 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16925 rm -f conftest.er1
16926 cat conftest.err >&5
c0d27fcc 16927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16928 (exit $ac_status); } >/dev/null && {
16929 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16930 test ! -s conftest.err
16931 }; then
c0d27fcc 16932 ac_header_preproc=yes
98418dba
CW
16933else
16934 echo "$as_me: failed program was:" >&5
19650fd6
AS
16935sed 's/^/| /' conftest.$ac_ext >&5
16936
c0d27fcc 16937 ac_header_preproc=no
ba4481b5 16938fi
ca81d7a0 16939
98418dba 16940rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16941{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16942echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16943
16944# So? What about this header?
edfaf76d
LK
16945case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16946 yes:no: )
c0d27fcc
MR
16947 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
16948echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16949 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
16950echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
16951 ac_header_preproc=yes
19650fd6 16952 ;;
edfaf76d 16953 no:yes:* )
c0d27fcc
MR
16954 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
16955echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16956 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
16957echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
16958 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
16959echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
16960 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
16961echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16962 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 16963echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16964 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
16965echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16966
19650fd6 16967 ;;
c0d27fcc 16968esac
ca81d7a0
JD
16969{ echo "$as_me:$LINENO: checking for locale.h" >&5
16970echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
16971if test "${ac_cv_header_locale_h+set}" = set; then
16972 echo $ECHO_N "(cached) $ECHO_C" >&6
16973else
16974 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 16975fi
ca81d7a0
JD
16976{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
16977echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 16978
c0d27fcc
MR
16979fi
16980
16981
16982
98418dba 16983for ac_func in setlocale
ba4481b5 16984do
503d2be0 16985as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16986{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16987echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16988if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16989 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16990else
503d2be0 16991 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16992/* confdefs.h. */
16993_ACEOF
16994cat confdefs.h >>conftest.$ac_ext
16995cat >>conftest.$ac_ext <<_ACEOF
16996/* end confdefs.h. */
edfaf76d
LK
16997/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16998 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16999#define $ac_func innocuous_$ac_func
17000
ba4481b5 17001/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17002 which can conflict with char $ac_func (); below.
17003 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17004 <limits.h> exists even on freestanding compilers. */
edfaf76d 17005
19650fd6
AS
17006#ifdef __STDC__
17007# include <limits.h>
17008#else
17009# include <assert.h>
17010#endif
edfaf76d
LK
17011
17012#undef $ac_func
17013
ca81d7a0
JD
17014/* Override any GCC internal prototype to avoid an error.
17015 Use char because int might match the return type of a GCC
17016 builtin and then its argument prototype would still apply. */
503d2be0
AS
17017#ifdef __cplusplus
17018extern "C"
17019#endif
503d2be0 17020char $ac_func ();
ba4481b5
DL
17021/* The GNU C library defines this for functions which it implements
17022 to always fail with ENOSYS. Some functions are actually named
17023 something starting with __ and the normal name is an alias. */
ca81d7a0 17024#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17025choke me
ba4481b5
DL
17026#endif
17027
19650fd6
AS
17028int
17029main ()
17030{
ca81d7a0 17031return $ac_func ();
503d2be0
AS
17032 ;
17033 return 0;
17034}
17035_ACEOF
17036rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17037if { (ac_try="$ac_link"
17038case "(($ac_try" in
17039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17040 *) ac_try_echo=$ac_try;;
17041esac
17042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17043 (eval "$ac_link") 2>conftest.er1
503d2be0 17044 ac_status=$?
edfaf76d
LK
17045 grep -v '^ *+' conftest.er1 >conftest.err
17046 rm -f conftest.er1
17047 cat conftest.err >&5
c0d27fcc 17048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17049 (exit $ac_status); } && {
17050 test -z "$ac_c_werror_flag" ||
17051 test ! -s conftest.err
17052 } && test -s conftest$ac_exeext &&
17053 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17054 eval "$as_ac_var=yes"
17055else
17056 echo "$as_me: failed program was:" >&5
19650fd6
AS
17057sed 's/^/| /' conftest.$ac_ext >&5
17058
ca81d7a0 17059 eval "$as_ac_var=no"
503d2be0 17060fi
ca81d7a0 17061
f053c89f 17062rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17063 conftest$ac_exeext conftest.$ac_ext
503d2be0 17064fi
ca81d7a0
JD
17065ac_res=`eval echo '${'$as_ac_var'}'`
17066 { echo "$as_me:$LINENO: result: $ac_res" >&5
17067echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17068if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17069 cat >>confdefs.h <<_ACEOF
503d2be0 17070#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17071_ACEOF
ba4481b5 17072
ba4481b5
DL
17073fi
17074done
17075
c0d27fcc 17076
98418dba
CW
17077# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
17078# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
17079# Irix 4.0.5F has the header but not the library.
17080if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
17081 ac_have_func=yes
17082
c0d27fcc 17083cat >>confdefs.h <<\_ACEOF
98418dba 17084#define SVR4 1
c0d27fcc 17085_ACEOF
98418dba
CW
17086
17087fi
17088
17089if test $ac_have_func = no; then
c0d27fcc 17090 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
ca81d7a0
JD
17091 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17092echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 17093if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 17094 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17095fi
ca81d7a0
JD
17096{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17097echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 17098else
c0d27fcc 17099 # Is the header compilable?
ca81d7a0
JD
17100{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
17101echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17102cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17103/* confdefs.h. */
17104_ACEOF
17105cat confdefs.h >>conftest.$ac_ext
17106cat >>conftest.$ac_ext <<_ACEOF
17107/* end confdefs.h. */
c0d27fcc
MR
17108$ac_includes_default
17109#include <inq_stats/cpustats.h>
17110_ACEOF
17111rm -f conftest.$ac_objext
ca81d7a0
JD
17112if { (ac_try="$ac_compile"
17113case "(($ac_try" in
17114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17115 *) ac_try_echo=$ac_try;;
17116esac
17117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17118 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17119 ac_status=$?
edfaf76d
LK
17120 grep -v '^ *+' conftest.er1 >conftest.err
17121 rm -f conftest.er1
17122 cat conftest.err >&5
c0d27fcc 17123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17124 (exit $ac_status); } && {
17125 test -z "$ac_c_werror_flag" ||
17126 test ! -s conftest.err
17127 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17128 ac_header_compiler=yes
17129else
17130 echo "$as_me: failed program was:" >&5
19650fd6
AS
17131sed 's/^/| /' conftest.$ac_ext >&5
17132
ca81d7a0 17133 ac_header_compiler=no
c0d27fcc 17134fi
ca81d7a0
JD
17135
17136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17137{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17138echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17139
17140# Is the header present?
ca81d7a0
JD
17141{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
17142echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 17143cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17144/* confdefs.h. */
17145_ACEOF
17146cat confdefs.h >>conftest.$ac_ext
17147cat >>conftest.$ac_ext <<_ACEOF
17148/* end confdefs.h. */
98418dba 17149#include <inq_stats/cpustats.h>
503d2be0 17150_ACEOF
ca81d7a0
JD
17151if { (ac_try="$ac_cpp conftest.$ac_ext"
17152case "(($ac_try" in
17153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17154 *) ac_try_echo=$ac_try;;
17155esac
17156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17157 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17158 ac_status=$?
6bae0ccf 17159 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17160 rm -f conftest.er1
17161 cat conftest.err >&5
c0d27fcc 17162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17163 (exit $ac_status); } >/dev/null && {
17164 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17165 test ! -s conftest.err
17166 }; then
c0d27fcc 17167 ac_header_preproc=yes
503d2be0
AS
17168else
17169 echo "$as_me: failed program was:" >&5
19650fd6
AS
17170sed 's/^/| /' conftest.$ac_ext >&5
17171
c0d27fcc 17172 ac_header_preproc=no
ba4481b5 17173fi
ca81d7a0 17174
503d2be0 17175rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17176{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17177echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17178
17179# So? What about this header?
edfaf76d
LK
17180case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17181 yes:no: )
c0d27fcc
MR
17182 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
17183echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17184 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
17185echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
17186 ac_header_preproc=yes
19650fd6 17187 ;;
edfaf76d 17188 no:yes:* )
c0d27fcc
MR
17189 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
17190echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17191 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
17192echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
17193 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
17194echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
17195 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
17196echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17197 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 17198echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17199 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
17200echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17201
19650fd6 17202 ;;
c0d27fcc 17203esac
ca81d7a0
JD
17204{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17205echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
17206if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
17207 echo $ECHO_N "(cached) $ECHO_C" >&6
17208else
17209 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 17210fi
ca81d7a0
JD
17211{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17212echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
17213
17214fi
98418dba
CW
17215if test $ac_cv_header_inq_stats_cpustats_h = yes; then
17216 ac_have_func=yes
ba4481b5 17217
c0d27fcc 17218cat >>confdefs.h <<\_ACEOF
98418dba 17219#define UMAX 1
c0d27fcc 17220_ACEOF
98418dba 17221
c0d27fcc
MR
17222
17223cat >>confdefs.h <<\_ACEOF
98418dba 17224#define UMAX4_3 1
c0d27fcc 17225_ACEOF
98418dba
CW
17226
17227fi
17228
c0d27fcc 17229
98418dba
CW
17230fi
17231
17232if test $ac_have_func = no; then
c0d27fcc 17233 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
ca81d7a0
JD
17234 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
17235echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 17236if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 17237 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17238fi
ca81d7a0
JD
17239{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
17240echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 17241else
c0d27fcc 17242 # Is the header compilable?
ca81d7a0
JD
17243{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
17244echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17245cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17246/* confdefs.h. */
17247_ACEOF
17248cat confdefs.h >>conftest.$ac_ext
17249cat >>conftest.$ac_ext <<_ACEOF
17250/* end confdefs.h. */
c0d27fcc
MR
17251$ac_includes_default
17252#include <sys/cpustats.h>
17253_ACEOF
17254rm -f conftest.$ac_objext
ca81d7a0
JD
17255if { (ac_try="$ac_compile"
17256case "(($ac_try" in
17257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17258 *) ac_try_echo=$ac_try;;
17259esac
17260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17261 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17262 ac_status=$?
edfaf76d
LK
17263 grep -v '^ *+' conftest.er1 >conftest.err
17264 rm -f conftest.er1
17265 cat conftest.err >&5
c0d27fcc 17266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17267 (exit $ac_status); } && {
17268 test -z "$ac_c_werror_flag" ||
17269 test ! -s conftest.err
17270 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17271 ac_header_compiler=yes
17272else
17273 echo "$as_me: failed program was:" >&5
19650fd6
AS
17274sed 's/^/| /' conftest.$ac_ext >&5
17275
ca81d7a0 17276 ac_header_compiler=no
c0d27fcc 17277fi
ca81d7a0
JD
17278
17279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17280{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17281echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17282
17283# Is the header present?
ca81d7a0
JD
17284{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
17285echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 17286cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17287/* confdefs.h. */
17288_ACEOF
17289cat confdefs.h >>conftest.$ac_ext
17290cat >>conftest.$ac_ext <<_ACEOF
17291/* end confdefs.h. */
98418dba
CW
17292#include <sys/cpustats.h>
17293_ACEOF
ca81d7a0
JD
17294if { (ac_try="$ac_cpp conftest.$ac_ext"
17295case "(($ac_try" in
17296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17297 *) ac_try_echo=$ac_try;;
17298esac
17299eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17300 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17301 ac_status=$?
6bae0ccf 17302 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17303 rm -f conftest.er1
17304 cat conftest.err >&5
c0d27fcc 17305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17306 (exit $ac_status); } >/dev/null && {
17307 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17308 test ! -s conftest.err
17309 }; then
c0d27fcc 17310 ac_header_preproc=yes
98418dba
CW
17311else
17312 echo "$as_me: failed program was:" >&5
19650fd6
AS
17313sed 's/^/| /' conftest.$ac_ext >&5
17314
c0d27fcc 17315 ac_header_preproc=no
98418dba 17316fi
ca81d7a0 17317
98418dba 17318rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17319{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17320echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17321
17322# So? What about this header?
edfaf76d
LK
17323case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17324 yes:no: )
c0d27fcc
MR
17325 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
17326echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17327 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
17328echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
17329 ac_header_preproc=yes
19650fd6 17330 ;;
edfaf76d 17331 no:yes:* )
c0d27fcc
MR
17332 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
17333echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17334 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
17335echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
17336 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
17337echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
17338 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
17339echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17340 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 17341echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17342 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
17343echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17344
19650fd6 17345 ;;
c0d27fcc 17346esac
ca81d7a0
JD
17347{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
17348echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
17349if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
17350 echo $ECHO_N "(cached) $ECHO_C" >&6
17351else
17352 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 17353fi
ca81d7a0
JD
17354{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
17355echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
17356
17357fi
98418dba 17358if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 17359 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 17360#define UMAX 1
c0d27fcc 17361_ACEOF
ba4481b5 17362
98418dba
CW
17363fi
17364
c0d27fcc 17365
98418dba
CW
17366fi
17367
17368if test $ac_have_func = no; then
17369
17370for ac_header in mach/mach.h
2c9dccc9
PJ
17371do
17372as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
17373if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17374 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17375echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17376if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 17377 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17378fi
ca81d7a0
JD
17379ac_res=`eval echo '${'$as_ac_Header'}'`
17380 { echo "$as_me:$LINENO: result: $ac_res" >&5
17381echo "${ECHO_T}$ac_res" >&6; }
98418dba 17382else
c0d27fcc 17383 # Is the header compilable?
ca81d7a0
JD
17384{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17385echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 17386cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17387/* confdefs.h. */
17388_ACEOF
17389cat confdefs.h >>conftest.$ac_ext
17390cat >>conftest.$ac_ext <<_ACEOF
17391/* end confdefs.h. */
c0d27fcc
MR
17392$ac_includes_default
17393#include <$ac_header>
17394_ACEOF
17395rm -f conftest.$ac_objext
ca81d7a0
JD
17396if { (ac_try="$ac_compile"
17397case "(($ac_try" in
17398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17399 *) ac_try_echo=$ac_try;;
17400esac
17401eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17402 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17403 ac_status=$?
edfaf76d
LK
17404 grep -v '^ *+' conftest.er1 >conftest.err
17405 rm -f conftest.er1
17406 cat conftest.err >&5
c0d27fcc 17407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17408 (exit $ac_status); } && {
17409 test -z "$ac_c_werror_flag" ||
17410 test ! -s conftest.err
17411 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17412 ac_header_compiler=yes
17413else
17414 echo "$as_me: failed program was:" >&5
19650fd6
AS
17415sed 's/^/| /' conftest.$ac_ext >&5
17416
ca81d7a0 17417 ac_header_compiler=no
c0d27fcc 17418fi
ca81d7a0
JD
17419
17420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17421{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17422echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17423
17424# Is the header present?
ca81d7a0
JD
17425{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
17426echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 17427cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17428/* confdefs.h. */
17429_ACEOF
17430cat confdefs.h >>conftest.$ac_ext
17431cat >>conftest.$ac_ext <<_ACEOF
17432/* end confdefs.h. */
2c9dccc9
PJ
17433#include <$ac_header>
17434_ACEOF
ca81d7a0
JD
17435if { (ac_try="$ac_cpp conftest.$ac_ext"
17436case "(($ac_try" in
17437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17438 *) ac_try_echo=$ac_try;;
17439esac
17440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17441 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 17442 ac_status=$?
6bae0ccf 17443 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
17444 rm -f conftest.er1
17445 cat conftest.err >&5
c0d27fcc 17446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17447 (exit $ac_status); } >/dev/null && {
17448 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17449 test ! -s conftest.err
17450 }; then
c0d27fcc
MR
17451 ac_header_preproc=yes
17452else
17453 echo "$as_me: failed program was:" >&5
19650fd6
AS
17454sed 's/^/| /' conftest.$ac_ext >&5
17455
c0d27fcc
MR
17456 ac_header_preproc=no
17457fi
ca81d7a0 17458
c0d27fcc 17459rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17460{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17461echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17462
17463# So? What about this header?
edfaf76d
LK
17464case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17465 yes:no: )
c0d27fcc
MR
17466 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17467echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17468 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17469echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17470 ac_header_preproc=yes
19650fd6 17471 ;;
edfaf76d 17472 no:yes:* )
c0d27fcc
MR
17473 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17474echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
17475 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17476echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17477 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17478echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17479 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17480echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17481 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 17482echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17483 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17484echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17485
19650fd6 17486 ;;
c0d27fcc 17487esac
ca81d7a0
JD
17488{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17489echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17490if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17491 echo $ECHO_N "(cached) $ECHO_C" >&6
17492else
edfaf76d 17493 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 17494fi
ca81d7a0
JD
17495ac_res=`eval echo '${'$as_ac_Header'}'`
17496 { echo "$as_me:$LINENO: result: $ac_res" >&5
17497echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17498
17499fi
17500if test `eval echo '${'$as_ac_Header'}'` = yes; then
17501 cat >>confdefs.h <<_ACEOF
17502#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17503_ACEOF
17504
17505fi
17506
17507done
17508
17509fi
17510
17511
17512for ac_header in nlist.h
17513do
17514as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
17515if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17516 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17517echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17518if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17519 echo $ECHO_N "(cached) $ECHO_C" >&6
17520fi
ca81d7a0
JD
17521ac_res=`eval echo '${'$as_ac_Header'}'`
17522 { echo "$as_me:$LINENO: result: $ac_res" >&5
17523echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17524else
17525 # Is the header compilable?
ca81d7a0
JD
17526{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17527echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 17528cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17529/* confdefs.h. */
17530_ACEOF
17531cat confdefs.h >>conftest.$ac_ext
17532cat >>conftest.$ac_ext <<_ACEOF
17533/* end confdefs.h. */
c0d27fcc
MR
17534$ac_includes_default
17535#include <$ac_header>
17536_ACEOF
17537rm -f conftest.$ac_objext
ca81d7a0
JD
17538if { (ac_try="$ac_compile"
17539case "(($ac_try" in
17540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17541 *) ac_try_echo=$ac_try;;
17542esac
17543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17544 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17545 ac_status=$?
edfaf76d
LK
17546 grep -v '^ *+' conftest.er1 >conftest.err
17547 rm -f conftest.er1
17548 cat conftest.err >&5
c0d27fcc 17549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17550 (exit $ac_status); } && {
17551 test -z "$ac_c_werror_flag" ||
17552 test ! -s conftest.err
17553 } && test -s conftest.$ac_objext; then
c0d27fcc 17554 ac_header_compiler=yes
2c9dccc9
PJ
17555else
17556 echo "$as_me: failed program was:" >&5
19650fd6
AS
17557sed 's/^/| /' conftest.$ac_ext >&5
17558
ca81d7a0 17559 ac_header_compiler=no
98418dba 17560fi
ca81d7a0
JD
17561
17562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17563{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17564echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 17565
c0d27fcc 17566# Is the header present?
ca81d7a0
JD
17567{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
17568echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 17569cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17570/* confdefs.h. */
17571_ACEOF
17572cat confdefs.h >>conftest.$ac_ext
17573cat >>conftest.$ac_ext <<_ACEOF
17574/* end confdefs.h. */
503d2be0
AS
17575#include <$ac_header>
17576_ACEOF
ca81d7a0
JD
17577if { (ac_try="$ac_cpp conftest.$ac_ext"
17578case "(($ac_try" in
17579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17580 *) ac_try_echo=$ac_try;;
17581esac
17582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17583 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17584 ac_status=$?
6bae0ccf 17585 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17586 rm -f conftest.er1
17587 cat conftest.err >&5
c0d27fcc 17588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17589 (exit $ac_status); } >/dev/null && {
17590 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17591 test ! -s conftest.err
17592 }; then
c0d27fcc 17593 ac_header_preproc=yes
503d2be0
AS
17594else
17595 echo "$as_me: failed program was:" >&5
19650fd6
AS
17596sed 's/^/| /' conftest.$ac_ext >&5
17597
c0d27fcc 17598 ac_header_preproc=no
b5de8dc0 17599fi
ca81d7a0 17600
503d2be0 17601rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17602{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17603echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17604
17605# So? What about this header?
edfaf76d
LK
17606case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17607 yes:no: )
c0d27fcc
MR
17608 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17609echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17610 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17611echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17612 ac_header_preproc=yes
19650fd6 17613 ;;
edfaf76d 17614 no:yes:* )
c0d27fcc
MR
17615 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17616echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
17617 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17618echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17619 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17620echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17621 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17622echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17623 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 17624echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17625 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17626echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17627
19650fd6 17628 ;;
c0d27fcc 17629esac
ca81d7a0
JD
17630{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17631echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17632if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17633 echo $ECHO_N "(cached) $ECHO_C" >&6
17634else
edfaf76d 17635 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 17636fi
ca81d7a0
JD
17637ac_res=`eval echo '${'$as_ac_Header'}'`
17638 { echo "$as_me:$LINENO: result: $ac_res" >&5
17639echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17640
17641fi
98418dba 17642if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 17643 cat >>confdefs.h <<_ACEOF
98418dba 17644#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 17645_ACEOF
ca81d7a0
JD
17646 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
17647echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 17648if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 17649 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 17650else
503d2be0 17651 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17652/* confdefs.h. */
17653_ACEOF
17654cat confdefs.h >>conftest.$ac_ext
17655cat >>conftest.$ac_ext <<_ACEOF
17656/* end confdefs.h. */
98418dba 17657#include <nlist.h>
b5de8dc0 17658
503d2be0
AS
17659int
17660main ()
17661{
98418dba
CW
17662static struct nlist ac_aggr;
17663if (ac_aggr.n_un.n_name)
17664return 0;
503d2be0
AS
17665 ;
17666 return 0;
17667}
17668_ACEOF
98418dba 17669rm -f conftest.$ac_objext
ca81d7a0
JD
17670if { (ac_try="$ac_compile"
17671case "(($ac_try" in
17672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17673 *) ac_try_echo=$ac_try;;
17674esac
17675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17676 (eval "$ac_compile") 2>conftest.er1
503d2be0 17677 ac_status=$?
edfaf76d
LK
17678 grep -v '^ *+' conftest.er1 >conftest.err
17679 rm -f conftest.er1
17680 cat conftest.err >&5
c0d27fcc 17681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17682 (exit $ac_status); } && {
17683 test -z "$ac_c_werror_flag" ||
17684 test ! -s conftest.err
17685 } && test -s conftest.$ac_objext; then
edfaf76d 17686 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
17687else
17688 echo "$as_me: failed program was:" >&5
19650fd6
AS
17689sed 's/^/| /' conftest.$ac_ext >&5
17690
ca81d7a0 17691 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17692/* confdefs.h. */
17693_ACEOF
17694cat confdefs.h >>conftest.$ac_ext
17695cat >>conftest.$ac_ext <<_ACEOF
17696/* end confdefs.h. */
6bae0ccf
DL
17697#include <nlist.h>
17698
17699int
17700main ()
17701{
17702static struct nlist ac_aggr;
17703if (sizeof ac_aggr.n_un.n_name)
17704return 0;
17705 ;
17706 return 0;
17707}
17708_ACEOF
17709rm -f conftest.$ac_objext
ca81d7a0
JD
17710if { (ac_try="$ac_compile"
17711case "(($ac_try" in
17712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17713 *) ac_try_echo=$ac_try;;
17714esac
17715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17716 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 17717 ac_status=$?
edfaf76d
LK
17718 grep -v '^ *+' conftest.er1 >conftest.err
17719 rm -f conftest.er1
17720 cat conftest.err >&5
6bae0ccf 17721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17722 (exit $ac_status); } && {
17723 test -z "$ac_c_werror_flag" ||
17724 test ! -s conftest.err
17725 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
17726 ac_cv_member_struct_nlist_n_un_n_name=yes
17727else
17728 echo "$as_me: failed program was:" >&5
19650fd6
AS
17729sed 's/^/| /' conftest.$ac_ext >&5
17730
ca81d7a0 17731 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 17732fi
ca81d7a0
JD
17733
17734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 17735fi
ca81d7a0
JD
17736
17737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 17738fi
ca81d7a0
JD
17739{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
17740echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 17741if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 17742
c0d27fcc 17743cat >>confdefs.h <<_ACEOF
98418dba 17744#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 17745_ACEOF
b5de8dc0 17746
c0d27fcc
MR
17747
17748cat >>confdefs.h <<\_ACEOF
98418dba 17749#define NLIST_NAME_UNION 1
c0d27fcc 17750_ACEOF
b5de8dc0 17751
98418dba 17752fi
b5de8dc0 17753
c0d27fcc 17754
98418dba 17755fi
c0d27fcc 17756
98418dba 17757done
b5de8dc0 17758
98418dba
CW
17759fi
17760done
b5de8dc0 17761
c0d27fcc 17762
98418dba 17763# Some definitions of getloadavg require that the program be installed setgid.
ca81d7a0
JD
17764{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
17765echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
17766if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
17767 echo $ECHO_N "(cached) $ECHO_C" >&6
17768else
17769 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17770/* confdefs.h. */
17771_ACEOF
17772cat confdefs.h >>conftest.$ac_ext
17773cat >>conftest.$ac_ext <<_ACEOF
17774/* end confdefs.h. */
6bae0ccf 17775#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
17776#ifdef LDAV_PRIVILEGED
17777Yowza Am I SETGID yet
17778#endif
17779_ACEOF
17780if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 17781 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
17782 ac_cv_func_getloadavg_setgid=yes
17783else
17784 ac_cv_func_getloadavg_setgid=no
17785fi
17786rm -f conftest*
b5de8dc0 17787
98418dba 17788fi
ca81d7a0
JD
17789{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
17790echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
17791if test $ac_cv_func_getloadavg_setgid = yes; then
17792 NEED_SETGID=true
b5de8dc0 17793
c0d27fcc 17794cat >>confdefs.h <<\_ACEOF
98418dba 17795#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 17796_ACEOF
98418dba 17797
b5de8dc0 17798else
98418dba 17799 NEED_SETGID=false
b5de8dc0 17800fi
98418dba
CW
17801
17802if test $ac_cv_func_getloadavg_setgid = yes; then
ca81d7a0
JD
17803 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
17804echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
17805if test "${ac_cv_group_kmem+set}" = set; then
17806 echo $ECHO_N "(cached) $ECHO_C" >&6
17807else
17808 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
17809 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
17810 # If we got an error (system does not support symlinks), try without -L.
17811 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
17812 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 17813 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
17814 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
17815 / /s/.* //;p;'`
17816
b5de8dc0 17817fi
ca81d7a0
JD
17818{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
17819echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 17820 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 17821fi
98418dba
CW
17822if test "x$ac_save_LIBS" = x; then
17823 GETLOADAVG_LIBS=$LIBS
17824else
17825 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 17826fi
98418dba 17827LIBS=$ac_save_LIBS
b5de8dc0 17828
c0d27fcc
MR
17829
17830
ca81d7a0
JD
17831{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
17832echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 17833if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 17834 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17835else
b936fae4 17836 while :; do
503d2be0 17837 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17838/* confdefs.h. */
17839_ACEOF
17840cat confdefs.h >>conftest.$ac_ext
17841cat >>conftest.$ac_ext <<_ACEOF
17842/* end confdefs.h. */
b936fae4 17843#include <stdio.h>
503d2be0
AS
17844int
17845main ()
17846{
f053c89f 17847return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
17848 ;
17849 return 0;
17850}
17851_ACEOF
f053c89f
CY
17852rm -f conftest.$ac_objext conftest$ac_exeext
17853if { (ac_try="$ac_link"
ca81d7a0
JD
17854case "(($ac_try" in
17855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17856 *) ac_try_echo=$ac_try;;
17857esac
17858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 17859 (eval "$ac_link") 2>conftest.er1
b936fae4 17860 ac_status=$?
edfaf76d
LK
17861 grep -v '^ *+' conftest.er1 >conftest.err
17862 rm -f conftest.er1
17863 cat conftest.err >&5
c0d27fcc 17864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17865 (exit $ac_status); } && {
17866 test -z "$ac_c_werror_flag" ||
17867 test ! -s conftest.err
17868 } && test -s conftest$ac_exeext &&
17869 $as_test_x conftest$ac_exeext; then
17870 ac_cv_sys_largefile_source=no; break
b936fae4
AS
17871else
17872 echo "$as_me: failed program was:" >&5
19650fd6
AS
17873sed 's/^/| /' conftest.$ac_ext >&5
17874
ca81d7a0 17875
b936fae4 17876fi
ca81d7a0 17877
f053c89f
CY
17878rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17879 conftest$ac_exeext conftest.$ac_ext
b936fae4 17880 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17881/* confdefs.h. */
17882_ACEOF
17883cat confdefs.h >>conftest.$ac_ext
17884cat >>conftest.$ac_ext <<_ACEOF
17885/* end confdefs.h. */
b936fae4
AS
17886#define _LARGEFILE_SOURCE 1
17887#include <stdio.h>
b936fae4
AS
17888int
17889main ()
17890{
f053c89f 17891return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
17892 ;
17893 return 0;
17894}
17895_ACEOF
f053c89f
CY
17896rm -f conftest.$ac_objext conftest$ac_exeext
17897if { (ac_try="$ac_link"
ca81d7a0
JD
17898case "(($ac_try" in
17899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17900 *) ac_try_echo=$ac_try;;
17901esac
17902eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 17903 (eval "$ac_link") 2>conftest.er1
b936fae4 17904 ac_status=$?
edfaf76d
LK
17905 grep -v '^ *+' conftest.er1 >conftest.err
17906 rm -f conftest.er1
17907 cat conftest.err >&5
c0d27fcc 17908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17909 (exit $ac_status); } && {
17910 test -z "$ac_c_werror_flag" ||
17911 test ! -s conftest.err
17912 } && test -s conftest$ac_exeext &&
17913 $as_test_x conftest$ac_exeext; then
b936fae4
AS
17914 ac_cv_sys_largefile_source=1; break
17915else
17916 echo "$as_me: failed program was:" >&5
19650fd6
AS
17917sed 's/^/| /' conftest.$ac_ext >&5
17918
ca81d7a0 17919
b936fae4 17920fi
ca81d7a0 17921
f053c89f
CY
17922rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17923 conftest$ac_exeext conftest.$ac_ext
17924 ac_cv_sys_largefile_source=unknown
b936fae4
AS
17925 break
17926done
17927fi
ca81d7a0
JD
17928{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
17929echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
17930case $ac_cv_sys_largefile_source in #(
17931 no | unknown) ;;
17932 *)
c0d27fcc 17933cat >>confdefs.h <<_ACEOF
b936fae4 17934#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 17935_ACEOF
f053c89f
CY
17936;;
17937esac
b936fae4 17938rm -f conftest*
4c343001 17939
b936fae4
AS
17940# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
17941# in glibc 2.1.3, but that breaks too many other things.
17942# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
f053c89f 17943if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 17944
c0d27fcc 17945cat >>confdefs.h <<\_ACEOF
b936fae4 17946#define HAVE_FSEEKO 1
c0d27fcc 17947_ACEOF
b936fae4 17948
4c343001
DL
17949fi
17950
c0d27fcc 17951
52dbaac8
PE
17952# Configure getopt.
17953# getopt.m4 serial 10
17954
17955# The getopt module assume you want GNU getopt, with getopt_long etc,
17956# rather than vanilla POSIX getopt. This means your your code should
17957# always include <getopt.h> for the getopt prototypes.
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969# Prerequisites of lib/getopt*.
17970
17971
17972
10a3b1a1 17973
52dbaac8
PE
17974 GETOPT_H=
17975
17976for ac_header in getopt.h
17977do
17978as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
17979if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17980 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17981echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17982if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
17983 echo $ECHO_N "(cached) $ECHO_C" >&6
17984fi
ca81d7a0
JD
17985ac_res=`eval echo '${'$as_ac_Header'}'`
17986 { echo "$as_me:$LINENO: result: $ac_res" >&5
17987echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
17988else
17989 # Is the header compilable?
ca81d7a0
JD
17990{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17991echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
17992cat >conftest.$ac_ext <<_ACEOF
17993/* confdefs.h. */
17994_ACEOF
17995cat confdefs.h >>conftest.$ac_ext
17996cat >>conftest.$ac_ext <<_ACEOF
17997/* end confdefs.h. */
17998$ac_includes_default
17999#include <$ac_header>
18000_ACEOF
18001rm -f conftest.$ac_objext
ca81d7a0
JD
18002if { (ac_try="$ac_compile"
18003case "(($ac_try" in
18004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18005 *) ac_try_echo=$ac_try;;
18006esac
18007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18008 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18009 ac_status=$?
18010 grep -v '^ *+' conftest.er1 >conftest.err
18011 rm -f conftest.er1
18012 cat conftest.err >&5
18013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18014 (exit $ac_status); } && {
18015 test -z "$ac_c_werror_flag" ||
18016 test ! -s conftest.err
18017 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18018 ac_header_compiler=yes
18019else
18020 echo "$as_me: failed program was:" >&5
18021sed 's/^/| /' conftest.$ac_ext >&5
18022
ca81d7a0 18023 ac_header_compiler=no
52dbaac8 18024fi
ca81d7a0
JD
18025
18026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18027{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18028echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
18029
18030# Is the header present?
ca81d7a0
JD
18031{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18032echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
18033cat >conftest.$ac_ext <<_ACEOF
18034/* confdefs.h. */
18035_ACEOF
18036cat confdefs.h >>conftest.$ac_ext
18037cat >>conftest.$ac_ext <<_ACEOF
18038/* end confdefs.h. */
18039#include <$ac_header>
18040_ACEOF
ca81d7a0
JD
18041if { (ac_try="$ac_cpp conftest.$ac_ext"
18042case "(($ac_try" in
18043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18044 *) ac_try_echo=$ac_try;;
18045esac
18046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18047 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
18048 ac_status=$?
18049 grep -v '^ *+' conftest.er1 >conftest.err
18050 rm -f conftest.er1
18051 cat conftest.err >&5
18052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18053 (exit $ac_status); } >/dev/null && {
18054 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18055 test ! -s conftest.err
18056 }; then
52dbaac8
PE
18057 ac_header_preproc=yes
18058else
18059 echo "$as_me: failed program was:" >&5
18060sed 's/^/| /' conftest.$ac_ext >&5
18061
18062 ac_header_preproc=no
18063fi
ca81d7a0 18064
52dbaac8 18065rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18066{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18067echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
18068
18069# So? What about this header?
18070case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18071 yes:no: )
18072 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18073echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18074 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18075echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18076 ac_header_preproc=yes
18077 ;;
18078 no:yes:* )
18079 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18080echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18081 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18082echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18083 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18084echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18085 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18086echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
18087 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18088echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18089 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18090echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18091
52dbaac8
PE
18092 ;;
18093esac
ca81d7a0
JD
18094{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18095echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18096if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18097 echo $ECHO_N "(cached) $ECHO_C" >&6
18098else
18099 eval "$as_ac_Header=\$ac_header_preproc"
18100fi
ca81d7a0
JD
18101ac_res=`eval echo '${'$as_ac_Header'}'`
18102 { echo "$as_me:$LINENO: result: $ac_res" >&5
18103echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18104
18105fi
18106if test `eval echo '${'$as_ac_Header'}'` = yes; then
18107 cat >>confdefs.h <<_ACEOF
18108#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18109_ACEOF
18110
18111else
18112 GETOPT_H=getopt.h
18113fi
18114
18115done
18116
18117 if test -z "$GETOPT_H"; then
18118
18119for ac_func in getopt_long_only
18120do
18121as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18122{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18123echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18124if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18125 echo $ECHO_N "(cached) $ECHO_C" >&6
18126else
18127 cat >conftest.$ac_ext <<_ACEOF
18128/* confdefs.h. */
18129_ACEOF
18130cat confdefs.h >>conftest.$ac_ext
18131cat >>conftest.$ac_ext <<_ACEOF
18132/* end confdefs.h. */
18133/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18134 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18135#define $ac_func innocuous_$ac_func
18136
18137/* System header to define __stub macros and hopefully few prototypes,
18138 which can conflict with char $ac_func (); below.
18139 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18140 <limits.h> exists even on freestanding compilers. */
18141
18142#ifdef __STDC__
18143# include <limits.h>
18144#else
18145# include <assert.h>
18146#endif
18147
18148#undef $ac_func
18149
ca81d7a0
JD
18150/* Override any GCC internal prototype to avoid an error.
18151 Use char because int might match the return type of a GCC
18152 builtin and then its argument prototype would still apply. */
52dbaac8
PE
18153#ifdef __cplusplus
18154extern "C"
52dbaac8 18155#endif
52dbaac8
PE
18156char $ac_func ();
18157/* The GNU C library defines this for functions which it implements
18158 to always fail with ENOSYS. Some functions are actually named
18159 something starting with __ and the normal name is an alias. */
ca81d7a0 18160#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 18161choke me
52dbaac8
PE
18162#endif
18163
18164int
18165main ()
18166{
ca81d7a0 18167return $ac_func ();
52dbaac8
PE
18168 ;
18169 return 0;
18170}
18171_ACEOF
18172rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18173if { (ac_try="$ac_link"
18174case "(($ac_try" in
18175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18176 *) ac_try_echo=$ac_try;;
18177esac
18178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18179 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
18180 ac_status=$?
18181 grep -v '^ *+' conftest.er1 >conftest.err
18182 rm -f conftest.er1
18183 cat conftest.err >&5
18184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18185 (exit $ac_status); } && {
18186 test -z "$ac_c_werror_flag" ||
18187 test ! -s conftest.err
18188 } && test -s conftest$ac_exeext &&
18189 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
18190 eval "$as_ac_var=yes"
18191else
18192 echo "$as_me: failed program was:" >&5
18193sed 's/^/| /' conftest.$ac_ext >&5
18194
ca81d7a0 18195 eval "$as_ac_var=no"
52dbaac8 18196fi
ca81d7a0 18197
f053c89f 18198rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
18199 conftest$ac_exeext conftest.$ac_ext
18200fi
ca81d7a0
JD
18201ac_res=`eval echo '${'$as_ac_var'}'`
18202 { echo "$as_me:$LINENO: result: $ac_res" >&5
18203echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18204if test `eval echo '${'$as_ac_var'}'` = yes; then
18205 cat >>confdefs.h <<_ACEOF
18206#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18207_ACEOF
18208
18209else
18210 GETOPT_H=getopt.h
18211fi
18212done
18213
18214 fi
18215
18216 if test -z "$GETOPT_H"; then
ca81d7a0
JD
18217 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
18218echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
18219if test "${ac_cv_have_decl_optreset+set}" = set; then
18220 echo $ECHO_N "(cached) $ECHO_C" >&6
18221else
18222 cat >conftest.$ac_ext <<_ACEOF
18223/* confdefs.h. */
18224_ACEOF
18225cat confdefs.h >>conftest.$ac_ext
18226cat >>conftest.$ac_ext <<_ACEOF
18227/* end confdefs.h. */
18228#include <getopt.h>
18229
18230int
18231main ()
18232{
18233#ifndef optreset
f053c89f 18234 (void) optreset;
52dbaac8
PE
18235#endif
18236
18237 ;
18238 return 0;
18239}
18240_ACEOF
18241rm -f conftest.$ac_objext
ca81d7a0
JD
18242if { (ac_try="$ac_compile"
18243case "(($ac_try" in
18244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18245 *) ac_try_echo=$ac_try;;
18246esac
18247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18248 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18249 ac_status=$?
18250 grep -v '^ *+' conftest.er1 >conftest.err
18251 rm -f conftest.er1
18252 cat conftest.err >&5
18253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18254 (exit $ac_status); } && {
18255 test -z "$ac_c_werror_flag" ||
18256 test ! -s conftest.err
18257 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18258 ac_cv_have_decl_optreset=yes
18259else
18260 echo "$as_me: failed program was:" >&5
18261sed 's/^/| /' conftest.$ac_ext >&5
18262
ca81d7a0 18263 ac_cv_have_decl_optreset=no
52dbaac8 18264fi
ca81d7a0
JD
18265
18266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 18267fi
ca81d7a0
JD
18268{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
18269echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
18270if test $ac_cv_have_decl_optreset = yes; then
18271 GETOPT_H=getopt.h
18272fi
18273
18274 fi
18275
18276 if test -z "$GETOPT_H"; then
ca81d7a0
JD
18277 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
18278echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
18279if test "${gl_cv_func_gnu_getopt+set}" = set; then
18280 echo $ECHO_N "(cached) $ECHO_C" >&6
18281else
18282 if test "$cross_compiling" = yes; then
ca81d7a0
JD
18283 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
18284echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
18285if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
18286 echo $ECHO_N "(cached) $ECHO_C" >&6
18287else
18288 cat >conftest.$ac_ext <<_ACEOF
18289/* confdefs.h. */
18290_ACEOF
18291cat confdefs.h >>conftest.$ac_ext
18292cat >>conftest.$ac_ext <<_ACEOF
18293/* end confdefs.h. */
18294#include <getopt.h>
18295
18296int
18297main ()
18298{
18299#ifndef getopt_clip
f053c89f 18300 (void) getopt_clip;
52dbaac8
PE
18301#endif
18302
18303 ;
18304 return 0;
18305}
18306_ACEOF
18307rm -f conftest.$ac_objext
ca81d7a0
JD
18308if { (ac_try="$ac_compile"
18309case "(($ac_try" in
18310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18311 *) ac_try_echo=$ac_try;;
18312esac
18313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18314 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18315 ac_status=$?
18316 grep -v '^ *+' conftest.er1 >conftest.err
18317 rm -f conftest.er1
18318 cat conftest.err >&5
18319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18320 (exit $ac_status); } && {
18321 test -z "$ac_c_werror_flag" ||
18322 test ! -s conftest.err
18323 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18324 ac_cv_have_decl_getopt_clip=yes
18325else
18326 echo "$as_me: failed program was:" >&5
18327sed 's/^/| /' conftest.$ac_ext >&5
18328
ca81d7a0 18329 ac_cv_have_decl_getopt_clip=no
52dbaac8 18330fi
ca81d7a0
JD
18331
18332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 18333fi
ca81d7a0
JD
18334{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
18335echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
18336if test $ac_cv_have_decl_getopt_clip = yes; then
18337 gl_cv_func_gnu_getopt=no
18338else
18339 gl_cv_func_gnu_getopt=yes
18340fi
18341
18342else
18343 cat >conftest.$ac_ext <<_ACEOF
18344/* confdefs.h. */
18345_ACEOF
18346cat confdefs.h >>conftest.$ac_ext
18347cat >>conftest.$ac_ext <<_ACEOF
18348/* end confdefs.h. */
18349#include <getopt.h>
18350int
18351main ()
18352{
18353
18354 char *myargv[3];
18355 myargv[0] = "conftest";
18356 myargv[1] = "-+";
18357 myargv[2] = 0;
18358 return getopt (2, myargv, "+a") != '?';
18359
18360 ;
18361 return 0;
18362}
18363_ACEOF
18364rm -f conftest$ac_exeext
ca81d7a0
JD
18365if { (ac_try="$ac_link"
18366case "(($ac_try" in
18367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18368 *) ac_try_echo=$ac_try;;
18369esac
18370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18371 (eval "$ac_link") 2>&5
52dbaac8
PE
18372 ac_status=$?
18373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18374 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
18375 { (case "(($ac_try" in
18376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18377 *) ac_try_echo=$ac_try;;
18378esac
18379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18380 (eval "$ac_try") 2>&5
52dbaac8
PE
18381 ac_status=$?
18382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18383 (exit $ac_status); }; }; then
18384 gl_cv_func_gnu_getopt=yes
18385else
18386 echo "$as_me: program exited with status $ac_status" >&5
18387echo "$as_me: failed program was:" >&5
18388sed 's/^/| /' conftest.$ac_ext >&5
18389
18390( exit $ac_status )
18391gl_cv_func_gnu_getopt=no
18392fi
ca81d7a0 18393rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 18394fi
ca81d7a0
JD
18395
18396
52dbaac8 18397fi
ca81d7a0
JD
18398{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
18399echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
18400 if test "$gl_cv_func_gnu_getopt" = "no"; then
18401 GETOPT_H=getopt.h
18402 fi
18403 fi
18404
18405
18406
18407 if test -n "$GETOPT_H"; then
18408
18409
18410 GETOPT_H=getopt.h
18411
18412cat >>confdefs.h <<\_ACEOF
18413#define __GETOPT_PREFIX rpl_
18414_ACEOF
18415
18416
18417
18418 :
18419 GETOPTOBJS='getopt.o getopt1.o'
18420
18421fi
18422
18423
18424
18425
ca81d7a0
JD
18426{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
18427echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
18428if test "${ac_cv_func_getpgrp_void+set}" = set; then
18429 echo $ECHO_N "(cached) $ECHO_C" >&6
18430else
18431 # Use it with a single arg.
18432cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18433/* confdefs.h. */
18434_ACEOF
18435cat confdefs.h >>conftest.$ac_ext
18436cat >>conftest.$ac_ext <<_ACEOF
18437/* end confdefs.h. */
cd958eb3
MB
18438$ac_includes_default
18439int
18440main ()
18441{
18442getpgrp (0);
18443 ;
18444 return 0;
18445}
18446_ACEOF
18447rm -f conftest.$ac_objext
ca81d7a0
JD
18448if { (ac_try="$ac_compile"
18449case "(($ac_try" in
18450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18451 *) ac_try_echo=$ac_try;;
18452esac
18453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18454 (eval "$ac_compile") 2>conftest.er1
cd958eb3 18455 ac_status=$?
edfaf76d
LK
18456 grep -v '^ *+' conftest.er1 >conftest.err
18457 rm -f conftest.er1
18458 cat conftest.err >&5
cd958eb3 18459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18460 (exit $ac_status); } && {
18461 test -z "$ac_c_werror_flag" ||
18462 test ! -s conftest.err
18463 } && test -s conftest.$ac_objext; then
cd958eb3
MB
18464 ac_cv_func_getpgrp_void=no
18465else
18466 echo "$as_me: failed program was:" >&5
19650fd6
AS
18467sed 's/^/| /' conftest.$ac_ext >&5
18468
ca81d7a0 18469 ac_cv_func_getpgrp_void=yes
cd958eb3 18470fi
ca81d7a0
JD
18471
18472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
18473
18474fi
ca81d7a0
JD
18475{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
18476echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
18477if test $ac_cv_func_getpgrp_void = yes; then
18478
18479cat >>confdefs.h <<\_ACEOF
18480#define GETPGRP_VOID 1
18481_ACEOF
18482
18483fi
18484
18485
973a76b1
DL
18486
18487for ac_func in strftime
18488do
18489as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18490{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18491echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18492if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
18493 echo $ECHO_N "(cached) $ECHO_C" >&6
18494else
18495 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18496/* confdefs.h. */
18497_ACEOF
18498cat confdefs.h >>conftest.$ac_ext
18499cat >>conftest.$ac_ext <<_ACEOF
18500/* end confdefs.h. */
edfaf76d
LK
18501/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18502 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18503#define $ac_func innocuous_$ac_func
18504
973a76b1 18505/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18506 which can conflict with char $ac_func (); below.
18507 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18508 <limits.h> exists even on freestanding compilers. */
edfaf76d 18509
19650fd6
AS
18510#ifdef __STDC__
18511# include <limits.h>
18512#else
18513# include <assert.h>
18514#endif
edfaf76d
LK
18515
18516#undef $ac_func
18517
ca81d7a0
JD
18518/* Override any GCC internal prototype to avoid an error.
18519 Use char because int might match the return type of a GCC
18520 builtin and then its argument prototype would still apply. */
973a76b1
DL
18521#ifdef __cplusplus
18522extern "C"
973a76b1 18523#endif
973a76b1
DL
18524char $ac_func ();
18525/* The GNU C library defines this for functions which it implements
18526 to always fail with ENOSYS. Some functions are actually named
18527 something starting with __ and the normal name is an alias. */
ca81d7a0 18528#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 18529choke me
973a76b1
DL
18530#endif
18531
19650fd6
AS
18532int
18533main ()
18534{
ca81d7a0 18535return $ac_func ();
973a76b1
DL
18536 ;
18537 return 0;
18538}
18539_ACEOF
18540rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18541if { (ac_try="$ac_link"
18542case "(($ac_try" in
18543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18544 *) ac_try_echo=$ac_try;;
18545esac
18546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18547 (eval "$ac_link") 2>conftest.er1
973a76b1 18548 ac_status=$?
edfaf76d
LK
18549 grep -v '^ *+' conftest.er1 >conftest.err
18550 rm -f conftest.er1
18551 cat conftest.err >&5
973a76b1 18552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18553 (exit $ac_status); } && {
18554 test -z "$ac_c_werror_flag" ||
18555 test ! -s conftest.err
18556 } && test -s conftest$ac_exeext &&
18557 $as_test_x conftest$ac_exeext; then
973a76b1
DL
18558 eval "$as_ac_var=yes"
18559else
18560 echo "$as_me: failed program was:" >&5
19650fd6
AS
18561sed 's/^/| /' conftest.$ac_ext >&5
18562
ca81d7a0 18563 eval "$as_ac_var=no"
973a76b1 18564fi
ca81d7a0 18565
f053c89f 18566rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18567 conftest$ac_exeext conftest.$ac_ext
973a76b1 18568fi
ca81d7a0
JD
18569ac_res=`eval echo '${'$as_ac_var'}'`
18570 { echo "$as_me:$LINENO: result: $ac_res" >&5
18571echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
18572if test `eval echo '${'$as_ac_var'}'` = yes; then
18573 cat >>confdefs.h <<_ACEOF
18574#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18575_ACEOF
18576
18577else
18578 # strftime is in -lintl on SCO UNIX.
ca81d7a0
JD
18579{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
18580echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
18581if test "${ac_cv_lib_intl_strftime+set}" = set; then
18582 echo $ECHO_N "(cached) $ECHO_C" >&6
18583else
18584 ac_check_lib_save_LIBS=$LIBS
18585LIBS="-lintl $LIBS"
18586cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18587/* confdefs.h. */
18588_ACEOF
18589cat confdefs.h >>conftest.$ac_ext
18590cat >>conftest.$ac_ext <<_ACEOF
18591/* end confdefs.h. */
973a76b1 18592
ca81d7a0
JD
18593/* Override any GCC internal prototype to avoid an error.
18594 Use char because int might match the return type of a GCC
18595 builtin and then its argument prototype would still apply. */
973a76b1
DL
18596#ifdef __cplusplus
18597extern "C"
18598#endif
973a76b1
DL
18599char strftime ();
18600int
18601main ()
18602{
ca81d7a0 18603return strftime ();
973a76b1
DL
18604 ;
18605 return 0;
18606}
18607_ACEOF
18608rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18609if { (ac_try="$ac_link"
18610case "(($ac_try" in
18611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18612 *) ac_try_echo=$ac_try;;
18613esac
18614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18615 (eval "$ac_link") 2>conftest.er1
973a76b1 18616 ac_status=$?
edfaf76d
LK
18617 grep -v '^ *+' conftest.er1 >conftest.err
18618 rm -f conftest.er1
18619 cat conftest.err >&5
973a76b1 18620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18621 (exit $ac_status); } && {
18622 test -z "$ac_c_werror_flag" ||
18623 test ! -s conftest.err
18624 } && test -s conftest$ac_exeext &&
18625 $as_test_x conftest$ac_exeext; then
973a76b1
DL
18626 ac_cv_lib_intl_strftime=yes
18627else
18628 echo "$as_me: failed program was:" >&5
19650fd6
AS
18629sed 's/^/| /' conftest.$ac_ext >&5
18630
ca81d7a0 18631 ac_cv_lib_intl_strftime=no
973a76b1 18632fi
ca81d7a0 18633
f053c89f 18634rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18635 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
18636LIBS=$ac_check_lib_save_LIBS
18637fi
ca81d7a0
JD
18638{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
18639echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
18640if test $ac_cv_lib_intl_strftime = yes; then
18641 cat >>confdefs.h <<\_ACEOF
18642#define HAVE_STRFTIME 1
18643_ACEOF
18644
18645LIBS="-lintl $LIBS"
18646fi
18647
18648fi
18649done
18650
18651
b936fae4
AS
18652# UNIX98 PTYs.
18653
18654for ac_func in grantpt
503d2be0
AS
18655do
18656as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18657{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18658echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18659if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 18660 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18661else
503d2be0 18662 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18663/* confdefs.h. */
18664_ACEOF
18665cat confdefs.h >>conftest.$ac_ext
18666cat >>conftest.$ac_ext <<_ACEOF
18667/* end confdefs.h. */
edfaf76d
LK
18668/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18669 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18670#define $ac_func innocuous_$ac_func
18671
503d2be0 18672/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18673 which can conflict with char $ac_func (); below.
18674 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18675 <limits.h> exists even on freestanding compilers. */
edfaf76d 18676
19650fd6
AS
18677#ifdef __STDC__
18678# include <limits.h>
18679#else
18680# include <assert.h>
18681#endif
edfaf76d
LK
18682
18683#undef $ac_func
18684
ca81d7a0
JD
18685/* Override any GCC internal prototype to avoid an error.
18686 Use char because int might match the return type of a GCC
18687 builtin and then its argument prototype would still apply. */
503d2be0
AS
18688#ifdef __cplusplus
18689extern "C"
18690#endif
503d2be0 18691char $ac_func ();
503d2be0
AS
18692/* The GNU C library defines this for functions which it implements
18693 to always fail with ENOSYS. Some functions are actually named
18694 something starting with __ and the normal name is an alias. */
ca81d7a0 18695#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 18696choke me
503d2be0 18697#endif
4c343001 18698
19650fd6
AS
18699int
18700main ()
18701{
ca81d7a0 18702return $ac_func ();
503d2be0
AS
18703 ;
18704 return 0;
18705}
18706_ACEOF
18707rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18708if { (ac_try="$ac_link"
18709case "(($ac_try" in
18710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18711 *) ac_try_echo=$ac_try;;
18712esac
18713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18714 (eval "$ac_link") 2>conftest.er1
503d2be0 18715 ac_status=$?
edfaf76d
LK
18716 grep -v '^ *+' conftest.er1 >conftest.err
18717 rm -f conftest.er1
18718 cat conftest.err >&5
c0d27fcc 18719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18720 (exit $ac_status); } && {
18721 test -z "$ac_c_werror_flag" ||
18722 test ! -s conftest.err
18723 } && test -s conftest$ac_exeext &&
18724 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18725 eval "$as_ac_var=yes"
18726else
18727 echo "$as_me: failed program was:" >&5
19650fd6
AS
18728sed 's/^/| /' conftest.$ac_ext >&5
18729
ca81d7a0 18730 eval "$as_ac_var=no"
503d2be0 18731fi
ca81d7a0 18732
f053c89f 18733rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18734 conftest$ac_exeext conftest.$ac_ext
503d2be0 18735fi
ca81d7a0
JD
18736ac_res=`eval echo '${'$as_ac_var'}'`
18737 { echo "$as_me:$LINENO: result: $ac_res" >&5
18738echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18739if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18740 cat >>confdefs.h <<_ACEOF
503d2be0 18741#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18742_ACEOF
4c343001
DL
18743
18744fi
503d2be0
AS
18745done
18746
c0d27fcc 18747
b936fae4 18748# PTY-related GNU extensions.
4c343001 18749
b936fae4
AS
18750for ac_func in getpt
18751do
18752as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18753{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18754echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18755if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 18756 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18757else
b936fae4 18758 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18759/* confdefs.h. */
18760_ACEOF
18761cat confdefs.h >>conftest.$ac_ext
18762cat >>conftest.$ac_ext <<_ACEOF
18763/* end confdefs.h. */
edfaf76d
LK
18764/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18765 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18766#define $ac_func innocuous_$ac_func
18767
087121cc 18768/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18769 which can conflict with char $ac_func (); below.
18770 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18771 <limits.h> exists even on freestanding compilers. */
edfaf76d 18772
19650fd6
AS
18773#ifdef __STDC__
18774# include <limits.h>
18775#else
18776# include <assert.h>
18777#endif
edfaf76d
LK
18778
18779#undef $ac_func
18780
ca81d7a0
JD
18781/* Override any GCC internal prototype to avoid an error.
18782 Use char because int might match the return type of a GCC
18783 builtin and then its argument prototype would still apply. */
503d2be0
AS
18784#ifdef __cplusplus
18785extern "C"
18786#endif
503d2be0 18787char $ac_func ();
087121cc
GM
18788/* The GNU C library defines this for functions which it implements
18789 to always fail with ENOSYS. Some functions are actually named
18790 something starting with __ and the normal name is an alias. */
ca81d7a0 18791#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 18792choke me
087121cc
GM
18793#endif
18794
19650fd6
AS
18795int
18796main ()
18797{
ca81d7a0 18798return $ac_func ();
503d2be0
AS
18799 ;
18800 return 0;
18801}
18802_ACEOF
18803rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18804if { (ac_try="$ac_link"
18805case "(($ac_try" in
18806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18807 *) ac_try_echo=$ac_try;;
18808esac
18809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18810 (eval "$ac_link") 2>conftest.er1
503d2be0 18811 ac_status=$?
f053c89f
CY
18812 grep -v '^ *+' conftest.er1 >conftest.err
18813 rm -f conftest.er1
18814 cat conftest.err >&5
c0d27fcc 18815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18816 (exit $ac_status); } && {
18817 test -z "$ac_c_werror_flag" ||
18818 test ! -s conftest.err
18819 } && test -s conftest$ac_exeext &&
18820 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18821 eval "$as_ac_var=yes"
18822else
18823 echo "$as_me: failed program was:" >&5
19650fd6
AS
18824sed 's/^/| /' conftest.$ac_ext >&5
18825
ca81d7a0 18826 eval "$as_ac_var=no"
503d2be0 18827fi
ca81d7a0 18828
f053c89f 18829rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18830 conftest$ac_exeext conftest.$ac_ext
503d2be0 18831fi
ca81d7a0
JD
18832ac_res=`eval echo '${'$as_ac_var'}'`
18833 { echo "$as_me:$LINENO: result: $ac_res" >&5
18834echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18835if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18836 cat >>confdefs.h <<_ACEOF
503d2be0 18837#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18838_ACEOF
087121cc 18839
087121cc
GM
18840fi
18841done
18842
c0d27fcc 18843
ba4481b5
DL
18844# Check this now, so that we will NOT find the above functions in ncurses.
18845# That is because we have not set up to link ncurses in lib-src.
18846# It's better to believe a function is not available
18847# than to expect to find it in ncurses.
503d2be0 18848
ca81d7a0
JD
18849{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
18850echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
18851if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
18852 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18853else
503d2be0 18854 ac_check_lib_save_LIBS=$LIBS
ba4481b5 18855LIBS="-lncurses $LIBS"
503d2be0 18856cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18857/* confdefs.h. */
18858_ACEOF
18859cat confdefs.h >>conftest.$ac_ext
18860cat >>conftest.$ac_ext <<_ACEOF
18861/* end confdefs.h. */
503d2be0 18862
ca81d7a0
JD
18863/* Override any GCC internal prototype to avoid an error.
18864 Use char because int might match the return type of a GCC
18865 builtin and then its argument prototype would still apply. */
503d2be0
AS
18866#ifdef __cplusplus
18867extern "C"
18868#endif
503d2be0
AS
18869char tparm ();
18870int
18871main ()
18872{
ca81d7a0 18873return tparm ();
503d2be0
AS
18874 ;
18875 return 0;
18876}
18877_ACEOF
18878rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18879if { (ac_try="$ac_link"
18880case "(($ac_try" in
18881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18882 *) ac_try_echo=$ac_try;;
18883esac
18884eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18885 (eval "$ac_link") 2>conftest.er1
503d2be0 18886 ac_status=$?
edfaf76d
LK
18887 grep -v '^ *+' conftest.er1 >conftest.err
18888 rm -f conftest.er1
18889 cat conftest.err >&5
c0d27fcc 18890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18891 (exit $ac_status); } && {
18892 test -z "$ac_c_werror_flag" ||
18893 test ! -s conftest.err
18894 } && test -s conftest$ac_exeext &&
18895 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18896 ac_cv_lib_ncurses_tparm=yes
18897else
18898 echo "$as_me: failed program was:" >&5
19650fd6
AS
18899sed 's/^/| /' conftest.$ac_ext >&5
18900
ca81d7a0 18901 ac_cv_lib_ncurses_tparm=no
503d2be0 18902fi
ca81d7a0 18903
f053c89f 18904rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18905 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18906LIBS=$ac_check_lib_save_LIBS
18907fi
ca81d7a0
JD
18908{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
18909echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 18910if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 18911 cat >>confdefs.h <<_ACEOF
503d2be0 18912#define HAVE_LIBNCURSES 1
c0d27fcc 18913_ACEOF
ba4481b5
DL
18914
18915 LIBS="-lncurses $LIBS"
18916
ba4481b5
DL
18917fi
18918
c0d27fcc 18919
84e70f78
KR
18920# Do we need the Hesiod library to provide the support routines?
18921if test "$with_hesiod" = yes ; then
18922 # Don't set $LIBS here -- see comments above.
18923 resolv=no
ca81d7a0
JD
18924 { echo "$as_me:$LINENO: checking for res_send" >&5
18925echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
18926if test "${ac_cv_func_res_send+set}" = set; then
18927 echo $ECHO_N "(cached) $ECHO_C" >&6
18928else
18929 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18930/* confdefs.h. */
18931_ACEOF
18932cat confdefs.h >>conftest.$ac_ext
18933cat >>conftest.$ac_ext <<_ACEOF
18934/* end confdefs.h. */
edfaf76d
LK
18935/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
18936 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18937#define res_send innocuous_res_send
18938
84e70f78 18939/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18940 which can conflict with char res_send (); below.
18941 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18942 <limits.h> exists even on freestanding compilers. */
edfaf76d 18943
19650fd6
AS
18944#ifdef __STDC__
18945# include <limits.h>
18946#else
18947# include <assert.h>
18948#endif
edfaf76d
LK
18949
18950#undef res_send
18951
ca81d7a0
JD
18952/* Override any GCC internal prototype to avoid an error.
18953 Use char because int might match the return type of a GCC
18954 builtin and then its argument prototype would still apply. */
84e70f78
KR
18955#ifdef __cplusplus
18956extern "C"
18957#endif
84e70f78 18958char res_send ();
84e70f78
KR
18959/* The GNU C library defines this for functions which it implements
18960 to always fail with ENOSYS. Some functions are actually named
18961 something starting with __ and the normal name is an alias. */
ca81d7a0 18962#if defined __stub_res_send || defined __stub___res_send
84e70f78 18963choke me
cd958eb3
MB
18964#endif
18965
19650fd6
AS
18966int
18967main ()
18968{
ca81d7a0 18969return res_send ();
84e70f78
KR
18970 ;
18971 return 0;
18972}
18973_ACEOF
18974rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18975if { (ac_try="$ac_link"
18976case "(($ac_try" in
18977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18978 *) ac_try_echo=$ac_try;;
18979esac
18980eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18981 (eval "$ac_link") 2>conftest.er1
84e70f78 18982 ac_status=$?
edfaf76d
LK
18983 grep -v '^ *+' conftest.er1 >conftest.err
18984 rm -f conftest.er1
18985 cat conftest.err >&5
c0d27fcc 18986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18987 (exit $ac_status); } && {
18988 test -z "$ac_c_werror_flag" ||
18989 test ! -s conftest.err
18990 } && test -s conftest$ac_exeext &&
18991 $as_test_x conftest$ac_exeext; then
84e70f78
KR
18992 ac_cv_func_res_send=yes
18993else
18994 echo "$as_me: failed program was:" >&5
19650fd6
AS
18995sed 's/^/| /' conftest.$ac_ext >&5
18996
ca81d7a0 18997 ac_cv_func_res_send=no
84e70f78 18998fi
ca81d7a0 18999
f053c89f 19000rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19001 conftest$ac_exeext conftest.$ac_ext
84e70f78 19002fi
ca81d7a0
JD
19003{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
19004echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
19005if test $ac_cv_func_res_send = yes; then
19006 :
19007else
ca81d7a0
JD
19008 { echo "$as_me:$LINENO: checking for __res_send" >&5
19009echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
19010if test "${ac_cv_func___res_send+set}" = set; then
19011 echo $ECHO_N "(cached) $ECHO_C" >&6
19012else
19013 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19014/* confdefs.h. */
19015_ACEOF
19016cat confdefs.h >>conftest.$ac_ext
19017cat >>conftest.$ac_ext <<_ACEOF
19018/* end confdefs.h. */
edfaf76d
LK
19019/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
19020 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19021#define __res_send innocuous___res_send
19022
84e70f78 19023/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19024 which can conflict with char __res_send (); below.
19025 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19026 <limits.h> exists even on freestanding compilers. */
edfaf76d 19027
19650fd6
AS
19028#ifdef __STDC__
19029# include <limits.h>
19030#else
19031# include <assert.h>
19032#endif
edfaf76d
LK
19033
19034#undef __res_send
19035
ca81d7a0
JD
19036/* Override any GCC internal prototype to avoid an error.
19037 Use char because int might match the return type of a GCC
19038 builtin and then its argument prototype would still apply. */
84e70f78
KR
19039#ifdef __cplusplus
19040extern "C"
19041#endif
84e70f78 19042char __res_send ();
84e70f78
KR
19043/* The GNU C library defines this for functions which it implements
19044 to always fail with ENOSYS. Some functions are actually named
19045 something starting with __ and the normal name is an alias. */
ca81d7a0 19046#if defined __stub___res_send || defined __stub_____res_send
84e70f78 19047choke me
84e70f78
KR
19048#endif
19049
19650fd6
AS
19050int
19051main ()
19052{
ca81d7a0 19053return __res_send ();
84e70f78
KR
19054 ;
19055 return 0;
19056}
19057_ACEOF
19058rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19059if { (ac_try="$ac_link"
19060case "(($ac_try" in
19061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19062 *) ac_try_echo=$ac_try;;
19063esac
19064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19065 (eval "$ac_link") 2>conftest.er1
84e70f78 19066 ac_status=$?
edfaf76d
LK
19067 grep -v '^ *+' conftest.er1 >conftest.err
19068 rm -f conftest.er1
19069 cat conftest.err >&5
c0d27fcc 19070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19071 (exit $ac_status); } && {
19072 test -z "$ac_c_werror_flag" ||
19073 test ! -s conftest.err
19074 } && test -s conftest$ac_exeext &&
19075 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19076 ac_cv_func___res_send=yes
19077else
19078 echo "$as_me: failed program was:" >&5
19650fd6
AS
19079sed 's/^/| /' conftest.$ac_ext >&5
19080
ca81d7a0 19081 ac_cv_func___res_send=no
84e70f78 19082fi
ca81d7a0 19083
f053c89f 19084rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19085 conftest$ac_exeext conftest.$ac_ext
84e70f78 19086fi
ca81d7a0
JD
19087{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
19088echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
19089if test $ac_cv_func___res_send = yes; then
19090 :
19091else
ca81d7a0
JD
19092 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
19093echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19094if test "${ac_cv_lib_resolv_res_send+set}" = set; then
19095 echo $ECHO_N "(cached) $ECHO_C" >&6
19096else
19097 ac_check_lib_save_LIBS=$LIBS
19098LIBS="-lresolv $LIBS"
19099cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19100/* confdefs.h. */
19101_ACEOF
19102cat confdefs.h >>conftest.$ac_ext
19103cat >>conftest.$ac_ext <<_ACEOF
19104/* end confdefs.h. */
84e70f78 19105
ca81d7a0
JD
19106/* Override any GCC internal prototype to avoid an error.
19107 Use char because int might match the return type of a GCC
19108 builtin and then its argument prototype would still apply. */
84e70f78
KR
19109#ifdef __cplusplus
19110extern "C"
19111#endif
84e70f78
KR
19112char res_send ();
19113int
19114main ()
19115{
ca81d7a0 19116return res_send ();
84e70f78
KR
19117 ;
19118 return 0;
19119}
19120_ACEOF
19121rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19122if { (ac_try="$ac_link"
19123case "(($ac_try" in
19124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19125 *) ac_try_echo=$ac_try;;
19126esac
19127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19128 (eval "$ac_link") 2>conftest.er1
84e70f78 19129 ac_status=$?
edfaf76d
LK
19130 grep -v '^ *+' conftest.er1 >conftest.err
19131 rm -f conftest.er1
19132 cat conftest.err >&5
c0d27fcc 19133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19134 (exit $ac_status); } && {
19135 test -z "$ac_c_werror_flag" ||
19136 test ! -s conftest.err
19137 } && test -s conftest$ac_exeext &&
19138 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19139 ac_cv_lib_resolv_res_send=yes
19140else
19141 echo "$as_me: failed program was:" >&5
19650fd6
AS
19142sed 's/^/| /' conftest.$ac_ext >&5
19143
ca81d7a0 19144 ac_cv_lib_resolv_res_send=no
84e70f78 19145fi
ca81d7a0 19146
f053c89f 19147rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19148 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19149LIBS=$ac_check_lib_save_LIBS
19150fi
ca81d7a0
JD
19151{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
19152echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
19153if test $ac_cv_lib_resolv_res_send = yes; then
19154 resolv=yes
19155else
ca81d7a0
JD
19156 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
19157echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19158if test "${ac_cv_lib_resolv___res_send+set}" = set; then
19159 echo $ECHO_N "(cached) $ECHO_C" >&6
19160else
19161 ac_check_lib_save_LIBS=$LIBS
19162LIBS="-lresolv $LIBS"
19163cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19164/* confdefs.h. */
19165_ACEOF
19166cat confdefs.h >>conftest.$ac_ext
19167cat >>conftest.$ac_ext <<_ACEOF
19168/* end confdefs.h. */
84e70f78 19169
ca81d7a0
JD
19170/* Override any GCC internal prototype to avoid an error.
19171 Use char because int might match the return type of a GCC
19172 builtin and then its argument prototype would still apply. */
84e70f78
KR
19173#ifdef __cplusplus
19174extern "C"
19175#endif
84e70f78
KR
19176char __res_send ();
19177int
19178main ()
19179{
ca81d7a0 19180return __res_send ();
84e70f78
KR
19181 ;
19182 return 0;
19183}
19184_ACEOF
19185rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19186if { (ac_try="$ac_link"
19187case "(($ac_try" in
19188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19189 *) ac_try_echo=$ac_try;;
19190esac
19191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19192 (eval "$ac_link") 2>conftest.er1
84e70f78 19193 ac_status=$?
edfaf76d
LK
19194 grep -v '^ *+' conftest.er1 >conftest.err
19195 rm -f conftest.er1
19196 cat conftest.err >&5
c0d27fcc 19197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19198 (exit $ac_status); } && {
19199 test -z "$ac_c_werror_flag" ||
19200 test ! -s conftest.err
19201 } && test -s conftest$ac_exeext &&
19202 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19203 ac_cv_lib_resolv___res_send=yes
19204else
19205 echo "$as_me: failed program was:" >&5
19650fd6
AS
19206sed 's/^/| /' conftest.$ac_ext >&5
19207
ca81d7a0 19208 ac_cv_lib_resolv___res_send=no
84e70f78 19209fi
ca81d7a0 19210
f053c89f 19211rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19212 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19213LIBS=$ac_check_lib_save_LIBS
19214fi
ca81d7a0
JD
19215{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
19216echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
19217if test $ac_cv_lib_resolv___res_send = yes; then
19218 resolv=yes
19219fi
19220
19221fi
19222
19223fi
19224
19225fi
19226
19227 if test "$resolv" = yes ; then
19228 RESOLVLIB=-lresolv
b936fae4 19229
c0d27fcc 19230cat >>confdefs.h <<\_ACEOF
84e70f78 19231#define HAVE_LIBRESOLV 1
c0d27fcc 19232_ACEOF
84e70f78
KR
19233
19234 else
19235 RESOLVLIB=
19236 fi
ca81d7a0
JD
19237 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
19238echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
19239if test "${ac_cv_func_hes_getmailhost+set}" = set; then
19240 echo $ECHO_N "(cached) $ECHO_C" >&6
19241else
19242 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19243/* confdefs.h. */
19244_ACEOF
19245cat confdefs.h >>conftest.$ac_ext
19246cat >>conftest.$ac_ext <<_ACEOF
19247/* end confdefs.h. */
edfaf76d
LK
19248/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
19249 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19250#define hes_getmailhost innocuous_hes_getmailhost
19251
84e70f78 19252/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19253 which can conflict with char hes_getmailhost (); below.
19254 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19255 <limits.h> exists even on freestanding compilers. */
edfaf76d 19256
19650fd6
AS
19257#ifdef __STDC__
19258# include <limits.h>
19259#else
19260# include <assert.h>
19261#endif
edfaf76d
LK
19262
19263#undef hes_getmailhost
19264
ca81d7a0
JD
19265/* Override any GCC internal prototype to avoid an error.
19266 Use char because int might match the return type of a GCC
19267 builtin and then its argument prototype would still apply. */
84e70f78
KR
19268#ifdef __cplusplus
19269extern "C"
19270#endif
84e70f78 19271char hes_getmailhost ();
84e70f78
KR
19272/* The GNU C library defines this for functions which it implements
19273 to always fail with ENOSYS. Some functions are actually named
19274 something starting with __ and the normal name is an alias. */
ca81d7a0 19275#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 19276choke me
cd958eb3
MB
19277#endif
19278
19650fd6
AS
19279int
19280main ()
19281{
ca81d7a0 19282return hes_getmailhost ();
84e70f78
KR
19283 ;
19284 return 0;
19285}
19286_ACEOF
19287rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19288if { (ac_try="$ac_link"
19289case "(($ac_try" in
19290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19291 *) ac_try_echo=$ac_try;;
19292esac
19293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19294 (eval "$ac_link") 2>conftest.er1
84e70f78 19295 ac_status=$?
edfaf76d
LK
19296 grep -v '^ *+' conftest.er1 >conftest.err
19297 rm -f conftest.er1
19298 cat conftest.err >&5
c0d27fcc 19299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19300 (exit $ac_status); } && {
19301 test -z "$ac_c_werror_flag" ||
19302 test ! -s conftest.err
19303 } && test -s conftest$ac_exeext &&
19304 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19305 ac_cv_func_hes_getmailhost=yes
19306else
19307 echo "$as_me: failed program was:" >&5
19650fd6
AS
19308sed 's/^/| /' conftest.$ac_ext >&5
19309
ca81d7a0 19310 ac_cv_func_hes_getmailhost=no
84e70f78 19311fi
ca81d7a0 19312
f053c89f 19313rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19314 conftest$ac_exeext conftest.$ac_ext
84e70f78 19315fi
ca81d7a0
JD
19316{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
19317echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
19318if test $ac_cv_func_hes_getmailhost = yes; then
19319 :
19320else
ca81d7a0
JD
19321 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
19322echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
19323if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
19324 echo $ECHO_N "(cached) $ECHO_C" >&6
19325else
19326 ac_check_lib_save_LIBS=$LIBS
19327LIBS="-lhesiod $RESOLVLIB $LIBS"
19328cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19329/* confdefs.h. */
19330_ACEOF
19331cat confdefs.h >>conftest.$ac_ext
19332cat >>conftest.$ac_ext <<_ACEOF
19333/* end confdefs.h. */
84e70f78 19334
ca81d7a0
JD
19335/* Override any GCC internal prototype to avoid an error.
19336 Use char because int might match the return type of a GCC
19337 builtin and then its argument prototype would still apply. */
84e70f78
KR
19338#ifdef __cplusplus
19339extern "C"
19340#endif
84e70f78
KR
19341char hes_getmailhost ();
19342int
19343main ()
19344{
ca81d7a0 19345return hes_getmailhost ();
84e70f78
KR
19346 ;
19347 return 0;
19348}
19349_ACEOF
19350rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19351if { (ac_try="$ac_link"
19352case "(($ac_try" in
19353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19354 *) ac_try_echo=$ac_try;;
19355esac
19356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19357 (eval "$ac_link") 2>conftest.er1
84e70f78 19358 ac_status=$?
edfaf76d
LK
19359 grep -v '^ *+' conftest.er1 >conftest.err
19360 rm -f conftest.er1
19361 cat conftest.err >&5
c0d27fcc 19362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19363 (exit $ac_status); } && {
19364 test -z "$ac_c_werror_flag" ||
19365 test ! -s conftest.err
19366 } && test -s conftest$ac_exeext &&
19367 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19368 ac_cv_lib_hesiod_hes_getmailhost=yes
19369else
19370 echo "$as_me: failed program was:" >&5
19650fd6
AS
19371sed 's/^/| /' conftest.$ac_ext >&5
19372
ca81d7a0 19373 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 19374fi
ca81d7a0 19375
f053c89f 19376rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19377 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19378LIBS=$ac_check_lib_save_LIBS
19379fi
ca81d7a0
JD
19380{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
19381echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 19382if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 19383
c0d27fcc 19384cat >>confdefs.h <<\_ACEOF
84e70f78 19385#define HAVE_LIBHESIOD 1
c0d27fcc 19386_ACEOF
84e70f78
KR
19387
19388else
19389 :
19390fi
19391
19392fi
19393
19394fi
19395
a21616bd
KR
19396# These tell us which Kerberos-related libraries to use.
19397if test "${with_kerberos+set}" = set; then
503d2be0 19398
ca81d7a0
JD
19399{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
19400echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
19401if test "${ac_cv_lib_com_err_com_err+set}" = set; then
19402 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19403else
503d2be0 19404 ac_check_lib_save_LIBS=$LIBS
a21616bd 19405LIBS="-lcom_err $LIBS"
503d2be0 19406cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19407/* confdefs.h. */
19408_ACEOF
19409cat confdefs.h >>conftest.$ac_ext
19410cat >>conftest.$ac_ext <<_ACEOF
19411/* end confdefs.h. */
503d2be0 19412
ca81d7a0
JD
19413/* Override any GCC internal prototype to avoid an error.
19414 Use char because int might match the return type of a GCC
19415 builtin and then its argument prototype would still apply. */
503d2be0
AS
19416#ifdef __cplusplus
19417extern "C"
19418#endif
503d2be0
AS
19419char com_err ();
19420int
19421main ()
19422{
ca81d7a0 19423return com_err ();
503d2be0
AS
19424 ;
19425 return 0;
19426}
19427_ACEOF
19428rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19429if { (ac_try="$ac_link"
19430case "(($ac_try" in
19431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19432 *) ac_try_echo=$ac_try;;
19433esac
19434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19435 (eval "$ac_link") 2>conftest.er1
503d2be0 19436 ac_status=$?
edfaf76d
LK
19437 grep -v '^ *+' conftest.er1 >conftest.err
19438 rm -f conftest.er1
19439 cat conftest.err >&5
c0d27fcc 19440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19441 (exit $ac_status); } && {
19442 test -z "$ac_c_werror_flag" ||
19443 test ! -s conftest.err
19444 } && test -s conftest$ac_exeext &&
19445 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19446 ac_cv_lib_com_err_com_err=yes
19447else
19448 echo "$as_me: failed program was:" >&5
19650fd6
AS
19449sed 's/^/| /' conftest.$ac_ext >&5
19450
ca81d7a0 19451 ac_cv_lib_com_err_com_err=no
503d2be0 19452fi
ca81d7a0 19453
f053c89f 19454rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19455 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19456LIBS=$ac_check_lib_save_LIBS
19457fi
ca81d7a0
JD
19458{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
19459echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 19460if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 19461 cat >>confdefs.h <<_ACEOF
503d2be0 19462#define HAVE_LIBCOM_ERR 1
c0d27fcc 19463_ACEOF
a21616bd
KR
19464
19465 LIBS="-lcom_err $LIBS"
19466
a21616bd
KR
19467fi
19468
c0d27fcc 19469
ca81d7a0
JD
19470{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
19471echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
19472if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
19473 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19474else
503d2be0 19475 ac_check_lib_save_LIBS=$LIBS
a21616bd 19476LIBS="-lk5crypto $LIBS"
503d2be0 19477cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19478/* confdefs.h. */
19479_ACEOF
19480cat confdefs.h >>conftest.$ac_ext
19481cat >>conftest.$ac_ext <<_ACEOF
19482/* end confdefs.h. */
503d2be0 19483
ca81d7a0
JD
19484/* Override any GCC internal prototype to avoid an error.
19485 Use char because int might match the return type of a GCC
19486 builtin and then its argument prototype would still apply. */
503d2be0
AS
19487#ifdef __cplusplus
19488extern "C"
19489#endif
503d2be0
AS
19490char mit_des_cbc_encrypt ();
19491int
19492main ()
19493{
ca81d7a0 19494return mit_des_cbc_encrypt ();
503d2be0
AS
19495 ;
19496 return 0;
19497}
19498_ACEOF
19499rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19500if { (ac_try="$ac_link"
19501case "(($ac_try" in
19502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19503 *) ac_try_echo=$ac_try;;
19504esac
19505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19506 (eval "$ac_link") 2>conftest.er1
503d2be0 19507 ac_status=$?
edfaf76d
LK
19508 grep -v '^ *+' conftest.er1 >conftest.err
19509 rm -f conftest.er1
19510 cat conftest.err >&5
c0d27fcc 19511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19512 (exit $ac_status); } && {
19513 test -z "$ac_c_werror_flag" ||
19514 test ! -s conftest.err
19515 } && test -s conftest$ac_exeext &&
19516 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19517 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
19518else
19519 echo "$as_me: failed program was:" >&5
19650fd6
AS
19520sed 's/^/| /' conftest.$ac_ext >&5
19521
ca81d7a0 19522 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 19523fi
ca81d7a0 19524
f053c89f 19525rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19526 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19527LIBS=$ac_check_lib_save_LIBS
19528fi
ca81d7a0
JD
19529{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
19530echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 19531if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 19532 cat >>confdefs.h <<_ACEOF
503d2be0 19533#define HAVE_LIBK5CRYPTO 1
c0d27fcc 19534_ACEOF
a21616bd
KR
19535
19536 LIBS="-lk5crypto $LIBS"
19537
a21616bd
KR
19538fi
19539
c0d27fcc 19540
ca81d7a0
JD
19541{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
19542echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
19543if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
19544 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19545else
503d2be0 19546 ac_check_lib_save_LIBS=$LIBS
a21616bd 19547LIBS="-lcrypto $LIBS"
503d2be0 19548cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19549/* confdefs.h. */
19550_ACEOF
19551cat confdefs.h >>conftest.$ac_ext
19552cat >>conftest.$ac_ext <<_ACEOF
19553/* end confdefs.h. */
503d2be0 19554
ca81d7a0
JD
19555/* Override any GCC internal prototype to avoid an error.
19556 Use char because int might match the return type of a GCC
19557 builtin and then its argument prototype would still apply. */
503d2be0
AS
19558#ifdef __cplusplus
19559extern "C"
19560#endif
503d2be0
AS
19561char mit_des_cbc_encrypt ();
19562int
19563main ()
19564{
ca81d7a0 19565return mit_des_cbc_encrypt ();
503d2be0
AS
19566 ;
19567 return 0;
19568}
19569_ACEOF
19570rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19571if { (ac_try="$ac_link"
19572case "(($ac_try" in
19573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19574 *) ac_try_echo=$ac_try;;
19575esac
19576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19577 (eval "$ac_link") 2>conftest.er1
503d2be0 19578 ac_status=$?
edfaf76d
LK
19579 grep -v '^ *+' conftest.er1 >conftest.err
19580 rm -f conftest.er1
19581 cat conftest.err >&5
c0d27fcc 19582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19583 (exit $ac_status); } && {
19584 test -z "$ac_c_werror_flag" ||
19585 test ! -s conftest.err
19586 } && test -s conftest$ac_exeext &&
19587 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19588 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
19589else
19590 echo "$as_me: failed program was:" >&5
19650fd6
AS
19591sed 's/^/| /' conftest.$ac_ext >&5
19592
ca81d7a0 19593 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 19594fi
ca81d7a0 19595
f053c89f 19596rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19597 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19598LIBS=$ac_check_lib_save_LIBS
19599fi
ca81d7a0
JD
19600{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
19601echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 19602if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 19603 cat >>confdefs.h <<_ACEOF
503d2be0 19604#define HAVE_LIBCRYPTO 1
c0d27fcc 19605_ACEOF
a21616bd
KR
19606
19607 LIBS="-lcrypto $LIBS"
19608
a21616bd
KR
19609fi
19610
c0d27fcc 19611
ca81d7a0
JD
19612{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
19613echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
19614if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
19615 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19616else
503d2be0 19617 ac_check_lib_save_LIBS=$LIBS
a21616bd 19618LIBS="-lkrb5 $LIBS"
503d2be0 19619cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19620/* confdefs.h. */
19621_ACEOF
19622cat confdefs.h >>conftest.$ac_ext
19623cat >>conftest.$ac_ext <<_ACEOF
19624/* end confdefs.h. */
a21616bd 19625
ca81d7a0
JD
19626/* Override any GCC internal prototype to avoid an error.
19627 Use char because int might match the return type of a GCC
19628 builtin and then its argument prototype would still apply. */
503d2be0
AS
19629#ifdef __cplusplus
19630extern "C"
19631#endif
503d2be0
AS
19632char krb5_init_context ();
19633int
19634main ()
19635{
ca81d7a0 19636return krb5_init_context ();
503d2be0
AS
19637 ;
19638 return 0;
19639}
19640_ACEOF
19641rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19642if { (ac_try="$ac_link"
19643case "(($ac_try" in
19644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19645 *) ac_try_echo=$ac_try;;
19646esac
19647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19648 (eval "$ac_link") 2>conftest.er1
503d2be0 19649 ac_status=$?
edfaf76d
LK
19650 grep -v '^ *+' conftest.er1 >conftest.err
19651 rm -f conftest.er1
19652 cat conftest.err >&5
c0d27fcc 19653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19654 (exit $ac_status); } && {
19655 test -z "$ac_c_werror_flag" ||
19656 test ! -s conftest.err
19657 } && test -s conftest$ac_exeext &&
19658 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19659 ac_cv_lib_krb5_krb5_init_context=yes
19660else
19661 echo "$as_me: failed program was:" >&5
19650fd6
AS
19662sed 's/^/| /' conftest.$ac_ext >&5
19663
ca81d7a0 19664 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 19665fi
ca81d7a0 19666
f053c89f 19667rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19668 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19669LIBS=$ac_check_lib_save_LIBS
19670fi
ca81d7a0
JD
19671{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
19672echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 19673if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 19674 cat >>confdefs.h <<_ACEOF
503d2be0 19675#define HAVE_LIBKRB5 1
c0d27fcc 19676_ACEOF
a21616bd
KR
19677
19678 LIBS="-lkrb5 $LIBS"
19679
a21616bd
KR
19680fi
19681
19682 if test "${with_kerberos5+set}" != set; then
503d2be0 19683
ca81d7a0
JD
19684{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
19685echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
19686if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
19687 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19688else
503d2be0 19689 ac_check_lib_save_LIBS=$LIBS
a21616bd 19690LIBS="-ldes425 $LIBS"
503d2be0 19691cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19692/* confdefs.h. */
19693_ACEOF
19694cat confdefs.h >>conftest.$ac_ext
19695cat >>conftest.$ac_ext <<_ACEOF
19696/* end confdefs.h. */
503d2be0 19697
ca81d7a0
JD
19698/* Override any GCC internal prototype to avoid an error.
19699 Use char because int might match the return type of a GCC
19700 builtin and then its argument prototype would still apply. */
503d2be0
AS
19701#ifdef __cplusplus
19702extern "C"
19703#endif
503d2be0
AS
19704char des_cbc_encrypt ();
19705int
19706main ()
19707{
ca81d7a0 19708return des_cbc_encrypt ();
503d2be0
AS
19709 ;
19710 return 0;
19711}
19712_ACEOF
19713rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19714if { (ac_try="$ac_link"
19715case "(($ac_try" in
19716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19717 *) ac_try_echo=$ac_try;;
19718esac
19719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19720 (eval "$ac_link") 2>conftest.er1
503d2be0 19721 ac_status=$?
edfaf76d
LK
19722 grep -v '^ *+' conftest.er1 >conftest.err
19723 rm -f conftest.er1
19724 cat conftest.err >&5
c0d27fcc 19725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19726 (exit $ac_status); } && {
19727 test -z "$ac_c_werror_flag" ||
19728 test ! -s conftest.err
19729 } && test -s conftest$ac_exeext &&
19730 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19731 ac_cv_lib_des425_des_cbc_encrypt=yes
19732else
19733 echo "$as_me: failed program was:" >&5
19650fd6
AS
19734sed 's/^/| /' conftest.$ac_ext >&5
19735
ca81d7a0 19736 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 19737fi
ca81d7a0 19738
f053c89f 19739rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19740 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19741LIBS=$ac_check_lib_save_LIBS
19742fi
ca81d7a0
JD
19743{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
19744echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 19745if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 19746 cat >>confdefs.h <<_ACEOF
503d2be0 19747#define HAVE_LIBDES425 1
c0d27fcc 19748_ACEOF
a21616bd
KR
19749
19750 LIBS="-ldes425 $LIBS"
19751
19752else
503d2be0 19753
ca81d7a0
JD
19754{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
19755echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
19756if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
19757 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19758else
503d2be0 19759 ac_check_lib_save_LIBS=$LIBS
a21616bd 19760LIBS="-ldes $LIBS"
503d2be0 19761cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19762/* confdefs.h. */
19763_ACEOF
19764cat confdefs.h >>conftest.$ac_ext
19765cat >>conftest.$ac_ext <<_ACEOF
19766/* end confdefs.h. */
503d2be0 19767
ca81d7a0
JD
19768/* Override any GCC internal prototype to avoid an error.
19769 Use char because int might match the return type of a GCC
19770 builtin and then its argument prototype would still apply. */
503d2be0
AS
19771#ifdef __cplusplus
19772extern "C"
19773#endif
503d2be0
AS
19774char des_cbc_encrypt ();
19775int
19776main ()
19777{
ca81d7a0 19778return des_cbc_encrypt ();
503d2be0
AS
19779 ;
19780 return 0;
19781}
19782_ACEOF
19783rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19784if { (ac_try="$ac_link"
19785case "(($ac_try" in
19786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19787 *) ac_try_echo=$ac_try;;
19788esac
19789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19790 (eval "$ac_link") 2>conftest.er1
503d2be0 19791 ac_status=$?
edfaf76d
LK
19792 grep -v '^ *+' conftest.er1 >conftest.err
19793 rm -f conftest.er1
19794 cat conftest.err >&5
c0d27fcc 19795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19796 (exit $ac_status); } && {
19797 test -z "$ac_c_werror_flag" ||
19798 test ! -s conftest.err
19799 } && test -s conftest$ac_exeext &&
19800 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19801 ac_cv_lib_des_des_cbc_encrypt=yes
19802else
19803 echo "$as_me: failed program was:" >&5
19650fd6
AS
19804sed 's/^/| /' conftest.$ac_ext >&5
19805
ca81d7a0 19806 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 19807fi
ca81d7a0 19808
f053c89f 19809rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19810 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19811LIBS=$ac_check_lib_save_LIBS
19812fi
ca81d7a0
JD
19813{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
19814echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 19815if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 19816 cat >>confdefs.h <<_ACEOF
503d2be0 19817#define HAVE_LIBDES 1
c0d27fcc 19818_ACEOF
a21616bd
KR
19819
19820 LIBS="-ldes $LIBS"
19821
a21616bd
KR
19822fi
19823
19824fi
19825
c0d27fcc 19826
ca81d7a0
JD
19827{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
19828echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
19829if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
19830 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19831else
503d2be0 19832 ac_check_lib_save_LIBS=$LIBS
a21616bd 19833LIBS="-lkrb4 $LIBS"
503d2be0 19834cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19835/* confdefs.h. */
19836_ACEOF
19837cat confdefs.h >>conftest.$ac_ext
19838cat >>conftest.$ac_ext <<_ACEOF
19839/* end confdefs.h. */
503d2be0 19840
ca81d7a0
JD
19841/* Override any GCC internal prototype to avoid an error.
19842 Use char because int might match the return type of a GCC
19843 builtin and then its argument prototype would still apply. */
503d2be0
AS
19844#ifdef __cplusplus
19845extern "C"
19846#endif
503d2be0
AS
19847char krb_get_cred ();
19848int
f053c89f
CY
19849main ()
19850{
19851return krb_get_cred ();
19852 ;
19853 return 0;
19854}
19855_ACEOF
19856rm -f conftest.$ac_objext conftest$ac_exeext
19857if { (ac_try="$ac_link"
19858case "(($ac_try" in
ca81d7a0
JD
19859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19860 *) ac_try_echo=$ac_try;;
19861esac
19862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19863 (eval "$ac_link") 2>conftest.er1
503d2be0 19864 ac_status=$?
f053c89f
CY
19865 grep -v '^ *+' conftest.er1 >conftest.err
19866 rm -f conftest.er1
19867 cat conftest.err >&5
c0d27fcc 19868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19869 (exit $ac_status); } && {
19870 test -z "$ac_c_werror_flag" ||
19871 test ! -s conftest.err
19872 } && test -s conftest$ac_exeext &&
19873 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19874 ac_cv_lib_krb4_krb_get_cred=yes
19875else
19876 echo "$as_me: failed program was:" >&5
19650fd6
AS
19877sed 's/^/| /' conftest.$ac_ext >&5
19878
ca81d7a0 19879 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 19880fi
ca81d7a0 19881
f053c89f 19882rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19883 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19884LIBS=$ac_check_lib_save_LIBS
19885fi
ca81d7a0
JD
19886{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
19887echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 19888if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 19889 cat >>confdefs.h <<_ACEOF
503d2be0 19890#define HAVE_LIBKRB4 1
c0d27fcc 19891_ACEOF
a21616bd
KR
19892
19893 LIBS="-lkrb4 $LIBS"
19894
19895else
503d2be0 19896
ca81d7a0
JD
19897{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
19898echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
19899if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
19900 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19901else
503d2be0 19902 ac_check_lib_save_LIBS=$LIBS
a21616bd 19903LIBS="-lkrb $LIBS"
503d2be0 19904cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19905/* confdefs.h. */
19906_ACEOF
19907cat confdefs.h >>conftest.$ac_ext
19908cat >>conftest.$ac_ext <<_ACEOF
19909/* end confdefs.h. */
503d2be0 19910
ca81d7a0
JD
19911/* Override any GCC internal prototype to avoid an error.
19912 Use char because int might match the return type of a GCC
19913 builtin and then its argument prototype would still apply. */
503d2be0
AS
19914#ifdef __cplusplus
19915extern "C"
19916#endif
503d2be0
AS
19917char krb_get_cred ();
19918int
19919main ()
19920{
ca81d7a0 19921return krb_get_cred ();
503d2be0
AS
19922 ;
19923 return 0;
19924}
19925_ACEOF
19926rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19927if { (ac_try="$ac_link"
19928case "(($ac_try" in
19929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19930 *) ac_try_echo=$ac_try;;
19931esac
19932eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19933 (eval "$ac_link") 2>conftest.er1
503d2be0 19934 ac_status=$?
edfaf76d
LK
19935 grep -v '^ *+' conftest.er1 >conftest.err
19936 rm -f conftest.er1
19937 cat conftest.err >&5
c0d27fcc 19938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19939 (exit $ac_status); } && {
19940 test -z "$ac_c_werror_flag" ||
19941 test ! -s conftest.err
19942 } && test -s conftest$ac_exeext &&
19943 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19944 ac_cv_lib_krb_krb_get_cred=yes
19945else
19946 echo "$as_me: failed program was:" >&5
19650fd6
AS
19947sed 's/^/| /' conftest.$ac_ext >&5
19948
ca81d7a0 19949 ac_cv_lib_krb_krb_get_cred=no
503d2be0 19950fi
ca81d7a0 19951
f053c89f 19952rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19953 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19954LIBS=$ac_check_lib_save_LIBS
19955fi
ca81d7a0
JD
19956{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
19957echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 19958if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 19959 cat >>confdefs.h <<_ACEOF
503d2be0 19960#define HAVE_LIBKRB 1
c0d27fcc 19961_ACEOF
a21616bd
KR
19962
19963 LIBS="-lkrb $LIBS"
19964
a21616bd
KR
19965fi
19966
19967fi
19968
19969 fi
19970
19971 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
19972
19973for ac_header in krb5.h
a21616bd 19974do
503d2be0 19975as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
19976if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19977 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19978echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19979if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19980 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 19981fi
ca81d7a0
JD
19982ac_res=`eval echo '${'$as_ac_Header'}'`
19983 { echo "$as_me:$LINENO: result: $ac_res" >&5
19984echo "${ECHO_T}$ac_res" >&6; }
98418dba 19985else
c0d27fcc 19986 # Is the header compilable?
ca81d7a0
JD
19987{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
19988echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 19989cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19990/* confdefs.h. */
19991_ACEOF
19992cat confdefs.h >>conftest.$ac_ext
19993cat >>conftest.$ac_ext <<_ACEOF
19994/* end confdefs.h. */
c0d27fcc
MR
19995$ac_includes_default
19996#include <$ac_header>
19997_ACEOF
19998rm -f conftest.$ac_objext
ca81d7a0
JD
19999if { (ac_try="$ac_compile"
20000case "(($ac_try" in
20001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20002 *) ac_try_echo=$ac_try;;
20003esac
20004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20005 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20006 ac_status=$?
edfaf76d
LK
20007 grep -v '^ *+' conftest.er1 >conftest.err
20008 rm -f conftest.er1
20009 cat conftest.err >&5
c0d27fcc 20010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20011 (exit $ac_status); } && {
20012 test -z "$ac_c_werror_flag" ||
20013 test ! -s conftest.err
20014 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20015 ac_header_compiler=yes
20016else
20017 echo "$as_me: failed program was:" >&5
19650fd6
AS
20018sed 's/^/| /' conftest.$ac_ext >&5
20019
ca81d7a0 20020 ac_header_compiler=no
c0d27fcc 20021fi
ca81d7a0
JD
20022
20023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20024{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20025echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20026
20027# Is the header present?
ca81d7a0
JD
20028{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20029echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20030cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20031/* confdefs.h. */
20032_ACEOF
20033cat confdefs.h >>conftest.$ac_ext
20034cat >>conftest.$ac_ext <<_ACEOF
20035/* end confdefs.h. */
503d2be0
AS
20036#include <$ac_header>
20037_ACEOF
ca81d7a0
JD
20038if { (ac_try="$ac_cpp conftest.$ac_ext"
20039case "(($ac_try" in
20040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20041 *) ac_try_echo=$ac_try;;
20042esac
20043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20044 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20045 ac_status=$?
6bae0ccf 20046 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20047 rm -f conftest.er1
20048 cat conftest.err >&5
c0d27fcc 20049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20050 (exit $ac_status); } >/dev/null && {
20051 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20052 test ! -s conftest.err
20053 }; then
c0d27fcc 20054 ac_header_preproc=yes
503d2be0
AS
20055else
20056 echo "$as_me: failed program was:" >&5
19650fd6
AS
20057sed 's/^/| /' conftest.$ac_ext >&5
20058
c0d27fcc 20059 ac_header_preproc=no
a21616bd 20060fi
ca81d7a0 20061
503d2be0 20062rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20063{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20064echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20065
20066# So? What about this header?
edfaf76d
LK
20067case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20068 yes:no: )
c0d27fcc
MR
20069 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20070echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20071 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20072echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20073 ac_header_preproc=yes
19650fd6 20074 ;;
edfaf76d 20075 no:yes:* )
c0d27fcc
MR
20076 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20077echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20078 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20079echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20080 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20081echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20082 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20083echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20084 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20085echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20086 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20087echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20088
19650fd6 20089 ;;
c0d27fcc 20090esac
ca81d7a0
JD
20091{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20092echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20093if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20094 echo $ECHO_N "(cached) $ECHO_C" >&6
20095else
edfaf76d 20096 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20097fi
ca81d7a0
JD
20098ac_res=`eval echo '${'$as_ac_Header'}'`
20099 { echo "$as_me:$LINENO: result: $ac_res" >&5
20100echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20101
20102fi
503d2be0 20103if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20104 cat >>confdefs.h <<_ACEOF
503d2be0 20105#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20106_ACEOF
503d2be0 20107
a21616bd 20108fi
c0d27fcc 20109
a21616bd
KR
20110done
20111
20112 else
503d2be0
AS
20113
20114for ac_header in des.h
a21616bd 20115do
503d2be0 20116as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20117if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20118 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20119echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20120if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20121 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20122fi
ca81d7a0
JD
20123ac_res=`eval echo '${'$as_ac_Header'}'`
20124 { echo "$as_me:$LINENO: result: $ac_res" >&5
20125echo "${ECHO_T}$ac_res" >&6; }
98418dba 20126else
c0d27fcc 20127 # Is the header compilable?
ca81d7a0
JD
20128{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20129echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20130cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20131/* confdefs.h. */
20132_ACEOF
20133cat confdefs.h >>conftest.$ac_ext
20134cat >>conftest.$ac_ext <<_ACEOF
20135/* end confdefs.h. */
c0d27fcc
MR
20136$ac_includes_default
20137#include <$ac_header>
20138_ACEOF
20139rm -f conftest.$ac_objext
ca81d7a0
JD
20140if { (ac_try="$ac_compile"
20141case "(($ac_try" in
20142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20143 *) ac_try_echo=$ac_try;;
20144esac
20145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20146 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20147 ac_status=$?
edfaf76d
LK
20148 grep -v '^ *+' conftest.er1 >conftest.err
20149 rm -f conftest.er1
20150 cat conftest.err >&5
c0d27fcc 20151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20152 (exit $ac_status); } && {
20153 test -z "$ac_c_werror_flag" ||
20154 test ! -s conftest.err
20155 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20156 ac_header_compiler=yes
20157else
20158 echo "$as_me: failed program was:" >&5
19650fd6
AS
20159sed 's/^/| /' conftest.$ac_ext >&5
20160
ca81d7a0 20161 ac_header_compiler=no
c0d27fcc 20162fi
ca81d7a0
JD
20163
20164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20165{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20166echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20167
20168# Is the header present?
ca81d7a0
JD
20169{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20170echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20171cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20172/* confdefs.h. */
20173_ACEOF
20174cat confdefs.h >>conftest.$ac_ext
20175cat >>conftest.$ac_ext <<_ACEOF
20176/* end confdefs.h. */
503d2be0
AS
20177#include <$ac_header>
20178_ACEOF
ca81d7a0
JD
20179if { (ac_try="$ac_cpp conftest.$ac_ext"
20180case "(($ac_try" in
20181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20182 *) ac_try_echo=$ac_try;;
20183esac
20184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20185 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20186 ac_status=$?
6bae0ccf 20187 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20188 rm -f conftest.er1
20189 cat conftest.err >&5
c0d27fcc 20190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20191 (exit $ac_status); } >/dev/null && {
20192 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20193 test ! -s conftest.err
20194 }; then
c0d27fcc 20195 ac_header_preproc=yes
503d2be0
AS
20196else
20197 echo "$as_me: failed program was:" >&5
19650fd6
AS
20198sed 's/^/| /' conftest.$ac_ext >&5
20199
c0d27fcc 20200 ac_header_preproc=no
a21616bd 20201fi
ca81d7a0 20202
503d2be0 20203rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20204{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20205echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20206
20207# So? What about this header?
edfaf76d
LK
20208case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20209 yes:no: )
c0d27fcc
MR
20210 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20211echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20212 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20213echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20214 ac_header_preproc=yes
19650fd6 20215 ;;
edfaf76d 20216 no:yes:* )
c0d27fcc
MR
20217 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20218echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20219 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20220echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20221 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20222echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20223 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20224echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20225 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20226echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20227 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20228echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20229
19650fd6 20230 ;;
c0d27fcc 20231esac
ca81d7a0
JD
20232{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20233echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20234if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20235 echo $ECHO_N "(cached) $ECHO_C" >&6
20236else
edfaf76d 20237 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20238fi
ca81d7a0
JD
20239ac_res=`eval echo '${'$as_ac_Header'}'`
20240 { echo "$as_me:$LINENO: result: $ac_res" >&5
20241echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20242
20243fi
503d2be0 20244if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20245 cat >>confdefs.h <<_ACEOF
503d2be0 20246#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20247_ACEOF
503d2be0 20248
a21616bd 20249else
503d2be0
AS
20250
20251for ac_header in kerberosIV/des.h
a21616bd 20252do
503d2be0 20253as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20254if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20255 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20256echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20257if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20258 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20259fi
ca81d7a0
JD
20260ac_res=`eval echo '${'$as_ac_Header'}'`
20261 { echo "$as_me:$LINENO: result: $ac_res" >&5
20262echo "${ECHO_T}$ac_res" >&6; }
98418dba 20263else
c0d27fcc 20264 # Is the header compilable?
ca81d7a0
JD
20265{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20266echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20267cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20268/* confdefs.h. */
20269_ACEOF
20270cat confdefs.h >>conftest.$ac_ext
20271cat >>conftest.$ac_ext <<_ACEOF
20272/* end confdefs.h. */
c0d27fcc
MR
20273$ac_includes_default
20274#include <$ac_header>
20275_ACEOF
20276rm -f conftest.$ac_objext
ca81d7a0
JD
20277if { (ac_try="$ac_compile"
20278case "(($ac_try" in
20279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20280 *) ac_try_echo=$ac_try;;
20281esac
20282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20283 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20284 ac_status=$?
edfaf76d
LK
20285 grep -v '^ *+' conftest.er1 >conftest.err
20286 rm -f conftest.er1
20287 cat conftest.err >&5
c0d27fcc 20288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20289 (exit $ac_status); } && {
20290 test -z "$ac_c_werror_flag" ||
20291 test ! -s conftest.err
20292 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20293 ac_header_compiler=yes
20294else
20295 echo "$as_me: failed program was:" >&5
19650fd6
AS
20296sed 's/^/| /' conftest.$ac_ext >&5
20297
ca81d7a0 20298 ac_header_compiler=no
c0d27fcc 20299fi
ca81d7a0
JD
20300
20301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20302{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20303echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20304
20305# Is the header present?
ca81d7a0
JD
20306{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20307echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20308cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20309/* confdefs.h. */
20310_ACEOF
20311cat confdefs.h >>conftest.$ac_ext
20312cat >>conftest.$ac_ext <<_ACEOF
20313/* end confdefs.h. */
503d2be0
AS
20314#include <$ac_header>
20315_ACEOF
ca81d7a0
JD
20316if { (ac_try="$ac_cpp conftest.$ac_ext"
20317case "(($ac_try" in
20318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20319 *) ac_try_echo=$ac_try;;
20320esac
20321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20322 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20323 ac_status=$?
6bae0ccf 20324 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20325 rm -f conftest.er1
20326 cat conftest.err >&5
c0d27fcc 20327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20328 (exit $ac_status); } >/dev/null && {
20329 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20330 test ! -s conftest.err
20331 }; then
c0d27fcc 20332 ac_header_preproc=yes
503d2be0
AS
20333else
20334 echo "$as_me: failed program was:" >&5
19650fd6
AS
20335sed 's/^/| /' conftest.$ac_ext >&5
20336
c0d27fcc 20337 ac_header_preproc=no
a21616bd 20338fi
ca81d7a0 20339
503d2be0 20340rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20341{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20342echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20343
20344# So? What about this header?
edfaf76d
LK
20345case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20346 yes:no: )
c0d27fcc
MR
20347 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20348echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20349 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20350echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20351 ac_header_preproc=yes
19650fd6 20352 ;;
edfaf76d 20353 no:yes:* )
c0d27fcc
MR
20354 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20355echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20356 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20357echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20358 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20359echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20360 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20361echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20362 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20363echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20364 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20365echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20366
19650fd6 20367 ;;
c0d27fcc 20368esac
ca81d7a0
JD
20369{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20370echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20371if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20372 echo $ECHO_N "(cached) $ECHO_C" >&6
20373else
edfaf76d 20374 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20375fi
ca81d7a0
JD
20376ac_res=`eval echo '${'$as_ac_Header'}'`
20377 { echo "$as_me:$LINENO: result: $ac_res" >&5
20378echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20379
20380fi
503d2be0 20381if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20382 cat >>confdefs.h <<_ACEOF
503d2be0 20383#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20384_ACEOF
503d2be0 20385
a21616bd 20386else
503d2be0
AS
20387
20388for ac_header in kerberos/des.h
a21616bd 20389do
503d2be0 20390as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20391if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20392 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20393echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20394if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20395 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20396fi
ca81d7a0
JD
20397ac_res=`eval echo '${'$as_ac_Header'}'`
20398 { echo "$as_me:$LINENO: result: $ac_res" >&5
20399echo "${ECHO_T}$ac_res" >&6; }
98418dba 20400else
c0d27fcc 20401 # Is the header compilable?
ca81d7a0
JD
20402{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20403echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20404cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20405/* confdefs.h. */
20406_ACEOF
20407cat confdefs.h >>conftest.$ac_ext
20408cat >>conftest.$ac_ext <<_ACEOF
20409/* end confdefs.h. */
c0d27fcc
MR
20410$ac_includes_default
20411#include <$ac_header>
20412_ACEOF
20413rm -f conftest.$ac_objext
ca81d7a0
JD
20414if { (ac_try="$ac_compile"
20415case "(($ac_try" in
20416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20417 *) ac_try_echo=$ac_try;;
20418esac
20419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20420 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20421 ac_status=$?
edfaf76d
LK
20422 grep -v '^ *+' conftest.er1 >conftest.err
20423 rm -f conftest.er1
20424 cat conftest.err >&5
c0d27fcc 20425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20426 (exit $ac_status); } && {
20427 test -z "$ac_c_werror_flag" ||
20428 test ! -s conftest.err
20429 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20430 ac_header_compiler=yes
20431else
20432 echo "$as_me: failed program was:" >&5
19650fd6
AS
20433sed 's/^/| /' conftest.$ac_ext >&5
20434
ca81d7a0 20435 ac_header_compiler=no
c0d27fcc 20436fi
ca81d7a0
JD
20437
20438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20439{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20440echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20441
20442# Is the header present?
ca81d7a0
JD
20443{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20444echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20445cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20446/* confdefs.h. */
20447_ACEOF
20448cat confdefs.h >>conftest.$ac_ext
20449cat >>conftest.$ac_ext <<_ACEOF
20450/* end confdefs.h. */
503d2be0
AS
20451#include <$ac_header>
20452_ACEOF
ca81d7a0
JD
20453if { (ac_try="$ac_cpp conftest.$ac_ext"
20454case "(($ac_try" in
20455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20456 *) ac_try_echo=$ac_try;;
20457esac
20458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20459 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20460 ac_status=$?
6bae0ccf 20461 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20462 rm -f conftest.er1
20463 cat conftest.err >&5
c0d27fcc 20464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20465 (exit $ac_status); } >/dev/null && {
20466 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20467 test ! -s conftest.err
20468 }; then
c0d27fcc 20469 ac_header_preproc=yes
503d2be0
AS
20470else
20471 echo "$as_me: failed program was:" >&5
19650fd6
AS
20472sed 's/^/| /' conftest.$ac_ext >&5
20473
c0d27fcc 20474 ac_header_preproc=no
a21616bd 20475fi
ca81d7a0 20476
503d2be0 20477rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20478{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20479echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20480
20481# So? What about this header?
edfaf76d
LK
20482case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20483 yes:no: )
c0d27fcc
MR
20484 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20485echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20486 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20487echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20488 ac_header_preproc=yes
19650fd6 20489 ;;
edfaf76d 20490 no:yes:* )
c0d27fcc
MR
20491 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20492echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20493 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20494echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20495 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20496echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20497 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20498echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20499 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20500echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20501 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20502echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20503
19650fd6 20504 ;;
c0d27fcc 20505esac
ca81d7a0
JD
20506{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20507echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20508if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20509 echo $ECHO_N "(cached) $ECHO_C" >&6
20510else
edfaf76d 20511 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20512fi
ca81d7a0
JD
20513ac_res=`eval echo '${'$as_ac_Header'}'`
20514 { echo "$as_me:$LINENO: result: $ac_res" >&5
20515echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20516
20517fi
503d2be0 20518if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20519 cat >>confdefs.h <<_ACEOF
503d2be0 20520#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20521_ACEOF
a21616bd
KR
20522
20523fi
c0d27fcc 20524
a21616bd
KR
20525done
20526
98418dba 20527fi
c0d27fcc 20528
925c2f3f
EZ
20529done
20530
98418dba 20531fi
c0d27fcc 20532
925c2f3f 20533done
98418dba 20534
c0d27fcc 20535
925c2f3f
EZ
20536for ac_header in krb.h
20537do
20538as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20539if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20540 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20541echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20542if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 20543 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20544fi
ca81d7a0
JD
20545ac_res=`eval echo '${'$as_ac_Header'}'`
20546 { echo "$as_me:$LINENO: result: $ac_res" >&5
20547echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20548else
20549 # Is the header compilable?
ca81d7a0
JD
20550{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20551echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20552cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20553/* confdefs.h. */
20554_ACEOF
20555cat confdefs.h >>conftest.$ac_ext
20556cat >>conftest.$ac_ext <<_ACEOF
20557/* end confdefs.h. */
c0d27fcc
MR
20558$ac_includes_default
20559#include <$ac_header>
20560_ACEOF
20561rm -f conftest.$ac_objext
ca81d7a0
JD
20562if { (ac_try="$ac_compile"
20563case "(($ac_try" in
20564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20565 *) ac_try_echo=$ac_try;;
20566esac
20567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20568 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20569 ac_status=$?
edfaf76d
LK
20570 grep -v '^ *+' conftest.er1 >conftest.err
20571 rm -f conftest.er1
20572 cat conftest.err >&5
c0d27fcc 20573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20574 (exit $ac_status); } && {
20575 test -z "$ac_c_werror_flag" ||
20576 test ! -s conftest.err
20577 } && test -s conftest.$ac_objext; then
c0d27fcc 20578 ac_header_compiler=yes
925c2f3f 20579else
c0d27fcc 20580 echo "$as_me: failed program was:" >&5
19650fd6
AS
20581sed 's/^/| /' conftest.$ac_ext >&5
20582
ca81d7a0 20583 ac_header_compiler=no
c0d27fcc 20584fi
ca81d7a0
JD
20585
20586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20587{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20588echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20589
20590# Is the header present?
ca81d7a0
JD
20591{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20592echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20593cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20594/* confdefs.h. */
20595_ACEOF
20596cat confdefs.h >>conftest.$ac_ext
20597cat >>conftest.$ac_ext <<_ACEOF
20598/* end confdefs.h. */
503d2be0
AS
20599#include <$ac_header>
20600_ACEOF
ca81d7a0
JD
20601if { (ac_try="$ac_cpp conftest.$ac_ext"
20602case "(($ac_try" in
20603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20604 *) ac_try_echo=$ac_try;;
20605esac
20606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20607 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20608 ac_status=$?
6bae0ccf 20609 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20610 rm -f conftest.er1
20611 cat conftest.err >&5
c0d27fcc 20612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20613 (exit $ac_status); } >/dev/null && {
20614 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20615 test ! -s conftest.err
20616 }; then
c0d27fcc 20617 ac_header_preproc=yes
503d2be0
AS
20618else
20619 echo "$as_me: failed program was:" >&5
19650fd6
AS
20620sed 's/^/| /' conftest.$ac_ext >&5
20621
c0d27fcc 20622 ac_header_preproc=no
a21616bd 20623fi
ca81d7a0 20624
503d2be0 20625rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20626{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20627echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20628
20629# So? What about this header?
edfaf76d
LK
20630case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20631 yes:no: )
c0d27fcc
MR
20632 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20633echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20634 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20635echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20636 ac_header_preproc=yes
19650fd6 20637 ;;
edfaf76d 20638 no:yes:* )
c0d27fcc
MR
20639 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20640echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20641 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20642echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20643 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20644echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20645 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20646echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20647 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20648echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20649 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20650echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20651
19650fd6 20652 ;;
c0d27fcc 20653esac
ca81d7a0
JD
20654{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20655echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20656if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20657 echo $ECHO_N "(cached) $ECHO_C" >&6
20658else
edfaf76d 20659 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20660fi
ca81d7a0
JD
20661ac_res=`eval echo '${'$as_ac_Header'}'`
20662 { echo "$as_me:$LINENO: result: $ac_res" >&5
20663echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20664
20665fi
503d2be0 20666if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20667 cat >>confdefs.h <<_ACEOF
503d2be0 20668#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20669_ACEOF
503d2be0 20670
a21616bd 20671else
503d2be0
AS
20672
20673for ac_header in kerberosIV/krb.h
a21616bd 20674do
503d2be0 20675as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20676if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20677 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20678echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20679if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20680 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20681fi
ca81d7a0
JD
20682ac_res=`eval echo '${'$as_ac_Header'}'`
20683 { echo "$as_me:$LINENO: result: $ac_res" >&5
20684echo "${ECHO_T}$ac_res" >&6; }
98418dba 20685else
c0d27fcc 20686 # Is the header compilable?
ca81d7a0
JD
20687{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20688echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20689cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20690/* confdefs.h. */
20691_ACEOF
20692cat confdefs.h >>conftest.$ac_ext
20693cat >>conftest.$ac_ext <<_ACEOF
20694/* end confdefs.h. */
c0d27fcc
MR
20695$ac_includes_default
20696#include <$ac_header>
20697_ACEOF
20698rm -f conftest.$ac_objext
ca81d7a0
JD
20699if { (ac_try="$ac_compile"
20700case "(($ac_try" in
20701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20702 *) ac_try_echo=$ac_try;;
20703esac
20704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20705 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20706 ac_status=$?
edfaf76d
LK
20707 grep -v '^ *+' conftest.er1 >conftest.err
20708 rm -f conftest.er1
20709 cat conftest.err >&5
c0d27fcc 20710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20711 (exit $ac_status); } && {
20712 test -z "$ac_c_werror_flag" ||
20713 test ! -s conftest.err
20714 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20715 ac_header_compiler=yes
20716else
20717 echo "$as_me: failed program was:" >&5
19650fd6
AS
20718sed 's/^/| /' conftest.$ac_ext >&5
20719
ca81d7a0 20720 ac_header_compiler=no
c0d27fcc 20721fi
ca81d7a0
JD
20722
20723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20724{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20725echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20726
20727# Is the header present?
ca81d7a0
JD
20728{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20729echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20730cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20731/* confdefs.h. */
20732_ACEOF
20733cat confdefs.h >>conftest.$ac_ext
20734cat >>conftest.$ac_ext <<_ACEOF
20735/* end confdefs.h. */
503d2be0
AS
20736#include <$ac_header>
20737_ACEOF
ca81d7a0
JD
20738if { (ac_try="$ac_cpp conftest.$ac_ext"
20739case "(($ac_try" in
20740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20741 *) ac_try_echo=$ac_try;;
20742esac
20743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20744 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20745 ac_status=$?
6bae0ccf 20746 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20747 rm -f conftest.er1
20748 cat conftest.err >&5
c0d27fcc 20749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20750 (exit $ac_status); } >/dev/null && {
20751 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20752 test ! -s conftest.err
20753 }; then
c0d27fcc 20754 ac_header_preproc=yes
503d2be0
AS
20755else
20756 echo "$as_me: failed program was:" >&5
19650fd6
AS
20757sed 's/^/| /' conftest.$ac_ext >&5
20758
c0d27fcc 20759 ac_header_preproc=no
a21616bd 20760fi
ca81d7a0 20761
503d2be0 20762rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20763{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20764echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20765
20766# So? What about this header?
edfaf76d
LK
20767case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20768 yes:no: )
c0d27fcc
MR
20769 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20770echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20771 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20772echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20773 ac_header_preproc=yes
19650fd6 20774 ;;
edfaf76d 20775 no:yes:* )
c0d27fcc
MR
20776 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20777echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20778 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20779echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20780 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20781echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20782 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20783echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20784 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20785echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20786 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20787echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20788
19650fd6 20789 ;;
c0d27fcc 20790esac
ca81d7a0
JD
20791{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20792echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20793if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20794 echo $ECHO_N "(cached) $ECHO_C" >&6
20795else
edfaf76d 20796 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20797fi
ca81d7a0
JD
20798ac_res=`eval echo '${'$as_ac_Header'}'`
20799 { echo "$as_me:$LINENO: result: $ac_res" >&5
20800echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20801
20802fi
503d2be0 20803if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20804 cat >>confdefs.h <<_ACEOF
503d2be0 20805#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20806_ACEOF
503d2be0 20807
a21616bd 20808else
503d2be0
AS
20809
20810for ac_header in kerberos/krb.h
a21616bd 20811do
503d2be0 20812as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20813if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20814 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20815echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20816if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20817 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20818fi
ca81d7a0
JD
20819ac_res=`eval echo '${'$as_ac_Header'}'`
20820 { echo "$as_me:$LINENO: result: $ac_res" >&5
20821echo "${ECHO_T}$ac_res" >&6; }
98418dba 20822else
c0d27fcc 20823 # Is the header compilable?
ca81d7a0
JD
20824{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20825echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20826cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20827/* confdefs.h. */
20828_ACEOF
20829cat confdefs.h >>conftest.$ac_ext
20830cat >>conftest.$ac_ext <<_ACEOF
20831/* end confdefs.h. */
c0d27fcc
MR
20832$ac_includes_default
20833#include <$ac_header>
20834_ACEOF
20835rm -f conftest.$ac_objext
ca81d7a0
JD
20836if { (ac_try="$ac_compile"
20837case "(($ac_try" in
20838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20839 *) ac_try_echo=$ac_try;;
20840esac
20841eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20842 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20843 ac_status=$?
edfaf76d
LK
20844 grep -v '^ *+' conftest.er1 >conftest.err
20845 rm -f conftest.er1
20846 cat conftest.err >&5
c0d27fcc 20847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20848 (exit $ac_status); } && {
20849 test -z "$ac_c_werror_flag" ||
20850 test ! -s conftest.err
20851 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20852 ac_header_compiler=yes
20853else
20854 echo "$as_me: failed program was:" >&5
19650fd6
AS
20855sed 's/^/| /' conftest.$ac_ext >&5
20856
ca81d7a0 20857 ac_header_compiler=no
c0d27fcc 20858fi
ca81d7a0
JD
20859
20860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20861{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20862echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20863
20864# Is the header present?
ca81d7a0
JD
20865{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20866echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20867cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20868/* confdefs.h. */
20869_ACEOF
20870cat confdefs.h >>conftest.$ac_ext
20871cat >>conftest.$ac_ext <<_ACEOF
20872/* end confdefs.h. */
503d2be0
AS
20873#include <$ac_header>
20874_ACEOF
ca81d7a0
JD
20875if { (ac_try="$ac_cpp conftest.$ac_ext"
20876case "(($ac_try" in
20877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20878 *) ac_try_echo=$ac_try;;
20879esac
20880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20881 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20882 ac_status=$?
6bae0ccf 20883 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20884 rm -f conftest.er1
20885 cat conftest.err >&5
c0d27fcc 20886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20887 (exit $ac_status); } >/dev/null && {
20888 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20889 test ! -s conftest.err
20890 }; then
c0d27fcc 20891 ac_header_preproc=yes
503d2be0
AS
20892else
20893 echo "$as_me: failed program was:" >&5
19650fd6
AS
20894sed 's/^/| /' conftest.$ac_ext >&5
20895
c0d27fcc 20896 ac_header_preproc=no
a21616bd 20897fi
ca81d7a0 20898
503d2be0 20899rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20900{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20901echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
20902
20903# So? What about this header?
edfaf76d
LK
20904case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20905 yes:no: )
35996d22
AS
20906 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20907echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20908 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20909echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20910 ac_header_preproc=yes
19650fd6 20911 ;;
edfaf76d 20912 no:yes:* )
c0d27fcc
MR
20913 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20914echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20915 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20916echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20917 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20918echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20919 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20920echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20921 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20922echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20923 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20924echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20925
19650fd6 20926 ;;
c0d27fcc 20927esac
ca81d7a0
JD
20928{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20929echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20930if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20931 echo $ECHO_N "(cached) $ECHO_C" >&6
20932else
edfaf76d 20933 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20934fi
ca81d7a0
JD
20935ac_res=`eval echo '${'$as_ac_Header'}'`
20936 { echo "$as_me:$LINENO: result: $ac_res" >&5
20937echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20938
20939fi
503d2be0 20940if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20941 cat >>confdefs.h <<_ACEOF
503d2be0 20942#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20943_ACEOF
503d2be0 20944
a21616bd 20945fi
c0d27fcc 20946
a21616bd
KR
20947done
20948
20949fi
c0d27fcc 20950
a21616bd
KR
20951done
20952
20953fi
c0d27fcc 20954
a21616bd
KR
20955done
20956
20957 fi
503d2be0
AS
20958
20959for ac_header in com_err.h
a21616bd 20960do
503d2be0 20961as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20962if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20963 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20964echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20965if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20966 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20967fi
ca81d7a0
JD
20968ac_res=`eval echo '${'$as_ac_Header'}'`
20969 { echo "$as_me:$LINENO: result: $ac_res" >&5
20970echo "${ECHO_T}$ac_res" >&6; }
98418dba 20971else
c0d27fcc 20972 # Is the header compilable?
ca81d7a0
JD
20973{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20974echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20975cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20976/* confdefs.h. */
20977_ACEOF
20978cat confdefs.h >>conftest.$ac_ext
20979cat >>conftest.$ac_ext <<_ACEOF
20980/* end confdefs.h. */
c0d27fcc
MR
20981$ac_includes_default
20982#include <$ac_header>
20983_ACEOF
20984rm -f conftest.$ac_objext
ca81d7a0
JD
20985if { (ac_try="$ac_compile"
20986case "(($ac_try" in
20987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20988 *) ac_try_echo=$ac_try;;
20989esac
20990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20991 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
20992 ac_status=$?
20993 grep -v '^ *+' conftest.er1 >conftest.err
20994 rm -f conftest.er1
20995 cat conftest.err >&5
20996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20997 (exit $ac_status); } && {
20998 test -z "$ac_c_werror_flag" ||
20999 test ! -s conftest.err
21000 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21001 ac_header_compiler=yes
21002else
21003 echo "$as_me: failed program was:" >&5
19650fd6
AS
21004sed 's/^/| /' conftest.$ac_ext >&5
21005
ca81d7a0 21006 ac_header_compiler=no
c0d27fcc 21007fi
ca81d7a0
JD
21008
21009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21010{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21011echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21012
21013# Is the header present?
ca81d7a0
JD
21014{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21015echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21016cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21017/* confdefs.h. */
21018_ACEOF
21019cat confdefs.h >>conftest.$ac_ext
21020cat >>conftest.$ac_ext <<_ACEOF
21021/* end confdefs.h. */
503d2be0
AS
21022#include <$ac_header>
21023_ACEOF
ca81d7a0
JD
21024if { (ac_try="$ac_cpp conftest.$ac_ext"
21025case "(($ac_try" in
21026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21027 *) ac_try_echo=$ac_try;;
21028esac
21029eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21030 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21031 ac_status=$?
6bae0ccf 21032 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21033 rm -f conftest.er1
21034 cat conftest.err >&5
c0d27fcc 21035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21036 (exit $ac_status); } >/dev/null && {
21037 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21038 test ! -s conftest.err
21039 }; then
c0d27fcc 21040 ac_header_preproc=yes
503d2be0
AS
21041else
21042 echo "$as_me: failed program was:" >&5
19650fd6
AS
21043sed 's/^/| /' conftest.$ac_ext >&5
21044
c0d27fcc 21045 ac_header_preproc=no
a21616bd 21046fi
ca81d7a0 21047
503d2be0 21048rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21049{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21050echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21051
21052# So? What about this header?
edfaf76d
LK
21053case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21054 yes:no: )
c0d27fcc
MR
21055 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21056echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21057 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21058echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21059 ac_header_preproc=yes
19650fd6 21060 ;;
edfaf76d 21061 no:yes:* )
c0d27fcc
MR
21062 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21063echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21064 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21065echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21066 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21067echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21068 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21069echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21070 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21071echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21072 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21073echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21074
19650fd6 21075 ;;
c0d27fcc 21076esac
ca81d7a0
JD
21077{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21078echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21079if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21080 echo $ECHO_N "(cached) $ECHO_C" >&6
21081else
edfaf76d 21082 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21083fi
ca81d7a0
JD
21084ac_res=`eval echo '${'$as_ac_Header'}'`
21085 { echo "$as_me:$LINENO: result: $ac_res" >&5
21086echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21087
21088fi
503d2be0 21089if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21090 cat >>confdefs.h <<_ACEOF
503d2be0 21091#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21092_ACEOF
503d2be0 21093
a21616bd 21094fi
c0d27fcc 21095
a21616bd
KR
21096done
21097
21098fi
21099
ba4481b5
DL
21100# Solaris requires -lintl if you want strerror (which calls dgettext)
21101# to return localized messages.
503d2be0 21102
ca81d7a0
JD
21103{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
21104echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
21105if test "${ac_cv_lib_intl_dgettext+set}" = set; then
21106 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21107else
503d2be0 21108 ac_check_lib_save_LIBS=$LIBS
ba4481b5 21109LIBS="-lintl $LIBS"
503d2be0 21110cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21111/* confdefs.h. */
21112_ACEOF
21113cat confdefs.h >>conftest.$ac_ext
21114cat >>conftest.$ac_ext <<_ACEOF
21115/* end confdefs.h. */
503d2be0 21116
ca81d7a0
JD
21117/* Override any GCC internal prototype to avoid an error.
21118 Use char because int might match the return type of a GCC
21119 builtin and then its argument prototype would still apply. */
503d2be0
AS
21120#ifdef __cplusplus
21121extern "C"
21122#endif
503d2be0
AS
21123char dgettext ();
21124int
21125main ()
21126{
ca81d7a0 21127return dgettext ();
503d2be0
AS
21128 ;
21129 return 0;
21130}
21131_ACEOF
21132rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21133if { (ac_try="$ac_link"
21134case "(($ac_try" in
21135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21136 *) ac_try_echo=$ac_try;;
21137esac
21138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21139 (eval "$ac_link") 2>conftest.er1
503d2be0 21140 ac_status=$?
edfaf76d
LK
21141 grep -v '^ *+' conftest.er1 >conftest.err
21142 rm -f conftest.er1
21143 cat conftest.err >&5
c0d27fcc 21144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21145 (exit $ac_status); } && {
21146 test -z "$ac_c_werror_flag" ||
21147 test ! -s conftest.err
21148 } && test -s conftest$ac_exeext &&
21149 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21150 ac_cv_lib_intl_dgettext=yes
21151else
21152 echo "$as_me: failed program was:" >&5
19650fd6
AS
21153sed 's/^/| /' conftest.$ac_ext >&5
21154
ca81d7a0 21155 ac_cv_lib_intl_dgettext=no
503d2be0 21156fi
ca81d7a0 21157
f053c89f 21158rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21159 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21160LIBS=$ac_check_lib_save_LIBS
21161fi
ca81d7a0
JD
21162{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
21163echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 21164if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 21165 cat >>confdefs.h <<_ACEOF
503d2be0 21166#define HAVE_LIBINTL 1
c0d27fcc 21167_ACEOF
ba4481b5
DL
21168
21169 LIBS="-lintl $LIBS"
21170
ba4481b5
DL
21171fi
21172
c0d27fcc 21173
ca81d7a0
JD
21174{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
21175echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
21176if test "${emacs_cv_localtime_cache+set}" = set; then
21177 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
21178else
21179 if test x$ac_cv_func_tzset = xyes; then
21180if test "$cross_compiling" = yes; then
21181 # If we have tzset, assume the worst when cross-compiling.
21182emacs_cv_localtime_cache=yes
21183else
503d2be0 21184 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21185/* confdefs.h. */
21186_ACEOF
21187cat confdefs.h >>conftest.$ac_ext
21188cat >>conftest.$ac_ext <<_ACEOF
21189/* end confdefs.h. */
ba4481b5 21190#include <time.h>
ba4481b5
DL
21191extern char **environ;
21192unset_TZ ()
21193{
21194 char **from, **to;
21195 for (to = from = environ; (*to = *from); from++)
21196 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
21197 to++;
21198}
21199char TZ_GMT0[] = "TZ=GMT0";
21200char TZ_PST8[] = "TZ=PST8";
21201main()
21202{
21203 time_t now = time ((time_t *) 0);
21204 int hour_GMT0, hour_unset;
21205 if (putenv (TZ_GMT0) != 0)
21206 exit (1);
21207 hour_GMT0 = localtime (&now)->tm_hour;
21208 unset_TZ ();
21209 hour_unset = localtime (&now)->tm_hour;
21210 if (putenv (TZ_PST8) != 0)
21211 exit (1);
21212 if (localtime (&now)->tm_hour == hour_GMT0)
21213 exit (1);
21214 unset_TZ ();
21215 if (localtime (&now)->tm_hour != hour_unset)
21216 exit (1);
21217 exit (0);
21218}
503d2be0
AS
21219_ACEOF
21220rm -f conftest$ac_exeext
ca81d7a0
JD
21221if { (ac_try="$ac_link"
21222case "(($ac_try" in
21223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21224 *) ac_try_echo=$ac_try;;
21225esac
21226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21227 (eval "$ac_link") 2>&5
503d2be0 21228 ac_status=$?
c0d27fcc 21229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21230 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
21231 { (case "(($ac_try" in
21232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21233 *) ac_try_echo=$ac_try;;
21234esac
21235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21236 (eval "$ac_try") 2>&5
503d2be0 21237 ac_status=$?
c0d27fcc 21238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21239 (exit $ac_status); }; }; then
ba4481b5
DL
21240 emacs_cv_localtime_cache=no
21241else
503d2be0
AS
21242 echo "$as_me: program exited with status $ac_status" >&5
21243echo "$as_me: failed program was:" >&5
19650fd6
AS
21244sed 's/^/| /' conftest.$ac_ext >&5
21245
c0d27fcc 21246( exit $ac_status )
503d2be0 21247emacs_cv_localtime_cache=yes
ba4481b5 21248fi
ca81d7a0 21249rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 21250fi
ca81d7a0
JD
21251
21252
ba4481b5
DL
21253else
21254 # If we lack tzset, report that localtime does not cache TZ,
21255 # since we can't invalidate the cache if we don't have tzset.
21256 emacs_cv_localtime_cache=no
21257fi
21258fi
ca81d7a0
JD
21259{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
21260echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 21261if test $emacs_cv_localtime_cache = yes; then
b936fae4 21262
c0d27fcc 21263cat >>confdefs.h <<\_ACEOF
ba4481b5 21264#define LOCALTIME_CACHE 1
c0d27fcc 21265_ACEOF
ba4481b5
DL
21266
21267fi
21268
21269if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
21270
21271for ac_func in gettimeofday
48d4b120 21272do
503d2be0 21273as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
21274{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21275echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21276if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21277 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 21278else
503d2be0 21279 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21280/* confdefs.h. */
21281_ACEOF
21282cat confdefs.h >>conftest.$ac_ext
21283cat >>conftest.$ac_ext <<_ACEOF
21284/* end confdefs.h. */
edfaf76d
LK
21285/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21286 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21287#define $ac_func innocuous_$ac_func
21288
48d4b120 21289/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21290 which can conflict with char $ac_func (); below.
21291 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21292 <limits.h> exists even on freestanding compilers. */
edfaf76d 21293
19650fd6
AS
21294#ifdef __STDC__
21295# include <limits.h>
21296#else
21297# include <assert.h>
21298#endif
edfaf76d
LK
21299
21300#undef $ac_func
21301
ca81d7a0
JD
21302/* Override any GCC internal prototype to avoid an error.
21303 Use char because int might match the return type of a GCC
21304 builtin and then its argument prototype would still apply. */
503d2be0
AS
21305#ifdef __cplusplus
21306extern "C"
21307#endif
503d2be0 21308char $ac_func ();
48d4b120
DL
21309/* The GNU C library defines this for functions which it implements
21310 to always fail with ENOSYS. Some functions are actually named
21311 something starting with __ and the normal name is an alias. */
ca81d7a0 21312#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 21313choke me
cd958eb3
MB
21314#endif
21315
19650fd6
AS
21316int
21317main ()
21318{
ca81d7a0 21319return $ac_func ();
503d2be0
AS
21320 ;
21321 return 0;
21322}
21323_ACEOF
21324rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21325if { (ac_try="$ac_link"
21326case "(($ac_try" in
21327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21328 *) ac_try_echo=$ac_try;;
21329esac
21330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21331 (eval "$ac_link") 2>conftest.er1
503d2be0 21332 ac_status=$?
edfaf76d
LK
21333 grep -v '^ *+' conftest.er1 >conftest.err
21334 rm -f conftest.er1
21335 cat conftest.err >&5
c0d27fcc 21336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21337 (exit $ac_status); } && {
21338 test -z "$ac_c_werror_flag" ||
21339 test ! -s conftest.err
21340 } && test -s conftest$ac_exeext &&
21341 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21342 eval "$as_ac_var=yes"
21343else
21344 echo "$as_me: failed program was:" >&5
19650fd6
AS
21345sed 's/^/| /' conftest.$ac_ext >&5
21346
ca81d7a0 21347 eval "$as_ac_var=no"
503d2be0 21348fi
ca81d7a0 21349
f053c89f 21350rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21351 conftest$ac_exeext conftest.$ac_ext
503d2be0 21352fi
ca81d7a0
JD
21353ac_res=`eval echo '${'$as_ac_var'}'`
21354 { echo "$as_me:$LINENO: result: $ac_res" >&5
21355echo "${ECHO_T}$ac_res" >&6; }
503d2be0 21356if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 21357 cat >>confdefs.h <<_ACEOF
503d2be0 21358#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 21359_ACEOF
48d4b120 21360
48d4b120
DL
21361fi
21362done
21363
b936fae4 21364 if test $ac_cv_func_gettimeofday = yes; then
ca81d7a0
JD
21365 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
21366echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
21367if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
21368 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21369else
503d2be0 21370 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21371/* confdefs.h. */
21372_ACEOF
21373cat confdefs.h >>conftest.$ac_ext
21374cat >>conftest.$ac_ext <<_ACEOF
21375/* end confdefs.h. */
ba4481b5 21376
a3f08d9e
DL
21377#ifdef TIME_WITH_SYS_TIME
21378#include <sys/time.h>
21379#include <time.h>
21380#else
21381#ifdef HAVE_SYS_TIME_H
21382#include <sys/time.h>
21383#else
21384#include <time.h>
21385#endif
21386#endif
503d2be0
AS
21387int
21388main ()
21389{
a3f08d9e 21390struct timeval time;
b936fae4 21391 gettimeofday (&time, 0);
503d2be0
AS
21392 ;
21393 return 0;
21394}
21395_ACEOF
21396rm -f conftest.$ac_objext
f053c89f
CY
21397if { (ac_try="$ac_compile"
21398case "(($ac_try" in
ca81d7a0
JD
21399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21400 *) ac_try_echo=$ac_try;;
21401esac
21402eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 21403 (eval "$ac_compile") 2>conftest.er1
503d2be0 21404 ac_status=$?
f053c89f
CY
21405 grep -v '^ *+' conftest.er1 >conftest.err
21406 rm -f conftest.er1
21407 cat conftest.err >&5
c0d27fcc 21408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21409 (exit $ac_status); } && {
21410 test -z "$ac_c_werror_flag" ||
21411 test ! -s conftest.err
21412 } && test -s conftest.$ac_objext; then
ba4481b5
DL
21413 emacs_cv_gettimeofday_two_arguments=yes
21414else
503d2be0 21415 echo "$as_me: failed program was:" >&5
19650fd6
AS
21416sed 's/^/| /' conftest.$ac_ext >&5
21417
ca81d7a0 21418 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 21419fi
ca81d7a0
JD
21420
21421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21422fi
ca81d7a0
JD
21423{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
21424echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
21425 if test $emacs_cv_gettimeofday_two_arguments = no; then
21426
c0d27fcc 21427cat >>confdefs.h <<\_ACEOF
ba4481b5 21428#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 21429_ACEOF
ba4481b5 21430
b936fae4 21431 fi
ba4481b5
DL
21432 fi
21433fi
21434
21435ok_so_far=yes
ca81d7a0
JD
21436{ echo "$as_me:$LINENO: checking for socket" >&5
21437echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
21438if test "${ac_cv_func_socket+set}" = set; then
21439 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21440else
503d2be0 21441 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21442/* confdefs.h. */
21443_ACEOF
21444cat confdefs.h >>conftest.$ac_ext
21445cat >>conftest.$ac_ext <<_ACEOF
21446/* end confdefs.h. */
edfaf76d
LK
21447/* Define socket to an innocuous variant, in case <limits.h> declares socket.
21448 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21449#define socket innocuous_socket
21450
ba4481b5 21451/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21452 which can conflict with char socket (); below.
21453 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21454 <limits.h> exists even on freestanding compilers. */
edfaf76d 21455
19650fd6
AS
21456#ifdef __STDC__
21457# include <limits.h>
21458#else
21459# include <assert.h>
21460#endif
edfaf76d
LK
21461
21462#undef socket
21463
ca81d7a0
JD
21464/* Override any GCC internal prototype to avoid an error.
21465 Use char because int might match the return type of a GCC
21466 builtin and then its argument prototype would still apply. */
503d2be0
AS
21467#ifdef __cplusplus
21468extern "C"
21469#endif
503d2be0 21470char socket ();
ba4481b5
DL
21471/* The GNU C library defines this for functions which it implements
21472 to always fail with ENOSYS. Some functions are actually named
21473 something starting with __ and the normal name is an alias. */
ca81d7a0 21474#if defined __stub_socket || defined __stub___socket
ba4481b5 21475choke me
cd958eb3
MB
21476#endif
21477
19650fd6
AS
21478int
21479main ()
21480{
ca81d7a0 21481return socket ();
503d2be0
AS
21482 ;
21483 return 0;
21484}
21485_ACEOF
21486rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21487if { (ac_try="$ac_link"
21488case "(($ac_try" in
21489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21490 *) ac_try_echo=$ac_try;;
21491esac
21492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21493 (eval "$ac_link") 2>conftest.er1
503d2be0 21494 ac_status=$?
edfaf76d
LK
21495 grep -v '^ *+' conftest.er1 >conftest.err
21496 rm -f conftest.er1
21497 cat conftest.err >&5
c0d27fcc 21498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21499 (exit $ac_status); } && {
21500 test -z "$ac_c_werror_flag" ||
21501 test ! -s conftest.err
21502 } && test -s conftest$ac_exeext &&
21503 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21504 ac_cv_func_socket=yes
21505else
21506 echo "$as_me: failed program was:" >&5
19650fd6
AS
21507sed 's/^/| /' conftest.$ac_ext >&5
21508
ca81d7a0 21509 ac_cv_func_socket=no
503d2be0 21510fi
ca81d7a0 21511
f053c89f 21512rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21513 conftest$ac_exeext conftest.$ac_ext
503d2be0 21514fi
ca81d7a0
JD
21515{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
21516echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 21517if test $ac_cv_func_socket = yes; then
ba4481b5
DL
21518 :
21519else
503d2be0 21520 ok_so_far=no
ba4481b5
DL
21521fi
21522
21523if test $ok_so_far = yes; then
c0d27fcc 21524 if test "${ac_cv_header_netinet_in_h+set}" = set; then
ca81d7a0
JD
21525 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
21526echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
21527if test "${ac_cv_header_netinet_in_h+set}" = set; then
21528 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21529fi
ca81d7a0
JD
21530{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
21531echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 21532else
c0d27fcc 21533 # Is the header compilable?
ca81d7a0
JD
21534{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
21535echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 21536cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21537/* confdefs.h. */
21538_ACEOF
21539cat confdefs.h >>conftest.$ac_ext
21540cat >>conftest.$ac_ext <<_ACEOF
21541/* end confdefs.h. */
c0d27fcc
MR
21542$ac_includes_default
21543#include <netinet/in.h>
21544_ACEOF
21545rm -f conftest.$ac_objext
ca81d7a0
JD
21546if { (ac_try="$ac_compile"
21547case "(($ac_try" in
21548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21549 *) ac_try_echo=$ac_try;;
21550esac
21551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21552 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21553 ac_status=$?
edfaf76d
LK
21554 grep -v '^ *+' conftest.er1 >conftest.err
21555 rm -f conftest.er1
21556 cat conftest.err >&5
c0d27fcc 21557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21558 (exit $ac_status); } && {
21559 test -z "$ac_c_werror_flag" ||
21560 test ! -s conftest.err
21561 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21562 ac_header_compiler=yes
21563else
21564 echo "$as_me: failed program was:" >&5
19650fd6
AS
21565sed 's/^/| /' conftest.$ac_ext >&5
21566
ca81d7a0 21567 ac_header_compiler=no
c0d27fcc 21568fi
ca81d7a0
JD
21569
21570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21571{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21572echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21573
21574# Is the header present?
ca81d7a0
JD
21575{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
21576echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 21577cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21578/* confdefs.h. */
21579_ACEOF
21580cat confdefs.h >>conftest.$ac_ext
21581cat >>conftest.$ac_ext <<_ACEOF
21582/* end confdefs.h. */
ba4481b5 21583#include <netinet/in.h>
503d2be0 21584_ACEOF
ca81d7a0
JD
21585if { (ac_try="$ac_cpp conftest.$ac_ext"
21586case "(($ac_try" in
21587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21588 *) ac_try_echo=$ac_try;;
21589esac
21590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21591 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21592 ac_status=$?
6bae0ccf 21593 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21594 rm -f conftest.er1
21595 cat conftest.err >&5
c0d27fcc 21596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21597 (exit $ac_status); } >/dev/null && {
21598 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21599 test ! -s conftest.err
21600 }; then
c0d27fcc 21601 ac_header_preproc=yes
ba4481b5 21602else
503d2be0 21603 echo "$as_me: failed program was:" >&5
19650fd6
AS
21604sed 's/^/| /' conftest.$ac_ext >&5
21605
c0d27fcc 21606 ac_header_preproc=no
ba4481b5 21607fi
ca81d7a0 21608
503d2be0 21609rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21610{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21611echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21612
21613# So? What about this header?
edfaf76d
LK
21614case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21615 yes:no: )
c0d27fcc
MR
21616 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
21617echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21618 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
21619echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
21620 ac_header_preproc=yes
19650fd6 21621 ;;
edfaf76d 21622 no:yes:* )
c0d27fcc
MR
21623 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
21624echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
21625 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
21626echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
21627 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
21628echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
21629 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
21630echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21631 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 21632echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21633 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
21634echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21635
19650fd6 21636 ;;
c0d27fcc 21637esac
ca81d7a0
JD
21638{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
21639echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
21640if test "${ac_cv_header_netinet_in_h+set}" = set; then
21641 echo $ECHO_N "(cached) $ECHO_C" >&6
21642else
21643 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 21644fi
ca81d7a0
JD
21645{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
21646echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
21647
21648fi
503d2be0 21649if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
21650 :
21651else
503d2be0 21652 ok_so_far=no
ba4481b5
DL
21653fi
21654
c0d27fcc 21655
ba4481b5
DL
21656fi
21657if test $ok_so_far = yes; then
c0d27fcc 21658 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
ca81d7a0
JD
21659 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
21660echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
21661if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21662 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21663fi
ca81d7a0
JD
21664{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
21665echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 21666else
c0d27fcc 21667 # Is the header compilable?
ca81d7a0
JD
21668{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
21669echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 21670cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21671/* confdefs.h. */
21672_ACEOF
21673cat confdefs.h >>conftest.$ac_ext
21674cat >>conftest.$ac_ext <<_ACEOF
21675/* end confdefs.h. */
c0d27fcc
MR
21676$ac_includes_default
21677#include <arpa/inet.h>
21678_ACEOF
21679rm -f conftest.$ac_objext
ca81d7a0
JD
21680if { (ac_try="$ac_compile"
21681case "(($ac_try" in
21682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21683 *) ac_try_echo=$ac_try;;
21684esac
21685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21686 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21687 ac_status=$?
edfaf76d
LK
21688 grep -v '^ *+' conftest.er1 >conftest.err
21689 rm -f conftest.er1
21690 cat conftest.err >&5
c0d27fcc 21691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21692 (exit $ac_status); } && {
21693 test -z "$ac_c_werror_flag" ||
21694 test ! -s conftest.err
21695 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21696 ac_header_compiler=yes
21697else
21698 echo "$as_me: failed program was:" >&5
19650fd6
AS
21699sed 's/^/| /' conftest.$ac_ext >&5
21700
ca81d7a0 21701 ac_header_compiler=no
c0d27fcc 21702fi
ca81d7a0
JD
21703
21704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21705{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21706echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21707
21708# Is the header present?
ca81d7a0
JD
21709{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
21710echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 21711cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21712/* confdefs.h. */
21713_ACEOF
21714cat confdefs.h >>conftest.$ac_ext
21715cat >>conftest.$ac_ext <<_ACEOF
21716/* end confdefs.h. */
ba4481b5 21717#include <arpa/inet.h>
503d2be0 21718_ACEOF
ca81d7a0
JD
21719if { (ac_try="$ac_cpp conftest.$ac_ext"
21720case "(($ac_try" in
21721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21722 *) ac_try_echo=$ac_try;;
21723esac
21724eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21725 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21726 ac_status=$?
6bae0ccf 21727 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21728 rm -f conftest.er1
21729 cat conftest.err >&5
c0d27fcc 21730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21731 (exit $ac_status); } >/dev/null && {
21732 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21733 test ! -s conftest.err
21734 }; then
c0d27fcc 21735 ac_header_preproc=yes
ba4481b5 21736else
503d2be0 21737 echo "$as_me: failed program was:" >&5
19650fd6
AS
21738sed 's/^/| /' conftest.$ac_ext >&5
21739
c0d27fcc 21740 ac_header_preproc=no
ba4481b5 21741fi
ca81d7a0 21742
503d2be0 21743rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21744{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21745echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21746
21747# So? What about this header?
edfaf76d
LK
21748case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21749 yes:no: )
c0d27fcc
MR
21750 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
21751echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21752 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
21753echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
21754 ac_header_preproc=yes
19650fd6 21755 ;;
edfaf76d 21756 no:yes:* )
c0d27fcc
MR
21757 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
21758echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
21759 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
21760echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
21761 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
21762echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
21763 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
21764echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21765 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 21766echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21767 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
21768echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21769
19650fd6 21770 ;;
c0d27fcc 21771esac
ca81d7a0
JD
21772{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
21773echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
21774if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21775 echo $ECHO_N "(cached) $ECHO_C" >&6
21776else
21777 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 21778fi
ca81d7a0
JD
21779{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
21780echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
21781
21782fi
503d2be0 21783if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
21784 :
21785else
503d2be0 21786 ok_so_far=no
ba4481b5
DL
21787fi
21788
c0d27fcc 21789
ba4481b5
DL
21790fi
21791if test $ok_so_far = yes; then
b936fae4 21792
c0d27fcc 21793cat >>confdefs.h <<\_ACEOF
ba4481b5 21794#define HAVE_INET_SOCKETS 1
c0d27fcc 21795_ACEOF
ba4481b5
DL
21796
21797fi
21798
2d2b6695 21799
7862d3a8 21800for ac_header in sys/ioctl.h
2d2b6695
KS
21801do
21802as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21803if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21804 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21805echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21806if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
21807 echo $ECHO_N "(cached) $ECHO_C" >&6
21808fi
ca81d7a0
JD
21809ac_res=`eval echo '${'$as_ac_Header'}'`
21810 { echo "$as_me:$LINENO: result: $ac_res" >&5
21811echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
21812else
21813 # Is the header compilable?
ca81d7a0
JD
21814{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21815echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 21816cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
21817/* confdefs.h. */
21818_ACEOF
21819cat confdefs.h >>conftest.$ac_ext
21820cat >>conftest.$ac_ext <<_ACEOF
21821/* end confdefs.h. */
21822$ac_includes_default
21823#include <$ac_header>
21824_ACEOF
21825rm -f conftest.$ac_objext
ca81d7a0
JD
21826if { (ac_try="$ac_compile"
21827case "(($ac_try" in
21828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21829 *) ac_try_echo=$ac_try;;
21830esac
21831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21832 (eval "$ac_compile") 2>conftest.er1
2d2b6695 21833 ac_status=$?
edfaf76d
LK
21834 grep -v '^ *+' conftest.er1 >conftest.err
21835 rm -f conftest.er1
21836 cat conftest.err >&5
2d2b6695 21837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21838 (exit $ac_status); } && {
21839 test -z "$ac_c_werror_flag" ||
21840 test ! -s conftest.err
21841 } && test -s conftest.$ac_objext; then
2d2b6695
KS
21842 ac_header_compiler=yes
21843else
21844 echo "$as_me: failed program was:" >&5
21845sed 's/^/| /' conftest.$ac_ext >&5
21846
ca81d7a0 21847 ac_header_compiler=no
2d2b6695 21848fi
ca81d7a0
JD
21849
21850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21851{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21852echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
21853
21854# Is the header present?
ca81d7a0
JD
21855{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21856echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 21857cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
21858/* confdefs.h. */
21859_ACEOF
21860cat confdefs.h >>conftest.$ac_ext
21861cat >>conftest.$ac_ext <<_ACEOF
21862/* end confdefs.h. */
21863#include <$ac_header>
21864_ACEOF
ca81d7a0
JD
21865if { (ac_try="$ac_cpp conftest.$ac_ext"
21866case "(($ac_try" in
21867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21868 *) ac_try_echo=$ac_try;;
21869esac
21870eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21871 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
21872 ac_status=$?
21873 grep -v '^ *+' conftest.er1 >conftest.err
21874 rm -f conftest.er1
21875 cat conftest.err >&5
21876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21877 (exit $ac_status); } >/dev/null && {
21878 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21879 test ! -s conftest.err
21880 }; then
2d2b6695
KS
21881 ac_header_preproc=yes
21882else
21883 echo "$as_me: failed program was:" >&5
21884sed 's/^/| /' conftest.$ac_ext >&5
21885
21886 ac_header_preproc=no
21887fi
ca81d7a0 21888
2d2b6695 21889rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21890{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21891echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
21892
21893# So? What about this header?
edfaf76d
LK
21894case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21895 yes:no: )
2d2b6695
KS
21896 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21897echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21898 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21899echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21900 ac_header_preproc=yes
2d2b6695 21901 ;;
edfaf76d 21902 no:yes:* )
2d2b6695
KS
21903 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21904echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21905 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21906echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21907 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21908echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21909 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21910echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
21911 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21912echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21913 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21914echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21915
2d2b6695
KS
21916 ;;
21917esac
ca81d7a0
JD
21918{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21919echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21920if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
21921 echo $ECHO_N "(cached) $ECHO_C" >&6
21922else
edfaf76d 21923 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 21924fi
ca81d7a0
JD
21925ac_res=`eval echo '${'$as_ac_Header'}'`
21926 { echo "$as_me:$LINENO: result: $ac_res" >&5
21927echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
21928
21929fi
21930if test `eval echo '${'$as_ac_Header'}'` = yes; then
21931 cat >>confdefs.h <<_ACEOF
21932#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21933_ACEOF
21934
21935fi
21936
21937done
21938
21939
ba4481b5 21940if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 21941
c0d27fcc 21942cat >>confdefs.h <<\_ACEOF
ba4481b5 21943#define HAVE_AIX_SMT_EXP 1
c0d27fcc 21944_ACEOF
ba4481b5
DL
21945
21946fi
21947
ca81d7a0
JD
21948{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
21949echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 21950if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ca81d7a0
JD
21951 { echo "$as_me:$LINENO: result: yes" >&5
21952echo "${ECHO_T}yes" >&6; }
b936fae4 21953
c0d27fcc 21954cat >>confdefs.h <<\_ACEOF
3d9fec71 21955#define HAVE_DEV_PTMX 1
c0d27fcc 21956_ACEOF
3d9fec71
DL
21957
21958else
ca81d7a0
JD
21959 { echo "$as_me:$LINENO: result: no" >&5
21960echo "${ECHO_T}no" >&6; }
3d9fec71
DL
21961fi
21962
ca81d7a0
JD
21963{ echo "$as_me:$LINENO: checking for pid_t" >&5
21964echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
21965if test "${ac_cv_type_pid_t+set}" = set; then
21966 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 21967else
503d2be0 21968 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21969/* confdefs.h. */
21970_ACEOF
21971cat confdefs.h >>conftest.$ac_ext
21972cat >>conftest.$ac_ext <<_ACEOF
21973/* end confdefs.h. */
503d2be0 21974$ac_includes_default
ca81d7a0 21975typedef pid_t ac__type_new_;
503d2be0
AS
21976int
21977main ()
21978{
ca81d7a0 21979if ((ac__type_new_ *) 0)
503d2be0 21980 return 0;
ca81d7a0 21981if (sizeof (ac__type_new_))
503d2be0
AS
21982 return 0;
21983 ;
21984 return 0;
21985}
21986_ACEOF
21987rm -f conftest.$ac_objext
ca81d7a0
JD
21988if { (ac_try="$ac_compile"
21989case "(($ac_try" in
21990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21991 *) ac_try_echo=$ac_try;;
21992esac
21993eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21994 (eval "$ac_compile") 2>conftest.er1
503d2be0 21995 ac_status=$?
edfaf76d
LK
21996 grep -v '^ *+' conftest.er1 >conftest.err
21997 rm -f conftest.er1
21998 cat conftest.err >&5
c0d27fcc 21999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22000 (exit $ac_status); } && {
22001 test -z "$ac_c_werror_flag" ||
22002 test ! -s conftest.err
22003 } && test -s conftest.$ac_objext; then
647847ea
DL
22004 ac_cv_type_pid_t=yes
22005else
503d2be0 22006 echo "$as_me: failed program was:" >&5
19650fd6
AS
22007sed 's/^/| /' conftest.$ac_ext >&5
22008
ca81d7a0 22009 ac_cv_type_pid_t=no
647847ea 22010fi
ca81d7a0
JD
22011
22012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 22013fi
ca81d7a0
JD
22014{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
22015echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
22016if test $ac_cv_type_pid_t = yes; then
22017 :
22018else
22019
c0d27fcc 22020cat >>confdefs.h <<_ACEOF
647847ea 22021#define pid_t int
c0d27fcc 22022_ACEOF
647847ea
DL
22023
22024fi
22025
c0d27fcc 22026
ca81d7a0 22027for ac_header in vfork.h
503d2be0
AS
22028do
22029as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22030if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22031 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22032echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22033if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22034 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22035fi
ca81d7a0
JD
22036ac_res=`eval echo '${'$as_ac_Header'}'`
22037 { echo "$as_me:$LINENO: result: $ac_res" >&5
22038echo "${ECHO_T}$ac_res" >&6; }
98418dba 22039else
c0d27fcc 22040 # Is the header compilable?
ca81d7a0
JD
22041{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22042echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22043cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22044/* confdefs.h. */
22045_ACEOF
22046cat confdefs.h >>conftest.$ac_ext
22047cat >>conftest.$ac_ext <<_ACEOF
22048/* end confdefs.h. */
c0d27fcc
MR
22049$ac_includes_default
22050#include <$ac_header>
22051_ACEOF
22052rm -f conftest.$ac_objext
ca81d7a0
JD
22053if { (ac_try="$ac_compile"
22054case "(($ac_try" in
22055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22056 *) ac_try_echo=$ac_try;;
22057esac
22058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22059 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22060 ac_status=$?
edfaf76d
LK
22061 grep -v '^ *+' conftest.er1 >conftest.err
22062 rm -f conftest.er1
22063 cat conftest.err >&5
c0d27fcc 22064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22065 (exit $ac_status); } && {
22066 test -z "$ac_c_werror_flag" ||
22067 test ! -s conftest.err
22068 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22069 ac_header_compiler=yes
22070else
22071 echo "$as_me: failed program was:" >&5
19650fd6
AS
22072sed 's/^/| /' conftest.$ac_ext >&5
22073
ca81d7a0 22074 ac_header_compiler=no
c0d27fcc 22075fi
ca81d7a0
JD
22076
22077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22078{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22079echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22080
22081# Is the header present?
ca81d7a0
JD
22082{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22083echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22084cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22085/* confdefs.h. */
22086_ACEOF
22087cat confdefs.h >>conftest.$ac_ext
22088cat >>conftest.$ac_ext <<_ACEOF
22089/* end confdefs.h. */
503d2be0
AS
22090#include <$ac_header>
22091_ACEOF
ca81d7a0
JD
22092if { (ac_try="$ac_cpp conftest.$ac_ext"
22093case "(($ac_try" in
22094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22095 *) ac_try_echo=$ac_try;;
22096esac
22097eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22098 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22099 ac_status=$?
6bae0ccf 22100 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22101 rm -f conftest.er1
22102 cat conftest.err >&5
c0d27fcc 22103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22104 (exit $ac_status); } >/dev/null && {
22105 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22106 test ! -s conftest.err
22107 }; then
c0d27fcc 22108 ac_header_preproc=yes
647847ea 22109else
503d2be0 22110 echo "$as_me: failed program was:" >&5
19650fd6
AS
22111sed 's/^/| /' conftest.$ac_ext >&5
22112
c0d27fcc 22113 ac_header_preproc=no
647847ea 22114fi
ca81d7a0 22115
503d2be0 22116rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22117{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22118echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22119
22120# So? What about this header?
edfaf76d
LK
22121case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22122 yes:no: )
c0d27fcc
MR
22123 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22124echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22125 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22126echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22127 ac_header_preproc=yes
19650fd6 22128 ;;
edfaf76d 22129 no:yes:* )
c0d27fcc
MR
22130 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22131echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22132 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22133echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22134 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22135echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22136 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22137echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22138 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22139echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22140 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22141echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22142
19650fd6 22143 ;;
c0d27fcc 22144esac
ca81d7a0
JD
22145{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22146echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22147if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22148 echo $ECHO_N "(cached) $ECHO_C" >&6
22149else
edfaf76d 22150 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 22151fi
ca81d7a0
JD
22152ac_res=`eval echo '${'$as_ac_Header'}'`
22153 { echo "$as_me:$LINENO: result: $ac_res" >&5
22154echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22155
22156fi
503d2be0 22157if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22158 cat >>confdefs.h <<_ACEOF
503d2be0 22159#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22160_ACEOF
647847ea 22161
73b77ee5 22162fi
c0d27fcc 22163
503d2be0 22164done
73b77ee5 22165
c0d27fcc
MR
22166
22167
503d2be0
AS
22168for ac_func in fork vfork
22169do
22170as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
22171{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22172echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22173if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22174 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22175else
503d2be0 22176 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22177/* confdefs.h. */
22178_ACEOF
22179cat confdefs.h >>conftest.$ac_ext
22180cat >>conftest.$ac_ext <<_ACEOF
22181/* end confdefs.h. */
edfaf76d
LK
22182/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22183 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22184#define $ac_func innocuous_$ac_func
22185
fa0b693c 22186/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22187 which can conflict with char $ac_func (); below.
22188 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22189 <limits.h> exists even on freestanding compilers. */
edfaf76d 22190
19650fd6
AS
22191#ifdef __STDC__
22192# include <limits.h>
22193#else
22194# include <assert.h>
22195#endif
edfaf76d
LK
22196
22197#undef $ac_func
22198
ca81d7a0
JD
22199/* Override any GCC internal prototype to avoid an error.
22200 Use char because int might match the return type of a GCC
22201 builtin and then its argument prototype would still apply. */
503d2be0
AS
22202#ifdef __cplusplus
22203extern "C"
22204#endif
503d2be0 22205char $ac_func ();
fa0b693c
GM
22206/* The GNU C library defines this for functions which it implements
22207 to always fail with ENOSYS. Some functions are actually named
22208 something starting with __ and the normal name is an alias. */
ca81d7a0 22209#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 22210choke me
fa0b693c
GM
22211#endif
22212
19650fd6
AS
22213int
22214main ()
22215{
ca81d7a0 22216return $ac_func ();
503d2be0
AS
22217 ;
22218 return 0;
22219}
22220_ACEOF
22221rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22222if { (ac_try="$ac_link"
22223case "(($ac_try" in
22224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22225 *) ac_try_echo=$ac_try;;
22226esac
22227eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22228 (eval "$ac_link") 2>conftest.er1
503d2be0 22229 ac_status=$?
edfaf76d
LK
22230 grep -v '^ *+' conftest.er1 >conftest.err
22231 rm -f conftest.er1
22232 cat conftest.err >&5
c0d27fcc 22233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22234 (exit $ac_status); } && {
22235 test -z "$ac_c_werror_flag" ||
22236 test ! -s conftest.err
22237 } && test -s conftest$ac_exeext &&
22238 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22239 eval "$as_ac_var=yes"
22240else
22241 echo "$as_me: failed program was:" >&5
19650fd6
AS
22242sed 's/^/| /' conftest.$ac_ext >&5
22243
ca81d7a0 22244 eval "$as_ac_var=no"
503d2be0 22245fi
ca81d7a0 22246
f053c89f 22247rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22248 conftest$ac_exeext conftest.$ac_ext
503d2be0 22249fi
ca81d7a0
JD
22250ac_res=`eval echo '${'$as_ac_var'}'`
22251 { echo "$as_me:$LINENO: result: $ac_res" >&5
22252echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22253if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22254 cat >>confdefs.h <<_ACEOF
503d2be0 22255#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22256_ACEOF
503d2be0 22257
fa0b693c 22258fi
503d2be0 22259done
fa0b693c 22260
503d2be0 22261if test "x$ac_cv_func_fork" = xyes; then
ca81d7a0
JD
22262 { echo "$as_me:$LINENO: checking for working fork" >&5
22263echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
22264if test "${ac_cv_func_fork_works+set}" = set; then
22265 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22266else
503d2be0
AS
22267 if test "$cross_compiling" = yes; then
22268 ac_cv_func_fork_works=cross
22269else
22270 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
22271/* confdefs.h. */
22272_ACEOF
22273cat confdefs.h >>conftest.$ac_ext
22274cat >>conftest.$ac_ext <<_ACEOF
22275/* end confdefs.h. */
22276$ac_includes_default
22277int
22278main ()
22279{
22280
22281 /* By Ruediger Kuhlmann. */
22282 return fork () < 0;
22283
22284 ;
22285 return 0;
22286}
503d2be0
AS
22287_ACEOF
22288rm -f conftest$ac_exeext
ca81d7a0
JD
22289if { (ac_try="$ac_link"
22290case "(($ac_try" in
22291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22292 *) ac_try_echo=$ac_try;;
22293esac
22294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22295 (eval "$ac_link") 2>&5
503d2be0 22296 ac_status=$?
c0d27fcc 22297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22298 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22299 { (case "(($ac_try" in
22300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22301 *) ac_try_echo=$ac_try;;
22302esac
22303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22304 (eval "$ac_try") 2>&5
503d2be0 22305 ac_status=$?
c0d27fcc 22306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22307 (exit $ac_status); }; }; then
22308 ac_cv_func_fork_works=yes
22309else
22310 echo "$as_me: program exited with status $ac_status" >&5
22311echo "$as_me: failed program was:" >&5
19650fd6
AS
22312sed 's/^/| /' conftest.$ac_ext >&5
22313
c0d27fcc 22314( exit $ac_status )
503d2be0
AS
22315ac_cv_func_fork_works=no
22316fi
ca81d7a0 22317rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 22318fi
ca81d7a0
JD
22319
22320
503d2be0 22321fi
ca81d7a0
JD
22322{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
22323echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 22324
6bae0ccf
DL
22325else
22326 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
22327fi
22328if test "x$ac_cv_func_fork_works" = xcross; then
22329 case $host in
22330 *-*-amigaos* | *-*-msdosdjgpp*)
22331 # Override, as these systems have only a dummy fork() stub
22332 ac_cv_func_fork_works=no
22333 ;;
22334 *)
22335 ac_cv_func_fork_works=yes
22336 ;;
22337 esac
c0d27fcc
MR
22338 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
22339echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 22340fi
73b77ee5 22341ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 22342if test "x$ac_cv_func_vfork" = xyes; then
ca81d7a0
JD
22343 { echo "$as_me:$LINENO: checking for working vfork" >&5
22344echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
22345if test "${ac_cv_func_vfork_works+set}" = set; then
22346 echo $ECHO_N "(cached) $ECHO_C" >&6
22347else
22348 if test "$cross_compiling" = yes; then
22349 ac_cv_func_vfork_works=cross
fa0b693c 22350else
503d2be0 22351 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22352/* confdefs.h. */
22353_ACEOF
22354cat confdefs.h >>conftest.$ac_ext
22355cat >>conftest.$ac_ext <<_ACEOF
22356/* end confdefs.h. */
73b77ee5 22357/* Thanks to Paul Eggert for this test. */
ca81d7a0 22358$ac_includes_default
19650fd6 22359#include <sys/wait.h>
f053c89f 22360#ifdef HAVE_VFORK_H
503d2be0 22361# include <vfork.h>
73b77ee5
GM
22362#endif
22363/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
22364 argument registers are propagated back to the parent. The compiler
22365 is told about this with #include <vfork.h>, but some compilers
22366 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
22367 static variable whose address is put into a register that is
22368 clobbered by the vfork. */
19650fd6 22369static void
fa0b693c 22370#ifdef __cplusplus
73b77ee5 22371sparc_address_test (int arg)
503d2be0 22372# else
73b77ee5 22373sparc_address_test (arg) int arg;
fa0b693c 22374#endif
fa0b693c 22375{
73b77ee5
GM
22376 static pid_t child;
22377 if (!child) {
22378 child = vfork ();
22379 if (child < 0) {
22380 perror ("vfork");
22381 _exit(2);
22382 }
22383 if (!child) {
22384 arg = getpid();
22385 write(-1, "", 0);
22386 _exit (arg);
22387 }
22388 }
22389}
503d2be0
AS
22390
22391int
22392main ()
22393{
73b77ee5
GM
22394 pid_t parent = getpid ();
22395 pid_t child;
fa0b693c 22396
19650fd6 22397 sparc_address_test (0);
fa0b693c 22398
73b77ee5 22399 child = vfork ();
fa0b693c 22400
73b77ee5 22401 if (child == 0) {
503d2be0
AS
22402 /* Here is another test for sparc vfork register problems. This
22403 test uses lots of local variables, at least as many local
22404 variables as main has allocated so far including compiler
22405 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
22406 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
22407 reuse the register of parent for one of the local variables,
22408 since it will think that parent can't possibly be used any more
22409 in this routine. Assigning to the local variable will thus
22410 munge parent in the parent process. */
73b77ee5
GM
22411 pid_t
22412 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22413 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22414 /* Convince the compiler that p..p7 are live; otherwise, it might
22415 use the same hardware register for all 8 local variables. */
22416 if (p != p1 || p != p2 || p != p3 || p != p4
22417 || p != p5 || p != p6 || p != p7)
22418 _exit(1);
fa0b693c 22419
503d2be0
AS
22420 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22421 from child file descriptors. If the child closes a descriptor
22422 before it execs or exits, this munges the parent's descriptor
22423 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
22424 _exit(close(fileno(stdout)) != 0);
22425 } else {
22426 int status;
22427 struct stat st;
22428
22429 while (wait(&status) != child)
22430 ;
ca81d7a0 22431 return (
73b77ee5
GM
22432 /* Was there some problem with vforking? */
22433 child < 0
22434
22435 /* Did the child fail? (This shouldn't happen.) */
22436 || status
22437
22438 /* Did the vfork/compiler bug occur? */
22439 || parent != getpid()
fa0b693c 22440
73b77ee5
GM
22441 /* Did the file descriptor bug occur? */
22442 || fstat(fileno(stdout), &st) != 0
22443 );
22444 }
22445}
503d2be0
AS
22446_ACEOF
22447rm -f conftest$ac_exeext
ca81d7a0
JD
22448if { (ac_try="$ac_link"
22449case "(($ac_try" in
22450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22451 *) ac_try_echo=$ac_try;;
22452esac
22453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22454 (eval "$ac_link") 2>&5
503d2be0 22455 ac_status=$?
c0d27fcc 22456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22457 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22458 { (case "(($ac_try" in
22459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22460 *) ac_try_echo=$ac_try;;
22461esac
22462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22463 (eval "$ac_try") 2>&5
503d2be0 22464 ac_status=$?
c0d27fcc 22465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22466 (exit $ac_status); }; }; then
73b77ee5 22467 ac_cv_func_vfork_works=yes
fa0b693c 22468else
503d2be0
AS
22469 echo "$as_me: program exited with status $ac_status" >&5
22470echo "$as_me: failed program was:" >&5
19650fd6
AS
22471sed 's/^/| /' conftest.$ac_ext >&5
22472
c0d27fcc 22473( exit $ac_status )
503d2be0
AS
22474ac_cv_func_vfork_works=no
22475fi
ca81d7a0 22476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 22477fi
ca81d7a0
JD
22478
22479
fa0b693c 22480fi
ca81d7a0
JD
22481{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
22482echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 22483
503d2be0
AS
22484fi;
22485if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 22486 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
22487 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
22488echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
22489fi
22490
503d2be0
AS
22491if test "x$ac_cv_func_vfork_works" = xyes; then
22492
c0d27fcc 22493cat >>confdefs.h <<\_ACEOF
503d2be0 22494#define HAVE_WORKING_VFORK 1
c0d27fcc 22495_ACEOF
503d2be0
AS
22496
22497else
22498
c0d27fcc 22499cat >>confdefs.h <<\_ACEOF
73b77ee5 22500#define vfork fork
c0d27fcc 22501_ACEOF
fa0b693c
GM
22502
22503fi
503d2be0
AS
22504if test "x$ac_cv_func_fork_works" = xyes; then
22505
c0d27fcc 22506cat >>confdefs.h <<\_ACEOF
503d2be0 22507#define HAVE_WORKING_FORK 1
c0d27fcc 22508_ACEOF
fa0b693c 22509
503d2be0 22510fi
647847ea 22511
c0d27fcc 22512
ca81d7a0
JD
22513{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
22514echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
22515if test "${emacs_cv_langinfo_codeset+set}" = set; then
22516 echo $ECHO_N "(cached) $ECHO_C" >&6
22517else
22518 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22519/* confdefs.h. */
22520_ACEOF
22521cat confdefs.h >>conftest.$ac_ext
22522cat >>conftest.$ac_ext <<_ACEOF
22523/* end confdefs.h. */
6a3a24fa
JD
22524#include <langinfo.h>
22525int
22526main ()
22527{
22528char* cs = nl_langinfo(CODESET);
22529 ;
22530 return 0;
22531}
22532_ACEOF
22533rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22534if { (ac_try="$ac_link"
22535case "(($ac_try" in
22536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22537 *) ac_try_echo=$ac_try;;
22538esac
22539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22540 (eval "$ac_link") 2>conftest.er1
6a3a24fa 22541 ac_status=$?
edfaf76d
LK
22542 grep -v '^ *+' conftest.er1 >conftest.err
22543 rm -f conftest.er1
22544 cat conftest.err >&5
6a3a24fa 22545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22546 (exit $ac_status); } && {
22547 test -z "$ac_c_werror_flag" ||
22548 test ! -s conftest.err
22549 } && test -s conftest$ac_exeext &&
22550 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
22551 emacs_cv_langinfo_codeset=yes
22552else
22553 echo "$as_me: failed program was:" >&5
19650fd6
AS
22554sed 's/^/| /' conftest.$ac_ext >&5
22555
ca81d7a0 22556 emacs_cv_langinfo_codeset=no
6a3a24fa 22557fi
ca81d7a0 22558
f053c89f 22559rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22560 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
22561
22562fi
ca81d7a0
JD
22563{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
22564echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
22565if test $emacs_cv_langinfo_codeset = yes; then
22566
22567cat >>confdefs.h <<\_ACEOF
22568#define HAVE_LANGINFO_CODESET 1
22569_ACEOF
22570
22571fi
22572
ca81d7a0
JD
22573{ echo "$as_me:$LINENO: checking for size_t" >&5
22574echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
22575if test "${ac_cv_type_size_t+set}" = set; then
22576 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 22577else
503d2be0 22578 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22579/* confdefs.h. */
22580_ACEOF
22581cat confdefs.h >>conftest.$ac_ext
22582cat >>conftest.$ac_ext <<_ACEOF
22583/* end confdefs.h. */
503d2be0 22584$ac_includes_default
ca81d7a0 22585typedef size_t ac__type_new_;
503d2be0
AS
22586int
22587main ()
22588{
ca81d7a0 22589if ((ac__type_new_ *) 0)
503d2be0 22590 return 0;
ca81d7a0 22591if (sizeof (ac__type_new_))
503d2be0
AS
22592 return 0;
22593 ;
22594 return 0;
22595}
22596_ACEOF
22597rm -f conftest.$ac_objext
ca81d7a0
JD
22598if { (ac_try="$ac_compile"
22599case "(($ac_try" in
22600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22601 *) ac_try_echo=$ac_try;;
22602esac
22603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22604 (eval "$ac_compile") 2>conftest.er1
503d2be0 22605 ac_status=$?
edfaf76d
LK
22606 grep -v '^ *+' conftest.er1 >conftest.err
22607 rm -f conftest.er1
22608 cat conftest.err >&5
c0d27fcc 22609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22610 (exit $ac_status); } && {
22611 test -z "$ac_c_werror_flag" ||
22612 test ! -s conftest.err
22613 } && test -s conftest.$ac_objext; then
8730a8da
DL
22614 ac_cv_type_size_t=yes
22615else
503d2be0 22616 echo "$as_me: failed program was:" >&5
19650fd6
AS
22617sed 's/^/| /' conftest.$ac_ext >&5
22618
ca81d7a0 22619 ac_cv_type_size_t=no
8730a8da 22620fi
ca81d7a0
JD
22621
22622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 22623fi
ca81d7a0
JD
22624{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
22625echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 22626if test $ac_cv_type_size_t = yes; then
503d2be0 22627
c0d27fcc
MR
22628cat >>confdefs.h <<_ACEOF
22629#define HAVE_SIZE_T 1
22630_ACEOF
22631
8730a8da
DL
22632
22633fi
22634
c0d27fcc 22635
ca81d7a0
JD
22636{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
22637echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
22638if test "${ac_cv_type_mbstate_t+set}" = set; then
22639 echo $ECHO_N "(cached) $ECHO_C" >&6
22640else
22641 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22642/* confdefs.h. */
22643_ACEOF
22644cat confdefs.h >>conftest.$ac_ext
22645cat >>conftest.$ac_ext <<_ACEOF
22646/* end confdefs.h. */
973a76b1
DL
22647$ac_includes_default
22648# include <wchar.h>
22649int
22650main ()
22651{
22652mbstate_t x; return sizeof x;
22653 ;
22654 return 0;
22655}
22656_ACEOF
22657rm -f conftest.$ac_objext
ca81d7a0
JD
22658if { (ac_try="$ac_compile"
22659case "(($ac_try" in
22660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22661 *) ac_try_echo=$ac_try;;
22662esac
22663eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22664 (eval "$ac_compile") 2>conftest.er1
973a76b1 22665 ac_status=$?
edfaf76d
LK
22666 grep -v '^ *+' conftest.er1 >conftest.err
22667 rm -f conftest.er1
22668 cat conftest.err >&5
973a76b1 22669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22670 (exit $ac_status); } && {
22671 test -z "$ac_c_werror_flag" ||
22672 test ! -s conftest.err
22673 } && test -s conftest.$ac_objext; then
973a76b1
DL
22674 ac_cv_type_mbstate_t=yes
22675else
22676 echo "$as_me: failed program was:" >&5
19650fd6
AS
22677sed 's/^/| /' conftest.$ac_ext >&5
22678
ca81d7a0 22679 ac_cv_type_mbstate_t=no
973a76b1 22680fi
ca81d7a0
JD
22681
22682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 22683fi
ca81d7a0
JD
22684{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
22685echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
22686 if test $ac_cv_type_mbstate_t = yes; then
22687
22688cat >>confdefs.h <<\_ACEOF
22689#define HAVE_MBSTATE_T 1
22690_ACEOF
22691
22692 else
22693
22694cat >>confdefs.h <<\_ACEOF
22695#define mbstate_t int
22696_ACEOF
22697
22698 fi
22699
ca81d7a0
JD
22700{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
22701echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
22702if test "${emacs_cv_c_restrict+set}" = set; then
22703 echo $ECHO_N "(cached) $ECHO_C" >&6
22704else
22705 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22706/* confdefs.h. */
22707_ACEOF
22708cat confdefs.h >>conftest.$ac_ext
22709cat >>conftest.$ac_ext <<_ACEOF
22710/* end confdefs.h. */
22044edf
DL
22711void fred (int *restrict x);
22712int
22713main ()
22714{
b936fae4 22715
22044edf
DL
22716 ;
22717 return 0;
22718}
c0d27fcc 22719_ACEOF
22044edf 22720rm -f conftest.$ac_objext
ca81d7a0
JD
22721if { (ac_try="$ac_compile"
22722case "(($ac_try" in
22723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22724 *) ac_try_echo=$ac_try;;
22725esac
22726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22727 (eval "$ac_compile") 2>conftest.er1
22044edf 22728 ac_status=$?
edfaf76d
LK
22729 grep -v '^ *+' conftest.er1 >conftest.err
22730 rm -f conftest.er1
22731 cat conftest.err >&5
22044edf 22732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22733 (exit $ac_status); } && {
22734 test -z "$ac_c_werror_flag" ||
22735 test ! -s conftest.err
22736 } && test -s conftest.$ac_objext; then
22044edf
DL
22737 emacs_cv_c_restrict=yes
22738else
22739 echo "$as_me: failed program was:" >&5
19650fd6
AS
22740sed 's/^/| /' conftest.$ac_ext >&5
22741
ca81d7a0 22742 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22743/* confdefs.h. */
22744_ACEOF
22745cat confdefs.h >>conftest.$ac_ext
22746cat >>conftest.$ac_ext <<_ACEOF
22747/* end confdefs.h. */
22044edf
DL
22748void fred (int *__restrict x);
22749int
22750main ()
22751{
c0d27fcc 22752
22044edf
DL
22753 ;
22754 return 0;
22755}
c0d27fcc 22756_ACEOF
22044edf 22757rm -f conftest.$ac_objext
ca81d7a0
JD
22758if { (ac_try="$ac_compile"
22759case "(($ac_try" in
22760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22761 *) ac_try_echo=$ac_try;;
22762esac
22763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22764 (eval "$ac_compile") 2>conftest.er1
22044edf 22765 ac_status=$?
edfaf76d
LK
22766 grep -v '^ *+' conftest.er1 >conftest.err
22767 rm -f conftest.er1
22768 cat conftest.err >&5
22044edf 22769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22770 (exit $ac_status); } && {
22771 test -z "$ac_c_werror_flag" ||
22772 test ! -s conftest.err
22773 } && test -s conftest.$ac_objext; then
22044edf
DL
22774 emacs_cv_c_restrict=__restrict
22775else
22776 echo "$as_me: failed program was:" >&5
19650fd6
AS
22777sed 's/^/| /' conftest.$ac_ext >&5
22778
ca81d7a0 22779 emacs_cv_c_restrict=no
ba4481b5 22780fi
ca81d7a0
JD
22781
22782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22783fi
ca81d7a0
JD
22784
22785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22786fi
ca81d7a0
JD
22787{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
22788echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
22789case "$emacs_cv_c_restrict" in
22790 yes) emacs_restrict=restrict;;
22791 no) emacs_restrict="";;
22792 *) emacs_restrict="$emacs_cv_c_restrict";;
22793esac
22794if test "$emacs_restrict" != __restrict; then
b936fae4 22795
22044edf
DL
22796cat >>confdefs.h <<_ACEOF
22797#define __restrict $emacs_restrict
c0d27fcc 22798_ACEOF
ba4481b5
DL
22799
22800fi
ba4481b5 22801
ca81d7a0
JD
22802{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
22803echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
22804if test "${emacs_cv_c_restrict_arr+set}" = set; then
22805 echo $ECHO_N "(cached) $ECHO_C" >&6
22806else
22807 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22808/* confdefs.h. */
22809_ACEOF
22810cat confdefs.h >>conftest.$ac_ext
22811cat >>conftest.$ac_ext <<_ACEOF
22812/* end confdefs.h. */
22044edf
DL
22813void fred (int x[__restrict]);
22814int
22815main ()
22816{
b936fae4 22817
22044edf
DL
22818 ;
22819 return 0;
22820}
c0d27fcc 22821_ACEOF
22044edf 22822rm -f conftest.$ac_objext
ca81d7a0
JD
22823if { (ac_try="$ac_compile"
22824case "(($ac_try" in
22825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22826 *) ac_try_echo=$ac_try;;
22827esac
22828eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22829 (eval "$ac_compile") 2>conftest.er1
22044edf 22830 ac_status=$?
edfaf76d
LK
22831 grep -v '^ *+' conftest.er1 >conftest.err
22832 rm -f conftest.er1
22833 cat conftest.err >&5
22044edf 22834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22835 (exit $ac_status); } && {
22836 test -z "$ac_c_werror_flag" ||
22837 test ! -s conftest.err
22838 } && test -s conftest.$ac_objext; then
22044edf
DL
22839 emacs_cv_c_restrict_arr=yes
22840else
22841 echo "$as_me: failed program was:" >&5
19650fd6
AS
22842sed 's/^/| /' conftest.$ac_ext >&5
22843
ca81d7a0 22844 emacs_cv_c_restrict_arr=no
ba4481b5 22845fi
ca81d7a0
JD
22846
22847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 22848fi
ca81d7a0
JD
22849{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
22850echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 22851if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 22852
c0d27fcc 22853cat >>confdefs.h <<\_ACEOF
22044edf 22854#define __restrict_arr __restrict
c0d27fcc 22855_ACEOF
ba4481b5 22856
ba4481b5
DL
22857fi
22858
c0d27fcc 22859
c0d27fcc 22860
22044edf
DL
22861# Set up the CFLAGS for real compilation, so we can substitute it.
22862CFLAGS="$REAL_CFLAGS"
22863CPPFLAGS="$REAL_CPPFLAGS"
22864
22865#### Find out which version of Emacs this is.
22866version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
22867 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
22868if test x"${version}" = x; then
22869 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
22870echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
22871 { (exit 1); exit 1; }; }
22872fi
22873
22874### Specify what sort of things we'll be editing into Makefile and config.h.
22875### Use configuration here uncanonicalized to avoid exceeding size limits.
22876
22877
22878
22879
22880
22881
22882
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
6a3a24fa 22908
22044edf
DL
22909
22910
22911cat >>confdefs.h <<_ACEOF
22912#define EMACS_CONFIGURATION "${canonical}"
22913_ACEOF
22914
22915
22916cat >>confdefs.h <<_ACEOF
22917#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
22918_ACEOF
22919
22920
22921cat >>confdefs.h <<_ACEOF
22922#define config_machfile "${machfile}"
22923_ACEOF
22924
22925
22926cat >>confdefs.h <<_ACEOF
22927#define config_opsysfile "${opsysfile}"
22928_ACEOF
22929
22930
22931cat >>confdefs.h <<_ACEOF
22932#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
22933_ACEOF
22934
22935
22936cat >>confdefs.h <<_ACEOF
22937#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
22938_ACEOF
22939
22940
22941cat >>confdefs.h <<_ACEOF
22942#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
22943_ACEOF
22944
22945
22946cat >>confdefs.h <<_ACEOF
22947#define UNEXEC_SRC ${UNEXEC_SRC}
22948_ACEOF
22949
22950
22951if test "${HAVE_X_WINDOWS}" = "yes" ; then
22952
22953cat >>confdefs.h <<\_ACEOF
22954#define HAVE_X_WINDOWS 1
22955_ACEOF
22956
22957fi
22958if test "${USE_X_TOOLKIT}" != "none" ; then
22959
22960cat >>confdefs.h <<\_ACEOF
22961#define USE_X_TOOLKIT 1
22962_ACEOF
22963
22964fi
22965if test "${HAVE_X11}" = "yes" ; then
22966
22967cat >>confdefs.h <<\_ACEOF
22968#define HAVE_X11 1
22969_ACEOF
22970
22971fi
22972if test "${HAVE_XFREE386}" = "yes" ; then
22973
22974cat >>confdefs.h <<\_ACEOF
22975#define HAVE_XFREE386 1
22976_ACEOF
22977
22978fi
22979if test "${HAVE_MENUS}" = "yes" ; then
22980
22981cat >>confdefs.h <<\_ACEOF
22982#define HAVE_MENUS 1
22983_ACEOF
22984
22985fi
22986if test "${GNU_MALLOC}" = "yes" ; then
22987
22988cat >>confdefs.h <<\_ACEOF
22989#define GNU_MALLOC 1
22990_ACEOF
22991
22992fi
22993if test "${REL_ALLOC}" = "yes" ; then
22994
22995cat >>confdefs.h <<\_ACEOF
22996#define REL_ALLOC 1
22997_ACEOF
22998
22999fi
23000
23001
23002
c0d27fcc
MR
23003
23004
ba4481b5 23005#### Report on what we decided to do.
488dd4c4
JD
23006#### Report GTK as a toolkit, even if it doesn't use Xt.
23007#### It makes printing result more understandable as using GTK sets
23008#### toolkit_scroll_bars to yes by default.
23009if test "${HAVE_GTK}" = "yes"; then
23010 USE_X_TOOLKIT=GTK
23011fi
23012
ba4481b5
DL
23013echo "
23014Configured for \`${canonical}'.
23015
23016 Where should the build process find the source code? ${srcdir}
23017 What operating system and machine description files should Emacs use?
23018 \`${opsysfile}' and \`${machfile}'
23019 What compiler should emacs be built with? ${CC} ${CFLAGS}
23020 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 23021 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 23022 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 23023 What window system should Emacs use? ${window_system}
8e967cf7 23024 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
23025
23026if test -n "${x_includes}"; then
23027echo " Where do we find X Windows header files? ${x_includes}"
23028else
23029echo " Where do we find X Windows header files? Standard dirs"
23030fi
23031if test -n "${x_libraries}"; then
23032echo " Where do we find X Windows libraries? ${x_libraries}"
23033else
23034echo " Where do we find X Windows libraries? Standard dirs"
23035fi
23036
23037echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
23038echo " Does Emacs use -lXpm? ${HAVE_XPM}"
23039echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
23040echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
23041echo " Does Emacs use -lungif? ${HAVE_GIF}"
23042echo " Does Emacs use -lpng? ${HAVE_PNG}"
23043echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
23044echo
23045
d0098f13
JD
23046if test $USE_XASSERTS = yes; then
23047 echo " Compiling with asserts turned on."
d0098f13
JD
23048 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
23049 echo
23050fi
05cf15c6 23051
a2d3b5bd
JD
23052if test "$USE_X_TOOLKIT" = GTK; then
23053 case "$canonical" in
23054 *cygwin*)
23055 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
23056 will probably get a crash on startup. If this happens, please use another
23057 toolkit for Emacs. See etc/PROBLEMS for more information."
23058 ;;
23059 esac
23060fi
23061
05cf15c6 23062
05cf15c6 23063
ba4481b5
DL
23064# Remove any trailing slashes in these variables.
23065test "${prefix}" != NONE &&
23066 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
23067test "${exec_prefix}" != NONE &&
23068 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
23069
d0e9bfd2
GM
23070## Check if the C preprocessor will convert `..' to `. .'. If so, set
23071## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
23072## from Makefile.c can correctly provide the arg `-traditional' to the
23073## C preprocessor.
23074
503d2be0 23075cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23076/* confdefs.h. */
23077_ACEOF
23078cat confdefs.h >>conftest.$ac_ext
23079cat >>conftest.$ac_ext <<_ACEOF
23080/* end confdefs.h. */
d0e9bfd2 23081yes..yes
503d2be0 23082_ACEOF
d0e9bfd2 23083if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 23084 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
23085 CPP_NEED_TRADITIONAL=no
23086else
d0e9bfd2
GM
23087 CPP_NEED_TRADITIONAL=yes
23088fi
23089rm -f conftest*
23090
c0d27fcc 23091
ca81d7a0
JD
23092ac_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"
23093
23094ac_config_commands="$ac_config_commands default"
23095
503d2be0 23096cat >confcache <<\_ACEOF
ba4481b5
DL
23097# This file is a shell script that caches the results of configure
23098# tests run on this system so they can be shared between configure
503d2be0
AS
23099# scripts and configure runs, see configure's option --config-cache.
23100# It is not useful on other systems. If it contains results you don't
23101# want to keep, you may remove or edit it.
ba4481b5 23102#
503d2be0
AS
23103# config.status only pays attention to the cache file if you give it
23104# the --recheck option to rerun configure.
ba4481b5 23105#
6bae0ccf 23106# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
23107# loading this file, other *unset* `ac_cv_foo' will be assigned the
23108# following values.
23109
23110_ACEOF
23111
ba4481b5
DL
23112# The following way of writing the cache mishandles newlines in values,
23113# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 23114# So, we kill variables containing newlines.
ba4481b5
DL
23115# Ultrix sh set writes to stderr and can't be redirected directly,
23116# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
23117(
23118 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23119 eval ac_val=\$$ac_var
23120 case $ac_val in #(
23121 *${as_nl}*)
23122 case $ac_var in #(
23123 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23124echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23125 esac
23126 case $ac_var in #(
23127 _ | IFS | as_nl) ;; #(
23128 *) $as_unset $ac_var ;;
23129 esac ;;
23130 esac
23131 done
23132
503d2be0 23133 (set) 2>&1 |
ca81d7a0
JD
23134 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23135 *${as_nl}ac_space=\ *)
503d2be0
AS
23136 # `set' does not quote correctly, so add quotes (double-quote
23137 # substitution turns \\\\ into \\, and sed turns \\ into \).
23138 sed -n \
edfaf76d
LK
23139 "s/'/'\\\\''/g;
23140 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 23141 ;; #(
503d2be0
AS
23142 *)
23143 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 23144 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 23145 ;;
ca81d7a0
JD
23146 esac |
23147 sort
23148) |
503d2be0 23149 sed '
ca81d7a0 23150 /^ac_cv_env_/b end
503d2be0 23151 t clear
ca81d7a0 23152 :clear
503d2be0
AS
23153 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23154 t end
ca81d7a0
JD
23155 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23156 :end' >>confcache
23157if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23158 if test -w "$cache_file"; then
23159 test "x$cache_file" != "x/dev/null" &&
23160 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23161echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 23162 cat confcache >$cache_file
ba4481b5 23163 else
ca81d7a0
JD
23164 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23165echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
23166 fi
23167fi
23168rm -f confcache
23169
ba4481b5
DL
23170test "x$prefix" = xNONE && prefix=$ac_default_prefix
23171# Let make expand exec_prefix.
23172test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23173
ba4481b5
DL
23174DEFS=-DHAVE_CONFIG_H
23175
6bae0ccf
DL
23176ac_libobjs=
23177ac_ltlibobjs=
23178for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23179 # 1. Remove the extension, and $U if already installed.
ca81d7a0
JD
23180 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
23181 ac_i=`echo "$ac_i" | sed "$ac_script"`
23182 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
23183 # will be set to the directory where LIBOBJS objects are built.
23184 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23185 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
23186done
23187LIBOBJS=$ac_libobjs
23188
23189LTLIBOBJS=$ac_ltlibobjs
23190
23191
c0d27fcc 23192
ba4481b5 23193: ${CONFIG_STATUS=./config.status}
503d2be0
AS
23194ac_clean_files_save=$ac_clean_files
23195ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 23196{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
23197echo "$as_me: creating $CONFIG_STATUS" >&6;}
23198cat >$CONFIG_STATUS <<_ACEOF
23199#! $SHELL
c0d27fcc 23200# Generated by $as_me.
ba4481b5 23201# Run this file to recreate the current configuration.
ba4481b5 23202# Compiler output produced by configure, useful for debugging
503d2be0 23203# configure, is in config.log if it exists.
ba4481b5 23204
503d2be0 23205debug=false
19650fd6
AS
23206ac_cs_recheck=false
23207ac_cs_silent=false
503d2be0 23208SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
23209_ACEOF
23210
23211cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
23212## --------------------- ##
23213## M4sh Initialization. ##
23214## --------------------- ##
23215
f053c89f
CY
23216# Be more Bourne compatible
23217DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
23218if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23219 emulate sh
23220 NULLCMD=:
6bae0ccf
DL
23221 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23222 # is contrary to our usage. Disable this feature.
23223 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
23224 setopt NO_GLOB_SUBST
23225else
f053c89f
CY
23226 case `(set -o) 2>/dev/null` in
23227 *posix*) set -o posix ;;
23228esac
23229
503d2be0 23230fi
f053c89f
CY
23231
23232
503d2be0 23233
ca81d7a0
JD
23234
23235# PATH needs CR
23236# Avoid depending upon Character Ranges.
23237as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23238as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23239as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23240as_cr_digits='0123456789'
23241as_cr_alnum=$as_cr_Letters$as_cr_digits
23242
23243# The user is always right.
23244if test "${PATH_SEPARATOR+set}" != set; then
23245 echo "#! /bin/sh" >conf$$.sh
23246 echo "exit 0" >>conf$$.sh
23247 chmod +x conf$$.sh
23248 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23249 PATH_SEPARATOR=';'
23250 else
23251 PATH_SEPARATOR=:
23252 fi
23253 rm -f conf$$.sh
23254fi
23255
c0d27fcc 23256# Support unset when possible.
edfaf76d 23257if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
23258 as_unset=unset
23259else
23260 as_unset=false
23261fi
23262
6bae0ccf 23263
ca81d7a0
JD
23264# IFS
23265# We need space, tab and new line, in precisely that order. Quoting is
23266# there to prevent editors from complaining about space-tab.
23267# (If _AS_PATH_WALK were called with IFS unset, it would disable word
23268# splitting by setting IFS to empty value.)
23269as_nl='
23270'
23271IFS=" "" $as_nl"
23272
23273# Find who we are. Look in the path if we contain no directory separator.
23274case $0 in
23275 *[\\/]* ) as_myself=$0 ;;
23276 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23277for as_dir in $PATH
23278do
23279 IFS=$as_save_IFS
23280 test -z "$as_dir" && as_dir=.
23281 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23282done
23283IFS=$as_save_IFS
23284
23285 ;;
23286esac
23287# We did not find ourselves, most probably we were run as `sh COMMAND'
23288# in which case we are not to be found in the path.
23289if test "x$as_myself" = x; then
23290 as_myself=$0
23291fi
23292if test ! -f "$as_myself"; then
23293 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
23294 { (exit 1); exit 1; }
23295fi
23296
6bae0ccf 23297# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
23298for as_var in ENV MAIL MAILPATH
23299do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23300done
6bae0ccf
DL
23301PS1='$ '
23302PS2='> '
23303PS4='+ '
23304
23305# NLS nuisances.
19650fd6
AS
23306for as_var in \
23307 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23308 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23309 LC_TELEPHONE LC_TIME
6bae0ccf 23310do
edfaf76d 23311 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
23312 eval $as_var=C; export $as_var
23313 else
ca81d7a0 23314 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
23315 fi
23316done
23317
23318# Required to use basename.
ca81d7a0
JD
23319if expr a : '\(a\)' >/dev/null 2>&1 &&
23320 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
23321 as_expr=expr
23322else
23323 as_expr=false
23324fi
23325
ca81d7a0 23326if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
23327 as_basename=basename
23328else
23329 as_basename=false
23330fi
c0d27fcc
MR
23331
23332
503d2be0 23333# Name of the executable.
ca81d7a0 23334as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
23335$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23336 X"$0" : 'X\(//\)$' \| \
ca81d7a0 23337 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 23338echo X/"$0" |
ca81d7a0
JD
23339 sed '/^.*\/\([^/][^/]*\)\/*$/{
23340 s//\1/
23341 q
23342 }
23343 /^X\/\(\/\/\)$/{
23344 s//\1/
23345 q
23346 }
23347 /^X\/\(\/\).*/{
23348 s//\1/
23349 q
23350 }
23351 s/.*/./; q'`
c0d27fcc 23352
ca81d7a0
JD
23353# CDPATH.
23354$as_unset CDPATH
4b411bfe
CY
23355
23356
c0d27fcc
MR
23357
23358 as_lineno_1=$LINENO
23359 as_lineno_2=$LINENO
c0d27fcc 23360 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 23361 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
23362
23363 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23364 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
23365 # line-number line after each line using $LINENO; the second 'sed'
23366 # does the real work. The second script uses 'N' to pair each
23367 # line-number line with the line containing $LINENO, and appends
23368 # trailing '-' during substitution so that $LINENO is not a special
23369 # case at line end.
c0d27fcc 23370 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
23371 # scripts with optimization help from Paolo Bonzini. Blame Lee
23372 # E. McMahon (1931-1989) for sed's syntax. :-)
23373 sed -n '
23374 p
23375 /[$]LINENO/=
23376 ' <$as_myself |
c0d27fcc 23377 sed '
ca81d7a0
JD
23378 s/[$]LINENO.*/&-/
23379 t lineno
23380 b
23381 :lineno
c0d27fcc 23382 N
ca81d7a0
JD
23383 :loop
23384 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 23385 t loop
ca81d7a0 23386 s/-\n.*//
c0d27fcc 23387 ' >$as_me.lineno &&
ca81d7a0
JD
23388 chmod +x "$as_me.lineno" ||
23389 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
23390 { (exit 1); exit 1; }; }
23391
23392 # Don't try to exec as it changes $[0], causing all sort of problems
23393 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
23394 # original and so on. Autoconf is especially sensitive to this).
23395 . "./$as_me.lineno"
c0d27fcc
MR
23396 # Exit status is that of the last command.
23397 exit
23398}
23399
23400
ca81d7a0
JD
23401if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
23402 as_dirname=dirname
23403else
23404 as_dirname=false
23405fi
23406
23407ECHO_C= ECHO_N= ECHO_T=
23408case `echo -n x` in
23409-n*)
23410 case `echo 'x\c'` in
23411 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
23412 *) ECHO_C='\c';;
23413 esac;;
23414*)
23415 ECHO_N='-n';;
c0d27fcc 23416esac
503d2be0 23417
ca81d7a0
JD
23418if expr a : '\(a\)' >/dev/null 2>&1 &&
23419 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
23420 as_expr=expr
23421else
23422 as_expr=false
23423fi
23424
23425rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
23426if test -d conf$$.dir; then
23427 rm -f conf$$.dir/conf$$.file
23428else
23429 rm -f conf$$.dir
23430 mkdir conf$$.dir
23431fi
503d2be0
AS
23432echo >conf$$.file
23433if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
23434 as_ln_s='ln -s'
23435 # ... but there are two gotchas:
23436 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
23437 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
23438 # In both cases, we have to default to `cp -p'.
23439 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 23440 as_ln_s='cp -p'
503d2be0
AS
23441elif ln conf$$.file conf$$ 2>/dev/null; then
23442 as_ln_s=ln
23443else
23444 as_ln_s='cp -p'
23445fi
ca81d7a0
JD
23446rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
23447rmdir conf$$.dir 2>/dev/null
503d2be0 23448
6bae0ccf
DL
23449if mkdir -p . 2>/dev/null; then
23450 as_mkdir_p=:
23451else
edfaf76d 23452 test -d ./-p && rmdir ./-p
6bae0ccf
DL
23453 as_mkdir_p=false
23454fi
23455
f053c89f
CY
23456if test -x / >/dev/null 2>&1; then
23457 as_test_x='test -x'
ca81d7a0 23458else
f053c89f
CY
23459 if ls -dL / >/dev/null 2>&1; then
23460 as_ls_L_option=L
23461 else
23462 as_ls_L_option=
23463 fi
23464 as_test_x='
23465 eval sh -c '\''
23466 if test -d "$1"; then
23467 test -d "$1/.";
23468 else
23469 case $1 in
23470 -*)set "./$1";;
23471 esac;
23472 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
23473 ???[sx]*):;;*)false;;esac;fi
23474 '\'' sh
23475 '
ca81d7a0 23476fi
f053c89f 23477as_executable_p=$as_test_x
503d2be0 23478
c0d27fcc 23479# Sed expression to map a string onto a valid CPP name.
edfaf76d 23480as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
23481
23482# Sed expression to map a string onto a valid variable name.
edfaf76d 23483as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 23484
503d2be0 23485
503d2be0
AS
23486exec 6>&1
23487
ca81d7a0 23488# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 23489# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
23490# values after options handling.
23491ac_log="
c0d27fcc 23492This file was extended by $as_me, which was
f053c89f 23493generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
23494
23495 CONFIG_FILES = $CONFIG_FILES
23496 CONFIG_HEADERS = $CONFIG_HEADERS
23497 CONFIG_LINKS = $CONFIG_LINKS
23498 CONFIG_COMMANDS = $CONFIG_COMMANDS
23499 $ $0 $@
23500
ca81d7a0
JD
23501on `(hostname || uname -n) 2>/dev/null | sed 1q`
23502"
23503
503d2be0
AS
23504_ACEOF
23505
ca81d7a0 23506cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 23507# Files that config.status was made for.
ca81d7a0
JD
23508config_files="$ac_config_files"
23509config_headers="$ac_config_headers"
23510config_commands="$ac_config_commands"
4b411bfe 23511
ca81d7a0 23512_ACEOF
503d2be0 23513
c0d27fcc 23514cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23515ac_cs_usage="\
23516\`$as_me' instantiates files from templates according to the
23517current configuration.
23518
23519Usage: $0 [OPTIONS] [FILE]...
23520
23521 -h, --help print this help, then exit
f053c89f 23522 -V, --version print version number and configuration settings, then exit
19650fd6 23523 -q, --quiet do not print progress messages
503d2be0
AS
23524 -d, --debug don't remove temporary files
23525 --recheck update $as_me by reconfiguring in the same conditions
23526 --file=FILE[:TEMPLATE]
edfaf76d 23527 instantiate the configuration file FILE
503d2be0 23528 --header=FILE[:TEMPLATE]
edfaf76d 23529 instantiate the configuration header FILE
503d2be0
AS
23530
23531Configuration files:
23532$config_files
23533
23534Configuration headers:
23535$config_headers
23536
23537Configuration commands:
23538$config_commands
23539
23540Report bugs to <bug-autoconf@gnu.org>."
4b411bfe 23541
ca81d7a0 23542_ACEOF
c0d27fcc 23543cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23544ac_cs_version="\\
23545config.status
f053c89f 23546configured by $0, generated by GNU Autoconf 2.61,
ca81d7a0 23547 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 23548
040c474e 23549Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
23550This config.status script is free software; the Free Software Foundation
23551gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
23552
23553ac_pwd='$ac_pwd'
23554srcdir='$srcdir'
23555INSTALL='$INSTALL'
c0d27fcc 23556_ACEOF
503d2be0 23557
c0d27fcc 23558cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23559# If no file are specified by the user, then we need to provide default
23560# value. By we need to know if files were specified by the user.
23561ac_need_defaults=:
23562while test $# != 0
ba4481b5 23563do
503d2be0
AS
23564 case $1 in
23565 --*=*)
ca81d7a0
JD
23566 ac_option=`expr "X$1" : 'X\([^=]*\)='`
23567 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
23568 ac_shift=:
23569 ;;
ca81d7a0 23570 *)
6bae0ccf
DL
23571 ac_option=$1
23572 ac_optarg=$2
23573 ac_shift=shift
503d2be0 23574 ;;
503d2be0
AS
23575 esac
23576
6bae0ccf 23577 case $ac_option in
503d2be0 23578 # Handling of the options.
19650fd6
AS
23579 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23580 ac_cs_recheck=: ;;
ca81d7a0
JD
23581 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
23582 echo "$ac_cs_version"; exit ;;
23583 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
23584 debug=: ;;
23585 --file | --fil | --fi | --f )
6bae0ccf
DL
23586 $ac_shift
23587 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
23588 ac_need_defaults=false;;
23589 --header | --heade | --head | --hea )
6bae0ccf
DL
23590 $ac_shift
23591 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 23592 ac_need_defaults=false;;
ca81d7a0
JD
23593 --he | --h)
23594 # Conflict between --help and --header
23595 { echo "$as_me: error: ambiguous option: $1
23596Try \`$0 --help' for more information." >&2
23597 { (exit 1); exit 1; }; };;
23598 --help | --hel | -h )
23599 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
23600 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23601 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23602 ac_cs_silent=: ;;
503d2be0
AS
23603
23604 # This is an error.
ca81d7a0
JD
23605 -*) { echo "$as_me: error: unrecognized option: $1
23606Try \`$0 --help' for more information." >&2
503d2be0
AS
23607 { (exit 1); exit 1; }; } ;;
23608
ca81d7a0
JD
23609 *) ac_config_targets="$ac_config_targets $1"
23610 ac_need_defaults=false ;;
503d2be0 23611
ba4481b5 23612 esac
503d2be0 23613 shift
ba4481b5
DL
23614done
23615
19650fd6
AS
23616ac_configure_extra_args=
23617
23618if $ac_cs_silent; then
23619 exec 6>/dev/null
23620 ac_configure_extra_args="$ac_configure_extra_args --silent"
23621fi
23622
23623_ACEOF
23624cat >>$CONFIG_STATUS <<_ACEOF
23625if \$ac_cs_recheck; then
ca81d7a0
JD
23626 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23627 CONFIG_SHELL=$SHELL
23628 export CONFIG_SHELL
23629 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
23630fi
23631
503d2be0 23632_ACEOF
ca81d7a0
JD
23633cat >>$CONFIG_STATUS <<\_ACEOF
23634exec 5>>config.log
23635{
23636 echo
23637 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23638## Running $as_me. ##
23639_ASBOX
23640 echo "$ac_log"
23641} >&5
ba4481b5 23642
ca81d7a0 23643_ACEOF
c0d27fcc 23644cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 23645#
ca81d7a0 23646# INIT-COMMANDS
503d2be0 23647#
503d2be0
AS
23648GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
23649
c0d27fcc
MR
23650_ACEOF
23651
4b411bfe 23652cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
23653
23654# Handling of arguments.
503d2be0
AS
23655for ac_config_target in $ac_config_targets
23656do
ca81d7a0
JD
23657 case $ac_config_target in
23658 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
23659 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23660 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
23661 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
23662 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
23663 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
23664 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
23665 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23666 "lispref/Makefile") CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
23667 "lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
23668 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
23669 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23670
c0d27fcc 23671 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
23672echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23673 { (exit 1); exit 1; }; };;
23674 esac
ba4481b5 23675done
503d2be0 23676
ca81d7a0 23677
503d2be0
AS
23678# If the user did not use the arguments to specify the items to instantiate,
23679# then the envvar interface is used. Set only those that are not.
23680# We use the long form for the default assignment because of an extremely
23681# bizarre bug on SunOS 4.1.3.
23682if $ac_need_defaults; then
23683 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23684 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23685 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 23686fi
503d2be0 23687
19650fd6 23688# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 23689# simply because there is no reason against having it here, and in addition,
19650fd6 23690# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
23691# Hook for its removal unless debugging.
23692# Note that there is a small window in which the directory will not be cleaned:
23693# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
23694$debug ||
23695{
ca81d7a0
JD
23696 tmp=
23697 trap 'exit_status=$?
23698 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
23699' 0
503d2be0
AS
23700 trap '{ (exit 1); exit 1; }' 1 2 13 15
23701}
503d2be0 23702# Create a (secure) tmp directory for tmp files.
19650fd6 23703
503d2be0 23704{
ca81d7a0 23705 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
23706 test -n "$tmp" && test -d "$tmp"
23707} ||
23708{
ca81d7a0
JD
23709 tmp=./conf$$-$RANDOM
23710 (umask 077 && mkdir "$tmp")
503d2be0
AS
23711} ||
23712{
19650fd6 23713 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
23714 { (exit 1); exit 1; }
23715}
23716
503d2be0 23717#
ca81d7a0 23718# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
23719#
23720
23721# No need to generate the scripts if there are no CONFIG_FILES.
23722# This happens for instance when ./config.status config.h
ca81d7a0
JD
23723if test -n "$CONFIG_FILES"; then
23724
23725_ACEOF
23726
23727
23728
23729ac_delim='%!_!# '
23730for ac_last_try in false false false false false :; do
23731 cat >conf$$subs.sed <<_ACEOF
23732SHELL!$SHELL$ac_delim
23733PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
23734PACKAGE_NAME!$PACKAGE_NAME$ac_delim
23735PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
23736PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
23737PACKAGE_STRING!$PACKAGE_STRING$ac_delim
23738PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
23739exec_prefix!$exec_prefix$ac_delim
23740prefix!$prefix$ac_delim
23741program_transform_name!$program_transform_name$ac_delim
23742bindir!$bindir$ac_delim
23743sbindir!$sbindir$ac_delim
23744libexecdir!$libexecdir$ac_delim
23745datarootdir!$datarootdir$ac_delim
23746datadir!$datadir$ac_delim
23747sysconfdir!$sysconfdir$ac_delim
23748sharedstatedir!$sharedstatedir$ac_delim
23749localstatedir!$localstatedir$ac_delim
23750includedir!$includedir$ac_delim
23751oldincludedir!$oldincludedir$ac_delim
23752docdir!$docdir$ac_delim
23753infodir!$infodir$ac_delim
23754htmldir!$htmldir$ac_delim
23755dvidir!$dvidir$ac_delim
23756pdfdir!$pdfdir$ac_delim
23757psdir!$psdir$ac_delim
23758libdir!$libdir$ac_delim
23759localedir!$localedir$ac_delim
23760mandir!$mandir$ac_delim
23761DEFS!$DEFS$ac_delim
23762ECHO_C!$ECHO_C$ac_delim
23763ECHO_N!$ECHO_N$ac_delim
23764ECHO_T!$ECHO_T$ac_delim
23765LIBS!$LIBS$ac_delim
23766build_alias!$build_alias$ac_delim
23767host_alias!$host_alias$ac_delim
23768target_alias!$target_alias$ac_delim
23769MAINT!$MAINT$ac_delim
23770build!$build$ac_delim
23771build_cpu!$build_cpu$ac_delim
23772build_vendor!$build_vendor$ac_delim
23773build_os!$build_os$ac_delim
23774host!$host$ac_delim
23775host_cpu!$host_cpu$ac_delim
23776host_vendor!$host_vendor$ac_delim
23777host_os!$host_os$ac_delim
23778CC!$CC$ac_delim
23779CFLAGS!$CFLAGS$ac_delim
23780LDFLAGS!$LDFLAGS$ac_delim
23781CPPFLAGS!$CPPFLAGS$ac_delim
23782ac_ct_CC!$ac_ct_CC$ac_delim
23783EXEEXT!$EXEEXT$ac_delim
23784OBJEXT!$OBJEXT$ac_delim
23785CPP!$CPP$ac_delim
23786GREP!$GREP$ac_delim
23787EGREP!$EGREP$ac_delim
23788LN_S!$LN_S$ac_delim
23789INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
23790INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
23791INSTALL_DATA!$INSTALL_DATA$ac_delim
23792RANLIB!$RANLIB$ac_delim
23793INSTALL_INFO!$INSTALL_INFO$ac_delim
23794GZIP_PROG!$GZIP_PROG$ac_delim
23795LIBSOUND!$LIBSOUND$ac_delim
23796PKG_CONFIG!$PKG_CONFIG$ac_delim
23797ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
23798ALSA_LIBS!$ALSA_LIBS$ac_delim
23799CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
23800SET_MAKE!$SET_MAKE$ac_delim
23801XMKMF!$XMKMF$ac_delim
23802GTK_CFLAGS!$GTK_CFLAGS$ac_delim
23803GTK_LIBS!$GTK_LIBS$ac_delim
9d89ffd0
JD
23804XFT_CFLAGS!$XFT_CFLAGS$ac_delim
23805XFT_LIBS!$XFT_LIBS$ac_delim
ca81d7a0
JD
23806ALLOCA!$ALLOCA$ac_delim
23807liblockfile!$liblockfile$ac_delim
23808LIBOBJS!$LIBOBJS$ac_delim
23809NEED_SETGID!$NEED_SETGID$ac_delim
23810KMEM_GROUP!$KMEM_GROUP$ac_delim
23811GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
23812GETOPT_H!$GETOPT_H$ac_delim
23813GETOPTOBJS!$GETOPTOBJS$ac_delim
23814version!$version$ac_delim
23815configuration!$configuration$ac_delim
23816canonical!$canonical$ac_delim
23817srcdir!$srcdir$ac_delim
23818lispdir!$lispdir$ac_delim
23819locallisppath!$locallisppath$ac_delim
23820lisppath!$lisppath$ac_delim
23821x_default_search_path!$x_default_search_path$ac_delim
23822etcdir!$etcdir$ac_delim
23823archlibdir!$archlibdir$ac_delim
23824bitmapdir!$bitmapdir$ac_delim
23825gamedir!$gamedir$ac_delim
23826gameuser!$gameuser$ac_delim
23827c_switch_system!$c_switch_system$ac_delim
23828c_switch_machine!$c_switch_machine$ac_delim
ca81d7a0
JD
23829_ACEOF
23830
23831 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
23832 break
23833 elif $ac_last_try; then
23834 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
23835echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
23836 { (exit 1); exit 1; }; }
23837 else
23838 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8eeae1c9 23839 fi
ca81d7a0
JD
23840done
23841
23842ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
23843if test -n "$ac_eof"; then
23844 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
23845 ac_eof=`expr $ac_eof + 1`
23846fi
23847
23848cat >>$CONFIG_STATUS <<_ACEOF
23849cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
23850/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23851_ACEOF
23852sed '
23853s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
23854s/^/s,@/; s/!/@,|#_!!_#|/
23855:n
23856t n
23857s/'"$ac_delim"'$/,g/; t
23858s/$/\\/; p
23859N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
23860' >>$CONFIG_STATUS <conf$$subs.sed
23861rm -f conf$$subs.sed
23862cat >>$CONFIG_STATUS <<_ACEOF
23863CEOF$ac_eof
23864_ACEOF
23865
23866
23867ac_delim='%!_!# '
23868for ac_last_try in false false false false false :; do
23869 cat >conf$$subs.sed <<_ACEOF
9d89ffd0
JD
23870LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
23871LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
ca81d7a0
JD
23872C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
23873X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
23874machfile!$machfile$ac_delim
23875opsysfile!$opsysfile$ac_delim
23876carbon_appdir!$carbon_appdir$ac_delim
23877LTLIBOBJS!$LTLIBOBJS$ac_delim
23878_ACEOF
23879
9d89ffd0 23880 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 8; then
ca81d7a0
JD
23881 break
23882 elif $ac_last_try; then
23883 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
23884echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
23885 { (exit 1); exit 1; }; }
23886 else
23887 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
23888 fi
23889done
23890
23891ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
23892if test -n "$ac_eof"; then
23893 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
23894 ac_eof=`expr $ac_eof + 1`
23895fi
8eeae1c9 23896
ca81d7a0
JD
23897cat >>$CONFIG_STATUS <<_ACEOF
23898cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
23899/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
23900_ACEOF
23901sed '
23902s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
23903s/^/s,@/; s/!/@,|#_!!_#|/
23904:n
23905t n
23906s/'"$ac_delim"'$/,g/; t
23907s/$/\\/; p
23908N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
23909' >>$CONFIG_STATUS <conf$$subs.sed
23910rm -f conf$$subs.sed
23911cat >>$CONFIG_STATUS <<_ACEOF
23912:end
23913s/|#_!!_#|//g
23914CEOF$ac_eof
c0d27fcc 23915_ACEOF
ca81d7a0
JD
23916
23917
23918# VPATH may cause trouble with some makes, so we remove $(srcdir),
23919# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23920# trailing colons and then remove the whole line if VPATH becomes empty
23921# (actually we leave an empty line to preserve line numbers).
23922if test "x$srcdir" = x.; then
23923 ac_vpsub='/^[ ]*VPATH[ ]*=/{
23924s/:*\$(srcdir):*/:/
23925s/:*\${srcdir}:*/:/
23926s/:*@srcdir@:*/:/
23927s/^\([^=]*=[ ]*\):*/\1/
23928s/:*$//
23929s/^[^=]*=[ ]*$//
23930}'
23931fi
23932
c0d27fcc 23933cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
23934fi # test -n "$CONFIG_FILES"
23935
23936
23937for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
23938do
23939 case $ac_tag in
23940 :[FHLC]) ac_mode=$ac_tag; continue;;
23941 esac
23942 case $ac_mode$ac_tag in
23943 :[FHL]*:*);;
23944 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
23945echo "$as_me: error: Invalid tag $ac_tag." >&2;}
23946 { (exit 1); exit 1; }; };;
23947 :[FH]-) ac_tag=-:-;;
23948 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
23949 esac
23950 ac_save_IFS=$IFS
23951 IFS=:
23952 set x $ac_tag
23953 IFS=$ac_save_IFS
23954 shift
23955 ac_file=$1
23956 shift
23957
23958 case $ac_mode in
23959 :L) ac_source=$1;;
23960 :[FH])
23961 ac_file_inputs=
23962 for ac_f
23963 do
23964 case $ac_f in
23965 -) ac_f="$tmp/stdin";;
23966 *) # Look for the file first in the build tree, then in the source tree
23967 # (if the path is not absolute). The absolute path cannot be DOS-style,
23968 # because $ac_f cannot contain `:'.
23969 test -f "$ac_f" ||
23970 case $ac_f in
23971 [\\/$]*) false;;
23972 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
23973 esac ||
23974 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
23975echo "$as_me: error: cannot find input file: $ac_f" >&2;}
23976 { (exit 1); exit 1; }; };;
23977 esac
23978 ac_file_inputs="$ac_file_inputs $ac_f"
23979 done
23980
23981 # Let's still pretend it is `configure' which instantiates (i.e., don't
23982 # use $as_me), people would be surprised to read:
23983 # /* config.h. Generated by config.status. */
23984 configure_input="Generated from "`IFS=:
23985 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
23986 if test x"$ac_file" != x-; then
23987 configure_input="$ac_file. $configure_input"
23988 { echo "$as_me:$LINENO: creating $ac_file" >&5
23989echo "$as_me: creating $ac_file" >&6;}
23990 fi
23991
23992 case $ac_tag in
23993 *:-:* | *:-) cat >"$tmp/stdin";;
23994 esac
23995 ;;
ba4481b5
DL
23996 esac
23997
ca81d7a0 23998 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 23999$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24000 X"$ac_file" : 'X\(//\)[^/]' \| \
24001 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 24002 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 24003echo X"$ac_file" |
ca81d7a0
JD
24004 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24005 s//\1/
24006 q
24007 }
24008 /^X\(\/\/\)[^/].*/{
24009 s//\1/
24010 q
24011 }
24012 /^X\(\/\/\)$/{
24013 s//\1/
24014 q
24015 }
24016 /^X\(\/\).*/{
24017 s//\1/
24018 q
24019 }
24020 s/.*/./; q'`
24021 { as_dir="$ac_dir"
24022 case $as_dir in #(
24023 -*) as_dir=./$as_dir;;
24024 esac
24025 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 24026 as_dirs=
ca81d7a0
JD
24027 while :; do
24028 case $as_dir in #(
24029 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24030 *) as_qdir=$as_dir;;
24031 esac
24032 as_dirs="'$as_qdir' $as_dirs"
24033 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 24034$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24035 X"$as_dir" : 'X\(//\)[^/]' \| \
24036 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 24037 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 24038echo X"$as_dir" |
ca81d7a0
JD
24039 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24040 s//\1/
24041 q
24042 }
24043 /^X\(\/\/\)[^/].*/{
24044 s//\1/
24045 q
24046 }
24047 /^X\(\/\/\)$/{
24048 s//\1/
24049 q
24050 }
24051 /^X\(\/\).*/{
24052 s//\1/
24053 q
24054 }
24055 s/.*/./; q'`
24056 test -d "$as_dir" && break
6bae0ccf 24057 done
ca81d7a0
JD
24058 test -z "$as_dirs" || eval "mkdir $as_dirs"
24059 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24060echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 24061 { (exit 1); exit 1; }; }; }
c0d27fcc 24062 ac_builddir=.
98418dba 24063
ca81d7a0
JD
24064case "$ac_dir" in
24065.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24066*)
c0d27fcc 24067 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
24068 # A ".." for each directory in $ac_dir_suffix.
24069 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24070 case $ac_top_builddir_sub in
24071 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24072 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24073 esac ;;
24074esac
24075ac_abs_top_builddir=$ac_pwd
24076ac_abs_builddir=$ac_pwd$ac_dir_suffix
24077# for backward compatibility:
24078ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
24079
24080case $srcdir in
ca81d7a0 24081 .) # We are building in place.
c0d27fcc 24082 ac_srcdir=.
ca81d7a0
JD
24083 ac_top_srcdir=$ac_top_builddir_sub
24084 ac_abs_top_srcdir=$ac_pwd ;;
24085 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 24086 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
24087 ac_top_srcdir=$srcdir
24088 ac_abs_top_srcdir=$srcdir ;;
24089 *) # Relative name.
24090 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24091 ac_top_srcdir=$ac_top_build_prefix$srcdir
24092 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 24093esac
ca81d7a0 24094ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 24095
c0d27fcc 24096
ca81d7a0
JD
24097 case $ac_mode in
24098 :F)
24099 #
24100 # CONFIG_FILE
24101 #
ba4481b5 24102
503d2be0
AS
24103 case $INSTALL in
24104 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 24105 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 24106 esac
ca81d7a0 24107_ACEOF
ba4481b5 24108
ca81d7a0
JD
24109cat >>$CONFIG_STATUS <<\_ACEOF
24110# If the template does not know about datarootdir, expand it.
24111# FIXME: This hack should be removed a few years after 2.60.
24112ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 24113
ca81d7a0
JD
24114case `sed -n '/datarootdir/ {
24115 p
24116 q
24117}
24118/@datadir@/p
24119/@docdir@/p
24120/@infodir@/p
24121/@localedir@/p
24122/@mandir@/p
24123' $ac_file_inputs` in
24124*datarootdir*) ac_datarootdir_seen=yes;;
24125*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24126 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24127echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 24128_ACEOF
ca81d7a0
JD
24129cat >>$CONFIG_STATUS <<_ACEOF
24130 ac_datarootdir_hack='
24131 s&@datadir@&$datadir&g
24132 s&@docdir@&$docdir&g
24133 s&@infodir@&$infodir&g
24134 s&@localedir@&$localedir&g
24135 s&@mandir@&$mandir&g
24136 s&\\\${datarootdir}&$datarootdir&g' ;;
24137esac
24138_ACEOF
24139
24140# Neutralize VPATH when `$srcdir' = `.'.
24141# Shell code in configure.ac might set extrasub.
24142# FIXME: do we really want to maintain this feature?
c0d27fcc 24143cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
24144 sed "$ac_vpsub
24145$extrasub
c0d27fcc
MR
24146_ACEOF
24147cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24148:t
24149/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ca81d7a0
JD
24150s&@configure_input@&$configure_input&;t t
24151s&@top_builddir@&$ac_top_builddir_sub&;t t
24152s&@srcdir@&$ac_srcdir&;t t
24153s&@abs_srcdir@&$ac_abs_srcdir&;t t
24154s&@top_srcdir@&$ac_top_srcdir&;t t
24155s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24156s&@builddir@&$ac_builddir&;t t
24157s&@abs_builddir@&$ac_abs_builddir&;t t
24158s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24159s&@INSTALL@&$ac_INSTALL&;t t
24160$ac_datarootdir_hack
24161" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
24162
24163test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24164 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24165 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24166 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24167which seems to be undefined. Please make sure it is defined." >&5
24168echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24169which seems to be undefined. Please make sure it is defined." >&2;}
24170
24171 rm -f "$tmp/stdin"
503d2be0 24172 case $ac_file in
ca81d7a0
JD
24173 -) cat "$tmp/out"; rm -f "$tmp/out";;
24174 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 24175 esac
ca81d7a0
JD
24176 ;;
24177 :H)
24178 #
24179 # CONFIG_HEADER
24180 #
24181_ACEOF
24182
24183# Transform confdefs.h into a sed script `conftest.defines', that
24184# substitutes the proper values into config.h.in to produce config.h.
24185rm -f conftest.defines conftest.tail
24186# First, append a space to every undef/define line, to ease matching.
24187echo 's/$/ /' >conftest.defines
24188# Then, protect against being on the right side of a sed subst, or in
24189# an unquoted here document, in config.status. If some macros were
24190# called several times there might be several #defines for the same
24191# symbol, which is useless. But do not sort them, since the last
24192# AC_DEFINE must be honored.
24193ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24194# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
24195# NAME is the cpp macro being defined, VALUE is the value it is being given.
24196# PARAMS is the parameter list in the macro definition--in most cases, it's
24197# just an empty string.
24198ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
24199ac_dB='\\)[ (].*,\\1define\\2'
24200ac_dC=' '
24201ac_dD=' ,'
24202
24203uniq confdefs.h |
24204 sed -n '
24205 t rset
24206 :rset
24207 s/^[ ]*#[ ]*define[ ][ ]*//
24208 t ok
24209 d
24210 :ok
24211 s/[\\&,]/\\&/g
24212 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
24213 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
24214 ' >>conftest.defines
24215
24216# Remove the space that was appended to ease matching.
24217# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
24218# example, in the case of _POSIX_SOURCE, which is predefined and required
24219# on some systems where configure will not decide to define it.
ca81d7a0
JD
24220# (The regexp can be short, since the line contains either #define or #undef.)
24221echo 's/ $//
24222s,^[ #]*u.*,/* & */,' >>conftest.defines
24223
24224# Break up conftest.defines:
24225ac_max_sed_lines=50
24226
24227# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
24228# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
24229# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
24230# et cetera.
24231ac_in='$ac_file_inputs'
24232ac_out='"$tmp/out1"'
24233ac_nxt='"$tmp/out2"'
24234
24235while :
503d2be0 24236do
ca81d7a0
JD
24237 # Write a here document:
24238 cat >>$CONFIG_STATUS <<_ACEOF
24239 # First, check the format of the line:
24240 cat >"\$tmp/defines.sed" <<\\CEOF
24241/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
24242/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
24243b
24244:def
24245_ACEOF
24246 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 24247 echo 'CEOF
ca81d7a0
JD
24248 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
24249 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
24250 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
24251 grep . conftest.tail >/dev/null || break
503d2be0
AS
24252 rm -f conftest.defines
24253 mv conftest.tail conftest.defines
24254done
ca81d7a0 24255rm -f conftest.defines conftest.tail
503d2be0 24256
ca81d7a0 24257echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 24258cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 24259 if test x"$ac_file" != x-; then
ca81d7a0
JD
24260 echo "/* $configure_input */" >"$tmp/config.h"
24261 cat "$ac_result" >>"$tmp/config.h"
24262 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 24263 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
24264echo "$as_me: $ac_file is unchanged" >&6;}
24265 else
503d2be0 24266 rm -f $ac_file
ca81d7a0 24267 mv "$tmp/config.h" $ac_file
ba4481b5 24268 fi
503d2be0 24269 else
ca81d7a0
JD
24270 echo "/* $configure_input */"
24271 cat "$ac_result"
ba4481b5 24272 fi
ca81d7a0
JD
24273 rm -f "$tmp/out12"
24274 ;;
4b411bfe 24275
ca81d7a0
JD
24276 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
24277echo "$as_me: executing $ac_file commands" >&6;}
24278 ;;
24279 esac
c0d27fcc 24280
4b411bfe 24281
ca81d7a0
JD
24282 case $ac_file$ac_mode in
24283 "default":C)
ba4481b5
DL
24284
24285### Make the necessary directories, if they don't exist.
24286for dir in etc lisp ; do
24287 test -d ${dir} || mkdir ${dir}
24288done
24289
24290# Build src/Makefile from ${srcdir}/src/Makefile.c
24291# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
24292# This must be done after src/config.h is built, since we rely on that file.
24293
24294# Now get this: Some word that is part of the ${srcdir} directory name
24295# or the ${configuration} value might, just might, happen to be an
24296# identifier like `sun4' or `i386' or something, and be predefined by
24297# the C preprocessor to some helpful value like 1, or maybe the empty
24298# string. Needless to say consequent macro substitutions are less
24299# than conducive to the makefile finding the correct directory.
24300undefs="`echo $top_srcdir $configuration $canonical |
24301sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24302 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
24303`"
24304
24305echo creating src/epaths.h
4aa6b955 24306${MAKE-make} epaths-force
ba4481b5 24307
1c203d4c
DL
24308# As of 2000-11-19, newest development versions of GNU cpp preprocess
24309# `..' to `. .' unless invoked with -traditional
24310
d0e9bfd2 24311if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
24312 CPPFLAGS="$CPPFLAGS -traditional"
24313fi
24314
ba4481b5
DL
24315echo creating lib-src/Makefile
24316( cd lib-src
24317 rm -f junk.c junk1.c junk2.c
24318 sed -e '/start of cpp stuff/q' \
24319 < Makefile.c > junk1.c
24320 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24321 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24322 < Makefile.c > junk.c
503d2be0 24323 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24324 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24325 cat junk1.c junk2.c > Makefile.new
24326 rm -f junk.c junk1.c junk2.c
24327 chmod 444 Makefile.new
24328 mv -f Makefile.new Makefile
24329)
24330
24331echo creating src/Makefile
24332( cd src
24333 rm -f junk.c junk1.c junk2.c
24334 sed -e '/start of cpp stuff/q' \
24335 < Makefile.c > junk1.c
24336 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24337 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24338 < Makefile.c > junk.c
503d2be0 24339 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24340 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24341 cat junk1.c junk2.c > Makefile.new
24342 rm -f junk.c junk1.c junk2.c
24343 chmod 444 Makefile.new
24344 mv -f Makefile.new Makefile
24345)
24346
503d2be0 24347if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 24348 echo creating src/.gdbinit
503d2be0 24349 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
24350fi
24351
24352# This is how we know whether to re-run configure in certain cases.
24353touch src/config.stamp
24354
503d2be0 24355 ;;
ca81d7a0 24356
503d2be0 24357 esac
ca81d7a0 24358done # for ac_tag
503d2be0 24359
ba4481b5 24360
503d2be0 24361{ (exit 0); exit 0; }
c0d27fcc 24362_ACEOF
ba4481b5 24363chmod +x $CONFIG_STATUS
503d2be0
AS
24364ac_clean_files=$ac_clean_files_save
24365
c0d27fcc 24366
503d2be0
AS
24367# configure is writing to config.log, and then calls config.status.
24368# config.status does its own redirection, appending to config.log.
24369# Unfortunately, on DOS this fails, as config.log is still kept open
24370# by configure, so config.status won't be able to write to it; its
24371# output is simply discarded. So we exec the FD to /dev/null,
24372# effectively closing config.log, so it can be properly (re)opened and
24373# appended to by config.status. When coming back to configure, we
24374# need to make the FD available again.
24375if test "$no_create" != yes; then
24376 ac_cs_success=:
19650fd6
AS
24377 ac_config_status_args=
24378 test "$silent" = yes &&
24379 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 24380 exec 5>/dev/null
19650fd6 24381 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
24382 exec 5>>config.log
24383 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24384 # would make configure fail if this is the last instruction.
24385 $ac_cs_success || { (exit 1); exit 1; }
24386fi
f5f47add 24387
c0d27fcc 24388