Add 2007 to copyright years.
[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,
4e6835db 6# 2002, 2003, 2004, 2005, 2006, 2007 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
692ALLOCA
693liblockfile
694LIBOBJS
695NEED_SETGID
696KMEM_GROUP
697GETLOADAVG_LIBS
698GETOPT_H
699GETOPTOBJS
700version
701configuration
702canonical
703srcdir
704lispdir
705locallisppath
706lisppath
707x_default_search_path
708etcdir
709archlibdir
710bitmapdir
711gamedir
712gameuser
713c_switch_system
714c_switch_machine
715LD_SWITCH_X_SITE
716LD_SWITCH_X_SITE_AUX
717C_SWITCH_X_SITE
718X_TOOLKIT_TYPE
719machfile
720opsysfile
721carbon_appdir
722LTLIBOBJS'
6bae0ccf 723ac_subst_files=''
ca81d7a0
JD
724 ac_precious_vars='build_alias
725host_alias
726target_alias
727CC
728CFLAGS
729LDFLAGS
f053c89f 730LIBS
ca81d7a0
JD
731CPPFLAGS
732CPP
733XMKMF'
734
c0d27fcc 735
ba4481b5 736# Initialize some variables set by options.
503d2be0
AS
737ac_init_help=
738ac_init_version=false
ba4481b5
DL
739# The variables have the same names as the options, with
740# dashes changed to underlines.
503d2be0 741cache_file=/dev/null
ba4481b5 742exec_prefix=NONE
ba4481b5 743no_create=
ba4481b5
DL
744no_recursion=
745prefix=NONE
746program_prefix=NONE
747program_suffix=NONE
748program_transform_name=s,x,x,
749silent=
750site=
751srcdir=
ba4481b5
DL
752verbose=
753x_includes=NONE
754x_libraries=NONE
503d2be0
AS
755
756# Installation directory options.
757# These are left unexpanded so users can "make install exec_prefix=/foo"
758# and all the variables that are supposed to be based on exec_prefix
759# by default will actually change.
760# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 761# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
762bindir='${exec_prefix}/bin'
763sbindir='${exec_prefix}/sbin'
764libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
765datarootdir='${prefix}/share'
766datadir='${datarootdir}'
ba4481b5
DL
767sysconfdir='${prefix}/etc'
768sharedstatedir='${prefix}/com'
769localstatedir='${prefix}/var'
ba4481b5
DL
770includedir='${prefix}/include'
771oldincludedir='/usr/include'
ca81d7a0
JD
772docdir='${datarootdir}/doc/${PACKAGE}'
773infodir='${datarootdir}/info'
774htmldir='${docdir}'
775dvidir='${docdir}'
776pdfdir='${docdir}'
777psdir='${docdir}'
778libdir='${exec_prefix}/lib'
779localedir='${datarootdir}/locale'
780mandir='${datarootdir}/man'
ba4481b5 781
ba4481b5 782ac_prev=
ca81d7a0 783ac_dashdash=
ba4481b5
DL
784for ac_option
785do
ba4481b5
DL
786 # If the previous option needs an argument, assign it.
787 if test -n "$ac_prev"; then
ca81d7a0 788 eval $ac_prev=\$ac_option
ba4481b5
DL
789 ac_prev=
790 continue
791 fi
792
ca81d7a0
JD
793 case $ac_option in
794 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
795 *) ac_optarg=yes ;;
796 esac
ba4481b5
DL
797
798 # Accept the important Cygnus configure options, so we can diagnose typos.
799
ca81d7a0
JD
800 case $ac_dashdash$ac_option in
801 --)
802 ac_dashdash=yes ;;
ba4481b5
DL
803
804 -bindir | --bindir | --bindi | --bind | --bin | --bi)
805 ac_prev=bindir ;;
806 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 807 bindir=$ac_optarg ;;
ba4481b5
DL
808
809 -build | --build | --buil | --bui | --bu)
503d2be0 810 ac_prev=build_alias ;;
ba4481b5 811 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 812 build_alias=$ac_optarg ;;
ba4481b5
DL
813
814 -cache-file | --cache-file | --cache-fil | --cache-fi \
815 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
816 ac_prev=cache_file ;;
817 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
818 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
819 cache_file=$ac_optarg ;;
820
821 --config-cache | -C)
822 cache_file=config.cache ;;
ba4481b5 823
ca81d7a0 824 -datadir | --datadir | --datadi | --datad)
ba4481b5 825 ac_prev=datadir ;;
ca81d7a0 826 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 827 datadir=$ac_optarg ;;
ba4481b5 828
ca81d7a0
JD
829 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
830 | --dataroo | --dataro | --datar)
831 ac_prev=datarootdir ;;
832 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
833 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
834 datarootdir=$ac_optarg ;;
835
ba4481b5 836 -disable-* | --disable-*)
503d2be0 837 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 838 # Reject names that are not valid shell variable names.
f053c89f 839 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
840 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
841 { (exit 1); exit 1; }; }
f053c89f 842 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0
JD
843 eval enable_$ac_feature=no ;;
844
845 -docdir | --docdir | --docdi | --doc | --do)
846 ac_prev=docdir ;;
847 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
848 docdir=$ac_optarg ;;
849
850 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
851 ac_prev=dvidir ;;
852 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
853 dvidir=$ac_optarg ;;
ba4481b5
DL
854
855 -enable-* | --enable-*)
503d2be0 856 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 857 # Reject names that are not valid shell variable names.
f053c89f 858 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
859 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
860 { (exit 1); exit 1; }; }
f053c89f 861 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0 862 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
863
864 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
865 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
866 | --exec | --exe | --ex)
867 ac_prev=exec_prefix ;;
868 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
869 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
870 | --exec=* | --exe=* | --ex=*)
503d2be0 871 exec_prefix=$ac_optarg ;;
ba4481b5
DL
872
873 -gas | --gas | --ga | --g)
874 # Obsolete; use --with-gas.
875 with_gas=yes ;;
876
503d2be0
AS
877 -help | --help | --hel | --he | -h)
878 ac_init_help=long ;;
879 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
880 ac_init_help=recursive ;;
881 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
882 ac_init_help=short ;;
ba4481b5
DL
883
884 -host | --host | --hos | --ho)
503d2be0 885 ac_prev=host_alias ;;
ba4481b5 886 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 887 host_alias=$ac_optarg ;;
ba4481b5 888
ca81d7a0
JD
889 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
890 ac_prev=htmldir ;;
891 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
892 | --ht=*)
893 htmldir=$ac_optarg ;;
894
ba4481b5
DL
895 -includedir | --includedir | --includedi | --included | --include \
896 | --includ | --inclu | --incl | --inc)
897 ac_prev=includedir ;;
898 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
899 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 900 includedir=$ac_optarg ;;
ba4481b5
DL
901
902 -infodir | --infodir | --infodi | --infod | --info | --inf)
903 ac_prev=infodir ;;
904 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 905 infodir=$ac_optarg ;;
ba4481b5
DL
906
907 -libdir | --libdir | --libdi | --libd)
908 ac_prev=libdir ;;
909 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 910 libdir=$ac_optarg ;;
ba4481b5
DL
911
912 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
913 | --libexe | --libex | --libe)
914 ac_prev=libexecdir ;;
915 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
916 | --libexe=* | --libex=* | --libe=*)
503d2be0 917 libexecdir=$ac_optarg ;;
ba4481b5 918
ca81d7a0
JD
919 -localedir | --localedir | --localedi | --localed | --locale)
920 ac_prev=localedir ;;
921 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
922 localedir=$ac_optarg ;;
923
ba4481b5 924 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 925 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
926 ac_prev=localstatedir ;;
927 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 928 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 929 localstatedir=$ac_optarg ;;
ba4481b5
DL
930
931 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
932 ac_prev=mandir ;;
933 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 934 mandir=$ac_optarg ;;
ba4481b5
DL
935
936 -nfp | --nfp | --nf)
937 # Obsolete; use --without-fp.
938 with_fp=no ;;
939
940 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 941 | --no-cr | --no-c | -n)
ba4481b5
DL
942 no_create=yes ;;
943
944 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
945 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
946 no_recursion=yes ;;
947
948 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
949 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
950 | --oldin | --oldi | --old | --ol | --o)
951 ac_prev=oldincludedir ;;
952 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
953 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
954 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 955 oldincludedir=$ac_optarg ;;
ba4481b5
DL
956
957 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
958 ac_prev=prefix ;;
959 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 960 prefix=$ac_optarg ;;
ba4481b5
DL
961
962 -program-prefix | --program-prefix | --program-prefi | --program-pref \
963 | --program-pre | --program-pr | --program-p)
964 ac_prev=program_prefix ;;
965 -program-prefix=* | --program-prefix=* | --program-prefi=* \
966 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 967 program_prefix=$ac_optarg ;;
ba4481b5
DL
968
969 -program-suffix | --program-suffix | --program-suffi | --program-suff \
970 | --program-suf | --program-su | --program-s)
971 ac_prev=program_suffix ;;
972 -program-suffix=* | --program-suffix=* | --program-suffi=* \
973 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 974 program_suffix=$ac_optarg ;;
ba4481b5
DL
975
976 -program-transform-name | --program-transform-name \
977 | --program-transform-nam | --program-transform-na \
978 | --program-transform-n | --program-transform- \
979 | --program-transform | --program-transfor \
980 | --program-transfo | --program-transf \
981 | --program-trans | --program-tran \
982 | --progr-tra | --program-tr | --program-t)
983 ac_prev=program_transform_name ;;
984 -program-transform-name=* | --program-transform-name=* \
985 | --program-transform-nam=* | --program-transform-na=* \
986 | --program-transform-n=* | --program-transform-=* \
987 | --program-transform=* | --program-transfor=* \
988 | --program-transfo=* | --program-transf=* \
989 | --program-trans=* | --program-tran=* \
990 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 991 program_transform_name=$ac_optarg ;;
ba4481b5 992
ca81d7a0
JD
993 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
994 ac_prev=pdfdir ;;
995 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
996 pdfdir=$ac_optarg ;;
997
998 -psdir | --psdir | --psdi | --psd | --ps)
999 ac_prev=psdir ;;
1000 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1001 psdir=$ac_optarg ;;
1002
ba4481b5
DL
1003 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1004 | -silent | --silent | --silen | --sile | --sil)
1005 silent=yes ;;
1006
1007 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1008 ac_prev=sbindir ;;
1009 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1010 | --sbi=* | --sb=*)
503d2be0 1011 sbindir=$ac_optarg ;;
ba4481b5
DL
1012
1013 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1014 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1015 | --sharedst | --shareds | --shared | --share | --shar \
1016 | --sha | --sh)
1017 ac_prev=sharedstatedir ;;
1018 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1019 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1020 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1021 | --sha=* | --sh=*)
503d2be0 1022 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1023
1024 -site | --site | --sit)
1025 ac_prev=site ;;
1026 -site=* | --site=* | --sit=*)
503d2be0 1027 site=$ac_optarg ;;
ba4481b5
DL
1028
1029 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1030 ac_prev=srcdir ;;
1031 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1032 srcdir=$ac_optarg ;;
ba4481b5
DL
1033
1034 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1035 | --syscon | --sysco | --sysc | --sys | --sy)
1036 ac_prev=sysconfdir ;;
1037 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1038 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1039 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1040
1041 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1042 ac_prev=target_alias ;;
ba4481b5 1043 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1044 target_alias=$ac_optarg ;;
ba4481b5
DL
1045
1046 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1047 verbose=yes ;;
1048
503d2be0
AS
1049 -version | --version | --versio | --versi | --vers | -V)
1050 ac_init_version=: ;;
ba4481b5
DL
1051
1052 -with-* | --with-*)
503d2be0 1053 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1054 # Reject names that are not valid shell variable names.
f053c89f 1055 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1056 { echo "$as_me: error: invalid package name: $ac_package" >&2
1057 { (exit 1); exit 1; }; }
f053c89f 1058 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1059 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1060
1061 -without-* | --without-*)
503d2be0 1062 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1063 # Reject names that are not valid shell variable names.
f053c89f 1064 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1065 { echo "$as_me: error: invalid package name: $ac_package" >&2
1066 { (exit 1); exit 1; }; }
f053c89f 1067 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1068 eval with_$ac_package=no ;;
ba4481b5
DL
1069
1070 --x)
1071 # Obsolete; use --with-x.
1072 with_x=yes ;;
1073
1074 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1075 | --x-incl | --x-inc | --x-in | --x-i)
1076 ac_prev=x_includes ;;
1077 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1078 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1079 x_includes=$ac_optarg ;;
ba4481b5
DL
1080
1081 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1082 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1083 ac_prev=x_libraries ;;
1084 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1085 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1086 x_libraries=$ac_optarg ;;
ba4481b5 1087
503d2be0
AS
1088 -*) { echo "$as_me: error: unrecognized option: $ac_option
1089Try \`$0 --help' for more information." >&2
1090 { (exit 1); exit 1; }; }
ba4481b5
DL
1091 ;;
1092
503d2be0
AS
1093 *=*)
1094 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1095 # Reject names that are not valid shell variable names.
1096 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1097 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1098 { (exit 1); exit 1; }; }
ca81d7a0 1099 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1100 export $ac_envvar ;;
1101
ba4481b5 1102 *)
503d2be0
AS
1103 # FIXME: should be removed in autoconf 3.0.
1104 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1105 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1106 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1107 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1108 ;;
1109
1110 esac
1111done
1112
1113if test -n "$ac_prev"; then
503d2be0
AS
1114 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1115 { echo "$as_me: error: missing argument to $ac_option" >&2
1116 { (exit 1); exit 1; }; }
ba4481b5 1117fi
ba4481b5 1118
ca81d7a0
JD
1119# Be sure to have absolute directory names.
1120for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1121 datadir sysconfdir sharedstatedir localstatedir includedir \
1122 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1123 libdir localedir mandir
4b411bfe 1124do
ca81d7a0 1125 eval ac_val=\$$ac_var
4b411bfe 1126 case $ac_val in
ca81d7a0
JD
1127 [\\/$]* | ?:[\\/]* ) continue;;
1128 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1129 esac
ca81d7a0
JD
1130 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1131 { (exit 1); exit 1; }; }
ba4481b5
DL
1132done
1133
503d2be0
AS
1134# There might be people who depend on the old broken behavior: `$host'
1135# used to hold the argument of --host etc.
c0d27fcc 1136# FIXME: To remove some day.
503d2be0
AS
1137build=$build_alias
1138host=$host_alias
1139target=$target_alias
1140
c0d27fcc 1141# FIXME: To remove some day.
503d2be0
AS
1142if test "x$host_alias" != x; then
1143 if test "x$build_alias" = x; then
1144 cross_compiling=maybe
1145 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1146 If a cross compiler is detected then cross compile mode will be used." >&2
1147 elif test "x$build_alias" != "x$host_alias"; then
1148 cross_compiling=yes
1149 fi
1150fi
ba4481b5 1151
503d2be0
AS
1152ac_tool_prefix=
1153test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1154
503d2be0 1155test "$silent" = yes && exec 6>/dev/null
ba4481b5 1156
c0d27fcc 1157
ca81d7a0
JD
1158ac_pwd=`pwd` && test -n "$ac_pwd" &&
1159ac_ls_di=`ls -di .` &&
1160ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1161 { echo "$as_me: error: Working directory cannot be determined" >&2
1162 { (exit 1); exit 1; }; }
1163test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1164 { echo "$as_me: error: pwd does not report name of working directory" >&2
1165 { (exit 1); exit 1; }; }
1166
1167
ba4481b5
DL
1168# Find the source files, if location was not specified.
1169if test -z "$srcdir"; then
1170 ac_srcdir_defaulted=yes
ca81d7a0
JD
1171 # Try the directory containing this script, then the parent directory.
1172 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1173$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1174 X"$0" : 'X\(//\)[^/]' \| \
1175 X"$0" : 'X\(//\)$' \| \
ca81d7a0 1176 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1177echo X"$0" |
ca81d7a0
JD
1178 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1179 s//\1/
1180 q
1181 }
1182 /^X\(\/\/\)[^/].*/{
1183 s//\1/
1184 q
1185 }
1186 /^X\(\/\/\)$/{
1187 s//\1/
1188 q
1189 }
1190 /^X\(\/\).*/{
1191 s//\1/
1192 q
1193 }
1194 s/.*/./; q'`
ba4481b5 1195 srcdir=$ac_confdir
ca81d7a0 1196 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1197 srcdir=..
1198 fi
1199else
1200 ac_srcdir_defaulted=no
1201fi
ca81d7a0
JD
1202if test ! -r "$srcdir/$ac_unique_file"; then
1203 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1204 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1205 { (exit 1); exit 1; }; }
ba4481b5 1206fi
ca81d7a0
JD
1207ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1208ac_abs_confdir=`(
1209 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1210 { (exit 1); exit 1; }; }
ca81d7a0
JD
1211 pwd)`
1212# When building in place, set srcdir=.
1213if test "$ac_abs_confdir" = "$ac_pwd"; then
1214 srcdir=.
1215fi
1216# Remove unnecessary trailing slashes from srcdir.
1217# Double slashes in file names in object file debugging info
1218# mess up M-x gdb in Emacs.
1219case $srcdir in
1220*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1221esac
1222for ac_var in $ac_precious_vars; do
1223 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1224 eval ac_env_${ac_var}_value=\$${ac_var}
1225 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1226 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1227done
503d2be0
AS
1228
1229#
1230# Report the --help message.
1231#
1232if test "$ac_init_help" = "long"; then
1233 # Omit some internal or obsolete options to make the list less imposing.
1234 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1235 cat <<_ACEOF
503d2be0
AS
1236\`configure' configures this package to adapt to many kinds of systems.
1237
1238Usage: $0 [OPTION]... [VAR=VALUE]...
1239
1240To assign environment variables (e.g., CC, CFLAGS...), specify them as
1241VAR=VALUE. See below for descriptions of some of the useful variables.
1242
1243Defaults for the options are specified in brackets.
1244
1245Configuration:
1246 -h, --help display this help and exit
1247 --help=short display options specific to this package
1248 --help=recursive display the short help of all the included packages
1249 -V, --version display version information and exit
1250 -q, --quiet, --silent do not print \`checking...' messages
1251 --cache-file=FILE cache test results in FILE [disabled]
1252 -C, --config-cache alias for \`--cache-file=config.cache'
1253 -n, --no-create do not create output files
1254 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1255
503d2be0
AS
1256Installation directories:
1257 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1258 [$ac_default_prefix]
503d2be0 1259 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1260 [PREFIX]
503d2be0
AS
1261
1262By default, \`make install' will install all the files in
1263\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1264an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1265for instance \`--prefix=\$HOME'.
1266
1267For better control, use the options below.
1268
1269Fine tuning of the installation directories:
1270 --bindir=DIR user executables [EPREFIX/bin]
1271 --sbindir=DIR system admin executables [EPREFIX/sbin]
1272 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1273 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1274 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1275 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1276 --libdir=DIR object code libraries [EPREFIX/lib]
1277 --includedir=DIR C header files [PREFIX/include]
1278 --oldincludedir=DIR C header files for non-gcc [/usr/include]
ca81d7a0
JD
1279 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1280 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1281 --infodir=DIR info documentation [DATAROOTDIR/info]
1282 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1283 --mandir=DIR man documentation [DATAROOTDIR/man]
1284 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1285 --htmldir=DIR html documentation [DOCDIR]
1286 --dvidir=DIR dvi documentation [DOCDIR]
1287 --pdfdir=DIR pdf documentation [DOCDIR]
1288 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1289_ACEOF
503d2be0 1290
c0d27fcc 1291 cat <<\_ACEOF
503d2be0 1292
ba5da88a
PJ
1293Program names:
1294 --program-prefix=PREFIX prepend PREFIX to installed program names
1295 --program-suffix=SUFFIX append SUFFIX to installed program names
1296 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1297
503d2be0
AS
1298X features:
1299 --x-includes=DIR X include files are in DIR
1300 --x-libraries=DIR X library files are in DIR
1301
1302System types:
1303 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1304 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1305_ACEOF
503d2be0
AS
1306fi
1307
1308if test -n "$ac_init_help"; then
1309
c0d27fcc 1310 cat <<\_ACEOF
503d2be0
AS
1311
1312Optional Features:
1313 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1314 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6a3a24fa
JD
1315 --enable-carbon-app[=DIR] [DIR=/Application]
1316 specify install directory for Emacs.app on Mac OS X
d0098f13 1317 --enable-asserts compile code with asserts enabled
19650fd6
AS
1318 --enable-maintainer-mode enable make rules and dependencies not useful
1319 (and sometimes confusing) to the casual installer
9adfabc2
LK
1320 --enable-locallisppath=PATH
1321 directories Emacs should search for lisp files
1322 specific to this site
503d2be0
AS
1323 --disable-largefile omit support for large files
1324
1325Optional Packages:
1326 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1327 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1328 --without-gcc don't use GCC to compile Emacs if GCC is found
1329 --without-pop don't support POP mail retrieval with movemail
1330 --with-kerberos support Kerberos-authenticated POP
1331 --with-kerberos5 support Kerberos version 5 authenticated POP
1332 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1333 --without-sound don't compile with sound support
488dd4c4
JD
1334 --with-x-toolkit=KIT use an X toolkit
1335 (KIT = yes/lucid/athena/motif/gtk/no)
503d2be0
AS
1336 --with-xpm use -lXpm for displaying XPM images
1337 --with-jpeg use -ljpeg for displaying JPEG images
1338 --with-tiff use -ltiff for displaying TIFF images
1339 --with-gif use -lungif for displaying GIF images
1340 --with-png use -lpng for displaying PNG images
488dd4c4
JD
1341 --with-gtk use GTK (same as --with-x-toolkit=gtk)
1342 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 1343 --without-toolkit-scroll-bars
cc227489
MB
1344 don't use Motif or Xaw3d scroll bars
1345 --without-xim don't use X11 XIM
e0f712ba 1346 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
1347 --with-x use the X Window System
1348
1349Some influential environment variables:
1350 CC C compiler command
1351 CFLAGS C compiler flags
1352 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1353 nonstandard directory <lib dir>
f053c89f 1354 LIBS libraries to pass to the linker, e.g. -l<library>
ca81d7a0
JD
1355 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1356 you have headers in a nonstandard directory <include dir>
503d2be0 1357 CPP C preprocessor
ca81d7a0 1358 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1359
1360Use these variables to override the choices made by `configure' or to help
1361it to find libraries and programs with nonstandard names/locations.
1362
c0d27fcc 1363_ACEOF
ca81d7a0 1364ac_status=$?
503d2be0
AS
1365fi
1366
1367if test "$ac_init_help" = "recursive"; then
1368 # If there are subdirs, report their specific --help.
c0d27fcc 1369 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
ca81d7a0 1370 test -d "$ac_dir" || continue
c0d27fcc
MR
1371 ac_builddir=.
1372
ca81d7a0
JD
1373case "$ac_dir" in
1374.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1375*)
c0d27fcc 1376 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
1377 # A ".." for each directory in $ac_dir_suffix.
1378 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1379 case $ac_top_builddir_sub in
1380 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1381 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1382 esac ;;
1383esac
1384ac_abs_top_builddir=$ac_pwd
1385ac_abs_builddir=$ac_pwd$ac_dir_suffix
1386# for backward compatibility:
1387ac_top_builddir=$ac_top_build_prefix
503d2be0 1388
c0d27fcc 1389case $srcdir in
ca81d7a0 1390 .) # We are building in place.
c0d27fcc 1391 ac_srcdir=.
ca81d7a0
JD
1392 ac_top_srcdir=$ac_top_builddir_sub
1393 ac_abs_top_srcdir=$ac_pwd ;;
1394 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1395 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1396 ac_top_srcdir=$srcdir
1397 ac_abs_top_srcdir=$srcdir ;;
1398 *) # Relative name.
1399 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1400 ac_top_srcdir=$ac_top_build_prefix$srcdir
1401 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1402esac
ca81d7a0
JD
1403ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1404
1405 cd "$ac_dir" || { ac_status=$?; continue; }
1406 # Check for guested configure.
1407 if test -f "$ac_srcdir/configure.gnu"; then
1408 echo &&
1409 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1410 elif test -f "$ac_srcdir/configure"; then
1411 echo &&
1412 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1413 else
c0d27fcc 1414 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1415 fi || ac_status=$?
1416 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1417 done
1418fi
1419
ca81d7a0 1420test -n "$ac_init_help" && exit $ac_status
503d2be0 1421if $ac_init_version; then
c0d27fcc 1422 cat <<\_ACEOF
ca81d7a0 1423configure
f053c89f 1424generated by GNU Autoconf 2.61
503d2be0 1425
ca81d7a0 1426Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
4e6835db 14272002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
503d2be0
AS
1428This configure script is free software; the Free Software Foundation
1429gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1430_ACEOF
ca81d7a0 1431 exit
503d2be0 1432fi
ca81d7a0 1433cat >config.log <<_ACEOF
503d2be0
AS
1434This file contains any messages produced by compilers while
1435running configure, to aid debugging if configure makes a mistake.
1436
1437It was created by $as_me, which was
f053c89f 1438generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1439
1440 $ $0 $@
1441
c0d27fcc 1442_ACEOF
ca81d7a0 1443exec 5>>config.log
503d2be0
AS
1444{
1445cat <<_ASUNAME
c0d27fcc
MR
1446## --------- ##
1447## Platform. ##
1448## --------- ##
503d2be0
AS
1449
1450hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1451uname -m = `(uname -m) 2>/dev/null || echo unknown`
1452uname -r = `(uname -r) 2>/dev/null || echo unknown`
1453uname -s = `(uname -s) 2>/dev/null || echo unknown`
1454uname -v = `(uname -v) 2>/dev/null || echo unknown`
1455
1456/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1457/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1458
1459/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1460/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1461/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ca81d7a0 1462/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1463/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1464/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1465/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1466
925c2f3f 1467_ASUNAME
c0d27fcc
MR
1468
1469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1470for as_dir in $PATH
1471do
1472 IFS=$as_save_IFS
1473 test -z "$as_dir" && as_dir=.
1474 echo "PATH: $as_dir"
1475done
ca81d7a0 1476IFS=$as_save_IFS
c0d27fcc 1477
503d2be0
AS
1478} >&5
1479
c0d27fcc
MR
1480cat >&5 <<_ACEOF
1481
1482
1483## ----------- ##
1484## Core tests. ##
1485## ----------- ##
1486
1487_ACEOF
503d2be0 1488
503d2be0
AS
1489
1490# Keep a trace of the command line.
1491# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1492# Strip out --silent because we don't want to record it for future runs.
503d2be0 1493# Also quote any args containing shell meta-characters.
19650fd6 1494# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1495ac_configure_args=
19650fd6
AS
1496ac_configure_args0=
1497ac_configure_args1=
19650fd6
AS
1498ac_must_keep_next=false
1499for ac_pass in 1 2
503d2be0 1500do
19650fd6
AS
1501 for ac_arg
1502 do
1503 case $ac_arg in
1504 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1505 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1506 | -silent | --silent | --silen | --sile | --sil)
1507 continue ;;
ca81d7a0 1508 *\'*)
19650fd6
AS
1509 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1510 esac
1511 case $ac_pass in
1512 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1513 2)
1514 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1515 if test $ac_must_keep_next = true; then
edfaf76d 1516 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1517 else
edfaf76d
LK
1518 case $ac_arg in
1519 *=* | --config-cache | -C | -disable-* | --disable-* \
1520 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1521 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1522 | -with-* | --with-* | -without-* | --without-* | --x)
1523 case "$ac_configure_args0 " in
1524 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1525 esac
1526 ;;
1527 -* ) ac_must_keep_next=true ;;
1528 esac
19650fd6 1529 fi
ca81d7a0 1530 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1531 ;;
1532 esac
1533 done
503d2be0 1534done
19650fd6
AS
1535$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1536$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1537
1538# When interrupted or exit'd, cleanup temporary files, and complete
1539# config.log. We remove comments because anyway the quotes in there
1540# would cause problems or look ugly.
ca81d7a0
JD
1541# WARNING: Use '\'' to represent an apostrophe within the trap.
1542# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1543trap 'exit_status=$?
1544 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1545 {
1546 echo
6bae0ccf 1547
c0d27fcc
MR
1548 cat <<\_ASBOX
1549## ---------------- ##
1550## Cache variables. ##
1551## ---------------- ##
1552_ASBOX
1553 echo
1554 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
1555(
1556 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1557 eval ac_val=\$$ac_var
1558 case $ac_val in #(
1559 *${as_nl}*)
1560 case $ac_var in #(
1561 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1562echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1563 esac
1564 case $ac_var in #(
1565 _ | IFS | as_nl) ;; #(
1566 *) $as_unset $ac_var ;;
1567 esac ;;
1568 esac
1569 done
503d2be0 1570 (set) 2>&1 |
ca81d7a0
JD
1571 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1572 *${as_nl}ac_space=\ *)
503d2be0 1573 sed -n \
ca81d7a0
JD
1574 "s/'\''/'\''\\\\'\'''\''/g;
1575 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1576 ;; #(
503d2be0 1577 *)
ca81d7a0 1578 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1579 ;;
ca81d7a0
JD
1580 esac |
1581 sort
1582)
c0d27fcc 1583 echo
6bae0ccf
DL
1584
1585 cat <<\_ASBOX
1586## ----------------- ##
1587## Output variables. ##
1588## ----------------- ##
1589_ASBOX
1590 echo
1591 for ac_var in $ac_subst_vars
1592 do
ca81d7a0
JD
1593 eval ac_val=\$$ac_var
1594 case $ac_val in
1595 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1596 esac
1597 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1598 done | sort
1599 echo
1600
1601 if test -n "$ac_subst_files"; then
1602 cat <<\_ASBOX
ca81d7a0
JD
1603## ------------------- ##
1604## File substitutions. ##
1605## ------------------- ##
6bae0ccf
DL
1606_ASBOX
1607 echo
1608 for ac_var in $ac_subst_files
1609 do
ca81d7a0
JD
1610 eval ac_val=\$$ac_var
1611 case $ac_val in
1612 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1613 esac
1614 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1615 done | sort
1616 echo
1617 fi
1618
c0d27fcc
MR
1619 if test -s confdefs.h; then
1620 cat <<\_ASBOX
1621## ----------- ##
1622## confdefs.h. ##
1623## ----------- ##
1624_ASBOX
1625 echo
ca81d7a0 1626 cat confdefs.h
c0d27fcc
MR
1627 echo
1628 fi
1629 test "$ac_signal" != 0 &&
1630 echo "$as_me: caught signal $ac_signal"
1631 echo "$as_me: exit $exit_status"
1632 } >&5
ca81d7a0
JD
1633 rm -f core *.core core.conftest.* &&
1634 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1635 exit $exit_status
ca81d7a0 1636' 0
503d2be0
AS
1637for ac_signal in 1 2 13 15; do
1638 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1639done
1640ac_signal=0
1641
1642# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 1643rm -f -r conftest* confdefs.h
ba4481b5 1644
c0d27fcc
MR
1645# Predefined preprocessor variables.
1646
1647cat >>confdefs.h <<_ACEOF
1648#define PACKAGE_NAME "$PACKAGE_NAME"
1649_ACEOF
1650
1651
1652cat >>confdefs.h <<_ACEOF
1653#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1654_ACEOF
1655
1656
1657cat >>confdefs.h <<_ACEOF
1658#define PACKAGE_VERSION "$PACKAGE_VERSION"
1659_ACEOF
1660
1661
1662cat >>confdefs.h <<_ACEOF
1663#define PACKAGE_STRING "$PACKAGE_STRING"
1664_ACEOF
1665
1666
1667cat >>confdefs.h <<_ACEOF
1668#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1669_ACEOF
1670
1671
503d2be0 1672# Let the site file select an alternate cache file if it wants to.
ba4481b5 1673# Prefer explicitly selected file to automatically selected ones.
ca81d7a0
JD
1674if test -n "$CONFIG_SITE"; then
1675 set x "$CONFIG_SITE"
1676elif test "x$prefix" != xNONE; then
1677 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1678else
1679 set x "$ac_default_prefix/share/config.site" \
1680 "$ac_default_prefix/etc/config.site"
ba4481b5 1681fi
ca81d7a0
JD
1682shift
1683for ac_site_file
1684do
ba4481b5 1685 if test -r "$ac_site_file"; then
c0d27fcc 1686 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1687echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1688 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1689 . "$ac_site_file"
1690 fi
1691done
1692
1693if test -r "$cache_file"; then
503d2be0
AS
1694 # Some versions of bash will fail to source /dev/null (special
1695 # files actually), so we avoid doing that.
1696 if test -f "$cache_file"; then
c0d27fcc 1697 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1698echo "$as_me: loading cache $cache_file" >&6;}
1699 case $cache_file in
ca81d7a0
JD
1700 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1701 *) . "./$cache_file";;
503d2be0
AS
1702 esac
1703 fi
ba4481b5 1704else
c0d27fcc 1705 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1706echo "$as_me: creating cache $cache_file" >&6;}
1707 >$cache_file
1708fi
1709
f053c89f
CY
1710ac_header_list="$ac_header_list sys/time.h"
1711ac_header_list="$ac_header_list unistd.h"
1712ac_func_list="$ac_func_list alarm"
503d2be0
AS
1713# Check that the precious variables saved in the cache have kept the same
1714# value.
1715ac_cache_corrupted=false
ca81d7a0 1716for ac_var in $ac_precious_vars; do
503d2be0
AS
1717 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1718 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
1719 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1720 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1721 case $ac_old_set,$ac_new_set in
1722 set,)
c0d27fcc 1723 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1724echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1725 ac_cache_corrupted=: ;;
1726 ,set)
c0d27fcc 1727 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1728echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1729 ac_cache_corrupted=: ;;
1730 ,);;
1731 *)
1732 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1733 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1734echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1735 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1736echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1737 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1738echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1739 ac_cache_corrupted=:
503d2be0
AS
1740 fi;;
1741 esac
c0d27fcc 1742 # Pass precious variables to config.status.
503d2be0
AS
1743 if test "$ac_new_set" = set; then
1744 case $ac_new_val in
ca81d7a0 1745 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1746 *) ac_arg=$ac_var=$ac_new_val ;;
1747 esac
1748 case " $ac_configure_args " in
1749 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1750 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1751 esac
1752 fi
1753done
1754if $ac_cache_corrupted; then
c0d27fcc 1755 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1756echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1757 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1758echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1759 { (exit 1); exit 1; }; }
ba4481b5
DL
1760fi
1761
c0d27fcc
MR
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
ba4481b5 1777
ca81d7a0
JD
1778ac_ext=c
1779ac_cpp='$CPP $CPPFLAGS'
1780ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1781ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1782ac_compiler_gnu=$ac_cv_c_compiler_gnu
6bae0ccf 1783
4b411bfe 1784
ca81d7a0 1785ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1786
c0d27fcc 1787
ba5da88a 1788test "$program_prefix" != NONE &&
ca81d7a0 1789 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1790# Use a double $ so make ignores it.
1791test "$program_suffix" != NONE &&
ca81d7a0 1792 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1793# Double any \ or $. echo might interpret backslashes.
1794# By default was `s,x,x', remove it if useless.
1795cat <<\_ACEOF >conftest.sed
1796s/[\\$]/&&/g;s/;s,x,x,$//
1797_ACEOF
1798program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
ca81d7a0 1799rm -f conftest.sed
ba5da88a 1800
c0d27fcc 1801
ba4481b5
DL
1802lispdir='${datadir}/emacs/${version}/lisp'
1803locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1804'${datadir}/emacs/site-lisp'
1805lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1806etcdir='${datadir}/emacs/${version}/etc'
1807archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1808docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1809gamedir='${localstatedir}/games/emacs'
98418dba
CW
1810
1811gameuser=games
1812
c0d27fcc 1813
ca81d7a0 1814# Check whether --with-gcc was given.
ba4481b5 1815if test "${with_gcc+set}" = set; then
ca81d7a0
JD
1816 withval=$with_gcc;
1817fi
503d2be0 1818
ba4481b5 1819
ca81d7a0 1820# Check whether --with-pop was given.
ba4481b5 1821if test "${with_pop+set}" = set; then
ca81d7a0 1822 withval=$with_pop; if test "$withval" = yes; then
c0d27fcc 1823 cat >>confdefs.h <<\_ACEOF
ba4481b5 1824#define MAIL_USE_POP 1
c0d27fcc 1825_ACEOF
ba4481b5 1826
243cf185
DL
1827else :
1828fi
3d9fec71 1829else
c0d27fcc 1830 cat >>confdefs.h <<\_ACEOF
3d9fec71 1831#define MAIL_USE_POP 1
c0d27fcc 1832_ACEOF
3d9fec71 1833
ca81d7a0
JD
1834fi
1835
ba4481b5 1836
c0d27fcc 1837
ca81d7a0 1838# Check whether --with-kerberos was given.
a21616bd 1839if test "${with_kerberos+set}" = set; then
ca81d7a0 1840 withval=$with_kerberos; cat >>confdefs.h <<\_ACEOF
a21616bd 1841#define KERBEROS 1
c0d27fcc 1842_ACEOF
a21616bd 1843
ca81d7a0
JD
1844fi
1845
a21616bd 1846
c0d27fcc 1847
ca81d7a0 1848# Check whether --with-kerberos5 was given.
a21616bd 1849if test "${with_kerberos5+set}" = set; then
ca81d7a0 1850 withval=$with_kerberos5; if test "${with_kerberos5+set}" = set; then
a21616bd
KR
1851 if test "${with_kerberos+set}" != set; then
1852 with_kerberos=yes
c0d27fcc 1853 cat >>confdefs.h <<\_ACEOF
a21616bd 1854#define KERBEROS 1
c0d27fcc 1855_ACEOF
a21616bd
KR
1856
1857 fi
1858fi
b936fae4 1859
c0d27fcc 1860cat >>confdefs.h <<\_ACEOF
a21616bd 1861#define KERBEROS5 1
c0d27fcc 1862_ACEOF
a21616bd 1863
ca81d7a0 1864fi
b936fae4 1865
4b411bfe 1866
ca81d7a0
JD
1867# Check whether --with-hesiod was given.
1868if test "${with_hesiod+set}" = set; then
1869 withval=$with_hesiod;
c0d27fcc 1870cat >>confdefs.h <<\_ACEOF
ba4481b5 1871#define HESIOD 1
c0d27fcc 1872_ACEOF
ba4481b5 1873
ca81d7a0
JD
1874fi
1875
ba4481b5 1876
c0d27fcc 1877
ca81d7a0 1878# Check whether --with-sound was given.
2c9dccc9 1879if test "${with_sound+set}" = set; then
ca81d7a0
JD
1880 withval=$with_sound;
1881fi
2c9dccc9 1882
2c9dccc9 1883
c0d27fcc 1884
ca81d7a0 1885# Check whether --with-x-toolkit was given.
ba4481b5 1886if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1887 withval=$with_x_toolkit; case "${withval}" in
ba4481b5
DL
1888 y | ye | yes ) val=athena ;;
1889 n | no ) val=no ;;
1890 l | lu | luc | luci | lucid ) val=lucid ;;
1891 a | at | ath | athe | athen | athena ) val=athena ;;
1892 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1893 g | gt | gtk ) val=gtk ;;
ba4481b5 1894 * )
c0d27fcc 1895{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1896this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1897Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1898echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1899this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1900Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1901 { (exit 1); exit 1; }; }
ba4481b5
DL
1902 ;;
1903 esac
1904 with_x_toolkit=$val
1905
ca81d7a0 1906fi
8eeae1c9 1907
ca81d7a0
JD
1908
1909# Check whether --with-xpm was given.
ba4481b5 1910if test "${with_xpm+set}" = set; then
ca81d7a0
JD
1911 withval=$with_xpm;
1912fi
503d2be0 1913
ba4481b5 1914
ca81d7a0 1915# Check whether --with-jpeg was given.
ba4481b5 1916if test "${with_jpeg+set}" = set; then
ca81d7a0
JD
1917 withval=$with_jpeg;
1918fi
503d2be0 1919
ba4481b5 1920
ca81d7a0 1921# Check whether --with-tiff was given.
ba4481b5 1922if test "${with_tiff+set}" = set; then
ca81d7a0
JD
1923 withval=$with_tiff;
1924fi
503d2be0 1925
ba4481b5 1926
ca81d7a0 1927# Check whether --with-gif was given.
ba4481b5 1928if test "${with_gif+set}" = set; then
ca81d7a0
JD
1929 withval=$with_gif;
1930fi
503d2be0 1931
ba4481b5 1932
ca81d7a0 1933# Check whether --with-png was given.
ba4481b5 1934if test "${with_png+set}" = set; then
ca81d7a0
JD
1935 withval=$with_png;
1936fi
503d2be0 1937
ba4481b5 1938
ca81d7a0 1939# Check whether --with-gtk was given.
488dd4c4 1940if test "${with_gtk+set}" = set; then
ca81d7a0
JD
1941 withval=$with_gtk;
1942fi
488dd4c4 1943
488dd4c4 1944
ca81d7a0 1945# Check whether --with-pkg-config-prog was given.
488dd4c4 1946if test "${with_pkg_config_prog+set}" = set; then
ca81d7a0
JD
1947 withval=$with_pkg_config_prog;
1948fi
488dd4c4 1949
488dd4c4 1950
ca81d7a0 1951# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 1952if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0
JD
1953 withval=$with_toolkit_scroll_bars;
1954fi
503d2be0 1955
ba4481b5 1956
ca81d7a0 1957# Check whether --with-xim was given.
1d36487c 1958if test "${with_xim+set}" = set; then
ca81d7a0
JD
1959 withval=$with_xim;
1960fi
1d36487c 1961
ba4481b5 1962
ca81d7a0 1963# Check whether --with-carbon was given.
e0f712ba 1964if test "${with_carbon+set}" = set; then
ca81d7a0
JD
1965 withval=$with_carbon;
1966fi
e0f712ba 1967
ca81d7a0 1968# Check whether --enable-carbon-app was given.
6a3a24fa 1969if test "${enable_carbon_app+set}" = set; then
ca81d7a0
JD
1970 enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
1971fi
1972
e0f712ba 1973
ca81d7a0 1974# Check whether --enable-asserts was given.
d0098f13 1975if test "${enable_asserts+set}" = set; then
ca81d7a0 1976 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
1977else
1978 USE_XASSERTS=no
ca81d7a0 1979fi
8eeae1c9 1980
ca81d7a0
JD
1981
1982# Check whether --enable-maintainer-mode was given.
19650fd6 1983if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 1984 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
1985else
1986 USE_MAINTAINER_MODE=no
ca81d7a0
JD
1987fi
1988
19650fd6
AS
1989if test $USE_MAINTAINER_MODE = yes; then
1990 MAINT=
1991else
1992 MAINT=#
1993fi
1994
1995
ca81d7a0 1996# Check whether --enable-locallisppath was given.
9adfabc2 1997if test "${enable_locallisppath+set}" = set; then
ca81d7a0 1998 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
1999 locallisppath=
2000elif test "${enableval}" != "yes"; then
2001 locallisppath=${enableval}
2002fi
ca81d7a0
JD
2003fi
2004
9adfabc2 2005
ba4481b5 2006#### Make srcdir absolute, if it isn't already. It's important to
17494071 2007#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2008#### give you automounter prefixes, which can go away. We do all this
2009#### so Emacs can find its files when run uninstalled.
17494071
GM
2010## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2011unset CDPATH
ba4481b5
DL
2012case "${srcdir}" in
2013 /* ) ;;
2014 . )
2015 ## We may be able to use the $PWD environment variable to make this
2016 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2017 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2018 ## but that tested only for a well-formed and valid PWD,
2019 ## it did not object when PWD was well-formed and valid but just wrong.
2020 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2021 then
2022 srcdir="$PWD"
2023 else
2024 srcdir="`(cd ${srcdir}; pwd)`"
2025 fi
2026 ;;
2027 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2028esac
2029
2030#### Check if the source directory already has a configured system in it.
2031if test `pwd` != `(cd ${srcdir} && pwd)` \
2032 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2033 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2034 as a build directory right now; it has been configured in its own
2035 right. To configure in another directory as well, you MUST
2036 use GNU make. If you do not have GNU make, then you must
2037 now do \`make distclean' in ${srcdir},
2038 and then run $0 again." >&5
2039echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2040 as a build directory right now; it has been configured in its own
2041 right. To configure in another directory as well, you MUST
2042 use GNU make. If you do not have GNU make, then you must
2043 now do \`make distclean' in ${srcdir},
503d2be0 2044 and then run $0 again." >&2;}
ba4481b5
DL
2045fi
2046
2047#### Given the configuration name, set machfile and opsysfile to the
2048#### names of the m/*.h and s/*.h files we should use.
2049
2050### Canonicalize the configuration name.
2051
2052ac_aux_dir=
ca81d7a0
JD
2053for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2054 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2055 ac_aux_dir=$ac_dir
2056 ac_install_sh="$ac_aux_dir/install-sh -c"
2057 break
ca81d7a0 2058 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2059 ac_aux_dir=$ac_dir
2060 ac_install_sh="$ac_aux_dir/install.sh -c"
2061 break
ca81d7a0 2062 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2063 ac_aux_dir=$ac_dir
2064 ac_install_sh="$ac_aux_dir/shtool install -c"
2065 break
ba4481b5
DL
2066 fi
2067done
2068if test -z "$ac_aux_dir"; then
ca81d7a0
JD
2069 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2070echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2071 { (exit 1); exit 1; }; }
ba4481b5 2072fi
ca81d7a0
JD
2073
2074# These three variables are undocumented and unsupported,
2075# and are intended to be withdrawn in a future Autoconf release.
2076# They can cause serious problems if a builder's source tree is in a directory
2077# whose full name contains unusual characters.
2078ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2079ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2080ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2081
ba4481b5
DL
2082
2083# Make sure we can run config.sub.
ca81d7a0
JD
2084$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2085 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2086echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2087 { (exit 1); exit 1; }; }
2088
ca81d7a0
JD
2089{ echo "$as_me:$LINENO: checking build system type" >&5
2090echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2091if test "${ac_cv_build+set}" = set; then
2092 echo $ECHO_N "(cached) $ECHO_C" >&6
2093else
ca81d7a0
JD
2094 ac_build_alias=$build_alias
2095test "x$ac_build_alias" = x &&
2096 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2097test "x$ac_build_alias" = x &&
c0d27fcc 2098 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2099echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2100 { (exit 1); exit 1; }; }
ca81d7a0
JD
2101ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2102 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2103echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2104 { (exit 1); exit 1; }; }
2105
2106fi
ca81d7a0
JD
2107{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2108echo "${ECHO_T}$ac_cv_build" >&6; }
2109case $ac_cv_build in
2110*-*-*) ;;
2111*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2112echo "$as_me: error: invalid value of canonical build" >&2;}
2113 { (exit 1); exit 1; }; };;
2114esac
503d2be0 2115build=$ac_cv_build
ca81d7a0
JD
2116ac_save_IFS=$IFS; IFS='-'
2117set x $ac_cv_build
2118shift
2119build_cpu=$1
2120build_vendor=$2
2121shift; shift
2122# Remember, the first character of IFS is used to create $*,
2123# except with old shells:
2124build_os=$*
2125IFS=$ac_save_IFS
2126case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2127
2128
2129{ echo "$as_me:$LINENO: checking host system type" >&5
2130echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2131if test "${ac_cv_host+set}" = set; then
2132 echo $ECHO_N "(cached) $ECHO_C" >&6
2133else
ca81d7a0
JD
2134 if test "x$host_alias" = x; then
2135 ac_cv_host=$ac_cv_build
2136else
2137 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2138 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2139echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2140 { (exit 1); exit 1; }; }
ca81d7a0 2141fi
503d2be0
AS
2142
2143fi
ca81d7a0
JD
2144{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2145echo "${ECHO_T}$ac_cv_host" >&6; }
2146case $ac_cv_host in
2147*-*-*) ;;
2148*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2149echo "$as_me: error: invalid value of canonical host" >&2;}
2150 { (exit 1); exit 1; }; };;
2151esac
503d2be0 2152host=$ac_cv_host
ca81d7a0
JD
2153ac_save_IFS=$IFS; IFS='-'
2154set x $ac_cv_host
2155shift
2156host_cpu=$1
2157host_vendor=$2
2158shift; shift
2159# Remember, the first character of IFS is used to create $*,
2160# except with old shells:
2161host_os=$*
2162IFS=$ac_save_IFS
2163case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2164
c0d27fcc 2165
ba4481b5 2166canonical=$host
531a3336 2167configuration=${host_alias-$host}
ba4481b5 2168
c0d27fcc 2169
22044edf 2170
ba4481b5
DL
2171### If you add support for a new configuration, add code to this
2172### switch statement to recognize your configuration name and select
2173### the appropriate operating system and machine description files.
2174
2175### You would hope that you could choose an m/*.h file pretty much
2176### based on the machine portion of the configuration name, and an s-
2177### file based on the operating system portion. However, it turns out
2178### that each m/*.h file is pretty manufacturer-specific - for
2179### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
2180### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
2181### machines. So we basically have to have a special case for each
2182### configuration name.
2183###
2184### As far as handling version numbers on operating systems is
2185### concerned, make sure things will fail in a fixable way. If
2186### /etc/MACHINES doesn't say anything about version numbers, be
2187### prepared to handle anything reasonably. If version numbers
2188### matter, be sure /etc/MACHINES says something about it.
2189###
2190### Eric Raymond says we should accept strings like "sysvr4" to mean
2191### "System V Release 4"; he writes, "The old convention encouraged
2192### confusion between `system' and `release' levels'."
2193
2194machine='' opsys='' unported=no
2195case "${canonical}" in
2196
1096bcc0
GM
2197 ## FreeBSD ports
2198 *-*-freebsd* )
2199 opsys=freebsd
2200 case "${canonical}" in
2201 alpha*-*-freebsd*) machine=alpha ;;
ec8fcb10
YM
2202 ia64-*-freebsd*) machine=ia64 ;;
2203 sparc64-*-freebsd*) machine=sparc ;;
2204 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2205 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 2206 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2207 esac
2208 ;;
2209
ba4481b5
DL
2210 ## NetBSD ports
2211 *-*-netbsd* )
2212 opsys=netbsd
dd038e26 2213 if test -f /usr/lib/crti.o; then
f57bd967
DL
2214
2215cat >>confdefs.h <<\_ACEOF
2216#define HAVE_CRTIN
dd038e26
AS
2217_ACEOF
2218
2219 fi
2220
ba4481b5
DL
2221 case "${canonical}" in
2222 alpha*-*-netbsd*) machine=alpha ;;
2223 i[3456]86-*-netbsd*) machine=intel386 ;;
2224 m68k-*-netbsd*)
2225 # This is somewhat bogus.
2226 machine=hp9000s300 ;;
ba4481b5 2227 mips-*-netbsd*) machine=pmax ;;
2df636f4 2228 mipsel-*-netbsd*) machine=pmax ;;
97836269 2229 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 2230 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 2231 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2232 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2233 vax-*-netbsd*) machine=vax ;;
2df636f4 2234 arm-*-netbsd*) machine=arm ;;
d54ee7b4
EZ
2235 x86_64-*-netbsd*) machine=amdx86-64 ;;
2236 hppa-*-netbsd*) machine=hp800 ;;
2237 shle-*-netbsd*) machine=sh3el ;;
ba4481b5
DL
2238 esac
2239 ;;
2240
2241 ## OpenBSD ports
2242 *-*-openbsd* )
2243 opsys=openbsd
2244 case "${canonical}" in
2245 alpha*-*-openbsd*) machine=alpha ;;
2246 i386-*-openbsd*) machine=intel386 ;;
4713fa76 2247 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2248 m68k-*-openbsd*) machine=hp9000s300 ;;
2249 mipsel-*-openbsd*) machine=pmax ;;
2250 ns32k-*-openbsd*) machine=ns32000 ;;
2251 sparc-*-openbsd*) machine=sparc ;;
2252 vax-*-openbsd*) machine=vax ;;
2253 esac
2254 ;;
2255
10a3b1a1
EZ
2256 ## LynxOS ports
2257 *-*-lynxos* )
2258 opsys=lynxos
2259 case "${canonical}" in
2260 i[3456]86-*-lynxos*) machine=intel386 ;;
2261 powerpc-*-lynxos*) machine=powerpc ;;
2262 esac
2263 ;;
2264
ba4481b5
DL
2265 ## Acorn RISCiX:
2266 arm-acorn-riscix1.1* )
2267 machine=acorn opsys=riscix1-1
2268 ;;
2269 arm-acorn-riscix1.2* | arm-acorn-riscix )
2270 ## This name is riscix12 instead of riscix1.2
2271 ## to avoid a file name conflict on MSDOS.
2272 machine=acorn opsys=riscix12
2273 ;;
2274
2275 ## BSDI ports
2276 *-*-bsdi* )
2277 opsys=bsdi
2278 case "${canonical}" in
2279 i[345]86-*-bsdi*) machine=intel386 ;;
2280 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 2281 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
2282 esac
2283 case "${canonical}" in
2284 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
2285 *-*-bsdi2.0* ) opsys=bsdos2 ;;
2286 *-*-bsdi2* ) opsys=bsdos2-1 ;;
2287 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 2288 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
2289 esac
2290 ;;
2291
2292 ## Alliant machines
2293 ## Strictly speaking, we need the version of the alliant operating
2294 ## system to choose the right machine file, but currently the
2295 ## configuration name doesn't tell us enough to choose the right
2296 ## one; we need to give alliants their own operating system name to
2297 ## do this right. When someone cares, they can help us.
2298 fx80-alliant-* )
2299 machine=alliant4 opsys=bsd4-2
2300 ;;
2301 i860-alliant-* )
2302 machine=alliant-2800 opsys=bsd4-3
2303 ;;
2304
2305 ## Alpha (DEC) machines.
2306 alpha*-dec-osf* )
2307 machine=alpha opsys=osf1
2308 # This is needed to find X11R6.1 libraries for certain tests.
2309 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
2310 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
2311 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
2312 # due to non-traditional preprocessing with the current compiler
2313 # defaults. OSF 4 can also have that compiler version, and there
2314 # seems always to have been a usable /usr/bin/cpp.
2315 NON_GNU_CPP=/usr/bin/cpp
ca512671 2316 case "${canonical}" in
a55b799a 2317 alpha*-dec-osf[5-9]*)
bb17930d 2318 opsys=osf5-0 ;;
ca512671 2319 esac
ba4481b5
DL
2320 ;;
2321
2322 alpha*-*-linux-gnu* )
2323 machine=alpha opsys=gnu-linux
2324 ;;
2325
c4bb2108
DL
2326 arm*-*-linux-gnu* )
2327 machine=arm opsys=gnu-linux
2328 ;;
2329
ba4481b5
DL
2330 ## Altos 3068
2331 m68*-altos-sysv* )
2332 machine=altos opsys=usg5-2
2333 ;;
2334
2335 ## Amdahl UTS
2336 580-amdahl-sysv* )
2337 machine=amdahl opsys=usg5-2-2
2338 ;;
2339
2340 ## Apollo, Domain/OS
2341 m68*-apollo-* )
2342 machine=apollo opsys=bsd4-3
2343 ;;
2344
2345 ## AT&T 3b2, 3b5, 3b15, 3b20
2346 we32k-att-sysv* )
2347 machine=att3b opsys=usg5-2-2
2348 ;;
2349
2350 ## AT&T 3b1 - The Mighty Unix PC!
2351 m68*-att-sysv* )
2352 machine=7300 opsys=usg5-2-2
2353 ;;
2354
2355 ## Bull dpx20
2356 rs6000-bull-bosx* )
2357 machine=ibmrs6000 opsys=aix3-2
2358 ;;
2359
2360 ## Bull dpx2
2361 m68*-bull-sysv3* )
2362 machine=dpx2 opsys=usg5-3
2363 ;;
2364
2365 ## Bull sps7
2366 m68*-bull-sysv2* )
2367 machine=sps7 opsys=usg5-2
2368 ;;
2369
2370 ## CCI 5/32, 6/32 -- see "Tahoe".
2371
2372 ## Celerity
2373 ## I don't know what configuration name to use for this; config.sub
2374 ## doesn't seem to know anything about it. Hey, Celerity users, get
2375 ## in touch with us!
2376 celerity-celerity-bsd* )
2377 machine=celerity opsys=bsd4-2
2378 ;;
2379
2380 ## Clipper
2381 ## What operating systems does this chip run that Emacs has been
2382 ## tested on?
2383 clipper-* )
2384 machine=clipper
2385 ## We'll use the catch-all code at the bottom to guess the
2386 ## operating system.
2387 ;;
2388
df645f7c
AS
2389 ## Compaq Nonstop
2390 mips-compaq-nonstopux* )
2391 machine=nonstopux opsys=nonstopux
2392 ;;
2393
ba4481b5
DL
2394 ## Convex
2395 *-convex-bsd* | *-convex-convexos* )
2396 machine=convex opsys=bsd4-3
2397 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
2398 NON_GNU_CPP="cc -E -P"
2399 ;;
2400
2401 ## Cubix QBx/386
2402 i[3456]86-cubix-sysv* )
2403 machine=intel386 opsys=usg5-3
2404 ;;
2405
2406 ## Cydra 5
2407 cydra*-cydrome-sysv* )
2408 machine=cydra5 opsys=usg5-3
2409 ;;
2410
2411 ## Data General AViiON Machines
2412 ## DG changed naming conventions with the release of 5.4.4.10, they
2413 ## dropped the initial 5.4 but left the intervening R. Because of the
2414 ## R this shouldn't conflict with older versions of the OS (which I
2415 ## think were named like dgux4.*). In addition, DG new AViiONs series
2416 ## uses either Motorola M88k or Intel Pentium CPUs.
2417 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
2418 machine=aviion opsys=dgux4
2419 ;;
2420 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
2421 ## This name is dgux5-4-3 instead of dgux5-4r3
2422 ## to avoid a file name conflict on MSDOS.
2423 machine=aviion opsys=dgux5-4-3
2424 ;;
2425 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
2426 machine=aviion opsys=dgux5-4r2
2427 ;;
2428 m88k-dg-dgux* )
2429 machine=aviion opsys=dgux
2430 ;;
2431
2432 ## Data General AViiON Intel (x86) Machines
2433 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
2434 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
2435 i[345]86-dg-dguxR4* )
2436 machine=aviion-intel opsys=dgux4
2437 ;;
2438
2439 ## DECstations
2440 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
2441 machine=pmax opsys=bsd4-2
2442 ;;
2443 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
2444 machine=pmax opsys=bsd4-3
2445 ;;
2446 mips-dec-ultrix* )
2447 machine=pmax opsys=ultrix4-3
2448 ;;
2449 mips-dec-osf* )
2450 machine=pmax opsys=osf1
2451 ;;
2452 mips-dec-mach_bsd4.3* )
2453 machine=pmax opsys=mach-bsd4-3
2454 ;;
2455
cd890796
JD
2456 ## Motorola Delta machines
2457 m68k-motorola-sysv* | m68000-motorola-sysv* )
2458 machine=delta opsys=usg5-3
2459 if test -z "`type gnucc | grep 'not found'`"
2460 then
2461 if test -s /etc/167config
2462 then CC="gnucc -m68040"
2463 else CC="gnucc -m68881"
2464 fi
2465 else
2466 if test -z "`type gcc | grep 'not found'`"
2467 then CC=gcc
2468 else CC=cc
2469 fi
2470 fi
2471 ;;
ba4481b5
DL
2472 m88k-motorola-sysv4* )
2473 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
2474 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
2475 # I hope there are not other 4.0 versions for this machine
2476 # which really need usg5-4 instead.
2477 machine=delta88k opsys=usg5-4-2
2478 ;;
2479 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
2480 machine=delta88k opsys=usg5-3
2481 ;;
2482
2483 ## Dual machines
2484 m68*-dual-sysv* )
2485 machine=dual opsys=usg5-2
2486 ;;
2487 m68*-dual-uniplus* )
2488 machine=dual opsys=unipl5-2
2489 ;;
2490
2491 ## Elxsi 6400
2492 elxsi-elxsi-sysv* )
2493 machine=elxsi opsys=usg5-2
2494 ;;
2495
2496 ## Encore machines
2497 ns16k-encore-bsd* )
2498 machine=ns16000 opsys=umax
2499 ;;
2500
65171e3a
DL
2501 ## The GEC 63 - apparently, this port isn't really finished yet.
2502 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
2503
2504 ## Gould Power Node and NP1
2505 pn-gould-bsd4.2* )
2506 machine=gould opsys=bsd4-2
2507 ;;
2508 pn-gould-bsd4.3* )
2509 machine=gould opsys=bsd4-3
2510 ;;
2511 np1-gould-bsd* )
2512 machine=gould-np1 opsys=bsd4-3
2513 ;;
2514
2515 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2516 ## as far as Emacs is concerned).
2517 m88k-harris-cxux* )
2518 # Build needs to be different on 7.0 and later releases
2519 case "`uname -r`" in
2520 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2521 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2522 esac
2523 NON_GNU_CPP="/lib/cpp"
2524 ;;
2525 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2526 m68k-harris-cxux* )
2527 machine=nh3000 opsys=cxux
2528 ;;
2529 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2530 powerpc-harris-powerunix )
2531 machine=nh6000 opsys=powerunix
2532 NON_GNU_CPP="cc -Xo -E -P"
2533 ;;
2534 ## SR2001/SR2201 running HI-UX/MPP
2535 hppa1.1-hitachi-hiuxmpp* )
2536 machine=sr2k opsys=hiuxmpp
2537 ;;
89a336fa
GM
2538 hppa1.1-hitachi-hiuxwe2* )
2539 machine=sr2k opsys=hiuxwe2
2540 ;;
ba4481b5
DL
2541 ## Honeywell XPS100
2542 xps*-honeywell-sysv* )
2543 machine=xps100 opsys=usg5-2
2544 ;;
2545
2546 ## HP 9000 series 200 or 300
2547 m68*-hp-bsd* )
2548 machine=hp9000s300 opsys=bsd4-3
2549 ;;
2550 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2551 m68*-hp-hpux* )
2552 case "`uname -r`" in
2553 ## Someone's system reports A.B8.05 for this.
2554 ## I wonder what other possibilities there are.
2555 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2556 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2557 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2558 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2559 *) machine=hp9000s300 opsys=hpux ;;
2560 esac
2561 ;;
2562
2563 ## HP 9000 series 700 and 800, running HP/UX
2564 hppa*-hp-hpux7* )
2565 machine=hp800 opsys=hpux
2566 ;;
2567 hppa*-hp-hpux8* )
2568 machine=hp800 opsys=hpux8
2569 ;;
2570 hppa*-hp-hpux9shr* )
2571 machine=hp800 opsys=hpux9shr
2572 ;;
2573 hppa*-hp-hpux9* )
2574 machine=hp800 opsys=hpux9
2575 ;;
b0e44248
RB
2576 hppa*-hp-hpux10.2* )
2577 machine=hp800 opsys=hpux10-20
2578 ;;
cc227489 2579 hppa*-hp-hpux10* )
ba4481b5
DL
2580 machine=hp800 opsys=hpux10
2581 ;;
cc227489
MB
2582 hppa*-hp-hpux1[1-9]* )
2583 machine=hp800 opsys=hpux11
7c00e1e9 2584 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
cc227489 2585 ;;
ba4481b5 2586
409d9577
GM
2587 hppa*-*-linux-gnu* )
2588 machine=hp800 opsys=gnu-linux
2589 ;;
2590
ba4481b5
DL
2591 ## HP 9000 series 700 and 800, running HP/UX
2592 hppa*-hp-hpux* )
2593 ## Cross-compilation? Nah!
2594 case "`uname -r`" in
2595 ## Someone's system reports A.B8.05 for this.
2596 ## I wonder what other possibilities there are.
2597 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2598 *.08.* ) machine=hp800 opsys=hpux8 ;;
2599 *.09.* ) machine=hp800 opsys=hpux9 ;;
2600 *) machine=hp800 opsys=hpux10 ;;
2601 esac
2602 ;;
2603 hppa*-*-nextstep* )
2604 machine=hp800 opsys=nextstep
2605 ;;
2606
2607 ## Orion machines
2608 orion-orion-bsd* )
2609 machine=orion opsys=bsd4-2
2610 ;;
2611 clipper-orion-bsd* )
2612 machine=orion105 opsys=bsd4-2
2613 ;;
2614
2615 ## IBM machines
2616 i[3456]86-ibm-aix1.1* )
2617 machine=ibmps2-aix opsys=usg5-2-2
2618 ;;
2619 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2620 machine=ibmps2-aix opsys=usg5-3
2621 ;;
2622 i370-ibm-aix*)
2623 machine=ibm370aix opsys=usg5-3
2624 ;;
55597d70 2625 s390-*-linux-gnu* )
138f0859
GM
2626 machine=ibms390 opsys=gnu-linux
2627 ;;
bcdb1378
EZ
2628 s390x-*-linux-gnu* )
2629 machine=ibms390x opsys=gnu-linux
2630 ;;
ba4481b5
DL
2631 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2632 machine=ibmrs6000 opsys=aix3-1
2633 ;;
2634 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2635 machine=ibmrs6000 opsys=aix3-2-5
2636 ;;
2637 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2638 machine=ibmrs6000 opsys=aix4-1
2639 ;;
2640 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2641 machine=ibmrs6000 opsys=aix4-2
2642 ;;
55597d70 2643 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2644 machine=ibmrs6000 opsys=aix4-2
2645 ;;
ba4481b5
DL
2646 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2647 machine=ibmrs6000 opsys=aix4
2648 ;;
2649 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2650 machine=ibmrs6000 opsys=aix4-1
2651 ;;
2652 rs6000-ibm-aix* | powerpc-ibm-aix* )
2653 machine=ibmrs6000 opsys=aix3-2
2654 ;;
2655 romp-ibm-bsd4.3* )
2656 machine=ibmrt opsys=bsd4-3
2657 ;;
2658 romp-ibm-bsd4.2* )
2659 machine=ibmrt opsys=bsd4-2
2660 ;;
2661 romp-ibm-aos4.3* )
2662 machine=ibmrt opsys=bsd4-3
2663 ;;
2664 romp-ibm-aos4.2* )
2665 machine=ibmrt opsys=bsd4-2
2666 ;;
2667 romp-ibm-aos* )
2668 machine=ibmrt opsys=bsd4-3
2669 ;;
2670 romp-ibm-bsd* )
2671 machine=ibmrt opsys=bsd4-3
2672 ;;
2673 romp-ibm-aix* )
2674 machine=ibmrt-aix opsys=usg5-2-2
2675 ;;
2676
2677 ## Integrated Solutions `Optimum V'
2678 m68*-isi-bsd4.2* )
2679 machine=isi-ov opsys=bsd4-2
2680 ;;
2681 m68*-isi-bsd4.3* )
2682 machine=isi-ov opsys=bsd4-3
2683 ;;
2684
2685 ## Intel 386 machines where we do care about the manufacturer
2686 i[3456]86-intsys-sysv* )
2687 machine=is386 opsys=usg5-2-2
2688 ;;
2689
2690 ## Prime EXL
2691 i[3456]86-prime-sysv* )
2692 machine=i386 opsys=usg5-3
2693 ;;
2694
2695 ## Sequent Symmetry running Dynix
2696 i[3456]86-sequent-bsd* )
2697 machine=symmetry opsys=bsd4-3
2698 ;;
2699
2700 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2701 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2702 machine=sequent-ptx opsys=ptx4
2703 NON_GNU_CPP=/lib/cpp
2704 ;;
2705
2706 ## Sequent Symmetry running DYNIX/ptx
2707 ## Use the old cpp rather than the newer ANSI one.
2708 i[3456]86-sequent-ptx* )
2709 machine=sequent-ptx opsys=ptx
2710 NON_GNU_CPP="/lib/cpp"
2711 ;;
2712
2713 ## ncr machine running svr4.3.
2714 i[3456]86-ncr-sysv4.3 )
2715 machine=ncr386 opsys=usg5-4-3
2716 ;;
2717
2718 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2719 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2720 i[3456]86-ncr-sysv* )
2721 machine=ncr386 opsys=usg5-4-2
2722 ;;
2723
2724 ## Intel Paragon OSF/1
2725 i860-intel-osf1* )
2726 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2727 ;;
2728
2729 ## Intel 860
2730 i860-*-sysv4* )
2731 machine=i860 opsys=usg5-4
2732 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2733 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2734 ;;
2735
c76e04a8
GM
2736 ## Macintosh PowerPC
2737 powerpc*-*-linux-gnu* )
2738 machine=macppc opsys=gnu-linux
2739 ;;
2740
ba4481b5
DL
2741 ## Masscomp machines
2742 m68*-masscomp-rtu* )
2743 machine=masscomp opsys=rtu
2744 ;;
2745
2746 ## Megatest machines
2747 m68*-megatest-bsd* )
2748 machine=mega68 opsys=bsd4-2
2749 ;;
2750
2751 ## Workstations sold by MIPS
2752 ## This is not necessarily all workstations using the MIPS processor -
2753 ## Irises are produced by SGI, and DECstations by DEC.
2754
2755 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2756 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2757 ## it gives for choosing between the alternatives seems to be "Use
2758 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2759 ## the BSD world." I'll assume that these are instructions for
2760 ## handling two odd situations, and that every other situation
2761 ## should use mips.h and usg5-2-2, they being listed first.
2762 mips-mips-usg* )
2763 machine=mips4
2764 ## Fall through to the general code at the bottom to decide on the OS.
2765 ;;
2766 mips-mips-riscos4* )
2767 machine=mips4 opsys=bsd4-3
2768 NON_GNU_CC="cc -systype bsd43"
2769 NON_GNU_CPP="cc -systype bsd43 -E"
2770 ;;
2771 mips-mips-riscos5* )
2772 machine=mips4 opsys=riscos5
2773 NON_GNU_CC="cc -systype bsd43"
2774 NON_GNU_CPP="cc -systype bsd43 -E"
2775 ;;
2776 mips-mips-bsd* )
2777 machine=mips opsys=bsd4-3
2778 ;;
2779 mips-mips-* )
2780 machine=mips opsys=usg5-2-2
2781 ;;
2782
2783 ## NeXT
2784 m68*-next-* | m68k-*-nextstep* )
2785 machine=m68k opsys=nextstep
2786 ;;
2787
2788 ## The complete machine from National Semiconductor
2789 ns32k-ns-genix* )
2790 machine=ns32000 opsys=usg5-2
2791 ;;
2792
2793 ## NCR machines
2794 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2795 machine=tower32 opsys=usg5-2-2
2796 ;;
2797 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2798 machine=tower32v3 opsys=usg5-3
2799 ;;
2800
2801 ## NEC EWS4800
2802 mips-nec-sysv4*)
2803 machine=ews4800 opsys=ux4800
2804 ;;
2805
2806 ## Nixdorf Targon 31
2807 m68*-nixdorf-sysv* )
2808 machine=targon31 opsys=usg5-2-2
2809 ;;
2810
2811 ## Nu (TI or LMI)
2812 m68*-nu-sysv* )
2813 machine=nu opsys=usg5-2
2814 ;;
2815
2816 ## Plexus
2817 m68*-plexus-sysv* )
2818 machine=plexus opsys=usg5-2
2819 ;;
2820
ba4481b5
DL
2821 ## Pyramid machines
2822 ## I don't really have any idea what sort of processor the Pyramid has,
2823 ## so I'm assuming it is its own architecture.
2824 pyramid-pyramid-bsd* )
2825 machine=pyramid opsys=bsd4-2
2826 ;;
2827
2828 ## Sequent Balance
2829 ns32k-sequent-bsd4.2* )
2830 machine=sequent opsys=bsd4-2
2831 ;;
2832 ns32k-sequent-bsd4.3* )
2833 machine=sequent opsys=bsd4-3
2834 ;;
2835
2836 ## Siemens Nixdorf
2837 mips-siemens-sysv* | mips-sni-sysv*)
2838 machine=mips-siemens opsys=usg5-4
2839 NON_GNU_CC=/usr/ccs/bin/cc
2840 NON_GNU_CPP=/usr/ccs/lib/cpp
2841 ;;
2842
2843 ## Silicon Graphics machines
2844 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2845 m68*-sgi-iris3.5* )
2846 machine=irist opsys=iris3-5
2847 ;;
2848 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2849 machine=irist opsys=iris3-6
2850 ;;
2851 ## Iris 4D
2852 mips-sgi-irix3* )
2853 machine=iris4d opsys=irix3-3
2854 ;;
2855 mips-sgi-irix4* )
2856 machine=iris4d opsys=irix4-0
2857 ;;
2858 mips-sgi-irix6.5 )
2859 machine=iris4d opsys=irix6-5
946173ad
DL
2860 # Without defining _LANGUAGE_C, things get masked out in the headers
2861 # so that, for instance, grepping for `free' in stdlib.h fails and
2862 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2863 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2864 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2865 ;;
2866 mips-sgi-irix6* )
2867 machine=iris4d opsys=irix6-0
c4bb2108 2868 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2869 # but presumably it does no harm.
2870 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2871 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2872 NON_GCC_TEST_OPTIONS=-32
2873 ;;
2874 mips-sgi-irix5.[01]* )
2875 machine=iris4d opsys=irix5-0
2876 ;;
2877 mips-sgi-irix5* | mips-sgi-irix* )
2878 machine=iris4d opsys=irix5-2
2879 ;;
2880
2881 ## SONY machines
2882 m68*-sony-bsd4.2* )
2883 machine=news opsys=bsd4-2
2884 ;;
2885 m68*-sony-bsd4.3* )
2886 machine=news opsys=bsd4-3
2887 ;;
2888 m68*-sony-newsos3* | m68*-sony-news3*)
2889 machine=news opsys=bsd4-3
2890 ;;
2891 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2892 machine=news-risc opsys=bsd4-3
2893 ;;
2894 mips-sony-newsos6* )
2895 machine=news-r6 opsys=newsos6
2896 ;;
2897 mips-sony-news* )
2898 machine=news-risc opsys=newsos5
2899 ;;
2900
2901 ## Stride
2902 m68*-stride-sysv* )
2903 machine=stride opsys=usg5-2
2904 ;;
2905
2906 ## Suns
2907 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2908 machine=sparc opsys=gnu-linux
2909 ;;
2910
d054101f 2911 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2912 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2913 | rs6000-*-solaris2*)
2914 case "${canonical}" in
2915 m68*-sunos1* ) machine=sun1 ;;
2916 m68*-sunos2* ) machine=sun2 ;;
2917 m68* ) machine=sun3 ;;
2918 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2919 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2920 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2921 powerpcle* ) machine=powerpcle ;;
2922 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2923 sparc* ) machine=sparc ;;
2924 * ) unported=yes ;;
2925 esac
2926 case "${canonical}" in
2927 ## The Sun386 didn't get past 4.0.
2928 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2929 *-sunos4.0* ) opsys=sunos4-0 ;;
2930 *-sunos4.1.[3-9]*noshare )
2931 ## This name is sunos413 instead of sunos4-1-3
2932 ## to avoid a file name conflict on MSDOS.
2933 opsys=sunos413
2934 NON_GNU_CPP=/usr/lib/cpp
2935 NON_GCC_TEST_OPTIONS=-Bstatic
2936 GCC_TEST_OPTIONS=-static
2937 ;;
2938 *-sunos4.1.[3-9]* | *-sunos4shr*)
2939 opsys=sunos4shr
2940 NON_GNU_CPP=/usr/lib/cpp
2941 ;;
2942 *-sunos4* | *-sunos )
2943 opsys=sunos4-1
2944 NON_GCC_TEST_OPTIONS=-Bstatic
2945 GCC_TEST_OPTIONS=-static
2946 ;;
2947 *-sunos5.3* | *-solaris2.3* )
2948 opsys=sol2-3
2949 NON_GNU_CPP=/usr/ccs/lib/cpp
2950 ;;
2951 *-sunos5.4* | *-solaris2.4* )
2952 opsys=sol2-4
2953 NON_GNU_CPP=/usr/ccs/lib/cpp
2954 RANLIB="ar -ts"
2955 ;;
2956 *-sunos5.5* | *-solaris2.5* )
2957 opsys=sol2-5
2958 NON_GNU_CPP=/usr/ccs/lib/cpp
2959 RANLIB="ar -ts"
2960 ;;
8e967cf7
MR
2961 *-sunos5.6* | *-solaris2.6* )
2962 opsys=sol2-6
2963 NON_GNU_CPP=/usr/ccs/lib/cpp
2964 RANLIB="ar -ts"
2965 ;;
ba4481b5 2966 *-sunos5* | *-solaris* )
9e71690e 2967 opsys=sol2-6
ba4481b5
DL
2968 NON_GNU_CPP=/usr/ccs/lib/cpp
2969 ;;
2970 * ) opsys=bsd4-2 ;;
2971 esac
2972 ## Watch out for a compiler that we know will not work.
2973 case "${canonical}" in
2974 *-solaris* | *-sunos5* )
2975 if [ "x$CC" = x/usr/ucb/cc ]; then
2976 ## /usr/ucb/cc doesn't work;
2977 ## we should find some other compiler that does work.
2978 unset CC
2979 fi
2980 ;;
2981 *) ;;
2982 esac
2983 ;;
2984 sparc-*-nextstep* )
2985 machine=sparc opsys=nextstep
2986 ;;
2987
2988 ## Tadpole 68k
2989 m68*-tadpole-sysv* )
2990 machine=tad68k opsys=usg5-3
2991 ;;
2992
2993 ## Tahoe machines
2994 tahoe-tahoe-bsd4.2* )
2995 machine=tahoe opsys=bsd4-2
2996 ;;
2997 tahoe-tahoe-bsd4.3* )
2998 machine=tahoe opsys=bsd4-3
2999 ;;
3000
3001 ## Tandem Integrity S2
3002 mips-tandem-sysv* )
3003 machine=tandem-s2 opsys=usg5-3
3004 ;;
3005
3006 ## Tektronix XD88
3007 m88k-tektronix-sysv3* )
3008 machine=tekxd88 opsys=usg5-3
3009 ;;
3010
3011 ## Tektronix 16000 box (6130?)
3012 ns16k-tektronix-bsd* )
3013 machine=ns16000 opsys=bsd4-2
3014 ;;
3015 ## Tektronix 4300
3016 ## src/m/tek4300.h hints that this is a m68k machine.
3017 m68*-tektronix-bsd* )
3018 machine=tek4300 opsys=bsd4-3
3019 ;;
3020
3021 ## Titan P2 or P3
3022 ## We seem to have lost the machine-description file titan.h!
3023 titan-titan-sysv* )
3024 machine=titan opsys=usg5-3
3025 ;;
3026
3027 ## Ustation E30 (SS5E)
3028 m68*-unisys-uniplus* )
3029 machine=ustation opsystem=unipl5-2
3030 ;;
3031
3032 ## Vaxen.
3033 vax-dec-* )
3034 machine=vax
3035 case "${canonical}" in
3036 *-bsd4.1* ) opsys=bsd4-1 ;;
3037 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
3038 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
3039 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
3040 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
3041 *-vms* ) opsys=vms ;;
3042 * ) unported=yes
3043 esac
3044 ;;
3045
3046 ## Whitechapel MG1
3047 ns16k-whitechapel-* )
3048 machine=mg1
3049 ## We don't know what sort of OS runs on these; we'll let the
3050 ## operating system guessing code below try.
3051 ;;
3052
3053 ## Wicat
3054 m68*-wicat-sysv* )
3055 machine=wicat opsys=usg5-2
3056 ;;
3057
f4988be7
GM
3058 ## IA-64
3059 ia64*-*-linux* )
3060 machine=ia64 opsys=gnu-linux
3061 ;;
3062
ba4481b5
DL
3063 ## Intel 386 machines where we don't care about the manufacturer
3064 i[3456]86-*-* )
3065 machine=intel386
3066 case "${canonical}" in
c60ee5e7 3067 *-cygwin ) opsys=cygwin ;;
eae54018 3068 *-darwin* ) opsys=darwin
23fd4483
ST
3069 CPP="${CC-cc} -E -no-cpp-precomp"
3070 ;;
ba4481b5
DL
3071 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
3072 *-isc2.2* ) opsys=isc2-2 ;;
3073 *-isc4.0* ) opsys=isc4-0 ;;
3074 *-isc4.* ) opsys=isc4-1
3075 GCC_TEST_OPTIONS=-posix
3076 NON_GCC_TEST_OPTIONS=-Xp
3077 ;;
3078 *-isc* ) opsys=isc3-0 ;;
3079 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
3080 *-esix* ) opsys=esix ;;
3081 *-xenix* ) opsys=xenix ;;
3082 *-linux-gnu* ) opsys=gnu-linux ;;
3083 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 3084 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
3085 NON_GNU_CPP=/lib/cpp
3086 # Prevent -belf from being passed to $CPP.
3087 # /lib/cpp does not accept it.
3088 OVERRIDE_CPPFLAGS=" "
3089 ;;
3090 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
3091 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3092 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 3093 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
3094 *-nextstep* ) opsys=nextstep ;;
3095 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3096 esac
3097 ;;
3098
3099 ## m68k Linux-based GNU system
3100 m68k-*-linux-gnu* )
3101 machine=m68k opsys=gnu-linux
3102 ;;
3103
3104 ## Mips Linux-based GNU system
cd958eb3 3105 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
3106 machine=mips opsys=gnu-linux
3107 ;;
3108
3109 ## UXP/DS
3110 sparc-fujitsu-sysv4* )
3111 machine=sparc opsys=uxpds
3112 NON_GNU_CPP=/usr/ccs/lib/cpp
3113 RANLIB="ar -ts"
3114 ;;
3115
3116 ## UXP/V
3117 f301-fujitsu-uxpv4.1)
3118 machine=f301 opsys=uxpv
3119 ;;
3120
e0f712ba
AC
3121 ## Darwin / Mac OS X
3122 powerpc-apple-darwin* )
3123 machine=powermac opsys=darwin
3124 # Define CPP as follows to make autoconf work correctly.
2a75d75d 3125 CPP="${CC-cc} -E -no-cpp-precomp"
8ae52ca6
RF
3126 # Use fink packages if available.
3127 if test -d /sw/include && test -d /sw/lib; then
3128 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
3129 CPP="${CPP} ${GCC_TEST_OPTIONS}"
3130 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
3131 fi
e0f712ba
AC
3132 ;;
3133
598a2813
AS
3134 ## AMD x86-64 Linux-based GNU system
3135 x86_64-*-linux-gnu* )
24b01ec4 3136 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
3137 ;;
3138
ba4481b5
DL
3139 * )
3140 unported=yes
3141 ;;
3142esac
3143
3144### If the code above didn't choose an operating system, just choose
3145### an operating system based on the configuration name. You really
3146### only want to use this when you have no idea what the right
3147### operating system is; if you know what operating systems a machine
3148### runs, it's cleaner to make it explicit in the case statement
3149### above.
3150if test x"${opsys}" = x; then
3151 case "${canonical}" in
3152 *-gnu* ) opsys=gnu ;;
3153 *-bsd4.[01] ) opsys=bsd4-1 ;;
3154 *-bsd4.2 ) opsys=bsd4-2 ;;
3155 *-bsd4.3 ) opsys=bsd4-3 ;;
3156 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
3157 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
3158 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
3159 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
3160 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
3161 *-sysv5uw* ) opsys=unixware ;;
3162 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
3163 *-sysv4.1* | *-sysvr4.1* )
3164 NON_GNU_CPP=/usr/lib/cpp
3165 opsys=usg5-4 ;;
3166 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
3167 if [ x$NON_GNU_CPP = x ]; then
3168 if [ -f /usr/ccs/lib/cpp ]; then
3169 NON_GNU_CPP=/usr/ccs/lib/cpp
3170 else
3171 NON_GNU_CPP=/lib/cpp
3172 fi
3173 fi
3174 opsys=usg5-4-2 ;;
3175 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
3176 * )
3177 unported=yes
3178 ;;
3179 esac
3180fi
3181
c0d27fcc 3182
22044edf 3183
ba4481b5 3184if test $unported = yes; then
c0d27fcc 3185 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
3186Check \`etc/MACHINES' for recognized configuration names." >&5
3187echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
3188Check \`etc/MACHINES' for recognized configuration names." >&2;}
3189 { (exit 1); exit 1; }; }
ba4481b5
DL
3190fi
3191
3192machfile="m/${machine}.h"
3193opsysfile="s/${opsys}.h"
3194
c0d27fcc 3195
ba4481b5
DL
3196#### Choose a compiler.
3197test -n "$CC" && cc_specified=yes
3198
3199# Save the value of CFLAGS that the user specified.
3200SPECIFIED_CFLAGS="$CFLAGS"
3201
3202case ${with_gcc} in
3203 "yes" ) CC="gcc" GCC=yes ;;
3204 "no" ) : ${CC=cc} ;;
503d2be0
AS
3205 * )
3206esac
3207ac_ext=c
3208ac_cpp='$CPP $CPPFLAGS'
3209ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3210ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3211ac_compiler_gnu=$ac_cv_c_compiler_gnu
3212if test -n "$ac_tool_prefix"; then
3213 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3214set dummy ${ac_tool_prefix}gcc; ac_word=$2
ca81d7a0
JD
3215{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3216echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3217if test "${ac_cv_prog_CC+set}" = set; then
3218 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3219else
3220 if test -n "$CC"; then
3221 ac_cv_prog_CC="$CC" # Let the user override the test.
3222else
c0d27fcc
MR
3223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3224for as_dir in $PATH
3225do
3226 IFS=$as_save_IFS
3227 test -z "$as_dir" && as_dir=.
3228 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3229 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3230 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3231 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3232 break 2
3233 fi
3234done
503d2be0 3235done
ca81d7a0 3236IFS=$as_save_IFS
503d2be0 3237
ba4481b5
DL
3238fi
3239fi
503d2be0 3240CC=$ac_cv_prog_CC
ba4481b5 3241if test -n "$CC"; then
ca81d7a0
JD
3242 { echo "$as_me:$LINENO: result: $CC" >&5
3243echo "${ECHO_T}$CC" >&6; }
503d2be0 3244else
ca81d7a0
JD
3245 { echo "$as_me:$LINENO: result: no" >&5
3246echo "${ECHO_T}no" >&6; }
503d2be0
AS
3247fi
3248
ca81d7a0 3249
503d2be0
AS
3250fi
3251if test -z "$ac_cv_prog_CC"; then
3252 ac_ct_CC=$CC
3253 # Extract the first word of "gcc", so it can be a program name with args.
3254set dummy gcc; ac_word=$2
ca81d7a0
JD
3255{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3256echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3257if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3258 echo $ECHO_N "(cached) $ECHO_C" >&6
3259else
3260 if test -n "$ac_ct_CC"; then
3261 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3262else
c0d27fcc
MR
3263as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3264for as_dir in $PATH
3265do
3266 IFS=$as_save_IFS
3267 test -z "$as_dir" && as_dir=.
3268 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3269 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3270 ac_cv_prog_ac_ct_CC="gcc"
3271 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3272 break 2
3273 fi
3274done
503d2be0 3275done
ca81d7a0 3276IFS=$as_save_IFS
503d2be0
AS
3277
3278fi
3279fi
3280ac_ct_CC=$ac_cv_prog_ac_ct_CC
3281if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3282 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3283echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 3284else
ca81d7a0
JD
3285 { echo "$as_me:$LINENO: result: no" >&5
3286echo "${ECHO_T}no" >&6; }
503d2be0
AS
3287fi
3288
ca81d7a0
JD
3289 if test "x$ac_ct_CC" = x; then
3290 CC=""
3291 else
3292 case $cross_compiling:$ac_tool_warned in
3293yes:)
3294{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3295whose name does not start with the host triplet. If you think this
3296configuration is useful to you, please write to autoconf@gnu.org." >&5
3297echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3298whose name does not start with the host triplet. If you think this
3299configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3300ac_tool_warned=yes ;;
3301esac
3302 CC=$ac_ct_CC
3303 fi
503d2be0
AS
3304else
3305 CC="$ac_cv_prog_CC"
ba4481b5
DL
3306fi
3307
3308if test -z "$CC"; then
ca81d7a0
JD
3309 if test -n "$ac_tool_prefix"; then
3310 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 3311set dummy ${ac_tool_prefix}cc; ac_word=$2
ca81d7a0
JD
3312{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3313echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3314if test "${ac_cv_prog_CC+set}" = set; then
3315 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3316else
3317 if test -n "$CC"; then
3318 ac_cv_prog_CC="$CC" # Let the user override the test.
3319else
c0d27fcc
MR
3320as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3321for as_dir in $PATH
3322do
3323 IFS=$as_save_IFS
3324 test -z "$as_dir" && as_dir=.
3325 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3326 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3327 ac_cv_prog_CC="${ac_tool_prefix}cc"
3328 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3329 break 2
3330 fi
3331done
503d2be0 3332done
ca81d7a0 3333IFS=$as_save_IFS
503d2be0
AS
3334
3335fi
3336fi
3337CC=$ac_cv_prog_CC
3338if test -n "$CC"; then
ca81d7a0
JD
3339 { echo "$as_me:$LINENO: result: $CC" >&5
3340echo "${ECHO_T}$CC" >&6; }
4b411bfe 3341else
ca81d7a0
JD
3342 { echo "$as_me:$LINENO: result: no" >&5
3343echo "${ECHO_T}no" >&6; }
4b411bfe
CY
3344fi
3345
4b411bfe 3346
ca81d7a0 3347 fi
503d2be0
AS
3348fi
3349if test -z "$CC"; then
3350 # Extract the first word of "cc", so it can be a program name with args.
3351set dummy cc; ac_word=$2
ca81d7a0
JD
3352{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3353echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3354if test "${ac_cv_prog_CC+set}" = set; then
3355 echo $ECHO_N "(cached) $ECHO_C" >&6
3356else
3357 if test -n "$CC"; then
3358 ac_cv_prog_CC="$CC" # Let the user override the test.
3359else
3360 ac_prog_rejected=no
c0d27fcc
MR
3361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3362for as_dir in $PATH
3363do
3364 IFS=$as_save_IFS
3365 test -z "$as_dir" && as_dir=.
3366 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3367 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3368 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3369 ac_prog_rejected=yes
3370 continue
3371 fi
3372 ac_cv_prog_CC="cc"
3373 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3374 break 2
3375 fi
3376done
503d2be0 3377done
ca81d7a0 3378IFS=$as_save_IFS
503d2be0 3379
ba4481b5
DL
3380if test $ac_prog_rejected = yes; then
3381 # We found a bogon in the path, so make sure we never use it.
3382 set dummy $ac_cv_prog_CC
3383 shift
503d2be0 3384 if test $# != 0; then
ba4481b5
DL
3385 # We chose a different compiler from the bogus one.
3386 # However, it has the same basename, so the bogon will be chosen
3387 # first if we set CC to just the basename; use the full file name.
3388 shift
6bae0ccf 3389 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
3390 fi
3391fi
3392fi
3393fi
503d2be0 3394CC=$ac_cv_prog_CC
ba4481b5 3395if test -n "$CC"; then
ca81d7a0
JD
3396 { echo "$as_me:$LINENO: result: $CC" >&5
3397echo "${ECHO_T}$CC" >&6; }
ba4481b5 3398else
ca81d7a0
JD
3399 { echo "$as_me:$LINENO: result: no" >&5
3400echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3401fi
3402
ca81d7a0 3403
503d2be0
AS
3404fi
3405if test -z "$CC"; then
3406 if test -n "$ac_tool_prefix"; then
ca81d7a0 3407 for ac_prog in cl.exe
503d2be0
AS
3408 do
3409 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3410set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ca81d7a0
JD
3411{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3412echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3413if test "${ac_cv_prog_CC+set}" = set; then
3414 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
3415else
3416 if test -n "$CC"; then
3417 ac_cv_prog_CC="$CC" # Let the user override the test.
3418else
c0d27fcc
MR
3419as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3420for as_dir in $PATH
3421do
3422 IFS=$as_save_IFS
3423 test -z "$as_dir" && as_dir=.
3424 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3425 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3426 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3427 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3428 break 2
3429 fi
3430done
503d2be0 3431done
ca81d7a0 3432IFS=$as_save_IFS
503d2be0 3433
c4bb2108
DL
3434fi
3435fi
503d2be0 3436CC=$ac_cv_prog_CC
c4bb2108 3437if test -n "$CC"; then
ca81d7a0
JD
3438 { echo "$as_me:$LINENO: result: $CC" >&5
3439echo "${ECHO_T}$CC" >&6; }
c4bb2108 3440else
ca81d7a0
JD
3441 { echo "$as_me:$LINENO: result: no" >&5
3442echo "${ECHO_T}no" >&6; }
503d2be0
AS
3443fi
3444
ca81d7a0 3445
503d2be0
AS
3446 test -n "$CC" && break
3447 done
3448fi
3449if test -z "$CC"; then
3450 ac_ct_CC=$CC
ca81d7a0 3451 for ac_prog in cl.exe
503d2be0
AS
3452do
3453 # Extract the first word of "$ac_prog", so it can be a program name with args.
3454set dummy $ac_prog; ac_word=$2
ca81d7a0
JD
3455{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3456echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3457if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3458 echo $ECHO_N "(cached) $ECHO_C" >&6
3459else
3460 if test -n "$ac_ct_CC"; then
3461 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3462else
c0d27fcc
MR
3463as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3464for as_dir in $PATH
3465do
3466 IFS=$as_save_IFS
3467 test -z "$as_dir" && as_dir=.
3468 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3469 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3470 ac_cv_prog_ac_ct_CC="$ac_prog"
3471 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3472 break 2
3473 fi
3474done
503d2be0 3475done
ca81d7a0 3476IFS=$as_save_IFS
503d2be0 3477
c4bb2108 3478fi
503d2be0
AS
3479fi
3480ac_ct_CC=$ac_cv_prog_ac_ct_CC
3481if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3482 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3483echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 3484else
ca81d7a0
JD
3485 { echo "$as_me:$LINENO: result: no" >&5
3486echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3487fi
3488
ca81d7a0 3489
503d2be0
AS
3490 test -n "$ac_ct_CC" && break
3491done
ba4481b5 3492
ca81d7a0
JD
3493 if test "x$ac_ct_CC" = x; then
3494 CC=""
3495 else
3496 case $cross_compiling:$ac_tool_warned in
3497yes:)
3498{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3499whose name does not start with the host triplet. If you think this
3500configuration is useful to you, please write to autoconf@gnu.org." >&5
3501echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3502whose name does not start with the host triplet. If you think this
3503configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3504ac_tool_warned=yes ;;
3505esac
3506 CC=$ac_ct_CC
3507 fi
503d2be0
AS
3508fi
3509
3510fi
ba4481b5 3511
c0d27fcc 3512
19650fd6
AS
3513test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3514See \`config.log' for more details." >&5
3515echo "$as_me: error: no acceptable C compiler found in \$PATH
3516See \`config.log' for more details." >&2;}
503d2be0 3517 { (exit 1); exit 1; }; }
c4bb2108 3518
503d2be0 3519# Provide some information about the compiler.
ca81d7a0 3520echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3521ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3522{ (ac_try="$ac_compiler --version >&5"
3523case "(($ac_try" in
3524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3525 *) ac_try_echo=$ac_try;;
3526esac
3527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3528 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3529 ac_status=$?
c0d27fcc 3530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3531 (exit $ac_status); }
ca81d7a0
JD
3532{ (ac_try="$ac_compiler -v >&5"
3533case "(($ac_try" in
3534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3535 *) ac_try_echo=$ac_try;;
3536esac
3537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3538 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3539 ac_status=$?
c0d27fcc 3540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3541 (exit $ac_status); }
ca81d7a0
JD
3542{ (ac_try="$ac_compiler -V >&5"
3543case "(($ac_try" in
3544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3545 *) ac_try_echo=$ac_try;;
3546esac
3547eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3548 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3549 ac_status=$?
c0d27fcc 3550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3551 (exit $ac_status); }
3552
3553cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3554/* confdefs.h. */
3555_ACEOF
3556cat confdefs.h >>conftest.$ac_ext
3557cat >>conftest.$ac_ext <<_ACEOF
3558/* end confdefs.h. */
c4bb2108 3559
503d2be0
AS
3560int
3561main ()
3562{
3563
3564 ;
3565 return 0;
3566}
3567_ACEOF
3568ac_clean_files_save=$ac_clean_files
19650fd6 3569ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3570# Try to create an executable without -o first, disregard a.out.
3571# It will help us diagnose broken compilers, and finding out an intuition
3572# of exeext.
ca81d7a0
JD
3573{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3574echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3575ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ca81d7a0
JD
3576#
3577# List of possible output files, starting from the most likely.
3578# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3579# only as a last resort. b.out is created by i960 compilers.
3580ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3581#
3582# The IRIX 6 linker writes into existing files which may not be
3583# executable, retaining their permissions. Remove them first so a
3584# subsequent execution test works.
3585ac_rmfiles=
3586for ac_file in $ac_files
3587do
3588 case $ac_file in
3589 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3590 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3591 esac
3592done
3593rm -f $ac_rmfiles
3594
3595if { (ac_try="$ac_link_default"
3596case "(($ac_try" in
3597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3598 *) ac_try_echo=$ac_try;;
3599esac
3600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3601 (eval "$ac_link_default") 2>&5
503d2be0 3602 ac_status=$?
c0d27fcc 3603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3604 (exit $ac_status); }; then
ca81d7a0
JD
3605 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3606# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3607# in a Makefile. We should not override ac_cv_exeext if it was cached,
3608# so that the user can short-circuit this test for compilers unknown to
3609# Autoconf.
f053c89f 3610for ac_file in $ac_files ''
19650fd6 3611do
6bae0ccf 3612 test -f "$ac_file" || continue
503d2be0 3613 case $ac_file in
ca81d7a0 3614 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3615 ;;
19650fd6 3616 [ab].out )
edfaf76d
LK
3617 # We found the default executable, but exeext='' is most
3618 # certainly right.
3619 break;;
19650fd6 3620 *.* )
ca81d7a0
JD
3621 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3622 then :; else
3623 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3624 fi
3625 # We set ac_cv_exeext here because the later test for it is not
3626 # safe: cross compilers may not add the suffix if given an `-o'
3627 # argument, so we may need to know it at that point already.
3628 # Even if this section looks crufty: it has the advantage of
3629 # actually working.
edfaf76d 3630 break;;
19650fd6 3631 * )
edfaf76d 3632 break;;
503d2be0
AS
3633 esac
3634done
ca81d7a0
JD
3635test "$ac_cv_exeext" = no && ac_cv_exeext=
3636
503d2be0 3637else
f053c89f
CY
3638 ac_file=''
3639fi
3640
3641{ echo "$as_me:$LINENO: result: $ac_file" >&5
3642echo "${ECHO_T}$ac_file" >&6; }
3643if test -z "$ac_file"; then
503d2be0 3644 echo "$as_me: failed program was:" >&5
19650fd6
AS
3645sed 's/^/| /' conftest.$ac_ext >&5
3646
6bae0ccf 3647{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3648See \`config.log' for more details." >&5
6bae0ccf 3649echo "$as_me: error: C compiler cannot create executables
19650fd6 3650See \`config.log' for more details." >&2;}
503d2be0
AS
3651 { (exit 77); exit 77; }; }
3652fi
3653
3654ac_exeext=$ac_cv_exeext
503d2be0 3655
ca81d7a0 3656# Check that the compiler produces executables we can run. If not, either
503d2be0 3657# the compiler is broken, or we cross compile.
ca81d7a0
JD
3658{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3659echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3660# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3661# If not cross compiling, check that we can run a simple program.
3662if test "$cross_compiling" != yes; then
3663 if { ac_try='./$ac_file'
ca81d7a0
JD
3664 { (case "(($ac_try" in
3665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3666 *) ac_try_echo=$ac_try;;
3667esac
3668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3669 (eval "$ac_try") 2>&5
503d2be0 3670 ac_status=$?
c0d27fcc 3671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3672 (exit $ac_status); }; }; then
3673 cross_compiling=no
ba4481b5 3674 else
503d2be0
AS
3675 if test "$cross_compiling" = maybe; then
3676 cross_compiling=yes
3677 else
c0d27fcc 3678 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3679If you meant to cross compile, use \`--host'.
3680See \`config.log' for more details." >&5
503d2be0 3681echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3682If you meant to cross compile, use \`--host'.
3683See \`config.log' for more details." >&2;}
503d2be0
AS
3684 { (exit 1); exit 1; }; }
3685 fi
ba4481b5 3686 fi
503d2be0 3687fi
ca81d7a0
JD
3688{ echo "$as_me:$LINENO: result: yes" >&5
3689echo "${ECHO_T}yes" >&6; }
503d2be0 3690
19650fd6 3691rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3692ac_clean_files=$ac_clean_files_save
ca81d7a0 3693# Check that the compiler produces executables we can run. If not, either
503d2be0 3694# the compiler is broken, or we cross compile.
ca81d7a0
JD
3695{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3696echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3697{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3698echo "${ECHO_T}$cross_compiling" >&6; }
3699
3700{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3701echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3702if { (ac_try="$ac_link"
3703case "(($ac_try" in
3704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3705 *) ac_try_echo=$ac_try;;
3706esac
3707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3708 (eval "$ac_link") 2>&5
503d2be0 3709 ac_status=$?
c0d27fcc 3710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3711 (exit $ac_status); }; then
3712 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3713# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3714# work properly (i.e., refer to `conftest.exe'), while it won't with
3715# `rm'.
6bae0ccf
DL
3716for ac_file in conftest.exe conftest conftest.*; do
3717 test -f "$ac_file" || continue
503d2be0 3718 case $ac_file in
ca81d7a0 3719 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3720 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3721 break;;
503d2be0
AS
3722 * ) break;;
3723 esac
3724done
ba4481b5 3725else
19650fd6
AS
3726 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3727See \`config.log' for more details." >&5
3728echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3729See \`config.log' for more details." >&2;}
503d2be0 3730 { (exit 1); exit 1; }; }
ba4481b5 3731fi
ba4481b5 3732
503d2be0 3733rm -f conftest$ac_cv_exeext
ca81d7a0
JD
3734{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3735echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3736
503d2be0
AS
3737rm -f conftest.$ac_ext
3738EXEEXT=$ac_cv_exeext
3739ac_exeext=$EXEEXT
ca81d7a0
JD
3740{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3741echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3742if test "${ac_cv_objext+set}" = set; then
3743 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3744else
503d2be0 3745 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3746/* confdefs.h. */
3747_ACEOF
3748cat confdefs.h >>conftest.$ac_ext
3749cat >>conftest.$ac_ext <<_ACEOF
3750/* end confdefs.h. */
ba4481b5 3751
503d2be0
AS
3752int
3753main ()
3754{
ba4481b5 3755
503d2be0
AS
3756 ;
3757 return 0;
3758}
3759_ACEOF
3760rm -f conftest.o conftest.obj
ca81d7a0
JD
3761if { (ac_try="$ac_compile"
3762case "(($ac_try" in
3763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3764 *) ac_try_echo=$ac_try;;
3765esac
3766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3767 (eval "$ac_compile") 2>&5
503d2be0 3768 ac_status=$?
c0d27fcc 3769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3770 (exit $ac_status); }; then
ca81d7a0
JD
3771 for ac_file in conftest.o conftest.obj conftest.*; do
3772 test -f "$ac_file" || continue;
503d2be0 3773 case $ac_file in
ca81d7a0 3774 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3775 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3776 break;;
3777 esac
3778done
c4bb2108 3779else
503d2be0 3780 echo "$as_me: failed program was:" >&5
19650fd6
AS
3781sed 's/^/| /' conftest.$ac_ext >&5
3782
3783{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3784See \`config.log' for more details." >&5
3785echo "$as_me: error: cannot compute suffix of object files: cannot compile
3786See \`config.log' for more details." >&2;}
503d2be0 3787 { (exit 1); exit 1; }; }
c4bb2108
DL
3788fi
3789
503d2be0
AS
3790rm -f conftest.$ac_cv_objext conftest.$ac_ext
3791fi
ca81d7a0
JD
3792{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3793echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3794OBJEXT=$ac_cv_objext
3795ac_objext=$OBJEXT
ca81d7a0
JD
3796{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3797echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3798if test "${ac_cv_c_compiler_gnu+set}" = set; then
3799 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3800else
503d2be0 3801 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3802/* confdefs.h. */
3803_ACEOF
3804cat confdefs.h >>conftest.$ac_ext
3805cat >>conftest.$ac_ext <<_ACEOF
3806/* end confdefs.h. */
503d2be0
AS
3807
3808int
3809main ()
3810{
3811#ifndef __GNUC__
3812 choke me
3813#endif
3814
3815 ;
3816 return 0;
3817}
3818_ACEOF
3819rm -f conftest.$ac_objext
ca81d7a0
JD
3820if { (ac_try="$ac_compile"
3821case "(($ac_try" in
3822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3823 *) ac_try_echo=$ac_try;;
3824esac
3825eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3826 (eval "$ac_compile") 2>conftest.er1
503d2be0 3827 ac_status=$?
edfaf76d
LK
3828 grep -v '^ *+' conftest.er1 >conftest.err
3829 rm -f conftest.er1
3830 cat conftest.err >&5
c0d27fcc 3831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3832 (exit $ac_status); } && {
3833 test -z "$ac_c_werror_flag" ||
3834 test ! -s conftest.err
3835 } && test -s conftest.$ac_objext; then
503d2be0
AS
3836 ac_compiler_gnu=yes
3837else
3838 echo "$as_me: failed program was:" >&5
19650fd6
AS
3839sed 's/^/| /' conftest.$ac_ext >&5
3840
ca81d7a0 3841 ac_compiler_gnu=no
503d2be0 3842fi
ca81d7a0
JD
3843
3844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3845ac_cv_c_compiler_gnu=$ac_compiler_gnu
3846
3847fi
ca81d7a0
JD
3848{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3849echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3850GCC=`test $ac_compiler_gnu = yes && echo yes`
3851ac_test_CFLAGS=${CFLAGS+set}
3852ac_save_CFLAGS=$CFLAGS
ca81d7a0
JD
3853{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3854echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3855if test "${ac_cv_prog_cc_g+set}" = set; then
3856 echo $ECHO_N "(cached) $ECHO_C" >&6
3857else
ca81d7a0
JD
3858 ac_save_c_werror_flag=$ac_c_werror_flag
3859 ac_c_werror_flag=yes
3860 ac_cv_prog_cc_g=no
3861 CFLAGS="-g"
3862 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3863/* confdefs.h. */
3864_ACEOF
3865cat confdefs.h >>conftest.$ac_ext
3866cat >>conftest.$ac_ext <<_ACEOF
3867/* end confdefs.h. */
503d2be0
AS
3868
3869int
3870main ()
3871{
3872
3873 ;
3874 return 0;
3875}
3876_ACEOF
3877rm -f conftest.$ac_objext
ca81d7a0
JD
3878if { (ac_try="$ac_compile"
3879case "(($ac_try" in
3880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3881 *) ac_try_echo=$ac_try;;
3882esac
3883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3884 (eval "$ac_compile") 2>conftest.er1
503d2be0 3885 ac_status=$?
edfaf76d
LK
3886 grep -v '^ *+' conftest.er1 >conftest.err
3887 rm -f conftest.er1
3888 cat conftest.err >&5
c0d27fcc 3889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3890 (exit $ac_status); } && {
3891 test -z "$ac_c_werror_flag" ||
3892 test ! -s conftest.err
3893 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3894 ac_cv_prog_cc_g=yes
3895else
503d2be0 3896 echo "$as_me: failed program was:" >&5
19650fd6
AS
3897sed 's/^/| /' conftest.$ac_ext >&5
3898
ca81d7a0
JD
3899 CFLAGS=""
3900 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3901/* confdefs.h. */
3902_ACEOF
3903cat confdefs.h >>conftest.$ac_ext
3904cat >>conftest.$ac_ext <<_ACEOF
3905/* end confdefs.h. */
edfaf76d 3906
6bae0ccf
DL
3907int
3908main ()
3909{
ca81d7a0 3910
6bae0ccf
DL
3911 ;
3912 return 0;
3913}
3914_ACEOF
ca81d7a0
JD
3915rm -f conftest.$ac_objext
3916if { (ac_try="$ac_compile"
3917case "(($ac_try" in
3918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3919 *) ac_try_echo=$ac_try;;
3920esac
3921eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3922 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3923 ac_status=$?
edfaf76d
LK
3924 grep -v '^ *+' conftest.er1 >conftest.err
3925 rm -f conftest.er1
3926 cat conftest.err >&5
6bae0ccf 3927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3928 (exit $ac_status); } && {
3929 test -z "$ac_c_werror_flag" ||
3930 test ! -s conftest.err
3931 } && test -s conftest.$ac_objext; then
ca81d7a0 3932 :
6bae0ccf
DL
3933else
3934 echo "$as_me: failed program was:" >&5
19650fd6
AS
3935sed 's/^/| /' conftest.$ac_ext >&5
3936
ca81d7a0
JD
3937 ac_c_werror_flag=$ac_save_c_werror_flag
3938 CFLAGS="-g"
3939 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 3940/* confdefs.h. */
19650fd6
AS
3941_ACEOF
3942cat confdefs.h >>conftest.$ac_ext
3943cat >>conftest.$ac_ext <<_ACEOF
3944/* end confdefs.h. */
ca81d7a0 3945
503d2be0
AS
3946int
3947main ()
3948{
ca81d7a0 3949
503d2be0
AS
3950 ;
3951 return 0;
3952}
3953_ACEOF
3954rm -f conftest.$ac_objext
ca81d7a0
JD
3955if { (ac_try="$ac_compile"
3956case "(($ac_try" in
3957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3958 *) ac_try_echo=$ac_try;;
3959esac
3960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3961 (eval "$ac_compile") 2>conftest.er1
503d2be0 3962 ac_status=$?
edfaf76d
LK
3963 grep -v '^ *+' conftest.er1 >conftest.err
3964 rm -f conftest.er1
3965 cat conftest.err >&5
c0d27fcc 3966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3967 (exit $ac_status); } && {
3968 test -z "$ac_c_werror_flag" ||
3969 test ! -s conftest.err
3970 } && test -s conftest.$ac_objext; then
ca81d7a0 3971 ac_cv_prog_cc_g=yes
503d2be0
AS
3972else
3973 echo "$as_me: failed program was:" >&5
19650fd6
AS
3974sed 's/^/| /' conftest.$ac_ext >&5
3975
ca81d7a0 3976
8eeae1c9 3977fi
ca81d7a0
JD
3978
3979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3980fi
3981
3982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3983fi
3984
3985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3986 ac_c_werror_flag=$ac_save_c_werror_flag
3987fi
3988{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3989echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3990if test "$ac_test_CFLAGS" = set; then
3991 CFLAGS=$ac_save_CFLAGS
3992elif test $ac_cv_prog_cc_g = yes; then
3993 if test "$GCC" = yes; then
3994 CFLAGS="-g -O2"
3995 else
3996 CFLAGS="-g"
3997 fi
3998else
3999 if test "$GCC" = yes; then
4000 CFLAGS="-O2"
4001 else
4002 CFLAGS=
4003 fi
4004fi
4005{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
4006echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
4007if test "${ac_cv_prog_cc_c89+set}" = set; then
4008 echo $ECHO_N "(cached) $ECHO_C" >&6
4009else
4010 ac_cv_prog_cc_c89=no
4011ac_save_CC=$CC
4012cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4013/* confdefs.h. */
4014_ACEOF
4015cat confdefs.h >>conftest.$ac_ext
4016cat >>conftest.$ac_ext <<_ACEOF
4017/* end confdefs.h. */
ca81d7a0
JD
4018#include <stdarg.h>
4019#include <stdio.h>
4020#include <sys/types.h>
4021#include <sys/stat.h>
4022/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4023struct buf { int x; };
4024FILE * (*rcsopen) (struct buf *, struct stat *, int);
4025static char *e (p, i)
4026 char **p;
4027 int i;
4028{
4029 return p[i];
4030}
4031static char *f (char * (*g) (char **, int), char **p, ...)
4032{
4033 char *s;
4034 va_list v;
4035 va_start (v,p);
4036 s = g (p, va_arg (v,int));
4037 va_end (v);
4038 return s;
4039}
4040
4041/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4042 function prototypes and stuff, but not '\xHH' hex character constants.
4043 These don't provoke an error unfortunately, instead are silently treated
4044 as 'x'. The following induces an error, until -std is added to get
4045 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4046 array size at least. It's necessary to write '\x00'==0 to get something
4047 that's true only with -std. */
4048int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4049
4050/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4051 inside strings and character constants. */
4052#define FOO(x) 'x'
4053int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4054
4055int test (int i, double x);
4056struct s1 {int (*f) (int a);};
4057struct s2 {int (*f) (double a);};
4058int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4059int argc;
4060char **argv;
503d2be0
AS
4061int
4062main ()
4063{
ca81d7a0 4064return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
503d2be0
AS
4065 ;
4066 return 0;
4067}
4068_ACEOF
ca81d7a0
JD
4069for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4070 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4071do
4072 CC="$ac_save_CC $ac_arg"
4073 rm -f conftest.$ac_objext
4074if { (ac_try="$ac_compile"
4075case "(($ac_try" in
4076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4077 *) ac_try_echo=$ac_try;;
4078esac
4079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4080 (eval "$ac_compile") 2>conftest.er1
503d2be0 4081 ac_status=$?
edfaf76d
LK
4082 grep -v '^ *+' conftest.er1 >conftest.err
4083 rm -f conftest.er1
4084 cat conftest.err >&5
c0d27fcc 4085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4086 (exit $ac_status); } && {
4087 test -z "$ac_c_werror_flag" ||
4088 test ! -s conftest.err
4089 } && test -s conftest.$ac_objext; then
ca81d7a0 4090 ac_cv_prog_cc_c89=$ac_arg
503d2be0
AS
4091else
4092 echo "$as_me: failed program was:" >&5
19650fd6
AS
4093sed 's/^/| /' conftest.$ac_ext >&5
4094
ca81d7a0 4095
503d2be0 4096fi
ca81d7a0
JD
4097
4098rm -f core conftest.err conftest.$ac_objext
4099 test "x$ac_cv_prog_cc_c89" != "xno" && break
503d2be0 4100done
ca81d7a0
JD
4101rm -f conftest.$ac_ext
4102CC=$ac_save_CC
4103
503d2be0 4104fi
ca81d7a0
JD
4105# AC_CACHE_VAL
4106case "x$ac_cv_prog_cc_c89" in
4107 x)
4108 { echo "$as_me:$LINENO: result: none needed" >&5
4109echo "${ECHO_T}none needed" >&6; } ;;
4110 xno)
4111 { echo "$as_me:$LINENO: result: unsupported" >&5
4112echo "${ECHO_T}unsupported" >&6; } ;;
4113 *)
4114 CC="$CC $ac_cv_prog_cc_c89"
4115 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
4116echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
4117esac
ba4481b5 4118
19650fd6 4119
503d2be0
AS
4120ac_ext=c
4121ac_cpp='$CPP $CPPFLAGS'
4122ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4123ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4124ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 4125
c0d27fcc 4126
ba4481b5
DL
4127# On Suns, sometimes $CPP names a directory.
4128if test -n "$CPP" && test -d "$CPP"; then
4129 CPP=
4130fi
4131
4132#### Some systems specify a CPP to use unless we are using GCC.
4133#### Now that we know whether we are using GCC, we can decide whether
4134#### to use that one.
4135if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4136then
4137 CPP="$NON_GNU_CPP"
4138fi
4139
4140#### Some systems specify a CC to use unless we are using GCC.
4141#### Now that we know whether we are using GCC, we can decide whether
4142#### to use that one.
4143if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4144 test x$cc_specified != xyes
4145then
4146 CC="$NON_GNU_CC"
4147fi
4148
4149if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
4150then
4151 CC="$CC $GCC_TEST_OPTIONS"
4152fi
4153
4154if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
4155then
4156 CC="$CC $NON_GCC_TEST_OPTIONS"
4157fi
4158
e143ad11
AS
4159
4160ac_ext=c
4161ac_cpp='$CPP $CPPFLAGS'
4162ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4163ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4164ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4165{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4166echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
4167# On Suns, sometimes $CPP names a directory.
4168if test -n "$CPP" && test -d "$CPP"; then
4169 CPP=
4170fi
4171if test -z "$CPP"; then
4172 if test "${ac_cv_prog_CPP+set}" = set; then
4173 echo $ECHO_N "(cached) $ECHO_C" >&6
4174else
4175 # Double quotes because CPP needs to be expanded
4176 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4177 do
4178 ac_preproc_ok=false
4179for ac_c_preproc_warn_flag in '' yes
4180do
4181 # Use a header file that comes with gcc, so configuring glibc
4182 # with a fresh cross-compiler works.
4183 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4184 # <limits.h> exists even on freestanding compilers.
4185 # On the NeXT, cc -E runs the code through the compiler's parser,
4186 # not just through cpp. "Syntax error" is here to catch this case.
4187 cat >conftest.$ac_ext <<_ACEOF
4188/* confdefs.h. */
4189_ACEOF
4190cat confdefs.h >>conftest.$ac_ext
4191cat >>conftest.$ac_ext <<_ACEOF
4192/* end confdefs.h. */
4193#ifdef __STDC__
4194# include <limits.h>
4195#else
4196# include <assert.h>
4197#endif
4198 Syntax error
4199_ACEOF
ca81d7a0
JD
4200if { (ac_try="$ac_cpp conftest.$ac_ext"
4201case "(($ac_try" in
4202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4203 *) ac_try_echo=$ac_try;;
4204esac
4205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4206 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4207 ac_status=$?
4208 grep -v '^ *+' conftest.er1 >conftest.err
4209 rm -f conftest.er1
4210 cat conftest.err >&5
4211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4212 (exit $ac_status); } >/dev/null && {
4213 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4214 test ! -s conftest.err
4215 }; then
e143ad11
AS
4216 :
4217else
4218 echo "$as_me: failed program was:" >&5
4219sed 's/^/| /' conftest.$ac_ext >&5
4220
4221 # Broken: fails on valid input.
4222continue
4223fi
ca81d7a0 4224
e143ad11
AS
4225rm -f conftest.err conftest.$ac_ext
4226
ca81d7a0 4227 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4228 # can be detected and how.
4229 cat >conftest.$ac_ext <<_ACEOF
4230/* confdefs.h. */
4231_ACEOF
4232cat confdefs.h >>conftest.$ac_ext
4233cat >>conftest.$ac_ext <<_ACEOF
4234/* end confdefs.h. */
4235#include <ac_nonexistent.h>
4236_ACEOF
ca81d7a0
JD
4237if { (ac_try="$ac_cpp conftest.$ac_ext"
4238case "(($ac_try" in
4239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4240 *) ac_try_echo=$ac_try;;
4241esac
4242eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4243 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4244 ac_status=$?
4245 grep -v '^ *+' conftest.er1 >conftest.err
4246 rm -f conftest.er1
4247 cat conftest.err >&5
4248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4249 (exit $ac_status); } >/dev/null && {
4250 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4251 test ! -s conftest.err
4252 }; then
e143ad11
AS
4253 # Broken: success on invalid input.
4254continue
4255else
4256 echo "$as_me: failed program was:" >&5
4257sed 's/^/| /' conftest.$ac_ext >&5
4258
4259 # Passes both tests.
4260ac_preproc_ok=:
4261break
4262fi
ca81d7a0 4263
e143ad11
AS
4264rm -f conftest.err conftest.$ac_ext
4265
4266done
4267# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4268rm -f conftest.err conftest.$ac_ext
4269if $ac_preproc_ok; then
4270 break
4271fi
4272
4273 done
4274 ac_cv_prog_CPP=$CPP
4275
4276fi
4277 CPP=$ac_cv_prog_CPP
4278else
4279 ac_cv_prog_CPP=$CPP
4280fi
ca81d7a0
JD
4281{ echo "$as_me:$LINENO: result: $CPP" >&5
4282echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
4283ac_preproc_ok=false
4284for ac_c_preproc_warn_flag in '' yes
4285do
4286 # Use a header file that comes with gcc, so configuring glibc
4287 # with a fresh cross-compiler works.
4288 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4289 # <limits.h> exists even on freestanding compilers.
4290 # On the NeXT, cc -E runs the code through the compiler's parser,
4291 # not just through cpp. "Syntax error" is here to catch this case.
4292 cat >conftest.$ac_ext <<_ACEOF
4293/* confdefs.h. */
4294_ACEOF
4295cat confdefs.h >>conftest.$ac_ext
4296cat >>conftest.$ac_ext <<_ACEOF
4297/* end confdefs.h. */
4298#ifdef __STDC__
4299# include <limits.h>
4300#else
4301# include <assert.h>
4302#endif
4303 Syntax error
4304_ACEOF
ca81d7a0
JD
4305if { (ac_try="$ac_cpp conftest.$ac_ext"
4306case "(($ac_try" in
4307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4308 *) ac_try_echo=$ac_try;;
4309esac
4310eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4311 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4312 ac_status=$?
4313 grep -v '^ *+' conftest.er1 >conftest.err
4314 rm -f conftest.er1
4315 cat conftest.err >&5
4316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4317 (exit $ac_status); } >/dev/null && {
4318 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4319 test ! -s conftest.err
4320 }; then
e143ad11
AS
4321 :
4322else
4323 echo "$as_me: failed program was:" >&5
4324sed 's/^/| /' conftest.$ac_ext >&5
4325
4326 # Broken: fails on valid input.
4327continue
4328fi
ca81d7a0 4329
e143ad11
AS
4330rm -f conftest.err conftest.$ac_ext
4331
ca81d7a0 4332 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4333 # can be detected and how.
4334 cat >conftest.$ac_ext <<_ACEOF
4335/* confdefs.h. */
4336_ACEOF
4337cat confdefs.h >>conftest.$ac_ext
4338cat >>conftest.$ac_ext <<_ACEOF
4339/* end confdefs.h. */
4340#include <ac_nonexistent.h>
4341_ACEOF
ca81d7a0
JD
4342if { (ac_try="$ac_cpp conftest.$ac_ext"
4343case "(($ac_try" in
4344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4345 *) ac_try_echo=$ac_try;;
4346esac
4347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4348 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4349 ac_status=$?
4350 grep -v '^ *+' conftest.er1 >conftest.err
4351 rm -f conftest.er1
4352 cat conftest.err >&5
4353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4354 (exit $ac_status); } >/dev/null && {
4355 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4356 test ! -s conftest.err
4357 }; then
e143ad11
AS
4358 # Broken: success on invalid input.
4359continue
4360else
4361 echo "$as_me: failed program was:" >&5
4362sed 's/^/| /' conftest.$ac_ext >&5
4363
4364 # Passes both tests.
4365ac_preproc_ok=:
4366break
4367fi
ca81d7a0 4368
e143ad11
AS
4369rm -f conftest.err conftest.$ac_ext
4370
4371done
4372# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4373rm -f conftest.err conftest.$ac_ext
4374if $ac_preproc_ok; then
4375 :
4376else
4377 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4378See \`config.log' for more details." >&5
4379echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4380See \`config.log' for more details." >&2;}
4381 { (exit 1); exit 1; }; }
4382fi
4383
4384ac_ext=c
4385ac_cpp='$CPP $CPPFLAGS'
4386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4388ac_compiler_gnu=$ac_cv_c_compiler_gnu
4389
4390
ca81d7a0
JD
4391{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4392echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4393if test "${ac_cv_path_GREP+set}" = set; then
4394 echo $ECHO_N "(cached) $ECHO_C" >&6
4395else
4396 # Extract the first word of "grep ggrep" to use in msg output
4397if test -z "$GREP"; then
4398set dummy grep ggrep; ac_prog_name=$2
4399if test "${ac_cv_path_GREP+set}" = set; then
4400 echo $ECHO_N "(cached) $ECHO_C" >&6
4401else
4402 ac_path_GREP_found=false
4403# Loop through the user's path and test for each of PROGNAME-LIST
4404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4405for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4406do
4407 IFS=$as_save_IFS
4408 test -z "$as_dir" && as_dir=.
4409 for ac_prog in grep ggrep; do
4410 for ac_exec_ext in '' $ac_executable_extensions; do
4411 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4412 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
ca81d7a0
JD
4413 # Check for GNU ac_path_GREP and select it if it is found.
4414 # Check for GNU $ac_path_GREP
4415case `"$ac_path_GREP" --version 2>&1` in
4416*GNU*)
4417 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4418*)
4419 ac_count=0
4420 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4421 while :
4422 do
4423 cat "conftest.in" "conftest.in" >"conftest.tmp"
4424 mv "conftest.tmp" "conftest.in"
4425 cp "conftest.in" "conftest.nl"
4426 echo 'GREP' >> "conftest.nl"
4427 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4428 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4429 ac_count=`expr $ac_count + 1`
4430 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4431 # Best one so far, save it but keep looking for a better one
4432 ac_cv_path_GREP="$ac_path_GREP"
4433 ac_path_GREP_max=$ac_count
4434 fi
4435 # 10*(2^10) chars as input seems more than enough
4436 test $ac_count -gt 10 && break
4437 done
4438 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4439esac
4440
4441
4442 $ac_path_GREP_found && break 3
4443 done
4444done
4445
4446done
4447IFS=$as_save_IFS
4448
4449
4450fi
4451
4452GREP="$ac_cv_path_GREP"
4453if test -z "$GREP"; then
4454 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4455echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4456 { (exit 1); exit 1; }; }
4457fi
4458
4459else
4460 ac_cv_path_GREP=$GREP
4461fi
4462
4463
4464fi
4465{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4466echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4467 GREP="$ac_cv_path_GREP"
4468
4469
4470{ echo "$as_me:$LINENO: checking for egrep" >&5
4471echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4472if test "${ac_cv_path_EGREP+set}" = set; then
8eeae1c9
JD
4473 echo $ECHO_N "(cached) $ECHO_C" >&6
4474else
ca81d7a0
JD
4475 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4476 then ac_cv_path_EGREP="$GREP -E"
4477 else
4478 # Extract the first word of "egrep" to use in msg output
4479if test -z "$EGREP"; then
4480set dummy egrep; ac_prog_name=$2
4481if test "${ac_cv_path_EGREP+set}" = set; then
4482 echo $ECHO_N "(cached) $ECHO_C" >&6
4483else
4484 ac_path_EGREP_found=false
4485# Loop through the user's path and test for each of PROGNAME-LIST
4486as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4487for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4488do
4489 IFS=$as_save_IFS
4490 test -z "$as_dir" && as_dir=.
4491 for ac_prog in egrep; do
4492 for ac_exec_ext in '' $ac_executable_extensions; do
4493 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4494 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
ca81d7a0
JD
4495 # Check for GNU ac_path_EGREP and select it if it is found.
4496 # Check for GNU $ac_path_EGREP
4497case `"$ac_path_EGREP" --version 2>&1` in
4498*GNU*)
4499 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4500*)
4501 ac_count=0
4502 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4503 while :
4504 do
4505 cat "conftest.in" "conftest.in" >"conftest.tmp"
4506 mv "conftest.tmp" "conftest.in"
4507 cp "conftest.in" "conftest.nl"
4508 echo 'EGREP' >> "conftest.nl"
4509 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4510 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4511 ac_count=`expr $ac_count + 1`
4512 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4513 # Best one so far, save it but keep looking for a better one
4514 ac_cv_path_EGREP="$ac_path_EGREP"
4515 ac_path_EGREP_max=$ac_count
e143ad11 4516 fi
ca81d7a0
JD
4517 # 10*(2^10) chars as input seems more than enough
4518 test $ac_count -gt 10 && break
4519 done
4520 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4521esac
4522
4523
4524 $ac_path_EGREP_found && break 3
4525 done
4526done
4527
4528done
4529IFS=$as_save_IFS
4530
4531
4532fi
4533
4534EGREP="$ac_cv_path_EGREP"
4535if test -z "$EGREP"; then
4536 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4537echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4538 { (exit 1); exit 1; }; }
4539fi
4540
4541else
4542 ac_cv_path_EGREP=$EGREP
4543fi
4544
4545
4546 fi
8eeae1c9 4547fi
ca81d7a0
JD
4548{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4549echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4550 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4551
4552
4553
ca81d7a0
JD
4554{ echo "$as_me:$LINENO: checking for AIX" >&5
4555echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4556cat >conftest.$ac_ext <<_ACEOF
4557/* confdefs.h. */
4558_ACEOF
4559cat confdefs.h >>conftest.$ac_ext
4560cat >>conftest.$ac_ext <<_ACEOF
4561/* end confdefs.h. */
4562#ifdef _AIX
4563 yes
4564#endif
4565
4566_ACEOF
4567if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4568 $EGREP "yes" >/dev/null 2>&1; then
ca81d7a0
JD
4569 { echo "$as_me:$LINENO: result: yes" >&5
4570echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4571cat >>confdefs.h <<\_ACEOF
4572#define _ALL_SOURCE 1
4573_ACEOF
4574
4575else
ca81d7a0
JD
4576 { echo "$as_me:$LINENO: result: no" >&5
4577echo "${ECHO_T}no" >&6; }
e143ad11
AS
4578fi
4579rm -f conftest*
4580
4581
4582
4583cat >>confdefs.h <<\_ACEOF
4584#define _GNU_SOURCE 1
4585_ACEOF
4586
4587
4588
01abe918 4589### Use -Wno-pointer-sign if the compiler supports it
ca81d7a0
JD
4590{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4591echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4592SAVE_CFLAGS="$CFLAGS"
4593CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4594cat >conftest.$ac_ext <<_ACEOF
4595/* confdefs.h. */
4596_ACEOF
4597cat confdefs.h >>conftest.$ac_ext
4598cat >>conftest.$ac_ext <<_ACEOF
4599/* end confdefs.h. */
4600
4601int
4602main ()
4603{
4604
4605 ;
4606 return 0;
4607}
4608_ACEOF
4609rm -f conftest.$ac_objext
ca81d7a0
JD
4610if { (ac_try="$ac_compile"
4611case "(($ac_try" in
4612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4613 *) ac_try_echo=$ac_try;;
4614esac
4615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4616 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4617 ac_status=$?
4618 grep -v '^ *+' conftest.er1 >conftest.err
4619 rm -f conftest.er1
4620 cat conftest.err >&5
4621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4622 (exit $ac_status); } && {
4623 test -z "$ac_c_werror_flag" ||
4624 test ! -s conftest.err
4625 } && test -s conftest.$ac_objext; then
01abe918
CY
4626 has_option=yes
4627else
4628 echo "$as_me: failed program was:" >&5
4629sed 's/^/| /' conftest.$ac_ext >&5
4630
ca81d7a0 4631 has_option=no
01abe918 4632fi
ca81d7a0
JD
4633
4634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4635if test $has_option = yes; then
4636 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4637fi
ca81d7a0
JD
4638{ echo "$as_me:$LINENO: result: $has_option" >&5
4639echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4640CFLAGS="$SAVE_CFLAGS"
4641unset has_option
4642unset SAVE_CFLAGS
4643
6a3a24fa 4644#### Some other nice autoconf tests.
ba4481b5 4645
ca81d7a0
JD
4646{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4647echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4648LN_S=$as_ln_s
4649if test "$LN_S" = "ln -s"; then
ca81d7a0
JD
4650 { echo "$as_me:$LINENO: result: yes" >&5
4651echo "${ECHO_T}yes" >&6; }
ba4481b5 4652else
ca81d7a0
JD
4653 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4654echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4655fi
4656
503d2be0
AS
4657ac_ext=c
4658ac_cpp='$CPP $CPPFLAGS'
4659ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4660ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4661ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4662{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4663echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4664# On Suns, sometimes $CPP names a directory.
4665if test -n "$CPP" && test -d "$CPP"; then
4666 CPP=
4667fi
4668if test -z "$CPP"; then
503d2be0
AS
4669 if test "${ac_cv_prog_CPP+set}" = set; then
4670 echo $ECHO_N "(cached) $ECHO_C" >&6
4671else
4672 # Double quotes because CPP needs to be expanded
4673 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4674 do
4675 ac_preproc_ok=false
4676for ac_c_preproc_warn_flag in '' yes
4677do
4678 # Use a header file that comes with gcc, so configuring glibc
4679 # with a fresh cross-compiler works.
19650fd6
AS
4680 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4681 # <limits.h> exists even on freestanding compilers.
ba4481b5 4682 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4683 # not just through cpp. "Syntax error" is here to catch this case.
4684 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4685/* confdefs.h. */
4686_ACEOF
4687cat confdefs.h >>conftest.$ac_ext
4688cat >>conftest.$ac_ext <<_ACEOF
4689/* end confdefs.h. */
4690#ifdef __STDC__
4691# include <limits.h>
4692#else
4693# include <assert.h>
4694#endif
edfaf76d 4695 Syntax error
503d2be0 4696_ACEOF
ca81d7a0
JD
4697if { (ac_try="$ac_cpp conftest.$ac_ext"
4698case "(($ac_try" in
4699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4700 *) ac_try_echo=$ac_try;;
4701esac
4702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4703 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4704 ac_status=$?
6bae0ccf 4705 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4706 rm -f conftest.er1
4707 cat conftest.err >&5
c0d27fcc 4708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4709 (exit $ac_status); } >/dev/null && {
4710 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4711 test ! -s conftest.err
4712 }; then
ba4481b5
DL
4713 :
4714else
503d2be0 4715 echo "$as_me: failed program was:" >&5
19650fd6
AS
4716sed 's/^/| /' conftest.$ac_ext >&5
4717
503d2be0
AS
4718 # Broken: fails on valid input.
4719continue
4720fi
ca81d7a0 4721
503d2be0
AS
4722rm -f conftest.err conftest.$ac_ext
4723
ca81d7a0 4724 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4725 # can be detected and how.
4726 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4727/* confdefs.h. */
4728_ACEOF
4729cat confdefs.h >>conftest.$ac_ext
4730cat >>conftest.$ac_ext <<_ACEOF
4731/* end confdefs.h. */
503d2be0
AS
4732#include <ac_nonexistent.h>
4733_ACEOF
ca81d7a0
JD
4734if { (ac_try="$ac_cpp conftest.$ac_ext"
4735case "(($ac_try" in
4736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4737 *) ac_try_echo=$ac_try;;
4738esac
4739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4740 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4741 ac_status=$?
6bae0ccf 4742 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4743 rm -f conftest.er1
4744 cat conftest.err >&5
c0d27fcc 4745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4746 (exit $ac_status); } >/dev/null && {
4747 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4748 test ! -s conftest.err
4749 }; then
503d2be0
AS
4750 # Broken: success on invalid input.
4751continue
c4bb2108 4752else
503d2be0 4753 echo "$as_me: failed program was:" >&5
19650fd6
AS
4754sed 's/^/| /' conftest.$ac_ext >&5
4755
503d2be0
AS
4756 # Passes both tests.
4757ac_preproc_ok=:
4758break
4759fi
ca81d7a0 4760
503d2be0
AS
4761rm -f conftest.err conftest.$ac_ext
4762
4763done
4764# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4765rm -f conftest.err conftest.$ac_ext
4766if $ac_preproc_ok; then
4767 break
4768fi
4769
4770 done
4771 ac_cv_prog_CPP=$CPP
4772
4773fi
4774 CPP=$ac_cv_prog_CPP
4775else
4776 ac_cv_prog_CPP=$CPP
4777fi
ca81d7a0
JD
4778{ echo "$as_me:$LINENO: result: $CPP" >&5
4779echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4780ac_preproc_ok=false
4781for ac_c_preproc_warn_flag in '' yes
4782do
4783 # Use a header file that comes with gcc, so configuring glibc
4784 # with a fresh cross-compiler works.
19650fd6
AS
4785 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4786 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4787 # On the NeXT, cc -E runs the code through the compiler's parser,
4788 # not just through cpp. "Syntax error" is here to catch this case.
4789 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4790/* confdefs.h. */
4791_ACEOF
4792cat confdefs.h >>conftest.$ac_ext
4793cat >>conftest.$ac_ext <<_ACEOF
4794/* end confdefs.h. */
4795#ifdef __STDC__
4796# include <limits.h>
4797#else
4798# include <assert.h>
4799#endif
edfaf76d 4800 Syntax error
503d2be0 4801_ACEOF
ca81d7a0
JD
4802if { (ac_try="$ac_cpp conftest.$ac_ext"
4803case "(($ac_try" in
4804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4805 *) ac_try_echo=$ac_try;;
4806esac
4807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4808 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4809 ac_status=$?
6bae0ccf 4810 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4811 rm -f conftest.er1
4812 cat conftest.err >&5
c0d27fcc 4813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4814 (exit $ac_status); } >/dev/null && {
4815 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4816 test ! -s conftest.err
4817 }; then
ba4481b5
DL
4818 :
4819else
503d2be0 4820 echo "$as_me: failed program was:" >&5
19650fd6
AS
4821sed 's/^/| /' conftest.$ac_ext >&5
4822
503d2be0
AS
4823 # Broken: fails on valid input.
4824continue
4825fi
ca81d7a0 4826
503d2be0
AS
4827rm -f conftest.err conftest.$ac_ext
4828
ca81d7a0 4829 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4830 # can be detected and how.
4831 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4832/* confdefs.h. */
4833_ACEOF
4834cat confdefs.h >>conftest.$ac_ext
4835cat >>conftest.$ac_ext <<_ACEOF
4836/* end confdefs.h. */
503d2be0
AS
4837#include <ac_nonexistent.h>
4838_ACEOF
ca81d7a0
JD
4839if { (ac_try="$ac_cpp conftest.$ac_ext"
4840case "(($ac_try" in
4841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4842 *) ac_try_echo=$ac_try;;
4843esac
4844eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4845 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4846 ac_status=$?
6bae0ccf 4847 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4848 rm -f conftest.er1
4849 cat conftest.err >&5
c0d27fcc 4850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4851 (exit $ac_status); } >/dev/null && {
4852 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4853 test ! -s conftest.err
4854 }; then
503d2be0
AS
4855 # Broken: success on invalid input.
4856continue
4857else
4858 echo "$as_me: failed program was:" >&5
19650fd6
AS
4859sed 's/^/| /' conftest.$ac_ext >&5
4860
503d2be0
AS
4861 # Passes both tests.
4862ac_preproc_ok=:
4863break
ba4481b5 4864fi
ca81d7a0 4865
503d2be0
AS
4866rm -f conftest.err conftest.$ac_ext
4867
4868done
4869# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4870rm -f conftest.err conftest.$ac_ext
4871if $ac_preproc_ok; then
4872 :
ba4481b5 4873else
19650fd6
AS
4874 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4875See \`config.log' for more details." >&5
4876echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4877See \`config.log' for more details." >&2;}
503d2be0 4878 { (exit 1); exit 1; }; }
ba4481b5 4879fi
503d2be0
AS
4880
4881ac_ext=c
4882ac_cpp='$CPP $CPPFLAGS'
4883ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4884ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4885ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4886
4887# Find a good install program. We prefer a C program (faster),
4888# so one script is as good as another. But avoid the broken or
4889# incompatible versions:
4890# SysV /etc/install, /usr/sbin/install
4891# SunOS /usr/etc/install
4892# IRIX /sbin/install
4893# AIX /bin/install
503d2be0 4894# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4895# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4896# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4897# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4898# OS/2's system install, which has a completely different semantic
ba4481b5 4899# ./install, which can be erroneously created by make from ./install.sh.
ca81d7a0
JD
4900{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4901echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 4902if test -z "$INSTALL"; then
503d2be0
AS
4903if test "${ac_cv_path_install+set}" = set; then
4904 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4905else
c0d27fcc
MR
4906 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4907for as_dir in $PATH
4908do
4909 IFS=$as_save_IFS
4910 test -z "$as_dir" && as_dir=.
4911 # Account for people who put trailing slashes in PATH elements.
4912case $as_dir/ in
4913 ./ | .// | /cC/* | \
4914 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4915 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4916 /usr/ucb/* ) ;;
4917 *)
4918 # OSF1 and SCO ODT 3.0 have their own names for install.
4919 # Don't use installbsd from OSF since it installs stuff as root
4920 # by default.
4921 for ac_prog in ginstall scoinst install; do
4922 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4923 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4924 if test $ac_prog = install &&
4925 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4926 # AIX install. It has an incompatible calling convention.
4927 :
4928 elif test $ac_prog = install &&
4929 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4930 # program-specific install script used by HP pwplus--don't use.
4931 :
4932 else
4933 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4934 break 3
4935 fi
4936 fi
ba4481b5 4937 done
c0d27fcc
MR
4938 done
4939 ;;
4940esac
4941done
ca81d7a0 4942IFS=$as_save_IFS
c0d27fcc 4943
ba4481b5
DL
4944
4945fi
4946 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4947 INSTALL=$ac_cv_path_install
ba4481b5 4948 else
ca81d7a0
JD
4949 # As a last resort, use the slow shell script. Don't cache a
4950 # value for INSTALL within a source directory, because that will
ba4481b5 4951 # break other packages using the cache if that directory is
ca81d7a0 4952 # removed, or if the value is a relative name.
503d2be0 4953 INSTALL=$ac_install_sh
ba4481b5
DL
4954 fi
4955fi
ca81d7a0
JD
4956{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4957echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
4958
4959# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4960# It thinks the first close brace ends the variable substitution.
4961test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4962
503d2be0 4963test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 4964
ba4481b5
DL
4965test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4966
c0d27fcc
MR
4967if test "x$RANLIB" = x; then
4968 if test -n "$ac_tool_prefix"; then
4969 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4970set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ca81d7a0
JD
4971{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4972echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 4973if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 4974 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
4975else
4976 if test -n "$RANLIB"; then
4977 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4978else
c0d27fcc
MR
4979as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4980for as_dir in $PATH
4981do
4982 IFS=$as_save_IFS
4983 test -z "$as_dir" && as_dir=.
4984 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4985 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
4986 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4987 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4988 break 2
4989 fi
4990done
503d2be0 4991done
ca81d7a0 4992IFS=$as_save_IFS
503d2be0 4993
7397acc4
DL
4994fi
4995fi
503d2be0 4996RANLIB=$ac_cv_prog_RANLIB
7397acc4 4997if test -n "$RANLIB"; then
ca81d7a0
JD
4998 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4999echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5000else
ca81d7a0
JD
5001 { echo "$as_me:$LINENO: result: no" >&5
5002echo "${ECHO_T}no" >&6; }
503d2be0
AS
5003fi
5004
ca81d7a0 5005
503d2be0
AS
5006fi
5007if test -z "$ac_cv_prog_RANLIB"; then
5008 ac_ct_RANLIB=$RANLIB
5009 # Extract the first word of "ranlib", so it can be a program name with args.
5010set dummy ranlib; ac_word=$2
ca81d7a0
JD
5011{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5012echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5013if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5014 echo $ECHO_N "(cached) $ECHO_C" >&6
5015else
5016 if test -n "$ac_ct_RANLIB"; then
5017 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5018else
c0d27fcc
MR
5019as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5020for as_dir in $PATH
5021do
5022 IFS=$as_save_IFS
5023 test -z "$as_dir" && as_dir=.
5024 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5025 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5026 ac_cv_prog_ac_ct_RANLIB="ranlib"
5027 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5028 break 2
5029 fi
5030done
503d2be0 5031done
ca81d7a0 5032IFS=$as_save_IFS
503d2be0 5033
503d2be0
AS
5034fi
5035fi
5036ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5037if test -n "$ac_ct_RANLIB"; then
ca81d7a0
JD
5038 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5039echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5040else
ca81d7a0
JD
5041 { echo "$as_me:$LINENO: result: no" >&5
5042echo "${ECHO_T}no" >&6; }
503d2be0
AS
5043fi
5044
ca81d7a0
JD
5045 if test "x$ac_ct_RANLIB" = x; then
5046 RANLIB=":"
5047 else
5048 case $cross_compiling:$ac_tool_warned in
5049yes:)
5050{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5051whose name does not start with the host triplet. If you think this
5052configuration is useful to you, please write to autoconf@gnu.org." >&5
5053echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5054whose name does not start with the host triplet. If you think this
5055configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5056ac_tool_warned=yes ;;
5057esac
5058 RANLIB=$ac_ct_RANLIB
5059 fi
7397acc4 5060else
503d2be0 5061 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5062fi
5063
5064fi
9e71690e
DK
5065# Extract the first word of "install-info", so it can be a program name with args.
5066set dummy install-info; ac_word=$2
ca81d7a0
JD
5067{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5068echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5069if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5070 echo $ECHO_N "(cached) $ECHO_C" >&6
5071else
5072 case $INSTALL_INFO in
5073 [\\/]* | ?:[\\/]*)
5074 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5075 ;;
5076 *)
5077 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080 IFS=$as_save_IFS
5081 test -z "$as_dir" && as_dir=.
5082 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5083 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5084 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5085 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5086 break 2
5087 fi
5088done
5089done
ca81d7a0 5090IFS=$as_save_IFS
9e71690e
DK
5091
5092 ;;
5093esac
5094fi
5095INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5096if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5097 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5098echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5099else
ca81d7a0
JD
5100 { echo "$as_me:$LINENO: result: no" >&5
5101echo "${ECHO_T}no" >&6; }
9e71690e
DK
5102fi
5103
ca81d7a0 5104
9e71690e
DK
5105# Extract the first word of "install-info", so it can be a program name with args.
5106set dummy install-info; ac_word=$2
ca81d7a0
JD
5107{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5108echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5109if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5110 echo $ECHO_N "(cached) $ECHO_C" >&6
5111else
5112 case $INSTALL_INFO in
5113 [\\/]* | ?:[\\/]*)
5114 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5115 ;;
5116 *)
5117 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5118for as_dir in /usr/sbin
5119do
5120 IFS=$as_save_IFS
5121 test -z "$as_dir" && as_dir=.
5122 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5123 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5124 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5125 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5126 break 2
5127 fi
5128done
5129done
ca81d7a0 5130IFS=$as_save_IFS
9e71690e
DK
5131
5132 ;;
5133esac
5134fi
5135INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5136if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5137 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5138echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5139else
ca81d7a0
JD
5140 { echo "$as_me:$LINENO: result: no" >&5
5141echo "${ECHO_T}no" >&6; }
9e71690e
DK
5142fi
5143
ca81d7a0 5144
9e71690e
DK
5145# Extract the first word of "install-info", so it can be a program name with args.
5146set dummy install-info; ac_word=$2
ca81d7a0
JD
5147{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5148echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5149if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5150 echo $ECHO_N "(cached) $ECHO_C" >&6
5151else
5152 case $INSTALL_INFO in
5153 [\\/]* | ?:[\\/]*)
5154 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5155 ;;
5156 *)
5157 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5158for as_dir in /sbin
5159do
5160 IFS=$as_save_IFS
5161 test -z "$as_dir" && as_dir=.
5162 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5163 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5164 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5165 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5166 break 2
5167 fi
5168done
5169done
ca81d7a0 5170IFS=$as_save_IFS
9e71690e
DK
5171
5172 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5173 ;;
5174esac
5175fi
5176INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5177if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5178 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5179echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5180else
ca81d7a0
JD
5181 { echo "$as_me:$LINENO: result: no" >&5
5182echo "${ECHO_T}no" >&6; }
9e71690e
DK
5183fi
5184
ca81d7a0 5185
8ae52ca6
RF
5186# Extract the first word of "gzip", so it can be a program name with args.
5187set dummy gzip; ac_word=$2
ca81d7a0
JD
5188{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5189echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5190if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5191 echo $ECHO_N "(cached) $ECHO_C" >&6
5192else
46e35e9f 5193 case $GZIP_PROG in
8ae52ca6 5194 [\\/]* | ?:[\\/]*)
46e35e9f 5195 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5196 ;;
5197 *)
5198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5199for as_dir in $PATH
5200do
5201 IFS=$as_save_IFS
5202 test -z "$as_dir" && as_dir=.
5203 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5204 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5205 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5206 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5207 break 2
5208 fi
5209done
5210done
ca81d7a0 5211IFS=$as_save_IFS
8ae52ca6
RF
5212
5213 ;;
5214esac
5215fi
46e35e9f 5216GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5217if test -n "$GZIP_PROG"; then
ca81d7a0
JD
5218 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5219echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5220else
ca81d7a0
JD
5221 { echo "$as_me:$LINENO: result: no" >&5
5222echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5223fi
5224
ba4481b5 5225
c0d27fcc 5226
ca81d7a0 5227
8e967cf7
MR
5228if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5229then
5230 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5231fi
5232
5233if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5234then
5235 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5236fi
5237
c0d27fcc 5238
fe239f0f 5239late_LDFLAGS=$LDFLAGS
4af002d6 5240if test "$GCC" = yes; then
fe239f0f
AS
5241 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5242else
5243 LDFLAGS="$LDFLAGS -znocombreloc"
5244fi
5245
ca81d7a0
JD
5246{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5247echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5248cat >conftest.$ac_ext <<_ACEOF
5249main(){return 0;}
5250_ACEOF
5251rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5252if { (ac_try="$ac_link"
5253case "(($ac_try" in
5254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5255 *) ac_try_echo=$ac_try;;
5256esac
5257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5258 (eval "$ac_link") 2>conftest.er1
fe239f0f 5259 ac_status=$?
edfaf76d
LK
5260 grep -v '^ *+' conftest.er1 >conftest.err
5261 rm -f conftest.er1
5262 cat conftest.err >&5
fe239f0f 5263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5264 (exit $ac_status); } && {
5265 test -z "$ac_c_werror_flag" ||
5266 test ! -s conftest.err
5267 } && test -s conftest$ac_exeext &&
5268 $as_test_x conftest$ac_exeext; then
ca81d7a0
JD
5269 { echo "$as_me:$LINENO: result: yes" >&5
5270echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5271else
5272 echo "$as_me: failed program was:" >&5
5273sed 's/^/| /' conftest.$ac_ext >&5
5274
ca81d7a0
JD
5275 LDFLAGS=$late_LDFLAGS
5276 { echo "$as_me:$LINENO: result: no" >&5
5277echo "${ECHO_T}no" >&6; }
fe239f0f 5278fi
ca81d7a0 5279
f053c89f 5280rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5281 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5282
3b33a005
DL
5283#### Extract some information from the operating system and machine files.
5284
c0d27fcc 5285{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5286 - which libraries the lib-src programs will want, and
503d2be0
AS
5287 - whether the GNU malloc routines are usable..." >&5
5288echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5289 - which libraries the lib-src programs will want, and
503d2be0 5290 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5291
5292### First figure out CFLAGS (which we use for running the compiler here)
5293### and REAL_CFLAGS (which we use for real compilation).
5294### The two are the same except on a few systems, where they are made
5295### different to work around various lossages. For example,
5296### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5297### as implying static linking.
5298
5299### If the CFLAGS env var is specified, we use that value
5300### instead of the default.
5301
5302### It's not important that this name contain the PID; you can't run
5303### two configures in the same directory and have anything work
5304### anyway.
5305tempcname="conftest.c"
5306
5307echo '
5308#include "'${srcdir}'/src/'${opsysfile}'"
5309#include "'${srcdir}'/src/'${machfile}'"
5310#ifndef LIBS_MACHINE
5311#define LIBS_MACHINE
5312#endif
5313#ifndef LIBS_SYSTEM
5314#define LIBS_SYSTEM
5315#endif
5316#ifndef C_SWITCH_SYSTEM
5317#define C_SWITCH_SYSTEM
5318#endif
5319#ifndef C_SWITCH_MACHINE
5320#define C_SWITCH_MACHINE
5321#endif
5322configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5323configure___ c_switch_system=C_SWITCH_SYSTEM
5324configure___ c_switch_machine=C_SWITCH_MACHINE
5325
5326#ifndef LIB_X11_LIB
5327#define LIB_X11_LIB -lX11
5328#endif
5329
5330#ifndef LIBX11_MACHINE
5331#define LIBX11_MACHINE
5332#endif
5333
5334#ifndef LIBX11_SYSTEM
5335#define LIBX11_SYSTEM
5336#endif
5337configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
5338
5339#ifdef UNEXEC
5340configure___ unexec=UNEXEC
5341#else
5342configure___ unexec=unexec.o
5343#endif
5344
5345#ifdef SYSTEM_MALLOC
5346configure___ system_malloc=yes
5347#else
5348configure___ system_malloc=no
5349#endif
5350
ef9e4345
GM
5351#ifdef USE_MMAP_FOR_BUFFERS
5352configure___ use_mmap_for_buffers=yes
73b77ee5 5353#else
ef9e4345 5354configure___ use_mmap_for_buffers=no
73b77ee5
GM
5355#endif
5356
3b33a005
DL
5357#ifndef C_DEBUG_SWITCH
5358#define C_DEBUG_SWITCH -g
5359#endif
5360
5361#ifndef C_OPTIMIZE_SWITCH
5362#ifdef __GNUC__
5363#define C_OPTIMIZE_SWITCH -O2
5364#else
5365#define C_OPTIMIZE_SWITCH -O
5366#endif
5367#endif
5368
01abe918
CY
5369#ifndef C_WARNINGS_SWITCH
5370#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5371#endif
5372
3b33a005
DL
5373#ifndef LD_SWITCH_MACHINE
5374#define LD_SWITCH_MACHINE
5375#endif
5376
5377#ifndef LD_SWITCH_SYSTEM
5378#define LD_SWITCH_SYSTEM
5379#endif
5380
5381#ifndef LD_SWITCH_X_SITE_AUX
5382#define LD_SWITCH_X_SITE_AUX
503d2be0 5383#endif
3b33a005
DL
5384
5385configure___ ld_switch_system=LD_SWITCH_SYSTEM
5386configure___ ld_switch_machine=LD_SWITCH_MACHINE
5387
5388#ifdef THIS_IS_CONFIGURE
5389
5390/* Get the CFLAGS for tests in configure. */
5391#ifdef __GNUC__
5392configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5393#else
5394configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5395#endif
5396
5397#else /* not THIS_IS_CONFIGURE */
5398
5399/* Get the CFLAGS for real compilation. */
5400#ifdef __GNUC__
01abe918 5401configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5402#else
5403configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5404#endif
5405
5406#endif /* not THIS_IS_CONFIGURE */
5407' > ${tempcname}
5408
5409# The value of CPP is a quoted variable reference, so we need to do this
5410# to get its actual value...
5411CPP=`eval "echo $CPP"`
5412eval `${CPP} -Isrc ${tempcname} \
5413 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5414if test "x$SPECIFIED_CFLAGS" = x; then
5415 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5416 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5417else
5418 REAL_CFLAGS="$CFLAGS"
5419fi
5420rm ${tempcname}
5421
5422ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5423
5424### Make sure subsequent tests use flags consistent with the build flags.
5425
5426if test x"${OVERRIDE_CPPFLAGS}" != x; then
5427 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5428else
5429 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5430fi
5431
6bae0ccf
DL
5432
5433
ca81d7a0 5434# Check whether --enable-largefile was given.
f4988be7 5435if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5436 enableval=$enable_largefile;
5437fi
f4988be7 5438
503d2be0 5439if test "$enable_largefile" != no; then
f4988be7 5440
ca81d7a0
JD
5441 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5442echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5443if test "${ac_cv_sys_largefile_CC+set}" = set; then
5444 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5445else
f4988be7 5446 ac_cv_sys_largefile_CC=no
503d2be0
AS
5447 if test "$GCC" != yes; then
5448 ac_save_CC=$CC
5449 while :; do
ca81d7a0
JD
5450 # IRIX 6.2 and later do not support large files by default,
5451 # so use the C compiler's -n32 option if that helps.
edfaf76d 5452 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5453/* confdefs.h. */
5454_ACEOF
5455cat confdefs.h >>conftest.$ac_ext
5456cat >>conftest.$ac_ext <<_ACEOF
5457/* end confdefs.h. */
f4988be7 5458#include <sys/types.h>
503d2be0
AS
5459 /* Check that off_t can represent 2**63 - 1 correctly.
5460 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5461 since some C++ compilers masquerading as C compilers
5462 incorrectly reject 9223372036854775807. */
5463#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5464 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5465 && LARGE_OFF_T % 2147483647 == 1)
5466 ? 1 : -1];
5467int
5468main ()
5469{
f4988be7 5470
503d2be0
AS
5471 ;
5472 return 0;
5473}
5474_ACEOF
ca81d7a0
JD
5475 rm -f conftest.$ac_objext
5476if { (ac_try="$ac_compile"
5477case "(($ac_try" in
5478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5479 *) ac_try_echo=$ac_try;;
5480esac
5481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5482 (eval "$ac_compile") 2>conftest.er1
503d2be0 5483 ac_status=$?
edfaf76d
LK
5484 grep -v '^ *+' conftest.er1 >conftest.err
5485 rm -f conftest.er1
5486 cat conftest.err >&5
c0d27fcc 5487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5488 (exit $ac_status); } && {
5489 test -z "$ac_c_werror_flag" ||
5490 test ! -s conftest.err
5491 } && test -s conftest.$ac_objext; then
503d2be0 5492 break
b192d653 5493else
503d2be0 5494 echo "$as_me: failed program was:" >&5
19650fd6
AS
5495sed 's/^/| /' conftest.$ac_ext >&5
5496
ca81d7a0 5497
503d2be0 5498fi
ca81d7a0
JD
5499
5500rm -f core conftest.err conftest.$ac_objext
5501 CC="$CC -n32"
5502 rm -f conftest.$ac_objext
5503if { (ac_try="$ac_compile"
5504case "(($ac_try" in
5505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5506 *) ac_try_echo=$ac_try;;
5507esac
5508eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5509 (eval "$ac_compile") 2>conftest.er1
503d2be0 5510 ac_status=$?
edfaf76d
LK
5511 grep -v '^ *+' conftest.er1 >conftest.err
5512 rm -f conftest.er1
5513 cat conftest.err >&5
c0d27fcc 5514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5515 (exit $ac_status); } && {
5516 test -z "$ac_c_werror_flag" ||
5517 test ! -s conftest.err
5518 } && test -s conftest.$ac_objext; then
503d2be0
AS
5519 ac_cv_sys_largefile_CC=' -n32'; break
5520else
5521 echo "$as_me: failed program was:" >&5
19650fd6
AS
5522sed 's/^/| /' conftest.$ac_ext >&5
5523
ca81d7a0 5524
503d2be0 5525fi
ca81d7a0
JD
5526
5527rm -f core conftest.err conftest.$ac_objext
edfaf76d 5528 break
503d2be0
AS
5529 done
5530 CC=$ac_save_CC
5531 rm -f conftest.$ac_ext
5532 fi
b192d653 5533fi
ca81d7a0
JD
5534{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5535echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5536 if test "$ac_cv_sys_largefile_CC" != no; then
5537 CC=$CC$ac_cv_sys_largefile_CC
5538 fi
b192d653 5539
ca81d7a0
JD
5540 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5541echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5542if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5543 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5544else
503d2be0 5545 while :; do
503d2be0 5546 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5547/* confdefs.h. */
5548_ACEOF
5549cat confdefs.h >>conftest.$ac_ext
5550cat >>conftest.$ac_ext <<_ACEOF
5551/* end confdefs.h. */
f4988be7 5552#include <sys/types.h>
503d2be0
AS
5553 /* Check that off_t can represent 2**63 - 1 correctly.
5554 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5555 since some C++ compilers masquerading as C compilers
5556 incorrectly reject 9223372036854775807. */
5557#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5558 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5559 && LARGE_OFF_T % 2147483647 == 1)
5560 ? 1 : -1];
5561int
5562main ()
5563{
f4988be7 5564
503d2be0
AS
5565 ;
5566 return 0;
5567}
5568_ACEOF
5569rm -f conftest.$ac_objext
ca81d7a0
JD
5570if { (ac_try="$ac_compile"
5571case "(($ac_try" in
5572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5573 *) ac_try_echo=$ac_try;;
5574esac
5575eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5576 (eval "$ac_compile") 2>conftest.er1
503d2be0 5577 ac_status=$?
edfaf76d
LK
5578 grep -v '^ *+' conftest.er1 >conftest.err
5579 rm -f conftest.er1
5580 cat conftest.err >&5
c0d27fcc 5581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5582 (exit $ac_status); } && {
5583 test -z "$ac_c_werror_flag" ||
5584 test ! -s conftest.err
5585 } && test -s conftest.$ac_objext; then
5586 ac_cv_sys_file_offset_bits=no; break
f4988be7 5587else
503d2be0 5588 echo "$as_me: failed program was:" >&5
19650fd6
AS
5589sed 's/^/| /' conftest.$ac_ext >&5
5590
ca81d7a0 5591
503d2be0 5592fi
ca81d7a0
JD
5593
5594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5595 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5596/* confdefs.h. */
5597_ACEOF
5598cat confdefs.h >>conftest.$ac_ext
5599cat >>conftest.$ac_ext <<_ACEOF
5600/* end confdefs.h. */
f4988be7
GM
5601#define _FILE_OFFSET_BITS 64
5602#include <sys/types.h>
503d2be0
AS
5603 /* Check that off_t can represent 2**63 - 1 correctly.
5604 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5605 since some C++ compilers masquerading as C compilers
5606 incorrectly reject 9223372036854775807. */
5607#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5608 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5609 && LARGE_OFF_T % 2147483647 == 1)
5610 ? 1 : -1];
5611int
5612main ()
5613{
5614
5615 ;
5616 return 0;
5617}
5618_ACEOF
5619rm -f conftest.$ac_objext
ca81d7a0
JD
5620if { (ac_try="$ac_compile"
5621case "(($ac_try" in
5622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5623 *) ac_try_echo=$ac_try;;
5624esac
5625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5626 (eval "$ac_compile") 2>conftest.er1
503d2be0 5627 ac_status=$?
edfaf76d
LK
5628 grep -v '^ *+' conftest.er1 >conftest.err
5629 rm -f conftest.er1
5630 cat conftest.err >&5
c0d27fcc 5631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5632 (exit $ac_status); } && {
5633 test -z "$ac_c_werror_flag" ||
5634 test ! -s conftest.err
5635 } && test -s conftest.$ac_objext; then
503d2be0
AS
5636 ac_cv_sys_file_offset_bits=64; break
5637else
5638 echo "$as_me: failed program was:" >&5
19650fd6
AS
5639sed 's/^/| /' conftest.$ac_ext >&5
5640
ca81d7a0 5641
503d2be0 5642fi
ca81d7a0
JD
5643
5644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5645 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5646 break
5647done
ba4481b5 5648fi
ca81d7a0
JD
5649{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5650echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5651case $ac_cv_sys_file_offset_bits in #(
5652 no | unknown) ;;
5653 *)
c0d27fcc 5654cat >>confdefs.h <<_ACEOF
f4988be7 5655#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5656_ACEOF
f053c89f
CY
5657;;
5658esac
503d2be0 5659rm -f conftest*
f053c89f
CY
5660 if test $ac_cv_sys_file_offset_bits = unknown; then
5661 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
ca81d7a0 5662echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5663if test "${ac_cv_sys_large_files+set}" = set; then
5664 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5665else
503d2be0 5666 while :; do
503d2be0 5667 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5668/* confdefs.h. */
5669_ACEOF
5670cat confdefs.h >>conftest.$ac_ext
5671cat >>conftest.$ac_ext <<_ACEOF
5672/* end confdefs.h. */
503d2be0
AS
5673#include <sys/types.h>
5674 /* Check that off_t can represent 2**63 - 1 correctly.
5675 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5676 since some C++ compilers masquerading as C compilers
5677 incorrectly reject 9223372036854775807. */
5678#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5679 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5680 && LARGE_OFF_T % 2147483647 == 1)
5681 ? 1 : -1];
5682int
5683main ()
5684{
ba4481b5 5685
503d2be0
AS
5686 ;
5687 return 0;
5688}
5689_ACEOF
5690rm -f conftest.$ac_objext
ca81d7a0
JD
5691if { (ac_try="$ac_compile"
5692case "(($ac_try" in
5693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5694 *) ac_try_echo=$ac_try;;
5695esac
5696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5697 (eval "$ac_compile") 2>conftest.er1
503d2be0 5698 ac_status=$?
edfaf76d
LK
5699 grep -v '^ *+' conftest.er1 >conftest.err
5700 rm -f conftest.er1
5701 cat conftest.err >&5
c0d27fcc 5702 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5703 (exit $ac_status); } && {
5704 test -z "$ac_c_werror_flag" ||
5705 test ! -s conftest.err
5706 } && test -s conftest.$ac_objext; then
5707 ac_cv_sys_large_files=no; break
ba4481b5 5708else
503d2be0 5709 echo "$as_me: failed program was:" >&5
19650fd6
AS
5710sed 's/^/| /' conftest.$ac_ext >&5
5711
ca81d7a0 5712
503d2be0 5713fi
ca81d7a0
JD
5714
5715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5716 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5717/* confdefs.h. */
5718_ACEOF
5719cat confdefs.h >>conftest.$ac_ext
5720cat >>conftest.$ac_ext <<_ACEOF
5721/* end confdefs.h. */
f4988be7 5722#define _LARGE_FILES 1
503d2be0
AS
5723#include <sys/types.h>
5724 /* Check that off_t can represent 2**63 - 1 correctly.
5725 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5726 since some C++ compilers masquerading as C compilers
5727 incorrectly reject 9223372036854775807. */
5728#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5729 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5730 && LARGE_OFF_T % 2147483647 == 1)
5731 ? 1 : -1];
5732int
5733main ()
5734{
f4988be7 5735
503d2be0
AS
5736 ;
5737 return 0;
5738}
5739_ACEOF
5740rm -f conftest.$ac_objext
ca81d7a0
JD
5741if { (ac_try="$ac_compile"
5742case "(($ac_try" in
5743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5744 *) ac_try_echo=$ac_try;;
5745esac
5746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5747 (eval "$ac_compile") 2>conftest.er1
503d2be0 5748 ac_status=$?
edfaf76d
LK
5749 grep -v '^ *+' conftest.er1 >conftest.err
5750 rm -f conftest.er1
5751 cat conftest.err >&5
c0d27fcc 5752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5753 (exit $ac_status); } && {
5754 test -z "$ac_c_werror_flag" ||
5755 test ! -s conftest.err
5756 } && test -s conftest.$ac_objext; then
503d2be0
AS
5757 ac_cv_sys_large_files=1; break
5758else
5759 echo "$as_me: failed program was:" >&5
19650fd6
AS
5760sed 's/^/| /' conftest.$ac_ext >&5
5761
ca81d7a0 5762
503d2be0 5763fi
ca81d7a0
JD
5764
5765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5766 ac_cv_sys_large_files=unknown
503d2be0
AS
5767 break
5768done
ba4481b5 5769fi
ca81d7a0
JD
5770{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5771echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5772case $ac_cv_sys_large_files in #(
5773 no | unknown) ;;
5774 *)
c0d27fcc 5775cat >>confdefs.h <<_ACEOF
f4988be7 5776#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5777_ACEOF
f053c89f
CY
5778;;
5779esac
503d2be0 5780rm -f conftest*
f053c89f 5781 fi
503d2be0 5782fi
ba4481b5 5783
c0d27fcc 5784
439f58ee 5785
bc5d9888
CY
5786### The standard library on x86-64 GNU/Linux distributions can
5787### be located in either /usr/lib64 or /usr/lib.
5788case "${canonical}" in
5789 x86_64-*-linux-gnu* )
5790 if test -d /usr/lib64; then
5791
5792cat >>confdefs.h <<\_ACEOF
5793#define HAVE_X86_64_LIB64_DIR 1
5794_ACEOF
5795
5796fi
5797esac
5798
439f58ee
JD
5799
5800
5801
2c9dccc9
PJ
5802if test "${with_sound}" != "no"; then
5803 # Sound support for GNU/Linux and the free BSDs.
ca81d7a0
JD
5804 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5805echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
c0d27fcc
MR
5806if test "${ac_cv_header_stdc+set}" = set; then
5807 echo $ECHO_N "(cached) $ECHO_C" >&6
5808else
5809 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5810/* confdefs.h. */
5811_ACEOF
5812cat confdefs.h >>conftest.$ac_ext
5813cat >>conftest.$ac_ext <<_ACEOF
5814/* end confdefs.h. */
c0d27fcc
MR
5815#include <stdlib.h>
5816#include <stdarg.h>
5817#include <string.h>
5818#include <float.h>
98418dba 5819
19650fd6
AS
5820int
5821main ()
5822{
5823
5824 ;
5825 return 0;
5826}
c0d27fcc 5827_ACEOF
19650fd6 5828rm -f conftest.$ac_objext
ca81d7a0
JD
5829if { (ac_try="$ac_compile"
5830case "(($ac_try" in
5831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5832 *) ac_try_echo=$ac_try;;
5833esac
5834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5835 (eval "$ac_compile") 2>conftest.er1
cd958eb3 5836 ac_status=$?
edfaf76d
LK
5837 grep -v '^ *+' conftest.er1 >conftest.err
5838 rm -f conftest.er1
5839 cat conftest.err >&5
cd958eb3 5840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5841 (exit $ac_status); } && {
5842 test -z "$ac_c_werror_flag" ||
5843 test ! -s conftest.err
5844 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5845 ac_cv_header_stdc=yes
5846else
5847 echo "$as_me: failed program was:" >&5
19650fd6
AS
5848sed 's/^/| /' conftest.$ac_ext >&5
5849
ca81d7a0 5850 ac_cv_header_stdc=no
c0d27fcc 5851fi
ca81d7a0
JD
5852
5853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5854
5855if test $ac_cv_header_stdc = yes; then
5856 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5857 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5858/* confdefs.h. */
5859_ACEOF
5860cat confdefs.h >>conftest.$ac_ext
5861cat >>conftest.$ac_ext <<_ACEOF
5862/* end confdefs.h. */
c0d27fcc
MR
5863#include <string.h>
5864
5865_ACEOF
5866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5867 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
5868 :
5869else
5870 ac_cv_header_stdc=no
5871fi
5872rm -f conftest*
5873
5874fi
5875
5876if test $ac_cv_header_stdc = yes; then
5877 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5878 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5879/* confdefs.h. */
5880_ACEOF
5881cat confdefs.h >>conftest.$ac_ext
5882cat >>conftest.$ac_ext <<_ACEOF
5883/* end confdefs.h. */
c0d27fcc
MR
5884#include <stdlib.h>
5885
5886_ACEOF
5887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5888 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
5889 :
5890else
5891 ac_cv_header_stdc=no
5892fi
5893rm -f conftest*
5894
5895fi
5896
5897if test $ac_cv_header_stdc = yes; then
5898 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5899 if test "$cross_compiling" = yes; then
5900 :
5901else
5902 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5903/* confdefs.h. */
5904_ACEOF
5905cat confdefs.h >>conftest.$ac_ext
5906cat >>conftest.$ac_ext <<_ACEOF
5907/* end confdefs.h. */
c0d27fcc 5908#include <ctype.h>
ca81d7a0 5909#include <stdlib.h>
c0d27fcc
MR
5910#if ((' ' & 0x0FF) == 0x020)
5911# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5912# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5913#else
19650fd6 5914# define ISLOWER(c) \
edfaf76d
LK
5915 (('a' <= (c) && (c) <= 'i') \
5916 || ('j' <= (c) && (c) <= 'r') \
5917 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
5918# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5919#endif
5920
5921#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5922int
5923main ()
5924{
5925 int i;
5926 for (i = 0; i < 256; i++)
5927 if (XOR (islower (i), ISLOWER (i))
edfaf76d 5928 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
5929 return 2;
5930 return 0;
c0d27fcc
MR
5931}
5932_ACEOF
5933rm -f conftest$ac_exeext
ca81d7a0
JD
5934if { (ac_try="$ac_link"
5935case "(($ac_try" in
5936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5937 *) ac_try_echo=$ac_try;;
5938esac
5939eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5940 (eval "$ac_link") 2>&5
c0d27fcc
MR
5941 ac_status=$?
5942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5943 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
5944 { (case "(($ac_try" in
5945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5946 *) ac_try_echo=$ac_try;;
5947esac
5948eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5949 (eval "$ac_try") 2>&5
c0d27fcc
MR
5950 ac_status=$?
5951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5952 (exit $ac_status); }; }; then
5953 :
5954else
5955 echo "$as_me: program exited with status $ac_status" >&5
5956echo "$as_me: failed program was:" >&5
19650fd6
AS
5957sed 's/^/| /' conftest.$ac_ext >&5
5958
c0d27fcc
MR
5959( exit $ac_status )
5960ac_cv_header_stdc=no
5961fi
ca81d7a0 5962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc 5963fi
ca81d7a0
JD
5964
5965
c0d27fcc
MR
5966fi
5967fi
ca81d7a0
JD
5968{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5969echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
c0d27fcc
MR
5970if test $ac_cv_header_stdc = yes; then
5971
5972cat >>confdefs.h <<\_ACEOF
5973#define STDC_HEADERS 1
5974_ACEOF
5975
5976fi
5977
5978# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 5989 inttypes.h stdint.h unistd.h
98418dba
CW
5990do
5991as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
5992{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5993echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5994if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 5995 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5996else
925c2f3f 5997 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5998/* confdefs.h. */
5999_ACEOF
6000cat confdefs.h >>conftest.$ac_ext
6001cat >>conftest.$ac_ext <<_ACEOF
6002/* end confdefs.h. */
c0d27fcc
MR
6003$ac_includes_default
6004
6005#include <$ac_header>
6006_ACEOF
6007rm -f conftest.$ac_objext
ca81d7a0
JD
6008if { (ac_try="$ac_compile"
6009case "(($ac_try" in
6010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6011 *) ac_try_echo=$ac_try;;
6012esac
6013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6014 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6015 ac_status=$?
edfaf76d
LK
6016 grep -v '^ *+' conftest.er1 >conftest.err
6017 rm -f conftest.er1
6018 cat conftest.err >&5
c0d27fcc 6019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6020 (exit $ac_status); } && {
6021 test -z "$ac_c_werror_flag" ||
6022 test ! -s conftest.err
6023 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6024 eval "$as_ac_Header=yes"
6025else
6026 echo "$as_me: failed program was:" >&5
19650fd6
AS
6027sed 's/^/| /' conftest.$ac_ext >&5
6028
ca81d7a0 6029 eval "$as_ac_Header=no"
c0d27fcc 6030fi
ca81d7a0
JD
6031
6032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6033fi
ca81d7a0
JD
6034ac_res=`eval echo '${'$as_ac_Header'}'`
6035 { echo "$as_me:$LINENO: result: $ac_res" >&5
6036echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6037if test `eval echo '${'$as_ac_Header'}'` = yes; then
6038 cat >>confdefs.h <<_ACEOF
6039#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6040_ACEOF
6041
6042fi
6043
6044done
6045
6046
6047
6048
6049
6050for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
6051do
6052as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6053if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6054 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6055echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6056if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6057 echo $ECHO_N "(cached) $ECHO_C" >&6
6058fi
ca81d7a0
JD
6059ac_res=`eval echo '${'$as_ac_Header'}'`
6060 { echo "$as_me:$LINENO: result: $ac_res" >&5
6061echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6062else
6063 # Is the header compilable?
ca81d7a0
JD
6064{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6065echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6066cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6067/* confdefs.h. */
6068_ACEOF
6069cat confdefs.h >>conftest.$ac_ext
6070cat >>conftest.$ac_ext <<_ACEOF
6071/* end confdefs.h. */
c0d27fcc 6072$ac_includes_default
98418dba 6073#include <$ac_header>
503d2be0 6074_ACEOF
c0d27fcc 6075rm -f conftest.$ac_objext
ca81d7a0
JD
6076if { (ac_try="$ac_compile"
6077case "(($ac_try" in
6078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6079 *) ac_try_echo=$ac_try;;
6080esac
6081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6082 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6083 ac_status=$?
edfaf76d
LK
6084 grep -v '^ *+' conftest.er1 >conftest.err
6085 rm -f conftest.er1
6086 cat conftest.err >&5
c0d27fcc 6087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6088 (exit $ac_status); } && {
6089 test -z "$ac_c_werror_flag" ||
6090 test ! -s conftest.err
6091 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6092 ac_header_compiler=yes
6093else
6094 echo "$as_me: failed program was:" >&5
19650fd6
AS
6095sed 's/^/| /' conftest.$ac_ext >&5
6096
ca81d7a0 6097 ac_header_compiler=no
c0d27fcc 6098fi
ca81d7a0
JD
6099
6100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6101{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6102echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6103
6104# Is the header present?
ca81d7a0
JD
6105{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6106echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6107cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6108/* confdefs.h. */
6109_ACEOF
6110cat confdefs.h >>conftest.$ac_ext
6111cat >>conftest.$ac_ext <<_ACEOF
6112/* end confdefs.h. */
c0d27fcc
MR
6113#include <$ac_header>
6114_ACEOF
ca81d7a0
JD
6115if { (ac_try="$ac_cpp conftest.$ac_ext"
6116case "(($ac_try" in
6117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6118 *) ac_try_echo=$ac_try;;
6119esac
6120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6121 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6122 ac_status=$?
6bae0ccf 6123 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6124 rm -f conftest.er1
6125 cat conftest.err >&5
c0d27fcc 6126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6127 (exit $ac_status); } >/dev/null && {
6128 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6129 test ! -s conftest.err
6130 }; then
c0d27fcc 6131 ac_header_preproc=yes
f4988be7 6132else
503d2be0 6133 echo "$as_me: failed program was:" >&5
19650fd6
AS
6134sed 's/^/| /' conftest.$ac_ext >&5
6135
c0d27fcc 6136 ac_header_preproc=no
f4988be7 6137fi
ca81d7a0 6138
98418dba 6139rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6140{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6141echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6142
6143# So? What about this header?
edfaf76d
LK
6144case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6145 yes:no: )
c0d27fcc
MR
6146 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6147echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6148 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6149echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6150 ac_header_preproc=yes
19650fd6 6151 ;;
edfaf76d 6152 no:yes:* )
c0d27fcc
MR
6153 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6154echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6155 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6156echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6157 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6158echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6159 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6160echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6161 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6162echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6163 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6164echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6165
19650fd6 6166 ;;
c0d27fcc 6167esac
ca81d7a0
JD
6168{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6169echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6170if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6171 echo $ECHO_N "(cached) $ECHO_C" >&6
6172else
edfaf76d 6173 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6174fi
ca81d7a0
JD
6175ac_res=`eval echo '${'$as_ac_Header'}'`
6176 { echo "$as_me:$LINENO: result: $ac_res" >&5
6177echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6178
6179fi
98418dba 6180if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6181 cat >>confdefs.h <<_ACEOF
98418dba 6182#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6183_ACEOF
f4988be7
GM
6184
6185fi
c0d27fcc 6186
98418dba
CW
6187done
6188
6189 # Emulation library used on NetBSD.
ca81d7a0
JD
6190 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6191echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6192if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6193 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6194else
98418dba
CW
6195 ac_check_lib_save_LIBS=$LIBS
6196LIBS="-lossaudio $LIBS"
6197cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6198/* confdefs.h. */
6199_ACEOF
6200cat confdefs.h >>conftest.$ac_ext
6201cat >>conftest.$ac_ext <<_ACEOF
6202/* end confdefs.h. */
98418dba 6203
ca81d7a0
JD
6204/* Override any GCC internal prototype to avoid an error.
6205 Use char because int might match the return type of a GCC
6206 builtin and then its argument prototype would still apply. */
98418dba
CW
6207#ifdef __cplusplus
6208extern "C"
f4988be7 6209#endif
98418dba 6210char _oss_ioctl ();
503d2be0
AS
6211int
6212main ()
6213{
ca81d7a0 6214return _oss_ioctl ();
503d2be0
AS
6215 ;
6216 return 0;
6217}
6218_ACEOF
98418dba 6219rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6220if { (ac_try="$ac_link"
6221case "(($ac_try" in
6222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6223 *) ac_try_echo=$ac_try;;
6224esac
6225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6226 (eval "$ac_link") 2>conftest.er1
503d2be0 6227 ac_status=$?
edfaf76d
LK
6228 grep -v '^ *+' conftest.er1 >conftest.err
6229 rm -f conftest.er1
6230 cat conftest.err >&5
c0d27fcc 6231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6232 (exit $ac_status); } && {
6233 test -z "$ac_c_werror_flag" ||
6234 test ! -s conftest.err
6235 } && test -s conftest$ac_exeext &&
6236 $as_test_x conftest$ac_exeext; then
98418dba 6237 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6238else
503d2be0 6239 echo "$as_me: failed program was:" >&5
19650fd6
AS
6240sed 's/^/| /' conftest.$ac_ext >&5
6241
ca81d7a0 6242 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6243fi
ca81d7a0 6244
f053c89f 6245rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6246 conftest$ac_exeext conftest.$ac_ext
98418dba 6247LIBS=$ac_check_lib_save_LIBS
f4988be7 6248fi
ca81d7a0
JD
6249{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6250echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6251if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6252 LIBSOUND=-lossaudio
6253else
6254 LIBSOUND=
6255fi
6256
c0d27fcc 6257
439f58ee
JD
6258
6259 ALSA_REQUIRED=1.0.0
6260 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
6261 if test "X${with_pkg_config_prog}" != X; then
6262 PKG_CONFIG="${with_pkg_config_prog}"
6263 fi
6264
6265 succeeded=no
6266
6267 if test -z "$PKG_CONFIG"; then
6268 # Extract the first word of "pkg-config", so it can be a program name with args.
6269set dummy pkg-config; ac_word=$2
ca81d7a0
JD
6270{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6271echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6272if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6273 echo $ECHO_N "(cached) $ECHO_C" >&6
6274else
6275 case $PKG_CONFIG in
6276 [\\/]* | ?:[\\/]*)
6277 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6278 ;;
6279 *)
6280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6281for as_dir in $PATH
6282do
6283 IFS=$as_save_IFS
6284 test -z "$as_dir" && as_dir=.
6285 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6286 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6287 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6288 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6289 break 2
6290 fi
6291done
6292done
ca81d7a0 6293IFS=$as_save_IFS
439f58ee
JD
6294
6295 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6296 ;;
6297esac
6298fi
6299PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6300if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
6301 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6302echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6303else
ca81d7a0
JD
6304 { echo "$as_me:$LINENO: result: no" >&5
6305echo "${ECHO_T}no" >&6; }
439f58ee
JD
6306fi
6307
ca81d7a0 6308
439f58ee
JD
6309 fi
6310
6311 if test "$PKG_CONFIG" = "no" ; then
6312 HAVE_ALSA=no
6313 else
6314 PKG_CONFIG_MIN_VERSION=0.9.0
6315 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
6316 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6317echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6318
67db6aa2 6319 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ca81d7a0
JD
6320 { echo "$as_me:$LINENO: result: yes" >&5
6321echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6322 succeeded=yes
6323
ca81d7a0
JD
6324 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6325echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
439f58ee 6326 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"`
ca81d7a0
JD
6327 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6328echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6329
ca81d7a0
JD
6330 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6331echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
439f58ee 6332 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"`
ca81d7a0
JD
6333 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6334echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6335 else
ca81d7a0
JD
6336 { echo "$as_me:$LINENO: result: no" >&5
6337echo "${ECHO_T}no" >&6; }
439f58ee
JD
6338 ALSA_CFLAGS=""
6339 ALSA_LIBS=""
6340 ## If we have a custom action on failure, don't print errors, but
6341 ## do set a variable so people can do so.
6342 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6343
6344 fi
6345
6346
6347
6348 else
6349 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6350 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6351 fi
6352 fi
6353
6354 if test $succeeded = yes; then
6355 HAVE_ALSA=yes
6356 else
6357 HAVE_ALSA=no
6358 fi
6359
6360 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6361 SAVE_CFLAGS="$CFLAGS"
6362 SAVE_LDFLAGS="$LDFLAGS"
6363 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6364 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6365 cat >conftest.$ac_ext <<_ACEOF
6366/* confdefs.h. */
6367_ACEOF
6368cat confdefs.h >>conftest.$ac_ext
6369cat >>conftest.$ac_ext <<_ACEOF
6370/* end confdefs.h. */
6371#include <asoundlib.h>
6372int
6373main ()
6374{
6375snd_lib_error_set_handler (0);
6376 ;
6377 return 0;
6378}
6379_ACEOF
6380rm -f conftest.$ac_objext
6381if { (ac_try="$ac_compile"
6382case "(($ac_try" in
6383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6384 *) ac_try_echo=$ac_try;;
6385esac
6386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6387 (eval "$ac_compile") 2>conftest.er1
6388 ac_status=$?
6389 grep -v '^ *+' conftest.er1 >conftest.err
6390 rm -f conftest.er1
6391 cat conftest.err >&5
6392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6393 (exit $ac_status); } && {
6394 test -z "$ac_c_werror_flag" ||
6395 test ! -s conftest.err
6396 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6397 emacs_alsa_normal=yes
6398else
6399 echo "$as_me: failed program was:" >&5
6400sed 's/^/| /' conftest.$ac_ext >&5
6401
6402 emacs_alsa_normal=no
6403fi
6404
6405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6406 if test "$emacs_alsa_normal" != yes; then
6407 cat >conftest.$ac_ext <<_ACEOF
6408/* confdefs.h. */
6409_ACEOF
6410cat confdefs.h >>conftest.$ac_ext
6411cat >>conftest.$ac_ext <<_ACEOF
6412/* end confdefs.h. */
6413#include <alsa/asoundlib.h>
6414int
6415main ()
6416{
6417snd_lib_error_set_handler (0);
6418 ;
6419 return 0;
6420}
6421_ACEOF
6422rm -f conftest.$ac_objext
6423if { (ac_try="$ac_compile"
6424case "(($ac_try" in
6425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6426 *) ac_try_echo=$ac_try;;
6427esac
6428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6429 (eval "$ac_compile") 2>conftest.er1
6430 ac_status=$?
6431 grep -v '^ *+' conftest.er1 >conftest.err
6432 rm -f conftest.er1
6433 cat conftest.err >&5
6434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6435 (exit $ac_status); } && {
6436 test -z "$ac_c_werror_flag" ||
6437 test ! -s conftest.err
6438 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6439 emacs_alsa_subdir=yes
6440else
6441 echo "$as_me: failed program was:" >&5
6442sed 's/^/| /' conftest.$ac_ext >&5
6443
6444 emacs_alsa_subdir=no
6445fi
6446
6447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6448 if test "$emacs_alsa_subdir" != yes; then
6449 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6450echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6451 { (exit 1); exit 1; }; }
6452 fi
6453 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6454 fi
6455
6456 CFLAGS="$SAVE_CFLAGS"
6457 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6458 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6459 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6460
6461cat >>confdefs.h <<\_ACEOF
6462#define HAVE_ALSA 1
6463_ACEOF
6464
ca81d7a0 6465
439f58ee
JD
6466 fi
6467
f4988be7 6468fi
c0d27fcc
MR
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
22044edf
DL
6487
6488
973a76b1 6489
cffcede7 6490
551ffc27 6491
226e2359 6492
c0d27fcc 6493
f4988be7 6494
98418dba
CW
6495for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6496 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6497 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6498 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6499 sys/utsname.h pwd.h
98418dba
CW
6500do
6501as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6502if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6503 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6504echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6505if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6506 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6507fi
ca81d7a0
JD
6508ac_res=`eval echo '${'$as_ac_Header'}'`
6509 { echo "$as_me:$LINENO: result: $ac_res" >&5
6510echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6511else
c0d27fcc 6512 # Is the header compilable?
ca81d7a0
JD
6513{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6514echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6515cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6516/* confdefs.h. */
6517_ACEOF
6518cat confdefs.h >>conftest.$ac_ext
6519cat >>conftest.$ac_ext <<_ACEOF
6520/* end confdefs.h. */
c0d27fcc
MR
6521$ac_includes_default
6522#include <$ac_header>
6523_ACEOF
6524rm -f conftest.$ac_objext
ca81d7a0
JD
6525if { (ac_try="$ac_compile"
6526case "(($ac_try" in
6527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6528 *) ac_try_echo=$ac_try;;
6529esac
6530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6531 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6532 ac_status=$?
edfaf76d
LK
6533 grep -v '^ *+' conftest.er1 >conftest.err
6534 rm -f conftest.er1
6535 cat conftest.err >&5
c0d27fcc 6536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6537 (exit $ac_status); } && {
6538 test -z "$ac_c_werror_flag" ||
6539 test ! -s conftest.err
6540 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6541 ac_header_compiler=yes
6542else
6543 echo "$as_me: failed program was:" >&5
19650fd6
AS
6544sed 's/^/| /' conftest.$ac_ext >&5
6545
ca81d7a0 6546 ac_header_compiler=no
c0d27fcc 6547fi
ca81d7a0
JD
6548
6549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6550{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6551echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6552
6553# Is the header present?
ca81d7a0
JD
6554{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6555echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6556cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6557/* confdefs.h. */
6558_ACEOF
6559cat confdefs.h >>conftest.$ac_ext
6560cat >>conftest.$ac_ext <<_ACEOF
6561/* end confdefs.h. */
98418dba 6562#include <$ac_header>
503d2be0 6563_ACEOF
ca81d7a0
JD
6564if { (ac_try="$ac_cpp conftest.$ac_ext"
6565case "(($ac_try" in
6566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6567 *) ac_try_echo=$ac_try;;
6568esac
6569eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6570 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6571 ac_status=$?
6bae0ccf 6572 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6573 rm -f conftest.er1
6574 cat conftest.err >&5
c0d27fcc 6575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6576 (exit $ac_status); } >/dev/null && {
6577 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6578 test ! -s conftest.err
6579 }; then
c0d27fcc 6580 ac_header_preproc=yes
34ec9ebe 6581else
503d2be0 6582 echo "$as_me: failed program was:" >&5
19650fd6
AS
6583sed 's/^/| /' conftest.$ac_ext >&5
6584
c0d27fcc 6585 ac_header_preproc=no
34ec9ebe 6586fi
ca81d7a0 6587
98418dba 6588rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6589{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6590echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6591
6592# So? What about this header?
edfaf76d
LK
6593case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6594 yes:no: )
c0d27fcc
MR
6595 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6596echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6597 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6598echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6599 ac_header_preproc=yes
19650fd6 6600 ;;
edfaf76d 6601 no:yes:* )
c0d27fcc
MR
6602 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6603echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6604 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6605echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6606 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6607echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6608 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6609echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6610 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6611echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6612 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6613echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6614
19650fd6 6615 ;;
c0d27fcc 6616esac
ca81d7a0
JD
6617{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6618echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6619if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6620 echo $ECHO_N "(cached) $ECHO_C" >&6
6621else
edfaf76d 6622 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6623fi
ca81d7a0
JD
6624ac_res=`eval echo '${'$as_ac_Header'}'`
6625 { echo "$as_me:$LINENO: result: $ac_res" >&5
6626echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6627
6628fi
98418dba 6629if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6630 cat >>confdefs.h <<_ACEOF
98418dba 6631#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6632_ACEOF
34ec9ebe 6633
98418dba 6634fi
c0d27fcc 6635
98418dba
CW
6636done
6637
22044edf 6638
ca81d7a0
JD
6639{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6640echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6641cat >conftest.$ac_ext <<_ACEOF
6642/* confdefs.h. */
6643_ACEOF
6644cat confdefs.h >>conftest.$ac_ext
6645cat >>conftest.$ac_ext <<_ACEOF
6646/* end confdefs.h. */
6647#include <sys/personality.h>
6648int
6649main ()
6650{
6651personality (PER_LINUX32)
6652 ;
6653 return 0;
6654}
6655_ACEOF
6656rm -f conftest.$ac_objext
ca81d7a0
JD
6657if { (ac_try="$ac_compile"
6658case "(($ac_try" in
6659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6660 *) ac_try_echo=$ac_try;;
6661esac
6662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6663 (eval "$ac_compile") 2>conftest.er1
f17e308a 6664 ac_status=$?
edfaf76d
LK
6665 grep -v '^ *+' conftest.er1 >conftest.err
6666 rm -f conftest.er1
6667 cat conftest.err >&5
f17e308a 6668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6669 (exit $ac_status); } && {
6670 test -z "$ac_c_werror_flag" ||
6671 test ! -s conftest.err
6672 } && test -s conftest.$ac_objext; then
f17e308a
JD
6673 emacs_cv_personality_linux32=yes
6674else
6675 echo "$as_me: failed program was:" >&5
6676sed 's/^/| /' conftest.$ac_ext >&5
6677
ca81d7a0 6678 emacs_cv_personality_linux32=no
f17e308a 6679fi
ca81d7a0
JD
6680
6681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6682{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6683echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6684
6685if test $emacs_cv_personality_linux32 = yes; then
6686
6687cat >>confdefs.h <<\_ACEOF
6688#define HAVE_PERSONALITY_LINUX32 1
6689_ACEOF
6690
6691fi
6692
6693
22044edf
DL
6694for ac_header in term.h
6695do
6696as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6697{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6698echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6699if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6700 echo $ECHO_N "(cached) $ECHO_C" >&6
6701else
6702 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6703/* confdefs.h. */
6704_ACEOF
6705cat confdefs.h >>conftest.$ac_ext
6706cat >>conftest.$ac_ext <<_ACEOF
6707/* end confdefs.h. */
22044edf
DL
6708#include <$ac_header>
6709_ACEOF
ca81d7a0
JD
6710if { (ac_try="$ac_cpp conftest.$ac_ext"
6711case "(($ac_try" in
6712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6713 *) ac_try_echo=$ac_try;;
6714esac
6715eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6716 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6717 ac_status=$?
6718 grep -v '^ *+' conftest.er1 >conftest.err
6719 rm -f conftest.er1
6720 cat conftest.err >&5
6721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6722 (exit $ac_status); } >/dev/null && {
6723 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6724 test ! -s conftest.err
6725 }; then
22044edf
DL
6726 eval "$as_ac_Header=yes"
6727else
6728 echo "$as_me: failed program was:" >&5
19650fd6
AS
6729sed 's/^/| /' conftest.$ac_ext >&5
6730
22044edf
DL
6731 eval "$as_ac_Header=no"
6732fi
ca81d7a0 6733
22044edf
DL
6734rm -f conftest.err conftest.$ac_ext
6735fi
ca81d7a0
JD
6736ac_res=`eval echo '${'$as_ac_Header'}'`
6737 { echo "$as_me:$LINENO: result: $ac_res" >&5
6738echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6739if test `eval echo '${'$as_ac_Header'}'` = yes; then
6740 cat >>confdefs.h <<_ACEOF
6741#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6742_ACEOF
6743
6744fi
6745
6746done
6747
ca81d7a0
JD
6748{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6749echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6750if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6751 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6752else
503d2be0 6753 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6754/* confdefs.h. */
6755_ACEOF
6756cat confdefs.h >>conftest.$ac_ext
6757cat >>conftest.$ac_ext <<_ACEOF
6758/* end confdefs.h. */
98418dba
CW
6759#include <stdlib.h>
6760#include <stdarg.h>
6761#include <string.h>
6762#include <float.h>
6763
19650fd6
AS
6764int
6765main ()
6766{
6767
6768 ;
6769 return 0;
6770}
98418dba 6771_ACEOF
19650fd6 6772rm -f conftest.$ac_objext
ca81d7a0
JD
6773if { (ac_try="$ac_compile"
6774case "(($ac_try" in
6775 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6776 *) ac_try_echo=$ac_try;;
6777esac
6778eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6779 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6780 ac_status=$?
edfaf76d
LK
6781 grep -v '^ *+' conftest.er1 >conftest.err
6782 rm -f conftest.er1
6783 cat conftest.err >&5
cd958eb3 6784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6785 (exit $ac_status); } && {
6786 test -z "$ac_c_werror_flag" ||
6787 test ! -s conftest.err
6788 } && test -s conftest.$ac_objext; then
98418dba 6789 ac_cv_header_stdc=yes
ba4481b5 6790else
503d2be0 6791 echo "$as_me: failed program was:" >&5
19650fd6
AS
6792sed 's/^/| /' conftest.$ac_ext >&5
6793
ca81d7a0 6794 ac_cv_header_stdc=no
ba4481b5 6795fi
ca81d7a0
JD
6796
6797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6798
6799if test $ac_cv_header_stdc = yes; then
6800 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6801 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6802/* confdefs.h. */
6803_ACEOF
6804cat confdefs.h >>conftest.$ac_ext
6805cat >>conftest.$ac_ext <<_ACEOF
6806/* end confdefs.h. */
98418dba
CW
6807#include <string.h>
6808
6809_ACEOF
6810if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6811 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6812 :
6813else
6814 ac_cv_header_stdc=no
ba4481b5 6815fi
98418dba 6816rm -f conftest*
ba4481b5
DL
6817
6818fi
6819
98418dba
CW
6820if test $ac_cv_header_stdc = yes; then
6821 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6822 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6823/* confdefs.h. */
6824_ACEOF
6825cat confdefs.h >>conftest.$ac_ext
6826cat >>conftest.$ac_ext <<_ACEOF
6827/* end confdefs.h. */
98418dba
CW
6828#include <stdlib.h>
6829
6830_ACEOF
6831if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6832 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6833 :
6834else
6835 ac_cv_header_stdc=no
6836fi
6837rm -f conftest*
6838
6839fi
6840
6841if test $ac_cv_header_stdc = yes; then
6842 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6843 if test "$cross_compiling" = yes; then
6844 :
d42122a3 6845else
503d2be0 6846 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6847/* confdefs.h. */
6848_ACEOF
6849cat confdefs.h >>conftest.$ac_ext
6850cat >>conftest.$ac_ext <<_ACEOF
6851/* end confdefs.h. */
98418dba 6852#include <ctype.h>
ca81d7a0 6853#include <stdlib.h>
98418dba
CW
6854#if ((' ' & 0x0FF) == 0x020)
6855# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6856# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6857#else
19650fd6 6858# define ISLOWER(c) \
edfaf76d
LK
6859 (('a' <= (c) && (c) <= 'i') \
6860 || ('j' <= (c) && (c) <= 'r') \
6861 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6862# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6863#endif
6864
6865#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6866int
6867main ()
6868{
98418dba
CW
6869 int i;
6870 for (i = 0; i < 256; i++)
6871 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6872 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6873 return 2;
6874 return 0;
503d2be0
AS
6875}
6876_ACEOF
98418dba 6877rm -f conftest$ac_exeext
ca81d7a0
JD
6878if { (ac_try="$ac_link"
6879case "(($ac_try" in
6880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6881 *) ac_try_echo=$ac_try;;
6882esac
6883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6884 (eval "$ac_link") 2>&5
503d2be0 6885 ac_status=$?
c0d27fcc 6886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6887 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6888 { (case "(($ac_try" in
6889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6890 *) ac_try_echo=$ac_try;;
6891esac
6892eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6893 (eval "$ac_try") 2>&5
503d2be0 6894 ac_status=$?
c0d27fcc 6895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6896 (exit $ac_status); }; }; then
98418dba 6897 :
d42122a3 6898else
98418dba
CW
6899 echo "$as_me: program exited with status $ac_status" >&5
6900echo "$as_me: failed program was:" >&5
19650fd6
AS
6901sed 's/^/| /' conftest.$ac_ext >&5
6902
c0d27fcc 6903( exit $ac_status )
98418dba 6904ac_cv_header_stdc=no
d42122a3 6905fi
ca81d7a0 6906rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6907fi
ca81d7a0
JD
6908
6909
98418dba
CW
6910fi
6911fi
ca81d7a0
JD
6912{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6913echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
6914if test $ac_cv_header_stdc = yes; then
6915
c0d27fcc 6916cat >>confdefs.h <<\_ACEOF
98418dba 6917#define STDC_HEADERS 1
c0d27fcc 6918_ACEOF
d42122a3
DL
6919
6920fi
6921
ca81d7a0
JD
6922{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
6923echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 6924if test "${ac_cv_header_time+set}" = set; then
503d2be0 6925 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6926else
503d2be0 6927 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6928/* confdefs.h. */
6929_ACEOF
6930cat confdefs.h >>conftest.$ac_ext
6931cat >>conftest.$ac_ext <<_ACEOF
6932/* end confdefs.h. */
ba4481b5 6933#include <sys/types.h>
98418dba 6934#include <sys/time.h>
ba4481b5 6935#include <time.h>
503d2be0
AS
6936
6937int
6938main ()
6939{
98418dba
CW
6940if ((struct tm *) 0)
6941return 0;
503d2be0
AS
6942 ;
6943 return 0;
6944}
6945_ACEOF
6946rm -f conftest.$ac_objext
ca81d7a0
JD
6947if { (ac_try="$ac_compile"
6948case "(($ac_try" in
6949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6950 *) ac_try_echo=$ac_try;;
6951esac
6952eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6953 (eval "$ac_compile") 2>conftest.er1
503d2be0 6954 ac_status=$?
edfaf76d
LK
6955 grep -v '^ *+' conftest.er1 >conftest.err
6956 rm -f conftest.er1
6957 cat conftest.err >&5
c0d27fcc 6958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6959 (exit $ac_status); } && {
6960 test -z "$ac_c_werror_flag" ||
6961 test ! -s conftest.err
6962 } && test -s conftest.$ac_objext; then
98418dba 6963 ac_cv_header_time=yes
ba4481b5 6964else
503d2be0 6965 echo "$as_me: failed program was:" >&5
19650fd6
AS
6966sed 's/^/| /' conftest.$ac_ext >&5
6967
ca81d7a0 6968 ac_cv_header_time=no
ba4481b5 6969fi
ca81d7a0
JD
6970
6971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6972fi
ca81d7a0
JD
6973{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
6974echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 6975if test $ac_cv_header_time = yes; then
503d2be0 6976
c0d27fcc 6977cat >>confdefs.h <<\_ACEOF
98418dba 6978#define TIME_WITH_SYS_TIME 1
c0d27fcc 6979_ACEOF
ba4481b5
DL
6980
6981fi
6982
ca81d7a0
JD
6983{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6984echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 6985if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 6986 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6987else
503d2be0 6988 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6989/* confdefs.h. */
6990_ACEOF
6991cat confdefs.h >>conftest.$ac_ext
6992cat >>conftest.$ac_ext <<_ACEOF
6993/* end confdefs.h. */
cd958eb3
MB
6994$ac_includes_default
6995int
6996main ()
6997{
6998#ifndef sys_siglist
f053c89f 6999 (void) sys_siglist;
98418dba 7000#endif
503d2be0 7001
cd958eb3
MB
7002 ;
7003 return 0;
7004}
7005_ACEOF
7006rm -f conftest.$ac_objext
ca81d7a0
JD
7007if { (ac_try="$ac_compile"
7008case "(($ac_try" in
7009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7010 *) ac_try_echo=$ac_try;;
7011esac
7012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7013 (eval "$ac_compile") 2>conftest.er1
cd958eb3 7014 ac_status=$?
edfaf76d
LK
7015 grep -v '^ *+' conftest.er1 >conftest.err
7016 rm -f conftest.er1
7017 cat conftest.err >&5
cd958eb3 7018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7019 (exit $ac_status); } && {
7020 test -z "$ac_c_werror_flag" ||
7021 test ! -s conftest.err
7022 } && test -s conftest.$ac_objext; then
cd958eb3
MB
7023 ac_cv_have_decl_sys_siglist=yes
7024else
7025 echo "$as_me: failed program was:" >&5
19650fd6
AS
7026sed 's/^/| /' conftest.$ac_ext >&5
7027
ca81d7a0 7028 ac_cv_have_decl_sys_siglist=no
cd958eb3 7029fi
ca81d7a0
JD
7030
7031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 7032fi
ca81d7a0
JD
7033{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
7034echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
7035if test $ac_cv_have_decl_sys_siglist = yes; then
7036
7037cat >>confdefs.h <<_ACEOF
7038#define HAVE_DECL_SYS_SIGLIST 1
7039_ACEOF
7040
7041
7042else
7043 cat >>confdefs.h <<_ACEOF
7044#define HAVE_DECL_SYS_SIGLIST 0
7045_ACEOF
7046
7047
7048fi
7049
7050
7051if test $ac_cv_have_decl_sys_siglist != yes; then
7052 # For Tru64, at least:
ca81d7a0
JD
7053 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
7054echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
7055if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
7056 echo $ECHO_N "(cached) $ECHO_C" >&6
7057else
7058 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7059/* confdefs.h. */
7060_ACEOF
7061cat confdefs.h >>conftest.$ac_ext
7062cat >>conftest.$ac_ext <<_ACEOF
7063/* end confdefs.h. */
cd958eb3 7064$ac_includes_default
503d2be0
AS
7065int
7066main ()
7067{
cd958eb3 7068#ifndef __sys_siglist
f053c89f 7069 (void) __sys_siglist;
cd958eb3
MB
7070#endif
7071
503d2be0
AS
7072 ;
7073 return 0;
7074}
7075_ACEOF
7076rm -f conftest.$ac_objext
ca81d7a0
JD
7077if { (ac_try="$ac_compile"
7078case "(($ac_try" in
7079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7080 *) ac_try_echo=$ac_try;;
7081esac
7082eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7083 (eval "$ac_compile") 2>conftest.er1
503d2be0 7084 ac_status=$?
edfaf76d
LK
7085 grep -v '^ *+' conftest.er1 >conftest.err
7086 rm -f conftest.er1
7087 cat conftest.err >&5
c0d27fcc 7088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7089 (exit $ac_status); } && {
7090 test -z "$ac_c_werror_flag" ||
7091 test ! -s conftest.err
7092 } && test -s conftest.$ac_objext; then
cd958eb3 7093 ac_cv_have_decl___sys_siglist=yes
ba4481b5 7094else
503d2be0 7095 echo "$as_me: failed program was:" >&5
19650fd6
AS
7096sed 's/^/| /' conftest.$ac_ext >&5
7097
ca81d7a0 7098 ac_cv_have_decl___sys_siglist=no
ba4481b5 7099fi
ca81d7a0
JD
7100
7101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 7102fi
ca81d7a0
JD
7103{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
7104echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 7105if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 7106
cd958eb3
MB
7107cat >>confdefs.h <<_ACEOF
7108#define HAVE_DECL___SYS_SIGLIST 1
7109_ACEOF
7110
7111
7112else
7113 cat >>confdefs.h <<_ACEOF
7114#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 7115_ACEOF
503d2be0 7116
cd958eb3 7117
ba4481b5
DL
7118fi
7119
cd958eb3
MB
7120
7121 if test $ac_cv_have_decl___sys_siglist = yes; then
7122
7123cat >>confdefs.h <<\_ACEOF
7124#define sys_siglist __sys_siglist
7125_ACEOF
7126
7127 fi
7128fi
ca81d7a0
JD
7129{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7130echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 7131if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 7132 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7133else
503d2be0 7134 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7135/* confdefs.h. */
7136_ACEOF
7137cat confdefs.h >>conftest.$ac_ext
7138cat >>conftest.$ac_ext <<_ACEOF
7139/* end confdefs.h. */
98418dba
CW
7140#include <sys/types.h>
7141#include <sys/wait.h>
7142#ifndef WEXITSTATUS
ca81d7a0 7143# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7144#endif
7145#ifndef WIFEXITED
7146# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7147#endif
503d2be0
AS
7148
7149int
7150main ()
7151{
98418dba
CW
7152 int s;
7153 wait (&s);
7154 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7155 ;
7156 return 0;
7157}
7158_ACEOF
98418dba 7159rm -f conftest.$ac_objext
ca81d7a0
JD
7160if { (ac_try="$ac_compile"
7161case "(($ac_try" in
7162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7163 *) ac_try_echo=$ac_try;;
7164esac
7165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7166 (eval "$ac_compile") 2>conftest.er1
503d2be0 7167 ac_status=$?
edfaf76d
LK
7168 grep -v '^ *+' conftest.er1 >conftest.err
7169 rm -f conftest.er1
7170 cat conftest.err >&5
c0d27fcc 7171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7172 (exit $ac_status); } && {
7173 test -z "$ac_c_werror_flag" ||
7174 test ! -s conftest.err
7175 } && test -s conftest.$ac_objext; then
98418dba 7176 ac_cv_header_sys_wait_h=yes
ba4481b5 7177else
503d2be0 7178 echo "$as_me: failed program was:" >&5
19650fd6
AS
7179sed 's/^/| /' conftest.$ac_ext >&5
7180
ca81d7a0 7181 ac_cv_header_sys_wait_h=no
ba4481b5 7182fi
ca81d7a0
JD
7183
7184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7185fi
ca81d7a0
JD
7186{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7187echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7188if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7189
c0d27fcc 7190cat >>confdefs.h <<\_ACEOF
98418dba 7191#define HAVE_SYS_WAIT_H 1
c0d27fcc 7192_ACEOF
ba4481b5 7193
ba4481b5
DL
7194fi
7195
c0d27fcc 7196
ca81d7a0
JD
7197{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7198echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7199if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7200 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7201else
503d2be0 7202 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7203/* confdefs.h. */
7204_ACEOF
7205cat confdefs.h >>conftest.$ac_ext
7206cat >>conftest.$ac_ext <<_ACEOF
7207/* end confdefs.h. */
98418dba
CW
7208#ifdef TIME_WITH_SYS_TIME
7209#include <sys/time.h>
7210#include <time.h>
7211#else
7212#ifdef HAVE_SYS_TIME_H
7213#include <sys/time.h>
7214#else
1113b624 7215#include <time.h>
98418dba
CW
7216#endif
7217#endif
7218#ifdef HAVE_UTIME_H
7219#include <utime.h>
7220#endif
503d2be0
AS
7221int
7222main ()
7223{
98418dba 7224static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7225 ;
7226 return 0;
7227}
7228_ACEOF
98418dba 7229rm -f conftest.$ac_objext
ca81d7a0
JD
7230if { (ac_try="$ac_compile"
7231case "(($ac_try" in
7232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7233 *) ac_try_echo=$ac_try;;
7234esac
7235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7236 (eval "$ac_compile") 2>conftest.er1
503d2be0 7237 ac_status=$?
edfaf76d
LK
7238 grep -v '^ *+' conftest.er1 >conftest.err
7239 rm -f conftest.er1
7240 cat conftest.err >&5
c0d27fcc 7241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7242 (exit $ac_status); } && {
7243 test -z "$ac_c_werror_flag" ||
7244 test ! -s conftest.err
7245 } && test -s conftest.$ac_objext; then
98418dba 7246 emacs_cv_struct_utimbuf=yes
1113b624 7247else
503d2be0 7248 echo "$as_me: failed program was:" >&5
19650fd6
AS
7249sed 's/^/| /' conftest.$ac_ext >&5
7250
ca81d7a0 7251 emacs_cv_struct_utimbuf=no
1113b624 7252fi
ca81d7a0
JD
7253
7254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7255fi
ca81d7a0
JD
7256{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7257echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7258if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7259
c0d27fcc 7260cat >>confdefs.h <<\_ACEOF
98418dba 7261#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7262_ACEOF
1113b624
PE
7263
7264fi
ba4481b5 7265
ca81d7a0
JD
7266{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7267echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7268if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7269 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7270else
98418dba 7271 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7272/* confdefs.h. */
7273_ACEOF
7274cat confdefs.h >>conftest.$ac_ext
7275cat >>conftest.$ac_ext <<_ACEOF
7276/* end confdefs.h. */
7397acc4 7277#include <sys/types.h>
98418dba 7278#include <signal.h>
98418dba 7279
503d2be0
AS
7280int
7281main ()
7282{
ca81d7a0 7283return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7284 ;
7285 return 0;
7286}
7287_ACEOF
98418dba 7288rm -f conftest.$ac_objext
ca81d7a0
JD
7289if { (ac_try="$ac_compile"
7290case "(($ac_try" in
7291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7292 *) ac_try_echo=$ac_try;;
7293esac
7294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7295 (eval "$ac_compile") 2>conftest.er1
503d2be0 7296 ac_status=$?
edfaf76d
LK
7297 grep -v '^ *+' conftest.er1 >conftest.err
7298 rm -f conftest.er1
7299 cat conftest.err >&5
c0d27fcc 7300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7301 (exit $ac_status); } && {
7302 test -z "$ac_c_werror_flag" ||
7303 test ! -s conftest.err
7304 } && test -s conftest.$ac_objext; then
ca81d7a0 7305 ac_cv_type_signal=int
503d2be0
AS
7306else
7307 echo "$as_me: failed program was:" >&5
19650fd6
AS
7308sed 's/^/| /' conftest.$ac_ext >&5
7309
ca81d7a0 7310 ac_cv_type_signal=void
503d2be0 7311fi
ca81d7a0
JD
7312
7313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7314fi
ca81d7a0
JD
7315{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7316echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7317
c0d27fcc 7318cat >>confdefs.h <<_ACEOF
98418dba 7319#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7320_ACEOF
7321
503d2be0 7322
c0d27fcc 7323
ca81d7a0
JD
7324{ echo "$as_me:$LINENO: checking for speed_t" >&5
7325echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7326if test "${emacs_cv_speed_t+set}" = set; then
7327 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7328else
98418dba 7329 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7330/* confdefs.h. */
7331_ACEOF
7332cat confdefs.h >>conftest.$ac_ext
7333cat >>conftest.$ac_ext <<_ACEOF
7334/* end confdefs.h. */
98418dba 7335#include <termios.h>
98418dba
CW
7336int
7337main ()
7338{
7339speed_t x = 1;
7340 ;
7341 return 0;
7342}
7343_ACEOF
7344rm -f conftest.$ac_objext
ca81d7a0
JD
7345if { (ac_try="$ac_compile"
7346case "(($ac_try" in
7347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7348 *) ac_try_echo=$ac_try;;
7349esac
7350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7351 (eval "$ac_compile") 2>conftest.er1
98418dba 7352 ac_status=$?
edfaf76d
LK
7353 grep -v '^ *+' conftest.er1 >conftest.err
7354 rm -f conftest.er1
7355 cat conftest.err >&5
c0d27fcc 7356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7357 (exit $ac_status); } && {
7358 test -z "$ac_c_werror_flag" ||
7359 test ! -s conftest.err
7360 } && test -s conftest.$ac_objext; then
98418dba
CW
7361 emacs_cv_speed_t=yes
7362else
7363 echo "$as_me: failed program was:" >&5
19650fd6
AS
7364sed 's/^/| /' conftest.$ac_ext >&5
7365
ca81d7a0 7366 emacs_cv_speed_t=no
98418dba 7367fi
ca81d7a0
JD
7368
7369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7370fi
ca81d7a0
JD
7371{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7372echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7373if test $emacs_cv_speed_t = yes; then
b936fae4 7374
c0d27fcc 7375cat >>confdefs.h <<\_ACEOF
98418dba 7376#define HAVE_SPEED_T 1
c0d27fcc 7377_ACEOF
98418dba 7378
7397acc4
DL
7379fi
7380
ca81d7a0
JD
7381{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7382echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7383if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7384 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7385else
503d2be0 7386 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7387/* confdefs.h. */
7388_ACEOF
7389cat confdefs.h >>conftest.$ac_ext
7390cat >>conftest.$ac_ext <<_ACEOF
7391/* end confdefs.h. */
98418dba
CW
7392#ifdef TIME_WITH_SYS_TIME
7393#include <sys/time.h>
7394#include <time.h>
7395#else
7396#ifdef HAVE_SYS_TIME_H
7397#include <sys/time.h>
7398#else
7399#include <time.h>
7400#endif
7401#endif
503d2be0
AS
7402int
7403main ()
7404{
98418dba 7405static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7406 ;
7407 return 0;
7408}
7409_ACEOF
7410rm -f conftest.$ac_objext
ca81d7a0
JD
7411if { (ac_try="$ac_compile"
7412case "(($ac_try" in
7413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7414 *) ac_try_echo=$ac_try;;
7415esac
7416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7417 (eval "$ac_compile") 2>conftest.er1
503d2be0 7418 ac_status=$?
edfaf76d
LK
7419 grep -v '^ *+' conftest.er1 >conftest.err
7420 rm -f conftest.er1
7421 cat conftest.err >&5
c0d27fcc 7422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7423 (exit $ac_status); } && {
7424 test -z "$ac_c_werror_flag" ||
7425 test ! -s conftest.err
7426 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7427 emacs_cv_struct_timeval=yes
7428else
503d2be0 7429 echo "$as_me: failed program was:" >&5
19650fd6
AS
7430sed 's/^/| /' conftest.$ac_ext >&5
7431
ca81d7a0 7432 emacs_cv_struct_timeval=no
7397acc4 7433fi
ca81d7a0
JD
7434
7435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7436fi
ca81d7a0
JD
7437{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7438echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7439HAVE_TIMEVAL=$emacs_cv_struct_timeval
7440if test $emacs_cv_struct_timeval = yes; then
b936fae4 7441
c0d27fcc 7442cat >>confdefs.h <<\_ACEOF
98418dba 7443#define HAVE_TIMEVAL 1
c0d27fcc 7444_ACEOF
7397acc4
DL
7445
7446fi
7447
ca81d7a0
JD
7448{ echo "$as_me:$LINENO: checking for struct exception" >&5
7449echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7450if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7451 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7452else
503d2be0 7453 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7454/* confdefs.h. */
7455_ACEOF
7456cat confdefs.h >>conftest.$ac_ext
7457cat >>conftest.$ac_ext <<_ACEOF
7458/* end confdefs.h. */
98418dba 7459#include <math.h>
503d2be0
AS
7460int
7461main ()
7462{
98418dba 7463static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7464 ;
7465 return 0;
ba4481b5 7466}
503d2be0
AS
7467_ACEOF
7468rm -f conftest.$ac_objext
ca81d7a0
JD
7469if { (ac_try="$ac_compile"
7470case "(($ac_try" in
7471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7472 *) ac_try_echo=$ac_try;;
7473esac
7474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7475 (eval "$ac_compile") 2>conftest.er1
503d2be0 7476 ac_status=$?
edfaf76d
LK
7477 grep -v '^ *+' conftest.er1 >conftest.err
7478 rm -f conftest.er1
7479 cat conftest.err >&5
c0d27fcc 7480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7481 (exit $ac_status); } && {
7482 test -z "$ac_c_werror_flag" ||
7483 test ! -s conftest.err
7484 } && test -s conftest.$ac_objext; then
98418dba 7485 emacs_cv_struct_exception=yes
ba4481b5 7486else
503d2be0 7487 echo "$as_me: failed program was:" >&5
19650fd6
AS
7488sed 's/^/| /' conftest.$ac_ext >&5
7489
ca81d7a0 7490 emacs_cv_struct_exception=no
ba4481b5 7491fi
ca81d7a0
JD
7492
7493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7494fi
ca81d7a0
JD
7495{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7496echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7497HAVE_EXCEPTION=$emacs_cv_struct_exception
7498if test $emacs_cv_struct_exception != yes; then
b936fae4 7499
c0d27fcc 7500cat >>confdefs.h <<\_ACEOF
98418dba 7501#define NO_MATHERR 1
c0d27fcc 7502_ACEOF
ba4481b5
DL
7503
7504fi
7505
7862d3a8
AS
7506
7507for ac_header in sys/socket.h
7508do
7509as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7510if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7511 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7512echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7513if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7514 echo $ECHO_N "(cached) $ECHO_C" >&6
7515fi
ca81d7a0
JD
7516ac_res=`eval echo '${'$as_ac_Header'}'`
7517 { echo "$as_me:$LINENO: result: $ac_res" >&5
7518echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7519else
7520 # Is the header compilable?
ca81d7a0
JD
7521{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7522echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7523cat >conftest.$ac_ext <<_ACEOF
7524/* confdefs.h. */
7525_ACEOF
7526cat confdefs.h >>conftest.$ac_ext
7527cat >>conftest.$ac_ext <<_ACEOF
7528/* end confdefs.h. */
7529$ac_includes_default
7530#include <$ac_header>
7531_ACEOF
7532rm -f conftest.$ac_objext
ca81d7a0
JD
7533if { (ac_try="$ac_compile"
7534case "(($ac_try" in
7535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7536 *) ac_try_echo=$ac_try;;
7537esac
7538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7539 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7540 ac_status=$?
edfaf76d
LK
7541 grep -v '^ *+' conftest.er1 >conftest.err
7542 rm -f conftest.er1
7543 cat conftest.err >&5
7862d3a8 7544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7545 (exit $ac_status); } && {
7546 test -z "$ac_c_werror_flag" ||
7547 test ! -s conftest.err
7548 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7549 ac_header_compiler=yes
7550else
7551 echo "$as_me: failed program was:" >&5
7552sed 's/^/| /' conftest.$ac_ext >&5
7553
ca81d7a0 7554 ac_header_compiler=no
7862d3a8 7555fi
ca81d7a0
JD
7556
7557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7558{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7559echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7560
7561# Is the header present?
ca81d7a0
JD
7562{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7563echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7564cat >conftest.$ac_ext <<_ACEOF
7565/* confdefs.h. */
7566_ACEOF
7567cat confdefs.h >>conftest.$ac_ext
7568cat >>conftest.$ac_ext <<_ACEOF
7569/* end confdefs.h. */
7570#include <$ac_header>
7571_ACEOF
ca81d7a0
JD
7572if { (ac_try="$ac_cpp conftest.$ac_ext"
7573case "(($ac_try" in
7574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7575 *) ac_try_echo=$ac_try;;
7576esac
7577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7578 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7579 ac_status=$?
7580 grep -v '^ *+' conftest.er1 >conftest.err
7581 rm -f conftest.er1
7582 cat conftest.err >&5
7583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7584 (exit $ac_status); } >/dev/null && {
7585 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7586 test ! -s conftest.err
7587 }; then
7862d3a8
AS
7588 ac_header_preproc=yes
7589else
7590 echo "$as_me: failed program was:" >&5
7591sed 's/^/| /' conftest.$ac_ext >&5
7592
7593 ac_header_preproc=no
7594fi
ca81d7a0 7595
7862d3a8 7596rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
7597{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7598echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7599
7600# So? What about this header?
edfaf76d
LK
7601case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7602 yes:no: )
7862d3a8
AS
7603 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7604echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7605 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7606echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7607 ac_header_preproc=yes
7862d3a8 7608 ;;
edfaf76d 7609 no:yes:* )
7862d3a8
AS
7610 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7611echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7612 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7613echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7614 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7615echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7616 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7617echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7618 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7619echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7620 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7621echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7622
7862d3a8
AS
7623 ;;
7624esac
ca81d7a0
JD
7625{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7626echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7627if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7628 echo $ECHO_N "(cached) $ECHO_C" >&6
7629else
edfaf76d 7630 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7631fi
ca81d7a0
JD
7632ac_res=`eval echo '${'$as_ac_Header'}'`
7633 { echo "$as_me:$LINENO: result: $ac_res" >&5
7634echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7635
7636fi
7637if test `eval echo '${'$as_ac_Header'}'` = yes; then
7638 cat >>confdefs.h <<_ACEOF
7639#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7640_ACEOF
7641
7642fi
7643
7644done
7645
7646
7647for ac_header in net/if.h
7648do
7649as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7650{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7651echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7652if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7653 echo $ECHO_N "(cached) $ECHO_C" >&6
7654else
7655 cat >conftest.$ac_ext <<_ACEOF
7656/* confdefs.h. */
7657_ACEOF
7658cat confdefs.h >>conftest.$ac_ext
7659cat >>conftest.$ac_ext <<_ACEOF
7660/* end confdefs.h. */
7661$ac_includes_default
7662#if HAVE_SYS_SOCKET_H
7663#include <sys/socket.h>
7664#endif
7665
7666#include <$ac_header>
7667_ACEOF
7668rm -f conftest.$ac_objext
ca81d7a0
JD
7669if { (ac_try="$ac_compile"
7670case "(($ac_try" in
7671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7672 *) ac_try_echo=$ac_try;;
7673esac
7674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7675 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7676 ac_status=$?
edfaf76d
LK
7677 grep -v '^ *+' conftest.er1 >conftest.err
7678 rm -f conftest.er1
7679 cat conftest.err >&5
7862d3a8 7680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7681 (exit $ac_status); } && {
7682 test -z "$ac_c_werror_flag" ||
7683 test ! -s conftest.err
7684 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7685 eval "$as_ac_Header=yes"
7686else
7687 echo "$as_me: failed program was:" >&5
7688sed 's/^/| /' conftest.$ac_ext >&5
7689
ca81d7a0 7690 eval "$as_ac_Header=no"
7862d3a8 7691fi
ca81d7a0
JD
7692
7693rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7694fi
ca81d7a0
JD
7695ac_res=`eval echo '${'$as_ac_Header'}'`
7696 { echo "$as_me:$LINENO: result: $ac_res" >&5
7697echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7698if test `eval echo '${'$as_ac_Header'}'` = yes; then
7699 cat >>confdefs.h <<_ACEOF
7700#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7701_ACEOF
7702
7703fi
7704
7705done
7706
7707
ca81d7a0
JD
7708{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7709echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7710if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7711 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7712else
503d2be0 7713 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7714/* confdefs.h. */
7715_ACEOF
7716cat confdefs.h >>conftest.$ac_ext
7717cat >>conftest.$ac_ext <<_ACEOF
7718/* end confdefs.h. */
98418dba
CW
7719#include <sys/types.h>
7720#include <time.h>
7397acc4 7721
503d2be0
AS
7722int
7723main ()
7724{
f053c89f
CY
7725struct tm tm;
7726 int *p = &tm.tm_sec;
7727 return !p;
503d2be0
AS
7728 ;
7729 return 0;
7730}
7731_ACEOF
7732rm -f conftest.$ac_objext
ca81d7a0
JD
7733if { (ac_try="$ac_compile"
7734case "(($ac_try" in
7735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7736 *) ac_try_echo=$ac_try;;
7737esac
7738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7739 (eval "$ac_compile") 2>conftest.er1
503d2be0 7740 ac_status=$?
edfaf76d
LK
7741 grep -v '^ *+' conftest.er1 >conftest.err
7742 rm -f conftest.er1
7743 cat conftest.err >&5
c0d27fcc 7744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7745 (exit $ac_status); } && {
7746 test -z "$ac_c_werror_flag" ||
7747 test ! -s conftest.err
7748 } && test -s conftest.$ac_objext; then
35996d22
AS
7749 ac_cv_struct_tm=time.h
7750else
503d2be0 7751 echo "$as_me: failed program was:" >&5
19650fd6
AS
7752sed 's/^/| /' conftest.$ac_ext >&5
7753
ca81d7a0 7754 ac_cv_struct_tm=sys/time.h
7397acc4 7755fi
ca81d7a0
JD
7756
7757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7758fi
ca81d7a0
JD
7759{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7760echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7761if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7762
c0d27fcc 7763cat >>confdefs.h <<\_ACEOF
98418dba 7764#define TM_IN_SYS_TIME 1
c0d27fcc 7765_ACEOF
7397acc4
DL
7766
7767fi
ba4481b5 7768
ca81d7a0
JD
7769{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7770echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7771if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7772 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7773else
98418dba 7774 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7775/* confdefs.h. */
7776_ACEOF
7777cat confdefs.h >>conftest.$ac_ext
7778cat >>conftest.$ac_ext <<_ACEOF
7779/* end confdefs.h. */
98418dba
CW
7780#include <sys/types.h>
7781#include <$ac_cv_struct_tm>
ba4481b5 7782
c0d27fcc 7783
98418dba
CW
7784int
7785main ()
7786{
7787static struct tm ac_aggr;
7788if (ac_aggr.tm_zone)
7789return 0;
7790 ;
7791 return 0;
7792}
7793_ACEOF
7794rm -f conftest.$ac_objext
ca81d7a0
JD
7795if { (ac_try="$ac_compile"
7796case "(($ac_try" in
7797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7798 *) ac_try_echo=$ac_try;;
7799esac
7800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7801 (eval "$ac_compile") 2>conftest.er1
98418dba 7802 ac_status=$?
edfaf76d
LK
7803 grep -v '^ *+' conftest.er1 >conftest.err
7804 rm -f conftest.er1
7805 cat conftest.err >&5
c0d27fcc 7806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7807 (exit $ac_status); } && {
7808 test -z "$ac_c_werror_flag" ||
7809 test ! -s conftest.err
7810 } && test -s conftest.$ac_objext; then
98418dba 7811 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7812else
98418dba 7813 echo "$as_me: failed program was:" >&5
19650fd6
AS
7814sed 's/^/| /' conftest.$ac_ext >&5
7815
ca81d7a0 7816 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7817/* confdefs.h. */
7818_ACEOF
7819cat confdefs.h >>conftest.$ac_ext
7820cat >>conftest.$ac_ext <<_ACEOF
7821/* end confdefs.h. */
6bae0ccf
DL
7822#include <sys/types.h>
7823#include <$ac_cv_struct_tm>
7824
7825
7826int
7827main ()
7828{
7829static struct tm ac_aggr;
7830if (sizeof ac_aggr.tm_zone)
7831return 0;
7832 ;
7833 return 0;
7834}
7835_ACEOF
7836rm -f conftest.$ac_objext
ca81d7a0
JD
7837if { (ac_try="$ac_compile"
7838case "(($ac_try" in
7839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7840 *) ac_try_echo=$ac_try;;
7841esac
7842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7843 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7844 ac_status=$?
edfaf76d
LK
7845 grep -v '^ *+' conftest.er1 >conftest.err
7846 rm -f conftest.er1
7847 cat conftest.err >&5
6bae0ccf 7848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7849 (exit $ac_status); } && {
7850 test -z "$ac_c_werror_flag" ||
7851 test ! -s conftest.err
7852 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7853 ac_cv_member_struct_tm_tm_zone=yes
7854else
7855 echo "$as_me: failed program was:" >&5
19650fd6
AS
7856sed 's/^/| /' conftest.$ac_ext >&5
7857
ca81d7a0 7858 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7859fi
ca81d7a0
JD
7860
7861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7862fi
ca81d7a0
JD
7863
7864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7865fi
ca81d7a0
JD
7866{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7867echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 7868if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7869
c0d27fcc 7870cat >>confdefs.h <<_ACEOF
98418dba 7871#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7872_ACEOF
7873
ba4481b5 7874
98418dba 7875fi
ba4481b5 7876
98418dba 7877if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7878
c0d27fcc 7879cat >>confdefs.h <<\_ACEOF
98418dba 7880#define HAVE_TM_ZONE 1
c0d27fcc 7881_ACEOF
ba4481b5 7882
ba4481b5 7883else
ca81d7a0
JD
7884 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7885echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
7886if test "${ac_cv_have_decl_tzname+set}" = set; then
503d2be0 7887 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7888else
98418dba 7889 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7890/* confdefs.h. */
7891_ACEOF
7892cat confdefs.h >>conftest.$ac_ext
7893cat >>conftest.$ac_ext <<_ACEOF
7894/* end confdefs.h. */
98418dba 7895#include <time.h>
98418dba 7896
98418dba
CW
7897int
7898main ()
7899{
ca81d7a0 7900#ifndef tzname
f053c89f 7901 (void) tzname;
ca81d7a0
JD
7902#endif
7903
98418dba
CW
7904 ;
7905 return 0;
7906}
7907_ACEOF
ca81d7a0
JD
7908rm -f conftest.$ac_objext
7909if { (ac_try="$ac_compile"
7910case "(($ac_try" in
7911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7912 *) ac_try_echo=$ac_try;;
7913esac
7914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7915 (eval "$ac_compile") 2>conftest.er1
98418dba 7916 ac_status=$?
edfaf76d
LK
7917 grep -v '^ *+' conftest.er1 >conftest.err
7918 rm -f conftest.er1
7919 cat conftest.err >&5
c0d27fcc 7920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7921 (exit $ac_status); } && {
7922 test -z "$ac_c_werror_flag" ||
7923 test ! -s conftest.err
7924 } && test -s conftest.$ac_objext; then
ca81d7a0 7925 ac_cv_have_decl_tzname=yes
98418dba
CW
7926else
7927 echo "$as_me: failed program was:" >&5
19650fd6
AS
7928sed 's/^/| /' conftest.$ac_ext >&5
7929
ca81d7a0 7930 ac_cv_have_decl_tzname=no
ba4481b5 7931fi
ca81d7a0
JD
7932
7933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7934fi
ca81d7a0
JD
7935{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
7936echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
7937if test $ac_cv_have_decl_tzname = yes; then
ba4481b5 7938
ca81d7a0
JD
7939cat >>confdefs.h <<_ACEOF
7940#define HAVE_DECL_TZNAME 1
c0d27fcc 7941_ACEOF
503d2be0 7942
ca81d7a0
JD
7943
7944else
7945 cat >>confdefs.h <<_ACEOF
7946#define HAVE_DECL_TZNAME 0
7947_ACEOF
7948
7949
98418dba 7950fi
503d2be0 7951
ca81d7a0
JD
7952
7953 { echo "$as_me:$LINENO: checking for tzname" >&5
7954echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
7955if test "${ac_cv_var_tzname+set}" = set; then
98418dba
CW
7956 echo $ECHO_N "(cached) $ECHO_C" >&6
7957else
7958 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7959/* confdefs.h. */
7960_ACEOF
7961cat confdefs.h >>conftest.$ac_ext
7962cat >>conftest.$ac_ext <<_ACEOF
7963/* end confdefs.h. */
98418dba 7964#include <time.h>
ca81d7a0
JD
7965#if !HAVE_DECL_TZNAME
7966extern char *tzname[];
7967#endif
b936fae4 7968
98418dba
CW
7969int
7970main ()
7971{
ca81d7a0 7972return tzname[0][0];
98418dba
CW
7973 ;
7974 return 0;
7975}
7976_ACEOF
ca81d7a0
JD
7977rm -f conftest.$ac_objext conftest$ac_exeext
7978if { (ac_try="$ac_link"
7979case "(($ac_try" in
7980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7981 *) ac_try_echo=$ac_try;;
7982esac
7983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7984 (eval "$ac_link") 2>conftest.er1
98418dba 7985 ac_status=$?
edfaf76d
LK
7986 grep -v '^ *+' conftest.er1 >conftest.err
7987 rm -f conftest.er1
7988 cat conftest.err >&5
c0d27fcc 7989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7990 (exit $ac_status); } && {
7991 test -z "$ac_c_werror_flag" ||
7992 test ! -s conftest.err
7993 } && test -s conftest$ac_exeext &&
7994 $as_test_x conftest$ac_exeext; then
ca81d7a0 7995 ac_cv_var_tzname=yes
98418dba
CW
7996else
7997 echo "$as_me: failed program was:" >&5
19650fd6
AS
7998sed 's/^/| /' conftest.$ac_ext >&5
7999
ca81d7a0
JD
8000 ac_cv_var_tzname=no
8001fi
6bae0ccf 8002
f053c89f 8003rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
ca81d7a0
JD
8004 conftest$ac_exeext conftest.$ac_ext
8005fi
8006{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
8007echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
8008 if test $ac_cv_var_tzname = yes; then
8009
8010cat >>confdefs.h <<\_ACEOF
8011#define HAVE_TZNAME 1
8012_ACEOF
8013
8014 fi
8015fi
8016
8017{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
8018echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
8019if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
8020 echo $ECHO_N "(cached) $ECHO_C" >&6
8021else
8022 cat >conftest.$ac_ext <<_ACEOF
8023/* confdefs.h. */
8024_ACEOF
8025cat confdefs.h >>conftest.$ac_ext
8026cat >>conftest.$ac_ext <<_ACEOF
8027/* end confdefs.h. */
8028#include <time.h>
8029
8030int
8031main ()
8032{
8033static struct tm ac_aggr;
8034if (ac_aggr.tm_gmtoff)
8035return 0;
8036 ;
8037 return 0;
8038}
8039_ACEOF
8040rm -f conftest.$ac_objext
8041if { (ac_try="$ac_compile"
8042case "(($ac_try" in
8043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8044 *) ac_try_echo=$ac_try;;
8045esac
8046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8047 (eval "$ac_compile") 2>conftest.er1
8048 ac_status=$?
8049 grep -v '^ *+' conftest.er1 >conftest.err
8050 rm -f conftest.er1
8051 cat conftest.err >&5
8052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8053 (exit $ac_status); } && {
8054 test -z "$ac_c_werror_flag" ||
8055 test ! -s conftest.err
8056 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
8057 ac_cv_member_struct_tm_tm_gmtoff=yes
8058else
8059 echo "$as_me: failed program was:" >&5
8060sed 's/^/| /' conftest.$ac_ext >&5
8061
8062 cat >conftest.$ac_ext <<_ACEOF
8063/* confdefs.h. */
8064_ACEOF
8065cat confdefs.h >>conftest.$ac_ext
8066cat >>conftest.$ac_ext <<_ACEOF
8067/* end confdefs.h. */
8068#include <time.h>
8069
8070int
8071main ()
8072{
8073static struct tm ac_aggr;
8074if (sizeof ac_aggr.tm_gmtoff)
6bae0ccf 8075return 0;
8799b3e4
CW
8076 ;
8077 return 0;
8078}
8079_ACEOF
6bae0ccf 8080rm -f conftest.$ac_objext
ca81d7a0
JD
8081if { (ac_try="$ac_compile"
8082case "(($ac_try" in
8083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8084 *) ac_try_echo=$ac_try;;
8085esac
8086eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8087 (eval "$ac_compile") 2>conftest.er1
8799b3e4 8088 ac_status=$?
edfaf76d
LK
8089 grep -v '^ *+' conftest.er1 >conftest.err
8090 rm -f conftest.er1
8091 cat conftest.err >&5
c0d27fcc 8092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8093 (exit $ac_status); } && {
8094 test -z "$ac_c_werror_flag" ||
8095 test ! -s conftest.err
8096 } && test -s conftest.$ac_objext; then
6bae0ccf 8097 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
8098else
8099 echo "$as_me: failed program was:" >&5
19650fd6
AS
8100sed 's/^/| /' conftest.$ac_ext >&5
8101
ca81d7a0 8102 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 8103fi
ca81d7a0
JD
8104
8105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8106fi
ca81d7a0
JD
8107
8108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 8109fi
ca81d7a0
JD
8110{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
8111echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
8112if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
8113
8114cat >>confdefs.h <<\_ACEOF
8115#define HAVE_TM_GMTOFF 1
8116_ACEOF
8117
8118fi
8119
ca81d7a0
JD
8120{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
8121echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
8122if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
8123 echo $ECHO_N "(cached) $ECHO_C" >&6
8124else
8125 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8126/* confdefs.h. */
8127_ACEOF
8128cat confdefs.h >>conftest.$ac_ext
8129cat >>conftest.$ac_ext <<_ACEOF
8130/* end confdefs.h. */
7862d3a8
AS
8131$ac_includes_default
8132#if HAVE_SYS_SOCKET_H
8133#include <sys/socket.h>
8134#endif
8135#if HAVE_NET_IF_H
96f3a036 8136#include <net/if.h>
7862d3a8 8137#endif
96f3a036
DL
8138
8139int
8140main ()
8141{
8142static struct ifreq ac_aggr;
8143if (ac_aggr.ifr_flags)
8144return 0;
8145 ;
8146 return 0;
8147}
8148_ACEOF
8149rm -f conftest.$ac_objext
ca81d7a0
JD
8150if { (ac_try="$ac_compile"
8151case "(($ac_try" in
8152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8153 *) ac_try_echo=$ac_try;;
8154esac
8155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8156 (eval "$ac_compile") 2>conftest.er1
96f3a036 8157 ac_status=$?
edfaf76d
LK
8158 grep -v '^ *+' conftest.er1 >conftest.err
8159 rm -f conftest.er1
8160 cat conftest.err >&5
96f3a036 8161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8162 (exit $ac_status); } && {
8163 test -z "$ac_c_werror_flag" ||
8164 test ! -s conftest.err
8165 } && test -s conftest.$ac_objext; then
96f3a036
DL
8166 ac_cv_member_struct_ifreq_ifr_flags=yes
8167else
8168 echo "$as_me: failed program was:" >&5
8169sed 's/^/| /' conftest.$ac_ext >&5
8170
ca81d7a0 8171 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8172/* confdefs.h. */
8173_ACEOF
8174cat confdefs.h >>conftest.$ac_ext
8175cat >>conftest.$ac_ext <<_ACEOF
8176/* end confdefs.h. */
7862d3a8
AS
8177$ac_includes_default
8178#if HAVE_SYS_SOCKET_H
8179#include <sys/socket.h>
8180#endif
8181#if HAVE_NET_IF_H
96f3a036 8182#include <net/if.h>
7862d3a8 8183#endif
96f3a036
DL
8184
8185int
8186main ()
8187{
8188static struct ifreq ac_aggr;
8189if (sizeof ac_aggr.ifr_flags)
8190return 0;
8191 ;
8192 return 0;
8193}
8194_ACEOF
8195rm -f conftest.$ac_objext
ca81d7a0
JD
8196if { (ac_try="$ac_compile"
8197case "(($ac_try" in
8198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8199 *) ac_try_echo=$ac_try;;
8200esac
8201eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8202 (eval "$ac_compile") 2>conftest.er1
96f3a036 8203 ac_status=$?
edfaf76d
LK
8204 grep -v '^ *+' conftest.er1 >conftest.err
8205 rm -f conftest.er1
8206 cat conftest.err >&5
96f3a036 8207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8208 (exit $ac_status); } && {
8209 test -z "$ac_c_werror_flag" ||
8210 test ! -s conftest.err
8211 } && test -s conftest.$ac_objext; then
96f3a036
DL
8212 ac_cv_member_struct_ifreq_ifr_flags=yes
8213else
8214 echo "$as_me: failed program was:" >&5
8215sed 's/^/| /' conftest.$ac_ext >&5
8216
ca81d7a0 8217 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8218fi
ca81d7a0
JD
8219
8220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8221fi
ca81d7a0
JD
8222
8223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8224fi
ca81d7a0
JD
8225{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8226echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8227if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8228
8229cat >>confdefs.h <<_ACEOF
8230#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8231_ACEOF
8232
8233
8234fi
ca81d7a0
JD
8235{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8236echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8237if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8238 echo $ECHO_N "(cached) $ECHO_C" >&6
8239else
8240 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8241/* confdefs.h. */
8242_ACEOF
8243cat confdefs.h >>conftest.$ac_ext
8244cat >>conftest.$ac_ext <<_ACEOF
8245/* end confdefs.h. */
7862d3a8
AS
8246$ac_includes_default
8247#if HAVE_SYS_SOCKET_H
8248#include <sys/socket.h>
8249#endif
8250#if HAVE_NET_IF_H
96f3a036 8251#include <net/if.h>
7862d3a8 8252#endif
96f3a036
DL
8253
8254int
8255main ()
8256{
8257static struct ifreq ac_aggr;
8258if (ac_aggr.ifr_hwaddr)
8259return 0;
8260 ;
8261 return 0;
8262}
8263_ACEOF
8264rm -f conftest.$ac_objext
ca81d7a0
JD
8265if { (ac_try="$ac_compile"
8266case "(($ac_try" in
8267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8268 *) ac_try_echo=$ac_try;;
8269esac
8270eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8271 (eval "$ac_compile") 2>conftest.er1
96f3a036 8272 ac_status=$?
edfaf76d
LK
8273 grep -v '^ *+' conftest.er1 >conftest.err
8274 rm -f conftest.er1
8275 cat conftest.err >&5
96f3a036 8276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8277 (exit $ac_status); } && {
8278 test -z "$ac_c_werror_flag" ||
8279 test ! -s conftest.err
8280 } && test -s conftest.$ac_objext; then
96f3a036
DL
8281 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8282else
8283 echo "$as_me: failed program was:" >&5
8284sed 's/^/| /' conftest.$ac_ext >&5
8285
ca81d7a0 8286 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8287/* confdefs.h. */
8288_ACEOF
8289cat confdefs.h >>conftest.$ac_ext
8290cat >>conftest.$ac_ext <<_ACEOF
8291/* end confdefs.h. */
7862d3a8
AS
8292$ac_includes_default
8293#if HAVE_SYS_SOCKET_H
8294#include <sys/socket.h>
8295#endif
8296#if HAVE_NET_IF_H
96f3a036 8297#include <net/if.h>
7862d3a8 8298#endif
96f3a036
DL
8299
8300int
8301main ()
8302{
8303static struct ifreq ac_aggr;
8304if (sizeof ac_aggr.ifr_hwaddr)
8305return 0;
8306 ;
8307 return 0;
8308}
8309_ACEOF
8310rm -f conftest.$ac_objext
ca81d7a0
JD
8311if { (ac_try="$ac_compile"
8312case "(($ac_try" in
8313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8314 *) ac_try_echo=$ac_try;;
8315esac
8316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8317 (eval "$ac_compile") 2>conftest.er1
96f3a036 8318 ac_status=$?
edfaf76d
LK
8319 grep -v '^ *+' conftest.er1 >conftest.err
8320 rm -f conftest.er1
8321 cat conftest.err >&5
96f3a036 8322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8323 (exit $ac_status); } && {
8324 test -z "$ac_c_werror_flag" ||
8325 test ! -s conftest.err
8326 } && test -s conftest.$ac_objext; then
96f3a036
DL
8327 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8328else
8329 echo "$as_me: failed program was:" >&5
8330sed 's/^/| /' conftest.$ac_ext >&5
8331
ca81d7a0 8332 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8333fi
ca81d7a0
JD
8334
8335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8336fi
ca81d7a0
JD
8337
8338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8339fi
ca81d7a0
JD
8340{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8341echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8342if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8343
8344cat >>confdefs.h <<_ACEOF
8345#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8346_ACEOF
8347
8348
8349fi
ca81d7a0
JD
8350{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8351echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8352if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8353 echo $ECHO_N "(cached) $ECHO_C" >&6
8354else
8355 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8356/* confdefs.h. */
8357_ACEOF
8358cat confdefs.h >>conftest.$ac_ext
8359cat >>conftest.$ac_ext <<_ACEOF
8360/* end confdefs.h. */
7862d3a8
AS
8361$ac_includes_default
8362#if HAVE_SYS_SOCKET_H
8363#include <sys/socket.h>
8364#endif
8365#if HAVE_NET_IF_H
96f3a036 8366#include <net/if.h>
7862d3a8 8367#endif
96f3a036
DL
8368
8369int
8370main ()
8371{
8372static struct ifreq ac_aggr;
8373if (ac_aggr.ifr_netmask)
8374return 0;
8375 ;
8376 return 0;
8377}
8378_ACEOF
8379rm -f conftest.$ac_objext
ca81d7a0
JD
8380if { (ac_try="$ac_compile"
8381case "(($ac_try" in
8382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8383 *) ac_try_echo=$ac_try;;
8384esac
8385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8386 (eval "$ac_compile") 2>conftest.er1
96f3a036 8387 ac_status=$?
edfaf76d
LK
8388 grep -v '^ *+' conftest.er1 >conftest.err
8389 rm -f conftest.er1
8390 cat conftest.err >&5
96f3a036 8391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8392 (exit $ac_status); } && {
8393 test -z "$ac_c_werror_flag" ||
8394 test ! -s conftest.err
8395 } && test -s conftest.$ac_objext; then
96f3a036
DL
8396 ac_cv_member_struct_ifreq_ifr_netmask=yes
8397else
8398 echo "$as_me: failed program was:" >&5
8399sed 's/^/| /' conftest.$ac_ext >&5
8400
ca81d7a0 8401 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8402/* confdefs.h. */
8403_ACEOF
8404cat confdefs.h >>conftest.$ac_ext
8405cat >>conftest.$ac_ext <<_ACEOF
8406/* end confdefs.h. */
7862d3a8
AS
8407$ac_includes_default
8408#if HAVE_SYS_SOCKET_H
8409#include <sys/socket.h>
8410#endif
8411#if HAVE_NET_IF_H
96f3a036 8412#include <net/if.h>
7862d3a8 8413#endif
96f3a036
DL
8414
8415int
8416main ()
8417{
8418static struct ifreq ac_aggr;
8419if (sizeof ac_aggr.ifr_netmask)
8420return 0;
8421 ;
8422 return 0;
8423}
8424_ACEOF
8425rm -f conftest.$ac_objext
ca81d7a0
JD
8426if { (ac_try="$ac_compile"
8427case "(($ac_try" in
8428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8429 *) ac_try_echo=$ac_try;;
8430esac
8431eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8432 (eval "$ac_compile") 2>conftest.er1
96f3a036 8433 ac_status=$?
edfaf76d
LK
8434 grep -v '^ *+' conftest.er1 >conftest.err
8435 rm -f conftest.er1
8436 cat conftest.err >&5
96f3a036 8437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8438 (exit $ac_status); } && {
8439 test -z "$ac_c_werror_flag" ||
8440 test ! -s conftest.err
8441 } && test -s conftest.$ac_objext; then
96f3a036
DL
8442 ac_cv_member_struct_ifreq_ifr_netmask=yes
8443else
8444 echo "$as_me: failed program was:" >&5
8445sed 's/^/| /' conftest.$ac_ext >&5
8446
ca81d7a0 8447 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8448fi
ca81d7a0
JD
8449
8450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8451fi
ca81d7a0
JD
8452
8453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8454fi
ca81d7a0
JD
8455{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8456echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8457if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8458
8459cat >>confdefs.h <<_ACEOF
8460#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8461_ACEOF
8462
8463
8464fi
ca81d7a0
JD
8465{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8466echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8467if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8468 echo $ECHO_N "(cached) $ECHO_C" >&6
8469else
8470 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8471/* confdefs.h. */
8472_ACEOF
8473cat confdefs.h >>conftest.$ac_ext
8474cat >>conftest.$ac_ext <<_ACEOF
8475/* end confdefs.h. */
7862d3a8
AS
8476$ac_includes_default
8477#if HAVE_SYS_SOCKET_H
8478#include <sys/socket.h>
8479#endif
8480#if HAVE_NET_IF_H
96f3a036 8481#include <net/if.h>
7862d3a8 8482#endif
96f3a036
DL
8483
8484int
8485main ()
8486{
8487static struct ifreq ac_aggr;
8488if (ac_aggr.ifr_broadaddr)
8489return 0;
8490 ;
8491 return 0;
8492}
8493_ACEOF
8494rm -f conftest.$ac_objext
ca81d7a0
JD
8495if { (ac_try="$ac_compile"
8496case "(($ac_try" in
8497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8498 *) ac_try_echo=$ac_try;;
8499esac
8500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8501 (eval "$ac_compile") 2>conftest.er1
96f3a036 8502 ac_status=$?
edfaf76d
LK
8503 grep -v '^ *+' conftest.er1 >conftest.err
8504 rm -f conftest.er1
8505 cat conftest.err >&5
96f3a036 8506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8507 (exit $ac_status); } && {
8508 test -z "$ac_c_werror_flag" ||
8509 test ! -s conftest.err
8510 } && test -s conftest.$ac_objext; then
96f3a036
DL
8511 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8512else
8513 echo "$as_me: failed program was:" >&5
8514sed 's/^/| /' conftest.$ac_ext >&5
8515
ca81d7a0 8516 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8517/* confdefs.h. */
8518_ACEOF
8519cat confdefs.h >>conftest.$ac_ext
8520cat >>conftest.$ac_ext <<_ACEOF
8521/* end confdefs.h. */
7862d3a8
AS
8522$ac_includes_default
8523#if HAVE_SYS_SOCKET_H
8524#include <sys/socket.h>
8525#endif
8526#if HAVE_NET_IF_H
96f3a036 8527#include <net/if.h>
7862d3a8 8528#endif
96f3a036
DL
8529
8530int
8531main ()
8532{
8533static struct ifreq ac_aggr;
8534if (sizeof ac_aggr.ifr_broadaddr)
8535return 0;
8536 ;
8537 return 0;
8538}
8539_ACEOF
8540rm -f conftest.$ac_objext
ca81d7a0
JD
8541if { (ac_try="$ac_compile"
8542case "(($ac_try" in
8543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8544 *) ac_try_echo=$ac_try;;
8545esac
8546eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8547 (eval "$ac_compile") 2>conftest.er1
96f3a036 8548 ac_status=$?
edfaf76d
LK
8549 grep -v '^ *+' conftest.er1 >conftest.err
8550 rm -f conftest.er1
8551 cat conftest.err >&5
96f3a036 8552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8553 (exit $ac_status); } && {
8554 test -z "$ac_c_werror_flag" ||
8555 test ! -s conftest.err
8556 } && test -s conftest.$ac_objext; then
96f3a036
DL
8557 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8558else
8559 echo "$as_me: failed program was:" >&5
8560sed 's/^/| /' conftest.$ac_ext >&5
8561
ca81d7a0 8562 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8563fi
ca81d7a0
JD
8564
8565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8566fi
ca81d7a0
JD
8567
8568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8569fi
ca81d7a0
JD
8570{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8571echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8572if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8573
8574cat >>confdefs.h <<_ACEOF
8575#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8576_ACEOF
8577
8578
8579fi
ca81d7a0
JD
8580{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8581echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8582if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8583 echo $ECHO_N "(cached) $ECHO_C" >&6
8584else
8585 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8586/* confdefs.h. */
8587_ACEOF
8588cat confdefs.h >>conftest.$ac_ext
8589cat >>conftest.$ac_ext <<_ACEOF
8590/* end confdefs.h. */
7862d3a8
AS
8591$ac_includes_default
8592#if HAVE_SYS_SOCKET_H
8593#include <sys/socket.h>
8594#endif
8595#if HAVE_NET_IF_H
96f3a036 8596#include <net/if.h>
7862d3a8 8597#endif
96f3a036
DL
8598
8599int
8600main ()
8601{
8602static struct ifreq ac_aggr;
8603if (ac_aggr.ifr_addr)
8604return 0;
8605 ;
8606 return 0;
8607}
8608_ACEOF
8609rm -f conftest.$ac_objext
ca81d7a0
JD
8610if { (ac_try="$ac_compile"
8611case "(($ac_try" in
8612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8613 *) ac_try_echo=$ac_try;;
8614esac
8615eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8616 (eval "$ac_compile") 2>conftest.er1
96f3a036 8617 ac_status=$?
edfaf76d
LK
8618 grep -v '^ *+' conftest.er1 >conftest.err
8619 rm -f conftest.er1
8620 cat conftest.err >&5
96f3a036 8621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8622 (exit $ac_status); } && {
8623 test -z "$ac_c_werror_flag" ||
8624 test ! -s conftest.err
8625 } && test -s conftest.$ac_objext; then
96f3a036
DL
8626 ac_cv_member_struct_ifreq_ifr_addr=yes
8627else
8628 echo "$as_me: failed program was:" >&5
8629sed 's/^/| /' conftest.$ac_ext >&5
8630
ca81d7a0 8631 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8632/* confdefs.h. */
8633_ACEOF
8634cat confdefs.h >>conftest.$ac_ext
8635cat >>conftest.$ac_ext <<_ACEOF
8636/* end confdefs.h. */
7862d3a8
AS
8637$ac_includes_default
8638#if HAVE_SYS_SOCKET_H
8639#include <sys/socket.h>
8640#endif
8641#if HAVE_NET_IF_H
96f3a036 8642#include <net/if.h>
7862d3a8 8643#endif
96f3a036
DL
8644
8645int
8646main ()
8647{
8648static struct ifreq ac_aggr;
8649if (sizeof ac_aggr.ifr_addr)
8650return 0;
8651 ;
8652 return 0;
8653}
8654_ACEOF
8655rm -f conftest.$ac_objext
ca81d7a0
JD
8656if { (ac_try="$ac_compile"
8657case "(($ac_try" in
8658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8659 *) ac_try_echo=$ac_try;;
8660esac
8661eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8662 (eval "$ac_compile") 2>conftest.er1
96f3a036 8663 ac_status=$?
edfaf76d
LK
8664 grep -v '^ *+' conftest.er1 >conftest.err
8665 rm -f conftest.er1
8666 cat conftest.err >&5
96f3a036 8667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8668 (exit $ac_status); } && {
8669 test -z "$ac_c_werror_flag" ||
8670 test ! -s conftest.err
8671 } && test -s conftest.$ac_objext; then
96f3a036
DL
8672 ac_cv_member_struct_ifreq_ifr_addr=yes
8673else
8674 echo "$as_me: failed program was:" >&5
8675sed 's/^/| /' conftest.$ac_ext >&5
8676
ca81d7a0 8677 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8678fi
ca81d7a0
JD
8679
8680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8681fi
ca81d7a0
JD
8682
8683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8684fi
ca81d7a0
JD
8685{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8686echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8687if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8688
8689cat >>confdefs.h <<_ACEOF
8690#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8691_ACEOF
8692
8693
8694fi
8695
8799b3e4 8696
8799b3e4 8697
ca81d7a0
JD
8698{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8699echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8700if test "$ac_cv_prog_cc_c89" != no; then
8701 { echo "$as_me:$LINENO: result: yes" >&5
8702echo "${ECHO_T}yes" >&6; }
98418dba 8703
c0d27fcc 8704cat >>confdefs.h <<\_ACEOF
98418dba 8705#define PROTOTYPES 1
c0d27fcc
MR
8706_ACEOF
8707
8708
8709cat >>confdefs.h <<\_ACEOF
8710#define __PROTOTYPES 1
8711_ACEOF
98418dba
CW
8712
8713else
ca81d7a0
JD
8714 { echo "$as_me:$LINENO: result: no" >&5
8715echo "${ECHO_T}no" >&6; }
98418dba
CW
8716fi
8717
ca81d7a0
JD
8718{ echo "$as_me:$LINENO: checking for working volatile" >&5
8719echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8720if test "${ac_cv_c_volatile+set}" = set; then
8721 echo $ECHO_N "(cached) $ECHO_C" >&6
8722else
8723 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8724/* confdefs.h. */
8725_ACEOF
8726cat confdefs.h >>conftest.$ac_ext
8727cat >>conftest.$ac_ext <<_ACEOF
8728/* end confdefs.h. */
98418dba 8729
98418dba
CW
8730int
8731main ()
8732{
8733
8734volatile int x;
ca81d7a0
JD
8735int * volatile y = (int *) 0;
8736return !x && !y;
98418dba
CW
8737 ;
8738 return 0;
8739}
8740_ACEOF
8741rm -f conftest.$ac_objext
ca81d7a0
JD
8742if { (ac_try="$ac_compile"
8743case "(($ac_try" in
8744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8745 *) ac_try_echo=$ac_try;;
8746esac
8747eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8748 (eval "$ac_compile") 2>conftest.er1
98418dba 8749 ac_status=$?
edfaf76d
LK
8750 grep -v '^ *+' conftest.er1 >conftest.err
8751 rm -f conftest.er1
8752 cat conftest.err >&5
c0d27fcc 8753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8754 (exit $ac_status); } && {
8755 test -z "$ac_c_werror_flag" ||
8756 test ! -s conftest.err
8757 } && test -s conftest.$ac_objext; then
98418dba
CW
8758 ac_cv_c_volatile=yes
8759else
8760 echo "$as_me: failed program was:" >&5
19650fd6
AS
8761sed 's/^/| /' conftest.$ac_ext >&5
8762
ca81d7a0 8763 ac_cv_c_volatile=no
98418dba 8764fi
ca81d7a0
JD
8765
8766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8767fi
ca81d7a0
JD
8768{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8769echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8770if test $ac_cv_c_volatile = no; then
8771
c0d27fcc 8772cat >>confdefs.h <<\_ACEOF
98418dba 8773#define volatile
c0d27fcc 8774_ACEOF
98418dba
CW
8775
8776fi
8777
ca81d7a0
JD
8778{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8779echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8780if test "${ac_cv_c_const+set}" = set; then
8781 echo $ECHO_N "(cached) $ECHO_C" >&6
8782else
8783 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8784/* confdefs.h. */
8785_ACEOF
8786cat confdefs.h >>conftest.$ac_ext
8787cat >>conftest.$ac_ext <<_ACEOF
8788/* end confdefs.h. */
98418dba 8789
98418dba
CW
8790int
8791main ()
8792{
8793/* FIXME: Include the comments suggested by Paul. */
8794#ifndef __cplusplus
8795 /* Ultrix mips cc rejects this. */
8796 typedef int charset[2];
f053c89f 8797 const charset cs;
98418dba 8798 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
8799 char const *const *pcpcc;
8800 char **ppc;
98418dba
CW
8801 /* NEC SVR4.0.2 mips cc rejects this. */
8802 struct point {int x, y;};
8803 static struct point const zero = {0,0};
8804 /* AIX XL C 1.02.0.0 rejects this.
8805 It does not let you subtract one const X* pointer from another in
8806 an arm of an if-expression whose if-part is not a constant
8807 expression */
8808 const char *g = "string";
f053c89f 8809 pcpcc = &g + (g ? g-g : 0);
98418dba 8810 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
8811 ++pcpcc;
8812 ppc = (char**) pcpcc;
8813 pcpcc = (char const *const *) ppc;
98418dba
CW
8814 { /* SCO 3.2v4 cc rejects this. */
8815 char *t;
8816 char const *s = 0 ? (char *) 0 : (char const *) 0;
8817
8818 *t++ = 0;
ca81d7a0 8819 if (s) return 0;
98418dba
CW
8820 }
8821 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8822 int x[] = {25, 17};
8823 const int *foo = &x[0];
8824 ++foo;
8825 }
8826 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8827 typedef const int *iptr;
8828 iptr p = 0;
8829 ++p;
8830 }
8831 { /* AIX XL C 1.02.0.0 rejects this saying
8832 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8833 struct s { int j; const int *ap[3]; };
8834 struct s *b; b->j = 5;
8835 }
8836 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8837 const int foo = 10;
ca81d7a0 8838 if (!foo) return 0;
98418dba 8839 }
f053c89f 8840 return !cs[0] && !zero.x;
98418dba
CW
8841#endif
8842
8843 ;
8844 return 0;
8845}
8846_ACEOF
8847rm -f conftest.$ac_objext
ca81d7a0
JD
8848if { (ac_try="$ac_compile"
8849case "(($ac_try" in
8850 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8851 *) ac_try_echo=$ac_try;;
8852esac
8853eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8854 (eval "$ac_compile") 2>conftest.er1
98418dba 8855 ac_status=$?
edfaf76d
LK
8856 grep -v '^ *+' conftest.er1 >conftest.err
8857 rm -f conftest.er1
8858 cat conftest.err >&5
c0d27fcc 8859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8860 (exit $ac_status); } && {
8861 test -z "$ac_c_werror_flag" ||
8862 test ! -s conftest.err
8863 } && test -s conftest.$ac_objext; then
98418dba
CW
8864 ac_cv_c_const=yes
8865else
8866 echo "$as_me: failed program was:" >&5
19650fd6
AS
8867sed 's/^/| /' conftest.$ac_ext >&5
8868
ca81d7a0 8869 ac_cv_c_const=no
98418dba 8870fi
ca81d7a0
JD
8871
8872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8873fi
ca81d7a0
JD
8874{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8875echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8876if test $ac_cv_c_const = no; then
8877
c0d27fcc 8878cat >>confdefs.h <<\_ACEOF
98418dba 8879#define const
c0d27fcc 8880_ACEOF
98418dba
CW
8881
8882fi
8883
ca81d7a0
JD
8884{ echo "$as_me:$LINENO: checking for void * support" >&5
8885echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
8886if test "${emacs_cv_void_star+set}" = set; then
8887 echo $ECHO_N "(cached) $ECHO_C" >&6
8888else
8889 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8890/* confdefs.h. */
8891_ACEOF
8892cat confdefs.h >>conftest.$ac_ext
8893cat >>conftest.$ac_ext <<_ACEOF
8894/* end confdefs.h. */
98418dba 8895
98418dba
CW
8896int
8897main ()
8898{
8899void * foo;
8900 ;
8901 return 0;
8902}
8903_ACEOF
8904rm -f conftest.$ac_objext
ca81d7a0
JD
8905if { (ac_try="$ac_compile"
8906case "(($ac_try" in
8907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8908 *) ac_try_echo=$ac_try;;
8909esac
8910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8911 (eval "$ac_compile") 2>conftest.er1
98418dba 8912 ac_status=$?
edfaf76d
LK
8913 grep -v '^ *+' conftest.er1 >conftest.err
8914 rm -f conftest.er1
8915 cat conftest.err >&5
c0d27fcc 8916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8917 (exit $ac_status); } && {
8918 test -z "$ac_c_werror_flag" ||
8919 test ! -s conftest.err
8920 } && test -s conftest.$ac_objext; then
98418dba
CW
8921 emacs_cv_void_star=yes
8922else
8923 echo "$as_me: failed program was:" >&5
19650fd6
AS
8924sed 's/^/| /' conftest.$ac_ext >&5
8925
ca81d7a0 8926 emacs_cv_void_star=no
98418dba 8927fi
ca81d7a0
JD
8928
8929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8930fi
ca81d7a0
JD
8931{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
8932echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 8933if test $emacs_cv_void_star = yes; then
c0d27fcc 8934 cat >>confdefs.h <<\_ACEOF
98418dba 8935#define POINTER_TYPE void
c0d27fcc 8936_ACEOF
98418dba
CW
8937
8938else
c0d27fcc 8939 cat >>confdefs.h <<\_ACEOF
98418dba 8940#define POINTER_TYPE char
c0d27fcc 8941_ACEOF
98418dba
CW
8942
8943fi
8944
c0d27fcc 8945
4494a266
JD
8946
8947
cd958eb3 8948
ca81d7a0
JD
8949{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8950echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
8951set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
8952if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
8953 echo $ECHO_N "(cached) $ECHO_C" >&6
8954else
c0d27fcc 8955 cat >conftest.make <<\_ACEOF
ca81d7a0 8956SHELL = /bin/sh
98418dba 8957all:
ca81d7a0 8958 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 8959_ACEOF
98418dba 8960# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8961case `${MAKE-make} -f conftest.make 2>/dev/null` in
8962 *@@@%%%=?*=@@@%%%*)
8963 eval ac_cv_prog_make_${ac_make}_set=yes;;
8964 *)
8965 eval ac_cv_prog_make_${ac_make}_set=no;;
8966esac
4b411bfe 8967rm -f conftest.make
98418dba 8968fi
ca81d7a0
JD
8969if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
8970 { echo "$as_me:$LINENO: result: yes" >&5
8971echo "${ECHO_T}yes" >&6; }
98418dba
CW
8972 SET_MAKE=
8973else
ca81d7a0
JD
8974 { echo "$as_me:$LINENO: result: no" >&5
8975echo "${ECHO_T}no" >&6; }
98418dba
CW
8976 SET_MAKE="MAKE=${MAKE-make}"
8977fi
8978
c0d27fcc 8979
ca81d7a0
JD
8980{ echo "$as_me:$LINENO: checking for long file names" >&5
8981echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
8982if test "${ac_cv_sys_long_file_names+set}" = set; then
8983 echo $ECHO_N "(cached) $ECHO_C" >&6
8984else
8985 ac_cv_sys_long_file_names=yes
8986# Test for long file names in all the places we know might matter:
8987# . the current directory, where building will happen
8988# $prefix/lib where we will be installing things
8989# $exec_prefix/lib likewise
98418dba 8990# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
8991# /tmp where it might want to write temporary files
8992# /var/tmp likewise
8993# /usr/tmp likewise
ca81d7a0
JD
8994for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8995 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8996 # in the usual case where exec_prefix is '${prefix}'.
8997 case $ac_dir in #(
8998 . | /* | ?:[\\/]*) ;; #(
8999 *) continue;;
9000 esac
9001 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 9002 ac_xdir=$ac_dir/cf$$
ca81d7a0 9003 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
9004 ac_tf1=$ac_xdir/conftest9012345
9005 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 9006 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 9007 ac_cv_sys_long_file_names=no
ca81d7a0
JD
9008 rm -f -r "$ac_xdir" 2>/dev/null
9009 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
9010done
9011fi
ca81d7a0
JD
9012{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
9013echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
9014if test $ac_cv_sys_long_file_names = yes; then
9015
c0d27fcc 9016cat >>confdefs.h <<\_ACEOF
98418dba 9017#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 9018_ACEOF
98418dba
CW
9019
9020fi
9021
c0d27fcc 9022
98418dba
CW
9023#### Choose a window system.
9024
ca81d7a0
JD
9025{ echo "$as_me:$LINENO: checking for X" >&5
9026echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 9027
c0d27fcc 9028
ca81d7a0 9029# Check whether --with-x was given.
98418dba 9030if test "${with_x+set}" = set; then
ca81d7a0
JD
9031 withval=$with_x;
9032fi
98418dba 9033
98418dba
CW
9034# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9035if test "x$with_x" = xno; then
9036 # The user explicitly disabled X.
9037 have_x=disabled
9038else
ca81d7a0
JD
9039 case $x_includes,$x_libraries in #(
9040 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
9041echo "$as_me: error: Cannot use X directory names containing '" >&2;}
9042 { (exit 1); exit 1; }; };; #(
9043 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
9044 echo $ECHO_N "(cached) $ECHO_C" >&6
9045else
9046 # One or both of the vars are not set, and there is no cached value.
9047ac_x_includes=no ac_x_libraries=no
ca81d7a0 9048rm -f -r conftest.dir
98418dba
CW
9049if mkdir conftest.dir; then
9050 cd conftest.dir
c0d27fcc 9051 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
9052incroot:
9053 @echo incroot='${INCROOT}'
9054usrlibdir:
9055 @echo usrlibdir='${USRLIBDIR}'
9056libdir:
9057 @echo libdir='${LIBDIR}'
9058_ACEOF
9059 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 9060 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
9061 for ac_var in incroot usrlibdir libdir; do
9062 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9063 done
98418dba
CW
9064 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9065 for ac_extension in a so sl; do
ca81d7a0
JD
9066 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9067 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 9068 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
9069 fi
9070 done
9071 # Screen out bogus values from the imake configuration. They are
9072 # bogus both because they are the default anyway, and because
9073 # using them would break gcc on systems where it needs fixed includes.
9074 case $ac_im_incroot in
ca81d7a0 9075 /usr/include) ac_x_includes= ;;
98418dba
CW
9076 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9077 esac
9078 case $ac_im_usrlibdir in
9079 /usr/lib | /lib) ;;
9080 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9081 esac
9082 fi
9083 cd ..
ca81d7a0 9084 rm -f -r conftest.dir
98418dba
CW
9085fi
9086
9087# Standard set of common directories for X headers.
9088# Check X11 before X11Rn because it is often a symlink to the current release.
9089ac_x_header_dirs='
9090/usr/X11/include
9091/usr/X11R6/include
9092/usr/X11R5/include
9093/usr/X11R4/include
9094
9095/usr/include/X11
9096/usr/include/X11R6
9097/usr/include/X11R5
9098/usr/include/X11R4
9099
9100/usr/local/X11/include
9101/usr/local/X11R6/include
9102/usr/local/X11R5/include
9103/usr/local/X11R4/include
9104
9105/usr/local/include/X11
9106/usr/local/include/X11R6
9107/usr/local/include/X11R5
9108/usr/local/include/X11R4
9109
9110/usr/X386/include
9111/usr/x386/include
9112/usr/XFree86/include/X11
9113
9114/usr/include
9115/usr/local/include
9116/usr/unsupported/include
9117/usr/athena/include
9118/usr/local/x11r5/include
9119/usr/lpp/Xamples/include
9120
9121/usr/openwin/include
9122/usr/openwin/share/include'
9123
9124if test "$ac_x_includes" = no; then
ca81d7a0 9125 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
9126 # First, try using that file with no special directory specified.
9127 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9128/* confdefs.h. */
9129_ACEOF
9130cat confdefs.h >>conftest.$ac_ext
9131cat >>conftest.$ac_ext <<_ACEOF
9132/* end confdefs.h. */
ca81d7a0 9133#include <X11/Xlib.h>
98418dba 9134_ACEOF
ca81d7a0
JD
9135if { (ac_try="$ac_cpp conftest.$ac_ext"
9136case "(($ac_try" in
9137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9138 *) ac_try_echo=$ac_try;;
9139esac
9140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9141 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9142 ac_status=$?
6bae0ccf 9143 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9144 rm -f conftest.er1
9145 cat conftest.err >&5
c0d27fcc 9146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9147 (exit $ac_status); } >/dev/null && {
9148 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9149 test ! -s conftest.err
9150 }; then
98418dba
CW
9151 # We can compile using X headers with no special include directory.
9152ac_x_includes=
9153else
9154 echo "$as_me: failed program was:" >&5
19650fd6
AS
9155sed 's/^/| /' conftest.$ac_ext >&5
9156
98418dba 9157 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 9158 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9159 ac_x_includes=$ac_dir
9160 break
9161 fi
9162done
9163fi
ca81d7a0 9164
98418dba
CW
9165rm -f conftest.err conftest.$ac_ext
9166fi # $ac_x_includes = no
9167
9168if test "$ac_x_libraries" = no; then
9169 # Check for the libraries.
9170 # See if we find them without any special options.
9171 # Don't add to $LIBS permanently.
9172 ac_save_LIBS=$LIBS
f053c89f 9173 LIBS="-lX11 $LIBS"
98418dba 9174 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9175/* confdefs.h. */
9176_ACEOF
9177cat confdefs.h >>conftest.$ac_ext
9178cat >>conftest.$ac_ext <<_ACEOF
9179/* end confdefs.h. */
ca81d7a0 9180#include <X11/Xlib.h>
98418dba
CW
9181int
9182main ()
9183{
ca81d7a0 9184XrmInitialize ()
98418dba
CW
9185 ;
9186 return 0;
9187}
9188_ACEOF
9189rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9190if { (ac_try="$ac_link"
9191case "(($ac_try" in
9192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9193 *) ac_try_echo=$ac_try;;
9194esac
9195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9196 (eval "$ac_link") 2>conftest.er1
98418dba 9197 ac_status=$?
edfaf76d
LK
9198 grep -v '^ *+' conftest.er1 >conftest.err
9199 rm -f conftest.er1
9200 cat conftest.err >&5
c0d27fcc 9201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9202 (exit $ac_status); } && {
9203 test -z "$ac_c_werror_flag" ||
9204 test ! -s conftest.err
9205 } && test -s conftest$ac_exeext &&
9206 $as_test_x conftest$ac_exeext; then
98418dba
CW
9207 LIBS=$ac_save_LIBS
9208# We can link X programs with no special library path.
9209ac_x_libraries=
9210else
9211 echo "$as_me: failed program was:" >&5
19650fd6
AS
9212sed 's/^/| /' conftest.$ac_ext >&5
9213
ca81d7a0 9214 LIBS=$ac_save_LIBS
98418dba
CW
9215for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9216do
9217 # Don't even attempt the hair of trying to link an X program!
9218 for ac_extension in a so sl; do
f053c89f 9219 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9220 ac_x_libraries=$ac_dir
9221 break 2
9222 fi
9223 done
9224done
9225fi
ca81d7a0 9226
f053c89f 9227rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9228 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9229fi # $ac_x_libraries = no
9230
ca81d7a0
JD
9231case $ac_x_includes,$ac_x_libraries in #(
9232 no,* | *,no | *\'*)
9233 # Didn't find X, or a directory has "'" in its name.
9234 ac_cv_have_x="have_x=no";; #(
9235 *)
9236 # Record where we found X for the cache.
9237 ac_cv_have_x="have_x=yes\
9238 ac_x_includes='$ac_x_includes'\
9239 ac_x_libraries='$ac_x_libraries'"
9240esac
4b411bfe 9241fi
ca81d7a0
JD
9242;; #(
9243 *) have_x=yes;;
9244 esac
98418dba
CW
9245 eval "$ac_cv_have_x"
9246fi # $with_x != no
9247
9248if test "$have_x" != yes; then
ca81d7a0
JD
9249 { echo "$as_me:$LINENO: result: $have_x" >&5
9250echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9251 no_x=yes
9252else
9253 # If each of the values was on the command line, it overrides each guess.
9254 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9255 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9256 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9257 ac_cv_have_x="have_x=yes\
9258 ac_x_includes='$x_includes'\
9259 ac_x_libraries='$x_libraries'"
9260 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9261echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9262fi
9263
9264if test "$no_x" = yes; then
9265 window_system=none
9266else
9267 window_system=x11
9268fi
9269
92d1ccf4
AS
9270if test "${x_libraries}" != NONE; then
9271 if test -n "${x_libraries}"; then
9272 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9273 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9274 fi
98418dba 9275 x_default_search_path=""
92d1ccf4
AS
9276 x_search_path=${x_libraries}
9277 if test -z "${x_search_path}"; then
9278 x_search_path=/usr/lib
9279 fi
9280 for x_library in `echo ${x_search_path}: | \
9281 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9282 x_search_path="\
9283${x_library}/X11/%L/%T/%N%C%S:\
9284${x_library}/X11/%l/%T/%N%C%S:\
9285${x_library}/X11/%T/%N%C%S:\
9286${x_library}/X11/%L/%T/%N%S:\
9287${x_library}/X11/%l/%T/%N%S:\
9288${x_library}/X11/%T/%N%S"
9289 if test x"${x_default_search_path}" = x; then
9290 x_default_search_path=${x_search_path}
9291 else
9292 x_default_search_path="${x_search_path}:${x_default_search_path}"
9293 fi
9294 done
9295fi
9296if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9297 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9298fi
9299
9300if test x"${x_includes}" = x; then
9301 bitmapdir=/usr/include/X11/bitmaps
9302else
9303 # accumulate include directories that have X11 bitmap subdirectories
9304 bmd_acc="dummyval"
9305 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9306 if test -d "${bmd}/X11/bitmaps"; then
9307 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9308 fi
9309 if test -d "${bmd}/bitmaps"; then
9310 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9311 fi
9312 done
9313 if test ${bmd_acc} != "dummyval"; then
9314 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9315 fi
9316fi
9317
5d6da11e 9318HAVE_CARBON=no
1d4d5604
YM
9319if test "${with_carbon}" != no; then
9320 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
ca81d7a0
JD
9321 { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9322echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9323if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9324 echo $ECHO_N "(cached) $ECHO_C" >&6
9325fi
ca81d7a0
JD
9326{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9327echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9328else
9329 # Is the header compilable?
ca81d7a0
JD
9330{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9331echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
5d6da11e
YM
9332cat >conftest.$ac_ext <<_ACEOF
9333/* confdefs.h. */
9334_ACEOF
9335cat confdefs.h >>conftest.$ac_ext
9336cat >>conftest.$ac_ext <<_ACEOF
9337/* end confdefs.h. */
9338$ac_includes_default
9339#include <Carbon/Carbon.h>
9340_ACEOF
9341rm -f conftest.$ac_objext
ca81d7a0
JD
9342if { (ac_try="$ac_compile"
9343case "(($ac_try" in
9344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9345 *) ac_try_echo=$ac_try;;
9346esac
9347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9348 (eval "$ac_compile") 2>conftest.er1
5d6da11e 9349 ac_status=$?
edfaf76d
LK
9350 grep -v '^ *+' conftest.er1 >conftest.err
9351 rm -f conftest.er1
9352 cat conftest.err >&5
5d6da11e 9353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9354 (exit $ac_status); } && {
9355 test -z "$ac_c_werror_flag" ||
9356 test ! -s conftest.err
9357 } && test -s conftest.$ac_objext; then
5d6da11e
YM
9358 ac_header_compiler=yes
9359else
9360 echo "$as_me: failed program was:" >&5
9361sed 's/^/| /' conftest.$ac_ext >&5
9362
ca81d7a0 9363 ac_header_compiler=no
5d6da11e 9364fi
ca81d7a0
JD
9365
9366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9367{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9368echo "${ECHO_T}$ac_header_compiler" >&6; }
5d6da11e
YM
9369
9370# Is the header present?
ca81d7a0
JD
9371{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9372echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
5d6da11e
YM
9373cat >conftest.$ac_ext <<_ACEOF
9374/* confdefs.h. */
9375_ACEOF
9376cat confdefs.h >>conftest.$ac_ext
9377cat >>conftest.$ac_ext <<_ACEOF
9378/* end confdefs.h. */
9379#include <Carbon/Carbon.h>
9380_ACEOF
ca81d7a0
JD
9381if { (ac_try="$ac_cpp conftest.$ac_ext"
9382case "(($ac_try" in
9383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9384 *) ac_try_echo=$ac_try;;
9385esac
9386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9387 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5d6da11e
YM
9388 ac_status=$?
9389 grep -v '^ *+' conftest.er1 >conftest.err
9390 rm -f conftest.er1
9391 cat conftest.err >&5
9392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9393 (exit $ac_status); } >/dev/null && {
9394 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9395 test ! -s conftest.err
9396 }; then
5d6da11e
YM
9397 ac_header_preproc=yes
9398else
9399 echo "$as_me: failed program was:" >&5
9400sed 's/^/| /' conftest.$ac_ext >&5
9401
9402 ac_header_preproc=no
9403fi
ca81d7a0 9404
5d6da11e 9405rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9406{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9407echo "${ECHO_T}$ac_header_preproc" >&6; }
5d6da11e
YM
9408
9409# So? What about this header?
edfaf76d
LK
9410case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9411 yes:no: )
5d6da11e
YM
9412 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9413echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9414 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
9415echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
9416 ac_header_preproc=yes
5d6da11e 9417 ;;
edfaf76d 9418 no:yes:* )
5d6da11e
YM
9419 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9420echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
9421 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9422echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9423 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
9424echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
9425 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
9426echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
9427 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9428echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9429 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
9430echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9431
5d6da11e
YM
9432 ;;
9433esac
ca81d7a0
JD
9434{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9435echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9436if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9437 echo $ECHO_N "(cached) $ECHO_C" >&6
9438else
9439 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
9440fi
ca81d7a0
JD
9441{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9442echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9443
9444fi
9445if test $ac_cv_header_Carbon_Carbon_h = yes; then
9446 HAVE_CARBON=yes
9447fi
9448
9449
1d4d5604
YM
9450fi
9451if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
9452 if test "${with_carbon+set}" != set \
9453 && test "${carbon_appdir_x+set}" != set; then
ec8fcb10
YM
9454 for var in with_x with_x_toolkit with_gtk with_xim \
9455 with_xpm with_jpeg with_tiff with_gif with_png; do
9456 if eval test \"\${$var+set}\" = set; then
9457 HAVE_CARBON=no
9458 break
9459 fi
9460 done
5d6da11e
YM
9461 fi
9462fi
1d4d5604
YM
9463if test "${HAVE_CARBON}" = yes; then
9464 window_system=mac
9465fi
9466
9467case "${window_system}" in
9468 x11 )
9469 HAVE_X_WINDOWS=yes
9470 HAVE_X11=yes
9471 case "${with_x_toolkit}" in
9472 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9473 motif ) USE_X_TOOLKIT=MOTIF ;;
9474 gtk ) with_gtk=yes
9475 USE_X_TOOLKIT=none ;;
9476 no ) USE_X_TOOLKIT=none ;;
9477 * ) USE_X_TOOLKIT=maybe ;;
9478 esac
9479 ;;
9480 mac | none )
9481 HAVE_X_WINDOWS=no
9482 HAVE_X11=no
9483 USE_X_TOOLKIT=none
9484 ;;
9485esac
9486
9487### If we're using X11, we should use the X menu package.
9488HAVE_MENUS=no
9489case ${HAVE_X11} in
9490 yes ) HAVE_MENUS=yes ;;
9491esac
9492
9493if test "${opsys}" = "hpux9"; then
9494 case "${x_libraries}" in
9495 *X11R4* )
9496 opsysfile="s/hpux9-x11r4.h"
9497 ;;
9498 esac
9499fi
9500
9501if test "${opsys}" = "hpux9shr"; then
9502 case "${x_libraries}" in
9503 *X11R4* )
9504 opsysfile="s/hpux9shxr4.h"
9505 ;;
9506 esac
9507fi
5d6da11e 9508
98418dba
CW
9509### Compute the unexec source name from the object name.
9510UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
9511
9512# Do the opsystem or machine files prohibit the use of the GNU malloc?
9513# Assume not, until told otherwise.
9514GNU_MALLOC=yes
9515doug_lea_malloc=yes
ca81d7a0
JD
9516{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9517echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9518if test "${ac_cv_func_malloc_get_state+set}" = set; then
9519 echo $ECHO_N "(cached) $ECHO_C" >&6
9520else
9521 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9522/* confdefs.h. */
9523_ACEOF
9524cat confdefs.h >>conftest.$ac_ext
9525cat >>conftest.$ac_ext <<_ACEOF
9526/* end confdefs.h. */
edfaf76d
LK
9527/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9528 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9529#define malloc_get_state innocuous_malloc_get_state
9530
98418dba 9531/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9532 which can conflict with char malloc_get_state (); below.
9533 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9534 <limits.h> exists even on freestanding compilers. */
edfaf76d 9535
19650fd6
AS
9536#ifdef __STDC__
9537# include <limits.h>
9538#else
9539# include <assert.h>
9540#endif
edfaf76d
LK
9541
9542#undef malloc_get_state
9543
ca81d7a0
JD
9544/* Override any GCC internal prototype to avoid an error.
9545 Use char because int might match the return type of a GCC
9546 builtin and then its argument prototype would still apply. */
98418dba
CW
9547#ifdef __cplusplus
9548extern "C"
9549#endif
98418dba 9550char malloc_get_state ();
98418dba
CW
9551/* The GNU C library defines this for functions which it implements
9552 to always fail with ENOSYS. Some functions are actually named
9553 something starting with __ and the normal name is an alias. */
ca81d7a0 9554#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9555choke me
98418dba
CW
9556#endif
9557
19650fd6
AS
9558int
9559main ()
9560{
ca81d7a0 9561return malloc_get_state ();
98418dba
CW
9562 ;
9563 return 0;
9564}
9565_ACEOF
9566rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9567if { (ac_try="$ac_link"
9568case "(($ac_try" in
9569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9570 *) ac_try_echo=$ac_try;;
9571esac
9572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9573 (eval "$ac_link") 2>conftest.er1
98418dba 9574 ac_status=$?
edfaf76d
LK
9575 grep -v '^ *+' conftest.er1 >conftest.err
9576 rm -f conftest.er1
9577 cat conftest.err >&5
c0d27fcc 9578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9579 (exit $ac_status); } && {
9580 test -z "$ac_c_werror_flag" ||
9581 test ! -s conftest.err
9582 } && test -s conftest$ac_exeext &&
9583 $as_test_x conftest$ac_exeext; then
98418dba
CW
9584 ac_cv_func_malloc_get_state=yes
9585else
9586 echo "$as_me: failed program was:" >&5
19650fd6
AS
9587sed 's/^/| /' conftest.$ac_ext >&5
9588
ca81d7a0 9589 ac_cv_func_malloc_get_state=no
98418dba 9590fi
ca81d7a0 9591
f053c89f 9592rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9593 conftest$ac_exeext conftest.$ac_ext
98418dba 9594fi
ca81d7a0
JD
9595{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9596echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9597if test $ac_cv_func_malloc_get_state = yes; then
9598 :
9599else
9600 doug_lea_malloc=no
9601fi
9602
ca81d7a0
JD
9603{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9604echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9605if test "${ac_cv_func_malloc_set_state+set}" = set; then
9606 echo $ECHO_N "(cached) $ECHO_C" >&6
9607else
9608 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9609/* confdefs.h. */
9610_ACEOF
9611cat confdefs.h >>conftest.$ac_ext
9612cat >>conftest.$ac_ext <<_ACEOF
9613/* end confdefs.h. */
edfaf76d
LK
9614/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9615 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9616#define malloc_set_state innocuous_malloc_set_state
9617
98418dba 9618/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9619 which can conflict with char malloc_set_state (); below.
9620 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9621 <limits.h> exists even on freestanding compilers. */
edfaf76d 9622
19650fd6
AS
9623#ifdef __STDC__
9624# include <limits.h>
9625#else
9626# include <assert.h>
9627#endif
edfaf76d
LK
9628
9629#undef malloc_set_state
9630
ca81d7a0
JD
9631/* Override any GCC internal prototype to avoid an error.
9632 Use char because int might match the return type of a GCC
9633 builtin and then its argument prototype would still apply. */
98418dba
CW
9634#ifdef __cplusplus
9635extern "C"
9636#endif
98418dba 9637char malloc_set_state ();
98418dba
CW
9638/* The GNU C library defines this for functions which it implements
9639 to always fail with ENOSYS. Some functions are actually named
9640 something starting with __ and the normal name is an alias. */
ca81d7a0 9641#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9642choke me
98418dba
CW
9643#endif
9644
19650fd6
AS
9645int
9646main ()
9647{
ca81d7a0 9648return malloc_set_state ();
98418dba
CW
9649 ;
9650 return 0;
9651}
9652_ACEOF
9653rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9654if { (ac_try="$ac_link"
9655case "(($ac_try" in
9656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9657 *) ac_try_echo=$ac_try;;
9658esac
9659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9660 (eval "$ac_link") 2>conftest.er1
98418dba 9661 ac_status=$?
edfaf76d
LK
9662 grep -v '^ *+' conftest.er1 >conftest.err
9663 rm -f conftest.er1
9664 cat conftest.err >&5
c0d27fcc 9665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9666 (exit $ac_status); } && {
9667 test -z "$ac_c_werror_flag" ||
9668 test ! -s conftest.err
9669 } && test -s conftest$ac_exeext &&
9670 $as_test_x conftest$ac_exeext; then
98418dba
CW
9671 ac_cv_func_malloc_set_state=yes
9672else
9673 echo "$as_me: failed program was:" >&5
19650fd6
AS
9674sed 's/^/| /' conftest.$ac_ext >&5
9675
ca81d7a0 9676 ac_cv_func_malloc_set_state=no
98418dba 9677fi
ca81d7a0 9678
f053c89f 9679rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9680 conftest$ac_exeext conftest.$ac_ext
98418dba 9681fi
ca81d7a0
JD
9682{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9683echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9684if test $ac_cv_func_malloc_set_state = yes; then
9685 :
9686else
9687 doug_lea_malloc=no
9688fi
9689
ca81d7a0
JD
9690{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9691echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9692if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9693 echo $ECHO_N "(cached) $ECHO_C" >&6
9694else
9695 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9696/* confdefs.h. */
9697_ACEOF
9698cat confdefs.h >>conftest.$ac_ext
9699cat >>conftest.$ac_ext <<_ACEOF
9700/* end confdefs.h. */
98418dba 9701extern void (* __after_morecore_hook)();
98418dba
CW
9702int
9703main ()
9704{
9705__after_morecore_hook = 0
9706 ;
9707 return 0;
9708}
9709_ACEOF
9710rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9711if { (ac_try="$ac_link"
9712case "(($ac_try" in
9713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9714 *) ac_try_echo=$ac_try;;
9715esac
9716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9717 (eval "$ac_link") 2>conftest.er1
98418dba 9718 ac_status=$?
edfaf76d
LK
9719 grep -v '^ *+' conftest.er1 >conftest.err
9720 rm -f conftest.er1
9721 cat conftest.err >&5
c0d27fcc 9722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9723 (exit $ac_status); } && {
9724 test -z "$ac_c_werror_flag" ||
9725 test ! -s conftest.err
9726 } && test -s conftest$ac_exeext &&
9727 $as_test_x conftest$ac_exeext; then
98418dba
CW
9728 emacs_cv_var___after_morecore_hook=yes
9729else
9730 echo "$as_me: failed program was:" >&5
19650fd6
AS
9731sed 's/^/| /' conftest.$ac_ext >&5
9732
ca81d7a0 9733 emacs_cv_var___after_morecore_hook=no
98418dba 9734fi
ca81d7a0 9735
f053c89f 9736rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9737 conftest$ac_exeext conftest.$ac_ext
98418dba 9738fi
ca81d7a0
JD
9739{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9740echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9741if test $emacs_cv_var___after_morecore_hook = no; then
9742 doug_lea_malloc=no
9743fi
9744if test "${system_malloc}" = "yes"; then
9745 GNU_MALLOC=no
9746 GNU_MALLOC_reason="
9747 (The GNU allocators don't work with this system configuration.)"
9748fi
9749if test "$doug_lea_malloc" = "yes" ; then
9750 if test "$GNU_MALLOC" = yes ; then
9751 GNU_MALLOC_reason="
9752 (Using Doug Lea's new malloc from the GNU C Library.)"
9753 fi
b936fae4 9754
c0d27fcc 9755cat >>confdefs.h <<\_ACEOF
98418dba 9756#define DOUG_LEA_MALLOC 1
c0d27fcc 9757_ACEOF
98418dba
CW
9758
9759fi
9760
9761if test x"${REL_ALLOC}" = x; then
9762 REL_ALLOC=${GNU_MALLOC}
9763fi
9764
9765
c0d27fcc
MR
9766
9767
9768for ac_header in stdlib.h unistd.h
98418dba
CW
9769do
9770as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
9771if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9772 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9773echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9774if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 9775 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9776fi
ca81d7a0
JD
9777ac_res=`eval echo '${'$as_ac_Header'}'`
9778 { echo "$as_me:$LINENO: result: $ac_res" >&5
9779echo "${ECHO_T}$ac_res" >&6; }
98418dba 9780else
c0d27fcc 9781 # Is the header compilable?
ca81d7a0
JD
9782{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9783echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9784cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9785/* confdefs.h. */
9786_ACEOF
9787cat confdefs.h >>conftest.$ac_ext
9788cat >>conftest.$ac_ext <<_ACEOF
9789/* end confdefs.h. */
98418dba
CW
9790$ac_includes_default
9791#include <$ac_header>
9792_ACEOF
9793rm -f conftest.$ac_objext
ca81d7a0
JD
9794if { (ac_try="$ac_compile"
9795case "(($ac_try" in
9796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9797 *) ac_try_echo=$ac_try;;
9798esac
9799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9800 (eval "$ac_compile") 2>conftest.er1
98418dba 9801 ac_status=$?
edfaf76d
LK
9802 grep -v '^ *+' conftest.er1 >conftest.err
9803 rm -f conftest.er1
9804 cat conftest.err >&5
c0d27fcc 9805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9806 (exit $ac_status); } && {
9807 test -z "$ac_c_werror_flag" ||
9808 test ! -s conftest.err
9809 } && test -s conftest.$ac_objext; then
c0d27fcc 9810 ac_header_compiler=yes
98418dba
CW
9811else
9812 echo "$as_me: failed program was:" >&5
19650fd6
AS
9813sed 's/^/| /' conftest.$ac_ext >&5
9814
ca81d7a0 9815 ac_header_compiler=no
98418dba 9816fi
ca81d7a0
JD
9817
9818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9819{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9820echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9821
c0d27fcc 9822# Is the header present?
ca81d7a0
JD
9823{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9824echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9825cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9826/* confdefs.h. */
9827_ACEOF
9828cat confdefs.h >>conftest.$ac_ext
9829cat >>conftest.$ac_ext <<_ACEOF
9830/* end confdefs.h. */
98418dba
CW
9831#include <$ac_header>
9832_ACEOF
ca81d7a0
JD
9833if { (ac_try="$ac_cpp conftest.$ac_ext"
9834case "(($ac_try" in
9835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9836 *) ac_try_echo=$ac_try;;
9837esac
9838eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9839 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9840 ac_status=$?
6bae0ccf 9841 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9842 rm -f conftest.er1
9843 cat conftest.err >&5
c0d27fcc 9844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9845 (exit $ac_status); } >/dev/null && {
9846 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9847 test ! -s conftest.err
9848 }; then
c0d27fcc 9849 ac_header_preproc=yes
98418dba
CW
9850else
9851 echo "$as_me: failed program was:" >&5
19650fd6
AS
9852sed 's/^/| /' conftest.$ac_ext >&5
9853
c0d27fcc 9854 ac_header_preproc=no
98418dba 9855fi
ca81d7a0 9856
98418dba 9857rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9858{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9859echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
9860
9861# So? What about this header?
edfaf76d
LK
9862case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9863 yes:no: )
c0d27fcc
MR
9864 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9865echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9866 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9867echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9868 ac_header_preproc=yes
9869 ;;
9870 no:yes:* )
9871 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9872echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9873 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9874echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9875 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9876echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9877 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9878echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9879 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9880echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9881 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9882echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9883
19650fd6 9884 ;;
c0d27fcc 9885esac
ca81d7a0
JD
9886{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9887echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9888if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
9889 echo $ECHO_N "(cached) $ECHO_C" >&6
9890else
edfaf76d 9891 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9892fi
ca81d7a0
JD
9893ac_res=`eval echo '${'$as_ac_Header'}'`
9894 { echo "$as_me:$LINENO: result: $ac_res" >&5
9895echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
9896
9897fi
98418dba 9898if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9899 cat >>confdefs.h <<_ACEOF
98418dba 9900#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9901_ACEOF
98418dba
CW
9902
9903fi
c0d27fcc 9904
98418dba
CW
9905done
9906
c0d27fcc 9907
98418dba
CW
9908for ac_func in getpagesize
9909do
9910as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
9911{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9912echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9913if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9914 echo $ECHO_N "(cached) $ECHO_C" >&6
9915else
9916 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9917/* confdefs.h. */
9918_ACEOF
9919cat confdefs.h >>conftest.$ac_ext
9920cat >>conftest.$ac_ext <<_ACEOF
9921/* end confdefs.h. */
edfaf76d
LK
9922/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9923 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9924#define $ac_func innocuous_$ac_func
9925
98418dba 9926/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9927 which can conflict with char $ac_func (); below.
9928 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9929 <limits.h> exists even on freestanding compilers. */
edfaf76d 9930
19650fd6
AS
9931#ifdef __STDC__
9932# include <limits.h>
9933#else
9934# include <assert.h>
9935#endif
edfaf76d
LK
9936
9937#undef $ac_func
9938
ca81d7a0
JD
9939/* Override any GCC internal prototype to avoid an error.
9940 Use char because int might match the return type of a GCC
9941 builtin and then its argument prototype would still apply. */
98418dba
CW
9942#ifdef __cplusplus
9943extern "C"
9944#endif
98418dba 9945char $ac_func ();
98418dba
CW
9946/* The GNU C library defines this for functions which it implements
9947 to always fail with ENOSYS. Some functions are actually named
9948 something starting with __ and the normal name is an alias. */
ca81d7a0 9949#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 9950choke me
98418dba
CW
9951#endif
9952
19650fd6
AS
9953int
9954main ()
9955{
ca81d7a0 9956return $ac_func ();
98418dba
CW
9957 ;
9958 return 0;
9959}
9960_ACEOF
9961rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9962if { (ac_try="$ac_link"
9963case "(($ac_try" in
9964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9965 *) ac_try_echo=$ac_try;;
9966esac
9967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9968 (eval "$ac_link") 2>conftest.er1
98418dba 9969 ac_status=$?
edfaf76d
LK
9970 grep -v '^ *+' conftest.er1 >conftest.err
9971 rm -f conftest.er1
9972 cat conftest.err >&5
c0d27fcc 9973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9974 (exit $ac_status); } && {
9975 test -z "$ac_c_werror_flag" ||
9976 test ! -s conftest.err
9977 } && test -s conftest$ac_exeext &&
9978 $as_test_x conftest$ac_exeext; then
98418dba
CW
9979 eval "$as_ac_var=yes"
9980else
9981 echo "$as_me: failed program was:" >&5
19650fd6
AS
9982sed 's/^/| /' conftest.$ac_ext >&5
9983
ca81d7a0 9984 eval "$as_ac_var=no"
98418dba 9985fi
ca81d7a0 9986
f053c89f 9987rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9988 conftest$ac_exeext conftest.$ac_ext
98418dba 9989fi
ca81d7a0
JD
9990ac_res=`eval echo '${'$as_ac_var'}'`
9991 { echo "$as_me:$LINENO: result: $ac_res" >&5
9992echo "${ECHO_T}$ac_res" >&6; }
98418dba 9993if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9994 cat >>confdefs.h <<_ACEOF
98418dba 9995#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9996_ACEOF
98418dba
CW
9997
9998fi
9999done
10000
ca81d7a0
JD
10001{ echo "$as_me:$LINENO: checking for working mmap" >&5
10002echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
10003if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
10004 echo $ECHO_N "(cached) $ECHO_C" >&6
10005else
10006 if test "$cross_compiling" = yes; then
10007 ac_cv_func_mmap_fixed_mapped=no
10008else
10009 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10010/* confdefs.h. */
10011_ACEOF
10012cat confdefs.h >>conftest.$ac_ext
10013cat >>conftest.$ac_ext <<_ACEOF
10014/* end confdefs.h. */
98418dba 10015$ac_includes_default
c0d27fcc
MR
10016/* malloc might have been renamed as rpl_malloc. */
10017#undef malloc
10018
98418dba
CW
10019/* Thanks to Mike Haertel and Jim Avera for this test.
10020 Here is a matrix of mmap possibilities:
10021 mmap private not fixed
10022 mmap private fixed at somewhere currently unmapped
10023 mmap private fixed at somewhere already mapped
10024 mmap shared not fixed
10025 mmap shared fixed at somewhere currently unmapped
10026 mmap shared fixed at somewhere already mapped
10027 For private mappings, we should verify that changes cannot be read()
10028 back from the file, nor mmap's back from the file at a different
10029 address. (There have been systems where private was not correctly
10030 implemented like the infamous i386 svr4.0, and systems where the
10031 VM page cache was not coherent with the file system buffer cache
10032 like early versions of FreeBSD and possibly contemporary NetBSD.)
10033 For shared mappings, we should conversely verify that changes get
c0d27fcc 10034 propagated back to all the places they're supposed to be.
98418dba
CW
10035
10036 Grep wants private fixed already mapped.
10037 The main things grep needs to know about mmap are:
10038 * does it exist and is it safe to write into the mmap'd area
10039 * how to use it (BSD variants) */
10040
10041#include <fcntl.h>
10042#include <sys/mman.h>
10043
f053c89f 10044#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10045char *malloc ();
10046#endif
10047
10048/* This mess was copied from the GNU getpagesize.h. */
f053c89f 10049#ifndef HAVE_GETPAGESIZE
98418dba 10050/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 10051# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10052# define HAVE_SYS_PARAM_H 1
10053# endif
10054
10055# ifdef _SC_PAGESIZE
10056# define getpagesize() sysconf(_SC_PAGESIZE)
10057# else /* no _SC_PAGESIZE */
f053c89f 10058# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10059# include <sys/param.h>
10060# ifdef EXEC_PAGESIZE
10061# define getpagesize() EXEC_PAGESIZE
10062# else /* no EXEC_PAGESIZE */
10063# ifdef NBPG
10064# define getpagesize() NBPG * CLSIZE
10065# ifndef CLSIZE
10066# define CLSIZE 1
10067# endif /* no CLSIZE */
10068# else /* no NBPG */
10069# ifdef NBPC
10070# define getpagesize() NBPC
10071# else /* no NBPC */
10072# ifdef PAGESIZE
10073# define getpagesize() PAGESIZE
10074# endif /* PAGESIZE */
10075# endif /* no NBPC */
10076# endif /* no NBPG */
10077# endif /* no EXEC_PAGESIZE */
10078# else /* no HAVE_SYS_PARAM_H */
10079# define getpagesize() 8192 /* punt totally */
10080# endif /* no HAVE_SYS_PARAM_H */
10081# endif /* no _SC_PAGESIZE */
10082
10083#endif /* no HAVE_GETPAGESIZE */
10084
10085int
10086main ()
10087{
10088 char *data, *data2, *data3;
10089 int i, pagesize;
10090 int fd;
10091
10092 pagesize = getpagesize ();
10093
10094 /* First, make a file with some known garbage in it. */
10095 data = (char *) malloc (pagesize);
10096 if (!data)
ca81d7a0 10097 return 1;
98418dba
CW
10098 for (i = 0; i < pagesize; ++i)
10099 *(data + i) = rand ();
10100 umask (0);
10101 fd = creat ("conftest.mmap", 0600);
10102 if (fd < 0)
ca81d7a0 10103 return 1;
98418dba 10104 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 10105 return 1;
98418dba
CW
10106 close (fd);
10107
10108 /* Next, try to mmap the file at a fixed address which already has
10109 something else allocated at it. If we can, also make sure that
10110 we see the same garbage. */
10111 fd = open ("conftest.mmap", O_RDWR);
10112 if (fd < 0)
ca81d7a0 10113 return 1;
98418dba
CW
10114 data2 = (char *) malloc (2 * pagesize);
10115 if (!data2)
ca81d7a0
JD
10116 return 1;
10117 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10118 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10119 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 10120 return 1;
98418dba
CW
10121 for (i = 0; i < pagesize; ++i)
10122 if (*(data + i) != *(data2 + i))
ca81d7a0 10123 return 1;
98418dba
CW
10124
10125 /* Finally, make sure that changes to the mapped area do not
10126 percolate back to the file as seen by read(). (This is a bug on
10127 some variants of i386 svr4.0.) */
10128 for (i = 0; i < pagesize; ++i)
10129 *(data2 + i) = *(data2 + i) + 1;
10130 data3 = (char *) malloc (pagesize);
10131 if (!data3)
ca81d7a0 10132 return 1;
98418dba 10133 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 10134 return 1;
98418dba
CW
10135 for (i = 0; i < pagesize; ++i)
10136 if (*(data + i) != *(data3 + i))
ca81d7a0 10137 return 1;
98418dba 10138 close (fd);
ca81d7a0 10139 return 0;
98418dba
CW
10140}
10141_ACEOF
10142rm -f conftest$ac_exeext
ca81d7a0
JD
10143if { (ac_try="$ac_link"
10144case "(($ac_try" in
10145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10146 *) ac_try_echo=$ac_try;;
10147esac
10148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10149 (eval "$ac_link") 2>&5
98418dba 10150 ac_status=$?
c0d27fcc 10151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10152 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
10153 { (case "(($ac_try" in
10154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10155 *) ac_try_echo=$ac_try;;
10156esac
10157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10158 (eval "$ac_try") 2>&5
98418dba 10159 ac_status=$?
c0d27fcc 10160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10161 (exit $ac_status); }; }; then
10162 ac_cv_func_mmap_fixed_mapped=yes
10163else
10164 echo "$as_me: program exited with status $ac_status" >&5
10165echo "$as_me: failed program was:" >&5
19650fd6
AS
10166sed 's/^/| /' conftest.$ac_ext >&5
10167
c0d27fcc 10168( exit $ac_status )
98418dba
CW
10169ac_cv_func_mmap_fixed_mapped=no
10170fi
ca81d7a0 10171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10172fi
ca81d7a0
JD
10173
10174
98418dba 10175fi
ca81d7a0
JD
10176{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10177echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10178if test $ac_cv_func_mmap_fixed_mapped = yes; then
10179
c0d27fcc 10180cat >>confdefs.h <<\_ACEOF
98418dba 10181#define HAVE_MMAP 1
c0d27fcc 10182_ACEOF
98418dba
CW
10183
10184fi
10185rm -f conftest.mmap
10186
10187if test $use_mmap_for_buffers = yes; then
10188 REL_ALLOC=no
10189fi
10190
10191LIBS="$libsrc_libs $LIBS"
10192
c0d27fcc 10193
ca81d7a0
JD
10194{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10195echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10196if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10197 echo $ECHO_N "(cached) $ECHO_C" >&6
10198else
10199 ac_check_lib_save_LIBS=$LIBS
10200LIBS="-ldnet $LIBS"
10201cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10202/* confdefs.h. */
10203_ACEOF
10204cat confdefs.h >>conftest.$ac_ext
10205cat >>conftest.$ac_ext <<_ACEOF
10206/* end confdefs.h. */
98418dba 10207
ca81d7a0
JD
10208/* Override any GCC internal prototype to avoid an error.
10209 Use char because int might match the return type of a GCC
10210 builtin and then its argument prototype would still apply. */
98418dba
CW
10211#ifdef __cplusplus
10212extern "C"
10213#endif
98418dba 10214char dnet_ntoa ();
98418dba
CW
10215int
10216main ()
10217{
ca81d7a0 10218return dnet_ntoa ();
98418dba
CW
10219 ;
10220 return 0;
10221}
10222_ACEOF
10223rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10224if { (ac_try="$ac_link"
10225case "(($ac_try" in
10226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10227 *) ac_try_echo=$ac_try;;
10228esac
10229eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10230 (eval "$ac_link") 2>conftest.er1
98418dba 10231 ac_status=$?
edfaf76d
LK
10232 grep -v '^ *+' conftest.er1 >conftest.err
10233 rm -f conftest.er1
10234 cat conftest.err >&5
c0d27fcc 10235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10236 (exit $ac_status); } && {
10237 test -z "$ac_c_werror_flag" ||
10238 test ! -s conftest.err
10239 } && test -s conftest$ac_exeext &&
10240 $as_test_x conftest$ac_exeext; then
98418dba
CW
10241 ac_cv_lib_dnet_dnet_ntoa=yes
10242else
10243 echo "$as_me: failed program was:" >&5
19650fd6
AS
10244sed 's/^/| /' conftest.$ac_ext >&5
10245
ca81d7a0 10246 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10247fi
ca81d7a0 10248
f053c89f 10249rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10250 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10251LIBS=$ac_check_lib_save_LIBS
10252fi
ca81d7a0
JD
10253{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10254echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10255if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10256 cat >>confdefs.h <<_ACEOF
98418dba 10257#define HAVE_LIBDNET 1
c0d27fcc 10258_ACEOF
98418dba
CW
10259
10260 LIBS="-ldnet $LIBS"
10261
10262fi
10263
c0d27fcc 10264
ca81d7a0
JD
10265{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10266echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10267if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10268 echo $ECHO_N "(cached) $ECHO_C" >&6
10269else
10270 ac_check_lib_save_LIBS=$LIBS
10271LIBS="-lXbsd $LIBS"
10272cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10273/* confdefs.h. */
10274_ACEOF
10275cat confdefs.h >>conftest.$ac_ext
10276cat >>conftest.$ac_ext <<_ACEOF
10277/* end confdefs.h. */
98418dba 10278
c0d27fcc 10279
98418dba
CW
10280int
10281main ()
10282{
ca81d7a0 10283return main ();
98418dba
CW
10284 ;
10285 return 0;
10286}
10287_ACEOF
10288rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10289if { (ac_try="$ac_link"
10290case "(($ac_try" in
10291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10292 *) ac_try_echo=$ac_try;;
10293esac
10294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10295 (eval "$ac_link") 2>conftest.er1
98418dba 10296 ac_status=$?
edfaf76d
LK
10297 grep -v '^ *+' conftest.er1 >conftest.err
10298 rm -f conftest.er1
10299 cat conftest.err >&5
c0d27fcc 10300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10301 (exit $ac_status); } && {
10302 test -z "$ac_c_werror_flag" ||
10303 test ! -s conftest.err
10304 } && test -s conftest$ac_exeext &&
10305 $as_test_x conftest$ac_exeext; then
98418dba
CW
10306 ac_cv_lib_Xbsd_main=yes
10307else
10308 echo "$as_me: failed program was:" >&5
19650fd6
AS
10309sed 's/^/| /' conftest.$ac_ext >&5
10310
ca81d7a0 10311 ac_cv_lib_Xbsd_main=no
98418dba 10312fi
ca81d7a0 10313
f053c89f 10314rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10315 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10316LIBS=$ac_check_lib_save_LIBS
10317fi
ca81d7a0
JD
10318{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10319echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10320if test $ac_cv_lib_Xbsd_main = yes; then
10321 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10322fi
10323
c0d27fcc
MR
10324
10325
ca81d7a0
JD
10326{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10327echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10328if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10329 echo $ECHO_N "(cached) $ECHO_C" >&6
10330else
10331 ac_check_lib_save_LIBS=$LIBS
10332LIBS="-lpthreads $LIBS"
10333cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10334/* confdefs.h. */
10335_ACEOF
10336cat confdefs.h >>conftest.$ac_ext
10337cat >>conftest.$ac_ext <<_ACEOF
10338/* end confdefs.h. */
98418dba 10339
ca81d7a0
JD
10340/* Override any GCC internal prototype to avoid an error.
10341 Use char because int might match the return type of a GCC
10342 builtin and then its argument prototype would still apply. */
98418dba
CW
10343#ifdef __cplusplus
10344extern "C"
10345#endif
98418dba 10346char cma_open ();
98418dba
CW
10347int
10348main ()
10349{
ca81d7a0 10350return cma_open ();
98418dba
CW
10351 ;
10352 return 0;
10353}
10354_ACEOF
10355rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10356if { (ac_try="$ac_link"
10357case "(($ac_try" in
10358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10359 *) ac_try_echo=$ac_try;;
10360esac
10361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10362 (eval "$ac_link") 2>conftest.er1
98418dba 10363 ac_status=$?
edfaf76d
LK
10364 grep -v '^ *+' conftest.er1 >conftest.err
10365 rm -f conftest.er1
10366 cat conftest.err >&5
c0d27fcc 10367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10368 (exit $ac_status); } && {
10369 test -z "$ac_c_werror_flag" ||
10370 test ! -s conftest.err
10371 } && test -s conftest$ac_exeext &&
10372 $as_test_x conftest$ac_exeext; then
98418dba
CW
10373 ac_cv_lib_pthreads_cma_open=yes
10374else
10375 echo "$as_me: failed program was:" >&5
19650fd6
AS
10376sed 's/^/| /' conftest.$ac_ext >&5
10377
ca81d7a0 10378 ac_cv_lib_pthreads_cma_open=no
98418dba 10379fi
ca81d7a0 10380
f053c89f 10381rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10382 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10383LIBS=$ac_check_lib_save_LIBS
10384fi
ca81d7a0
JD
10385{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10386echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10387if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10388 cat >>confdefs.h <<_ACEOF
98418dba 10389#define HAVE_LIBPTHREADS 1
c0d27fcc 10390_ACEOF
98418dba
CW
10391
10392 LIBS="-lpthreads $LIBS"
10393
10394fi
10395
c0d27fcc 10396
ca81d7a0
JD
10397{ echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
10398echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6; }
98418dba
CW
10399if test -d /usr/X386/include; then
10400 HAVE_XFREE386=yes
10401 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
10402else
10403 HAVE_XFREE386=no
10404fi
ca81d7a0
JD
10405{ echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
10406echo "${ECHO_T}$HAVE_XFREE386" >&6; }
98418dba 10407
55597d70
DL
10408
10409case ${host_os} in
10410aix*)
ca81d7a0
JD
10411 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10412echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10413if test "${gdb_cv_bigtoc+set}" = set; then
10414 echo $ECHO_N "(cached) $ECHO_C" >&6
10415else
10416
10417 case $GCC in
10418 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10419 *) gdb_cv_bigtoc=-bbigtoc ;;
10420 esac
10421
10422 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10423 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10424/* confdefs.h. */
10425_ACEOF
10426cat confdefs.h >>conftest.$ac_ext
10427cat >>conftest.$ac_ext <<_ACEOF
10428/* end confdefs.h. */
55597d70
DL
10429
10430int
10431main ()
10432{
10433int i;
10434 ;
10435 return 0;
10436}
10437_ACEOF
10438rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10439if { (ac_try="$ac_link"
10440case "(($ac_try" in
10441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10442 *) ac_try_echo=$ac_try;;
10443esac
10444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10445 (eval "$ac_link") 2>conftest.er1
55597d70 10446 ac_status=$?
edfaf76d
LK
10447 grep -v '^ *+' conftest.er1 >conftest.err
10448 rm -f conftest.er1
10449 cat conftest.err >&5
55597d70 10450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10451 (exit $ac_status); } && {
10452 test -z "$ac_c_werror_flag" ||
10453 test ! -s conftest.err
10454 } && test -s conftest$ac_exeext &&
10455 $as_test_x conftest$ac_exeext; then
55597d70
DL
10456 :
10457else
10458 echo "$as_me: failed program was:" >&5
19650fd6
AS
10459sed 's/^/| /' conftest.$ac_ext >&5
10460
ca81d7a0 10461 gdb_cv_bigtoc=
55597d70 10462fi
ca81d7a0 10463
f053c89f 10464rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10465 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10466
10467fi
ca81d7a0
JD
10468{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10469echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10470 ;;
10471esac
10472
ae1a998c
RS
10473# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10474# used for the tests that follow. We set them back to REAL_CFLAGS and
10475# REAL_CPPFLAGS later on.
98418dba
CW
10476
10477REAL_CPPFLAGS="$CPPFLAGS"
10478
10479if test "${HAVE_X11}" = "yes"; then
10480 DEFS="$C_SWITCH_X_SITE $DEFS"
10481 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10482 LIBS="$LIBX $LIBS"
10483 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10484 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10485
10486 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10487 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10488 # but it's more convenient here to set LD_RUN_PATH
10489 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10490 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10491 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10492 export LD_RUN_PATH
10493 fi
10494
10495 if test "${opsys}" = "gnu-linux"; then
ca81d7a0
JD
10496 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10497echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10498 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10499/* confdefs.h. */
10500_ACEOF
10501cat confdefs.h >>conftest.$ac_ext
10502cat >>conftest.$ac_ext <<_ACEOF
10503/* end confdefs.h. */
98418dba 10504
98418dba
CW
10505int
10506main ()
10507{
10508XOpenDisplay ("foo");
10509 ;
10510 return 0;
10511}
10512_ACEOF
10513rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10514if { (ac_try="$ac_link"
10515case "(($ac_try" in
10516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10517 *) ac_try_echo=$ac_try;;
10518esac
10519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10520 (eval "$ac_link") 2>conftest.er1
98418dba 10521 ac_status=$?
edfaf76d
LK
10522 grep -v '^ *+' conftest.er1 >conftest.err
10523 rm -f conftest.er1
10524 cat conftest.err >&5
c0d27fcc 10525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10526 (exit $ac_status); } && {
10527 test -z "$ac_c_werror_flag" ||
10528 test ! -s conftest.err
10529 } && test -s conftest$ac_exeext &&
10530 $as_test_x conftest$ac_exeext; then
35996d22 10531 xlinux_first_failure=no
98418dba
CW
10532else
10533 echo "$as_me: failed program was:" >&5
19650fd6
AS
10534sed 's/^/| /' conftest.$ac_ext >&5
10535
ca81d7a0 10536 xlinux_first_failure=yes
98418dba 10537fi
ca81d7a0 10538
f053c89f 10539rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10540 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10541 if test "${xlinux_first_failure}" = "yes"; then
10542 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10543 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10544 OLD_CPPFLAGS="$CPPFLAGS"
10545 OLD_LIBS="$LIBS"
10546 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10547 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10548 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10549 LIBS="$LIBS -b i486-linuxaout"
10550 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10551/* confdefs.h. */
10552_ACEOF
10553cat confdefs.h >>conftest.$ac_ext
10554cat >>conftest.$ac_ext <<_ACEOF
10555/* end confdefs.h. */
98418dba 10556
98418dba
CW
10557int
10558main ()
10559{
10560XOpenDisplay ("foo");
10561 ;
10562 return 0;
10563}
10564_ACEOF
10565rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10566if { (ac_try="$ac_link"
10567case "(($ac_try" in
10568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10569 *) ac_try_echo=$ac_try;;
10570esac
10571eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10572 (eval "$ac_link") 2>conftest.er1
98418dba 10573 ac_status=$?
edfaf76d
LK
10574 grep -v '^ *+' conftest.er1 >conftest.err
10575 rm -f conftest.er1
10576 cat conftest.err >&5
c0d27fcc 10577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10578 (exit $ac_status); } && {
10579 test -z "$ac_c_werror_flag" ||
10580 test ! -s conftest.err
10581 } && test -s conftest$ac_exeext &&
10582 $as_test_x conftest$ac_exeext; then
98418dba
CW
10583 xlinux_second_failure=no
10584else
10585 echo "$as_me: failed program was:" >&5
19650fd6
AS
10586sed 's/^/| /' conftest.$ac_ext >&5
10587
ca81d7a0 10588 xlinux_second_failure=yes
98418dba 10589fi
ca81d7a0 10590
f053c89f 10591rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10592 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10593 if test "${xlinux_second_failure}" = "yes"; then
10594 # If we get the same failure with -b, there is no use adding -b.
10595 # So take it out. This plays safe.
10596 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10597 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10598 CPPFLAGS="$OLD_CPPFLAGS"
10599 LIBS="$OLD_LIBS"
ca81d7a0
JD
10600 { echo "$as_me:$LINENO: result: no" >&5
10601echo "${ECHO_T}no" >&6; }
98418dba 10602 else
ca81d7a0
JD
10603 { echo "$as_me:$LINENO: result: yes" >&5
10604echo "${ECHO_T}yes" >&6; }
98418dba
CW
10605 fi
10606 else
ca81d7a0
JD
10607 { echo "$as_me:$LINENO: result: no" >&5
10608echo "${ECHO_T}no" >&6; }
98418dba
CW
10609 fi
10610 fi
10611
10612 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10613 # header files included from there.
ca81d7a0
JD
10614 { echo "$as_me:$LINENO: checking for Xkb" >&5
10615echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10616 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10617/* confdefs.h. */
10618_ACEOF
10619cat confdefs.h >>conftest.$ac_ext
10620cat >>conftest.$ac_ext <<_ACEOF
10621/* end confdefs.h. */
98418dba
CW
10622#include <X11/Xlib.h>
10623#include <X11/XKBlib.h>
98418dba
CW
10624int
10625main ()
10626{
10627XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10628 ;
10629 return 0;
10630}
10631_ACEOF
10632rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10633if { (ac_try="$ac_link"
10634case "(($ac_try" in
10635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10636 *) ac_try_echo=$ac_try;;
10637esac
10638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10639 (eval "$ac_link") 2>conftest.er1
98418dba 10640 ac_status=$?
edfaf76d
LK
10641 grep -v '^ *+' conftest.er1 >conftest.err
10642 rm -f conftest.er1
10643 cat conftest.err >&5
c0d27fcc 10644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10645 (exit $ac_status); } && {
10646 test -z "$ac_c_werror_flag" ||
10647 test ! -s conftest.err
10648 } && test -s conftest$ac_exeext &&
10649 $as_test_x conftest$ac_exeext; then
98418dba
CW
10650 emacs_xkb=yes
10651else
10652 echo "$as_me: failed program was:" >&5
19650fd6
AS
10653sed 's/^/| /' conftest.$ac_ext >&5
10654
ca81d7a0 10655 emacs_xkb=no
98418dba 10656fi
ca81d7a0 10657
f053c89f 10658rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10659 conftest$ac_exeext conftest.$ac_ext
ca81d7a0
JD
10660 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10661echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10662 if test $emacs_xkb = yes; then
b936fae4 10663
c0d27fcc 10664cat >>confdefs.h <<\_ACEOF
98418dba 10665#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10666_ACEOF
98418dba
CW
10667
10668 fi
10669
c0d27fcc
MR
10670
10671
10672
10673
98418dba
CW
10674for ac_func in XrmSetDatabase XScreenResourceString \
10675XScreenNumberOfScreen XSetWMProtocols
10676do
10677as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10678{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10679echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10680if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10681 echo $ECHO_N "(cached) $ECHO_C" >&6
10682else
10683 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10684/* confdefs.h. */
10685_ACEOF
10686cat confdefs.h >>conftest.$ac_ext
10687cat >>conftest.$ac_ext <<_ACEOF
10688/* end confdefs.h. */
edfaf76d
LK
10689/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10690 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10691#define $ac_func innocuous_$ac_func
10692
98418dba 10693/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10694 which can conflict with char $ac_func (); below.
10695 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10696 <limits.h> exists even on freestanding compilers. */
edfaf76d 10697
19650fd6
AS
10698#ifdef __STDC__
10699# include <limits.h>
10700#else
10701# include <assert.h>
10702#endif
edfaf76d
LK
10703
10704#undef $ac_func
10705
ca81d7a0
JD
10706/* Override any GCC internal prototype to avoid an error.
10707 Use char because int might match the return type of a GCC
10708 builtin and then its argument prototype would still apply. */
98418dba
CW
10709#ifdef __cplusplus
10710extern "C"
10711#endif
98418dba 10712char $ac_func ();
98418dba
CW
10713/* The GNU C library defines this for functions which it implements
10714 to always fail with ENOSYS. Some functions are actually named
10715 something starting with __ and the normal name is an alias. */
ca81d7a0 10716#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10717choke me
98418dba
CW
10718#endif
10719
19650fd6
AS
10720int
10721main ()
10722{
ca81d7a0 10723return $ac_func ();
98418dba
CW
10724 ;
10725 return 0;
10726}
10727_ACEOF
10728rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10729if { (ac_try="$ac_link"
10730case "(($ac_try" in
10731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10732 *) ac_try_echo=$ac_try;;
10733esac
10734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10735 (eval "$ac_link") 2>conftest.er1
98418dba 10736 ac_status=$?
edfaf76d
LK
10737 grep -v '^ *+' conftest.er1 >conftest.err
10738 rm -f conftest.er1
10739 cat conftest.err >&5
c0d27fcc 10740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10741 (exit $ac_status); } && {
10742 test -z "$ac_c_werror_flag" ||
10743 test ! -s conftest.err
10744 } && test -s conftest$ac_exeext &&
10745 $as_test_x conftest$ac_exeext; then
98418dba
CW
10746 eval "$as_ac_var=yes"
10747else
10748 echo "$as_me: failed program was:" >&5
19650fd6
AS
10749sed 's/^/| /' conftest.$ac_ext >&5
10750
ca81d7a0 10751 eval "$as_ac_var=no"
98418dba 10752fi
ca81d7a0 10753
f053c89f 10754rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10755 conftest$ac_exeext conftest.$ac_ext
98418dba 10756fi
ca81d7a0
JD
10757ac_res=`eval echo '${'$as_ac_var'}'`
10758 { echo "$as_me:$LINENO: result: $ac_res" >&5
10759echo "${ECHO_T}$ac_res" >&6; }
98418dba 10760if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10761 cat >>confdefs.h <<_ACEOF
98418dba 10762#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10763_ACEOF
98418dba
CW
10764
10765fi
10766done
10767
10768fi
10769
10770if test "${window_system}" = "x11"; then
ca81d7a0
JD
10771 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10772echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
10773 if test "${emacs_cv_x11_version_6+set}" = set; then
10774 echo $ECHO_N "(cached) $ECHO_C" >&6
10775else
10776 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10777/* confdefs.h. */
10778_ACEOF
10779cat confdefs.h >>conftest.$ac_ext
10780cat >>conftest.$ac_ext <<_ACEOF
10781/* end confdefs.h. */
98418dba 10782#include <X11/Xlib.h>
98418dba
CW
10783int
10784main ()
10785{
10786#if XlibSpecificationRelease < 6
10787fail;
10788#endif
10789
10790 ;
10791 return 0;
10792}
10793_ACEOF
10794rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10795if { (ac_try="$ac_link"
10796case "(($ac_try" in
10797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10798 *) ac_try_echo=$ac_try;;
10799esac
10800eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10801 (eval "$ac_link") 2>conftest.er1
98418dba 10802 ac_status=$?
edfaf76d
LK
10803 grep -v '^ *+' conftest.er1 >conftest.err
10804 rm -f conftest.er1
10805 cat conftest.err >&5
c0d27fcc 10806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10807 (exit $ac_status); } && {
10808 test -z "$ac_c_werror_flag" ||
10809 test ! -s conftest.err
10810 } && test -s conftest$ac_exeext &&
10811 $as_test_x conftest$ac_exeext; then
98418dba
CW
10812 emacs_cv_x11_version_6=yes
10813else
10814 echo "$as_me: failed program was:" >&5
19650fd6
AS
10815sed 's/^/| /' conftest.$ac_ext >&5
10816
ca81d7a0 10817 emacs_cv_x11_version_6=no
98418dba 10818fi
ca81d7a0 10819
f053c89f 10820rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10821 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10822fi
10823
10824 if test $emacs_cv_x11_version_6 = yes; then
ca81d7a0
JD
10825 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10826echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10827
c0d27fcc 10828cat >>confdefs.h <<\_ACEOF
98418dba 10829#define HAVE_X11R6 1
c0d27fcc 10830_ACEOF
98418dba
CW
10831
10832 else
ca81d7a0
JD
10833 { echo "$as_me:$LINENO: result: before 6" >&5
10834echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10835 fi
10836fi
10837
10838if test "${window_system}" = "x11"; then
ca81d7a0
JD
10839 { echo "$as_me:$LINENO: checking X11 version 5" >&5
10840echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6; }
98418dba
CW
10841 if test "${emacs_cv_x11_version_5+set}" = set; then
10842 echo $ECHO_N "(cached) $ECHO_C" >&6
10843else
10844 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10845/* confdefs.h. */
10846_ACEOF
10847cat confdefs.h >>conftest.$ac_ext
10848cat >>conftest.$ac_ext <<_ACEOF
10849/* end confdefs.h. */
98418dba 10850#include <X11/Xlib.h>
98418dba
CW
10851int
10852main ()
10853{
10854#if XlibSpecificationRelease < 5
10855fail;
10856#endif
10857
10858 ;
10859 return 0;
10860}
10861_ACEOF
10862rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10863if { (ac_try="$ac_link"
10864case "(($ac_try" in
10865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10866 *) ac_try_echo=$ac_try;;
10867esac
10868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10869 (eval "$ac_link") 2>conftest.er1
98418dba 10870 ac_status=$?
edfaf76d
LK
10871 grep -v '^ *+' conftest.er1 >conftest.err
10872 rm -f conftest.er1
10873 cat conftest.err >&5
c0d27fcc 10874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10875 (exit $ac_status); } && {
10876 test -z "$ac_c_werror_flag" ||
10877 test ! -s conftest.err
10878 } && test -s conftest$ac_exeext &&
10879 $as_test_x conftest$ac_exeext; then
98418dba
CW
10880 emacs_cv_x11_version_5=yes
10881else
10882 echo "$as_me: failed program was:" >&5
19650fd6
AS
10883sed 's/^/| /' conftest.$ac_ext >&5
10884
ca81d7a0 10885 emacs_cv_x11_version_5=no
98418dba 10886fi
ca81d7a0 10887
f053c89f 10888rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10889 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10890fi
10891
10892 if test $emacs_cv_x11_version_5 = yes; then
ca81d7a0
JD
10893 { echo "$as_me:$LINENO: result: 5 or newer" >&5
10894echo "${ECHO_T}5 or newer" >&6; }
98418dba 10895 HAVE_X11R5=yes
b936fae4 10896
c0d27fcc 10897cat >>confdefs.h <<\_ACEOF
98418dba 10898#define HAVE_X11R5 1
c0d27fcc 10899_ACEOF
98418dba
CW
10900
10901 else
10902 HAVE_X11R5=no
ca81d7a0
JD
10903 { echo "$as_me:$LINENO: result: before 5" >&5
10904echo "${ECHO_T}before 5" >&6; }
98418dba
CW
10905 fi
10906fi
10907
488dd4c4 10908HAVE_GTK=no
8eeae1c9
JD
10909if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then
10910 USE_X_TOOLKIT=none
10911fi
488dd4c4 10912if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 10913 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
10914 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
10915echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
10916 { (exit 1); exit 1; }; };
10917 fi
448541bc
JD
10918 GLIB_REQUIRED=2.4
10919 GTK_REQUIRED=2.4
488dd4c4
JD
10920 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10921
10922 if test "X${with_pkg_config_prog}" != X; then
10923 PKG_CONFIG="${with_pkg_config_prog}"
10924 fi
10925
10926 succeeded=no
10927
10928 if test -z "$PKG_CONFIG"; then
10929 # Extract the first word of "pkg-config", so it can be a program name with args.
10930set dummy pkg-config; ac_word=$2
ca81d7a0
JD
10931{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10932echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
10933if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10934 echo $ECHO_N "(cached) $ECHO_C" >&6
10935else
10936 case $PKG_CONFIG in
10937 [\\/]* | ?:[\\/]*)
10938 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10939 ;;
10940 *)
10941 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10942for as_dir in $PATH
10943do
10944 IFS=$as_save_IFS
10945 test -z "$as_dir" && as_dir=.
10946 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 10947 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
10948 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10949 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10950 break 2
10951 fi
10952done
10953done
ca81d7a0 10954IFS=$as_save_IFS
488dd4c4
JD
10955
10956 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10957 ;;
10958esac
10959fi
10960PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 10961if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
10962 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10963echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 10964else
ca81d7a0
JD
10965 { echo "$as_me:$LINENO: result: no" >&5
10966echo "${ECHO_T}no" >&6; }
488dd4c4
JD
10967fi
10968
ca81d7a0 10969
488dd4c4
JD
10970 fi
10971
10972 if test "$PKG_CONFIG" = "no" ; then
439f58ee
JD
10973 { { echo "$as_me:$LINENO: error:
10974 *** 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
10975echo "$as_me: error:
10976 *** 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;}
10977 { (exit 1); exit 1; }; }
488dd4c4
JD
10978 else
10979 PKG_CONFIG_MIN_VERSION=0.9.0
10980 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
10981 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
10982echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 10983
67db6aa2 10984 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
ca81d7a0
JD
10985 { echo "$as_me:$LINENO: result: yes" >&5
10986echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
10987 succeeded=yes
10988
ca81d7a0
JD
10989 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
10990echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
488dd4c4 10991 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"`
ca81d7a0
JD
10992 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
10993echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 10994
ca81d7a0
JD
10995 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
10996echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
488dd4c4 10997 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"`
ca81d7a0
JD
10998 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
10999echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 11000 else
ca81d7a0
JD
11001 { echo "$as_me:$LINENO: result: no" >&5
11002echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11003 GTK_CFLAGS=""
11004 GTK_LIBS=""
11005 ## If we have a custom action on failure, don't print errors, but
11006 ## do set a variable so people can do so.
11007 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
11008 echo $GTK_PKG_ERRORS
11009 fi
11010
11011
11012
11013 else
11014 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11015 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11016 fi
11017 fi
11018
11019 if test $succeeded = yes; then
11020 :
11021 else
11022 { { 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
11023echo "$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;}
11024 { (exit 1); exit 1; }; }
11025 fi
11026
11027
11028
11029 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11030 CFLAGS="$CFLAGS $GTK_CFLAGS"
11031 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11032 GTK_COMPILES=no
57669b57 11033
8eeae1c9 11034for ac_func in gtk_main
57669b57
JD
11035do
11036as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11037{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11038echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11039if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11040 echo $ECHO_N "(cached) $ECHO_C" >&6
11041else
11042 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11043/* confdefs.h. */
11044_ACEOF
11045cat confdefs.h >>conftest.$ac_ext
11046cat >>conftest.$ac_ext <<_ACEOF
11047/* end confdefs.h. */
edfaf76d
LK
11048/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11049 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11050#define $ac_func innocuous_$ac_func
11051
57669b57
JD
11052/* System header to define __stub macros and hopefully few prototypes,
11053 which can conflict with char $ac_func (); below.
11054 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11055 <limits.h> exists even on freestanding compilers. */
edfaf76d 11056
57669b57
JD
11057#ifdef __STDC__
11058# include <limits.h>
11059#else
11060# include <assert.h>
11061#endif
edfaf76d
LK
11062
11063#undef $ac_func
11064
ca81d7a0
JD
11065/* Override any GCC internal prototype to avoid an error.
11066 Use char because int might match the return type of a GCC
11067 builtin and then its argument prototype would still apply. */
57669b57
JD
11068#ifdef __cplusplus
11069extern "C"
57669b57 11070#endif
57669b57
JD
11071char $ac_func ();
11072/* The GNU C library defines this for functions which it implements
11073 to always fail with ENOSYS. Some functions are actually named
11074 something starting with __ and the normal name is an alias. */
ca81d7a0 11075#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11076choke me
57669b57
JD
11077#endif
11078
11079int
11080main ()
11081{
ca81d7a0 11082return $ac_func ();
57669b57
JD
11083 ;
11084 return 0;
11085}
11086_ACEOF
11087rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11088if { (ac_try="$ac_link"
11089case "(($ac_try" in
11090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11091 *) ac_try_echo=$ac_try;;
11092esac
11093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11094 (eval "$ac_link") 2>conftest.er1
57669b57 11095 ac_status=$?
edfaf76d
LK
11096 grep -v '^ *+' conftest.er1 >conftest.err
11097 rm -f conftest.er1
11098 cat conftest.err >&5
57669b57 11099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11100 (exit $ac_status); } && {
11101 test -z "$ac_c_werror_flag" ||
11102 test ! -s conftest.err
11103 } && test -s conftest$ac_exeext &&
11104 $as_test_x conftest$ac_exeext; then
57669b57
JD
11105 eval "$as_ac_var=yes"
11106else
11107 echo "$as_me: failed program was:" >&5
11108sed 's/^/| /' conftest.$ac_ext >&5
11109
ca81d7a0 11110 eval "$as_ac_var=no"
57669b57 11111fi
ca81d7a0 11112
f053c89f 11113rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11114 conftest$ac_exeext conftest.$ac_ext
57669b57 11115fi
ca81d7a0
JD
11116ac_res=`eval echo '${'$as_ac_var'}'`
11117 { echo "$as_me:$LINENO: result: $ac_res" >&5
11118echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11119if test `eval echo '${'$as_ac_var'}'` = yes; then
11120 cat >>confdefs.h <<_ACEOF
11121#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11122_ACEOF
8eeae1c9 11123 GTK_COMPILES=yes
57669b57
JD
11124fi
11125done
11126
8eeae1c9
JD
11127 if test "${GTK_COMPILES}" != "yes"; then
11128 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
11129echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11130 { (exit 1); exit 1; }; };
11131 fi
11132
11133 HAVE_GTK=yes
57669b57
JD
11134
11135cat >>confdefs.h <<\_ACEOF
8eeae1c9 11136#define HAVE_GTK 1
572a3cc2
JD
11137_ACEOF
11138
8eeae1c9
JD
11139 USE_X_TOOLKIT=none
11140
11141 if test "$with_toolkit_scroll_bars" != no; then
11142 with_toolkit_scroll_bars=yes
572a3cc2 11143 fi
572a3cc2 11144
8eeae1c9
JD
11145 HAVE_GTK_MULTIDISPLAY=no
11146
11147for ac_func in gdk_display_open
572a3cc2
JD
11148do
11149as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11150{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11151echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11152if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11153 echo $ECHO_N "(cached) $ECHO_C" >&6
11154else
11155 cat >conftest.$ac_ext <<_ACEOF
11156/* confdefs.h. */
11157_ACEOF
11158cat confdefs.h >>conftest.$ac_ext
11159cat >>conftest.$ac_ext <<_ACEOF
11160/* end confdefs.h. */
edfaf76d
LK
11161/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11162 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11163#define $ac_func innocuous_$ac_func
11164
572a3cc2
JD
11165/* System header to define __stub macros and hopefully few prototypes,
11166 which can conflict with char $ac_func (); below.
11167 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11168 <limits.h> exists even on freestanding compilers. */
edfaf76d 11169
572a3cc2
JD
11170#ifdef __STDC__
11171# include <limits.h>
11172#else
11173# include <assert.h>
11174#endif
edfaf76d
LK
11175
11176#undef $ac_func
11177
ca81d7a0
JD
11178/* Override any GCC internal prototype to avoid an error.
11179 Use char because int might match the return type of a GCC
11180 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11181#ifdef __cplusplus
11182extern "C"
572a3cc2 11183#endif
572a3cc2
JD
11184char $ac_func ();
11185/* The GNU C library defines this for functions which it implements
11186 to always fail with ENOSYS. Some functions are actually named
11187 something starting with __ and the normal name is an alias. */
ca81d7a0 11188#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11189choke me
572a3cc2
JD
11190#endif
11191
11192int
11193main ()
11194{
ca81d7a0 11195return $ac_func ();
572a3cc2
JD
11196 ;
11197 return 0;
11198}
11199_ACEOF
11200rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11201if { (ac_try="$ac_link"
11202case "(($ac_try" in
11203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11204 *) ac_try_echo=$ac_try;;
11205esac
11206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11207 (eval "$ac_link") 2>conftest.er1
572a3cc2 11208 ac_status=$?
edfaf76d
LK
11209 grep -v '^ *+' conftest.er1 >conftest.err
11210 rm -f conftest.er1
11211 cat conftest.err >&5
572a3cc2 11212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11213 (exit $ac_status); } && {
11214 test -z "$ac_c_werror_flag" ||
11215 test ! -s conftest.err
11216 } && test -s conftest$ac_exeext &&
11217 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11218 eval "$as_ac_var=yes"
11219else
11220 echo "$as_me: failed program was:" >&5
11221sed 's/^/| /' conftest.$ac_ext >&5
11222
ca81d7a0 11223 eval "$as_ac_var=no"
572a3cc2 11224fi
ca81d7a0 11225
f053c89f 11226rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11227 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11228fi
ca81d7a0
JD
11229ac_res=`eval echo '${'$as_ac_var'}'`
11230 { echo "$as_me:$LINENO: result: $ac_res" >&5
11231echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11232if test `eval echo '${'$as_ac_var'}'` = yes; then
11233 cat >>confdefs.h <<_ACEOF
11234#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11235_ACEOF
8eeae1c9 11236 HAVE_GTK_MULTIDISPLAY=yes
572a3cc2
JD
11237fi
11238done
11239
8eeae1c9 11240 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
572a3cc2 11241
8eeae1c9
JD
11242cat >>confdefs.h <<\_ACEOF
11243#define HAVE_GTK_MULTIDISPLAY 1
11244_ACEOF
572a3cc2 11245
8eeae1c9
JD
11246 fi
11247 HAVE_GTK_FILE_SELECTION=no
11248
11249for ac_func in gtk_file_selection_new
572a3cc2
JD
11250do
11251as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11252{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11253echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11254if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11255 echo $ECHO_N "(cached) $ECHO_C" >&6
11256else
11257 cat >conftest.$ac_ext <<_ACEOF
11258/* confdefs.h. */
11259_ACEOF
11260cat confdefs.h >>conftest.$ac_ext
11261cat >>conftest.$ac_ext <<_ACEOF
11262/* end confdefs.h. */
edfaf76d
LK
11263/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11264 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11265#define $ac_func innocuous_$ac_func
11266
572a3cc2
JD
11267/* System header to define __stub macros and hopefully few prototypes,
11268 which can conflict with char $ac_func (); below.
11269 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11270 <limits.h> exists even on freestanding compilers. */
edfaf76d 11271
572a3cc2
JD
11272#ifdef __STDC__
11273# include <limits.h>
11274#else
11275# include <assert.h>
11276#endif
edfaf76d
LK
11277
11278#undef $ac_func
11279
ca81d7a0
JD
11280/* Override any GCC internal prototype to avoid an error.
11281 Use char because int might match the return type of a GCC
11282 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11283#ifdef __cplusplus
11284extern "C"
572a3cc2 11285#endif
572a3cc2
JD
11286char $ac_func ();
11287/* The GNU C library defines this for functions which it implements
11288 to always fail with ENOSYS. Some functions are actually named
11289 something starting with __ and the normal name is an alias. */
ca81d7a0 11290#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11291choke me
572a3cc2
JD
11292#endif
11293
11294int
11295main ()
11296{
ca81d7a0 11297return $ac_func ();
572a3cc2
JD
11298 ;
11299 return 0;
11300}
11301_ACEOF
11302rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11303if { (ac_try="$ac_link"
11304case "(($ac_try" in
11305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11306 *) ac_try_echo=$ac_try;;
11307esac
11308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11309 (eval "$ac_link") 2>conftest.er1
572a3cc2 11310 ac_status=$?
edfaf76d
LK
11311 grep -v '^ *+' conftest.er1 >conftest.err
11312 rm -f conftest.er1
11313 cat conftest.err >&5
572a3cc2 11314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11315 (exit $ac_status); } && {
11316 test -z "$ac_c_werror_flag" ||
11317 test ! -s conftest.err
11318 } && test -s conftest$ac_exeext &&
11319 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11320 eval "$as_ac_var=yes"
11321else
11322 echo "$as_me: failed program was:" >&5
11323sed 's/^/| /' conftest.$ac_ext >&5
11324
ca81d7a0 11325 eval "$as_ac_var=no"
572a3cc2 11326fi
ca81d7a0 11327
f053c89f 11328rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11329 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11330fi
ca81d7a0
JD
11331ac_res=`eval echo '${'$as_ac_var'}'`
11332 { echo "$as_me:$LINENO: result: $ac_res" >&5
11333echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11334if test `eval echo '${'$as_ac_var'}'` = yes; then
11335 cat >>confdefs.h <<_ACEOF
11336#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11337_ACEOF
8eeae1c9 11338 HAVE_GTK_FILE_SELECTION=yes
572a3cc2
JD
11339fi
11340done
11341
11342
8eeae1c9 11343 HAVE_GTK_FILE_CHOOSER=no
b8bdffbe 11344
8eeae1c9 11345for ac_func in gtk_file_chooser_dialog_new
b8bdffbe 11346do
8eeae1c9 11347as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11348{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11349echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11350if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe 11351 echo $ECHO_N "(cached) $ECHO_C" >&6
b8bdffbe 11352else
8eeae1c9 11353 cat >conftest.$ac_ext <<_ACEOF
b8bdffbe
JD
11354/* confdefs.h. */
11355_ACEOF
11356cat confdefs.h >>conftest.$ac_ext
11357cat >>conftest.$ac_ext <<_ACEOF
11358/* end confdefs.h. */
8eeae1c9
JD
11359/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11360 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11361#define $ac_func innocuous_$ac_func
11362
11363/* System header to define __stub macros and hopefully few prototypes,
11364 which can conflict with char $ac_func (); below.
11365 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11366 <limits.h> exists even on freestanding compilers. */
11367
11368#ifdef __STDC__
11369# include <limits.h>
11370#else
11371# include <assert.h>
11372#endif
11373
11374#undef $ac_func
11375
ca81d7a0
JD
11376/* Override any GCC internal prototype to avoid an error.
11377 Use char because int might match the return type of a GCC
11378 builtin and then its argument prototype would still apply. */
8eeae1c9
JD
11379#ifdef __cplusplus
11380extern "C"
11381#endif
11382char $ac_func ();
11383/* The GNU C library defines this for functions which it implements
11384 to always fail with ENOSYS. Some functions are actually named
11385 something starting with __ and the normal name is an alias. */
ca81d7a0 11386#if defined __stub_$ac_func || defined __stub___$ac_func
8eeae1c9
JD
11387choke me
11388#endif
11389
11390int
11391main ()
11392{
ca81d7a0 11393return $ac_func ();
8eeae1c9
JD
11394 ;
11395 return 0;
11396}
11397_ACEOF
11398rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11399if { (ac_try="$ac_link"
11400case "(($ac_try" in
11401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11402 *) ac_try_echo=$ac_try;;
11403esac
11404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11405 (eval "$ac_link") 2>conftest.er1
8eeae1c9
JD
11406 ac_status=$?
11407 grep -v '^ *+' conftest.er1 >conftest.err
11408 rm -f conftest.er1
11409 cat conftest.err >&5
11410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11411 (exit $ac_status); } && {
11412 test -z "$ac_c_werror_flag" ||
11413 test ! -s conftest.err
11414 } && test -s conftest$ac_exeext &&
11415 $as_test_x conftest$ac_exeext; then
8eeae1c9
JD
11416 eval "$as_ac_var=yes"
11417else
11418 echo "$as_me: failed program was:" >&5
11419sed 's/^/| /' conftest.$ac_ext >&5
11420
ca81d7a0 11421 eval "$as_ac_var=no"
8eeae1c9 11422fi
ca81d7a0 11423
f053c89f 11424rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8eeae1c9
JD
11425 conftest$ac_exeext conftest.$ac_ext
11426fi
ca81d7a0
JD
11427ac_res=`eval echo '${'$as_ac_var'}'`
11428 { echo "$as_me:$LINENO: result: $ac_res" >&5
11429echo "${ECHO_T}$ac_res" >&6; }
8eeae1c9
JD
11430if test `eval echo '${'$as_ac_var'}'` = yes; then
11431 cat >>confdefs.h <<_ACEOF
11432#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11433_ACEOF
11434 HAVE_GTK_FILE_CHOOSER=yes
11435fi
11436done
11437
11438
11439 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11440 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11441
11442cat >>confdefs.h <<\_ACEOF
11443#define HAVE_GTK_FILE_BOTH 1
11444_ACEOF
11445
11446 fi
11447
11448 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11449 HAVE_GTK_AND_PTHREAD=no
11450
11451for ac_header in pthread.h
11452do
11453as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
11454if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11455 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11456echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11457if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8eeae1c9
JD
11458 echo $ECHO_N "(cached) $ECHO_C" >&6
11459fi
ca81d7a0
JD
11460ac_res=`eval echo '${'$as_ac_Header'}'`
11461 { echo "$as_me:$LINENO: result: $ac_res" >&5
11462echo "${ECHO_T}$ac_res" >&6; }
8eeae1c9
JD
11463else
11464 # Is the header compilable?
ca81d7a0
JD
11465{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11466echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8eeae1c9
JD
11467cat >conftest.$ac_ext <<_ACEOF
11468/* confdefs.h. */
11469_ACEOF
11470cat confdefs.h >>conftest.$ac_ext
11471cat >>conftest.$ac_ext <<_ACEOF
11472/* end confdefs.h. */
11473$ac_includes_default
11474#include <$ac_header>
11475_ACEOF
11476rm -f conftest.$ac_objext
ca81d7a0
JD
11477if { (ac_try="$ac_compile"
11478case "(($ac_try" in
11479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11480 *) ac_try_echo=$ac_try;;
11481esac
11482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11483 (eval "$ac_compile") 2>conftest.er1
8eeae1c9
JD
11484 ac_status=$?
11485 grep -v '^ *+' conftest.er1 >conftest.err
11486 rm -f conftest.er1
edfaf76d 11487 cat conftest.err >&5
b8bdffbe 11488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11489 (exit $ac_status); } && {
11490 test -z "$ac_c_werror_flag" ||
11491 test ! -s conftest.err
11492 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11493 ac_header_compiler=yes
11494else
11495 echo "$as_me: failed program was:" >&5
11496sed 's/^/| /' conftest.$ac_ext >&5
11497
ca81d7a0 11498 ac_header_compiler=no
b8bdffbe 11499fi
ca81d7a0
JD
11500
11501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11502{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11503echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11504
11505# Is the header present?
ca81d7a0
JD
11506{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11507echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11508cat >conftest.$ac_ext <<_ACEOF
11509/* confdefs.h. */
11510_ACEOF
11511cat confdefs.h >>conftest.$ac_ext
11512cat >>conftest.$ac_ext <<_ACEOF
11513/* end confdefs.h. */
11514#include <$ac_header>
11515_ACEOF
ca81d7a0
JD
11516if { (ac_try="$ac_cpp conftest.$ac_ext"
11517case "(($ac_try" in
11518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11519 *) ac_try_echo=$ac_try;;
11520esac
11521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11522 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11523 ac_status=$?
11524 grep -v '^ *+' conftest.er1 >conftest.err
11525 rm -f conftest.er1
11526 cat conftest.err >&5
11527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11528 (exit $ac_status); } >/dev/null && {
11529 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11530 test ! -s conftest.err
11531 }; then
b8bdffbe
JD
11532 ac_header_preproc=yes
11533else
11534 echo "$as_me: failed program was:" >&5
11535sed 's/^/| /' conftest.$ac_ext >&5
11536
11537 ac_header_preproc=no
11538fi
ca81d7a0 11539
b8bdffbe 11540rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
11541{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11542echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11543
11544# So? What about this header?
edfaf76d
LK
11545case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11546 yes:no: )
b8bdffbe
JD
11547 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11548echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11549 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11550echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11551 ac_header_preproc=yes
b8bdffbe 11552 ;;
edfaf76d 11553 no:yes:* )
b8bdffbe
JD
11554 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11555echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11556 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11557echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11558 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11559echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11560 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11561echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11562 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11563echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11564 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11565echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11566
b8bdffbe
JD
11567 ;;
11568esac
ca81d7a0
JD
11569{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11570echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11571if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11572 echo $ECHO_N "(cached) $ECHO_C" >&6
11573else
edfaf76d 11574 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11575fi
ca81d7a0
JD
11576ac_res=`eval echo '${'$as_ac_Header'}'`
11577 { echo "$as_me:$LINENO: result: $ac_res" >&5
11578echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11579
11580fi
11581if test `eval echo '${'$as_ac_Header'}'` = yes; then
11582 cat >>confdefs.h <<_ACEOF
11583#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11584_ACEOF
11585
11586fi
11587
11588done
11589
11590 if test "$ac_cv_header_pthread_h"; then
ca81d7a0
JD
11591 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11592echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11593if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11594 echo $ECHO_N "(cached) $ECHO_C" >&6
11595else
11596 ac_check_lib_save_LIBS=$LIBS
11597LIBS="-lpthread $LIBS"
11598cat >conftest.$ac_ext <<_ACEOF
11599/* confdefs.h. */
11600_ACEOF
11601cat confdefs.h >>conftest.$ac_ext
11602cat >>conftest.$ac_ext <<_ACEOF
11603/* end confdefs.h. */
11604
ca81d7a0
JD
11605/* Override any GCC internal prototype to avoid an error.
11606 Use char because int might match the return type of a GCC
11607 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11608#ifdef __cplusplus
11609extern "C"
11610#endif
b8bdffbe
JD
11611char pthread_self ();
11612int
11613main ()
11614{
ca81d7a0 11615return pthread_self ();
b8bdffbe
JD
11616 ;
11617 return 0;
11618}
11619_ACEOF
11620rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11621if { (ac_try="$ac_link"
11622case "(($ac_try" in
11623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11624 *) ac_try_echo=$ac_try;;
11625esac
11626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11627 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11628 ac_status=$?
edfaf76d
LK
11629 grep -v '^ *+' conftest.er1 >conftest.err
11630 rm -f conftest.er1
11631 cat conftest.err >&5
b8bdffbe 11632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11633 (exit $ac_status); } && {
11634 test -z "$ac_c_werror_flag" ||
11635 test ! -s conftest.err
11636 } && test -s conftest$ac_exeext &&
11637 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11638 ac_cv_lib_pthread_pthread_self=yes
11639else
11640 echo "$as_me: failed program was:" >&5
11641sed 's/^/| /' conftest.$ac_ext >&5
11642
ca81d7a0 11643 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11644fi
ca81d7a0 11645
f053c89f 11646rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11647 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11648LIBS=$ac_check_lib_save_LIBS
11649fi
ca81d7a0
JD
11650{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11651echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11652if test $ac_cv_lib_pthread_pthread_self = yes; then
11653 HAVE_GTK_AND_PTHREAD=yes
11654fi
11655
11656 fi
11657 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
11658 GTK_LIBS="$GTK_LIBS -lpthread"
11659
11660cat >>confdefs.h <<\_ACEOF
11661#define HAVE_GTK_AND_PTHREAD 1
11662_ACEOF
11663
11664 fi
57669b57 11665 fi
488dd4c4
JD
11666fi
11667
98418dba
CW
11668if test x"${USE_X_TOOLKIT}" = xmaybe; then
11669 if test x"${HAVE_X11R5}" = xyes; then
ca81d7a0
JD
11670 { echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
11671echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6; }
98418dba
CW
11672 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
11673 echo $ECHO_N "(cached) $ECHO_C" >&6
11674else
11675 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11676/* confdefs.h. */
11677_ACEOF
11678cat confdefs.h >>conftest.$ac_ext
11679cat >>conftest.$ac_ext <<_ACEOF
11680/* end confdefs.h. */
98418dba
CW
11681
11682#include <X11/Intrinsic.h>
11683#include <X11/Xaw/Simple.h>
98418dba
CW
11684int
11685main ()
11686{
11687
11688 ;
11689 return 0;
11690}
11691_ACEOF
11692rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11693if { (ac_try="$ac_link"
11694case "(($ac_try" in
11695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11696 *) ac_try_echo=$ac_try;;
11697esac
11698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11699 (eval "$ac_link") 2>conftest.er1
98418dba 11700 ac_status=$?
edfaf76d
LK
11701 grep -v '^ *+' conftest.er1 >conftest.err
11702 rm -f conftest.er1
11703 cat conftest.err >&5
c0d27fcc 11704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11705 (exit $ac_status); } && {
11706 test -z "$ac_c_werror_flag" ||
11707 test ! -s conftest.err
11708 } && test -s conftest$ac_exeext &&
11709 $as_test_x conftest$ac_exeext; then
98418dba
CW
11710 emacs_cv_x11_version_5_with_xaw=yes
11711else
11712 echo "$as_me: failed program was:" >&5
19650fd6
AS
11713sed 's/^/| /' conftest.$ac_ext >&5
11714
ca81d7a0 11715 emacs_cv_x11_version_5_with_xaw=no
98418dba 11716fi
ca81d7a0 11717
f053c89f 11718rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11719 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11720fi
11721
11722 if test $emacs_cv_x11_version_5_with_xaw = yes; then
ca81d7a0
JD
11723 { echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
11724echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6; }
98418dba
CW
11725 USE_X_TOOLKIT=LUCID
11726 else
ca81d7a0
JD
11727 { echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
11728echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6; }
98418dba
CW
11729 USE_X_TOOLKIT=none
11730 fi
11731 else
11732 USE_X_TOOLKIT=none
11733 fi
11734fi
11735
11736X_TOOLKIT_TYPE=$USE_X_TOOLKIT
11737
11738if test "${USE_X_TOOLKIT}" != "none"; then
ca81d7a0
JD
11739 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
11740echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
11741 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
11742 echo $ECHO_N "(cached) $ECHO_C" >&6
11743else
11744 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11745/* confdefs.h. */
11746_ACEOF
11747cat confdefs.h >>conftest.$ac_ext
11748cat >>conftest.$ac_ext <<_ACEOF
11749/* end confdefs.h. */
98418dba 11750#include <X11/Intrinsic.h>
98418dba
CW
11751int
11752main ()
11753{
11754#if XtSpecificationRelease < 6
11755fail;
11756#endif
11757
11758 ;
11759 return 0;
11760}
11761_ACEOF
11762rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11763if { (ac_try="$ac_link"
11764case "(($ac_try" in
11765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11766 *) ac_try_echo=$ac_try;;
11767esac
11768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11769 (eval "$ac_link") 2>conftest.er1
98418dba 11770 ac_status=$?
edfaf76d
LK
11771 grep -v '^ *+' conftest.er1 >conftest.err
11772 rm -f conftest.er1
11773 cat conftest.err >&5
c0d27fcc 11774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11775 (exit $ac_status); } && {
11776 test -z "$ac_c_werror_flag" ||
11777 test ! -s conftest.err
11778 } && test -s conftest$ac_exeext &&
11779 $as_test_x conftest$ac_exeext; then
98418dba
CW
11780 emacs_cv_x11_toolkit_version_6=yes
11781else
11782 echo "$as_me: failed program was:" >&5
19650fd6
AS
11783sed 's/^/| /' conftest.$ac_ext >&5
11784
ca81d7a0 11785 emacs_cv_x11_toolkit_version_6=no
98418dba 11786fi
ca81d7a0 11787
f053c89f 11788rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11789 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11790fi
11791
11792 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11793 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ca81d7a0
JD
11794 { echo "$as_me:$LINENO: result: 6 or newer" >&5
11795echo "${ECHO_T}6 or newer" >&6; }
b936fae4 11796
c0d27fcc 11797cat >>confdefs.h <<\_ACEOF
98418dba 11798#define HAVE_X11XTR6 1
c0d27fcc 11799_ACEOF
98418dba
CW
11800
11801 else
ca81d7a0
JD
11802 { echo "$as_me:$LINENO: result: before 6" >&5
11803echo "${ECHO_T}before 6" >&6; }
98418dba
CW
11804 fi
11805
11806 OLDLIBS="$LIBS"
11807 if test x$HAVE_X11XTR6 = xyes; then
11808 LIBS="-lXt -lSM -lICE $LIBS"
11809 else
11810 LIBS="-lXt $LIBS"
11811 fi
11812
ca81d7a0
JD
11813{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
11814echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
11815if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
11816 echo $ECHO_N "(cached) $ECHO_C" >&6
11817else
11818 ac_check_lib_save_LIBS=$LIBS
11819LIBS="-lXmu $LIBS"
11820cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11821/* confdefs.h. */
11822_ACEOF
11823cat confdefs.h >>conftest.$ac_ext
11824cat >>conftest.$ac_ext <<_ACEOF
11825/* end confdefs.h. */
98418dba 11826
ca81d7a0
JD
11827/* Override any GCC internal prototype to avoid an error.
11828 Use char because int might match the return type of a GCC
11829 builtin and then its argument prototype would still apply. */
98418dba
CW
11830#ifdef __cplusplus
11831extern "C"
11832#endif
98418dba 11833char XmuConvertStandardSelection ();
98418dba
CW
11834int
11835main ()
11836{
ca81d7a0 11837return XmuConvertStandardSelection ();
98418dba
CW
11838 ;
11839 return 0;
11840}
11841_ACEOF
11842rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11843if { (ac_try="$ac_link"
11844case "(($ac_try" in
11845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11846 *) ac_try_echo=$ac_try;;
11847esac
11848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11849 (eval "$ac_link") 2>conftest.er1
98418dba 11850 ac_status=$?
edfaf76d
LK
11851 grep -v '^ *+' conftest.er1 >conftest.err
11852 rm -f conftest.er1
11853 cat conftest.err >&5
c0d27fcc 11854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11855 (exit $ac_status); } && {
11856 test -z "$ac_c_werror_flag" ||
11857 test ! -s conftest.err
11858 } && test -s conftest$ac_exeext &&
11859 $as_test_x conftest$ac_exeext; then
98418dba
CW
11860 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11861else
11862 echo "$as_me: failed program was:" >&5
19650fd6
AS
11863sed 's/^/| /' conftest.$ac_ext >&5
11864
ca81d7a0 11865 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 11866fi
ca81d7a0 11867
f053c89f 11868rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11869 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11870LIBS=$ac_check_lib_save_LIBS
11871fi
ca81d7a0
JD
11872{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
11873echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 11874if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 11875 cat >>confdefs.h <<_ACEOF
98418dba 11876#define HAVE_LIBXMU 1
c0d27fcc 11877_ACEOF
98418dba
CW
11878
11879 LIBS="-lXmu $LIBS"
11880
11881fi
11882
11883 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11884fi
11885
11886# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11887if test "${HAVE_X11}" = "yes"; then
11888 if test "${USE_X_TOOLKIT}" != "none"; then
11889
ca81d7a0
JD
11890{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
11891echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
11892if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
11893 echo $ECHO_N "(cached) $ECHO_C" >&6
11894else
11895 ac_check_lib_save_LIBS=$LIBS
11896LIBS="-lXext $LIBS"
11897cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11898/* confdefs.h. */
11899_ACEOF
11900cat confdefs.h >>conftest.$ac_ext
11901cat >>conftest.$ac_ext <<_ACEOF
11902/* end confdefs.h. */
98418dba 11903
ca81d7a0
JD
11904/* Override any GCC internal prototype to avoid an error.
11905 Use char because int might match the return type of a GCC
11906 builtin and then its argument prototype would still apply. */
98418dba
CW
11907#ifdef __cplusplus
11908extern "C"
11909#endif
98418dba 11910char XShapeQueryExtension ();
98418dba
CW
11911int
11912main ()
11913{
ca81d7a0 11914return XShapeQueryExtension ();
98418dba
CW
11915 ;
11916 return 0;
11917}
11918_ACEOF
11919rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11920if { (ac_try="$ac_link"
11921case "(($ac_try" in
11922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11923 *) ac_try_echo=$ac_try;;
11924esac
11925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11926 (eval "$ac_link") 2>conftest.er1
98418dba 11927 ac_status=$?
edfaf76d
LK
11928 grep -v '^ *+' conftest.er1 >conftest.err
11929 rm -f conftest.er1
11930 cat conftest.err >&5
c0d27fcc 11931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11932 (exit $ac_status); } && {
11933 test -z "$ac_c_werror_flag" ||
11934 test ! -s conftest.err
11935 } && test -s conftest$ac_exeext &&
11936 $as_test_x conftest$ac_exeext; then
98418dba
CW
11937 ac_cv_lib_Xext_XShapeQueryExtension=yes
11938else
11939 echo "$as_me: failed program was:" >&5
19650fd6
AS
11940sed 's/^/| /' conftest.$ac_ext >&5
11941
ca81d7a0 11942 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 11943fi
ca81d7a0 11944
f053c89f 11945rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11946 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11947LIBS=$ac_check_lib_save_LIBS
11948fi
ca81d7a0
JD
11949{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
11950echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 11951if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 11952 cat >>confdefs.h <<_ACEOF
98418dba 11953#define HAVE_LIBXEXT 1
c0d27fcc 11954_ACEOF
98418dba
CW
11955
11956 LIBS="-lXext $LIBS"
11957
11958fi
11959
11960 fi
11961fi
11962
11963if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ca81d7a0
JD
11964 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
11965echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
11966if test "${emacs_cv_motif_version_2_1+set}" = set; then
11967 echo $ECHO_N "(cached) $ECHO_C" >&6
11968else
11969 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11970/* confdefs.h. */
11971_ACEOF
11972cat confdefs.h >>conftest.$ac_ext
11973cat >>conftest.$ac_ext <<_ACEOF
11974/* end confdefs.h. */
98418dba 11975#include <Xm/Xm.h>
98418dba
CW
11976int
11977main ()
11978{
11979#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
11980int x = 5;
11981#else
11982Motif version prior to 2.1.
11983#endif
11984 ;
11985 return 0;
11986}
11987_ACEOF
11988rm -f conftest.$ac_objext
ca81d7a0
JD
11989if { (ac_try="$ac_compile"
11990case "(($ac_try" in
11991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11992 *) ac_try_echo=$ac_try;;
11993esac
11994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11995 (eval "$ac_compile") 2>conftest.er1
98418dba 11996 ac_status=$?
edfaf76d
LK
11997 grep -v '^ *+' conftest.er1 >conftest.err
11998 rm -f conftest.er1
11999 cat conftest.err >&5
c0d27fcc 12000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12001 (exit $ac_status); } && {
12002 test -z "$ac_c_werror_flag" ||
12003 test ! -s conftest.err
12004 } && test -s conftest.$ac_objext; then
98418dba
CW
12005 emacs_cv_motif_version_2_1=yes
12006else
12007 echo "$as_me: failed program was:" >&5
19650fd6
AS
12008sed 's/^/| /' conftest.$ac_ext >&5
12009
ca81d7a0 12010 emacs_cv_motif_version_2_1=no
98418dba 12011fi
ca81d7a0
JD
12012
12013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12014fi
ca81d7a0
JD
12015{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12016echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12017 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12018 if test $emacs_cv_motif_version_2_1 = yes; then
12019 HAVE_LIBXP=no
b936fae4 12020
c0d27fcc 12021cat >>confdefs.h <<\_ACEOF
98418dba 12022#define HAVE_MOTIF_2_1 1
c0d27fcc 12023_ACEOF
98418dba 12024
ca81d7a0
JD
12025 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12026echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12027if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12028 echo $ECHO_N "(cached) $ECHO_C" >&6
12029else
12030 ac_check_lib_save_LIBS=$LIBS
12031LIBS="-lXp $LIBS"
12032cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12033/* confdefs.h. */
12034_ACEOF
12035cat confdefs.h >>conftest.$ac_ext
12036cat >>conftest.$ac_ext <<_ACEOF
12037/* end confdefs.h. */
98418dba 12038
ca81d7a0
JD
12039/* Override any GCC internal prototype to avoid an error.
12040 Use char because int might match the return type of a GCC
12041 builtin and then its argument prototype would still apply. */
98418dba
CW
12042#ifdef __cplusplus
12043extern "C"
12044#endif
98418dba 12045char XpCreateContext ();
98418dba
CW
12046int
12047main ()
12048{
ca81d7a0 12049return XpCreateContext ();
98418dba
CW
12050 ;
12051 return 0;
12052}
12053_ACEOF
12054rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12055if { (ac_try="$ac_link"
12056case "(($ac_try" in
12057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12058 *) ac_try_echo=$ac_try;;
12059esac
12060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12061 (eval "$ac_link") 2>conftest.er1
98418dba 12062 ac_status=$?
edfaf76d
LK
12063 grep -v '^ *+' conftest.er1 >conftest.err
12064 rm -f conftest.er1
12065 cat conftest.err >&5
c0d27fcc 12066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12067 (exit $ac_status); } && {
12068 test -z "$ac_c_werror_flag" ||
12069 test ! -s conftest.err
12070 } && test -s conftest$ac_exeext &&
12071 $as_test_x conftest$ac_exeext; then
98418dba
CW
12072 ac_cv_lib_Xp_XpCreateContext=yes
12073else
12074 echo "$as_me: failed program was:" >&5
19650fd6
AS
12075sed 's/^/| /' conftest.$ac_ext >&5
12076
ca81d7a0 12077 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12078fi
ca81d7a0 12079
f053c89f 12080rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12081 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12082LIBS=$ac_check_lib_save_LIBS
12083fi
ca81d7a0
JD
12084{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12085echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12086if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12087 HAVE_LIBXP=yes
12088fi
503d2be0 12089
98418dba 12090 if test ${HAVE_LIBXP} = yes; then
b936fae4 12091
c0d27fcc 12092cat >>confdefs.h <<\_ACEOF
98418dba 12093#define HAVE_LIBXP 1
c0d27fcc 12094_ACEOF
503d2be0 12095
98418dba 12096 fi
4693dbc9 12097 else
ca81d7a0
JD
12098 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12099echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12100if test "${emacs_cv_lesstif+set}" = set; then
12101 echo $ECHO_N "(cached) $ECHO_C" >&6
12102else
12103 # We put this in CFLAGS temporarily to precede other -I options
12104 # that might be in CFLAGS temporarily.
12105 # We put this in CPPFLAGS where it precedes the other -I options.
12106 OLD_CPPFLAGS=$CPPFLAGS
12107 OLD_CFLAGS=$CFLAGS
12108 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12109 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12110 cat >conftest.$ac_ext <<_ACEOF
12111/* confdefs.h. */
12112_ACEOF
12113cat confdefs.h >>conftest.$ac_ext
12114cat >>conftest.$ac_ext <<_ACEOF
12115/* end confdefs.h. */
12116#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12117int
12118main ()
12119{
12120int x = 5;
12121 ;
12122 return 0;
12123}
12124_ACEOF
12125rm -f conftest.$ac_objext
ca81d7a0
JD
12126if { (ac_try="$ac_compile"
12127case "(($ac_try" in
12128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12129 *) ac_try_echo=$ac_try;;
12130esac
12131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12132 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12133 ac_status=$?
edfaf76d
LK
12134 grep -v '^ *+' conftest.er1 >conftest.err
12135 rm -f conftest.er1
12136 cat conftest.err >&5
4693dbc9 12137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12138 (exit $ac_status); } && {
12139 test -z "$ac_c_werror_flag" ||
12140 test ! -s conftest.err
12141 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12142 emacs_cv_lesstif=yes
12143else
12144 echo "$as_me: failed program was:" >&5
12145sed 's/^/| /' conftest.$ac_ext >&5
12146
ca81d7a0 12147 emacs_cv_lesstif=no
4693dbc9 12148fi
ca81d7a0
JD
12149
12150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12151fi
ca81d7a0
JD
12152{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12153echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12154 if test $emacs_cv_lesstif = yes; then
12155 # Make sure this -I option remains in CPPFLAGS after it is set
12156 # back to REAL_CPPFLAGS.
12157 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12158 # have those other -I options anyway. Ultimately, having this
12159 # directory ultimately in CPPFLAGS will be enough.
12160 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12161 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12162 else
12163 CFLAGS=$OLD_CFLAGS
12164 CPPFLAGS=$OLD_CPPFLAGS
12165 fi
98418dba
CW
12166 fi
12167fi
12168
12169### Is -lXaw3d available?
12170HAVE_XAW3D=no
12171if test "${HAVE_X11}" = "yes"; then
7c00e1e9 12172 if test "${USE_X_TOOLKIT}" != "none" && test "${with_toolkit_scroll_bars}" != "no"; then
ca81d7a0
JD
12173 { echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
12174echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6; }
98418dba
CW
12175if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
12176 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 12177else
22044edf 12178 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12179/* confdefs.h. */
12180_ACEOF
12181cat confdefs.h >>conftest.$ac_ext
12182cat >>conftest.$ac_ext <<_ACEOF
12183/* end confdefs.h. */
98418dba 12184#include <X11/Xaw3d/Scrollbar.h>
503d2be0 12185_ACEOF
ca81d7a0
JD
12186if { (ac_try="$ac_cpp conftest.$ac_ext"
12187case "(($ac_try" in
12188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12189 *) ac_try_echo=$ac_try;;
12190esac
12191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12192 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 12193 ac_status=$?
6bae0ccf 12194 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
12195 rm -f conftest.er1
12196 cat conftest.err >&5
c0d27fcc 12197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12198 (exit $ac_status); } >/dev/null && {
12199 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12200 test ! -s conftest.err
12201 }; then
22044edf 12202 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 12203else
503d2be0 12204 echo "$as_me: failed program was:" >&5
19650fd6
AS
12205sed 's/^/| /' conftest.$ac_ext >&5
12206
22044edf 12207 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 12208fi
ca81d7a0 12209
503d2be0 12210rm -f conftest.err conftest.$ac_ext
98418dba 12211fi
ca81d7a0
JD
12212{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
12213echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6; }
98418dba 12214if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
ca81d7a0
JD
12215 { echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
12216echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6; }
98418dba
CW
12217if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
12218 echo $ECHO_N "(cached) $ECHO_C" >&6
12219else
12220 ac_check_lib_save_LIBS=$LIBS
12221LIBS="-lXaw3d $LIBS"
12222cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12223/* confdefs.h. */
12224_ACEOF
12225cat confdefs.h >>conftest.$ac_ext
12226cat >>conftest.$ac_ext <<_ACEOF
12227/* end confdefs.h. */
98418dba 12228
ca81d7a0
JD
12229/* Override any GCC internal prototype to avoid an error.
12230 Use char because int might match the return type of a GCC
12231 builtin and then its argument prototype would still apply. */
98418dba
CW
12232#ifdef __cplusplus
12233extern "C"
12234#endif
98418dba 12235char XawScrollbarSetThumb ();
503d2be0
AS
12236int
12237main ()
12238{
ca81d7a0 12239return XawScrollbarSetThumb ();
503d2be0
AS
12240 ;
12241 return 0;
12242}
12243_ACEOF
12244rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12245if { (ac_try="$ac_link"
12246case "(($ac_try" in
12247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12248 *) ac_try_echo=$ac_try;;
12249esac
12250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12251 (eval "$ac_link") 2>conftest.er1
503d2be0 12252 ac_status=$?
edfaf76d
LK
12253 grep -v '^ *+' conftest.er1 >conftest.err
12254 rm -f conftest.er1
12255 cat conftest.err >&5
c0d27fcc 12256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12257 (exit $ac_status); } && {
12258 test -z "$ac_c_werror_flag" ||
12259 test ! -s conftest.err
12260 } && test -s conftest$ac_exeext &&
12261 $as_test_x conftest$ac_exeext; then
98418dba 12262 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 12263else
503d2be0 12264 echo "$as_me: failed program was:" >&5
19650fd6
AS
12265sed 's/^/| /' conftest.$ac_ext >&5
12266
ca81d7a0 12267 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 12268fi
ca81d7a0 12269
f053c89f 12270rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12271 conftest$ac_exeext conftest.$ac_ext
98418dba 12272LIBS=$ac_check_lib_save_LIBS
ba4481b5 12273fi
ca81d7a0
JD
12274{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
12275echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
98418dba
CW
12276if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
12277 HAVE_XAW3D=yes
ba4481b5 12278fi
503d2be0 12279
ba4481b5
DL
12280fi
12281
c0d27fcc 12282
98418dba 12283 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 12284
c0d27fcc 12285cat >>confdefs.h <<\_ACEOF
98418dba 12286#define HAVE_XAW3D 1
c0d27fcc 12287_ACEOF
98418dba 12288
ba4481b5 12289 fi
98418dba 12290 fi
ba4481b5
DL
12291fi
12292
c0d27fcc
MR
12293
12294
98418dba
CW
12295USE_TOOLKIT_SCROLL_BARS=no
12296if test "${with_toolkit_scroll_bars}" != "no"; then
12297 if test "${USE_X_TOOLKIT}" != "none"; then
12298 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12299 cat >>confdefs.h <<\_ACEOF
98418dba 12300#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12301_ACEOF
98418dba
CW
12302
12303 HAVE_XAW3D=no
12304 USE_TOOLKIT_SCROLL_BARS=yes
12305 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12306 cat >>confdefs.h <<\_ACEOF
98418dba 12307#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12308_ACEOF
98418dba
CW
12309
12310 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12311 fi
488dd4c4
JD
12312 elif test "${HAVE_GTK}" = "yes"; then
12313 cat >>confdefs.h <<\_ACEOF
12314#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
12315_ACEOF
12316
12317 USE_TOOLKIT_SCROLL_BARS=yes
12318 elif test "${HAVE_CARBON}" = "yes"; then
12319 cat >>confdefs.h <<\_ACEOF
12320#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12321_ACEOF
12322
12323 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12324 fi
12325fi
12326
abd39b57 12327cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12328/* confdefs.h. */
12329_ACEOF
12330cat confdefs.h >>conftest.$ac_ext
12331cat >>conftest.$ac_ext <<_ACEOF
12332/* end confdefs.h. */
12333
12334 #include <X11/Xlib.h>
12335 #include <X11/Xresource.h>
12336int
12337main ()
12338{
12339XIMProc callback;
12340 ;
12341 return 0;
12342}
12343_ACEOF
12344rm -f conftest.$ac_objext
ca81d7a0
JD
12345if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
abd39b57 12352 ac_status=$?
edfaf76d
LK
12353 grep -v '^ *+' conftest.er1 >conftest.err
12354 rm -f conftest.er1
12355 cat conftest.err >&5
abd39b57 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_objext; then
abd39b57
AC
12361 HAVE_XIM=yes
12362
12363cat >>confdefs.h <<\_ACEOF
12364#define HAVE_XIM 1
12365_ACEOF
12366
12367else
12368 echo "$as_me: failed program was:" >&5
12369sed 's/^/| /' conftest.$ac_ext >&5
12370
ca81d7a0 12371 HAVE_XIM=no
abd39b57 12372fi
ca81d7a0
JD
12373
12374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12375
c0d27fcc 12376
98418dba 12377if test "${with_xim}" != "no"; then
b936fae4 12378
c0d27fcc 12379cat >>confdefs.h <<\_ACEOF
98418dba 12380#define USE_XIM 1
c0d27fcc 12381_ACEOF
98418dba 12382
793fa0d7 12383fi
abd39b57
AC
12384
12385
12386if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12387 late_CFLAGS=$CFLAGS
12388 if test "$GCC" = yes; then
12389 CFLAGS="$CFLAGS --pedantic-errors"
12390 fi
cffcede7 12391 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12392/* confdefs.h. */
12393_ACEOF
12394cat confdefs.h >>conftest.$ac_ext
12395cat >>conftest.$ac_ext <<_ACEOF
12396/* end confdefs.h. */
cffcede7
JD
12397
12398#include <X11/Xlib.h>
12399#include <X11/Xresource.h>
12400int
12401main ()
12402{
12403Display *display;
12404XrmDatabase db;
12405char *res_name;
12406char *res_class;
12407XIMProc callback;
12408XPointer *client_data;
849d80cf
DL
12409#ifndef __GNUC__
12410/* If we're not using GCC, it's probably not XFree86, and this is
12411 probably right, but we can't use something like --pedantic-errors. */
12412extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12413 char*, XIMProc, XPointer*);
12414#endif
cffcede7
JD
12415(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12416 client_data);
12417 ;
12418 return 0;
12419}
12420_ACEOF
12421rm -f conftest.$ac_objext
ca81d7a0
JD
12422if { (ac_try="$ac_compile"
12423case "(($ac_try" in
12424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12425 *) ac_try_echo=$ac_try;;
12426esac
12427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12428 (eval "$ac_compile") 2>conftest.er1
cffcede7 12429 ac_status=$?
edfaf76d
LK
12430 grep -v '^ *+' conftest.er1 >conftest.err
12431 rm -f conftest.er1
12432 cat conftest.err >&5
cffcede7 12433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12434 (exit $ac_status); } && {
12435 test -z "$ac_c_werror_flag" ||
12436 test ! -s conftest.err
12437 } && test -s conftest.$ac_objext; then
cffcede7
JD
12438 emacs_cv_arg6_star=yes
12439else
12440 echo "$as_me: failed program was:" >&5
19650fd6
AS
12441sed 's/^/| /' conftest.$ac_ext >&5
12442
ca81d7a0 12443
cffcede7 12444fi
ca81d7a0
JD
12445
12446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12447
12448 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12449 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12450#define XRegisterIMInstantiateCallback_arg6 XPointer*
12451_ACEOF
12452
12453 else
f57bd967 12454 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12455#define XRegisterIMInstantiateCallback_arg6 XPointer
12456_ACEOF
12457
12458 fi
849d80cf 12459 CFLAGS=$late_CFLAGS
98418dba
CW
12460fi
12461
12462### Use -lXpm if available, unless `--with-xpm=no'.
12463HAVE_XPM=no
12464if test "${HAVE_X11}" = "yes"; then
12465 if test "${with_xpm}" != "no"; then
c0d27fcc 12466 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
ca81d7a0
JD
12467 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
12468echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
12469if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12470 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 12471fi
ca81d7a0
JD
12472{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
12473echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 12474else
c0d27fcc 12475 # Is the header compilable?
ca81d7a0
JD
12476{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
12477echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 12478cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12479/* confdefs.h. */
12480_ACEOF
12481cat confdefs.h >>conftest.$ac_ext
12482cat >>conftest.$ac_ext <<_ACEOF
12483/* end confdefs.h. */
c0d27fcc
MR
12484$ac_includes_default
12485#include <X11/xpm.h>
12486_ACEOF
12487rm -f conftest.$ac_objext
ca81d7a0
JD
12488if { (ac_try="$ac_compile"
12489case "(($ac_try" in
12490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12491 *) ac_try_echo=$ac_try;;
12492esac
12493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12494 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 12495 ac_status=$?
edfaf76d
LK
12496 grep -v '^ *+' conftest.er1 >conftest.err
12497 rm -f conftest.er1
12498 cat conftest.err >&5
c0d27fcc 12499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12500 (exit $ac_status); } && {
12501 test -z "$ac_c_werror_flag" ||
12502 test ! -s conftest.err
12503 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
12504 ac_header_compiler=yes
12505else
12506 echo "$as_me: failed program was:" >&5
19650fd6
AS
12507sed 's/^/| /' conftest.$ac_ext >&5
12508
ca81d7a0 12509 ac_header_compiler=no
c0d27fcc 12510fi
ca81d7a0
JD
12511
12512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12513{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12514echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
12515
12516# Is the header present?
ca81d7a0
JD
12517{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
12518echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 12519cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12520/* confdefs.h. */
12521_ACEOF
12522cat confdefs.h >>conftest.$ac_ext
12523cat >>conftest.$ac_ext <<_ACEOF
12524/* end confdefs.h. */
98418dba
CW
12525#include <X11/xpm.h>
12526_ACEOF
ca81d7a0
JD
12527if { (ac_try="$ac_cpp conftest.$ac_ext"
12528case "(($ac_try" in
12529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12530 *) ac_try_echo=$ac_try;;
12531esac
12532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12533 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 12534 ac_status=$?
6bae0ccf 12535 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12536 rm -f conftest.er1
12537 cat conftest.err >&5
c0d27fcc 12538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12539 (exit $ac_status); } >/dev/null && {
12540 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12541 test ! -s conftest.err
12542 }; then
c0d27fcc 12543 ac_header_preproc=yes
98418dba
CW
12544else
12545 echo "$as_me: failed program was:" >&5
19650fd6
AS
12546sed 's/^/| /' conftest.$ac_ext >&5
12547
c0d27fcc 12548 ac_header_preproc=no
98418dba 12549fi
ca81d7a0 12550
98418dba 12551rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
12552{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12553echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
12554
12555# So? What about this header?
edfaf76d
LK
12556case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12557 yes:no: )
c0d27fcc
MR
12558 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
12559echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12560 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
12561echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
12562 ac_header_preproc=yes
12563 ;;
12564 no:yes:* )
12565 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
12566echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
12567 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
12568echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
12569 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
12570echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
12571 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
12572echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
12573 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
12574echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12575 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
12576echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 12577
19650fd6 12578 ;;
c0d27fcc 12579esac
ca81d7a0
JD
12580{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
12581echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
12582if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12583 echo $ECHO_N "(cached) $ECHO_C" >&6
12584else
12585 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 12586fi
ca81d7a0
JD
12587{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
12588echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
12589
12590fi
98418dba 12591if test $ac_cv_header_X11_xpm_h = yes; then
ca81d7a0
JD
12592 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
12593echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 12594if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 12595 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12596else
98418dba
CW
12597 ac_check_lib_save_LIBS=$LIBS
12598LIBS="-lXpm -lX11 $LIBS"
12599cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12600/* confdefs.h. */
12601_ACEOF
12602cat confdefs.h >>conftest.$ac_ext
12603cat >>conftest.$ac_ext <<_ACEOF
12604/* end confdefs.h. */
98418dba 12605
ca81d7a0
JD
12606/* Override any GCC internal prototype to avoid an error.
12607 Use char because int might match the return type of a GCC
12608 builtin and then its argument prototype would still apply. */
503d2be0
AS
12609#ifdef __cplusplus
12610extern "C"
12611#endif
98418dba 12612char XpmReadFileToPixmap ();
503d2be0
AS
12613int
12614main ()
12615{
ca81d7a0 12616return XpmReadFileToPixmap ();
503d2be0
AS
12617 ;
12618 return 0;
12619}
12620_ACEOF
12621rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12622if { (ac_try="$ac_link"
12623case "(($ac_try" in
12624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12625 *) ac_try_echo=$ac_try;;
12626esac
12627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12628 (eval "$ac_link") 2>conftest.er1
503d2be0 12629 ac_status=$?
edfaf76d
LK
12630 grep -v '^ *+' conftest.er1 >conftest.err
12631 rm -f conftest.er1
12632 cat conftest.err >&5
c0d27fcc 12633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12634 (exit $ac_status); } && {
12635 test -z "$ac_c_werror_flag" ||
12636 test ! -s conftest.err
12637 } && test -s conftest$ac_exeext &&
12638 $as_test_x conftest$ac_exeext; then
98418dba 12639 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
12640else
12641 echo "$as_me: failed program was:" >&5
19650fd6
AS
12642sed 's/^/| /' conftest.$ac_ext >&5
12643
ca81d7a0 12644 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 12645fi
ca81d7a0 12646
f053c89f 12647rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12648 conftest$ac_exeext conftest.$ac_ext
98418dba 12649LIBS=$ac_check_lib_save_LIBS
503d2be0 12650fi
ca81d7a0
JD
12651{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
12652echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
12653if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
12654 HAVE_XPM=yes
ba4481b5
DL
12655fi
12656
98418dba
CW
12657fi
12658
c0d27fcc 12659
98418dba 12660 if test "${HAVE_XPM}" = "yes"; then
ca81d7a0
JD
12661 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
12662echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 12663 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12664/* confdefs.h. */
12665_ACEOF
12666cat confdefs.h >>conftest.$ac_ext
12667cat >>conftest.$ac_ext <<_ACEOF
12668/* end confdefs.h. */
98418dba
CW
12669#include "X11/xpm.h"
12670#ifndef XpmReturnAllocPixels
12671no_return_alloc_pixels
503d2be0 12672#endif
ba4481b5 12673
98418dba
CW
12674_ACEOF
12675if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 12676 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
12677 HAVE_XPM=no
12678else
12679 HAVE_XPM=yes
12680fi
12681rm -f conftest*
ba4481b5 12682
c0d27fcc 12683
98418dba 12684 if test "${HAVE_XPM}" = "yes"; then
ca81d7a0
JD
12685 { echo "$as_me:$LINENO: result: yes" >&5
12686echo "${ECHO_T}yes" >&6; }
98418dba 12687 else
ca81d7a0
JD
12688 { echo "$as_me:$LINENO: result: no" >&5
12689echo "${ECHO_T}no" >&6; }
98418dba
CW
12690 fi
12691 fi
12692 fi
12693
12694 if test "${HAVE_XPM}" = "yes"; then
b936fae4 12695
c0d27fcc 12696cat >>confdefs.h <<\_ACEOF
98418dba 12697#define HAVE_XPM 1
c0d27fcc 12698_ACEOF
98418dba
CW
12699
12700 fi
12701fi
12702
12703### Use -ljpeg if available, unless `--with-jpeg=no'.
12704HAVE_JPEG=no
12705if test "${HAVE_X11}" = "yes"; then
12706 if test "${with_jpeg}" != "no"; then
c0d27fcc 12707 if test "${ac_cv_header_jerror_h+set}" = set; then
ca81d7a0
JD
12708 { echo "$as_me:$LINENO: checking for jerror.h" >&5
12709echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
12710if test "${ac_cv_header_jerror_h+set}" = set; then
12711 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 12712fi
ca81d7a0
JD
12713{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
12714echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 12715else
c0d27fcc 12716 # Is the header compilable?
ca81d7a0
JD
12717{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
12718echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 12719cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12720/* confdefs.h. */
12721_ACEOF
12722cat confdefs.h >>conftest.$ac_ext
12723cat >>conftest.$ac_ext <<_ACEOF
12724/* end confdefs.h. */
c0d27fcc
MR
12725$ac_includes_default
12726#include <jerror.h>
12727_ACEOF
12728rm -f conftest.$ac_objext
ca81d7a0
JD
12729if { (ac_try="$ac_compile"
12730case "(($ac_try" in
12731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12732 *) ac_try_echo=$ac_try;;
12733esac
12734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12735 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 12736 ac_status=$?
edfaf76d
LK
12737 grep -v '^ *+' conftest.er1 >conftest.err
12738 rm -f conftest.er1
12739 cat conftest.err >&5
c0d27fcc 12740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12741 (exit $ac_status); } && {
12742 test -z "$ac_c_werror_flag" ||
12743 test ! -s conftest.err
12744 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
12745 ac_header_compiler=yes
12746else
12747 echo "$as_me: failed program was:" >&5
19650fd6
AS
12748sed 's/^/| /' conftest.$ac_ext >&5
12749
ca81d7a0 12750 ac_header_compiler=no
c0d27fcc 12751fi
ca81d7a0
JD
12752
12753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12754{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12755echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
12756
12757# Is the header present?
ca81d7a0
JD
12758{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
12759echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 12760cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12761/* confdefs.h. */
12762_ACEOF
12763cat confdefs.h >>conftest.$ac_ext
12764cat >>conftest.$ac_ext <<_ACEOF
12765/* end confdefs.h. */
98418dba
CW
12766#include <jerror.h>
12767_ACEOF
ca81d7a0
JD
12768if { (ac_try="$ac_cpp conftest.$ac_ext"
12769case "(($ac_try" in
12770 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12771 *) ac_try_echo=$ac_try;;
12772esac
12773eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12774 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 12775 ac_status=$?
6bae0ccf 12776 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12777 rm -f conftest.er1
12778 cat conftest.err >&5
c0d27fcc 12779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12780 (exit $ac_status); } >/dev/null && {
12781 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12782 test ! -s conftest.err
12783 }; then
c0d27fcc 12784 ac_header_preproc=yes
ba4481b5 12785else
98418dba 12786 echo "$as_me: failed program was:" >&5
19650fd6
AS
12787sed 's/^/| /' conftest.$ac_ext >&5
12788
c0d27fcc 12789 ac_header_preproc=no
98418dba 12790fi
ca81d7a0 12791
98418dba 12792rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
12793{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12794echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
12795
12796# So? What about this header?
edfaf76d
LK
12797case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12798 yes:no: )
c0d27fcc
MR
12799 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
12800echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12801 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
12802echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
12803 ac_header_preproc=yes
19650fd6 12804 ;;
edfaf76d 12805 no:yes:* )
c0d27fcc
MR
12806 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
12807echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
12808 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
12809echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
12810 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
12811echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
12812 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
12813echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 12814 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 12815echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12816 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
12817echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 12818
19650fd6 12819 ;;
c0d27fcc 12820esac
ca81d7a0
JD
12821{ echo "$as_me:$LINENO: checking for jerror.h" >&5
12822echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
12823if test "${ac_cv_header_jerror_h+set}" = set; then
12824 echo $ECHO_N "(cached) $ECHO_C" >&6
12825else
12826 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 12827fi
ca81d7a0
JD
12828{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
12829echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
12830
12831fi
98418dba 12832if test $ac_cv_header_jerror_h = yes; then
ca81d7a0
JD
12833 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
12834echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 12835if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 12836 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12837else
98418dba
CW
12838 ac_check_lib_save_LIBS=$LIBS
12839LIBS="-ljpeg $LIBS"
12840cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12841/* confdefs.h. */
12842_ACEOF
12843cat confdefs.h >>conftest.$ac_ext
12844cat >>conftest.$ac_ext <<_ACEOF
12845/* end confdefs.h. */
98418dba 12846
ca81d7a0
JD
12847/* Override any GCC internal prototype to avoid an error.
12848 Use char because int might match the return type of a GCC
12849 builtin and then its argument prototype would still apply. */
98418dba
CW
12850#ifdef __cplusplus
12851extern "C"
12852#endif
98418dba 12853char jpeg_destroy_compress ();
503d2be0
AS
12854int
12855main ()
12856{
ca81d7a0 12857return jpeg_destroy_compress ();
503d2be0
AS
12858 ;
12859 return 0;
12860}
12861_ACEOF
12862rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12863if { (ac_try="$ac_link"
12864case "(($ac_try" in
12865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12866 *) ac_try_echo=$ac_try;;
12867esac
12868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12869 (eval "$ac_link") 2>conftest.er1
503d2be0 12870 ac_status=$?
edfaf76d
LK
12871 grep -v '^ *+' conftest.er1 >conftest.err
12872 rm -f conftest.er1
12873 cat conftest.err >&5
c0d27fcc 12874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12875 (exit $ac_status); } && {
12876 test -z "$ac_c_werror_flag" ||
12877 test ! -s conftest.err
12878 } && test -s conftest$ac_exeext &&
12879 $as_test_x conftest$ac_exeext; then
98418dba 12880 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 12881else
503d2be0 12882 echo "$as_me: failed program was:" >&5
19650fd6
AS
12883sed 's/^/| /' conftest.$ac_ext >&5
12884
ca81d7a0 12885 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 12886fi
ca81d7a0 12887
f053c89f 12888rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12889 conftest$ac_exeext conftest.$ac_ext
98418dba 12890LIBS=$ac_check_lib_save_LIBS
ba4481b5 12891fi
ca81d7a0
JD
12892{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
12893echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
12894if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
12895 HAVE_JPEG=yes
ba4481b5 12896fi
98418dba 12897
ba4481b5 12898fi
98418dba 12899
c0d27fcc 12900
ba4481b5 12901 fi
ba4481b5 12902
c0d27fcc 12903
98418dba 12904 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 12905 cat >>confdefs.h <<\_ACEOF
98418dba 12906#define HAVE_JPEG 1
c0d27fcc 12907_ACEOF
98418dba
CW
12908
12909 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12910/* confdefs.h. */
12911_ACEOF
12912cat confdefs.h >>conftest.$ac_ext
12913cat >>conftest.$ac_ext <<_ACEOF
12914/* end confdefs.h. */
22044edf 12915#include <jpeglib.h>
98418dba
CW
12916 version=JPEG_LIB_VERSION
12917
12918_ACEOF
12919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 12920 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 12921 cat >>confdefs.h <<\_ACEOF
98418dba 12922#define HAVE_JPEG 1
c0d27fcc 12923_ACEOF
ba4481b5 12924
98418dba 12925else
c0d27fcc 12926 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
12927echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
12928 HAVE_JPEG=no
ba4481b5 12929fi
98418dba 12930rm -f conftest*
ba4481b5 12931
98418dba
CW
12932 fi
12933fi
503d2be0 12934
98418dba
CW
12935### Use -lpng if available, unless `--with-png=no'.
12936HAVE_PNG=no
12937if test "${HAVE_X11}" = "yes"; then
12938 if test "${with_png}" != "no"; then
f57bd967
DL
12939 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
12940 # in /usr/include/libpng.
12941
12942
12943for ac_header in png.h libpng/png.h
12944do
12945as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
12946if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12947 { echo "$as_me:$LINENO: checking for $ac_header" >&5
12948echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12949if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 12950 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 12951fi
ca81d7a0
JD
12952ac_res=`eval echo '${'$as_ac_Header'}'`
12953 { echo "$as_me:$LINENO: result: $ac_res" >&5
12954echo "${ECHO_T}$ac_res" >&6; }
503d2be0 12955else
c0d27fcc 12956 # Is the header compilable?
ca81d7a0
JD
12957{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
12958echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 12959cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12960/* confdefs.h. */
12961_ACEOF
12962cat confdefs.h >>conftest.$ac_ext
12963cat >>conftest.$ac_ext <<_ACEOF
12964/* end confdefs.h. */
c0d27fcc 12965$ac_includes_default
f57bd967 12966#include <$ac_header>
c0d27fcc
MR
12967_ACEOF
12968rm -f conftest.$ac_objext
ca81d7a0
JD
12969if { (ac_try="$ac_compile"
12970case "(($ac_try" in
12971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12972 *) ac_try_echo=$ac_try;;
12973esac
12974eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12975 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 12976 ac_status=$?
edfaf76d
LK
12977 grep -v '^ *+' conftest.er1 >conftest.err
12978 rm -f conftest.er1
12979 cat conftest.err >&5
c0d27fcc 12980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12981 (exit $ac_status); } && {
12982 test -z "$ac_c_werror_flag" ||
12983 test ! -s conftest.err
12984 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
12985 ac_header_compiler=yes
12986else
12987 echo "$as_me: failed program was:" >&5
19650fd6
AS
12988sed 's/^/| /' conftest.$ac_ext >&5
12989
ca81d7a0 12990 ac_header_compiler=no
c0d27fcc 12991fi
ca81d7a0
JD
12992
12993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12994{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12995echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
12996
12997# Is the header present?
ca81d7a0
JD
12998{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
12999echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13000cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13001/* confdefs.h. */
13002_ACEOF
13003cat confdefs.h >>conftest.$ac_ext
13004cat >>conftest.$ac_ext <<_ACEOF
13005/* end confdefs.h. */
f57bd967 13006#include <$ac_header>
503d2be0 13007_ACEOF
ca81d7a0
JD
13008if { (ac_try="$ac_cpp conftest.$ac_ext"
13009case "(($ac_try" in
13010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13011 *) ac_try_echo=$ac_try;;
13012esac
13013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13014 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13015 ac_status=$?
6bae0ccf 13016 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13017 rm -f conftest.er1
13018 cat conftest.err >&5
c0d27fcc 13019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13020 (exit $ac_status); } >/dev/null && {
13021 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13022 test ! -s conftest.err
13023 }; then
c0d27fcc 13024 ac_header_preproc=yes
503d2be0
AS
13025else
13026 echo "$as_me: failed program was:" >&5
19650fd6
AS
13027sed 's/^/| /' conftest.$ac_ext >&5
13028
c0d27fcc 13029 ac_header_preproc=no
ba4481b5 13030fi
ca81d7a0 13031
503d2be0 13032rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13033{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13034echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13035
13036# So? What about this header?
edfaf76d
LK
13037case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13038 yes:no: )
f57bd967
DL
13039 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13040echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13041 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13042echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13043 ac_header_preproc=yes
19650fd6 13044 ;;
edfaf76d 13045 no:yes:* )
f57bd967
DL
13046 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13047echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13048 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13049echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13050 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13051echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13052 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13053echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 13054 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13055echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13056 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13057echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13058
19650fd6 13059 ;;
c0d27fcc 13060esac
ca81d7a0
JD
13061{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13062echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13063if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
13064 echo $ECHO_N "(cached) $ECHO_C" >&6
13065else
edfaf76d 13066 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 13067fi
ca81d7a0
JD
13068ac_res=`eval echo '${'$as_ac_Header'}'`
13069 { echo "$as_me:$LINENO: result: $ac_res" >&5
13070echo "${ECHO_T}$ac_res" >&6; }
f57bd967 13071
ba4481b5 13072fi
f57bd967
DL
13073if test `eval echo '${'$as_ac_Header'}'` = yes; then
13074 cat >>confdefs.h <<_ACEOF
13075#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13076_ACEOF
c0d27fcc
MR
13077
13078fi
f57bd967
DL
13079
13080done
13081
13082 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
ca81d7a0
JD
13083 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
13084echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 13085if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 13086 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13087else
98418dba
CW
13088 ac_check_lib_save_LIBS=$LIBS
13089LIBS="-lpng -lz -lm $LIBS"
13090cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13091/* confdefs.h. */
13092_ACEOF
13093cat confdefs.h >>conftest.$ac_ext
13094cat >>conftest.$ac_ext <<_ACEOF
13095/* end confdefs.h. */
98418dba 13096
ca81d7a0
JD
13097/* Override any GCC internal prototype to avoid an error.
13098 Use char because int might match the return type of a GCC
13099 builtin and then its argument prototype would still apply. */
503d2be0
AS
13100#ifdef __cplusplus
13101extern "C"
13102#endif
98418dba 13103char png_get_channels ();
503d2be0
AS
13104int
13105main ()
13106{
ca81d7a0 13107return png_get_channels ();
503d2be0
AS
13108 ;
13109 return 0;
13110}
13111_ACEOF
13112rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13113if { (ac_try="$ac_link"
13114case "(($ac_try" in
13115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13116 *) ac_try_echo=$ac_try;;
13117esac
13118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13119 (eval "$ac_link") 2>conftest.er1
503d2be0 13120 ac_status=$?
edfaf76d
LK
13121 grep -v '^ *+' conftest.er1 >conftest.err
13122 rm -f conftest.er1
13123 cat conftest.err >&5
c0d27fcc 13124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13125 (exit $ac_status); } && {
13126 test -z "$ac_c_werror_flag" ||
13127 test ! -s conftest.err
13128 } && test -s conftest$ac_exeext &&
13129 $as_test_x conftest$ac_exeext; then
98418dba 13130 ac_cv_lib_png_png_get_channels=yes
73b77ee5 13131else
98418dba 13132 echo "$as_me: failed program was:" >&5
19650fd6
AS
13133sed 's/^/| /' conftest.$ac_ext >&5
13134
ca81d7a0 13135 ac_cv_lib_png_png_get_channels=no
73b77ee5 13136fi
ca81d7a0 13137
f053c89f 13138rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13139 conftest$ac_exeext conftest.$ac_ext
98418dba 13140LIBS=$ac_check_lib_save_LIBS
73b77ee5 13141fi
ca81d7a0
JD
13142{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
13143echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
13144if test $ac_cv_lib_png_png_get_channels = yes; then
13145 HAVE_PNG=yes
73b77ee5 13146fi
503d2be0 13147
f57bd967 13148 fi
98418dba
CW
13149 fi
13150
13151 if test "${HAVE_PNG}" = "yes"; then
b936fae4 13152
c0d27fcc 13153cat >>confdefs.h <<\_ACEOF
98418dba 13154#define HAVE_PNG 1
c0d27fcc 13155_ACEOF
73b77ee5 13156
98418dba 13157 fi
73b77ee5
GM
13158fi
13159
98418dba
CW
13160### Use -ltiff if available, unless `--with-tiff=no'.
13161HAVE_TIFF=no
13162if test "${HAVE_X11}" = "yes"; then
13163 if test "${with_tiff}" != "no"; then
c0d27fcc 13164 if test "${ac_cv_header_tiffio_h+set}" = set; then
ca81d7a0
JD
13165 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
13166echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
13167if test "${ac_cv_header_tiffio_h+set}" = set; then
13168 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13169fi
ca81d7a0
JD
13170{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13171echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 13172else
c0d27fcc 13173 # Is the header compilable?
ca81d7a0
JD
13174{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
13175echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 13176cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13177/* confdefs.h. */
13178_ACEOF
13179cat confdefs.h >>conftest.$ac_ext
13180cat >>conftest.$ac_ext <<_ACEOF
13181/* end confdefs.h. */
c0d27fcc
MR
13182$ac_includes_default
13183#include <tiffio.h>
13184_ACEOF
13185rm -f conftest.$ac_objext
ca81d7a0
JD
13186if { (ac_try="$ac_compile"
13187case "(($ac_try" in
13188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13189 *) ac_try_echo=$ac_try;;
13190esac
13191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13192 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13193 ac_status=$?
edfaf76d
LK
13194 grep -v '^ *+' conftest.er1 >conftest.err
13195 rm -f conftest.er1
13196 cat conftest.err >&5
c0d27fcc 13197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13198 (exit $ac_status); } && {
13199 test -z "$ac_c_werror_flag" ||
13200 test ! -s conftest.err
13201 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13202 ac_header_compiler=yes
13203else
13204 echo "$as_me: failed program was:" >&5
19650fd6
AS
13205sed 's/^/| /' conftest.$ac_ext >&5
13206
ca81d7a0 13207 ac_header_compiler=no
c0d27fcc 13208fi
ca81d7a0
JD
13209
13210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13211{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13212echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13213
13214# Is the header present?
ca81d7a0
JD
13215{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
13216echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 13217cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13218/* confdefs.h. */
13219_ACEOF
13220cat confdefs.h >>conftest.$ac_ext
13221cat >>conftest.$ac_ext <<_ACEOF
13222/* end confdefs.h. */
98418dba
CW
13223#include <tiffio.h>
13224_ACEOF
ca81d7a0
JD
13225if { (ac_try="$ac_cpp conftest.$ac_ext"
13226case "(($ac_try" in
13227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13228 *) ac_try_echo=$ac_try;;
13229esac
13230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13231 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13232 ac_status=$?
6bae0ccf 13233 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13234 rm -f conftest.er1
13235 cat conftest.err >&5
c0d27fcc 13236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13237 (exit $ac_status); } >/dev/null && {
13238 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13239 test ! -s conftest.err
13240 }; then
c0d27fcc 13241 ac_header_preproc=yes
98418dba
CW
13242else
13243 echo "$as_me: failed program was:" >&5
19650fd6
AS
13244sed 's/^/| /' conftest.$ac_ext >&5
13245
c0d27fcc 13246 ac_header_preproc=no
98418dba 13247fi
ca81d7a0 13248
98418dba 13249rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13250{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13251echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13252
13253# So? What about this header?
edfaf76d
LK
13254case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13255 yes:no: )
c0d27fcc
MR
13256 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
13257echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13258 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
13259echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
13260 ac_header_preproc=yes
19650fd6 13261 ;;
edfaf76d 13262 no:yes:* )
c0d27fcc
MR
13263 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
13264echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13265 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
13266echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
13267 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
13268echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
13269 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
13270echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13271 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 13272echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13273 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
13274echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13275
19650fd6 13276 ;;
c0d27fcc 13277esac
ca81d7a0
JD
13278{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
13279echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
13280if test "${ac_cv_header_tiffio_h+set}" = set; then
13281 echo $ECHO_N "(cached) $ECHO_C" >&6
13282else
13283 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 13284fi
ca81d7a0
JD
13285{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13286echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
13287
13288fi
98418dba
CW
13289if test $ac_cv_header_tiffio_h = yes; then
13290 tifflibs="-lz -lm"
13291 # At least one tiff package requires the jpeg library.
13292 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
ca81d7a0
JD
13293 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
13294echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 13295if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 13296 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13297else
503d2be0 13298 ac_check_lib_save_LIBS=$LIBS
98418dba 13299LIBS="-ltiff $tifflibs $LIBS"
503d2be0 13300cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13301/* confdefs.h. */
13302_ACEOF
13303cat confdefs.h >>conftest.$ac_ext
13304cat >>conftest.$ac_ext <<_ACEOF
13305/* end confdefs.h. */
503d2be0 13306
ca81d7a0
JD
13307/* Override any GCC internal prototype to avoid an error.
13308 Use char because int might match the return type of a GCC
13309 builtin and then its argument prototype would still apply. */
503d2be0
AS
13310#ifdef __cplusplus
13311extern "C"
13312#endif
98418dba 13313char TIFFGetVersion ();
503d2be0
AS
13314int
13315main ()
13316{
ca81d7a0 13317return TIFFGetVersion ();
503d2be0
AS
13318 ;
13319 return 0;
13320}
13321_ACEOF
13322rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13323if { (ac_try="$ac_link"
13324case "(($ac_try" in
13325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13326 *) ac_try_echo=$ac_try;;
13327esac
13328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13329 (eval "$ac_link") 2>conftest.er1
503d2be0 13330 ac_status=$?
edfaf76d
LK
13331 grep -v '^ *+' conftest.er1 >conftest.err
13332 rm -f conftest.er1
13333 cat conftest.err >&5
c0d27fcc 13334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13335 (exit $ac_status); } && {
13336 test -z "$ac_c_werror_flag" ||
13337 test ! -s conftest.err
13338 } && test -s conftest$ac_exeext &&
13339 $as_test_x conftest$ac_exeext; then
98418dba 13340 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
13341else
13342 echo "$as_me: failed program was:" >&5
19650fd6
AS
13343sed 's/^/| /' conftest.$ac_ext >&5
13344
ca81d7a0 13345 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 13346fi
ca81d7a0 13347
f053c89f 13348rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13349 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
13350LIBS=$ac_check_lib_save_LIBS
13351fi
ca81d7a0
JD
13352{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13353echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
13354if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
13355 HAVE_TIFF=yes
13356fi
13357
13358fi
73b77ee5 13359
c0d27fcc 13360
98418dba
CW
13361 fi
13362
13363 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 13364
c0d27fcc 13365cat >>confdefs.h <<\_ACEOF
98418dba 13366#define HAVE_TIFF 1
c0d27fcc 13367_ACEOF
98418dba
CW
13368
13369 fi
73b77ee5
GM
13370fi
13371
98418dba
CW
13372### Use -lgif if available, unless `--with-gif=no'.
13373HAVE_GIF=no
13374if test "${HAVE_X11}" = "yes"; then
13375 if test "${with_gif}" != "no"; then
c0d27fcc 13376 if test "${ac_cv_header_gif_lib_h+set}" = set; then
ca81d7a0
JD
13377 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
13378echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
13379if test "${ac_cv_header_gif_lib_h+set}" = set; then
13380 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13381fi
ca81d7a0
JD
13382{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
13383echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 13384else
c0d27fcc 13385 # Is the header compilable?
ca81d7a0
JD
13386{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
13387echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 13388cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13389/* confdefs.h. */
13390_ACEOF
13391cat confdefs.h >>conftest.$ac_ext
13392cat >>conftest.$ac_ext <<_ACEOF
13393/* end confdefs.h. */
c0d27fcc
MR
13394$ac_includes_default
13395#include <gif_lib.h>
13396_ACEOF
13397rm -f conftest.$ac_objext
ca81d7a0
JD
13398if { (ac_try="$ac_compile"
13399case "(($ac_try" in
13400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13401 *) ac_try_echo=$ac_try;;
13402esac
13403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13404 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13405 ac_status=$?
edfaf76d
LK
13406 grep -v '^ *+' conftest.er1 >conftest.err
13407 rm -f conftest.er1
13408 cat conftest.err >&5
c0d27fcc 13409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13410 (exit $ac_status); } && {
13411 test -z "$ac_c_werror_flag" ||
13412 test ! -s conftest.err
13413 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13414 ac_header_compiler=yes
13415else
13416 echo "$as_me: failed program was:" >&5
19650fd6
AS
13417sed 's/^/| /' conftest.$ac_ext >&5
13418
ca81d7a0 13419 ac_header_compiler=no
c0d27fcc 13420fi
ca81d7a0
JD
13421
13422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13423{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13424echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13425
13426# Is the header present?
ca81d7a0
JD
13427{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
13428echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 13429cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13430/* confdefs.h. */
13431_ACEOF
13432cat confdefs.h >>conftest.$ac_ext
13433cat >>conftest.$ac_ext <<_ACEOF
13434/* end confdefs.h. */
98418dba
CW
13435#include <gif_lib.h>
13436_ACEOF
ca81d7a0
JD
13437if { (ac_try="$ac_cpp conftest.$ac_ext"
13438case "(($ac_try" in
13439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13440 *) ac_try_echo=$ac_try;;
13441esac
13442eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13443 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13444 ac_status=$?
6bae0ccf 13445 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13446 rm -f conftest.er1
13447 cat conftest.err >&5
c0d27fcc 13448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13449 (exit $ac_status); } >/dev/null && {
13450 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13451 test ! -s conftest.err
13452 }; then
c0d27fcc 13453 ac_header_preproc=yes
98418dba
CW
13454else
13455 echo "$as_me: failed program was:" >&5
19650fd6
AS
13456sed 's/^/| /' conftest.$ac_ext >&5
13457
c0d27fcc 13458 ac_header_preproc=no
98418dba 13459fi
ca81d7a0 13460
98418dba 13461rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13462{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13463echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13464
13465# So? What about this header?
edfaf76d
LK
13466case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13467 yes:no: )
c0d27fcc
MR
13468 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
13469echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13470 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
13471echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
13472 ac_header_preproc=yes
19650fd6 13473 ;;
edfaf76d 13474 no:yes:* )
c0d27fcc
MR
13475 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
13476echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13477 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
13478echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
13479 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
13480echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
13481 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
13482echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13483 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 13484echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13485 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
13486echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13487
19650fd6 13488 ;;
c0d27fcc 13489esac
ca81d7a0
JD
13490{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
13491echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
13492if test "${ac_cv_header_gif_lib_h+set}" = set; then
13493 echo $ECHO_N "(cached) $ECHO_C" >&6
13494else
13495 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 13496fi
ca81d7a0
JD
13497{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
13498echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
13499
13500fi
98418dba
CW
13501if test $ac_cv_header_gif_lib_h = yes; then
13502 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13503# Earlier versions can crash Emacs.
ca81d7a0
JD
13504 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
13505echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
98418dba 13506if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 13507 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13508else
503d2be0 13509 ac_check_lib_save_LIBS=$LIBS
98418dba 13510LIBS="-lungif $LIBS"
503d2be0 13511cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13512/* confdefs.h. */
13513_ACEOF
13514cat confdefs.h >>conftest.$ac_ext
13515cat >>conftest.$ac_ext <<_ACEOF
13516/* end confdefs.h. */
73b77ee5 13517
ca81d7a0
JD
13518/* Override any GCC internal prototype to avoid an error.
13519 Use char because int might match the return type of a GCC
13520 builtin and then its argument prototype would still apply. */
98418dba
CW
13521#ifdef __cplusplus
13522extern "C"
13523#endif
98418dba 13524char EGifPutExtensionLast ();
503d2be0
AS
13525int
13526main ()
13527{
ca81d7a0 13528return EGifPutExtensionLast ();
503d2be0
AS
13529 ;
13530 return 0;
13531}
13532_ACEOF
13533rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13534if { (ac_try="$ac_link"
13535case "(($ac_try" in
13536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13537 *) ac_try_echo=$ac_try;;
13538esac
13539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13540 (eval "$ac_link") 2>conftest.er1
503d2be0 13541 ac_status=$?
edfaf76d
LK
13542 grep -v '^ *+' conftest.er1 >conftest.err
13543 rm -f conftest.er1
13544 cat conftest.err >&5
c0d27fcc 13545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13546 (exit $ac_status); } && {
13547 test -z "$ac_c_werror_flag" ||
13548 test ! -s conftest.err
13549 } && test -s conftest$ac_exeext &&
13550 $as_test_x conftest$ac_exeext; then
35996d22
AS
13551 ac_cv_lib_ungif_EGifPutExtensionLast=yes
13552else
98418dba 13553 echo "$as_me: failed program was:" >&5
19650fd6
AS
13554sed 's/^/| /' conftest.$ac_ext >&5
13555
ca81d7a0 13556 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba 13557fi
ca81d7a0 13558
f053c89f 13559rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13560 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13561LIBS=$ac_check_lib_save_LIBS
13562fi
ca81d7a0
JD
13563{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13564echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
98418dba
CW
13565if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
13566 HAVE_GIF=yes
13567fi
13568
13569fi
13570
c0d27fcc 13571
98418dba
CW
13572 fi
13573
13574 if test "${HAVE_GIF}" = "yes"; then
b936fae4 13575
c0d27fcc 13576cat >>confdefs.h <<\_ACEOF
98418dba 13577#define HAVE_GIF 1
c0d27fcc 13578_ACEOF
98418dba
CW
13579
13580 fi
13581fi
13582
cef11da2 13583if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
ca81d7a0
JD
13584 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
13585echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
13586if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
13587 echo $ECHO_N "(cached) $ECHO_C" >&6
13588fi
ca81d7a0
JD
13589{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
13590echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
13591else
13592 # Is the header compilable?
ca81d7a0
JD
13593{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
13594echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
13595cat >conftest.$ac_ext <<_ACEOF
13596/* confdefs.h. */
13597_ACEOF
13598cat confdefs.h >>conftest.$ac_ext
13599cat >>conftest.$ac_ext <<_ACEOF
13600/* end confdefs.h. */
13601$ac_includes_default
13602#include <malloc/malloc.h>
13603_ACEOF
13604rm -f conftest.$ac_objext
ca81d7a0
JD
13605if { (ac_try="$ac_compile"
13606case "(($ac_try" in
13607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13608 *) ac_try_echo=$ac_try;;
13609esac
13610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13611 (eval "$ac_compile") 2>conftest.er1
cef11da2 13612 ac_status=$?
edfaf76d
LK
13613 grep -v '^ *+' conftest.er1 >conftest.err
13614 rm -f conftest.er1
13615 cat conftest.err >&5
cef11da2 13616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13617 (exit $ac_status); } && {
13618 test -z "$ac_c_werror_flag" ||
13619 test ! -s conftest.err
13620 } && test -s conftest.$ac_objext; then
cef11da2
ST
13621 ac_header_compiler=yes
13622else
13623 echo "$as_me: failed program was:" >&5
13624sed 's/^/| /' conftest.$ac_ext >&5
13625
ca81d7a0 13626 ac_header_compiler=no
cef11da2 13627fi
ca81d7a0
JD
13628
13629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13630{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13631echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
13632
13633# Is the header present?
ca81d7a0
JD
13634{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
13635echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
13636cat >conftest.$ac_ext <<_ACEOF
13637/* confdefs.h. */
13638_ACEOF
13639cat confdefs.h >>conftest.$ac_ext
13640cat >>conftest.$ac_ext <<_ACEOF
13641/* end confdefs.h. */
13642#include <malloc/malloc.h>
13643_ACEOF
ca81d7a0
JD
13644if { (ac_try="$ac_cpp conftest.$ac_ext"
13645case "(($ac_try" in
13646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13647 *) ac_try_echo=$ac_try;;
13648esac
13649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13650 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
13651 ac_status=$?
13652 grep -v '^ *+' conftest.er1 >conftest.err
13653 rm -f conftest.er1
13654 cat conftest.err >&5
13655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13656 (exit $ac_status); } >/dev/null && {
13657 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13658 test ! -s conftest.err
13659 }; then
cef11da2
ST
13660 ac_header_preproc=yes
13661else
13662 echo "$as_me: failed program was:" >&5
13663sed 's/^/| /' conftest.$ac_ext >&5
13664
13665 ac_header_preproc=no
13666fi
ca81d7a0 13667
cef11da2 13668rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13669{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13670echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
13671
13672# So? What about this header?
edfaf76d
LK
13673case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13674 yes:no: )
cef11da2
ST
13675 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
13676echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13677 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
13678echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
13679 ac_header_preproc=yes
cef11da2 13680 ;;
edfaf76d 13681 no:yes:* )
cef11da2
ST
13682 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
13683echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13684 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
13685echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
13686 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
13687echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
13688 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
13689echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
13690 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
13691echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13692 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
13693echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13694
cef11da2
ST
13695 ;;
13696esac
ca81d7a0
JD
13697{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
13698echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
13699if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
13700 echo $ECHO_N "(cached) $ECHO_C" >&6
13701else
13702 ac_cv_header_malloc_malloc_h=$ac_header_preproc
13703fi
ca81d7a0
JD
13704{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
13705echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
13706
13707fi
13708if test $ac_cv_header_malloc_malloc_h = yes; then
13709
13710cat >>confdefs.h <<\_ACEOF
13711#define HAVE_MALLOC_MALLOC_H 1
13712_ACEOF
13713
13714fi
13715
13716
13717
5d6da11e 13718### Use Mac OS X Carbon API to implement GUI.
e0f712ba 13719if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 13720
c0d27fcc 13721cat >>confdefs.h <<\_ACEOF
e0f712ba 13722#define HAVE_CARBON 1
c0d27fcc 13723_ACEOF
e0f712ba 13724
6a3a24fa
JD
13725 ## Specify the install directory
13726 carbon_appdir=
13727 if test "${carbon_appdir_x}" != ""; then
13728 case ${carbon_appdir_x} in
13729 y | ye | yes) carbon_appdir=/Applications ;;
13730 * ) carbon_appdir=${carbon_appdir_x} ;;
13731 esac
13732 fi
8f417b3b
AS
13733 # We also have mouse menus.
13734 HAVE_MENUS=yes
e0f712ba
AC
13735fi
13736
98418dba
CW
13737### Use session management (-lSM -lICE) if available
13738HAVE_X_SM=no
13739if test "${HAVE_X11}" = "yes"; then
c0d27fcc 13740 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
ca81d7a0
JD
13741 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
13742echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
13743if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13744 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13745fi
ca81d7a0
JD
13746{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
13747echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 13748else
c0d27fcc 13749 # Is the header compilable?
ca81d7a0
JD
13750{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
13751echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 13752cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13753/* confdefs.h. */
13754_ACEOF
13755cat confdefs.h >>conftest.$ac_ext
13756cat >>conftest.$ac_ext <<_ACEOF
13757/* end confdefs.h. */
c0d27fcc
MR
13758$ac_includes_default
13759#include <X11/SM/SMlib.h>
13760_ACEOF
13761rm -f conftest.$ac_objext
ca81d7a0
JD
13762if { (ac_try="$ac_compile"
13763case "(($ac_try" in
13764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13765 *) ac_try_echo=$ac_try;;
13766esac
13767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13768 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13769 ac_status=$?
edfaf76d
LK
13770 grep -v '^ *+' conftest.er1 >conftest.err
13771 rm -f conftest.er1
13772 cat conftest.err >&5
c0d27fcc 13773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13774 (exit $ac_status); } && {
13775 test -z "$ac_c_werror_flag" ||
13776 test ! -s conftest.err
13777 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13778 ac_header_compiler=yes
13779else
13780 echo "$as_me: failed program was:" >&5
19650fd6
AS
13781sed 's/^/| /' conftest.$ac_ext >&5
13782
ca81d7a0 13783 ac_header_compiler=no
c0d27fcc 13784fi
ca81d7a0
JD
13785
13786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13787{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13788echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13789
13790# Is the header present?
ca81d7a0
JD
13791{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
13792echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 13793cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13794/* confdefs.h. */
13795_ACEOF
13796cat confdefs.h >>conftest.$ac_ext
13797cat >>conftest.$ac_ext <<_ACEOF
13798/* end confdefs.h. */
98418dba
CW
13799#include <X11/SM/SMlib.h>
13800_ACEOF
ca81d7a0
JD
13801if { (ac_try="$ac_cpp conftest.$ac_ext"
13802case "(($ac_try" in
13803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13804 *) ac_try_echo=$ac_try;;
13805esac
13806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13807 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13808 ac_status=$?
6bae0ccf 13809 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13810 rm -f conftest.er1
13811 cat conftest.err >&5
c0d27fcc 13812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13813 (exit $ac_status); } >/dev/null && {
13814 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13815 test ! -s conftest.err
13816 }; then
c0d27fcc 13817 ac_header_preproc=yes
98418dba
CW
13818else
13819 echo "$as_me: failed program was:" >&5
19650fd6
AS
13820sed 's/^/| /' conftest.$ac_ext >&5
13821
c0d27fcc 13822 ac_header_preproc=no
98418dba 13823fi
ca81d7a0 13824
98418dba 13825rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13826{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13827echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13828
13829# So? What about this header?
edfaf76d
LK
13830case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13831 yes:no: )
c0d27fcc
MR
13832 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
13833echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13834 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
13835echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
13836 ac_header_preproc=yes
19650fd6 13837 ;;
edfaf76d 13838 no:yes:* )
c0d27fcc
MR
13839 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
13840echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13841 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
13842echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
13843 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
13844echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
13845 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
13846echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13847 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 13848echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13849 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
13850echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13851
19650fd6 13852 ;;
c0d27fcc 13853esac
ca81d7a0
JD
13854{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
13855echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
13856if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
13857 echo $ECHO_N "(cached) $ECHO_C" >&6
13858else
13859 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 13860fi
ca81d7a0
JD
13861{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
13862echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
13863
13864fi
98418dba 13865if test $ac_cv_header_X11_SM_SMlib_h = yes; then
ca81d7a0
JD
13866 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
13867echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 13868if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 13869 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13870else
503d2be0 13871 ac_check_lib_save_LIBS=$LIBS
1660500f 13872LIBS="-lSM -lICE $LIBS"
503d2be0 13873cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13874/* confdefs.h. */
13875_ACEOF
13876cat confdefs.h >>conftest.$ac_ext
13877cat >>conftest.$ac_ext <<_ACEOF
13878/* end confdefs.h. */
503d2be0 13879
ca81d7a0
JD
13880/* Override any GCC internal prototype to avoid an error.
13881 Use char because int might match the return type of a GCC
13882 builtin and then its argument prototype would still apply. */
503d2be0
AS
13883#ifdef __cplusplus
13884extern "C"
13885#endif
98418dba 13886char SmcOpenConnection ();
503d2be0
AS
13887int
13888main ()
13889{
ca81d7a0 13890return SmcOpenConnection ();
503d2be0
AS
13891 ;
13892 return 0;
13893}
13894_ACEOF
13895rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13896if { (ac_try="$ac_link"
13897case "(($ac_try" in
13898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13899 *) ac_try_echo=$ac_try;;
13900esac
13901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13902 (eval "$ac_link") 2>conftest.er1
503d2be0 13903 ac_status=$?
edfaf76d
LK
13904 grep -v '^ *+' conftest.er1 >conftest.err
13905 rm -f conftest.er1
13906 cat conftest.err >&5
c0d27fcc 13907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13908 (exit $ac_status); } && {
13909 test -z "$ac_c_werror_flag" ||
13910 test ! -s conftest.err
13911 } && test -s conftest$ac_exeext &&
13912 $as_test_x conftest$ac_exeext; then
98418dba 13913 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
13914else
13915 echo "$as_me: failed program was:" >&5
19650fd6
AS
13916sed 's/^/| /' conftest.$ac_ext >&5
13917
ca81d7a0 13918 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 13919fi
ca81d7a0 13920
f053c89f 13921rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13922 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
13923LIBS=$ac_check_lib_save_LIBS
13924fi
ca81d7a0
JD
13925{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
13926echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
13927if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
13928 HAVE_X_SM=yes
73b77ee5
GM
13929fi
13930
73b77ee5 13931fi
73b77ee5 13932
c0d27fcc
MR
13933
13934
98418dba 13935 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 13936
c0d27fcc 13937cat >>confdefs.h <<\_ACEOF
98418dba 13938#define HAVE_X_SM 1
c0d27fcc 13939_ACEOF
73b77ee5 13940
98418dba
CW
13941 case "$LIBS" in
13942 *-lSM*) ;;
13943 *) LIBS="-lSM -lICE $LIBS" ;;
13944 esac
73b77ee5 13945 fi
98418dba 13946fi
73b77ee5 13947
98418dba 13948# If netdb.h doesn't declare h_errno, we must declare it by hand.
ca81d7a0
JD
13949{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
13950echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
13951if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
13952 echo $ECHO_N "(cached) $ECHO_C" >&6
13953else
13954 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13955/* confdefs.h. */
13956_ACEOF
13957cat confdefs.h >>conftest.$ac_ext
13958cat >>conftest.$ac_ext <<_ACEOF
13959/* end confdefs.h. */
98418dba 13960#include <netdb.h>
503d2be0
AS
13961int
13962main ()
13963{
98418dba 13964return h_errno;
503d2be0
AS
13965 ;
13966 return 0;
13967}
13968_ACEOF
13969rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13970if { (ac_try="$ac_link"
13971case "(($ac_try" in
13972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13973 *) ac_try_echo=$ac_try;;
13974esac
13975eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13976 (eval "$ac_link") 2>conftest.er1
503d2be0 13977 ac_status=$?
edfaf76d
LK
13978 grep -v '^ *+' conftest.er1 >conftest.err
13979 rm -f conftest.er1
13980 cat conftest.err >&5
c0d27fcc 13981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13982 (exit $ac_status); } && {
13983 test -z "$ac_c_werror_flag" ||
13984 test ! -s conftest.err
13985 } && test -s conftest$ac_exeext &&
13986 $as_test_x conftest$ac_exeext; then
98418dba 13987 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 13988else
503d2be0 13989 echo "$as_me: failed program was:" >&5
19650fd6
AS
13990sed 's/^/| /' conftest.$ac_ext >&5
13991
ca81d7a0 13992 emacs_cv_netdb_declares_h_errno=no
73b77ee5 13993fi
ca81d7a0 13994
f053c89f 13995rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13996 conftest$ac_exeext conftest.$ac_ext
98418dba 13997fi
ca81d7a0
JD
13998{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
13999echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 14000if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 14001
c0d27fcc 14002cat >>confdefs.h <<\_ACEOF
98418dba 14003#define HAVE_H_ERRNO 1
c0d27fcc 14004_ACEOF
73b77ee5 14005
98418dba
CW
14006fi
14007
14008# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14009# for constant arguments. Useless!
ca81d7a0
JD
14010{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
14011echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
14012if test "${ac_cv_working_alloca_h+set}" = set; then
14013 echo $ECHO_N "(cached) $ECHO_C" >&6
14014else
14015 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14016/* confdefs.h. */
14017_ACEOF
14018cat confdefs.h >>conftest.$ac_ext
14019cat >>conftest.$ac_ext <<_ACEOF
14020/* end confdefs.h. */
98418dba 14021#include <alloca.h>
503d2be0
AS
14022int
14023main ()
14024{
98418dba 14025char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 14026 if (p) return 0;
503d2be0
AS
14027 ;
14028 return 0;
14029}
14030_ACEOF
14031rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14032if { (ac_try="$ac_link"
14033case "(($ac_try" in
14034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14035 *) ac_try_echo=$ac_try;;
14036esac
14037eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14038 (eval "$ac_link") 2>conftest.er1
503d2be0 14039 ac_status=$?
edfaf76d
LK
14040 grep -v '^ *+' conftest.er1 >conftest.err
14041 rm -f conftest.er1
14042 cat conftest.err >&5
c0d27fcc 14043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14044 (exit $ac_status); } && {
14045 test -z "$ac_c_werror_flag" ||
14046 test ! -s conftest.err
14047 } && test -s conftest$ac_exeext &&
14048 $as_test_x conftest$ac_exeext; then
98418dba 14049 ac_cv_working_alloca_h=yes
73b77ee5 14050else
503d2be0 14051 echo "$as_me: failed program was:" >&5
19650fd6
AS
14052sed 's/^/| /' conftest.$ac_ext >&5
14053
ca81d7a0 14054 ac_cv_working_alloca_h=no
73b77ee5 14055fi
ca81d7a0 14056
f053c89f 14057rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14058 conftest$ac_exeext conftest.$ac_ext
98418dba 14059fi
ca81d7a0
JD
14060{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
14061echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 14062if test $ac_cv_working_alloca_h = yes; then
73b77ee5 14063
c0d27fcc 14064cat >>confdefs.h <<\_ACEOF
98418dba 14065#define HAVE_ALLOCA_H 1
c0d27fcc 14066_ACEOF
98418dba
CW
14067
14068fi
14069
ca81d7a0
JD
14070{ echo "$as_me:$LINENO: checking for alloca" >&5
14071echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
14072if test "${ac_cv_func_alloca_works+set}" = set; then
14073 echo $ECHO_N "(cached) $ECHO_C" >&6
14074else
503d2be0 14075 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14076/* confdefs.h. */
14077_ACEOF
14078cat confdefs.h >>conftest.$ac_ext
14079cat >>conftest.$ac_ext <<_ACEOF
14080/* end confdefs.h. */
98418dba
CW
14081#ifdef __GNUC__
14082# define alloca __builtin_alloca
14083#else
14084# ifdef _MSC_VER
14085# include <malloc.h>
14086# define alloca _alloca
14087# else
f053c89f 14088# ifdef HAVE_ALLOCA_H
98418dba
CW
14089# include <alloca.h>
14090# else
14091# ifdef _AIX
14092 #pragma alloca
14093# else
14094# ifndef alloca /* predefined by HP cc +Olibcalls */
14095char *alloca ();
14096# endif
14097# endif
14098# endif
14099# endif
14100#endif
14101
503d2be0
AS
14102int
14103main ()
14104{
98418dba 14105char *p = (char *) alloca (1);
ca81d7a0 14106 if (p) return 0;
503d2be0
AS
14107 ;
14108 return 0;
14109}
14110_ACEOF
14111rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14112if { (ac_try="$ac_link"
14113case "(($ac_try" in
14114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14115 *) ac_try_echo=$ac_try;;
14116esac
14117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14118 (eval "$ac_link") 2>conftest.er1
503d2be0 14119 ac_status=$?
edfaf76d
LK
14120 grep -v '^ *+' conftest.er1 >conftest.err
14121 rm -f conftest.er1
14122 cat conftest.err >&5
c0d27fcc 14123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14124 (exit $ac_status); } && {
14125 test -z "$ac_c_werror_flag" ||
14126 test ! -s conftest.err
14127 } && test -s conftest$ac_exeext &&
14128 $as_test_x conftest$ac_exeext; then
98418dba 14129 ac_cv_func_alloca_works=yes
ac95a621 14130else
503d2be0 14131 echo "$as_me: failed program was:" >&5
19650fd6
AS
14132sed 's/^/| /' conftest.$ac_ext >&5
14133
ca81d7a0 14134 ac_cv_func_alloca_works=no
ac95a621 14135fi
ca81d7a0 14136
f053c89f 14137rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14138 conftest$ac_exeext conftest.$ac_ext
98418dba 14139fi
ca81d7a0
JD
14140{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
14141echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 14142
98418dba
CW
14143if test $ac_cv_func_alloca_works = yes; then
14144
c0d27fcc 14145cat >>confdefs.h <<\_ACEOF
98418dba 14146#define HAVE_ALLOCA 1
c0d27fcc 14147_ACEOF
98418dba
CW
14148
14149else
14150 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
14151# that cause trouble. Some versions do not even contain alloca or
14152# contain a buggy version. If you still want to use their alloca,
14153# use ar to extract alloca.o from them instead of compiling alloca.c.
14154
ca81d7a0 14155ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 14156
c0d27fcc 14157cat >>confdefs.h <<\_ACEOF
98418dba 14158#define C_ALLOCA 1
c0d27fcc 14159_ACEOF
98418dba 14160
c0d27fcc 14161
ca81d7a0
JD
14162{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
14163echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
14164if test "${ac_cv_os_cray+set}" = set; then
14165 echo $ECHO_N "(cached) $ECHO_C" >&6
14166else
14167 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14168/* confdefs.h. */
14169_ACEOF
14170cat confdefs.h >>conftest.$ac_ext
14171cat >>conftest.$ac_ext <<_ACEOF
14172/* end confdefs.h. */
ca81d7a0 14173#if defined CRAY && ! defined CRAY2
98418dba
CW
14174webecray
14175#else
14176wenotbecray
14177#endif
14178
14179_ACEOF
14180if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 14181 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
14182 ac_cv_os_cray=yes
14183else
14184 ac_cv_os_cray=no
14185fi
14186rm -f conftest*
ac95a621 14187
98418dba 14188fi
ca81d7a0
JD
14189{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
14190echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
14191if test $ac_cv_os_cray = yes; then
14192 for ac_func in _getb67 GETB67 getb67; do
14193 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
14194{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14195echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14196if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 14197 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14198else
503d2be0 14199 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14200/* confdefs.h. */
14201_ACEOF
14202cat confdefs.h >>conftest.$ac_ext
14203cat >>conftest.$ac_ext <<_ACEOF
14204/* end confdefs.h. */
edfaf76d
LK
14205/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14206 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14207#define $ac_func innocuous_$ac_func
14208
73b77ee5 14209/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14210 which can conflict with char $ac_func (); below.
14211 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14212 <limits.h> exists even on freestanding compilers. */
edfaf76d 14213
19650fd6
AS
14214#ifdef __STDC__
14215# include <limits.h>
14216#else
14217# include <assert.h>
14218#endif
edfaf76d
LK
14219
14220#undef $ac_func
14221
ca81d7a0
JD
14222/* Override any GCC internal prototype to avoid an error.
14223 Use char because int might match the return type of a GCC
14224 builtin and then its argument prototype would still apply. */
503d2be0
AS
14225#ifdef __cplusplus
14226extern "C"
14227#endif
503d2be0 14228char $ac_func ();
73b77ee5
GM
14229/* The GNU C library defines this for functions which it implements
14230 to always fail with ENOSYS. Some functions are actually named
14231 something starting with __ and the normal name is an alias. */
ca81d7a0 14232#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 14233choke me
73b77ee5
GM
14234#endif
14235
19650fd6
AS
14236int
14237main ()
14238{
ca81d7a0 14239return $ac_func ();
503d2be0
AS
14240 ;
14241 return 0;
14242}
14243_ACEOF
14244rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14245if { (ac_try="$ac_link"
14246case "(($ac_try" in
14247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14248 *) ac_try_echo=$ac_try;;
14249esac
14250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14251 (eval "$ac_link") 2>conftest.er1
503d2be0 14252 ac_status=$?
edfaf76d
LK
14253 grep -v '^ *+' conftest.er1 >conftest.err
14254 rm -f conftest.er1
14255 cat conftest.err >&5
c0d27fcc 14256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14257 (exit $ac_status); } && {
14258 test -z "$ac_c_werror_flag" ||
14259 test ! -s conftest.err
14260 } && test -s conftest$ac_exeext &&
14261 $as_test_x conftest$ac_exeext; then
503d2be0
AS
14262 eval "$as_ac_var=yes"
14263else
14264 echo "$as_me: failed program was:" >&5
19650fd6
AS
14265sed 's/^/| /' conftest.$ac_ext >&5
14266
ca81d7a0 14267 eval "$as_ac_var=no"
503d2be0 14268fi
ca81d7a0 14269
f053c89f 14270rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14271 conftest$ac_exeext conftest.$ac_ext
503d2be0 14272fi
ca81d7a0
JD
14273ac_res=`eval echo '${'$as_ac_var'}'`
14274 { echo "$as_me:$LINENO: result: $ac_res" >&5
14275echo "${ECHO_T}$ac_res" >&6; }
503d2be0 14276if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 14277
c0d27fcc 14278cat >>confdefs.h <<_ACEOF
98418dba 14279#define CRAY_STACKSEG_END $ac_func
c0d27fcc 14280_ACEOF
98418dba
CW
14281
14282 break
73b77ee5 14283fi
73b77ee5 14284
98418dba 14285 done
73b77ee5
GM
14286fi
14287
ca81d7a0
JD
14288{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
14289echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 14290if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 14291 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
14292else
14293 if test "$cross_compiling" = yes; then
14294 ac_cv_c_stack_direction=0
73b77ee5 14295else
503d2be0 14296 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14297/* confdefs.h. */
14298_ACEOF
14299cat confdefs.h >>conftest.$ac_ext
14300cat >>conftest.$ac_ext <<_ACEOF
14301/* end confdefs.h. */
ca81d7a0 14302$ac_includes_default
503d2be0 14303int
98418dba 14304find_stack_direction ()
503d2be0 14305{
98418dba
CW
14306 static char *addr = 0;
14307 auto char dummy;
14308 if (addr == 0)
14309 {
14310 addr = &dummy;
14311 return find_stack_direction ();
14312 }
73b77ee5 14313 else
98418dba
CW
14314 return (&dummy > addr) ? 1 : -1;
14315}
ba4481b5 14316
503d2be0
AS
14317int
14318main ()
14319{
ca81d7a0 14320 return find_stack_direction () < 0;
503d2be0
AS
14321}
14322_ACEOF
98418dba 14323rm -f conftest$ac_exeext
ca81d7a0
JD
14324if { (ac_try="$ac_link"
14325case "(($ac_try" in
14326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14327 *) ac_try_echo=$ac_try;;
14328esac
14329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14330 (eval "$ac_link") 2>&5
503d2be0 14331 ac_status=$?
c0d27fcc 14332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14333 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
14334 { (case "(($ac_try" in
14335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14336 *) ac_try_echo=$ac_try;;
14337esac
14338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14339 (eval "$ac_try") 2>&5
503d2be0 14340 ac_status=$?
c0d27fcc 14341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14342 (exit $ac_status); }; }; then
98418dba 14343 ac_cv_c_stack_direction=1
ba4481b5 14344else
98418dba
CW
14345 echo "$as_me: program exited with status $ac_status" >&5
14346echo "$as_me: failed program was:" >&5
19650fd6
AS
14347sed 's/^/| /' conftest.$ac_ext >&5
14348
c0d27fcc 14349( exit $ac_status )
98418dba 14350ac_cv_c_stack_direction=-1
ba4481b5 14351fi
ca81d7a0 14352rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 14353fi
ca81d7a0
JD
14354
14355
98418dba 14356fi
ca81d7a0
JD
14357{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
14358echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 14359
c0d27fcc 14360cat >>confdefs.h <<_ACEOF
98418dba 14361#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
14362_ACEOF
14363
ba4481b5 14364
ba4481b5
DL
14365fi
14366
c0d27fcc 14367
98418dba
CW
14368# fmod, logb, and frexp are found in -lm on most systems.
14369# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
14370
ca81d7a0
JD
14371{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
14372echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 14373if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 14374 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14375else
98418dba
CW
14376 ac_check_lib_save_LIBS=$LIBS
14377LIBS="-lm $LIBS"
14378cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14379/* confdefs.h. */
14380_ACEOF
14381cat confdefs.h >>conftest.$ac_ext
14382cat >>conftest.$ac_ext <<_ACEOF
14383/* end confdefs.h. */
ba4481b5 14384
ca81d7a0
JD
14385/* Override any GCC internal prototype to avoid an error.
14386 Use char because int might match the return type of a GCC
14387 builtin and then its argument prototype would still apply. */
98418dba
CW
14388#ifdef __cplusplus
14389extern "C"
14390#endif
98418dba 14391char sqrt ();
503d2be0
AS
14392int
14393main ()
14394{
ca81d7a0 14395return sqrt ();
503d2be0
AS
14396 ;
14397 return 0;
14398}
14399_ACEOF
14400rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14401if { (ac_try="$ac_link"
14402case "(($ac_try" in
14403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14404 *) ac_try_echo=$ac_try;;
14405esac
14406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14407 (eval "$ac_link") 2>conftest.er1
503d2be0 14408 ac_status=$?
edfaf76d
LK
14409 grep -v '^ *+' conftest.er1 >conftest.err
14410 rm -f conftest.er1
14411 cat conftest.err >&5
c0d27fcc 14412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14413 (exit $ac_status); } && {
14414 test -z "$ac_c_werror_flag" ||
14415 test ! -s conftest.err
14416 } && test -s conftest$ac_exeext &&
14417 $as_test_x conftest$ac_exeext; then
98418dba 14418 ac_cv_lib_m_sqrt=yes
ba4481b5 14419else
503d2be0 14420 echo "$as_me: failed program was:" >&5
19650fd6
AS
14421sed 's/^/| /' conftest.$ac_ext >&5
14422
ca81d7a0 14423 ac_cv_lib_m_sqrt=no
ba4481b5 14424fi
ca81d7a0 14425
f053c89f 14426rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14427 conftest$ac_exeext conftest.$ac_ext
98418dba 14428LIBS=$ac_check_lib_save_LIBS
ba4481b5 14429fi
ca81d7a0
JD
14430{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
14431echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 14432if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 14433 cat >>confdefs.h <<_ACEOF
98418dba 14434#define HAVE_LIBM 1
c0d27fcc 14435_ACEOF
98418dba
CW
14436
14437 LIBS="-lm $LIBS"
ba4481b5 14438
ba4481b5
DL
14439fi
14440
c0d27fcc 14441
55597d70
DL
14442# Check for mail-locking functions in a "mail" library. Probably this should
14443# have the same check as for liblockfile below.
98418dba 14444
ca81d7a0
JD
14445{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
14446echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 14447if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 14448 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14449else
98418dba
CW
14450 ac_check_lib_save_LIBS=$LIBS
14451LIBS="-lmail $LIBS"
14452cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14453/* confdefs.h. */
14454_ACEOF
14455cat confdefs.h >>conftest.$ac_ext
14456cat >>conftest.$ac_ext <<_ACEOF
14457/* end confdefs.h. */
98418dba 14458
ca81d7a0
JD
14459/* Override any GCC internal prototype to avoid an error.
14460 Use char because int might match the return type of a GCC
14461 builtin and then its argument prototype would still apply. */
98418dba
CW
14462#ifdef __cplusplus
14463extern "C"
14464#endif
98418dba 14465char maillock ();
503d2be0
AS
14466int
14467main ()
14468{
ca81d7a0 14469return maillock ();
503d2be0
AS
14470 ;
14471 return 0;
14472}
14473_ACEOF
14474rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14475if { (ac_try="$ac_link"
14476case "(($ac_try" in
14477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14478 *) ac_try_echo=$ac_try;;
14479esac
14480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14481 (eval "$ac_link") 2>conftest.er1
503d2be0 14482 ac_status=$?
edfaf76d
LK
14483 grep -v '^ *+' conftest.er1 >conftest.err
14484 rm -f conftest.er1
14485 cat conftest.err >&5
c0d27fcc 14486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14487 (exit $ac_status); } && {
14488 test -z "$ac_c_werror_flag" ||
14489 test ! -s conftest.err
14490 } && test -s conftest$ac_exeext &&
14491 $as_test_x conftest$ac_exeext; then
98418dba 14492 ac_cv_lib_mail_maillock=yes
ba4481b5 14493else
503d2be0 14494 echo "$as_me: failed program was:" >&5
19650fd6
AS
14495sed 's/^/| /' conftest.$ac_ext >&5
14496
ca81d7a0 14497 ac_cv_lib_mail_maillock=no
ba4481b5 14498fi
ca81d7a0 14499
f053c89f 14500rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14501 conftest$ac_exeext conftest.$ac_ext
98418dba 14502LIBS=$ac_check_lib_save_LIBS
ba4481b5 14503fi
ca81d7a0
JD
14504{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
14505echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 14506if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 14507 cat >>confdefs.h <<_ACEOF
98418dba 14508#define HAVE_LIBMAIL 1
c0d27fcc 14509_ACEOF
ba4481b5 14510
98418dba 14511 LIBS="-lmail $LIBS"
ba4481b5 14512
98418dba 14513fi
ba4481b5 14514
c0d27fcc 14515
ca81d7a0
JD
14516{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
14517echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 14518if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 14519 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14520else
503d2be0 14521 ac_check_lib_save_LIBS=$LIBS
98418dba 14522LIBS="-llockfile $LIBS"
503d2be0 14523cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14524/* confdefs.h. */
14525_ACEOF
14526cat confdefs.h >>conftest.$ac_ext
14527cat >>conftest.$ac_ext <<_ACEOF
14528/* end confdefs.h. */
503d2be0 14529
ca81d7a0
JD
14530/* Override any GCC internal prototype to avoid an error.
14531 Use char because int might match the return type of a GCC
14532 builtin and then its argument prototype would still apply. */
503d2be0
AS
14533#ifdef __cplusplus
14534extern "C"
14535#endif
98418dba 14536char maillock ();
503d2be0
AS
14537int
14538main ()
14539{
ca81d7a0 14540return maillock ();
503d2be0
AS
14541 ;
14542 return 0;
14543}
14544_ACEOF
14545rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14546if { (ac_try="$ac_link"
14547case "(($ac_try" in
14548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14549 *) ac_try_echo=$ac_try;;
14550esac
14551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14552 (eval "$ac_link") 2>conftest.er1
503d2be0 14553 ac_status=$?
edfaf76d
LK
14554 grep -v '^ *+' conftest.er1 >conftest.err
14555 rm -f conftest.er1
14556 cat conftest.err >&5
c0d27fcc 14557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14558 (exit $ac_status); } && {
14559 test -z "$ac_c_werror_flag" ||
14560 test ! -s conftest.err
14561 } && test -s conftest$ac_exeext &&
14562 $as_test_x conftest$ac_exeext; then
98418dba 14563 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
14564else
14565 echo "$as_me: failed program was:" >&5
19650fd6
AS
14566sed 's/^/| /' conftest.$ac_ext >&5
14567
ca81d7a0 14568 ac_cv_lib_lockfile_maillock=no
98418dba 14569fi
ca81d7a0 14570
f053c89f 14571rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14572 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14573LIBS=$ac_check_lib_save_LIBS
14574fi
ca81d7a0
JD
14575{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
14576echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 14577if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 14578 cat >>confdefs.h <<_ACEOF
98418dba 14579#define HAVE_LIBLOCKFILE 1
c0d27fcc 14580_ACEOF
98418dba
CW
14581
14582 LIBS="-llockfile $LIBS"
14583
14584fi
14585
14586# If we have the shared liblockfile, assume we must use it for mail
14587# locking (e.g. Debian). If we couldn't link against liblockfile
14588# (no liblockfile.a installed), ensure that we don't need to.
14589if test "$ac_cv_lib_lockfile_maillock" = no; then
14590 # Extract the first word of "liblockfile.so", so it can be a program name with args.
14591set dummy liblockfile.so; ac_word=$2
ca81d7a0
JD
14592{ echo "$as_me:$LINENO: checking for $ac_word" >&5
14593echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
14594if test "${ac_cv_prog_liblockfile+set}" = set; then
14595 echo $ECHO_N "(cached) $ECHO_C" >&6
14596else
14597 if test -n "$liblockfile"; then
14598 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
14599else
c0d27fcc 14600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
14601as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
14602for as_dir in $as_dummy
c0d27fcc
MR
14603do
14604 IFS=$as_save_IFS
14605 test -z "$as_dir" && as_dir=.
14606 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 14607 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
14608 ac_cv_prog_liblockfile="yes"
14609 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14610 break 2
14611 fi
14612done
98418dba 14613done
ca81d7a0 14614IFS=$as_save_IFS
98418dba
CW
14615
14616 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 14617fi
503d2be0 14618fi
98418dba
CW
14619liblockfile=$ac_cv_prog_liblockfile
14620if test -n "$liblockfile"; then
ca81d7a0
JD
14621 { echo "$as_me:$LINENO: result: $liblockfile" >&5
14622echo "${ECHO_T}$liblockfile" >&6; }
98418dba 14623else
ca81d7a0
JD
14624 { echo "$as_me:$LINENO: result: no" >&5
14625echo "${ECHO_T}no" >&6; }
ba4481b5
DL
14626fi
14627
ca81d7a0 14628
98418dba 14629 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 14630 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
14631This probably means that movemail could lose mail.
14632There may be a \`development' package to install containing liblockfile." >&5
14633echo "$as_me: error: Shared liblockfile found but can't link against it.
14634This probably means that movemail could lose mail.
14635There may be a \`development' package to install containing liblockfile." >&2;}
14636 { (exit 1); exit 1; }; }
98418dba 14637 else :
55597d70 14638 fi
98418dba 14639fi
503d2be0 14640
98418dba
CW
14641for ac_func in touchlock
14642do
14643as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
14644{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14645echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14646if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 14647 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 14648else
98418dba 14649 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14650/* confdefs.h. */
14651_ACEOF
14652cat confdefs.h >>conftest.$ac_ext
14653cat >>conftest.$ac_ext <<_ACEOF
14654/* end confdefs.h. */
edfaf76d
LK
14655/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14656 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14657#define $ac_func innocuous_$ac_func
14658
98418dba 14659/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14660 which can conflict with char $ac_func (); below.
14661 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14662 <limits.h> exists even on freestanding compilers. */
edfaf76d 14663
19650fd6
AS
14664#ifdef __STDC__
14665# include <limits.h>
14666#else
14667# include <assert.h>
14668#endif
edfaf76d
LK
14669
14670#undef $ac_func
14671
ca81d7a0
JD
14672/* Override any GCC internal prototype to avoid an error.
14673 Use char because int might match the return type of a GCC
14674 builtin and then its argument prototype would still apply. */
503d2be0
AS
14675#ifdef __cplusplus
14676extern "C"
14677#endif
98418dba 14678char $ac_func ();
98418dba
CW
14679/* The GNU C library defines this for functions which it implements
14680 to always fail with ENOSYS. Some functions are actually named
14681 something starting with __ and the normal name is an alias. */
ca81d7a0 14682#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 14683choke me
cd958eb3
MB
14684#endif
14685
19650fd6
AS
14686int
14687main ()
14688{
ca81d7a0 14689return $ac_func ();
503d2be0
AS
14690 ;
14691 return 0;
14692}
14693_ACEOF
14694rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14695if { (ac_try="$ac_link"
14696case "(($ac_try" in
14697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14698 *) ac_try_echo=$ac_try;;
14699esac
14700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14701 (eval "$ac_link") 2>conftest.er1
503d2be0 14702 ac_status=$?
edfaf76d
LK
14703 grep -v '^ *+' conftest.er1 >conftest.err
14704 rm -f conftest.er1
14705 cat conftest.err >&5
c0d27fcc 14706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14707 (exit $ac_status); } && {
14708 test -z "$ac_c_werror_flag" ||
14709 test ! -s conftest.err
14710 } && test -s conftest$ac_exeext &&
14711 $as_test_x conftest$ac_exeext; then
98418dba 14712 eval "$as_ac_var=yes"
503d2be0
AS
14713else
14714 echo "$as_me: failed program was:" >&5
19650fd6
AS
14715sed 's/^/| /' conftest.$ac_ext >&5
14716
ca81d7a0 14717 eval "$as_ac_var=no"
503d2be0 14718fi
ca81d7a0 14719
f053c89f 14720rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14721 conftest$ac_exeext conftest.$ac_ext
503d2be0 14722fi
ca81d7a0
JD
14723ac_res=`eval echo '${'$as_ac_var'}'`
14724 { echo "$as_me:$LINENO: result: $ac_res" >&5
14725echo "${ECHO_T}$ac_res" >&6; }
98418dba 14726if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 14727 cat >>confdefs.h <<_ACEOF
98418dba 14728#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 14729_ACEOF
457b792c 14730
457b792c 14731fi
98418dba 14732done
457b792c 14733
c0d27fcc 14734
98418dba
CW
14735for ac_header in maillock.h
14736do
14737as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
14738if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
14739 { echo "$as_me:$LINENO: checking for $ac_header" >&5
14740echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14741if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 14742 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14743fi
ca81d7a0
JD
14744ac_res=`eval echo '${'$as_ac_Header'}'`
14745 { echo "$as_me:$LINENO: result: $ac_res" >&5
14746echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 14747else
c0d27fcc 14748 # Is the header compilable?
ca81d7a0
JD
14749{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
14750echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 14751cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14752/* confdefs.h. */
14753_ACEOF
14754cat confdefs.h >>conftest.$ac_ext
14755cat >>conftest.$ac_ext <<_ACEOF
14756/* end confdefs.h. */
c0d27fcc
MR
14757$ac_includes_default
14758#include <$ac_header>
14759_ACEOF
14760rm -f conftest.$ac_objext
ca81d7a0
JD
14761if { (ac_try="$ac_compile"
14762case "(($ac_try" in
14763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14764 *) ac_try_echo=$ac_try;;
14765esac
14766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14767 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14768 ac_status=$?
edfaf76d
LK
14769 grep -v '^ *+' conftest.er1 >conftest.err
14770 rm -f conftest.er1
14771 cat conftest.err >&5
c0d27fcc 14772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14773 (exit $ac_status); } && {
14774 test -z "$ac_c_werror_flag" ||
14775 test ! -s conftest.err
14776 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14777 ac_header_compiler=yes
14778else
14779 echo "$as_me: failed program was:" >&5
19650fd6
AS
14780sed 's/^/| /' conftest.$ac_ext >&5
14781
ca81d7a0 14782 ac_header_compiler=no
c0d27fcc 14783fi
ca81d7a0
JD
14784
14785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14786{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14787echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14788
14789# Is the header present?
ca81d7a0
JD
14790{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
14791echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 14792cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14793/* confdefs.h. */
14794_ACEOF
14795cat confdefs.h >>conftest.$ac_ext
14796cat >>conftest.$ac_ext <<_ACEOF
14797/* end confdefs.h. */
98418dba 14798#include <$ac_header>
503d2be0 14799_ACEOF
ca81d7a0
JD
14800if { (ac_try="$ac_cpp conftest.$ac_ext"
14801case "(($ac_try" in
14802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14803 *) ac_try_echo=$ac_try;;
14804esac
14805eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14806 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 14807 ac_status=$?
6bae0ccf 14808 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14809 rm -f conftest.er1
14810 cat conftest.err >&5
c0d27fcc 14811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14812 (exit $ac_status); } >/dev/null && {
14813 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14814 test ! -s conftest.err
14815 }; then
c0d27fcc 14816 ac_header_preproc=yes
98418dba
CW
14817else
14818 echo "$as_me: failed program was:" >&5
19650fd6
AS
14819sed 's/^/| /' conftest.$ac_ext >&5
14820
c0d27fcc 14821 ac_header_preproc=no
503d2be0 14822fi
ca81d7a0 14823
98418dba 14824rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14825{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14826echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14827
14828# So? What about this header?
edfaf76d
LK
14829case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14830 yes:no: )
c0d27fcc
MR
14831 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
14832echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14833 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
14834echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
14835 ac_header_preproc=yes
19650fd6 14836 ;;
edfaf76d 14837 no:yes:* )
c0d27fcc
MR
14838 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
14839echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
14840 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
14841echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
14842 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
14843echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
14844 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
14845echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14846 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 14847echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14848 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
14849echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14850
19650fd6 14851 ;;
c0d27fcc 14852esac
ca81d7a0
JD
14853{ echo "$as_me:$LINENO: checking for $ac_header" >&5
14854echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
14855if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
14856 echo $ECHO_N "(cached) $ECHO_C" >&6
14857else
edfaf76d 14858 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 14859fi
ca81d7a0
JD
14860ac_res=`eval echo '${'$as_ac_Header'}'`
14861 { echo "$as_me:$LINENO: result: $ac_res" >&5
14862echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
14863
14864fi
98418dba 14865if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 14866 cat >>confdefs.h <<_ACEOF
98418dba 14867#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 14868_ACEOF
48d4b120 14869
ba4481b5 14870fi
c0d27fcc 14871
98418dba
CW
14872done
14873
c0d27fcc
MR
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
22044edf
DL
14929
14930
c0d27fcc 14931
b0e44248
RB
14932
14933
973a76b1
DL
14934
14935
14936
cd958eb3 14937
25ca0bca 14938
ea92fc9f 14939
e2fcf543 14940
190956b3 14941
c0d27fcc
MR
14942
14943
98418dba 14944for ac_func in gethostname getdomainname dup2 \
e2fcf543 14945rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
98418dba
CW
14946random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
14947strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 14948utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
14949__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
14950sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 14951gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
4489ece2 14952memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
14953do
14954as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
14955{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14956echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14957if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 14958 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14959else
503d2be0 14960 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14961/* confdefs.h. */
14962_ACEOF
14963cat confdefs.h >>conftest.$ac_ext
14964cat >>conftest.$ac_ext <<_ACEOF
14965/* end confdefs.h. */
edfaf76d
LK
14966/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14967 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14968#define $ac_func innocuous_$ac_func
14969
98418dba 14970/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14971 which can conflict with char $ac_func (); below.
14972 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14973 <limits.h> exists even on freestanding compilers. */
edfaf76d 14974
19650fd6
AS
14975#ifdef __STDC__
14976# include <limits.h>
14977#else
14978# include <assert.h>
14979#endif
edfaf76d
LK
14980
14981#undef $ac_func
14982
ca81d7a0
JD
14983/* Override any GCC internal prototype to avoid an error.
14984 Use char because int might match the return type of a GCC
14985 builtin and then its argument prototype would still apply. */
503d2be0
AS
14986#ifdef __cplusplus
14987extern "C"
14988#endif
98418dba 14989char $ac_func ();
98418dba
CW
14990/* The GNU C library defines this for functions which it implements
14991 to always fail with ENOSYS. Some functions are actually named
14992 something starting with __ and the normal name is an alias. */
ca81d7a0 14993#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 14994choke me
98418dba
CW
14995#endif
14996
19650fd6
AS
14997int
14998main ()
14999{
ca81d7a0 15000return $ac_func ();
503d2be0
AS
15001 ;
15002 return 0;
15003}
15004_ACEOF
15005rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15006if { (ac_try="$ac_link"
15007case "(($ac_try" in
15008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15009 *) ac_try_echo=$ac_try;;
15010esac
15011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15012 (eval "$ac_link") 2>conftest.er1
503d2be0 15013 ac_status=$?
edfaf76d
LK
15014 grep -v '^ *+' conftest.er1 >conftest.err
15015 rm -f conftest.er1
15016 cat conftest.err >&5
c0d27fcc 15017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15018 (exit $ac_status); } && {
15019 test -z "$ac_c_werror_flag" ||
15020 test ! -s conftest.err
15021 } && test -s conftest$ac_exeext &&
15022 $as_test_x conftest$ac_exeext; then
98418dba 15023 eval "$as_ac_var=yes"
503d2be0
AS
15024else
15025 echo "$as_me: failed program was:" >&5
19650fd6
AS
15026sed 's/^/| /' conftest.$ac_ext >&5
15027
ca81d7a0 15028 eval "$as_ac_var=no"
503d2be0 15029fi
ca81d7a0 15030
f053c89f 15031rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15032 conftest$ac_exeext conftest.$ac_ext
ba4481b5 15033fi
ca81d7a0
JD
15034ac_res=`eval echo '${'$as_ac_var'}'`
15035 { echo "$as_me:$LINENO: result: $ac_res" >&5
15036echo "${ECHO_T}$ac_res" >&6; }
98418dba 15037if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15038 cat >>confdefs.h <<_ACEOF
98418dba 15039#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15040_ACEOF
ba4481b5 15041
ba4481b5 15042fi
98418dba 15043done
ba4481b5 15044
c0d27fcc
MR
15045
15046
98418dba
CW
15047for ac_header in sys/un.h
15048do
15049as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15050if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15051 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15052echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15053if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 15054 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15055fi
ca81d7a0
JD
15056ac_res=`eval echo '${'$as_ac_Header'}'`
15057 { echo "$as_me:$LINENO: result: $ac_res" >&5
15058echo "${ECHO_T}$ac_res" >&6; }
98418dba 15059else
c0d27fcc 15060 # Is the header compilable?
ca81d7a0
JD
15061{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15062echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15063cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15064/* confdefs.h. */
15065_ACEOF
15066cat confdefs.h >>conftest.$ac_ext
15067cat >>conftest.$ac_ext <<_ACEOF
15068/* end confdefs.h. */
c0d27fcc
MR
15069$ac_includes_default
15070#include <$ac_header>
15071_ACEOF
15072rm -f conftest.$ac_objext
ca81d7a0
JD
15073if { (ac_try="$ac_compile"
15074case "(($ac_try" in
15075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15076 *) ac_try_echo=$ac_try;;
15077esac
15078eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15079 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15080 ac_status=$?
edfaf76d
LK
15081 grep -v '^ *+' conftest.er1 >conftest.err
15082 rm -f conftest.er1
15083 cat conftest.err >&5
c0d27fcc 15084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15085 (exit $ac_status); } && {
15086 test -z "$ac_c_werror_flag" ||
15087 test ! -s conftest.err
15088 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15089 ac_header_compiler=yes
15090else
15091 echo "$as_me: failed program was:" >&5
19650fd6
AS
15092sed 's/^/| /' conftest.$ac_ext >&5
15093
ca81d7a0 15094 ac_header_compiler=no
c0d27fcc 15095fi
ca81d7a0
JD
15096
15097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15098{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15099echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15100
15101# Is the header present?
ca81d7a0
JD
15102{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15103echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15104cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15105/* confdefs.h. */
15106_ACEOF
15107cat confdefs.h >>conftest.$ac_ext
15108cat >>conftest.$ac_ext <<_ACEOF
15109/* end confdefs.h. */
98418dba 15110#include <$ac_header>
503d2be0 15111_ACEOF
ca81d7a0
JD
15112if { (ac_try="$ac_cpp conftest.$ac_ext"
15113case "(($ac_try" in
15114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15115 *) ac_try_echo=$ac_try;;
15116esac
15117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15118 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15119 ac_status=$?
6bae0ccf 15120 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15121 rm -f conftest.er1
15122 cat conftest.err >&5
c0d27fcc 15123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15124 (exit $ac_status); } >/dev/null && {
15125 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15126 test ! -s conftest.err
15127 }; then
c0d27fcc 15128 ac_header_preproc=yes
ba4481b5 15129else
503d2be0 15130 echo "$as_me: failed program was:" >&5
19650fd6
AS
15131sed 's/^/| /' conftest.$ac_ext >&5
15132
c0d27fcc 15133 ac_header_preproc=no
ba4481b5 15134fi
ca81d7a0 15135
503d2be0 15136rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15137{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15138echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15139
15140# So? What about this header?
edfaf76d
LK
15141case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15142 yes:no: )
c0d27fcc
MR
15143 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15144echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15145 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15146echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15147 ac_header_preproc=yes
19650fd6 15148 ;;
edfaf76d 15149 no:yes:* )
c0d27fcc
MR
15150 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15151echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15152 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15153echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15154 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15155echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15156 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15157echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15158 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15159echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15160 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15161echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15162
19650fd6 15163 ;;
c0d27fcc 15164esac
ca81d7a0
JD
15165{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15166echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15167if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15168 echo $ECHO_N "(cached) $ECHO_C" >&6
15169else
edfaf76d 15170 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 15171fi
ca81d7a0
JD
15172ac_res=`eval echo '${'$as_ac_Header'}'`
15173 { echo "$as_me:$LINENO: result: $ac_res" >&5
15174echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15175
15176fi
925c2f3f 15177if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15178 cat >>confdefs.h <<_ACEOF
925c2f3f 15179#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15180_ACEOF
503d2be0 15181
925c2f3f 15182fi
c0d27fcc 15183
925c2f3f
EZ
15184done
15185
c0d27fcc
MR
15186
15187
15188
edfaf76d 15189
f053c89f
CY
15190
15191for ac_header in $ac_header_list
925c2f3f
EZ
15192do
15193as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15194if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15195 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15196echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15197if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 15198 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15199fi
ca81d7a0
JD
15200ac_res=`eval echo '${'$as_ac_Header'}'`
15201 { echo "$as_me:$LINENO: result: $ac_res" >&5
15202echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 15203else
c0d27fcc 15204 # Is the header compilable?
ca81d7a0
JD
15205{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15206echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15207cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15208/* confdefs.h. */
15209_ACEOF
15210cat confdefs.h >>conftest.$ac_ext
15211cat >>conftest.$ac_ext <<_ACEOF
15212/* end confdefs.h. */
c0d27fcc
MR
15213$ac_includes_default
15214#include <$ac_header>
15215_ACEOF
15216rm -f conftest.$ac_objext
ca81d7a0
JD
15217if { (ac_try="$ac_compile"
15218case "(($ac_try" in
15219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15220 *) ac_try_echo=$ac_try;;
15221esac
15222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15223 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15224 ac_status=$?
edfaf76d
LK
15225 grep -v '^ *+' conftest.er1 >conftest.err
15226 rm -f conftest.er1
15227 cat conftest.err >&5
c0d27fcc 15228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15229 (exit $ac_status); } && {
15230 test -z "$ac_c_werror_flag" ||
15231 test ! -s conftest.err
15232 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15233 ac_header_compiler=yes
15234else
15235 echo "$as_me: failed program was:" >&5
19650fd6
AS
15236sed 's/^/| /' conftest.$ac_ext >&5
15237
ca81d7a0 15238 ac_header_compiler=no
c0d27fcc 15239fi
ca81d7a0
JD
15240
15241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15242{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15243echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15244
15245# Is the header present?
ca81d7a0
JD
15246{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15247echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15248cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15249/* confdefs.h. */
15250_ACEOF
15251cat confdefs.h >>conftest.$ac_ext
15252cat >>conftest.$ac_ext <<_ACEOF
15253/* end confdefs.h. */
98418dba 15254#include <$ac_header>
503d2be0 15255_ACEOF
ca81d7a0
JD
15256if { (ac_try="$ac_cpp conftest.$ac_ext"
15257case "(($ac_try" in
15258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15259 *) ac_try_echo=$ac_try;;
15260esac
15261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15262 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15263 ac_status=$?
6bae0ccf 15264 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15265 rm -f conftest.er1
15266 cat conftest.err >&5
c0d27fcc 15267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15268 (exit $ac_status); } >/dev/null && {
15269 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15270 test ! -s conftest.err
15271 }; then
c0d27fcc 15272 ac_header_preproc=yes
98418dba
CW
15273else
15274 echo "$as_me: failed program was:" >&5
19650fd6
AS
15275sed 's/^/| /' conftest.$ac_ext >&5
15276
c0d27fcc 15277 ac_header_preproc=no
98418dba 15278fi
ca81d7a0 15279
98418dba 15280rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15281{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15282echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15283
15284# So? What about this header?
edfaf76d
LK
15285case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15286 yes:no: )
c0d27fcc
MR
15287 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15288echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15289 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15290echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15291 ac_header_preproc=yes
19650fd6 15292 ;;
edfaf76d 15293 no:yes:* )
c0d27fcc
MR
15294 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15295echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15296 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15297echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15298 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15299echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15300 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15301echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15302 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15303echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15304 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15305echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15306
19650fd6 15307 ;;
c0d27fcc 15308esac
ca81d7a0
JD
15309{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15310echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15311if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15312 echo $ECHO_N "(cached) $ECHO_C" >&6
15313else
edfaf76d 15314 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 15315fi
ca81d7a0
JD
15316ac_res=`eval echo '${'$as_ac_Header'}'`
15317 { echo "$as_me:$LINENO: result: $ac_res" >&5
15318echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15319
15320fi
98418dba 15321if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15322 cat >>confdefs.h <<_ACEOF
98418dba 15323#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15324_ACEOF
98418dba
CW
15325
15326fi
c0d27fcc 15327
98418dba
CW
15328done
15329
c0d27fcc 15330
f053c89f
CY
15331
15332
15333
15334
15335
15336
15337
15338for ac_func in $ac_func_list
98418dba
CW
15339do
15340as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15341{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15342echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15343if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15344 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15345else
98418dba 15346 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15347/* confdefs.h. */
15348_ACEOF
15349cat confdefs.h >>conftest.$ac_ext
15350cat >>conftest.$ac_ext <<_ACEOF
15351/* end confdefs.h. */
edfaf76d
LK
15352/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15353 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15354#define $ac_func innocuous_$ac_func
15355
98418dba 15356/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15357 which can conflict with char $ac_func (); below.
15358 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15359 <limits.h> exists even on freestanding compilers. */
edfaf76d 15360
19650fd6
AS
15361#ifdef __STDC__
15362# include <limits.h>
15363#else
15364# include <assert.h>
15365#endif
edfaf76d
LK
15366
15367#undef $ac_func
15368
ca81d7a0
JD
15369/* Override any GCC internal prototype to avoid an error.
15370 Use char because int might match the return type of a GCC
15371 builtin and then its argument prototype would still apply. */
503d2be0
AS
15372#ifdef __cplusplus
15373extern "C"
15374#endif
98418dba 15375char $ac_func ();
98418dba
CW
15376/* The GNU C library defines this for functions which it implements
15377 to always fail with ENOSYS. Some functions are actually named
15378 something starting with __ and the normal name is an alias. */
ca81d7a0 15379#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15380choke me
98418dba
CW
15381#endif
15382
19650fd6
AS
15383int
15384main ()
15385{
ca81d7a0 15386return $ac_func ();
503d2be0
AS
15387 ;
15388 return 0;
15389}
15390_ACEOF
15391rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15392if { (ac_try="$ac_link"
15393case "(($ac_try" in
15394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15395 *) ac_try_echo=$ac_try;;
15396esac
15397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15398 (eval "$ac_link") 2>conftest.er1
503d2be0 15399 ac_status=$?
edfaf76d
LK
15400 grep -v '^ *+' conftest.er1 >conftest.err
15401 rm -f conftest.er1
15402 cat conftest.err >&5
c0d27fcc 15403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15404 (exit $ac_status); } && {
15405 test -z "$ac_c_werror_flag" ||
15406 test ! -s conftest.err
15407 } && test -s conftest$ac_exeext &&
15408 $as_test_x conftest$ac_exeext; then
98418dba 15409 eval "$as_ac_var=yes"
503d2be0
AS
15410else
15411 echo "$as_me: failed program was:" >&5
19650fd6
AS
15412sed 's/^/| /' conftest.$ac_ext >&5
15413
ca81d7a0 15414 eval "$as_ac_var=no"
503d2be0 15415fi
ca81d7a0 15416
f053c89f 15417rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15418 conftest$ac_exeext conftest.$ac_ext
ffe36136 15419fi
ca81d7a0
JD
15420ac_res=`eval echo '${'$as_ac_var'}'`
15421 { echo "$as_me:$LINENO: result: $ac_res" >&5
15422echo "${ECHO_T}$ac_res" >&6; }
98418dba 15423if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15424 cat >>confdefs.h <<_ACEOF
98418dba 15425#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15426_ACEOF
ffe36136 15427
ba4481b5 15428fi
98418dba 15429done
ba4481b5 15430
f053c89f
CY
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
ca81d7a0
JD
15447{ echo "$as_me:$LINENO: checking for working mktime" >&5
15448echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
15449if test "${ac_cv_func_working_mktime+set}" = set; then
15450 echo $ECHO_N "(cached) $ECHO_C" >&6
15451else
15452 if test "$cross_compiling" = yes; then
15453 ac_cv_func_working_mktime=no
15454else
15455 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15456/* confdefs.h. */
15457_ACEOF
15458cat confdefs.h >>conftest.$ac_ext
15459cat >>conftest.$ac_ext <<_ACEOF
15460/* end confdefs.h. */
98418dba 15461/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 15462#ifdef TIME_WITH_SYS_TIME
98418dba
CW
15463# include <sys/time.h>
15464# include <time.h>
15465#else
f053c89f 15466# ifdef HAVE_SYS_TIME_H
98418dba
CW
15467# include <sys/time.h>
15468# else
15469# include <time.h>
15470# endif
15471#endif
ba4481b5 15472
f053c89f 15473#include <stdlib.h>
edfaf76d 15474
f053c89f 15475#ifdef HAVE_UNISTD_H
98418dba
CW
15476# include <unistd.h>
15477#endif
ba4481b5 15478
f053c89f 15479#ifndef HAVE_ALARM
98418dba
CW
15480# define alarm(X) /* empty */
15481#endif
df645f7c 15482
98418dba
CW
15483/* Work around redefinition to rpl_putenv by other config tests. */
15484#undef putenv
df645f7c 15485
98418dba 15486static time_t time_t_max;
edfaf76d 15487static time_t time_t_min;
df645f7c 15488
98418dba 15489/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
15490static char *tz_strings[] = {
15491 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
15492 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
15493};
15494#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 15495
ca81d7a0 15496/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 15497 Based on a problem report from Andreas Jaeger. */
ca81d7a0 15498static int
98418dba
CW
15499spring_forward_gap ()
15500{
15501 /* glibc (up to about 1998-10-07) failed this test. */
15502 struct tm tm;
15503
15504 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
15505 instead of "TZ=America/Vancouver" in order to detect the bug even
15506 on systems that don't support the Olson extension, or don't have the
15507 full zoneinfo tables installed. */
15508 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
15509
15510 tm.tm_year = 98;
15511 tm.tm_mon = 3;
15512 tm.tm_mday = 5;
15513 tm.tm_hour = 2;
15514 tm.tm_min = 0;
15515 tm.tm_sec = 0;
15516 tm.tm_isdst = -1;
ca81d7a0 15517 return mktime (&tm) != (time_t) -1;
98418dba
CW
15518}
15519
ca81d7a0 15520static int
edfaf76d 15521mktime_test1 (now)
98418dba
CW
15522 time_t now;
15523{
15524 struct tm *lt;
ca81d7a0 15525 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
15526}
15527
ca81d7a0 15528static int
edfaf76d
LK
15529mktime_test (now)
15530 time_t now;
15531{
ca81d7a0
JD
15532 return (mktime_test1 (now)
15533 && mktime_test1 ((time_t) (time_t_max - now))
15534 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
15535}
15536
ca81d7a0 15537static int
98418dba
CW
15538irix_6_4_bug ()
15539{
15540 /* Based on code from Ariel Faigon. */
15541 struct tm tm;
15542 tm.tm_year = 96;
15543 tm.tm_mon = 3;
15544 tm.tm_mday = 0;
15545 tm.tm_hour = 0;
15546 tm.tm_min = 0;
15547 tm.tm_sec = 0;
15548 tm.tm_isdst = -1;
15549 mktime (&tm);
ca81d7a0 15550 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
15551}
15552
ca81d7a0 15553static int
98418dba
CW
15554bigtime_test (j)
15555 int j;
15556{
15557 struct tm tm;
15558 time_t now;
15559 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
15560 now = mktime (&tm);
15561 if (now != (time_t) -1)
15562 {
15563 struct tm *lt = localtime (&now);
15564 if (! (lt
15565 && lt->tm_year == tm.tm_year
15566 && lt->tm_mon == tm.tm_mon
15567 && lt->tm_mday == tm.tm_mday
15568 && lt->tm_hour == tm.tm_hour
15569 && lt->tm_min == tm.tm_min
15570 && lt->tm_sec == tm.tm_sec
15571 && lt->tm_yday == tm.tm_yday
15572 && lt->tm_wday == tm.tm_wday
15573 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
15574 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 15575 return 0;
98418dba 15576 }
ca81d7a0 15577 return 1;
98418dba
CW
15578}
15579
f053c89f
CY
15580static int
15581year_2050_test ()
15582{
15583 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
15584 ignoring leap seconds. */
15585 unsigned long int answer = 2527315200UL;
15586
15587 struct tm tm;
15588 time_t t;
15589 tm.tm_year = 2050 - 1900;
15590 tm.tm_mon = 2 - 1;
15591 tm.tm_mday = 1;
15592 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
15593 tm.tm_isdst = -1;
15594
15595 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
15596 instead of "TZ=America/Vancouver" in order to detect the bug even
15597 on systems that don't support the Olson extension, or don't have the
15598 full zoneinfo tables installed. */
15599 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
15600
15601 t = mktime (&tm);
15602
15603 /* Check that the result is either a failure, or close enough
15604 to the correct answer that we can assume the discrepancy is
15605 due to leap seconds. */
15606 return (t == (time_t) -1
15607 || (0 < t && answer - 120 <= t && t <= answer + 120));
15608}
15609
98418dba
CW
15610int
15611main ()
15612{
15613 time_t t, delta;
15614 int i, j;
15615
15616 /* This test makes some buggy mktime implementations loop.
15617 Give up after 60 seconds; a mktime slower than that
15618 isn't worth using anyway. */
15619 alarm (60);
15620
15621 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
15622 continue;
15623 time_t_max--;
edfaf76d
LK
15624 if ((time_t) -1 < 0)
15625 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
15626 continue;
98418dba
CW
15627 delta = time_t_max / 997; /* a suitable prime number */
15628 for (i = 0; i < N_STRINGS; i++)
15629 {
15630 if (tz_strings[i])
15631 putenv (tz_strings[i]);
503d2be0 15632
98418dba 15633 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
15634 if (! mktime_test (t))
15635 return 1;
15636 if (! (mktime_test ((time_t) 1)
15637 && mktime_test ((time_t) (60 * 60))
15638 && mktime_test ((time_t) (60 * 60 * 24))))
15639 return 1;
98418dba
CW
15640
15641 for (j = 1; 0 < j; j *= 2)
ca81d7a0
JD
15642 if (! bigtime_test (j))
15643 return 1;
15644 if (! bigtime_test (j - 1))
15645 return 1;
98418dba 15646 }
f053c89f 15647 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
15648}
15649_ACEOF
98418dba 15650rm -f conftest$ac_exeext
ca81d7a0
JD
15651if { (ac_try="$ac_link"
15652case "(($ac_try" in
15653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15654 *) ac_try_echo=$ac_try;;
15655esac
15656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15657 (eval "$ac_link") 2>&5
503d2be0 15658 ac_status=$?
c0d27fcc 15659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15660 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
15661 { (case "(($ac_try" in
15662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15663 *) ac_try_echo=$ac_try;;
15664esac
15665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15666 (eval "$ac_try") 2>&5
503d2be0 15667 ac_status=$?
c0d27fcc 15668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15669 (exit $ac_status); }; }; then
98418dba 15670 ac_cv_func_working_mktime=yes
503d2be0 15671else
98418dba
CW
15672 echo "$as_me: program exited with status $ac_status" >&5
15673echo "$as_me: failed program was:" >&5
19650fd6
AS
15674sed 's/^/| /' conftest.$ac_ext >&5
15675
c0d27fcc 15676( exit $ac_status )
98418dba 15677ac_cv_func_working_mktime=no
503d2be0 15678fi
ca81d7a0 15679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 15680fi
ca81d7a0
JD
15681
15682
ba4481b5 15683fi
ca81d7a0
JD
15684{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
15685echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 15686if test $ac_cv_func_working_mktime = no; then
ca81d7a0 15687 case " $LIBOBJS " in
edfaf76d 15688 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
15689 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
15690 ;;
edfaf76d
LK
15691esac
15692
ba4481b5
DL
15693fi
15694
98418dba 15695if test "$ac_cv_func_working_mktime" = no; then
b936fae4 15696
c0d27fcc 15697cat >>confdefs.h <<\_ACEOF
98418dba 15698#define BROKEN_MKTIME 1
c0d27fcc 15699_ACEOF
ba4481b5 15700
ba4481b5 15701fi
503d2be0 15702
98418dba
CW
15703ac_have_func=no # yes means we've found a way to get the load average.
15704
6bae0ccf
DL
15705# Make sure getloadavg.c is where it belongs, at configure-time.
15706test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
15707 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
15708echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
15709 { (exit 1); exit 1; }; }
15710
98418dba
CW
15711ac_save_LIBS=$LIBS
15712
15713# Check for getloadavg, but be sure not to touch the cache variable.
ca81d7a0
JD
15714({ echo "$as_me:$LINENO: checking for getloadavg" >&5
15715echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 15716if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 15717 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15718else
503d2be0 15719 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15720/* confdefs.h. */
15721_ACEOF
15722cat confdefs.h >>conftest.$ac_ext
15723cat >>conftest.$ac_ext <<_ACEOF
15724/* end confdefs.h. */
edfaf76d
LK
15725/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
15726 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15727#define getloadavg innocuous_getloadavg
15728
98418dba 15729/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15730 which can conflict with char getloadavg (); below.
15731 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15732 <limits.h> exists even on freestanding compilers. */
edfaf76d 15733
19650fd6
AS
15734#ifdef __STDC__
15735# include <limits.h>
15736#else
15737# include <assert.h>
15738#endif
edfaf76d
LK
15739
15740#undef getloadavg
15741
ca81d7a0
JD
15742/* Override any GCC internal prototype to avoid an error.
15743 Use char because int might match the return type of a GCC
15744 builtin and then its argument prototype would still apply. */
503d2be0
AS
15745#ifdef __cplusplus
15746extern "C"
15747#endif
98418dba 15748char getloadavg ();
98418dba
CW
15749/* The GNU C library defines this for functions which it implements
15750 to always fail with ENOSYS. Some functions are actually named
15751 something starting with __ and the normal name is an alias. */
ca81d7a0 15752#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 15753choke me
cd958eb3
MB
15754#endif
15755
19650fd6
AS
15756int
15757main ()
15758{
ca81d7a0 15759return getloadavg ();
503d2be0
AS
15760 ;
15761 return 0;
15762}
15763_ACEOF
15764rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15765if { (ac_try="$ac_link"
15766case "(($ac_try" in
15767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15768 *) ac_try_echo=$ac_try;;
15769esac
15770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15771 (eval "$ac_link") 2>conftest.er1
503d2be0 15772 ac_status=$?
edfaf76d
LK
15773 grep -v '^ *+' conftest.er1 >conftest.err
15774 rm -f conftest.er1
15775 cat conftest.err >&5
c0d27fcc 15776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15777 (exit $ac_status); } && {
15778 test -z "$ac_c_werror_flag" ||
15779 test ! -s conftest.err
15780 } && test -s conftest$ac_exeext &&
15781 $as_test_x conftest$ac_exeext; then
98418dba 15782 ac_cv_func_getloadavg=yes
503d2be0
AS
15783else
15784 echo "$as_me: failed program was:" >&5
19650fd6
AS
15785sed 's/^/| /' conftest.$ac_ext >&5
15786
ca81d7a0 15787 ac_cv_func_getloadavg=no
503d2be0 15788fi
ca81d7a0 15789
f053c89f 15790rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15791 conftest$ac_exeext conftest.$ac_ext
ba4481b5 15792fi
ca81d7a0
JD
15793{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
15794echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
15795if test $ac_cv_func_getloadavg = yes; then
15796 exit 0
15797else
15798 exit 1
ba4481b5 15799fi
98418dba 15800) && ac_have_func=yes
ba4481b5 15801
98418dba 15802# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 15803
98418dba
CW
15804for ac_func in pstat_getdynamic
15805do
15806as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15807{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15808echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15809if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15810 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15811else
503d2be0 15812 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15813/* confdefs.h. */
15814_ACEOF
15815cat confdefs.h >>conftest.$ac_ext
15816cat >>conftest.$ac_ext <<_ACEOF
15817/* end confdefs.h. */
edfaf76d
LK
15818/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15819 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15820#define $ac_func innocuous_$ac_func
15821
98418dba 15822/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15823 which can conflict with char $ac_func (); below.
15824 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15825 <limits.h> exists even on freestanding compilers. */
edfaf76d 15826
19650fd6
AS
15827#ifdef __STDC__
15828# include <limits.h>
15829#else
15830# include <assert.h>
15831#endif
edfaf76d
LK
15832
15833#undef $ac_func
15834
ca81d7a0
JD
15835/* Override any GCC internal prototype to avoid an error.
15836 Use char because int might match the return type of a GCC
15837 builtin and then its argument prototype would still apply. */
503d2be0
AS
15838#ifdef __cplusplus
15839extern "C"
15840#endif
98418dba 15841char $ac_func ();
98418dba
CW
15842/* The GNU C library defines this for functions which it implements
15843 to always fail with ENOSYS. Some functions are actually named
15844 something starting with __ and the normal name is an alias. */
ca81d7a0 15845#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15846choke me
98418dba
CW
15847#endif
15848
19650fd6
AS
15849int
15850main ()
15851{
ca81d7a0 15852return $ac_func ();
98418dba
CW
15853 ;
15854 return 0;
15855}
f21fadcc 15856_ACEOF
98418dba 15857rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15858if { (ac_try="$ac_link"
15859case "(($ac_try" in
15860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15861 *) ac_try_echo=$ac_try;;
15862esac
15863eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15864 (eval "$ac_link") 2>conftest.er1
f21fadcc 15865 ac_status=$?
edfaf76d
LK
15866 grep -v '^ *+' conftest.er1 >conftest.err
15867 rm -f conftest.er1
15868 cat conftest.err >&5
c0d27fcc 15869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15870 (exit $ac_status); } && {
15871 test -z "$ac_c_werror_flag" ||
15872 test ! -s conftest.err
15873 } && test -s conftest$ac_exeext &&
15874 $as_test_x conftest$ac_exeext; then
98418dba 15875 eval "$as_ac_var=yes"
f21fadcc
JD
15876else
15877 echo "$as_me: failed program was:" >&5
19650fd6
AS
15878sed 's/^/| /' conftest.$ac_ext >&5
15879
ca81d7a0 15880 eval "$as_ac_var=no"
f21fadcc 15881fi
ca81d7a0 15882
f053c89f 15883rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15884 conftest$ac_exeext conftest.$ac_ext
f21fadcc 15885fi
ca81d7a0
JD
15886ac_res=`eval echo '${'$as_ac_var'}'`
15887 { echo "$as_me:$LINENO: result: $ac_res" >&5
15888echo "${ECHO_T}$ac_res" >&6; }
98418dba 15889if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15890 cat >>confdefs.h <<_ACEOF
98418dba 15891#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15892_ACEOF
98418dba
CW
15893
15894fi
15895done
15896
c0d27fcc 15897
98418dba
CW
15898# Solaris has libkstat which does not require root.
15899
ca81d7a0
JD
15900{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
15901echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 15902if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
15903 echo $ECHO_N "(cached) $ECHO_C" >&6
15904else
15905 ac_check_lib_save_LIBS=$LIBS
98418dba 15906LIBS="-lkstat $LIBS"
f21fadcc 15907cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15908/* confdefs.h. */
15909_ACEOF
15910cat confdefs.h >>conftest.$ac_ext
15911cat >>conftest.$ac_ext <<_ACEOF
15912/* end confdefs.h. */
f21fadcc 15913
ca81d7a0
JD
15914/* Override any GCC internal prototype to avoid an error.
15915 Use char because int might match the return type of a GCC
15916 builtin and then its argument prototype would still apply. */
f21fadcc
JD
15917#ifdef __cplusplus
15918extern "C"
15919#endif
98418dba 15920char kstat_open ();
f21fadcc
JD
15921int
15922main ()
15923{
ca81d7a0 15924return kstat_open ();
f21fadcc
JD
15925 ;
15926 return 0;
15927}
15928_ACEOF
15929rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15930if { (ac_try="$ac_link"
15931case "(($ac_try" in
15932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15933 *) ac_try_echo=$ac_try;;
15934esac
15935eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15936 (eval "$ac_link") 2>conftest.er1
f21fadcc 15937 ac_status=$?
edfaf76d
LK
15938 grep -v '^ *+' conftest.er1 >conftest.err
15939 rm -f conftest.er1
15940 cat conftest.err >&5
c0d27fcc 15941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15942 (exit $ac_status); } && {
15943 test -z "$ac_c_werror_flag" ||
15944 test ! -s conftest.err
15945 } && test -s conftest$ac_exeext &&
15946 $as_test_x conftest$ac_exeext; then
98418dba 15947 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
15948else
15949 echo "$as_me: failed program was:" >&5
19650fd6
AS
15950sed 's/^/| /' conftest.$ac_ext >&5
15951
ca81d7a0 15952 ac_cv_lib_kstat_kstat_open=no
f21fadcc 15953fi
ca81d7a0 15954
f053c89f 15955rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15956 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
15957LIBS=$ac_check_lib_save_LIBS
15958fi
ca81d7a0
JD
15959{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
15960echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 15961if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 15962 cat >>confdefs.h <<_ACEOF
98418dba 15963#define HAVE_LIBKSTAT 1
c0d27fcc 15964_ACEOF
f21fadcc 15965
98418dba 15966 LIBS="-lkstat $LIBS"
f21fadcc 15967
f21fadcc
JD
15968fi
15969
98418dba
CW
15970test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
15971
15972# Some systems with -lutil have (and need) -lkvm as well, some do not.
15973# On Solaris, -lkvm requires nlist from -lelf, so check that first
15974# to get the right answer into the cache.
15975# For kstat on solaris, we need libelf to force the definition of SVR4 below.
15976if test $ac_have_func = no; then
ca81d7a0
JD
15977 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
15978echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 15979if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 15980 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15981else
98418dba
CW
15982 ac_check_lib_save_LIBS=$LIBS
15983LIBS="-lelf $LIBS"
15984cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15985/* confdefs.h. */
15986_ACEOF
15987cat confdefs.h >>conftest.$ac_ext
15988cat >>conftest.$ac_ext <<_ACEOF
15989/* end confdefs.h. */
98418dba 15990
ca81d7a0
JD
15991/* Override any GCC internal prototype to avoid an error.
15992 Use char because int might match the return type of a GCC
15993 builtin and then its argument prototype would still apply. */
98418dba
CW
15994#ifdef __cplusplus
15995extern "C"
15996#endif
98418dba 15997char elf_begin ();
503d2be0
AS
15998int
15999main ()
16000{
ca81d7a0 16001return elf_begin ();
503d2be0
AS
16002 ;
16003 return 0;
16004}
16005_ACEOF
16006rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16007if { (ac_try="$ac_link"
16008case "(($ac_try" in
16009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16010 *) ac_try_echo=$ac_try;;
16011esac
16012eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16013 (eval "$ac_link") 2>conftest.er1
503d2be0 16014 ac_status=$?
edfaf76d
LK
16015 grep -v '^ *+' conftest.er1 >conftest.err
16016 rm -f conftest.er1
16017 cat conftest.err >&5
c0d27fcc 16018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16019 (exit $ac_status); } && {
16020 test -z "$ac_c_werror_flag" ||
16021 test ! -s conftest.err
16022 } && test -s conftest$ac_exeext &&
16023 $as_test_x conftest$ac_exeext; then
98418dba 16024 ac_cv_lib_elf_elf_begin=yes
ba4481b5 16025else
503d2be0 16026 echo "$as_me: failed program was:" >&5
19650fd6
AS
16027sed 's/^/| /' conftest.$ac_ext >&5
16028
ca81d7a0 16029 ac_cv_lib_elf_elf_begin=no
ba4481b5 16030fi
ca81d7a0 16031
f053c89f 16032rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16033 conftest$ac_exeext conftest.$ac_ext
98418dba 16034LIBS=$ac_check_lib_save_LIBS
ba4481b5 16035fi
ca81d7a0
JD
16036{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
16037echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
16038if test $ac_cv_lib_elf_elf_begin = yes; then
16039 LIBS="-lelf $LIBS"
ba4481b5
DL
16040fi
16041
98418dba
CW
16042fi
16043if test $ac_have_func = no; then
ca81d7a0
JD
16044 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
16045echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 16046if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 16047 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16048else
98418dba
CW
16049 ac_check_lib_save_LIBS=$LIBS
16050LIBS="-lkvm $LIBS"
16051cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16052/* confdefs.h. */
16053_ACEOF
16054cat confdefs.h >>conftest.$ac_ext
16055cat >>conftest.$ac_ext <<_ACEOF
16056/* end confdefs.h. */
98418dba 16057
ca81d7a0
JD
16058/* Override any GCC internal prototype to avoid an error.
16059 Use char because int might match the return type of a GCC
16060 builtin and then its argument prototype would still apply. */
98418dba
CW
16061#ifdef __cplusplus
16062extern "C"
16063#endif
98418dba 16064char kvm_open ();
503d2be0
AS
16065int
16066main ()
16067{
ca81d7a0 16068return kvm_open ();
503d2be0
AS
16069 ;
16070 return 0;
16071}
16072_ACEOF
16073rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16074if { (ac_try="$ac_link"
16075case "(($ac_try" in
16076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16077 *) ac_try_echo=$ac_try;;
16078esac
16079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16080 (eval "$ac_link") 2>conftest.er1
503d2be0 16081 ac_status=$?
edfaf76d
LK
16082 grep -v '^ *+' conftest.er1 >conftest.err
16083 rm -f conftest.er1
16084 cat conftest.err >&5
c0d27fcc 16085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16086 (exit $ac_status); } && {
16087 test -z "$ac_c_werror_flag" ||
16088 test ! -s conftest.err
16089 } && test -s conftest$ac_exeext &&
16090 $as_test_x conftest$ac_exeext; then
98418dba 16091 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
16092else
16093 echo "$as_me: failed program was:" >&5
19650fd6
AS
16094sed 's/^/| /' conftest.$ac_ext >&5
16095
ca81d7a0 16096 ac_cv_lib_kvm_kvm_open=no
503d2be0 16097fi
ca81d7a0 16098
f053c89f 16099rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16100 conftest$ac_exeext conftest.$ac_ext
98418dba 16101LIBS=$ac_check_lib_save_LIBS
503d2be0 16102fi
ca81d7a0
JD
16103{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
16104echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
16105if test $ac_cv_lib_kvm_kvm_open = yes; then
16106 LIBS="-lkvm $LIBS"
ba4481b5
DL
16107fi
16108
98418dba 16109 # Check for the 4.4BSD definition of getloadavg.
ca81d7a0
JD
16110 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
16111echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 16112if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 16113 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16114else
98418dba
CW
16115 ac_check_lib_save_LIBS=$LIBS
16116LIBS="-lutil $LIBS"
16117cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16118/* confdefs.h. */
16119_ACEOF
16120cat confdefs.h >>conftest.$ac_ext
16121cat >>conftest.$ac_ext <<_ACEOF
16122/* end confdefs.h. */
98418dba 16123
ca81d7a0
JD
16124/* Override any GCC internal prototype to avoid an error.
16125 Use char because int might match the return type of a GCC
16126 builtin and then its argument prototype would still apply. */
98418dba
CW
16127#ifdef __cplusplus
16128extern "C"
16129#endif
98418dba 16130char getloadavg ();
503d2be0
AS
16131int
16132main ()
16133{
ca81d7a0 16134return getloadavg ();
503d2be0
AS
16135 ;
16136 return 0;
16137}
16138_ACEOF
16139rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16140if { (ac_try="$ac_link"
16141case "(($ac_try" in
16142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16143 *) ac_try_echo=$ac_try;;
16144esac
16145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16146 (eval "$ac_link") 2>conftest.er1
503d2be0 16147 ac_status=$?
edfaf76d
LK
16148 grep -v '^ *+' conftest.er1 >conftest.err
16149 rm -f conftest.er1
16150 cat conftest.err >&5
c0d27fcc 16151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16152 (exit $ac_status); } && {
16153 test -z "$ac_c_werror_flag" ||
16154 test ! -s conftest.err
16155 } && test -s conftest$ac_exeext &&
16156 $as_test_x conftest$ac_exeext; then
35996d22
AS
16157 ac_cv_lib_util_getloadavg=yes
16158else
503d2be0 16159 echo "$as_me: failed program was:" >&5
19650fd6
AS
16160sed 's/^/| /' conftest.$ac_ext >&5
16161
ca81d7a0 16162 ac_cv_lib_util_getloadavg=no
ba4481b5 16163fi
ca81d7a0 16164
f053c89f 16165rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16166 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
16167LIBS=$ac_check_lib_save_LIBS
16168fi
ca81d7a0
JD
16169{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
16170echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
16171if test $ac_cv_lib_util_getloadavg = yes; then
16172 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 16173fi
503d2be0 16174
98418dba 16175fi
ba4481b5 16176
98418dba
CW
16177if test $ac_have_func = no; then
16178 # There is a commonly available library for RS/6000 AIX.
16179 # Since it is not a standard part of AIX, it might be installed locally.
16180 ac_getloadavg_LIBS=$LIBS
16181 LIBS="-L/usr/local/lib $LIBS"
ca81d7a0
JD
16182 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
16183echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 16184if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 16185 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16186else
98418dba
CW
16187 ac_check_lib_save_LIBS=$LIBS
16188LIBS="-lgetloadavg $LIBS"
16189cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16190/* confdefs.h. */
16191_ACEOF
16192cat confdefs.h >>conftest.$ac_ext
16193cat >>conftest.$ac_ext <<_ACEOF
16194/* end confdefs.h. */
ba4481b5 16195
ca81d7a0
JD
16196/* Override any GCC internal prototype to avoid an error.
16197 Use char because int might match the return type of a GCC
16198 builtin and then its argument prototype would still apply. */
98418dba
CW
16199#ifdef __cplusplus
16200extern "C"
16201#endif
98418dba 16202char getloadavg ();
98418dba
CW
16203int
16204main ()
16205{
ca81d7a0 16206return getloadavg ();
98418dba
CW
16207 ;
16208 return 0;
16209}
503d2be0 16210_ACEOF
98418dba 16211rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16212if { (ac_try="$ac_link"
16213case "(($ac_try" in
16214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16215 *) ac_try_echo=$ac_try;;
16216esac
16217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16218 (eval "$ac_link") 2>conftest.er1
98418dba 16219 ac_status=$?
edfaf76d
LK
16220 grep -v '^ *+' conftest.er1 >conftest.err
16221 rm -f conftest.er1
16222 cat conftest.err >&5
c0d27fcc 16223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16224 (exit $ac_status); } && {
16225 test -z "$ac_c_werror_flag" ||
16226 test ! -s conftest.err
16227 } && test -s conftest$ac_exeext &&
16228 $as_test_x conftest$ac_exeext; then
98418dba 16229 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 16230else
98418dba 16231 echo "$as_me: failed program was:" >&5
19650fd6
AS
16232sed 's/^/| /' conftest.$ac_ext >&5
16233
ca81d7a0 16234 ac_cv_lib_getloadavg_getloadavg=no
98418dba 16235fi
ca81d7a0 16236
f053c89f 16237rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16238 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
16239LIBS=$ac_check_lib_save_LIBS
16240fi
ca81d7a0
JD
16241{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
16242echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
16243if test $ac_cv_lib_getloadavg_getloadavg = yes; then
16244 LIBS="-lgetloadavg $LIBS"
16245else
16246 LIBS=$ac_getloadavg_LIBS
ba4481b5 16247fi
ba4481b5
DL
16248
16249fi
98418dba
CW
16250
16251# Make sure it is really in the library, if we think we found it,
16252# otherwise set up the replacement function.
16253
16254for ac_func in getloadavg
16255do
16256as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16257{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16258echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16259if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16260 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16261else
503d2be0 16262 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16263/* confdefs.h. */
16264_ACEOF
16265cat confdefs.h >>conftest.$ac_ext
16266cat >>conftest.$ac_ext <<_ACEOF
16267/* end confdefs.h. */
edfaf76d
LK
16268/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16269 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16270#define $ac_func innocuous_$ac_func
16271
ba4481b5 16272/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16273 which can conflict with char $ac_func (); below.
16274 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16275 <limits.h> exists even on freestanding compilers. */
edfaf76d 16276
19650fd6
AS
16277#ifdef __STDC__
16278# include <limits.h>
16279#else
16280# include <assert.h>
16281#endif
edfaf76d
LK
16282
16283#undef $ac_func
16284
ca81d7a0
JD
16285/* Override any GCC internal prototype to avoid an error.
16286 Use char because int might match the return type of a GCC
16287 builtin and then its argument prototype would still apply. */
503d2be0
AS
16288#ifdef __cplusplus
16289extern "C"
16290#endif
503d2be0 16291char $ac_func ();
ba4481b5
DL
16292/* The GNU C library defines this for functions which it implements
16293 to always fail with ENOSYS. Some functions are actually named
16294 something starting with __ and the normal name is an alias. */
ca81d7a0 16295#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 16296choke me
cd958eb3
MB
16297#endif
16298
19650fd6
AS
16299int
16300main ()
16301{
ca81d7a0 16302return $ac_func ();
503d2be0
AS
16303 ;
16304 return 0;
16305}
16306_ACEOF
16307rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16308if { (ac_try="$ac_link"
16309case "(($ac_try" in
16310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16311 *) ac_try_echo=$ac_try;;
16312esac
16313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16314 (eval "$ac_link") 2>conftest.er1
503d2be0 16315 ac_status=$?
edfaf76d
LK
16316 grep -v '^ *+' conftest.er1 >conftest.err
16317 rm -f conftest.er1
16318 cat conftest.err >&5
c0d27fcc 16319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16320 (exit $ac_status); } && {
16321 test -z "$ac_c_werror_flag" ||
16322 test ! -s conftest.err
16323 } && test -s conftest$ac_exeext &&
16324 $as_test_x conftest$ac_exeext; then
503d2be0
AS
16325 eval "$as_ac_var=yes"
16326else
16327 echo "$as_me: failed program was:" >&5
19650fd6
AS
16328sed 's/^/| /' conftest.$ac_ext >&5
16329
ca81d7a0 16330 eval "$as_ac_var=no"
503d2be0 16331fi
ca81d7a0 16332
f053c89f 16333rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16334 conftest$ac_exeext conftest.$ac_ext
503d2be0 16335fi
ca81d7a0
JD
16336ac_res=`eval echo '${'$as_ac_var'}'`
16337 { echo "$as_me:$LINENO: result: $ac_res" >&5
16338echo "${ECHO_T}$ac_res" >&6; }
503d2be0 16339if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16340 cat >>confdefs.h <<_ACEOF
98418dba 16341#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16342_ACEOF
503d2be0 16343
98418dba 16344else
ca81d7a0 16345 case " $LIBOBJS " in
edfaf76d 16346 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
16347 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
16348 ;;
edfaf76d
LK
16349esac
16350
ba4481b5 16351
c0d27fcc 16352cat >>confdefs.h <<\_ACEOF
98418dba 16353#define C_GETLOADAVG 1
c0d27fcc 16354_ACEOF
ba4481b5 16355
98418dba
CW
16356# Figure out what our getloadavg.c needs.
16357ac_have_func=no
c0d27fcc 16358if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
ca81d7a0
JD
16359 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
16360echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 16361if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 16362 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16363fi
ca81d7a0
JD
16364{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
16365echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 16366else
c0d27fcc 16367 # Is the header compilable?
ca81d7a0
JD
16368{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
16369echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 16370cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16371/* confdefs.h. */
16372_ACEOF
16373cat confdefs.h >>conftest.$ac_ext
16374cat >>conftest.$ac_ext <<_ACEOF
16375/* end confdefs.h. */
c0d27fcc
MR
16376$ac_includes_default
16377#include <sys/dg_sys_info.h>
16378_ACEOF
16379rm -f conftest.$ac_objext
ca81d7a0
JD
16380if { (ac_try="$ac_compile"
16381case "(($ac_try" in
16382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16383 *) ac_try_echo=$ac_try;;
16384esac
16385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16386 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16387 ac_status=$?
edfaf76d
LK
16388 grep -v '^ *+' conftest.er1 >conftest.err
16389 rm -f conftest.er1
16390 cat conftest.err >&5
c0d27fcc 16391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16392 (exit $ac_status); } && {
16393 test -z "$ac_c_werror_flag" ||
16394 test ! -s conftest.err
16395 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16396 ac_header_compiler=yes
16397else
16398 echo "$as_me: failed program was:" >&5
19650fd6
AS
16399sed 's/^/| /' conftest.$ac_ext >&5
16400
ca81d7a0 16401 ac_header_compiler=no
c0d27fcc 16402fi
ca81d7a0
JD
16403
16404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16405{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16406echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16407
16408# Is the header present?
ca81d7a0
JD
16409{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
16410echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 16411cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16412/* confdefs.h. */
16413_ACEOF
16414cat confdefs.h >>conftest.$ac_ext
16415cat >>conftest.$ac_ext <<_ACEOF
16416/* end confdefs.h. */
98418dba
CW
16417#include <sys/dg_sys_info.h>
16418_ACEOF
ca81d7a0
JD
16419if { (ac_try="$ac_cpp conftest.$ac_ext"
16420case "(($ac_try" in
16421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16422 *) ac_try_echo=$ac_try;;
16423esac
16424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16425 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 16426 ac_status=$?
6bae0ccf 16427 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16428 rm -f conftest.er1
16429 cat conftest.err >&5
c0d27fcc 16430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16431 (exit $ac_status); } >/dev/null && {
16432 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16433 test ! -s conftest.err
16434 }; then
c0d27fcc 16435 ac_header_preproc=yes
98418dba
CW
16436else
16437 echo "$as_me: failed program was:" >&5
19650fd6
AS
16438sed 's/^/| /' conftest.$ac_ext >&5
16439
c0d27fcc 16440 ac_header_preproc=no
ba4481b5 16441fi
ca81d7a0 16442
98418dba 16443rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16444{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16445echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16446
16447# So? What about this header?
edfaf76d
LK
16448case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16449 yes:no: )
c0d27fcc
MR
16450 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
16451echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16452 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
16453echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
16454 ac_header_preproc=yes
19650fd6 16455 ;;
edfaf76d 16456 no:yes:* )
c0d27fcc
MR
16457 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
16458echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16459 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
16460echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
16461 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
16462echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
16463 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
16464echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16465 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 16466echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16467 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
16468echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16469
19650fd6 16470 ;;
c0d27fcc 16471esac
ca81d7a0
JD
16472{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
16473echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
16474if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
16475 echo $ECHO_N "(cached) $ECHO_C" >&6
16476else
16477 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 16478fi
ca81d7a0
JD
16479{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
16480echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
16481
16482fi
98418dba
CW
16483if test $ac_cv_header_sys_dg_sys_info_h = yes; then
16484 ac_have_func=yes
ba4481b5 16485
c0d27fcc 16486cat >>confdefs.h <<\_ACEOF
98418dba 16487#define DGUX 1
c0d27fcc
MR
16488_ACEOF
16489
503d2be0 16490
ca81d7a0
JD
16491{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
16492echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 16493if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 16494 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16495else
503d2be0 16496 ac_check_lib_save_LIBS=$LIBS
98418dba 16497LIBS="-ldgc $LIBS"
503d2be0 16498cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16499/* confdefs.h. */
16500_ACEOF
16501cat confdefs.h >>conftest.$ac_ext
16502cat >>conftest.$ac_ext <<_ACEOF
16503/* end confdefs.h. */
503d2be0 16504
ca81d7a0
JD
16505/* Override any GCC internal prototype to avoid an error.
16506 Use char because int might match the return type of a GCC
16507 builtin and then its argument prototype would still apply. */
503d2be0
AS
16508#ifdef __cplusplus
16509extern "C"
16510#endif
98418dba 16511char dg_sys_info ();
503d2be0
AS
16512int
16513main ()
16514{
ca81d7a0 16515return dg_sys_info ();
503d2be0
AS
16516 ;
16517 return 0;
16518}
16519_ACEOF
16520rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16521if { (ac_try="$ac_link"
16522case "(($ac_try" in
16523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16524 *) ac_try_echo=$ac_try;;
16525esac
16526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16527 (eval "$ac_link") 2>conftest.er1
503d2be0 16528 ac_status=$?
edfaf76d
LK
16529 grep -v '^ *+' conftest.er1 >conftest.err
16530 rm -f conftest.er1
16531 cat conftest.err >&5
c0d27fcc 16532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16533 (exit $ac_status); } && {
16534 test -z "$ac_c_werror_flag" ||
16535 test ! -s conftest.err
16536 } && test -s conftest$ac_exeext &&
16537 $as_test_x conftest$ac_exeext; then
98418dba 16538 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
16539else
16540 echo "$as_me: failed program was:" >&5
19650fd6
AS
16541sed 's/^/| /' conftest.$ac_ext >&5
16542
ca81d7a0 16543 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 16544fi
ca81d7a0 16545
f053c89f 16546rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16547 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
16548LIBS=$ac_check_lib_save_LIBS
16549fi
ca81d7a0
JD
16550{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
16551echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 16552if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 16553 cat >>confdefs.h <<_ACEOF
98418dba 16554#define HAVE_LIBDGC 1
c0d27fcc 16555_ACEOF
ba4481b5 16556
98418dba 16557 LIBS="-ldgc $LIBS"
ba4481b5 16558
ba4481b5
DL
16559fi
16560
98418dba 16561fi
503d2be0 16562
c0d27fcc
MR
16563
16564
16565if test "${ac_cv_header_locale_h+set}" = set; then
ca81d7a0
JD
16566 { echo "$as_me:$LINENO: checking for locale.h" >&5
16567echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 16568if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 16569 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16570fi
ca81d7a0
JD
16571{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
16572echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 16573else
c0d27fcc 16574 # Is the header compilable?
ca81d7a0
JD
16575{ echo "$as_me:$LINENO: checking locale.h usability" >&5
16576echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 16577cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16578/* confdefs.h. */
16579_ACEOF
16580cat confdefs.h >>conftest.$ac_ext
16581cat >>conftest.$ac_ext <<_ACEOF
16582/* end confdefs.h. */
c0d27fcc
MR
16583$ac_includes_default
16584#include <locale.h>
16585_ACEOF
16586rm -f conftest.$ac_objext
ca81d7a0
JD
16587if { (ac_try="$ac_compile"
16588case "(($ac_try" in
16589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16590 *) ac_try_echo=$ac_try;;
16591esac
16592eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16593 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16594 ac_status=$?
edfaf76d
LK
16595 grep -v '^ *+' conftest.er1 >conftest.err
16596 rm -f conftest.er1
16597 cat conftest.err >&5
c0d27fcc 16598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16599 (exit $ac_status); } && {
16600 test -z "$ac_c_werror_flag" ||
16601 test ! -s conftest.err
16602 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16603 ac_header_compiler=yes
16604else
16605 echo "$as_me: failed program was:" >&5
19650fd6
AS
16606sed 's/^/| /' conftest.$ac_ext >&5
16607
ca81d7a0 16608 ac_header_compiler=no
c0d27fcc 16609fi
ca81d7a0
JD
16610
16611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16612{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16613echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16614
16615# Is the header present?
ca81d7a0
JD
16616{ echo "$as_me:$LINENO: checking locale.h presence" >&5
16617echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 16618cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16619/* confdefs.h. */
16620_ACEOF
16621cat confdefs.h >>conftest.$ac_ext
16622cat >>conftest.$ac_ext <<_ACEOF
16623/* end confdefs.h. */
98418dba 16624#include <locale.h>
503d2be0 16625_ACEOF
ca81d7a0
JD
16626if { (ac_try="$ac_cpp conftest.$ac_ext"
16627case "(($ac_try" in
16628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16629 *) ac_try_echo=$ac_try;;
16630esac
16631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16632 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16633 ac_status=$?
6bae0ccf 16634 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16635 rm -f conftest.er1
16636 cat conftest.err >&5
c0d27fcc 16637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16638 (exit $ac_status); } >/dev/null && {
16639 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16640 test ! -s conftest.err
16641 }; then
c0d27fcc 16642 ac_header_preproc=yes
98418dba
CW
16643else
16644 echo "$as_me: failed program was:" >&5
19650fd6
AS
16645sed 's/^/| /' conftest.$ac_ext >&5
16646
c0d27fcc 16647 ac_header_preproc=no
ba4481b5 16648fi
ca81d7a0 16649
98418dba 16650rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16651{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16652echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16653
16654# So? What about this header?
edfaf76d
LK
16655case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16656 yes:no: )
c0d27fcc
MR
16657 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
16658echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16659 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
16660echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
16661 ac_header_preproc=yes
19650fd6 16662 ;;
edfaf76d 16663 no:yes:* )
c0d27fcc
MR
16664 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
16665echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16666 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
16667echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
16668 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
16669echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
16670 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
16671echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16672 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 16673echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16674 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
16675echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16676
19650fd6 16677 ;;
c0d27fcc 16678esac
ca81d7a0
JD
16679{ echo "$as_me:$LINENO: checking for locale.h" >&5
16680echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
16681if test "${ac_cv_header_locale_h+set}" = set; then
16682 echo $ECHO_N "(cached) $ECHO_C" >&6
16683else
16684 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 16685fi
ca81d7a0
JD
16686{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
16687echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 16688
c0d27fcc
MR
16689fi
16690
16691
16692
98418dba 16693for ac_func in setlocale
ba4481b5 16694do
503d2be0 16695as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16696{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16697echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16698if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16699 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16700else
503d2be0 16701 cat >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. */
edfaf76d
LK
16707/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16708 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16709#define $ac_func innocuous_$ac_func
16710
ba4481b5 16711/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16712 which can conflict with char $ac_func (); below.
16713 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16714 <limits.h> exists even on freestanding compilers. */
edfaf76d 16715
19650fd6
AS
16716#ifdef __STDC__
16717# include <limits.h>
16718#else
16719# include <assert.h>
16720#endif
edfaf76d
LK
16721
16722#undef $ac_func
16723
ca81d7a0
JD
16724/* Override any GCC internal prototype to avoid an error.
16725 Use char because int might match the return type of a GCC
16726 builtin and then its argument prototype would still apply. */
503d2be0
AS
16727#ifdef __cplusplus
16728extern "C"
16729#endif
503d2be0 16730char $ac_func ();
ba4481b5
DL
16731/* The GNU C library defines this for functions which it implements
16732 to always fail with ENOSYS. Some functions are actually named
16733 something starting with __ and the normal name is an alias. */
ca81d7a0 16734#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 16735choke me
ba4481b5
DL
16736#endif
16737
19650fd6
AS
16738int
16739main ()
16740{
ca81d7a0 16741return $ac_func ();
503d2be0
AS
16742 ;
16743 return 0;
16744}
16745_ACEOF
16746rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16747if { (ac_try="$ac_link"
16748case "(($ac_try" in
16749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16750 *) ac_try_echo=$ac_try;;
16751esac
16752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16753 (eval "$ac_link") 2>conftest.er1
503d2be0 16754 ac_status=$?
edfaf76d
LK
16755 grep -v '^ *+' conftest.er1 >conftest.err
16756 rm -f conftest.er1
16757 cat conftest.err >&5
c0d27fcc 16758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16759 (exit $ac_status); } && {
16760 test -z "$ac_c_werror_flag" ||
16761 test ! -s conftest.err
16762 } && test -s conftest$ac_exeext &&
16763 $as_test_x conftest$ac_exeext; then
503d2be0
AS
16764 eval "$as_ac_var=yes"
16765else
16766 echo "$as_me: failed program was:" >&5
19650fd6
AS
16767sed 's/^/| /' conftest.$ac_ext >&5
16768
ca81d7a0 16769 eval "$as_ac_var=no"
503d2be0 16770fi
ca81d7a0 16771
f053c89f 16772rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16773 conftest$ac_exeext conftest.$ac_ext
503d2be0 16774fi
ca81d7a0
JD
16775ac_res=`eval echo '${'$as_ac_var'}'`
16776 { echo "$as_me:$LINENO: result: $ac_res" >&5
16777echo "${ECHO_T}$ac_res" >&6; }
503d2be0 16778if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16779 cat >>confdefs.h <<_ACEOF
503d2be0 16780#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16781_ACEOF
ba4481b5 16782
ba4481b5
DL
16783fi
16784done
16785
c0d27fcc 16786
98418dba
CW
16787# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
16788# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
16789# Irix 4.0.5F has the header but not the library.
16790if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
16791 ac_have_func=yes
16792
c0d27fcc 16793cat >>confdefs.h <<\_ACEOF
98418dba 16794#define SVR4 1
c0d27fcc 16795_ACEOF
98418dba
CW
16796
16797fi
16798
16799if test $ac_have_func = no; then
c0d27fcc 16800 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
ca81d7a0
JD
16801 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
16802echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 16803if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 16804 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16805fi
ca81d7a0
JD
16806{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
16807echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 16808else
c0d27fcc 16809 # Is the header compilable?
ca81d7a0
JD
16810{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
16811echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 16812cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16813/* confdefs.h. */
16814_ACEOF
16815cat confdefs.h >>conftest.$ac_ext
16816cat >>conftest.$ac_ext <<_ACEOF
16817/* end confdefs.h. */
c0d27fcc
MR
16818$ac_includes_default
16819#include <inq_stats/cpustats.h>
16820_ACEOF
16821rm -f conftest.$ac_objext
ca81d7a0
JD
16822if { (ac_try="$ac_compile"
16823case "(($ac_try" in
16824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16825 *) ac_try_echo=$ac_try;;
16826esac
16827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16828 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16829 ac_status=$?
edfaf76d
LK
16830 grep -v '^ *+' conftest.er1 >conftest.err
16831 rm -f conftest.er1
16832 cat conftest.err >&5
c0d27fcc 16833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16834 (exit $ac_status); } && {
16835 test -z "$ac_c_werror_flag" ||
16836 test ! -s conftest.err
16837 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16838 ac_header_compiler=yes
16839else
16840 echo "$as_me: failed program was:" >&5
19650fd6
AS
16841sed 's/^/| /' conftest.$ac_ext >&5
16842
ca81d7a0 16843 ac_header_compiler=no
c0d27fcc 16844fi
ca81d7a0
JD
16845
16846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16847{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16848echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16849
16850# Is the header present?
ca81d7a0
JD
16851{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
16852echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 16853cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16854/* confdefs.h. */
16855_ACEOF
16856cat confdefs.h >>conftest.$ac_ext
16857cat >>conftest.$ac_ext <<_ACEOF
16858/* end confdefs.h. */
98418dba 16859#include <inq_stats/cpustats.h>
503d2be0 16860_ACEOF
ca81d7a0
JD
16861if { (ac_try="$ac_cpp conftest.$ac_ext"
16862case "(($ac_try" in
16863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16864 *) ac_try_echo=$ac_try;;
16865esac
16866eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16867 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16868 ac_status=$?
6bae0ccf 16869 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16870 rm -f conftest.er1
16871 cat conftest.err >&5
c0d27fcc 16872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16873 (exit $ac_status); } >/dev/null && {
16874 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16875 test ! -s conftest.err
16876 }; then
c0d27fcc 16877 ac_header_preproc=yes
503d2be0
AS
16878else
16879 echo "$as_me: failed program was:" >&5
19650fd6
AS
16880sed 's/^/| /' conftest.$ac_ext >&5
16881
c0d27fcc 16882 ac_header_preproc=no
ba4481b5 16883fi
ca81d7a0 16884
503d2be0 16885rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16886{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16887echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16888
16889# So? What about this header?
edfaf76d
LK
16890case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16891 yes:no: )
c0d27fcc
MR
16892 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
16893echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16894 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
16895echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
16896 ac_header_preproc=yes
19650fd6 16897 ;;
edfaf76d 16898 no:yes:* )
c0d27fcc
MR
16899 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
16900echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16901 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
16902echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
16903 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
16904echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
16905 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
16906echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16907 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 16908echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16909 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
16910echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16911
19650fd6 16912 ;;
c0d27fcc 16913esac
ca81d7a0
JD
16914{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
16915echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
16916if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
16917 echo $ECHO_N "(cached) $ECHO_C" >&6
16918else
16919 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 16920fi
ca81d7a0
JD
16921{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
16922echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
16923
16924fi
98418dba
CW
16925if test $ac_cv_header_inq_stats_cpustats_h = yes; then
16926 ac_have_func=yes
ba4481b5 16927
c0d27fcc 16928cat >>confdefs.h <<\_ACEOF
98418dba 16929#define UMAX 1
c0d27fcc 16930_ACEOF
98418dba 16931
c0d27fcc
MR
16932
16933cat >>confdefs.h <<\_ACEOF
98418dba 16934#define UMAX4_3 1
c0d27fcc 16935_ACEOF
98418dba
CW
16936
16937fi
16938
c0d27fcc 16939
98418dba
CW
16940fi
16941
16942if test $ac_have_func = no; then
c0d27fcc 16943 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
ca81d7a0
JD
16944 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
16945echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 16946if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 16947 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16948fi
ca81d7a0
JD
16949{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
16950echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 16951else
c0d27fcc 16952 # Is the header compilable?
ca81d7a0
JD
16953{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
16954echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 16955cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16956/* confdefs.h. */
16957_ACEOF
16958cat confdefs.h >>conftest.$ac_ext
16959cat >>conftest.$ac_ext <<_ACEOF
16960/* end confdefs.h. */
c0d27fcc
MR
16961$ac_includes_default
16962#include <sys/cpustats.h>
16963_ACEOF
16964rm -f conftest.$ac_objext
ca81d7a0
JD
16965if { (ac_try="$ac_compile"
16966case "(($ac_try" in
16967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16968 *) ac_try_echo=$ac_try;;
16969esac
16970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16971 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16972 ac_status=$?
edfaf76d
LK
16973 grep -v '^ *+' conftest.er1 >conftest.err
16974 rm -f conftest.er1
16975 cat conftest.err >&5
c0d27fcc 16976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16977 (exit $ac_status); } && {
16978 test -z "$ac_c_werror_flag" ||
16979 test ! -s conftest.err
16980 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16981 ac_header_compiler=yes
16982else
16983 echo "$as_me: failed program was:" >&5
19650fd6
AS
16984sed 's/^/| /' conftest.$ac_ext >&5
16985
ca81d7a0 16986 ac_header_compiler=no
c0d27fcc 16987fi
ca81d7a0
JD
16988
16989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16990{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16991echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16992
16993# Is the header present?
ca81d7a0
JD
16994{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
16995echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 16996cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16997/* confdefs.h. */
16998_ACEOF
16999cat confdefs.h >>conftest.$ac_ext
17000cat >>conftest.$ac_ext <<_ACEOF
17001/* end confdefs.h. */
98418dba
CW
17002#include <sys/cpustats.h>
17003_ACEOF
ca81d7a0
JD
17004if { (ac_try="$ac_cpp conftest.$ac_ext"
17005case "(($ac_try" in
17006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17007 *) ac_try_echo=$ac_try;;
17008esac
17009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17010 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17011 ac_status=$?
6bae0ccf 17012 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17013 rm -f conftest.er1
17014 cat conftest.err >&5
c0d27fcc 17015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17016 (exit $ac_status); } >/dev/null && {
17017 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17018 test ! -s conftest.err
17019 }; then
c0d27fcc 17020 ac_header_preproc=yes
98418dba
CW
17021else
17022 echo "$as_me: failed program was:" >&5
19650fd6
AS
17023sed 's/^/| /' conftest.$ac_ext >&5
17024
c0d27fcc 17025 ac_header_preproc=no
98418dba 17026fi
ca81d7a0 17027
98418dba 17028rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17029{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17030echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17031
17032# So? What about this header?
edfaf76d
LK
17033case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17034 yes:no: )
c0d27fcc
MR
17035 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
17036echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17037 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
17038echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
17039 ac_header_preproc=yes
19650fd6 17040 ;;
edfaf76d 17041 no:yes:* )
c0d27fcc
MR
17042 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
17043echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17044 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
17045echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
17046 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
17047echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
17048 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
17049echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17050 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 17051echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17052 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
17053echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17054
19650fd6 17055 ;;
c0d27fcc 17056esac
ca81d7a0
JD
17057{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
17058echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
17059if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
17060 echo $ECHO_N "(cached) $ECHO_C" >&6
17061else
17062 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 17063fi
ca81d7a0
JD
17064{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
17065echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
17066
17067fi
98418dba 17068if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 17069 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 17070#define UMAX 1
c0d27fcc 17071_ACEOF
ba4481b5 17072
98418dba
CW
17073fi
17074
c0d27fcc 17075
98418dba
CW
17076fi
17077
17078if test $ac_have_func = no; then
17079
17080for ac_header in mach/mach.h
2c9dccc9
PJ
17081do
17082as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
17083if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17084 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17085echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17086if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 17087 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17088fi
ca81d7a0
JD
17089ac_res=`eval echo '${'$as_ac_Header'}'`
17090 { echo "$as_me:$LINENO: result: $ac_res" >&5
17091echo "${ECHO_T}$ac_res" >&6; }
98418dba 17092else
c0d27fcc 17093 # Is the header compilable?
ca81d7a0
JD
17094{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17095echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 17096cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17097/* confdefs.h. */
17098_ACEOF
17099cat confdefs.h >>conftest.$ac_ext
17100cat >>conftest.$ac_ext <<_ACEOF
17101/* end confdefs.h. */
c0d27fcc
MR
17102$ac_includes_default
17103#include <$ac_header>
17104_ACEOF
17105rm -f conftest.$ac_objext
ca81d7a0
JD
17106if { (ac_try="$ac_compile"
17107case "(($ac_try" in
17108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17109 *) ac_try_echo=$ac_try;;
17110esac
17111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17112 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17113 ac_status=$?
edfaf76d
LK
17114 grep -v '^ *+' conftest.er1 >conftest.err
17115 rm -f conftest.er1
17116 cat conftest.err >&5
c0d27fcc 17117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17118 (exit $ac_status); } && {
17119 test -z "$ac_c_werror_flag" ||
17120 test ! -s conftest.err
17121 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17122 ac_header_compiler=yes
17123else
17124 echo "$as_me: failed program was:" >&5
19650fd6
AS
17125sed 's/^/| /' conftest.$ac_ext >&5
17126
ca81d7a0 17127 ac_header_compiler=no
c0d27fcc 17128fi
ca81d7a0
JD
17129
17130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17131{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17132echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17133
17134# Is the header present?
ca81d7a0
JD
17135{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
17136echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 17137cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17138/* confdefs.h. */
17139_ACEOF
17140cat confdefs.h >>conftest.$ac_ext
17141cat >>conftest.$ac_ext <<_ACEOF
17142/* end confdefs.h. */
2c9dccc9
PJ
17143#include <$ac_header>
17144_ACEOF
ca81d7a0
JD
17145if { (ac_try="$ac_cpp conftest.$ac_ext"
17146case "(($ac_try" in
17147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17148 *) ac_try_echo=$ac_try;;
17149esac
17150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17151 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 17152 ac_status=$?
6bae0ccf 17153 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
17154 rm -f conftest.er1
17155 cat conftest.err >&5
c0d27fcc 17156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17157 (exit $ac_status); } >/dev/null && {
17158 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17159 test ! -s conftest.err
17160 }; then
c0d27fcc
MR
17161 ac_header_preproc=yes
17162else
17163 echo "$as_me: failed program was:" >&5
19650fd6
AS
17164sed 's/^/| /' conftest.$ac_ext >&5
17165
c0d27fcc
MR
17166 ac_header_preproc=no
17167fi
ca81d7a0 17168
c0d27fcc 17169rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17170{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17171echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17172
17173# So? What about this header?
edfaf76d
LK
17174case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17175 yes:no: )
c0d27fcc
MR
17176 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17177echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17178 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17179echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17180 ac_header_preproc=yes
19650fd6 17181 ;;
edfaf76d 17182 no:yes:* )
c0d27fcc
MR
17183 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17184echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
17185 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17186echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17187 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17188echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17189 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17190echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17191 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 17192echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17193 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17194echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17195
19650fd6 17196 ;;
c0d27fcc 17197esac
ca81d7a0
JD
17198{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17199echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17200if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17201 echo $ECHO_N "(cached) $ECHO_C" >&6
17202else
edfaf76d 17203 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 17204fi
ca81d7a0
JD
17205ac_res=`eval echo '${'$as_ac_Header'}'`
17206 { echo "$as_me:$LINENO: result: $ac_res" >&5
17207echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17208
17209fi
17210if test `eval echo '${'$as_ac_Header'}'` = yes; then
17211 cat >>confdefs.h <<_ACEOF
17212#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17213_ACEOF
17214
17215fi
17216
17217done
17218
17219fi
17220
17221
17222for ac_header in nlist.h
17223do
17224as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
17225if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17226 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17227echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17228if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17229 echo $ECHO_N "(cached) $ECHO_C" >&6
17230fi
ca81d7a0
JD
17231ac_res=`eval echo '${'$as_ac_Header'}'`
17232 { echo "$as_me:$LINENO: result: $ac_res" >&5
17233echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17234else
17235 # Is the header compilable?
ca81d7a0
JD
17236{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17237echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 17238cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17239/* confdefs.h. */
17240_ACEOF
17241cat confdefs.h >>conftest.$ac_ext
17242cat >>conftest.$ac_ext <<_ACEOF
17243/* end confdefs.h. */
c0d27fcc
MR
17244$ac_includes_default
17245#include <$ac_header>
17246_ACEOF
17247rm -f conftest.$ac_objext
ca81d7a0
JD
17248if { (ac_try="$ac_compile"
17249case "(($ac_try" in
17250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17251 *) ac_try_echo=$ac_try;;
17252esac
17253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17254 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17255 ac_status=$?
edfaf76d
LK
17256 grep -v '^ *+' conftest.er1 >conftest.err
17257 rm -f conftest.er1
17258 cat conftest.err >&5
c0d27fcc 17259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17260 (exit $ac_status); } && {
17261 test -z "$ac_c_werror_flag" ||
17262 test ! -s conftest.err
17263 } && test -s conftest.$ac_objext; then
c0d27fcc 17264 ac_header_compiler=yes
2c9dccc9
PJ
17265else
17266 echo "$as_me: failed program was:" >&5
19650fd6
AS
17267sed 's/^/| /' conftest.$ac_ext >&5
17268
ca81d7a0 17269 ac_header_compiler=no
98418dba 17270fi
ca81d7a0
JD
17271
17272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17273{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17274echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 17275
c0d27fcc 17276# Is the header present?
ca81d7a0
JD
17277{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
17278echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 17279cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17280/* confdefs.h. */
17281_ACEOF
17282cat confdefs.h >>conftest.$ac_ext
17283cat >>conftest.$ac_ext <<_ACEOF
17284/* end confdefs.h. */
503d2be0
AS
17285#include <$ac_header>
17286_ACEOF
ca81d7a0
JD
17287if { (ac_try="$ac_cpp conftest.$ac_ext"
17288case "(($ac_try" in
17289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17290 *) ac_try_echo=$ac_try;;
17291esac
17292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17293 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17294 ac_status=$?
6bae0ccf 17295 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17296 rm -f conftest.er1
17297 cat conftest.err >&5
c0d27fcc 17298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17299 (exit $ac_status); } >/dev/null && {
17300 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17301 test ! -s conftest.err
17302 }; then
c0d27fcc 17303 ac_header_preproc=yes
503d2be0
AS
17304else
17305 echo "$as_me: failed program was:" >&5
19650fd6
AS
17306sed 's/^/| /' conftest.$ac_ext >&5
17307
c0d27fcc 17308 ac_header_preproc=no
b5de8dc0 17309fi
ca81d7a0 17310
503d2be0 17311rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17312{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17313echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17314
17315# So? What about this header?
edfaf76d
LK
17316case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17317 yes:no: )
c0d27fcc
MR
17318 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17319echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17320 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17321echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17322 ac_header_preproc=yes
19650fd6 17323 ;;
edfaf76d 17324 no:yes:* )
c0d27fcc
MR
17325 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17326echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
17327 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17328echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17329 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17330echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17331 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17332echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17333 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 17334echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17335 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17336echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17337
19650fd6 17338 ;;
c0d27fcc 17339esac
ca81d7a0
JD
17340{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17341echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17342if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17343 echo $ECHO_N "(cached) $ECHO_C" >&6
17344else
edfaf76d 17345 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 17346fi
ca81d7a0
JD
17347ac_res=`eval echo '${'$as_ac_Header'}'`
17348 { echo "$as_me:$LINENO: result: $ac_res" >&5
17349echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17350
17351fi
98418dba 17352if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 17353 cat >>confdefs.h <<_ACEOF
98418dba 17354#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 17355_ACEOF
ca81d7a0
JD
17356 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
17357echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 17358if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 17359 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 17360else
503d2be0 17361 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17362/* confdefs.h. */
17363_ACEOF
17364cat confdefs.h >>conftest.$ac_ext
17365cat >>conftest.$ac_ext <<_ACEOF
17366/* end confdefs.h. */
98418dba 17367#include <nlist.h>
b5de8dc0 17368
503d2be0
AS
17369int
17370main ()
17371{
98418dba
CW
17372static struct nlist ac_aggr;
17373if (ac_aggr.n_un.n_name)
17374return 0;
503d2be0
AS
17375 ;
17376 return 0;
17377}
17378_ACEOF
98418dba 17379rm -f conftest.$ac_objext
ca81d7a0
JD
17380if { (ac_try="$ac_compile"
17381case "(($ac_try" in
17382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17383 *) ac_try_echo=$ac_try;;
17384esac
17385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17386 (eval "$ac_compile") 2>conftest.er1
503d2be0 17387 ac_status=$?
edfaf76d
LK
17388 grep -v '^ *+' conftest.er1 >conftest.err
17389 rm -f conftest.er1
17390 cat conftest.err >&5
c0d27fcc 17391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17392 (exit $ac_status); } && {
17393 test -z "$ac_c_werror_flag" ||
17394 test ! -s conftest.err
17395 } && test -s conftest.$ac_objext; then
edfaf76d 17396 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
17397else
17398 echo "$as_me: failed program was:" >&5
19650fd6
AS
17399sed 's/^/| /' conftest.$ac_ext >&5
17400
ca81d7a0 17401 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17402/* confdefs.h. */
17403_ACEOF
17404cat confdefs.h >>conftest.$ac_ext
17405cat >>conftest.$ac_ext <<_ACEOF
17406/* end confdefs.h. */
6bae0ccf
DL
17407#include <nlist.h>
17408
17409int
17410main ()
17411{
17412static struct nlist ac_aggr;
17413if (sizeof ac_aggr.n_un.n_name)
17414return 0;
17415 ;
17416 return 0;
17417}
17418_ACEOF
17419rm -f conftest.$ac_objext
ca81d7a0
JD
17420if { (ac_try="$ac_compile"
17421case "(($ac_try" in
17422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17423 *) ac_try_echo=$ac_try;;
17424esac
17425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17426 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 17427 ac_status=$?
edfaf76d
LK
17428 grep -v '^ *+' conftest.er1 >conftest.err
17429 rm -f conftest.er1
17430 cat conftest.err >&5
6bae0ccf 17431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17432 (exit $ac_status); } && {
17433 test -z "$ac_c_werror_flag" ||
17434 test ! -s conftest.err
17435 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
17436 ac_cv_member_struct_nlist_n_un_n_name=yes
17437else
17438 echo "$as_me: failed program was:" >&5
19650fd6
AS
17439sed 's/^/| /' conftest.$ac_ext >&5
17440
ca81d7a0 17441 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 17442fi
ca81d7a0
JD
17443
17444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 17445fi
ca81d7a0
JD
17446
17447rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 17448fi
ca81d7a0
JD
17449{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
17450echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 17451if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 17452
c0d27fcc 17453cat >>confdefs.h <<_ACEOF
98418dba 17454#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 17455_ACEOF
b5de8dc0 17456
c0d27fcc
MR
17457
17458cat >>confdefs.h <<\_ACEOF
98418dba 17459#define NLIST_NAME_UNION 1
c0d27fcc 17460_ACEOF
b5de8dc0 17461
98418dba 17462fi
b5de8dc0 17463
c0d27fcc 17464
98418dba 17465fi
c0d27fcc 17466
98418dba 17467done
b5de8dc0 17468
98418dba
CW
17469fi
17470done
b5de8dc0 17471
c0d27fcc 17472
98418dba 17473# Some definitions of getloadavg require that the program be installed setgid.
ca81d7a0
JD
17474{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
17475echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
17476if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
17477 echo $ECHO_N "(cached) $ECHO_C" >&6
17478else
17479 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17480/* confdefs.h. */
17481_ACEOF
17482cat confdefs.h >>conftest.$ac_ext
17483cat >>conftest.$ac_ext <<_ACEOF
17484/* end confdefs.h. */
6bae0ccf 17485#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
17486#ifdef LDAV_PRIVILEGED
17487Yowza Am I SETGID yet
17488#endif
17489_ACEOF
17490if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 17491 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
17492 ac_cv_func_getloadavg_setgid=yes
17493else
17494 ac_cv_func_getloadavg_setgid=no
17495fi
17496rm -f conftest*
b5de8dc0 17497
98418dba 17498fi
ca81d7a0
JD
17499{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
17500echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
17501if test $ac_cv_func_getloadavg_setgid = yes; then
17502 NEED_SETGID=true
b5de8dc0 17503
c0d27fcc 17504cat >>confdefs.h <<\_ACEOF
98418dba 17505#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 17506_ACEOF
98418dba 17507
b5de8dc0 17508else
98418dba 17509 NEED_SETGID=false
b5de8dc0 17510fi
98418dba
CW
17511
17512if test $ac_cv_func_getloadavg_setgid = yes; then
ca81d7a0
JD
17513 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
17514echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
17515if test "${ac_cv_group_kmem+set}" = set; then
17516 echo $ECHO_N "(cached) $ECHO_C" >&6
17517else
17518 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
17519 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
17520 # If we got an error (system does not support symlinks), try without -L.
17521 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
17522 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 17523 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
17524 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
17525 / /s/.* //;p;'`
17526
b5de8dc0 17527fi
ca81d7a0
JD
17528{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
17529echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 17530 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 17531fi
98418dba
CW
17532if test "x$ac_save_LIBS" = x; then
17533 GETLOADAVG_LIBS=$LIBS
17534else
17535 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 17536fi
98418dba 17537LIBS=$ac_save_LIBS
b5de8dc0 17538
c0d27fcc
MR
17539
17540
ca81d7a0
JD
17541{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
17542echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 17543if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 17544 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17545else
b936fae4 17546 while :; do
503d2be0 17547 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17548/* confdefs.h. */
17549_ACEOF
17550cat confdefs.h >>conftest.$ac_ext
17551cat >>conftest.$ac_ext <<_ACEOF
17552/* end confdefs.h. */
b936fae4 17553#include <stdio.h>
503d2be0
AS
17554int
17555main ()
17556{
f053c89f 17557return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
17558 ;
17559 return 0;
17560}
17561_ACEOF
f053c89f
CY
17562rm -f conftest.$ac_objext conftest$ac_exeext
17563if { (ac_try="$ac_link"
ca81d7a0
JD
17564case "(($ac_try" in
17565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17566 *) ac_try_echo=$ac_try;;
17567esac
17568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 17569 (eval "$ac_link") 2>conftest.er1
b936fae4 17570 ac_status=$?
edfaf76d
LK
17571 grep -v '^ *+' conftest.er1 >conftest.err
17572 rm -f conftest.er1
17573 cat conftest.err >&5
c0d27fcc 17574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17575 (exit $ac_status); } && {
17576 test -z "$ac_c_werror_flag" ||
17577 test ! -s conftest.err
17578 } && test -s conftest$ac_exeext &&
17579 $as_test_x conftest$ac_exeext; then
17580 ac_cv_sys_largefile_source=no; break
b936fae4
AS
17581else
17582 echo "$as_me: failed program was:" >&5
19650fd6
AS
17583sed 's/^/| /' conftest.$ac_ext >&5
17584
ca81d7a0 17585
b936fae4 17586fi
ca81d7a0 17587
f053c89f
CY
17588rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17589 conftest$ac_exeext conftest.$ac_ext
b936fae4 17590 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17591/* confdefs.h. */
17592_ACEOF
17593cat confdefs.h >>conftest.$ac_ext
17594cat >>conftest.$ac_ext <<_ACEOF
17595/* end confdefs.h. */
b936fae4
AS
17596#define _LARGEFILE_SOURCE 1
17597#include <stdio.h>
b936fae4
AS
17598int
17599main ()
17600{
f053c89f 17601return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
17602 ;
17603 return 0;
17604}
17605_ACEOF
f053c89f
CY
17606rm -f conftest.$ac_objext conftest$ac_exeext
17607if { (ac_try="$ac_link"
ca81d7a0
JD
17608case "(($ac_try" in
17609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17610 *) ac_try_echo=$ac_try;;
17611esac
17612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 17613 (eval "$ac_link") 2>conftest.er1
b936fae4 17614 ac_status=$?
edfaf76d
LK
17615 grep -v '^ *+' conftest.er1 >conftest.err
17616 rm -f conftest.er1
17617 cat conftest.err >&5
c0d27fcc 17618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17619 (exit $ac_status); } && {
17620 test -z "$ac_c_werror_flag" ||
17621 test ! -s conftest.err
17622 } && test -s conftest$ac_exeext &&
17623 $as_test_x conftest$ac_exeext; then
b936fae4
AS
17624 ac_cv_sys_largefile_source=1; break
17625else
17626 echo "$as_me: failed program was:" >&5
19650fd6
AS
17627sed 's/^/| /' conftest.$ac_ext >&5
17628
ca81d7a0 17629
b936fae4 17630fi
ca81d7a0 17631
f053c89f
CY
17632rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17633 conftest$ac_exeext conftest.$ac_ext
17634 ac_cv_sys_largefile_source=unknown
b936fae4
AS
17635 break
17636done
17637fi
ca81d7a0
JD
17638{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
17639echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
17640case $ac_cv_sys_largefile_source in #(
17641 no | unknown) ;;
17642 *)
c0d27fcc 17643cat >>confdefs.h <<_ACEOF
b936fae4 17644#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 17645_ACEOF
f053c89f
CY
17646;;
17647esac
b936fae4 17648rm -f conftest*
4c343001 17649
b936fae4
AS
17650# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
17651# in glibc 2.1.3, but that breaks too many other things.
17652# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
f053c89f 17653if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 17654
c0d27fcc 17655cat >>confdefs.h <<\_ACEOF
b936fae4 17656#define HAVE_FSEEKO 1
c0d27fcc 17657_ACEOF
b936fae4 17658
4c343001
DL
17659fi
17660
c0d27fcc 17661
52dbaac8
PE
17662# Configure getopt.
17663# getopt.m4 serial 10
17664
17665# The getopt module assume you want GNU getopt, with getopt_long etc,
17666# rather than vanilla POSIX getopt. This means your your code should
17667# always include <getopt.h> for the getopt prototypes.
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679# Prerequisites of lib/getopt*.
17680
17681
17682
10a3b1a1 17683
52dbaac8
PE
17684 GETOPT_H=
17685
17686for ac_header in getopt.h
17687do
17688as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
17689if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17690 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17691echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17692if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
17693 echo $ECHO_N "(cached) $ECHO_C" >&6
17694fi
ca81d7a0
JD
17695ac_res=`eval echo '${'$as_ac_Header'}'`
17696 { echo "$as_me:$LINENO: result: $ac_res" >&5
17697echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
17698else
17699 # Is the header compilable?
ca81d7a0
JD
17700{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17701echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
17702cat >conftest.$ac_ext <<_ACEOF
17703/* confdefs.h. */
17704_ACEOF
17705cat confdefs.h >>conftest.$ac_ext
17706cat >>conftest.$ac_ext <<_ACEOF
17707/* end confdefs.h. */
17708$ac_includes_default
17709#include <$ac_header>
17710_ACEOF
17711rm -f conftest.$ac_objext
ca81d7a0
JD
17712if { (ac_try="$ac_compile"
17713case "(($ac_try" in
17714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17715 *) ac_try_echo=$ac_try;;
17716esac
17717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17718 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
17719 ac_status=$?
17720 grep -v '^ *+' conftest.er1 >conftest.err
17721 rm -f conftest.er1
17722 cat conftest.err >&5
17723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17724 (exit $ac_status); } && {
17725 test -z "$ac_c_werror_flag" ||
17726 test ! -s conftest.err
17727 } && test -s conftest.$ac_objext; then
52dbaac8
PE
17728 ac_header_compiler=yes
17729else
17730 echo "$as_me: failed program was:" >&5
17731sed 's/^/| /' conftest.$ac_ext >&5
17732
ca81d7a0 17733 ac_header_compiler=no
52dbaac8 17734fi
ca81d7a0
JD
17735
17736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17737{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17738echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
17739
17740# Is the header present?
ca81d7a0
JD
17741{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
17742echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
17743cat >conftest.$ac_ext <<_ACEOF
17744/* confdefs.h. */
17745_ACEOF
17746cat confdefs.h >>conftest.$ac_ext
17747cat >>conftest.$ac_ext <<_ACEOF
17748/* end confdefs.h. */
17749#include <$ac_header>
17750_ACEOF
ca81d7a0
JD
17751if { (ac_try="$ac_cpp conftest.$ac_ext"
17752case "(($ac_try" in
17753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17754 *) ac_try_echo=$ac_try;;
17755esac
17756eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17757 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
17758 ac_status=$?
17759 grep -v '^ *+' conftest.er1 >conftest.err
17760 rm -f conftest.er1
17761 cat conftest.err >&5
17762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17763 (exit $ac_status); } >/dev/null && {
17764 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17765 test ! -s conftest.err
17766 }; then
52dbaac8
PE
17767 ac_header_preproc=yes
17768else
17769 echo "$as_me: failed program was:" >&5
17770sed 's/^/| /' conftest.$ac_ext >&5
17771
17772 ac_header_preproc=no
17773fi
ca81d7a0 17774
52dbaac8 17775rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17776{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17777echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
17778
17779# So? What about this header?
17780case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17781 yes:no: )
17782 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17783echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
17784 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17785echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17786 ac_header_preproc=yes
17787 ;;
17788 no:yes:* )
17789 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17790echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
17791 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17792echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17793 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17794echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17795 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17796echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
17797 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
17798echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
17799 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17800echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17801
52dbaac8
PE
17802 ;;
17803esac
ca81d7a0
JD
17804{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17805echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17806if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
17807 echo $ECHO_N "(cached) $ECHO_C" >&6
17808else
17809 eval "$as_ac_Header=\$ac_header_preproc"
17810fi
ca81d7a0
JD
17811ac_res=`eval echo '${'$as_ac_Header'}'`
17812 { echo "$as_me:$LINENO: result: $ac_res" >&5
17813echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
17814
17815fi
17816if test `eval echo '${'$as_ac_Header'}'` = yes; then
17817 cat >>confdefs.h <<_ACEOF
17818#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17819_ACEOF
17820
17821else
17822 GETOPT_H=getopt.h
17823fi
17824
17825done
17826
17827 if test -z "$GETOPT_H"; then
17828
17829for ac_func in getopt_long_only
17830do
17831as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17832{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17833echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17834if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
17835 echo $ECHO_N "(cached) $ECHO_C" >&6
17836else
17837 cat >conftest.$ac_ext <<_ACEOF
17838/* confdefs.h. */
17839_ACEOF
17840cat confdefs.h >>conftest.$ac_ext
17841cat >>conftest.$ac_ext <<_ACEOF
17842/* end confdefs.h. */
17843/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17844 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17845#define $ac_func innocuous_$ac_func
17846
17847/* System header to define __stub macros and hopefully few prototypes,
17848 which can conflict with char $ac_func (); below.
17849 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17850 <limits.h> exists even on freestanding compilers. */
17851
17852#ifdef __STDC__
17853# include <limits.h>
17854#else
17855# include <assert.h>
17856#endif
17857
17858#undef $ac_func
17859
ca81d7a0
JD
17860/* Override any GCC internal prototype to avoid an error.
17861 Use char because int might match the return type of a GCC
17862 builtin and then its argument prototype would still apply. */
52dbaac8
PE
17863#ifdef __cplusplus
17864extern "C"
52dbaac8 17865#endif
52dbaac8
PE
17866char $ac_func ();
17867/* The GNU C library defines this for functions which it implements
17868 to always fail with ENOSYS. Some functions are actually named
17869 something starting with __ and the normal name is an alias. */
ca81d7a0 17870#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 17871choke me
52dbaac8
PE
17872#endif
17873
17874int
17875main ()
17876{
ca81d7a0 17877return $ac_func ();
52dbaac8
PE
17878 ;
17879 return 0;
17880}
17881_ACEOF
17882rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17883if { (ac_try="$ac_link"
17884case "(($ac_try" in
17885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17886 *) ac_try_echo=$ac_try;;
17887esac
17888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17889 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
17890 ac_status=$?
17891 grep -v '^ *+' conftest.er1 >conftest.err
17892 rm -f conftest.er1
17893 cat conftest.err >&5
17894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17895 (exit $ac_status); } && {
17896 test -z "$ac_c_werror_flag" ||
17897 test ! -s conftest.err
17898 } && test -s conftest$ac_exeext &&
17899 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
17900 eval "$as_ac_var=yes"
17901else
17902 echo "$as_me: failed program was:" >&5
17903sed 's/^/| /' conftest.$ac_ext >&5
17904
ca81d7a0 17905 eval "$as_ac_var=no"
52dbaac8 17906fi
ca81d7a0 17907
f053c89f 17908rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
17909 conftest$ac_exeext conftest.$ac_ext
17910fi
ca81d7a0
JD
17911ac_res=`eval echo '${'$as_ac_var'}'`
17912 { echo "$as_me:$LINENO: result: $ac_res" >&5
17913echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
17914if test `eval echo '${'$as_ac_var'}'` = yes; then
17915 cat >>confdefs.h <<_ACEOF
17916#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17917_ACEOF
17918
17919else
17920 GETOPT_H=getopt.h
17921fi
17922done
17923
17924 fi
17925
17926 if test -z "$GETOPT_H"; then
ca81d7a0
JD
17927 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
17928echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
17929if test "${ac_cv_have_decl_optreset+set}" = set; then
17930 echo $ECHO_N "(cached) $ECHO_C" >&6
17931else
17932 cat >conftest.$ac_ext <<_ACEOF
17933/* confdefs.h. */
17934_ACEOF
17935cat confdefs.h >>conftest.$ac_ext
17936cat >>conftest.$ac_ext <<_ACEOF
17937/* end confdefs.h. */
17938#include <getopt.h>
17939
17940int
17941main ()
17942{
17943#ifndef optreset
f053c89f 17944 (void) optreset;
52dbaac8
PE
17945#endif
17946
17947 ;
17948 return 0;
17949}
17950_ACEOF
17951rm -f conftest.$ac_objext
ca81d7a0
JD
17952if { (ac_try="$ac_compile"
17953case "(($ac_try" in
17954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17955 *) ac_try_echo=$ac_try;;
17956esac
17957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17958 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
17959 ac_status=$?
17960 grep -v '^ *+' conftest.er1 >conftest.err
17961 rm -f conftest.er1
17962 cat conftest.err >&5
17963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17964 (exit $ac_status); } && {
17965 test -z "$ac_c_werror_flag" ||
17966 test ! -s conftest.err
17967 } && test -s conftest.$ac_objext; then
52dbaac8
PE
17968 ac_cv_have_decl_optreset=yes
17969else
17970 echo "$as_me: failed program was:" >&5
17971sed 's/^/| /' conftest.$ac_ext >&5
17972
ca81d7a0 17973 ac_cv_have_decl_optreset=no
52dbaac8 17974fi
ca81d7a0
JD
17975
17976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 17977fi
ca81d7a0
JD
17978{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
17979echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
17980if test $ac_cv_have_decl_optreset = yes; then
17981 GETOPT_H=getopt.h
17982fi
17983
17984 fi
17985
17986 if test -z "$GETOPT_H"; then
ca81d7a0
JD
17987 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
17988echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
17989if test "${gl_cv_func_gnu_getopt+set}" = set; then
17990 echo $ECHO_N "(cached) $ECHO_C" >&6
17991else
17992 if test "$cross_compiling" = yes; then
ca81d7a0
JD
17993 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
17994echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
17995if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
17996 echo $ECHO_N "(cached) $ECHO_C" >&6
17997else
17998 cat >conftest.$ac_ext <<_ACEOF
17999/* confdefs.h. */
18000_ACEOF
18001cat confdefs.h >>conftest.$ac_ext
18002cat >>conftest.$ac_ext <<_ACEOF
18003/* end confdefs.h. */
18004#include <getopt.h>
18005
18006int
18007main ()
18008{
18009#ifndef getopt_clip
f053c89f 18010 (void) getopt_clip;
52dbaac8
PE
18011#endif
18012
18013 ;
18014 return 0;
18015}
18016_ACEOF
18017rm -f conftest.$ac_objext
ca81d7a0
JD
18018if { (ac_try="$ac_compile"
18019case "(($ac_try" in
18020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18021 *) ac_try_echo=$ac_try;;
18022esac
18023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18024 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18025 ac_status=$?
18026 grep -v '^ *+' conftest.er1 >conftest.err
18027 rm -f conftest.er1
18028 cat conftest.err >&5
18029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18030 (exit $ac_status); } && {
18031 test -z "$ac_c_werror_flag" ||
18032 test ! -s conftest.err
18033 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18034 ac_cv_have_decl_getopt_clip=yes
18035else
18036 echo "$as_me: failed program was:" >&5
18037sed 's/^/| /' conftest.$ac_ext >&5
18038
ca81d7a0 18039 ac_cv_have_decl_getopt_clip=no
52dbaac8 18040fi
ca81d7a0
JD
18041
18042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 18043fi
ca81d7a0
JD
18044{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
18045echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
18046if test $ac_cv_have_decl_getopt_clip = yes; then
18047 gl_cv_func_gnu_getopt=no
18048else
18049 gl_cv_func_gnu_getopt=yes
18050fi
18051
18052else
18053 cat >conftest.$ac_ext <<_ACEOF
18054/* confdefs.h. */
18055_ACEOF
18056cat confdefs.h >>conftest.$ac_ext
18057cat >>conftest.$ac_ext <<_ACEOF
18058/* end confdefs.h. */
18059#include <getopt.h>
18060int
18061main ()
18062{
18063
18064 char *myargv[3];
18065 myargv[0] = "conftest";
18066 myargv[1] = "-+";
18067 myargv[2] = 0;
18068 return getopt (2, myargv, "+a") != '?';
18069
18070 ;
18071 return 0;
18072}
18073_ACEOF
18074rm -f conftest$ac_exeext
ca81d7a0
JD
18075if { (ac_try="$ac_link"
18076case "(($ac_try" in
18077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18078 *) ac_try_echo=$ac_try;;
18079esac
18080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18081 (eval "$ac_link") 2>&5
52dbaac8
PE
18082 ac_status=$?
18083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18084 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
18085 { (case "(($ac_try" in
18086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18087 *) ac_try_echo=$ac_try;;
18088esac
18089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18090 (eval "$ac_try") 2>&5
52dbaac8
PE
18091 ac_status=$?
18092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18093 (exit $ac_status); }; }; then
18094 gl_cv_func_gnu_getopt=yes
18095else
18096 echo "$as_me: program exited with status $ac_status" >&5
18097echo "$as_me: failed program was:" >&5
18098sed 's/^/| /' conftest.$ac_ext >&5
18099
18100( exit $ac_status )
18101gl_cv_func_gnu_getopt=no
18102fi
ca81d7a0 18103rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 18104fi
ca81d7a0
JD
18105
18106
52dbaac8 18107fi
ca81d7a0
JD
18108{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
18109echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
18110 if test "$gl_cv_func_gnu_getopt" = "no"; then
18111 GETOPT_H=getopt.h
18112 fi
18113 fi
18114
18115
18116
18117 if test -n "$GETOPT_H"; then
18118
18119
18120 GETOPT_H=getopt.h
18121
18122cat >>confdefs.h <<\_ACEOF
18123#define __GETOPT_PREFIX rpl_
18124_ACEOF
18125
18126
18127
18128 :
18129 GETOPTOBJS='getopt.o getopt1.o'
18130
18131fi
18132
18133
18134
18135
ca81d7a0
JD
18136{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
18137echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
18138if test "${ac_cv_func_getpgrp_void+set}" = set; then
18139 echo $ECHO_N "(cached) $ECHO_C" >&6
18140else
18141 # Use it with a single arg.
18142cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18143/* confdefs.h. */
18144_ACEOF
18145cat confdefs.h >>conftest.$ac_ext
18146cat >>conftest.$ac_ext <<_ACEOF
18147/* end confdefs.h. */
cd958eb3
MB
18148$ac_includes_default
18149int
18150main ()
18151{
18152getpgrp (0);
18153 ;
18154 return 0;
18155}
18156_ACEOF
18157rm -f conftest.$ac_objext
ca81d7a0
JD
18158if { (ac_try="$ac_compile"
18159case "(($ac_try" in
18160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18161 *) ac_try_echo=$ac_try;;
18162esac
18163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18164 (eval "$ac_compile") 2>conftest.er1
cd958eb3 18165 ac_status=$?
edfaf76d
LK
18166 grep -v '^ *+' conftest.er1 >conftest.err
18167 rm -f conftest.er1
18168 cat conftest.err >&5
cd958eb3 18169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18170 (exit $ac_status); } && {
18171 test -z "$ac_c_werror_flag" ||
18172 test ! -s conftest.err
18173 } && test -s conftest.$ac_objext; then
cd958eb3
MB
18174 ac_cv_func_getpgrp_void=no
18175else
18176 echo "$as_me: failed program was:" >&5
19650fd6
AS
18177sed 's/^/| /' conftest.$ac_ext >&5
18178
ca81d7a0 18179 ac_cv_func_getpgrp_void=yes
cd958eb3 18180fi
ca81d7a0
JD
18181
18182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
18183
18184fi
ca81d7a0
JD
18185{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
18186echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
18187if test $ac_cv_func_getpgrp_void = yes; then
18188
18189cat >>confdefs.h <<\_ACEOF
18190#define GETPGRP_VOID 1
18191_ACEOF
18192
18193fi
18194
18195
973a76b1
DL
18196
18197for ac_func in strftime
18198do
18199as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18200{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18201echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18202if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
18203 echo $ECHO_N "(cached) $ECHO_C" >&6
18204else
18205 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18206/* confdefs.h. */
18207_ACEOF
18208cat confdefs.h >>conftest.$ac_ext
18209cat >>conftest.$ac_ext <<_ACEOF
18210/* end confdefs.h. */
edfaf76d
LK
18211/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18212 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18213#define $ac_func innocuous_$ac_func
18214
973a76b1 18215/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18216 which can conflict with char $ac_func (); below.
18217 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18218 <limits.h> exists even on freestanding compilers. */
edfaf76d 18219
19650fd6
AS
18220#ifdef __STDC__
18221# include <limits.h>
18222#else
18223# include <assert.h>
18224#endif
edfaf76d
LK
18225
18226#undef $ac_func
18227
ca81d7a0
JD
18228/* Override any GCC internal prototype to avoid an error.
18229 Use char because int might match the return type of a GCC
18230 builtin and then its argument prototype would still apply. */
973a76b1
DL
18231#ifdef __cplusplus
18232extern "C"
973a76b1 18233#endif
973a76b1
DL
18234char $ac_func ();
18235/* The GNU C library defines this for functions which it implements
18236 to always fail with ENOSYS. Some functions are actually named
18237 something starting with __ and the normal name is an alias. */
ca81d7a0 18238#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 18239choke me
973a76b1
DL
18240#endif
18241
19650fd6
AS
18242int
18243main ()
18244{
ca81d7a0 18245return $ac_func ();
973a76b1
DL
18246 ;
18247 return 0;
18248}
18249_ACEOF
18250rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18251if { (ac_try="$ac_link"
18252case "(($ac_try" in
18253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18254 *) ac_try_echo=$ac_try;;
18255esac
18256eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18257 (eval "$ac_link") 2>conftest.er1
973a76b1 18258 ac_status=$?
edfaf76d
LK
18259 grep -v '^ *+' conftest.er1 >conftest.err
18260 rm -f conftest.er1
18261 cat conftest.err >&5
973a76b1 18262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18263 (exit $ac_status); } && {
18264 test -z "$ac_c_werror_flag" ||
18265 test ! -s conftest.err
18266 } && test -s conftest$ac_exeext &&
18267 $as_test_x conftest$ac_exeext; then
973a76b1
DL
18268 eval "$as_ac_var=yes"
18269else
18270 echo "$as_me: failed program was:" >&5
19650fd6
AS
18271sed 's/^/| /' conftest.$ac_ext >&5
18272
ca81d7a0 18273 eval "$as_ac_var=no"
973a76b1 18274fi
ca81d7a0 18275
f053c89f 18276rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18277 conftest$ac_exeext conftest.$ac_ext
973a76b1 18278fi
ca81d7a0
JD
18279ac_res=`eval echo '${'$as_ac_var'}'`
18280 { echo "$as_me:$LINENO: result: $ac_res" >&5
18281echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
18282if test `eval echo '${'$as_ac_var'}'` = yes; then
18283 cat >>confdefs.h <<_ACEOF
18284#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18285_ACEOF
18286
18287else
18288 # strftime is in -lintl on SCO UNIX.
ca81d7a0
JD
18289{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
18290echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
18291if test "${ac_cv_lib_intl_strftime+set}" = set; then
18292 echo $ECHO_N "(cached) $ECHO_C" >&6
18293else
18294 ac_check_lib_save_LIBS=$LIBS
18295LIBS="-lintl $LIBS"
18296cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18297/* confdefs.h. */
18298_ACEOF
18299cat confdefs.h >>conftest.$ac_ext
18300cat >>conftest.$ac_ext <<_ACEOF
18301/* end confdefs.h. */
973a76b1 18302
ca81d7a0
JD
18303/* Override any GCC internal prototype to avoid an error.
18304 Use char because int might match the return type of a GCC
18305 builtin and then its argument prototype would still apply. */
973a76b1
DL
18306#ifdef __cplusplus
18307extern "C"
18308#endif
973a76b1
DL
18309char strftime ();
18310int
18311main ()
18312{
ca81d7a0 18313return strftime ();
973a76b1
DL
18314 ;
18315 return 0;
18316}
18317_ACEOF
18318rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18319if { (ac_try="$ac_link"
18320case "(($ac_try" in
18321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18322 *) ac_try_echo=$ac_try;;
18323esac
18324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18325 (eval "$ac_link") 2>conftest.er1
973a76b1 18326 ac_status=$?
edfaf76d
LK
18327 grep -v '^ *+' conftest.er1 >conftest.err
18328 rm -f conftest.er1
18329 cat conftest.err >&5
973a76b1 18330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18331 (exit $ac_status); } && {
18332 test -z "$ac_c_werror_flag" ||
18333 test ! -s conftest.err
18334 } && test -s conftest$ac_exeext &&
18335 $as_test_x conftest$ac_exeext; then
973a76b1
DL
18336 ac_cv_lib_intl_strftime=yes
18337else
18338 echo "$as_me: failed program was:" >&5
19650fd6
AS
18339sed 's/^/| /' conftest.$ac_ext >&5
18340
ca81d7a0 18341 ac_cv_lib_intl_strftime=no
973a76b1 18342fi
ca81d7a0 18343
f053c89f 18344rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18345 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
18346LIBS=$ac_check_lib_save_LIBS
18347fi
ca81d7a0
JD
18348{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
18349echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
18350if test $ac_cv_lib_intl_strftime = yes; then
18351 cat >>confdefs.h <<\_ACEOF
18352#define HAVE_STRFTIME 1
18353_ACEOF
18354
18355LIBS="-lintl $LIBS"
18356fi
18357
18358fi
18359done
18360
18361
b936fae4
AS
18362# UNIX98 PTYs.
18363
18364for ac_func in grantpt
503d2be0
AS
18365do
18366as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18367{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18368echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18369if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 18370 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18371else
503d2be0 18372 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18373/* confdefs.h. */
18374_ACEOF
18375cat confdefs.h >>conftest.$ac_ext
18376cat >>conftest.$ac_ext <<_ACEOF
18377/* end confdefs.h. */
edfaf76d
LK
18378/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18379 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18380#define $ac_func innocuous_$ac_func
18381
503d2be0 18382/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18383 which can conflict with char $ac_func (); below.
18384 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18385 <limits.h> exists even on freestanding compilers. */
edfaf76d 18386
19650fd6
AS
18387#ifdef __STDC__
18388# include <limits.h>
18389#else
18390# include <assert.h>
18391#endif
edfaf76d
LK
18392
18393#undef $ac_func
18394
ca81d7a0
JD
18395/* Override any GCC internal prototype to avoid an error.
18396 Use char because int might match the return type of a GCC
18397 builtin and then its argument prototype would still apply. */
503d2be0
AS
18398#ifdef __cplusplus
18399extern "C"
18400#endif
503d2be0 18401char $ac_func ();
503d2be0
AS
18402/* The GNU C library defines this for functions which it implements
18403 to always fail with ENOSYS. Some functions are actually named
18404 something starting with __ and the normal name is an alias. */
ca81d7a0 18405#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 18406choke me
503d2be0 18407#endif
4c343001 18408
19650fd6
AS
18409int
18410main ()
18411{
ca81d7a0 18412return $ac_func ();
503d2be0
AS
18413 ;
18414 return 0;
18415}
18416_ACEOF
18417rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18418if { (ac_try="$ac_link"
18419case "(($ac_try" in
18420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18421 *) ac_try_echo=$ac_try;;
18422esac
18423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18424 (eval "$ac_link") 2>conftest.er1
503d2be0 18425 ac_status=$?
edfaf76d
LK
18426 grep -v '^ *+' conftest.er1 >conftest.err
18427 rm -f conftest.er1
18428 cat conftest.err >&5
c0d27fcc 18429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18430 (exit $ac_status); } && {
18431 test -z "$ac_c_werror_flag" ||
18432 test ! -s conftest.err
18433 } && test -s conftest$ac_exeext &&
18434 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18435 eval "$as_ac_var=yes"
18436else
18437 echo "$as_me: failed program was:" >&5
19650fd6
AS
18438sed 's/^/| /' conftest.$ac_ext >&5
18439
ca81d7a0 18440 eval "$as_ac_var=no"
503d2be0 18441fi
ca81d7a0 18442
f053c89f 18443rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18444 conftest$ac_exeext conftest.$ac_ext
503d2be0 18445fi
ca81d7a0
JD
18446ac_res=`eval echo '${'$as_ac_var'}'`
18447 { echo "$as_me:$LINENO: result: $ac_res" >&5
18448echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18449if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18450 cat >>confdefs.h <<_ACEOF
503d2be0 18451#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18452_ACEOF
4c343001
DL
18453
18454fi
503d2be0
AS
18455done
18456
c0d27fcc 18457
b936fae4 18458# PTY-related GNU extensions.
4c343001 18459
b936fae4
AS
18460for ac_func in getpt
18461do
18462as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18463{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18464echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18465if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 18466 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18467else
b936fae4 18468 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18469/* confdefs.h. */
18470_ACEOF
18471cat confdefs.h >>conftest.$ac_ext
18472cat >>conftest.$ac_ext <<_ACEOF
18473/* end confdefs.h. */
edfaf76d
LK
18474/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18475 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18476#define $ac_func innocuous_$ac_func
18477
087121cc 18478/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18479 which can conflict with char $ac_func (); below.
18480 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18481 <limits.h> exists even on freestanding compilers. */
edfaf76d 18482
19650fd6
AS
18483#ifdef __STDC__
18484# include <limits.h>
18485#else
18486# include <assert.h>
18487#endif
edfaf76d
LK
18488
18489#undef $ac_func
18490
ca81d7a0
JD
18491/* Override any GCC internal prototype to avoid an error.
18492 Use char because int might match the return type of a GCC
18493 builtin and then its argument prototype would still apply. */
503d2be0
AS
18494#ifdef __cplusplus
18495extern "C"
18496#endif
503d2be0 18497char $ac_func ();
087121cc
GM
18498/* The GNU C library defines this for functions which it implements
18499 to always fail with ENOSYS. Some functions are actually named
18500 something starting with __ and the normal name is an alias. */
ca81d7a0 18501#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 18502choke me
087121cc
GM
18503#endif
18504
19650fd6
AS
18505int
18506main ()
18507{
ca81d7a0 18508return $ac_func ();
503d2be0
AS
18509 ;
18510 return 0;
18511}
18512_ACEOF
18513rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18514if { (ac_try="$ac_link"
18515case "(($ac_try" in
18516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18517 *) ac_try_echo=$ac_try;;
18518esac
18519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18520 (eval "$ac_link") 2>conftest.er1
503d2be0 18521 ac_status=$?
f053c89f
CY
18522 grep -v '^ *+' conftest.er1 >conftest.err
18523 rm -f conftest.er1
18524 cat conftest.err >&5
c0d27fcc 18525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18526 (exit $ac_status); } && {
18527 test -z "$ac_c_werror_flag" ||
18528 test ! -s conftest.err
18529 } && test -s conftest$ac_exeext &&
18530 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18531 eval "$as_ac_var=yes"
18532else
18533 echo "$as_me: failed program was:" >&5
19650fd6
AS
18534sed 's/^/| /' conftest.$ac_ext >&5
18535
ca81d7a0 18536 eval "$as_ac_var=no"
503d2be0 18537fi
ca81d7a0 18538
f053c89f 18539rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18540 conftest$ac_exeext conftest.$ac_ext
503d2be0 18541fi
ca81d7a0
JD
18542ac_res=`eval echo '${'$as_ac_var'}'`
18543 { echo "$as_me:$LINENO: result: $ac_res" >&5
18544echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18545if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18546 cat >>confdefs.h <<_ACEOF
503d2be0 18547#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18548_ACEOF
087121cc 18549
087121cc
GM
18550fi
18551done
18552
c0d27fcc 18553
ba4481b5
DL
18554# Check this now, so that we will NOT find the above functions in ncurses.
18555# That is because we have not set up to link ncurses in lib-src.
18556# It's better to believe a function is not available
18557# than to expect to find it in ncurses.
503d2be0 18558
ca81d7a0
JD
18559{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
18560echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
18561if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
18562 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18563else
503d2be0 18564 ac_check_lib_save_LIBS=$LIBS
ba4481b5 18565LIBS="-lncurses $LIBS"
503d2be0 18566cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18567/* confdefs.h. */
18568_ACEOF
18569cat confdefs.h >>conftest.$ac_ext
18570cat >>conftest.$ac_ext <<_ACEOF
18571/* end confdefs.h. */
503d2be0 18572
ca81d7a0
JD
18573/* Override any GCC internal prototype to avoid an error.
18574 Use char because int might match the return type of a GCC
18575 builtin and then its argument prototype would still apply. */
503d2be0
AS
18576#ifdef __cplusplus
18577extern "C"
18578#endif
503d2be0
AS
18579char tparm ();
18580int
18581main ()
18582{
ca81d7a0 18583return tparm ();
503d2be0
AS
18584 ;
18585 return 0;
18586}
18587_ACEOF
18588rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18589if { (ac_try="$ac_link"
18590case "(($ac_try" in
18591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18592 *) ac_try_echo=$ac_try;;
18593esac
18594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18595 (eval "$ac_link") 2>conftest.er1
503d2be0 18596 ac_status=$?
edfaf76d
LK
18597 grep -v '^ *+' conftest.er1 >conftest.err
18598 rm -f conftest.er1
18599 cat conftest.err >&5
c0d27fcc 18600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18601 (exit $ac_status); } && {
18602 test -z "$ac_c_werror_flag" ||
18603 test ! -s conftest.err
18604 } && test -s conftest$ac_exeext &&
18605 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18606 ac_cv_lib_ncurses_tparm=yes
18607else
18608 echo "$as_me: failed program was:" >&5
19650fd6
AS
18609sed 's/^/| /' conftest.$ac_ext >&5
18610
ca81d7a0 18611 ac_cv_lib_ncurses_tparm=no
503d2be0 18612fi
ca81d7a0 18613
f053c89f 18614rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18615 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18616LIBS=$ac_check_lib_save_LIBS
18617fi
ca81d7a0
JD
18618{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
18619echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 18620if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 18621 cat >>confdefs.h <<_ACEOF
503d2be0 18622#define HAVE_LIBNCURSES 1
c0d27fcc 18623_ACEOF
ba4481b5
DL
18624
18625 LIBS="-lncurses $LIBS"
18626
ba4481b5
DL
18627fi
18628
c0d27fcc 18629
84e70f78
KR
18630# Do we need the Hesiod library to provide the support routines?
18631if test "$with_hesiod" = yes ; then
18632 # Don't set $LIBS here -- see comments above.
18633 resolv=no
ca81d7a0
JD
18634 { echo "$as_me:$LINENO: checking for res_send" >&5
18635echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
18636if test "${ac_cv_func_res_send+set}" = set; then
18637 echo $ECHO_N "(cached) $ECHO_C" >&6
18638else
18639 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18640/* confdefs.h. */
18641_ACEOF
18642cat confdefs.h >>conftest.$ac_ext
18643cat >>conftest.$ac_ext <<_ACEOF
18644/* end confdefs.h. */
edfaf76d
LK
18645/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
18646 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18647#define res_send innocuous_res_send
18648
84e70f78 18649/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18650 which can conflict with char res_send (); below.
18651 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18652 <limits.h> exists even on freestanding compilers. */
edfaf76d 18653
19650fd6
AS
18654#ifdef __STDC__
18655# include <limits.h>
18656#else
18657# include <assert.h>
18658#endif
edfaf76d
LK
18659
18660#undef res_send
18661
ca81d7a0
JD
18662/* Override any GCC internal prototype to avoid an error.
18663 Use char because int might match the return type of a GCC
18664 builtin and then its argument prototype would still apply. */
84e70f78
KR
18665#ifdef __cplusplus
18666extern "C"
18667#endif
84e70f78 18668char res_send ();
84e70f78
KR
18669/* The GNU C library defines this for functions which it implements
18670 to always fail with ENOSYS. Some functions are actually named
18671 something starting with __ and the normal name is an alias. */
ca81d7a0 18672#if defined __stub_res_send || defined __stub___res_send
84e70f78 18673choke me
cd958eb3
MB
18674#endif
18675
19650fd6
AS
18676int
18677main ()
18678{
ca81d7a0 18679return res_send ();
84e70f78
KR
18680 ;
18681 return 0;
18682}
18683_ACEOF
18684rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18685if { (ac_try="$ac_link"
18686case "(($ac_try" in
18687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18688 *) ac_try_echo=$ac_try;;
18689esac
18690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18691 (eval "$ac_link") 2>conftest.er1
84e70f78 18692 ac_status=$?
edfaf76d
LK
18693 grep -v '^ *+' conftest.er1 >conftest.err
18694 rm -f conftest.er1
18695 cat conftest.err >&5
c0d27fcc 18696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18697 (exit $ac_status); } && {
18698 test -z "$ac_c_werror_flag" ||
18699 test ! -s conftest.err
18700 } && test -s conftest$ac_exeext &&
18701 $as_test_x conftest$ac_exeext; then
84e70f78
KR
18702 ac_cv_func_res_send=yes
18703else
18704 echo "$as_me: failed program was:" >&5
19650fd6
AS
18705sed 's/^/| /' conftest.$ac_ext >&5
18706
ca81d7a0 18707 ac_cv_func_res_send=no
84e70f78 18708fi
ca81d7a0 18709
f053c89f 18710rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18711 conftest$ac_exeext conftest.$ac_ext
84e70f78 18712fi
ca81d7a0
JD
18713{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
18714echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
18715if test $ac_cv_func_res_send = yes; then
18716 :
18717else
ca81d7a0
JD
18718 { echo "$as_me:$LINENO: checking for __res_send" >&5
18719echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
18720if test "${ac_cv_func___res_send+set}" = set; then
18721 echo $ECHO_N "(cached) $ECHO_C" >&6
18722else
18723 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18724/* confdefs.h. */
18725_ACEOF
18726cat confdefs.h >>conftest.$ac_ext
18727cat >>conftest.$ac_ext <<_ACEOF
18728/* end confdefs.h. */
edfaf76d
LK
18729/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
18730 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18731#define __res_send innocuous___res_send
18732
84e70f78 18733/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18734 which can conflict with char __res_send (); below.
18735 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18736 <limits.h> exists even on freestanding compilers. */
edfaf76d 18737
19650fd6
AS
18738#ifdef __STDC__
18739# include <limits.h>
18740#else
18741# include <assert.h>
18742#endif
edfaf76d
LK
18743
18744#undef __res_send
18745
ca81d7a0
JD
18746/* Override any GCC internal prototype to avoid an error.
18747 Use char because int might match the return type of a GCC
18748 builtin and then its argument prototype would still apply. */
84e70f78
KR
18749#ifdef __cplusplus
18750extern "C"
18751#endif
84e70f78 18752char __res_send ();
84e70f78
KR
18753/* The GNU C library defines this for functions which it implements
18754 to always fail with ENOSYS. Some functions are actually named
18755 something starting with __ and the normal name is an alias. */
ca81d7a0 18756#if defined __stub___res_send || defined __stub_____res_send
84e70f78 18757choke me
84e70f78
KR
18758#endif
18759
19650fd6
AS
18760int
18761main ()
18762{
ca81d7a0 18763return __res_send ();
84e70f78
KR
18764 ;
18765 return 0;
18766}
18767_ACEOF
18768rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18769if { (ac_try="$ac_link"
18770case "(($ac_try" in
18771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18772 *) ac_try_echo=$ac_try;;
18773esac
18774eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18775 (eval "$ac_link") 2>conftest.er1
84e70f78 18776 ac_status=$?
edfaf76d
LK
18777 grep -v '^ *+' conftest.er1 >conftest.err
18778 rm -f conftest.er1
18779 cat conftest.err >&5
c0d27fcc 18780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18781 (exit $ac_status); } && {
18782 test -z "$ac_c_werror_flag" ||
18783 test ! -s conftest.err
18784 } && test -s conftest$ac_exeext &&
18785 $as_test_x conftest$ac_exeext; then
84e70f78
KR
18786 ac_cv_func___res_send=yes
18787else
18788 echo "$as_me: failed program was:" >&5
19650fd6
AS
18789sed 's/^/| /' conftest.$ac_ext >&5
18790
ca81d7a0 18791 ac_cv_func___res_send=no
84e70f78 18792fi
ca81d7a0 18793
f053c89f 18794rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18795 conftest$ac_exeext conftest.$ac_ext
84e70f78 18796fi
ca81d7a0
JD
18797{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
18798echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
18799if test $ac_cv_func___res_send = yes; then
18800 :
18801else
ca81d7a0
JD
18802 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
18803echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
18804if test "${ac_cv_lib_resolv_res_send+set}" = set; then
18805 echo $ECHO_N "(cached) $ECHO_C" >&6
18806else
18807 ac_check_lib_save_LIBS=$LIBS
18808LIBS="-lresolv $LIBS"
18809cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18810/* confdefs.h. */
18811_ACEOF
18812cat confdefs.h >>conftest.$ac_ext
18813cat >>conftest.$ac_ext <<_ACEOF
18814/* end confdefs.h. */
84e70f78 18815
ca81d7a0
JD
18816/* Override any GCC internal prototype to avoid an error.
18817 Use char because int might match the return type of a GCC
18818 builtin and then its argument prototype would still apply. */
84e70f78
KR
18819#ifdef __cplusplus
18820extern "C"
18821#endif
84e70f78
KR
18822char res_send ();
18823int
18824main ()
18825{
ca81d7a0 18826return res_send ();
84e70f78
KR
18827 ;
18828 return 0;
18829}
18830_ACEOF
18831rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18832if { (ac_try="$ac_link"
18833case "(($ac_try" in
18834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18835 *) ac_try_echo=$ac_try;;
18836esac
18837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18838 (eval "$ac_link") 2>conftest.er1
84e70f78 18839 ac_status=$?
edfaf76d
LK
18840 grep -v '^ *+' conftest.er1 >conftest.err
18841 rm -f conftest.er1
18842 cat conftest.err >&5
c0d27fcc 18843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18844 (exit $ac_status); } && {
18845 test -z "$ac_c_werror_flag" ||
18846 test ! -s conftest.err
18847 } && test -s conftest$ac_exeext &&
18848 $as_test_x conftest$ac_exeext; then
84e70f78
KR
18849 ac_cv_lib_resolv_res_send=yes
18850else
18851 echo "$as_me: failed program was:" >&5
19650fd6
AS
18852sed 's/^/| /' conftest.$ac_ext >&5
18853
ca81d7a0 18854 ac_cv_lib_resolv_res_send=no
84e70f78 18855fi
ca81d7a0 18856
f053c89f 18857rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18858 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18859LIBS=$ac_check_lib_save_LIBS
18860fi
ca81d7a0
JD
18861{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
18862echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
18863if test $ac_cv_lib_resolv_res_send = yes; then
18864 resolv=yes
18865else
ca81d7a0
JD
18866 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
18867echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
18868if test "${ac_cv_lib_resolv___res_send+set}" = set; then
18869 echo $ECHO_N "(cached) $ECHO_C" >&6
18870else
18871 ac_check_lib_save_LIBS=$LIBS
18872LIBS="-lresolv $LIBS"
18873cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18874/* confdefs.h. */
18875_ACEOF
18876cat confdefs.h >>conftest.$ac_ext
18877cat >>conftest.$ac_ext <<_ACEOF
18878/* end confdefs.h. */
84e70f78 18879
ca81d7a0
JD
18880/* Override any GCC internal prototype to avoid an error.
18881 Use char because int might match the return type of a GCC
18882 builtin and then its argument prototype would still apply. */
84e70f78
KR
18883#ifdef __cplusplus
18884extern "C"
18885#endif
84e70f78
KR
18886char __res_send ();
18887int
18888main ()
18889{
ca81d7a0 18890return __res_send ();
84e70f78
KR
18891 ;
18892 return 0;
18893}
18894_ACEOF
18895rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18896if { (ac_try="$ac_link"
18897case "(($ac_try" in
18898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18899 *) ac_try_echo=$ac_try;;
18900esac
18901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18902 (eval "$ac_link") 2>conftest.er1
84e70f78 18903 ac_status=$?
edfaf76d
LK
18904 grep -v '^ *+' conftest.er1 >conftest.err
18905 rm -f conftest.er1
18906 cat conftest.err >&5
c0d27fcc 18907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18908 (exit $ac_status); } && {
18909 test -z "$ac_c_werror_flag" ||
18910 test ! -s conftest.err
18911 } && test -s conftest$ac_exeext &&
18912 $as_test_x conftest$ac_exeext; then
84e70f78
KR
18913 ac_cv_lib_resolv___res_send=yes
18914else
18915 echo "$as_me: failed program was:" >&5
19650fd6
AS
18916sed 's/^/| /' conftest.$ac_ext >&5
18917
ca81d7a0 18918 ac_cv_lib_resolv___res_send=no
84e70f78 18919fi
ca81d7a0 18920
f053c89f 18921rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18922 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
18923LIBS=$ac_check_lib_save_LIBS
18924fi
ca81d7a0
JD
18925{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
18926echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
18927if test $ac_cv_lib_resolv___res_send = yes; then
18928 resolv=yes
18929fi
18930
18931fi
18932
18933fi
18934
18935fi
18936
18937 if test "$resolv" = yes ; then
18938 RESOLVLIB=-lresolv
b936fae4 18939
c0d27fcc 18940cat >>confdefs.h <<\_ACEOF
84e70f78 18941#define HAVE_LIBRESOLV 1
c0d27fcc 18942_ACEOF
84e70f78
KR
18943
18944 else
18945 RESOLVLIB=
18946 fi
ca81d7a0
JD
18947 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
18948echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
18949if test "${ac_cv_func_hes_getmailhost+set}" = set; then
18950 echo $ECHO_N "(cached) $ECHO_C" >&6
18951else
18952 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18953/* confdefs.h. */
18954_ACEOF
18955cat confdefs.h >>conftest.$ac_ext
18956cat >>conftest.$ac_ext <<_ACEOF
18957/* end confdefs.h. */
edfaf76d
LK
18958/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
18959 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18960#define hes_getmailhost innocuous_hes_getmailhost
18961
84e70f78 18962/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18963 which can conflict with char hes_getmailhost (); below.
18964 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18965 <limits.h> exists even on freestanding compilers. */
edfaf76d 18966
19650fd6
AS
18967#ifdef __STDC__
18968# include <limits.h>
18969#else
18970# include <assert.h>
18971#endif
edfaf76d
LK
18972
18973#undef hes_getmailhost
18974
ca81d7a0
JD
18975/* Override any GCC internal prototype to avoid an error.
18976 Use char because int might match the return type of a GCC
18977 builtin and then its argument prototype would still apply. */
84e70f78
KR
18978#ifdef __cplusplus
18979extern "C"
18980#endif
84e70f78 18981char hes_getmailhost ();
84e70f78
KR
18982/* The GNU C library defines this for functions which it implements
18983 to always fail with ENOSYS. Some functions are actually named
18984 something starting with __ and the normal name is an alias. */
ca81d7a0 18985#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 18986choke me
cd958eb3
MB
18987#endif
18988
19650fd6
AS
18989int
18990main ()
18991{
ca81d7a0 18992return hes_getmailhost ();
84e70f78
KR
18993 ;
18994 return 0;
18995}
18996_ACEOF
18997rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18998if { (ac_try="$ac_link"
18999case "(($ac_try" in
19000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19001 *) ac_try_echo=$ac_try;;
19002esac
19003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19004 (eval "$ac_link") 2>conftest.er1
84e70f78 19005 ac_status=$?
edfaf76d
LK
19006 grep -v '^ *+' conftest.er1 >conftest.err
19007 rm -f conftest.er1
19008 cat conftest.err >&5
c0d27fcc 19009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19010 (exit $ac_status); } && {
19011 test -z "$ac_c_werror_flag" ||
19012 test ! -s conftest.err
19013 } && test -s conftest$ac_exeext &&
19014 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19015 ac_cv_func_hes_getmailhost=yes
19016else
19017 echo "$as_me: failed program was:" >&5
19650fd6
AS
19018sed 's/^/| /' conftest.$ac_ext >&5
19019
ca81d7a0 19020 ac_cv_func_hes_getmailhost=no
84e70f78 19021fi
ca81d7a0 19022
f053c89f 19023rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19024 conftest$ac_exeext conftest.$ac_ext
84e70f78 19025fi
ca81d7a0
JD
19026{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
19027echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
19028if test $ac_cv_func_hes_getmailhost = yes; then
19029 :
19030else
ca81d7a0
JD
19031 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
19032echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
19033if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
19034 echo $ECHO_N "(cached) $ECHO_C" >&6
19035else
19036 ac_check_lib_save_LIBS=$LIBS
19037LIBS="-lhesiod $RESOLVLIB $LIBS"
19038cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19039/* confdefs.h. */
19040_ACEOF
19041cat confdefs.h >>conftest.$ac_ext
19042cat >>conftest.$ac_ext <<_ACEOF
19043/* end confdefs.h. */
84e70f78 19044
ca81d7a0
JD
19045/* Override any GCC internal prototype to avoid an error.
19046 Use char because int might match the return type of a GCC
19047 builtin and then its argument prototype would still apply. */
84e70f78
KR
19048#ifdef __cplusplus
19049extern "C"
19050#endif
84e70f78
KR
19051char hes_getmailhost ();
19052int
19053main ()
19054{
ca81d7a0 19055return hes_getmailhost ();
84e70f78
KR
19056 ;
19057 return 0;
19058}
19059_ACEOF
19060rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19061if { (ac_try="$ac_link"
19062case "(($ac_try" in
19063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19064 *) ac_try_echo=$ac_try;;
19065esac
19066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19067 (eval "$ac_link") 2>conftest.er1
84e70f78 19068 ac_status=$?
edfaf76d
LK
19069 grep -v '^ *+' conftest.er1 >conftest.err
19070 rm -f conftest.er1
19071 cat conftest.err >&5
c0d27fcc 19072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19073 (exit $ac_status); } && {
19074 test -z "$ac_c_werror_flag" ||
19075 test ! -s conftest.err
19076 } && test -s conftest$ac_exeext &&
19077 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19078 ac_cv_lib_hesiod_hes_getmailhost=yes
19079else
19080 echo "$as_me: failed program was:" >&5
19650fd6
AS
19081sed 's/^/| /' conftest.$ac_ext >&5
19082
ca81d7a0 19083 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 19084fi
ca81d7a0 19085
f053c89f 19086rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19087 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19088LIBS=$ac_check_lib_save_LIBS
19089fi
ca81d7a0
JD
19090{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
19091echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 19092if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 19093
c0d27fcc 19094cat >>confdefs.h <<\_ACEOF
84e70f78 19095#define HAVE_LIBHESIOD 1
c0d27fcc 19096_ACEOF
84e70f78
KR
19097
19098else
19099 :
19100fi
19101
19102fi
19103
19104fi
19105
a21616bd
KR
19106# These tell us which Kerberos-related libraries to use.
19107if test "${with_kerberos+set}" = set; then
503d2be0 19108
ca81d7a0
JD
19109{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
19110echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
19111if test "${ac_cv_lib_com_err_com_err+set}" = set; then
19112 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19113else
503d2be0 19114 ac_check_lib_save_LIBS=$LIBS
a21616bd 19115LIBS="-lcom_err $LIBS"
503d2be0 19116cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19117/* confdefs.h. */
19118_ACEOF
19119cat confdefs.h >>conftest.$ac_ext
19120cat >>conftest.$ac_ext <<_ACEOF
19121/* end confdefs.h. */
503d2be0 19122
ca81d7a0
JD
19123/* Override any GCC internal prototype to avoid an error.
19124 Use char because int might match the return type of a GCC
19125 builtin and then its argument prototype would still apply. */
503d2be0
AS
19126#ifdef __cplusplus
19127extern "C"
19128#endif
503d2be0
AS
19129char com_err ();
19130int
19131main ()
19132{
ca81d7a0 19133return com_err ();
503d2be0
AS
19134 ;
19135 return 0;
19136}
19137_ACEOF
19138rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19139if { (ac_try="$ac_link"
19140case "(($ac_try" in
19141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19142 *) ac_try_echo=$ac_try;;
19143esac
19144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19145 (eval "$ac_link") 2>conftest.er1
503d2be0 19146 ac_status=$?
edfaf76d
LK
19147 grep -v '^ *+' conftest.er1 >conftest.err
19148 rm -f conftest.er1
19149 cat conftest.err >&5
c0d27fcc 19150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19151 (exit $ac_status); } && {
19152 test -z "$ac_c_werror_flag" ||
19153 test ! -s conftest.err
19154 } && test -s conftest$ac_exeext &&
19155 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19156 ac_cv_lib_com_err_com_err=yes
19157else
19158 echo "$as_me: failed program was:" >&5
19650fd6
AS
19159sed 's/^/| /' conftest.$ac_ext >&5
19160
ca81d7a0 19161 ac_cv_lib_com_err_com_err=no
503d2be0 19162fi
ca81d7a0 19163
f053c89f 19164rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19165 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19166LIBS=$ac_check_lib_save_LIBS
19167fi
ca81d7a0
JD
19168{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
19169echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 19170if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 19171 cat >>confdefs.h <<_ACEOF
503d2be0 19172#define HAVE_LIBCOM_ERR 1
c0d27fcc 19173_ACEOF
a21616bd
KR
19174
19175 LIBS="-lcom_err $LIBS"
19176
a21616bd
KR
19177fi
19178
c0d27fcc 19179
ca81d7a0
JD
19180{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
19181echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
19182if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
19183 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19184else
503d2be0 19185 ac_check_lib_save_LIBS=$LIBS
a21616bd 19186LIBS="-lk5crypto $LIBS"
503d2be0 19187cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19188/* confdefs.h. */
19189_ACEOF
19190cat confdefs.h >>conftest.$ac_ext
19191cat >>conftest.$ac_ext <<_ACEOF
19192/* end confdefs.h. */
503d2be0 19193
ca81d7a0
JD
19194/* Override any GCC internal prototype to avoid an error.
19195 Use char because int might match the return type of a GCC
19196 builtin and then its argument prototype would still apply. */
503d2be0
AS
19197#ifdef __cplusplus
19198extern "C"
19199#endif
503d2be0
AS
19200char mit_des_cbc_encrypt ();
19201int
19202main ()
19203{
ca81d7a0 19204return mit_des_cbc_encrypt ();
503d2be0
AS
19205 ;
19206 return 0;
19207}
19208_ACEOF
19209rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19210if { (ac_try="$ac_link"
19211case "(($ac_try" in
19212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19213 *) ac_try_echo=$ac_try;;
19214esac
19215eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19216 (eval "$ac_link") 2>conftest.er1
503d2be0 19217 ac_status=$?
edfaf76d
LK
19218 grep -v '^ *+' conftest.er1 >conftest.err
19219 rm -f conftest.er1
19220 cat conftest.err >&5
c0d27fcc 19221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19222 (exit $ac_status); } && {
19223 test -z "$ac_c_werror_flag" ||
19224 test ! -s conftest.err
19225 } && test -s conftest$ac_exeext &&
19226 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19227 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
19228else
19229 echo "$as_me: failed program was:" >&5
19650fd6
AS
19230sed 's/^/| /' conftest.$ac_ext >&5
19231
ca81d7a0 19232 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 19233fi
ca81d7a0 19234
f053c89f 19235rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19236 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19237LIBS=$ac_check_lib_save_LIBS
19238fi
ca81d7a0
JD
19239{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
19240echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 19241if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 19242 cat >>confdefs.h <<_ACEOF
503d2be0 19243#define HAVE_LIBK5CRYPTO 1
c0d27fcc 19244_ACEOF
a21616bd
KR
19245
19246 LIBS="-lk5crypto $LIBS"
19247
a21616bd
KR
19248fi
19249
c0d27fcc 19250
ca81d7a0
JD
19251{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
19252echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
19253if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
19254 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19255else
503d2be0 19256 ac_check_lib_save_LIBS=$LIBS
a21616bd 19257LIBS="-lcrypto $LIBS"
503d2be0 19258cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19259/* confdefs.h. */
19260_ACEOF
19261cat confdefs.h >>conftest.$ac_ext
19262cat >>conftest.$ac_ext <<_ACEOF
19263/* end confdefs.h. */
503d2be0 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. */
503d2be0
AS
19268#ifdef __cplusplus
19269extern "C"
19270#endif
503d2be0
AS
19271char mit_des_cbc_encrypt ();
19272int
19273main ()
19274{
ca81d7a0 19275return mit_des_cbc_encrypt ();
503d2be0
AS
19276 ;
19277 return 0;
19278}
19279_ACEOF
19280rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19281if { (ac_try="$ac_link"
19282case "(($ac_try" in
19283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19284 *) ac_try_echo=$ac_try;;
19285esac
19286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19287 (eval "$ac_link") 2>conftest.er1
503d2be0 19288 ac_status=$?
edfaf76d
LK
19289 grep -v '^ *+' conftest.er1 >conftest.err
19290 rm -f conftest.er1
19291 cat conftest.err >&5
c0d27fcc 19292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19293 (exit $ac_status); } && {
19294 test -z "$ac_c_werror_flag" ||
19295 test ! -s conftest.err
19296 } && test -s conftest$ac_exeext &&
19297 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19298 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
19299else
19300 echo "$as_me: failed program was:" >&5
19650fd6
AS
19301sed 's/^/| /' conftest.$ac_ext >&5
19302
ca81d7a0 19303 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 19304fi
ca81d7a0 19305
f053c89f 19306rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19307 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19308LIBS=$ac_check_lib_save_LIBS
19309fi
ca81d7a0
JD
19310{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
19311echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 19312if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 19313 cat >>confdefs.h <<_ACEOF
503d2be0 19314#define HAVE_LIBCRYPTO 1
c0d27fcc 19315_ACEOF
a21616bd
KR
19316
19317 LIBS="-lcrypto $LIBS"
19318
a21616bd
KR
19319fi
19320
c0d27fcc 19321
ca81d7a0
JD
19322{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
19323echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
19324if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
19325 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19326else
503d2be0 19327 ac_check_lib_save_LIBS=$LIBS
a21616bd 19328LIBS="-lkrb5 $LIBS"
503d2be0 19329cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19330/* confdefs.h. */
19331_ACEOF
19332cat confdefs.h >>conftest.$ac_ext
19333cat >>conftest.$ac_ext <<_ACEOF
19334/* end confdefs.h. */
a21616bd 19335
ca81d7a0
JD
19336/* Override any GCC internal prototype to avoid an error.
19337 Use char because int might match the return type of a GCC
19338 builtin and then its argument prototype would still apply. */
503d2be0
AS
19339#ifdef __cplusplus
19340extern "C"
19341#endif
503d2be0
AS
19342char krb5_init_context ();
19343int
19344main ()
19345{
ca81d7a0 19346return krb5_init_context ();
503d2be0
AS
19347 ;
19348 return 0;
19349}
19350_ACEOF
19351rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19352if { (ac_try="$ac_link"
19353case "(($ac_try" in
19354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19355 *) ac_try_echo=$ac_try;;
19356esac
19357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19358 (eval "$ac_link") 2>conftest.er1
503d2be0 19359 ac_status=$?
edfaf76d
LK
19360 grep -v '^ *+' conftest.er1 >conftest.err
19361 rm -f conftest.er1
19362 cat conftest.err >&5
c0d27fcc 19363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19364 (exit $ac_status); } && {
19365 test -z "$ac_c_werror_flag" ||
19366 test ! -s conftest.err
19367 } && test -s conftest$ac_exeext &&
19368 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19369 ac_cv_lib_krb5_krb5_init_context=yes
19370else
19371 echo "$as_me: failed program was:" >&5
19650fd6
AS
19372sed 's/^/| /' conftest.$ac_ext >&5
19373
ca81d7a0 19374 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 19375fi
ca81d7a0 19376
f053c89f 19377rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19378 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19379LIBS=$ac_check_lib_save_LIBS
19380fi
ca81d7a0
JD
19381{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
19382echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 19383if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 19384 cat >>confdefs.h <<_ACEOF
503d2be0 19385#define HAVE_LIBKRB5 1
c0d27fcc 19386_ACEOF
a21616bd
KR
19387
19388 LIBS="-lkrb5 $LIBS"
19389
a21616bd
KR
19390fi
19391
19392 if test "${with_kerberos5+set}" != set; then
503d2be0 19393
ca81d7a0
JD
19394{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
19395echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
19396if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
19397 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19398else
503d2be0 19399 ac_check_lib_save_LIBS=$LIBS
a21616bd 19400LIBS="-ldes425 $LIBS"
503d2be0 19401cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19402/* confdefs.h. */
19403_ACEOF
19404cat confdefs.h >>conftest.$ac_ext
19405cat >>conftest.$ac_ext <<_ACEOF
19406/* end confdefs.h. */
503d2be0 19407
ca81d7a0
JD
19408/* Override any GCC internal prototype to avoid an error.
19409 Use char because int might match the return type of a GCC
19410 builtin and then its argument prototype would still apply. */
503d2be0
AS
19411#ifdef __cplusplus
19412extern "C"
19413#endif
503d2be0
AS
19414char des_cbc_encrypt ();
19415int
19416main ()
19417{
ca81d7a0 19418return des_cbc_encrypt ();
503d2be0
AS
19419 ;
19420 return 0;
19421}
19422_ACEOF
19423rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19424if { (ac_try="$ac_link"
19425case "(($ac_try" in
19426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19427 *) ac_try_echo=$ac_try;;
19428esac
19429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19430 (eval "$ac_link") 2>conftest.er1
503d2be0 19431 ac_status=$?
edfaf76d
LK
19432 grep -v '^ *+' conftest.er1 >conftest.err
19433 rm -f conftest.er1
19434 cat conftest.err >&5
c0d27fcc 19435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19436 (exit $ac_status); } && {
19437 test -z "$ac_c_werror_flag" ||
19438 test ! -s conftest.err
19439 } && test -s conftest$ac_exeext &&
19440 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19441 ac_cv_lib_des425_des_cbc_encrypt=yes
19442else
19443 echo "$as_me: failed program was:" >&5
19650fd6
AS
19444sed 's/^/| /' conftest.$ac_ext >&5
19445
ca81d7a0 19446 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 19447fi
ca81d7a0 19448
f053c89f 19449rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19450 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19451LIBS=$ac_check_lib_save_LIBS
19452fi
ca81d7a0
JD
19453{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
19454echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 19455if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 19456 cat >>confdefs.h <<_ACEOF
503d2be0 19457#define HAVE_LIBDES425 1
c0d27fcc 19458_ACEOF
a21616bd
KR
19459
19460 LIBS="-ldes425 $LIBS"
19461
19462else
503d2be0 19463
ca81d7a0
JD
19464{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
19465echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
19466if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
19467 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19468else
503d2be0 19469 ac_check_lib_save_LIBS=$LIBS
a21616bd 19470LIBS="-ldes $LIBS"
503d2be0 19471cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19472/* confdefs.h. */
19473_ACEOF
19474cat confdefs.h >>conftest.$ac_ext
19475cat >>conftest.$ac_ext <<_ACEOF
19476/* end confdefs.h. */
503d2be0 19477
ca81d7a0
JD
19478/* Override any GCC internal prototype to avoid an error.
19479 Use char because int might match the return type of a GCC
19480 builtin and then its argument prototype would still apply. */
503d2be0
AS
19481#ifdef __cplusplus
19482extern "C"
19483#endif
503d2be0
AS
19484char des_cbc_encrypt ();
19485int
19486main ()
19487{
ca81d7a0 19488return des_cbc_encrypt ();
503d2be0
AS
19489 ;
19490 return 0;
19491}
19492_ACEOF
19493rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19494if { (ac_try="$ac_link"
19495case "(($ac_try" in
19496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19497 *) ac_try_echo=$ac_try;;
19498esac
19499eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19500 (eval "$ac_link") 2>conftest.er1
503d2be0 19501 ac_status=$?
edfaf76d
LK
19502 grep -v '^ *+' conftest.er1 >conftest.err
19503 rm -f conftest.er1
19504 cat conftest.err >&5
c0d27fcc 19505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19506 (exit $ac_status); } && {
19507 test -z "$ac_c_werror_flag" ||
19508 test ! -s conftest.err
19509 } && test -s conftest$ac_exeext &&
19510 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19511 ac_cv_lib_des_des_cbc_encrypt=yes
19512else
19513 echo "$as_me: failed program was:" >&5
19650fd6
AS
19514sed 's/^/| /' conftest.$ac_ext >&5
19515
ca81d7a0 19516 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 19517fi
ca81d7a0 19518
f053c89f 19519rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19520 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19521LIBS=$ac_check_lib_save_LIBS
19522fi
ca81d7a0
JD
19523{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
19524echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 19525if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 19526 cat >>confdefs.h <<_ACEOF
503d2be0 19527#define HAVE_LIBDES 1
c0d27fcc 19528_ACEOF
a21616bd
KR
19529
19530 LIBS="-ldes $LIBS"
19531
a21616bd
KR
19532fi
19533
19534fi
19535
c0d27fcc 19536
ca81d7a0
JD
19537{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
19538echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
19539if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
19540 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19541else
503d2be0 19542 ac_check_lib_save_LIBS=$LIBS
a21616bd 19543LIBS="-lkrb4 $LIBS"
503d2be0 19544cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19545/* confdefs.h. */
19546_ACEOF
19547cat confdefs.h >>conftest.$ac_ext
19548cat >>conftest.$ac_ext <<_ACEOF
19549/* end confdefs.h. */
503d2be0 19550
ca81d7a0
JD
19551/* Override any GCC internal prototype to avoid an error.
19552 Use char because int might match the return type of a GCC
19553 builtin and then its argument prototype would still apply. */
503d2be0
AS
19554#ifdef __cplusplus
19555extern "C"
19556#endif
503d2be0
AS
19557char krb_get_cred ();
19558int
f053c89f
CY
19559main ()
19560{
19561return krb_get_cred ();
19562 ;
19563 return 0;
19564}
19565_ACEOF
19566rm -f conftest.$ac_objext conftest$ac_exeext
19567if { (ac_try="$ac_link"
19568case "(($ac_try" in
ca81d7a0
JD
19569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19570 *) ac_try_echo=$ac_try;;
19571esac
19572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19573 (eval "$ac_link") 2>conftest.er1
503d2be0 19574 ac_status=$?
f053c89f
CY
19575 grep -v '^ *+' conftest.er1 >conftest.err
19576 rm -f conftest.er1
19577 cat conftest.err >&5
c0d27fcc 19578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19579 (exit $ac_status); } && {
19580 test -z "$ac_c_werror_flag" ||
19581 test ! -s conftest.err
19582 } && test -s conftest$ac_exeext &&
19583 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19584 ac_cv_lib_krb4_krb_get_cred=yes
19585else
19586 echo "$as_me: failed program was:" >&5
19650fd6
AS
19587sed 's/^/| /' conftest.$ac_ext >&5
19588
ca81d7a0 19589 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 19590fi
ca81d7a0 19591
f053c89f 19592rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19593 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19594LIBS=$ac_check_lib_save_LIBS
19595fi
ca81d7a0
JD
19596{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
19597echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 19598if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 19599 cat >>confdefs.h <<_ACEOF
503d2be0 19600#define HAVE_LIBKRB4 1
c0d27fcc 19601_ACEOF
a21616bd
KR
19602
19603 LIBS="-lkrb4 $LIBS"
19604
19605else
503d2be0 19606
ca81d7a0
JD
19607{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
19608echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
19609if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
19610 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19611else
503d2be0 19612 ac_check_lib_save_LIBS=$LIBS
a21616bd 19613LIBS="-lkrb $LIBS"
503d2be0 19614cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19615/* confdefs.h. */
19616_ACEOF
19617cat confdefs.h >>conftest.$ac_ext
19618cat >>conftest.$ac_ext <<_ACEOF
19619/* end confdefs.h. */
503d2be0 19620
ca81d7a0
JD
19621/* Override any GCC internal prototype to avoid an error.
19622 Use char because int might match the return type of a GCC
19623 builtin and then its argument prototype would still apply. */
503d2be0
AS
19624#ifdef __cplusplus
19625extern "C"
19626#endif
503d2be0
AS
19627char krb_get_cred ();
19628int
19629main ()
19630{
ca81d7a0 19631return krb_get_cred ();
503d2be0
AS
19632 ;
19633 return 0;
19634}
19635_ACEOF
19636rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19637if { (ac_try="$ac_link"
19638case "(($ac_try" in
19639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19640 *) ac_try_echo=$ac_try;;
19641esac
19642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19643 (eval "$ac_link") 2>conftest.er1
503d2be0 19644 ac_status=$?
edfaf76d
LK
19645 grep -v '^ *+' conftest.er1 >conftest.err
19646 rm -f conftest.er1
19647 cat conftest.err >&5
c0d27fcc 19648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19649 (exit $ac_status); } && {
19650 test -z "$ac_c_werror_flag" ||
19651 test ! -s conftest.err
19652 } && test -s conftest$ac_exeext &&
19653 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19654 ac_cv_lib_krb_krb_get_cred=yes
19655else
19656 echo "$as_me: failed program was:" >&5
19650fd6
AS
19657sed 's/^/| /' conftest.$ac_ext >&5
19658
ca81d7a0 19659 ac_cv_lib_krb_krb_get_cred=no
503d2be0 19660fi
ca81d7a0 19661
f053c89f 19662rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19663 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19664LIBS=$ac_check_lib_save_LIBS
19665fi
ca81d7a0
JD
19666{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
19667echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 19668if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 19669 cat >>confdefs.h <<_ACEOF
503d2be0 19670#define HAVE_LIBKRB 1
c0d27fcc 19671_ACEOF
a21616bd
KR
19672
19673 LIBS="-lkrb $LIBS"
19674
a21616bd
KR
19675fi
19676
19677fi
19678
19679 fi
19680
19681 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
19682
19683for ac_header in krb5.h
a21616bd 19684do
503d2be0 19685as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
19686if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19687 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19688echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19689if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19690 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 19691fi
ca81d7a0
JD
19692ac_res=`eval echo '${'$as_ac_Header'}'`
19693 { echo "$as_me:$LINENO: result: $ac_res" >&5
19694echo "${ECHO_T}$ac_res" >&6; }
98418dba 19695else
c0d27fcc 19696 # Is the header compilable?
ca81d7a0
JD
19697{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
19698echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 19699cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19700/* confdefs.h. */
19701_ACEOF
19702cat confdefs.h >>conftest.$ac_ext
19703cat >>conftest.$ac_ext <<_ACEOF
19704/* end confdefs.h. */
c0d27fcc
MR
19705$ac_includes_default
19706#include <$ac_header>
19707_ACEOF
19708rm -f conftest.$ac_objext
ca81d7a0
JD
19709if { (ac_try="$ac_compile"
19710case "(($ac_try" in
19711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19712 *) ac_try_echo=$ac_try;;
19713esac
19714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19715 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 19716 ac_status=$?
edfaf76d
LK
19717 grep -v '^ *+' conftest.er1 >conftest.err
19718 rm -f conftest.er1
19719 cat conftest.err >&5
c0d27fcc 19720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19721 (exit $ac_status); } && {
19722 test -z "$ac_c_werror_flag" ||
19723 test ! -s conftest.err
19724 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
19725 ac_header_compiler=yes
19726else
19727 echo "$as_me: failed program was:" >&5
19650fd6
AS
19728sed 's/^/| /' conftest.$ac_ext >&5
19729
ca81d7a0 19730 ac_header_compiler=no
c0d27fcc 19731fi
ca81d7a0
JD
19732
19733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19734{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19735echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
19736
19737# Is the header present?
ca81d7a0
JD
19738{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
19739echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 19740cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19741/* confdefs.h. */
19742_ACEOF
19743cat confdefs.h >>conftest.$ac_ext
19744cat >>conftest.$ac_ext <<_ACEOF
19745/* end confdefs.h. */
503d2be0
AS
19746#include <$ac_header>
19747_ACEOF
ca81d7a0
JD
19748if { (ac_try="$ac_cpp conftest.$ac_ext"
19749case "(($ac_try" in
19750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19751 *) ac_try_echo=$ac_try;;
19752esac
19753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19754 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 19755 ac_status=$?
6bae0ccf 19756 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19757 rm -f conftest.er1
19758 cat conftest.err >&5
c0d27fcc 19759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19760 (exit $ac_status); } >/dev/null && {
19761 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19762 test ! -s conftest.err
19763 }; then
c0d27fcc 19764 ac_header_preproc=yes
503d2be0
AS
19765else
19766 echo "$as_me: failed program was:" >&5
19650fd6
AS
19767sed 's/^/| /' conftest.$ac_ext >&5
19768
c0d27fcc 19769 ac_header_preproc=no
a21616bd 19770fi
ca81d7a0 19771
503d2be0 19772rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
19773{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19774echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
19775
19776# So? What about this header?
edfaf76d
LK
19777case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19778 yes:no: )
c0d27fcc
MR
19779 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19780echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19781 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19782echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19783 ac_header_preproc=yes
19650fd6 19784 ;;
edfaf76d 19785 no:yes:* )
c0d27fcc
MR
19786 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19787echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19788 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19789echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19790 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19791echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19792 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19793echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19794 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19795echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19796 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19797echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 19798
19650fd6 19799 ;;
c0d27fcc 19800esac
ca81d7a0
JD
19801{ echo "$as_me:$LINENO: checking for $ac_header" >&5
19802echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19803if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
19804 echo $ECHO_N "(cached) $ECHO_C" >&6
19805else
edfaf76d 19806 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19807fi
ca81d7a0
JD
19808ac_res=`eval echo '${'$as_ac_Header'}'`
19809 { echo "$as_me:$LINENO: result: $ac_res" >&5
19810echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
19811
19812fi
503d2be0 19813if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19814 cat >>confdefs.h <<_ACEOF
503d2be0 19815#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19816_ACEOF
503d2be0 19817
a21616bd 19818fi
c0d27fcc 19819
a21616bd
KR
19820done
19821
19822 else
503d2be0
AS
19823
19824for ac_header in des.h
a21616bd 19825do
503d2be0 19826as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
19827if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19828 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19829echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19830if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19831 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 19832fi
ca81d7a0
JD
19833ac_res=`eval echo '${'$as_ac_Header'}'`
19834 { echo "$as_me:$LINENO: result: $ac_res" >&5
19835echo "${ECHO_T}$ac_res" >&6; }
98418dba 19836else
c0d27fcc 19837 # Is the header compilable?
ca81d7a0
JD
19838{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
19839echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 19840cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19841/* confdefs.h. */
19842_ACEOF
19843cat confdefs.h >>conftest.$ac_ext
19844cat >>conftest.$ac_ext <<_ACEOF
19845/* end confdefs.h. */
c0d27fcc
MR
19846$ac_includes_default
19847#include <$ac_header>
19848_ACEOF
19849rm -f conftest.$ac_objext
ca81d7a0
JD
19850if { (ac_try="$ac_compile"
19851case "(($ac_try" in
19852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19853 *) ac_try_echo=$ac_try;;
19854esac
19855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19856 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 19857 ac_status=$?
edfaf76d
LK
19858 grep -v '^ *+' conftest.er1 >conftest.err
19859 rm -f conftest.er1
19860 cat conftest.err >&5
c0d27fcc 19861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19862 (exit $ac_status); } && {
19863 test -z "$ac_c_werror_flag" ||
19864 test ! -s conftest.err
19865 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
19866 ac_header_compiler=yes
19867else
19868 echo "$as_me: failed program was:" >&5
19650fd6
AS
19869sed 's/^/| /' conftest.$ac_ext >&5
19870
ca81d7a0 19871 ac_header_compiler=no
c0d27fcc 19872fi
ca81d7a0
JD
19873
19874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19875{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19876echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
19877
19878# Is the header present?
ca81d7a0
JD
19879{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
19880echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 19881cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19882/* confdefs.h. */
19883_ACEOF
19884cat confdefs.h >>conftest.$ac_ext
19885cat >>conftest.$ac_ext <<_ACEOF
19886/* end confdefs.h. */
503d2be0
AS
19887#include <$ac_header>
19888_ACEOF
ca81d7a0
JD
19889if { (ac_try="$ac_cpp conftest.$ac_ext"
19890case "(($ac_try" in
19891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19892 *) ac_try_echo=$ac_try;;
19893esac
19894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19895 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 19896 ac_status=$?
6bae0ccf 19897 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
19898 rm -f conftest.er1
19899 cat conftest.err >&5
c0d27fcc 19900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19901 (exit $ac_status); } >/dev/null && {
19902 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
19903 test ! -s conftest.err
19904 }; then
c0d27fcc 19905 ac_header_preproc=yes
503d2be0
AS
19906else
19907 echo "$as_me: failed program was:" >&5
19650fd6
AS
19908sed 's/^/| /' conftest.$ac_ext >&5
19909
c0d27fcc 19910 ac_header_preproc=no
a21616bd 19911fi
ca81d7a0 19912
503d2be0 19913rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
19914{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19915echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
19916
19917# So? What about this header?
edfaf76d
LK
19918case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19919 yes:no: )
c0d27fcc
MR
19920 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
19921echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
19922 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
19923echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
19924 ac_header_preproc=yes
19650fd6 19925 ;;
edfaf76d 19926 no:yes:* )
c0d27fcc
MR
19927 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
19928echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
19929 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
19930echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
19931 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
19932echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
19933 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
19934echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 19935 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 19936echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
19937 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
19938echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 19939
19650fd6 19940 ;;
c0d27fcc 19941esac
ca81d7a0
JD
19942{ echo "$as_me:$LINENO: checking for $ac_header" >&5
19943echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19944if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
19945 echo $ECHO_N "(cached) $ECHO_C" >&6
19946else
edfaf76d 19947 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 19948fi
ca81d7a0
JD
19949ac_res=`eval echo '${'$as_ac_Header'}'`
19950 { echo "$as_me:$LINENO: result: $ac_res" >&5
19951echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
19952
19953fi
503d2be0 19954if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 19955 cat >>confdefs.h <<_ACEOF
503d2be0 19956#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 19957_ACEOF
503d2be0 19958
a21616bd 19959else
503d2be0
AS
19960
19961for ac_header in kerberosIV/des.h
a21616bd 19962do
503d2be0 19963as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
19964if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
19965 { echo "$as_me:$LINENO: checking for $ac_header" >&5
19966echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
19967if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19968 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 19969fi
ca81d7a0
JD
19970ac_res=`eval echo '${'$as_ac_Header'}'`
19971 { echo "$as_me:$LINENO: result: $ac_res" >&5
19972echo "${ECHO_T}$ac_res" >&6; }
98418dba 19973else
c0d27fcc 19974 # Is the header compilable?
ca81d7a0
JD
19975{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
19976echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 19977cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19978/* confdefs.h. */
19979_ACEOF
19980cat confdefs.h >>conftest.$ac_ext
19981cat >>conftest.$ac_ext <<_ACEOF
19982/* end confdefs.h. */
c0d27fcc
MR
19983$ac_includes_default
19984#include <$ac_header>
19985_ACEOF
19986rm -f conftest.$ac_objext
ca81d7a0
JD
19987if { (ac_try="$ac_compile"
19988case "(($ac_try" in
19989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19990 *) ac_try_echo=$ac_try;;
19991esac
19992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19993 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 19994 ac_status=$?
edfaf76d
LK
19995 grep -v '^ *+' conftest.er1 >conftest.err
19996 rm -f conftest.er1
19997 cat conftest.err >&5
c0d27fcc 19998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19999 (exit $ac_status); } && {
20000 test -z "$ac_c_werror_flag" ||
20001 test ! -s conftest.err
20002 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20003 ac_header_compiler=yes
20004else
20005 echo "$as_me: failed program was:" >&5
19650fd6
AS
20006sed 's/^/| /' conftest.$ac_ext >&5
20007
ca81d7a0 20008 ac_header_compiler=no
c0d27fcc 20009fi
ca81d7a0
JD
20010
20011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20012{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20013echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20014
20015# Is the header present?
ca81d7a0
JD
20016{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20017echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20018cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20019/* confdefs.h. */
20020_ACEOF
20021cat confdefs.h >>conftest.$ac_ext
20022cat >>conftest.$ac_ext <<_ACEOF
20023/* end confdefs.h. */
503d2be0
AS
20024#include <$ac_header>
20025_ACEOF
ca81d7a0
JD
20026if { (ac_try="$ac_cpp conftest.$ac_ext"
20027case "(($ac_try" in
20028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20029 *) ac_try_echo=$ac_try;;
20030esac
20031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20032 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20033 ac_status=$?
6bae0ccf 20034 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20035 rm -f conftest.er1
20036 cat conftest.err >&5
c0d27fcc 20037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20038 (exit $ac_status); } >/dev/null && {
20039 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20040 test ! -s conftest.err
20041 }; then
c0d27fcc 20042 ac_header_preproc=yes
503d2be0
AS
20043else
20044 echo "$as_me: failed program was:" >&5
19650fd6
AS
20045sed 's/^/| /' conftest.$ac_ext >&5
20046
c0d27fcc 20047 ac_header_preproc=no
a21616bd 20048fi
ca81d7a0 20049
503d2be0 20050rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20051{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20052echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20053
20054# So? What about this header?
edfaf76d
LK
20055case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20056 yes:no: )
c0d27fcc
MR
20057 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20058echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20059 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20060echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20061 ac_header_preproc=yes
19650fd6 20062 ;;
edfaf76d 20063 no:yes:* )
c0d27fcc
MR
20064 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20065echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20066 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20067echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20068 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20069echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20070 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20071echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20072 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20073echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20074 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20075echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20076
19650fd6 20077 ;;
c0d27fcc 20078esac
ca81d7a0
JD
20079{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20080echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20081if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20082 echo $ECHO_N "(cached) $ECHO_C" >&6
20083else
edfaf76d 20084 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20085fi
ca81d7a0
JD
20086ac_res=`eval echo '${'$as_ac_Header'}'`
20087 { echo "$as_me:$LINENO: result: $ac_res" >&5
20088echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20089
20090fi
503d2be0 20091if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20092 cat >>confdefs.h <<_ACEOF
503d2be0 20093#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20094_ACEOF
503d2be0 20095
a21616bd 20096else
503d2be0
AS
20097
20098for ac_header in kerberos/des.h
a21616bd 20099do
503d2be0 20100as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20101if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20102 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20103echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20104if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20105 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20106fi
ca81d7a0
JD
20107ac_res=`eval echo '${'$as_ac_Header'}'`
20108 { echo "$as_me:$LINENO: result: $ac_res" >&5
20109echo "${ECHO_T}$ac_res" >&6; }
98418dba 20110else
c0d27fcc 20111 # Is the header compilable?
ca81d7a0
JD
20112{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20113echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20114cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20115/* confdefs.h. */
20116_ACEOF
20117cat confdefs.h >>conftest.$ac_ext
20118cat >>conftest.$ac_ext <<_ACEOF
20119/* end confdefs.h. */
c0d27fcc
MR
20120$ac_includes_default
20121#include <$ac_header>
20122_ACEOF
20123rm -f conftest.$ac_objext
ca81d7a0
JD
20124if { (ac_try="$ac_compile"
20125case "(($ac_try" in
20126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20127 *) ac_try_echo=$ac_try;;
20128esac
20129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20130 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20131 ac_status=$?
edfaf76d
LK
20132 grep -v '^ *+' conftest.er1 >conftest.err
20133 rm -f conftest.er1
20134 cat conftest.err >&5
c0d27fcc 20135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20136 (exit $ac_status); } && {
20137 test -z "$ac_c_werror_flag" ||
20138 test ! -s conftest.err
20139 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20140 ac_header_compiler=yes
20141else
20142 echo "$as_me: failed program was:" >&5
19650fd6
AS
20143sed 's/^/| /' conftest.$ac_ext >&5
20144
ca81d7a0 20145 ac_header_compiler=no
c0d27fcc 20146fi
ca81d7a0
JD
20147
20148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20149{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20150echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20151
20152# Is the header present?
ca81d7a0
JD
20153{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20154echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20155cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20156/* confdefs.h. */
20157_ACEOF
20158cat confdefs.h >>conftest.$ac_ext
20159cat >>conftest.$ac_ext <<_ACEOF
20160/* end confdefs.h. */
503d2be0
AS
20161#include <$ac_header>
20162_ACEOF
ca81d7a0
JD
20163if { (ac_try="$ac_cpp conftest.$ac_ext"
20164case "(($ac_try" in
20165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20166 *) ac_try_echo=$ac_try;;
20167esac
20168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20169 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20170 ac_status=$?
6bae0ccf 20171 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20172 rm -f conftest.er1
20173 cat conftest.err >&5
c0d27fcc 20174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20175 (exit $ac_status); } >/dev/null && {
20176 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20177 test ! -s conftest.err
20178 }; then
c0d27fcc 20179 ac_header_preproc=yes
503d2be0
AS
20180else
20181 echo "$as_me: failed program was:" >&5
19650fd6
AS
20182sed 's/^/| /' conftest.$ac_ext >&5
20183
c0d27fcc 20184 ac_header_preproc=no
a21616bd 20185fi
ca81d7a0 20186
503d2be0 20187rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20188{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20189echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20190
20191# So? What about this header?
edfaf76d
LK
20192case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20193 yes:no: )
c0d27fcc
MR
20194 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20195echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20196 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20197echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20198 ac_header_preproc=yes
19650fd6 20199 ;;
edfaf76d 20200 no:yes:* )
c0d27fcc
MR
20201 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20202echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20203 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20204echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20205 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20206echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20207 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20208echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20209 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20210echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20211 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20212echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20213
19650fd6 20214 ;;
c0d27fcc 20215esac
ca81d7a0
JD
20216{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20217echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20218if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20219 echo $ECHO_N "(cached) $ECHO_C" >&6
20220else
edfaf76d 20221 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20222fi
ca81d7a0
JD
20223ac_res=`eval echo '${'$as_ac_Header'}'`
20224 { echo "$as_me:$LINENO: result: $ac_res" >&5
20225echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20226
20227fi
503d2be0 20228if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20229 cat >>confdefs.h <<_ACEOF
503d2be0 20230#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20231_ACEOF
a21616bd
KR
20232
20233fi
c0d27fcc 20234
a21616bd
KR
20235done
20236
98418dba 20237fi
c0d27fcc 20238
925c2f3f
EZ
20239done
20240
98418dba 20241fi
c0d27fcc 20242
925c2f3f 20243done
98418dba 20244
c0d27fcc 20245
925c2f3f
EZ
20246for ac_header in krb.h
20247do
20248as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20249if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20250 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20251echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20252if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 20253 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20254fi
ca81d7a0
JD
20255ac_res=`eval echo '${'$as_ac_Header'}'`
20256 { echo "$as_me:$LINENO: result: $ac_res" >&5
20257echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20258else
20259 # Is the header compilable?
ca81d7a0
JD
20260{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20261echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20262cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20263/* confdefs.h. */
20264_ACEOF
20265cat confdefs.h >>conftest.$ac_ext
20266cat >>conftest.$ac_ext <<_ACEOF
20267/* end confdefs.h. */
c0d27fcc
MR
20268$ac_includes_default
20269#include <$ac_header>
20270_ACEOF
20271rm -f conftest.$ac_objext
ca81d7a0
JD
20272if { (ac_try="$ac_compile"
20273case "(($ac_try" in
20274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20275 *) ac_try_echo=$ac_try;;
20276esac
20277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20278 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20279 ac_status=$?
edfaf76d
LK
20280 grep -v '^ *+' conftest.er1 >conftest.err
20281 rm -f conftest.er1
20282 cat conftest.err >&5
c0d27fcc 20283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20284 (exit $ac_status); } && {
20285 test -z "$ac_c_werror_flag" ||
20286 test ! -s conftest.err
20287 } && test -s conftest.$ac_objext; then
c0d27fcc 20288 ac_header_compiler=yes
925c2f3f 20289else
c0d27fcc 20290 echo "$as_me: failed program was:" >&5
19650fd6
AS
20291sed 's/^/| /' conftest.$ac_ext >&5
20292
ca81d7a0 20293 ac_header_compiler=no
c0d27fcc 20294fi
ca81d7a0
JD
20295
20296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20297{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20298echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20299
20300# Is the header present?
ca81d7a0
JD
20301{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20302echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20303cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20304/* confdefs.h. */
20305_ACEOF
20306cat confdefs.h >>conftest.$ac_ext
20307cat >>conftest.$ac_ext <<_ACEOF
20308/* end confdefs.h. */
503d2be0
AS
20309#include <$ac_header>
20310_ACEOF
ca81d7a0
JD
20311if { (ac_try="$ac_cpp conftest.$ac_ext"
20312case "(($ac_try" in
20313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20314 *) ac_try_echo=$ac_try;;
20315esac
20316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20317 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20318 ac_status=$?
6bae0ccf 20319 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20320 rm -f conftest.er1
20321 cat conftest.err >&5
c0d27fcc 20322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20323 (exit $ac_status); } >/dev/null && {
20324 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20325 test ! -s conftest.err
20326 }; then
c0d27fcc 20327 ac_header_preproc=yes
503d2be0
AS
20328else
20329 echo "$as_me: failed program was:" >&5
19650fd6
AS
20330sed 's/^/| /' conftest.$ac_ext >&5
20331
c0d27fcc 20332 ac_header_preproc=no
a21616bd 20333fi
ca81d7a0 20334
503d2be0 20335rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20336{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20337echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20338
20339# So? What about this header?
edfaf76d
LK
20340case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20341 yes:no: )
c0d27fcc
MR
20342 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20343echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20344 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20345echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20346 ac_header_preproc=yes
19650fd6 20347 ;;
edfaf76d 20348 no:yes:* )
c0d27fcc
MR
20349 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20350echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20351 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20352echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20353 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20354echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20355 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20356echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20357 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20358echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20359 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20360echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20361
19650fd6 20362 ;;
c0d27fcc 20363esac
ca81d7a0
JD
20364{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20365echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20366if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20367 echo $ECHO_N "(cached) $ECHO_C" >&6
20368else
edfaf76d 20369 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20370fi
ca81d7a0
JD
20371ac_res=`eval echo '${'$as_ac_Header'}'`
20372 { echo "$as_me:$LINENO: result: $ac_res" >&5
20373echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20374
20375fi
503d2be0 20376if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20377 cat >>confdefs.h <<_ACEOF
503d2be0 20378#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20379_ACEOF
503d2be0 20380
a21616bd 20381else
503d2be0
AS
20382
20383for ac_header in kerberosIV/krb.h
a21616bd 20384do
503d2be0 20385as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20386if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20387 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20388echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20389if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20390 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20391fi
ca81d7a0
JD
20392ac_res=`eval echo '${'$as_ac_Header'}'`
20393 { echo "$as_me:$LINENO: result: $ac_res" >&5
20394echo "${ECHO_T}$ac_res" >&6; }
98418dba 20395else
c0d27fcc 20396 # Is the header compilable?
ca81d7a0
JD
20397{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20398echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20399cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20400/* confdefs.h. */
20401_ACEOF
20402cat confdefs.h >>conftest.$ac_ext
20403cat >>conftest.$ac_ext <<_ACEOF
20404/* end confdefs.h. */
c0d27fcc
MR
20405$ac_includes_default
20406#include <$ac_header>
20407_ACEOF
20408rm -f conftest.$ac_objext
ca81d7a0
JD
20409if { (ac_try="$ac_compile"
20410case "(($ac_try" in
20411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20412 *) ac_try_echo=$ac_try;;
20413esac
20414eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20415 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20416 ac_status=$?
edfaf76d
LK
20417 grep -v '^ *+' conftest.er1 >conftest.err
20418 rm -f conftest.er1
20419 cat conftest.err >&5
c0d27fcc 20420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20421 (exit $ac_status); } && {
20422 test -z "$ac_c_werror_flag" ||
20423 test ! -s conftest.err
20424 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20425 ac_header_compiler=yes
20426else
20427 echo "$as_me: failed program was:" >&5
19650fd6
AS
20428sed 's/^/| /' conftest.$ac_ext >&5
20429
ca81d7a0 20430 ac_header_compiler=no
c0d27fcc 20431fi
ca81d7a0
JD
20432
20433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20434{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20435echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20436
20437# Is the header present?
ca81d7a0
JD
20438{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20439echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20440cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20441/* confdefs.h. */
20442_ACEOF
20443cat confdefs.h >>conftest.$ac_ext
20444cat >>conftest.$ac_ext <<_ACEOF
20445/* end confdefs.h. */
503d2be0
AS
20446#include <$ac_header>
20447_ACEOF
ca81d7a0
JD
20448if { (ac_try="$ac_cpp conftest.$ac_ext"
20449case "(($ac_try" in
20450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20451 *) ac_try_echo=$ac_try;;
20452esac
20453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20454 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20455 ac_status=$?
6bae0ccf 20456 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20457 rm -f conftest.er1
20458 cat conftest.err >&5
c0d27fcc 20459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20460 (exit $ac_status); } >/dev/null && {
20461 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20462 test ! -s conftest.err
20463 }; then
c0d27fcc 20464 ac_header_preproc=yes
503d2be0
AS
20465else
20466 echo "$as_me: failed program was:" >&5
19650fd6
AS
20467sed 's/^/| /' conftest.$ac_ext >&5
20468
c0d27fcc 20469 ac_header_preproc=no
a21616bd 20470fi
ca81d7a0 20471
503d2be0 20472rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20473{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20474echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20475
20476# So? What about this header?
edfaf76d
LK
20477case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20478 yes:no: )
c0d27fcc
MR
20479 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20480echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20481 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20482echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20483 ac_header_preproc=yes
19650fd6 20484 ;;
edfaf76d 20485 no:yes:* )
c0d27fcc
MR
20486 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20487echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20488 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20489echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20490 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20491echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20492 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20493echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20494 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20495echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20496 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20497echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20498
19650fd6 20499 ;;
c0d27fcc 20500esac
ca81d7a0
JD
20501{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20502echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20503if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20504 echo $ECHO_N "(cached) $ECHO_C" >&6
20505else
edfaf76d 20506 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20507fi
ca81d7a0
JD
20508ac_res=`eval echo '${'$as_ac_Header'}'`
20509 { echo "$as_me:$LINENO: result: $ac_res" >&5
20510echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20511
20512fi
503d2be0 20513if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20514 cat >>confdefs.h <<_ACEOF
503d2be0 20515#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20516_ACEOF
503d2be0 20517
a21616bd 20518else
503d2be0
AS
20519
20520for ac_header in kerberos/krb.h
a21616bd 20521do
503d2be0 20522as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20523if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20524 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20525echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20526if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20527 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20528fi
ca81d7a0
JD
20529ac_res=`eval echo '${'$as_ac_Header'}'`
20530 { echo "$as_me:$LINENO: result: $ac_res" >&5
20531echo "${ECHO_T}$ac_res" >&6; }
98418dba 20532else
c0d27fcc 20533 # Is the header compilable?
ca81d7a0
JD
20534{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20535echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20536cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20537/* confdefs.h. */
20538_ACEOF
20539cat confdefs.h >>conftest.$ac_ext
20540cat >>conftest.$ac_ext <<_ACEOF
20541/* end confdefs.h. */
c0d27fcc
MR
20542$ac_includes_default
20543#include <$ac_header>
20544_ACEOF
20545rm -f conftest.$ac_objext
ca81d7a0
JD
20546if { (ac_try="$ac_compile"
20547case "(($ac_try" in
20548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20549 *) ac_try_echo=$ac_try;;
20550esac
20551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20552 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20553 ac_status=$?
edfaf76d
LK
20554 grep -v '^ *+' conftest.er1 >conftest.err
20555 rm -f conftest.er1
20556 cat conftest.err >&5
c0d27fcc 20557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20558 (exit $ac_status); } && {
20559 test -z "$ac_c_werror_flag" ||
20560 test ! -s conftest.err
20561 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20562 ac_header_compiler=yes
20563else
20564 echo "$as_me: failed program was:" >&5
19650fd6
AS
20565sed 's/^/| /' conftest.$ac_ext >&5
20566
ca81d7a0 20567 ac_header_compiler=no
c0d27fcc 20568fi
ca81d7a0
JD
20569
20570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20571{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20572echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20573
20574# Is the header present?
ca81d7a0
JD
20575{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20576echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20577cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20578/* confdefs.h. */
20579_ACEOF
20580cat confdefs.h >>conftest.$ac_ext
20581cat >>conftest.$ac_ext <<_ACEOF
20582/* end confdefs.h. */
503d2be0
AS
20583#include <$ac_header>
20584_ACEOF
ca81d7a0
JD
20585if { (ac_try="$ac_cpp conftest.$ac_ext"
20586case "(($ac_try" in
20587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20588 *) ac_try_echo=$ac_try;;
20589esac
20590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20591 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20592 ac_status=$?
6bae0ccf 20593 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20594 rm -f conftest.er1
20595 cat conftest.err >&5
c0d27fcc 20596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20597 (exit $ac_status); } >/dev/null && {
20598 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20599 test ! -s conftest.err
20600 }; then
c0d27fcc 20601 ac_header_preproc=yes
503d2be0
AS
20602else
20603 echo "$as_me: failed program was:" >&5
19650fd6
AS
20604sed 's/^/| /' conftest.$ac_ext >&5
20605
c0d27fcc 20606 ac_header_preproc=no
a21616bd 20607fi
ca81d7a0 20608
503d2be0 20609rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20610{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20611echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
20612
20613# So? What about this header?
edfaf76d
LK
20614case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20615 yes:no: )
35996d22
AS
20616 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20617echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20618 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20619echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20620 ac_header_preproc=yes
19650fd6 20621 ;;
edfaf76d 20622 no:yes:* )
c0d27fcc
MR
20623 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20624echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20625 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20626echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20627 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20628echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20629 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20630echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20631 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20632echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20633 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20634echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20635
19650fd6 20636 ;;
c0d27fcc 20637esac
ca81d7a0
JD
20638{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20639echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20640if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20641 echo $ECHO_N "(cached) $ECHO_C" >&6
20642else
edfaf76d 20643 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20644fi
ca81d7a0
JD
20645ac_res=`eval echo '${'$as_ac_Header'}'`
20646 { echo "$as_me:$LINENO: result: $ac_res" >&5
20647echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20648
20649fi
503d2be0 20650if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20651 cat >>confdefs.h <<_ACEOF
503d2be0 20652#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20653_ACEOF
503d2be0 20654
a21616bd 20655fi
c0d27fcc 20656
a21616bd
KR
20657done
20658
20659fi
c0d27fcc 20660
a21616bd
KR
20661done
20662
20663fi
c0d27fcc 20664
a21616bd
KR
20665done
20666
20667 fi
503d2be0
AS
20668
20669for ac_header in com_err.h
a21616bd 20670do
503d2be0 20671as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20672if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20673 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20674echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20675if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20676 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20677fi
ca81d7a0
JD
20678ac_res=`eval echo '${'$as_ac_Header'}'`
20679 { echo "$as_me:$LINENO: result: $ac_res" >&5
20680echo "${ECHO_T}$ac_res" >&6; }
98418dba 20681else
c0d27fcc 20682 # Is the header compilable?
ca81d7a0
JD
20683{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20684echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20685cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20686/* confdefs.h. */
20687_ACEOF
20688cat confdefs.h >>conftest.$ac_ext
20689cat >>conftest.$ac_ext <<_ACEOF
20690/* end confdefs.h. */
c0d27fcc
MR
20691$ac_includes_default
20692#include <$ac_header>
20693_ACEOF
20694rm -f conftest.$ac_objext
ca81d7a0
JD
20695if { (ac_try="$ac_compile"
20696case "(($ac_try" in
20697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20698 *) ac_try_echo=$ac_try;;
20699esac
20700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20701 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
20702 ac_status=$?
20703 grep -v '^ *+' conftest.er1 >conftest.err
20704 rm -f conftest.er1
20705 cat conftest.err >&5
20706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20707 (exit $ac_status); } && {
20708 test -z "$ac_c_werror_flag" ||
20709 test ! -s conftest.err
20710 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20711 ac_header_compiler=yes
20712else
20713 echo "$as_me: failed program was:" >&5
19650fd6
AS
20714sed 's/^/| /' conftest.$ac_ext >&5
20715
ca81d7a0 20716 ac_header_compiler=no
c0d27fcc 20717fi
ca81d7a0
JD
20718
20719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20720{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20721echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20722
20723# Is the header present?
ca81d7a0
JD
20724{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20725echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20726cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20727/* confdefs.h. */
20728_ACEOF
20729cat confdefs.h >>conftest.$ac_ext
20730cat >>conftest.$ac_ext <<_ACEOF
20731/* end confdefs.h. */
503d2be0
AS
20732#include <$ac_header>
20733_ACEOF
ca81d7a0
JD
20734if { (ac_try="$ac_cpp conftest.$ac_ext"
20735case "(($ac_try" in
20736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20737 *) ac_try_echo=$ac_try;;
20738esac
20739eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20740 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20741 ac_status=$?
6bae0ccf 20742 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20743 rm -f conftest.er1
20744 cat conftest.err >&5
c0d27fcc 20745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20746 (exit $ac_status); } >/dev/null && {
20747 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20748 test ! -s conftest.err
20749 }; then
c0d27fcc 20750 ac_header_preproc=yes
503d2be0
AS
20751else
20752 echo "$as_me: failed program was:" >&5
19650fd6
AS
20753sed 's/^/| /' conftest.$ac_ext >&5
20754
c0d27fcc 20755 ac_header_preproc=no
a21616bd 20756fi
ca81d7a0 20757
503d2be0 20758rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20759{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20760echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20761
20762# So? What about this header?
edfaf76d
LK
20763case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20764 yes:no: )
c0d27fcc
MR
20765 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20766echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20767 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20768echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20769 ac_header_preproc=yes
19650fd6 20770 ;;
edfaf76d 20771 no:yes:* )
c0d27fcc
MR
20772 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20773echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20774 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20775echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20776 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20777echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20778 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20779echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20780 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20781echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20782 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20783echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20784
19650fd6 20785 ;;
c0d27fcc 20786esac
ca81d7a0
JD
20787{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20788echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20789if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20790 echo $ECHO_N "(cached) $ECHO_C" >&6
20791else
edfaf76d 20792 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20793fi
ca81d7a0
JD
20794ac_res=`eval echo '${'$as_ac_Header'}'`
20795 { echo "$as_me:$LINENO: result: $ac_res" >&5
20796echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20797
20798fi
503d2be0 20799if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20800 cat >>confdefs.h <<_ACEOF
503d2be0 20801#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20802_ACEOF
503d2be0 20803
a21616bd 20804fi
c0d27fcc 20805
a21616bd
KR
20806done
20807
20808fi
20809
ba4481b5
DL
20810# Solaris requires -lintl if you want strerror (which calls dgettext)
20811# to return localized messages.
503d2be0 20812
ca81d7a0
JD
20813{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
20814echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
20815if test "${ac_cv_lib_intl_dgettext+set}" = set; then
20816 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 20817else
503d2be0 20818 ac_check_lib_save_LIBS=$LIBS
ba4481b5 20819LIBS="-lintl $LIBS"
503d2be0 20820cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20821/* confdefs.h. */
20822_ACEOF
20823cat confdefs.h >>conftest.$ac_ext
20824cat >>conftest.$ac_ext <<_ACEOF
20825/* end confdefs.h. */
503d2be0 20826
ca81d7a0
JD
20827/* Override any GCC internal prototype to avoid an error.
20828 Use char because int might match the return type of a GCC
20829 builtin and then its argument prototype would still apply. */
503d2be0
AS
20830#ifdef __cplusplus
20831extern "C"
20832#endif
503d2be0
AS
20833char dgettext ();
20834int
20835main ()
20836{
ca81d7a0 20837return dgettext ();
503d2be0
AS
20838 ;
20839 return 0;
20840}
20841_ACEOF
20842rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20843if { (ac_try="$ac_link"
20844case "(($ac_try" in
20845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20846 *) ac_try_echo=$ac_try;;
20847esac
20848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20849 (eval "$ac_link") 2>conftest.er1
503d2be0 20850 ac_status=$?
edfaf76d
LK
20851 grep -v '^ *+' conftest.er1 >conftest.err
20852 rm -f conftest.er1
20853 cat conftest.err >&5
c0d27fcc 20854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20855 (exit $ac_status); } && {
20856 test -z "$ac_c_werror_flag" ||
20857 test ! -s conftest.err
20858 } && test -s conftest$ac_exeext &&
20859 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20860 ac_cv_lib_intl_dgettext=yes
20861else
20862 echo "$as_me: failed program was:" >&5
19650fd6
AS
20863sed 's/^/| /' conftest.$ac_ext >&5
20864
ca81d7a0 20865 ac_cv_lib_intl_dgettext=no
503d2be0 20866fi
ca81d7a0 20867
f053c89f 20868rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20869 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20870LIBS=$ac_check_lib_save_LIBS
20871fi
ca81d7a0
JD
20872{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
20873echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 20874if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 20875 cat >>confdefs.h <<_ACEOF
503d2be0 20876#define HAVE_LIBINTL 1
c0d27fcc 20877_ACEOF
ba4481b5
DL
20878
20879 LIBS="-lintl $LIBS"
20880
ba4481b5
DL
20881fi
20882
c0d27fcc 20883
ca81d7a0
JD
20884{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
20885echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
20886if test "${emacs_cv_localtime_cache+set}" = set; then
20887 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
20888else
20889 if test x$ac_cv_func_tzset = xyes; then
20890if test "$cross_compiling" = yes; then
20891 # If we have tzset, assume the worst when cross-compiling.
20892emacs_cv_localtime_cache=yes
20893else
503d2be0 20894 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20895/* confdefs.h. */
20896_ACEOF
20897cat confdefs.h >>conftest.$ac_ext
20898cat >>conftest.$ac_ext <<_ACEOF
20899/* end confdefs.h. */
ba4481b5 20900#include <time.h>
ba4481b5
DL
20901extern char **environ;
20902unset_TZ ()
20903{
20904 char **from, **to;
20905 for (to = from = environ; (*to = *from); from++)
20906 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
20907 to++;
20908}
20909char TZ_GMT0[] = "TZ=GMT0";
20910char TZ_PST8[] = "TZ=PST8";
20911main()
20912{
20913 time_t now = time ((time_t *) 0);
20914 int hour_GMT0, hour_unset;
20915 if (putenv (TZ_GMT0) != 0)
20916 exit (1);
20917 hour_GMT0 = localtime (&now)->tm_hour;
20918 unset_TZ ();
20919 hour_unset = localtime (&now)->tm_hour;
20920 if (putenv (TZ_PST8) != 0)
20921 exit (1);
20922 if (localtime (&now)->tm_hour == hour_GMT0)
20923 exit (1);
20924 unset_TZ ();
20925 if (localtime (&now)->tm_hour != hour_unset)
20926 exit (1);
20927 exit (0);
20928}
503d2be0
AS
20929_ACEOF
20930rm -f conftest$ac_exeext
ca81d7a0
JD
20931if { (ac_try="$ac_link"
20932case "(($ac_try" in
20933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20934 *) ac_try_echo=$ac_try;;
20935esac
20936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20937 (eval "$ac_link") 2>&5
503d2be0 20938 ac_status=$?
c0d27fcc 20939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20940 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
20941 { (case "(($ac_try" in
20942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20943 *) ac_try_echo=$ac_try;;
20944esac
20945eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20946 (eval "$ac_try") 2>&5
503d2be0 20947 ac_status=$?
c0d27fcc 20948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 20949 (exit $ac_status); }; }; then
ba4481b5
DL
20950 emacs_cv_localtime_cache=no
20951else
503d2be0
AS
20952 echo "$as_me: program exited with status $ac_status" >&5
20953echo "$as_me: failed program was:" >&5
19650fd6
AS
20954sed 's/^/| /' conftest.$ac_ext >&5
20955
c0d27fcc 20956( exit $ac_status )
503d2be0 20957emacs_cv_localtime_cache=yes
ba4481b5 20958fi
ca81d7a0 20959rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 20960fi
ca81d7a0
JD
20961
20962
ba4481b5
DL
20963else
20964 # If we lack tzset, report that localtime does not cache TZ,
20965 # since we can't invalidate the cache if we don't have tzset.
20966 emacs_cv_localtime_cache=no
20967fi
20968fi
ca81d7a0
JD
20969{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
20970echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 20971if test $emacs_cv_localtime_cache = yes; then
b936fae4 20972
c0d27fcc 20973cat >>confdefs.h <<\_ACEOF
ba4481b5 20974#define LOCALTIME_CACHE 1
c0d27fcc 20975_ACEOF
ba4481b5
DL
20976
20977fi
20978
20979if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
20980
20981for ac_func in gettimeofday
48d4b120 20982do
503d2be0 20983as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
20984{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20985echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
20986if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20987 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 20988else
503d2be0 20989 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20990/* confdefs.h. */
20991_ACEOF
20992cat confdefs.h >>conftest.$ac_ext
20993cat >>conftest.$ac_ext <<_ACEOF
20994/* end confdefs.h. */
edfaf76d
LK
20995/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20996 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20997#define $ac_func innocuous_$ac_func
20998
48d4b120 20999/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21000 which can conflict with char $ac_func (); below.
21001 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21002 <limits.h> exists even on freestanding compilers. */
edfaf76d 21003
19650fd6
AS
21004#ifdef __STDC__
21005# include <limits.h>
21006#else
21007# include <assert.h>
21008#endif
edfaf76d
LK
21009
21010#undef $ac_func
21011
ca81d7a0
JD
21012/* Override any GCC internal prototype to avoid an error.
21013 Use char because int might match the return type of a GCC
21014 builtin and then its argument prototype would still apply. */
503d2be0
AS
21015#ifdef __cplusplus
21016extern "C"
21017#endif
503d2be0 21018char $ac_func ();
48d4b120
DL
21019/* The GNU C library defines this for functions which it implements
21020 to always fail with ENOSYS. Some functions are actually named
21021 something starting with __ and the normal name is an alias. */
ca81d7a0 21022#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 21023choke me
cd958eb3
MB
21024#endif
21025
19650fd6
AS
21026int
21027main ()
21028{
ca81d7a0 21029return $ac_func ();
503d2be0
AS
21030 ;
21031 return 0;
21032}
21033_ACEOF
21034rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21035if { (ac_try="$ac_link"
21036case "(($ac_try" in
21037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21038 *) ac_try_echo=$ac_try;;
21039esac
21040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21041 (eval "$ac_link") 2>conftest.er1
503d2be0 21042 ac_status=$?
edfaf76d
LK
21043 grep -v '^ *+' conftest.er1 >conftest.err
21044 rm -f conftest.er1
21045 cat conftest.err >&5
c0d27fcc 21046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21047 (exit $ac_status); } && {
21048 test -z "$ac_c_werror_flag" ||
21049 test ! -s conftest.err
21050 } && test -s conftest$ac_exeext &&
21051 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21052 eval "$as_ac_var=yes"
21053else
21054 echo "$as_me: failed program was:" >&5
19650fd6
AS
21055sed 's/^/| /' conftest.$ac_ext >&5
21056
ca81d7a0 21057 eval "$as_ac_var=no"
503d2be0 21058fi
ca81d7a0 21059
f053c89f 21060rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21061 conftest$ac_exeext conftest.$ac_ext
503d2be0 21062fi
ca81d7a0
JD
21063ac_res=`eval echo '${'$as_ac_var'}'`
21064 { echo "$as_me:$LINENO: result: $ac_res" >&5
21065echo "${ECHO_T}$ac_res" >&6; }
503d2be0 21066if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 21067 cat >>confdefs.h <<_ACEOF
503d2be0 21068#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 21069_ACEOF
48d4b120 21070
48d4b120
DL
21071fi
21072done
21073
b936fae4 21074 if test $ac_cv_func_gettimeofday = yes; then
ca81d7a0
JD
21075 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
21076echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
21077if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
21078 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21079else
503d2be0 21080 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21081/* confdefs.h. */
21082_ACEOF
21083cat confdefs.h >>conftest.$ac_ext
21084cat >>conftest.$ac_ext <<_ACEOF
21085/* end confdefs.h. */
ba4481b5 21086
a3f08d9e
DL
21087#ifdef TIME_WITH_SYS_TIME
21088#include <sys/time.h>
21089#include <time.h>
21090#else
21091#ifdef HAVE_SYS_TIME_H
21092#include <sys/time.h>
21093#else
21094#include <time.h>
21095#endif
21096#endif
503d2be0
AS
21097int
21098main ()
21099{
a3f08d9e 21100struct timeval time;
b936fae4 21101 gettimeofday (&time, 0);
503d2be0
AS
21102 ;
21103 return 0;
21104}
21105_ACEOF
21106rm -f conftest.$ac_objext
f053c89f
CY
21107if { (ac_try="$ac_compile"
21108case "(($ac_try" in
ca81d7a0
JD
21109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21110 *) ac_try_echo=$ac_try;;
21111esac
21112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 21113 (eval "$ac_compile") 2>conftest.er1
503d2be0 21114 ac_status=$?
f053c89f
CY
21115 grep -v '^ *+' conftest.er1 >conftest.err
21116 rm -f conftest.er1
21117 cat conftest.err >&5
c0d27fcc 21118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21119 (exit $ac_status); } && {
21120 test -z "$ac_c_werror_flag" ||
21121 test ! -s conftest.err
21122 } && test -s conftest.$ac_objext; then
ba4481b5
DL
21123 emacs_cv_gettimeofday_two_arguments=yes
21124else
503d2be0 21125 echo "$as_me: failed program was:" >&5
19650fd6
AS
21126sed 's/^/| /' conftest.$ac_ext >&5
21127
ca81d7a0 21128 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 21129fi
ca81d7a0
JD
21130
21131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21132fi
ca81d7a0
JD
21133{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
21134echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
21135 if test $emacs_cv_gettimeofday_two_arguments = no; then
21136
c0d27fcc 21137cat >>confdefs.h <<\_ACEOF
ba4481b5 21138#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 21139_ACEOF
ba4481b5 21140
b936fae4 21141 fi
ba4481b5
DL
21142 fi
21143fi
21144
21145ok_so_far=yes
ca81d7a0
JD
21146{ echo "$as_me:$LINENO: checking for socket" >&5
21147echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
21148if test "${ac_cv_func_socket+set}" = set; then
21149 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21150else
503d2be0 21151 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21152/* confdefs.h. */
21153_ACEOF
21154cat confdefs.h >>conftest.$ac_ext
21155cat >>conftest.$ac_ext <<_ACEOF
21156/* end confdefs.h. */
edfaf76d
LK
21157/* Define socket to an innocuous variant, in case <limits.h> declares socket.
21158 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21159#define socket innocuous_socket
21160
ba4481b5 21161/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21162 which can conflict with char socket (); below.
21163 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21164 <limits.h> exists even on freestanding compilers. */
edfaf76d 21165
19650fd6
AS
21166#ifdef __STDC__
21167# include <limits.h>
21168#else
21169# include <assert.h>
21170#endif
edfaf76d
LK
21171
21172#undef socket
21173
ca81d7a0
JD
21174/* Override any GCC internal prototype to avoid an error.
21175 Use char because int might match the return type of a GCC
21176 builtin and then its argument prototype would still apply. */
503d2be0
AS
21177#ifdef __cplusplus
21178extern "C"
21179#endif
503d2be0 21180char socket ();
ba4481b5
DL
21181/* The GNU C library defines this for functions which it implements
21182 to always fail with ENOSYS. Some functions are actually named
21183 something starting with __ and the normal name is an alias. */
ca81d7a0 21184#if defined __stub_socket || defined __stub___socket
ba4481b5 21185choke me
cd958eb3
MB
21186#endif
21187
19650fd6
AS
21188int
21189main ()
21190{
ca81d7a0 21191return socket ();
503d2be0
AS
21192 ;
21193 return 0;
21194}
21195_ACEOF
21196rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21197if { (ac_try="$ac_link"
21198case "(($ac_try" in
21199 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21200 *) ac_try_echo=$ac_try;;
21201esac
21202eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21203 (eval "$ac_link") 2>conftest.er1
503d2be0 21204 ac_status=$?
edfaf76d
LK
21205 grep -v '^ *+' conftest.er1 >conftest.err
21206 rm -f conftest.er1
21207 cat conftest.err >&5
c0d27fcc 21208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21209 (exit $ac_status); } && {
21210 test -z "$ac_c_werror_flag" ||
21211 test ! -s conftest.err
21212 } && test -s conftest$ac_exeext &&
21213 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21214 ac_cv_func_socket=yes
21215else
21216 echo "$as_me: failed program was:" >&5
19650fd6
AS
21217sed 's/^/| /' conftest.$ac_ext >&5
21218
ca81d7a0 21219 ac_cv_func_socket=no
503d2be0 21220fi
ca81d7a0 21221
f053c89f 21222rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21223 conftest$ac_exeext conftest.$ac_ext
503d2be0 21224fi
ca81d7a0
JD
21225{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
21226echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 21227if test $ac_cv_func_socket = yes; then
ba4481b5
DL
21228 :
21229else
503d2be0 21230 ok_so_far=no
ba4481b5
DL
21231fi
21232
21233if test $ok_so_far = yes; then
c0d27fcc 21234 if test "${ac_cv_header_netinet_in_h+set}" = set; then
ca81d7a0
JD
21235 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
21236echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
21237if test "${ac_cv_header_netinet_in_h+set}" = set; then
21238 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21239fi
ca81d7a0
JD
21240{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
21241echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 21242else
c0d27fcc 21243 # Is the header compilable?
ca81d7a0
JD
21244{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
21245echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 21246cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21247/* confdefs.h. */
21248_ACEOF
21249cat confdefs.h >>conftest.$ac_ext
21250cat >>conftest.$ac_ext <<_ACEOF
21251/* end confdefs.h. */
c0d27fcc
MR
21252$ac_includes_default
21253#include <netinet/in.h>
21254_ACEOF
21255rm -f conftest.$ac_objext
ca81d7a0
JD
21256if { (ac_try="$ac_compile"
21257case "(($ac_try" in
21258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21259 *) ac_try_echo=$ac_try;;
21260esac
21261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21262 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21263 ac_status=$?
edfaf76d
LK
21264 grep -v '^ *+' conftest.er1 >conftest.err
21265 rm -f conftest.er1
21266 cat conftest.err >&5
c0d27fcc 21267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21268 (exit $ac_status); } && {
21269 test -z "$ac_c_werror_flag" ||
21270 test ! -s conftest.err
21271 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21272 ac_header_compiler=yes
21273else
21274 echo "$as_me: failed program was:" >&5
19650fd6
AS
21275sed 's/^/| /' conftest.$ac_ext >&5
21276
ca81d7a0 21277 ac_header_compiler=no
c0d27fcc 21278fi
ca81d7a0
JD
21279
21280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21281{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21282echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21283
21284# Is the header present?
ca81d7a0
JD
21285{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
21286echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 21287cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21288/* confdefs.h. */
21289_ACEOF
21290cat confdefs.h >>conftest.$ac_ext
21291cat >>conftest.$ac_ext <<_ACEOF
21292/* end confdefs.h. */
ba4481b5 21293#include <netinet/in.h>
503d2be0 21294_ACEOF
ca81d7a0
JD
21295if { (ac_try="$ac_cpp conftest.$ac_ext"
21296case "(($ac_try" in
21297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21298 *) ac_try_echo=$ac_try;;
21299esac
21300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21301 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21302 ac_status=$?
6bae0ccf 21303 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21304 rm -f conftest.er1
21305 cat conftest.err >&5
c0d27fcc 21306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21307 (exit $ac_status); } >/dev/null && {
21308 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21309 test ! -s conftest.err
21310 }; then
c0d27fcc 21311 ac_header_preproc=yes
ba4481b5 21312else
503d2be0 21313 echo "$as_me: failed program was:" >&5
19650fd6
AS
21314sed 's/^/| /' conftest.$ac_ext >&5
21315
c0d27fcc 21316 ac_header_preproc=no
ba4481b5 21317fi
ca81d7a0 21318
503d2be0 21319rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21320{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21321echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21322
21323# So? What about this header?
edfaf76d
LK
21324case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21325 yes:no: )
c0d27fcc
MR
21326 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
21327echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21328 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
21329echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
21330 ac_header_preproc=yes
19650fd6 21331 ;;
edfaf76d 21332 no:yes:* )
c0d27fcc
MR
21333 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
21334echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
21335 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
21336echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
21337 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
21338echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
21339 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
21340echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21341 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 21342echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21343 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
21344echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21345
19650fd6 21346 ;;
c0d27fcc 21347esac
ca81d7a0
JD
21348{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
21349echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
21350if test "${ac_cv_header_netinet_in_h+set}" = set; then
21351 echo $ECHO_N "(cached) $ECHO_C" >&6
21352else
21353 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 21354fi
ca81d7a0
JD
21355{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
21356echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
21357
21358fi
503d2be0 21359if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
21360 :
21361else
503d2be0 21362 ok_so_far=no
ba4481b5
DL
21363fi
21364
c0d27fcc 21365
ba4481b5
DL
21366fi
21367if test $ok_so_far = yes; then
c0d27fcc 21368 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
ca81d7a0
JD
21369 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
21370echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
21371if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21372 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21373fi
ca81d7a0
JD
21374{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
21375echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 21376else
c0d27fcc 21377 # Is the header compilable?
ca81d7a0
JD
21378{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
21379echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 21380cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21381/* confdefs.h. */
21382_ACEOF
21383cat confdefs.h >>conftest.$ac_ext
21384cat >>conftest.$ac_ext <<_ACEOF
21385/* end confdefs.h. */
c0d27fcc
MR
21386$ac_includes_default
21387#include <arpa/inet.h>
21388_ACEOF
21389rm -f conftest.$ac_objext
ca81d7a0
JD
21390if { (ac_try="$ac_compile"
21391case "(($ac_try" in
21392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21393 *) ac_try_echo=$ac_try;;
21394esac
21395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21396 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21397 ac_status=$?
edfaf76d
LK
21398 grep -v '^ *+' conftest.er1 >conftest.err
21399 rm -f conftest.er1
21400 cat conftest.err >&5
c0d27fcc 21401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21402 (exit $ac_status); } && {
21403 test -z "$ac_c_werror_flag" ||
21404 test ! -s conftest.err
21405 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21406 ac_header_compiler=yes
21407else
21408 echo "$as_me: failed program was:" >&5
19650fd6
AS
21409sed 's/^/| /' conftest.$ac_ext >&5
21410
ca81d7a0 21411 ac_header_compiler=no
c0d27fcc 21412fi
ca81d7a0
JD
21413
21414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21415{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21416echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21417
21418# Is the header present?
ca81d7a0
JD
21419{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
21420echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 21421cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21422/* confdefs.h. */
21423_ACEOF
21424cat confdefs.h >>conftest.$ac_ext
21425cat >>conftest.$ac_ext <<_ACEOF
21426/* end confdefs.h. */
ba4481b5 21427#include <arpa/inet.h>
503d2be0 21428_ACEOF
ca81d7a0
JD
21429if { (ac_try="$ac_cpp conftest.$ac_ext"
21430case "(($ac_try" in
21431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21432 *) ac_try_echo=$ac_try;;
21433esac
21434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21435 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21436 ac_status=$?
6bae0ccf 21437 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21438 rm -f conftest.er1
21439 cat conftest.err >&5
c0d27fcc 21440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21441 (exit $ac_status); } >/dev/null && {
21442 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21443 test ! -s conftest.err
21444 }; then
c0d27fcc 21445 ac_header_preproc=yes
ba4481b5 21446else
503d2be0 21447 echo "$as_me: failed program was:" >&5
19650fd6
AS
21448sed 's/^/| /' conftest.$ac_ext >&5
21449
c0d27fcc 21450 ac_header_preproc=no
ba4481b5 21451fi
ca81d7a0 21452
503d2be0 21453rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21454{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21455echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21456
21457# So? What about this header?
edfaf76d
LK
21458case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21459 yes:no: )
c0d27fcc
MR
21460 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
21461echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21462 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
21463echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
21464 ac_header_preproc=yes
19650fd6 21465 ;;
edfaf76d 21466 no:yes:* )
c0d27fcc
MR
21467 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
21468echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
21469 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
21470echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
21471 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
21472echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
21473 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
21474echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21475 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 21476echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21477 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
21478echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21479
19650fd6 21480 ;;
c0d27fcc 21481esac
ca81d7a0
JD
21482{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
21483echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
21484if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21485 echo $ECHO_N "(cached) $ECHO_C" >&6
21486else
21487 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 21488fi
ca81d7a0
JD
21489{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
21490echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
21491
21492fi
503d2be0 21493if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
21494 :
21495else
503d2be0 21496 ok_so_far=no
ba4481b5
DL
21497fi
21498
c0d27fcc 21499
ba4481b5
DL
21500fi
21501if test $ok_so_far = yes; then
b936fae4 21502
c0d27fcc 21503cat >>confdefs.h <<\_ACEOF
ba4481b5 21504#define HAVE_INET_SOCKETS 1
c0d27fcc 21505_ACEOF
ba4481b5
DL
21506
21507fi
21508
2d2b6695 21509
7862d3a8 21510for ac_header in sys/ioctl.h
2d2b6695
KS
21511do
21512as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21513if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21514 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21515echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21516if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
21517 echo $ECHO_N "(cached) $ECHO_C" >&6
21518fi
ca81d7a0
JD
21519ac_res=`eval echo '${'$as_ac_Header'}'`
21520 { echo "$as_me:$LINENO: result: $ac_res" >&5
21521echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
21522else
21523 # Is the header compilable?
ca81d7a0
JD
21524{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21525echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 21526cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
21527/* confdefs.h. */
21528_ACEOF
21529cat confdefs.h >>conftest.$ac_ext
21530cat >>conftest.$ac_ext <<_ACEOF
21531/* end confdefs.h. */
21532$ac_includes_default
21533#include <$ac_header>
21534_ACEOF
21535rm -f conftest.$ac_objext
ca81d7a0
JD
21536if { (ac_try="$ac_compile"
21537case "(($ac_try" in
21538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21539 *) ac_try_echo=$ac_try;;
21540esac
21541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21542 (eval "$ac_compile") 2>conftest.er1
2d2b6695 21543 ac_status=$?
edfaf76d
LK
21544 grep -v '^ *+' conftest.er1 >conftest.err
21545 rm -f conftest.er1
21546 cat conftest.err >&5
2d2b6695 21547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21548 (exit $ac_status); } && {
21549 test -z "$ac_c_werror_flag" ||
21550 test ! -s conftest.err
21551 } && test -s conftest.$ac_objext; then
2d2b6695
KS
21552 ac_header_compiler=yes
21553else
21554 echo "$as_me: failed program was:" >&5
21555sed 's/^/| /' conftest.$ac_ext >&5
21556
ca81d7a0 21557 ac_header_compiler=no
2d2b6695 21558fi
ca81d7a0
JD
21559
21560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21561{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21562echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
21563
21564# Is the header present?
ca81d7a0
JD
21565{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21566echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 21567cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
21568/* confdefs.h. */
21569_ACEOF
21570cat confdefs.h >>conftest.$ac_ext
21571cat >>conftest.$ac_ext <<_ACEOF
21572/* end confdefs.h. */
21573#include <$ac_header>
21574_ACEOF
ca81d7a0
JD
21575if { (ac_try="$ac_cpp conftest.$ac_ext"
21576case "(($ac_try" in
21577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21578 *) ac_try_echo=$ac_try;;
21579esac
21580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21581 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
21582 ac_status=$?
21583 grep -v '^ *+' conftest.er1 >conftest.err
21584 rm -f conftest.er1
21585 cat conftest.err >&5
21586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21587 (exit $ac_status); } >/dev/null && {
21588 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21589 test ! -s conftest.err
21590 }; then
2d2b6695
KS
21591 ac_header_preproc=yes
21592else
21593 echo "$as_me: failed program was:" >&5
21594sed 's/^/| /' conftest.$ac_ext >&5
21595
21596 ac_header_preproc=no
21597fi
ca81d7a0 21598
2d2b6695 21599rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21600{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21601echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
21602
21603# So? What about this header?
edfaf76d
LK
21604case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21605 yes:no: )
2d2b6695
KS
21606 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21607echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21608 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21609echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21610 ac_header_preproc=yes
2d2b6695 21611 ;;
edfaf76d 21612 no:yes:* )
2d2b6695
KS
21613 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21614echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21615 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21616echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21617 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21618echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21619 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21620echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
21621 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21622echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21623 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21624echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21625
2d2b6695
KS
21626 ;;
21627esac
ca81d7a0
JD
21628{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21629echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21630if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
21631 echo $ECHO_N "(cached) $ECHO_C" >&6
21632else
edfaf76d 21633 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 21634fi
ca81d7a0
JD
21635ac_res=`eval echo '${'$as_ac_Header'}'`
21636 { echo "$as_me:$LINENO: result: $ac_res" >&5
21637echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
21638
21639fi
21640if test `eval echo '${'$as_ac_Header'}'` = yes; then
21641 cat >>confdefs.h <<_ACEOF
21642#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21643_ACEOF
21644
21645fi
21646
21647done
21648
21649
ba4481b5 21650if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 21651
c0d27fcc 21652cat >>confdefs.h <<\_ACEOF
ba4481b5 21653#define HAVE_AIX_SMT_EXP 1
c0d27fcc 21654_ACEOF
ba4481b5
DL
21655
21656fi
21657
ca81d7a0
JD
21658{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
21659echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 21660if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ca81d7a0
JD
21661 { echo "$as_me:$LINENO: result: yes" >&5
21662echo "${ECHO_T}yes" >&6; }
b936fae4 21663
c0d27fcc 21664cat >>confdefs.h <<\_ACEOF
3d9fec71 21665#define HAVE_DEV_PTMX 1
c0d27fcc 21666_ACEOF
3d9fec71
DL
21667
21668else
ca81d7a0
JD
21669 { echo "$as_me:$LINENO: result: no" >&5
21670echo "${ECHO_T}no" >&6; }
3d9fec71
DL
21671fi
21672
ca81d7a0
JD
21673{ echo "$as_me:$LINENO: checking for pid_t" >&5
21674echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
21675if test "${ac_cv_type_pid_t+set}" = set; then
21676 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 21677else
503d2be0 21678 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21679/* confdefs.h. */
21680_ACEOF
21681cat confdefs.h >>conftest.$ac_ext
21682cat >>conftest.$ac_ext <<_ACEOF
21683/* end confdefs.h. */
503d2be0 21684$ac_includes_default
ca81d7a0 21685typedef pid_t ac__type_new_;
503d2be0
AS
21686int
21687main ()
21688{
ca81d7a0 21689if ((ac__type_new_ *) 0)
503d2be0 21690 return 0;
ca81d7a0 21691if (sizeof (ac__type_new_))
503d2be0
AS
21692 return 0;
21693 ;
21694 return 0;
21695}
21696_ACEOF
21697rm -f conftest.$ac_objext
ca81d7a0
JD
21698if { (ac_try="$ac_compile"
21699case "(($ac_try" in
21700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21701 *) ac_try_echo=$ac_try;;
21702esac
21703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21704 (eval "$ac_compile") 2>conftest.er1
503d2be0 21705 ac_status=$?
edfaf76d
LK
21706 grep -v '^ *+' conftest.er1 >conftest.err
21707 rm -f conftest.er1
21708 cat conftest.err >&5
c0d27fcc 21709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21710 (exit $ac_status); } && {
21711 test -z "$ac_c_werror_flag" ||
21712 test ! -s conftest.err
21713 } && test -s conftest.$ac_objext; then
647847ea
DL
21714 ac_cv_type_pid_t=yes
21715else
503d2be0 21716 echo "$as_me: failed program was:" >&5
19650fd6
AS
21717sed 's/^/| /' conftest.$ac_ext >&5
21718
ca81d7a0 21719 ac_cv_type_pid_t=no
647847ea 21720fi
ca81d7a0
JD
21721
21722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 21723fi
ca81d7a0
JD
21724{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
21725echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
21726if test $ac_cv_type_pid_t = yes; then
21727 :
21728else
21729
c0d27fcc 21730cat >>confdefs.h <<_ACEOF
647847ea 21731#define pid_t int
c0d27fcc 21732_ACEOF
647847ea
DL
21733
21734fi
21735
c0d27fcc 21736
ca81d7a0 21737for ac_header in vfork.h
503d2be0
AS
21738do
21739as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21740if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21741 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21742echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21743if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21744 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21745fi
ca81d7a0
JD
21746ac_res=`eval echo '${'$as_ac_Header'}'`
21747 { echo "$as_me:$LINENO: result: $ac_res" >&5
21748echo "${ECHO_T}$ac_res" >&6; }
98418dba 21749else
c0d27fcc 21750 # Is the header compilable?
ca81d7a0
JD
21751{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21752echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21753cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21754/* confdefs.h. */
21755_ACEOF
21756cat confdefs.h >>conftest.$ac_ext
21757cat >>conftest.$ac_ext <<_ACEOF
21758/* end confdefs.h. */
c0d27fcc
MR
21759$ac_includes_default
21760#include <$ac_header>
21761_ACEOF
21762rm -f conftest.$ac_objext
ca81d7a0
JD
21763if { (ac_try="$ac_compile"
21764case "(($ac_try" in
21765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21766 *) ac_try_echo=$ac_try;;
21767esac
21768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21769 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21770 ac_status=$?
edfaf76d
LK
21771 grep -v '^ *+' conftest.er1 >conftest.err
21772 rm -f conftest.er1
21773 cat conftest.err >&5
c0d27fcc 21774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21775 (exit $ac_status); } && {
21776 test -z "$ac_c_werror_flag" ||
21777 test ! -s conftest.err
21778 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21779 ac_header_compiler=yes
21780else
21781 echo "$as_me: failed program was:" >&5
19650fd6
AS
21782sed 's/^/| /' conftest.$ac_ext >&5
21783
ca81d7a0 21784 ac_header_compiler=no
c0d27fcc 21785fi
ca81d7a0
JD
21786
21787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21788{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21789echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21790
21791# Is the header present?
ca81d7a0
JD
21792{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21793echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21794cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21795/* confdefs.h. */
21796_ACEOF
21797cat confdefs.h >>conftest.$ac_ext
21798cat >>conftest.$ac_ext <<_ACEOF
21799/* end confdefs.h. */
503d2be0
AS
21800#include <$ac_header>
21801_ACEOF
ca81d7a0
JD
21802if { (ac_try="$ac_cpp conftest.$ac_ext"
21803case "(($ac_try" in
21804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21805 *) ac_try_echo=$ac_try;;
21806esac
21807eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21808 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21809 ac_status=$?
6bae0ccf 21810 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21811 rm -f conftest.er1
21812 cat conftest.err >&5
c0d27fcc 21813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21814 (exit $ac_status); } >/dev/null && {
21815 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21816 test ! -s conftest.err
21817 }; then
c0d27fcc 21818 ac_header_preproc=yes
647847ea 21819else
503d2be0 21820 echo "$as_me: failed program was:" >&5
19650fd6
AS
21821sed 's/^/| /' conftest.$ac_ext >&5
21822
c0d27fcc 21823 ac_header_preproc=no
647847ea 21824fi
ca81d7a0 21825
503d2be0 21826rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21827{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21828echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21829
21830# So? What about this header?
edfaf76d
LK
21831case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21832 yes:no: )
c0d27fcc
MR
21833 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21834echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21835 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21836echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21837 ac_header_preproc=yes
19650fd6 21838 ;;
edfaf76d 21839 no:yes:* )
c0d27fcc
MR
21840 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21841echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21842 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21843echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21844 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21845echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21846 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21847echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21848 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21849echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21850 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21851echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21852
19650fd6 21853 ;;
c0d27fcc 21854esac
ca81d7a0
JD
21855{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21856echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21857if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21858 echo $ECHO_N "(cached) $ECHO_C" >&6
21859else
edfaf76d 21860 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 21861fi
ca81d7a0
JD
21862ac_res=`eval echo '${'$as_ac_Header'}'`
21863 { echo "$as_me:$LINENO: result: $ac_res" >&5
21864echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21865
21866fi
503d2be0 21867if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21868 cat >>confdefs.h <<_ACEOF
503d2be0 21869#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21870_ACEOF
647847ea 21871
73b77ee5 21872fi
c0d27fcc 21873
503d2be0 21874done
73b77ee5 21875
c0d27fcc
MR
21876
21877
503d2be0
AS
21878for ac_func in fork vfork
21879do
21880as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
21881{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21882echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21883if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21884 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 21885else
503d2be0 21886 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21887/* confdefs.h. */
21888_ACEOF
21889cat confdefs.h >>conftest.$ac_ext
21890cat >>conftest.$ac_ext <<_ACEOF
21891/* end confdefs.h. */
edfaf76d
LK
21892/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21893 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21894#define $ac_func innocuous_$ac_func
21895
fa0b693c 21896/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21897 which can conflict with char $ac_func (); below.
21898 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21899 <limits.h> exists even on freestanding compilers. */
edfaf76d 21900
19650fd6
AS
21901#ifdef __STDC__
21902# include <limits.h>
21903#else
21904# include <assert.h>
21905#endif
edfaf76d
LK
21906
21907#undef $ac_func
21908
ca81d7a0
JD
21909/* Override any GCC internal prototype to avoid an error.
21910 Use char because int might match the return type of a GCC
21911 builtin and then its argument prototype would still apply. */
503d2be0
AS
21912#ifdef __cplusplus
21913extern "C"
21914#endif
503d2be0 21915char $ac_func ();
fa0b693c
GM
21916/* The GNU C library defines this for functions which it implements
21917 to always fail with ENOSYS. Some functions are actually named
21918 something starting with __ and the normal name is an alias. */
ca81d7a0 21919#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 21920choke me
fa0b693c
GM
21921#endif
21922
19650fd6
AS
21923int
21924main ()
21925{
ca81d7a0 21926return $ac_func ();
503d2be0
AS
21927 ;
21928 return 0;
21929}
21930_ACEOF
21931rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21932if { (ac_try="$ac_link"
21933case "(($ac_try" in
21934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21935 *) ac_try_echo=$ac_try;;
21936esac
21937eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21938 (eval "$ac_link") 2>conftest.er1
503d2be0 21939 ac_status=$?
edfaf76d
LK
21940 grep -v '^ *+' conftest.er1 >conftest.err
21941 rm -f conftest.er1
21942 cat conftest.err >&5
c0d27fcc 21943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21944 (exit $ac_status); } && {
21945 test -z "$ac_c_werror_flag" ||
21946 test ! -s conftest.err
21947 } && test -s conftest$ac_exeext &&
21948 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21949 eval "$as_ac_var=yes"
21950else
21951 echo "$as_me: failed program was:" >&5
19650fd6
AS
21952sed 's/^/| /' conftest.$ac_ext >&5
21953
ca81d7a0 21954 eval "$as_ac_var=no"
503d2be0 21955fi
ca81d7a0 21956
f053c89f 21957rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21958 conftest$ac_exeext conftest.$ac_ext
503d2be0 21959fi
ca81d7a0
JD
21960ac_res=`eval echo '${'$as_ac_var'}'`
21961 { echo "$as_me:$LINENO: result: $ac_res" >&5
21962echo "${ECHO_T}$ac_res" >&6; }
503d2be0 21963if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 21964 cat >>confdefs.h <<_ACEOF
503d2be0 21965#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 21966_ACEOF
503d2be0 21967
fa0b693c 21968fi
503d2be0 21969done
fa0b693c 21970
503d2be0 21971if test "x$ac_cv_func_fork" = xyes; then
ca81d7a0
JD
21972 { echo "$as_me:$LINENO: checking for working fork" >&5
21973echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
21974if test "${ac_cv_func_fork_works+set}" = set; then
21975 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 21976else
503d2be0
AS
21977 if test "$cross_compiling" = yes; then
21978 ac_cv_func_fork_works=cross
21979else
21980 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
21981/* confdefs.h. */
21982_ACEOF
21983cat confdefs.h >>conftest.$ac_ext
21984cat >>conftest.$ac_ext <<_ACEOF
21985/* end confdefs.h. */
21986$ac_includes_default
21987int
21988main ()
21989{
21990
21991 /* By Ruediger Kuhlmann. */
21992 return fork () < 0;
21993
21994 ;
21995 return 0;
21996}
503d2be0
AS
21997_ACEOF
21998rm -f conftest$ac_exeext
ca81d7a0
JD
21999if { (ac_try="$ac_link"
22000case "(($ac_try" in
22001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22002 *) ac_try_echo=$ac_try;;
22003esac
22004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22005 (eval "$ac_link") 2>&5
503d2be0 22006 ac_status=$?
c0d27fcc 22007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22008 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22009 { (case "(($ac_try" in
22010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22011 *) ac_try_echo=$ac_try;;
22012esac
22013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22014 (eval "$ac_try") 2>&5
503d2be0 22015 ac_status=$?
c0d27fcc 22016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22017 (exit $ac_status); }; }; then
22018 ac_cv_func_fork_works=yes
22019else
22020 echo "$as_me: program exited with status $ac_status" >&5
22021echo "$as_me: failed program was:" >&5
19650fd6
AS
22022sed 's/^/| /' conftest.$ac_ext >&5
22023
c0d27fcc 22024( exit $ac_status )
503d2be0
AS
22025ac_cv_func_fork_works=no
22026fi
ca81d7a0 22027rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 22028fi
ca81d7a0
JD
22029
22030
503d2be0 22031fi
ca81d7a0
JD
22032{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
22033echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 22034
6bae0ccf
DL
22035else
22036 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
22037fi
22038if test "x$ac_cv_func_fork_works" = xcross; then
22039 case $host in
22040 *-*-amigaos* | *-*-msdosdjgpp*)
22041 # Override, as these systems have only a dummy fork() stub
22042 ac_cv_func_fork_works=no
22043 ;;
22044 *)
22045 ac_cv_func_fork_works=yes
22046 ;;
22047 esac
c0d27fcc
MR
22048 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
22049echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 22050fi
73b77ee5 22051ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 22052if test "x$ac_cv_func_vfork" = xyes; then
ca81d7a0
JD
22053 { echo "$as_me:$LINENO: checking for working vfork" >&5
22054echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
22055if test "${ac_cv_func_vfork_works+set}" = set; then
22056 echo $ECHO_N "(cached) $ECHO_C" >&6
22057else
22058 if test "$cross_compiling" = yes; then
22059 ac_cv_func_vfork_works=cross
fa0b693c 22060else
503d2be0 22061 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22062/* confdefs.h. */
22063_ACEOF
22064cat confdefs.h >>conftest.$ac_ext
22065cat >>conftest.$ac_ext <<_ACEOF
22066/* end confdefs.h. */
73b77ee5 22067/* Thanks to Paul Eggert for this test. */
ca81d7a0 22068$ac_includes_default
19650fd6 22069#include <sys/wait.h>
f053c89f 22070#ifdef HAVE_VFORK_H
503d2be0 22071# include <vfork.h>
73b77ee5
GM
22072#endif
22073/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
22074 argument registers are propagated back to the parent. The compiler
22075 is told about this with #include <vfork.h>, but some compilers
22076 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
22077 static variable whose address is put into a register that is
22078 clobbered by the vfork. */
19650fd6 22079static void
fa0b693c 22080#ifdef __cplusplus
73b77ee5 22081sparc_address_test (int arg)
503d2be0 22082# else
73b77ee5 22083sparc_address_test (arg) int arg;
fa0b693c 22084#endif
fa0b693c 22085{
73b77ee5
GM
22086 static pid_t child;
22087 if (!child) {
22088 child = vfork ();
22089 if (child < 0) {
22090 perror ("vfork");
22091 _exit(2);
22092 }
22093 if (!child) {
22094 arg = getpid();
22095 write(-1, "", 0);
22096 _exit (arg);
22097 }
22098 }
22099}
503d2be0
AS
22100
22101int
22102main ()
22103{
73b77ee5
GM
22104 pid_t parent = getpid ();
22105 pid_t child;
fa0b693c 22106
19650fd6 22107 sparc_address_test (0);
fa0b693c 22108
73b77ee5 22109 child = vfork ();
fa0b693c 22110
73b77ee5 22111 if (child == 0) {
503d2be0
AS
22112 /* Here is another test for sparc vfork register problems. This
22113 test uses lots of local variables, at least as many local
22114 variables as main has allocated so far including compiler
22115 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
22116 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
22117 reuse the register of parent for one of the local variables,
22118 since it will think that parent can't possibly be used any more
22119 in this routine. Assigning to the local variable will thus
22120 munge parent in the parent process. */
73b77ee5
GM
22121 pid_t
22122 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22123 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22124 /* Convince the compiler that p..p7 are live; otherwise, it might
22125 use the same hardware register for all 8 local variables. */
22126 if (p != p1 || p != p2 || p != p3 || p != p4
22127 || p != p5 || p != p6 || p != p7)
22128 _exit(1);
fa0b693c 22129
503d2be0
AS
22130 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22131 from child file descriptors. If the child closes a descriptor
22132 before it execs or exits, this munges the parent's descriptor
22133 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
22134 _exit(close(fileno(stdout)) != 0);
22135 } else {
22136 int status;
22137 struct stat st;
22138
22139 while (wait(&status) != child)
22140 ;
ca81d7a0 22141 return (
73b77ee5
GM
22142 /* Was there some problem with vforking? */
22143 child < 0
22144
22145 /* Did the child fail? (This shouldn't happen.) */
22146 || status
22147
22148 /* Did the vfork/compiler bug occur? */
22149 || parent != getpid()
fa0b693c 22150
73b77ee5
GM
22151 /* Did the file descriptor bug occur? */
22152 || fstat(fileno(stdout), &st) != 0
22153 );
22154 }
22155}
503d2be0
AS
22156_ACEOF
22157rm -f conftest$ac_exeext
ca81d7a0
JD
22158if { (ac_try="$ac_link"
22159case "(($ac_try" in
22160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22161 *) ac_try_echo=$ac_try;;
22162esac
22163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22164 (eval "$ac_link") 2>&5
503d2be0 22165 ac_status=$?
c0d27fcc 22166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22167 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22168 { (case "(($ac_try" in
22169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22170 *) ac_try_echo=$ac_try;;
22171esac
22172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22173 (eval "$ac_try") 2>&5
503d2be0 22174 ac_status=$?
c0d27fcc 22175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22176 (exit $ac_status); }; }; then
73b77ee5 22177 ac_cv_func_vfork_works=yes
fa0b693c 22178else
503d2be0
AS
22179 echo "$as_me: program exited with status $ac_status" >&5
22180echo "$as_me: failed program was:" >&5
19650fd6
AS
22181sed 's/^/| /' conftest.$ac_ext >&5
22182
c0d27fcc 22183( exit $ac_status )
503d2be0
AS
22184ac_cv_func_vfork_works=no
22185fi
ca81d7a0 22186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 22187fi
ca81d7a0
JD
22188
22189
fa0b693c 22190fi
ca81d7a0
JD
22191{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
22192echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 22193
503d2be0
AS
22194fi;
22195if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 22196 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
22197 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
22198echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
22199fi
22200
503d2be0
AS
22201if test "x$ac_cv_func_vfork_works" = xyes; then
22202
c0d27fcc 22203cat >>confdefs.h <<\_ACEOF
503d2be0 22204#define HAVE_WORKING_VFORK 1
c0d27fcc 22205_ACEOF
503d2be0
AS
22206
22207else
22208
c0d27fcc 22209cat >>confdefs.h <<\_ACEOF
73b77ee5 22210#define vfork fork
c0d27fcc 22211_ACEOF
fa0b693c
GM
22212
22213fi
503d2be0
AS
22214if test "x$ac_cv_func_fork_works" = xyes; then
22215
c0d27fcc 22216cat >>confdefs.h <<\_ACEOF
503d2be0 22217#define HAVE_WORKING_FORK 1
c0d27fcc 22218_ACEOF
fa0b693c 22219
503d2be0 22220fi
647847ea 22221
c0d27fcc 22222
ca81d7a0
JD
22223{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
22224echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
22225if test "${emacs_cv_langinfo_codeset+set}" = set; then
22226 echo $ECHO_N "(cached) $ECHO_C" >&6
22227else
22228 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22229/* confdefs.h. */
22230_ACEOF
22231cat confdefs.h >>conftest.$ac_ext
22232cat >>conftest.$ac_ext <<_ACEOF
22233/* end confdefs.h. */
6a3a24fa
JD
22234#include <langinfo.h>
22235int
22236main ()
22237{
22238char* cs = nl_langinfo(CODESET);
22239 ;
22240 return 0;
22241}
22242_ACEOF
22243rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22244if { (ac_try="$ac_link"
22245case "(($ac_try" in
22246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22247 *) ac_try_echo=$ac_try;;
22248esac
22249eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22250 (eval "$ac_link") 2>conftest.er1
6a3a24fa 22251 ac_status=$?
edfaf76d
LK
22252 grep -v '^ *+' conftest.er1 >conftest.err
22253 rm -f conftest.er1
22254 cat conftest.err >&5
6a3a24fa 22255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22256 (exit $ac_status); } && {
22257 test -z "$ac_c_werror_flag" ||
22258 test ! -s conftest.err
22259 } && test -s conftest$ac_exeext &&
22260 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
22261 emacs_cv_langinfo_codeset=yes
22262else
22263 echo "$as_me: failed program was:" >&5
19650fd6
AS
22264sed 's/^/| /' conftest.$ac_ext >&5
22265
ca81d7a0 22266 emacs_cv_langinfo_codeset=no
6a3a24fa 22267fi
ca81d7a0 22268
f053c89f 22269rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22270 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
22271
22272fi
ca81d7a0
JD
22273{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
22274echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
22275if test $emacs_cv_langinfo_codeset = yes; then
22276
22277cat >>confdefs.h <<\_ACEOF
22278#define HAVE_LANGINFO_CODESET 1
22279_ACEOF
22280
22281fi
22282
ca81d7a0
JD
22283{ echo "$as_me:$LINENO: checking for size_t" >&5
22284echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
22285if test "${ac_cv_type_size_t+set}" = set; then
22286 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 22287else
503d2be0 22288 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22289/* confdefs.h. */
22290_ACEOF
22291cat confdefs.h >>conftest.$ac_ext
22292cat >>conftest.$ac_ext <<_ACEOF
22293/* end confdefs.h. */
503d2be0 22294$ac_includes_default
ca81d7a0 22295typedef size_t ac__type_new_;
503d2be0
AS
22296int
22297main ()
22298{
ca81d7a0 22299if ((ac__type_new_ *) 0)
503d2be0 22300 return 0;
ca81d7a0 22301if (sizeof (ac__type_new_))
503d2be0
AS
22302 return 0;
22303 ;
22304 return 0;
22305}
22306_ACEOF
22307rm -f conftest.$ac_objext
ca81d7a0
JD
22308if { (ac_try="$ac_compile"
22309case "(($ac_try" in
22310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22311 *) ac_try_echo=$ac_try;;
22312esac
22313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22314 (eval "$ac_compile") 2>conftest.er1
503d2be0 22315 ac_status=$?
edfaf76d
LK
22316 grep -v '^ *+' conftest.er1 >conftest.err
22317 rm -f conftest.er1
22318 cat conftest.err >&5
c0d27fcc 22319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22320 (exit $ac_status); } && {
22321 test -z "$ac_c_werror_flag" ||
22322 test ! -s conftest.err
22323 } && test -s conftest.$ac_objext; then
8730a8da
DL
22324 ac_cv_type_size_t=yes
22325else
503d2be0 22326 echo "$as_me: failed program was:" >&5
19650fd6
AS
22327sed 's/^/| /' conftest.$ac_ext >&5
22328
ca81d7a0 22329 ac_cv_type_size_t=no
8730a8da 22330fi
ca81d7a0
JD
22331
22332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 22333fi
ca81d7a0
JD
22334{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
22335echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 22336if test $ac_cv_type_size_t = yes; then
503d2be0 22337
c0d27fcc
MR
22338cat >>confdefs.h <<_ACEOF
22339#define HAVE_SIZE_T 1
22340_ACEOF
22341
8730a8da
DL
22342
22343fi
22344
c0d27fcc 22345
ca81d7a0
JD
22346{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
22347echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
22348if test "${ac_cv_type_mbstate_t+set}" = set; then
22349 echo $ECHO_N "(cached) $ECHO_C" >&6
22350else
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. */
973a76b1
DL
22357$ac_includes_default
22358# include <wchar.h>
22359int
22360main ()
22361{
22362mbstate_t x; return sizeof x;
22363 ;
22364 return 0;
22365}
22366_ACEOF
22367rm -f conftest.$ac_objext
ca81d7a0
JD
22368if { (ac_try="$ac_compile"
22369case "(($ac_try" in
22370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22371 *) ac_try_echo=$ac_try;;
22372esac
22373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22374 (eval "$ac_compile") 2>conftest.er1
973a76b1 22375 ac_status=$?
edfaf76d
LK
22376 grep -v '^ *+' conftest.er1 >conftest.err
22377 rm -f conftest.er1
22378 cat conftest.err >&5
973a76b1 22379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22380 (exit $ac_status); } && {
22381 test -z "$ac_c_werror_flag" ||
22382 test ! -s conftest.err
22383 } && test -s conftest.$ac_objext; then
973a76b1
DL
22384 ac_cv_type_mbstate_t=yes
22385else
22386 echo "$as_me: failed program was:" >&5
19650fd6
AS
22387sed 's/^/| /' conftest.$ac_ext >&5
22388
ca81d7a0 22389 ac_cv_type_mbstate_t=no
973a76b1 22390fi
ca81d7a0
JD
22391
22392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 22393fi
ca81d7a0
JD
22394{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
22395echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
22396 if test $ac_cv_type_mbstate_t = yes; then
22397
22398cat >>confdefs.h <<\_ACEOF
22399#define HAVE_MBSTATE_T 1
22400_ACEOF
22401
22402 else
22403
22404cat >>confdefs.h <<\_ACEOF
22405#define mbstate_t int
22406_ACEOF
22407
22408 fi
22409
ca81d7a0
JD
22410{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
22411echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
22412if test "${emacs_cv_c_restrict+set}" = set; then
22413 echo $ECHO_N "(cached) $ECHO_C" >&6
22414else
22415 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22416/* confdefs.h. */
22417_ACEOF
22418cat confdefs.h >>conftest.$ac_ext
22419cat >>conftest.$ac_ext <<_ACEOF
22420/* end confdefs.h. */
22044edf
DL
22421void fred (int *restrict x);
22422int
22423main ()
22424{
b936fae4 22425
22044edf
DL
22426 ;
22427 return 0;
22428}
c0d27fcc 22429_ACEOF
22044edf 22430rm -f conftest.$ac_objext
ca81d7a0
JD
22431if { (ac_try="$ac_compile"
22432case "(($ac_try" in
22433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22434 *) ac_try_echo=$ac_try;;
22435esac
22436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22437 (eval "$ac_compile") 2>conftest.er1
22044edf 22438 ac_status=$?
edfaf76d
LK
22439 grep -v '^ *+' conftest.er1 >conftest.err
22440 rm -f conftest.er1
22441 cat conftest.err >&5
22044edf 22442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22443 (exit $ac_status); } && {
22444 test -z "$ac_c_werror_flag" ||
22445 test ! -s conftest.err
22446 } && test -s conftest.$ac_objext; then
22044edf
DL
22447 emacs_cv_c_restrict=yes
22448else
22449 echo "$as_me: failed program was:" >&5
19650fd6
AS
22450sed 's/^/| /' conftest.$ac_ext >&5
22451
ca81d7a0 22452 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22453/* confdefs.h. */
22454_ACEOF
22455cat confdefs.h >>conftest.$ac_ext
22456cat >>conftest.$ac_ext <<_ACEOF
22457/* end confdefs.h. */
22044edf
DL
22458void fred (int *__restrict x);
22459int
22460main ()
22461{
c0d27fcc 22462
22044edf
DL
22463 ;
22464 return 0;
22465}
c0d27fcc 22466_ACEOF
22044edf 22467rm -f conftest.$ac_objext
ca81d7a0
JD
22468if { (ac_try="$ac_compile"
22469case "(($ac_try" in
22470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22471 *) ac_try_echo=$ac_try;;
22472esac
22473eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22474 (eval "$ac_compile") 2>conftest.er1
22044edf 22475 ac_status=$?
edfaf76d
LK
22476 grep -v '^ *+' conftest.er1 >conftest.err
22477 rm -f conftest.er1
22478 cat conftest.err >&5
22044edf 22479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22480 (exit $ac_status); } && {
22481 test -z "$ac_c_werror_flag" ||
22482 test ! -s conftest.err
22483 } && test -s conftest.$ac_objext; then
22044edf
DL
22484 emacs_cv_c_restrict=__restrict
22485else
22486 echo "$as_me: failed program was:" >&5
19650fd6
AS
22487sed 's/^/| /' conftest.$ac_ext >&5
22488
ca81d7a0 22489 emacs_cv_c_restrict=no
ba4481b5 22490fi
ca81d7a0
JD
22491
22492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22493fi
ca81d7a0
JD
22494
22495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22496fi
ca81d7a0
JD
22497{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
22498echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
22499case "$emacs_cv_c_restrict" in
22500 yes) emacs_restrict=restrict;;
22501 no) emacs_restrict="";;
22502 *) emacs_restrict="$emacs_cv_c_restrict";;
22503esac
22504if test "$emacs_restrict" != __restrict; then
b936fae4 22505
22044edf
DL
22506cat >>confdefs.h <<_ACEOF
22507#define __restrict $emacs_restrict
c0d27fcc 22508_ACEOF
ba4481b5
DL
22509
22510fi
ba4481b5 22511
ca81d7a0
JD
22512{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
22513echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
22514if test "${emacs_cv_c_restrict_arr+set}" = set; then
22515 echo $ECHO_N "(cached) $ECHO_C" >&6
22516else
22517 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22518/* confdefs.h. */
22519_ACEOF
22520cat confdefs.h >>conftest.$ac_ext
22521cat >>conftest.$ac_ext <<_ACEOF
22522/* end confdefs.h. */
22044edf
DL
22523void fred (int x[__restrict]);
22524int
22525main ()
22526{
b936fae4 22527
22044edf
DL
22528 ;
22529 return 0;
22530}
c0d27fcc 22531_ACEOF
22044edf 22532rm -f conftest.$ac_objext
ca81d7a0
JD
22533if { (ac_try="$ac_compile"
22534case "(($ac_try" in
22535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22536 *) ac_try_echo=$ac_try;;
22537esac
22538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22539 (eval "$ac_compile") 2>conftest.er1
22044edf 22540 ac_status=$?
edfaf76d
LK
22541 grep -v '^ *+' conftest.er1 >conftest.err
22542 rm -f conftest.er1
22543 cat conftest.err >&5
22044edf 22544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22545 (exit $ac_status); } && {
22546 test -z "$ac_c_werror_flag" ||
22547 test ! -s conftest.err
22548 } && test -s conftest.$ac_objext; then
22044edf
DL
22549 emacs_cv_c_restrict_arr=yes
22550else
22551 echo "$as_me: failed program was:" >&5
19650fd6
AS
22552sed 's/^/| /' conftest.$ac_ext >&5
22553
ca81d7a0 22554 emacs_cv_c_restrict_arr=no
ba4481b5 22555fi
ca81d7a0
JD
22556
22557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 22558fi
ca81d7a0
JD
22559{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
22560echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 22561if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 22562
c0d27fcc 22563cat >>confdefs.h <<\_ACEOF
22044edf 22564#define __restrict_arr __restrict
c0d27fcc 22565_ACEOF
ba4481b5 22566
ba4481b5
DL
22567fi
22568
c0d27fcc 22569
c0d27fcc 22570
22044edf
DL
22571# Set up the CFLAGS for real compilation, so we can substitute it.
22572CFLAGS="$REAL_CFLAGS"
22573CPPFLAGS="$REAL_CPPFLAGS"
22574
22575#### Find out which version of Emacs this is.
22576version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
22577 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
22578if test x"${version}" = x; then
22579 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
22580echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
22581 { (exit 1); exit 1; }; }
22582fi
22583
22584### Specify what sort of things we'll be editing into Makefile and config.h.
22585### Use configuration here uncanonicalized to avoid exceeding size limits.
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616
22617
6a3a24fa 22618
22044edf
DL
22619
22620
22621cat >>confdefs.h <<_ACEOF
22622#define EMACS_CONFIGURATION "${canonical}"
22623_ACEOF
22624
22625
22626cat >>confdefs.h <<_ACEOF
22627#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
22628_ACEOF
22629
22630
22631cat >>confdefs.h <<_ACEOF
22632#define config_machfile "${machfile}"
22633_ACEOF
22634
22635
22636cat >>confdefs.h <<_ACEOF
22637#define config_opsysfile "${opsysfile}"
22638_ACEOF
22639
22640
22641cat >>confdefs.h <<_ACEOF
22642#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
22643_ACEOF
22644
22645
22646cat >>confdefs.h <<_ACEOF
22647#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
22648_ACEOF
22649
22650
22651cat >>confdefs.h <<_ACEOF
22652#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
22653_ACEOF
22654
22655
22656cat >>confdefs.h <<_ACEOF
22657#define UNEXEC_SRC ${UNEXEC_SRC}
22658_ACEOF
22659
22660
22661if test "${HAVE_X_WINDOWS}" = "yes" ; then
22662
22663cat >>confdefs.h <<\_ACEOF
22664#define HAVE_X_WINDOWS 1
22665_ACEOF
22666
22667fi
22668if test "${USE_X_TOOLKIT}" != "none" ; then
22669
22670cat >>confdefs.h <<\_ACEOF
22671#define USE_X_TOOLKIT 1
22672_ACEOF
22673
22674fi
22675if test "${HAVE_X11}" = "yes" ; then
22676
22677cat >>confdefs.h <<\_ACEOF
22678#define HAVE_X11 1
22679_ACEOF
22680
22681fi
22682if test "${HAVE_XFREE386}" = "yes" ; then
22683
22684cat >>confdefs.h <<\_ACEOF
22685#define HAVE_XFREE386 1
22686_ACEOF
22687
22688fi
22689if test "${HAVE_MENUS}" = "yes" ; then
22690
22691cat >>confdefs.h <<\_ACEOF
22692#define HAVE_MENUS 1
22693_ACEOF
22694
22695fi
22696if test "${GNU_MALLOC}" = "yes" ; then
22697
22698cat >>confdefs.h <<\_ACEOF
22699#define GNU_MALLOC 1
22700_ACEOF
22701
22702fi
22703if test "${REL_ALLOC}" = "yes" ; then
22704
22705cat >>confdefs.h <<\_ACEOF
22706#define REL_ALLOC 1
22707_ACEOF
22708
22709fi
22710
22711
22712
c0d27fcc
MR
22713
22714
ba4481b5 22715#### Report on what we decided to do.
488dd4c4
JD
22716#### Report GTK as a toolkit, even if it doesn't use Xt.
22717#### It makes printing result more understandable as using GTK sets
22718#### toolkit_scroll_bars to yes by default.
22719if test "${HAVE_GTK}" = "yes"; then
22720 USE_X_TOOLKIT=GTK
22721fi
22722
ba4481b5
DL
22723echo "
22724Configured for \`${canonical}'.
22725
22726 Where should the build process find the source code? ${srcdir}
22727 What operating system and machine description files should Emacs use?
22728 \`${opsysfile}' and \`${machfile}'
22729 What compiler should emacs be built with? ${CC} ${CFLAGS}
22730 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 22731 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 22732 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 22733 What window system should Emacs use? ${window_system}
8e967cf7 22734 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
22735
22736if test -n "${x_includes}"; then
22737echo " Where do we find X Windows header files? ${x_includes}"
22738else
22739echo " Where do we find X Windows header files? Standard dirs"
22740fi
22741if test -n "${x_libraries}"; then
22742echo " Where do we find X Windows libraries? ${x_libraries}"
22743else
22744echo " Where do we find X Windows libraries? Standard dirs"
22745fi
22746
22747echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
22748echo " Does Emacs use -lXpm? ${HAVE_XPM}"
22749echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
22750echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
22751echo " Does Emacs use -lungif? ${HAVE_GIF}"
22752echo " Does Emacs use -lpng? ${HAVE_PNG}"
22753echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
22754echo
22755
d0098f13
JD
22756if test $USE_XASSERTS = yes; then
22757 echo " Compiling with asserts turned on."
d0098f13
JD
22758 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
22759 echo
22760fi
05cf15c6 22761
05cf15c6 22762
05cf15c6 22763
ba4481b5
DL
22764# Remove any trailing slashes in these variables.
22765test "${prefix}" != NONE &&
22766 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
22767test "${exec_prefix}" != NONE &&
22768 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
22769
d0e9bfd2
GM
22770## Check if the C preprocessor will convert `..' to `. .'. If so, set
22771## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
22772## from Makefile.c can correctly provide the arg `-traditional' to the
22773## C preprocessor.
22774
503d2be0 22775cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22776/* confdefs.h. */
22777_ACEOF
22778cat confdefs.h >>conftest.$ac_ext
22779cat >>conftest.$ac_ext <<_ACEOF
22780/* end confdefs.h. */
d0e9bfd2 22781yes..yes
503d2be0 22782_ACEOF
d0e9bfd2 22783if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 22784 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
22785 CPP_NEED_TRADITIONAL=no
22786else
d0e9bfd2
GM
22787 CPP_NEED_TRADITIONAL=yes
22788fi
22789rm -f conftest*
22790
c0d27fcc 22791
ca81d7a0
JD
22792ac_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"
22793
22794ac_config_commands="$ac_config_commands default"
22795
503d2be0 22796cat >confcache <<\_ACEOF
ba4481b5
DL
22797# This file is a shell script that caches the results of configure
22798# tests run on this system so they can be shared between configure
503d2be0
AS
22799# scripts and configure runs, see configure's option --config-cache.
22800# It is not useful on other systems. If it contains results you don't
22801# want to keep, you may remove or edit it.
ba4481b5 22802#
503d2be0
AS
22803# config.status only pays attention to the cache file if you give it
22804# the --recheck option to rerun configure.
ba4481b5 22805#
6bae0ccf 22806# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
22807# loading this file, other *unset* `ac_cv_foo' will be assigned the
22808# following values.
22809
22810_ACEOF
22811
ba4481b5
DL
22812# The following way of writing the cache mishandles newlines in values,
22813# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 22814# So, we kill variables containing newlines.
ba4481b5
DL
22815# Ultrix sh set writes to stderr and can't be redirected directly,
22816# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
22817(
22818 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
22819 eval ac_val=\$$ac_var
22820 case $ac_val in #(
22821 *${as_nl}*)
22822 case $ac_var in #(
22823 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
22824echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
22825 esac
22826 case $ac_var in #(
22827 _ | IFS | as_nl) ;; #(
22828 *) $as_unset $ac_var ;;
22829 esac ;;
22830 esac
22831 done
22832
503d2be0 22833 (set) 2>&1 |
ca81d7a0
JD
22834 case $as_nl`(ac_space=' '; set) 2>&1` in #(
22835 *${as_nl}ac_space=\ *)
503d2be0
AS
22836 # `set' does not quote correctly, so add quotes (double-quote
22837 # substitution turns \\\\ into \\, and sed turns \\ into \).
22838 sed -n \
edfaf76d
LK
22839 "s/'/'\\\\''/g;
22840 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 22841 ;; #(
503d2be0
AS
22842 *)
22843 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 22844 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 22845 ;;
ca81d7a0
JD
22846 esac |
22847 sort
22848) |
503d2be0 22849 sed '
ca81d7a0 22850 /^ac_cv_env_/b end
503d2be0 22851 t clear
ca81d7a0 22852 :clear
503d2be0
AS
22853 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22854 t end
ca81d7a0
JD
22855 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22856 :end' >>confcache
22857if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
22858 if test -w "$cache_file"; then
22859 test "x$cache_file" != "x/dev/null" &&
22860 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
22861echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 22862 cat confcache >$cache_file
ba4481b5 22863 else
ca81d7a0
JD
22864 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
22865echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
22866 fi
22867fi
22868rm -f confcache
22869
ba4481b5
DL
22870test "x$prefix" = xNONE && prefix=$ac_default_prefix
22871# Let make expand exec_prefix.
22872test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22873
ba4481b5
DL
22874DEFS=-DHAVE_CONFIG_H
22875
6bae0ccf
DL
22876ac_libobjs=
22877ac_ltlibobjs=
22878for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22879 # 1. Remove the extension, and $U if already installed.
ca81d7a0
JD
22880 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
22881 ac_i=`echo "$ac_i" | sed "$ac_script"`
22882 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
22883 # will be set to the directory where LIBOBJS objects are built.
22884 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
22885 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
22886done
22887LIBOBJS=$ac_libobjs
22888
22889LTLIBOBJS=$ac_ltlibobjs
22890
22891
c0d27fcc 22892
ba4481b5 22893: ${CONFIG_STATUS=./config.status}
503d2be0
AS
22894ac_clean_files_save=$ac_clean_files
22895ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 22896{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
22897echo "$as_me: creating $CONFIG_STATUS" >&6;}
22898cat >$CONFIG_STATUS <<_ACEOF
22899#! $SHELL
c0d27fcc 22900# Generated by $as_me.
ba4481b5 22901# Run this file to recreate the current configuration.
ba4481b5 22902# Compiler output produced by configure, useful for debugging
503d2be0 22903# configure, is in config.log if it exists.
ba4481b5 22904
503d2be0 22905debug=false
19650fd6
AS
22906ac_cs_recheck=false
22907ac_cs_silent=false
503d2be0 22908SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
22909_ACEOF
22910
22911cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
22912## --------------------- ##
22913## M4sh Initialization. ##
22914## --------------------- ##
22915
f053c89f
CY
22916# Be more Bourne compatible
22917DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
22918if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22919 emulate sh
22920 NULLCMD=:
6bae0ccf
DL
22921 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22922 # is contrary to our usage. Disable this feature.
22923 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
22924 setopt NO_GLOB_SUBST
22925else
f053c89f
CY
22926 case `(set -o) 2>/dev/null` in
22927 *posix*) set -o posix ;;
22928esac
22929
503d2be0 22930fi
f053c89f
CY
22931
22932
503d2be0 22933
ca81d7a0
JD
22934
22935# PATH needs CR
22936# Avoid depending upon Character Ranges.
22937as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22938as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22939as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22940as_cr_digits='0123456789'
22941as_cr_alnum=$as_cr_Letters$as_cr_digits
22942
22943# The user is always right.
22944if test "${PATH_SEPARATOR+set}" != set; then
22945 echo "#! /bin/sh" >conf$$.sh
22946 echo "exit 0" >>conf$$.sh
22947 chmod +x conf$$.sh
22948 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
22949 PATH_SEPARATOR=';'
22950 else
22951 PATH_SEPARATOR=:
22952 fi
22953 rm -f conf$$.sh
22954fi
22955
c0d27fcc 22956# Support unset when possible.
edfaf76d 22957if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
22958 as_unset=unset
22959else
22960 as_unset=false
22961fi
22962
6bae0ccf 22963
ca81d7a0
JD
22964# IFS
22965# We need space, tab and new line, in precisely that order. Quoting is
22966# there to prevent editors from complaining about space-tab.
22967# (If _AS_PATH_WALK were called with IFS unset, it would disable word
22968# splitting by setting IFS to empty value.)
22969as_nl='
22970'
22971IFS=" "" $as_nl"
22972
22973# Find who we are. Look in the path if we contain no directory separator.
22974case $0 in
22975 *[\\/]* ) as_myself=$0 ;;
22976 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22977for as_dir in $PATH
22978do
22979 IFS=$as_save_IFS
22980 test -z "$as_dir" && as_dir=.
22981 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22982done
22983IFS=$as_save_IFS
22984
22985 ;;
22986esac
22987# We did not find ourselves, most probably we were run as `sh COMMAND'
22988# in which case we are not to be found in the path.
22989if test "x$as_myself" = x; then
22990 as_myself=$0
22991fi
22992if test ! -f "$as_myself"; then
22993 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
22994 { (exit 1); exit 1; }
22995fi
22996
6bae0ccf 22997# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
22998for as_var in ENV MAIL MAILPATH
22999do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23000done
6bae0ccf
DL
23001PS1='$ '
23002PS2='> '
23003PS4='+ '
23004
23005# NLS nuisances.
19650fd6
AS
23006for as_var in \
23007 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23008 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23009 LC_TELEPHONE LC_TIME
6bae0ccf 23010do
edfaf76d 23011 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
23012 eval $as_var=C; export $as_var
23013 else
ca81d7a0 23014 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
23015 fi
23016done
23017
23018# Required to use basename.
ca81d7a0
JD
23019if expr a : '\(a\)' >/dev/null 2>&1 &&
23020 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
23021 as_expr=expr
23022else
23023 as_expr=false
23024fi
23025
ca81d7a0 23026if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
23027 as_basename=basename
23028else
23029 as_basename=false
23030fi
c0d27fcc
MR
23031
23032
503d2be0 23033# Name of the executable.
ca81d7a0 23034as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
23035$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23036 X"$0" : 'X\(//\)$' \| \
ca81d7a0 23037 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 23038echo X/"$0" |
ca81d7a0
JD
23039 sed '/^.*\/\([^/][^/]*\)\/*$/{
23040 s//\1/
23041 q
23042 }
23043 /^X\/\(\/\/\)$/{
23044 s//\1/
23045 q
23046 }
23047 /^X\/\(\/\).*/{
23048 s//\1/
23049 q
23050 }
23051 s/.*/./; q'`
c0d27fcc 23052
ca81d7a0
JD
23053# CDPATH.
23054$as_unset CDPATH
4b411bfe
CY
23055
23056
c0d27fcc
MR
23057
23058 as_lineno_1=$LINENO
23059 as_lineno_2=$LINENO
c0d27fcc 23060 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 23061 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
23062
23063 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23064 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
23065 # line-number line after each line using $LINENO; the second 'sed'
23066 # does the real work. The second script uses 'N' to pair each
23067 # line-number line with the line containing $LINENO, and appends
23068 # trailing '-' during substitution so that $LINENO is not a special
23069 # case at line end.
c0d27fcc 23070 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
23071 # scripts with optimization help from Paolo Bonzini. Blame Lee
23072 # E. McMahon (1931-1989) for sed's syntax. :-)
23073 sed -n '
23074 p
23075 /[$]LINENO/=
23076 ' <$as_myself |
c0d27fcc 23077 sed '
ca81d7a0
JD
23078 s/[$]LINENO.*/&-/
23079 t lineno
23080 b
23081 :lineno
c0d27fcc 23082 N
ca81d7a0
JD
23083 :loop
23084 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 23085 t loop
ca81d7a0 23086 s/-\n.*//
c0d27fcc 23087 ' >$as_me.lineno &&
ca81d7a0
JD
23088 chmod +x "$as_me.lineno" ||
23089 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
23090 { (exit 1); exit 1; }; }
23091
23092 # Don't try to exec as it changes $[0], causing all sort of problems
23093 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
23094 # original and so on. Autoconf is especially sensitive to this).
23095 . "./$as_me.lineno"
c0d27fcc
MR
23096 # Exit status is that of the last command.
23097 exit
23098}
23099
23100
ca81d7a0
JD
23101if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
23102 as_dirname=dirname
23103else
23104 as_dirname=false
23105fi
23106
23107ECHO_C= ECHO_N= ECHO_T=
23108case `echo -n x` in
23109-n*)
23110 case `echo 'x\c'` in
23111 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
23112 *) ECHO_C='\c';;
23113 esac;;
23114*)
23115 ECHO_N='-n';;
c0d27fcc 23116esac
503d2be0 23117
ca81d7a0
JD
23118if expr a : '\(a\)' >/dev/null 2>&1 &&
23119 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
23120 as_expr=expr
23121else
23122 as_expr=false
23123fi
23124
23125rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
23126if test -d conf$$.dir; then
23127 rm -f conf$$.dir/conf$$.file
23128else
23129 rm -f conf$$.dir
23130 mkdir conf$$.dir
23131fi
503d2be0
AS
23132echo >conf$$.file
23133if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
23134 as_ln_s='ln -s'
23135 # ... but there are two gotchas:
23136 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
23137 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
23138 # In both cases, we have to default to `cp -p'.
23139 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 23140 as_ln_s='cp -p'
503d2be0
AS
23141elif ln conf$$.file conf$$ 2>/dev/null; then
23142 as_ln_s=ln
23143else
23144 as_ln_s='cp -p'
23145fi
ca81d7a0
JD
23146rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
23147rmdir conf$$.dir 2>/dev/null
503d2be0 23148
6bae0ccf
DL
23149if mkdir -p . 2>/dev/null; then
23150 as_mkdir_p=:
23151else
edfaf76d 23152 test -d ./-p && rmdir ./-p
6bae0ccf
DL
23153 as_mkdir_p=false
23154fi
23155
f053c89f
CY
23156if test -x / >/dev/null 2>&1; then
23157 as_test_x='test -x'
ca81d7a0 23158else
f053c89f
CY
23159 if ls -dL / >/dev/null 2>&1; then
23160 as_ls_L_option=L
23161 else
23162 as_ls_L_option=
23163 fi
23164 as_test_x='
23165 eval sh -c '\''
23166 if test -d "$1"; then
23167 test -d "$1/.";
23168 else
23169 case $1 in
23170 -*)set "./$1";;
23171 esac;
23172 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
23173 ???[sx]*):;;*)false;;esac;fi
23174 '\'' sh
23175 '
ca81d7a0 23176fi
f053c89f 23177as_executable_p=$as_test_x
503d2be0 23178
c0d27fcc 23179# Sed expression to map a string onto a valid CPP name.
edfaf76d 23180as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
23181
23182# Sed expression to map a string onto a valid variable name.
edfaf76d 23183as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 23184
503d2be0 23185
503d2be0
AS
23186exec 6>&1
23187
ca81d7a0 23188# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 23189# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
23190# values after options handling.
23191ac_log="
c0d27fcc 23192This file was extended by $as_me, which was
f053c89f 23193generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
23194
23195 CONFIG_FILES = $CONFIG_FILES
23196 CONFIG_HEADERS = $CONFIG_HEADERS
23197 CONFIG_LINKS = $CONFIG_LINKS
23198 CONFIG_COMMANDS = $CONFIG_COMMANDS
23199 $ $0 $@
23200
ca81d7a0
JD
23201on `(hostname || uname -n) 2>/dev/null | sed 1q`
23202"
23203
503d2be0
AS
23204_ACEOF
23205
ca81d7a0 23206cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 23207# Files that config.status was made for.
ca81d7a0
JD
23208config_files="$ac_config_files"
23209config_headers="$ac_config_headers"
23210config_commands="$ac_config_commands"
4b411bfe 23211
ca81d7a0 23212_ACEOF
503d2be0 23213
c0d27fcc 23214cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23215ac_cs_usage="\
23216\`$as_me' instantiates files from templates according to the
23217current configuration.
23218
23219Usage: $0 [OPTIONS] [FILE]...
23220
23221 -h, --help print this help, then exit
f053c89f 23222 -V, --version print version number and configuration settings, then exit
19650fd6 23223 -q, --quiet do not print progress messages
503d2be0
AS
23224 -d, --debug don't remove temporary files
23225 --recheck update $as_me by reconfiguring in the same conditions
23226 --file=FILE[:TEMPLATE]
edfaf76d 23227 instantiate the configuration file FILE
503d2be0 23228 --header=FILE[:TEMPLATE]
edfaf76d 23229 instantiate the configuration header FILE
503d2be0
AS
23230
23231Configuration files:
23232$config_files
23233
23234Configuration headers:
23235$config_headers
23236
23237Configuration commands:
23238$config_commands
23239
23240Report bugs to <bug-autoconf@gnu.org>."
4b411bfe 23241
ca81d7a0 23242_ACEOF
c0d27fcc 23243cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23244ac_cs_version="\\
23245config.status
f053c89f 23246configured by $0, generated by GNU Autoconf 2.61,
ca81d7a0 23247 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 23248
4e6835db 23249Copyright (C) 2006, 2007 Free Software Foundation, Inc.
503d2be0
AS
23250This config.status script is free software; the Free Software Foundation
23251gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
23252
23253ac_pwd='$ac_pwd'
23254srcdir='$srcdir'
23255INSTALL='$INSTALL'
c0d27fcc 23256_ACEOF
503d2be0 23257
c0d27fcc 23258cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23259# If no file are specified by the user, then we need to provide default
23260# value. By we need to know if files were specified by the user.
23261ac_need_defaults=:
23262while test $# != 0
ba4481b5 23263do
503d2be0
AS
23264 case $1 in
23265 --*=*)
ca81d7a0
JD
23266 ac_option=`expr "X$1" : 'X\([^=]*\)='`
23267 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
23268 ac_shift=:
23269 ;;
ca81d7a0 23270 *)
6bae0ccf
DL
23271 ac_option=$1
23272 ac_optarg=$2
23273 ac_shift=shift
503d2be0 23274 ;;
503d2be0
AS
23275 esac
23276
6bae0ccf 23277 case $ac_option in
503d2be0 23278 # Handling of the options.
19650fd6
AS
23279 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23280 ac_cs_recheck=: ;;
ca81d7a0
JD
23281 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
23282 echo "$ac_cs_version"; exit ;;
23283 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
23284 debug=: ;;
23285 --file | --fil | --fi | --f )
6bae0ccf
DL
23286 $ac_shift
23287 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
23288 ac_need_defaults=false;;
23289 --header | --heade | --head | --hea )
6bae0ccf
DL
23290 $ac_shift
23291 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 23292 ac_need_defaults=false;;
ca81d7a0
JD
23293 --he | --h)
23294 # Conflict between --help and --header
23295 { echo "$as_me: error: ambiguous option: $1
23296Try \`$0 --help' for more information." >&2
23297 { (exit 1); exit 1; }; };;
23298 --help | --hel | -h )
23299 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
23300 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23301 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23302 ac_cs_silent=: ;;
503d2be0
AS
23303
23304 # This is an error.
ca81d7a0
JD
23305 -*) { echo "$as_me: error: unrecognized option: $1
23306Try \`$0 --help' for more information." >&2
503d2be0
AS
23307 { (exit 1); exit 1; }; } ;;
23308
ca81d7a0
JD
23309 *) ac_config_targets="$ac_config_targets $1"
23310 ac_need_defaults=false ;;
503d2be0 23311
ba4481b5 23312 esac
503d2be0 23313 shift
ba4481b5
DL
23314done
23315
19650fd6
AS
23316ac_configure_extra_args=
23317
23318if $ac_cs_silent; then
23319 exec 6>/dev/null
23320 ac_configure_extra_args="$ac_configure_extra_args --silent"
23321fi
23322
23323_ACEOF
23324cat >>$CONFIG_STATUS <<_ACEOF
23325if \$ac_cs_recheck; then
ca81d7a0
JD
23326 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23327 CONFIG_SHELL=$SHELL
23328 export CONFIG_SHELL
23329 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
23330fi
23331
503d2be0 23332_ACEOF
ca81d7a0
JD
23333cat >>$CONFIG_STATUS <<\_ACEOF
23334exec 5>>config.log
23335{
23336 echo
23337 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23338## Running $as_me. ##
23339_ASBOX
23340 echo "$ac_log"
23341} >&5
ba4481b5 23342
ca81d7a0 23343_ACEOF
c0d27fcc 23344cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 23345#
ca81d7a0 23346# INIT-COMMANDS
503d2be0 23347#
503d2be0
AS
23348GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
23349
c0d27fcc
MR
23350_ACEOF
23351
4b411bfe 23352cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
23353
23354# Handling of arguments.
503d2be0
AS
23355for ac_config_target in $ac_config_targets
23356do
ca81d7a0
JD
23357 case $ac_config_target in
23358 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
23359 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23360 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
23361 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
23362 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
23363 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
23364 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
23365 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23366 "lispref/Makefile") CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
23367 "lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
23368 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
23369 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23370
c0d27fcc 23371 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
23372echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23373 { (exit 1); exit 1; }; };;
23374 esac
ba4481b5 23375done
503d2be0 23376
ca81d7a0 23377
503d2be0
AS
23378# If the user did not use the arguments to specify the items to instantiate,
23379# then the envvar interface is used. Set only those that are not.
23380# We use the long form for the default assignment because of an extremely
23381# bizarre bug on SunOS 4.1.3.
23382if $ac_need_defaults; then
23383 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23384 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23385 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 23386fi
503d2be0 23387
19650fd6 23388# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 23389# simply because there is no reason against having it here, and in addition,
19650fd6 23390# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
23391# Hook for its removal unless debugging.
23392# Note that there is a small window in which the directory will not be cleaned:
23393# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
23394$debug ||
23395{
ca81d7a0
JD
23396 tmp=
23397 trap 'exit_status=$?
23398 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
23399' 0
503d2be0
AS
23400 trap '{ (exit 1); exit 1; }' 1 2 13 15
23401}
503d2be0 23402# Create a (secure) tmp directory for tmp files.
19650fd6 23403
503d2be0 23404{
ca81d7a0 23405 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
23406 test -n "$tmp" && test -d "$tmp"
23407} ||
23408{
ca81d7a0
JD
23409 tmp=./conf$$-$RANDOM
23410 (umask 077 && mkdir "$tmp")
503d2be0
AS
23411} ||
23412{
19650fd6 23413 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
23414 { (exit 1); exit 1; }
23415}
23416
503d2be0 23417#
ca81d7a0 23418# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
23419#
23420
23421# No need to generate the scripts if there are no CONFIG_FILES.
23422# This happens for instance when ./config.status config.h
ca81d7a0
JD
23423if test -n "$CONFIG_FILES"; then
23424
23425_ACEOF
23426
23427
23428
23429ac_delim='%!_!# '
23430for ac_last_try in false false false false false :; do
23431 cat >conf$$subs.sed <<_ACEOF
23432SHELL!$SHELL$ac_delim
23433PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
23434PACKAGE_NAME!$PACKAGE_NAME$ac_delim
23435PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
23436PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
23437PACKAGE_STRING!$PACKAGE_STRING$ac_delim
23438PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
23439exec_prefix!$exec_prefix$ac_delim
23440prefix!$prefix$ac_delim
23441program_transform_name!$program_transform_name$ac_delim
23442bindir!$bindir$ac_delim
23443sbindir!$sbindir$ac_delim
23444libexecdir!$libexecdir$ac_delim
23445datarootdir!$datarootdir$ac_delim
23446datadir!$datadir$ac_delim
23447sysconfdir!$sysconfdir$ac_delim
23448sharedstatedir!$sharedstatedir$ac_delim
23449localstatedir!$localstatedir$ac_delim
23450includedir!$includedir$ac_delim
23451oldincludedir!$oldincludedir$ac_delim
23452docdir!$docdir$ac_delim
23453infodir!$infodir$ac_delim
23454htmldir!$htmldir$ac_delim
23455dvidir!$dvidir$ac_delim
23456pdfdir!$pdfdir$ac_delim
23457psdir!$psdir$ac_delim
23458libdir!$libdir$ac_delim
23459localedir!$localedir$ac_delim
23460mandir!$mandir$ac_delim
23461DEFS!$DEFS$ac_delim
23462ECHO_C!$ECHO_C$ac_delim
23463ECHO_N!$ECHO_N$ac_delim
23464ECHO_T!$ECHO_T$ac_delim
23465LIBS!$LIBS$ac_delim
23466build_alias!$build_alias$ac_delim
23467host_alias!$host_alias$ac_delim
23468target_alias!$target_alias$ac_delim
23469MAINT!$MAINT$ac_delim
23470build!$build$ac_delim
23471build_cpu!$build_cpu$ac_delim
23472build_vendor!$build_vendor$ac_delim
23473build_os!$build_os$ac_delim
23474host!$host$ac_delim
23475host_cpu!$host_cpu$ac_delim
23476host_vendor!$host_vendor$ac_delim
23477host_os!$host_os$ac_delim
23478CC!$CC$ac_delim
23479CFLAGS!$CFLAGS$ac_delim
23480LDFLAGS!$LDFLAGS$ac_delim
23481CPPFLAGS!$CPPFLAGS$ac_delim
23482ac_ct_CC!$ac_ct_CC$ac_delim
23483EXEEXT!$EXEEXT$ac_delim
23484OBJEXT!$OBJEXT$ac_delim
23485CPP!$CPP$ac_delim
23486GREP!$GREP$ac_delim
23487EGREP!$EGREP$ac_delim
23488LN_S!$LN_S$ac_delim
23489INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
23490INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
23491INSTALL_DATA!$INSTALL_DATA$ac_delim
23492RANLIB!$RANLIB$ac_delim
23493INSTALL_INFO!$INSTALL_INFO$ac_delim
23494GZIP_PROG!$GZIP_PROG$ac_delim
23495LIBSOUND!$LIBSOUND$ac_delim
23496PKG_CONFIG!$PKG_CONFIG$ac_delim
23497ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
23498ALSA_LIBS!$ALSA_LIBS$ac_delim
23499CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
23500SET_MAKE!$SET_MAKE$ac_delim
23501XMKMF!$XMKMF$ac_delim
23502GTK_CFLAGS!$GTK_CFLAGS$ac_delim
23503GTK_LIBS!$GTK_LIBS$ac_delim
23504ALLOCA!$ALLOCA$ac_delim
23505liblockfile!$liblockfile$ac_delim
23506LIBOBJS!$LIBOBJS$ac_delim
23507NEED_SETGID!$NEED_SETGID$ac_delim
23508KMEM_GROUP!$KMEM_GROUP$ac_delim
23509GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
23510GETOPT_H!$GETOPT_H$ac_delim
23511GETOPTOBJS!$GETOPTOBJS$ac_delim
23512version!$version$ac_delim
23513configuration!$configuration$ac_delim
23514canonical!$canonical$ac_delim
23515srcdir!$srcdir$ac_delim
23516lispdir!$lispdir$ac_delim
23517locallisppath!$locallisppath$ac_delim
23518lisppath!$lisppath$ac_delim
23519x_default_search_path!$x_default_search_path$ac_delim
23520etcdir!$etcdir$ac_delim
23521archlibdir!$archlibdir$ac_delim
23522bitmapdir!$bitmapdir$ac_delim
23523gamedir!$gamedir$ac_delim
23524gameuser!$gameuser$ac_delim
23525c_switch_system!$c_switch_system$ac_delim
23526c_switch_machine!$c_switch_machine$ac_delim
23527LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
23528LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
23529_ACEOF
23530
23531 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
23532 break
23533 elif $ac_last_try; then
23534 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
23535echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
23536 { (exit 1); exit 1; }; }
23537 else
23538 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8eeae1c9 23539 fi
ca81d7a0
JD
23540done
23541
23542ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
23543if test -n "$ac_eof"; then
23544 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
23545 ac_eof=`expr $ac_eof + 1`
23546fi
23547
23548cat >>$CONFIG_STATUS <<_ACEOF
23549cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
23550/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23551_ACEOF
23552sed '
23553s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
23554s/^/s,@/; s/!/@,|#_!!_#|/
23555:n
23556t n
23557s/'"$ac_delim"'$/,g/; t
23558s/$/\\/; p
23559N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
23560' >>$CONFIG_STATUS <conf$$subs.sed
23561rm -f conf$$subs.sed
23562cat >>$CONFIG_STATUS <<_ACEOF
23563CEOF$ac_eof
23564_ACEOF
23565
23566
23567ac_delim='%!_!# '
23568for ac_last_try in false false false false false :; do
23569 cat >conf$$subs.sed <<_ACEOF
23570C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
23571X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
23572machfile!$machfile$ac_delim
23573opsysfile!$opsysfile$ac_delim
23574carbon_appdir!$carbon_appdir$ac_delim
23575LTLIBOBJS!$LTLIBOBJS$ac_delim
23576_ACEOF
23577
23578 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 6; then
23579 break
23580 elif $ac_last_try; then
23581 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
23582echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
23583 { (exit 1); exit 1; }; }
23584 else
23585 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
23586 fi
23587done
23588
23589ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
23590if test -n "$ac_eof"; then
23591 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
23592 ac_eof=`expr $ac_eof + 1`
23593fi
8eeae1c9 23594
ca81d7a0
JD
23595cat >>$CONFIG_STATUS <<_ACEOF
23596cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
23597/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
23598_ACEOF
23599sed '
23600s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
23601s/^/s,@/; s/!/@,|#_!!_#|/
23602:n
23603t n
23604s/'"$ac_delim"'$/,g/; t
23605s/$/\\/; p
23606N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
23607' >>$CONFIG_STATUS <conf$$subs.sed
23608rm -f conf$$subs.sed
23609cat >>$CONFIG_STATUS <<_ACEOF
23610:end
23611s/|#_!!_#|//g
23612CEOF$ac_eof
c0d27fcc 23613_ACEOF
ca81d7a0
JD
23614
23615
23616# VPATH may cause trouble with some makes, so we remove $(srcdir),
23617# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23618# trailing colons and then remove the whole line if VPATH becomes empty
23619# (actually we leave an empty line to preserve line numbers).
23620if test "x$srcdir" = x.; then
23621 ac_vpsub='/^[ ]*VPATH[ ]*=/{
23622s/:*\$(srcdir):*/:/
23623s/:*\${srcdir}:*/:/
23624s/:*@srcdir@:*/:/
23625s/^\([^=]*=[ ]*\):*/\1/
23626s/:*$//
23627s/^[^=]*=[ ]*$//
23628}'
23629fi
23630
c0d27fcc 23631cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
23632fi # test -n "$CONFIG_FILES"
23633
23634
23635for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
23636do
23637 case $ac_tag in
23638 :[FHLC]) ac_mode=$ac_tag; continue;;
23639 esac
23640 case $ac_mode$ac_tag in
23641 :[FHL]*:*);;
23642 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
23643echo "$as_me: error: Invalid tag $ac_tag." >&2;}
23644 { (exit 1); exit 1; }; };;
23645 :[FH]-) ac_tag=-:-;;
23646 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
23647 esac
23648 ac_save_IFS=$IFS
23649 IFS=:
23650 set x $ac_tag
23651 IFS=$ac_save_IFS
23652 shift
23653 ac_file=$1
23654 shift
23655
23656 case $ac_mode in
23657 :L) ac_source=$1;;
23658 :[FH])
23659 ac_file_inputs=
23660 for ac_f
23661 do
23662 case $ac_f in
23663 -) ac_f="$tmp/stdin";;
23664 *) # Look for the file first in the build tree, then in the source tree
23665 # (if the path is not absolute). The absolute path cannot be DOS-style,
23666 # because $ac_f cannot contain `:'.
23667 test -f "$ac_f" ||
23668 case $ac_f in
23669 [\\/$]*) false;;
23670 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
23671 esac ||
23672 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
23673echo "$as_me: error: cannot find input file: $ac_f" >&2;}
23674 { (exit 1); exit 1; }; };;
23675 esac
23676 ac_file_inputs="$ac_file_inputs $ac_f"
23677 done
23678
23679 # Let's still pretend it is `configure' which instantiates (i.e., don't
23680 # use $as_me), people would be surprised to read:
23681 # /* config.h. Generated by config.status. */
23682 configure_input="Generated from "`IFS=:
23683 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
23684 if test x"$ac_file" != x-; then
23685 configure_input="$ac_file. $configure_input"
23686 { echo "$as_me:$LINENO: creating $ac_file" >&5
23687echo "$as_me: creating $ac_file" >&6;}
23688 fi
23689
23690 case $ac_tag in
23691 *:-:* | *:-) cat >"$tmp/stdin";;
23692 esac
23693 ;;
ba4481b5
DL
23694 esac
23695
ca81d7a0 23696 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 23697$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23698 X"$ac_file" : 'X\(//\)[^/]' \| \
23699 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 23700 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 23701echo X"$ac_file" |
ca81d7a0
JD
23702 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23703 s//\1/
23704 q
23705 }
23706 /^X\(\/\/\)[^/].*/{
23707 s//\1/
23708 q
23709 }
23710 /^X\(\/\/\)$/{
23711 s//\1/
23712 q
23713 }
23714 /^X\(\/\).*/{
23715 s//\1/
23716 q
23717 }
23718 s/.*/./; q'`
23719 { as_dir="$ac_dir"
23720 case $as_dir in #(
23721 -*) as_dir=./$as_dir;;
23722 esac
23723 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 23724 as_dirs=
ca81d7a0
JD
23725 while :; do
23726 case $as_dir in #(
23727 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
23728 *) as_qdir=$as_dir;;
23729 esac
23730 as_dirs="'$as_qdir' $as_dirs"
23731 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 23732$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
23733 X"$as_dir" : 'X\(//\)[^/]' \| \
23734 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 23735 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 23736echo X"$as_dir" |
ca81d7a0
JD
23737 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
23738 s//\1/
23739 q
23740 }
23741 /^X\(\/\/\)[^/].*/{
23742 s//\1/
23743 q
23744 }
23745 /^X\(\/\/\)$/{
23746 s//\1/
23747 q
23748 }
23749 /^X\(\/\).*/{
23750 s//\1/
23751 q
23752 }
23753 s/.*/./; q'`
23754 test -d "$as_dir" && break
6bae0ccf 23755 done
ca81d7a0
JD
23756 test -z "$as_dirs" || eval "mkdir $as_dirs"
23757 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
23758echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 23759 { (exit 1); exit 1; }; }; }
c0d27fcc 23760 ac_builddir=.
98418dba 23761
ca81d7a0
JD
23762case "$ac_dir" in
23763.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
23764*)
c0d27fcc 23765 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
23766 # A ".." for each directory in $ac_dir_suffix.
23767 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
23768 case $ac_top_builddir_sub in
23769 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
23770 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
23771 esac ;;
23772esac
23773ac_abs_top_builddir=$ac_pwd
23774ac_abs_builddir=$ac_pwd$ac_dir_suffix
23775# for backward compatibility:
23776ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
23777
23778case $srcdir in
ca81d7a0 23779 .) # We are building in place.
c0d27fcc 23780 ac_srcdir=.
ca81d7a0
JD
23781 ac_top_srcdir=$ac_top_builddir_sub
23782 ac_abs_top_srcdir=$ac_pwd ;;
23783 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 23784 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
23785 ac_top_srcdir=$srcdir
23786 ac_abs_top_srcdir=$srcdir ;;
23787 *) # Relative name.
23788 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
23789 ac_top_srcdir=$ac_top_build_prefix$srcdir
23790 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 23791esac
ca81d7a0 23792ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 23793
c0d27fcc 23794
ca81d7a0
JD
23795 case $ac_mode in
23796 :F)
23797 #
23798 # CONFIG_FILE
23799 #
ba4481b5 23800
503d2be0
AS
23801 case $INSTALL in
23802 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 23803 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 23804 esac
ca81d7a0 23805_ACEOF
ba4481b5 23806
ca81d7a0
JD
23807cat >>$CONFIG_STATUS <<\_ACEOF
23808# If the template does not know about datarootdir, expand it.
23809# FIXME: This hack should be removed a few years after 2.60.
23810ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 23811
ca81d7a0
JD
23812case `sed -n '/datarootdir/ {
23813 p
23814 q
23815}
23816/@datadir@/p
23817/@docdir@/p
23818/@infodir@/p
23819/@localedir@/p
23820/@mandir@/p
23821' $ac_file_inputs` in
23822*datarootdir*) ac_datarootdir_seen=yes;;
23823*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
23824 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
23825echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 23826_ACEOF
ca81d7a0
JD
23827cat >>$CONFIG_STATUS <<_ACEOF
23828 ac_datarootdir_hack='
23829 s&@datadir@&$datadir&g
23830 s&@docdir@&$docdir&g
23831 s&@infodir@&$infodir&g
23832 s&@localedir@&$localedir&g
23833 s&@mandir@&$mandir&g
23834 s&\\\${datarootdir}&$datarootdir&g' ;;
23835esac
23836_ACEOF
23837
23838# Neutralize VPATH when `$srcdir' = `.'.
23839# Shell code in configure.ac might set extrasub.
23840# FIXME: do we really want to maintain this feature?
c0d27fcc 23841cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23842 sed "$ac_vpsub
23843$extrasub
c0d27fcc
MR
23844_ACEOF
23845cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23846:t
23847/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ca81d7a0
JD
23848s&@configure_input@&$configure_input&;t t
23849s&@top_builddir@&$ac_top_builddir_sub&;t t
23850s&@srcdir@&$ac_srcdir&;t t
23851s&@abs_srcdir@&$ac_abs_srcdir&;t t
23852s&@top_srcdir@&$ac_top_srcdir&;t t
23853s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
23854s&@builddir@&$ac_builddir&;t t
23855s&@abs_builddir@&$ac_abs_builddir&;t t
23856s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
23857s&@INSTALL@&$ac_INSTALL&;t t
23858$ac_datarootdir_hack
23859" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
23860
23861test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
23862 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
23863 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
23864 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23865which seems to be undefined. Please make sure it is defined." >&5
23866echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
23867which seems to be undefined. Please make sure it is defined." >&2;}
23868
23869 rm -f "$tmp/stdin"
503d2be0 23870 case $ac_file in
ca81d7a0
JD
23871 -) cat "$tmp/out"; rm -f "$tmp/out";;
23872 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 23873 esac
ca81d7a0
JD
23874 ;;
23875 :H)
23876 #
23877 # CONFIG_HEADER
23878 #
23879_ACEOF
23880
23881# Transform confdefs.h into a sed script `conftest.defines', that
23882# substitutes the proper values into config.h.in to produce config.h.
23883rm -f conftest.defines conftest.tail
23884# First, append a space to every undef/define line, to ease matching.
23885echo 's/$/ /' >conftest.defines
23886# Then, protect against being on the right side of a sed subst, or in
23887# an unquoted here document, in config.status. If some macros were
23888# called several times there might be several #defines for the same
23889# symbol, which is useless. But do not sort them, since the last
23890# AC_DEFINE must be honored.
23891ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
23892# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
23893# NAME is the cpp macro being defined, VALUE is the value it is being given.
23894# PARAMS is the parameter list in the macro definition--in most cases, it's
23895# just an empty string.
23896ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
23897ac_dB='\\)[ (].*,\\1define\\2'
23898ac_dC=' '
23899ac_dD=' ,'
23900
23901uniq confdefs.h |
23902 sed -n '
23903 t rset
23904 :rset
23905 s/^[ ]*#[ ]*define[ ][ ]*//
23906 t ok
23907 d
23908 :ok
23909 s/[\\&,]/\\&/g
23910 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
23911 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
23912 ' >>conftest.defines
23913
23914# Remove the space that was appended to ease matching.
23915# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
23916# example, in the case of _POSIX_SOURCE, which is predefined and required
23917# on some systems where configure will not decide to define it.
ca81d7a0
JD
23918# (The regexp can be short, since the line contains either #define or #undef.)
23919echo 's/ $//
23920s,^[ #]*u.*,/* & */,' >>conftest.defines
23921
23922# Break up conftest.defines:
23923ac_max_sed_lines=50
23924
23925# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
23926# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
23927# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
23928# et cetera.
23929ac_in='$ac_file_inputs'
23930ac_out='"$tmp/out1"'
23931ac_nxt='"$tmp/out2"'
23932
23933while :
503d2be0 23934do
ca81d7a0
JD
23935 # Write a here document:
23936 cat >>$CONFIG_STATUS <<_ACEOF
23937 # First, check the format of the line:
23938 cat >"\$tmp/defines.sed" <<\\CEOF
23939/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
23940/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
23941b
23942:def
23943_ACEOF
23944 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 23945 echo 'CEOF
ca81d7a0
JD
23946 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
23947 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
23948 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
23949 grep . conftest.tail >/dev/null || break
503d2be0
AS
23950 rm -f conftest.defines
23951 mv conftest.tail conftest.defines
23952done
ca81d7a0 23953rm -f conftest.defines conftest.tail
503d2be0 23954
ca81d7a0 23955echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 23956cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 23957 if test x"$ac_file" != x-; then
ca81d7a0
JD
23958 echo "/* $configure_input */" >"$tmp/config.h"
23959 cat "$ac_result" >>"$tmp/config.h"
23960 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 23961 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
23962echo "$as_me: $ac_file is unchanged" >&6;}
23963 else
503d2be0 23964 rm -f $ac_file
ca81d7a0 23965 mv "$tmp/config.h" $ac_file
ba4481b5 23966 fi
503d2be0 23967 else
ca81d7a0
JD
23968 echo "/* $configure_input */"
23969 cat "$ac_result"
ba4481b5 23970 fi
ca81d7a0
JD
23971 rm -f "$tmp/out12"
23972 ;;
4b411bfe 23973
ca81d7a0
JD
23974 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
23975echo "$as_me: executing $ac_file commands" >&6;}
23976 ;;
23977 esac
c0d27fcc 23978
4b411bfe 23979
ca81d7a0
JD
23980 case $ac_file$ac_mode in
23981 "default":C)
ba4481b5
DL
23982
23983### Make the necessary directories, if they don't exist.
23984for dir in etc lisp ; do
23985 test -d ${dir} || mkdir ${dir}
23986done
23987
23988# Build src/Makefile from ${srcdir}/src/Makefile.c
23989# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
23990# This must be done after src/config.h is built, since we rely on that file.
23991
23992# Now get this: Some word that is part of the ${srcdir} directory name
23993# or the ${configuration} value might, just might, happen to be an
23994# identifier like `sun4' or `i386' or something, and be predefined by
23995# the C preprocessor to some helpful value like 1, or maybe the empty
23996# string. Needless to say consequent macro substitutions are less
23997# than conducive to the makefile finding the correct directory.
23998undefs="`echo $top_srcdir $configuration $canonical |
23999sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24000 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
24001`"
24002
24003echo creating src/epaths.h
4aa6b955 24004${MAKE-make} epaths-force
ba4481b5 24005
1c203d4c
DL
24006# As of 2000-11-19, newest development versions of GNU cpp preprocess
24007# `..' to `. .' unless invoked with -traditional
24008
d0e9bfd2 24009if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
24010 CPPFLAGS="$CPPFLAGS -traditional"
24011fi
24012
ba4481b5
DL
24013echo creating lib-src/Makefile
24014( cd lib-src
24015 rm -f junk.c junk1.c junk2.c
24016 sed -e '/start of cpp stuff/q' \
24017 < Makefile.c > junk1.c
24018 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24019 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24020 < Makefile.c > junk.c
503d2be0 24021 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24022 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24023 cat junk1.c junk2.c > Makefile.new
24024 rm -f junk.c junk1.c junk2.c
24025 chmod 444 Makefile.new
24026 mv -f Makefile.new Makefile
24027)
24028
24029echo creating src/Makefile
24030( cd src
24031 rm -f junk.c junk1.c junk2.c
24032 sed -e '/start of cpp stuff/q' \
24033 < Makefile.c > junk1.c
24034 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24035 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24036 < Makefile.c > junk.c
503d2be0 24037 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24038 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24039 cat junk1.c junk2.c > Makefile.new
24040 rm -f junk.c junk1.c junk2.c
24041 chmod 444 Makefile.new
24042 mv -f Makefile.new Makefile
24043)
24044
503d2be0 24045if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 24046 echo creating src/.gdbinit
503d2be0 24047 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
24048fi
24049
24050# This is how we know whether to re-run configure in certain cases.
24051touch src/config.stamp
24052
503d2be0 24053 ;;
ca81d7a0 24054
503d2be0 24055 esac
ca81d7a0 24056done # for ac_tag
503d2be0 24057
ba4481b5 24058
503d2be0 24059{ (exit 0); exit 0; }
c0d27fcc 24060_ACEOF
ba4481b5 24061chmod +x $CONFIG_STATUS
503d2be0
AS
24062ac_clean_files=$ac_clean_files_save
24063
c0d27fcc 24064
503d2be0
AS
24065# configure is writing to config.log, and then calls config.status.
24066# config.status does its own redirection, appending to config.log.
24067# Unfortunately, on DOS this fails, as config.log is still kept open
24068# by configure, so config.status won't be able to write to it; its
24069# output is simply discarded. So we exec the FD to /dev/null,
24070# effectively closing config.log, so it can be properly (re)opened and
24071# appended to by config.status. When coming back to configure, we
24072# need to make the FD available again.
24073if test "$no_create" != yes; then
24074 ac_cs_success=:
19650fd6
AS
24075 ac_config_status_args=
24076 test "$silent" = yes &&
24077 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 24078 exec 5>/dev/null
19650fd6 24079 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
24080 exec 5>>config.log
24081 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24082 # would make configure fail if this is the last instruction.
24083 $ac_cs_success || { (exit 1); exit 1; }
24084fi
f5f47add 24085
c0d27fcc 24086