*** empty log message ***
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
f053c89f 3# Generated by GNU Autoconf 2.61.
ba4481b5 4#
ca81d7a0 5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
040c474e 6# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
ba4481b5
DL
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
c0d27fcc
MR
9## --------------------- ##
10## M4sh Initialization. ##
11## --------------------- ##
503d2be0 12
f053c89f
CY
13# Be more Bourne compatible
14DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16 emulate sh
17 NULLCMD=:
6bae0ccf
DL
18 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19 # is contrary to our usage. Disable this feature.
20 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
21 setopt NO_GLOB_SUBST
22else
f053c89f
CY
23 case `(set -o) 2>/dev/null` in
24 *posix*) set -o posix ;;
25esac
26
503d2be0 27fi
f053c89f
CY
28
29
503d2be0 30
ca81d7a0
JD
31
32# PATH needs CR
33# Avoid depending upon Character Ranges.
34as_cr_letters='abcdefghijklmnopqrstuvwxyz'
35as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36as_cr_Letters=$as_cr_letters$as_cr_LETTERS
37as_cr_digits='0123456789'
38as_cr_alnum=$as_cr_Letters$as_cr_digits
39
40# The user is always right.
41if test "${PATH_SEPARATOR+set}" != set; then
42 echo "#! /bin/sh" >conf$$.sh
43 echo "exit 0" >>conf$$.sh
44 chmod +x conf$$.sh
45 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
46 PATH_SEPARATOR=';'
47 else
48 PATH_SEPARATOR=:
49 fi
50 rm -f conf$$.sh
51fi
52
c0d27fcc 53# Support unset when possible.
edfaf76d 54if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
55 as_unset=unset
56else
57 as_unset=false
58fi
59
6bae0ccf 60
ca81d7a0
JD
61# IFS
62# We need space, tab and new line, in precisely that order. Quoting is
63# there to prevent editors from complaining about space-tab.
64# (If _AS_PATH_WALK were called with IFS unset, it would disable word
65# splitting by setting IFS to empty value.)
66as_nl='
67'
68IFS=" "" $as_nl"
69
70# Find who we are. Look in the path if we contain no directory separator.
71case $0 in
72 *[\\/]* ) as_myself=$0 ;;
73 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
74for as_dir in $PATH
75do
76 IFS=$as_save_IFS
77 test -z "$as_dir" && as_dir=.
78 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
79done
80IFS=$as_save_IFS
81
82 ;;
83esac
84# We did not find ourselves, most probably we were run as `sh COMMAND'
85# in which case we are not to be found in the path.
86if test "x$as_myself" = x; then
87 as_myself=$0
88fi
89if test ! -f "$as_myself"; then
90 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
91 { (exit 1); exit 1; }
92fi
93
6bae0ccf 94# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
95for as_var in ENV MAIL MAILPATH
96do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
97done
6bae0ccf
DL
98PS1='$ '
99PS2='> '
100PS4='+ '
101
102# NLS nuisances.
19650fd6
AS
103for as_var in \
104 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
105 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
106 LC_TELEPHONE LC_TIME
6bae0ccf 107do
edfaf76d 108 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
109 eval $as_var=C; export $as_var
110 else
ca81d7a0 111 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
112 fi
113done
114
115# Required to use basename.
ca81d7a0
JD
116if expr a : '\(a\)' >/dev/null 2>&1 &&
117 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
118 as_expr=expr
119else
120 as_expr=false
121fi
122
ca81d7a0 123if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
124 as_basename=basename
125else
126 as_basename=false
127fi
c0d27fcc
MR
128
129
503d2be0 130# Name of the executable.
ca81d7a0 131as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
132$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
133 X"$0" : 'X\(//\)$' \| \
ca81d7a0 134 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 135echo X/"$0" |
ca81d7a0
JD
136 sed '/^.*\/\([^/][^/]*\)\/*$/{
137 s//\1/
138 q
139 }
140 /^X\/\(\/\/\)$/{
141 s//\1/
142 q
143 }
144 /^X\/\(\/\).*/{
145 s//\1/
146 q
147 }
148 s/.*/./; q'`
c0d27fcc 149
ca81d7a0
JD
150# CDPATH.
151$as_unset CDPATH
8eeae1c9 152
8eeae1c9 153
ca81d7a0
JD
154if test "x$CONFIG_SHELL" = x; then
155 if (eval ":") 2>/dev/null; then
156 as_have_required=yes
157else
158 as_have_required=no
8eeae1c9
JD
159fi
160
ca81d7a0
JD
161 if test $as_have_required = yes && (eval ":
162(as_func_return () {
163 (exit \$1)
164}
165as_func_success () {
166 as_func_return 0
167}
168as_func_failure () {
169 as_func_return 1
170}
171as_func_ret_success () {
172 return 0
173}
174as_func_ret_failure () {
175 return 1
176}
8eeae1c9 177
ca81d7a0
JD
178exitcode=0
179if as_func_success; then
180 :
181else
182 exitcode=1
183 echo as_func_success failed.
184fi
8eeae1c9 185
ca81d7a0
JD
186if as_func_failure; then
187 exitcode=1
188 echo as_func_failure succeeded.
189fi
190
191if as_func_ret_success; then
192 :
193else
194 exitcode=1
195 echo as_func_ret_success failed.
196fi
197
198if as_func_ret_failure; then
199 exitcode=1
200 echo as_func_ret_failure succeeded.
201fi
202
203if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
204 :
205else
206 exitcode=1
207 echo positional parameters were not saved.
208fi
209
210test \$exitcode = 0) || { (exit 1); exit 1; }
211
212(
213 as_lineno_1=\$LINENO
214 as_lineno_2=\$LINENO
215 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
216 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
217") 2> /dev/null; then
218 :
219else
220 as_candidate_shells=
c0d27fcc 221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
f053c89f 222for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
c0d27fcc
MR
223do
224 IFS=$as_save_IFS
225 test -z "$as_dir" && as_dir=.
ca81d7a0 226 case $as_dir in
c0d27fcc 227 /*)
ca81d7a0
JD
228 for as_base in sh bash ksh sh5; do
229 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
230 done;;
231 esac
232done
233IFS=$as_save_IFS
234
235
236 for as_shell in $as_candidate_shells $SHELL; do
237 # Try only shells that exist, to save several forks.
238 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
239 { ("$as_shell") 2> /dev/null <<\_ASEOF
ca81d7a0
JD
240if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
241 emulate sh
242 NULLCMD=:
243 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
244 # is contrary to our usage. Disable this feature.
245 alias -g '${1+"$@"}'='"$@"'
246 setopt NO_GLOB_SUBST
247else
f053c89f
CY
248 case `(set -o) 2>/dev/null` in
249 *posix*) set -o posix ;;
250esac
251
ca81d7a0 252fi
f053c89f 253
ca81d7a0
JD
254
255:
256_ASEOF
257}; then
258 CONFIG_SHELL=$as_shell
259 as_have_required=yes
260 if { "$as_shell" 2> /dev/null <<\_ASEOF
ca81d7a0
JD
261if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
262 emulate sh
263 NULLCMD=:
264 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
265 # is contrary to our usage. Disable this feature.
266 alias -g '${1+"$@"}'='"$@"'
267 setopt NO_GLOB_SUBST
268else
f053c89f
CY
269 case `(set -o) 2>/dev/null` in
270 *posix*) set -o posix ;;
271esac
272
ca81d7a0 273fi
f053c89f 274
ca81d7a0
JD
275
276:
277(as_func_return () {
278 (exit $1)
279}
280as_func_success () {
281 as_func_return 0
282}
283as_func_failure () {
284 as_func_return 1
285}
286as_func_ret_success () {
287 return 0
288}
289as_func_ret_failure () {
290 return 1
291}
292
293exitcode=0
294if as_func_success; then
295 :
296else
297 exitcode=1
298 echo as_func_success failed.
299fi
300
301if as_func_failure; then
302 exitcode=1
303 echo as_func_failure succeeded.
304fi
305
306if as_func_ret_success; then
307 :
308else
309 exitcode=1
310 echo as_func_ret_success failed.
311fi
312
313if as_func_ret_failure; then
314 exitcode=1
315 echo as_func_ret_failure succeeded.
316fi
317
318if ( set x; as_func_ret_success y && test x = "$1" ); then
319 :
320else
321 exitcode=1
322 echo positional parameters were not saved.
323fi
324
325test $exitcode = 0) || { (exit 1); exit 1; }
326
327(
8eeae1c9
JD
328 as_lineno_1=$LINENO
329 as_lineno_2=$LINENO
330 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0
JD
331 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
332
333_ASEOF
334}; then
335 break
336fi
337
338fi
339
340 done
341
342 if test "x$CONFIG_SHELL" != x; then
343 for as_var in BASH_ENV ENV
344 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
345 done
346 export CONFIG_SHELL
347 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
348fi
349
350
351 if test $as_have_required = no; then
352 echo This script requires a shell more modern than all the
353 echo shells that I found on your system. Please install a
354 echo modern shell, or manually run the script under such a
355 echo shell if you do have one.
356 { (exit 1); exit 1; }
357fi
358
359
360fi
361
362fi
363
364
365
366(eval "as_func_return () {
367 (exit \$1)
368}
369as_func_success () {
370 as_func_return 0
371}
372as_func_failure () {
373 as_func_return 1
374}
375as_func_ret_success () {
376 return 0
377}
378as_func_ret_failure () {
379 return 1
380}
381
382exitcode=0
383if as_func_success; then
384 :
385else
386 exitcode=1
387 echo as_func_success failed.
388fi
389
390if as_func_failure; then
391 exitcode=1
392 echo as_func_failure succeeded.
393fi
394
395if as_func_ret_success; then
396 :
397else
398 exitcode=1
399 echo as_func_ret_success failed.
400fi
401
402if as_func_ret_failure; then
403 exitcode=1
404 echo as_func_ret_failure succeeded.
405fi
406
407if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
408 :
409else
410 exitcode=1
411 echo positional parameters were not saved.
412fi
413
414test \$exitcode = 0") || {
ab43d1e4
CY
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
ca81d7a0
JD
419}
420
421
422
423 as_lineno_1=$LINENO
424 as_lineno_2=$LINENO
425 test "x$as_lineno_1" != "x$as_lineno_2" &&
426 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
427
428 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
429 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
430 # line-number line after each line using $LINENO; the second 'sed'
431 # does the real work. The second script uses 'N' to pair each
432 # line-number line with the line containing $LINENO, and appends
433 # trailing '-' during substitution so that $LINENO is not a special
434 # case at line end.
c0d27fcc 435 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
436 # scripts with optimization help from Paolo Bonzini. Blame Lee
437 # E. McMahon (1931-1989) for sed's syntax. :-)
438 sed -n '
439 p
440 /[$]LINENO/=
441 ' <$as_myself |
c0d27fcc 442 sed '
ca81d7a0
JD
443 s/[$]LINENO.*/&-/
444 t lineno
445 b
446 :lineno
c0d27fcc 447 N
ca81d7a0
JD
448 :loop
449 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 450 t loop
ca81d7a0 451 s/-\n.*//
c0d27fcc 452 ' >$as_me.lineno &&
ca81d7a0 453 chmod +x "$as_me.lineno" ||
c0d27fcc
MR
454 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
455 { (exit 1); exit 1; }; }
456
457 # Don't try to exec as it changes $[0], causing all sort of problems
458 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
459 # original and so on. Autoconf is especially sensitive to this).
460 . "./$as_me.lineno"
c0d27fcc
MR
461 # Exit status is that of the last command.
462 exit
463}
464
465
ca81d7a0
JD
466if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
467 as_dirname=dirname
468else
469 as_dirname=false
470fi
471
472ECHO_C= ECHO_N= ECHO_T=
473case `echo -n x` in
474-n*)
475 case `echo 'x\c'` in
476 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
477 *) ECHO_C='\c';;
478 esac;;
479*)
480 ECHO_N='-n';;
c0d27fcc 481esac
503d2be0 482
ca81d7a0
JD
483if expr a : '\(a\)' >/dev/null 2>&1 &&
484 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
485 as_expr=expr
486else
487 as_expr=false
488fi
489
490rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
491if test -d conf$$.dir; then
492 rm -f conf$$.dir/conf$$.file
493else
494 rm -f conf$$.dir
495 mkdir conf$$.dir
496fi
503d2be0
AS
497echo >conf$$.file
498if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
499 as_ln_s='ln -s'
500 # ... but there are two gotchas:
501 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
502 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
503 # In both cases, we have to default to `cp -p'.
504 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 505 as_ln_s='cp -p'
503d2be0
AS
506elif ln conf$$.file conf$$ 2>/dev/null; then
507 as_ln_s=ln
508else
509 as_ln_s='cp -p'
510fi
ca81d7a0
JD
511rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
512rmdir conf$$.dir 2>/dev/null
503d2be0 513
6bae0ccf
DL
514if mkdir -p . 2>/dev/null; then
515 as_mkdir_p=:
516else
edfaf76d 517 test -d ./-p && rmdir ./-p
6bae0ccf
DL
518 as_mkdir_p=false
519fi
520
f053c89f
CY
521if test -x / >/dev/null 2>&1; then
522 as_test_x='test -x'
ca81d7a0 523else
f053c89f
CY
524 if ls -dL / >/dev/null 2>&1; then
525 as_ls_L_option=L
526 else
527 as_ls_L_option=
528 fi
529 as_test_x='
530 eval sh -c '\''
531 if test -d "$1"; then
532 test -d "$1/.";
533 else
534 case $1 in
535 -*)set "./$1";;
536 esac;
537 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
538 ???[sx]*):;;*)false;;esac;fi
539 '\'' sh
540 '
ca81d7a0 541fi
f053c89f 542as_executable_p=$as_test_x
503d2be0 543
c0d27fcc 544# Sed expression to map a string onto a valid CPP name.
edfaf76d 545as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
546
547# Sed expression to map a string onto a valid variable name.
edfaf76d 548as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 549
503d2be0 550
c0d27fcc 551
ca81d7a0 552exec 7<&0 </dev/null 6>&1
503d2be0
AS
553
554# Name of the host.
555# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
556# so uname gets run too.
557ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
558
503d2be0
AS
559#
560# Initializations.
561#
ba4481b5 562ac_default_prefix=/usr/local
ca81d7a0 563ac_clean_files=
6bae0ccf 564ac_config_libobj_dir=.
ca81d7a0 565LIBOBJS=
503d2be0
AS
566cross_compiling=no
567subdirs=
c0d27fcc
MR
568MFLAGS=
569MAKEFLAGS=
503d2be0
AS
570SHELL=${CONFIG_SHELL-/bin/sh}
571
c0d27fcc
MR
572# Identity of this package.
573PACKAGE_NAME=
574PACKAGE_TARNAME=
575PACKAGE_VERSION=
576PACKAGE_STRING=
577PACKAGE_BUGREPORT=
578
503d2be0 579ac_unique_file="src/lisp.h"
6bae0ccf 580ac_config_libobj_dir=src
503d2be0
AS
581# Factoring default headers for most tests.
582ac_includes_default="\
583#include <stdio.h>
f053c89f 584#ifdef HAVE_SYS_TYPES_H
503d2be0
AS
585# include <sys/types.h>
586#endif
f053c89f 587#ifdef HAVE_SYS_STAT_H
503d2be0
AS
588# include <sys/stat.h>
589#endif
f053c89f 590#ifdef STDC_HEADERS
503d2be0
AS
591# include <stdlib.h>
592# include <stddef.h>
593#else
f053c89f 594# ifdef HAVE_STDLIB_H
503d2be0
AS
595# include <stdlib.h>
596# endif
597#endif
f053c89f
CY
598#ifdef HAVE_STRING_H
599# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
503d2be0
AS
600# include <memory.h>
601# endif
602# include <string.h>
603#endif
f053c89f 604#ifdef HAVE_STRINGS_H
503d2be0
AS
605# include <strings.h>
606#endif
f053c89f 607#ifdef HAVE_INTTYPES_H
503d2be0 608# include <inttypes.h>
ca81d7a0 609#endif
f053c89f 610#ifdef HAVE_STDINT_H
ca81d7a0 611# include <stdint.h>
503d2be0 612#endif
f053c89f 613#ifdef HAVE_UNISTD_H
503d2be0
AS
614# include <unistd.h>
615#endif"
ba4481b5 616
f053c89f
CY
617ac_header_list=
618ac_func_list=
ca81d7a0
JD
619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656MAINT
657build
658build_cpu
659build_vendor
660build_os
661host
662host_cpu
663host_vendor
664host_os
665CC
666CFLAGS
667LDFLAGS
668CPPFLAGS
669ac_ct_CC
670EXEEXT
671OBJEXT
672CPP
673GREP
674EGREP
675LN_S
676INSTALL_PROGRAM
677INSTALL_SCRIPT
678INSTALL_DATA
679RANLIB
680INSTALL_INFO
681GZIP_PROG
682LIBSOUND
683PKG_CONFIG
684ALSA_CFLAGS
685ALSA_LIBS
686
687CFLAGS_SOUND
688SET_MAKE
689XMKMF
690GTK_CFLAGS
691GTK_LIBS
9d89ffd0
JD
692XFT_CFLAGS
693XFT_LIBS
ca81d7a0
JD
694ALLOCA
695liblockfile
696LIBOBJS
697NEED_SETGID
698KMEM_GROUP
699GETLOADAVG_LIBS
700GETOPT_H
701GETOPTOBJS
702version
703configuration
704canonical
705srcdir
706lispdir
707locallisppath
708lisppath
709x_default_search_path
710etcdir
711archlibdir
712bitmapdir
713gamedir
714gameuser
715c_switch_system
716c_switch_machine
717LD_SWITCH_X_SITE
718LD_SWITCH_X_SITE_AUX
719C_SWITCH_X_SITE
720X_TOOLKIT_TYPE
721machfile
722opsysfile
723carbon_appdir
724LTLIBOBJS'
6bae0ccf 725ac_subst_files=''
ca81d7a0
JD
726 ac_precious_vars='build_alias
727host_alias
728target_alias
729CC
730CFLAGS
731LDFLAGS
f053c89f 732LIBS
ca81d7a0
JD
733CPPFLAGS
734CPP
735XMKMF'
736
c0d27fcc 737
ba4481b5 738# Initialize some variables set by options.
503d2be0
AS
739ac_init_help=
740ac_init_version=false
ba4481b5
DL
741# The variables have the same names as the options, with
742# dashes changed to underlines.
503d2be0 743cache_file=/dev/null
ba4481b5 744exec_prefix=NONE
ba4481b5 745no_create=
ba4481b5
DL
746no_recursion=
747prefix=NONE
748program_prefix=NONE
749program_suffix=NONE
750program_transform_name=s,x,x,
751silent=
752site=
753srcdir=
ba4481b5
DL
754verbose=
755x_includes=NONE
756x_libraries=NONE
503d2be0
AS
757
758# Installation directory options.
759# These are left unexpanded so users can "make install exec_prefix=/foo"
760# and all the variables that are supposed to be based on exec_prefix
761# by default will actually change.
762# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 763# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
764bindir='${exec_prefix}/bin'
765sbindir='${exec_prefix}/sbin'
766libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
767datarootdir='${prefix}/share'
768datadir='${datarootdir}'
ba4481b5
DL
769sysconfdir='${prefix}/etc'
770sharedstatedir='${prefix}/com'
771localstatedir='${prefix}/var'
ba4481b5
DL
772includedir='${prefix}/include'
773oldincludedir='/usr/include'
ca81d7a0
JD
774docdir='${datarootdir}/doc/${PACKAGE}'
775infodir='${datarootdir}/info'
776htmldir='${docdir}'
777dvidir='${docdir}'
778pdfdir='${docdir}'
779psdir='${docdir}'
780libdir='${exec_prefix}/lib'
781localedir='${datarootdir}/locale'
782mandir='${datarootdir}/man'
ba4481b5 783
ba4481b5 784ac_prev=
ca81d7a0 785ac_dashdash=
ba4481b5
DL
786for ac_option
787do
ba4481b5
DL
788 # If the previous option needs an argument, assign it.
789 if test -n "$ac_prev"; then
ca81d7a0 790 eval $ac_prev=\$ac_option
ba4481b5
DL
791 ac_prev=
792 continue
793 fi
794
ca81d7a0
JD
795 case $ac_option in
796 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
797 *) ac_optarg=yes ;;
798 esac
ba4481b5
DL
799
800 # Accept the important Cygnus configure options, so we can diagnose typos.
801
ca81d7a0
JD
802 case $ac_dashdash$ac_option in
803 --)
804 ac_dashdash=yes ;;
ba4481b5
DL
805
806 -bindir | --bindir | --bindi | --bind | --bin | --bi)
807 ac_prev=bindir ;;
808 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 809 bindir=$ac_optarg ;;
ba4481b5
DL
810
811 -build | --build | --buil | --bui | --bu)
503d2be0 812 ac_prev=build_alias ;;
ba4481b5 813 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 814 build_alias=$ac_optarg ;;
ba4481b5
DL
815
816 -cache-file | --cache-file | --cache-fil | --cache-fi \
817 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
818 ac_prev=cache_file ;;
819 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
820 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
821 cache_file=$ac_optarg ;;
822
823 --config-cache | -C)
824 cache_file=config.cache ;;
ba4481b5 825
ca81d7a0 826 -datadir | --datadir | --datadi | --datad)
ba4481b5 827 ac_prev=datadir ;;
ca81d7a0 828 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 829 datadir=$ac_optarg ;;
ba4481b5 830
ca81d7a0
JD
831 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
832 | --dataroo | --dataro | --datar)
833 ac_prev=datarootdir ;;
834 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
835 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
836 datarootdir=$ac_optarg ;;
837
ba4481b5 838 -disable-* | --disable-*)
503d2be0 839 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 840 # Reject names that are not valid shell variable names.
f053c89f 841 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
842 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
843 { (exit 1); exit 1; }; }
f053c89f 844 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0
JD
845 eval enable_$ac_feature=no ;;
846
847 -docdir | --docdir | --docdi | --doc | --do)
848 ac_prev=docdir ;;
849 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
850 docdir=$ac_optarg ;;
851
852 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
853 ac_prev=dvidir ;;
854 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
855 dvidir=$ac_optarg ;;
ba4481b5
DL
856
857 -enable-* | --enable-*)
503d2be0 858 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 859 # Reject names that are not valid shell variable names.
f053c89f 860 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
861 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
862 { (exit 1); exit 1; }; }
f053c89f 863 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0 864 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
865
866 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
867 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
868 | --exec | --exe | --ex)
869 ac_prev=exec_prefix ;;
870 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
871 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
872 | --exec=* | --exe=* | --ex=*)
503d2be0 873 exec_prefix=$ac_optarg ;;
ba4481b5
DL
874
875 -gas | --gas | --ga | --g)
876 # Obsolete; use --with-gas.
877 with_gas=yes ;;
878
503d2be0
AS
879 -help | --help | --hel | --he | -h)
880 ac_init_help=long ;;
881 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
882 ac_init_help=recursive ;;
883 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
884 ac_init_help=short ;;
ba4481b5
DL
885
886 -host | --host | --hos | --ho)
503d2be0 887 ac_prev=host_alias ;;
ba4481b5 888 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 889 host_alias=$ac_optarg ;;
ba4481b5 890
ca81d7a0
JD
891 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
892 ac_prev=htmldir ;;
893 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
894 | --ht=*)
895 htmldir=$ac_optarg ;;
896
ba4481b5
DL
897 -includedir | --includedir | --includedi | --included | --include \
898 | --includ | --inclu | --incl | --inc)
899 ac_prev=includedir ;;
900 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
901 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 902 includedir=$ac_optarg ;;
ba4481b5
DL
903
904 -infodir | --infodir | --infodi | --infod | --info | --inf)
905 ac_prev=infodir ;;
906 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 907 infodir=$ac_optarg ;;
ba4481b5
DL
908
909 -libdir | --libdir | --libdi | --libd)
910 ac_prev=libdir ;;
911 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 912 libdir=$ac_optarg ;;
ba4481b5
DL
913
914 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
915 | --libexe | --libex | --libe)
916 ac_prev=libexecdir ;;
917 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
918 | --libexe=* | --libex=* | --libe=*)
503d2be0 919 libexecdir=$ac_optarg ;;
ba4481b5 920
ca81d7a0
JD
921 -localedir | --localedir | --localedi | --localed | --locale)
922 ac_prev=localedir ;;
923 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
924 localedir=$ac_optarg ;;
925
ba4481b5 926 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 927 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
928 ac_prev=localstatedir ;;
929 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 930 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 931 localstatedir=$ac_optarg ;;
ba4481b5
DL
932
933 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
934 ac_prev=mandir ;;
935 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 936 mandir=$ac_optarg ;;
ba4481b5
DL
937
938 -nfp | --nfp | --nf)
939 # Obsolete; use --without-fp.
940 with_fp=no ;;
941
942 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 943 | --no-cr | --no-c | -n)
ba4481b5
DL
944 no_create=yes ;;
945
946 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
947 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
948 no_recursion=yes ;;
949
950 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
951 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
952 | --oldin | --oldi | --old | --ol | --o)
953 ac_prev=oldincludedir ;;
954 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
955 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
956 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 957 oldincludedir=$ac_optarg ;;
ba4481b5
DL
958
959 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
960 ac_prev=prefix ;;
961 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 962 prefix=$ac_optarg ;;
ba4481b5
DL
963
964 -program-prefix | --program-prefix | --program-prefi | --program-pref \
965 | --program-pre | --program-pr | --program-p)
966 ac_prev=program_prefix ;;
967 -program-prefix=* | --program-prefix=* | --program-prefi=* \
968 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 969 program_prefix=$ac_optarg ;;
ba4481b5
DL
970
971 -program-suffix | --program-suffix | --program-suffi | --program-suff \
972 | --program-suf | --program-su | --program-s)
973 ac_prev=program_suffix ;;
974 -program-suffix=* | --program-suffix=* | --program-suffi=* \
975 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 976 program_suffix=$ac_optarg ;;
ba4481b5
DL
977
978 -program-transform-name | --program-transform-name \
979 | --program-transform-nam | --program-transform-na \
980 | --program-transform-n | --program-transform- \
981 | --program-transform | --program-transfor \
982 | --program-transfo | --program-transf \
983 | --program-trans | --program-tran \
984 | --progr-tra | --program-tr | --program-t)
985 ac_prev=program_transform_name ;;
986 -program-transform-name=* | --program-transform-name=* \
987 | --program-transform-nam=* | --program-transform-na=* \
988 | --program-transform-n=* | --program-transform-=* \
989 | --program-transform=* | --program-transfor=* \
990 | --program-transfo=* | --program-transf=* \
991 | --program-trans=* | --program-tran=* \
992 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 993 program_transform_name=$ac_optarg ;;
ba4481b5 994
ca81d7a0
JD
995 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
996 ac_prev=pdfdir ;;
997 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
998 pdfdir=$ac_optarg ;;
999
1000 -psdir | --psdir | --psdi | --psd | --ps)
1001 ac_prev=psdir ;;
1002 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1003 psdir=$ac_optarg ;;
1004
ba4481b5
DL
1005 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1006 | -silent | --silent | --silen | --sile | --sil)
1007 silent=yes ;;
1008
1009 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1010 ac_prev=sbindir ;;
1011 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1012 | --sbi=* | --sb=*)
503d2be0 1013 sbindir=$ac_optarg ;;
ba4481b5
DL
1014
1015 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1016 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1017 | --sharedst | --shareds | --shared | --share | --shar \
1018 | --sha | --sh)
1019 ac_prev=sharedstatedir ;;
1020 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1021 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1022 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1023 | --sha=* | --sh=*)
503d2be0 1024 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1025
1026 -site | --site | --sit)
1027 ac_prev=site ;;
1028 -site=* | --site=* | --sit=*)
503d2be0 1029 site=$ac_optarg ;;
ba4481b5
DL
1030
1031 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1032 ac_prev=srcdir ;;
1033 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1034 srcdir=$ac_optarg ;;
ba4481b5
DL
1035
1036 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1037 | --syscon | --sysco | --sysc | --sys | --sy)
1038 ac_prev=sysconfdir ;;
1039 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1040 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1041 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1042
1043 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1044 ac_prev=target_alias ;;
ba4481b5 1045 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1046 target_alias=$ac_optarg ;;
ba4481b5
DL
1047
1048 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1049 verbose=yes ;;
1050
503d2be0
AS
1051 -version | --version | --versio | --versi | --vers | -V)
1052 ac_init_version=: ;;
ba4481b5
DL
1053
1054 -with-* | --with-*)
503d2be0 1055 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1056 # Reject names that are not valid shell variable names.
f053c89f 1057 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1058 { echo "$as_me: error: invalid package name: $ac_package" >&2
1059 { (exit 1); exit 1; }; }
f053c89f 1060 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1061 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1062
1063 -without-* | --without-*)
503d2be0 1064 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1065 # Reject names that are not valid shell variable names.
f053c89f 1066 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1067 { echo "$as_me: error: invalid package name: $ac_package" >&2
1068 { (exit 1); exit 1; }; }
f053c89f 1069 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1070 eval with_$ac_package=no ;;
ba4481b5
DL
1071
1072 --x)
1073 # Obsolete; use --with-x.
1074 with_x=yes ;;
1075
1076 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1077 | --x-incl | --x-inc | --x-in | --x-i)
1078 ac_prev=x_includes ;;
1079 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1080 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1081 x_includes=$ac_optarg ;;
ba4481b5
DL
1082
1083 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1084 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1085 ac_prev=x_libraries ;;
1086 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1087 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1088 x_libraries=$ac_optarg ;;
ba4481b5 1089
503d2be0
AS
1090 -*) { echo "$as_me: error: unrecognized option: $ac_option
1091Try \`$0 --help' for more information." >&2
1092 { (exit 1); exit 1; }; }
ba4481b5
DL
1093 ;;
1094
503d2be0
AS
1095 *=*)
1096 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1097 # Reject names that are not valid shell variable names.
1098 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1099 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1100 { (exit 1); exit 1; }; }
ca81d7a0 1101 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1102 export $ac_envvar ;;
1103
ba4481b5 1104 *)
503d2be0
AS
1105 # FIXME: should be removed in autoconf 3.0.
1106 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1107 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1108 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1109 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1110 ;;
1111
1112 esac
1113done
1114
1115if test -n "$ac_prev"; then
503d2be0
AS
1116 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1117 { echo "$as_me: error: missing argument to $ac_option" >&2
1118 { (exit 1); exit 1; }; }
ba4481b5 1119fi
ba4481b5 1120
ca81d7a0
JD
1121# Be sure to have absolute directory names.
1122for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1123 datadir sysconfdir sharedstatedir localstatedir includedir \
1124 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1125 libdir localedir mandir
4b411bfe 1126do
ca81d7a0 1127 eval ac_val=\$$ac_var
4b411bfe 1128 case $ac_val in
ca81d7a0
JD
1129 [\\/$]* | ?:[\\/]* ) continue;;
1130 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1131 esac
ca81d7a0
JD
1132 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1133 { (exit 1); exit 1; }; }
ba4481b5
DL
1134done
1135
503d2be0
AS
1136# There might be people who depend on the old broken behavior: `$host'
1137# used to hold the argument of --host etc.
c0d27fcc 1138# FIXME: To remove some day.
503d2be0
AS
1139build=$build_alias
1140host=$host_alias
1141target=$target_alias
1142
c0d27fcc 1143# FIXME: To remove some day.
503d2be0
AS
1144if test "x$host_alias" != x; then
1145 if test "x$build_alias" = x; then
1146 cross_compiling=maybe
1147 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1148 If a cross compiler is detected then cross compile mode will be used." >&2
1149 elif test "x$build_alias" != "x$host_alias"; then
1150 cross_compiling=yes
1151 fi
1152fi
ba4481b5 1153
503d2be0
AS
1154ac_tool_prefix=
1155test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1156
503d2be0 1157test "$silent" = yes && exec 6>/dev/null
ba4481b5 1158
c0d27fcc 1159
ca81d7a0
JD
1160ac_pwd=`pwd` && test -n "$ac_pwd" &&
1161ac_ls_di=`ls -di .` &&
1162ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1163 { echo "$as_me: error: Working directory cannot be determined" >&2
1164 { (exit 1); exit 1; }; }
1165test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1166 { echo "$as_me: error: pwd does not report name of working directory" >&2
1167 { (exit 1); exit 1; }; }
1168
1169
ba4481b5
DL
1170# Find the source files, if location was not specified.
1171if test -z "$srcdir"; then
1172 ac_srcdir_defaulted=yes
ca81d7a0
JD
1173 # Try the directory containing this script, then the parent directory.
1174 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1175$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1176 X"$0" : 'X\(//\)[^/]' \| \
1177 X"$0" : 'X\(//\)$' \| \
ca81d7a0 1178 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1179echo X"$0" |
ca81d7a0
JD
1180 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1181 s//\1/
1182 q
1183 }
1184 /^X\(\/\/\)[^/].*/{
1185 s//\1/
1186 q
1187 }
1188 /^X\(\/\/\)$/{
1189 s//\1/
1190 q
1191 }
1192 /^X\(\/\).*/{
1193 s//\1/
1194 q
1195 }
1196 s/.*/./; q'`
ba4481b5 1197 srcdir=$ac_confdir
ca81d7a0 1198 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1199 srcdir=..
1200 fi
1201else
1202 ac_srcdir_defaulted=no
1203fi
ca81d7a0
JD
1204if test ! -r "$srcdir/$ac_unique_file"; then
1205 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1206 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1207 { (exit 1); exit 1; }; }
ba4481b5 1208fi
ca81d7a0
JD
1209ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1210ac_abs_confdir=`(
1211 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1212 { (exit 1); exit 1; }; }
ca81d7a0
JD
1213 pwd)`
1214# When building in place, set srcdir=.
1215if test "$ac_abs_confdir" = "$ac_pwd"; then
1216 srcdir=.
1217fi
1218# Remove unnecessary trailing slashes from srcdir.
1219# Double slashes in file names in object file debugging info
1220# mess up M-x gdb in Emacs.
1221case $srcdir in
1222*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1223esac
1224for ac_var in $ac_precious_vars; do
1225 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1226 eval ac_env_${ac_var}_value=\$${ac_var}
1227 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1228 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1229done
503d2be0
AS
1230
1231#
1232# Report the --help message.
1233#
1234if test "$ac_init_help" = "long"; then
1235 # Omit some internal or obsolete options to make the list less imposing.
1236 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1237 cat <<_ACEOF
503d2be0
AS
1238\`configure' configures this package to adapt to many kinds of systems.
1239
1240Usage: $0 [OPTION]... [VAR=VALUE]...
1241
1242To assign environment variables (e.g., CC, CFLAGS...), specify them as
1243VAR=VALUE. See below for descriptions of some of the useful variables.
1244
1245Defaults for the options are specified in brackets.
1246
1247Configuration:
1248 -h, --help display this help and exit
1249 --help=short display options specific to this package
1250 --help=recursive display the short help of all the included packages
1251 -V, --version display version information and exit
1252 -q, --quiet, --silent do not print \`checking...' messages
1253 --cache-file=FILE cache test results in FILE [disabled]
1254 -C, --config-cache alias for \`--cache-file=config.cache'
1255 -n, --no-create do not create output files
1256 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1257
503d2be0
AS
1258Installation directories:
1259 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1260 [$ac_default_prefix]
503d2be0 1261 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1262 [PREFIX]
503d2be0
AS
1263
1264By default, \`make install' will install all the files in
1265\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1266an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1267for instance \`--prefix=\$HOME'.
1268
1269For better control, use the options below.
1270
1271Fine tuning of the installation directories:
1272 --bindir=DIR user executables [EPREFIX/bin]
1273 --sbindir=DIR system admin executables [EPREFIX/sbin]
1274 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1275 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1276 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1277 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1278 --libdir=DIR object code libraries [EPREFIX/lib]
1279 --includedir=DIR C header files [PREFIX/include]
1280 --oldincludedir=DIR C header files for non-gcc [/usr/include]
ca81d7a0
JD
1281 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1282 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1283 --infodir=DIR info documentation [DATAROOTDIR/info]
1284 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1285 --mandir=DIR man documentation [DATAROOTDIR/man]
1286 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1287 --htmldir=DIR html documentation [DOCDIR]
1288 --dvidir=DIR dvi documentation [DOCDIR]
1289 --pdfdir=DIR pdf documentation [DOCDIR]
1290 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1291_ACEOF
503d2be0 1292
c0d27fcc 1293 cat <<\_ACEOF
503d2be0 1294
ba5da88a
PJ
1295Program names:
1296 --program-prefix=PREFIX prepend PREFIX to installed program names
1297 --program-suffix=SUFFIX append SUFFIX to installed program names
1298 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1299
503d2be0
AS
1300X features:
1301 --x-includes=DIR X include files are in DIR
1302 --x-libraries=DIR X library files are in DIR
1303
1304System types:
1305 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1306 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1307_ACEOF
503d2be0
AS
1308fi
1309
1310if test -n "$ac_init_help"; then
1311
c0d27fcc 1312 cat <<\_ACEOF
503d2be0
AS
1313
1314Optional Features:
1315 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1316 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
6a3a24fa
JD
1317 --enable-carbon-app[=DIR] [DIR=/Application]
1318 specify install directory for Emacs.app on Mac OS X
d0098f13 1319 --enable-asserts compile code with asserts enabled
19650fd6
AS
1320 --enable-maintainer-mode enable make rules and dependencies not useful
1321 (and sometimes confusing) to the casual installer
9adfabc2
LK
1322 --enable-locallisppath=PATH
1323 directories Emacs should search for lisp files
1324 specific to this site
503d2be0
AS
1325 --disable-largefile omit support for large files
1326
1327Optional Packages:
1328 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1329 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1330 --without-gcc don't use GCC to compile Emacs if GCC is found
1331 --without-pop don't support POP mail retrieval with movemail
1332 --with-kerberos support Kerberos-authenticated POP
1333 --with-kerberos5 support Kerberos version 5 authenticated POP
1334 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1335 --without-sound don't compile with sound support
488dd4c4
JD
1336 --with-x-toolkit=KIT use an X toolkit
1337 (KIT = yes/lucid/athena/motif/gtk/no)
503d2be0
AS
1338 --with-xpm use -lXpm for displaying XPM images
1339 --with-jpeg use -ljpeg for displaying JPEG images
1340 --with-tiff use -ltiff for displaying TIFF images
1341 --with-gif use -lungif for displaying GIF images
1342 --with-png use -lpng for displaying PNG images
488dd4c4
JD
1343 --with-gtk use GTK (same as --with-x-toolkit=gtk)
1344 --with-pkg-config-prog Path to pkg-config to use for finding GTK
503d2be0 1345 --without-toolkit-scroll-bars
cc227489
MB
1346 don't use Motif or Xaw3d scroll bars
1347 --without-xim don't use X11 XIM
e0f712ba 1348 --without-carbon don't use Carbon GUI on Mac OS X
503d2be0
AS
1349 --with-x use the X Window System
1350
1351Some influential environment variables:
1352 CC C compiler command
1353 CFLAGS C compiler flags
1354 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1355 nonstandard directory <lib dir>
f053c89f 1356 LIBS libraries to pass to the linker, e.g. -l<library>
ca81d7a0
JD
1357 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1358 you have headers in a nonstandard directory <include dir>
503d2be0 1359 CPP C preprocessor
ca81d7a0 1360 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1361
1362Use these variables to override the choices made by `configure' or to help
1363it to find libraries and programs with nonstandard names/locations.
1364
c0d27fcc 1365_ACEOF
ca81d7a0 1366ac_status=$?
503d2be0
AS
1367fi
1368
1369if test "$ac_init_help" = "recursive"; then
1370 # If there are subdirs, report their specific --help.
c0d27fcc 1371 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
ca81d7a0 1372 test -d "$ac_dir" || continue
c0d27fcc
MR
1373 ac_builddir=.
1374
ca81d7a0
JD
1375case "$ac_dir" in
1376.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1377*)
c0d27fcc 1378 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
1379 # A ".." for each directory in $ac_dir_suffix.
1380 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1381 case $ac_top_builddir_sub in
1382 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1383 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1384 esac ;;
1385esac
1386ac_abs_top_builddir=$ac_pwd
1387ac_abs_builddir=$ac_pwd$ac_dir_suffix
1388# for backward compatibility:
1389ac_top_builddir=$ac_top_build_prefix
503d2be0 1390
c0d27fcc 1391case $srcdir in
ca81d7a0 1392 .) # We are building in place.
c0d27fcc 1393 ac_srcdir=.
ca81d7a0
JD
1394 ac_top_srcdir=$ac_top_builddir_sub
1395 ac_abs_top_srcdir=$ac_pwd ;;
1396 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1397 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1398 ac_top_srcdir=$srcdir
1399 ac_abs_top_srcdir=$srcdir ;;
1400 *) # Relative name.
1401 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1402 ac_top_srcdir=$ac_top_build_prefix$srcdir
1403 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1404esac
ca81d7a0
JD
1405ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1406
1407 cd "$ac_dir" || { ac_status=$?; continue; }
1408 # Check for guested configure.
1409 if test -f "$ac_srcdir/configure.gnu"; then
1410 echo &&
1411 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1412 elif test -f "$ac_srcdir/configure"; then
1413 echo &&
1414 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1415 else
c0d27fcc 1416 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1417 fi || ac_status=$?
1418 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1419 done
1420fi
1421
ca81d7a0 1422test -n "$ac_init_help" && exit $ac_status
503d2be0 1423if $ac_init_version; then
c0d27fcc 1424 cat <<\_ACEOF
ca81d7a0 1425configure
f053c89f 1426generated by GNU Autoconf 2.61
503d2be0 1427
ca81d7a0 1428Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
040c474e 14292002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1430This configure script is free software; the Free Software Foundation
1431gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1432_ACEOF
ca81d7a0 1433 exit
503d2be0 1434fi
ca81d7a0 1435cat >config.log <<_ACEOF
503d2be0
AS
1436This file contains any messages produced by compilers while
1437running configure, to aid debugging if configure makes a mistake.
1438
1439It was created by $as_me, which was
f053c89f 1440generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1441
1442 $ $0 $@
1443
c0d27fcc 1444_ACEOF
ca81d7a0 1445exec 5>>config.log
503d2be0
AS
1446{
1447cat <<_ASUNAME
c0d27fcc
MR
1448## --------- ##
1449## Platform. ##
1450## --------- ##
503d2be0
AS
1451
1452hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1453uname -m = `(uname -m) 2>/dev/null || echo unknown`
1454uname -r = `(uname -r) 2>/dev/null || echo unknown`
1455uname -s = `(uname -s) 2>/dev/null || echo unknown`
1456uname -v = `(uname -v) 2>/dev/null || echo unknown`
1457
1458/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1459/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1460
1461/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1462/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1463/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ca81d7a0 1464/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1465/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1466/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1467/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1468
925c2f3f 1469_ASUNAME
c0d27fcc
MR
1470
1471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1472for as_dir in $PATH
1473do
1474 IFS=$as_save_IFS
1475 test -z "$as_dir" && as_dir=.
1476 echo "PATH: $as_dir"
1477done
ca81d7a0 1478IFS=$as_save_IFS
c0d27fcc 1479
503d2be0
AS
1480} >&5
1481
c0d27fcc
MR
1482cat >&5 <<_ACEOF
1483
1484
1485## ----------- ##
1486## Core tests. ##
1487## ----------- ##
1488
1489_ACEOF
503d2be0 1490
503d2be0
AS
1491
1492# Keep a trace of the command line.
1493# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1494# Strip out --silent because we don't want to record it for future runs.
503d2be0 1495# Also quote any args containing shell meta-characters.
19650fd6 1496# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1497ac_configure_args=
19650fd6
AS
1498ac_configure_args0=
1499ac_configure_args1=
19650fd6
AS
1500ac_must_keep_next=false
1501for ac_pass in 1 2
503d2be0 1502do
19650fd6
AS
1503 for ac_arg
1504 do
1505 case $ac_arg in
1506 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1507 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1508 | -silent | --silent | --silen | --sile | --sil)
1509 continue ;;
ca81d7a0 1510 *\'*)
19650fd6
AS
1511 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1512 esac
1513 case $ac_pass in
1514 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1515 2)
1516 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1517 if test $ac_must_keep_next = true; then
edfaf76d 1518 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1519 else
edfaf76d
LK
1520 case $ac_arg in
1521 *=* | --config-cache | -C | -disable-* | --disable-* \
1522 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1523 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1524 | -with-* | --with-* | -without-* | --without-* | --x)
1525 case "$ac_configure_args0 " in
1526 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1527 esac
1528 ;;
1529 -* ) ac_must_keep_next=true ;;
1530 esac
19650fd6 1531 fi
ca81d7a0 1532 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1533 ;;
1534 esac
1535 done
503d2be0 1536done
19650fd6
AS
1537$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1538$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1539
1540# When interrupted or exit'd, cleanup temporary files, and complete
1541# config.log. We remove comments because anyway the quotes in there
1542# would cause problems or look ugly.
ca81d7a0
JD
1543# WARNING: Use '\'' to represent an apostrophe within the trap.
1544# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1545trap 'exit_status=$?
1546 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1547 {
1548 echo
6bae0ccf 1549
c0d27fcc
MR
1550 cat <<\_ASBOX
1551## ---------------- ##
1552## Cache variables. ##
1553## ---------------- ##
1554_ASBOX
1555 echo
1556 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
1557(
1558 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1559 eval ac_val=\$$ac_var
1560 case $ac_val in #(
1561 *${as_nl}*)
1562 case $ac_var in #(
1563 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1564echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1565 esac
1566 case $ac_var in #(
1567 _ | IFS | as_nl) ;; #(
1568 *) $as_unset $ac_var ;;
1569 esac ;;
1570 esac
1571 done
503d2be0 1572 (set) 2>&1 |
ca81d7a0
JD
1573 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1574 *${as_nl}ac_space=\ *)
503d2be0 1575 sed -n \
ca81d7a0
JD
1576 "s/'\''/'\''\\\\'\'''\''/g;
1577 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1578 ;; #(
503d2be0 1579 *)
ca81d7a0 1580 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1581 ;;
ca81d7a0
JD
1582 esac |
1583 sort
1584)
c0d27fcc 1585 echo
6bae0ccf
DL
1586
1587 cat <<\_ASBOX
1588## ----------------- ##
1589## Output variables. ##
1590## ----------------- ##
1591_ASBOX
1592 echo
1593 for ac_var in $ac_subst_vars
1594 do
ca81d7a0
JD
1595 eval ac_val=\$$ac_var
1596 case $ac_val in
1597 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1598 esac
1599 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1600 done | sort
1601 echo
1602
1603 if test -n "$ac_subst_files"; then
1604 cat <<\_ASBOX
ca81d7a0
JD
1605## ------------------- ##
1606## File substitutions. ##
1607## ------------------- ##
6bae0ccf
DL
1608_ASBOX
1609 echo
1610 for ac_var in $ac_subst_files
1611 do
ca81d7a0
JD
1612 eval ac_val=\$$ac_var
1613 case $ac_val in
1614 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1615 esac
1616 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1617 done | sort
1618 echo
1619 fi
1620
c0d27fcc
MR
1621 if test -s confdefs.h; then
1622 cat <<\_ASBOX
1623## ----------- ##
1624## confdefs.h. ##
1625## ----------- ##
1626_ASBOX
1627 echo
ca81d7a0 1628 cat confdefs.h
c0d27fcc
MR
1629 echo
1630 fi
1631 test "$ac_signal" != 0 &&
1632 echo "$as_me: caught signal $ac_signal"
1633 echo "$as_me: exit $exit_status"
1634 } >&5
ca81d7a0
JD
1635 rm -f core *.core core.conftest.* &&
1636 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1637 exit $exit_status
ca81d7a0 1638' 0
503d2be0
AS
1639for ac_signal in 1 2 13 15; do
1640 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1641done
1642ac_signal=0
1643
1644# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 1645rm -f -r conftest* confdefs.h
ba4481b5 1646
c0d27fcc
MR
1647# Predefined preprocessor variables.
1648
1649cat >>confdefs.h <<_ACEOF
1650#define PACKAGE_NAME "$PACKAGE_NAME"
1651_ACEOF
1652
1653
1654cat >>confdefs.h <<_ACEOF
1655#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1656_ACEOF
1657
1658
1659cat >>confdefs.h <<_ACEOF
1660#define PACKAGE_VERSION "$PACKAGE_VERSION"
1661_ACEOF
1662
1663
1664cat >>confdefs.h <<_ACEOF
1665#define PACKAGE_STRING "$PACKAGE_STRING"
1666_ACEOF
1667
1668
1669cat >>confdefs.h <<_ACEOF
1670#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1671_ACEOF
1672
1673
503d2be0 1674# Let the site file select an alternate cache file if it wants to.
ba4481b5 1675# Prefer explicitly selected file to automatically selected ones.
ca81d7a0
JD
1676if test -n "$CONFIG_SITE"; then
1677 set x "$CONFIG_SITE"
1678elif test "x$prefix" != xNONE; then
1679 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1680else
1681 set x "$ac_default_prefix/share/config.site" \
1682 "$ac_default_prefix/etc/config.site"
ba4481b5 1683fi
ca81d7a0
JD
1684shift
1685for ac_site_file
1686do
ba4481b5 1687 if test -r "$ac_site_file"; then
c0d27fcc 1688 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1689echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1690 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1691 . "$ac_site_file"
1692 fi
1693done
1694
1695if test -r "$cache_file"; then
503d2be0
AS
1696 # Some versions of bash will fail to source /dev/null (special
1697 # files actually), so we avoid doing that.
1698 if test -f "$cache_file"; then
c0d27fcc 1699 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1700echo "$as_me: loading cache $cache_file" >&6;}
1701 case $cache_file in
ca81d7a0
JD
1702 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1703 *) . "./$cache_file";;
503d2be0
AS
1704 esac
1705 fi
ba4481b5 1706else
c0d27fcc 1707 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1708echo "$as_me: creating cache $cache_file" >&6;}
1709 >$cache_file
1710fi
1711
f053c89f
CY
1712ac_header_list="$ac_header_list sys/time.h"
1713ac_header_list="$ac_header_list unistd.h"
1714ac_func_list="$ac_func_list alarm"
503d2be0
AS
1715# Check that the precious variables saved in the cache have kept the same
1716# value.
1717ac_cache_corrupted=false
ca81d7a0 1718for ac_var in $ac_precious_vars; do
503d2be0
AS
1719 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1720 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
1721 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1722 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1723 case $ac_old_set,$ac_new_set in
1724 set,)
c0d27fcc 1725 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1726echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1727 ac_cache_corrupted=: ;;
1728 ,set)
c0d27fcc 1729 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1730echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1731 ac_cache_corrupted=: ;;
1732 ,);;
1733 *)
1734 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1735 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1736echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1737 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1738echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1739 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1740echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1741 ac_cache_corrupted=:
503d2be0
AS
1742 fi;;
1743 esac
c0d27fcc 1744 # Pass precious variables to config.status.
503d2be0
AS
1745 if test "$ac_new_set" = set; then
1746 case $ac_new_val in
ca81d7a0 1747 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1748 *) ac_arg=$ac_var=$ac_new_val ;;
1749 esac
1750 case " $ac_configure_args " in
1751 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1752 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1753 esac
1754 fi
1755done
1756if $ac_cache_corrupted; then
c0d27fcc 1757 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1758echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1759 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1760echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1761 { (exit 1); exit 1; }; }
ba4481b5
DL
1762fi
1763
c0d27fcc
MR
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
ba4481b5 1779
ca81d7a0
JD
1780ac_ext=c
1781ac_cpp='$CPP $CPPFLAGS'
1782ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1783ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1784ac_compiler_gnu=$ac_cv_c_compiler_gnu
6bae0ccf 1785
4b411bfe 1786
ca81d7a0 1787ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1788
c0d27fcc 1789
ba5da88a 1790test "$program_prefix" != NONE &&
ca81d7a0 1791 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1792# Use a double $ so make ignores it.
1793test "$program_suffix" != NONE &&
ca81d7a0 1794 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1795# Double any \ or $. echo might interpret backslashes.
1796# By default was `s,x,x', remove it if useless.
1797cat <<\_ACEOF >conftest.sed
1798s/[\\$]/&&/g;s/;s,x,x,$//
1799_ACEOF
1800program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
ca81d7a0 1801rm -f conftest.sed
ba5da88a 1802
c0d27fcc 1803
ba4481b5
DL
1804lispdir='${datadir}/emacs/${version}/lisp'
1805locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1806'${datadir}/emacs/site-lisp'
1807lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1808etcdir='${datadir}/emacs/${version}/etc'
1809archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1810docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1811gamedir='${localstatedir}/games/emacs'
98418dba
CW
1812
1813gameuser=games
1814
c0d27fcc 1815
ca81d7a0 1816# Check whether --with-gcc was given.
ba4481b5 1817if test "${with_gcc+set}" = set; then
ca81d7a0
JD
1818 withval=$with_gcc;
1819fi
503d2be0 1820
ba4481b5 1821
ca81d7a0 1822# Check whether --with-pop was given.
ba4481b5 1823if test "${with_pop+set}" = set; then
ca81d7a0 1824 withval=$with_pop; if test "$withval" = yes; then
c0d27fcc 1825 cat >>confdefs.h <<\_ACEOF
ba4481b5 1826#define MAIL_USE_POP 1
c0d27fcc 1827_ACEOF
ba4481b5 1828
243cf185
DL
1829else :
1830fi
3d9fec71 1831else
c0d27fcc 1832 cat >>confdefs.h <<\_ACEOF
3d9fec71 1833#define MAIL_USE_POP 1
c0d27fcc 1834_ACEOF
3d9fec71 1835
ca81d7a0
JD
1836fi
1837
ba4481b5 1838
c0d27fcc 1839
ca81d7a0 1840# Check whether --with-kerberos was given.
a21616bd 1841if test "${with_kerberos+set}" = set; then
54e6585f
CY
1842 withval=$with_kerberos; if test "$withval" = yes; then
1843 cat >>confdefs.h <<\_ACEOF
a21616bd 1844#define KERBEROS 1
c0d27fcc 1845_ACEOF
a21616bd 1846
ca81d7a0 1847fi
54e6585f 1848fi
ca81d7a0 1849
a21616bd 1850
c0d27fcc 1851
ca81d7a0 1852# Check whether --with-kerberos5 was given.
a21616bd 1853if test "${with_kerberos5+set}" = set; then
ca81d7a0 1854 withval=$with_kerberos5; if test "${with_kerberos5+set}" = set; then
a21616bd
KR
1855 if test "${with_kerberos+set}" != set; then
1856 with_kerberos=yes
c0d27fcc 1857 cat >>confdefs.h <<\_ACEOF
a21616bd 1858#define KERBEROS 1
c0d27fcc 1859_ACEOF
a21616bd
KR
1860
1861 fi
b936fae4 1862
c0d27fcc 1863cat >>confdefs.h <<\_ACEOF
a21616bd 1864#define KERBEROS5 1
c0d27fcc 1865_ACEOF
a21616bd 1866
ca81d7a0 1867fi
54e6585f 1868fi
b936fae4 1869
4b411bfe 1870
ca81d7a0
JD
1871# Check whether --with-hesiod was given.
1872if test "${with_hesiod+set}" = set; then
54e6585f
CY
1873 withval=$with_hesiod; if test "$withval" = yes; then
1874
c0d27fcc 1875cat >>confdefs.h <<\_ACEOF
ba4481b5 1876#define HESIOD 1
c0d27fcc 1877_ACEOF
ba4481b5 1878
ca81d7a0 1879fi
54e6585f 1880fi
ca81d7a0 1881
ba4481b5 1882
c0d27fcc 1883
ca81d7a0 1884# Check whether --with-sound was given.
2c9dccc9 1885if test "${with_sound+set}" = set; then
ca81d7a0
JD
1886 withval=$with_sound;
1887fi
2c9dccc9 1888
2c9dccc9 1889
c0d27fcc 1890
ca81d7a0 1891# Check whether --with-x-toolkit was given.
ba4481b5 1892if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1893 withval=$with_x_toolkit; case "${withval}" in
ba4481b5
DL
1894 y | ye | yes ) val=athena ;;
1895 n | no ) val=no ;;
1896 l | lu | luc | luci | lucid ) val=lucid ;;
1897 a | at | ath | athe | athen | athena ) val=athena ;;
1898 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1899 g | gt | gtk ) val=gtk ;;
ba4481b5 1900 * )
c0d27fcc 1901{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1902this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1903Currently, \`yes', \`athena' and \`lucid' are synonyms." >&5
1904echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid\;
488dd4c4 1905this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
503d2be0
AS
1906Currently, \`yes', \`athena' and \`lucid' are synonyms." >&2;}
1907 { (exit 1); exit 1; }; }
ba4481b5
DL
1908 ;;
1909 esac
1910 with_x_toolkit=$val
1911
ca81d7a0 1912fi
8eeae1c9 1913
ca81d7a0
JD
1914
1915# Check whether --with-xpm was given.
ba4481b5 1916if test "${with_xpm+set}" = set; then
ca81d7a0
JD
1917 withval=$with_xpm;
1918fi
503d2be0 1919
ba4481b5 1920
ca81d7a0 1921# Check whether --with-jpeg was given.
ba4481b5 1922if test "${with_jpeg+set}" = set; then
ca81d7a0
JD
1923 withval=$with_jpeg;
1924fi
503d2be0 1925
ba4481b5 1926
ca81d7a0 1927# Check whether --with-tiff was given.
ba4481b5 1928if test "${with_tiff+set}" = set; then
ca81d7a0
JD
1929 withval=$with_tiff;
1930fi
503d2be0 1931
ba4481b5 1932
ca81d7a0 1933# Check whether --with-gif was given.
ba4481b5 1934if test "${with_gif+set}" = set; then
ca81d7a0
JD
1935 withval=$with_gif;
1936fi
503d2be0 1937
ba4481b5 1938
ca81d7a0 1939# Check whether --with-png was given.
ba4481b5 1940if test "${with_png+set}" = set; then
ca81d7a0
JD
1941 withval=$with_png;
1942fi
503d2be0 1943
ba4481b5 1944
ca81d7a0 1945# Check whether --with-gtk was given.
488dd4c4 1946if test "${with_gtk+set}" = set; then
ca81d7a0
JD
1947 withval=$with_gtk;
1948fi
488dd4c4 1949
488dd4c4 1950
ca81d7a0 1951# Check whether --with-pkg-config-prog was given.
488dd4c4 1952if test "${with_pkg_config_prog+set}" = set; then
ca81d7a0
JD
1953 withval=$with_pkg_config_prog;
1954fi
488dd4c4 1955
488dd4c4 1956
ca81d7a0 1957# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 1958if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0
JD
1959 withval=$with_toolkit_scroll_bars;
1960fi
503d2be0 1961
ba4481b5 1962
ca81d7a0 1963# Check whether --with-xim was given.
1d36487c 1964if test "${with_xim+set}" = set; then
ca81d7a0
JD
1965 withval=$with_xim;
1966fi
1d36487c 1967
ba4481b5 1968
ca81d7a0 1969# Check whether --with-carbon was given.
e0f712ba 1970if test "${with_carbon+set}" = set; then
ca81d7a0
JD
1971 withval=$with_carbon;
1972fi
e0f712ba 1973
ca81d7a0 1974# Check whether --enable-carbon-app was given.
6a3a24fa 1975if test "${enable_carbon_app+set}" = set; then
ca81d7a0
JD
1976 enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
1977fi
1978
e0f712ba 1979
ca81d7a0 1980# Check whether --enable-asserts was given.
d0098f13 1981if test "${enable_asserts+set}" = set; then
ca81d7a0 1982 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
1983else
1984 USE_XASSERTS=no
ca81d7a0 1985fi
8eeae1c9 1986
ca81d7a0
JD
1987
1988# Check whether --enable-maintainer-mode was given.
19650fd6 1989if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 1990 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
1991else
1992 USE_MAINTAINER_MODE=no
ca81d7a0
JD
1993fi
1994
19650fd6
AS
1995if test $USE_MAINTAINER_MODE = yes; then
1996 MAINT=
1997else
1998 MAINT=#
1999fi
2000
2001
ca81d7a0 2002# Check whether --enable-locallisppath was given.
9adfabc2 2003if test "${enable_locallisppath+set}" = set; then
ca81d7a0 2004 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2005 locallisppath=
2006elif test "${enableval}" != "yes"; then
2007 locallisppath=${enableval}
2008fi
ca81d7a0
JD
2009fi
2010
9adfabc2 2011
ba4481b5 2012#### Make srcdir absolute, if it isn't already. It's important to
17494071 2013#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2014#### give you automounter prefixes, which can go away. We do all this
2015#### so Emacs can find its files when run uninstalled.
17494071
GM
2016## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2017unset CDPATH
ba4481b5
DL
2018case "${srcdir}" in
2019 /* ) ;;
2020 . )
2021 ## We may be able to use the $PWD environment variable to make this
2022 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2023 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2024 ## but that tested only for a well-formed and valid PWD,
2025 ## it did not object when PWD was well-formed and valid but just wrong.
2026 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2027 then
2028 srcdir="$PWD"
2029 else
2030 srcdir="`(cd ${srcdir}; pwd)`"
2031 fi
2032 ;;
2033 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2034esac
2035
2036#### Check if the source directory already has a configured system in it.
2037if test `pwd` != `(cd ${srcdir} && pwd)` \
2038 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2039 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
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},
2044 and then run $0 again." >&5
2045echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2046 as a build directory right now; it has been configured in its own
2047 right. To configure in another directory as well, you MUST
2048 use GNU make. If you do not have GNU make, then you must
2049 now do \`make distclean' in ${srcdir},
503d2be0 2050 and then run $0 again." >&2;}
ba4481b5
DL
2051fi
2052
2053#### Given the configuration name, set machfile and opsysfile to the
2054#### names of the m/*.h and s/*.h files we should use.
2055
2056### Canonicalize the configuration name.
2057
2058ac_aux_dir=
ca81d7a0
JD
2059for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2060 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2061 ac_aux_dir=$ac_dir
2062 ac_install_sh="$ac_aux_dir/install-sh -c"
2063 break
ca81d7a0 2064 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2065 ac_aux_dir=$ac_dir
2066 ac_install_sh="$ac_aux_dir/install.sh -c"
2067 break
ca81d7a0 2068 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2069 ac_aux_dir=$ac_dir
2070 ac_install_sh="$ac_aux_dir/shtool install -c"
2071 break
ba4481b5
DL
2072 fi
2073done
2074if test -z "$ac_aux_dir"; then
ca81d7a0
JD
2075 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2076echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2077 { (exit 1); exit 1; }; }
ba4481b5 2078fi
ca81d7a0
JD
2079
2080# These three variables are undocumented and unsupported,
2081# and are intended to be withdrawn in a future Autoconf release.
2082# They can cause serious problems if a builder's source tree is in a directory
2083# whose full name contains unusual characters.
2084ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2085ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2086ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2087
ba4481b5
DL
2088
2089# Make sure we can run config.sub.
ca81d7a0
JD
2090$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2091 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2092echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2093 { (exit 1); exit 1; }; }
2094
ca81d7a0
JD
2095{ echo "$as_me:$LINENO: checking build system type" >&5
2096echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2097if test "${ac_cv_build+set}" = set; then
2098 echo $ECHO_N "(cached) $ECHO_C" >&6
2099else
ca81d7a0
JD
2100 ac_build_alias=$build_alias
2101test "x$ac_build_alias" = x &&
2102 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2103test "x$ac_build_alias" = x &&
c0d27fcc 2104 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2105echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2106 { (exit 1); exit 1; }; }
ca81d7a0
JD
2107ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2108 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2109echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2110 { (exit 1); exit 1; }; }
2111
2112fi
ca81d7a0
JD
2113{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2114echo "${ECHO_T}$ac_cv_build" >&6; }
2115case $ac_cv_build in
2116*-*-*) ;;
2117*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2118echo "$as_me: error: invalid value of canonical build" >&2;}
2119 { (exit 1); exit 1; }; };;
2120esac
503d2be0 2121build=$ac_cv_build
ca81d7a0
JD
2122ac_save_IFS=$IFS; IFS='-'
2123set x $ac_cv_build
2124shift
2125build_cpu=$1
2126build_vendor=$2
2127shift; shift
2128# Remember, the first character of IFS is used to create $*,
2129# except with old shells:
2130build_os=$*
2131IFS=$ac_save_IFS
2132case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2133
2134
2135{ echo "$as_me:$LINENO: checking host system type" >&5
2136echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2137if test "${ac_cv_host+set}" = set; then
2138 echo $ECHO_N "(cached) $ECHO_C" >&6
2139else
ca81d7a0
JD
2140 if test "x$host_alias" = x; then
2141 ac_cv_host=$ac_cv_build
2142else
2143 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2144 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2145echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2146 { (exit 1); exit 1; }; }
ca81d7a0 2147fi
503d2be0
AS
2148
2149fi
ca81d7a0
JD
2150{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2151echo "${ECHO_T}$ac_cv_host" >&6; }
2152case $ac_cv_host in
2153*-*-*) ;;
2154*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2155echo "$as_me: error: invalid value of canonical host" >&2;}
2156 { (exit 1); exit 1; }; };;
2157esac
503d2be0 2158host=$ac_cv_host
ca81d7a0
JD
2159ac_save_IFS=$IFS; IFS='-'
2160set x $ac_cv_host
2161shift
2162host_cpu=$1
2163host_vendor=$2
2164shift; shift
2165# Remember, the first character of IFS is used to create $*,
2166# except with old shells:
2167host_os=$*
2168IFS=$ac_save_IFS
2169case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2170
c0d27fcc 2171
ba4481b5 2172canonical=$host
531a3336 2173configuration=${host_alias-$host}
ba4481b5 2174
c0d27fcc 2175
22044edf 2176
ba4481b5
DL
2177### If you add support for a new configuration, add code to this
2178### switch statement to recognize your configuration name and select
2179### the appropriate operating system and machine description files.
2180
2181### You would hope that you could choose an m/*.h file pretty much
2182### based on the machine portion of the configuration name, and an s-
2183### file based on the operating system portion. However, it turns out
2184### that each m/*.h file is pretty manufacturer-specific - for
2185### example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
2186### all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
2187### machines. So we basically have to have a special case for each
2188### configuration name.
2189###
2190### As far as handling version numbers on operating systems is
2191### concerned, make sure things will fail in a fixable way. If
2192### /etc/MACHINES doesn't say anything about version numbers, be
2193### prepared to handle anything reasonably. If version numbers
2194### matter, be sure /etc/MACHINES says something about it.
2195###
2196### Eric Raymond says we should accept strings like "sysvr4" to mean
2197### "System V Release 4"; he writes, "The old convention encouraged
2198### confusion between `system' and `release' levels'."
2199
2200machine='' opsys='' unported=no
2201case "${canonical}" in
2202
1096bcc0
GM
2203 ## FreeBSD ports
2204 *-*-freebsd* )
2205 opsys=freebsd
2206 case "${canonical}" in
2207 alpha*-*-freebsd*) machine=alpha ;;
ec8fcb10
YM
2208 ia64-*-freebsd*) machine=ia64 ;;
2209 sparc64-*-freebsd*) machine=sparc ;;
2210 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2211 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 2212 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2213 esac
2214 ;;
2215
ba4481b5
DL
2216 ## NetBSD ports
2217 *-*-netbsd* )
2218 opsys=netbsd
dd038e26 2219 if test -f /usr/lib/crti.o; then
f57bd967
DL
2220
2221cat >>confdefs.h <<\_ACEOF
2222#define HAVE_CRTIN
dd038e26
AS
2223_ACEOF
2224
2225 fi
2226
ba4481b5
DL
2227 case "${canonical}" in
2228 alpha*-*-netbsd*) machine=alpha ;;
2229 i[3456]86-*-netbsd*) machine=intel386 ;;
2230 m68k-*-netbsd*)
2231 # This is somewhat bogus.
2232 machine=hp9000s300 ;;
ba4481b5 2233 mips-*-netbsd*) machine=pmax ;;
2df636f4 2234 mipsel-*-netbsd*) machine=pmax ;;
97836269 2235 mipseb-*-netbsd*) machine=pmax ;;
ba4481b5 2236 ns32k-*-netbsd*) machine=ns32000 ;;
3a64eef5 2237 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2238 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2239 vax-*-netbsd*) machine=vax ;;
2df636f4 2240 arm-*-netbsd*) machine=arm ;;
d54ee7b4 2241 x86_64-*-netbsd*) machine=amdx86-64 ;;
13aadc96 2242 hppa-*-netbsd*) machine=hp800 ;;
d54ee7b4 2243 shle-*-netbsd*) machine=sh3el ;;
ba4481b5
DL
2244 esac
2245 ;;
2246
2247 ## OpenBSD ports
2248 *-*-openbsd* )
2249 opsys=openbsd
2250 case "${canonical}" in
2251 alpha*-*-openbsd*) machine=alpha ;;
85410b02
CY
2252 arm-*-openbsd*) machine=arm ;;
2253 hppa-*-openbsd*) machine=hp9000s300 ;;
2254 i386-*-openbsd*) machine=intel386 ;;
2255 m68k-*-openbsd*) machine=hp9000s300 ;;
2256 m88k-*-openbsd*) machine=aviion ;;
2257 mips64-*-openbsd*) machine=mips64 ;;
2258 powerpc-*-openbsd*) machine=macppc ;;
2259 sh-*-openbsd*) machine=sh3el ;;
2260 sparc*-*-openbsd*) machine=sparc ;;
2261 vax-*-openbsd*) machine=vax ;;
2262 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2263 esac
2264 ;;
2265
10a3b1a1
EZ
2266 ## LynxOS ports
2267 *-*-lynxos* )
2268 opsys=lynxos
2269 case "${canonical}" in
2270 i[3456]86-*-lynxos*) machine=intel386 ;;
2271 powerpc-*-lynxos*) machine=powerpc ;;
2272 esac
2273 ;;
2274
ba4481b5
DL
2275 ## Acorn RISCiX:
2276 arm-acorn-riscix1.1* )
2277 machine=acorn opsys=riscix1-1
2278 ;;
2279 arm-acorn-riscix1.2* | arm-acorn-riscix )
2280 ## This name is riscix12 instead of riscix1.2
2281 ## to avoid a file name conflict on MSDOS.
2282 machine=acorn opsys=riscix12
2283 ;;
2284
2285 ## BSDI ports
2286 *-*-bsdi* )
2287 opsys=bsdi
2288 case "${canonical}" in
2289 i[345]86-*-bsdi*) machine=intel386 ;;
2290 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 2291 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
2292 esac
2293 case "${canonical}" in
2294 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
2295 *-*-bsdi2.0* ) opsys=bsdos2 ;;
2296 *-*-bsdi2* ) opsys=bsdos2-1 ;;
2297 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 2298 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
2299 esac
2300 ;;
2301
2302 ## Alliant machines
2303 ## Strictly speaking, we need the version of the alliant operating
2304 ## system to choose the right machine file, but currently the
2305 ## configuration name doesn't tell us enough to choose the right
2306 ## one; we need to give alliants their own operating system name to
2307 ## do this right. When someone cares, they can help us.
2308 fx80-alliant-* )
2309 machine=alliant4 opsys=bsd4-2
2310 ;;
2311 i860-alliant-* )
2312 machine=alliant-2800 opsys=bsd4-3
2313 ;;
2314
2315 ## Alpha (DEC) machines.
2316 alpha*-dec-osf* )
2317 machine=alpha opsys=osf1
2318 # This is needed to find X11R6.1 libraries for certain tests.
2319 NON_GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
2320 GCC_LINK_TEST_OPTIONS=-Wl,-rpath,/usr/X11R6/lib
34979055
DL
2321 # NON_GNU_CPP is necessary on 5.0 to avoid mangling src/Makefile
2322 # due to non-traditional preprocessing with the current compiler
2323 # defaults. OSF 4 can also have that compiler version, and there
2324 # seems always to have been a usable /usr/bin/cpp.
2325 NON_GNU_CPP=/usr/bin/cpp
ca512671 2326 case "${canonical}" in
a55b799a 2327 alpha*-dec-osf[5-9]*)
bb17930d 2328 opsys=osf5-0 ;;
ca512671 2329 esac
ba4481b5
DL
2330 ;;
2331
2332 alpha*-*-linux-gnu* )
2333 machine=alpha opsys=gnu-linux
2334 ;;
2335
c4bb2108
DL
2336 arm*-*-linux-gnu* )
2337 machine=arm opsys=gnu-linux
2338 ;;
2339
ba4481b5
DL
2340 ## Altos 3068
2341 m68*-altos-sysv* )
2342 machine=altos opsys=usg5-2
2343 ;;
2344
2345 ## Amdahl UTS
2346 580-amdahl-sysv* )
2347 machine=amdahl opsys=usg5-2-2
2348 ;;
2349
2350 ## Apollo, Domain/OS
2351 m68*-apollo-* )
2352 machine=apollo opsys=bsd4-3
2353 ;;
2354
040c474e
CY
2355 ## Apple Darwin / Mac OS X
2356 *-apple-darwin* )
2357 case "${canonical}" in
2358 i[3456]86-* ) machine=intel386 ;;
2359 powerpc-* ) machine=powermac ;;
2360 * ) unported=yes ;;
2361 esac
2362 opsys=darwin
2363 # Define CPP as follows to make autoconf work correctly.
2364 CPP="${CC-cc} -E -no-cpp-precomp"
2365 # Use fink packages if available.
2366 if test -d /sw/include && test -d /sw/lib; then
2367 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2368 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2369 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2370 fi
2371 ;;
2372
ba4481b5
DL
2373 ## AT&T 3b2, 3b5, 3b15, 3b20
2374 we32k-att-sysv* )
2375 machine=att3b opsys=usg5-2-2
2376 ;;
2377
2378 ## AT&T 3b1 - The Mighty Unix PC!
2379 m68*-att-sysv* )
2380 machine=7300 opsys=usg5-2-2
2381 ;;
2382
2383 ## Bull dpx20
2384 rs6000-bull-bosx* )
2385 machine=ibmrs6000 opsys=aix3-2
2386 ;;
2387
2388 ## Bull dpx2
2389 m68*-bull-sysv3* )
2390 machine=dpx2 opsys=usg5-3
2391 ;;
2392
2393 ## Bull sps7
2394 m68*-bull-sysv2* )
2395 machine=sps7 opsys=usg5-2
2396 ;;
2397
2398 ## CCI 5/32, 6/32 -- see "Tahoe".
2399
2400 ## Celerity
2401 ## I don't know what configuration name to use for this; config.sub
2402 ## doesn't seem to know anything about it. Hey, Celerity users, get
2403 ## in touch with us!
2404 celerity-celerity-bsd* )
2405 machine=celerity opsys=bsd4-2
2406 ;;
2407
2408 ## Clipper
2409 ## What operating systems does this chip run that Emacs has been
2410 ## tested on?
2411 clipper-* )
2412 machine=clipper
2413 ## We'll use the catch-all code at the bottom to guess the
2414 ## operating system.
2415 ;;
2416
df645f7c
AS
2417 ## Compaq Nonstop
2418 mips-compaq-nonstopux* )
2419 machine=nonstopux opsys=nonstopux
2420 ;;
2421
ba4481b5
DL
2422 ## Convex
2423 *-convex-bsd* | *-convex-convexos* )
2424 machine=convex opsys=bsd4-3
2425 ## Prevents spurious white space in makefiles - d.m.cooke@larc.nasa.gov
2426 NON_GNU_CPP="cc -E -P"
2427 ;;
2428
2429 ## Cubix QBx/386
2430 i[3456]86-cubix-sysv* )
2431 machine=intel386 opsys=usg5-3
2432 ;;
2433
2434 ## Cydra 5
2435 cydra*-cydrome-sysv* )
2436 machine=cydra5 opsys=usg5-3
2437 ;;
2438
2439 ## Data General AViiON Machines
2440 ## DG changed naming conventions with the release of 5.4.4.10, they
2441 ## dropped the initial 5.4 but left the intervening R. Because of the
2442 ## R this shouldn't conflict with older versions of the OS (which I
2443 ## think were named like dgux4.*). In addition, DG new AViiONs series
2444 ## uses either Motorola M88k or Intel Pentium CPUs.
2445 m88k-dg-dguxR4.* | m88k-dg-dgux4* )
2446 machine=aviion opsys=dgux4
2447 ;;
2448 m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* )
2449 ## This name is dgux5-4-3 instead of dgux5-4r3
2450 ## to avoid a file name conflict on MSDOS.
2451 machine=aviion opsys=dgux5-4-3
2452 ;;
2453 m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* )
2454 machine=aviion opsys=dgux5-4r2
2455 ;;
2456 m88k-dg-dgux* )
2457 machine=aviion opsys=dgux
2458 ;;
2459
2460 ## Data General AViiON Intel (x86) Machines
2461 ## Exists from 5.4.3 (current i586-dg-dguxR4.11)
2462 ## Ehud Karni, 1998-may-30, ehud@unix.simonwiesel.co.il
2463 i[345]86-dg-dguxR4* )
2464 machine=aviion-intel opsys=dgux4
2465 ;;
2466
2467 ## DECstations
2468 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
2469 machine=pmax opsys=bsd4-2
2470 ;;
2471 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
2472 machine=pmax opsys=bsd4-3
2473 ;;
2474 mips-dec-ultrix* )
2475 machine=pmax opsys=ultrix4-3
2476 ;;
2477 mips-dec-osf* )
2478 machine=pmax opsys=osf1
2479 ;;
2480 mips-dec-mach_bsd4.3* )
2481 machine=pmax opsys=mach-bsd4-3
2482 ;;
2483
cd890796
JD
2484 ## Motorola Delta machines
2485 m68k-motorola-sysv* | m68000-motorola-sysv* )
2486 machine=delta opsys=usg5-3
2487 if test -z "`type gnucc | grep 'not found'`"
2488 then
2489 if test -s /etc/167config
2490 then CC="gnucc -m68040"
2491 else CC="gnucc -m68881"
2492 fi
2493 else
2494 if test -z "`type gcc | grep 'not found'`"
2495 then CC=gcc
2496 else CC=cc
2497 fi
2498 fi
2499 ;;
ba4481b5
DL
2500 m88k-motorola-sysv4* )
2501 # jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
2502 # needs POSIX_SIGNALS and therefore needs usg5-4-2.
2503 # I hope there are not other 4.0 versions for this machine
2504 # which really need usg5-4 instead.
2505 machine=delta88k opsys=usg5-4-2
2506 ;;
2507 m88k-motorola-sysv* | m88k-motorola-m88kbcs* )
2508 machine=delta88k opsys=usg5-3
2509 ;;
2510
2511 ## Dual machines
2512 m68*-dual-sysv* )
2513 machine=dual opsys=usg5-2
2514 ;;
2515 m68*-dual-uniplus* )
2516 machine=dual opsys=unipl5-2
2517 ;;
2518
2519 ## Elxsi 6400
2520 elxsi-elxsi-sysv* )
2521 machine=elxsi opsys=usg5-2
2522 ;;
2523
2524 ## Encore machines
2525 ns16k-encore-bsd* )
2526 machine=ns16000 opsys=umax
2527 ;;
2528
65171e3a
DL
2529 ## The GEC 63 - apparently, this port isn't really finished yet.
2530 # I'm sure we finished off the last of the machines, though. -- fx
ba4481b5
DL
2531
2532 ## Gould Power Node and NP1
2533 pn-gould-bsd4.2* )
2534 machine=gould opsys=bsd4-2
2535 ;;
2536 pn-gould-bsd4.3* )
2537 machine=gould opsys=bsd4-3
2538 ;;
2539 np1-gould-bsd* )
2540 machine=gould-np1 opsys=bsd4-3
2541 ;;
2542
2543 ## Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
2544 ## as far as Emacs is concerned).
2545 m88k-harris-cxux* )
2546 # Build needs to be different on 7.0 and later releases
2547 case "`uname -r`" in
2548 [56].[0-9] ) machine=nh4000 opsys=cxux ;;
2549 [7].[0-9] ) machine=nh4000 opsys=cxux7 ;;
2550 esac
2551 NON_GNU_CPP="/lib/cpp"
2552 ;;
2553 ## Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
2554 m68k-harris-cxux* )
2555 machine=nh3000 opsys=cxux
2556 ;;
2557 ## Harris power pc NightHawk running Power UNIX (Series 6000)
2558 powerpc-harris-powerunix )
2559 machine=nh6000 opsys=powerunix
2560 NON_GNU_CPP="cc -Xo -E -P"
2561 ;;
6fbb6db1
GM
2562 ## SR2001/SR2201 running HI-UX/MPP
2563 hppa1.1-hitachi-hiuxmpp* )
2564 machine=sr2k opsys=hiuxmpp
2565 ;;
2566 hppa1.1-hitachi-hiuxwe2* )
2567 machine=sr2k opsys=hiuxwe2
2568 ;;
ba4481b5
DL
2569 ## Honeywell XPS100
2570 xps*-honeywell-sysv* )
2571 machine=xps100 opsys=usg5-2
2572 ;;
2573
2574 ## HP 9000 series 200 or 300
2575 m68*-hp-bsd* )
2576 machine=hp9000s300 opsys=bsd4-3
2577 ;;
2578 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2579 m68*-hp-hpux* )
2580 case "`uname -r`" in
2581 ## Someone's system reports A.B8.05 for this.
2582 ## I wonder what other possibilities there are.
2583 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2584 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2585 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2586 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2587 *) machine=hp9000s300 opsys=hpux ;;
2588 esac
2589 ;;
2590
6fbb6db1
GM
2591 ## HP 9000 series 700 and 800, running HP/UX
2592 hppa*-hp-hpux7* )
2593 machine=hp800 opsys=hpux
2594 ;;
2595 hppa*-hp-hpux8* )
2596 machine=hp800 opsys=hpux8
2597 ;;
2598 hppa*-hp-hpux9shr* )
2599 machine=hp800 opsys=hpux9shr
2600 ;;
2601 hppa*-hp-hpux9* )
2602 machine=hp800 opsys=hpux9
2603 ;;
2604 hppa*-hp-hpux10.2* )
2605 machine=hp800 opsys=hpux10-20
2606 ;;
2607 hppa*-hp-hpux10* )
2608 machine=hp800 opsys=hpux10
2609 ;;
2610 hppa*-hp-hpux1[1-9]* )
2611 machine=hp800 opsys=hpux11
2612 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2613 ;;
2614
13aadc96
CY
2615 hppa*-*-linux-gnu* )
2616 machine=hp800 opsys=gnu-linux
2617 ;;
2618
6fbb6db1
GM
2619 ## HP 9000 series 700 and 800, running HP/UX
2620 hppa*-hp-hpux* )
2621 ## Cross-compilation? Nah!
2622 case "`uname -r`" in
2623 ## Someone's system reports A.B8.05 for this.
2624 ## I wonder what other possibilities there are.
2625 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2626 *.08.* ) machine=hp800 opsys=hpux8 ;;
2627 *.09.* ) machine=hp800 opsys=hpux9 ;;
2628 *) machine=hp800 opsys=hpux10 ;;
2629 esac
2630 ;;
13aadc96
CY
2631 hppa*-*-nextstep* )
2632 machine=hp800 opsys=nextstep
2633 ;;
2634
ba4481b5
DL
2635 ## Orion machines
2636 orion-orion-bsd* )
2637 machine=orion opsys=bsd4-2
2638 ;;
2639 clipper-orion-bsd* )
2640 machine=orion105 opsys=bsd4-2
2641 ;;
2642
2643 ## IBM machines
2644 i[3456]86-ibm-aix1.1* )
2645 machine=ibmps2-aix opsys=usg5-2-2
2646 ;;
2647 i[3456]86-ibm-aix1.[23]* | i[3456]86-ibm-aix* )
2648 machine=ibmps2-aix opsys=usg5-3
2649 ;;
2650 i370-ibm-aix*)
2651 machine=ibm370aix opsys=usg5-3
2652 ;;
55597d70 2653 s390-*-linux-gnu* )
138f0859
GM
2654 machine=ibms390 opsys=gnu-linux
2655 ;;
bcdb1378
EZ
2656 s390x-*-linux-gnu* )
2657 machine=ibms390x opsys=gnu-linux
2658 ;;
ba4481b5
DL
2659 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2660 machine=ibmrs6000 opsys=aix3-1
2661 ;;
2662 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2663 machine=ibmrs6000 opsys=aix3-2-5
2664 ;;
2665 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2666 machine=ibmrs6000 opsys=aix4-1
2667 ;;
2668 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2669 machine=ibmrs6000 opsys=aix4-2
2670 ;;
67bf991b
CY
2671 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2672 machine=ibmrs6000 opsys=aix4-2
2673 ;;
55597d70 2674 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2675 machine=ibmrs6000 opsys=aix4-2
2676 ;;
ba4481b5
DL
2677 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2678 machine=ibmrs6000 opsys=aix4
2679 ;;
2680 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2681 machine=ibmrs6000 opsys=aix4-1
2682 ;;
2683 rs6000-ibm-aix* | powerpc-ibm-aix* )
2684 machine=ibmrs6000 opsys=aix3-2
2685 ;;
2686 romp-ibm-bsd4.3* )
2687 machine=ibmrt opsys=bsd4-3
2688 ;;
2689 romp-ibm-bsd4.2* )
2690 machine=ibmrt opsys=bsd4-2
2691 ;;
2692 romp-ibm-aos4.3* )
2693 machine=ibmrt opsys=bsd4-3
2694 ;;
2695 romp-ibm-aos4.2* )
2696 machine=ibmrt opsys=bsd4-2
2697 ;;
2698 romp-ibm-aos* )
2699 machine=ibmrt opsys=bsd4-3
2700 ;;
2701 romp-ibm-bsd* )
2702 machine=ibmrt opsys=bsd4-3
2703 ;;
2704 romp-ibm-aix* )
2705 machine=ibmrt-aix opsys=usg5-2-2
2706 ;;
2707
2708 ## Integrated Solutions `Optimum V'
2709 m68*-isi-bsd4.2* )
2710 machine=isi-ov opsys=bsd4-2
2711 ;;
2712 m68*-isi-bsd4.3* )
2713 machine=isi-ov opsys=bsd4-3
2714 ;;
2715
2716 ## Intel 386 machines where we do care about the manufacturer
2717 i[3456]86-intsys-sysv* )
2718 machine=is386 opsys=usg5-2-2
2719 ;;
2720
2721 ## Prime EXL
2722 i[3456]86-prime-sysv* )
2723 machine=i386 opsys=usg5-3
2724 ;;
2725
2726 ## Sequent Symmetry running Dynix
2727 i[3456]86-sequent-bsd* )
2728 machine=symmetry opsys=bsd4-3
2729 ;;
2730
2731 ## Sequent Symmetry running ptx 4, which is a modified SVR4.
2732 i[3456]86-sequent-ptx4* | i[3456]86-sequent-sysv4* )
2733 machine=sequent-ptx opsys=ptx4
2734 NON_GNU_CPP=/lib/cpp
2735 ;;
2736
2737 ## Sequent Symmetry running DYNIX/ptx
2738 ## Use the old cpp rather than the newer ANSI one.
2739 i[3456]86-sequent-ptx* )
2740 machine=sequent-ptx opsys=ptx
2741 NON_GNU_CPP="/lib/cpp"
2742 ;;
2743
2744 ## ncr machine running svr4.3.
2745 i[3456]86-ncr-sysv4.3 )
2746 machine=ncr386 opsys=usg5-4-3
2747 ;;
2748
2749 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2750 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2751 i[3456]86-ncr-sysv* )
2752 machine=ncr386 opsys=usg5-4-2
2753 ;;
2754
2755 ## Intel Paragon OSF/1
2756 i860-intel-osf1* )
2757 machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp
2758 ;;
2759
2760 ## Intel 860
2761 i860-*-sysv4* )
2762 machine=i860 opsys=usg5-4
2763 NON_GNU_CC="/bin/cc" # Ie, not the one in /usr/ucb/cc.
2764 NON_GNU_CPP="/usr/ccs/lib/cpp" # cc -E tokenizes macro expansion.
2765 ;;
2766
c76e04a8
GM
2767 ## Macintosh PowerPC
2768 powerpc*-*-linux-gnu* )
2769 machine=macppc opsys=gnu-linux
2770 ;;
2771
ba4481b5
DL
2772 ## Masscomp machines
2773 m68*-masscomp-rtu* )
2774 machine=masscomp opsys=rtu
2775 ;;
2776
2777 ## Megatest machines
2778 m68*-megatest-bsd* )
2779 machine=mega68 opsys=bsd4-2
2780 ;;
2781
2782 ## Workstations sold by MIPS
2783 ## This is not necessarily all workstations using the MIPS processor -
2784 ## Irises are produced by SGI, and DECstations by DEC.
2785
2786 ## etc/MACHINES lists mips.h and mips4.h as possible machine files,
2787 ## and usg5-2-2 and bsd4-3 as possible OS files. The only guidance
2788 ## it gives for choosing between the alternatives seems to be "Use
2789 ## -machine=mips4 for RISCOS version 4; use -opsystem=bsd4-3 with
2790 ## the BSD world." I'll assume that these are instructions for
2791 ## handling two odd situations, and that every other situation
2792 ## should use mips.h and usg5-2-2, they being listed first.
2793 mips-mips-usg* )
2794 machine=mips4
2795 ## Fall through to the general code at the bottom to decide on the OS.
2796 ;;
2797 mips-mips-riscos4* )
2798 machine=mips4 opsys=bsd4-3
2799 NON_GNU_CC="cc -systype bsd43"
2800 NON_GNU_CPP="cc -systype bsd43 -E"
2801 ;;
2802 mips-mips-riscos5* )
2803 machine=mips4 opsys=riscos5
2804 NON_GNU_CC="cc -systype bsd43"
2805 NON_GNU_CPP="cc -systype bsd43 -E"
2806 ;;
2807 mips-mips-bsd* )
2808 machine=mips opsys=bsd4-3
2809 ;;
2810 mips-mips-* )
2811 machine=mips opsys=usg5-2-2
2812 ;;
2813
2814 ## NeXT
2815 m68*-next-* | m68k-*-nextstep* )
2816 machine=m68k opsys=nextstep
2817 ;;
2818
2819 ## The complete machine from National Semiconductor
2820 ns32k-ns-genix* )
2821 machine=ns32000 opsys=usg5-2
2822 ;;
2823
2824 ## NCR machines
2825 m68*-ncr-sysv2* | m68*-ncr-sysvr2* )
2826 machine=tower32 opsys=usg5-2-2
2827 ;;
2828 m68*-ncr-sysv3* | m68*-ncr-sysvr3* )
2829 machine=tower32v3 opsys=usg5-3
2830 ;;
2831
2832 ## NEC EWS4800
2833 mips-nec-sysv4*)
2834 machine=ews4800 opsys=ux4800
2835 ;;
2836
2837 ## Nixdorf Targon 31
2838 m68*-nixdorf-sysv* )
2839 machine=targon31 opsys=usg5-2-2
2840 ;;
2841
2842 ## Nu (TI or LMI)
2843 m68*-nu-sysv* )
2844 machine=nu opsys=usg5-2
2845 ;;
2846
2847 ## Plexus
2848 m68*-plexus-sysv* )
2849 machine=plexus opsys=usg5-2
2850 ;;
2851
ba4481b5
DL
2852 ## Pyramid machines
2853 ## I don't really have any idea what sort of processor the Pyramid has,
2854 ## so I'm assuming it is its own architecture.
2855 pyramid-pyramid-bsd* )
2856 machine=pyramid opsys=bsd4-2
2857 ;;
2858
2859 ## Sequent Balance
2860 ns32k-sequent-bsd4.2* )
2861 machine=sequent opsys=bsd4-2
2862 ;;
2863 ns32k-sequent-bsd4.3* )
2864 machine=sequent opsys=bsd4-3
2865 ;;
2866
2867 ## Siemens Nixdorf
2868 mips-siemens-sysv* | mips-sni-sysv*)
2869 machine=mips-siemens opsys=usg5-4
2870 NON_GNU_CC=/usr/ccs/bin/cc
2871 NON_GNU_CPP=/usr/ccs/lib/cpp
2872 ;;
2873
2874 ## Silicon Graphics machines
2875 ## Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
2876 m68*-sgi-iris3.5* )
2877 machine=irist opsys=iris3-5
2878 ;;
2879 m68*-sgi-iris3.6* | m68*-sgi-iris*)
2880 machine=irist opsys=iris3-6
2881 ;;
2882 ## Iris 4D
2883 mips-sgi-irix3* )
2884 machine=iris4d opsys=irix3-3
2885 ;;
2886 mips-sgi-irix4* )
2887 machine=iris4d opsys=irix4-0
2888 ;;
2889 mips-sgi-irix6.5 )
2890 machine=iris4d opsys=irix6-5
946173ad
DL
2891 # Without defining _LANGUAGE_C, things get masked out in the headers
2892 # so that, for instance, grepping for `free' in stdlib.h fails and
2893 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2894 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2895 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5
DL
2896 ;;
2897 mips-sgi-irix6* )
2898 machine=iris4d opsys=irix6-0
c4bb2108 2899 # It's not clear whether -D_LANGUAGE_C is necessary as it is for 6.5,
946173ad
DL
2900 # but presumably it does no harm.
2901 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2902 # -32 probably isn't necessary in later v.6s -- anyone know which?
ba4481b5
DL
2903 NON_GCC_TEST_OPTIONS=-32
2904 ;;
2905 mips-sgi-irix5.[01]* )
2906 machine=iris4d opsys=irix5-0
2907 ;;
2908 mips-sgi-irix5* | mips-sgi-irix* )
2909 machine=iris4d opsys=irix5-2
2910 ;;
2911
2912 ## SONY machines
2913 m68*-sony-bsd4.2* )
2914 machine=news opsys=bsd4-2
2915 ;;
2916 m68*-sony-bsd4.3* )
2917 machine=news opsys=bsd4-3
2918 ;;
2919 m68*-sony-newsos3* | m68*-sony-news3*)
2920 machine=news opsys=bsd4-3
2921 ;;
2922 mips-sony-bsd* | mips-sony-newsos4* | mips-sony-news4*)
2923 machine=news-risc opsys=bsd4-3
2924 ;;
2925 mips-sony-newsos6* )
2926 machine=news-r6 opsys=newsos6
2927 ;;
2928 mips-sony-news* )
2929 machine=news-risc opsys=newsos5
2930 ;;
2931
2932 ## Stride
2933 m68*-stride-sysv* )
2934 machine=stride opsys=usg5-2
2935 ;;
2936
2937 ## Suns
2938 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2939 machine=sparc opsys=gnu-linux
2940 ;;
2941
d054101f 2942 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2943 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2944 | rs6000-*-solaris2*)
2945 case "${canonical}" in
2946 m68*-sunos1* ) machine=sun1 ;;
2947 m68*-sunos2* ) machine=sun2 ;;
2948 m68* ) machine=sun3 ;;
2949 i[3456]86-sun-sunos[34]* ) machine=sun386 ;;
2950 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2951 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2952 powerpcle* ) machine=powerpcle ;;
2953 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2954 sparc* ) machine=sparc ;;
2955 * ) unported=yes ;;
2956 esac
2957 case "${canonical}" in
2958 ## The Sun386 didn't get past 4.0.
2959 i[3456]86-*-sunos4 ) opsys=sunos4-0 ;;
2960 *-sunos4.0* ) opsys=sunos4-0 ;;
2961 *-sunos4.1.[3-9]*noshare )
2962 ## This name is sunos413 instead of sunos4-1-3
2963 ## to avoid a file name conflict on MSDOS.
2964 opsys=sunos413
2965 NON_GNU_CPP=/usr/lib/cpp
2966 NON_GCC_TEST_OPTIONS=-Bstatic
2967 GCC_TEST_OPTIONS=-static
2968 ;;
2969 *-sunos4.1.[3-9]* | *-sunos4shr*)
2970 opsys=sunos4shr
2971 NON_GNU_CPP=/usr/lib/cpp
2972 ;;
2973 *-sunos4* | *-sunos )
2974 opsys=sunos4-1
2975 NON_GCC_TEST_OPTIONS=-Bstatic
2976 GCC_TEST_OPTIONS=-static
2977 ;;
2978 *-sunos5.3* | *-solaris2.3* )
2979 opsys=sol2-3
2980 NON_GNU_CPP=/usr/ccs/lib/cpp
2981 ;;
2982 *-sunos5.4* | *-solaris2.4* )
2983 opsys=sol2-4
2984 NON_GNU_CPP=/usr/ccs/lib/cpp
2985 RANLIB="ar -ts"
2986 ;;
2987 *-sunos5.5* | *-solaris2.5* )
2988 opsys=sol2-5
2989 NON_GNU_CPP=/usr/ccs/lib/cpp
2990 RANLIB="ar -ts"
2991 ;;
8e967cf7
MR
2992 *-sunos5.6* | *-solaris2.6* )
2993 opsys=sol2-6
2994 NON_GNU_CPP=/usr/ccs/lib/cpp
2995 RANLIB="ar -ts"
2996 ;;
ba4481b5 2997 *-sunos5* | *-solaris* )
9e71690e 2998 opsys=sol2-6
3685ba3f
CY
2999## FIXME: make this into a proper fix that checks the compiler type,
3000## rather than relying on path. Or is /usr/ccs/lib/cpp a bad default now?
d23b7a3f
GM
3001 if [ "x$CC" = x/opt/SUNWspro/bin/cc ]; then
3002 ## -Xs prevents spurious whitespace.
3003 NON_GNU_CPP="/opt/SUNWspro/bin/cc -E -Xs"
3004 else
3005 NON_GNU_CPP=/usr/ccs/lib/cpp
3006 fi
ba4481b5
DL
3007 ;;
3008 * ) opsys=bsd4-2 ;;
3009 esac
3010 ## Watch out for a compiler that we know will not work.
3011 case "${canonical}" in
3012 *-solaris* | *-sunos5* )
3013 if [ "x$CC" = x/usr/ucb/cc ]; then
3014 ## /usr/ucb/cc doesn't work;
3015 ## we should find some other compiler that does work.
3016 unset CC
3017 fi
3018 ;;
3019 *) ;;
3020 esac
3021 ;;
3022 sparc-*-nextstep* )
3023 machine=sparc opsys=nextstep
3024 ;;
3025
3026 ## Tadpole 68k
3027 m68*-tadpole-sysv* )
3028 machine=tad68k opsys=usg5-3
3029 ;;
3030
3031 ## Tahoe machines
3032 tahoe-tahoe-bsd4.2* )
3033 machine=tahoe opsys=bsd4-2
3034 ;;
3035 tahoe-tahoe-bsd4.3* )
3036 machine=tahoe opsys=bsd4-3
3037 ;;
3038
3039 ## Tandem Integrity S2
3040 mips-tandem-sysv* )
3041 machine=tandem-s2 opsys=usg5-3
3042 ;;
3043
3044 ## Tektronix XD88
3045 m88k-tektronix-sysv3* )
3046 machine=tekxd88 opsys=usg5-3
3047 ;;
3048
3049 ## Tektronix 16000 box (6130?)
3050 ns16k-tektronix-bsd* )
3051 machine=ns16000 opsys=bsd4-2
3052 ;;
3053 ## Tektronix 4300
3054 ## src/m/tek4300.h hints that this is a m68k machine.
3055 m68*-tektronix-bsd* )
3056 machine=tek4300 opsys=bsd4-3
3057 ;;
3058
3059 ## Titan P2 or P3
3060 ## We seem to have lost the machine-description file titan.h!
3061 titan-titan-sysv* )
3062 machine=titan opsys=usg5-3
3063 ;;
3064
3065 ## Ustation E30 (SS5E)
3066 m68*-unisys-uniplus* )
3067 machine=ustation opsystem=unipl5-2
3068 ;;
3069
3070 ## Vaxen.
3071 vax-dec-* )
3072 machine=vax
3073 case "${canonical}" in
3074 *-bsd4.1* ) opsys=bsd4-1 ;;
3075 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
3076 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
3077 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
3078 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
3079 *-vms* ) opsys=vms ;;
3080 * ) unported=yes
3081 esac
3082 ;;
3083
3084 ## Whitechapel MG1
3085 ns16k-whitechapel-* )
3086 machine=mg1
3087 ## We don't know what sort of OS runs on these; we'll let the
3088 ## operating system guessing code below try.
3089 ;;
3090
3091 ## Wicat
3092 m68*-wicat-sysv* )
3093 machine=wicat opsys=usg5-2
3094 ;;
3095
f4988be7
GM
3096 ## IA-64
3097 ia64*-*-linux* )
3098 machine=ia64 opsys=gnu-linux
3099 ;;
3100
ba4481b5
DL
3101 ## Intel 386 machines where we don't care about the manufacturer
3102 i[3456]86-*-* )
3103 machine=intel386
3104 case "${canonical}" in
c60ee5e7 3105 *-cygwin ) opsys=cygwin ;;
eae54018 3106 *-darwin* ) opsys=darwin
23fd4483
ST
3107 CPP="${CC-cc} -E -no-cpp-precomp"
3108 ;;
ba4481b5
DL
3109 *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
3110 *-isc2.2* ) opsys=isc2-2 ;;
3111 *-isc4.0* ) opsys=isc4-0 ;;
3112 *-isc4.* ) opsys=isc4-1
3113 GCC_TEST_OPTIONS=-posix
3114 NON_GCC_TEST_OPTIONS=-Xp
3115 ;;
3116 *-isc* ) opsys=isc3-0 ;;
3117 *-esix5* ) opsys=esix5r4; NON_GNU_CPP=/usr/lib/cpp ;;
3118 *-esix* ) opsys=esix ;;
3119 *-xenix* ) opsys=xenix ;;
3120 *-linux-gnu* ) opsys=gnu-linux ;;
3121 *-sco3.2v4* ) opsys=sco4 ; NON_GNU_CPP=/lib/cpp ;;
503d2be0 3122 *-sco3.2v5* ) opsys=sco5
ba4481b5
DL
3123 NON_GNU_CPP=/lib/cpp
3124 # Prevent -belf from being passed to $CPP.
3125 # /lib/cpp does not accept it.
3126 OVERRIDE_CPPFLAGS=" "
3127 ;;
3128 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
3129 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
3130 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 3131 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
3132 *-nextstep* ) opsys=nextstep ;;
3133 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
3134 esac
3135 ;;
3136
3137 ## m68k Linux-based GNU system
3138 m68k-*-linux-gnu* )
3139 machine=m68k opsys=gnu-linux
3140 ;;
3141
3142 ## Mips Linux-based GNU system
cd958eb3 3143 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
3144 machine=mips opsys=gnu-linux
3145 ;;
3146
3147 ## UXP/DS
3148 sparc-fujitsu-sysv4* )
3149 machine=sparc opsys=uxpds
3150 NON_GNU_CPP=/usr/ccs/lib/cpp
3151 RANLIB="ar -ts"
3152 ;;
3153
3154 ## UXP/V
3155 f301-fujitsu-uxpv4.1)
3156 machine=f301 opsys=uxpv
3157 ;;
3158
598a2813
AS
3159 ## AMD x86-64 Linux-based GNU system
3160 x86_64-*-linux-gnu* )
24b01ec4 3161 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
3162 ;;
3163
94218e27
DN
3164 ## Tensilica Xtensa Linux-based GNU system
3165 xtensa-*-linux-gnu* )
3166 machine=xtensa opsys=gnu-linux
3167 ;;
3168
ba4481b5
DL
3169 * )
3170 unported=yes
3171 ;;
3172esac
3173
3174### If the code above didn't choose an operating system, just choose
3175### an operating system based on the configuration name. You really
3176### only want to use this when you have no idea what the right
3177### operating system is; if you know what operating systems a machine
3178### runs, it's cleaner to make it explicit in the case statement
3179### above.
3180if test x"${opsys}" = x; then
3181 case "${canonical}" in
3182 *-gnu* ) opsys=gnu ;;
3183 *-bsd4.[01] ) opsys=bsd4-1 ;;
3184 *-bsd4.2 ) opsys=bsd4-2 ;;
3185 *-bsd4.3 ) opsys=bsd4-3 ;;
3186 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
3187 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
3188 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
3189 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
3190 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
3191 *-sysv5uw* ) opsys=unixware ;;
3192 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
3193 *-sysv4.1* | *-sysvr4.1* )
3194 NON_GNU_CPP=/usr/lib/cpp
3195 opsys=usg5-4 ;;
3196 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
3197 if [ x$NON_GNU_CPP = x ]; then
3198 if [ -f /usr/ccs/lib/cpp ]; then
3199 NON_GNU_CPP=/usr/ccs/lib/cpp
3200 else
3201 NON_GNU_CPP=/lib/cpp
3202 fi
3203 fi
3204 opsys=usg5-4-2 ;;
3205 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
3206 * )
3207 unported=yes
3208 ;;
3209 esac
3210fi
3211
c0d27fcc 3212
22044edf 3213
ba4481b5 3214if test $unported = yes; then
c0d27fcc 3215 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
3216Check \`etc/MACHINES' for recognized configuration names." >&5
3217echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
3218Check \`etc/MACHINES' for recognized configuration names." >&2;}
3219 { (exit 1); exit 1; }; }
ba4481b5
DL
3220fi
3221
3222machfile="m/${machine}.h"
3223opsysfile="s/${opsys}.h"
3224
c0d27fcc 3225
ba4481b5
DL
3226#### Choose a compiler.
3227test -n "$CC" && cc_specified=yes
3228
3229# Save the value of CFLAGS that the user specified.
3230SPECIFIED_CFLAGS="$CFLAGS"
3231
3232case ${with_gcc} in
3233 "yes" ) CC="gcc" GCC=yes ;;
3234 "no" ) : ${CC=cc} ;;
503d2be0
AS
3235 * )
3236esac
3237ac_ext=c
3238ac_cpp='$CPP $CPPFLAGS'
3239ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3240ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3241ac_compiler_gnu=$ac_cv_c_compiler_gnu
3242if test -n "$ac_tool_prefix"; then
3243 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3244set dummy ${ac_tool_prefix}gcc; ac_word=$2
ca81d7a0
JD
3245{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3246echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3247if test "${ac_cv_prog_CC+set}" = set; then
3248 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3249else
3250 if test -n "$CC"; then
3251 ac_cv_prog_CC="$CC" # Let the user override the test.
3252else
c0d27fcc
MR
3253as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3254for as_dir in $PATH
3255do
3256 IFS=$as_save_IFS
3257 test -z "$as_dir" && as_dir=.
3258 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3259 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3260 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3261 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3262 break 2
3263 fi
3264done
503d2be0 3265done
ca81d7a0 3266IFS=$as_save_IFS
503d2be0 3267
ba4481b5
DL
3268fi
3269fi
503d2be0 3270CC=$ac_cv_prog_CC
ba4481b5 3271if test -n "$CC"; then
ca81d7a0
JD
3272 { echo "$as_me:$LINENO: result: $CC" >&5
3273echo "${ECHO_T}$CC" >&6; }
503d2be0 3274else
ca81d7a0
JD
3275 { echo "$as_me:$LINENO: result: no" >&5
3276echo "${ECHO_T}no" >&6; }
503d2be0
AS
3277fi
3278
ca81d7a0 3279
503d2be0
AS
3280fi
3281if test -z "$ac_cv_prog_CC"; then
3282 ac_ct_CC=$CC
3283 # Extract the first word of "gcc", so it can be a program name with args.
3284set dummy gcc; ac_word=$2
ca81d7a0
JD
3285{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3286echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3287if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3288 echo $ECHO_N "(cached) $ECHO_C" >&6
3289else
3290 if test -n "$ac_ct_CC"; then
3291 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3292else
c0d27fcc
MR
3293as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3294for as_dir in $PATH
3295do
3296 IFS=$as_save_IFS
3297 test -z "$as_dir" && as_dir=.
3298 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3299 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3300 ac_cv_prog_ac_ct_CC="gcc"
3301 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3302 break 2
3303 fi
3304done
503d2be0 3305done
ca81d7a0 3306IFS=$as_save_IFS
503d2be0
AS
3307
3308fi
3309fi
3310ac_ct_CC=$ac_cv_prog_ac_ct_CC
3311if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3312 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3313echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 3314else
ca81d7a0
JD
3315 { echo "$as_me:$LINENO: result: no" >&5
3316echo "${ECHO_T}no" >&6; }
503d2be0
AS
3317fi
3318
ca81d7a0
JD
3319 if test "x$ac_ct_CC" = x; then
3320 CC=""
3321 else
3322 case $cross_compiling:$ac_tool_warned in
3323yes:)
3324{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3325whose name does not start with the host triplet. If you think this
3326configuration is useful to you, please write to autoconf@gnu.org." >&5
3327echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3328whose name does not start with the host triplet. If you think this
3329configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3330ac_tool_warned=yes ;;
3331esac
3332 CC=$ac_ct_CC
3333 fi
503d2be0
AS
3334else
3335 CC="$ac_cv_prog_CC"
ba4481b5
DL
3336fi
3337
3338if test -z "$CC"; then
ca81d7a0
JD
3339 if test -n "$ac_tool_prefix"; then
3340 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 3341set dummy ${ac_tool_prefix}cc; ac_word=$2
ca81d7a0
JD
3342{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3343echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3344if test "${ac_cv_prog_CC+set}" = set; then
3345 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
3346else
3347 if test -n "$CC"; then
3348 ac_cv_prog_CC="$CC" # Let the user override the test.
3349else
c0d27fcc
MR
3350as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3351for as_dir in $PATH
3352do
3353 IFS=$as_save_IFS
3354 test -z "$as_dir" && as_dir=.
3355 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3356 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3357 ac_cv_prog_CC="${ac_tool_prefix}cc"
3358 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3359 break 2
3360 fi
3361done
503d2be0 3362done
ca81d7a0 3363IFS=$as_save_IFS
503d2be0
AS
3364
3365fi
3366fi
3367CC=$ac_cv_prog_CC
3368if test -n "$CC"; then
ca81d7a0
JD
3369 { echo "$as_me:$LINENO: result: $CC" >&5
3370echo "${ECHO_T}$CC" >&6; }
4b411bfe 3371else
ca81d7a0
JD
3372 { echo "$as_me:$LINENO: result: no" >&5
3373echo "${ECHO_T}no" >&6; }
4b411bfe
CY
3374fi
3375
4b411bfe 3376
ca81d7a0 3377 fi
503d2be0
AS
3378fi
3379if test -z "$CC"; then
3380 # Extract the first word of "cc", so it can be a program name with args.
3381set dummy cc; ac_word=$2
ca81d7a0
JD
3382{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3383echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3384if test "${ac_cv_prog_CC+set}" = set; then
3385 echo $ECHO_N "(cached) $ECHO_C" >&6
3386else
3387 if test -n "$CC"; then
3388 ac_cv_prog_CC="$CC" # Let the user override the test.
3389else
3390 ac_prog_rejected=no
c0d27fcc
MR
3391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3392for as_dir in $PATH
3393do
3394 IFS=$as_save_IFS
3395 test -z "$as_dir" && as_dir=.
3396 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3397 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3398 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3399 ac_prog_rejected=yes
3400 continue
3401 fi
3402 ac_cv_prog_CC="cc"
3403 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3404 break 2
3405 fi
3406done
503d2be0 3407done
ca81d7a0 3408IFS=$as_save_IFS
503d2be0 3409
ba4481b5
DL
3410if test $ac_prog_rejected = yes; then
3411 # We found a bogon in the path, so make sure we never use it.
3412 set dummy $ac_cv_prog_CC
3413 shift
503d2be0 3414 if test $# != 0; then
ba4481b5
DL
3415 # We chose a different compiler from the bogus one.
3416 # However, it has the same basename, so the bogon will be chosen
3417 # first if we set CC to just the basename; use the full file name.
3418 shift
6bae0ccf 3419 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
3420 fi
3421fi
3422fi
3423fi
503d2be0 3424CC=$ac_cv_prog_CC
ba4481b5 3425if test -n "$CC"; then
ca81d7a0
JD
3426 { echo "$as_me:$LINENO: result: $CC" >&5
3427echo "${ECHO_T}$CC" >&6; }
ba4481b5 3428else
ca81d7a0
JD
3429 { echo "$as_me:$LINENO: result: no" >&5
3430echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3431fi
3432
ca81d7a0 3433
503d2be0
AS
3434fi
3435if test -z "$CC"; then
3436 if test -n "$ac_tool_prefix"; then
ca81d7a0 3437 for ac_prog in cl.exe
503d2be0
AS
3438 do
3439 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3440set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ca81d7a0
JD
3441{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3442echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3443if test "${ac_cv_prog_CC+set}" = set; then
3444 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
3445else
3446 if test -n "$CC"; then
3447 ac_cv_prog_CC="$CC" # Let the user override the test.
3448else
c0d27fcc
MR
3449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3450for as_dir in $PATH
3451do
3452 IFS=$as_save_IFS
3453 test -z "$as_dir" && as_dir=.
3454 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3455 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3456 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3457 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3458 break 2
3459 fi
3460done
503d2be0 3461done
ca81d7a0 3462IFS=$as_save_IFS
503d2be0 3463
c4bb2108
DL
3464fi
3465fi
503d2be0 3466CC=$ac_cv_prog_CC
c4bb2108 3467if test -n "$CC"; then
ca81d7a0
JD
3468 { echo "$as_me:$LINENO: result: $CC" >&5
3469echo "${ECHO_T}$CC" >&6; }
c4bb2108 3470else
ca81d7a0
JD
3471 { echo "$as_me:$LINENO: result: no" >&5
3472echo "${ECHO_T}no" >&6; }
503d2be0
AS
3473fi
3474
ca81d7a0 3475
503d2be0
AS
3476 test -n "$CC" && break
3477 done
3478fi
3479if test -z "$CC"; then
3480 ac_ct_CC=$CC
ca81d7a0 3481 for ac_prog in cl.exe
503d2be0
AS
3482do
3483 # Extract the first word of "$ac_prog", so it can be a program name with args.
3484set dummy $ac_prog; ac_word=$2
ca81d7a0
JD
3485{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3486echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3487if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3488 echo $ECHO_N "(cached) $ECHO_C" >&6
3489else
3490 if test -n "$ac_ct_CC"; then
3491 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3492else
c0d27fcc
MR
3493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3494for as_dir in $PATH
3495do
3496 IFS=$as_save_IFS
3497 test -z "$as_dir" && as_dir=.
3498 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3499 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3500 ac_cv_prog_ac_ct_CC="$ac_prog"
3501 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3502 break 2
3503 fi
3504done
503d2be0 3505done
ca81d7a0 3506IFS=$as_save_IFS
503d2be0 3507
c4bb2108 3508fi
503d2be0
AS
3509fi
3510ac_ct_CC=$ac_cv_prog_ac_ct_CC
3511if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3512 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3513echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 3514else
ca81d7a0
JD
3515 { echo "$as_me:$LINENO: result: no" >&5
3516echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3517fi
3518
ca81d7a0 3519
503d2be0
AS
3520 test -n "$ac_ct_CC" && break
3521done
ba4481b5 3522
ca81d7a0
JD
3523 if test "x$ac_ct_CC" = x; then
3524 CC=""
3525 else
3526 case $cross_compiling:$ac_tool_warned in
3527yes:)
3528{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3529whose name does not start with the host triplet. If you think this
3530configuration is useful to you, please write to autoconf@gnu.org." >&5
3531echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3532whose name does not start with the host triplet. If you think this
3533configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3534ac_tool_warned=yes ;;
3535esac
3536 CC=$ac_ct_CC
3537 fi
503d2be0
AS
3538fi
3539
3540fi
ba4481b5 3541
c0d27fcc 3542
19650fd6
AS
3543test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3544See \`config.log' for more details." >&5
3545echo "$as_me: error: no acceptable C compiler found in \$PATH
3546See \`config.log' for more details." >&2;}
503d2be0 3547 { (exit 1); exit 1; }; }
c4bb2108 3548
503d2be0 3549# Provide some information about the compiler.
ca81d7a0 3550echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3551ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3552{ (ac_try="$ac_compiler --version >&5"
3553case "(($ac_try" in
3554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3555 *) ac_try_echo=$ac_try;;
3556esac
3557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3558 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3559 ac_status=$?
c0d27fcc 3560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3561 (exit $ac_status); }
ca81d7a0
JD
3562{ (ac_try="$ac_compiler -v >&5"
3563case "(($ac_try" in
3564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3565 *) ac_try_echo=$ac_try;;
3566esac
3567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3568 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3569 ac_status=$?
c0d27fcc 3570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3571 (exit $ac_status); }
ca81d7a0
JD
3572{ (ac_try="$ac_compiler -V >&5"
3573case "(($ac_try" in
3574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3575 *) ac_try_echo=$ac_try;;
3576esac
3577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3578 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3579 ac_status=$?
c0d27fcc 3580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3581 (exit $ac_status); }
3582
3583cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3584/* confdefs.h. */
3585_ACEOF
3586cat confdefs.h >>conftest.$ac_ext
3587cat >>conftest.$ac_ext <<_ACEOF
3588/* end confdefs.h. */
c4bb2108 3589
503d2be0
AS
3590int
3591main ()
3592{
3593
3594 ;
3595 return 0;
3596}
3597_ACEOF
3598ac_clean_files_save=$ac_clean_files
19650fd6 3599ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3600# Try to create an executable without -o first, disregard a.out.
3601# It will help us diagnose broken compilers, and finding out an intuition
3602# of exeext.
ca81d7a0
JD
3603{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3604echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3605ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ca81d7a0
JD
3606#
3607# List of possible output files, starting from the most likely.
3608# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3609# only as a last resort. b.out is created by i960 compilers.
3610ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3611#
3612# The IRIX 6 linker writes into existing files which may not be
3613# executable, retaining their permissions. Remove them first so a
3614# subsequent execution test works.
3615ac_rmfiles=
3616for ac_file in $ac_files
3617do
3618 case $ac_file in
3619 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3620 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3621 esac
3622done
3623rm -f $ac_rmfiles
3624
3625if { (ac_try="$ac_link_default"
3626case "(($ac_try" in
3627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3628 *) ac_try_echo=$ac_try;;
3629esac
3630eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3631 (eval "$ac_link_default") 2>&5
503d2be0 3632 ac_status=$?
c0d27fcc 3633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3634 (exit $ac_status); }; then
ca81d7a0
JD
3635 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3636# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3637# in a Makefile. We should not override ac_cv_exeext if it was cached,
3638# so that the user can short-circuit this test for compilers unknown to
3639# Autoconf.
f053c89f 3640for ac_file in $ac_files ''
19650fd6 3641do
6bae0ccf 3642 test -f "$ac_file" || continue
503d2be0 3643 case $ac_file in
ca81d7a0 3644 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3645 ;;
19650fd6 3646 [ab].out )
edfaf76d
LK
3647 # We found the default executable, but exeext='' is most
3648 # certainly right.
3649 break;;
19650fd6 3650 *.* )
ca81d7a0
JD
3651 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3652 then :; else
3653 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3654 fi
3655 # We set ac_cv_exeext here because the later test for it is not
3656 # safe: cross compilers may not add the suffix if given an `-o'
3657 # argument, so we may need to know it at that point already.
3658 # Even if this section looks crufty: it has the advantage of
3659 # actually working.
edfaf76d 3660 break;;
19650fd6 3661 * )
edfaf76d 3662 break;;
503d2be0
AS
3663 esac
3664done
ca81d7a0
JD
3665test "$ac_cv_exeext" = no && ac_cv_exeext=
3666
503d2be0 3667else
f053c89f
CY
3668 ac_file=''
3669fi
3670
3671{ echo "$as_me:$LINENO: result: $ac_file" >&5
3672echo "${ECHO_T}$ac_file" >&6; }
3673if test -z "$ac_file"; then
503d2be0 3674 echo "$as_me: failed program was:" >&5
19650fd6
AS
3675sed 's/^/| /' conftest.$ac_ext >&5
3676
6bae0ccf 3677{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3678See \`config.log' for more details." >&5
6bae0ccf 3679echo "$as_me: error: C compiler cannot create executables
19650fd6 3680See \`config.log' for more details." >&2;}
503d2be0
AS
3681 { (exit 77); exit 77; }; }
3682fi
3683
3684ac_exeext=$ac_cv_exeext
503d2be0 3685
ca81d7a0 3686# Check that the compiler produces executables we can run. If not, either
503d2be0 3687# the compiler is broken, or we cross compile.
ca81d7a0
JD
3688{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3689echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3690# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3691# If not cross compiling, check that we can run a simple program.
3692if test "$cross_compiling" != yes; then
3693 if { ac_try='./$ac_file'
ca81d7a0
JD
3694 { (case "(($ac_try" in
3695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3696 *) ac_try_echo=$ac_try;;
3697esac
3698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3699 (eval "$ac_try") 2>&5
503d2be0 3700 ac_status=$?
c0d27fcc 3701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3702 (exit $ac_status); }; }; then
3703 cross_compiling=no
ba4481b5 3704 else
503d2be0
AS
3705 if test "$cross_compiling" = maybe; then
3706 cross_compiling=yes
3707 else
c0d27fcc 3708 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3709If you meant to cross compile, use \`--host'.
3710See \`config.log' for more details." >&5
503d2be0 3711echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3712If you meant to cross compile, use \`--host'.
3713See \`config.log' for more details." >&2;}
503d2be0
AS
3714 { (exit 1); exit 1; }; }
3715 fi
ba4481b5 3716 fi
503d2be0 3717fi
ca81d7a0
JD
3718{ echo "$as_me:$LINENO: result: yes" >&5
3719echo "${ECHO_T}yes" >&6; }
503d2be0 3720
19650fd6 3721rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3722ac_clean_files=$ac_clean_files_save
ca81d7a0 3723# Check that the compiler produces executables we can run. If not, either
503d2be0 3724# the compiler is broken, or we cross compile.
ca81d7a0
JD
3725{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3726echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3727{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3728echo "${ECHO_T}$cross_compiling" >&6; }
3729
3730{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3731echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3732if { (ac_try="$ac_link"
3733case "(($ac_try" in
3734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3735 *) ac_try_echo=$ac_try;;
3736esac
3737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3738 (eval "$ac_link") 2>&5
503d2be0 3739 ac_status=$?
c0d27fcc 3740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3741 (exit $ac_status); }; then
3742 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3743# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3744# work properly (i.e., refer to `conftest.exe'), while it won't with
3745# `rm'.
6bae0ccf
DL
3746for ac_file in conftest.exe conftest conftest.*; do
3747 test -f "$ac_file" || continue
503d2be0 3748 case $ac_file in
ca81d7a0 3749 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3750 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3751 break;;
503d2be0
AS
3752 * ) break;;
3753 esac
3754done
ba4481b5 3755else
19650fd6
AS
3756 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3757See \`config.log' for more details." >&5
3758echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3759See \`config.log' for more details." >&2;}
503d2be0 3760 { (exit 1); exit 1; }; }
ba4481b5 3761fi
ba4481b5 3762
503d2be0 3763rm -f conftest$ac_cv_exeext
ca81d7a0
JD
3764{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3765echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3766
503d2be0
AS
3767rm -f conftest.$ac_ext
3768EXEEXT=$ac_cv_exeext
3769ac_exeext=$EXEEXT
ca81d7a0
JD
3770{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3771echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3772if test "${ac_cv_objext+set}" = set; then
3773 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3774else
503d2be0 3775 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3776/* confdefs.h. */
3777_ACEOF
3778cat confdefs.h >>conftest.$ac_ext
3779cat >>conftest.$ac_ext <<_ACEOF
3780/* end confdefs.h. */
ba4481b5 3781
503d2be0
AS
3782int
3783main ()
3784{
ba4481b5 3785
503d2be0
AS
3786 ;
3787 return 0;
3788}
3789_ACEOF
3790rm -f conftest.o conftest.obj
ca81d7a0
JD
3791if { (ac_try="$ac_compile"
3792case "(($ac_try" in
3793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3794 *) ac_try_echo=$ac_try;;
3795esac
3796eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3797 (eval "$ac_compile") 2>&5
503d2be0 3798 ac_status=$?
c0d27fcc 3799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3800 (exit $ac_status); }; then
ca81d7a0
JD
3801 for ac_file in conftest.o conftest.obj conftest.*; do
3802 test -f "$ac_file" || continue;
503d2be0 3803 case $ac_file in
ca81d7a0 3804 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3805 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3806 break;;
3807 esac
3808done
c4bb2108 3809else
503d2be0 3810 echo "$as_me: failed program was:" >&5
19650fd6
AS
3811sed 's/^/| /' conftest.$ac_ext >&5
3812
3813{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3814See \`config.log' for more details." >&5
3815echo "$as_me: error: cannot compute suffix of object files: cannot compile
3816See \`config.log' for more details." >&2;}
503d2be0 3817 { (exit 1); exit 1; }; }
c4bb2108
DL
3818fi
3819
503d2be0
AS
3820rm -f conftest.$ac_cv_objext conftest.$ac_ext
3821fi
ca81d7a0
JD
3822{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3823echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3824OBJEXT=$ac_cv_objext
3825ac_objext=$OBJEXT
ca81d7a0
JD
3826{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3827echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3828if test "${ac_cv_c_compiler_gnu+set}" = set; then
3829 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3830else
503d2be0 3831 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3832/* confdefs.h. */
3833_ACEOF
3834cat confdefs.h >>conftest.$ac_ext
3835cat >>conftest.$ac_ext <<_ACEOF
3836/* end confdefs.h. */
503d2be0
AS
3837
3838int
3839main ()
3840{
3841#ifndef __GNUC__
3842 choke me
3843#endif
3844
3845 ;
3846 return 0;
3847}
3848_ACEOF
3849rm -f conftest.$ac_objext
ca81d7a0
JD
3850if { (ac_try="$ac_compile"
3851case "(($ac_try" in
3852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3853 *) ac_try_echo=$ac_try;;
3854esac
3855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3856 (eval "$ac_compile") 2>conftest.er1
503d2be0 3857 ac_status=$?
edfaf76d
LK
3858 grep -v '^ *+' conftest.er1 >conftest.err
3859 rm -f conftest.er1
3860 cat conftest.err >&5
c0d27fcc 3861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3862 (exit $ac_status); } && {
3863 test -z "$ac_c_werror_flag" ||
3864 test ! -s conftest.err
3865 } && test -s conftest.$ac_objext; then
503d2be0
AS
3866 ac_compiler_gnu=yes
3867else
3868 echo "$as_me: failed program was:" >&5
19650fd6
AS
3869sed 's/^/| /' conftest.$ac_ext >&5
3870
ca81d7a0 3871 ac_compiler_gnu=no
503d2be0 3872fi
ca81d7a0
JD
3873
3874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3875ac_cv_c_compiler_gnu=$ac_compiler_gnu
3876
3877fi
ca81d7a0
JD
3878{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3879echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3880GCC=`test $ac_compiler_gnu = yes && echo yes`
3881ac_test_CFLAGS=${CFLAGS+set}
3882ac_save_CFLAGS=$CFLAGS
ca81d7a0
JD
3883{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3884echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3885if test "${ac_cv_prog_cc_g+set}" = set; then
3886 echo $ECHO_N "(cached) $ECHO_C" >&6
3887else
ca81d7a0
JD
3888 ac_save_c_werror_flag=$ac_c_werror_flag
3889 ac_c_werror_flag=yes
3890 ac_cv_prog_cc_g=no
3891 CFLAGS="-g"
3892 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3893/* confdefs.h. */
3894_ACEOF
3895cat confdefs.h >>conftest.$ac_ext
3896cat >>conftest.$ac_ext <<_ACEOF
3897/* end confdefs.h. */
503d2be0
AS
3898
3899int
3900main ()
3901{
3902
3903 ;
3904 return 0;
3905}
3906_ACEOF
3907rm -f conftest.$ac_objext
ca81d7a0
JD
3908if { (ac_try="$ac_compile"
3909case "(($ac_try" in
3910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3911 *) ac_try_echo=$ac_try;;
3912esac
3913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3914 (eval "$ac_compile") 2>conftest.er1
503d2be0 3915 ac_status=$?
edfaf76d
LK
3916 grep -v '^ *+' conftest.er1 >conftest.err
3917 rm -f conftest.er1
3918 cat conftest.err >&5
c0d27fcc 3919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3920 (exit $ac_status); } && {
3921 test -z "$ac_c_werror_flag" ||
3922 test ! -s conftest.err
3923 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3924 ac_cv_prog_cc_g=yes
3925else
503d2be0 3926 echo "$as_me: failed program was:" >&5
19650fd6
AS
3927sed 's/^/| /' conftest.$ac_ext >&5
3928
ca81d7a0
JD
3929 CFLAGS=""
3930 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3931/* confdefs.h. */
3932_ACEOF
3933cat confdefs.h >>conftest.$ac_ext
3934cat >>conftest.$ac_ext <<_ACEOF
3935/* end confdefs.h. */
edfaf76d 3936
6bae0ccf
DL
3937int
3938main ()
3939{
ca81d7a0 3940
6bae0ccf
DL
3941 ;
3942 return 0;
3943}
3944_ACEOF
ca81d7a0
JD
3945rm -f conftest.$ac_objext
3946if { (ac_try="$ac_compile"
3947case "(($ac_try" in
3948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3949 *) ac_try_echo=$ac_try;;
3950esac
3951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3952 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3953 ac_status=$?
edfaf76d
LK
3954 grep -v '^ *+' conftest.er1 >conftest.err
3955 rm -f conftest.er1
3956 cat conftest.err >&5
6bae0ccf 3957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3958 (exit $ac_status); } && {
3959 test -z "$ac_c_werror_flag" ||
3960 test ! -s conftest.err
3961 } && test -s conftest.$ac_objext; then
ca81d7a0 3962 :
6bae0ccf
DL
3963else
3964 echo "$as_me: failed program was:" >&5
19650fd6
AS
3965sed 's/^/| /' conftest.$ac_ext >&5
3966
ca81d7a0
JD
3967 ac_c_werror_flag=$ac_save_c_werror_flag
3968 CFLAGS="-g"
3969 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 3970/* confdefs.h. */
19650fd6
AS
3971_ACEOF
3972cat confdefs.h >>conftest.$ac_ext
3973cat >>conftest.$ac_ext <<_ACEOF
3974/* end confdefs.h. */
ca81d7a0 3975
503d2be0
AS
3976int
3977main ()
3978{
ca81d7a0 3979
503d2be0
AS
3980 ;
3981 return 0;
3982}
3983_ACEOF
3984rm -f conftest.$ac_objext
ca81d7a0
JD
3985if { (ac_try="$ac_compile"
3986case "(($ac_try" in
3987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3988 *) ac_try_echo=$ac_try;;
3989esac
3990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3991 (eval "$ac_compile") 2>conftest.er1
503d2be0 3992 ac_status=$?
edfaf76d
LK
3993 grep -v '^ *+' conftest.er1 >conftest.err
3994 rm -f conftest.er1
3995 cat conftest.err >&5
c0d27fcc 3996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3997 (exit $ac_status); } && {
3998 test -z "$ac_c_werror_flag" ||
3999 test ! -s conftest.err
4000 } && test -s conftest.$ac_objext; then
ca81d7a0 4001 ac_cv_prog_cc_g=yes
503d2be0
AS
4002else
4003 echo "$as_me: failed program was:" >&5
19650fd6
AS
4004sed 's/^/| /' conftest.$ac_ext >&5
4005
ca81d7a0 4006
8eeae1c9 4007fi
ca81d7a0
JD
4008
4009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4010fi
4011
4012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4013fi
4014
4015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4016 ac_c_werror_flag=$ac_save_c_werror_flag
4017fi
4018{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
4019echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
4020if test "$ac_test_CFLAGS" = set; then
4021 CFLAGS=$ac_save_CFLAGS
4022elif test $ac_cv_prog_cc_g = yes; then
4023 if test "$GCC" = yes; then
4024 CFLAGS="-g -O2"
4025 else
4026 CFLAGS="-g"
4027 fi
4028else
4029 if test "$GCC" = yes; then
4030 CFLAGS="-O2"
4031 else
4032 CFLAGS=
4033 fi
4034fi
4035{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
4036echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
4037if test "${ac_cv_prog_cc_c89+set}" = set; then
4038 echo $ECHO_N "(cached) $ECHO_C" >&6
4039else
4040 ac_cv_prog_cc_c89=no
4041ac_save_CC=$CC
4042cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4043/* confdefs.h. */
4044_ACEOF
4045cat confdefs.h >>conftest.$ac_ext
4046cat >>conftest.$ac_ext <<_ACEOF
4047/* end confdefs.h. */
ca81d7a0
JD
4048#include <stdarg.h>
4049#include <stdio.h>
4050#include <sys/types.h>
4051#include <sys/stat.h>
4052/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4053struct buf { int x; };
4054FILE * (*rcsopen) (struct buf *, struct stat *, int);
4055static char *e (p, i)
4056 char **p;
4057 int i;
4058{
4059 return p[i];
4060}
4061static char *f (char * (*g) (char **, int), char **p, ...)
4062{
4063 char *s;
4064 va_list v;
4065 va_start (v,p);
4066 s = g (p, va_arg (v,int));
4067 va_end (v);
4068 return s;
4069}
4070
4071/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4072 function prototypes and stuff, but not '\xHH' hex character constants.
4073 These don't provoke an error unfortunately, instead are silently treated
4074 as 'x'. The following induces an error, until -std is added to get
4075 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4076 array size at least. It's necessary to write '\x00'==0 to get something
4077 that's true only with -std. */
4078int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4079
4080/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4081 inside strings and character constants. */
4082#define FOO(x) 'x'
4083int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4084
4085int test (int i, double x);
4086struct s1 {int (*f) (int a);};
4087struct s2 {int (*f) (double a);};
4088int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4089int argc;
4090char **argv;
503d2be0
AS
4091int
4092main ()
4093{
ca81d7a0 4094return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
503d2be0
AS
4095 ;
4096 return 0;
4097}
4098_ACEOF
ca81d7a0
JD
4099for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4100 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4101do
4102 CC="$ac_save_CC $ac_arg"
4103 rm -f conftest.$ac_objext
4104if { (ac_try="$ac_compile"
4105case "(($ac_try" in
4106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4107 *) ac_try_echo=$ac_try;;
4108esac
4109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4110 (eval "$ac_compile") 2>conftest.er1
503d2be0 4111 ac_status=$?
edfaf76d
LK
4112 grep -v '^ *+' conftest.er1 >conftest.err
4113 rm -f conftest.er1
4114 cat conftest.err >&5
c0d27fcc 4115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4116 (exit $ac_status); } && {
4117 test -z "$ac_c_werror_flag" ||
4118 test ! -s conftest.err
4119 } && test -s conftest.$ac_objext; then
ca81d7a0 4120 ac_cv_prog_cc_c89=$ac_arg
503d2be0
AS
4121else
4122 echo "$as_me: failed program was:" >&5
19650fd6
AS
4123sed 's/^/| /' conftest.$ac_ext >&5
4124
ca81d7a0 4125
503d2be0 4126fi
ca81d7a0
JD
4127
4128rm -f core conftest.err conftest.$ac_objext
4129 test "x$ac_cv_prog_cc_c89" != "xno" && break
503d2be0 4130done
ca81d7a0
JD
4131rm -f conftest.$ac_ext
4132CC=$ac_save_CC
4133
503d2be0 4134fi
ca81d7a0
JD
4135# AC_CACHE_VAL
4136case "x$ac_cv_prog_cc_c89" in
4137 x)
4138 { echo "$as_me:$LINENO: result: none needed" >&5
4139echo "${ECHO_T}none needed" >&6; } ;;
4140 xno)
4141 { echo "$as_me:$LINENO: result: unsupported" >&5
4142echo "${ECHO_T}unsupported" >&6; } ;;
4143 *)
4144 CC="$CC $ac_cv_prog_cc_c89"
4145 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
4146echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
4147esac
ba4481b5 4148
19650fd6 4149
503d2be0
AS
4150ac_ext=c
4151ac_cpp='$CPP $CPPFLAGS'
4152ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4153ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4154ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 4155
c0d27fcc 4156
ba4481b5
DL
4157# On Suns, sometimes $CPP names a directory.
4158if test -n "$CPP" && test -d "$CPP"; then
4159 CPP=
4160fi
4161
4162#### Some systems specify a CPP to use unless we are using GCC.
4163#### Now that we know whether we are using GCC, we can decide whether
4164#### to use that one.
4165if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
4166then
4167 CPP="$NON_GNU_CPP"
4168fi
4169
4170#### Some systems specify a CC to use unless we are using GCC.
4171#### Now that we know whether we are using GCC, we can decide whether
4172#### to use that one.
4173if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
4174 test x$cc_specified != xyes
4175then
4176 CC="$NON_GNU_CC"
4177fi
4178
4179if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
4180then
4181 CC="$CC $GCC_TEST_OPTIONS"
4182fi
4183
4184if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
4185then
4186 CC="$CC $NON_GCC_TEST_OPTIONS"
4187fi
4188
e143ad11
AS
4189
4190ac_ext=c
4191ac_cpp='$CPP $CPPFLAGS'
4192ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4193ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4194ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4195{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4196echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
4197# On Suns, sometimes $CPP names a directory.
4198if test -n "$CPP" && test -d "$CPP"; then
4199 CPP=
4200fi
4201if test -z "$CPP"; then
4202 if test "${ac_cv_prog_CPP+set}" = set; then
4203 echo $ECHO_N "(cached) $ECHO_C" >&6
4204else
4205 # Double quotes because CPP needs to be expanded
4206 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4207 do
4208 ac_preproc_ok=false
4209for ac_c_preproc_warn_flag in '' yes
4210do
4211 # Use a header file that comes with gcc, so configuring glibc
4212 # with a fresh cross-compiler works.
4213 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4214 # <limits.h> exists even on freestanding compilers.
4215 # On the NeXT, cc -E runs the code through the compiler's parser,
4216 # not just through cpp. "Syntax error" is here to catch this case.
4217 cat >conftest.$ac_ext <<_ACEOF
4218/* confdefs.h. */
4219_ACEOF
4220cat confdefs.h >>conftest.$ac_ext
4221cat >>conftest.$ac_ext <<_ACEOF
4222/* end confdefs.h. */
4223#ifdef __STDC__
4224# include <limits.h>
4225#else
4226# include <assert.h>
4227#endif
4228 Syntax error
4229_ACEOF
ca81d7a0
JD
4230if { (ac_try="$ac_cpp conftest.$ac_ext"
4231case "(($ac_try" in
4232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4233 *) ac_try_echo=$ac_try;;
4234esac
4235eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4236 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4237 ac_status=$?
4238 grep -v '^ *+' conftest.er1 >conftest.err
4239 rm -f conftest.er1
4240 cat conftest.err >&5
4241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4242 (exit $ac_status); } >/dev/null && {
4243 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4244 test ! -s conftest.err
4245 }; then
e143ad11
AS
4246 :
4247else
4248 echo "$as_me: failed program was:" >&5
4249sed 's/^/| /' conftest.$ac_ext >&5
4250
4251 # Broken: fails on valid input.
4252continue
4253fi
ca81d7a0 4254
e143ad11
AS
4255rm -f conftest.err conftest.$ac_ext
4256
ca81d7a0 4257 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4258 # can be detected and how.
4259 cat >conftest.$ac_ext <<_ACEOF
4260/* confdefs.h. */
4261_ACEOF
4262cat confdefs.h >>conftest.$ac_ext
4263cat >>conftest.$ac_ext <<_ACEOF
4264/* end confdefs.h. */
4265#include <ac_nonexistent.h>
4266_ACEOF
ca81d7a0
JD
4267if { (ac_try="$ac_cpp conftest.$ac_ext"
4268case "(($ac_try" in
4269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4270 *) ac_try_echo=$ac_try;;
4271esac
4272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4273 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4274 ac_status=$?
4275 grep -v '^ *+' conftest.er1 >conftest.err
4276 rm -f conftest.er1
4277 cat conftest.err >&5
4278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4279 (exit $ac_status); } >/dev/null && {
4280 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4281 test ! -s conftest.err
4282 }; then
e143ad11
AS
4283 # Broken: success on invalid input.
4284continue
4285else
4286 echo "$as_me: failed program was:" >&5
4287sed 's/^/| /' conftest.$ac_ext >&5
4288
4289 # Passes both tests.
4290ac_preproc_ok=:
4291break
4292fi
ca81d7a0 4293
e143ad11
AS
4294rm -f conftest.err conftest.$ac_ext
4295
4296done
4297# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4298rm -f conftest.err conftest.$ac_ext
4299if $ac_preproc_ok; then
4300 break
4301fi
4302
4303 done
4304 ac_cv_prog_CPP=$CPP
4305
4306fi
4307 CPP=$ac_cv_prog_CPP
4308else
4309 ac_cv_prog_CPP=$CPP
4310fi
ca81d7a0
JD
4311{ echo "$as_me:$LINENO: result: $CPP" >&5
4312echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
4313ac_preproc_ok=false
4314for ac_c_preproc_warn_flag in '' yes
4315do
4316 # Use a header file that comes with gcc, so configuring glibc
4317 # with a fresh cross-compiler works.
4318 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4319 # <limits.h> exists even on freestanding compilers.
4320 # On the NeXT, cc -E runs the code through the compiler's parser,
4321 # not just through cpp. "Syntax error" is here to catch this case.
4322 cat >conftest.$ac_ext <<_ACEOF
4323/* confdefs.h. */
4324_ACEOF
4325cat confdefs.h >>conftest.$ac_ext
4326cat >>conftest.$ac_ext <<_ACEOF
4327/* end confdefs.h. */
4328#ifdef __STDC__
4329# include <limits.h>
4330#else
4331# include <assert.h>
4332#endif
4333 Syntax error
4334_ACEOF
ca81d7a0
JD
4335if { (ac_try="$ac_cpp conftest.$ac_ext"
4336case "(($ac_try" in
4337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4338 *) ac_try_echo=$ac_try;;
4339esac
4340eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4341 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4342 ac_status=$?
4343 grep -v '^ *+' conftest.er1 >conftest.err
4344 rm -f conftest.er1
4345 cat conftest.err >&5
4346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4347 (exit $ac_status); } >/dev/null && {
4348 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4349 test ! -s conftest.err
4350 }; then
e143ad11
AS
4351 :
4352else
4353 echo "$as_me: failed program was:" >&5
4354sed 's/^/| /' conftest.$ac_ext >&5
4355
4356 # Broken: fails on valid input.
4357continue
4358fi
ca81d7a0 4359
e143ad11
AS
4360rm -f conftest.err conftest.$ac_ext
4361
ca81d7a0 4362 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4363 # can be detected and how.
4364 cat >conftest.$ac_ext <<_ACEOF
4365/* confdefs.h. */
4366_ACEOF
4367cat confdefs.h >>conftest.$ac_ext
4368cat >>conftest.$ac_ext <<_ACEOF
4369/* end confdefs.h. */
4370#include <ac_nonexistent.h>
4371_ACEOF
ca81d7a0
JD
4372if { (ac_try="$ac_cpp conftest.$ac_ext"
4373case "(($ac_try" in
4374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4375 *) ac_try_echo=$ac_try;;
4376esac
4377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4378 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4379 ac_status=$?
4380 grep -v '^ *+' conftest.er1 >conftest.err
4381 rm -f conftest.er1
4382 cat conftest.err >&5
4383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4384 (exit $ac_status); } >/dev/null && {
4385 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4386 test ! -s conftest.err
4387 }; then
e143ad11
AS
4388 # Broken: success on invalid input.
4389continue
4390else
4391 echo "$as_me: failed program was:" >&5
4392sed 's/^/| /' conftest.$ac_ext >&5
4393
4394 # Passes both tests.
4395ac_preproc_ok=:
4396break
4397fi
ca81d7a0 4398
e143ad11
AS
4399rm -f conftest.err conftest.$ac_ext
4400
4401done
4402# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4403rm -f conftest.err conftest.$ac_ext
4404if $ac_preproc_ok; then
4405 :
4406else
4407 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4408See \`config.log' for more details." >&5
4409echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4410See \`config.log' for more details." >&2;}
4411 { (exit 1); exit 1; }; }
4412fi
4413
4414ac_ext=c
4415ac_cpp='$CPP $CPPFLAGS'
4416ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4417ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4418ac_compiler_gnu=$ac_cv_c_compiler_gnu
4419
4420
ca81d7a0
JD
4421{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4422echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4423if test "${ac_cv_path_GREP+set}" = set; then
4424 echo $ECHO_N "(cached) $ECHO_C" >&6
4425else
4426 # Extract the first word of "grep ggrep" to use in msg output
4427if test -z "$GREP"; then
4428set dummy grep ggrep; ac_prog_name=$2
4429if test "${ac_cv_path_GREP+set}" = set; then
4430 echo $ECHO_N "(cached) $ECHO_C" >&6
4431else
4432 ac_path_GREP_found=false
4433# Loop through the user's path and test for each of PROGNAME-LIST
4434as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4435for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4436do
4437 IFS=$as_save_IFS
4438 test -z "$as_dir" && as_dir=.
4439 for ac_prog in grep ggrep; do
4440 for ac_exec_ext in '' $ac_executable_extensions; do
4441 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4442 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
ca81d7a0
JD
4443 # Check for GNU ac_path_GREP and select it if it is found.
4444 # Check for GNU $ac_path_GREP
4445case `"$ac_path_GREP" --version 2>&1` in
4446*GNU*)
4447 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4448*)
4449 ac_count=0
4450 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4451 while :
4452 do
4453 cat "conftest.in" "conftest.in" >"conftest.tmp"
4454 mv "conftest.tmp" "conftest.in"
4455 cp "conftest.in" "conftest.nl"
4456 echo 'GREP' >> "conftest.nl"
4457 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4458 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4459 ac_count=`expr $ac_count + 1`
4460 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4461 # Best one so far, save it but keep looking for a better one
4462 ac_cv_path_GREP="$ac_path_GREP"
4463 ac_path_GREP_max=$ac_count
4464 fi
4465 # 10*(2^10) chars as input seems more than enough
4466 test $ac_count -gt 10 && break
4467 done
4468 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4469esac
4470
4471
4472 $ac_path_GREP_found && break 3
4473 done
4474done
4475
4476done
4477IFS=$as_save_IFS
4478
4479
4480fi
4481
4482GREP="$ac_cv_path_GREP"
4483if test -z "$GREP"; then
4484 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4485echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4486 { (exit 1); exit 1; }; }
4487fi
4488
4489else
4490 ac_cv_path_GREP=$GREP
4491fi
4492
4493
4494fi
4495{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4496echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4497 GREP="$ac_cv_path_GREP"
4498
4499
4500{ echo "$as_me:$LINENO: checking for egrep" >&5
4501echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4502if test "${ac_cv_path_EGREP+set}" = set; then
8eeae1c9
JD
4503 echo $ECHO_N "(cached) $ECHO_C" >&6
4504else
ca81d7a0
JD
4505 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4506 then ac_cv_path_EGREP="$GREP -E"
4507 else
4508 # Extract the first word of "egrep" to use in msg output
4509if test -z "$EGREP"; then
4510set dummy egrep; ac_prog_name=$2
4511if test "${ac_cv_path_EGREP+set}" = set; then
4512 echo $ECHO_N "(cached) $ECHO_C" >&6
4513else
4514 ac_path_EGREP_found=false
4515# Loop through the user's path and test for each of PROGNAME-LIST
4516as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4517for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4518do
4519 IFS=$as_save_IFS
4520 test -z "$as_dir" && as_dir=.
4521 for ac_prog in egrep; do
4522 for ac_exec_ext in '' $ac_executable_extensions; do
4523 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4524 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
ca81d7a0
JD
4525 # Check for GNU ac_path_EGREP and select it if it is found.
4526 # Check for GNU $ac_path_EGREP
4527case `"$ac_path_EGREP" --version 2>&1` in
4528*GNU*)
4529 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4530*)
4531 ac_count=0
4532 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4533 while :
4534 do
4535 cat "conftest.in" "conftest.in" >"conftest.tmp"
4536 mv "conftest.tmp" "conftest.in"
4537 cp "conftest.in" "conftest.nl"
4538 echo 'EGREP' >> "conftest.nl"
4539 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4540 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4541 ac_count=`expr $ac_count + 1`
4542 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4543 # Best one so far, save it but keep looking for a better one
4544 ac_cv_path_EGREP="$ac_path_EGREP"
4545 ac_path_EGREP_max=$ac_count
e143ad11 4546 fi
ca81d7a0
JD
4547 # 10*(2^10) chars as input seems more than enough
4548 test $ac_count -gt 10 && break
4549 done
4550 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4551esac
4552
4553
4554 $ac_path_EGREP_found && break 3
4555 done
4556done
4557
4558done
4559IFS=$as_save_IFS
4560
4561
4562fi
4563
4564EGREP="$ac_cv_path_EGREP"
4565if test -z "$EGREP"; then
4566 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4567echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4568 { (exit 1); exit 1; }; }
4569fi
4570
4571else
4572 ac_cv_path_EGREP=$EGREP
4573fi
4574
4575
4576 fi
8eeae1c9 4577fi
ca81d7a0
JD
4578{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4579echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4580 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4581
4582
4583
ca81d7a0
JD
4584{ echo "$as_me:$LINENO: checking for AIX" >&5
4585echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4586cat >conftest.$ac_ext <<_ACEOF
4587/* confdefs.h. */
4588_ACEOF
4589cat confdefs.h >>conftest.$ac_ext
4590cat >>conftest.$ac_ext <<_ACEOF
4591/* end confdefs.h. */
4592#ifdef _AIX
4593 yes
4594#endif
4595
4596_ACEOF
4597if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4598 $EGREP "yes" >/dev/null 2>&1; then
ca81d7a0
JD
4599 { echo "$as_me:$LINENO: result: yes" >&5
4600echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4601cat >>confdefs.h <<\_ACEOF
4602#define _ALL_SOURCE 1
4603_ACEOF
4604
4605else
ca81d7a0
JD
4606 { echo "$as_me:$LINENO: result: no" >&5
4607echo "${ECHO_T}no" >&6; }
e143ad11
AS
4608fi
4609rm -f conftest*
4610
4611
4612
4613cat >>confdefs.h <<\_ACEOF
4614#define _GNU_SOURCE 1
4615_ACEOF
4616
4617
4618
01abe918 4619### Use -Wno-pointer-sign if the compiler supports it
ca81d7a0
JD
4620{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4621echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4622SAVE_CFLAGS="$CFLAGS"
4623CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4624cat >conftest.$ac_ext <<_ACEOF
4625/* confdefs.h. */
4626_ACEOF
4627cat confdefs.h >>conftest.$ac_ext
4628cat >>conftest.$ac_ext <<_ACEOF
4629/* end confdefs.h. */
4630
4631int
4632main ()
4633{
4634
4635 ;
4636 return 0;
4637}
4638_ACEOF
4639rm -f conftest.$ac_objext
ca81d7a0
JD
4640if { (ac_try="$ac_compile"
4641case "(($ac_try" in
4642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4643 *) ac_try_echo=$ac_try;;
4644esac
4645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4646 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4647 ac_status=$?
4648 grep -v '^ *+' conftest.er1 >conftest.err
4649 rm -f conftest.er1
4650 cat conftest.err >&5
4651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4652 (exit $ac_status); } && {
4653 test -z "$ac_c_werror_flag" ||
4654 test ! -s conftest.err
4655 } && test -s conftest.$ac_objext; then
01abe918
CY
4656 has_option=yes
4657else
4658 echo "$as_me: failed program was:" >&5
4659sed 's/^/| /' conftest.$ac_ext >&5
4660
ca81d7a0 4661 has_option=no
01abe918 4662fi
ca81d7a0
JD
4663
4664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4665if test $has_option = yes; then
4666 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4667fi
ca81d7a0
JD
4668{ echo "$as_me:$LINENO: result: $has_option" >&5
4669echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4670CFLAGS="$SAVE_CFLAGS"
4671unset has_option
4672unset SAVE_CFLAGS
4673
6a3a24fa 4674#### Some other nice autoconf tests.
ba4481b5 4675
ca81d7a0
JD
4676{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4677echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4678LN_S=$as_ln_s
4679if test "$LN_S" = "ln -s"; then
ca81d7a0
JD
4680 { echo "$as_me:$LINENO: result: yes" >&5
4681echo "${ECHO_T}yes" >&6; }
ba4481b5 4682else
ca81d7a0
JD
4683 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4684echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4685fi
4686
503d2be0
AS
4687ac_ext=c
4688ac_cpp='$CPP $CPPFLAGS'
4689ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4690ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4691ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4692{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4693echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4694# On Suns, sometimes $CPP names a directory.
4695if test -n "$CPP" && test -d "$CPP"; then
4696 CPP=
4697fi
4698if test -z "$CPP"; then
503d2be0
AS
4699 if test "${ac_cv_prog_CPP+set}" = set; then
4700 echo $ECHO_N "(cached) $ECHO_C" >&6
4701else
4702 # Double quotes because CPP needs to be expanded
4703 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4704 do
4705 ac_preproc_ok=false
4706for ac_c_preproc_warn_flag in '' yes
4707do
4708 # Use a header file that comes with gcc, so configuring glibc
4709 # with a fresh cross-compiler works.
19650fd6
AS
4710 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4711 # <limits.h> exists even on freestanding compilers.
ba4481b5 4712 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4713 # not just through cpp. "Syntax error" is here to catch this case.
4714 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4715/* confdefs.h. */
4716_ACEOF
4717cat confdefs.h >>conftest.$ac_ext
4718cat >>conftest.$ac_ext <<_ACEOF
4719/* end confdefs.h. */
4720#ifdef __STDC__
4721# include <limits.h>
4722#else
4723# include <assert.h>
4724#endif
edfaf76d 4725 Syntax error
503d2be0 4726_ACEOF
ca81d7a0
JD
4727if { (ac_try="$ac_cpp conftest.$ac_ext"
4728case "(($ac_try" in
4729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4730 *) ac_try_echo=$ac_try;;
4731esac
4732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4733 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4734 ac_status=$?
6bae0ccf 4735 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4736 rm -f conftest.er1
4737 cat conftest.err >&5
c0d27fcc 4738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4739 (exit $ac_status); } >/dev/null && {
4740 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4741 test ! -s conftest.err
4742 }; then
ba4481b5
DL
4743 :
4744else
503d2be0 4745 echo "$as_me: failed program was:" >&5
19650fd6
AS
4746sed 's/^/| /' conftest.$ac_ext >&5
4747
503d2be0
AS
4748 # Broken: fails on valid input.
4749continue
4750fi
ca81d7a0 4751
503d2be0
AS
4752rm -f conftest.err conftest.$ac_ext
4753
ca81d7a0 4754 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4755 # can be detected and how.
4756 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4757/* confdefs.h. */
4758_ACEOF
4759cat confdefs.h >>conftest.$ac_ext
4760cat >>conftest.$ac_ext <<_ACEOF
4761/* end confdefs.h. */
503d2be0
AS
4762#include <ac_nonexistent.h>
4763_ACEOF
ca81d7a0
JD
4764if { (ac_try="$ac_cpp conftest.$ac_ext"
4765case "(($ac_try" in
4766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4767 *) ac_try_echo=$ac_try;;
4768esac
4769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4770 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4771 ac_status=$?
6bae0ccf 4772 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4773 rm -f conftest.er1
4774 cat conftest.err >&5
c0d27fcc 4775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4776 (exit $ac_status); } >/dev/null && {
4777 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4778 test ! -s conftest.err
4779 }; then
503d2be0
AS
4780 # Broken: success on invalid input.
4781continue
c4bb2108 4782else
503d2be0 4783 echo "$as_me: failed program was:" >&5
19650fd6
AS
4784sed 's/^/| /' conftest.$ac_ext >&5
4785
503d2be0
AS
4786 # Passes both tests.
4787ac_preproc_ok=:
4788break
4789fi
ca81d7a0 4790
503d2be0
AS
4791rm -f conftest.err conftest.$ac_ext
4792
4793done
4794# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4795rm -f conftest.err conftest.$ac_ext
4796if $ac_preproc_ok; then
4797 break
4798fi
4799
4800 done
4801 ac_cv_prog_CPP=$CPP
4802
4803fi
4804 CPP=$ac_cv_prog_CPP
4805else
4806 ac_cv_prog_CPP=$CPP
4807fi
ca81d7a0
JD
4808{ echo "$as_me:$LINENO: result: $CPP" >&5
4809echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4810ac_preproc_ok=false
4811for ac_c_preproc_warn_flag in '' yes
4812do
4813 # Use a header file that comes with gcc, so configuring glibc
4814 # with a fresh cross-compiler works.
19650fd6
AS
4815 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4816 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4817 # On the NeXT, cc -E runs the code through the compiler's parser,
4818 # not just through cpp. "Syntax error" is here to catch this case.
4819 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4820/* confdefs.h. */
4821_ACEOF
4822cat confdefs.h >>conftest.$ac_ext
4823cat >>conftest.$ac_ext <<_ACEOF
4824/* end confdefs.h. */
4825#ifdef __STDC__
4826# include <limits.h>
4827#else
4828# include <assert.h>
4829#endif
edfaf76d 4830 Syntax error
503d2be0 4831_ACEOF
ca81d7a0
JD
4832if { (ac_try="$ac_cpp conftest.$ac_ext"
4833case "(($ac_try" in
4834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4835 *) ac_try_echo=$ac_try;;
4836esac
4837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4838 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4839 ac_status=$?
6bae0ccf 4840 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4841 rm -f conftest.er1
4842 cat conftest.err >&5
c0d27fcc 4843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4844 (exit $ac_status); } >/dev/null && {
4845 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4846 test ! -s conftest.err
4847 }; then
ba4481b5
DL
4848 :
4849else
503d2be0 4850 echo "$as_me: failed program was:" >&5
19650fd6
AS
4851sed 's/^/| /' conftest.$ac_ext >&5
4852
503d2be0
AS
4853 # Broken: fails on valid input.
4854continue
4855fi
ca81d7a0 4856
503d2be0
AS
4857rm -f conftest.err conftest.$ac_ext
4858
ca81d7a0 4859 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4860 # can be detected and how.
4861 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4862/* confdefs.h. */
4863_ACEOF
4864cat confdefs.h >>conftest.$ac_ext
4865cat >>conftest.$ac_ext <<_ACEOF
4866/* end confdefs.h. */
503d2be0
AS
4867#include <ac_nonexistent.h>
4868_ACEOF
ca81d7a0
JD
4869if { (ac_try="$ac_cpp conftest.$ac_ext"
4870case "(($ac_try" in
4871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4872 *) ac_try_echo=$ac_try;;
4873esac
4874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4875 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4876 ac_status=$?
6bae0ccf 4877 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4878 rm -f conftest.er1
4879 cat conftest.err >&5
c0d27fcc 4880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4881 (exit $ac_status); } >/dev/null && {
4882 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4883 test ! -s conftest.err
4884 }; then
503d2be0
AS
4885 # Broken: success on invalid input.
4886continue
4887else
4888 echo "$as_me: failed program was:" >&5
19650fd6
AS
4889sed 's/^/| /' conftest.$ac_ext >&5
4890
503d2be0
AS
4891 # Passes both tests.
4892ac_preproc_ok=:
4893break
ba4481b5 4894fi
ca81d7a0 4895
503d2be0
AS
4896rm -f conftest.err conftest.$ac_ext
4897
4898done
4899# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4900rm -f conftest.err conftest.$ac_ext
4901if $ac_preproc_ok; then
4902 :
ba4481b5 4903else
19650fd6
AS
4904 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4905See \`config.log' for more details." >&5
4906echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4907See \`config.log' for more details." >&2;}
503d2be0 4908 { (exit 1); exit 1; }; }
ba4481b5 4909fi
503d2be0
AS
4910
4911ac_ext=c
4912ac_cpp='$CPP $CPPFLAGS'
4913ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4914ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4915ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4916
4917# Find a good install program. We prefer a C program (faster),
4918# so one script is as good as another. But avoid the broken or
4919# incompatible versions:
4920# SysV /etc/install, /usr/sbin/install
4921# SunOS /usr/etc/install
4922# IRIX /sbin/install
4923# AIX /bin/install
503d2be0 4924# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4925# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4926# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4927# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4928# OS/2's system install, which has a completely different semantic
ba4481b5 4929# ./install, which can be erroneously created by make from ./install.sh.
ca81d7a0
JD
4930{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4931echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 4932if test -z "$INSTALL"; then
503d2be0
AS
4933if test "${ac_cv_path_install+set}" = set; then
4934 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4935else
c0d27fcc
MR
4936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4937for as_dir in $PATH
4938do
4939 IFS=$as_save_IFS
4940 test -z "$as_dir" && as_dir=.
4941 # Account for people who put trailing slashes in PATH elements.
4942case $as_dir/ in
4943 ./ | .// | /cC/* | \
4944 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4945 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4946 /usr/ucb/* ) ;;
4947 *)
4948 # OSF1 and SCO ODT 3.0 have their own names for install.
4949 # Don't use installbsd from OSF since it installs stuff as root
4950 # by default.
4951 for ac_prog in ginstall scoinst install; do
4952 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4953 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4954 if test $ac_prog = install &&
4955 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4956 # AIX install. It has an incompatible calling convention.
4957 :
4958 elif test $ac_prog = install &&
4959 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4960 # program-specific install script used by HP pwplus--don't use.
4961 :
4962 else
4963 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4964 break 3
4965 fi
4966 fi
ba4481b5 4967 done
c0d27fcc
MR
4968 done
4969 ;;
4970esac
4971done
ca81d7a0 4972IFS=$as_save_IFS
c0d27fcc 4973
ba4481b5
DL
4974
4975fi
4976 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4977 INSTALL=$ac_cv_path_install
ba4481b5 4978 else
ca81d7a0
JD
4979 # As a last resort, use the slow shell script. Don't cache a
4980 # value for INSTALL within a source directory, because that will
ba4481b5 4981 # break other packages using the cache if that directory is
ca81d7a0 4982 # removed, or if the value is a relative name.
503d2be0 4983 INSTALL=$ac_install_sh
ba4481b5
DL
4984 fi
4985fi
ca81d7a0
JD
4986{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4987echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
4988
4989# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4990# It thinks the first close brace ends the variable substitution.
4991test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4992
503d2be0 4993test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 4994
ba4481b5
DL
4995test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4996
c0d27fcc
MR
4997if test "x$RANLIB" = x; then
4998 if test -n "$ac_tool_prefix"; then
4999 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5000set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ca81d7a0
JD
5001{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5002echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 5003if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 5004 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
5005else
5006 if test -n "$RANLIB"; then
5007 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5008else
c0d27fcc
MR
5009as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5010for as_dir in $PATH
5011do
5012 IFS=$as_save_IFS
5013 test -z "$as_dir" && as_dir=.
5014 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5015 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5016 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5017 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5018 break 2
5019 fi
5020done
503d2be0 5021done
ca81d7a0 5022IFS=$as_save_IFS
503d2be0 5023
7397acc4
DL
5024fi
5025fi
503d2be0 5026RANLIB=$ac_cv_prog_RANLIB
7397acc4 5027if test -n "$RANLIB"; then
ca81d7a0
JD
5028 { echo "$as_me:$LINENO: result: $RANLIB" >&5
5029echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 5030else
ca81d7a0
JD
5031 { echo "$as_me:$LINENO: result: no" >&5
5032echo "${ECHO_T}no" >&6; }
503d2be0
AS
5033fi
5034
ca81d7a0 5035
503d2be0
AS
5036fi
5037if test -z "$ac_cv_prog_RANLIB"; then
5038 ac_ct_RANLIB=$RANLIB
5039 # Extract the first word of "ranlib", so it can be a program name with args.
5040set dummy ranlib; ac_word=$2
ca81d7a0
JD
5041{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5042echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
5043if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5044 echo $ECHO_N "(cached) $ECHO_C" >&6
5045else
5046 if test -n "$ac_ct_RANLIB"; then
5047 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5048else
c0d27fcc
MR
5049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5050for as_dir in $PATH
5051do
5052 IFS=$as_save_IFS
5053 test -z "$as_dir" && as_dir=.
5054 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5055 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
5056 ac_cv_prog_ac_ct_RANLIB="ranlib"
5057 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5058 break 2
5059 fi
5060done
503d2be0 5061done
ca81d7a0 5062IFS=$as_save_IFS
503d2be0 5063
503d2be0
AS
5064fi
5065fi
5066ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5067if test -n "$ac_ct_RANLIB"; then
ca81d7a0
JD
5068 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
5069echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 5070else
ca81d7a0
JD
5071 { echo "$as_me:$LINENO: result: no" >&5
5072echo "${ECHO_T}no" >&6; }
503d2be0
AS
5073fi
5074
ca81d7a0
JD
5075 if test "x$ac_ct_RANLIB" = x; then
5076 RANLIB=":"
5077 else
5078 case $cross_compiling:$ac_tool_warned in
5079yes:)
5080{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
5081whose name does not start with the host triplet. If you think this
5082configuration is useful to you, please write to autoconf@gnu.org." >&5
5083echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
5084whose name does not start with the host triplet. If you think this
5085configuration is useful to you, please write to autoconf@gnu.org." >&2;}
5086ac_tool_warned=yes ;;
5087esac
5088 RANLIB=$ac_ct_RANLIB
5089 fi
7397acc4 5090else
503d2be0 5091 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
5092fi
5093
5094fi
9e71690e
DK
5095# Extract the first word of "install-info", so it can be a program name with args.
5096set dummy install-info; ac_word=$2
ca81d7a0
JD
5097{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5098echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5099if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5100 echo $ECHO_N "(cached) $ECHO_C" >&6
5101else
5102 case $INSTALL_INFO in
5103 [\\/]* | ?:[\\/]*)
5104 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5105 ;;
5106 *)
5107 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5108for as_dir in $PATH
5109do
5110 IFS=$as_save_IFS
5111 test -z "$as_dir" && as_dir=.
5112 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5113 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5114 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5115 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5116 break 2
5117 fi
5118done
5119done
ca81d7a0 5120IFS=$as_save_IFS
9e71690e
DK
5121
5122 ;;
5123esac
5124fi
5125INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5126if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5127 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5128echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5129else
ca81d7a0
JD
5130 { echo "$as_me:$LINENO: result: no" >&5
5131echo "${ECHO_T}no" >&6; }
9e71690e
DK
5132fi
5133
ca81d7a0 5134
9e71690e
DK
5135# Extract the first word of "install-info", so it can be a program name with args.
5136set dummy install-info; ac_word=$2
ca81d7a0
JD
5137{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5138echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5139if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5140 echo $ECHO_N "(cached) $ECHO_C" >&6
5141else
5142 case $INSTALL_INFO in
5143 [\\/]* | ?:[\\/]*)
5144 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5145 ;;
5146 *)
5147 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5148for as_dir in /usr/sbin
5149do
5150 IFS=$as_save_IFS
5151 test -z "$as_dir" && as_dir=.
5152 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5153 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5154 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5155 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5156 break 2
5157 fi
5158done
5159done
ca81d7a0 5160IFS=$as_save_IFS
9e71690e
DK
5161
5162 ;;
5163esac
5164fi
5165INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5166if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5167 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5168echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5169else
ca81d7a0
JD
5170 { echo "$as_me:$LINENO: result: no" >&5
5171echo "${ECHO_T}no" >&6; }
9e71690e
DK
5172fi
5173
ca81d7a0 5174
9e71690e
DK
5175# Extract the first word of "install-info", so it can be a program name with args.
5176set dummy install-info; ac_word=$2
ca81d7a0
JD
5177{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5178echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
5179if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
5180 echo $ECHO_N "(cached) $ECHO_C" >&6
5181else
5182 case $INSTALL_INFO in
5183 [\\/]* | ?:[\\/]*)
5184 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
5185 ;;
5186 *)
5187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5188for as_dir in /sbin
5189do
5190 IFS=$as_save_IFS
5191 test -z "$as_dir" && as_dir=.
5192 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5193 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
5194 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
5195 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5196 break 2
5197 fi
5198done
5199done
ca81d7a0 5200IFS=$as_save_IFS
9e71690e
DK
5201
5202 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
5203 ;;
5204esac
5205fi
5206INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 5207if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
5208 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
5209echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 5210else
ca81d7a0
JD
5211 { echo "$as_me:$LINENO: result: no" >&5
5212echo "${ECHO_T}no" >&6; }
9e71690e
DK
5213fi
5214
ca81d7a0 5215
8ae52ca6
RF
5216# Extract the first word of "gzip", so it can be a program name with args.
5217set dummy gzip; ac_word=$2
ca81d7a0
JD
5218{ echo "$as_me:$LINENO: checking for $ac_word" >&5
5219echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 5220if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
5221 echo $ECHO_N "(cached) $ECHO_C" >&6
5222else
46e35e9f 5223 case $GZIP_PROG in
8ae52ca6 5224 [\\/]* | ?:[\\/]*)
46e35e9f 5225 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
5226 ;;
5227 *)
5228 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5229for as_dir in $PATH
5230do
5231 IFS=$as_save_IFS
5232 test -z "$as_dir" && as_dir=.
5233 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 5234 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 5235 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
5236 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
5237 break 2
5238 fi
5239done
5240done
ca81d7a0 5241IFS=$as_save_IFS
8ae52ca6
RF
5242
5243 ;;
5244esac
5245fi
46e35e9f 5246GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 5247if test -n "$GZIP_PROG"; then
ca81d7a0
JD
5248 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
5249echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 5250else
ca81d7a0
JD
5251 { echo "$as_me:$LINENO: result: no" >&5
5252echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
5253fi
5254
ba4481b5 5255
c0d27fcc 5256
ca81d7a0 5257
8e967cf7
MR
5258if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5259then
5260 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5261fi
5262
5263if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5264then
5265 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5266fi
5267
c0d27fcc 5268
fe239f0f 5269late_LDFLAGS=$LDFLAGS
4af002d6 5270if test "$GCC" = yes; then
fe239f0f
AS
5271 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5272else
5273 LDFLAGS="$LDFLAGS -znocombreloc"
5274fi
5275
ca81d7a0
JD
5276{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5277echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5278cat >conftest.$ac_ext <<_ACEOF
5279main(){return 0;}
5280_ACEOF
5281rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5282if { (ac_try="$ac_link"
5283case "(($ac_try" in
5284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5285 *) ac_try_echo=$ac_try;;
5286esac
5287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5288 (eval "$ac_link") 2>conftest.er1
fe239f0f 5289 ac_status=$?
edfaf76d
LK
5290 grep -v '^ *+' conftest.er1 >conftest.err
5291 rm -f conftest.er1
5292 cat conftest.err >&5
fe239f0f 5293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5294 (exit $ac_status); } && {
5295 test -z "$ac_c_werror_flag" ||
5296 test ! -s conftest.err
5297 } && test -s conftest$ac_exeext &&
5298 $as_test_x conftest$ac_exeext; then
ca81d7a0
JD
5299 { echo "$as_me:$LINENO: result: yes" >&5
5300echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5301else
5302 echo "$as_me: failed program was:" >&5
5303sed 's/^/| /' conftest.$ac_ext >&5
5304
ca81d7a0
JD
5305 LDFLAGS=$late_LDFLAGS
5306 { echo "$as_me:$LINENO: result: no" >&5
5307echo "${ECHO_T}no" >&6; }
fe239f0f 5308fi
ca81d7a0 5309
f053c89f 5310rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5311 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5312
3b33a005
DL
5313#### Extract some information from the operating system and machine files.
5314
c0d27fcc 5315{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5316 - which libraries the lib-src programs will want, and
503d2be0
AS
5317 - whether the GNU malloc routines are usable..." >&5
5318echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5319 - which libraries the lib-src programs will want, and
503d2be0 5320 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5321
5322### First figure out CFLAGS (which we use for running the compiler here)
5323### and REAL_CFLAGS (which we use for real compilation).
5324### The two are the same except on a few systems, where they are made
5325### different to work around various lossages. For example,
5326### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5327### as implying static linking.
5328
5329### If the CFLAGS env var is specified, we use that value
5330### instead of the default.
5331
5332### It's not important that this name contain the PID; you can't run
5333### two configures in the same directory and have anything work
5334### anyway.
5335tempcname="conftest.c"
5336
5337echo '
5338#include "'${srcdir}'/src/'${opsysfile}'"
5339#include "'${srcdir}'/src/'${machfile}'"
5340#ifndef LIBS_MACHINE
5341#define LIBS_MACHINE
5342#endif
5343#ifndef LIBS_SYSTEM
5344#define LIBS_SYSTEM
5345#endif
5346#ifndef C_SWITCH_SYSTEM
5347#define C_SWITCH_SYSTEM
5348#endif
5349#ifndef C_SWITCH_MACHINE
5350#define C_SWITCH_MACHINE
5351#endif
5352configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5353configure___ c_switch_system=C_SWITCH_SYSTEM
5354configure___ c_switch_machine=C_SWITCH_MACHINE
5355
5356#ifndef LIB_X11_LIB
5357#define LIB_X11_LIB -lX11
5358#endif
5359
5360#ifndef LIBX11_MACHINE
5361#define LIBX11_MACHINE
5362#endif
5363
5364#ifndef LIBX11_SYSTEM
5365#define LIBX11_SYSTEM
5366#endif
5367configure___ LIBX=LIB_X11_LIB LIBX11_MACHINE LIBX11_SYSTEM
5368
5369#ifdef UNEXEC
5370configure___ unexec=UNEXEC
5371#else
5372configure___ unexec=unexec.o
5373#endif
5374
5375#ifdef SYSTEM_MALLOC
5376configure___ system_malloc=yes
5377#else
5378configure___ system_malloc=no
5379#endif
5380
ef9e4345
GM
5381#ifdef USE_MMAP_FOR_BUFFERS
5382configure___ use_mmap_for_buffers=yes
73b77ee5 5383#else
ef9e4345 5384configure___ use_mmap_for_buffers=no
73b77ee5
GM
5385#endif
5386
3b33a005
DL
5387#ifndef C_DEBUG_SWITCH
5388#define C_DEBUG_SWITCH -g
5389#endif
5390
5391#ifndef C_OPTIMIZE_SWITCH
5392#ifdef __GNUC__
5393#define C_OPTIMIZE_SWITCH -O2
5394#else
5395#define C_OPTIMIZE_SWITCH -O
5396#endif
5397#endif
5398
01abe918
CY
5399#ifndef C_WARNINGS_SWITCH
5400#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5401#endif
5402
3b33a005
DL
5403#ifndef LD_SWITCH_MACHINE
5404#define LD_SWITCH_MACHINE
5405#endif
5406
5407#ifndef LD_SWITCH_SYSTEM
5408#define LD_SWITCH_SYSTEM
5409#endif
5410
5411#ifndef LD_SWITCH_X_SITE_AUX
5412#define LD_SWITCH_X_SITE_AUX
503d2be0 5413#endif
3b33a005
DL
5414
5415configure___ ld_switch_system=LD_SWITCH_SYSTEM
5416configure___ ld_switch_machine=LD_SWITCH_MACHINE
5417
5418#ifdef THIS_IS_CONFIGURE
5419
5420/* Get the CFLAGS for tests in configure. */
5421#ifdef __GNUC__
5422configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5423#else
5424configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5425#endif
5426
5427#else /* not THIS_IS_CONFIGURE */
5428
5429/* Get the CFLAGS for real compilation. */
5430#ifdef __GNUC__
01abe918 5431configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5432#else
5433configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5434#endif
5435
5436#endif /* not THIS_IS_CONFIGURE */
5437' > ${tempcname}
5438
5439# The value of CPP is a quoted variable reference, so we need to do this
5440# to get its actual value...
5441CPP=`eval "echo $CPP"`
5442eval `${CPP} -Isrc ${tempcname} \
5443 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5444if test "x$SPECIFIED_CFLAGS" = x; then
5445 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5446 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5447else
5448 REAL_CFLAGS="$CFLAGS"
5449fi
5450rm ${tempcname}
5451
5452ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5453
5454### Make sure subsequent tests use flags consistent with the build flags.
5455
5456if test x"${OVERRIDE_CPPFLAGS}" != x; then
5457 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5458else
5459 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5460fi
5461
6bae0ccf
DL
5462
5463
ca81d7a0 5464# Check whether --enable-largefile was given.
f4988be7 5465if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5466 enableval=$enable_largefile;
5467fi
f4988be7 5468
503d2be0 5469if test "$enable_largefile" != no; then
f4988be7 5470
ca81d7a0
JD
5471 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5472echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5473if test "${ac_cv_sys_largefile_CC+set}" = set; then
5474 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5475else
f4988be7 5476 ac_cv_sys_largefile_CC=no
503d2be0
AS
5477 if test "$GCC" != yes; then
5478 ac_save_CC=$CC
5479 while :; do
ca81d7a0
JD
5480 # IRIX 6.2 and later do not support large files by default,
5481 # so use the C compiler's -n32 option if that helps.
edfaf76d 5482 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5483/* confdefs.h. */
5484_ACEOF
5485cat confdefs.h >>conftest.$ac_ext
5486cat >>conftest.$ac_ext <<_ACEOF
5487/* end confdefs.h. */
f4988be7 5488#include <sys/types.h>
503d2be0
AS
5489 /* Check that off_t can represent 2**63 - 1 correctly.
5490 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5491 since some C++ compilers masquerading as C compilers
5492 incorrectly reject 9223372036854775807. */
5493#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5494 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5495 && LARGE_OFF_T % 2147483647 == 1)
5496 ? 1 : -1];
5497int
5498main ()
5499{
f4988be7 5500
503d2be0
AS
5501 ;
5502 return 0;
5503}
5504_ACEOF
ca81d7a0
JD
5505 rm -f conftest.$ac_objext
5506if { (ac_try="$ac_compile"
5507case "(($ac_try" in
5508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5509 *) ac_try_echo=$ac_try;;
5510esac
5511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5512 (eval "$ac_compile") 2>conftest.er1
503d2be0 5513 ac_status=$?
edfaf76d
LK
5514 grep -v '^ *+' conftest.er1 >conftest.err
5515 rm -f conftest.er1
5516 cat conftest.err >&5
c0d27fcc 5517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5518 (exit $ac_status); } && {
5519 test -z "$ac_c_werror_flag" ||
5520 test ! -s conftest.err
5521 } && test -s conftest.$ac_objext; then
503d2be0 5522 break
b192d653 5523else
503d2be0 5524 echo "$as_me: failed program was:" >&5
19650fd6
AS
5525sed 's/^/| /' conftest.$ac_ext >&5
5526
ca81d7a0 5527
503d2be0 5528fi
ca81d7a0
JD
5529
5530rm -f core conftest.err conftest.$ac_objext
5531 CC="$CC -n32"
5532 rm -f conftest.$ac_objext
5533if { (ac_try="$ac_compile"
5534case "(($ac_try" in
5535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5536 *) ac_try_echo=$ac_try;;
5537esac
5538eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5539 (eval "$ac_compile") 2>conftest.er1
503d2be0 5540 ac_status=$?
edfaf76d
LK
5541 grep -v '^ *+' conftest.er1 >conftest.err
5542 rm -f conftest.er1
5543 cat conftest.err >&5
c0d27fcc 5544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5545 (exit $ac_status); } && {
5546 test -z "$ac_c_werror_flag" ||
5547 test ! -s conftest.err
5548 } && test -s conftest.$ac_objext; then
503d2be0
AS
5549 ac_cv_sys_largefile_CC=' -n32'; break
5550else
5551 echo "$as_me: failed program was:" >&5
19650fd6
AS
5552sed 's/^/| /' conftest.$ac_ext >&5
5553
ca81d7a0 5554
503d2be0 5555fi
ca81d7a0
JD
5556
5557rm -f core conftest.err conftest.$ac_objext
edfaf76d 5558 break
503d2be0
AS
5559 done
5560 CC=$ac_save_CC
5561 rm -f conftest.$ac_ext
5562 fi
b192d653 5563fi
ca81d7a0
JD
5564{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5565echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5566 if test "$ac_cv_sys_largefile_CC" != no; then
5567 CC=$CC$ac_cv_sys_largefile_CC
5568 fi
b192d653 5569
ca81d7a0
JD
5570 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5571echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5572if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5573 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5574else
503d2be0 5575 while :; do
503d2be0 5576 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5577/* confdefs.h. */
5578_ACEOF
5579cat confdefs.h >>conftest.$ac_ext
5580cat >>conftest.$ac_ext <<_ACEOF
5581/* end confdefs.h. */
f4988be7 5582#include <sys/types.h>
503d2be0
AS
5583 /* Check that off_t can represent 2**63 - 1 correctly.
5584 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5585 since some C++ compilers masquerading as C compilers
5586 incorrectly reject 9223372036854775807. */
5587#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5588 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5589 && LARGE_OFF_T % 2147483647 == 1)
5590 ? 1 : -1];
5591int
5592main ()
5593{
f4988be7 5594
503d2be0
AS
5595 ;
5596 return 0;
5597}
5598_ACEOF
5599rm -f conftest.$ac_objext
ca81d7a0
JD
5600if { (ac_try="$ac_compile"
5601case "(($ac_try" in
5602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5603 *) ac_try_echo=$ac_try;;
5604esac
5605eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5606 (eval "$ac_compile") 2>conftest.er1
503d2be0 5607 ac_status=$?
edfaf76d
LK
5608 grep -v '^ *+' conftest.er1 >conftest.err
5609 rm -f conftest.er1
5610 cat conftest.err >&5
c0d27fcc 5611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5612 (exit $ac_status); } && {
5613 test -z "$ac_c_werror_flag" ||
5614 test ! -s conftest.err
5615 } && test -s conftest.$ac_objext; then
5616 ac_cv_sys_file_offset_bits=no; break
f4988be7 5617else
503d2be0 5618 echo "$as_me: failed program was:" >&5
19650fd6
AS
5619sed 's/^/| /' conftest.$ac_ext >&5
5620
ca81d7a0 5621
503d2be0 5622fi
ca81d7a0
JD
5623
5624rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5625 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5626/* confdefs.h. */
5627_ACEOF
5628cat confdefs.h >>conftest.$ac_ext
5629cat >>conftest.$ac_ext <<_ACEOF
5630/* end confdefs.h. */
f4988be7
GM
5631#define _FILE_OFFSET_BITS 64
5632#include <sys/types.h>
503d2be0
AS
5633 /* Check that off_t can represent 2**63 - 1 correctly.
5634 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5635 since some C++ compilers masquerading as C compilers
5636 incorrectly reject 9223372036854775807. */
5637#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5638 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5639 && LARGE_OFF_T % 2147483647 == 1)
5640 ? 1 : -1];
5641int
5642main ()
5643{
5644
5645 ;
5646 return 0;
5647}
5648_ACEOF
5649rm -f conftest.$ac_objext
ca81d7a0
JD
5650if { (ac_try="$ac_compile"
5651case "(($ac_try" in
5652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5653 *) ac_try_echo=$ac_try;;
5654esac
5655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5656 (eval "$ac_compile") 2>conftest.er1
503d2be0 5657 ac_status=$?
edfaf76d
LK
5658 grep -v '^ *+' conftest.er1 >conftest.err
5659 rm -f conftest.er1
5660 cat conftest.err >&5
c0d27fcc 5661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5662 (exit $ac_status); } && {
5663 test -z "$ac_c_werror_flag" ||
5664 test ! -s conftest.err
5665 } && test -s conftest.$ac_objext; then
503d2be0
AS
5666 ac_cv_sys_file_offset_bits=64; break
5667else
5668 echo "$as_me: failed program was:" >&5
19650fd6
AS
5669sed 's/^/| /' conftest.$ac_ext >&5
5670
ca81d7a0 5671
503d2be0 5672fi
ca81d7a0
JD
5673
5674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5675 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5676 break
5677done
ba4481b5 5678fi
ca81d7a0
JD
5679{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5680echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5681case $ac_cv_sys_file_offset_bits in #(
5682 no | unknown) ;;
5683 *)
c0d27fcc 5684cat >>confdefs.h <<_ACEOF
f4988be7 5685#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5686_ACEOF
f053c89f
CY
5687;;
5688esac
503d2be0 5689rm -f conftest*
f053c89f
CY
5690 if test $ac_cv_sys_file_offset_bits = unknown; then
5691 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
ca81d7a0 5692echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5693if test "${ac_cv_sys_large_files+set}" = set; then
5694 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5695else
503d2be0 5696 while :; do
503d2be0 5697 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5698/* confdefs.h. */
5699_ACEOF
5700cat confdefs.h >>conftest.$ac_ext
5701cat >>conftest.$ac_ext <<_ACEOF
5702/* end confdefs.h. */
503d2be0
AS
5703#include <sys/types.h>
5704 /* Check that off_t can represent 2**63 - 1 correctly.
5705 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5706 since some C++ compilers masquerading as C compilers
5707 incorrectly reject 9223372036854775807. */
5708#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5709 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5710 && LARGE_OFF_T % 2147483647 == 1)
5711 ? 1 : -1];
5712int
5713main ()
5714{
ba4481b5 5715
503d2be0
AS
5716 ;
5717 return 0;
5718}
5719_ACEOF
5720rm -f conftest.$ac_objext
ca81d7a0
JD
5721if { (ac_try="$ac_compile"
5722case "(($ac_try" in
5723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5724 *) ac_try_echo=$ac_try;;
5725esac
5726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5727 (eval "$ac_compile") 2>conftest.er1
503d2be0 5728 ac_status=$?
edfaf76d
LK
5729 grep -v '^ *+' conftest.er1 >conftest.err
5730 rm -f conftest.er1
5731 cat conftest.err >&5
c0d27fcc 5732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5733 (exit $ac_status); } && {
5734 test -z "$ac_c_werror_flag" ||
5735 test ! -s conftest.err
5736 } && test -s conftest.$ac_objext; then
5737 ac_cv_sys_large_files=no; break
ba4481b5 5738else
503d2be0 5739 echo "$as_me: failed program was:" >&5
19650fd6
AS
5740sed 's/^/| /' conftest.$ac_ext >&5
5741
ca81d7a0 5742
503d2be0 5743fi
ca81d7a0
JD
5744
5745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5746 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5747/* confdefs.h. */
5748_ACEOF
5749cat confdefs.h >>conftest.$ac_ext
5750cat >>conftest.$ac_ext <<_ACEOF
5751/* end confdefs.h. */
f4988be7 5752#define _LARGE_FILES 1
503d2be0
AS
5753#include <sys/types.h>
5754 /* Check that off_t can represent 2**63 - 1 correctly.
5755 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5756 since some C++ compilers masquerading as C compilers
5757 incorrectly reject 9223372036854775807. */
5758#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5759 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5760 && LARGE_OFF_T % 2147483647 == 1)
5761 ? 1 : -1];
5762int
5763main ()
5764{
f4988be7 5765
503d2be0
AS
5766 ;
5767 return 0;
5768}
5769_ACEOF
5770rm -f conftest.$ac_objext
ca81d7a0
JD
5771if { (ac_try="$ac_compile"
5772case "(($ac_try" in
5773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5774 *) ac_try_echo=$ac_try;;
5775esac
5776eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5777 (eval "$ac_compile") 2>conftest.er1
503d2be0 5778 ac_status=$?
edfaf76d
LK
5779 grep -v '^ *+' conftest.er1 >conftest.err
5780 rm -f conftest.er1
5781 cat conftest.err >&5
c0d27fcc 5782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5783 (exit $ac_status); } && {
5784 test -z "$ac_c_werror_flag" ||
5785 test ! -s conftest.err
5786 } && test -s conftest.$ac_objext; then
503d2be0
AS
5787 ac_cv_sys_large_files=1; break
5788else
5789 echo "$as_me: failed program was:" >&5
19650fd6
AS
5790sed 's/^/| /' conftest.$ac_ext >&5
5791
ca81d7a0 5792
503d2be0 5793fi
ca81d7a0
JD
5794
5795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5796 ac_cv_sys_large_files=unknown
503d2be0
AS
5797 break
5798done
ba4481b5 5799fi
ca81d7a0
JD
5800{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5801echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5802case $ac_cv_sys_large_files in #(
5803 no | unknown) ;;
5804 *)
c0d27fcc 5805cat >>confdefs.h <<_ACEOF
f4988be7 5806#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5807_ACEOF
f053c89f
CY
5808;;
5809esac
503d2be0 5810rm -f conftest*
f053c89f 5811 fi
503d2be0 5812fi
ba4481b5 5813
c0d27fcc 5814
439f58ee 5815
bc5d9888
CY
5816### The standard library on x86-64 GNU/Linux distributions can
5817### be located in either /usr/lib64 or /usr/lib.
5818case "${canonical}" in
5819 x86_64-*-linux-gnu* )
5820 if test -d /usr/lib64; then
5821
5822cat >>confdefs.h <<\_ACEOF
5823#define HAVE_X86_64_LIB64_DIR 1
5824_ACEOF
5825
5826fi
5827esac
5828
439f58ee
JD
5829
5830
5831
2c9dccc9
PJ
5832if test "${with_sound}" != "no"; then
5833 # Sound support for GNU/Linux and the free BSDs.
ca81d7a0
JD
5834 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5835echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
c0d27fcc
MR
5836if test "${ac_cv_header_stdc+set}" = set; then
5837 echo $ECHO_N "(cached) $ECHO_C" >&6
5838else
5839 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5840/* confdefs.h. */
5841_ACEOF
5842cat confdefs.h >>conftest.$ac_ext
5843cat >>conftest.$ac_ext <<_ACEOF
5844/* end confdefs.h. */
c0d27fcc
MR
5845#include <stdlib.h>
5846#include <stdarg.h>
5847#include <string.h>
5848#include <float.h>
98418dba 5849
19650fd6
AS
5850int
5851main ()
5852{
5853
5854 ;
5855 return 0;
5856}
c0d27fcc 5857_ACEOF
19650fd6 5858rm -f conftest.$ac_objext
ca81d7a0
JD
5859if { (ac_try="$ac_compile"
5860case "(($ac_try" in
5861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5862 *) ac_try_echo=$ac_try;;
5863esac
5864eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5865 (eval "$ac_compile") 2>conftest.er1
cd958eb3 5866 ac_status=$?
edfaf76d
LK
5867 grep -v '^ *+' conftest.er1 >conftest.err
5868 rm -f conftest.er1
5869 cat conftest.err >&5
cd958eb3 5870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5871 (exit $ac_status); } && {
5872 test -z "$ac_c_werror_flag" ||
5873 test ! -s conftest.err
5874 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5875 ac_cv_header_stdc=yes
5876else
5877 echo "$as_me: failed program was:" >&5
19650fd6
AS
5878sed 's/^/| /' conftest.$ac_ext >&5
5879
ca81d7a0 5880 ac_cv_header_stdc=no
c0d27fcc 5881fi
ca81d7a0
JD
5882
5883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5884
5885if test $ac_cv_header_stdc = yes; then
5886 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5887 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5888/* confdefs.h. */
5889_ACEOF
5890cat confdefs.h >>conftest.$ac_ext
5891cat >>conftest.$ac_ext <<_ACEOF
5892/* end confdefs.h. */
c0d27fcc
MR
5893#include <string.h>
5894
5895_ACEOF
5896if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5897 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
5898 :
5899else
5900 ac_cv_header_stdc=no
5901fi
5902rm -f conftest*
5903
5904fi
5905
5906if test $ac_cv_header_stdc = yes; then
5907 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5908 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5909/* confdefs.h. */
5910_ACEOF
5911cat confdefs.h >>conftest.$ac_ext
5912cat >>conftest.$ac_ext <<_ACEOF
5913/* end confdefs.h. */
c0d27fcc
MR
5914#include <stdlib.h>
5915
5916_ACEOF
5917if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5918 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
5919 :
5920else
5921 ac_cv_header_stdc=no
5922fi
5923rm -f conftest*
5924
5925fi
5926
5927if test $ac_cv_header_stdc = yes; then
5928 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5929 if test "$cross_compiling" = yes; then
5930 :
5931else
5932 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5933/* confdefs.h. */
5934_ACEOF
5935cat confdefs.h >>conftest.$ac_ext
5936cat >>conftest.$ac_ext <<_ACEOF
5937/* end confdefs.h. */
c0d27fcc 5938#include <ctype.h>
ca81d7a0 5939#include <stdlib.h>
c0d27fcc
MR
5940#if ((' ' & 0x0FF) == 0x020)
5941# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5942# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5943#else
19650fd6 5944# define ISLOWER(c) \
edfaf76d
LK
5945 (('a' <= (c) && (c) <= 'i') \
5946 || ('j' <= (c) && (c) <= 'r') \
5947 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
5948# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5949#endif
5950
5951#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5952int
5953main ()
5954{
5955 int i;
5956 for (i = 0; i < 256; i++)
5957 if (XOR (islower (i), ISLOWER (i))
edfaf76d 5958 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
5959 return 2;
5960 return 0;
c0d27fcc
MR
5961}
5962_ACEOF
5963rm -f conftest$ac_exeext
ca81d7a0
JD
5964if { (ac_try="$ac_link"
5965case "(($ac_try" in
5966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5967 *) ac_try_echo=$ac_try;;
5968esac
5969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5970 (eval "$ac_link") 2>&5
c0d27fcc
MR
5971 ac_status=$?
5972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5973 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
5974 { (case "(($ac_try" in
5975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5976 *) ac_try_echo=$ac_try;;
5977esac
5978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5979 (eval "$ac_try") 2>&5
c0d27fcc
MR
5980 ac_status=$?
5981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5982 (exit $ac_status); }; }; then
5983 :
5984else
5985 echo "$as_me: program exited with status $ac_status" >&5
5986echo "$as_me: failed program was:" >&5
19650fd6
AS
5987sed 's/^/| /' conftest.$ac_ext >&5
5988
c0d27fcc
MR
5989( exit $ac_status )
5990ac_cv_header_stdc=no
5991fi
ca81d7a0 5992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc 5993fi
ca81d7a0
JD
5994
5995
c0d27fcc
MR
5996fi
5997fi
ca81d7a0
JD
5998{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5999echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
c0d27fcc
MR
6000if test $ac_cv_header_stdc = yes; then
6001
6002cat >>confdefs.h <<\_ACEOF
6003#define STDC_HEADERS 1
6004_ACEOF
6005
6006fi
6007
6008# On IRIX 5.3, sys/types and inttypes.h are conflicting.
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 6019 inttypes.h stdint.h unistd.h
98418dba
CW
6020do
6021as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6022{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6023echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6024if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6025 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6026else
925c2f3f 6027 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6028/* confdefs.h. */
6029_ACEOF
6030cat confdefs.h >>conftest.$ac_ext
6031cat >>conftest.$ac_ext <<_ACEOF
6032/* end confdefs.h. */
c0d27fcc
MR
6033$ac_includes_default
6034
6035#include <$ac_header>
6036_ACEOF
6037rm -f conftest.$ac_objext
ca81d7a0
JD
6038if { (ac_try="$ac_compile"
6039case "(($ac_try" in
6040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6041 *) ac_try_echo=$ac_try;;
6042esac
6043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6044 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6045 ac_status=$?
edfaf76d
LK
6046 grep -v '^ *+' conftest.er1 >conftest.err
6047 rm -f conftest.er1
6048 cat conftest.err >&5
c0d27fcc 6049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6050 (exit $ac_status); } && {
6051 test -z "$ac_c_werror_flag" ||
6052 test ! -s conftest.err
6053 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6054 eval "$as_ac_Header=yes"
6055else
6056 echo "$as_me: failed program was:" >&5
19650fd6
AS
6057sed 's/^/| /' conftest.$ac_ext >&5
6058
ca81d7a0 6059 eval "$as_ac_Header=no"
c0d27fcc 6060fi
ca81d7a0
JD
6061
6062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc 6063fi
ca81d7a0
JD
6064ac_res=`eval echo '${'$as_ac_Header'}'`
6065 { echo "$as_me:$LINENO: result: $ac_res" >&5
6066echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6067if test `eval echo '${'$as_ac_Header'}'` = yes; then
6068 cat >>confdefs.h <<_ACEOF
6069#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6070_ACEOF
6071
6072fi
6073
6074done
6075
6076
6077
6078
6079
6080for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
6081do
6082as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6083if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6084 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6085echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6086if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6087 echo $ECHO_N "(cached) $ECHO_C" >&6
6088fi
ca81d7a0
JD
6089ac_res=`eval echo '${'$as_ac_Header'}'`
6090 { echo "$as_me:$LINENO: result: $ac_res" >&5
6091echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6092else
6093 # Is the header compilable?
ca81d7a0
JD
6094{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6095echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6096cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6097/* confdefs.h. */
6098_ACEOF
6099cat confdefs.h >>conftest.$ac_ext
6100cat >>conftest.$ac_ext <<_ACEOF
6101/* end confdefs.h. */
c0d27fcc 6102$ac_includes_default
98418dba 6103#include <$ac_header>
503d2be0 6104_ACEOF
c0d27fcc 6105rm -f conftest.$ac_objext
ca81d7a0
JD
6106if { (ac_try="$ac_compile"
6107case "(($ac_try" in
6108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6109 *) ac_try_echo=$ac_try;;
6110esac
6111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6112 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6113 ac_status=$?
edfaf76d
LK
6114 grep -v '^ *+' conftest.er1 >conftest.err
6115 rm -f conftest.er1
6116 cat conftest.err >&5
c0d27fcc 6117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6118 (exit $ac_status); } && {
6119 test -z "$ac_c_werror_flag" ||
6120 test ! -s conftest.err
6121 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6122 ac_header_compiler=yes
6123else
6124 echo "$as_me: failed program was:" >&5
19650fd6
AS
6125sed 's/^/| /' conftest.$ac_ext >&5
6126
ca81d7a0 6127 ac_header_compiler=no
c0d27fcc 6128fi
ca81d7a0
JD
6129
6130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6131{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6132echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6133
6134# Is the header present?
ca81d7a0
JD
6135{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6136echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6137cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6138/* confdefs.h. */
6139_ACEOF
6140cat confdefs.h >>conftest.$ac_ext
6141cat >>conftest.$ac_ext <<_ACEOF
6142/* end confdefs.h. */
c0d27fcc
MR
6143#include <$ac_header>
6144_ACEOF
ca81d7a0
JD
6145if { (ac_try="$ac_cpp conftest.$ac_ext"
6146case "(($ac_try" in
6147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6148 *) ac_try_echo=$ac_try;;
6149esac
6150eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6151 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6152 ac_status=$?
6bae0ccf 6153 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6154 rm -f conftest.er1
6155 cat conftest.err >&5
c0d27fcc 6156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6157 (exit $ac_status); } >/dev/null && {
6158 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6159 test ! -s conftest.err
6160 }; then
c0d27fcc 6161 ac_header_preproc=yes
f4988be7 6162else
503d2be0 6163 echo "$as_me: failed program was:" >&5
19650fd6
AS
6164sed 's/^/| /' conftest.$ac_ext >&5
6165
c0d27fcc 6166 ac_header_preproc=no
f4988be7 6167fi
ca81d7a0 6168
98418dba 6169rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6170{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6171echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6172
6173# So? What about this header?
edfaf76d
LK
6174case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6175 yes:no: )
c0d27fcc
MR
6176 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6177echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6178 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6179echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6180 ac_header_preproc=yes
19650fd6 6181 ;;
edfaf76d 6182 no:yes:* )
c0d27fcc
MR
6183 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6184echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6185 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6186echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6187 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6188echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6189 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6190echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6191 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6192echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6193 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6194echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6195
19650fd6 6196 ;;
c0d27fcc 6197esac
ca81d7a0
JD
6198{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6199echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6200if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6201 echo $ECHO_N "(cached) $ECHO_C" >&6
6202else
edfaf76d 6203 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 6204fi
ca81d7a0
JD
6205ac_res=`eval echo '${'$as_ac_Header'}'`
6206 { echo "$as_me:$LINENO: result: $ac_res" >&5
6207echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6208
6209fi
98418dba 6210if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6211 cat >>confdefs.h <<_ACEOF
98418dba 6212#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6213_ACEOF
f4988be7
GM
6214
6215fi
c0d27fcc 6216
98418dba
CW
6217done
6218
6219 # Emulation library used on NetBSD.
ca81d7a0
JD
6220 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
6221echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 6222if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 6223 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 6224else
98418dba
CW
6225 ac_check_lib_save_LIBS=$LIBS
6226LIBS="-lossaudio $LIBS"
6227cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6228/* confdefs.h. */
6229_ACEOF
6230cat confdefs.h >>conftest.$ac_ext
6231cat >>conftest.$ac_ext <<_ACEOF
6232/* end confdefs.h. */
98418dba 6233
ca81d7a0
JD
6234/* Override any GCC internal prototype to avoid an error.
6235 Use char because int might match the return type of a GCC
6236 builtin and then its argument prototype would still apply. */
98418dba
CW
6237#ifdef __cplusplus
6238extern "C"
f4988be7 6239#endif
98418dba 6240char _oss_ioctl ();
503d2be0
AS
6241int
6242main ()
6243{
ca81d7a0 6244return _oss_ioctl ();
503d2be0
AS
6245 ;
6246 return 0;
6247}
6248_ACEOF
98418dba 6249rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6250if { (ac_try="$ac_link"
6251case "(($ac_try" in
6252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6253 *) ac_try_echo=$ac_try;;
6254esac
6255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6256 (eval "$ac_link") 2>conftest.er1
503d2be0 6257 ac_status=$?
edfaf76d
LK
6258 grep -v '^ *+' conftest.er1 >conftest.err
6259 rm -f conftest.er1
6260 cat conftest.err >&5
c0d27fcc 6261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6262 (exit $ac_status); } && {
6263 test -z "$ac_c_werror_flag" ||
6264 test ! -s conftest.err
6265 } && test -s conftest$ac_exeext &&
6266 $as_test_x conftest$ac_exeext; then
98418dba 6267 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6268else
503d2be0 6269 echo "$as_me: failed program was:" >&5
19650fd6
AS
6270sed 's/^/| /' conftest.$ac_ext >&5
6271
ca81d7a0 6272 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6273fi
ca81d7a0 6274
f053c89f 6275rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6276 conftest$ac_exeext conftest.$ac_ext
98418dba 6277LIBS=$ac_check_lib_save_LIBS
f4988be7 6278fi
ca81d7a0
JD
6279{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6280echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6281if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6282 LIBSOUND=-lossaudio
6283else
6284 LIBSOUND=
6285fi
6286
c0d27fcc 6287
439f58ee
JD
6288
6289 ALSA_REQUIRED=1.0.0
6290 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
6291 if test "X${with_pkg_config_prog}" != X; then
6292 PKG_CONFIG="${with_pkg_config_prog}"
6293 fi
6294
6295 succeeded=no
6296
6297 if test -z "$PKG_CONFIG"; then
6298 # Extract the first word of "pkg-config", so it can be a program name with args.
6299set dummy pkg-config; ac_word=$2
ca81d7a0
JD
6300{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6301echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6302if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6303 echo $ECHO_N "(cached) $ECHO_C" >&6
6304else
6305 case $PKG_CONFIG in
6306 [\\/]* | ?:[\\/]*)
6307 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6308 ;;
6309 *)
6310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6311for as_dir in $PATH
6312do
6313 IFS=$as_save_IFS
6314 test -z "$as_dir" && as_dir=.
6315 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6316 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6317 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6318 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6319 break 2
6320 fi
6321done
6322done
ca81d7a0 6323IFS=$as_save_IFS
439f58ee
JD
6324
6325 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6326 ;;
6327esac
6328fi
6329PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6330if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
6331 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6332echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6333else
ca81d7a0
JD
6334 { echo "$as_me:$LINENO: result: no" >&5
6335echo "${ECHO_T}no" >&6; }
439f58ee
JD
6336fi
6337
ca81d7a0 6338
439f58ee
JD
6339 fi
6340
6341 if test "$PKG_CONFIG" = "no" ; then
6342 HAVE_ALSA=no
6343 else
6344 PKG_CONFIG_MIN_VERSION=0.9.0
6345 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
6346 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6347echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6348
67db6aa2 6349 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ca81d7a0
JD
6350 { echo "$as_me:$LINENO: result: yes" >&5
6351echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6352 succeeded=yes
6353
ca81d7a0
JD
6354 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6355echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6356 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6357 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6358echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6359
ca81d7a0
JD
6360 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6361echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6362 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6363 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6364echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6365 else
ca81d7a0
JD
6366 { echo "$as_me:$LINENO: result: no" >&5
6367echo "${ECHO_T}no" >&6; }
439f58ee
JD
6368 ALSA_CFLAGS=""
6369 ALSA_LIBS=""
6370 ## If we have a custom action on failure, don't print errors, but
6371 ## do set a variable so people can do so.
6372 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6373
6374 fi
6375
6376
6377
6378 else
6379 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6380 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6381 fi
6382 fi
6383
6384 if test $succeeded = yes; then
6385 HAVE_ALSA=yes
6386 else
6387 HAVE_ALSA=no
6388 fi
6389
6390 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6391 SAVE_CFLAGS="$CFLAGS"
6392 SAVE_LDFLAGS="$LDFLAGS"
6393 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6394 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6395 cat >conftest.$ac_ext <<_ACEOF
6396/* confdefs.h. */
6397_ACEOF
6398cat confdefs.h >>conftest.$ac_ext
6399cat >>conftest.$ac_ext <<_ACEOF
6400/* end confdefs.h. */
6401#include <asoundlib.h>
6402int
6403main ()
6404{
6405snd_lib_error_set_handler (0);
6406 ;
6407 return 0;
6408}
6409_ACEOF
6410rm -f conftest.$ac_objext
6411if { (ac_try="$ac_compile"
6412case "(($ac_try" in
6413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6414 *) ac_try_echo=$ac_try;;
6415esac
6416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6417 (eval "$ac_compile") 2>conftest.er1
6418 ac_status=$?
6419 grep -v '^ *+' conftest.er1 >conftest.err
6420 rm -f conftest.er1
6421 cat conftest.err >&5
6422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6423 (exit $ac_status); } && {
6424 test -z "$ac_c_werror_flag" ||
6425 test ! -s conftest.err
6426 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6427 emacs_alsa_normal=yes
6428else
6429 echo "$as_me: failed program was:" >&5
6430sed 's/^/| /' conftest.$ac_ext >&5
6431
6432 emacs_alsa_normal=no
6433fi
6434
6435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6436 if test "$emacs_alsa_normal" != yes; then
6437 cat >conftest.$ac_ext <<_ACEOF
6438/* confdefs.h. */
6439_ACEOF
6440cat confdefs.h >>conftest.$ac_ext
6441cat >>conftest.$ac_ext <<_ACEOF
6442/* end confdefs.h. */
6443#include <alsa/asoundlib.h>
6444int
6445main ()
6446{
6447snd_lib_error_set_handler (0);
6448 ;
6449 return 0;
6450}
6451_ACEOF
6452rm -f conftest.$ac_objext
6453if { (ac_try="$ac_compile"
6454case "(($ac_try" in
6455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6456 *) ac_try_echo=$ac_try;;
6457esac
6458eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6459 (eval "$ac_compile") 2>conftest.er1
6460 ac_status=$?
6461 grep -v '^ *+' conftest.er1 >conftest.err
6462 rm -f conftest.er1
6463 cat conftest.err >&5
6464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6465 (exit $ac_status); } && {
6466 test -z "$ac_c_werror_flag" ||
6467 test ! -s conftest.err
6468 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6469 emacs_alsa_subdir=yes
6470else
6471 echo "$as_me: failed program was:" >&5
6472sed 's/^/| /' conftest.$ac_ext >&5
6473
6474 emacs_alsa_subdir=no
6475fi
6476
6477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6478 if test "$emacs_alsa_subdir" != yes; then
6479 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6480echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6481 { (exit 1); exit 1; }; }
6482 fi
6483 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6484 fi
6485
6486 CFLAGS="$SAVE_CFLAGS"
6487 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6488 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6489 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6490
6491cat >>confdefs.h <<\_ACEOF
6492#define HAVE_ALSA 1
6493_ACEOF
6494
ca81d7a0 6495
439f58ee
JD
6496 fi
6497
f4988be7 6498fi
c0d27fcc
MR
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
22044edf
DL
6517
6518
973a76b1 6519
cffcede7 6520
551ffc27 6521
226e2359 6522
c0d27fcc 6523
f4988be7 6524
98418dba
CW
6525for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6526 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6527 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6528 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6529 sys/utsname.h pwd.h
98418dba
CW
6530do
6531as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6532if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6533 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6534echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6535if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6536 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6537fi
ca81d7a0
JD
6538ac_res=`eval echo '${'$as_ac_Header'}'`
6539 { echo "$as_me:$LINENO: result: $ac_res" >&5
6540echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6541else
c0d27fcc 6542 # Is the header compilable?
ca81d7a0
JD
6543{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6544echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6545cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6546/* confdefs.h. */
6547_ACEOF
6548cat confdefs.h >>conftest.$ac_ext
6549cat >>conftest.$ac_ext <<_ACEOF
6550/* end confdefs.h. */
c0d27fcc
MR
6551$ac_includes_default
6552#include <$ac_header>
6553_ACEOF
6554rm -f conftest.$ac_objext
ca81d7a0
JD
6555if { (ac_try="$ac_compile"
6556case "(($ac_try" in
6557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6558 *) ac_try_echo=$ac_try;;
6559esac
6560eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6561 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6562 ac_status=$?
edfaf76d
LK
6563 grep -v '^ *+' conftest.er1 >conftest.err
6564 rm -f conftest.er1
6565 cat conftest.err >&5
c0d27fcc 6566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6567 (exit $ac_status); } && {
6568 test -z "$ac_c_werror_flag" ||
6569 test ! -s conftest.err
6570 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6571 ac_header_compiler=yes
6572else
6573 echo "$as_me: failed program was:" >&5
19650fd6
AS
6574sed 's/^/| /' conftest.$ac_ext >&5
6575
ca81d7a0 6576 ac_header_compiler=no
c0d27fcc 6577fi
ca81d7a0
JD
6578
6579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6580{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6581echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6582
6583# Is the header present?
ca81d7a0
JD
6584{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6585echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6586cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6587/* confdefs.h. */
6588_ACEOF
6589cat confdefs.h >>conftest.$ac_ext
6590cat >>conftest.$ac_ext <<_ACEOF
6591/* end confdefs.h. */
98418dba 6592#include <$ac_header>
503d2be0 6593_ACEOF
ca81d7a0
JD
6594if { (ac_try="$ac_cpp conftest.$ac_ext"
6595case "(($ac_try" in
6596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6597 *) ac_try_echo=$ac_try;;
6598esac
6599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6600 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6601 ac_status=$?
6bae0ccf 6602 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6603 rm -f conftest.er1
6604 cat conftest.err >&5
c0d27fcc 6605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6606 (exit $ac_status); } >/dev/null && {
6607 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6608 test ! -s conftest.err
6609 }; then
c0d27fcc 6610 ac_header_preproc=yes
34ec9ebe 6611else
503d2be0 6612 echo "$as_me: failed program was:" >&5
19650fd6
AS
6613sed 's/^/| /' conftest.$ac_ext >&5
6614
c0d27fcc 6615 ac_header_preproc=no
34ec9ebe 6616fi
ca81d7a0 6617
98418dba 6618rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6619{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6620echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6621
6622# So? What about this header?
edfaf76d
LK
6623case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6624 yes:no: )
c0d27fcc
MR
6625 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6626echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6627 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6628echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6629 ac_header_preproc=yes
19650fd6 6630 ;;
edfaf76d 6631 no:yes:* )
c0d27fcc
MR
6632 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6633echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6634 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6635echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6636 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6637echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6638 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6639echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6640 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6641echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6642 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6643echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6644
19650fd6 6645 ;;
c0d27fcc 6646esac
ca81d7a0
JD
6647{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6648echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6649if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6650 echo $ECHO_N "(cached) $ECHO_C" >&6
6651else
edfaf76d 6652 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6653fi
ca81d7a0
JD
6654ac_res=`eval echo '${'$as_ac_Header'}'`
6655 { echo "$as_me:$LINENO: result: $ac_res" >&5
6656echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6657
6658fi
98418dba 6659if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6660 cat >>confdefs.h <<_ACEOF
98418dba 6661#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6662_ACEOF
34ec9ebe 6663
98418dba 6664fi
c0d27fcc 6665
98418dba
CW
6666done
6667
22044edf 6668
ca81d7a0
JD
6669{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6670echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6671cat >conftest.$ac_ext <<_ACEOF
6672/* confdefs.h. */
6673_ACEOF
6674cat confdefs.h >>conftest.$ac_ext
6675cat >>conftest.$ac_ext <<_ACEOF
6676/* end confdefs.h. */
6677#include <sys/personality.h>
6678int
6679main ()
6680{
6681personality (PER_LINUX32)
6682 ;
6683 return 0;
6684}
6685_ACEOF
6686rm -f conftest.$ac_objext
ca81d7a0
JD
6687if { (ac_try="$ac_compile"
6688case "(($ac_try" in
6689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6690 *) ac_try_echo=$ac_try;;
6691esac
6692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6693 (eval "$ac_compile") 2>conftest.er1
f17e308a 6694 ac_status=$?
edfaf76d
LK
6695 grep -v '^ *+' conftest.er1 >conftest.err
6696 rm -f conftest.er1
6697 cat conftest.err >&5
f17e308a 6698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6699 (exit $ac_status); } && {
6700 test -z "$ac_c_werror_flag" ||
6701 test ! -s conftest.err
6702 } && test -s conftest.$ac_objext; then
f17e308a
JD
6703 emacs_cv_personality_linux32=yes
6704else
6705 echo "$as_me: failed program was:" >&5
6706sed 's/^/| /' conftest.$ac_ext >&5
6707
ca81d7a0 6708 emacs_cv_personality_linux32=no
f17e308a 6709fi
ca81d7a0
JD
6710
6711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6712{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6713echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6714
6715if test $emacs_cv_personality_linux32 = yes; then
6716
6717cat >>confdefs.h <<\_ACEOF
6718#define HAVE_PERSONALITY_LINUX32 1
6719_ACEOF
6720
6721fi
6722
6723
22044edf
DL
6724for ac_header in term.h
6725do
6726as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6727{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6728echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6729if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6730 echo $ECHO_N "(cached) $ECHO_C" >&6
6731else
6732 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6733/* confdefs.h. */
6734_ACEOF
6735cat confdefs.h >>conftest.$ac_ext
6736cat >>conftest.$ac_ext <<_ACEOF
6737/* end confdefs.h. */
22044edf
DL
6738#include <$ac_header>
6739_ACEOF
ca81d7a0
JD
6740if { (ac_try="$ac_cpp conftest.$ac_ext"
6741case "(($ac_try" in
6742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6743 *) ac_try_echo=$ac_try;;
6744esac
6745eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6746 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6747 ac_status=$?
6748 grep -v '^ *+' conftest.er1 >conftest.err
6749 rm -f conftest.er1
6750 cat conftest.err >&5
6751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6752 (exit $ac_status); } >/dev/null && {
6753 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6754 test ! -s conftest.err
6755 }; then
22044edf
DL
6756 eval "$as_ac_Header=yes"
6757else
6758 echo "$as_me: failed program was:" >&5
19650fd6
AS
6759sed 's/^/| /' conftest.$ac_ext >&5
6760
22044edf
DL
6761 eval "$as_ac_Header=no"
6762fi
ca81d7a0 6763
22044edf
DL
6764rm -f conftest.err conftest.$ac_ext
6765fi
ca81d7a0
JD
6766ac_res=`eval echo '${'$as_ac_Header'}'`
6767 { echo "$as_me:$LINENO: result: $ac_res" >&5
6768echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6769if test `eval echo '${'$as_ac_Header'}'` = yes; then
6770 cat >>confdefs.h <<_ACEOF
6771#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6772_ACEOF
6773
6774fi
6775
6776done
6777
ca81d7a0
JD
6778{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6779echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6780if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6781 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6782else
503d2be0 6783 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6784/* confdefs.h. */
6785_ACEOF
6786cat confdefs.h >>conftest.$ac_ext
6787cat >>conftest.$ac_ext <<_ACEOF
6788/* end confdefs.h. */
98418dba
CW
6789#include <stdlib.h>
6790#include <stdarg.h>
6791#include <string.h>
6792#include <float.h>
6793
19650fd6
AS
6794int
6795main ()
6796{
6797
6798 ;
6799 return 0;
6800}
98418dba 6801_ACEOF
19650fd6 6802rm -f conftest.$ac_objext
ca81d7a0
JD
6803if { (ac_try="$ac_compile"
6804case "(($ac_try" in
6805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6806 *) ac_try_echo=$ac_try;;
6807esac
6808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6809 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6810 ac_status=$?
edfaf76d
LK
6811 grep -v '^ *+' conftest.er1 >conftest.err
6812 rm -f conftest.er1
6813 cat conftest.err >&5
cd958eb3 6814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6815 (exit $ac_status); } && {
6816 test -z "$ac_c_werror_flag" ||
6817 test ! -s conftest.err
6818 } && test -s conftest.$ac_objext; then
98418dba 6819 ac_cv_header_stdc=yes
ba4481b5 6820else
503d2be0 6821 echo "$as_me: failed program was:" >&5
19650fd6
AS
6822sed 's/^/| /' conftest.$ac_ext >&5
6823
ca81d7a0 6824 ac_cv_header_stdc=no
ba4481b5 6825fi
ca81d7a0
JD
6826
6827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6828
6829if test $ac_cv_header_stdc = yes; then
6830 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6831 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6832/* confdefs.h. */
6833_ACEOF
6834cat confdefs.h >>conftest.$ac_ext
6835cat >>conftest.$ac_ext <<_ACEOF
6836/* end confdefs.h. */
98418dba
CW
6837#include <string.h>
6838
6839_ACEOF
6840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6841 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6842 :
6843else
6844 ac_cv_header_stdc=no
ba4481b5 6845fi
98418dba 6846rm -f conftest*
ba4481b5
DL
6847
6848fi
6849
98418dba
CW
6850if test $ac_cv_header_stdc = yes; then
6851 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6852 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6853/* confdefs.h. */
6854_ACEOF
6855cat confdefs.h >>conftest.$ac_ext
6856cat >>conftest.$ac_ext <<_ACEOF
6857/* end confdefs.h. */
98418dba
CW
6858#include <stdlib.h>
6859
6860_ACEOF
6861if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6862 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6863 :
6864else
6865 ac_cv_header_stdc=no
6866fi
6867rm -f conftest*
6868
6869fi
6870
6871if test $ac_cv_header_stdc = yes; then
6872 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6873 if test "$cross_compiling" = yes; then
6874 :
d42122a3 6875else
503d2be0 6876 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6877/* confdefs.h. */
6878_ACEOF
6879cat confdefs.h >>conftest.$ac_ext
6880cat >>conftest.$ac_ext <<_ACEOF
6881/* end confdefs.h. */
98418dba 6882#include <ctype.h>
ca81d7a0 6883#include <stdlib.h>
98418dba
CW
6884#if ((' ' & 0x0FF) == 0x020)
6885# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6886# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6887#else
19650fd6 6888# define ISLOWER(c) \
edfaf76d
LK
6889 (('a' <= (c) && (c) <= 'i') \
6890 || ('j' <= (c) && (c) <= 'r') \
6891 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6892# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6893#endif
6894
6895#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6896int
6897main ()
6898{
98418dba
CW
6899 int i;
6900 for (i = 0; i < 256; i++)
6901 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6902 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6903 return 2;
6904 return 0;
503d2be0
AS
6905}
6906_ACEOF
98418dba 6907rm -f conftest$ac_exeext
ca81d7a0
JD
6908if { (ac_try="$ac_link"
6909case "(($ac_try" in
6910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6911 *) ac_try_echo=$ac_try;;
6912esac
6913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6914 (eval "$ac_link") 2>&5
503d2be0 6915 ac_status=$?
c0d27fcc 6916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6917 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6918 { (case "(($ac_try" in
6919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6920 *) ac_try_echo=$ac_try;;
6921esac
6922eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6923 (eval "$ac_try") 2>&5
503d2be0 6924 ac_status=$?
c0d27fcc 6925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6926 (exit $ac_status); }; }; then
98418dba 6927 :
d42122a3 6928else
98418dba
CW
6929 echo "$as_me: program exited with status $ac_status" >&5
6930echo "$as_me: failed program was:" >&5
19650fd6
AS
6931sed 's/^/| /' conftest.$ac_ext >&5
6932
c0d27fcc 6933( exit $ac_status )
98418dba 6934ac_cv_header_stdc=no
d42122a3 6935fi
ca81d7a0 6936rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6937fi
ca81d7a0
JD
6938
6939
98418dba
CW
6940fi
6941fi
ca81d7a0
JD
6942{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6943echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
6944if test $ac_cv_header_stdc = yes; then
6945
c0d27fcc 6946cat >>confdefs.h <<\_ACEOF
98418dba 6947#define STDC_HEADERS 1
c0d27fcc 6948_ACEOF
d42122a3
DL
6949
6950fi
6951
ca81d7a0
JD
6952{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
6953echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 6954if test "${ac_cv_header_time+set}" = set; then
503d2be0 6955 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6956else
503d2be0 6957 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6958/* confdefs.h. */
6959_ACEOF
6960cat confdefs.h >>conftest.$ac_ext
6961cat >>conftest.$ac_ext <<_ACEOF
6962/* end confdefs.h. */
ba4481b5 6963#include <sys/types.h>
98418dba 6964#include <sys/time.h>
ba4481b5 6965#include <time.h>
503d2be0
AS
6966
6967int
6968main ()
6969{
98418dba
CW
6970if ((struct tm *) 0)
6971return 0;
503d2be0
AS
6972 ;
6973 return 0;
6974}
6975_ACEOF
6976rm -f conftest.$ac_objext
ca81d7a0
JD
6977if { (ac_try="$ac_compile"
6978case "(($ac_try" in
6979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6980 *) ac_try_echo=$ac_try;;
6981esac
6982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6983 (eval "$ac_compile") 2>conftest.er1
503d2be0 6984 ac_status=$?
edfaf76d
LK
6985 grep -v '^ *+' conftest.er1 >conftest.err
6986 rm -f conftest.er1
6987 cat conftest.err >&5
c0d27fcc 6988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6989 (exit $ac_status); } && {
6990 test -z "$ac_c_werror_flag" ||
6991 test ! -s conftest.err
6992 } && test -s conftest.$ac_objext; then
98418dba 6993 ac_cv_header_time=yes
ba4481b5 6994else
503d2be0 6995 echo "$as_me: failed program was:" >&5
19650fd6
AS
6996sed 's/^/| /' conftest.$ac_ext >&5
6997
ca81d7a0 6998 ac_cv_header_time=no
ba4481b5 6999fi
ca81d7a0
JD
7000
7001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7002fi
ca81d7a0
JD
7003{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
7004echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 7005if test $ac_cv_header_time = yes; then
503d2be0 7006
c0d27fcc 7007cat >>confdefs.h <<\_ACEOF
98418dba 7008#define TIME_WITH_SYS_TIME 1
c0d27fcc 7009_ACEOF
ba4481b5
DL
7010
7011fi
7012
ca81d7a0
JD
7013{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
7014echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 7015if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 7016 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7017else
503d2be0 7018 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7019/* confdefs.h. */
7020_ACEOF
7021cat confdefs.h >>conftest.$ac_ext
7022cat >>conftest.$ac_ext <<_ACEOF
7023/* end confdefs.h. */
cd958eb3
MB
7024$ac_includes_default
7025int
7026main ()
7027{
7028#ifndef sys_siglist
f053c89f 7029 (void) sys_siglist;
98418dba 7030#endif
503d2be0 7031
cd958eb3
MB
7032 ;
7033 return 0;
7034}
7035_ACEOF
7036rm -f conftest.$ac_objext
ca81d7a0
JD
7037if { (ac_try="$ac_compile"
7038case "(($ac_try" in
7039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7040 *) ac_try_echo=$ac_try;;
7041esac
7042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7043 (eval "$ac_compile") 2>conftest.er1
cd958eb3 7044 ac_status=$?
edfaf76d
LK
7045 grep -v '^ *+' conftest.er1 >conftest.err
7046 rm -f conftest.er1
7047 cat conftest.err >&5
cd958eb3 7048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7049 (exit $ac_status); } && {
7050 test -z "$ac_c_werror_flag" ||
7051 test ! -s conftest.err
7052 } && test -s conftest.$ac_objext; then
cd958eb3
MB
7053 ac_cv_have_decl_sys_siglist=yes
7054else
7055 echo "$as_me: failed program was:" >&5
19650fd6
AS
7056sed 's/^/| /' conftest.$ac_ext >&5
7057
ca81d7a0 7058 ac_cv_have_decl_sys_siglist=no
cd958eb3 7059fi
ca81d7a0
JD
7060
7061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 7062fi
ca81d7a0
JD
7063{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
7064echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
7065if test $ac_cv_have_decl_sys_siglist = yes; then
7066
7067cat >>confdefs.h <<_ACEOF
7068#define HAVE_DECL_SYS_SIGLIST 1
7069_ACEOF
7070
7071
7072else
7073 cat >>confdefs.h <<_ACEOF
7074#define HAVE_DECL_SYS_SIGLIST 0
7075_ACEOF
7076
7077
7078fi
7079
7080
7081if test $ac_cv_have_decl_sys_siglist != yes; then
7082 # For Tru64, at least:
ca81d7a0
JD
7083 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
7084echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
7085if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
7086 echo $ECHO_N "(cached) $ECHO_C" >&6
7087else
7088 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7089/* confdefs.h. */
7090_ACEOF
7091cat confdefs.h >>conftest.$ac_ext
7092cat >>conftest.$ac_ext <<_ACEOF
7093/* end confdefs.h. */
cd958eb3 7094$ac_includes_default
503d2be0
AS
7095int
7096main ()
7097{
cd958eb3 7098#ifndef __sys_siglist
f053c89f 7099 (void) __sys_siglist;
cd958eb3
MB
7100#endif
7101
503d2be0
AS
7102 ;
7103 return 0;
7104}
7105_ACEOF
7106rm -f conftest.$ac_objext
ca81d7a0
JD
7107if { (ac_try="$ac_compile"
7108case "(($ac_try" in
7109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7110 *) ac_try_echo=$ac_try;;
7111esac
7112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7113 (eval "$ac_compile") 2>conftest.er1
503d2be0 7114 ac_status=$?
edfaf76d
LK
7115 grep -v '^ *+' conftest.er1 >conftest.err
7116 rm -f conftest.er1
7117 cat conftest.err >&5
c0d27fcc 7118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7119 (exit $ac_status); } && {
7120 test -z "$ac_c_werror_flag" ||
7121 test ! -s conftest.err
7122 } && test -s conftest.$ac_objext; then
cd958eb3 7123 ac_cv_have_decl___sys_siglist=yes
ba4481b5 7124else
503d2be0 7125 echo "$as_me: failed program was:" >&5
19650fd6
AS
7126sed 's/^/| /' conftest.$ac_ext >&5
7127
ca81d7a0 7128 ac_cv_have_decl___sys_siglist=no
ba4481b5 7129fi
ca81d7a0
JD
7130
7131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 7132fi
ca81d7a0
JD
7133{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
7134echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 7135if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 7136
cd958eb3
MB
7137cat >>confdefs.h <<_ACEOF
7138#define HAVE_DECL___SYS_SIGLIST 1
7139_ACEOF
7140
7141
7142else
7143 cat >>confdefs.h <<_ACEOF
7144#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 7145_ACEOF
503d2be0 7146
cd958eb3 7147
ba4481b5
DL
7148fi
7149
cd958eb3
MB
7150
7151 if test $ac_cv_have_decl___sys_siglist = yes; then
7152
7153cat >>confdefs.h <<\_ACEOF
7154#define sys_siglist __sys_siglist
7155_ACEOF
7156
7157 fi
7158fi
ca81d7a0
JD
7159{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
7160echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 7161if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 7162 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7163else
503d2be0 7164 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7165/* confdefs.h. */
7166_ACEOF
7167cat confdefs.h >>conftest.$ac_ext
7168cat >>conftest.$ac_ext <<_ACEOF
7169/* end confdefs.h. */
98418dba
CW
7170#include <sys/types.h>
7171#include <sys/wait.h>
7172#ifndef WEXITSTATUS
ca81d7a0 7173# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
7174#endif
7175#ifndef WIFEXITED
7176# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 7177#endif
503d2be0
AS
7178
7179int
7180main ()
7181{
98418dba
CW
7182 int s;
7183 wait (&s);
7184 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
7185 ;
7186 return 0;
7187}
7188_ACEOF
98418dba 7189rm -f conftest.$ac_objext
ca81d7a0
JD
7190if { (ac_try="$ac_compile"
7191case "(($ac_try" in
7192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7193 *) ac_try_echo=$ac_try;;
7194esac
7195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7196 (eval "$ac_compile") 2>conftest.er1
503d2be0 7197 ac_status=$?
edfaf76d
LK
7198 grep -v '^ *+' conftest.er1 >conftest.err
7199 rm -f conftest.er1
7200 cat conftest.err >&5
c0d27fcc 7201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7202 (exit $ac_status); } && {
7203 test -z "$ac_c_werror_flag" ||
7204 test ! -s conftest.err
7205 } && test -s conftest.$ac_objext; then
98418dba 7206 ac_cv_header_sys_wait_h=yes
ba4481b5 7207else
503d2be0 7208 echo "$as_me: failed program was:" >&5
19650fd6
AS
7209sed 's/^/| /' conftest.$ac_ext >&5
7210
ca81d7a0 7211 ac_cv_header_sys_wait_h=no
ba4481b5 7212fi
ca81d7a0
JD
7213
7214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7215fi
ca81d7a0
JD
7216{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
7217echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 7218if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 7219
c0d27fcc 7220cat >>confdefs.h <<\_ACEOF
98418dba 7221#define HAVE_SYS_WAIT_H 1
c0d27fcc 7222_ACEOF
ba4481b5 7223
ba4481b5
DL
7224fi
7225
c0d27fcc 7226
ca81d7a0
JD
7227{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
7228echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 7229if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 7230 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 7231else
503d2be0 7232 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7233/* confdefs.h. */
7234_ACEOF
7235cat confdefs.h >>conftest.$ac_ext
7236cat >>conftest.$ac_ext <<_ACEOF
7237/* end confdefs.h. */
98418dba
CW
7238#ifdef TIME_WITH_SYS_TIME
7239#include <sys/time.h>
7240#include <time.h>
7241#else
7242#ifdef HAVE_SYS_TIME_H
7243#include <sys/time.h>
7244#else
1113b624 7245#include <time.h>
98418dba
CW
7246#endif
7247#endif
7248#ifdef HAVE_UTIME_H
7249#include <utime.h>
7250#endif
503d2be0
AS
7251int
7252main ()
7253{
98418dba 7254static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7255 ;
7256 return 0;
7257}
7258_ACEOF
98418dba 7259rm -f conftest.$ac_objext
ca81d7a0
JD
7260if { (ac_try="$ac_compile"
7261case "(($ac_try" in
7262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7263 *) ac_try_echo=$ac_try;;
7264esac
7265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7266 (eval "$ac_compile") 2>conftest.er1
503d2be0 7267 ac_status=$?
edfaf76d
LK
7268 grep -v '^ *+' conftest.er1 >conftest.err
7269 rm -f conftest.er1
7270 cat conftest.err >&5
c0d27fcc 7271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7272 (exit $ac_status); } && {
7273 test -z "$ac_c_werror_flag" ||
7274 test ! -s conftest.err
7275 } && test -s conftest.$ac_objext; then
98418dba 7276 emacs_cv_struct_utimbuf=yes
1113b624 7277else
503d2be0 7278 echo "$as_me: failed program was:" >&5
19650fd6
AS
7279sed 's/^/| /' conftest.$ac_ext >&5
7280
ca81d7a0 7281 emacs_cv_struct_utimbuf=no
1113b624 7282fi
ca81d7a0
JD
7283
7284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7285fi
ca81d7a0
JD
7286{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7287echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7288if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7289
c0d27fcc 7290cat >>confdefs.h <<\_ACEOF
98418dba 7291#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7292_ACEOF
1113b624
PE
7293
7294fi
ba4481b5 7295
ca81d7a0
JD
7296{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7297echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7298if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7299 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7300else
98418dba 7301 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7302/* confdefs.h. */
7303_ACEOF
7304cat confdefs.h >>conftest.$ac_ext
7305cat >>conftest.$ac_ext <<_ACEOF
7306/* end confdefs.h. */
7397acc4 7307#include <sys/types.h>
98418dba 7308#include <signal.h>
98418dba 7309
503d2be0
AS
7310int
7311main ()
7312{
ca81d7a0 7313return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7314 ;
7315 return 0;
7316}
7317_ACEOF
98418dba 7318rm -f conftest.$ac_objext
ca81d7a0
JD
7319if { (ac_try="$ac_compile"
7320case "(($ac_try" in
7321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7322 *) ac_try_echo=$ac_try;;
7323esac
7324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7325 (eval "$ac_compile") 2>conftest.er1
503d2be0 7326 ac_status=$?
edfaf76d
LK
7327 grep -v '^ *+' conftest.er1 >conftest.err
7328 rm -f conftest.er1
7329 cat conftest.err >&5
c0d27fcc 7330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7331 (exit $ac_status); } && {
7332 test -z "$ac_c_werror_flag" ||
7333 test ! -s conftest.err
7334 } && test -s conftest.$ac_objext; then
ca81d7a0 7335 ac_cv_type_signal=int
503d2be0
AS
7336else
7337 echo "$as_me: failed program was:" >&5
19650fd6
AS
7338sed 's/^/| /' conftest.$ac_ext >&5
7339
ca81d7a0 7340 ac_cv_type_signal=void
503d2be0 7341fi
ca81d7a0
JD
7342
7343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7344fi
ca81d7a0
JD
7345{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7346echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7347
c0d27fcc 7348cat >>confdefs.h <<_ACEOF
98418dba 7349#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7350_ACEOF
7351
503d2be0 7352
c0d27fcc 7353
ca81d7a0
JD
7354{ echo "$as_me:$LINENO: checking for speed_t" >&5
7355echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7356if test "${emacs_cv_speed_t+set}" = set; then
7357 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7358else
98418dba 7359 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7360/* confdefs.h. */
7361_ACEOF
7362cat confdefs.h >>conftest.$ac_ext
7363cat >>conftest.$ac_ext <<_ACEOF
7364/* end confdefs.h. */
98418dba 7365#include <termios.h>
98418dba
CW
7366int
7367main ()
7368{
7369speed_t x = 1;
7370 ;
7371 return 0;
7372}
7373_ACEOF
7374rm -f conftest.$ac_objext
ca81d7a0
JD
7375if { (ac_try="$ac_compile"
7376case "(($ac_try" in
7377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7378 *) ac_try_echo=$ac_try;;
7379esac
7380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7381 (eval "$ac_compile") 2>conftest.er1
98418dba 7382 ac_status=$?
edfaf76d
LK
7383 grep -v '^ *+' conftest.er1 >conftest.err
7384 rm -f conftest.er1
7385 cat conftest.err >&5
c0d27fcc 7386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7387 (exit $ac_status); } && {
7388 test -z "$ac_c_werror_flag" ||
7389 test ! -s conftest.err
7390 } && test -s conftest.$ac_objext; then
98418dba
CW
7391 emacs_cv_speed_t=yes
7392else
7393 echo "$as_me: failed program was:" >&5
19650fd6
AS
7394sed 's/^/| /' conftest.$ac_ext >&5
7395
ca81d7a0 7396 emacs_cv_speed_t=no
98418dba 7397fi
ca81d7a0
JD
7398
7399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7400fi
ca81d7a0
JD
7401{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7402echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7403if test $emacs_cv_speed_t = yes; then
b936fae4 7404
c0d27fcc 7405cat >>confdefs.h <<\_ACEOF
98418dba 7406#define HAVE_SPEED_T 1
c0d27fcc 7407_ACEOF
98418dba 7408
7397acc4
DL
7409fi
7410
ca81d7a0
JD
7411{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7412echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7413if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7414 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7415else
503d2be0 7416 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7417/* confdefs.h. */
7418_ACEOF
7419cat confdefs.h >>conftest.$ac_ext
7420cat >>conftest.$ac_ext <<_ACEOF
7421/* end confdefs.h. */
98418dba
CW
7422#ifdef TIME_WITH_SYS_TIME
7423#include <sys/time.h>
7424#include <time.h>
7425#else
7426#ifdef HAVE_SYS_TIME_H
7427#include <sys/time.h>
7428#else
7429#include <time.h>
7430#endif
7431#endif
503d2be0
AS
7432int
7433main ()
7434{
98418dba 7435static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7436 ;
7437 return 0;
7438}
7439_ACEOF
7440rm -f conftest.$ac_objext
ca81d7a0
JD
7441if { (ac_try="$ac_compile"
7442case "(($ac_try" in
7443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7444 *) ac_try_echo=$ac_try;;
7445esac
7446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7447 (eval "$ac_compile") 2>conftest.er1
503d2be0 7448 ac_status=$?
edfaf76d
LK
7449 grep -v '^ *+' conftest.er1 >conftest.err
7450 rm -f conftest.er1
7451 cat conftest.err >&5
c0d27fcc 7452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7453 (exit $ac_status); } && {
7454 test -z "$ac_c_werror_flag" ||
7455 test ! -s conftest.err
7456 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7457 emacs_cv_struct_timeval=yes
7458else
503d2be0 7459 echo "$as_me: failed program was:" >&5
19650fd6
AS
7460sed 's/^/| /' conftest.$ac_ext >&5
7461
ca81d7a0 7462 emacs_cv_struct_timeval=no
7397acc4 7463fi
ca81d7a0
JD
7464
7465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7466fi
ca81d7a0
JD
7467{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7468echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7469HAVE_TIMEVAL=$emacs_cv_struct_timeval
7470if test $emacs_cv_struct_timeval = yes; then
b936fae4 7471
c0d27fcc 7472cat >>confdefs.h <<\_ACEOF
98418dba 7473#define HAVE_TIMEVAL 1
c0d27fcc 7474_ACEOF
7397acc4
DL
7475
7476fi
7477
ca81d7a0
JD
7478{ echo "$as_me:$LINENO: checking for struct exception" >&5
7479echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7480if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7481 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7482else
503d2be0 7483 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7484/* confdefs.h. */
7485_ACEOF
7486cat confdefs.h >>conftest.$ac_ext
7487cat >>conftest.$ac_ext <<_ACEOF
7488/* end confdefs.h. */
98418dba 7489#include <math.h>
503d2be0
AS
7490int
7491main ()
7492{
98418dba 7493static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7494 ;
7495 return 0;
ba4481b5 7496}
503d2be0
AS
7497_ACEOF
7498rm -f conftest.$ac_objext
ca81d7a0
JD
7499if { (ac_try="$ac_compile"
7500case "(($ac_try" in
7501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7502 *) ac_try_echo=$ac_try;;
7503esac
7504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7505 (eval "$ac_compile") 2>conftest.er1
503d2be0 7506 ac_status=$?
edfaf76d
LK
7507 grep -v '^ *+' conftest.er1 >conftest.err
7508 rm -f conftest.er1
7509 cat conftest.err >&5
c0d27fcc 7510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7511 (exit $ac_status); } && {
7512 test -z "$ac_c_werror_flag" ||
7513 test ! -s conftest.err
7514 } && test -s conftest.$ac_objext; then
98418dba 7515 emacs_cv_struct_exception=yes
ba4481b5 7516else
503d2be0 7517 echo "$as_me: failed program was:" >&5
19650fd6
AS
7518sed 's/^/| /' conftest.$ac_ext >&5
7519
ca81d7a0 7520 emacs_cv_struct_exception=no
ba4481b5 7521fi
ca81d7a0
JD
7522
7523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7524fi
ca81d7a0
JD
7525{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7526echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7527HAVE_EXCEPTION=$emacs_cv_struct_exception
7528if test $emacs_cv_struct_exception != yes; then
b936fae4 7529
c0d27fcc 7530cat >>confdefs.h <<\_ACEOF
98418dba 7531#define NO_MATHERR 1
c0d27fcc 7532_ACEOF
ba4481b5
DL
7533
7534fi
7535
7862d3a8
AS
7536
7537for ac_header in sys/socket.h
7538do
7539as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7540if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7541 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7542echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7543if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7544 echo $ECHO_N "(cached) $ECHO_C" >&6
7545fi
ca81d7a0
JD
7546ac_res=`eval echo '${'$as_ac_Header'}'`
7547 { echo "$as_me:$LINENO: result: $ac_res" >&5
7548echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7549else
7550 # Is the header compilable?
ca81d7a0
JD
7551{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7552echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7553cat >conftest.$ac_ext <<_ACEOF
7554/* confdefs.h. */
7555_ACEOF
7556cat confdefs.h >>conftest.$ac_ext
7557cat >>conftest.$ac_ext <<_ACEOF
7558/* end confdefs.h. */
7559$ac_includes_default
7560#include <$ac_header>
7561_ACEOF
7562rm -f conftest.$ac_objext
ca81d7a0
JD
7563if { (ac_try="$ac_compile"
7564case "(($ac_try" in
7565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7566 *) ac_try_echo=$ac_try;;
7567esac
7568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7569 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7570 ac_status=$?
edfaf76d
LK
7571 grep -v '^ *+' conftest.er1 >conftest.err
7572 rm -f conftest.er1
7573 cat conftest.err >&5
7862d3a8 7574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7575 (exit $ac_status); } && {
7576 test -z "$ac_c_werror_flag" ||
7577 test ! -s conftest.err
7578 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7579 ac_header_compiler=yes
7580else
7581 echo "$as_me: failed program was:" >&5
7582sed 's/^/| /' conftest.$ac_ext >&5
7583
ca81d7a0 7584 ac_header_compiler=no
7862d3a8 7585fi
ca81d7a0
JD
7586
7587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7588{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7589echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7590
7591# Is the header present?
ca81d7a0
JD
7592{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7593echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7594cat >conftest.$ac_ext <<_ACEOF
7595/* confdefs.h. */
7596_ACEOF
7597cat confdefs.h >>conftest.$ac_ext
7598cat >>conftest.$ac_ext <<_ACEOF
7599/* end confdefs.h. */
7600#include <$ac_header>
7601_ACEOF
ca81d7a0
JD
7602if { (ac_try="$ac_cpp conftest.$ac_ext"
7603case "(($ac_try" in
7604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7605 *) ac_try_echo=$ac_try;;
7606esac
7607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7608 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7609 ac_status=$?
7610 grep -v '^ *+' conftest.er1 >conftest.err
7611 rm -f conftest.er1
7612 cat conftest.err >&5
7613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7614 (exit $ac_status); } >/dev/null && {
7615 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7616 test ! -s conftest.err
7617 }; then
7862d3a8
AS
7618 ac_header_preproc=yes
7619else
7620 echo "$as_me: failed program was:" >&5
7621sed 's/^/| /' conftest.$ac_ext >&5
7622
7623 ac_header_preproc=no
7624fi
ca81d7a0 7625
7862d3a8 7626rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
7627{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7628echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7629
7630# So? What about this header?
edfaf76d
LK
7631case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7632 yes:no: )
7862d3a8
AS
7633 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7634echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7635 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7636echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7637 ac_header_preproc=yes
7862d3a8 7638 ;;
edfaf76d 7639 no:yes:* )
7862d3a8
AS
7640 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7641echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7642 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7643echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7644 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7645echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7646 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7647echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7648 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7649echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7650 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7651echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7652
7862d3a8
AS
7653 ;;
7654esac
ca81d7a0
JD
7655{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7656echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7657if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7658 echo $ECHO_N "(cached) $ECHO_C" >&6
7659else
edfaf76d 7660 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7661fi
ca81d7a0
JD
7662ac_res=`eval echo '${'$as_ac_Header'}'`
7663 { echo "$as_me:$LINENO: result: $ac_res" >&5
7664echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7665
7666fi
7667if test `eval echo '${'$as_ac_Header'}'` = yes; then
7668 cat >>confdefs.h <<_ACEOF
7669#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7670_ACEOF
7671
7672fi
7673
7674done
7675
7676
7677for ac_header in net/if.h
7678do
7679as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7680{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7681echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7682if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7683 echo $ECHO_N "(cached) $ECHO_C" >&6
7684else
7685 cat >conftest.$ac_ext <<_ACEOF
7686/* confdefs.h. */
7687_ACEOF
7688cat confdefs.h >>conftest.$ac_ext
7689cat >>conftest.$ac_ext <<_ACEOF
7690/* end confdefs.h. */
7691$ac_includes_default
7692#if HAVE_SYS_SOCKET_H
7693#include <sys/socket.h>
7694#endif
7695
7696#include <$ac_header>
7697_ACEOF
7698rm -f conftest.$ac_objext
ca81d7a0
JD
7699if { (ac_try="$ac_compile"
7700case "(($ac_try" in
7701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7702 *) ac_try_echo=$ac_try;;
7703esac
7704eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7705 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7706 ac_status=$?
edfaf76d
LK
7707 grep -v '^ *+' conftest.er1 >conftest.err
7708 rm -f conftest.er1
7709 cat conftest.err >&5
7862d3a8 7710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7711 (exit $ac_status); } && {
7712 test -z "$ac_c_werror_flag" ||
7713 test ! -s conftest.err
7714 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7715 eval "$as_ac_Header=yes"
7716else
7717 echo "$as_me: failed program was:" >&5
7718sed 's/^/| /' conftest.$ac_ext >&5
7719
ca81d7a0 7720 eval "$as_ac_Header=no"
7862d3a8 7721fi
ca81d7a0
JD
7722
7723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7724fi
ca81d7a0
JD
7725ac_res=`eval echo '${'$as_ac_Header'}'`
7726 { echo "$as_me:$LINENO: result: $ac_res" >&5
7727echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7728if test `eval echo '${'$as_ac_Header'}'` = yes; then
7729 cat >>confdefs.h <<_ACEOF
7730#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7731_ACEOF
7732
7733fi
7734
7735done
7736
7737
ca81d7a0
JD
7738{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7739echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7740if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7741 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7742else
503d2be0 7743 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7744/* confdefs.h. */
7745_ACEOF
7746cat confdefs.h >>conftest.$ac_ext
7747cat >>conftest.$ac_ext <<_ACEOF
7748/* end confdefs.h. */
98418dba
CW
7749#include <sys/types.h>
7750#include <time.h>
7397acc4 7751
503d2be0
AS
7752int
7753main ()
7754{
f053c89f
CY
7755struct tm tm;
7756 int *p = &tm.tm_sec;
7757 return !p;
503d2be0
AS
7758 ;
7759 return 0;
7760}
7761_ACEOF
7762rm -f conftest.$ac_objext
ca81d7a0
JD
7763if { (ac_try="$ac_compile"
7764case "(($ac_try" in
7765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7766 *) ac_try_echo=$ac_try;;
7767esac
7768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7769 (eval "$ac_compile") 2>conftest.er1
503d2be0 7770 ac_status=$?
edfaf76d
LK
7771 grep -v '^ *+' conftest.er1 >conftest.err
7772 rm -f conftest.er1
7773 cat conftest.err >&5
c0d27fcc 7774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7775 (exit $ac_status); } && {
7776 test -z "$ac_c_werror_flag" ||
7777 test ! -s conftest.err
7778 } && test -s conftest.$ac_objext; then
35996d22
AS
7779 ac_cv_struct_tm=time.h
7780else
503d2be0 7781 echo "$as_me: failed program was:" >&5
19650fd6
AS
7782sed 's/^/| /' conftest.$ac_ext >&5
7783
ca81d7a0 7784 ac_cv_struct_tm=sys/time.h
7397acc4 7785fi
ca81d7a0
JD
7786
7787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7788fi
ca81d7a0
JD
7789{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7790echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7791if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7792
c0d27fcc 7793cat >>confdefs.h <<\_ACEOF
98418dba 7794#define TM_IN_SYS_TIME 1
c0d27fcc 7795_ACEOF
7397acc4
DL
7796
7797fi
ba4481b5 7798
ca81d7a0
JD
7799{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7800echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7801if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7802 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7803else
98418dba 7804 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7805/* confdefs.h. */
7806_ACEOF
7807cat confdefs.h >>conftest.$ac_ext
7808cat >>conftest.$ac_ext <<_ACEOF
7809/* end confdefs.h. */
98418dba
CW
7810#include <sys/types.h>
7811#include <$ac_cv_struct_tm>
ba4481b5 7812
c0d27fcc 7813
98418dba
CW
7814int
7815main ()
7816{
7817static struct tm ac_aggr;
7818if (ac_aggr.tm_zone)
7819return 0;
7820 ;
7821 return 0;
7822}
7823_ACEOF
7824rm -f conftest.$ac_objext
ca81d7a0
JD
7825if { (ac_try="$ac_compile"
7826case "(($ac_try" in
7827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7828 *) ac_try_echo=$ac_try;;
7829esac
7830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7831 (eval "$ac_compile") 2>conftest.er1
98418dba 7832 ac_status=$?
edfaf76d
LK
7833 grep -v '^ *+' conftest.er1 >conftest.err
7834 rm -f conftest.er1
7835 cat conftest.err >&5
c0d27fcc 7836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7837 (exit $ac_status); } && {
7838 test -z "$ac_c_werror_flag" ||
7839 test ! -s conftest.err
7840 } && test -s conftest.$ac_objext; then
98418dba 7841 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7842else
98418dba 7843 echo "$as_me: failed program was:" >&5
19650fd6
AS
7844sed 's/^/| /' conftest.$ac_ext >&5
7845
ca81d7a0 7846 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7847/* confdefs.h. */
7848_ACEOF
7849cat confdefs.h >>conftest.$ac_ext
7850cat >>conftest.$ac_ext <<_ACEOF
7851/* end confdefs.h. */
6bae0ccf
DL
7852#include <sys/types.h>
7853#include <$ac_cv_struct_tm>
7854
7855
7856int
7857main ()
7858{
7859static struct tm ac_aggr;
7860if (sizeof ac_aggr.tm_zone)
7861return 0;
7862 ;
7863 return 0;
7864}
7865_ACEOF
7866rm -f conftest.$ac_objext
ca81d7a0
JD
7867if { (ac_try="$ac_compile"
7868case "(($ac_try" in
7869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7870 *) ac_try_echo=$ac_try;;
7871esac
7872eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7873 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7874 ac_status=$?
edfaf76d
LK
7875 grep -v '^ *+' conftest.er1 >conftest.err
7876 rm -f conftest.er1
7877 cat conftest.err >&5
6bae0ccf 7878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7879 (exit $ac_status); } && {
7880 test -z "$ac_c_werror_flag" ||
7881 test ! -s conftest.err
7882 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7883 ac_cv_member_struct_tm_tm_zone=yes
7884else
7885 echo "$as_me: failed program was:" >&5
19650fd6
AS
7886sed 's/^/| /' conftest.$ac_ext >&5
7887
ca81d7a0 7888 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7889fi
ca81d7a0
JD
7890
7891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7892fi
ca81d7a0
JD
7893
7894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7895fi
ca81d7a0
JD
7896{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7897echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 7898if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7899
c0d27fcc 7900cat >>confdefs.h <<_ACEOF
98418dba 7901#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7902_ACEOF
7903
ba4481b5 7904
98418dba 7905fi
ba4481b5 7906
98418dba 7907if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7908
c0d27fcc 7909cat >>confdefs.h <<\_ACEOF
98418dba 7910#define HAVE_TM_ZONE 1
c0d27fcc 7911_ACEOF
ba4481b5 7912
ba4481b5 7913else
ca81d7a0
JD
7914 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7915echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
7916if test "${ac_cv_have_decl_tzname+set}" = set; then
503d2be0 7917 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7918else
98418dba 7919 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7920/* confdefs.h. */
7921_ACEOF
7922cat confdefs.h >>conftest.$ac_ext
7923cat >>conftest.$ac_ext <<_ACEOF
7924/* end confdefs.h. */
98418dba 7925#include <time.h>
98418dba 7926
98418dba
CW
7927int
7928main ()
7929{
ca81d7a0 7930#ifndef tzname
f053c89f 7931 (void) tzname;
ca81d7a0
JD
7932#endif
7933
98418dba
CW
7934 ;
7935 return 0;
7936}
7937_ACEOF
ca81d7a0
JD
7938rm -f conftest.$ac_objext
7939if { (ac_try="$ac_compile"
7940case "(($ac_try" in
7941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7942 *) ac_try_echo=$ac_try;;
7943esac
7944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7945 (eval "$ac_compile") 2>conftest.er1
98418dba 7946 ac_status=$?
edfaf76d
LK
7947 grep -v '^ *+' conftest.er1 >conftest.err
7948 rm -f conftest.er1
7949 cat conftest.err >&5
c0d27fcc 7950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7951 (exit $ac_status); } && {
7952 test -z "$ac_c_werror_flag" ||
7953 test ! -s conftest.err
7954 } && test -s conftest.$ac_objext; then
ca81d7a0 7955 ac_cv_have_decl_tzname=yes
98418dba
CW
7956else
7957 echo "$as_me: failed program was:" >&5
19650fd6
AS
7958sed 's/^/| /' conftest.$ac_ext >&5
7959
ca81d7a0 7960 ac_cv_have_decl_tzname=no
ba4481b5 7961fi
ca81d7a0
JD
7962
7963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7964fi
ca81d7a0
JD
7965{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
7966echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
7967if test $ac_cv_have_decl_tzname = yes; then
ba4481b5 7968
ca81d7a0
JD
7969cat >>confdefs.h <<_ACEOF
7970#define HAVE_DECL_TZNAME 1
c0d27fcc 7971_ACEOF
503d2be0 7972
ca81d7a0
JD
7973
7974else
7975 cat >>confdefs.h <<_ACEOF
7976#define HAVE_DECL_TZNAME 0
7977_ACEOF
7978
7979
98418dba 7980fi
503d2be0 7981
ca81d7a0
JD
7982
7983 { echo "$as_me:$LINENO: checking for tzname" >&5
7984echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
7985if test "${ac_cv_var_tzname+set}" = set; then
98418dba
CW
7986 echo $ECHO_N "(cached) $ECHO_C" >&6
7987else
7988 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7989/* confdefs.h. */
7990_ACEOF
7991cat confdefs.h >>conftest.$ac_ext
7992cat >>conftest.$ac_ext <<_ACEOF
7993/* end confdefs.h. */
98418dba 7994#include <time.h>
ca81d7a0
JD
7995#if !HAVE_DECL_TZNAME
7996extern char *tzname[];
7997#endif
b936fae4 7998
98418dba
CW
7999int
8000main ()
8001{
ca81d7a0 8002return tzname[0][0];
98418dba
CW
8003 ;
8004 return 0;
8005}
8006_ACEOF
ca81d7a0
JD
8007rm -f conftest.$ac_objext conftest$ac_exeext
8008if { (ac_try="$ac_link"
8009case "(($ac_try" in
8010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8011 *) ac_try_echo=$ac_try;;
8012esac
8013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8014 (eval "$ac_link") 2>conftest.er1
98418dba 8015 ac_status=$?
edfaf76d
LK
8016 grep -v '^ *+' conftest.er1 >conftest.err
8017 rm -f conftest.er1
8018 cat conftest.err >&5
c0d27fcc 8019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8020 (exit $ac_status); } && {
8021 test -z "$ac_c_werror_flag" ||
8022 test ! -s conftest.err
8023 } && test -s conftest$ac_exeext &&
8024 $as_test_x conftest$ac_exeext; then
ca81d7a0 8025 ac_cv_var_tzname=yes
98418dba
CW
8026else
8027 echo "$as_me: failed program was:" >&5
19650fd6
AS
8028sed 's/^/| /' conftest.$ac_ext >&5
8029
ca81d7a0
JD
8030 ac_cv_var_tzname=no
8031fi
6bae0ccf 8032
f053c89f 8033rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
ca81d7a0
JD
8034 conftest$ac_exeext conftest.$ac_ext
8035fi
8036{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
8037echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
8038 if test $ac_cv_var_tzname = yes; then
8039
8040cat >>confdefs.h <<\_ACEOF
8041#define HAVE_TZNAME 1
8042_ACEOF
8043
8044 fi
8045fi
8046
8047{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
8048echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
8049if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
8050 echo $ECHO_N "(cached) $ECHO_C" >&6
8051else
8052 cat >conftest.$ac_ext <<_ACEOF
8053/* confdefs.h. */
8054_ACEOF
8055cat confdefs.h >>conftest.$ac_ext
8056cat >>conftest.$ac_ext <<_ACEOF
8057/* end confdefs.h. */
8058#include <time.h>
8059
8060int
8061main ()
8062{
8063static struct tm ac_aggr;
8064if (ac_aggr.tm_gmtoff)
8065return 0;
8066 ;
8067 return 0;
8068}
8069_ACEOF
8070rm -f conftest.$ac_objext
8071if { (ac_try="$ac_compile"
8072case "(($ac_try" in
8073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8074 *) ac_try_echo=$ac_try;;
8075esac
8076eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8077 (eval "$ac_compile") 2>conftest.er1
8078 ac_status=$?
8079 grep -v '^ *+' conftest.er1 >conftest.err
8080 rm -f conftest.er1
8081 cat conftest.err >&5
8082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8083 (exit $ac_status); } && {
8084 test -z "$ac_c_werror_flag" ||
8085 test ! -s conftest.err
8086 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
8087 ac_cv_member_struct_tm_tm_gmtoff=yes
8088else
8089 echo "$as_me: failed program was:" >&5
8090sed 's/^/| /' conftest.$ac_ext >&5
8091
8092 cat >conftest.$ac_ext <<_ACEOF
8093/* confdefs.h. */
8094_ACEOF
8095cat confdefs.h >>conftest.$ac_ext
8096cat >>conftest.$ac_ext <<_ACEOF
8097/* end confdefs.h. */
8098#include <time.h>
8099
8100int
8101main ()
8102{
8103static struct tm ac_aggr;
8104if (sizeof ac_aggr.tm_gmtoff)
6bae0ccf 8105return 0;
8799b3e4
CW
8106 ;
8107 return 0;
8108}
8109_ACEOF
6bae0ccf 8110rm -f conftest.$ac_objext
ca81d7a0
JD
8111if { (ac_try="$ac_compile"
8112case "(($ac_try" in
8113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8114 *) ac_try_echo=$ac_try;;
8115esac
8116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8117 (eval "$ac_compile") 2>conftest.er1
8799b3e4 8118 ac_status=$?
edfaf76d
LK
8119 grep -v '^ *+' conftest.er1 >conftest.err
8120 rm -f conftest.er1
8121 cat conftest.err >&5
c0d27fcc 8122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8123 (exit $ac_status); } && {
8124 test -z "$ac_c_werror_flag" ||
8125 test ! -s conftest.err
8126 } && test -s conftest.$ac_objext; then
6bae0ccf 8127 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
8128else
8129 echo "$as_me: failed program was:" >&5
19650fd6
AS
8130sed 's/^/| /' conftest.$ac_ext >&5
8131
ca81d7a0 8132 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 8133fi
ca81d7a0
JD
8134
8135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 8136fi
ca81d7a0
JD
8137
8138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 8139fi
ca81d7a0
JD
8140{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
8141echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
8142if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
8143
8144cat >>confdefs.h <<\_ACEOF
8145#define HAVE_TM_GMTOFF 1
8146_ACEOF
8147
8148fi
8149
ca81d7a0
JD
8150{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
8151echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
8152if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
8153 echo $ECHO_N "(cached) $ECHO_C" >&6
8154else
8155 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8156/* confdefs.h. */
8157_ACEOF
8158cat confdefs.h >>conftest.$ac_ext
8159cat >>conftest.$ac_ext <<_ACEOF
8160/* end confdefs.h. */
7862d3a8
AS
8161$ac_includes_default
8162#if HAVE_SYS_SOCKET_H
8163#include <sys/socket.h>
8164#endif
8165#if HAVE_NET_IF_H
96f3a036 8166#include <net/if.h>
7862d3a8 8167#endif
96f3a036
DL
8168
8169int
8170main ()
8171{
8172static struct ifreq ac_aggr;
8173if (ac_aggr.ifr_flags)
8174return 0;
8175 ;
8176 return 0;
8177}
8178_ACEOF
8179rm -f conftest.$ac_objext
ca81d7a0
JD
8180if { (ac_try="$ac_compile"
8181case "(($ac_try" in
8182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8183 *) ac_try_echo=$ac_try;;
8184esac
8185eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8186 (eval "$ac_compile") 2>conftest.er1
96f3a036 8187 ac_status=$?
edfaf76d
LK
8188 grep -v '^ *+' conftest.er1 >conftest.err
8189 rm -f conftest.er1
8190 cat conftest.err >&5
96f3a036 8191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8192 (exit $ac_status); } && {
8193 test -z "$ac_c_werror_flag" ||
8194 test ! -s conftest.err
8195 } && test -s conftest.$ac_objext; then
96f3a036
DL
8196 ac_cv_member_struct_ifreq_ifr_flags=yes
8197else
8198 echo "$as_me: failed program was:" >&5
8199sed 's/^/| /' conftest.$ac_ext >&5
8200
ca81d7a0 8201 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8202/* confdefs.h. */
8203_ACEOF
8204cat confdefs.h >>conftest.$ac_ext
8205cat >>conftest.$ac_ext <<_ACEOF
8206/* end confdefs.h. */
7862d3a8
AS
8207$ac_includes_default
8208#if HAVE_SYS_SOCKET_H
8209#include <sys/socket.h>
8210#endif
8211#if HAVE_NET_IF_H
96f3a036 8212#include <net/if.h>
7862d3a8 8213#endif
96f3a036
DL
8214
8215int
8216main ()
8217{
8218static struct ifreq ac_aggr;
8219if (sizeof ac_aggr.ifr_flags)
8220return 0;
8221 ;
8222 return 0;
8223}
8224_ACEOF
8225rm -f conftest.$ac_objext
ca81d7a0
JD
8226if { (ac_try="$ac_compile"
8227case "(($ac_try" in
8228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8229 *) ac_try_echo=$ac_try;;
8230esac
8231eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8232 (eval "$ac_compile") 2>conftest.er1
96f3a036 8233 ac_status=$?
edfaf76d
LK
8234 grep -v '^ *+' conftest.er1 >conftest.err
8235 rm -f conftest.er1
8236 cat conftest.err >&5
96f3a036 8237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8238 (exit $ac_status); } && {
8239 test -z "$ac_c_werror_flag" ||
8240 test ! -s conftest.err
8241 } && test -s conftest.$ac_objext; then
96f3a036
DL
8242 ac_cv_member_struct_ifreq_ifr_flags=yes
8243else
8244 echo "$as_me: failed program was:" >&5
8245sed 's/^/| /' conftest.$ac_ext >&5
8246
ca81d7a0 8247 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8248fi
ca81d7a0
JD
8249
8250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8251fi
ca81d7a0
JD
8252
8253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8254fi
ca81d7a0
JD
8255{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8256echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8257if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8258
8259cat >>confdefs.h <<_ACEOF
8260#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8261_ACEOF
8262
8263
8264fi
ca81d7a0
JD
8265{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8266echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8267if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8268 echo $ECHO_N "(cached) $ECHO_C" >&6
8269else
8270 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8271/* confdefs.h. */
8272_ACEOF
8273cat confdefs.h >>conftest.$ac_ext
8274cat >>conftest.$ac_ext <<_ACEOF
8275/* end confdefs.h. */
7862d3a8
AS
8276$ac_includes_default
8277#if HAVE_SYS_SOCKET_H
8278#include <sys/socket.h>
8279#endif
8280#if HAVE_NET_IF_H
96f3a036 8281#include <net/if.h>
7862d3a8 8282#endif
96f3a036
DL
8283
8284int
8285main ()
8286{
8287static struct ifreq ac_aggr;
8288if (ac_aggr.ifr_hwaddr)
8289return 0;
8290 ;
8291 return 0;
8292}
8293_ACEOF
8294rm -f conftest.$ac_objext
ca81d7a0
JD
8295if { (ac_try="$ac_compile"
8296case "(($ac_try" in
8297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8298 *) ac_try_echo=$ac_try;;
8299esac
8300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8301 (eval "$ac_compile") 2>conftest.er1
96f3a036 8302 ac_status=$?
edfaf76d
LK
8303 grep -v '^ *+' conftest.er1 >conftest.err
8304 rm -f conftest.er1
8305 cat conftest.err >&5
96f3a036 8306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8307 (exit $ac_status); } && {
8308 test -z "$ac_c_werror_flag" ||
8309 test ! -s conftest.err
8310 } && test -s conftest.$ac_objext; then
96f3a036
DL
8311 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8312else
8313 echo "$as_me: failed program was:" >&5
8314sed 's/^/| /' conftest.$ac_ext >&5
8315
ca81d7a0 8316 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8317/* confdefs.h. */
8318_ACEOF
8319cat confdefs.h >>conftest.$ac_ext
8320cat >>conftest.$ac_ext <<_ACEOF
8321/* end confdefs.h. */
7862d3a8
AS
8322$ac_includes_default
8323#if HAVE_SYS_SOCKET_H
8324#include <sys/socket.h>
8325#endif
8326#if HAVE_NET_IF_H
96f3a036 8327#include <net/if.h>
7862d3a8 8328#endif
96f3a036
DL
8329
8330int
8331main ()
8332{
8333static struct ifreq ac_aggr;
8334if (sizeof ac_aggr.ifr_hwaddr)
8335return 0;
8336 ;
8337 return 0;
8338}
8339_ACEOF
8340rm -f conftest.$ac_objext
ca81d7a0
JD
8341if { (ac_try="$ac_compile"
8342case "(($ac_try" in
8343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8344 *) ac_try_echo=$ac_try;;
8345esac
8346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8347 (eval "$ac_compile") 2>conftest.er1
96f3a036 8348 ac_status=$?
edfaf76d
LK
8349 grep -v '^ *+' conftest.er1 >conftest.err
8350 rm -f conftest.er1
8351 cat conftest.err >&5
96f3a036 8352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8353 (exit $ac_status); } && {
8354 test -z "$ac_c_werror_flag" ||
8355 test ! -s conftest.err
8356 } && test -s conftest.$ac_objext; then
96f3a036
DL
8357 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8358else
8359 echo "$as_me: failed program was:" >&5
8360sed 's/^/| /' conftest.$ac_ext >&5
8361
ca81d7a0 8362 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8363fi
ca81d7a0
JD
8364
8365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8366fi
ca81d7a0
JD
8367
8368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8369fi
ca81d7a0
JD
8370{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8371echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8372if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8373
8374cat >>confdefs.h <<_ACEOF
8375#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8376_ACEOF
8377
8378
8379fi
ca81d7a0
JD
8380{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8381echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8382if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8383 echo $ECHO_N "(cached) $ECHO_C" >&6
8384else
8385 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8386/* confdefs.h. */
8387_ACEOF
8388cat confdefs.h >>conftest.$ac_ext
8389cat >>conftest.$ac_ext <<_ACEOF
8390/* end confdefs.h. */
7862d3a8
AS
8391$ac_includes_default
8392#if HAVE_SYS_SOCKET_H
8393#include <sys/socket.h>
8394#endif
8395#if HAVE_NET_IF_H
96f3a036 8396#include <net/if.h>
7862d3a8 8397#endif
96f3a036
DL
8398
8399int
8400main ()
8401{
8402static struct ifreq ac_aggr;
8403if (ac_aggr.ifr_netmask)
8404return 0;
8405 ;
8406 return 0;
8407}
8408_ACEOF
8409rm -f conftest.$ac_objext
ca81d7a0
JD
8410if { (ac_try="$ac_compile"
8411case "(($ac_try" in
8412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8413 *) ac_try_echo=$ac_try;;
8414esac
8415eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8416 (eval "$ac_compile") 2>conftest.er1
96f3a036 8417 ac_status=$?
edfaf76d
LK
8418 grep -v '^ *+' conftest.er1 >conftest.err
8419 rm -f conftest.er1
8420 cat conftest.err >&5
96f3a036 8421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8422 (exit $ac_status); } && {
8423 test -z "$ac_c_werror_flag" ||
8424 test ! -s conftest.err
8425 } && test -s conftest.$ac_objext; then
96f3a036
DL
8426 ac_cv_member_struct_ifreq_ifr_netmask=yes
8427else
8428 echo "$as_me: failed program was:" >&5
8429sed 's/^/| /' conftest.$ac_ext >&5
8430
ca81d7a0 8431 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8432/* confdefs.h. */
8433_ACEOF
8434cat confdefs.h >>conftest.$ac_ext
8435cat >>conftest.$ac_ext <<_ACEOF
8436/* end confdefs.h. */
7862d3a8
AS
8437$ac_includes_default
8438#if HAVE_SYS_SOCKET_H
8439#include <sys/socket.h>
8440#endif
8441#if HAVE_NET_IF_H
96f3a036 8442#include <net/if.h>
7862d3a8 8443#endif
96f3a036
DL
8444
8445int
8446main ()
8447{
8448static struct ifreq ac_aggr;
8449if (sizeof ac_aggr.ifr_netmask)
8450return 0;
8451 ;
8452 return 0;
8453}
8454_ACEOF
8455rm -f conftest.$ac_objext
ca81d7a0
JD
8456if { (ac_try="$ac_compile"
8457case "(($ac_try" in
8458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8459 *) ac_try_echo=$ac_try;;
8460esac
8461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8462 (eval "$ac_compile") 2>conftest.er1
96f3a036 8463 ac_status=$?
edfaf76d
LK
8464 grep -v '^ *+' conftest.er1 >conftest.err
8465 rm -f conftest.er1
8466 cat conftest.err >&5
96f3a036 8467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8468 (exit $ac_status); } && {
8469 test -z "$ac_c_werror_flag" ||
8470 test ! -s conftest.err
8471 } && test -s conftest.$ac_objext; then
96f3a036
DL
8472 ac_cv_member_struct_ifreq_ifr_netmask=yes
8473else
8474 echo "$as_me: failed program was:" >&5
8475sed 's/^/| /' conftest.$ac_ext >&5
8476
ca81d7a0 8477 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8478fi
ca81d7a0
JD
8479
8480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8481fi
ca81d7a0
JD
8482
8483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8484fi
ca81d7a0
JD
8485{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8486echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8487if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8488
8489cat >>confdefs.h <<_ACEOF
8490#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8491_ACEOF
8492
8493
8494fi
ca81d7a0
JD
8495{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8496echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8497if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8498 echo $ECHO_N "(cached) $ECHO_C" >&6
8499else
8500 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8501/* confdefs.h. */
8502_ACEOF
8503cat confdefs.h >>conftest.$ac_ext
8504cat >>conftest.$ac_ext <<_ACEOF
8505/* end confdefs.h. */
7862d3a8
AS
8506$ac_includes_default
8507#if HAVE_SYS_SOCKET_H
8508#include <sys/socket.h>
8509#endif
8510#if HAVE_NET_IF_H
96f3a036 8511#include <net/if.h>
7862d3a8 8512#endif
96f3a036
DL
8513
8514int
8515main ()
8516{
8517static struct ifreq ac_aggr;
8518if (ac_aggr.ifr_broadaddr)
8519return 0;
8520 ;
8521 return 0;
8522}
8523_ACEOF
8524rm -f conftest.$ac_objext
ca81d7a0
JD
8525if { (ac_try="$ac_compile"
8526case "(($ac_try" in
8527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8528 *) ac_try_echo=$ac_try;;
8529esac
8530eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8531 (eval "$ac_compile") 2>conftest.er1
96f3a036 8532 ac_status=$?
edfaf76d
LK
8533 grep -v '^ *+' conftest.er1 >conftest.err
8534 rm -f conftest.er1
8535 cat conftest.err >&5
96f3a036 8536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8537 (exit $ac_status); } && {
8538 test -z "$ac_c_werror_flag" ||
8539 test ! -s conftest.err
8540 } && test -s conftest.$ac_objext; then
96f3a036
DL
8541 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8542else
8543 echo "$as_me: failed program was:" >&5
8544sed 's/^/| /' conftest.$ac_ext >&5
8545
ca81d7a0 8546 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8547/* confdefs.h. */
8548_ACEOF
8549cat confdefs.h >>conftest.$ac_ext
8550cat >>conftest.$ac_ext <<_ACEOF
8551/* end confdefs.h. */
7862d3a8
AS
8552$ac_includes_default
8553#if HAVE_SYS_SOCKET_H
8554#include <sys/socket.h>
8555#endif
8556#if HAVE_NET_IF_H
96f3a036 8557#include <net/if.h>
7862d3a8 8558#endif
96f3a036
DL
8559
8560int
8561main ()
8562{
8563static struct ifreq ac_aggr;
8564if (sizeof ac_aggr.ifr_broadaddr)
8565return 0;
8566 ;
8567 return 0;
8568}
8569_ACEOF
8570rm -f conftest.$ac_objext
ca81d7a0
JD
8571if { (ac_try="$ac_compile"
8572case "(($ac_try" in
8573 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8574 *) ac_try_echo=$ac_try;;
8575esac
8576eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8577 (eval "$ac_compile") 2>conftest.er1
96f3a036 8578 ac_status=$?
edfaf76d
LK
8579 grep -v '^ *+' conftest.er1 >conftest.err
8580 rm -f conftest.er1
8581 cat conftest.err >&5
96f3a036 8582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8583 (exit $ac_status); } && {
8584 test -z "$ac_c_werror_flag" ||
8585 test ! -s conftest.err
8586 } && test -s conftest.$ac_objext; then
96f3a036
DL
8587 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8588else
8589 echo "$as_me: failed program was:" >&5
8590sed 's/^/| /' conftest.$ac_ext >&5
8591
ca81d7a0 8592 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8593fi
ca81d7a0
JD
8594
8595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8596fi
ca81d7a0
JD
8597
8598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8599fi
ca81d7a0
JD
8600{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8601echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8602if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8603
8604cat >>confdefs.h <<_ACEOF
8605#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8606_ACEOF
8607
8608
8609fi
ca81d7a0
JD
8610{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8611echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8612if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8613 echo $ECHO_N "(cached) $ECHO_C" >&6
8614else
8615 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8616/* confdefs.h. */
8617_ACEOF
8618cat confdefs.h >>conftest.$ac_ext
8619cat >>conftest.$ac_ext <<_ACEOF
8620/* end confdefs.h. */
7862d3a8
AS
8621$ac_includes_default
8622#if HAVE_SYS_SOCKET_H
8623#include <sys/socket.h>
8624#endif
8625#if HAVE_NET_IF_H
96f3a036 8626#include <net/if.h>
7862d3a8 8627#endif
96f3a036
DL
8628
8629int
8630main ()
8631{
8632static struct ifreq ac_aggr;
8633if (ac_aggr.ifr_addr)
8634return 0;
8635 ;
8636 return 0;
8637}
8638_ACEOF
8639rm -f conftest.$ac_objext
ca81d7a0
JD
8640if { (ac_try="$ac_compile"
8641case "(($ac_try" in
8642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8643 *) ac_try_echo=$ac_try;;
8644esac
8645eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8646 (eval "$ac_compile") 2>conftest.er1
96f3a036 8647 ac_status=$?
edfaf76d
LK
8648 grep -v '^ *+' conftest.er1 >conftest.err
8649 rm -f conftest.er1
8650 cat conftest.err >&5
96f3a036 8651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8652 (exit $ac_status); } && {
8653 test -z "$ac_c_werror_flag" ||
8654 test ! -s conftest.err
8655 } && test -s conftest.$ac_objext; then
96f3a036
DL
8656 ac_cv_member_struct_ifreq_ifr_addr=yes
8657else
8658 echo "$as_me: failed program was:" >&5
8659sed 's/^/| /' conftest.$ac_ext >&5
8660
ca81d7a0 8661 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8662/* confdefs.h. */
8663_ACEOF
8664cat confdefs.h >>conftest.$ac_ext
8665cat >>conftest.$ac_ext <<_ACEOF
8666/* end confdefs.h. */
7862d3a8
AS
8667$ac_includes_default
8668#if HAVE_SYS_SOCKET_H
8669#include <sys/socket.h>
8670#endif
8671#if HAVE_NET_IF_H
96f3a036 8672#include <net/if.h>
7862d3a8 8673#endif
96f3a036
DL
8674
8675int
8676main ()
8677{
8678static struct ifreq ac_aggr;
8679if (sizeof ac_aggr.ifr_addr)
8680return 0;
8681 ;
8682 return 0;
8683}
8684_ACEOF
8685rm -f conftest.$ac_objext
ca81d7a0
JD
8686if { (ac_try="$ac_compile"
8687case "(($ac_try" in
8688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8689 *) ac_try_echo=$ac_try;;
8690esac
8691eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8692 (eval "$ac_compile") 2>conftest.er1
96f3a036 8693 ac_status=$?
edfaf76d
LK
8694 grep -v '^ *+' conftest.er1 >conftest.err
8695 rm -f conftest.er1
8696 cat conftest.err >&5
96f3a036 8697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8698 (exit $ac_status); } && {
8699 test -z "$ac_c_werror_flag" ||
8700 test ! -s conftest.err
8701 } && test -s conftest.$ac_objext; then
96f3a036
DL
8702 ac_cv_member_struct_ifreq_ifr_addr=yes
8703else
8704 echo "$as_me: failed program was:" >&5
8705sed 's/^/| /' conftest.$ac_ext >&5
8706
ca81d7a0 8707 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8708fi
ca81d7a0
JD
8709
8710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8711fi
ca81d7a0
JD
8712
8713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8714fi
ca81d7a0
JD
8715{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8716echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8717if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8718
8719cat >>confdefs.h <<_ACEOF
8720#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8721_ACEOF
8722
8723
8724fi
8725
8799b3e4 8726
8799b3e4 8727
ca81d7a0
JD
8728{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8729echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8730if test "$ac_cv_prog_cc_c89" != no; then
8731 { echo "$as_me:$LINENO: result: yes" >&5
8732echo "${ECHO_T}yes" >&6; }
98418dba 8733
c0d27fcc 8734cat >>confdefs.h <<\_ACEOF
98418dba 8735#define PROTOTYPES 1
c0d27fcc
MR
8736_ACEOF
8737
8738
8739cat >>confdefs.h <<\_ACEOF
8740#define __PROTOTYPES 1
8741_ACEOF
98418dba
CW
8742
8743else
ca81d7a0
JD
8744 { echo "$as_me:$LINENO: result: no" >&5
8745echo "${ECHO_T}no" >&6; }
98418dba
CW
8746fi
8747
ca81d7a0
JD
8748{ echo "$as_me:$LINENO: checking for working volatile" >&5
8749echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8750if test "${ac_cv_c_volatile+set}" = set; then
8751 echo $ECHO_N "(cached) $ECHO_C" >&6
8752else
8753 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8754/* confdefs.h. */
8755_ACEOF
8756cat confdefs.h >>conftest.$ac_ext
8757cat >>conftest.$ac_ext <<_ACEOF
8758/* end confdefs.h. */
98418dba 8759
98418dba
CW
8760int
8761main ()
8762{
8763
8764volatile int x;
ca81d7a0
JD
8765int * volatile y = (int *) 0;
8766return !x && !y;
98418dba
CW
8767 ;
8768 return 0;
8769}
8770_ACEOF
8771rm -f conftest.$ac_objext
ca81d7a0
JD
8772if { (ac_try="$ac_compile"
8773case "(($ac_try" in
8774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8775 *) ac_try_echo=$ac_try;;
8776esac
8777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8778 (eval "$ac_compile") 2>conftest.er1
98418dba 8779 ac_status=$?
edfaf76d
LK
8780 grep -v '^ *+' conftest.er1 >conftest.err
8781 rm -f conftest.er1
8782 cat conftest.err >&5
c0d27fcc 8783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8784 (exit $ac_status); } && {
8785 test -z "$ac_c_werror_flag" ||
8786 test ! -s conftest.err
8787 } && test -s conftest.$ac_objext; then
98418dba
CW
8788 ac_cv_c_volatile=yes
8789else
8790 echo "$as_me: failed program was:" >&5
19650fd6
AS
8791sed 's/^/| /' conftest.$ac_ext >&5
8792
ca81d7a0 8793 ac_cv_c_volatile=no
98418dba 8794fi
ca81d7a0
JD
8795
8796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8797fi
ca81d7a0
JD
8798{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8799echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8800if test $ac_cv_c_volatile = no; then
8801
c0d27fcc 8802cat >>confdefs.h <<\_ACEOF
98418dba 8803#define volatile
c0d27fcc 8804_ACEOF
98418dba
CW
8805
8806fi
8807
ca81d7a0
JD
8808{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8809echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8810if test "${ac_cv_c_const+set}" = set; then
8811 echo $ECHO_N "(cached) $ECHO_C" >&6
8812else
8813 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8814/* confdefs.h. */
8815_ACEOF
8816cat confdefs.h >>conftest.$ac_ext
8817cat >>conftest.$ac_ext <<_ACEOF
8818/* end confdefs.h. */
98418dba 8819
98418dba
CW
8820int
8821main ()
8822{
8823/* FIXME: Include the comments suggested by Paul. */
8824#ifndef __cplusplus
8825 /* Ultrix mips cc rejects this. */
8826 typedef int charset[2];
f053c89f 8827 const charset cs;
98418dba 8828 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
8829 char const *const *pcpcc;
8830 char **ppc;
98418dba
CW
8831 /* NEC SVR4.0.2 mips cc rejects this. */
8832 struct point {int x, y;};
8833 static struct point const zero = {0,0};
8834 /* AIX XL C 1.02.0.0 rejects this.
8835 It does not let you subtract one const X* pointer from another in
8836 an arm of an if-expression whose if-part is not a constant
8837 expression */
8838 const char *g = "string";
f053c89f 8839 pcpcc = &g + (g ? g-g : 0);
98418dba 8840 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
8841 ++pcpcc;
8842 ppc = (char**) pcpcc;
8843 pcpcc = (char const *const *) ppc;
98418dba
CW
8844 { /* SCO 3.2v4 cc rejects this. */
8845 char *t;
8846 char const *s = 0 ? (char *) 0 : (char const *) 0;
8847
8848 *t++ = 0;
ca81d7a0 8849 if (s) return 0;
98418dba
CW
8850 }
8851 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8852 int x[] = {25, 17};
8853 const int *foo = &x[0];
8854 ++foo;
8855 }
8856 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8857 typedef const int *iptr;
8858 iptr p = 0;
8859 ++p;
8860 }
8861 { /* AIX XL C 1.02.0.0 rejects this saying
8862 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8863 struct s { int j; const int *ap[3]; };
8864 struct s *b; b->j = 5;
8865 }
8866 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8867 const int foo = 10;
ca81d7a0 8868 if (!foo) return 0;
98418dba 8869 }
f053c89f 8870 return !cs[0] && !zero.x;
98418dba
CW
8871#endif
8872
8873 ;
8874 return 0;
8875}
8876_ACEOF
8877rm -f conftest.$ac_objext
ca81d7a0
JD
8878if { (ac_try="$ac_compile"
8879case "(($ac_try" in
8880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8881 *) ac_try_echo=$ac_try;;
8882esac
8883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8884 (eval "$ac_compile") 2>conftest.er1
98418dba 8885 ac_status=$?
edfaf76d
LK
8886 grep -v '^ *+' conftest.er1 >conftest.err
8887 rm -f conftest.er1
8888 cat conftest.err >&5
c0d27fcc 8889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8890 (exit $ac_status); } && {
8891 test -z "$ac_c_werror_flag" ||
8892 test ! -s conftest.err
8893 } && test -s conftest.$ac_objext; then
98418dba
CW
8894 ac_cv_c_const=yes
8895else
8896 echo "$as_me: failed program was:" >&5
19650fd6
AS
8897sed 's/^/| /' conftest.$ac_ext >&5
8898
ca81d7a0 8899 ac_cv_c_const=no
98418dba 8900fi
ca81d7a0
JD
8901
8902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8903fi
ca81d7a0
JD
8904{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8905echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8906if test $ac_cv_c_const = no; then
8907
c0d27fcc 8908cat >>confdefs.h <<\_ACEOF
98418dba 8909#define const
c0d27fcc 8910_ACEOF
98418dba
CW
8911
8912fi
8913
ca81d7a0
JD
8914{ echo "$as_me:$LINENO: checking for void * support" >&5
8915echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
8916if test "${emacs_cv_void_star+set}" = set; then
8917 echo $ECHO_N "(cached) $ECHO_C" >&6
8918else
8919 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8920/* confdefs.h. */
8921_ACEOF
8922cat confdefs.h >>conftest.$ac_ext
8923cat >>conftest.$ac_ext <<_ACEOF
8924/* end confdefs.h. */
98418dba 8925
98418dba
CW
8926int
8927main ()
8928{
8929void * foo;
8930 ;
8931 return 0;
8932}
8933_ACEOF
8934rm -f conftest.$ac_objext
ca81d7a0
JD
8935if { (ac_try="$ac_compile"
8936case "(($ac_try" in
8937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8938 *) ac_try_echo=$ac_try;;
8939esac
8940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8941 (eval "$ac_compile") 2>conftest.er1
98418dba 8942 ac_status=$?
edfaf76d
LK
8943 grep -v '^ *+' conftest.er1 >conftest.err
8944 rm -f conftest.er1
8945 cat conftest.err >&5
c0d27fcc 8946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8947 (exit $ac_status); } && {
8948 test -z "$ac_c_werror_flag" ||
8949 test ! -s conftest.err
8950 } && test -s conftest.$ac_objext; then
98418dba
CW
8951 emacs_cv_void_star=yes
8952else
8953 echo "$as_me: failed program was:" >&5
19650fd6
AS
8954sed 's/^/| /' conftest.$ac_ext >&5
8955
ca81d7a0 8956 emacs_cv_void_star=no
98418dba 8957fi
ca81d7a0
JD
8958
8959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8960fi
ca81d7a0
JD
8961{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
8962echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 8963if test $emacs_cv_void_star = yes; then
c0d27fcc 8964 cat >>confdefs.h <<\_ACEOF
98418dba 8965#define POINTER_TYPE void
c0d27fcc 8966_ACEOF
98418dba
CW
8967
8968else
c0d27fcc 8969 cat >>confdefs.h <<\_ACEOF
98418dba 8970#define POINTER_TYPE char
c0d27fcc 8971_ACEOF
98418dba
CW
8972
8973fi
8974
c0d27fcc 8975
4494a266
JD
8976
8977
cd958eb3 8978
ca81d7a0
JD
8979{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8980echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
8981set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
8982if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
8983 echo $ECHO_N "(cached) $ECHO_C" >&6
8984else
c0d27fcc 8985 cat >conftest.make <<\_ACEOF
ca81d7a0 8986SHELL = /bin/sh
98418dba 8987all:
ca81d7a0 8988 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 8989_ACEOF
98418dba 8990# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8991case `${MAKE-make} -f conftest.make 2>/dev/null` in
8992 *@@@%%%=?*=@@@%%%*)
8993 eval ac_cv_prog_make_${ac_make}_set=yes;;
8994 *)
8995 eval ac_cv_prog_make_${ac_make}_set=no;;
8996esac
4b411bfe 8997rm -f conftest.make
98418dba 8998fi
ca81d7a0
JD
8999if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
9000 { echo "$as_me:$LINENO: result: yes" >&5
9001echo "${ECHO_T}yes" >&6; }
98418dba
CW
9002 SET_MAKE=
9003else
ca81d7a0
JD
9004 { echo "$as_me:$LINENO: result: no" >&5
9005echo "${ECHO_T}no" >&6; }
98418dba
CW
9006 SET_MAKE="MAKE=${MAKE-make}"
9007fi
9008
c0d27fcc 9009
ca81d7a0
JD
9010{ echo "$as_me:$LINENO: checking for long file names" >&5
9011echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
9012if test "${ac_cv_sys_long_file_names+set}" = set; then
9013 echo $ECHO_N "(cached) $ECHO_C" >&6
9014else
9015 ac_cv_sys_long_file_names=yes
9016# Test for long file names in all the places we know might matter:
9017# . the current directory, where building will happen
9018# $prefix/lib where we will be installing things
9019# $exec_prefix/lib likewise
98418dba 9020# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
9021# /tmp where it might want to write temporary files
9022# /var/tmp likewise
9023# /usr/tmp likewise
ca81d7a0
JD
9024for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
9025 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
9026 # in the usual case where exec_prefix is '${prefix}'.
9027 case $ac_dir in #(
9028 . | /* | ?:[\\/]*) ;; #(
9029 *) continue;;
9030 esac
9031 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 9032 ac_xdir=$ac_dir/cf$$
ca81d7a0 9033 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
9034 ac_tf1=$ac_xdir/conftest9012345
9035 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 9036 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 9037 ac_cv_sys_long_file_names=no
ca81d7a0
JD
9038 rm -f -r "$ac_xdir" 2>/dev/null
9039 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
9040done
9041fi
ca81d7a0
JD
9042{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
9043echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
9044if test $ac_cv_sys_long_file_names = yes; then
9045
c0d27fcc 9046cat >>confdefs.h <<\_ACEOF
98418dba 9047#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 9048_ACEOF
98418dba
CW
9049
9050fi
9051
c0d27fcc 9052
98418dba
CW
9053#### Choose a window system.
9054
ca81d7a0
JD
9055{ echo "$as_me:$LINENO: checking for X" >&5
9056echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 9057
c0d27fcc 9058
ca81d7a0 9059# Check whether --with-x was given.
98418dba 9060if test "${with_x+set}" = set; then
ca81d7a0
JD
9061 withval=$with_x;
9062fi
98418dba 9063
98418dba
CW
9064# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9065if test "x$with_x" = xno; then
9066 # The user explicitly disabled X.
9067 have_x=disabled
9068else
ca81d7a0
JD
9069 case $x_includes,$x_libraries in #(
9070 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
9071echo "$as_me: error: Cannot use X directory names containing '" >&2;}
9072 { (exit 1); exit 1; }; };; #(
9073 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
9074 echo $ECHO_N "(cached) $ECHO_C" >&6
9075else
9076 # One or both of the vars are not set, and there is no cached value.
9077ac_x_includes=no ac_x_libraries=no
ca81d7a0 9078rm -f -r conftest.dir
98418dba
CW
9079if mkdir conftest.dir; then
9080 cd conftest.dir
c0d27fcc 9081 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
9082incroot:
9083 @echo incroot='${INCROOT}'
9084usrlibdir:
9085 @echo usrlibdir='${USRLIBDIR}'
9086libdir:
9087 @echo libdir='${LIBDIR}'
9088_ACEOF
9089 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 9090 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
9091 for ac_var in incroot usrlibdir libdir; do
9092 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
9093 done
98418dba
CW
9094 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9095 for ac_extension in a so sl; do
ca81d7a0
JD
9096 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
9097 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 9098 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
9099 fi
9100 done
9101 # Screen out bogus values from the imake configuration. They are
9102 # bogus both because they are the default anyway, and because
9103 # using them would break gcc on systems where it needs fixed includes.
9104 case $ac_im_incroot in
ca81d7a0 9105 /usr/include) ac_x_includes= ;;
98418dba
CW
9106 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9107 esac
9108 case $ac_im_usrlibdir in
9109 /usr/lib | /lib) ;;
9110 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9111 esac
9112 fi
9113 cd ..
ca81d7a0 9114 rm -f -r conftest.dir
98418dba
CW
9115fi
9116
9117# Standard set of common directories for X headers.
9118# Check X11 before X11Rn because it is often a symlink to the current release.
9119ac_x_header_dirs='
9120/usr/X11/include
9121/usr/X11R6/include
9122/usr/X11R5/include
9123/usr/X11R4/include
9124
9125/usr/include/X11
9126/usr/include/X11R6
9127/usr/include/X11R5
9128/usr/include/X11R4
9129
9130/usr/local/X11/include
9131/usr/local/X11R6/include
9132/usr/local/X11R5/include
9133/usr/local/X11R4/include
9134
9135/usr/local/include/X11
9136/usr/local/include/X11R6
9137/usr/local/include/X11R5
9138/usr/local/include/X11R4
9139
9140/usr/X386/include
9141/usr/x386/include
9142/usr/XFree86/include/X11
9143
9144/usr/include
9145/usr/local/include
9146/usr/unsupported/include
9147/usr/athena/include
9148/usr/local/x11r5/include
9149/usr/lpp/Xamples/include
9150
9151/usr/openwin/include
9152/usr/openwin/share/include'
9153
9154if test "$ac_x_includes" = no; then
ca81d7a0 9155 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
9156 # First, try using that file with no special directory specified.
9157 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9158/* confdefs.h. */
9159_ACEOF
9160cat confdefs.h >>conftest.$ac_ext
9161cat >>conftest.$ac_ext <<_ACEOF
9162/* end confdefs.h. */
ca81d7a0 9163#include <X11/Xlib.h>
98418dba 9164_ACEOF
ca81d7a0
JD
9165if { (ac_try="$ac_cpp conftest.$ac_ext"
9166case "(($ac_try" in
9167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9168 *) ac_try_echo=$ac_try;;
9169esac
9170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9171 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9172 ac_status=$?
6bae0ccf 9173 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9174 rm -f conftest.er1
9175 cat conftest.err >&5
c0d27fcc 9176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9177 (exit $ac_status); } >/dev/null && {
9178 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9179 test ! -s conftest.err
9180 }; then
98418dba
CW
9181 # We can compile using X headers with no special include directory.
9182ac_x_includes=
9183else
9184 echo "$as_me: failed program was:" >&5
19650fd6
AS
9185sed 's/^/| /' conftest.$ac_ext >&5
9186
98418dba 9187 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 9188 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
9189 ac_x_includes=$ac_dir
9190 break
9191 fi
9192done
9193fi
ca81d7a0 9194
98418dba
CW
9195rm -f conftest.err conftest.$ac_ext
9196fi # $ac_x_includes = no
9197
9198if test "$ac_x_libraries" = no; then
9199 # Check for the libraries.
9200 # See if we find them without any special options.
9201 # Don't add to $LIBS permanently.
9202 ac_save_LIBS=$LIBS
f053c89f 9203 LIBS="-lX11 $LIBS"
98418dba 9204 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9205/* confdefs.h. */
9206_ACEOF
9207cat confdefs.h >>conftest.$ac_ext
9208cat >>conftest.$ac_ext <<_ACEOF
9209/* end confdefs.h. */
ca81d7a0 9210#include <X11/Xlib.h>
98418dba
CW
9211int
9212main ()
9213{
ca81d7a0 9214XrmInitialize ()
98418dba
CW
9215 ;
9216 return 0;
9217}
9218_ACEOF
9219rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9220if { (ac_try="$ac_link"
9221case "(($ac_try" in
9222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9223 *) ac_try_echo=$ac_try;;
9224esac
9225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9226 (eval "$ac_link") 2>conftest.er1
98418dba 9227 ac_status=$?
edfaf76d
LK
9228 grep -v '^ *+' conftest.er1 >conftest.err
9229 rm -f conftest.er1
9230 cat conftest.err >&5
c0d27fcc 9231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9232 (exit $ac_status); } && {
9233 test -z "$ac_c_werror_flag" ||
9234 test ! -s conftest.err
9235 } && test -s conftest$ac_exeext &&
9236 $as_test_x conftest$ac_exeext; then
98418dba
CW
9237 LIBS=$ac_save_LIBS
9238# We can link X programs with no special library path.
9239ac_x_libraries=
9240else
9241 echo "$as_me: failed program was:" >&5
19650fd6
AS
9242sed 's/^/| /' conftest.$ac_ext >&5
9243
ca81d7a0 9244 LIBS=$ac_save_LIBS
98418dba
CW
9245for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9246do
9247 # Don't even attempt the hair of trying to link an X program!
9248 for ac_extension in a so sl; do
f053c89f 9249 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9250 ac_x_libraries=$ac_dir
9251 break 2
9252 fi
9253 done
9254done
9255fi
ca81d7a0 9256
f053c89f 9257rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9258 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9259fi # $ac_x_libraries = no
9260
ca81d7a0
JD
9261case $ac_x_includes,$ac_x_libraries in #(
9262 no,* | *,no | *\'*)
9263 # Didn't find X, or a directory has "'" in its name.
9264 ac_cv_have_x="have_x=no";; #(
9265 *)
9266 # Record where we found X for the cache.
9267 ac_cv_have_x="have_x=yes\
9268 ac_x_includes='$ac_x_includes'\
9269 ac_x_libraries='$ac_x_libraries'"
9270esac
4b411bfe 9271fi
ca81d7a0
JD
9272;; #(
9273 *) have_x=yes;;
9274 esac
98418dba
CW
9275 eval "$ac_cv_have_x"
9276fi # $with_x != no
9277
9278if test "$have_x" != yes; then
ca81d7a0
JD
9279 { echo "$as_me:$LINENO: result: $have_x" >&5
9280echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9281 no_x=yes
9282else
9283 # If each of the values was on the command line, it overrides each guess.
9284 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9285 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9286 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9287 ac_cv_have_x="have_x=yes\
9288 ac_x_includes='$x_includes'\
9289 ac_x_libraries='$x_libraries'"
9290 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9291echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9292fi
9293
9294if test "$no_x" = yes; then
9295 window_system=none
9296else
9297 window_system=x11
9298fi
9299
92d1ccf4
AS
9300if test "${x_libraries}" != NONE; then
9301 if test -n "${x_libraries}"; then
9302 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9303 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9304 fi
98418dba 9305 x_default_search_path=""
92d1ccf4
AS
9306 x_search_path=${x_libraries}
9307 if test -z "${x_search_path}"; then
9308 x_search_path=/usr/lib
9309 fi
9310 for x_library in `echo ${x_search_path}: | \
9311 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9312 x_search_path="\
9313${x_library}/X11/%L/%T/%N%C%S:\
9314${x_library}/X11/%l/%T/%N%C%S:\
9315${x_library}/X11/%T/%N%C%S:\
9316${x_library}/X11/%L/%T/%N%S:\
9317${x_library}/X11/%l/%T/%N%S:\
9318${x_library}/X11/%T/%N%S"
9319 if test x"${x_default_search_path}" = x; then
9320 x_default_search_path=${x_search_path}
9321 else
9322 x_default_search_path="${x_search_path}:${x_default_search_path}"
9323 fi
9324 done
9325fi
9326if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9327 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9328fi
9329
9330if test x"${x_includes}" = x; then
9331 bitmapdir=/usr/include/X11/bitmaps
9332else
9333 # accumulate include directories that have X11 bitmap subdirectories
9334 bmd_acc="dummyval"
9335 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9336 if test -d "${bmd}/X11/bitmaps"; then
9337 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9338 fi
9339 if test -d "${bmd}/bitmaps"; then
9340 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9341 fi
9342 done
9343 if test ${bmd_acc} != "dummyval"; then
9344 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9345 fi
9346fi
9347
5d6da11e 9348HAVE_CARBON=no
1d4d5604
YM
9349if test "${with_carbon}" != no; then
9350 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
ca81d7a0
JD
9351 { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9352echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9353if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9354 echo $ECHO_N "(cached) $ECHO_C" >&6
9355fi
ca81d7a0
JD
9356{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9357echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9358else
9359 # Is the header compilable?
ca81d7a0
JD
9360{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9361echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
5d6da11e
YM
9362cat >conftest.$ac_ext <<_ACEOF
9363/* confdefs.h. */
9364_ACEOF
9365cat confdefs.h >>conftest.$ac_ext
9366cat >>conftest.$ac_ext <<_ACEOF
9367/* end confdefs.h. */
9368$ac_includes_default
9369#include <Carbon/Carbon.h>
9370_ACEOF
9371rm -f conftest.$ac_objext
ca81d7a0
JD
9372if { (ac_try="$ac_compile"
9373case "(($ac_try" in
9374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9375 *) ac_try_echo=$ac_try;;
9376esac
9377eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9378 (eval "$ac_compile") 2>conftest.er1
5d6da11e 9379 ac_status=$?
edfaf76d
LK
9380 grep -v '^ *+' conftest.er1 >conftest.err
9381 rm -f conftest.er1
9382 cat conftest.err >&5
5d6da11e 9383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9384 (exit $ac_status); } && {
9385 test -z "$ac_c_werror_flag" ||
9386 test ! -s conftest.err
9387 } && test -s conftest.$ac_objext; then
5d6da11e
YM
9388 ac_header_compiler=yes
9389else
9390 echo "$as_me: failed program was:" >&5
9391sed 's/^/| /' conftest.$ac_ext >&5
9392
ca81d7a0 9393 ac_header_compiler=no
5d6da11e 9394fi
ca81d7a0
JD
9395
9396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9397{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9398echo "${ECHO_T}$ac_header_compiler" >&6; }
5d6da11e
YM
9399
9400# Is the header present?
ca81d7a0
JD
9401{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9402echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
5d6da11e
YM
9403cat >conftest.$ac_ext <<_ACEOF
9404/* confdefs.h. */
9405_ACEOF
9406cat confdefs.h >>conftest.$ac_ext
9407cat >>conftest.$ac_ext <<_ACEOF
9408/* end confdefs.h. */
9409#include <Carbon/Carbon.h>
9410_ACEOF
ca81d7a0
JD
9411if { (ac_try="$ac_cpp conftest.$ac_ext"
9412case "(($ac_try" in
9413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9414 *) ac_try_echo=$ac_try;;
9415esac
9416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9417 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5d6da11e
YM
9418 ac_status=$?
9419 grep -v '^ *+' conftest.er1 >conftest.err
9420 rm -f conftest.er1
9421 cat conftest.err >&5
9422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9423 (exit $ac_status); } >/dev/null && {
9424 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9425 test ! -s conftest.err
9426 }; then
5d6da11e
YM
9427 ac_header_preproc=yes
9428else
9429 echo "$as_me: failed program was:" >&5
9430sed 's/^/| /' conftest.$ac_ext >&5
9431
9432 ac_header_preproc=no
9433fi
ca81d7a0 9434
5d6da11e 9435rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9436{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9437echo "${ECHO_T}$ac_header_preproc" >&6; }
5d6da11e
YM
9438
9439# So? What about this header?
edfaf76d
LK
9440case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9441 yes:no: )
5d6da11e
YM
9442 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9443echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9444 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
9445echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
9446 ac_header_preproc=yes
5d6da11e 9447 ;;
edfaf76d 9448 no:yes:* )
5d6da11e
YM
9449 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9450echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
9451 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9452echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9453 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
9454echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
9455 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
9456echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
9457 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9458echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9459 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
9460echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9461
5d6da11e
YM
9462 ;;
9463esac
ca81d7a0
JD
9464{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9465echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9466if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9467 echo $ECHO_N "(cached) $ECHO_C" >&6
9468else
9469 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
9470fi
ca81d7a0
JD
9471{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9472echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9473
9474fi
9475if test $ac_cv_header_Carbon_Carbon_h = yes; then
9476 HAVE_CARBON=yes
9477fi
9478
9479
1d4d5604
YM
9480fi
9481if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
9482 if test "${with_carbon+set}" != set \
9483 && test "${carbon_appdir_x+set}" != set; then
ec8fcb10
YM
9484 for var in with_x with_x_toolkit with_gtk with_xim \
9485 with_xpm with_jpeg with_tiff with_gif with_png; do
9486 if eval test \"\${$var+set}\" = set; then
9487 HAVE_CARBON=no
9488 break
9489 fi
9490 done
5d6da11e
YM
9491 fi
9492fi
1d4d5604
YM
9493if test "${HAVE_CARBON}" = yes; then
9494 window_system=mac
9495fi
9496
9497case "${window_system}" in
9498 x11 )
9499 HAVE_X_WINDOWS=yes
9500 HAVE_X11=yes
9501 case "${with_x_toolkit}" in
9502 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9503 motif ) USE_X_TOOLKIT=MOTIF ;;
9504 gtk ) with_gtk=yes
9505 USE_X_TOOLKIT=none ;;
9506 no ) USE_X_TOOLKIT=none ;;
9507 * ) USE_X_TOOLKIT=maybe ;;
9508 esac
9509 ;;
9510 mac | none )
9511 HAVE_X_WINDOWS=no
9512 HAVE_X11=no
9513 USE_X_TOOLKIT=none
9514 ;;
9515esac
9516
9517### If we're using X11, we should use the X menu package.
9518HAVE_MENUS=no
9519case ${HAVE_X11} in
9520 yes ) HAVE_MENUS=yes ;;
9521esac
9522
9523if test "${opsys}" = "hpux9"; then
9524 case "${x_libraries}" in
9525 *X11R4* )
9526 opsysfile="s/hpux9-x11r4.h"
9527 ;;
9528 esac
9529fi
9530
9531if test "${opsys}" = "hpux9shr"; then
9532 case "${x_libraries}" in
9533 *X11R4* )
9534 opsysfile="s/hpux9shxr4.h"
9535 ;;
9536 esac
9537fi
5d6da11e 9538
98418dba
CW
9539### Compute the unexec source name from the object name.
9540UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
9541
9542# Do the opsystem or machine files prohibit the use of the GNU malloc?
9543# Assume not, until told otherwise.
9544GNU_MALLOC=yes
9545doug_lea_malloc=yes
ca81d7a0
JD
9546{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9547echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9548if test "${ac_cv_func_malloc_get_state+set}" = set; then
9549 echo $ECHO_N "(cached) $ECHO_C" >&6
9550else
9551 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9552/* confdefs.h. */
9553_ACEOF
9554cat confdefs.h >>conftest.$ac_ext
9555cat >>conftest.$ac_ext <<_ACEOF
9556/* end confdefs.h. */
edfaf76d
LK
9557/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9558 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9559#define malloc_get_state innocuous_malloc_get_state
9560
98418dba 9561/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9562 which can conflict with char malloc_get_state (); below.
9563 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9564 <limits.h> exists even on freestanding compilers. */
edfaf76d 9565
19650fd6
AS
9566#ifdef __STDC__
9567# include <limits.h>
9568#else
9569# include <assert.h>
9570#endif
edfaf76d
LK
9571
9572#undef malloc_get_state
9573
ca81d7a0
JD
9574/* Override any GCC internal prototype to avoid an error.
9575 Use char because int might match the return type of a GCC
9576 builtin and then its argument prototype would still apply. */
98418dba
CW
9577#ifdef __cplusplus
9578extern "C"
9579#endif
98418dba 9580char malloc_get_state ();
98418dba
CW
9581/* The GNU C library defines this for functions which it implements
9582 to always fail with ENOSYS. Some functions are actually named
9583 something starting with __ and the normal name is an alias. */
ca81d7a0 9584#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9585choke me
98418dba
CW
9586#endif
9587
19650fd6
AS
9588int
9589main ()
9590{
ca81d7a0 9591return malloc_get_state ();
98418dba
CW
9592 ;
9593 return 0;
9594}
9595_ACEOF
9596rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9597if { (ac_try="$ac_link"
9598case "(($ac_try" in
9599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9600 *) ac_try_echo=$ac_try;;
9601esac
9602eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9603 (eval "$ac_link") 2>conftest.er1
98418dba 9604 ac_status=$?
edfaf76d
LK
9605 grep -v '^ *+' conftest.er1 >conftest.err
9606 rm -f conftest.er1
9607 cat conftest.err >&5
c0d27fcc 9608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9609 (exit $ac_status); } && {
9610 test -z "$ac_c_werror_flag" ||
9611 test ! -s conftest.err
9612 } && test -s conftest$ac_exeext &&
9613 $as_test_x conftest$ac_exeext; then
98418dba
CW
9614 ac_cv_func_malloc_get_state=yes
9615else
9616 echo "$as_me: failed program was:" >&5
19650fd6
AS
9617sed 's/^/| /' conftest.$ac_ext >&5
9618
ca81d7a0 9619 ac_cv_func_malloc_get_state=no
98418dba 9620fi
ca81d7a0 9621
f053c89f 9622rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9623 conftest$ac_exeext conftest.$ac_ext
98418dba 9624fi
ca81d7a0
JD
9625{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9626echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9627if test $ac_cv_func_malloc_get_state = yes; then
9628 :
9629else
9630 doug_lea_malloc=no
9631fi
9632
ca81d7a0
JD
9633{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9634echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9635if test "${ac_cv_func_malloc_set_state+set}" = set; then
9636 echo $ECHO_N "(cached) $ECHO_C" >&6
9637else
9638 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9639/* confdefs.h. */
9640_ACEOF
9641cat confdefs.h >>conftest.$ac_ext
9642cat >>conftest.$ac_ext <<_ACEOF
9643/* end confdefs.h. */
edfaf76d
LK
9644/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9645 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9646#define malloc_set_state innocuous_malloc_set_state
9647
98418dba 9648/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9649 which can conflict with char malloc_set_state (); below.
9650 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9651 <limits.h> exists even on freestanding compilers. */
edfaf76d 9652
19650fd6
AS
9653#ifdef __STDC__
9654# include <limits.h>
9655#else
9656# include <assert.h>
9657#endif
edfaf76d
LK
9658
9659#undef malloc_set_state
9660
ca81d7a0
JD
9661/* Override any GCC internal prototype to avoid an error.
9662 Use char because int might match the return type of a GCC
9663 builtin and then its argument prototype would still apply. */
98418dba
CW
9664#ifdef __cplusplus
9665extern "C"
9666#endif
98418dba 9667char malloc_set_state ();
98418dba
CW
9668/* The GNU C library defines this for functions which it implements
9669 to always fail with ENOSYS. Some functions are actually named
9670 something starting with __ and the normal name is an alias. */
ca81d7a0 9671#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9672choke me
98418dba
CW
9673#endif
9674
19650fd6
AS
9675int
9676main ()
9677{
ca81d7a0 9678return malloc_set_state ();
98418dba
CW
9679 ;
9680 return 0;
9681}
9682_ACEOF
9683rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9684if { (ac_try="$ac_link"
9685case "(($ac_try" in
9686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9687 *) ac_try_echo=$ac_try;;
9688esac
9689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9690 (eval "$ac_link") 2>conftest.er1
98418dba 9691 ac_status=$?
edfaf76d
LK
9692 grep -v '^ *+' conftest.er1 >conftest.err
9693 rm -f conftest.er1
9694 cat conftest.err >&5
c0d27fcc 9695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9696 (exit $ac_status); } && {
9697 test -z "$ac_c_werror_flag" ||
9698 test ! -s conftest.err
9699 } && test -s conftest$ac_exeext &&
9700 $as_test_x conftest$ac_exeext; then
98418dba
CW
9701 ac_cv_func_malloc_set_state=yes
9702else
9703 echo "$as_me: failed program was:" >&5
19650fd6
AS
9704sed 's/^/| /' conftest.$ac_ext >&5
9705
ca81d7a0 9706 ac_cv_func_malloc_set_state=no
98418dba 9707fi
ca81d7a0 9708
f053c89f 9709rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9710 conftest$ac_exeext conftest.$ac_ext
98418dba 9711fi
ca81d7a0
JD
9712{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9713echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9714if test $ac_cv_func_malloc_set_state = yes; then
9715 :
9716else
9717 doug_lea_malloc=no
9718fi
9719
ca81d7a0
JD
9720{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9721echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9722if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9723 echo $ECHO_N "(cached) $ECHO_C" >&6
9724else
9725 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9726/* confdefs.h. */
9727_ACEOF
9728cat confdefs.h >>conftest.$ac_ext
9729cat >>conftest.$ac_ext <<_ACEOF
9730/* end confdefs.h. */
98418dba 9731extern void (* __after_morecore_hook)();
98418dba
CW
9732int
9733main ()
9734{
9735__after_morecore_hook = 0
9736 ;
9737 return 0;
9738}
9739_ACEOF
9740rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9741if { (ac_try="$ac_link"
9742case "(($ac_try" in
9743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9744 *) ac_try_echo=$ac_try;;
9745esac
9746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9747 (eval "$ac_link") 2>conftest.er1
98418dba 9748 ac_status=$?
edfaf76d
LK
9749 grep -v '^ *+' conftest.er1 >conftest.err
9750 rm -f conftest.er1
9751 cat conftest.err >&5
c0d27fcc 9752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9753 (exit $ac_status); } && {
9754 test -z "$ac_c_werror_flag" ||
9755 test ! -s conftest.err
9756 } && test -s conftest$ac_exeext &&
9757 $as_test_x conftest$ac_exeext; then
98418dba
CW
9758 emacs_cv_var___after_morecore_hook=yes
9759else
9760 echo "$as_me: failed program was:" >&5
19650fd6
AS
9761sed 's/^/| /' conftest.$ac_ext >&5
9762
ca81d7a0 9763 emacs_cv_var___after_morecore_hook=no
98418dba 9764fi
ca81d7a0 9765
f053c89f 9766rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9767 conftest$ac_exeext conftest.$ac_ext
98418dba 9768fi
ca81d7a0
JD
9769{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9770echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9771if test $emacs_cv_var___after_morecore_hook = no; then
9772 doug_lea_malloc=no
9773fi
9774if test "${system_malloc}" = "yes"; then
9775 GNU_MALLOC=no
9776 GNU_MALLOC_reason="
9777 (The GNU allocators don't work with this system configuration.)"
9778fi
9779if test "$doug_lea_malloc" = "yes" ; then
9780 if test "$GNU_MALLOC" = yes ; then
9781 GNU_MALLOC_reason="
9782 (Using Doug Lea's new malloc from the GNU C Library.)"
9783 fi
b936fae4 9784
c0d27fcc 9785cat >>confdefs.h <<\_ACEOF
98418dba 9786#define DOUG_LEA_MALLOC 1
c0d27fcc 9787_ACEOF
98418dba
CW
9788
9789fi
9790
9791if test x"${REL_ALLOC}" = x; then
9792 REL_ALLOC=${GNU_MALLOC}
9793fi
9794
9795
c0d27fcc
MR
9796
9797
9798for ac_header in stdlib.h unistd.h
98418dba
CW
9799do
9800as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
9801if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9802 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9803echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9804if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 9805 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9806fi
ca81d7a0
JD
9807ac_res=`eval echo '${'$as_ac_Header'}'`
9808 { echo "$as_me:$LINENO: result: $ac_res" >&5
9809echo "${ECHO_T}$ac_res" >&6; }
98418dba 9810else
c0d27fcc 9811 # Is the header compilable?
ca81d7a0
JD
9812{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9813echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9814cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9815/* confdefs.h. */
9816_ACEOF
9817cat confdefs.h >>conftest.$ac_ext
9818cat >>conftest.$ac_ext <<_ACEOF
9819/* end confdefs.h. */
98418dba
CW
9820$ac_includes_default
9821#include <$ac_header>
9822_ACEOF
9823rm -f conftest.$ac_objext
ca81d7a0
JD
9824if { (ac_try="$ac_compile"
9825case "(($ac_try" in
9826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9827 *) ac_try_echo=$ac_try;;
9828esac
9829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9830 (eval "$ac_compile") 2>conftest.er1
98418dba 9831 ac_status=$?
edfaf76d
LK
9832 grep -v '^ *+' conftest.er1 >conftest.err
9833 rm -f conftest.er1
9834 cat conftest.err >&5
c0d27fcc 9835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9836 (exit $ac_status); } && {
9837 test -z "$ac_c_werror_flag" ||
9838 test ! -s conftest.err
9839 } && test -s conftest.$ac_objext; then
c0d27fcc 9840 ac_header_compiler=yes
98418dba
CW
9841else
9842 echo "$as_me: failed program was:" >&5
19650fd6
AS
9843sed 's/^/| /' conftest.$ac_ext >&5
9844
ca81d7a0 9845 ac_header_compiler=no
98418dba 9846fi
ca81d7a0
JD
9847
9848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9849{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9850echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9851
c0d27fcc 9852# Is the header present?
ca81d7a0
JD
9853{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9854echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9855cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9856/* confdefs.h. */
9857_ACEOF
9858cat confdefs.h >>conftest.$ac_ext
9859cat >>conftest.$ac_ext <<_ACEOF
9860/* end confdefs.h. */
98418dba
CW
9861#include <$ac_header>
9862_ACEOF
ca81d7a0
JD
9863if { (ac_try="$ac_cpp conftest.$ac_ext"
9864case "(($ac_try" in
9865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9866 *) ac_try_echo=$ac_try;;
9867esac
9868eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9869 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9870 ac_status=$?
6bae0ccf 9871 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9872 rm -f conftest.er1
9873 cat conftest.err >&5
c0d27fcc 9874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9875 (exit $ac_status); } >/dev/null && {
9876 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9877 test ! -s conftest.err
9878 }; then
c0d27fcc 9879 ac_header_preproc=yes
98418dba
CW
9880else
9881 echo "$as_me: failed program was:" >&5
19650fd6
AS
9882sed 's/^/| /' conftest.$ac_ext >&5
9883
c0d27fcc 9884 ac_header_preproc=no
98418dba 9885fi
ca81d7a0 9886
98418dba 9887rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9888{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9889echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
9890
9891# So? What about this header?
edfaf76d
LK
9892case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9893 yes:no: )
c0d27fcc
MR
9894 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9895echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9896 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9897echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9898 ac_header_preproc=yes
9899 ;;
9900 no:yes:* )
9901 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9902echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9903 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9904echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9905 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9906echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9907 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9908echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9909 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9910echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9911 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9912echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9913
19650fd6 9914 ;;
c0d27fcc 9915esac
ca81d7a0
JD
9916{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9917echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9918if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
9919 echo $ECHO_N "(cached) $ECHO_C" >&6
9920else
edfaf76d 9921 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9922fi
ca81d7a0
JD
9923ac_res=`eval echo '${'$as_ac_Header'}'`
9924 { echo "$as_me:$LINENO: result: $ac_res" >&5
9925echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
9926
9927fi
98418dba 9928if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9929 cat >>confdefs.h <<_ACEOF
98418dba 9930#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9931_ACEOF
98418dba
CW
9932
9933fi
c0d27fcc 9934
98418dba
CW
9935done
9936
c0d27fcc 9937
98418dba
CW
9938for ac_func in getpagesize
9939do
9940as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
9941{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9942echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9943if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9944 echo $ECHO_N "(cached) $ECHO_C" >&6
9945else
9946 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9947/* confdefs.h. */
9948_ACEOF
9949cat confdefs.h >>conftest.$ac_ext
9950cat >>conftest.$ac_ext <<_ACEOF
9951/* end confdefs.h. */
edfaf76d
LK
9952/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9953 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9954#define $ac_func innocuous_$ac_func
9955
98418dba 9956/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9957 which can conflict with char $ac_func (); below.
9958 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9959 <limits.h> exists even on freestanding compilers. */
edfaf76d 9960
19650fd6
AS
9961#ifdef __STDC__
9962# include <limits.h>
9963#else
9964# include <assert.h>
9965#endif
edfaf76d
LK
9966
9967#undef $ac_func
9968
ca81d7a0
JD
9969/* Override any GCC internal prototype to avoid an error.
9970 Use char because int might match the return type of a GCC
9971 builtin and then its argument prototype would still apply. */
98418dba
CW
9972#ifdef __cplusplus
9973extern "C"
9974#endif
98418dba 9975char $ac_func ();
98418dba
CW
9976/* The GNU C library defines this for functions which it implements
9977 to always fail with ENOSYS. Some functions are actually named
9978 something starting with __ and the normal name is an alias. */
ca81d7a0 9979#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 9980choke me
98418dba
CW
9981#endif
9982
19650fd6
AS
9983int
9984main ()
9985{
ca81d7a0 9986return $ac_func ();
98418dba
CW
9987 ;
9988 return 0;
9989}
9990_ACEOF
9991rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9992if { (ac_try="$ac_link"
9993case "(($ac_try" in
9994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9995 *) ac_try_echo=$ac_try;;
9996esac
9997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9998 (eval "$ac_link") 2>conftest.er1
98418dba 9999 ac_status=$?
edfaf76d
LK
10000 grep -v '^ *+' conftest.er1 >conftest.err
10001 rm -f conftest.er1
10002 cat conftest.err >&5
c0d27fcc 10003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10004 (exit $ac_status); } && {
10005 test -z "$ac_c_werror_flag" ||
10006 test ! -s conftest.err
10007 } && test -s conftest$ac_exeext &&
10008 $as_test_x conftest$ac_exeext; then
98418dba
CW
10009 eval "$as_ac_var=yes"
10010else
10011 echo "$as_me: failed program was:" >&5
19650fd6
AS
10012sed 's/^/| /' conftest.$ac_ext >&5
10013
ca81d7a0 10014 eval "$as_ac_var=no"
98418dba 10015fi
ca81d7a0 10016
f053c89f 10017rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10018 conftest$ac_exeext conftest.$ac_ext
98418dba 10019fi
ca81d7a0
JD
10020ac_res=`eval echo '${'$as_ac_var'}'`
10021 { echo "$as_me:$LINENO: result: $ac_res" >&5
10022echo "${ECHO_T}$ac_res" >&6; }
98418dba 10023if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10024 cat >>confdefs.h <<_ACEOF
98418dba 10025#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10026_ACEOF
98418dba
CW
10027
10028fi
10029done
10030
ca81d7a0
JD
10031{ echo "$as_me:$LINENO: checking for working mmap" >&5
10032echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
10033if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
10034 echo $ECHO_N "(cached) $ECHO_C" >&6
10035else
10036 if test "$cross_compiling" = yes; then
10037 ac_cv_func_mmap_fixed_mapped=no
10038else
10039 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10040/* confdefs.h. */
10041_ACEOF
10042cat confdefs.h >>conftest.$ac_ext
10043cat >>conftest.$ac_ext <<_ACEOF
10044/* end confdefs.h. */
98418dba 10045$ac_includes_default
c0d27fcc
MR
10046/* malloc might have been renamed as rpl_malloc. */
10047#undef malloc
10048
98418dba
CW
10049/* Thanks to Mike Haertel and Jim Avera for this test.
10050 Here is a matrix of mmap possibilities:
10051 mmap private not fixed
10052 mmap private fixed at somewhere currently unmapped
10053 mmap private fixed at somewhere already mapped
10054 mmap shared not fixed
10055 mmap shared fixed at somewhere currently unmapped
10056 mmap shared fixed at somewhere already mapped
10057 For private mappings, we should verify that changes cannot be read()
10058 back from the file, nor mmap's back from the file at a different
10059 address. (There have been systems where private was not correctly
10060 implemented like the infamous i386 svr4.0, and systems where the
10061 VM page cache was not coherent with the file system buffer cache
10062 like early versions of FreeBSD and possibly contemporary NetBSD.)
10063 For shared mappings, we should conversely verify that changes get
c0d27fcc 10064 propagated back to all the places they're supposed to be.
98418dba
CW
10065
10066 Grep wants private fixed already mapped.
10067 The main things grep needs to know about mmap are:
10068 * does it exist and is it safe to write into the mmap'd area
10069 * how to use it (BSD variants) */
10070
10071#include <fcntl.h>
10072#include <sys/mman.h>
10073
f053c89f 10074#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
10075char *malloc ();
10076#endif
10077
10078/* This mess was copied from the GNU getpagesize.h. */
f053c89f 10079#ifndef HAVE_GETPAGESIZE
98418dba 10080/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 10081# ifndef HAVE_SYS_PARAM_H
98418dba
CW
10082# define HAVE_SYS_PARAM_H 1
10083# endif
10084
10085# ifdef _SC_PAGESIZE
10086# define getpagesize() sysconf(_SC_PAGESIZE)
10087# else /* no _SC_PAGESIZE */
f053c89f 10088# ifdef HAVE_SYS_PARAM_H
98418dba
CW
10089# include <sys/param.h>
10090# ifdef EXEC_PAGESIZE
10091# define getpagesize() EXEC_PAGESIZE
10092# else /* no EXEC_PAGESIZE */
10093# ifdef NBPG
10094# define getpagesize() NBPG * CLSIZE
10095# ifndef CLSIZE
10096# define CLSIZE 1
10097# endif /* no CLSIZE */
10098# else /* no NBPG */
10099# ifdef NBPC
10100# define getpagesize() NBPC
10101# else /* no NBPC */
10102# ifdef PAGESIZE
10103# define getpagesize() PAGESIZE
10104# endif /* PAGESIZE */
10105# endif /* no NBPC */
10106# endif /* no NBPG */
10107# endif /* no EXEC_PAGESIZE */
10108# else /* no HAVE_SYS_PARAM_H */
10109# define getpagesize() 8192 /* punt totally */
10110# endif /* no HAVE_SYS_PARAM_H */
10111# endif /* no _SC_PAGESIZE */
10112
10113#endif /* no HAVE_GETPAGESIZE */
10114
10115int
10116main ()
10117{
10118 char *data, *data2, *data3;
10119 int i, pagesize;
10120 int fd;
10121
10122 pagesize = getpagesize ();
10123
10124 /* First, make a file with some known garbage in it. */
10125 data = (char *) malloc (pagesize);
10126 if (!data)
ca81d7a0 10127 return 1;
98418dba
CW
10128 for (i = 0; i < pagesize; ++i)
10129 *(data + i) = rand ();
10130 umask (0);
10131 fd = creat ("conftest.mmap", 0600);
10132 if (fd < 0)
ca81d7a0 10133 return 1;
98418dba 10134 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 10135 return 1;
98418dba
CW
10136 close (fd);
10137
10138 /* Next, try to mmap the file at a fixed address which already has
10139 something else allocated at it. If we can, also make sure that
10140 we see the same garbage. */
10141 fd = open ("conftest.mmap", O_RDWR);
10142 if (fd < 0)
ca81d7a0 10143 return 1;
98418dba
CW
10144 data2 = (char *) malloc (2 * pagesize);
10145 if (!data2)
ca81d7a0
JD
10146 return 1;
10147 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 10148 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 10149 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 10150 return 1;
98418dba
CW
10151 for (i = 0; i < pagesize; ++i)
10152 if (*(data + i) != *(data2 + i))
ca81d7a0 10153 return 1;
98418dba
CW
10154
10155 /* Finally, make sure that changes to the mapped area do not
10156 percolate back to the file as seen by read(). (This is a bug on
10157 some variants of i386 svr4.0.) */
10158 for (i = 0; i < pagesize; ++i)
10159 *(data2 + i) = *(data2 + i) + 1;
10160 data3 = (char *) malloc (pagesize);
10161 if (!data3)
ca81d7a0 10162 return 1;
98418dba 10163 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 10164 return 1;
98418dba
CW
10165 for (i = 0; i < pagesize; ++i)
10166 if (*(data + i) != *(data3 + i))
ca81d7a0 10167 return 1;
98418dba 10168 close (fd);
ca81d7a0 10169 return 0;
98418dba
CW
10170}
10171_ACEOF
10172rm -f conftest$ac_exeext
ca81d7a0
JD
10173if { (ac_try="$ac_link"
10174case "(($ac_try" in
10175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10176 *) ac_try_echo=$ac_try;;
10177esac
10178eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10179 (eval "$ac_link") 2>&5
98418dba 10180 ac_status=$?
c0d27fcc 10181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 10182 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
10183 { (case "(($ac_try" in
10184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10185 *) ac_try_echo=$ac_try;;
10186esac
10187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10188 (eval "$ac_try") 2>&5
98418dba 10189 ac_status=$?
c0d27fcc 10190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
10191 (exit $ac_status); }; }; then
10192 ac_cv_func_mmap_fixed_mapped=yes
10193else
10194 echo "$as_me: program exited with status $ac_status" >&5
10195echo "$as_me: failed program was:" >&5
19650fd6
AS
10196sed 's/^/| /' conftest.$ac_ext >&5
10197
c0d27fcc 10198( exit $ac_status )
98418dba
CW
10199ac_cv_func_mmap_fixed_mapped=no
10200fi
ca81d7a0 10201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10202fi
ca81d7a0
JD
10203
10204
98418dba 10205fi
ca81d7a0
JD
10206{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10207echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10208if test $ac_cv_func_mmap_fixed_mapped = yes; then
10209
c0d27fcc 10210cat >>confdefs.h <<\_ACEOF
98418dba 10211#define HAVE_MMAP 1
c0d27fcc 10212_ACEOF
98418dba
CW
10213
10214fi
10215rm -f conftest.mmap
10216
10217if test $use_mmap_for_buffers = yes; then
10218 REL_ALLOC=no
10219fi
10220
10221LIBS="$libsrc_libs $LIBS"
10222
c0d27fcc 10223
ca81d7a0
JD
10224{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10225echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10226if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10227 echo $ECHO_N "(cached) $ECHO_C" >&6
10228else
10229 ac_check_lib_save_LIBS=$LIBS
10230LIBS="-ldnet $LIBS"
10231cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10232/* confdefs.h. */
10233_ACEOF
10234cat confdefs.h >>conftest.$ac_ext
10235cat >>conftest.$ac_ext <<_ACEOF
10236/* end confdefs.h. */
98418dba 10237
ca81d7a0
JD
10238/* Override any GCC internal prototype to avoid an error.
10239 Use char because int might match the return type of a GCC
10240 builtin and then its argument prototype would still apply. */
98418dba
CW
10241#ifdef __cplusplus
10242extern "C"
10243#endif
98418dba 10244char dnet_ntoa ();
98418dba
CW
10245int
10246main ()
10247{
ca81d7a0 10248return dnet_ntoa ();
98418dba
CW
10249 ;
10250 return 0;
10251}
10252_ACEOF
10253rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10254if { (ac_try="$ac_link"
10255case "(($ac_try" in
10256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10257 *) ac_try_echo=$ac_try;;
10258esac
10259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10260 (eval "$ac_link") 2>conftest.er1
98418dba 10261 ac_status=$?
edfaf76d
LK
10262 grep -v '^ *+' conftest.er1 >conftest.err
10263 rm -f conftest.er1
10264 cat conftest.err >&5
c0d27fcc 10265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10266 (exit $ac_status); } && {
10267 test -z "$ac_c_werror_flag" ||
10268 test ! -s conftest.err
10269 } && test -s conftest$ac_exeext &&
10270 $as_test_x conftest$ac_exeext; then
98418dba
CW
10271 ac_cv_lib_dnet_dnet_ntoa=yes
10272else
10273 echo "$as_me: failed program was:" >&5
19650fd6
AS
10274sed 's/^/| /' conftest.$ac_ext >&5
10275
ca81d7a0 10276 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10277fi
ca81d7a0 10278
f053c89f 10279rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10280 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10281LIBS=$ac_check_lib_save_LIBS
10282fi
ca81d7a0
JD
10283{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10284echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10285if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10286 cat >>confdefs.h <<_ACEOF
98418dba 10287#define HAVE_LIBDNET 1
c0d27fcc 10288_ACEOF
98418dba
CW
10289
10290 LIBS="-ldnet $LIBS"
10291
10292fi
10293
c0d27fcc 10294
ca81d7a0
JD
10295{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10296echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10297if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10298 echo $ECHO_N "(cached) $ECHO_C" >&6
10299else
10300 ac_check_lib_save_LIBS=$LIBS
10301LIBS="-lXbsd $LIBS"
10302cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10303/* confdefs.h. */
10304_ACEOF
10305cat confdefs.h >>conftest.$ac_ext
10306cat >>conftest.$ac_ext <<_ACEOF
10307/* end confdefs.h. */
98418dba 10308
c0d27fcc 10309
98418dba
CW
10310int
10311main ()
10312{
ca81d7a0 10313return main ();
98418dba
CW
10314 ;
10315 return 0;
10316}
10317_ACEOF
10318rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10319if { (ac_try="$ac_link"
10320case "(($ac_try" in
10321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10322 *) ac_try_echo=$ac_try;;
10323esac
10324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10325 (eval "$ac_link") 2>conftest.er1
98418dba 10326 ac_status=$?
edfaf76d
LK
10327 grep -v '^ *+' conftest.er1 >conftest.err
10328 rm -f conftest.er1
10329 cat conftest.err >&5
c0d27fcc 10330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10331 (exit $ac_status); } && {
10332 test -z "$ac_c_werror_flag" ||
10333 test ! -s conftest.err
10334 } && test -s conftest$ac_exeext &&
10335 $as_test_x conftest$ac_exeext; then
98418dba
CW
10336 ac_cv_lib_Xbsd_main=yes
10337else
10338 echo "$as_me: failed program was:" >&5
19650fd6
AS
10339sed 's/^/| /' conftest.$ac_ext >&5
10340
ca81d7a0 10341 ac_cv_lib_Xbsd_main=no
98418dba 10342fi
ca81d7a0 10343
f053c89f 10344rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10345 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10346LIBS=$ac_check_lib_save_LIBS
10347fi
ca81d7a0
JD
10348{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10349echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10350if test $ac_cv_lib_Xbsd_main = yes; then
10351 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10352fi
10353
c0d27fcc
MR
10354
10355
ca81d7a0
JD
10356{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10357echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10358if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10359 echo $ECHO_N "(cached) $ECHO_C" >&6
10360else
10361 ac_check_lib_save_LIBS=$LIBS
10362LIBS="-lpthreads $LIBS"
10363cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10364/* confdefs.h. */
10365_ACEOF
10366cat confdefs.h >>conftest.$ac_ext
10367cat >>conftest.$ac_ext <<_ACEOF
10368/* end confdefs.h. */
98418dba 10369
ca81d7a0
JD
10370/* Override any GCC internal prototype to avoid an error.
10371 Use char because int might match the return type of a GCC
10372 builtin and then its argument prototype would still apply. */
98418dba
CW
10373#ifdef __cplusplus
10374extern "C"
10375#endif
98418dba 10376char cma_open ();
98418dba
CW
10377int
10378main ()
10379{
ca81d7a0 10380return cma_open ();
98418dba
CW
10381 ;
10382 return 0;
10383}
10384_ACEOF
10385rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10386if { (ac_try="$ac_link"
10387case "(($ac_try" in
10388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10389 *) ac_try_echo=$ac_try;;
10390esac
10391eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10392 (eval "$ac_link") 2>conftest.er1
98418dba 10393 ac_status=$?
edfaf76d
LK
10394 grep -v '^ *+' conftest.er1 >conftest.err
10395 rm -f conftest.er1
10396 cat conftest.err >&5
c0d27fcc 10397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10398 (exit $ac_status); } && {
10399 test -z "$ac_c_werror_flag" ||
10400 test ! -s conftest.err
10401 } && test -s conftest$ac_exeext &&
10402 $as_test_x conftest$ac_exeext; then
98418dba
CW
10403 ac_cv_lib_pthreads_cma_open=yes
10404else
10405 echo "$as_me: failed program was:" >&5
19650fd6
AS
10406sed 's/^/| /' conftest.$ac_ext >&5
10407
ca81d7a0 10408 ac_cv_lib_pthreads_cma_open=no
98418dba 10409fi
ca81d7a0 10410
f053c89f 10411rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10412 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10413LIBS=$ac_check_lib_save_LIBS
10414fi
ca81d7a0
JD
10415{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10416echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10417if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10418 cat >>confdefs.h <<_ACEOF
98418dba 10419#define HAVE_LIBPTHREADS 1
c0d27fcc 10420_ACEOF
98418dba
CW
10421
10422 LIBS="-lpthreads $LIBS"
10423
10424fi
10425
c0d27fcc 10426
ca81d7a0
JD
10427{ echo "$as_me:$LINENO: checking for XFree86 in /usr/X386" >&5
10428echo $ECHO_N "checking for XFree86 in /usr/X386... $ECHO_C" >&6; }
98418dba
CW
10429if test -d /usr/X386/include; then
10430 HAVE_XFREE386=yes
10431 : ${C_SWITCH_X_SITE="-I/usr/X386/include"}
10432else
10433 HAVE_XFREE386=no
10434fi
ca81d7a0
JD
10435{ echo "$as_me:$LINENO: result: $HAVE_XFREE386" >&5
10436echo "${ECHO_T}$HAVE_XFREE386" >&6; }
98418dba 10437
55597d70
DL
10438
10439case ${host_os} in
10440aix*)
ca81d7a0
JD
10441 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10442echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10443if test "${gdb_cv_bigtoc+set}" = set; then
10444 echo $ECHO_N "(cached) $ECHO_C" >&6
10445else
10446
10447 case $GCC in
10448 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10449 *) gdb_cv_bigtoc=-bbigtoc ;;
10450 esac
10451
10452 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10453 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10454/* confdefs.h. */
10455_ACEOF
10456cat confdefs.h >>conftest.$ac_ext
10457cat >>conftest.$ac_ext <<_ACEOF
10458/* end confdefs.h. */
55597d70
DL
10459
10460int
10461main ()
10462{
10463int i;
10464 ;
10465 return 0;
10466}
10467_ACEOF
10468rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10469if { (ac_try="$ac_link"
10470case "(($ac_try" in
10471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10472 *) ac_try_echo=$ac_try;;
10473esac
10474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10475 (eval "$ac_link") 2>conftest.er1
55597d70 10476 ac_status=$?
edfaf76d
LK
10477 grep -v '^ *+' conftest.er1 >conftest.err
10478 rm -f conftest.er1
10479 cat conftest.err >&5
55597d70 10480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10481 (exit $ac_status); } && {
10482 test -z "$ac_c_werror_flag" ||
10483 test ! -s conftest.err
10484 } && test -s conftest$ac_exeext &&
10485 $as_test_x conftest$ac_exeext; then
55597d70
DL
10486 :
10487else
10488 echo "$as_me: failed program was:" >&5
19650fd6
AS
10489sed 's/^/| /' conftest.$ac_ext >&5
10490
ca81d7a0 10491 gdb_cv_bigtoc=
55597d70 10492fi
ca81d7a0 10493
f053c89f 10494rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10495 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10496
10497fi
ca81d7a0
JD
10498{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10499echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10500 ;;
10501esac
10502
ae1a998c
RS
10503# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10504# used for the tests that follow. We set them back to REAL_CFLAGS and
10505# REAL_CPPFLAGS later on.
98418dba
CW
10506
10507REAL_CPPFLAGS="$CPPFLAGS"
10508
10509if test "${HAVE_X11}" = "yes"; then
10510 DEFS="$C_SWITCH_X_SITE $DEFS"
10511 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10512 LIBS="$LIBX $LIBS"
10513 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10514 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10515
10516 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10517 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10518 # but it's more convenient here to set LD_RUN_PATH
10519 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10520 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10521 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10522 export LD_RUN_PATH
10523 fi
10524
10525 if test "${opsys}" = "gnu-linux"; then
ca81d7a0
JD
10526 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10527echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10528 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10529/* confdefs.h. */
10530_ACEOF
10531cat confdefs.h >>conftest.$ac_ext
10532cat >>conftest.$ac_ext <<_ACEOF
10533/* end confdefs.h. */
98418dba 10534
98418dba
CW
10535int
10536main ()
10537{
10538XOpenDisplay ("foo");
10539 ;
10540 return 0;
10541}
10542_ACEOF
10543rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10544if { (ac_try="$ac_link"
10545case "(($ac_try" in
10546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10547 *) ac_try_echo=$ac_try;;
10548esac
10549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10550 (eval "$ac_link") 2>conftest.er1
98418dba 10551 ac_status=$?
edfaf76d
LK
10552 grep -v '^ *+' conftest.er1 >conftest.err
10553 rm -f conftest.er1
10554 cat conftest.err >&5
c0d27fcc 10555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10556 (exit $ac_status); } && {
10557 test -z "$ac_c_werror_flag" ||
10558 test ! -s conftest.err
10559 } && test -s conftest$ac_exeext &&
10560 $as_test_x conftest$ac_exeext; then
35996d22 10561 xlinux_first_failure=no
98418dba
CW
10562else
10563 echo "$as_me: failed program was:" >&5
19650fd6
AS
10564sed 's/^/| /' conftest.$ac_ext >&5
10565
ca81d7a0 10566 xlinux_first_failure=yes
98418dba 10567fi
ca81d7a0 10568
f053c89f 10569rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10570 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10571 if test "${xlinux_first_failure}" = "yes"; then
10572 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10573 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10574 OLD_CPPFLAGS="$CPPFLAGS"
10575 OLD_LIBS="$LIBS"
10576 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10577 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10578 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10579 LIBS="$LIBS -b i486-linuxaout"
10580 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10581/* confdefs.h. */
10582_ACEOF
10583cat confdefs.h >>conftest.$ac_ext
10584cat >>conftest.$ac_ext <<_ACEOF
10585/* end confdefs.h. */
98418dba 10586
98418dba
CW
10587int
10588main ()
10589{
10590XOpenDisplay ("foo");
10591 ;
10592 return 0;
10593}
10594_ACEOF
10595rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10596if { (ac_try="$ac_link"
10597case "(($ac_try" in
10598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10599 *) ac_try_echo=$ac_try;;
10600esac
10601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10602 (eval "$ac_link") 2>conftest.er1
98418dba 10603 ac_status=$?
edfaf76d
LK
10604 grep -v '^ *+' conftest.er1 >conftest.err
10605 rm -f conftest.er1
10606 cat conftest.err >&5
c0d27fcc 10607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10608 (exit $ac_status); } && {
10609 test -z "$ac_c_werror_flag" ||
10610 test ! -s conftest.err
10611 } && test -s conftest$ac_exeext &&
10612 $as_test_x conftest$ac_exeext; then
98418dba
CW
10613 xlinux_second_failure=no
10614else
10615 echo "$as_me: failed program was:" >&5
19650fd6
AS
10616sed 's/^/| /' conftest.$ac_ext >&5
10617
ca81d7a0 10618 xlinux_second_failure=yes
98418dba 10619fi
ca81d7a0 10620
f053c89f 10621rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10622 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10623 if test "${xlinux_second_failure}" = "yes"; then
10624 # If we get the same failure with -b, there is no use adding -b.
10625 # So take it out. This plays safe.
10626 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10627 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10628 CPPFLAGS="$OLD_CPPFLAGS"
10629 LIBS="$OLD_LIBS"
ca81d7a0
JD
10630 { echo "$as_me:$LINENO: result: no" >&5
10631echo "${ECHO_T}no" >&6; }
98418dba 10632 else
ca81d7a0
JD
10633 { echo "$as_me:$LINENO: result: yes" >&5
10634echo "${ECHO_T}yes" >&6; }
98418dba
CW
10635 fi
10636 else
ca81d7a0
JD
10637 { echo "$as_me:$LINENO: result: no" >&5
10638echo "${ECHO_T}no" >&6; }
98418dba
CW
10639 fi
10640 fi
10641
10642 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10643 # header files included from there.
ca81d7a0
JD
10644 { echo "$as_me:$LINENO: checking for Xkb" >&5
10645echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10646 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10647/* confdefs.h. */
10648_ACEOF
10649cat confdefs.h >>conftest.$ac_ext
10650cat >>conftest.$ac_ext <<_ACEOF
10651/* end confdefs.h. */
98418dba
CW
10652#include <X11/Xlib.h>
10653#include <X11/XKBlib.h>
98418dba
CW
10654int
10655main ()
10656{
10657XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10658 ;
10659 return 0;
10660}
10661_ACEOF
10662rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10663if { (ac_try="$ac_link"
10664case "(($ac_try" in
10665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10666 *) ac_try_echo=$ac_try;;
10667esac
10668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10669 (eval "$ac_link") 2>conftest.er1
98418dba 10670 ac_status=$?
edfaf76d
LK
10671 grep -v '^ *+' conftest.er1 >conftest.err
10672 rm -f conftest.er1
10673 cat conftest.err >&5
c0d27fcc 10674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10675 (exit $ac_status); } && {
10676 test -z "$ac_c_werror_flag" ||
10677 test ! -s conftest.err
10678 } && test -s conftest$ac_exeext &&
10679 $as_test_x conftest$ac_exeext; then
98418dba
CW
10680 emacs_xkb=yes
10681else
10682 echo "$as_me: failed program was:" >&5
19650fd6
AS
10683sed 's/^/| /' conftest.$ac_ext >&5
10684
ca81d7a0 10685 emacs_xkb=no
98418dba 10686fi
ca81d7a0 10687
f053c89f 10688rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10689 conftest$ac_exeext conftest.$ac_ext
ca81d7a0
JD
10690 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10691echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10692 if test $emacs_xkb = yes; then
b936fae4 10693
c0d27fcc 10694cat >>confdefs.h <<\_ACEOF
98418dba 10695#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10696_ACEOF
98418dba
CW
10697
10698 fi
10699
c0d27fcc
MR
10700
10701
10702
10703
98418dba
CW
10704for ac_func in XrmSetDatabase XScreenResourceString \
10705XScreenNumberOfScreen XSetWMProtocols
10706do
10707as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10708{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10709echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10710if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10711 echo $ECHO_N "(cached) $ECHO_C" >&6
10712else
10713 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10714/* confdefs.h. */
10715_ACEOF
10716cat confdefs.h >>conftest.$ac_ext
10717cat >>conftest.$ac_ext <<_ACEOF
10718/* end confdefs.h. */
edfaf76d
LK
10719/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10720 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10721#define $ac_func innocuous_$ac_func
10722
98418dba 10723/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10724 which can conflict with char $ac_func (); below.
10725 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10726 <limits.h> exists even on freestanding compilers. */
edfaf76d 10727
19650fd6
AS
10728#ifdef __STDC__
10729# include <limits.h>
10730#else
10731# include <assert.h>
10732#endif
edfaf76d
LK
10733
10734#undef $ac_func
10735
ca81d7a0
JD
10736/* Override any GCC internal prototype to avoid an error.
10737 Use char because int might match the return type of a GCC
10738 builtin and then its argument prototype would still apply. */
98418dba
CW
10739#ifdef __cplusplus
10740extern "C"
10741#endif
98418dba 10742char $ac_func ();
98418dba
CW
10743/* The GNU C library defines this for functions which it implements
10744 to always fail with ENOSYS. Some functions are actually named
10745 something starting with __ and the normal name is an alias. */
ca81d7a0 10746#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10747choke me
98418dba
CW
10748#endif
10749
19650fd6
AS
10750int
10751main ()
10752{
ca81d7a0 10753return $ac_func ();
98418dba
CW
10754 ;
10755 return 0;
10756}
10757_ACEOF
10758rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10759if { (ac_try="$ac_link"
10760case "(($ac_try" in
10761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10762 *) ac_try_echo=$ac_try;;
10763esac
10764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10765 (eval "$ac_link") 2>conftest.er1
98418dba 10766 ac_status=$?
edfaf76d
LK
10767 grep -v '^ *+' conftest.er1 >conftest.err
10768 rm -f conftest.er1
10769 cat conftest.err >&5
c0d27fcc 10770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10771 (exit $ac_status); } && {
10772 test -z "$ac_c_werror_flag" ||
10773 test ! -s conftest.err
10774 } && test -s conftest$ac_exeext &&
10775 $as_test_x conftest$ac_exeext; then
98418dba
CW
10776 eval "$as_ac_var=yes"
10777else
10778 echo "$as_me: failed program was:" >&5
19650fd6
AS
10779sed 's/^/| /' conftest.$ac_ext >&5
10780
ca81d7a0 10781 eval "$as_ac_var=no"
98418dba 10782fi
ca81d7a0 10783
f053c89f 10784rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10785 conftest$ac_exeext conftest.$ac_ext
98418dba 10786fi
ca81d7a0
JD
10787ac_res=`eval echo '${'$as_ac_var'}'`
10788 { echo "$as_me:$LINENO: result: $ac_res" >&5
10789echo "${ECHO_T}$ac_res" >&6; }
98418dba 10790if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10791 cat >>confdefs.h <<_ACEOF
98418dba 10792#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10793_ACEOF
98418dba
CW
10794
10795fi
10796done
10797
10798fi
10799
10800if test "${window_system}" = "x11"; then
ca81d7a0
JD
10801 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10802echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
10803 if test "${emacs_cv_x11_version_6+set}" = set; then
10804 echo $ECHO_N "(cached) $ECHO_C" >&6
10805else
10806 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10807/* confdefs.h. */
10808_ACEOF
10809cat confdefs.h >>conftest.$ac_ext
10810cat >>conftest.$ac_ext <<_ACEOF
10811/* end confdefs.h. */
98418dba 10812#include <X11/Xlib.h>
98418dba
CW
10813int
10814main ()
10815{
10816#if XlibSpecificationRelease < 6
10817fail;
10818#endif
10819
10820 ;
10821 return 0;
10822}
10823_ACEOF
10824rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10825if { (ac_try="$ac_link"
10826case "(($ac_try" in
10827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10828 *) ac_try_echo=$ac_try;;
10829esac
10830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10831 (eval "$ac_link") 2>conftest.er1
98418dba 10832 ac_status=$?
edfaf76d
LK
10833 grep -v '^ *+' conftest.er1 >conftest.err
10834 rm -f conftest.er1
10835 cat conftest.err >&5
c0d27fcc 10836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10837 (exit $ac_status); } && {
10838 test -z "$ac_c_werror_flag" ||
10839 test ! -s conftest.err
10840 } && test -s conftest$ac_exeext &&
10841 $as_test_x conftest$ac_exeext; then
98418dba
CW
10842 emacs_cv_x11_version_6=yes
10843else
10844 echo "$as_me: failed program was:" >&5
19650fd6
AS
10845sed 's/^/| /' conftest.$ac_ext >&5
10846
ca81d7a0 10847 emacs_cv_x11_version_6=no
98418dba 10848fi
ca81d7a0 10849
f053c89f 10850rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10851 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10852fi
10853
10854 if test $emacs_cv_x11_version_6 = yes; then
ca81d7a0
JD
10855 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10856echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10857
c0d27fcc 10858cat >>confdefs.h <<\_ACEOF
98418dba 10859#define HAVE_X11R6 1
c0d27fcc 10860_ACEOF
98418dba
CW
10861
10862 else
ca81d7a0
JD
10863 { echo "$as_me:$LINENO: result: before 6" >&5
10864echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10865 fi
10866fi
10867
10868if test "${window_system}" = "x11"; then
ca81d7a0
JD
10869 { echo "$as_me:$LINENO: checking X11 version 5" >&5
10870echo $ECHO_N "checking X11 version 5... $ECHO_C" >&6; }
98418dba
CW
10871 if test "${emacs_cv_x11_version_5+set}" = set; then
10872 echo $ECHO_N "(cached) $ECHO_C" >&6
10873else
10874 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10875/* confdefs.h. */
10876_ACEOF
10877cat confdefs.h >>conftest.$ac_ext
10878cat >>conftest.$ac_ext <<_ACEOF
10879/* end confdefs.h. */
98418dba 10880#include <X11/Xlib.h>
98418dba
CW
10881int
10882main ()
10883{
10884#if XlibSpecificationRelease < 5
10885fail;
10886#endif
10887
10888 ;
10889 return 0;
10890}
10891_ACEOF
10892rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10893if { (ac_try="$ac_link"
10894case "(($ac_try" in
10895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10896 *) ac_try_echo=$ac_try;;
10897esac
10898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10899 (eval "$ac_link") 2>conftest.er1
98418dba 10900 ac_status=$?
edfaf76d
LK
10901 grep -v '^ *+' conftest.er1 >conftest.err
10902 rm -f conftest.er1
10903 cat conftest.err >&5
c0d27fcc 10904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10905 (exit $ac_status); } && {
10906 test -z "$ac_c_werror_flag" ||
10907 test ! -s conftest.err
10908 } && test -s conftest$ac_exeext &&
10909 $as_test_x conftest$ac_exeext; then
98418dba
CW
10910 emacs_cv_x11_version_5=yes
10911else
10912 echo "$as_me: failed program was:" >&5
19650fd6
AS
10913sed 's/^/| /' conftest.$ac_ext >&5
10914
ca81d7a0 10915 emacs_cv_x11_version_5=no
98418dba 10916fi
ca81d7a0 10917
f053c89f 10918rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10919 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10920fi
10921
10922 if test $emacs_cv_x11_version_5 = yes; then
ca81d7a0
JD
10923 { echo "$as_me:$LINENO: result: 5 or newer" >&5
10924echo "${ECHO_T}5 or newer" >&6; }
98418dba 10925 HAVE_X11R5=yes
b936fae4 10926
c0d27fcc 10927cat >>confdefs.h <<\_ACEOF
98418dba 10928#define HAVE_X11R5 1
c0d27fcc 10929_ACEOF
98418dba
CW
10930
10931 else
10932 HAVE_X11R5=no
ca81d7a0
JD
10933 { echo "$as_me:$LINENO: result: before 5" >&5
10934echo "${ECHO_T}before 5" >&6; }
98418dba
CW
10935 fi
10936fi
10937
488dd4c4 10938HAVE_GTK=no
8eeae1c9
JD
10939if test "${with_gtk}" = "yes" && test "$USE_X_TOOLKIT" = "gtk"; then
10940 USE_X_TOOLKIT=none
10941fi
488dd4c4 10942if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
cd890796 10943 if test "$USE_X_TOOLKIT" != "none" && test "$USE_X_TOOLKIT" != "maybe"; then
488dd4c4
JD
10944 { { echo "$as_me:$LINENO: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&5
10945echo "$as_me: error: Conflicting options, --with-gtk is incompatible with --with-x-toolkit=${with_x_toolkit}" >&2;}
10946 { (exit 1); exit 1; }; };
10947 fi
448541bc
JD
10948 GLIB_REQUIRED=2.4
10949 GTK_REQUIRED=2.4
488dd4c4
JD
10950 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10951
10952 if test "X${with_pkg_config_prog}" != X; then
10953 PKG_CONFIG="${with_pkg_config_prog}"
10954 fi
10955
10956 succeeded=no
10957
10958 if test -z "$PKG_CONFIG"; then
10959 # Extract the first word of "pkg-config", so it can be a program name with args.
10960set dummy pkg-config; ac_word=$2
ca81d7a0
JD
10961{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10962echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
10963if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10964 echo $ECHO_N "(cached) $ECHO_C" >&6
10965else
10966 case $PKG_CONFIG in
10967 [\\/]* | ?:[\\/]*)
10968 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10969 ;;
10970 *)
10971 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10972for as_dir in $PATH
10973do
10974 IFS=$as_save_IFS
10975 test -z "$as_dir" && as_dir=.
10976 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 10977 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
10978 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10979 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10980 break 2
10981 fi
10982done
10983done
ca81d7a0 10984IFS=$as_save_IFS
488dd4c4
JD
10985
10986 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10987 ;;
10988esac
10989fi
10990PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 10991if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
10992 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10993echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 10994else
ca81d7a0
JD
10995 { echo "$as_me:$LINENO: result: no" >&5
10996echo "${ECHO_T}no" >&6; }
488dd4c4
JD
10997fi
10998
ca81d7a0 10999
488dd4c4
JD
11000 fi
11001
11002 if test "$PKG_CONFIG" = "no" ; then
439f58ee
JD
11003 { { echo "$as_me:$LINENO: error:
11004 *** 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
11005echo "$as_me: error:
11006 *** 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;}
11007 { (exit 1); exit 1; }; }
488dd4c4
JD
11008 else
11009 PKG_CONFIG_MIN_VERSION=0.9.0
11010 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
11011 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
11012echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 11013
67db6aa2 11014 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
ca81d7a0
JD
11015 { echo "$as_me:$LINENO: result: yes" >&5
11016echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
11017 succeeded=yes
11018
ca81d7a0
JD
11019 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
11020echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 11021 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11022 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
11023echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 11024
ca81d7a0
JD
11025 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
11026echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 11027 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
11028 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
11029echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 11030 else
ca81d7a0
JD
11031 { echo "$as_me:$LINENO: result: no" >&5
11032echo "${ECHO_T}no" >&6; }
488dd4c4
JD
11033 GTK_CFLAGS=""
11034 GTK_LIBS=""
11035 ## If we have a custom action on failure, don't print errors, but
11036 ## do set a variable so people can do so.
11037 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
11038 echo $GTK_PKG_ERRORS
11039 fi
11040
11041
11042
11043 else
11044 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11045 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11046 fi
11047 fi
11048
11049 if test $succeeded = yes; then
11050 :
11051 else
11052 { { 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
11053echo "$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;}
11054 { (exit 1); exit 1; }; }
11055 fi
11056
11057
11058
11059 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
11060 CFLAGS="$CFLAGS $GTK_CFLAGS"
11061 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 11062 GTK_COMPILES=no
57669b57 11063
8eeae1c9 11064for ac_func in gtk_main
57669b57
JD
11065do
11066as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11067{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11068echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11069if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11070 echo $ECHO_N "(cached) $ECHO_C" >&6
11071else
11072 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11073/* confdefs.h. */
11074_ACEOF
11075cat confdefs.h >>conftest.$ac_ext
11076cat >>conftest.$ac_ext <<_ACEOF
11077/* end confdefs.h. */
edfaf76d
LK
11078/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11079 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11080#define $ac_func innocuous_$ac_func
11081
57669b57
JD
11082/* System header to define __stub macros and hopefully few prototypes,
11083 which can conflict with char $ac_func (); below.
11084 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11085 <limits.h> exists even on freestanding compilers. */
edfaf76d 11086
57669b57
JD
11087#ifdef __STDC__
11088# include <limits.h>
11089#else
11090# include <assert.h>
11091#endif
edfaf76d
LK
11092
11093#undef $ac_func
11094
ca81d7a0
JD
11095/* Override any GCC internal prototype to avoid an error.
11096 Use char because int might match the return type of a GCC
11097 builtin and then its argument prototype would still apply. */
57669b57
JD
11098#ifdef __cplusplus
11099extern "C"
57669b57 11100#endif
57669b57
JD
11101char $ac_func ();
11102/* The GNU C library defines this for functions which it implements
11103 to always fail with ENOSYS. Some functions are actually named
11104 something starting with __ and the normal name is an alias. */
ca81d7a0 11105#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11106choke me
57669b57
JD
11107#endif
11108
11109int
11110main ()
11111{
ca81d7a0 11112return $ac_func ();
57669b57
JD
11113 ;
11114 return 0;
11115}
11116_ACEOF
11117rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11118if { (ac_try="$ac_link"
11119case "(($ac_try" in
11120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11121 *) ac_try_echo=$ac_try;;
11122esac
11123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11124 (eval "$ac_link") 2>conftest.er1
57669b57 11125 ac_status=$?
edfaf76d
LK
11126 grep -v '^ *+' conftest.er1 >conftest.err
11127 rm -f conftest.er1
11128 cat conftest.err >&5
57669b57 11129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11130 (exit $ac_status); } && {
11131 test -z "$ac_c_werror_flag" ||
11132 test ! -s conftest.err
11133 } && test -s conftest$ac_exeext &&
11134 $as_test_x conftest$ac_exeext; then
57669b57
JD
11135 eval "$as_ac_var=yes"
11136else
11137 echo "$as_me: failed program was:" >&5
11138sed 's/^/| /' conftest.$ac_ext >&5
11139
ca81d7a0 11140 eval "$as_ac_var=no"
57669b57 11141fi
ca81d7a0 11142
f053c89f 11143rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11144 conftest$ac_exeext conftest.$ac_ext
57669b57 11145fi
ca81d7a0
JD
11146ac_res=`eval echo '${'$as_ac_var'}'`
11147 { echo "$as_me:$LINENO: result: $ac_res" >&5
11148echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11149if test `eval echo '${'$as_ac_var'}'` = yes; then
11150 cat >>confdefs.h <<_ACEOF
11151#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11152_ACEOF
8eeae1c9 11153 GTK_COMPILES=yes
57669b57
JD
11154fi
11155done
11156
8eeae1c9
JD
11157 if test "${GTK_COMPILES}" != "yes"; then
11158 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
11159echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
11160 { (exit 1); exit 1; }; };
11161 fi
11162
11163 HAVE_GTK=yes
57669b57
JD
11164
11165cat >>confdefs.h <<\_ACEOF
8eeae1c9 11166#define HAVE_GTK 1
572a3cc2
JD
11167_ACEOF
11168
8eeae1c9
JD
11169 USE_X_TOOLKIT=none
11170
11171 if test "$with_toolkit_scroll_bars" != no; then
11172 with_toolkit_scroll_bars=yes
572a3cc2 11173 fi
572a3cc2 11174
8eeae1c9
JD
11175 HAVE_GTK_MULTIDISPLAY=no
11176
11177for ac_func in gdk_display_open
572a3cc2
JD
11178do
11179as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11180{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11181echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11182if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11183 echo $ECHO_N "(cached) $ECHO_C" >&6
11184else
11185 cat >conftest.$ac_ext <<_ACEOF
11186/* confdefs.h. */
11187_ACEOF
11188cat confdefs.h >>conftest.$ac_ext
11189cat >>conftest.$ac_ext <<_ACEOF
11190/* end confdefs.h. */
edfaf76d
LK
11191/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11192 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11193#define $ac_func innocuous_$ac_func
11194
572a3cc2
JD
11195/* System header to define __stub macros and hopefully few prototypes,
11196 which can conflict with char $ac_func (); below.
11197 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11198 <limits.h> exists even on freestanding compilers. */
edfaf76d 11199
572a3cc2
JD
11200#ifdef __STDC__
11201# include <limits.h>
11202#else
11203# include <assert.h>
11204#endif
edfaf76d
LK
11205
11206#undef $ac_func
11207
ca81d7a0
JD
11208/* Override any GCC internal prototype to avoid an error.
11209 Use char because int might match the return type of a GCC
11210 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11211#ifdef __cplusplus
11212extern "C"
572a3cc2 11213#endif
572a3cc2
JD
11214char $ac_func ();
11215/* The GNU C library defines this for functions which it implements
11216 to always fail with ENOSYS. Some functions are actually named
11217 something starting with __ and the normal name is an alias. */
ca81d7a0 11218#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11219choke me
572a3cc2
JD
11220#endif
11221
11222int
11223main ()
11224{
ca81d7a0 11225return $ac_func ();
572a3cc2
JD
11226 ;
11227 return 0;
11228}
11229_ACEOF
11230rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11231if { (ac_try="$ac_link"
11232case "(($ac_try" in
11233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11234 *) ac_try_echo=$ac_try;;
11235esac
11236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11237 (eval "$ac_link") 2>conftest.er1
572a3cc2 11238 ac_status=$?
edfaf76d
LK
11239 grep -v '^ *+' conftest.er1 >conftest.err
11240 rm -f conftest.er1
11241 cat conftest.err >&5
572a3cc2 11242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11243 (exit $ac_status); } && {
11244 test -z "$ac_c_werror_flag" ||
11245 test ! -s conftest.err
11246 } && test -s conftest$ac_exeext &&
11247 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11248 eval "$as_ac_var=yes"
11249else
11250 echo "$as_me: failed program was:" >&5
11251sed 's/^/| /' conftest.$ac_ext >&5
11252
ca81d7a0 11253 eval "$as_ac_var=no"
572a3cc2 11254fi
ca81d7a0 11255
f053c89f 11256rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11257 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11258fi
ca81d7a0
JD
11259ac_res=`eval echo '${'$as_ac_var'}'`
11260 { echo "$as_me:$LINENO: result: $ac_res" >&5
11261echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11262if test `eval echo '${'$as_ac_var'}'` = yes; then
11263 cat >>confdefs.h <<_ACEOF
11264#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11265_ACEOF
8eeae1c9 11266 HAVE_GTK_MULTIDISPLAY=yes
572a3cc2
JD
11267fi
11268done
11269
8eeae1c9 11270 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
572a3cc2 11271
8eeae1c9
JD
11272cat >>confdefs.h <<\_ACEOF
11273#define HAVE_GTK_MULTIDISPLAY 1
11274_ACEOF
572a3cc2 11275
8eeae1c9
JD
11276 fi
11277 HAVE_GTK_FILE_SELECTION=no
11278
11279for ac_func in gtk_file_selection_new
572a3cc2
JD
11280do
11281as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11282{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11283echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11284if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11285 echo $ECHO_N "(cached) $ECHO_C" >&6
11286else
11287 cat >conftest.$ac_ext <<_ACEOF
11288/* confdefs.h. */
11289_ACEOF
11290cat confdefs.h >>conftest.$ac_ext
11291cat >>conftest.$ac_ext <<_ACEOF
11292/* end confdefs.h. */
edfaf76d
LK
11293/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11294 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11295#define $ac_func innocuous_$ac_func
11296
572a3cc2
JD
11297/* System header to define __stub macros and hopefully few prototypes,
11298 which can conflict with char $ac_func (); below.
11299 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11300 <limits.h> exists even on freestanding compilers. */
edfaf76d 11301
572a3cc2
JD
11302#ifdef __STDC__
11303# include <limits.h>
11304#else
11305# include <assert.h>
11306#endif
edfaf76d
LK
11307
11308#undef $ac_func
11309
ca81d7a0
JD
11310/* Override any GCC internal prototype to avoid an error.
11311 Use char because int might match the return type of a GCC
11312 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11313#ifdef __cplusplus
11314extern "C"
572a3cc2 11315#endif
572a3cc2
JD
11316char $ac_func ();
11317/* The GNU C library defines this for functions which it implements
11318 to always fail with ENOSYS. Some functions are actually named
11319 something starting with __ and the normal name is an alias. */
ca81d7a0 11320#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11321choke me
572a3cc2
JD
11322#endif
11323
11324int
11325main ()
11326{
ca81d7a0 11327return $ac_func ();
572a3cc2
JD
11328 ;
11329 return 0;
11330}
11331_ACEOF
11332rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11333if { (ac_try="$ac_link"
11334case "(($ac_try" in
11335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11336 *) ac_try_echo=$ac_try;;
11337esac
11338eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11339 (eval "$ac_link") 2>conftest.er1
572a3cc2 11340 ac_status=$?
edfaf76d
LK
11341 grep -v '^ *+' conftest.er1 >conftest.err
11342 rm -f conftest.er1
11343 cat conftest.err >&5
572a3cc2 11344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11345 (exit $ac_status); } && {
11346 test -z "$ac_c_werror_flag" ||
11347 test ! -s conftest.err
11348 } && test -s conftest$ac_exeext &&
11349 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11350 eval "$as_ac_var=yes"
11351else
11352 echo "$as_me: failed program was:" >&5
11353sed 's/^/| /' conftest.$ac_ext >&5
11354
ca81d7a0 11355 eval "$as_ac_var=no"
572a3cc2 11356fi
ca81d7a0 11357
f053c89f 11358rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11359 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11360fi
ca81d7a0
JD
11361ac_res=`eval echo '${'$as_ac_var'}'`
11362 { echo "$as_me:$LINENO: result: $ac_res" >&5
11363echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11364if test `eval echo '${'$as_ac_var'}'` = yes; then
11365 cat >>confdefs.h <<_ACEOF
11366#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11367_ACEOF
8eeae1c9 11368 HAVE_GTK_FILE_SELECTION=yes
572a3cc2
JD
11369fi
11370done
11371
11372
8eeae1c9 11373 HAVE_GTK_FILE_CHOOSER=no
b8bdffbe 11374
8eeae1c9 11375for ac_func in gtk_file_chooser_dialog_new
b8bdffbe 11376do
8eeae1c9 11377as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11378{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11379echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11380if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe 11381 echo $ECHO_N "(cached) $ECHO_C" >&6
b8bdffbe 11382else
8eeae1c9 11383 cat >conftest.$ac_ext <<_ACEOF
b8bdffbe
JD
11384/* confdefs.h. */
11385_ACEOF
11386cat confdefs.h >>conftest.$ac_ext
11387cat >>conftest.$ac_ext <<_ACEOF
11388/* end confdefs.h. */
8eeae1c9
JD
11389/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11390 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11391#define $ac_func innocuous_$ac_func
11392
11393/* System header to define __stub macros and hopefully few prototypes,
11394 which can conflict with char $ac_func (); below.
11395 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11396 <limits.h> exists even on freestanding compilers. */
11397
11398#ifdef __STDC__
11399# include <limits.h>
11400#else
11401# include <assert.h>
11402#endif
11403
11404#undef $ac_func
11405
ca81d7a0
JD
11406/* Override any GCC internal prototype to avoid an error.
11407 Use char because int might match the return type of a GCC
11408 builtin and then its argument prototype would still apply. */
8eeae1c9
JD
11409#ifdef __cplusplus
11410extern "C"
11411#endif
11412char $ac_func ();
11413/* The GNU C library defines this for functions which it implements
11414 to always fail with ENOSYS. Some functions are actually named
11415 something starting with __ and the normal name is an alias. */
ca81d7a0 11416#if defined __stub_$ac_func || defined __stub___$ac_func
8eeae1c9
JD
11417choke me
11418#endif
11419
11420int
11421main ()
11422{
ca81d7a0 11423return $ac_func ();
8eeae1c9
JD
11424 ;
11425 return 0;
11426}
11427_ACEOF
11428rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11429if { (ac_try="$ac_link"
11430case "(($ac_try" in
11431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11432 *) ac_try_echo=$ac_try;;
11433esac
11434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11435 (eval "$ac_link") 2>conftest.er1
8eeae1c9
JD
11436 ac_status=$?
11437 grep -v '^ *+' conftest.er1 >conftest.err
11438 rm -f conftest.er1
11439 cat conftest.err >&5
11440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11441 (exit $ac_status); } && {
11442 test -z "$ac_c_werror_flag" ||
11443 test ! -s conftest.err
11444 } && test -s conftest$ac_exeext &&
11445 $as_test_x conftest$ac_exeext; then
8eeae1c9
JD
11446 eval "$as_ac_var=yes"
11447else
11448 echo "$as_me: failed program was:" >&5
11449sed 's/^/| /' conftest.$ac_ext >&5
11450
ca81d7a0 11451 eval "$as_ac_var=no"
8eeae1c9 11452fi
ca81d7a0 11453
f053c89f 11454rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8eeae1c9
JD
11455 conftest$ac_exeext conftest.$ac_ext
11456fi
ca81d7a0
JD
11457ac_res=`eval echo '${'$as_ac_var'}'`
11458 { echo "$as_me:$LINENO: result: $ac_res" >&5
11459echo "${ECHO_T}$ac_res" >&6; }
8eeae1c9
JD
11460if test `eval echo '${'$as_ac_var'}'` = yes; then
11461 cat >>confdefs.h <<_ACEOF
11462#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11463_ACEOF
11464 HAVE_GTK_FILE_CHOOSER=yes
11465fi
11466done
11467
11468
11469 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11470 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11471
11472cat >>confdefs.h <<\_ACEOF
11473#define HAVE_GTK_FILE_BOTH 1
11474_ACEOF
11475
11476 fi
11477
11478 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11479 HAVE_GTK_AND_PTHREAD=no
11480
11481for ac_header in pthread.h
11482do
11483as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
11484if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11485 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11486echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11487if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8eeae1c9
JD
11488 echo $ECHO_N "(cached) $ECHO_C" >&6
11489fi
ca81d7a0
JD
11490ac_res=`eval echo '${'$as_ac_Header'}'`
11491 { echo "$as_me:$LINENO: result: $ac_res" >&5
11492echo "${ECHO_T}$ac_res" >&6; }
8eeae1c9
JD
11493else
11494 # Is the header compilable?
ca81d7a0
JD
11495{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11496echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8eeae1c9
JD
11497cat >conftest.$ac_ext <<_ACEOF
11498/* confdefs.h. */
11499_ACEOF
11500cat confdefs.h >>conftest.$ac_ext
11501cat >>conftest.$ac_ext <<_ACEOF
11502/* end confdefs.h. */
11503$ac_includes_default
11504#include <$ac_header>
11505_ACEOF
11506rm -f conftest.$ac_objext
ca81d7a0
JD
11507if { (ac_try="$ac_compile"
11508case "(($ac_try" in
11509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11510 *) ac_try_echo=$ac_try;;
11511esac
11512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11513 (eval "$ac_compile") 2>conftest.er1
8eeae1c9
JD
11514 ac_status=$?
11515 grep -v '^ *+' conftest.er1 >conftest.err
11516 rm -f conftest.er1
edfaf76d 11517 cat conftest.err >&5
b8bdffbe 11518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11519 (exit $ac_status); } && {
11520 test -z "$ac_c_werror_flag" ||
11521 test ! -s conftest.err
11522 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11523 ac_header_compiler=yes
11524else
11525 echo "$as_me: failed program was:" >&5
11526sed 's/^/| /' conftest.$ac_ext >&5
11527
ca81d7a0 11528 ac_header_compiler=no
b8bdffbe 11529fi
ca81d7a0
JD
11530
11531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11532{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11533echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11534
11535# Is the header present?
ca81d7a0
JD
11536{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11537echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11538cat >conftest.$ac_ext <<_ACEOF
11539/* confdefs.h. */
11540_ACEOF
11541cat confdefs.h >>conftest.$ac_ext
11542cat >>conftest.$ac_ext <<_ACEOF
11543/* end confdefs.h. */
11544#include <$ac_header>
11545_ACEOF
ca81d7a0
JD
11546if { (ac_try="$ac_cpp conftest.$ac_ext"
11547case "(($ac_try" in
11548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11549 *) ac_try_echo=$ac_try;;
11550esac
11551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11552 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11553 ac_status=$?
11554 grep -v '^ *+' conftest.er1 >conftest.err
11555 rm -f conftest.er1
11556 cat conftest.err >&5
11557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11558 (exit $ac_status); } >/dev/null && {
11559 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11560 test ! -s conftest.err
11561 }; then
b8bdffbe
JD
11562 ac_header_preproc=yes
11563else
11564 echo "$as_me: failed program was:" >&5
11565sed 's/^/| /' conftest.$ac_ext >&5
11566
11567 ac_header_preproc=no
11568fi
ca81d7a0 11569
b8bdffbe 11570rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
11571{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11572echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11573
11574# So? What about this header?
edfaf76d
LK
11575case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11576 yes:no: )
b8bdffbe
JD
11577 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11578echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11579 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11580echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11581 ac_header_preproc=yes
b8bdffbe 11582 ;;
edfaf76d 11583 no:yes:* )
b8bdffbe
JD
11584 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11585echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11586 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11587echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11588 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11589echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11590 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11591echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11592 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11593echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11594 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11595echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11596
b8bdffbe
JD
11597 ;;
11598esac
ca81d7a0
JD
11599{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11600echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11601if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11602 echo $ECHO_N "(cached) $ECHO_C" >&6
11603else
edfaf76d 11604 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11605fi
ca81d7a0
JD
11606ac_res=`eval echo '${'$as_ac_Header'}'`
11607 { echo "$as_me:$LINENO: result: $ac_res" >&5
11608echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11609
11610fi
11611if test `eval echo '${'$as_ac_Header'}'` = yes; then
11612 cat >>confdefs.h <<_ACEOF
11613#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11614_ACEOF
11615
11616fi
11617
11618done
11619
11620 if test "$ac_cv_header_pthread_h"; then
ca81d7a0
JD
11621 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11622echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11623if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11624 echo $ECHO_N "(cached) $ECHO_C" >&6
11625else
11626 ac_check_lib_save_LIBS=$LIBS
11627LIBS="-lpthread $LIBS"
11628cat >conftest.$ac_ext <<_ACEOF
11629/* confdefs.h. */
11630_ACEOF
11631cat confdefs.h >>conftest.$ac_ext
11632cat >>conftest.$ac_ext <<_ACEOF
11633/* end confdefs.h. */
11634
ca81d7a0
JD
11635/* Override any GCC internal prototype to avoid an error.
11636 Use char because int might match the return type of a GCC
11637 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11638#ifdef __cplusplus
11639extern "C"
11640#endif
b8bdffbe
JD
11641char pthread_self ();
11642int
11643main ()
11644{
ca81d7a0 11645return pthread_self ();
b8bdffbe
JD
11646 ;
11647 return 0;
11648}
11649_ACEOF
11650rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11651if { (ac_try="$ac_link"
11652case "(($ac_try" in
11653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11654 *) ac_try_echo=$ac_try;;
11655esac
11656eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11657 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11658 ac_status=$?
edfaf76d
LK
11659 grep -v '^ *+' conftest.er1 >conftest.err
11660 rm -f conftest.er1
11661 cat conftest.err >&5
b8bdffbe 11662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11663 (exit $ac_status); } && {
11664 test -z "$ac_c_werror_flag" ||
11665 test ! -s conftest.err
11666 } && test -s conftest$ac_exeext &&
11667 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11668 ac_cv_lib_pthread_pthread_self=yes
11669else
11670 echo "$as_me: failed program was:" >&5
11671sed 's/^/| /' conftest.$ac_ext >&5
11672
ca81d7a0 11673 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11674fi
ca81d7a0 11675
f053c89f 11676rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11677 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11678LIBS=$ac_check_lib_save_LIBS
11679fi
ca81d7a0
JD
11680{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11681echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11682if test $ac_cv_lib_pthread_pthread_self = yes; then
11683 HAVE_GTK_AND_PTHREAD=yes
11684fi
11685
11686 fi
11687 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
11688 GTK_LIBS="$GTK_LIBS -lpthread"
11689
11690cat >>confdefs.h <<\_ACEOF
11691#define HAVE_GTK_AND_PTHREAD 1
11692_ACEOF
11693
11694 fi
57669b57 11695 fi
488dd4c4
JD
11696fi
11697
9d89ffd0
JD
11698### Link with -lXft if available to work around a bug.
11699HAVE_XFT=maybe
11700if test "${HAVE_GTK}" = "yes"; then
11701 if test "X${with_pkg_config_prog}" != X; then
11702 PKG_CONFIG="${with_pkg_config_prog}"
11703 fi
11704
11705
11706 succeeded=no
11707
11708 if test -z "$PKG_CONFIG"; then
11709 # Extract the first word of "pkg-config", so it can be a program name with args.
11710set dummy pkg-config; ac_word=$2
11711{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11712echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11713if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
11714 echo $ECHO_N "(cached) $ECHO_C" >&6
11715else
11716 case $PKG_CONFIG in
11717 [\\/]* | ?:[\\/]*)
11718 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11719 ;;
11720 *)
11721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11722for as_dir in $PATH
11723do
11724 IFS=$as_save_IFS
11725 test -z "$as_dir" && as_dir=.
11726 for ac_exec_ext in '' $ac_executable_extensions; do
11727 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11728 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11729 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11730 break 2
11731 fi
11732done
11733done
11734IFS=$as_save_IFS
11735
11736 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11737 ;;
11738esac
11739fi
11740PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11741if test -n "$PKG_CONFIG"; then
11742 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11743echo "${ECHO_T}$PKG_CONFIG" >&6; }
11744else
11745 { echo "$as_me:$LINENO: result: no" >&5
11746echo "${ECHO_T}no" >&6; }
11747fi
11748
11749
11750 fi
11751
11752 if test "$PKG_CONFIG" = "no" ; then
11753 HAVE_XFT=no
11754 else
11755 PKG_CONFIG_MIN_VERSION=0.9.0
11756 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11757 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
11758echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
11759
11760 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
11761 { echo "$as_me:$LINENO: result: yes" >&5
11762echo "${ECHO_T}yes" >&6; }
11763 succeeded=yes
11764
11765 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
11766echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
94315858 11767 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9d89ffd0
JD
11768 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
11769echo "${ECHO_T}$XFT_CFLAGS" >&6; }
11770
11771 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
11772echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
94315858 11773 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
9d89ffd0
JD
11774 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
11775echo "${ECHO_T}$XFT_LIBS" >&6; }
11776 else
11777 { echo "$as_me:$LINENO: result: no" >&5
11778echo "${ECHO_T}no" >&6; }
11779 XFT_CFLAGS=""
11780 XFT_LIBS=""
11781 ## If we have a custom action on failure, don't print errors, but
11782 ## do set a variable so people can do so.
11783 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
11784
11785 fi
11786
11787
11788
11789 else
11790 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11791 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11792 fi
11793 fi
11794
11795 if test $succeeded = yes; then
11796 :
11797 else
11798 HAVE_XFT=no
11799 fi
11800
11801 if test "$HAVE_XFT" != no; then
11802 OLD_CFLAGS="$CPPFLAGS"
f23323c5 11803 OLD_CPPFLAGS="$CFLAGS"
9d89ffd0
JD
11804 OLD_LIBS="$LIBS"
11805 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
11806 CFLAGS="$CFLAGS $XFT_CFLAGS"
11807 LIBS="$XFT_LIBS $LIBS"
11808 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
11809 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
11810echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
11811if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
11812 echo $ECHO_N "(cached) $ECHO_C" >&6
11813fi
11814{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
11815echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
11816else
11817 # Is the header compilable?
11818{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
11819echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
11820cat >conftest.$ac_ext <<_ACEOF
11821/* confdefs.h. */
11822_ACEOF
11823cat confdefs.h >>conftest.$ac_ext
11824cat >>conftest.$ac_ext <<_ACEOF
11825/* end confdefs.h. */
11826$ac_includes_default
11827#include <X11/Xft/Xft.h>
11828_ACEOF
11829rm -f conftest.$ac_objext
11830if { (ac_try="$ac_compile"
11831case "(($ac_try" in
11832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11833 *) ac_try_echo=$ac_try;;
11834esac
11835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11836 (eval "$ac_compile") 2>conftest.er1
11837 ac_status=$?
11838 grep -v '^ *+' conftest.er1 >conftest.err
11839 rm -f conftest.er1
11840 cat conftest.err >&5
11841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11842 (exit $ac_status); } && {
11843 test -z "$ac_c_werror_flag" ||
11844 test ! -s conftest.err
11845 } && test -s conftest.$ac_objext; then
11846 ac_header_compiler=yes
11847else
11848 echo "$as_me: failed program was:" >&5
11849sed 's/^/| /' conftest.$ac_ext >&5
11850
11851 ac_header_compiler=no
11852fi
11853
11854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11855{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11856echo "${ECHO_T}$ac_header_compiler" >&6; }
11857
11858# Is the header present?
11859{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
11860echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
11861cat >conftest.$ac_ext <<_ACEOF
11862/* confdefs.h. */
11863_ACEOF
11864cat confdefs.h >>conftest.$ac_ext
11865cat >>conftest.$ac_ext <<_ACEOF
11866/* end confdefs.h. */
11867#include <X11/Xft/Xft.h>
11868_ACEOF
11869if { (ac_try="$ac_cpp conftest.$ac_ext"
11870case "(($ac_try" in
11871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11872 *) ac_try_echo=$ac_try;;
11873esac
11874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11875 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11876 ac_status=$?
11877 grep -v '^ *+' conftest.er1 >conftest.err
11878 rm -f conftest.er1
11879 cat conftest.err >&5
11880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11881 (exit $ac_status); } >/dev/null && {
11882 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11883 test ! -s conftest.err
11884 }; then
11885 ac_header_preproc=yes
11886else
11887 echo "$as_me: failed program was:" >&5
11888sed 's/^/| /' conftest.$ac_ext >&5
11889
11890 ac_header_preproc=no
11891fi
11892
11893rm -f conftest.err conftest.$ac_ext
11894{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11895echo "${ECHO_T}$ac_header_preproc" >&6; }
11896
11897# So? What about this header?
11898case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11899 yes:no: )
11900 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
11901echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11902 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
11903echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
11904 ac_header_preproc=yes
11905 ;;
11906 no:yes:* )
11907 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
11908echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
11909 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
11910echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
11911 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
11912echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
11913 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
11914echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
11915 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
11916echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
11917 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
11918echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
11919
11920 ;;
11921esac
11922{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
11923echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
11924if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
11925 echo $ECHO_N "(cached) $ECHO_C" >&6
11926else
11927 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
11928fi
11929{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
11930echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
11931
11932fi
11933if test $ac_cv_header_X11_Xft_Xft_h = yes; then
11934 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
11935echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
11936if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
11937 echo $ECHO_N "(cached) $ECHO_C" >&6
11938else
11939 ac_check_lib_save_LIBS=$LIBS
11940LIBS="-lXft $XFT_LIBS $LIBS"
11941cat >conftest.$ac_ext <<_ACEOF
11942/* confdefs.h. */
11943_ACEOF
11944cat confdefs.h >>conftest.$ac_ext
11945cat >>conftest.$ac_ext <<_ACEOF
11946/* end confdefs.h. */
11947
11948/* Override any GCC internal prototype to avoid an error.
11949 Use char because int might match the return type of a GCC
11950 builtin and then its argument prototype would still apply. */
11951#ifdef __cplusplus
11952extern "C"
11953#endif
11954char XftFontOpen ();
11955int
11956main ()
11957{
11958return XftFontOpen ();
11959 ;
11960 return 0;
11961}
11962_ACEOF
11963rm -f conftest.$ac_objext conftest$ac_exeext
11964if { (ac_try="$ac_link"
11965case "(($ac_try" in
11966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11967 *) ac_try_echo=$ac_try;;
11968esac
11969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11970 (eval "$ac_link") 2>conftest.er1
11971 ac_status=$?
11972 grep -v '^ *+' conftest.er1 >conftest.err
11973 rm -f conftest.er1
11974 cat conftest.err >&5
11975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11976 (exit $ac_status); } && {
11977 test -z "$ac_c_werror_flag" ||
11978 test ! -s conftest.err
11979 } && test -s conftest$ac_exeext &&
11980 $as_test_x conftest$ac_exeext; then
11981 ac_cv_lib_Xft_XftFontOpen=yes
11982else
11983 echo "$as_me: failed program was:" >&5
11984sed 's/^/| /' conftest.$ac_ext >&5
11985
11986 ac_cv_lib_Xft_XftFontOpen=no
11987fi
11988
11989rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11990 conftest$ac_exeext conftest.$ac_ext
11991LIBS=$ac_check_lib_save_LIBS
11992fi
11993{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
11994echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
11995if test $ac_cv_lib_Xft_XftFontOpen = yes; then
11996 HAVE_XFT=yes
11997fi
11998
11999fi
12000
12001
12002
12003 if test "${HAVE_XFT}" = "yes"; then
12004
12005cat >>confdefs.h <<\_ACEOF
12006#define HAVE_XFT 1
12007_ACEOF
12008
12009
12010 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12011 else
12012 CFLAGS="$OLD_CPPFLAGS"
12013 CFLAGS="$OLD_CFLAGS"
12014 LIBS="$OLD_LIBS"
12015 fi
12016 fi
12017fi
12018
3685ba3f 12019if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
98418dba 12020 if test x"${HAVE_X11R5}" = xyes; then
ca81d7a0
JD
12021 { echo "$as_me:$LINENO: checking X11 version 5 with Xaw" >&5
12022echo $ECHO_N "checking X11 version 5 with Xaw... $ECHO_C" >&6; }
98418dba
CW
12023 if test "${emacs_cv_x11_version_5_with_xaw+set}" = set; then
12024 echo $ECHO_N "(cached) $ECHO_C" >&6
12025else
12026 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12027/* confdefs.h. */
12028_ACEOF
12029cat confdefs.h >>conftest.$ac_ext
12030cat >>conftest.$ac_ext <<_ACEOF
12031/* end confdefs.h. */
98418dba
CW
12032
12033#include <X11/Intrinsic.h>
12034#include <X11/Xaw/Simple.h>
98418dba
CW
12035int
12036main ()
12037{
12038
12039 ;
12040 return 0;
12041}
12042_ACEOF
12043rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12044if { (ac_try="$ac_link"
12045case "(($ac_try" in
12046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12047 *) ac_try_echo=$ac_try;;
12048esac
12049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12050 (eval "$ac_link") 2>conftest.er1
98418dba 12051 ac_status=$?
edfaf76d
LK
12052 grep -v '^ *+' conftest.er1 >conftest.err
12053 rm -f conftest.er1
12054 cat conftest.err >&5
c0d27fcc 12055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12056 (exit $ac_status); } && {
12057 test -z "$ac_c_werror_flag" ||
12058 test ! -s conftest.err
12059 } && test -s conftest$ac_exeext &&
12060 $as_test_x conftest$ac_exeext; then
98418dba
CW
12061 emacs_cv_x11_version_5_with_xaw=yes
12062else
12063 echo "$as_me: failed program was:" >&5
19650fd6
AS
12064sed 's/^/| /' conftest.$ac_ext >&5
12065
ca81d7a0 12066 emacs_cv_x11_version_5_with_xaw=no
98418dba 12067fi
ca81d7a0 12068
f053c89f 12069rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12070 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12071fi
12072
12073 if test $emacs_cv_x11_version_5_with_xaw = yes; then
ca81d7a0
JD
12074 { echo "$as_me:$LINENO: result: 5 or newer, with Xaw; use toolkit by default" >&5
12075echo "${ECHO_T}5 or newer, with Xaw; use toolkit by default" >&6; }
98418dba
CW
12076 USE_X_TOOLKIT=LUCID
12077 else
3685ba3f
CY
12078 if test x"${USE_X_TOOLKIT}" = xLUCID; then
12079 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
12080echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
12081 { (exit 1); exit 1; }; }
12082 else
12083 { echo "$as_me:$LINENO: result: before 5 or no Xaw; do not use toolkit by default" >&5
ca81d7a0 12084echo "${ECHO_T}before 5 or no Xaw; do not use toolkit by default" >&6; }
3685ba3f
CY
12085 USE_X_TOOLKIT=none
12086 fi
98418dba
CW
12087 fi
12088 else
12089 USE_X_TOOLKIT=none
12090 fi
12091fi
12092
12093X_TOOLKIT_TYPE=$USE_X_TOOLKIT
12094
12095if test "${USE_X_TOOLKIT}" != "none"; then
ca81d7a0
JD
12096 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
12097echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
12098 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
12099 echo $ECHO_N "(cached) $ECHO_C" >&6
12100else
12101 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12102/* confdefs.h. */
12103_ACEOF
12104cat confdefs.h >>conftest.$ac_ext
12105cat >>conftest.$ac_ext <<_ACEOF
12106/* end confdefs.h. */
98418dba 12107#include <X11/Intrinsic.h>
98418dba
CW
12108int
12109main ()
12110{
12111#if XtSpecificationRelease < 6
12112fail;
12113#endif
12114
12115 ;
12116 return 0;
12117}
12118_ACEOF
12119rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12120if { (ac_try="$ac_link"
12121case "(($ac_try" in
12122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12123 *) ac_try_echo=$ac_try;;
12124esac
12125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12126 (eval "$ac_link") 2>conftest.er1
98418dba 12127 ac_status=$?
edfaf76d
LK
12128 grep -v '^ *+' conftest.er1 >conftest.err
12129 rm -f conftest.er1
12130 cat conftest.err >&5
c0d27fcc 12131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12132 (exit $ac_status); } && {
12133 test -z "$ac_c_werror_flag" ||
12134 test ! -s conftest.err
12135 } && test -s conftest$ac_exeext &&
12136 $as_test_x conftest$ac_exeext; then
98418dba
CW
12137 emacs_cv_x11_toolkit_version_6=yes
12138else
12139 echo "$as_me: failed program was:" >&5
19650fd6
AS
12140sed 's/^/| /' conftest.$ac_ext >&5
12141
ca81d7a0 12142 emacs_cv_x11_toolkit_version_6=no
98418dba 12143fi
ca81d7a0 12144
f053c89f 12145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12146 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12147fi
12148
12149 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
12150 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ca81d7a0
JD
12151 { echo "$as_me:$LINENO: result: 6 or newer" >&5
12152echo "${ECHO_T}6 or newer" >&6; }
b936fae4 12153
c0d27fcc 12154cat >>confdefs.h <<\_ACEOF
98418dba 12155#define HAVE_X11XTR6 1
c0d27fcc 12156_ACEOF
98418dba
CW
12157
12158 else
ca81d7a0
JD
12159 { echo "$as_me:$LINENO: result: before 6" >&5
12160echo "${ECHO_T}before 6" >&6; }
98418dba
CW
12161 fi
12162
12163 OLDLIBS="$LIBS"
12164 if test x$HAVE_X11XTR6 = xyes; then
12165 LIBS="-lXt -lSM -lICE $LIBS"
12166 else
12167 LIBS="-lXt $LIBS"
12168 fi
12169
ca81d7a0
JD
12170{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
12171echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
12172if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
12173 echo $ECHO_N "(cached) $ECHO_C" >&6
12174else
12175 ac_check_lib_save_LIBS=$LIBS
12176LIBS="-lXmu $LIBS"
12177cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12178/* confdefs.h. */
12179_ACEOF
12180cat confdefs.h >>conftest.$ac_ext
12181cat >>conftest.$ac_ext <<_ACEOF
12182/* end confdefs.h. */
98418dba 12183
ca81d7a0
JD
12184/* Override any GCC internal prototype to avoid an error.
12185 Use char because int might match the return type of a GCC
12186 builtin and then its argument prototype would still apply. */
98418dba
CW
12187#ifdef __cplusplus
12188extern "C"
12189#endif
98418dba 12190char XmuConvertStandardSelection ();
98418dba
CW
12191int
12192main ()
12193{
ca81d7a0 12194return XmuConvertStandardSelection ();
98418dba
CW
12195 ;
12196 return 0;
12197}
12198_ACEOF
12199rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12200if { (ac_try="$ac_link"
12201case "(($ac_try" in
12202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12203 *) ac_try_echo=$ac_try;;
12204esac
12205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12206 (eval "$ac_link") 2>conftest.er1
98418dba 12207 ac_status=$?
edfaf76d
LK
12208 grep -v '^ *+' conftest.er1 >conftest.err
12209 rm -f conftest.er1
12210 cat conftest.err >&5
c0d27fcc 12211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12212 (exit $ac_status); } && {
12213 test -z "$ac_c_werror_flag" ||
12214 test ! -s conftest.err
12215 } && test -s conftest$ac_exeext &&
12216 $as_test_x conftest$ac_exeext; then
98418dba
CW
12217 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
12218else
12219 echo "$as_me: failed program was:" >&5
19650fd6
AS
12220sed 's/^/| /' conftest.$ac_ext >&5
12221
ca81d7a0 12222 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 12223fi
ca81d7a0 12224
f053c89f 12225rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12226 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12227LIBS=$ac_check_lib_save_LIBS
12228fi
ca81d7a0
JD
12229{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
12230echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 12231if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 12232 cat >>confdefs.h <<_ACEOF
98418dba 12233#define HAVE_LIBXMU 1
c0d27fcc 12234_ACEOF
98418dba
CW
12235
12236 LIBS="-lXmu $LIBS"
12237
12238fi
12239
12240 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
12241fi
12242
12243# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
12244if test "${HAVE_X11}" = "yes"; then
12245 if test "${USE_X_TOOLKIT}" != "none"; then
12246
ca81d7a0
JD
12247{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
12248echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
12249if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
12250 echo $ECHO_N "(cached) $ECHO_C" >&6
12251else
12252 ac_check_lib_save_LIBS=$LIBS
12253LIBS="-lXext $LIBS"
12254cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12255/* confdefs.h. */
12256_ACEOF
12257cat confdefs.h >>conftest.$ac_ext
12258cat >>conftest.$ac_ext <<_ACEOF
12259/* end confdefs.h. */
98418dba 12260
ca81d7a0
JD
12261/* Override any GCC internal prototype to avoid an error.
12262 Use char because int might match the return type of a GCC
12263 builtin and then its argument prototype would still apply. */
98418dba
CW
12264#ifdef __cplusplus
12265extern "C"
12266#endif
98418dba 12267char XShapeQueryExtension ();
98418dba
CW
12268int
12269main ()
12270{
ca81d7a0 12271return XShapeQueryExtension ();
98418dba
CW
12272 ;
12273 return 0;
12274}
12275_ACEOF
12276rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12277if { (ac_try="$ac_link"
12278case "(($ac_try" in
12279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12280 *) ac_try_echo=$ac_try;;
12281esac
12282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12283 (eval "$ac_link") 2>conftest.er1
98418dba 12284 ac_status=$?
edfaf76d
LK
12285 grep -v '^ *+' conftest.er1 >conftest.err
12286 rm -f conftest.er1
12287 cat conftest.err >&5
c0d27fcc 12288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12289 (exit $ac_status); } && {
12290 test -z "$ac_c_werror_flag" ||
12291 test ! -s conftest.err
12292 } && test -s conftest$ac_exeext &&
12293 $as_test_x conftest$ac_exeext; then
98418dba
CW
12294 ac_cv_lib_Xext_XShapeQueryExtension=yes
12295else
12296 echo "$as_me: failed program was:" >&5
19650fd6
AS
12297sed 's/^/| /' conftest.$ac_ext >&5
12298
ca81d7a0 12299 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12300fi
ca81d7a0 12301
f053c89f 12302rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12303 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12304LIBS=$ac_check_lib_save_LIBS
12305fi
ca81d7a0
JD
12306{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12307echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12308if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12309 cat >>confdefs.h <<_ACEOF
98418dba 12310#define HAVE_LIBXEXT 1
c0d27fcc 12311_ACEOF
98418dba
CW
12312
12313 LIBS="-lXext $LIBS"
12314
12315fi
12316
12317 fi
12318fi
12319
12320if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ca81d7a0
JD
12321 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12322echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12323if test "${emacs_cv_motif_version_2_1+set}" = set; then
12324 echo $ECHO_N "(cached) $ECHO_C" >&6
12325else
12326 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12327/* confdefs.h. */
12328_ACEOF
12329cat confdefs.h >>conftest.$ac_ext
12330cat >>conftest.$ac_ext <<_ACEOF
12331/* end confdefs.h. */
98418dba 12332#include <Xm/Xm.h>
98418dba
CW
12333int
12334main ()
12335{
12336#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12337int x = 5;
12338#else
12339Motif version prior to 2.1.
12340#endif
12341 ;
12342 return 0;
12343}
12344_ACEOF
12345rm -f conftest.$ac_objext
ca81d7a0
JD
12346if { (ac_try="$ac_compile"
12347case "(($ac_try" in
12348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12349 *) ac_try_echo=$ac_try;;
12350esac
12351eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12352 (eval "$ac_compile") 2>conftest.er1
98418dba 12353 ac_status=$?
edfaf76d
LK
12354 grep -v '^ *+' conftest.er1 >conftest.err
12355 rm -f conftest.er1
12356 cat conftest.err >&5
c0d27fcc 12357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12358 (exit $ac_status); } && {
12359 test -z "$ac_c_werror_flag" ||
12360 test ! -s conftest.err
12361 } && test -s conftest.$ac_objext; then
98418dba
CW
12362 emacs_cv_motif_version_2_1=yes
12363else
12364 echo "$as_me: failed program was:" >&5
19650fd6
AS
12365sed 's/^/| /' conftest.$ac_ext >&5
12366
ca81d7a0 12367 emacs_cv_motif_version_2_1=no
98418dba 12368fi
ca81d7a0
JD
12369
12370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12371fi
ca81d7a0
JD
12372{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12373echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12374 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12375 if test $emacs_cv_motif_version_2_1 = yes; then
12376 HAVE_LIBXP=no
b936fae4 12377
c0d27fcc 12378cat >>confdefs.h <<\_ACEOF
98418dba 12379#define HAVE_MOTIF_2_1 1
c0d27fcc 12380_ACEOF
98418dba 12381
ca81d7a0
JD
12382 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12383echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12384if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12385 echo $ECHO_N "(cached) $ECHO_C" >&6
12386else
12387 ac_check_lib_save_LIBS=$LIBS
12388LIBS="-lXp $LIBS"
12389cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12390/* confdefs.h. */
12391_ACEOF
12392cat confdefs.h >>conftest.$ac_ext
12393cat >>conftest.$ac_ext <<_ACEOF
12394/* end confdefs.h. */
98418dba 12395
ca81d7a0
JD
12396/* Override any GCC internal prototype to avoid an error.
12397 Use char because int might match the return type of a GCC
12398 builtin and then its argument prototype would still apply. */
98418dba
CW
12399#ifdef __cplusplus
12400extern "C"
12401#endif
98418dba 12402char XpCreateContext ();
98418dba
CW
12403int
12404main ()
12405{
ca81d7a0 12406return XpCreateContext ();
98418dba
CW
12407 ;
12408 return 0;
12409}
12410_ACEOF
12411rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12412if { (ac_try="$ac_link"
12413case "(($ac_try" in
12414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12415 *) ac_try_echo=$ac_try;;
12416esac
12417eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12418 (eval "$ac_link") 2>conftest.er1
98418dba 12419 ac_status=$?
edfaf76d
LK
12420 grep -v '^ *+' conftest.er1 >conftest.err
12421 rm -f conftest.er1
12422 cat conftest.err >&5
c0d27fcc 12423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12424 (exit $ac_status); } && {
12425 test -z "$ac_c_werror_flag" ||
12426 test ! -s conftest.err
12427 } && test -s conftest$ac_exeext &&
12428 $as_test_x conftest$ac_exeext; then
98418dba
CW
12429 ac_cv_lib_Xp_XpCreateContext=yes
12430else
12431 echo "$as_me: failed program was:" >&5
19650fd6
AS
12432sed 's/^/| /' conftest.$ac_ext >&5
12433
ca81d7a0 12434 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12435fi
ca81d7a0 12436
f053c89f 12437rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12438 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12439LIBS=$ac_check_lib_save_LIBS
12440fi
ca81d7a0
JD
12441{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12442echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12443if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12444 HAVE_LIBXP=yes
12445fi
503d2be0 12446
98418dba 12447 if test ${HAVE_LIBXP} = yes; then
b936fae4 12448
c0d27fcc 12449cat >>confdefs.h <<\_ACEOF
98418dba 12450#define HAVE_LIBXP 1
c0d27fcc 12451_ACEOF
503d2be0 12452
98418dba 12453 fi
4693dbc9 12454 else
ca81d7a0
JD
12455 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12456echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12457if test "${emacs_cv_lesstif+set}" = set; then
12458 echo $ECHO_N "(cached) $ECHO_C" >&6
12459else
12460 # We put this in CFLAGS temporarily to precede other -I options
12461 # that might be in CFLAGS temporarily.
12462 # We put this in CPPFLAGS where it precedes the other -I options.
12463 OLD_CPPFLAGS=$CPPFLAGS
12464 OLD_CFLAGS=$CFLAGS
12465 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12466 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12467 cat >conftest.$ac_ext <<_ACEOF
12468/* confdefs.h. */
12469_ACEOF
12470cat confdefs.h >>conftest.$ac_ext
12471cat >>conftest.$ac_ext <<_ACEOF
12472/* end confdefs.h. */
12473#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12474int
12475main ()
12476{
12477int x = 5;
12478 ;
12479 return 0;
12480}
12481_ACEOF
12482rm -f conftest.$ac_objext
ca81d7a0
JD
12483if { (ac_try="$ac_compile"
12484case "(($ac_try" in
12485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12486 *) ac_try_echo=$ac_try;;
12487esac
12488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12489 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12490 ac_status=$?
edfaf76d
LK
12491 grep -v '^ *+' conftest.er1 >conftest.err
12492 rm -f conftest.er1
12493 cat conftest.err >&5
4693dbc9 12494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12495 (exit $ac_status); } && {
12496 test -z "$ac_c_werror_flag" ||
12497 test ! -s conftest.err
12498 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12499 emacs_cv_lesstif=yes
12500else
12501 echo "$as_me: failed program was:" >&5
12502sed 's/^/| /' conftest.$ac_ext >&5
12503
ca81d7a0 12504 emacs_cv_lesstif=no
4693dbc9 12505fi
ca81d7a0
JD
12506
12507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12508fi
ca81d7a0
JD
12509{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12510echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12511 if test $emacs_cv_lesstif = yes; then
12512 # Make sure this -I option remains in CPPFLAGS after it is set
12513 # back to REAL_CPPFLAGS.
12514 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12515 # have those other -I options anyway. Ultimately, having this
12516 # directory ultimately in CPPFLAGS will be enough.
12517 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12518 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12519 else
12520 CFLAGS=$OLD_CFLAGS
12521 CPPFLAGS=$OLD_CPPFLAGS
12522 fi
98418dba
CW
12523 fi
12524fi
12525
12526### Is -lXaw3d available?
12527HAVE_XAW3D=no
12528if test "${HAVE_X11}" = "yes"; then
7c00e1e9 12529 if test "${USE_X_TOOLKIT}" != "none" && test "${with_toolkit_scroll_bars}" != "no"; then
ca81d7a0
JD
12530 { echo "$as_me:$LINENO: checking for X11/Xaw3d/Scrollbar.h" >&5
12531echo $ECHO_N "checking for X11/Xaw3d/Scrollbar.h... $ECHO_C" >&6; }
98418dba
CW
12532if test "${ac_cv_header_X11_Xaw3d_Scrollbar_h+set}" = set; then
12533 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba 12534else
22044edf 12535 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12536/* confdefs.h. */
12537_ACEOF
12538cat confdefs.h >>conftest.$ac_ext
12539cat >>conftest.$ac_ext <<_ACEOF
12540/* end confdefs.h. */
98418dba 12541#include <X11/Xaw3d/Scrollbar.h>
503d2be0 12542_ACEOF
ca81d7a0
JD
12543if { (ac_try="$ac_cpp conftest.$ac_ext"
12544case "(($ac_try" in
12545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12546 *) ac_try_echo=$ac_try;;
12547esac
12548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12549 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 12550 ac_status=$?
6bae0ccf 12551 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
12552 rm -f conftest.er1
12553 cat conftest.err >&5
c0d27fcc 12554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12555 (exit $ac_status); } >/dev/null && {
12556 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12557 test ! -s conftest.err
12558 }; then
22044edf 12559 ac_cv_header_X11_Xaw3d_Scrollbar_h=yes
ba4481b5 12560else
503d2be0 12561 echo "$as_me: failed program was:" >&5
19650fd6
AS
12562sed 's/^/| /' conftest.$ac_ext >&5
12563
22044edf 12564 ac_cv_header_X11_Xaw3d_Scrollbar_h=no
ba4481b5 12565fi
ca81d7a0 12566
503d2be0 12567rm -f conftest.err conftest.$ac_ext
98418dba 12568fi
ca81d7a0
JD
12569{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xaw3d_Scrollbar_h" >&5
12570echo "${ECHO_T}$ac_cv_header_X11_Xaw3d_Scrollbar_h" >&6; }
98418dba 12571if test $ac_cv_header_X11_Xaw3d_Scrollbar_h = yes; then
ca81d7a0
JD
12572 { echo "$as_me:$LINENO: checking for XawScrollbarSetThumb in -lXaw3d" >&5
12573echo $ECHO_N "checking for XawScrollbarSetThumb in -lXaw3d... $ECHO_C" >&6; }
98418dba
CW
12574if test "${ac_cv_lib_Xaw3d_XawScrollbarSetThumb+set}" = set; then
12575 echo $ECHO_N "(cached) $ECHO_C" >&6
12576else
12577 ac_check_lib_save_LIBS=$LIBS
12578LIBS="-lXaw3d $LIBS"
12579cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12580/* confdefs.h. */
12581_ACEOF
12582cat confdefs.h >>conftest.$ac_ext
12583cat >>conftest.$ac_ext <<_ACEOF
12584/* end confdefs.h. */
98418dba 12585
ca81d7a0
JD
12586/* Override any GCC internal prototype to avoid an error.
12587 Use char because int might match the return type of a GCC
12588 builtin and then its argument prototype would still apply. */
98418dba
CW
12589#ifdef __cplusplus
12590extern "C"
12591#endif
98418dba 12592char XawScrollbarSetThumb ();
503d2be0
AS
12593int
12594main ()
12595{
ca81d7a0 12596return XawScrollbarSetThumb ();
503d2be0
AS
12597 ;
12598 return 0;
12599}
12600_ACEOF
12601rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12602if { (ac_try="$ac_link"
12603case "(($ac_try" in
12604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12605 *) ac_try_echo=$ac_try;;
12606esac
12607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12608 (eval "$ac_link") 2>conftest.er1
503d2be0 12609 ac_status=$?
edfaf76d
LK
12610 grep -v '^ *+' conftest.er1 >conftest.err
12611 rm -f conftest.er1
12612 cat conftest.err >&5
c0d27fcc 12613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12614 (exit $ac_status); } && {
12615 test -z "$ac_c_werror_flag" ||
12616 test ! -s conftest.err
12617 } && test -s conftest$ac_exeext &&
12618 $as_test_x conftest$ac_exeext; then
98418dba 12619 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=yes
ba4481b5 12620else
503d2be0 12621 echo "$as_me: failed program was:" >&5
19650fd6
AS
12622sed 's/^/| /' conftest.$ac_ext >&5
12623
ca81d7a0 12624 ac_cv_lib_Xaw3d_XawScrollbarSetThumb=no
ba4481b5 12625fi
ca81d7a0 12626
f053c89f 12627rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12628 conftest$ac_exeext conftest.$ac_ext
98418dba 12629LIBS=$ac_check_lib_save_LIBS
ba4481b5 12630fi
ca81d7a0
JD
12631{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&5
12632echo "${ECHO_T}$ac_cv_lib_Xaw3d_XawScrollbarSetThumb" >&6; }
98418dba
CW
12633if test $ac_cv_lib_Xaw3d_XawScrollbarSetThumb = yes; then
12634 HAVE_XAW3D=yes
ba4481b5 12635fi
503d2be0 12636
ba4481b5
DL
12637fi
12638
c0d27fcc 12639
98418dba 12640 if test "${HAVE_XAW3D}" = "yes"; then
b936fae4 12641
c0d27fcc 12642cat >>confdefs.h <<\_ACEOF
98418dba 12643#define HAVE_XAW3D 1
c0d27fcc 12644_ACEOF
98418dba 12645
ba4481b5 12646 fi
98418dba 12647 fi
ba4481b5
DL
12648fi
12649
c0d27fcc
MR
12650
12651
98418dba
CW
12652USE_TOOLKIT_SCROLL_BARS=no
12653if test "${with_toolkit_scroll_bars}" != "no"; then
12654 if test "${USE_X_TOOLKIT}" != "none"; then
12655 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12656 cat >>confdefs.h <<\_ACEOF
98418dba 12657#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12658_ACEOF
98418dba
CW
12659
12660 HAVE_XAW3D=no
12661 USE_TOOLKIT_SCROLL_BARS=yes
12662 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12663 cat >>confdefs.h <<\_ACEOF
98418dba 12664#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12665_ACEOF
98418dba
CW
12666
12667 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12668 fi
488dd4c4
JD
12669 elif test "${HAVE_GTK}" = "yes"; then
12670 cat >>confdefs.h <<\_ACEOF
12671#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
12672_ACEOF
12673
12674 USE_TOOLKIT_SCROLL_BARS=yes
12675 elif test "${HAVE_CARBON}" = "yes"; then
12676 cat >>confdefs.h <<\_ACEOF
12677#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12678_ACEOF
12679
12680 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12681 fi
12682fi
12683
abd39b57 12684cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12685/* confdefs.h. */
12686_ACEOF
12687cat confdefs.h >>conftest.$ac_ext
12688cat >>conftest.$ac_ext <<_ACEOF
12689/* end confdefs.h. */
12690
12691 #include <X11/Xlib.h>
12692 #include <X11/Xresource.h>
12693int
12694main ()
12695{
12696XIMProc callback;
12697 ;
12698 return 0;
12699}
12700_ACEOF
12701rm -f conftest.$ac_objext
ca81d7a0
JD
12702if { (ac_try="$ac_compile"
12703case "(($ac_try" in
12704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12705 *) ac_try_echo=$ac_try;;
12706esac
12707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12708 (eval "$ac_compile") 2>conftest.er1
abd39b57 12709 ac_status=$?
edfaf76d
LK
12710 grep -v '^ *+' conftest.er1 >conftest.err
12711 rm -f conftest.er1
12712 cat conftest.err >&5
abd39b57 12713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12714 (exit $ac_status); } && {
12715 test -z "$ac_c_werror_flag" ||
12716 test ! -s conftest.err
12717 } && test -s conftest.$ac_objext; then
abd39b57
AC
12718 HAVE_XIM=yes
12719
12720cat >>confdefs.h <<\_ACEOF
12721#define HAVE_XIM 1
12722_ACEOF
12723
12724else
12725 echo "$as_me: failed program was:" >&5
12726sed 's/^/| /' conftest.$ac_ext >&5
12727
ca81d7a0 12728 HAVE_XIM=no
abd39b57 12729fi
ca81d7a0
JD
12730
12731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12732
c0d27fcc 12733
98418dba 12734if test "${with_xim}" != "no"; then
b936fae4 12735
c0d27fcc 12736cat >>confdefs.h <<\_ACEOF
98418dba 12737#define USE_XIM 1
c0d27fcc 12738_ACEOF
98418dba 12739
793fa0d7 12740fi
abd39b57
AC
12741
12742
12743if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12744 late_CFLAGS=$CFLAGS
12745 if test "$GCC" = yes; then
12746 CFLAGS="$CFLAGS --pedantic-errors"
12747 fi
cffcede7 12748 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12749/* confdefs.h. */
12750_ACEOF
12751cat confdefs.h >>conftest.$ac_ext
12752cat >>conftest.$ac_ext <<_ACEOF
12753/* end confdefs.h. */
cffcede7
JD
12754
12755#include <X11/Xlib.h>
12756#include <X11/Xresource.h>
12757int
12758main ()
12759{
12760Display *display;
12761XrmDatabase db;
12762char *res_name;
12763char *res_class;
12764XIMProc callback;
12765XPointer *client_data;
849d80cf
DL
12766#ifndef __GNUC__
12767/* If we're not using GCC, it's probably not XFree86, and this is
12768 probably right, but we can't use something like --pedantic-errors. */
12769extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12770 char*, XIMProc, XPointer*);
12771#endif
cffcede7
JD
12772(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12773 client_data);
12774 ;
12775 return 0;
12776}
12777_ACEOF
12778rm -f conftest.$ac_objext
ca81d7a0
JD
12779if { (ac_try="$ac_compile"
12780case "(($ac_try" in
12781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12782 *) ac_try_echo=$ac_try;;
12783esac
12784eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12785 (eval "$ac_compile") 2>conftest.er1
cffcede7 12786 ac_status=$?
edfaf76d
LK
12787 grep -v '^ *+' conftest.er1 >conftest.err
12788 rm -f conftest.er1
12789 cat conftest.err >&5
cffcede7 12790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12791 (exit $ac_status); } && {
12792 test -z "$ac_c_werror_flag" ||
12793 test ! -s conftest.err
12794 } && test -s conftest.$ac_objext; then
cffcede7
JD
12795 emacs_cv_arg6_star=yes
12796else
12797 echo "$as_me: failed program was:" >&5
19650fd6
AS
12798sed 's/^/| /' conftest.$ac_ext >&5
12799
ca81d7a0 12800
cffcede7 12801fi
ca81d7a0
JD
12802
12803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12804
12805 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12806 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12807#define XRegisterIMInstantiateCallback_arg6 XPointer*
12808_ACEOF
12809
12810 else
f57bd967 12811 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12812#define XRegisterIMInstantiateCallback_arg6 XPointer
12813_ACEOF
12814
12815 fi
849d80cf 12816 CFLAGS=$late_CFLAGS
98418dba
CW
12817fi
12818
12819### Use -lXpm if available, unless `--with-xpm=no'.
12820HAVE_XPM=no
12821if test "${HAVE_X11}" = "yes"; then
12822 if test "${with_xpm}" != "no"; then
c0d27fcc 12823 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
ca81d7a0
JD
12824 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
12825echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
12826if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12827 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 12828fi
ca81d7a0
JD
12829{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
12830echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 12831else
c0d27fcc 12832 # Is the header compilable?
ca81d7a0
JD
12833{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
12834echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 12835cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12836/* confdefs.h. */
12837_ACEOF
12838cat confdefs.h >>conftest.$ac_ext
12839cat >>conftest.$ac_ext <<_ACEOF
12840/* end confdefs.h. */
c0d27fcc
MR
12841$ac_includes_default
12842#include <X11/xpm.h>
12843_ACEOF
12844rm -f conftest.$ac_objext
ca81d7a0
JD
12845if { (ac_try="$ac_compile"
12846case "(($ac_try" in
12847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12848 *) ac_try_echo=$ac_try;;
12849esac
12850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12851 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 12852 ac_status=$?
edfaf76d
LK
12853 grep -v '^ *+' conftest.er1 >conftest.err
12854 rm -f conftest.er1
12855 cat conftest.err >&5
c0d27fcc 12856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12857 (exit $ac_status); } && {
12858 test -z "$ac_c_werror_flag" ||
12859 test ! -s conftest.err
12860 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
12861 ac_header_compiler=yes
12862else
12863 echo "$as_me: failed program was:" >&5
19650fd6
AS
12864sed 's/^/| /' conftest.$ac_ext >&5
12865
ca81d7a0 12866 ac_header_compiler=no
c0d27fcc 12867fi
ca81d7a0
JD
12868
12869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12870{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12871echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
12872
12873# Is the header present?
ca81d7a0
JD
12874{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
12875echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 12876cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12877/* confdefs.h. */
12878_ACEOF
12879cat confdefs.h >>conftest.$ac_ext
12880cat >>conftest.$ac_ext <<_ACEOF
12881/* end confdefs.h. */
98418dba
CW
12882#include <X11/xpm.h>
12883_ACEOF
ca81d7a0
JD
12884if { (ac_try="$ac_cpp conftest.$ac_ext"
12885case "(($ac_try" in
12886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12887 *) ac_try_echo=$ac_try;;
12888esac
12889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12890 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 12891 ac_status=$?
6bae0ccf 12892 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
12893 rm -f conftest.er1
12894 cat conftest.err >&5
c0d27fcc 12895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12896 (exit $ac_status); } >/dev/null && {
12897 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12898 test ! -s conftest.err
12899 }; then
c0d27fcc 12900 ac_header_preproc=yes
98418dba
CW
12901else
12902 echo "$as_me: failed program was:" >&5
19650fd6
AS
12903sed 's/^/| /' conftest.$ac_ext >&5
12904
c0d27fcc 12905 ac_header_preproc=no
98418dba 12906fi
ca81d7a0 12907
98418dba 12908rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
12909{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12910echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
12911
12912# So? What about this header?
edfaf76d
LK
12913case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12914 yes:no: )
c0d27fcc
MR
12915 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
12916echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
12917 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
12918echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
12919 ac_header_preproc=yes
12920 ;;
12921 no:yes:* )
12922 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
12923echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
12924 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
12925echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
12926 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
12927echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
12928 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
12929echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
12930 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
12931echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
12932 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
12933echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 12934
19650fd6 12935 ;;
c0d27fcc 12936esac
ca81d7a0
JD
12937{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
12938echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
12939if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12940 echo $ECHO_N "(cached) $ECHO_C" >&6
12941else
12942 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 12943fi
ca81d7a0
JD
12944{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
12945echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
12946
12947fi
98418dba 12948if test $ac_cv_header_X11_xpm_h = yes; then
ca81d7a0
JD
12949 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
12950echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 12951if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 12952 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 12953else
98418dba
CW
12954 ac_check_lib_save_LIBS=$LIBS
12955LIBS="-lXpm -lX11 $LIBS"
12956cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12957/* confdefs.h. */
12958_ACEOF
12959cat confdefs.h >>conftest.$ac_ext
12960cat >>conftest.$ac_ext <<_ACEOF
12961/* end confdefs.h. */
98418dba 12962
ca81d7a0
JD
12963/* Override any GCC internal prototype to avoid an error.
12964 Use char because int might match the return type of a GCC
12965 builtin and then its argument prototype would still apply. */
503d2be0
AS
12966#ifdef __cplusplus
12967extern "C"
12968#endif
98418dba 12969char XpmReadFileToPixmap ();
503d2be0
AS
12970int
12971main ()
12972{
ca81d7a0 12973return XpmReadFileToPixmap ();
503d2be0
AS
12974 ;
12975 return 0;
12976}
12977_ACEOF
12978rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12979if { (ac_try="$ac_link"
12980case "(($ac_try" in
12981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12982 *) ac_try_echo=$ac_try;;
12983esac
12984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12985 (eval "$ac_link") 2>conftest.er1
503d2be0 12986 ac_status=$?
edfaf76d
LK
12987 grep -v '^ *+' conftest.er1 >conftest.err
12988 rm -f conftest.er1
12989 cat conftest.err >&5
c0d27fcc 12990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12991 (exit $ac_status); } && {
12992 test -z "$ac_c_werror_flag" ||
12993 test ! -s conftest.err
12994 } && test -s conftest$ac_exeext &&
12995 $as_test_x conftest$ac_exeext; then
98418dba 12996 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
12997else
12998 echo "$as_me: failed program was:" >&5
19650fd6
AS
12999sed 's/^/| /' conftest.$ac_ext >&5
13000
ca81d7a0 13001 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13002fi
ca81d7a0 13003
f053c89f 13004rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13005 conftest$ac_exeext conftest.$ac_ext
98418dba 13006LIBS=$ac_check_lib_save_LIBS
503d2be0 13007fi
ca81d7a0
JD
13008{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13009echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
13010if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
13011 HAVE_XPM=yes
ba4481b5
DL
13012fi
13013
98418dba
CW
13014fi
13015
c0d27fcc 13016
98418dba 13017 if test "${HAVE_XPM}" = "yes"; then
ca81d7a0
JD
13018 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13019echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13020 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13021/* confdefs.h. */
13022_ACEOF
13023cat confdefs.h >>conftest.$ac_ext
13024cat >>conftest.$ac_ext <<_ACEOF
13025/* end confdefs.h. */
98418dba
CW
13026#include "X11/xpm.h"
13027#ifndef XpmReturnAllocPixels
13028no_return_alloc_pixels
503d2be0 13029#endif
ba4481b5 13030
98418dba
CW
13031_ACEOF
13032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13033 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13034 HAVE_XPM=no
13035else
13036 HAVE_XPM=yes
13037fi
13038rm -f conftest*
ba4481b5 13039
c0d27fcc 13040
98418dba 13041 if test "${HAVE_XPM}" = "yes"; then
ca81d7a0
JD
13042 { echo "$as_me:$LINENO: result: yes" >&5
13043echo "${ECHO_T}yes" >&6; }
98418dba 13044 else
ca81d7a0
JD
13045 { echo "$as_me:$LINENO: result: no" >&5
13046echo "${ECHO_T}no" >&6; }
98418dba
CW
13047 fi
13048 fi
13049 fi
13050
13051 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13052
c0d27fcc 13053cat >>confdefs.h <<\_ACEOF
98418dba 13054#define HAVE_XPM 1
c0d27fcc 13055_ACEOF
98418dba
CW
13056
13057 fi
13058fi
13059
13060### Use -ljpeg if available, unless `--with-jpeg=no'.
13061HAVE_JPEG=no
13062if test "${HAVE_X11}" = "yes"; then
13063 if test "${with_jpeg}" != "no"; then
c0d27fcc 13064 if test "${ac_cv_header_jerror_h+set}" = set; then
ca81d7a0
JD
13065 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13066echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
13067if test "${ac_cv_header_jerror_h+set}" = set; then
13068 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13069fi
ca81d7a0
JD
13070{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13071echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13072else
c0d27fcc 13073 # Is the header compilable?
ca81d7a0
JD
13074{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13075echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13076cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13077/* confdefs.h. */
13078_ACEOF
13079cat confdefs.h >>conftest.$ac_ext
13080cat >>conftest.$ac_ext <<_ACEOF
13081/* end confdefs.h. */
c0d27fcc
MR
13082$ac_includes_default
13083#include <jerror.h>
13084_ACEOF
13085rm -f conftest.$ac_objext
ca81d7a0
JD
13086if { (ac_try="$ac_compile"
13087case "(($ac_try" in
13088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13089 *) ac_try_echo=$ac_try;;
13090esac
13091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13092 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13093 ac_status=$?
edfaf76d
LK
13094 grep -v '^ *+' conftest.er1 >conftest.err
13095 rm -f conftest.er1
13096 cat conftest.err >&5
c0d27fcc 13097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13098 (exit $ac_status); } && {
13099 test -z "$ac_c_werror_flag" ||
13100 test ! -s conftest.err
13101 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13102 ac_header_compiler=yes
13103else
13104 echo "$as_me: failed program was:" >&5
19650fd6
AS
13105sed 's/^/| /' conftest.$ac_ext >&5
13106
ca81d7a0 13107 ac_header_compiler=no
c0d27fcc 13108fi
ca81d7a0
JD
13109
13110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13111{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13112echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13113
13114# Is the header present?
ca81d7a0
JD
13115{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13116echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13117cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13118/* confdefs.h. */
13119_ACEOF
13120cat confdefs.h >>conftest.$ac_ext
13121cat >>conftest.$ac_ext <<_ACEOF
13122/* end confdefs.h. */
98418dba
CW
13123#include <jerror.h>
13124_ACEOF
ca81d7a0
JD
13125if { (ac_try="$ac_cpp conftest.$ac_ext"
13126case "(($ac_try" in
13127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13128 *) ac_try_echo=$ac_try;;
13129esac
13130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13131 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13132 ac_status=$?
6bae0ccf 13133 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13134 rm -f conftest.er1
13135 cat conftest.err >&5
c0d27fcc 13136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13137 (exit $ac_status); } >/dev/null && {
13138 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13139 test ! -s conftest.err
13140 }; then
c0d27fcc 13141 ac_header_preproc=yes
ba4481b5 13142else
98418dba 13143 echo "$as_me: failed program was:" >&5
19650fd6
AS
13144sed 's/^/| /' conftest.$ac_ext >&5
13145
c0d27fcc 13146 ac_header_preproc=no
98418dba 13147fi
ca81d7a0 13148
98418dba 13149rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13150{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13151echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13152
13153# So? What about this header?
edfaf76d
LK
13154case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13155 yes:no: )
c0d27fcc
MR
13156 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13157echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13158 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13159echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13160 ac_header_preproc=yes
19650fd6 13161 ;;
edfaf76d 13162 no:yes:* )
c0d27fcc
MR
13163 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13164echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13165 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13166echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13167 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13168echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13169 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13170echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13171 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13172echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13173 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13174echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13175
19650fd6 13176 ;;
c0d27fcc 13177esac
ca81d7a0
JD
13178{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13179echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13180if test "${ac_cv_header_jerror_h+set}" = set; then
13181 echo $ECHO_N "(cached) $ECHO_C" >&6
13182else
13183 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13184fi
ca81d7a0
JD
13185{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13186echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13187
13188fi
98418dba 13189if test $ac_cv_header_jerror_h = yes; then
ca81d7a0
JD
13190 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13191echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13192if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13193 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13194else
98418dba
CW
13195 ac_check_lib_save_LIBS=$LIBS
13196LIBS="-ljpeg $LIBS"
13197cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13198/* confdefs.h. */
13199_ACEOF
13200cat confdefs.h >>conftest.$ac_ext
13201cat >>conftest.$ac_ext <<_ACEOF
13202/* end confdefs.h. */
98418dba 13203
ca81d7a0
JD
13204/* Override any GCC internal prototype to avoid an error.
13205 Use char because int might match the return type of a GCC
13206 builtin and then its argument prototype would still apply. */
98418dba
CW
13207#ifdef __cplusplus
13208extern "C"
13209#endif
98418dba 13210char jpeg_destroy_compress ();
503d2be0
AS
13211int
13212main ()
13213{
ca81d7a0 13214return jpeg_destroy_compress ();
503d2be0
AS
13215 ;
13216 return 0;
13217}
13218_ACEOF
13219rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13220if { (ac_try="$ac_link"
13221case "(($ac_try" in
13222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13223 *) ac_try_echo=$ac_try;;
13224esac
13225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13226 (eval "$ac_link") 2>conftest.er1
503d2be0 13227 ac_status=$?
edfaf76d
LK
13228 grep -v '^ *+' conftest.er1 >conftest.err
13229 rm -f conftest.er1
13230 cat conftest.err >&5
c0d27fcc 13231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13232 (exit $ac_status); } && {
13233 test -z "$ac_c_werror_flag" ||
13234 test ! -s conftest.err
13235 } && test -s conftest$ac_exeext &&
13236 $as_test_x conftest$ac_exeext; then
98418dba 13237 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13238else
503d2be0 13239 echo "$as_me: failed program was:" >&5
19650fd6
AS
13240sed 's/^/| /' conftest.$ac_ext >&5
13241
ca81d7a0 13242 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13243fi
ca81d7a0 13244
f053c89f 13245rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13246 conftest$ac_exeext conftest.$ac_ext
98418dba 13247LIBS=$ac_check_lib_save_LIBS
ba4481b5 13248fi
ca81d7a0
JD
13249{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13250echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13251if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13252 HAVE_JPEG=yes
ba4481b5 13253fi
98418dba 13254
ba4481b5 13255fi
98418dba 13256
c0d27fcc 13257
ba4481b5 13258 fi
ba4481b5 13259
c0d27fcc 13260
98418dba 13261 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13262 cat >>confdefs.h <<\_ACEOF
98418dba 13263#define HAVE_JPEG 1
c0d27fcc 13264_ACEOF
98418dba
CW
13265
13266 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13267/* confdefs.h. */
13268_ACEOF
13269cat confdefs.h >>conftest.$ac_ext
13270cat >>conftest.$ac_ext <<_ACEOF
13271/* end confdefs.h. */
22044edf 13272#include <jpeglib.h>
98418dba
CW
13273 version=JPEG_LIB_VERSION
13274
13275_ACEOF
13276if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13277 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13278 cat >>confdefs.h <<\_ACEOF
98418dba 13279#define HAVE_JPEG 1
c0d27fcc 13280_ACEOF
ba4481b5 13281
98418dba 13282else
c0d27fcc 13283 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13284echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13285 HAVE_JPEG=no
ba4481b5 13286fi
98418dba 13287rm -f conftest*
ba4481b5 13288
98418dba
CW
13289 fi
13290fi
503d2be0 13291
98418dba
CW
13292### Use -lpng if available, unless `--with-png=no'.
13293HAVE_PNG=no
13294if test "${HAVE_X11}" = "yes"; then
13295 if test "${with_png}" != "no"; then
f57bd967
DL
13296 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13297 # in /usr/include/libpng.
13298
13299
13300for ac_header in png.h libpng/png.h
13301do
13302as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
13303if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13304 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13305echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13306if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13307 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13308fi
ca81d7a0
JD
13309ac_res=`eval echo '${'$as_ac_Header'}'`
13310 { echo "$as_me:$LINENO: result: $ac_res" >&5
13311echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13312else
c0d27fcc 13313 # Is the header compilable?
ca81d7a0
JD
13314{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13315echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13316cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13317/* confdefs.h. */
13318_ACEOF
13319cat confdefs.h >>conftest.$ac_ext
13320cat >>conftest.$ac_ext <<_ACEOF
13321/* end confdefs.h. */
c0d27fcc 13322$ac_includes_default
f57bd967 13323#include <$ac_header>
c0d27fcc
MR
13324_ACEOF
13325rm -f conftest.$ac_objext
ca81d7a0
JD
13326if { (ac_try="$ac_compile"
13327case "(($ac_try" in
13328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13329 *) ac_try_echo=$ac_try;;
13330esac
13331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13332 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13333 ac_status=$?
edfaf76d
LK
13334 grep -v '^ *+' conftest.er1 >conftest.err
13335 rm -f conftest.er1
13336 cat conftest.err >&5
c0d27fcc 13337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13338 (exit $ac_status); } && {
13339 test -z "$ac_c_werror_flag" ||
13340 test ! -s conftest.err
13341 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13342 ac_header_compiler=yes
13343else
13344 echo "$as_me: failed program was:" >&5
19650fd6
AS
13345sed 's/^/| /' conftest.$ac_ext >&5
13346
ca81d7a0 13347 ac_header_compiler=no
c0d27fcc 13348fi
ca81d7a0
JD
13349
13350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13351{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13352echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13353
13354# Is the header present?
ca81d7a0
JD
13355{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13356echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13357cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13358/* confdefs.h. */
13359_ACEOF
13360cat confdefs.h >>conftest.$ac_ext
13361cat >>conftest.$ac_ext <<_ACEOF
13362/* end confdefs.h. */
f57bd967 13363#include <$ac_header>
503d2be0 13364_ACEOF
ca81d7a0
JD
13365if { (ac_try="$ac_cpp conftest.$ac_ext"
13366case "(($ac_try" in
13367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13368 *) ac_try_echo=$ac_try;;
13369esac
13370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13371 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13372 ac_status=$?
6bae0ccf 13373 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13374 rm -f conftest.er1
13375 cat conftest.err >&5
c0d27fcc 13376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13377 (exit $ac_status); } >/dev/null && {
13378 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13379 test ! -s conftest.err
13380 }; then
c0d27fcc 13381 ac_header_preproc=yes
503d2be0
AS
13382else
13383 echo "$as_me: failed program was:" >&5
19650fd6
AS
13384sed 's/^/| /' conftest.$ac_ext >&5
13385
c0d27fcc 13386 ac_header_preproc=no
ba4481b5 13387fi
ca81d7a0 13388
503d2be0 13389rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13390{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13391echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13392
13393# So? What about this header?
edfaf76d
LK
13394case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13395 yes:no: )
f57bd967
DL
13396 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13397echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13398 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13399echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13400 ac_header_preproc=yes
19650fd6 13401 ;;
edfaf76d 13402 no:yes:* )
f57bd967
DL
13403 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13404echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13405 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13406echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13407 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13408echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13409 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13410echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 13411 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13412echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13413 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13414echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13415
19650fd6 13416 ;;
c0d27fcc 13417esac
ca81d7a0
JD
13418{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13419echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13420if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
13421 echo $ECHO_N "(cached) $ECHO_C" >&6
13422else
edfaf76d 13423 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 13424fi
ca81d7a0
JD
13425ac_res=`eval echo '${'$as_ac_Header'}'`
13426 { echo "$as_me:$LINENO: result: $ac_res" >&5
13427echo "${ECHO_T}$ac_res" >&6; }
f57bd967 13428
ba4481b5 13429fi
f57bd967
DL
13430if test `eval echo '${'$as_ac_Header'}'` = yes; then
13431 cat >>confdefs.h <<_ACEOF
13432#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13433_ACEOF
c0d27fcc
MR
13434
13435fi
f57bd967
DL
13436
13437done
13438
13439 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
ca81d7a0
JD
13440 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
13441echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 13442if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 13443 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13444else
98418dba
CW
13445 ac_check_lib_save_LIBS=$LIBS
13446LIBS="-lpng -lz -lm $LIBS"
13447cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13448/* confdefs.h. */
13449_ACEOF
13450cat confdefs.h >>conftest.$ac_ext
13451cat >>conftest.$ac_ext <<_ACEOF
13452/* end confdefs.h. */
98418dba 13453
ca81d7a0
JD
13454/* Override any GCC internal prototype to avoid an error.
13455 Use char because int might match the return type of a GCC
13456 builtin and then its argument prototype would still apply. */
503d2be0
AS
13457#ifdef __cplusplus
13458extern "C"
13459#endif
98418dba 13460char png_get_channels ();
503d2be0
AS
13461int
13462main ()
13463{
ca81d7a0 13464return png_get_channels ();
503d2be0
AS
13465 ;
13466 return 0;
13467}
13468_ACEOF
13469rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13470if { (ac_try="$ac_link"
13471case "(($ac_try" in
13472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13473 *) ac_try_echo=$ac_try;;
13474esac
13475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13476 (eval "$ac_link") 2>conftest.er1
503d2be0 13477 ac_status=$?
edfaf76d
LK
13478 grep -v '^ *+' conftest.er1 >conftest.err
13479 rm -f conftest.er1
13480 cat conftest.err >&5
c0d27fcc 13481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13482 (exit $ac_status); } && {
13483 test -z "$ac_c_werror_flag" ||
13484 test ! -s conftest.err
13485 } && test -s conftest$ac_exeext &&
13486 $as_test_x conftest$ac_exeext; then
98418dba 13487 ac_cv_lib_png_png_get_channels=yes
73b77ee5 13488else
98418dba 13489 echo "$as_me: failed program was:" >&5
19650fd6
AS
13490sed 's/^/| /' conftest.$ac_ext >&5
13491
ca81d7a0 13492 ac_cv_lib_png_png_get_channels=no
73b77ee5 13493fi
ca81d7a0 13494
f053c89f 13495rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13496 conftest$ac_exeext conftest.$ac_ext
98418dba 13497LIBS=$ac_check_lib_save_LIBS
73b77ee5 13498fi
ca81d7a0
JD
13499{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
13500echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
13501if test $ac_cv_lib_png_png_get_channels = yes; then
13502 HAVE_PNG=yes
73b77ee5 13503fi
503d2be0 13504
f57bd967 13505 fi
98418dba
CW
13506 fi
13507
13508 if test "${HAVE_PNG}" = "yes"; then
b936fae4 13509
c0d27fcc 13510cat >>confdefs.h <<\_ACEOF
98418dba 13511#define HAVE_PNG 1
c0d27fcc 13512_ACEOF
73b77ee5 13513
98418dba 13514 fi
73b77ee5
GM
13515fi
13516
98418dba
CW
13517### Use -ltiff if available, unless `--with-tiff=no'.
13518HAVE_TIFF=no
13519if test "${HAVE_X11}" = "yes"; then
13520 if test "${with_tiff}" != "no"; then
c0d27fcc 13521 if test "${ac_cv_header_tiffio_h+set}" = set; then
ca81d7a0
JD
13522 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
13523echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
13524if test "${ac_cv_header_tiffio_h+set}" = set; then
13525 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13526fi
ca81d7a0
JD
13527{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13528echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 13529else
c0d27fcc 13530 # Is the header compilable?
ca81d7a0
JD
13531{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
13532echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 13533cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13534/* confdefs.h. */
13535_ACEOF
13536cat confdefs.h >>conftest.$ac_ext
13537cat >>conftest.$ac_ext <<_ACEOF
13538/* end confdefs.h. */
c0d27fcc
MR
13539$ac_includes_default
13540#include <tiffio.h>
13541_ACEOF
13542rm -f conftest.$ac_objext
ca81d7a0
JD
13543if { (ac_try="$ac_compile"
13544case "(($ac_try" in
13545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13546 *) ac_try_echo=$ac_try;;
13547esac
13548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13549 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13550 ac_status=$?
edfaf76d
LK
13551 grep -v '^ *+' conftest.er1 >conftest.err
13552 rm -f conftest.er1
13553 cat conftest.err >&5
c0d27fcc 13554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13555 (exit $ac_status); } && {
13556 test -z "$ac_c_werror_flag" ||
13557 test ! -s conftest.err
13558 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13559 ac_header_compiler=yes
13560else
13561 echo "$as_me: failed program was:" >&5
19650fd6
AS
13562sed 's/^/| /' conftest.$ac_ext >&5
13563
ca81d7a0 13564 ac_header_compiler=no
c0d27fcc 13565fi
ca81d7a0
JD
13566
13567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13568{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13569echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13570
13571# Is the header present?
ca81d7a0
JD
13572{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
13573echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 13574cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13575/* confdefs.h. */
13576_ACEOF
13577cat confdefs.h >>conftest.$ac_ext
13578cat >>conftest.$ac_ext <<_ACEOF
13579/* end confdefs.h. */
98418dba
CW
13580#include <tiffio.h>
13581_ACEOF
ca81d7a0
JD
13582if { (ac_try="$ac_cpp conftest.$ac_ext"
13583case "(($ac_try" in
13584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13585 *) ac_try_echo=$ac_try;;
13586esac
13587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13588 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13589 ac_status=$?
6bae0ccf 13590 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13591 rm -f conftest.er1
13592 cat conftest.err >&5
c0d27fcc 13593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13594 (exit $ac_status); } >/dev/null && {
13595 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13596 test ! -s conftest.err
13597 }; then
c0d27fcc 13598 ac_header_preproc=yes
98418dba
CW
13599else
13600 echo "$as_me: failed program was:" >&5
19650fd6
AS
13601sed 's/^/| /' conftest.$ac_ext >&5
13602
c0d27fcc 13603 ac_header_preproc=no
98418dba 13604fi
ca81d7a0 13605
98418dba 13606rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13607{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13608echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13609
13610# So? What about this header?
edfaf76d
LK
13611case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13612 yes:no: )
c0d27fcc
MR
13613 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
13614echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13615 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
13616echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
13617 ac_header_preproc=yes
19650fd6 13618 ;;
edfaf76d 13619 no:yes:* )
c0d27fcc
MR
13620 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
13621echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13622 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
13623echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
13624 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
13625echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
13626 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
13627echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13628 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 13629echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13630 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
13631echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13632
19650fd6 13633 ;;
c0d27fcc 13634esac
ca81d7a0
JD
13635{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
13636echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
13637if test "${ac_cv_header_tiffio_h+set}" = set; then
13638 echo $ECHO_N "(cached) $ECHO_C" >&6
13639else
13640 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 13641fi
ca81d7a0
JD
13642{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13643echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
13644
13645fi
98418dba
CW
13646if test $ac_cv_header_tiffio_h = yes; then
13647 tifflibs="-lz -lm"
13648 # At least one tiff package requires the jpeg library.
13649 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
ca81d7a0
JD
13650 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
13651echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 13652if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 13653 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13654else
503d2be0 13655 ac_check_lib_save_LIBS=$LIBS
98418dba 13656LIBS="-ltiff $tifflibs $LIBS"
503d2be0 13657cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13658/* confdefs.h. */
13659_ACEOF
13660cat confdefs.h >>conftest.$ac_ext
13661cat >>conftest.$ac_ext <<_ACEOF
13662/* end confdefs.h. */
503d2be0 13663
ca81d7a0
JD
13664/* Override any GCC internal prototype to avoid an error.
13665 Use char because int might match the return type of a GCC
13666 builtin and then its argument prototype would still apply. */
503d2be0
AS
13667#ifdef __cplusplus
13668extern "C"
13669#endif
98418dba 13670char TIFFGetVersion ();
503d2be0
AS
13671int
13672main ()
13673{
ca81d7a0 13674return TIFFGetVersion ();
503d2be0
AS
13675 ;
13676 return 0;
13677}
13678_ACEOF
13679rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13680if { (ac_try="$ac_link"
13681case "(($ac_try" in
13682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13683 *) ac_try_echo=$ac_try;;
13684esac
13685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13686 (eval "$ac_link") 2>conftest.er1
503d2be0 13687 ac_status=$?
edfaf76d
LK
13688 grep -v '^ *+' conftest.er1 >conftest.err
13689 rm -f conftest.er1
13690 cat conftest.err >&5
c0d27fcc 13691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13692 (exit $ac_status); } && {
13693 test -z "$ac_c_werror_flag" ||
13694 test ! -s conftest.err
13695 } && test -s conftest$ac_exeext &&
13696 $as_test_x conftest$ac_exeext; then
98418dba 13697 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
13698else
13699 echo "$as_me: failed program was:" >&5
19650fd6
AS
13700sed 's/^/| /' conftest.$ac_ext >&5
13701
ca81d7a0 13702 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 13703fi
ca81d7a0 13704
f053c89f 13705rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13706 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
13707LIBS=$ac_check_lib_save_LIBS
13708fi
ca81d7a0
JD
13709{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
13710echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
13711if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
13712 HAVE_TIFF=yes
13713fi
13714
13715fi
73b77ee5 13716
c0d27fcc 13717
98418dba
CW
13718 fi
13719
13720 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 13721
c0d27fcc 13722cat >>confdefs.h <<\_ACEOF
98418dba 13723#define HAVE_TIFF 1
c0d27fcc 13724_ACEOF
98418dba
CW
13725
13726 fi
73b77ee5
GM
13727fi
13728
98418dba
CW
13729### Use -lgif if available, unless `--with-gif=no'.
13730HAVE_GIF=no
13731if test "${HAVE_X11}" = "yes"; then
13732 if test "${with_gif}" != "no"; then
c0d27fcc 13733 if test "${ac_cv_header_gif_lib_h+set}" = set; then
ca81d7a0
JD
13734 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
13735echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
13736if test "${ac_cv_header_gif_lib_h+set}" = set; then
13737 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13738fi
ca81d7a0
JD
13739{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
13740echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 13741else
c0d27fcc 13742 # Is the header compilable?
ca81d7a0
JD
13743{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
13744echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 13745cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13746/* confdefs.h. */
13747_ACEOF
13748cat confdefs.h >>conftest.$ac_ext
13749cat >>conftest.$ac_ext <<_ACEOF
13750/* end confdefs.h. */
c0d27fcc
MR
13751$ac_includes_default
13752#include <gif_lib.h>
13753_ACEOF
13754rm -f conftest.$ac_objext
ca81d7a0
JD
13755if { (ac_try="$ac_compile"
13756case "(($ac_try" in
13757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13758 *) ac_try_echo=$ac_try;;
13759esac
13760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13761 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13762 ac_status=$?
edfaf76d
LK
13763 grep -v '^ *+' conftest.er1 >conftest.err
13764 rm -f conftest.er1
13765 cat conftest.err >&5
c0d27fcc 13766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13767 (exit $ac_status); } && {
13768 test -z "$ac_c_werror_flag" ||
13769 test ! -s conftest.err
13770 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13771 ac_header_compiler=yes
13772else
13773 echo "$as_me: failed program was:" >&5
19650fd6
AS
13774sed 's/^/| /' conftest.$ac_ext >&5
13775
ca81d7a0 13776 ac_header_compiler=no
c0d27fcc 13777fi
ca81d7a0
JD
13778
13779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13780{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13781echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13782
13783# Is the header present?
ca81d7a0
JD
13784{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
13785echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 13786cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13787/* confdefs.h. */
13788_ACEOF
13789cat confdefs.h >>conftest.$ac_ext
13790cat >>conftest.$ac_ext <<_ACEOF
13791/* end confdefs.h. */
98418dba
CW
13792#include <gif_lib.h>
13793_ACEOF
ca81d7a0
JD
13794if { (ac_try="$ac_cpp conftest.$ac_ext"
13795case "(($ac_try" in
13796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13797 *) ac_try_echo=$ac_try;;
13798esac
13799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13800 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13801 ac_status=$?
6bae0ccf 13802 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13803 rm -f conftest.er1
13804 cat conftest.err >&5
c0d27fcc 13805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13806 (exit $ac_status); } >/dev/null && {
13807 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13808 test ! -s conftest.err
13809 }; then
c0d27fcc 13810 ac_header_preproc=yes
98418dba
CW
13811else
13812 echo "$as_me: failed program was:" >&5
19650fd6
AS
13813sed 's/^/| /' conftest.$ac_ext >&5
13814
c0d27fcc 13815 ac_header_preproc=no
98418dba 13816fi
ca81d7a0 13817
98418dba 13818rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13819{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13820echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13821
13822# So? What about this header?
edfaf76d
LK
13823case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13824 yes:no: )
c0d27fcc
MR
13825 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
13826echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13827 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
13828echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
13829 ac_header_preproc=yes
19650fd6 13830 ;;
edfaf76d 13831 no:yes:* )
c0d27fcc
MR
13832 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
13833echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13834 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
13835echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
13836 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
13837echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
13838 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
13839echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13840 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 13841echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13842 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
13843echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13844
19650fd6 13845 ;;
c0d27fcc 13846esac
ca81d7a0
JD
13847{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
13848echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
13849if test "${ac_cv_header_gif_lib_h+set}" = set; then
13850 echo $ECHO_N "(cached) $ECHO_C" >&6
13851else
13852 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 13853fi
ca81d7a0
JD
13854{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
13855echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
13856
13857fi
98418dba
CW
13858if test $ac_cv_header_gif_lib_h = yes; then
13859 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
13860# Earlier versions can crash Emacs.
ca81d7a0
JD
13861 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
13862echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
98418dba 13863if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
503d2be0 13864 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 13865else
503d2be0 13866 ac_check_lib_save_LIBS=$LIBS
98418dba 13867LIBS="-lungif $LIBS"
503d2be0 13868cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13869/* confdefs.h. */
13870_ACEOF
13871cat confdefs.h >>conftest.$ac_ext
13872cat >>conftest.$ac_ext <<_ACEOF
13873/* end confdefs.h. */
73b77ee5 13874
ca81d7a0
JD
13875/* Override any GCC internal prototype to avoid an error.
13876 Use char because int might match the return type of a GCC
13877 builtin and then its argument prototype would still apply. */
98418dba
CW
13878#ifdef __cplusplus
13879extern "C"
13880#endif
98418dba 13881char EGifPutExtensionLast ();
503d2be0
AS
13882int
13883main ()
13884{
ca81d7a0 13885return EGifPutExtensionLast ();
503d2be0
AS
13886 ;
13887 return 0;
13888}
13889_ACEOF
13890rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13891if { (ac_try="$ac_link"
13892case "(($ac_try" in
13893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13894 *) ac_try_echo=$ac_try;;
13895esac
13896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13897 (eval "$ac_link") 2>conftest.er1
503d2be0 13898 ac_status=$?
edfaf76d
LK
13899 grep -v '^ *+' conftest.er1 >conftest.err
13900 rm -f conftest.er1
13901 cat conftest.err >&5
c0d27fcc 13902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13903 (exit $ac_status); } && {
13904 test -z "$ac_c_werror_flag" ||
13905 test ! -s conftest.err
13906 } && test -s conftest$ac_exeext &&
13907 $as_test_x conftest$ac_exeext; then
35996d22
AS
13908 ac_cv_lib_ungif_EGifPutExtensionLast=yes
13909else
98418dba 13910 echo "$as_me: failed program was:" >&5
19650fd6
AS
13911sed 's/^/| /' conftest.$ac_ext >&5
13912
ca81d7a0 13913 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba 13914fi
ca81d7a0 13915
f053c89f 13916rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13917 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
13918LIBS=$ac_check_lib_save_LIBS
13919fi
ca81d7a0
JD
13920{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
13921echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
98418dba
CW
13922if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
13923 HAVE_GIF=yes
13924fi
13925
13926fi
13927
c0d27fcc 13928
98418dba
CW
13929 fi
13930
13931 if test "${HAVE_GIF}" = "yes"; then
b936fae4 13932
c0d27fcc 13933cat >>confdefs.h <<\_ACEOF
98418dba 13934#define HAVE_GIF 1
c0d27fcc 13935_ACEOF
98418dba
CW
13936
13937 fi
13938fi
13939
cef11da2 13940if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
ca81d7a0
JD
13941 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
13942echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
13943if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
13944 echo $ECHO_N "(cached) $ECHO_C" >&6
13945fi
ca81d7a0
JD
13946{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
13947echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
13948else
13949 # Is the header compilable?
ca81d7a0
JD
13950{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
13951echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
13952cat >conftest.$ac_ext <<_ACEOF
13953/* confdefs.h. */
13954_ACEOF
13955cat confdefs.h >>conftest.$ac_ext
13956cat >>conftest.$ac_ext <<_ACEOF
13957/* end confdefs.h. */
13958$ac_includes_default
13959#include <malloc/malloc.h>
13960_ACEOF
13961rm -f conftest.$ac_objext
ca81d7a0
JD
13962if { (ac_try="$ac_compile"
13963case "(($ac_try" in
13964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13965 *) ac_try_echo=$ac_try;;
13966esac
13967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13968 (eval "$ac_compile") 2>conftest.er1
cef11da2 13969 ac_status=$?
edfaf76d
LK
13970 grep -v '^ *+' conftest.er1 >conftest.err
13971 rm -f conftest.er1
13972 cat conftest.err >&5
cef11da2 13973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13974 (exit $ac_status); } && {
13975 test -z "$ac_c_werror_flag" ||
13976 test ! -s conftest.err
13977 } && test -s conftest.$ac_objext; then
cef11da2
ST
13978 ac_header_compiler=yes
13979else
13980 echo "$as_me: failed program was:" >&5
13981sed 's/^/| /' conftest.$ac_ext >&5
13982
ca81d7a0 13983 ac_header_compiler=no
cef11da2 13984fi
ca81d7a0
JD
13985
13986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13987{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13988echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
13989
13990# Is the header present?
ca81d7a0
JD
13991{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
13992echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
13993cat >conftest.$ac_ext <<_ACEOF
13994/* confdefs.h. */
13995_ACEOF
13996cat confdefs.h >>conftest.$ac_ext
13997cat >>conftest.$ac_ext <<_ACEOF
13998/* end confdefs.h. */
13999#include <malloc/malloc.h>
14000_ACEOF
ca81d7a0
JD
14001if { (ac_try="$ac_cpp conftest.$ac_ext"
14002case "(($ac_try" in
14003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14004 *) ac_try_echo=$ac_try;;
14005esac
14006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14007 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14008 ac_status=$?
14009 grep -v '^ *+' conftest.er1 >conftest.err
14010 rm -f conftest.er1
14011 cat conftest.err >&5
14012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14013 (exit $ac_status); } >/dev/null && {
14014 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14015 test ! -s conftest.err
14016 }; then
cef11da2
ST
14017 ac_header_preproc=yes
14018else
14019 echo "$as_me: failed program was:" >&5
14020sed 's/^/| /' conftest.$ac_ext >&5
14021
14022 ac_header_preproc=no
14023fi
ca81d7a0 14024
cef11da2 14025rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14026{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14027echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14028
14029# So? What about this header?
edfaf76d
LK
14030case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14031 yes:no: )
cef11da2
ST
14032 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14033echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14034 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14035echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
14036 ac_header_preproc=yes
cef11da2 14037 ;;
edfaf76d 14038 no:yes:* )
cef11da2
ST
14039 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14040echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14041 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14042echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14043 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14044echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14045 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14046echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
14047 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14048echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14049 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14050echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14051
cef11da2
ST
14052 ;;
14053esac
ca81d7a0
JD
14054{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14055echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14056if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14057 echo $ECHO_N "(cached) $ECHO_C" >&6
14058else
14059 ac_cv_header_malloc_malloc_h=$ac_header_preproc
14060fi
ca81d7a0
JD
14061{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14062echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14063
14064fi
14065if test $ac_cv_header_malloc_malloc_h = yes; then
14066
14067cat >>confdefs.h <<\_ACEOF
14068#define HAVE_MALLOC_MALLOC_H 1
14069_ACEOF
14070
14071fi
14072
14073
14074
5d6da11e 14075### Use Mac OS X Carbon API to implement GUI.
e0f712ba 14076if test "${HAVE_CARBON}" = "yes"; then
e3ba1015 14077
c0d27fcc 14078cat >>confdefs.h <<\_ACEOF
e0f712ba 14079#define HAVE_CARBON 1
c0d27fcc 14080_ACEOF
e0f712ba 14081
6a3a24fa
JD
14082 ## Specify the install directory
14083 carbon_appdir=
14084 if test "${carbon_appdir_x}" != ""; then
14085 case ${carbon_appdir_x} in
14086 y | ye | yes) carbon_appdir=/Applications ;;
14087 * ) carbon_appdir=${carbon_appdir_x} ;;
14088 esac
14089 fi
8f417b3b
AS
14090 # We also have mouse menus.
14091 HAVE_MENUS=yes
e0f712ba
AC
14092fi
14093
98418dba
CW
14094### Use session management (-lSM -lICE) if available
14095HAVE_X_SM=no
14096if test "${HAVE_X11}" = "yes"; then
c0d27fcc 14097 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
ca81d7a0
JD
14098 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14099echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
14100if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14101 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14102fi
ca81d7a0
JD
14103{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14104echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 14105else
c0d27fcc 14106 # Is the header compilable?
ca81d7a0
JD
14107{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
14108echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 14109cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14110/* confdefs.h. */
14111_ACEOF
14112cat confdefs.h >>conftest.$ac_ext
14113cat >>conftest.$ac_ext <<_ACEOF
14114/* end confdefs.h. */
c0d27fcc
MR
14115$ac_includes_default
14116#include <X11/SM/SMlib.h>
14117_ACEOF
14118rm -f conftest.$ac_objext
ca81d7a0
JD
14119if { (ac_try="$ac_compile"
14120case "(($ac_try" in
14121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14122 *) ac_try_echo=$ac_try;;
14123esac
14124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14125 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14126 ac_status=$?
edfaf76d
LK
14127 grep -v '^ *+' conftest.er1 >conftest.err
14128 rm -f conftest.er1
14129 cat conftest.err >&5
c0d27fcc 14130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14131 (exit $ac_status); } && {
14132 test -z "$ac_c_werror_flag" ||
14133 test ! -s conftest.err
14134 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14135 ac_header_compiler=yes
14136else
14137 echo "$as_me: failed program was:" >&5
19650fd6
AS
14138sed 's/^/| /' conftest.$ac_ext >&5
14139
ca81d7a0 14140 ac_header_compiler=no
c0d27fcc 14141fi
ca81d7a0
JD
14142
14143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14144{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14145echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14146
14147# Is the header present?
ca81d7a0
JD
14148{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
14149echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 14150cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14151/* confdefs.h. */
14152_ACEOF
14153cat confdefs.h >>conftest.$ac_ext
14154cat >>conftest.$ac_ext <<_ACEOF
14155/* end confdefs.h. */
98418dba
CW
14156#include <X11/SM/SMlib.h>
14157_ACEOF
ca81d7a0
JD
14158if { (ac_try="$ac_cpp conftest.$ac_ext"
14159case "(($ac_try" in
14160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14161 *) ac_try_echo=$ac_try;;
14162esac
14163eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14164 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14165 ac_status=$?
6bae0ccf 14166 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14167 rm -f conftest.er1
14168 cat conftest.err >&5
c0d27fcc 14169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14170 (exit $ac_status); } >/dev/null && {
14171 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14172 test ! -s conftest.err
14173 }; then
c0d27fcc 14174 ac_header_preproc=yes
98418dba
CW
14175else
14176 echo "$as_me: failed program was:" >&5
19650fd6
AS
14177sed 's/^/| /' conftest.$ac_ext >&5
14178
c0d27fcc 14179 ac_header_preproc=no
98418dba 14180fi
ca81d7a0 14181
98418dba 14182rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14183{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14184echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14185
14186# So? What about this header?
edfaf76d
LK
14187case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14188 yes:no: )
c0d27fcc
MR
14189 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14190echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14191 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
14192echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
14193 ac_header_preproc=yes
19650fd6 14194 ;;
edfaf76d 14195 no:yes:* )
c0d27fcc
MR
14196 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
14197echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14198 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
14199echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
14200 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
14201echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
14202 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
14203echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14204 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 14205echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14206 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
14207echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14208
19650fd6 14209 ;;
c0d27fcc 14210esac
ca81d7a0
JD
14211{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14212echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14213if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14214 echo $ECHO_N "(cached) $ECHO_C" >&6
14215else
14216 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 14217fi
ca81d7a0
JD
14218{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14219echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
14220
14221fi
98418dba 14222if test $ac_cv_header_X11_SM_SMlib_h = yes; then
ca81d7a0
JD
14223 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
14224echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 14225if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 14226 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14227else
503d2be0 14228 ac_check_lib_save_LIBS=$LIBS
1660500f 14229LIBS="-lSM -lICE $LIBS"
503d2be0 14230cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14231/* confdefs.h. */
14232_ACEOF
14233cat confdefs.h >>conftest.$ac_ext
14234cat >>conftest.$ac_ext <<_ACEOF
14235/* end confdefs.h. */
503d2be0 14236
ca81d7a0
JD
14237/* Override any GCC internal prototype to avoid an error.
14238 Use char because int might match the return type of a GCC
14239 builtin and then its argument prototype would still apply. */
503d2be0
AS
14240#ifdef __cplusplus
14241extern "C"
14242#endif
98418dba 14243char SmcOpenConnection ();
503d2be0
AS
14244int
14245main ()
14246{
ca81d7a0 14247return SmcOpenConnection ();
503d2be0
AS
14248 ;
14249 return 0;
14250}
14251_ACEOF
14252rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14253if { (ac_try="$ac_link"
14254case "(($ac_try" in
14255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14256 *) ac_try_echo=$ac_try;;
14257esac
14258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14259 (eval "$ac_link") 2>conftest.er1
503d2be0 14260 ac_status=$?
edfaf76d
LK
14261 grep -v '^ *+' conftest.er1 >conftest.err
14262 rm -f conftest.er1
14263 cat conftest.err >&5
c0d27fcc 14264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14265 (exit $ac_status); } && {
14266 test -z "$ac_c_werror_flag" ||
14267 test ! -s conftest.err
14268 } && test -s conftest$ac_exeext &&
14269 $as_test_x conftest$ac_exeext; then
98418dba 14270 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
14271else
14272 echo "$as_me: failed program was:" >&5
19650fd6
AS
14273sed 's/^/| /' conftest.$ac_ext >&5
14274
ca81d7a0 14275 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 14276fi
ca81d7a0 14277
f053c89f 14278rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14279 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14280LIBS=$ac_check_lib_save_LIBS
14281fi
ca81d7a0
JD
14282{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
14283echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
14284if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
14285 HAVE_X_SM=yes
73b77ee5
GM
14286fi
14287
73b77ee5 14288fi
73b77ee5 14289
c0d27fcc
MR
14290
14291
98418dba 14292 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 14293
c0d27fcc 14294cat >>confdefs.h <<\_ACEOF
98418dba 14295#define HAVE_X_SM 1
c0d27fcc 14296_ACEOF
73b77ee5 14297
98418dba
CW
14298 case "$LIBS" in
14299 *-lSM*) ;;
14300 *) LIBS="-lSM -lICE $LIBS" ;;
14301 esac
73b77ee5 14302 fi
98418dba 14303fi
73b77ee5 14304
98418dba 14305# If netdb.h doesn't declare h_errno, we must declare it by hand.
ca81d7a0
JD
14306{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
14307echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
14308if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
14309 echo $ECHO_N "(cached) $ECHO_C" >&6
14310else
14311 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14312/* confdefs.h. */
14313_ACEOF
14314cat confdefs.h >>conftest.$ac_ext
14315cat >>conftest.$ac_ext <<_ACEOF
14316/* end confdefs.h. */
98418dba 14317#include <netdb.h>
503d2be0
AS
14318int
14319main ()
14320{
98418dba 14321return h_errno;
503d2be0
AS
14322 ;
14323 return 0;
14324}
14325_ACEOF
14326rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14327if { (ac_try="$ac_link"
14328case "(($ac_try" in
14329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14330 *) ac_try_echo=$ac_try;;
14331esac
14332eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14333 (eval "$ac_link") 2>conftest.er1
503d2be0 14334 ac_status=$?
edfaf76d
LK
14335 grep -v '^ *+' conftest.er1 >conftest.err
14336 rm -f conftest.er1
14337 cat conftest.err >&5
c0d27fcc 14338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14339 (exit $ac_status); } && {
14340 test -z "$ac_c_werror_flag" ||
14341 test ! -s conftest.err
14342 } && test -s conftest$ac_exeext &&
14343 $as_test_x conftest$ac_exeext; then
98418dba 14344 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 14345else
503d2be0 14346 echo "$as_me: failed program was:" >&5
19650fd6
AS
14347sed 's/^/| /' conftest.$ac_ext >&5
14348
ca81d7a0 14349 emacs_cv_netdb_declares_h_errno=no
73b77ee5 14350fi
ca81d7a0 14351
f053c89f 14352rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14353 conftest$ac_exeext conftest.$ac_ext
98418dba 14354fi
ca81d7a0
JD
14355{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
14356echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 14357if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 14358
c0d27fcc 14359cat >>confdefs.h <<\_ACEOF
98418dba 14360#define HAVE_H_ERRNO 1
c0d27fcc 14361_ACEOF
73b77ee5 14362
98418dba
CW
14363fi
14364
14365# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
14366# for constant arguments. Useless!
ca81d7a0
JD
14367{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
14368echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
14369if test "${ac_cv_working_alloca_h+set}" = set; then
14370 echo $ECHO_N "(cached) $ECHO_C" >&6
14371else
14372 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14373/* confdefs.h. */
14374_ACEOF
14375cat confdefs.h >>conftest.$ac_ext
14376cat >>conftest.$ac_ext <<_ACEOF
14377/* end confdefs.h. */
98418dba 14378#include <alloca.h>
503d2be0
AS
14379int
14380main ()
14381{
98418dba 14382char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 14383 if (p) return 0;
503d2be0
AS
14384 ;
14385 return 0;
14386}
14387_ACEOF
14388rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14389if { (ac_try="$ac_link"
14390case "(($ac_try" in
14391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14392 *) ac_try_echo=$ac_try;;
14393esac
14394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14395 (eval "$ac_link") 2>conftest.er1
503d2be0 14396 ac_status=$?
edfaf76d
LK
14397 grep -v '^ *+' conftest.er1 >conftest.err
14398 rm -f conftest.er1
14399 cat conftest.err >&5
c0d27fcc 14400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14401 (exit $ac_status); } && {
14402 test -z "$ac_c_werror_flag" ||
14403 test ! -s conftest.err
14404 } && test -s conftest$ac_exeext &&
14405 $as_test_x conftest$ac_exeext; then
98418dba 14406 ac_cv_working_alloca_h=yes
73b77ee5 14407else
503d2be0 14408 echo "$as_me: failed program was:" >&5
19650fd6
AS
14409sed 's/^/| /' conftest.$ac_ext >&5
14410
ca81d7a0 14411 ac_cv_working_alloca_h=no
73b77ee5 14412fi
ca81d7a0 14413
f053c89f 14414rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14415 conftest$ac_exeext conftest.$ac_ext
98418dba 14416fi
ca81d7a0
JD
14417{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
14418echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 14419if test $ac_cv_working_alloca_h = yes; then
73b77ee5 14420
c0d27fcc 14421cat >>confdefs.h <<\_ACEOF
98418dba 14422#define HAVE_ALLOCA_H 1
c0d27fcc 14423_ACEOF
98418dba
CW
14424
14425fi
14426
ca81d7a0
JD
14427{ echo "$as_me:$LINENO: checking for alloca" >&5
14428echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
14429if test "${ac_cv_func_alloca_works+set}" = set; then
14430 echo $ECHO_N "(cached) $ECHO_C" >&6
14431else
503d2be0 14432 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14433/* confdefs.h. */
14434_ACEOF
14435cat confdefs.h >>conftest.$ac_ext
14436cat >>conftest.$ac_ext <<_ACEOF
14437/* end confdefs.h. */
98418dba
CW
14438#ifdef __GNUC__
14439# define alloca __builtin_alloca
14440#else
14441# ifdef _MSC_VER
14442# include <malloc.h>
14443# define alloca _alloca
14444# else
f053c89f 14445# ifdef HAVE_ALLOCA_H
98418dba
CW
14446# include <alloca.h>
14447# else
14448# ifdef _AIX
14449 #pragma alloca
14450# else
14451# ifndef alloca /* predefined by HP cc +Olibcalls */
14452char *alloca ();
14453# endif
14454# endif
14455# endif
14456# endif
14457#endif
14458
503d2be0
AS
14459int
14460main ()
14461{
98418dba 14462char *p = (char *) alloca (1);
ca81d7a0 14463 if (p) return 0;
503d2be0
AS
14464 ;
14465 return 0;
14466}
14467_ACEOF
14468rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14469if { (ac_try="$ac_link"
14470case "(($ac_try" in
14471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14472 *) ac_try_echo=$ac_try;;
14473esac
14474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14475 (eval "$ac_link") 2>conftest.er1
503d2be0 14476 ac_status=$?
edfaf76d
LK
14477 grep -v '^ *+' conftest.er1 >conftest.err
14478 rm -f conftest.er1
14479 cat conftest.err >&5
c0d27fcc 14480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14481 (exit $ac_status); } && {
14482 test -z "$ac_c_werror_flag" ||
14483 test ! -s conftest.err
14484 } && test -s conftest$ac_exeext &&
14485 $as_test_x conftest$ac_exeext; then
98418dba 14486 ac_cv_func_alloca_works=yes
ac95a621 14487else
503d2be0 14488 echo "$as_me: failed program was:" >&5
19650fd6
AS
14489sed 's/^/| /' conftest.$ac_ext >&5
14490
ca81d7a0 14491 ac_cv_func_alloca_works=no
ac95a621 14492fi
ca81d7a0 14493
f053c89f 14494rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14495 conftest$ac_exeext conftest.$ac_ext
98418dba 14496fi
ca81d7a0
JD
14497{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
14498echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 14499
98418dba
CW
14500if test $ac_cv_func_alloca_works = yes; then
14501
c0d27fcc 14502cat >>confdefs.h <<\_ACEOF
98418dba 14503#define HAVE_ALLOCA 1
c0d27fcc 14504_ACEOF
98418dba
CW
14505
14506else
14507 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
14508# that cause trouble. Some versions do not even contain alloca or
14509# contain a buggy version. If you still want to use their alloca,
14510# use ar to extract alloca.o from them instead of compiling alloca.c.
14511
ca81d7a0 14512ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 14513
c0d27fcc 14514cat >>confdefs.h <<\_ACEOF
98418dba 14515#define C_ALLOCA 1
c0d27fcc 14516_ACEOF
98418dba 14517
c0d27fcc 14518
ca81d7a0
JD
14519{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
14520echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
14521if test "${ac_cv_os_cray+set}" = set; then
14522 echo $ECHO_N "(cached) $ECHO_C" >&6
14523else
14524 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14525/* confdefs.h. */
14526_ACEOF
14527cat confdefs.h >>conftest.$ac_ext
14528cat >>conftest.$ac_ext <<_ACEOF
14529/* end confdefs.h. */
ca81d7a0 14530#if defined CRAY && ! defined CRAY2
98418dba
CW
14531webecray
14532#else
14533wenotbecray
14534#endif
14535
14536_ACEOF
14537if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 14538 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
14539 ac_cv_os_cray=yes
14540else
14541 ac_cv_os_cray=no
14542fi
14543rm -f conftest*
ac95a621 14544
98418dba 14545fi
ca81d7a0
JD
14546{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
14547echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
14548if test $ac_cv_os_cray = yes; then
14549 for ac_func in _getb67 GETB67 getb67; do
14550 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
14551{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14552echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14553if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 14554 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14555else
503d2be0 14556 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14557/* confdefs.h. */
14558_ACEOF
14559cat confdefs.h >>conftest.$ac_ext
14560cat >>conftest.$ac_ext <<_ACEOF
14561/* end confdefs.h. */
edfaf76d
LK
14562/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14563 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14564#define $ac_func innocuous_$ac_func
14565
73b77ee5 14566/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
14567 which can conflict with char $ac_func (); below.
14568 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14569 <limits.h> exists even on freestanding compilers. */
edfaf76d 14570
19650fd6
AS
14571#ifdef __STDC__
14572# include <limits.h>
14573#else
14574# include <assert.h>
14575#endif
edfaf76d
LK
14576
14577#undef $ac_func
14578
ca81d7a0
JD
14579/* Override any GCC internal prototype to avoid an error.
14580 Use char because int might match the return type of a GCC
14581 builtin and then its argument prototype would still apply. */
503d2be0
AS
14582#ifdef __cplusplus
14583extern "C"
14584#endif
503d2be0 14585char $ac_func ();
73b77ee5
GM
14586/* The GNU C library defines this for functions which it implements
14587 to always fail with ENOSYS. Some functions are actually named
14588 something starting with __ and the normal name is an alias. */
ca81d7a0 14589#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 14590choke me
73b77ee5
GM
14591#endif
14592
19650fd6
AS
14593int
14594main ()
14595{
ca81d7a0 14596return $ac_func ();
503d2be0
AS
14597 ;
14598 return 0;
14599}
14600_ACEOF
14601rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14602if { (ac_try="$ac_link"
14603case "(($ac_try" in
14604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14605 *) ac_try_echo=$ac_try;;
14606esac
14607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14608 (eval "$ac_link") 2>conftest.er1
503d2be0 14609 ac_status=$?
edfaf76d
LK
14610 grep -v '^ *+' conftest.er1 >conftest.err
14611 rm -f conftest.er1
14612 cat conftest.err >&5
c0d27fcc 14613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14614 (exit $ac_status); } && {
14615 test -z "$ac_c_werror_flag" ||
14616 test ! -s conftest.err
14617 } && test -s conftest$ac_exeext &&
14618 $as_test_x conftest$ac_exeext; then
503d2be0
AS
14619 eval "$as_ac_var=yes"
14620else
14621 echo "$as_me: failed program was:" >&5
19650fd6
AS
14622sed 's/^/| /' conftest.$ac_ext >&5
14623
ca81d7a0 14624 eval "$as_ac_var=no"
503d2be0 14625fi
ca81d7a0 14626
f053c89f 14627rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14628 conftest$ac_exeext conftest.$ac_ext
503d2be0 14629fi
ca81d7a0
JD
14630ac_res=`eval echo '${'$as_ac_var'}'`
14631 { echo "$as_me:$LINENO: result: $ac_res" >&5
14632echo "${ECHO_T}$ac_res" >&6; }
503d2be0 14633if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 14634
c0d27fcc 14635cat >>confdefs.h <<_ACEOF
98418dba 14636#define CRAY_STACKSEG_END $ac_func
c0d27fcc 14637_ACEOF
98418dba
CW
14638
14639 break
73b77ee5 14640fi
73b77ee5 14641
98418dba 14642 done
73b77ee5
GM
14643fi
14644
ca81d7a0
JD
14645{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
14646echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 14647if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 14648 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
14649else
14650 if test "$cross_compiling" = yes; then
14651 ac_cv_c_stack_direction=0
73b77ee5 14652else
503d2be0 14653 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14654/* confdefs.h. */
14655_ACEOF
14656cat confdefs.h >>conftest.$ac_ext
14657cat >>conftest.$ac_ext <<_ACEOF
14658/* end confdefs.h. */
ca81d7a0 14659$ac_includes_default
503d2be0 14660int
98418dba 14661find_stack_direction ()
503d2be0 14662{
98418dba
CW
14663 static char *addr = 0;
14664 auto char dummy;
14665 if (addr == 0)
14666 {
14667 addr = &dummy;
14668 return find_stack_direction ();
14669 }
73b77ee5 14670 else
98418dba
CW
14671 return (&dummy > addr) ? 1 : -1;
14672}
ba4481b5 14673
503d2be0
AS
14674int
14675main ()
14676{
ca81d7a0 14677 return find_stack_direction () < 0;
503d2be0
AS
14678}
14679_ACEOF
98418dba 14680rm -f conftest$ac_exeext
ca81d7a0
JD
14681if { (ac_try="$ac_link"
14682case "(($ac_try" in
14683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14684 *) ac_try_echo=$ac_try;;
14685esac
14686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14687 (eval "$ac_link") 2>&5
503d2be0 14688 ac_status=$?
c0d27fcc 14689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 14690 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
14691 { (case "(($ac_try" in
14692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14693 *) ac_try_echo=$ac_try;;
14694esac
14695eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14696 (eval "$ac_try") 2>&5
503d2be0 14697 ac_status=$?
c0d27fcc 14698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 14699 (exit $ac_status); }; }; then
98418dba 14700 ac_cv_c_stack_direction=1
ba4481b5 14701else
98418dba
CW
14702 echo "$as_me: program exited with status $ac_status" >&5
14703echo "$as_me: failed program was:" >&5
19650fd6
AS
14704sed 's/^/| /' conftest.$ac_ext >&5
14705
c0d27fcc 14706( exit $ac_status )
98418dba 14707ac_cv_c_stack_direction=-1
ba4481b5 14708fi
ca81d7a0 14709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 14710fi
ca81d7a0
JD
14711
14712
98418dba 14713fi
ca81d7a0
JD
14714{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
14715echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 14716
c0d27fcc 14717cat >>confdefs.h <<_ACEOF
98418dba 14718#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
14719_ACEOF
14720
ba4481b5 14721
ba4481b5
DL
14722fi
14723
c0d27fcc 14724
98418dba
CW
14725# fmod, logb, and frexp are found in -lm on most systems.
14726# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
14727
ca81d7a0
JD
14728{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
14729echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 14730if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 14731 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14732else
98418dba
CW
14733 ac_check_lib_save_LIBS=$LIBS
14734LIBS="-lm $LIBS"
14735cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14736/* confdefs.h. */
14737_ACEOF
14738cat confdefs.h >>conftest.$ac_ext
14739cat >>conftest.$ac_ext <<_ACEOF
14740/* end confdefs.h. */
ba4481b5 14741
ca81d7a0
JD
14742/* Override any GCC internal prototype to avoid an error.
14743 Use char because int might match the return type of a GCC
14744 builtin and then its argument prototype would still apply. */
98418dba
CW
14745#ifdef __cplusplus
14746extern "C"
14747#endif
98418dba 14748char sqrt ();
503d2be0
AS
14749int
14750main ()
14751{
ca81d7a0 14752return sqrt ();
503d2be0
AS
14753 ;
14754 return 0;
14755}
14756_ACEOF
14757rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14758if { (ac_try="$ac_link"
14759case "(($ac_try" in
14760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14761 *) ac_try_echo=$ac_try;;
14762esac
14763eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14764 (eval "$ac_link") 2>conftest.er1
503d2be0 14765 ac_status=$?
edfaf76d
LK
14766 grep -v '^ *+' conftest.er1 >conftest.err
14767 rm -f conftest.er1
14768 cat conftest.err >&5
c0d27fcc 14769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14770 (exit $ac_status); } && {
14771 test -z "$ac_c_werror_flag" ||
14772 test ! -s conftest.err
14773 } && test -s conftest$ac_exeext &&
14774 $as_test_x conftest$ac_exeext; then
98418dba 14775 ac_cv_lib_m_sqrt=yes
ba4481b5 14776else
503d2be0 14777 echo "$as_me: failed program was:" >&5
19650fd6
AS
14778sed 's/^/| /' conftest.$ac_ext >&5
14779
ca81d7a0 14780 ac_cv_lib_m_sqrt=no
ba4481b5 14781fi
ca81d7a0 14782
f053c89f 14783rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14784 conftest$ac_exeext conftest.$ac_ext
98418dba 14785LIBS=$ac_check_lib_save_LIBS
ba4481b5 14786fi
ca81d7a0
JD
14787{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
14788echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 14789if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 14790 cat >>confdefs.h <<_ACEOF
98418dba 14791#define HAVE_LIBM 1
c0d27fcc 14792_ACEOF
98418dba
CW
14793
14794 LIBS="-lm $LIBS"
ba4481b5 14795
ba4481b5
DL
14796fi
14797
c0d27fcc 14798
55597d70
DL
14799# Check for mail-locking functions in a "mail" library. Probably this should
14800# have the same check as for liblockfile below.
98418dba 14801
ca81d7a0
JD
14802{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
14803echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 14804if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 14805 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14806else
98418dba
CW
14807 ac_check_lib_save_LIBS=$LIBS
14808LIBS="-lmail $LIBS"
14809cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14810/* confdefs.h. */
14811_ACEOF
14812cat confdefs.h >>conftest.$ac_ext
14813cat >>conftest.$ac_ext <<_ACEOF
14814/* end confdefs.h. */
98418dba 14815
ca81d7a0
JD
14816/* Override any GCC internal prototype to avoid an error.
14817 Use char because int might match the return type of a GCC
14818 builtin and then its argument prototype would still apply. */
98418dba
CW
14819#ifdef __cplusplus
14820extern "C"
14821#endif
98418dba 14822char maillock ();
503d2be0
AS
14823int
14824main ()
14825{
ca81d7a0 14826return maillock ();
503d2be0
AS
14827 ;
14828 return 0;
14829}
14830_ACEOF
14831rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14832if { (ac_try="$ac_link"
14833case "(($ac_try" in
14834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14835 *) ac_try_echo=$ac_try;;
14836esac
14837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14838 (eval "$ac_link") 2>conftest.er1
503d2be0 14839 ac_status=$?
edfaf76d
LK
14840 grep -v '^ *+' conftest.er1 >conftest.err
14841 rm -f conftest.er1
14842 cat conftest.err >&5
c0d27fcc 14843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14844 (exit $ac_status); } && {
14845 test -z "$ac_c_werror_flag" ||
14846 test ! -s conftest.err
14847 } && test -s conftest$ac_exeext &&
14848 $as_test_x conftest$ac_exeext; then
98418dba 14849 ac_cv_lib_mail_maillock=yes
ba4481b5 14850else
503d2be0 14851 echo "$as_me: failed program was:" >&5
19650fd6
AS
14852sed 's/^/| /' conftest.$ac_ext >&5
14853
ca81d7a0 14854 ac_cv_lib_mail_maillock=no
ba4481b5 14855fi
ca81d7a0 14856
f053c89f 14857rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14858 conftest$ac_exeext conftest.$ac_ext
98418dba 14859LIBS=$ac_check_lib_save_LIBS
ba4481b5 14860fi
ca81d7a0
JD
14861{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
14862echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 14863if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 14864 cat >>confdefs.h <<_ACEOF
98418dba 14865#define HAVE_LIBMAIL 1
c0d27fcc 14866_ACEOF
ba4481b5 14867
98418dba 14868 LIBS="-lmail $LIBS"
ba4481b5 14869
98418dba 14870fi
ba4481b5 14871
c0d27fcc 14872
ca81d7a0
JD
14873{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
14874echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 14875if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 14876 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 14877else
503d2be0 14878 ac_check_lib_save_LIBS=$LIBS
98418dba 14879LIBS="-llockfile $LIBS"
503d2be0 14880cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14881/* confdefs.h. */
14882_ACEOF
14883cat confdefs.h >>conftest.$ac_ext
14884cat >>conftest.$ac_ext <<_ACEOF
14885/* end confdefs.h. */
503d2be0 14886
ca81d7a0
JD
14887/* Override any GCC internal prototype to avoid an error.
14888 Use char because int might match the return type of a GCC
14889 builtin and then its argument prototype would still apply. */
503d2be0
AS
14890#ifdef __cplusplus
14891extern "C"
14892#endif
98418dba 14893char maillock ();
503d2be0
AS
14894int
14895main ()
14896{
ca81d7a0 14897return maillock ();
503d2be0
AS
14898 ;
14899 return 0;
14900}
14901_ACEOF
14902rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14903if { (ac_try="$ac_link"
14904case "(($ac_try" in
14905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14906 *) ac_try_echo=$ac_try;;
14907esac
14908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14909 (eval "$ac_link") 2>conftest.er1
503d2be0 14910 ac_status=$?
edfaf76d
LK
14911 grep -v '^ *+' conftest.er1 >conftest.err
14912 rm -f conftest.er1
14913 cat conftest.err >&5
c0d27fcc 14914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14915 (exit $ac_status); } && {
14916 test -z "$ac_c_werror_flag" ||
14917 test ! -s conftest.err
14918 } && test -s conftest$ac_exeext &&
14919 $as_test_x conftest$ac_exeext; then
98418dba 14920 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
14921else
14922 echo "$as_me: failed program was:" >&5
19650fd6
AS
14923sed 's/^/| /' conftest.$ac_ext >&5
14924
ca81d7a0 14925 ac_cv_lib_lockfile_maillock=no
98418dba 14926fi
ca81d7a0 14927
f053c89f 14928rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14929 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14930LIBS=$ac_check_lib_save_LIBS
14931fi
ca81d7a0
JD
14932{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
14933echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 14934if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 14935 cat >>confdefs.h <<_ACEOF
98418dba 14936#define HAVE_LIBLOCKFILE 1
c0d27fcc 14937_ACEOF
98418dba
CW
14938
14939 LIBS="-llockfile $LIBS"
14940
14941fi
14942
14943# If we have the shared liblockfile, assume we must use it for mail
14944# locking (e.g. Debian). If we couldn't link against liblockfile
14945# (no liblockfile.a installed), ensure that we don't need to.
14946if test "$ac_cv_lib_lockfile_maillock" = no; then
14947 # Extract the first word of "liblockfile.so", so it can be a program name with args.
14948set dummy liblockfile.so; ac_word=$2
ca81d7a0
JD
14949{ echo "$as_me:$LINENO: checking for $ac_word" >&5
14950echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
14951if test "${ac_cv_prog_liblockfile+set}" = set; then
14952 echo $ECHO_N "(cached) $ECHO_C" >&6
14953else
14954 if test -n "$liblockfile"; then
14955 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
14956else
c0d27fcc 14957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
14958as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
14959for as_dir in $as_dummy
c0d27fcc
MR
14960do
14961 IFS=$as_save_IFS
14962 test -z "$as_dir" && as_dir=.
14963 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 14964 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
14965 ac_cv_prog_liblockfile="yes"
14966 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14967 break 2
14968 fi
14969done
98418dba 14970done
ca81d7a0 14971IFS=$as_save_IFS
98418dba
CW
14972
14973 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 14974fi
503d2be0 14975fi
98418dba
CW
14976liblockfile=$ac_cv_prog_liblockfile
14977if test -n "$liblockfile"; then
ca81d7a0
JD
14978 { echo "$as_me:$LINENO: result: $liblockfile" >&5
14979echo "${ECHO_T}$liblockfile" >&6; }
98418dba 14980else
ca81d7a0
JD
14981 { echo "$as_me:$LINENO: result: no" >&5
14982echo "${ECHO_T}no" >&6; }
ba4481b5
DL
14983fi
14984
ca81d7a0 14985
98418dba 14986 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 14987 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
14988This probably means that movemail could lose mail.
14989There may be a \`development' package to install containing liblockfile." >&5
14990echo "$as_me: error: Shared liblockfile found but can't link against it.
14991This probably means that movemail could lose mail.
14992There may be a \`development' package to install containing liblockfile." >&2;}
14993 { (exit 1); exit 1; }; }
98418dba 14994 else :
55597d70 14995 fi
98418dba 14996fi
503d2be0 14997
98418dba
CW
14998for ac_func in touchlock
14999do
15000as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15001{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15002echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15003if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15004 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 15005else
98418dba 15006 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15007/* confdefs.h. */
15008_ACEOF
15009cat confdefs.h >>conftest.$ac_ext
15010cat >>conftest.$ac_ext <<_ACEOF
15011/* end confdefs.h. */
edfaf76d
LK
15012/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15013 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15014#define $ac_func innocuous_$ac_func
15015
98418dba 15016/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15017 which can conflict with char $ac_func (); below.
15018 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15019 <limits.h> exists even on freestanding compilers. */
edfaf76d 15020
19650fd6
AS
15021#ifdef __STDC__
15022# include <limits.h>
15023#else
15024# include <assert.h>
15025#endif
edfaf76d
LK
15026
15027#undef $ac_func
15028
ca81d7a0
JD
15029/* Override any GCC internal prototype to avoid an error.
15030 Use char because int might match the return type of a GCC
15031 builtin and then its argument prototype would still apply. */
503d2be0
AS
15032#ifdef __cplusplus
15033extern "C"
15034#endif
98418dba 15035char $ac_func ();
98418dba
CW
15036/* The GNU C library defines this for functions which it implements
15037 to always fail with ENOSYS. Some functions are actually named
15038 something starting with __ and the normal name is an alias. */
ca81d7a0 15039#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15040choke me
cd958eb3
MB
15041#endif
15042
19650fd6
AS
15043int
15044main ()
15045{
ca81d7a0 15046return $ac_func ();
503d2be0
AS
15047 ;
15048 return 0;
15049}
15050_ACEOF
15051rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15052if { (ac_try="$ac_link"
15053case "(($ac_try" in
15054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15055 *) ac_try_echo=$ac_try;;
15056esac
15057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15058 (eval "$ac_link") 2>conftest.er1
503d2be0 15059 ac_status=$?
edfaf76d
LK
15060 grep -v '^ *+' conftest.er1 >conftest.err
15061 rm -f conftest.er1
15062 cat conftest.err >&5
c0d27fcc 15063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15064 (exit $ac_status); } && {
15065 test -z "$ac_c_werror_flag" ||
15066 test ! -s conftest.err
15067 } && test -s conftest$ac_exeext &&
15068 $as_test_x conftest$ac_exeext; then
98418dba 15069 eval "$as_ac_var=yes"
503d2be0
AS
15070else
15071 echo "$as_me: failed program was:" >&5
19650fd6
AS
15072sed 's/^/| /' conftest.$ac_ext >&5
15073
ca81d7a0 15074 eval "$as_ac_var=no"
503d2be0 15075fi
ca81d7a0 15076
f053c89f 15077rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15078 conftest$ac_exeext conftest.$ac_ext
503d2be0 15079fi
ca81d7a0
JD
15080ac_res=`eval echo '${'$as_ac_var'}'`
15081 { echo "$as_me:$LINENO: result: $ac_res" >&5
15082echo "${ECHO_T}$ac_res" >&6; }
98418dba 15083if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15084 cat >>confdefs.h <<_ACEOF
98418dba 15085#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15086_ACEOF
457b792c 15087
457b792c 15088fi
98418dba 15089done
457b792c 15090
c0d27fcc 15091
98418dba
CW
15092for ac_header in maillock.h
15093do
15094as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15095if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15096 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15097echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15098if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15099 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15100fi
ca81d7a0
JD
15101ac_res=`eval echo '${'$as_ac_Header'}'`
15102 { echo "$as_me:$LINENO: result: $ac_res" >&5
15103echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 15104else
c0d27fcc 15105 # Is the header compilable?
ca81d7a0
JD
15106{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15107echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15108cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15109/* confdefs.h. */
15110_ACEOF
15111cat confdefs.h >>conftest.$ac_ext
15112cat >>conftest.$ac_ext <<_ACEOF
15113/* end confdefs.h. */
c0d27fcc
MR
15114$ac_includes_default
15115#include <$ac_header>
15116_ACEOF
15117rm -f conftest.$ac_objext
ca81d7a0
JD
15118if { (ac_try="$ac_compile"
15119case "(($ac_try" in
15120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15121 *) ac_try_echo=$ac_try;;
15122esac
15123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15124 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15125 ac_status=$?
edfaf76d
LK
15126 grep -v '^ *+' conftest.er1 >conftest.err
15127 rm -f conftest.er1
15128 cat conftest.err >&5
c0d27fcc 15129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15130 (exit $ac_status); } && {
15131 test -z "$ac_c_werror_flag" ||
15132 test ! -s conftest.err
15133 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15134 ac_header_compiler=yes
15135else
15136 echo "$as_me: failed program was:" >&5
19650fd6
AS
15137sed 's/^/| /' conftest.$ac_ext >&5
15138
ca81d7a0 15139 ac_header_compiler=no
c0d27fcc 15140fi
ca81d7a0
JD
15141
15142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15143{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15144echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15145
15146# Is the header present?
ca81d7a0
JD
15147{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15148echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15149cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15150/* confdefs.h. */
15151_ACEOF
15152cat confdefs.h >>conftest.$ac_ext
15153cat >>conftest.$ac_ext <<_ACEOF
15154/* end confdefs.h. */
98418dba 15155#include <$ac_header>
503d2be0 15156_ACEOF
ca81d7a0
JD
15157if { (ac_try="$ac_cpp conftest.$ac_ext"
15158case "(($ac_try" in
15159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15160 *) ac_try_echo=$ac_try;;
15161esac
15162eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15163 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15164 ac_status=$?
6bae0ccf 15165 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15166 rm -f conftest.er1
15167 cat conftest.err >&5
c0d27fcc 15168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15169 (exit $ac_status); } >/dev/null && {
15170 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15171 test ! -s conftest.err
15172 }; then
c0d27fcc 15173 ac_header_preproc=yes
98418dba
CW
15174else
15175 echo "$as_me: failed program was:" >&5
19650fd6
AS
15176sed 's/^/| /' conftest.$ac_ext >&5
15177
c0d27fcc 15178 ac_header_preproc=no
503d2be0 15179fi
ca81d7a0 15180
98418dba 15181rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15182{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15183echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15184
15185# So? What about this header?
edfaf76d
LK
15186case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15187 yes:no: )
c0d27fcc
MR
15188 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15189echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15190 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15191echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15192 ac_header_preproc=yes
19650fd6 15193 ;;
edfaf76d 15194 no:yes:* )
c0d27fcc
MR
15195 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15196echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15197 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15198echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15199 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15200echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15201 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15202echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15203 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15204echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15205 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15206echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15207
19650fd6 15208 ;;
c0d27fcc 15209esac
ca81d7a0
JD
15210{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15211echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15212if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15213 echo $ECHO_N "(cached) $ECHO_C" >&6
15214else
edfaf76d 15215 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 15216fi
ca81d7a0
JD
15217ac_res=`eval echo '${'$as_ac_Header'}'`
15218 { echo "$as_me:$LINENO: result: $ac_res" >&5
15219echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15220
15221fi
98418dba 15222if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15223 cat >>confdefs.h <<_ACEOF
98418dba 15224#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15225_ACEOF
48d4b120 15226
ba4481b5 15227fi
c0d27fcc 15228
98418dba
CW
15229done
15230
c0d27fcc
MR
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
22044edf
DL
15286
15287
c0d27fcc 15288
b0e44248
RB
15289
15290
973a76b1
DL
15291
15292
15293
cd958eb3 15294
25ca0bca 15295
ea92fc9f 15296
e2fcf543 15297
190956b3 15298
c0d27fcc
MR
15299
15300
98418dba 15301for ac_func in gethostname getdomainname dup2 \
e2fcf543 15302rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
98418dba
CW
15303random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
15304strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 15305utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
15306__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
15307sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 15308gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
4489ece2 15309memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
15310do
15311as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15312{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15313echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15314if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15315 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15316else
503d2be0 15317 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15318/* confdefs.h. */
15319_ACEOF
15320cat confdefs.h >>conftest.$ac_ext
15321cat >>conftest.$ac_ext <<_ACEOF
15322/* end confdefs.h. */
edfaf76d
LK
15323/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15324 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15325#define $ac_func innocuous_$ac_func
15326
98418dba 15327/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15328 which can conflict with char $ac_func (); below.
15329 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15330 <limits.h> exists even on freestanding compilers. */
edfaf76d 15331
19650fd6
AS
15332#ifdef __STDC__
15333# include <limits.h>
15334#else
15335# include <assert.h>
15336#endif
edfaf76d
LK
15337
15338#undef $ac_func
15339
ca81d7a0
JD
15340/* Override any GCC internal prototype to avoid an error.
15341 Use char because int might match the return type of a GCC
15342 builtin and then its argument prototype would still apply. */
503d2be0
AS
15343#ifdef __cplusplus
15344extern "C"
15345#endif
98418dba 15346char $ac_func ();
98418dba
CW
15347/* The GNU C library defines this for functions which it implements
15348 to always fail with ENOSYS. Some functions are actually named
15349 something starting with __ and the normal name is an alias. */
ca81d7a0 15350#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15351choke me
98418dba
CW
15352#endif
15353
19650fd6
AS
15354int
15355main ()
15356{
ca81d7a0 15357return $ac_func ();
503d2be0
AS
15358 ;
15359 return 0;
15360}
15361_ACEOF
15362rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15363if { (ac_try="$ac_link"
15364case "(($ac_try" in
15365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15366 *) ac_try_echo=$ac_try;;
15367esac
15368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15369 (eval "$ac_link") 2>conftest.er1
503d2be0 15370 ac_status=$?
edfaf76d
LK
15371 grep -v '^ *+' conftest.er1 >conftest.err
15372 rm -f conftest.er1
15373 cat conftest.err >&5
c0d27fcc 15374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15375 (exit $ac_status); } && {
15376 test -z "$ac_c_werror_flag" ||
15377 test ! -s conftest.err
15378 } && test -s conftest$ac_exeext &&
15379 $as_test_x conftest$ac_exeext; then
98418dba 15380 eval "$as_ac_var=yes"
503d2be0
AS
15381else
15382 echo "$as_me: failed program was:" >&5
19650fd6
AS
15383sed 's/^/| /' conftest.$ac_ext >&5
15384
ca81d7a0 15385 eval "$as_ac_var=no"
503d2be0 15386fi
ca81d7a0 15387
f053c89f 15388rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15389 conftest$ac_exeext conftest.$ac_ext
ba4481b5 15390fi
ca81d7a0
JD
15391ac_res=`eval echo '${'$as_ac_var'}'`
15392 { echo "$as_me:$LINENO: result: $ac_res" >&5
15393echo "${ECHO_T}$ac_res" >&6; }
98418dba 15394if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15395 cat >>confdefs.h <<_ACEOF
98418dba 15396#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15397_ACEOF
ba4481b5 15398
ba4481b5 15399fi
98418dba 15400done
ba4481b5 15401
c0d27fcc
MR
15402
15403
98418dba
CW
15404for ac_header in sys/un.h
15405do
15406as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15407if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15408 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15409echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15410if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 15411 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15412fi
ca81d7a0
JD
15413ac_res=`eval echo '${'$as_ac_Header'}'`
15414 { echo "$as_me:$LINENO: result: $ac_res" >&5
15415echo "${ECHO_T}$ac_res" >&6; }
98418dba 15416else
c0d27fcc 15417 # Is the header compilable?
ca81d7a0
JD
15418{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15419echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15420cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15421/* confdefs.h. */
15422_ACEOF
15423cat confdefs.h >>conftest.$ac_ext
15424cat >>conftest.$ac_ext <<_ACEOF
15425/* end confdefs.h. */
c0d27fcc
MR
15426$ac_includes_default
15427#include <$ac_header>
15428_ACEOF
15429rm -f conftest.$ac_objext
ca81d7a0
JD
15430if { (ac_try="$ac_compile"
15431case "(($ac_try" in
15432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15433 *) ac_try_echo=$ac_try;;
15434esac
15435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15436 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15437 ac_status=$?
edfaf76d
LK
15438 grep -v '^ *+' conftest.er1 >conftest.err
15439 rm -f conftest.er1
15440 cat conftest.err >&5
c0d27fcc 15441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15442 (exit $ac_status); } && {
15443 test -z "$ac_c_werror_flag" ||
15444 test ! -s conftest.err
15445 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15446 ac_header_compiler=yes
15447else
15448 echo "$as_me: failed program was:" >&5
19650fd6
AS
15449sed 's/^/| /' conftest.$ac_ext >&5
15450
ca81d7a0 15451 ac_header_compiler=no
c0d27fcc 15452fi
ca81d7a0
JD
15453
15454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15455{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15456echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15457
15458# Is the header present?
ca81d7a0
JD
15459{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15460echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15461cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15462/* confdefs.h. */
15463_ACEOF
15464cat confdefs.h >>conftest.$ac_ext
15465cat >>conftest.$ac_ext <<_ACEOF
15466/* end confdefs.h. */
98418dba 15467#include <$ac_header>
503d2be0 15468_ACEOF
ca81d7a0
JD
15469if { (ac_try="$ac_cpp conftest.$ac_ext"
15470case "(($ac_try" in
15471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15472 *) ac_try_echo=$ac_try;;
15473esac
15474eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15475 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15476 ac_status=$?
6bae0ccf 15477 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15478 rm -f conftest.er1
15479 cat conftest.err >&5
c0d27fcc 15480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15481 (exit $ac_status); } >/dev/null && {
15482 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15483 test ! -s conftest.err
15484 }; then
c0d27fcc 15485 ac_header_preproc=yes
ba4481b5 15486else
503d2be0 15487 echo "$as_me: failed program was:" >&5
19650fd6
AS
15488sed 's/^/| /' conftest.$ac_ext >&5
15489
c0d27fcc 15490 ac_header_preproc=no
ba4481b5 15491fi
ca81d7a0 15492
503d2be0 15493rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15494{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15495echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15496
15497# So? What about this header?
edfaf76d
LK
15498case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15499 yes:no: )
c0d27fcc
MR
15500 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15501echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15502 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15503echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15504 ac_header_preproc=yes
19650fd6 15505 ;;
edfaf76d 15506 no:yes:* )
c0d27fcc
MR
15507 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15508echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15509 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15510echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15511 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15512echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15513 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15514echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15515 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15516echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15517 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15518echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15519
19650fd6 15520 ;;
c0d27fcc 15521esac
ca81d7a0
JD
15522{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15523echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15524if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15525 echo $ECHO_N "(cached) $ECHO_C" >&6
15526else
edfaf76d 15527 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 15528fi
ca81d7a0
JD
15529ac_res=`eval echo '${'$as_ac_Header'}'`
15530 { echo "$as_me:$LINENO: result: $ac_res" >&5
15531echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15532
15533fi
925c2f3f 15534if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15535 cat >>confdefs.h <<_ACEOF
925c2f3f 15536#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15537_ACEOF
503d2be0 15538
925c2f3f 15539fi
c0d27fcc 15540
925c2f3f
EZ
15541done
15542
c0d27fcc
MR
15543
15544
15545
edfaf76d 15546
f053c89f
CY
15547
15548for ac_header in $ac_header_list
925c2f3f
EZ
15549do
15550as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15551if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15552 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15553echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15554if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 15555 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15556fi
ca81d7a0
JD
15557ac_res=`eval echo '${'$as_ac_Header'}'`
15558 { echo "$as_me:$LINENO: result: $ac_res" >&5
15559echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 15560else
c0d27fcc 15561 # Is the header compilable?
ca81d7a0
JD
15562{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15563echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15564cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15565/* confdefs.h. */
15566_ACEOF
15567cat confdefs.h >>conftest.$ac_ext
15568cat >>conftest.$ac_ext <<_ACEOF
15569/* end confdefs.h. */
c0d27fcc
MR
15570$ac_includes_default
15571#include <$ac_header>
15572_ACEOF
15573rm -f conftest.$ac_objext
ca81d7a0
JD
15574if { (ac_try="$ac_compile"
15575case "(($ac_try" in
15576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15577 *) ac_try_echo=$ac_try;;
15578esac
15579eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15580 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15581 ac_status=$?
edfaf76d
LK
15582 grep -v '^ *+' conftest.er1 >conftest.err
15583 rm -f conftest.er1
15584 cat conftest.err >&5
c0d27fcc 15585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15586 (exit $ac_status); } && {
15587 test -z "$ac_c_werror_flag" ||
15588 test ! -s conftest.err
15589 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15590 ac_header_compiler=yes
15591else
15592 echo "$as_me: failed program was:" >&5
19650fd6
AS
15593sed 's/^/| /' conftest.$ac_ext >&5
15594
ca81d7a0 15595 ac_header_compiler=no
c0d27fcc 15596fi
ca81d7a0
JD
15597
15598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15599{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15600echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15601
15602# Is the header present?
ca81d7a0
JD
15603{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15604echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15605cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15606/* confdefs.h. */
15607_ACEOF
15608cat confdefs.h >>conftest.$ac_ext
15609cat >>conftest.$ac_ext <<_ACEOF
15610/* end confdefs.h. */
98418dba 15611#include <$ac_header>
503d2be0 15612_ACEOF
ca81d7a0
JD
15613if { (ac_try="$ac_cpp conftest.$ac_ext"
15614case "(($ac_try" in
15615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15616 *) ac_try_echo=$ac_try;;
15617esac
15618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15619 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15620 ac_status=$?
6bae0ccf 15621 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
15622 rm -f conftest.er1
15623 cat conftest.err >&5
c0d27fcc 15624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15625 (exit $ac_status); } >/dev/null && {
15626 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15627 test ! -s conftest.err
15628 }; then
c0d27fcc 15629 ac_header_preproc=yes
98418dba
CW
15630else
15631 echo "$as_me: failed program was:" >&5
19650fd6
AS
15632sed 's/^/| /' conftest.$ac_ext >&5
15633
c0d27fcc 15634 ac_header_preproc=no
98418dba 15635fi
ca81d7a0 15636
98418dba 15637rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15638{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15639echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15640
15641# So? What about this header?
edfaf76d
LK
15642case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15643 yes:no: )
c0d27fcc
MR
15644 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15645echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15646 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15647echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15648 ac_header_preproc=yes
19650fd6 15649 ;;
edfaf76d 15650 no:yes:* )
c0d27fcc
MR
15651 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15652echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15653 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15654echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15655 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15656echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15657 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15658echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15659 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15660echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15661 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15662echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15663
19650fd6 15664 ;;
c0d27fcc 15665esac
ca81d7a0
JD
15666{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15667echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15668if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15669 echo $ECHO_N "(cached) $ECHO_C" >&6
15670else
edfaf76d 15671 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 15672fi
ca81d7a0
JD
15673ac_res=`eval echo '${'$as_ac_Header'}'`
15674 { echo "$as_me:$LINENO: result: $ac_res" >&5
15675echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15676
15677fi
98418dba 15678if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15679 cat >>confdefs.h <<_ACEOF
98418dba 15680#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15681_ACEOF
98418dba
CW
15682
15683fi
c0d27fcc 15684
98418dba
CW
15685done
15686
c0d27fcc 15687
f053c89f
CY
15688
15689
15690
15691
15692
15693
15694
15695for ac_func in $ac_func_list
98418dba
CW
15696do
15697as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15698{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15699echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15700if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15701 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15702else
98418dba 15703 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15704/* confdefs.h. */
15705_ACEOF
15706cat confdefs.h >>conftest.$ac_ext
15707cat >>conftest.$ac_ext <<_ACEOF
15708/* end confdefs.h. */
edfaf76d
LK
15709/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15710 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15711#define $ac_func innocuous_$ac_func
15712
98418dba 15713/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15714 which can conflict with char $ac_func (); below.
15715 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15716 <limits.h> exists even on freestanding compilers. */
edfaf76d 15717
19650fd6
AS
15718#ifdef __STDC__
15719# include <limits.h>
15720#else
15721# include <assert.h>
15722#endif
edfaf76d
LK
15723
15724#undef $ac_func
15725
ca81d7a0
JD
15726/* Override any GCC internal prototype to avoid an error.
15727 Use char because int might match the return type of a GCC
15728 builtin and then its argument prototype would still apply. */
503d2be0
AS
15729#ifdef __cplusplus
15730extern "C"
15731#endif
98418dba 15732char $ac_func ();
98418dba
CW
15733/* The GNU C library defines this for functions which it implements
15734 to always fail with ENOSYS. Some functions are actually named
15735 something starting with __ and the normal name is an alias. */
ca81d7a0 15736#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15737choke me
98418dba
CW
15738#endif
15739
19650fd6
AS
15740int
15741main ()
15742{
ca81d7a0 15743return $ac_func ();
503d2be0
AS
15744 ;
15745 return 0;
15746}
15747_ACEOF
15748rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15749if { (ac_try="$ac_link"
15750case "(($ac_try" in
15751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15752 *) ac_try_echo=$ac_try;;
15753esac
15754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15755 (eval "$ac_link") 2>conftest.er1
503d2be0 15756 ac_status=$?
edfaf76d
LK
15757 grep -v '^ *+' conftest.er1 >conftest.err
15758 rm -f conftest.er1
15759 cat conftest.err >&5
c0d27fcc 15760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15761 (exit $ac_status); } && {
15762 test -z "$ac_c_werror_flag" ||
15763 test ! -s conftest.err
15764 } && test -s conftest$ac_exeext &&
15765 $as_test_x conftest$ac_exeext; then
98418dba 15766 eval "$as_ac_var=yes"
503d2be0
AS
15767else
15768 echo "$as_me: failed program was:" >&5
19650fd6
AS
15769sed 's/^/| /' conftest.$ac_ext >&5
15770
ca81d7a0 15771 eval "$as_ac_var=no"
503d2be0 15772fi
ca81d7a0 15773
f053c89f 15774rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15775 conftest$ac_exeext conftest.$ac_ext
ffe36136 15776fi
ca81d7a0
JD
15777ac_res=`eval echo '${'$as_ac_var'}'`
15778 { echo "$as_me:$LINENO: result: $ac_res" >&5
15779echo "${ECHO_T}$ac_res" >&6; }
98418dba 15780if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15781 cat >>confdefs.h <<_ACEOF
98418dba 15782#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15783_ACEOF
ffe36136 15784
ba4481b5 15785fi
98418dba 15786done
ba4481b5 15787
f053c89f
CY
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
ca81d7a0
JD
15804{ echo "$as_me:$LINENO: checking for working mktime" >&5
15805echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
15806if test "${ac_cv_func_working_mktime+set}" = set; then
15807 echo $ECHO_N "(cached) $ECHO_C" >&6
15808else
15809 if test "$cross_compiling" = yes; then
15810 ac_cv_func_working_mktime=no
15811else
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. */
98418dba 15818/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 15819#ifdef TIME_WITH_SYS_TIME
98418dba
CW
15820# include <sys/time.h>
15821# include <time.h>
15822#else
f053c89f 15823# ifdef HAVE_SYS_TIME_H
98418dba
CW
15824# include <sys/time.h>
15825# else
15826# include <time.h>
15827# endif
15828#endif
ba4481b5 15829
f053c89f 15830#include <stdlib.h>
edfaf76d 15831
f053c89f 15832#ifdef HAVE_UNISTD_H
98418dba
CW
15833# include <unistd.h>
15834#endif
ba4481b5 15835
f053c89f 15836#ifndef HAVE_ALARM
98418dba
CW
15837# define alarm(X) /* empty */
15838#endif
df645f7c 15839
98418dba
CW
15840/* Work around redefinition to rpl_putenv by other config tests. */
15841#undef putenv
df645f7c 15842
98418dba 15843static time_t time_t_max;
edfaf76d 15844static time_t time_t_min;
df645f7c 15845
98418dba 15846/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
15847static char *tz_strings[] = {
15848 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
15849 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
15850};
15851#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 15852
ca81d7a0 15853/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 15854 Based on a problem report from Andreas Jaeger. */
ca81d7a0 15855static int
98418dba
CW
15856spring_forward_gap ()
15857{
15858 /* glibc (up to about 1998-10-07) failed this test. */
15859 struct tm tm;
15860
15861 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
15862 instead of "TZ=America/Vancouver" in order to detect the bug even
15863 on systems that don't support the Olson extension, or don't have the
15864 full zoneinfo tables installed. */
15865 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
15866
15867 tm.tm_year = 98;
15868 tm.tm_mon = 3;
15869 tm.tm_mday = 5;
15870 tm.tm_hour = 2;
15871 tm.tm_min = 0;
15872 tm.tm_sec = 0;
15873 tm.tm_isdst = -1;
ca81d7a0 15874 return mktime (&tm) != (time_t) -1;
98418dba
CW
15875}
15876
ca81d7a0 15877static int
edfaf76d 15878mktime_test1 (now)
98418dba
CW
15879 time_t now;
15880{
15881 struct tm *lt;
ca81d7a0 15882 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
15883}
15884
ca81d7a0 15885static int
edfaf76d
LK
15886mktime_test (now)
15887 time_t now;
15888{
ca81d7a0
JD
15889 return (mktime_test1 (now)
15890 && mktime_test1 ((time_t) (time_t_max - now))
15891 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
15892}
15893
ca81d7a0 15894static int
98418dba
CW
15895irix_6_4_bug ()
15896{
15897 /* Based on code from Ariel Faigon. */
15898 struct tm tm;
15899 tm.tm_year = 96;
15900 tm.tm_mon = 3;
15901 tm.tm_mday = 0;
15902 tm.tm_hour = 0;
15903 tm.tm_min = 0;
15904 tm.tm_sec = 0;
15905 tm.tm_isdst = -1;
15906 mktime (&tm);
ca81d7a0 15907 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
15908}
15909
ca81d7a0 15910static int
98418dba
CW
15911bigtime_test (j)
15912 int j;
15913{
15914 struct tm tm;
15915 time_t now;
15916 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
15917 now = mktime (&tm);
15918 if (now != (time_t) -1)
15919 {
15920 struct tm *lt = localtime (&now);
15921 if (! (lt
15922 && lt->tm_year == tm.tm_year
15923 && lt->tm_mon == tm.tm_mon
15924 && lt->tm_mday == tm.tm_mday
15925 && lt->tm_hour == tm.tm_hour
15926 && lt->tm_min == tm.tm_min
15927 && lt->tm_sec == tm.tm_sec
15928 && lt->tm_yday == tm.tm_yday
15929 && lt->tm_wday == tm.tm_wday
15930 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
15931 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 15932 return 0;
98418dba 15933 }
ca81d7a0 15934 return 1;
98418dba
CW
15935}
15936
f053c89f
CY
15937static int
15938year_2050_test ()
15939{
15940 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
15941 ignoring leap seconds. */
15942 unsigned long int answer = 2527315200UL;
15943
15944 struct tm tm;
15945 time_t t;
15946 tm.tm_year = 2050 - 1900;
15947 tm.tm_mon = 2 - 1;
15948 tm.tm_mday = 1;
15949 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
15950 tm.tm_isdst = -1;
15951
15952 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
15953 instead of "TZ=America/Vancouver" in order to detect the bug even
15954 on systems that don't support the Olson extension, or don't have the
15955 full zoneinfo tables installed. */
15956 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
15957
15958 t = mktime (&tm);
15959
15960 /* Check that the result is either a failure, or close enough
15961 to the correct answer that we can assume the discrepancy is
15962 due to leap seconds. */
15963 return (t == (time_t) -1
15964 || (0 < t && answer - 120 <= t && t <= answer + 120));
15965}
15966
98418dba
CW
15967int
15968main ()
15969{
15970 time_t t, delta;
15971 int i, j;
15972
15973 /* This test makes some buggy mktime implementations loop.
15974 Give up after 60 seconds; a mktime slower than that
15975 isn't worth using anyway. */
15976 alarm (60);
15977
15978 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
15979 continue;
15980 time_t_max--;
edfaf76d
LK
15981 if ((time_t) -1 < 0)
15982 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
15983 continue;
98418dba
CW
15984 delta = time_t_max / 997; /* a suitable prime number */
15985 for (i = 0; i < N_STRINGS; i++)
15986 {
15987 if (tz_strings[i])
15988 putenv (tz_strings[i]);
503d2be0 15989
98418dba 15990 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
15991 if (! mktime_test (t))
15992 return 1;
15993 if (! (mktime_test ((time_t) 1)
15994 && mktime_test ((time_t) (60 * 60))
15995 && mktime_test ((time_t) (60 * 60 * 24))))
15996 return 1;
98418dba
CW
15997
15998 for (j = 1; 0 < j; j *= 2)
ca81d7a0
JD
15999 if (! bigtime_test (j))
16000 return 1;
16001 if (! bigtime_test (j - 1))
16002 return 1;
98418dba 16003 }
f053c89f 16004 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
16005}
16006_ACEOF
98418dba 16007rm -f conftest$ac_exeext
ca81d7a0
JD
16008if { (ac_try="$ac_link"
16009case "(($ac_try" in
16010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16011 *) ac_try_echo=$ac_try;;
16012esac
16013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16014 (eval "$ac_link") 2>&5
503d2be0 16015 ac_status=$?
c0d27fcc 16016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 16017 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
16018 { (case "(($ac_try" in
16019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16020 *) ac_try_echo=$ac_try;;
16021esac
16022eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16023 (eval "$ac_try") 2>&5
503d2be0 16024 ac_status=$?
c0d27fcc 16025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16026 (exit $ac_status); }; }; then
98418dba 16027 ac_cv_func_working_mktime=yes
503d2be0 16028else
98418dba
CW
16029 echo "$as_me: program exited with status $ac_status" >&5
16030echo "$as_me: failed program was:" >&5
19650fd6
AS
16031sed 's/^/| /' conftest.$ac_ext >&5
16032
c0d27fcc 16033( exit $ac_status )
98418dba 16034ac_cv_func_working_mktime=no
503d2be0 16035fi
ca81d7a0 16036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 16037fi
ca81d7a0
JD
16038
16039
ba4481b5 16040fi
ca81d7a0
JD
16041{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
16042echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 16043if test $ac_cv_func_working_mktime = no; then
ca81d7a0 16044 case " $LIBOBJS " in
edfaf76d 16045 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
16046 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
16047 ;;
edfaf76d
LK
16048esac
16049
ba4481b5
DL
16050fi
16051
98418dba 16052if test "$ac_cv_func_working_mktime" = no; then
b936fae4 16053
c0d27fcc 16054cat >>confdefs.h <<\_ACEOF
98418dba 16055#define BROKEN_MKTIME 1
c0d27fcc 16056_ACEOF
ba4481b5 16057
ba4481b5 16058fi
503d2be0 16059
98418dba
CW
16060ac_have_func=no # yes means we've found a way to get the load average.
16061
6bae0ccf
DL
16062# Make sure getloadavg.c is where it belongs, at configure-time.
16063test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
16064 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
16065echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
16066 { (exit 1); exit 1; }; }
16067
98418dba
CW
16068ac_save_LIBS=$LIBS
16069
16070# Check for getloadavg, but be sure not to touch the cache variable.
ca81d7a0
JD
16071({ echo "$as_me:$LINENO: checking for getloadavg" >&5
16072echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 16073if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 16074 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16075else
503d2be0 16076 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16077/* confdefs.h. */
16078_ACEOF
16079cat confdefs.h >>conftest.$ac_ext
16080cat >>conftest.$ac_ext <<_ACEOF
16081/* end confdefs.h. */
edfaf76d
LK
16082/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
16083 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16084#define getloadavg innocuous_getloadavg
16085
98418dba 16086/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16087 which can conflict with char getloadavg (); below.
16088 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16089 <limits.h> exists even on freestanding compilers. */
edfaf76d 16090
19650fd6
AS
16091#ifdef __STDC__
16092# include <limits.h>
16093#else
16094# include <assert.h>
16095#endif
edfaf76d
LK
16096
16097#undef getloadavg
16098
ca81d7a0
JD
16099/* Override any GCC internal prototype to avoid an error.
16100 Use char because int might match the return type of a GCC
16101 builtin and then its argument prototype would still apply. */
503d2be0
AS
16102#ifdef __cplusplus
16103extern "C"
16104#endif
98418dba 16105char getloadavg ();
98418dba
CW
16106/* The GNU C library defines this for functions which it implements
16107 to always fail with ENOSYS. Some functions are actually named
16108 something starting with __ and the normal name is an alias. */
ca81d7a0 16109#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 16110choke me
cd958eb3
MB
16111#endif
16112
19650fd6
AS
16113int
16114main ()
16115{
ca81d7a0 16116return getloadavg ();
503d2be0
AS
16117 ;
16118 return 0;
16119}
16120_ACEOF
16121rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16122if { (ac_try="$ac_link"
16123case "(($ac_try" in
16124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16125 *) ac_try_echo=$ac_try;;
16126esac
16127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16128 (eval "$ac_link") 2>conftest.er1
503d2be0 16129 ac_status=$?
edfaf76d
LK
16130 grep -v '^ *+' conftest.er1 >conftest.err
16131 rm -f conftest.er1
16132 cat conftest.err >&5
c0d27fcc 16133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16134 (exit $ac_status); } && {
16135 test -z "$ac_c_werror_flag" ||
16136 test ! -s conftest.err
16137 } && test -s conftest$ac_exeext &&
16138 $as_test_x conftest$ac_exeext; then
98418dba 16139 ac_cv_func_getloadavg=yes
503d2be0
AS
16140else
16141 echo "$as_me: failed program was:" >&5
19650fd6
AS
16142sed 's/^/| /' conftest.$ac_ext >&5
16143
ca81d7a0 16144 ac_cv_func_getloadavg=no
503d2be0 16145fi
ca81d7a0 16146
f053c89f 16147rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16148 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16149fi
ca81d7a0
JD
16150{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
16151echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
16152if test $ac_cv_func_getloadavg = yes; then
16153 exit 0
16154else
16155 exit 1
ba4481b5 16156fi
98418dba 16157) && ac_have_func=yes
ba4481b5 16158
98418dba 16159# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 16160
98418dba
CW
16161for ac_func in pstat_getdynamic
16162do
16163as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16164{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16165echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16166if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16167 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16168else
503d2be0 16169 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16170/* confdefs.h. */
16171_ACEOF
16172cat confdefs.h >>conftest.$ac_ext
16173cat >>conftest.$ac_ext <<_ACEOF
16174/* end confdefs.h. */
edfaf76d
LK
16175/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16176 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16177#define $ac_func innocuous_$ac_func
16178
98418dba 16179/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16180 which can conflict with char $ac_func (); below.
16181 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16182 <limits.h> exists even on freestanding compilers. */
edfaf76d 16183
19650fd6
AS
16184#ifdef __STDC__
16185# include <limits.h>
16186#else
16187# include <assert.h>
16188#endif
edfaf76d
LK
16189
16190#undef $ac_func
16191
ca81d7a0
JD
16192/* Override any GCC internal prototype to avoid an error.
16193 Use char because int might match the return type of a GCC
16194 builtin and then its argument prototype would still apply. */
503d2be0
AS
16195#ifdef __cplusplus
16196extern "C"
16197#endif
98418dba 16198char $ac_func ();
98418dba
CW
16199/* The GNU C library defines this for functions which it implements
16200 to always fail with ENOSYS. Some functions are actually named
16201 something starting with __ and the normal name is an alias. */
ca81d7a0 16202#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16203choke me
98418dba
CW
16204#endif
16205
19650fd6
AS
16206int
16207main ()
16208{
ca81d7a0 16209return $ac_func ();
98418dba
CW
16210 ;
16211 return 0;
16212}
f21fadcc 16213_ACEOF
98418dba 16214rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16215if { (ac_try="$ac_link"
16216case "(($ac_try" in
16217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16218 *) ac_try_echo=$ac_try;;
16219esac
16220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16221 (eval "$ac_link") 2>conftest.er1
f21fadcc 16222 ac_status=$?
edfaf76d
LK
16223 grep -v '^ *+' conftest.er1 >conftest.err
16224 rm -f conftest.er1
16225 cat conftest.err >&5
c0d27fcc 16226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16227 (exit $ac_status); } && {
16228 test -z "$ac_c_werror_flag" ||
16229 test ! -s conftest.err
16230 } && test -s conftest$ac_exeext &&
16231 $as_test_x conftest$ac_exeext; then
98418dba 16232 eval "$as_ac_var=yes"
f21fadcc
JD
16233else
16234 echo "$as_me: failed program was:" >&5
19650fd6
AS
16235sed 's/^/| /' conftest.$ac_ext >&5
16236
ca81d7a0 16237 eval "$as_ac_var=no"
f21fadcc 16238fi
ca81d7a0 16239
f053c89f 16240rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16241 conftest$ac_exeext conftest.$ac_ext
f21fadcc 16242fi
ca81d7a0
JD
16243ac_res=`eval echo '${'$as_ac_var'}'`
16244 { echo "$as_me:$LINENO: result: $ac_res" >&5
16245echo "${ECHO_T}$ac_res" >&6; }
98418dba 16246if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16247 cat >>confdefs.h <<_ACEOF
98418dba 16248#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16249_ACEOF
98418dba
CW
16250
16251fi
16252done
16253
c0d27fcc 16254
98418dba
CW
16255# Solaris has libkstat which does not require root.
16256
ca81d7a0
JD
16257{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
16258echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 16259if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
16260 echo $ECHO_N "(cached) $ECHO_C" >&6
16261else
16262 ac_check_lib_save_LIBS=$LIBS
98418dba 16263LIBS="-lkstat $LIBS"
f21fadcc 16264cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16265/* confdefs.h. */
16266_ACEOF
16267cat confdefs.h >>conftest.$ac_ext
16268cat >>conftest.$ac_ext <<_ACEOF
16269/* end confdefs.h. */
f21fadcc 16270
ca81d7a0
JD
16271/* Override any GCC internal prototype to avoid an error.
16272 Use char because int might match the return type of a GCC
16273 builtin and then its argument prototype would still apply. */
f21fadcc
JD
16274#ifdef __cplusplus
16275extern "C"
16276#endif
98418dba 16277char kstat_open ();
f21fadcc
JD
16278int
16279main ()
16280{
ca81d7a0 16281return kstat_open ();
f21fadcc
JD
16282 ;
16283 return 0;
16284}
16285_ACEOF
16286rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16287if { (ac_try="$ac_link"
16288case "(($ac_try" in
16289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16290 *) ac_try_echo=$ac_try;;
16291esac
16292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16293 (eval "$ac_link") 2>conftest.er1
f21fadcc 16294 ac_status=$?
edfaf76d
LK
16295 grep -v '^ *+' conftest.er1 >conftest.err
16296 rm -f conftest.er1
16297 cat conftest.err >&5
c0d27fcc 16298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16299 (exit $ac_status); } && {
16300 test -z "$ac_c_werror_flag" ||
16301 test ! -s conftest.err
16302 } && test -s conftest$ac_exeext &&
16303 $as_test_x conftest$ac_exeext; then
98418dba 16304 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
16305else
16306 echo "$as_me: failed program was:" >&5
19650fd6
AS
16307sed 's/^/| /' conftest.$ac_ext >&5
16308
ca81d7a0 16309 ac_cv_lib_kstat_kstat_open=no
f21fadcc 16310fi
ca81d7a0 16311
f053c89f 16312rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16313 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
16314LIBS=$ac_check_lib_save_LIBS
16315fi
ca81d7a0
JD
16316{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
16317echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 16318if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 16319 cat >>confdefs.h <<_ACEOF
98418dba 16320#define HAVE_LIBKSTAT 1
c0d27fcc 16321_ACEOF
f21fadcc 16322
98418dba 16323 LIBS="-lkstat $LIBS"
f21fadcc 16324
f21fadcc
JD
16325fi
16326
98418dba
CW
16327test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
16328
16329# Some systems with -lutil have (and need) -lkvm as well, some do not.
16330# On Solaris, -lkvm requires nlist from -lelf, so check that first
16331# to get the right answer into the cache.
16332# For kstat on solaris, we need libelf to force the definition of SVR4 below.
16333if test $ac_have_func = no; then
ca81d7a0
JD
16334 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
16335echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 16336if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 16337 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16338else
98418dba
CW
16339 ac_check_lib_save_LIBS=$LIBS
16340LIBS="-lelf $LIBS"
16341cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16342/* confdefs.h. */
16343_ACEOF
16344cat confdefs.h >>conftest.$ac_ext
16345cat >>conftest.$ac_ext <<_ACEOF
16346/* end confdefs.h. */
98418dba 16347
ca81d7a0
JD
16348/* Override any GCC internal prototype to avoid an error.
16349 Use char because int might match the return type of a GCC
16350 builtin and then its argument prototype would still apply. */
98418dba
CW
16351#ifdef __cplusplus
16352extern "C"
16353#endif
98418dba 16354char elf_begin ();
503d2be0
AS
16355int
16356main ()
16357{
ca81d7a0 16358return elf_begin ();
503d2be0
AS
16359 ;
16360 return 0;
16361}
16362_ACEOF
16363rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16364if { (ac_try="$ac_link"
16365case "(($ac_try" in
16366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16367 *) ac_try_echo=$ac_try;;
16368esac
16369eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16370 (eval "$ac_link") 2>conftest.er1
503d2be0 16371 ac_status=$?
edfaf76d
LK
16372 grep -v '^ *+' conftest.er1 >conftest.err
16373 rm -f conftest.er1
16374 cat conftest.err >&5
c0d27fcc 16375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16376 (exit $ac_status); } && {
16377 test -z "$ac_c_werror_flag" ||
16378 test ! -s conftest.err
16379 } && test -s conftest$ac_exeext &&
16380 $as_test_x conftest$ac_exeext; then
98418dba 16381 ac_cv_lib_elf_elf_begin=yes
ba4481b5 16382else
503d2be0 16383 echo "$as_me: failed program was:" >&5
19650fd6
AS
16384sed 's/^/| /' conftest.$ac_ext >&5
16385
ca81d7a0 16386 ac_cv_lib_elf_elf_begin=no
ba4481b5 16387fi
ca81d7a0 16388
f053c89f 16389rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16390 conftest$ac_exeext conftest.$ac_ext
98418dba 16391LIBS=$ac_check_lib_save_LIBS
ba4481b5 16392fi
ca81d7a0
JD
16393{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
16394echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
16395if test $ac_cv_lib_elf_elf_begin = yes; then
16396 LIBS="-lelf $LIBS"
ba4481b5
DL
16397fi
16398
98418dba
CW
16399fi
16400if test $ac_have_func = no; then
ca81d7a0
JD
16401 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
16402echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 16403if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 16404 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16405else
98418dba
CW
16406 ac_check_lib_save_LIBS=$LIBS
16407LIBS="-lkvm $LIBS"
16408cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16409/* confdefs.h. */
16410_ACEOF
16411cat confdefs.h >>conftest.$ac_ext
16412cat >>conftest.$ac_ext <<_ACEOF
16413/* end confdefs.h. */
98418dba 16414
ca81d7a0
JD
16415/* Override any GCC internal prototype to avoid an error.
16416 Use char because int might match the return type of a GCC
16417 builtin and then its argument prototype would still apply. */
98418dba
CW
16418#ifdef __cplusplus
16419extern "C"
16420#endif
98418dba 16421char kvm_open ();
503d2be0
AS
16422int
16423main ()
16424{
ca81d7a0 16425return kvm_open ();
503d2be0
AS
16426 ;
16427 return 0;
16428}
16429_ACEOF
16430rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16431if { (ac_try="$ac_link"
16432case "(($ac_try" in
16433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16434 *) ac_try_echo=$ac_try;;
16435esac
16436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16437 (eval "$ac_link") 2>conftest.er1
503d2be0 16438 ac_status=$?
edfaf76d
LK
16439 grep -v '^ *+' conftest.er1 >conftest.err
16440 rm -f conftest.er1
16441 cat conftest.err >&5
c0d27fcc 16442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16443 (exit $ac_status); } && {
16444 test -z "$ac_c_werror_flag" ||
16445 test ! -s conftest.err
16446 } && test -s conftest$ac_exeext &&
16447 $as_test_x conftest$ac_exeext; then
98418dba 16448 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
16449else
16450 echo "$as_me: failed program was:" >&5
19650fd6
AS
16451sed 's/^/| /' conftest.$ac_ext >&5
16452
ca81d7a0 16453 ac_cv_lib_kvm_kvm_open=no
503d2be0 16454fi
ca81d7a0 16455
f053c89f 16456rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16457 conftest$ac_exeext conftest.$ac_ext
98418dba 16458LIBS=$ac_check_lib_save_LIBS
503d2be0 16459fi
ca81d7a0
JD
16460{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
16461echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
16462if test $ac_cv_lib_kvm_kvm_open = yes; then
16463 LIBS="-lkvm $LIBS"
ba4481b5
DL
16464fi
16465
98418dba 16466 # Check for the 4.4BSD definition of getloadavg.
ca81d7a0
JD
16467 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
16468echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 16469if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 16470 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16471else
98418dba
CW
16472 ac_check_lib_save_LIBS=$LIBS
16473LIBS="-lutil $LIBS"
16474cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16475/* confdefs.h. */
16476_ACEOF
16477cat confdefs.h >>conftest.$ac_ext
16478cat >>conftest.$ac_ext <<_ACEOF
16479/* end confdefs.h. */
98418dba 16480
ca81d7a0
JD
16481/* Override any GCC internal prototype to avoid an error.
16482 Use char because int might match the return type of a GCC
16483 builtin and then its argument prototype would still apply. */
98418dba
CW
16484#ifdef __cplusplus
16485extern "C"
16486#endif
98418dba 16487char getloadavg ();
503d2be0
AS
16488int
16489main ()
16490{
ca81d7a0 16491return getloadavg ();
503d2be0
AS
16492 ;
16493 return 0;
16494}
16495_ACEOF
16496rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16497if { (ac_try="$ac_link"
16498case "(($ac_try" in
16499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16500 *) ac_try_echo=$ac_try;;
16501esac
16502eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16503 (eval "$ac_link") 2>conftest.er1
503d2be0 16504 ac_status=$?
edfaf76d
LK
16505 grep -v '^ *+' conftest.er1 >conftest.err
16506 rm -f conftest.er1
16507 cat conftest.err >&5
c0d27fcc 16508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16509 (exit $ac_status); } && {
16510 test -z "$ac_c_werror_flag" ||
16511 test ! -s conftest.err
16512 } && test -s conftest$ac_exeext &&
16513 $as_test_x conftest$ac_exeext; then
35996d22
AS
16514 ac_cv_lib_util_getloadavg=yes
16515else
503d2be0 16516 echo "$as_me: failed program was:" >&5
19650fd6
AS
16517sed 's/^/| /' conftest.$ac_ext >&5
16518
ca81d7a0 16519 ac_cv_lib_util_getloadavg=no
ba4481b5 16520fi
ca81d7a0 16521
f053c89f 16522rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16523 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
16524LIBS=$ac_check_lib_save_LIBS
16525fi
ca81d7a0
JD
16526{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
16527echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
16528if test $ac_cv_lib_util_getloadavg = yes; then
16529 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 16530fi
503d2be0 16531
98418dba 16532fi
ba4481b5 16533
98418dba
CW
16534if test $ac_have_func = no; then
16535 # There is a commonly available library for RS/6000 AIX.
16536 # Since it is not a standard part of AIX, it might be installed locally.
16537 ac_getloadavg_LIBS=$LIBS
16538 LIBS="-L/usr/local/lib $LIBS"
ca81d7a0
JD
16539 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
16540echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 16541if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 16542 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16543else
98418dba
CW
16544 ac_check_lib_save_LIBS=$LIBS
16545LIBS="-lgetloadavg $LIBS"
16546cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16547/* confdefs.h. */
16548_ACEOF
16549cat confdefs.h >>conftest.$ac_ext
16550cat >>conftest.$ac_ext <<_ACEOF
16551/* end confdefs.h. */
ba4481b5 16552
ca81d7a0
JD
16553/* Override any GCC internal prototype to avoid an error.
16554 Use char because int might match the return type of a GCC
16555 builtin and then its argument prototype would still apply. */
98418dba
CW
16556#ifdef __cplusplus
16557extern "C"
16558#endif
98418dba 16559char getloadavg ();
98418dba
CW
16560int
16561main ()
16562{
ca81d7a0 16563return getloadavg ();
98418dba
CW
16564 ;
16565 return 0;
16566}
503d2be0 16567_ACEOF
98418dba 16568rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16569if { (ac_try="$ac_link"
16570case "(($ac_try" in
16571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16572 *) ac_try_echo=$ac_try;;
16573esac
16574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16575 (eval "$ac_link") 2>conftest.er1
98418dba 16576 ac_status=$?
edfaf76d
LK
16577 grep -v '^ *+' conftest.er1 >conftest.err
16578 rm -f conftest.er1
16579 cat conftest.err >&5
c0d27fcc 16580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16581 (exit $ac_status); } && {
16582 test -z "$ac_c_werror_flag" ||
16583 test ! -s conftest.err
16584 } && test -s conftest$ac_exeext &&
16585 $as_test_x conftest$ac_exeext; then
98418dba 16586 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 16587else
98418dba 16588 echo "$as_me: failed program was:" >&5
19650fd6
AS
16589sed 's/^/| /' conftest.$ac_ext >&5
16590
ca81d7a0 16591 ac_cv_lib_getloadavg_getloadavg=no
98418dba 16592fi
ca81d7a0 16593
f053c89f 16594rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16595 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
16596LIBS=$ac_check_lib_save_LIBS
16597fi
ca81d7a0
JD
16598{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
16599echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
16600if test $ac_cv_lib_getloadavg_getloadavg = yes; then
16601 LIBS="-lgetloadavg $LIBS"
16602else
16603 LIBS=$ac_getloadavg_LIBS
ba4481b5 16604fi
ba4481b5
DL
16605
16606fi
98418dba
CW
16607
16608# Make sure it is really in the library, if we think we found it,
16609# otherwise set up the replacement function.
16610
16611for ac_func in getloadavg
16612do
16613as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16614{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16615echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16616if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16617 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16618else
503d2be0 16619 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16620/* confdefs.h. */
16621_ACEOF
16622cat confdefs.h >>conftest.$ac_ext
16623cat >>conftest.$ac_ext <<_ACEOF
16624/* end confdefs.h. */
edfaf76d
LK
16625/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16626 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16627#define $ac_func innocuous_$ac_func
16628
ba4481b5 16629/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16630 which can conflict with char $ac_func (); below.
16631 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16632 <limits.h> exists even on freestanding compilers. */
edfaf76d 16633
19650fd6
AS
16634#ifdef __STDC__
16635# include <limits.h>
16636#else
16637# include <assert.h>
16638#endif
edfaf76d
LK
16639
16640#undef $ac_func
16641
ca81d7a0
JD
16642/* Override any GCC internal prototype to avoid an error.
16643 Use char because int might match the return type of a GCC
16644 builtin and then its argument prototype would still apply. */
503d2be0
AS
16645#ifdef __cplusplus
16646extern "C"
16647#endif
503d2be0 16648char $ac_func ();
ba4481b5
DL
16649/* The GNU C library defines this for functions which it implements
16650 to always fail with ENOSYS. Some functions are actually named
16651 something starting with __ and the normal name is an alias. */
ca81d7a0 16652#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 16653choke me
cd958eb3
MB
16654#endif
16655
19650fd6
AS
16656int
16657main ()
16658{
ca81d7a0 16659return $ac_func ();
503d2be0
AS
16660 ;
16661 return 0;
16662}
16663_ACEOF
16664rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16665if { (ac_try="$ac_link"
16666case "(($ac_try" in
16667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16668 *) ac_try_echo=$ac_try;;
16669esac
16670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16671 (eval "$ac_link") 2>conftest.er1
503d2be0 16672 ac_status=$?
edfaf76d
LK
16673 grep -v '^ *+' conftest.er1 >conftest.err
16674 rm -f conftest.er1
16675 cat conftest.err >&5
c0d27fcc 16676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16677 (exit $ac_status); } && {
16678 test -z "$ac_c_werror_flag" ||
16679 test ! -s conftest.err
16680 } && test -s conftest$ac_exeext &&
16681 $as_test_x conftest$ac_exeext; then
503d2be0
AS
16682 eval "$as_ac_var=yes"
16683else
16684 echo "$as_me: failed program was:" >&5
19650fd6
AS
16685sed 's/^/| /' conftest.$ac_ext >&5
16686
ca81d7a0 16687 eval "$as_ac_var=no"
503d2be0 16688fi
ca81d7a0 16689
f053c89f 16690rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16691 conftest$ac_exeext conftest.$ac_ext
503d2be0 16692fi
ca81d7a0
JD
16693ac_res=`eval echo '${'$as_ac_var'}'`
16694 { echo "$as_me:$LINENO: result: $ac_res" >&5
16695echo "${ECHO_T}$ac_res" >&6; }
503d2be0 16696if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16697 cat >>confdefs.h <<_ACEOF
98418dba 16698#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16699_ACEOF
503d2be0 16700
98418dba 16701else
ca81d7a0 16702 case " $LIBOBJS " in
edfaf76d 16703 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
16704 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
16705 ;;
edfaf76d
LK
16706esac
16707
ba4481b5 16708
c0d27fcc 16709cat >>confdefs.h <<\_ACEOF
98418dba 16710#define C_GETLOADAVG 1
c0d27fcc 16711_ACEOF
ba4481b5 16712
98418dba
CW
16713# Figure out what our getloadavg.c needs.
16714ac_have_func=no
c0d27fcc 16715if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
ca81d7a0
JD
16716 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
16717echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 16718if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 16719 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16720fi
ca81d7a0
JD
16721{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
16722echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 16723else
c0d27fcc 16724 # Is the header compilable?
ca81d7a0
JD
16725{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
16726echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 16727cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16728/* confdefs.h. */
16729_ACEOF
16730cat confdefs.h >>conftest.$ac_ext
16731cat >>conftest.$ac_ext <<_ACEOF
16732/* end confdefs.h. */
c0d27fcc
MR
16733$ac_includes_default
16734#include <sys/dg_sys_info.h>
16735_ACEOF
16736rm -f conftest.$ac_objext
ca81d7a0
JD
16737if { (ac_try="$ac_compile"
16738case "(($ac_try" in
16739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16740 *) ac_try_echo=$ac_try;;
16741esac
16742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16743 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16744 ac_status=$?
edfaf76d
LK
16745 grep -v '^ *+' conftest.er1 >conftest.err
16746 rm -f conftest.er1
16747 cat conftest.err >&5
c0d27fcc 16748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16749 (exit $ac_status); } && {
16750 test -z "$ac_c_werror_flag" ||
16751 test ! -s conftest.err
16752 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16753 ac_header_compiler=yes
16754else
16755 echo "$as_me: failed program was:" >&5
19650fd6
AS
16756sed 's/^/| /' conftest.$ac_ext >&5
16757
ca81d7a0 16758 ac_header_compiler=no
c0d27fcc 16759fi
ca81d7a0
JD
16760
16761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16762{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16763echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16764
16765# Is the header present?
ca81d7a0
JD
16766{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
16767echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 16768cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16769/* confdefs.h. */
16770_ACEOF
16771cat confdefs.h >>conftest.$ac_ext
16772cat >>conftest.$ac_ext <<_ACEOF
16773/* end confdefs.h. */
98418dba
CW
16774#include <sys/dg_sys_info.h>
16775_ACEOF
ca81d7a0
JD
16776if { (ac_try="$ac_cpp conftest.$ac_ext"
16777case "(($ac_try" in
16778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16779 *) ac_try_echo=$ac_try;;
16780esac
16781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16782 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 16783 ac_status=$?
6bae0ccf 16784 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16785 rm -f conftest.er1
16786 cat conftest.err >&5
c0d27fcc 16787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16788 (exit $ac_status); } >/dev/null && {
16789 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16790 test ! -s conftest.err
16791 }; then
c0d27fcc 16792 ac_header_preproc=yes
98418dba
CW
16793else
16794 echo "$as_me: failed program was:" >&5
19650fd6
AS
16795sed 's/^/| /' conftest.$ac_ext >&5
16796
c0d27fcc 16797 ac_header_preproc=no
ba4481b5 16798fi
ca81d7a0 16799
98418dba 16800rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16801{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16802echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16803
16804# So? What about this header?
edfaf76d
LK
16805case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16806 yes:no: )
c0d27fcc
MR
16807 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
16808echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16809 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
16810echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
16811 ac_header_preproc=yes
19650fd6 16812 ;;
edfaf76d 16813 no:yes:* )
c0d27fcc
MR
16814 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
16815echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
16816 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
16817echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
16818 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
16819echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
16820 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
16821echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16822 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 16823echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16824 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
16825echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16826
19650fd6 16827 ;;
c0d27fcc 16828esac
ca81d7a0
JD
16829{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
16830echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
16831if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
16832 echo $ECHO_N "(cached) $ECHO_C" >&6
16833else
16834 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 16835fi
ca81d7a0
JD
16836{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
16837echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
16838
16839fi
98418dba
CW
16840if test $ac_cv_header_sys_dg_sys_info_h = yes; then
16841 ac_have_func=yes
ba4481b5 16842
c0d27fcc 16843cat >>confdefs.h <<\_ACEOF
98418dba 16844#define DGUX 1
c0d27fcc
MR
16845_ACEOF
16846
503d2be0 16847
ca81d7a0
JD
16848{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
16849echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 16850if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 16851 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16852else
503d2be0 16853 ac_check_lib_save_LIBS=$LIBS
98418dba 16854LIBS="-ldgc $LIBS"
503d2be0 16855cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16856/* confdefs.h. */
16857_ACEOF
16858cat confdefs.h >>conftest.$ac_ext
16859cat >>conftest.$ac_ext <<_ACEOF
16860/* end confdefs.h. */
503d2be0 16861
ca81d7a0
JD
16862/* Override any GCC internal prototype to avoid an error.
16863 Use char because int might match the return type of a GCC
16864 builtin and then its argument prototype would still apply. */
503d2be0
AS
16865#ifdef __cplusplus
16866extern "C"
16867#endif
98418dba 16868char dg_sys_info ();
503d2be0
AS
16869int
16870main ()
16871{
ca81d7a0 16872return dg_sys_info ();
503d2be0
AS
16873 ;
16874 return 0;
16875}
16876_ACEOF
16877rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16878if { (ac_try="$ac_link"
16879case "(($ac_try" in
16880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16881 *) ac_try_echo=$ac_try;;
16882esac
16883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16884 (eval "$ac_link") 2>conftest.er1
503d2be0 16885 ac_status=$?
edfaf76d
LK
16886 grep -v '^ *+' conftest.er1 >conftest.err
16887 rm -f conftest.er1
16888 cat conftest.err >&5
c0d27fcc 16889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16890 (exit $ac_status); } && {
16891 test -z "$ac_c_werror_flag" ||
16892 test ! -s conftest.err
16893 } && test -s conftest$ac_exeext &&
16894 $as_test_x conftest$ac_exeext; then
98418dba 16895 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
16896else
16897 echo "$as_me: failed program was:" >&5
19650fd6
AS
16898sed 's/^/| /' conftest.$ac_ext >&5
16899
ca81d7a0 16900 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 16901fi
ca81d7a0 16902
f053c89f 16903rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16904 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
16905LIBS=$ac_check_lib_save_LIBS
16906fi
ca81d7a0
JD
16907{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
16908echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 16909if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 16910 cat >>confdefs.h <<_ACEOF
98418dba 16911#define HAVE_LIBDGC 1
c0d27fcc 16912_ACEOF
ba4481b5 16913
98418dba 16914 LIBS="-ldgc $LIBS"
ba4481b5 16915
ba4481b5
DL
16916fi
16917
98418dba 16918fi
503d2be0 16919
c0d27fcc
MR
16920
16921
16922if test "${ac_cv_header_locale_h+set}" = set; then
ca81d7a0
JD
16923 { echo "$as_me:$LINENO: checking for locale.h" >&5
16924echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 16925if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 16926 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16927fi
ca81d7a0
JD
16928{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
16929echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 16930else
c0d27fcc 16931 # Is the header compilable?
ca81d7a0
JD
16932{ echo "$as_me:$LINENO: checking locale.h usability" >&5
16933echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 16934cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16935/* confdefs.h. */
16936_ACEOF
16937cat confdefs.h >>conftest.$ac_ext
16938cat >>conftest.$ac_ext <<_ACEOF
16939/* end confdefs.h. */
c0d27fcc
MR
16940$ac_includes_default
16941#include <locale.h>
16942_ACEOF
16943rm -f conftest.$ac_objext
ca81d7a0
JD
16944if { (ac_try="$ac_compile"
16945case "(($ac_try" in
16946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16947 *) ac_try_echo=$ac_try;;
16948esac
16949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16950 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16951 ac_status=$?
edfaf76d
LK
16952 grep -v '^ *+' conftest.er1 >conftest.err
16953 rm -f conftest.er1
16954 cat conftest.err >&5
c0d27fcc 16955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16956 (exit $ac_status); } && {
16957 test -z "$ac_c_werror_flag" ||
16958 test ! -s conftest.err
16959 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16960 ac_header_compiler=yes
16961else
16962 echo "$as_me: failed program was:" >&5
19650fd6
AS
16963sed 's/^/| /' conftest.$ac_ext >&5
16964
ca81d7a0 16965 ac_header_compiler=no
c0d27fcc 16966fi
ca81d7a0
JD
16967
16968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16969{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16970echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16971
16972# Is the header present?
ca81d7a0
JD
16973{ echo "$as_me:$LINENO: checking locale.h presence" >&5
16974echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 16975cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16976/* confdefs.h. */
16977_ACEOF
16978cat confdefs.h >>conftest.$ac_ext
16979cat >>conftest.$ac_ext <<_ACEOF
16980/* end confdefs.h. */
98418dba 16981#include <locale.h>
503d2be0 16982_ACEOF
ca81d7a0
JD
16983if { (ac_try="$ac_cpp conftest.$ac_ext"
16984case "(($ac_try" in
16985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16986 *) ac_try_echo=$ac_try;;
16987esac
16988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16989 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16990 ac_status=$?
6bae0ccf 16991 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
16992 rm -f conftest.er1
16993 cat conftest.err >&5
c0d27fcc 16994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16995 (exit $ac_status); } >/dev/null && {
16996 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16997 test ! -s conftest.err
16998 }; then
c0d27fcc 16999 ac_header_preproc=yes
98418dba
CW
17000else
17001 echo "$as_me: failed program was:" >&5
19650fd6
AS
17002sed 's/^/| /' conftest.$ac_ext >&5
17003
c0d27fcc 17004 ac_header_preproc=no
ba4481b5 17005fi
ca81d7a0 17006
98418dba 17007rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17008{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17009echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17010
17011# So? What about this header?
edfaf76d
LK
17012case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17013 yes:no: )
c0d27fcc
MR
17014 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
17015echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17016 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
17017echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
17018 ac_header_preproc=yes
19650fd6 17019 ;;
edfaf76d 17020 no:yes:* )
c0d27fcc
MR
17021 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
17022echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17023 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
17024echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
17025 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
17026echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
17027 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
17028echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17029 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 17030echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17031 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
17032echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17033
19650fd6 17034 ;;
c0d27fcc 17035esac
ca81d7a0
JD
17036{ echo "$as_me:$LINENO: checking for locale.h" >&5
17037echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
17038if test "${ac_cv_header_locale_h+set}" = set; then
17039 echo $ECHO_N "(cached) $ECHO_C" >&6
17040else
17041 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 17042fi
ca81d7a0
JD
17043{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17044echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 17045
c0d27fcc
MR
17046fi
17047
17048
17049
98418dba 17050for ac_func in setlocale
ba4481b5 17051do
503d2be0 17052as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17053{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17054echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17055if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17056 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17057else
503d2be0 17058 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17059/* confdefs.h. */
17060_ACEOF
17061cat confdefs.h >>conftest.$ac_ext
17062cat >>conftest.$ac_ext <<_ACEOF
17063/* end confdefs.h. */
edfaf76d
LK
17064/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17065 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17066#define $ac_func innocuous_$ac_func
17067
ba4481b5 17068/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17069 which can conflict with char $ac_func (); below.
17070 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17071 <limits.h> exists even on freestanding compilers. */
edfaf76d 17072
19650fd6
AS
17073#ifdef __STDC__
17074# include <limits.h>
17075#else
17076# include <assert.h>
17077#endif
edfaf76d
LK
17078
17079#undef $ac_func
17080
ca81d7a0
JD
17081/* Override any GCC internal prototype to avoid an error.
17082 Use char because int might match the return type of a GCC
17083 builtin and then its argument prototype would still apply. */
503d2be0
AS
17084#ifdef __cplusplus
17085extern "C"
17086#endif
503d2be0 17087char $ac_func ();
ba4481b5
DL
17088/* The GNU C library defines this for functions which it implements
17089 to always fail with ENOSYS. Some functions are actually named
17090 something starting with __ and the normal name is an alias. */
ca81d7a0 17091#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17092choke me
ba4481b5
DL
17093#endif
17094
19650fd6
AS
17095int
17096main ()
17097{
ca81d7a0 17098return $ac_func ();
503d2be0
AS
17099 ;
17100 return 0;
17101}
17102_ACEOF
17103rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17104if { (ac_try="$ac_link"
17105case "(($ac_try" in
17106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17107 *) ac_try_echo=$ac_try;;
17108esac
17109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17110 (eval "$ac_link") 2>conftest.er1
503d2be0 17111 ac_status=$?
edfaf76d
LK
17112 grep -v '^ *+' conftest.er1 >conftest.err
17113 rm -f conftest.er1
17114 cat conftest.err >&5
c0d27fcc 17115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17116 (exit $ac_status); } && {
17117 test -z "$ac_c_werror_flag" ||
17118 test ! -s conftest.err
17119 } && test -s conftest$ac_exeext &&
17120 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17121 eval "$as_ac_var=yes"
17122else
17123 echo "$as_me: failed program was:" >&5
19650fd6
AS
17124sed 's/^/| /' conftest.$ac_ext >&5
17125
ca81d7a0 17126 eval "$as_ac_var=no"
503d2be0 17127fi
ca81d7a0 17128
f053c89f 17129rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17130 conftest$ac_exeext conftest.$ac_ext
503d2be0 17131fi
ca81d7a0
JD
17132ac_res=`eval echo '${'$as_ac_var'}'`
17133 { echo "$as_me:$LINENO: result: $ac_res" >&5
17134echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17135if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17136 cat >>confdefs.h <<_ACEOF
503d2be0 17137#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17138_ACEOF
ba4481b5 17139
ba4481b5
DL
17140fi
17141done
17142
c0d27fcc 17143
98418dba
CW
17144# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
17145# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
17146# Irix 4.0.5F has the header but not the library.
17147if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
17148 ac_have_func=yes
17149
c0d27fcc 17150cat >>confdefs.h <<\_ACEOF
98418dba 17151#define SVR4 1
c0d27fcc 17152_ACEOF
98418dba
CW
17153
17154fi
17155
17156if test $ac_have_func = no; then
c0d27fcc 17157 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
ca81d7a0
JD
17158 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17159echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 17160if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 17161 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17162fi
ca81d7a0
JD
17163{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17164echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 17165else
c0d27fcc 17166 # Is the header compilable?
ca81d7a0
JD
17167{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
17168echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17169cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17170/* confdefs.h. */
17171_ACEOF
17172cat confdefs.h >>conftest.$ac_ext
17173cat >>conftest.$ac_ext <<_ACEOF
17174/* end confdefs.h. */
c0d27fcc
MR
17175$ac_includes_default
17176#include <inq_stats/cpustats.h>
17177_ACEOF
17178rm -f conftest.$ac_objext
ca81d7a0
JD
17179if { (ac_try="$ac_compile"
17180case "(($ac_try" in
17181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17182 *) ac_try_echo=$ac_try;;
17183esac
17184eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17185 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17186 ac_status=$?
edfaf76d
LK
17187 grep -v '^ *+' conftest.er1 >conftest.err
17188 rm -f conftest.er1
17189 cat conftest.err >&5
c0d27fcc 17190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17191 (exit $ac_status); } && {
17192 test -z "$ac_c_werror_flag" ||
17193 test ! -s conftest.err
17194 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17195 ac_header_compiler=yes
17196else
17197 echo "$as_me: failed program was:" >&5
19650fd6
AS
17198sed 's/^/| /' conftest.$ac_ext >&5
17199
ca81d7a0 17200 ac_header_compiler=no
c0d27fcc 17201fi
ca81d7a0
JD
17202
17203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17204{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17205echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17206
17207# Is the header present?
ca81d7a0
JD
17208{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
17209echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 17210cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17211/* confdefs.h. */
17212_ACEOF
17213cat confdefs.h >>conftest.$ac_ext
17214cat >>conftest.$ac_ext <<_ACEOF
17215/* end confdefs.h. */
98418dba 17216#include <inq_stats/cpustats.h>
503d2be0 17217_ACEOF
ca81d7a0
JD
17218if { (ac_try="$ac_cpp conftest.$ac_ext"
17219case "(($ac_try" in
17220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17221 *) ac_try_echo=$ac_try;;
17222esac
17223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17224 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17225 ac_status=$?
6bae0ccf 17226 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17227 rm -f conftest.er1
17228 cat conftest.err >&5
c0d27fcc 17229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17230 (exit $ac_status); } >/dev/null && {
17231 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17232 test ! -s conftest.err
17233 }; then
c0d27fcc 17234 ac_header_preproc=yes
503d2be0
AS
17235else
17236 echo "$as_me: failed program was:" >&5
19650fd6
AS
17237sed 's/^/| /' conftest.$ac_ext >&5
17238
c0d27fcc 17239 ac_header_preproc=no
ba4481b5 17240fi
ca81d7a0 17241
503d2be0 17242rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17243{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17244echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17245
17246# So? What about this header?
edfaf76d
LK
17247case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17248 yes:no: )
c0d27fcc
MR
17249 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
17250echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17251 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
17252echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
17253 ac_header_preproc=yes
19650fd6 17254 ;;
edfaf76d 17255 no:yes:* )
c0d27fcc
MR
17256 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
17257echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17258 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
17259echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
17260 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
17261echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
17262 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
17263echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17264 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 17265echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17266 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
17267echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17268
19650fd6 17269 ;;
c0d27fcc 17270esac
ca81d7a0
JD
17271{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17272echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
17273if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
17274 echo $ECHO_N "(cached) $ECHO_C" >&6
17275else
17276 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 17277fi
ca81d7a0
JD
17278{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17279echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
17280
17281fi
98418dba
CW
17282if test $ac_cv_header_inq_stats_cpustats_h = yes; then
17283 ac_have_func=yes
ba4481b5 17284
c0d27fcc 17285cat >>confdefs.h <<\_ACEOF
98418dba 17286#define UMAX 1
c0d27fcc 17287_ACEOF
98418dba 17288
c0d27fcc
MR
17289
17290cat >>confdefs.h <<\_ACEOF
98418dba 17291#define UMAX4_3 1
c0d27fcc 17292_ACEOF
98418dba
CW
17293
17294fi
17295
c0d27fcc 17296
98418dba
CW
17297fi
17298
17299if test $ac_have_func = no; then
c0d27fcc 17300 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
ca81d7a0
JD
17301 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
17302echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 17303if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 17304 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17305fi
ca81d7a0
JD
17306{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
17307echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 17308else
c0d27fcc 17309 # Is the header compilable?
ca81d7a0
JD
17310{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
17311echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17312cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17313/* confdefs.h. */
17314_ACEOF
17315cat confdefs.h >>conftest.$ac_ext
17316cat >>conftest.$ac_ext <<_ACEOF
17317/* end confdefs.h. */
c0d27fcc
MR
17318$ac_includes_default
17319#include <sys/cpustats.h>
17320_ACEOF
17321rm -f conftest.$ac_objext
ca81d7a0
JD
17322if { (ac_try="$ac_compile"
17323case "(($ac_try" in
17324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17325 *) ac_try_echo=$ac_try;;
17326esac
17327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17328 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17329 ac_status=$?
edfaf76d
LK
17330 grep -v '^ *+' conftest.er1 >conftest.err
17331 rm -f conftest.er1
17332 cat conftest.err >&5
c0d27fcc 17333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17334 (exit $ac_status); } && {
17335 test -z "$ac_c_werror_flag" ||
17336 test ! -s conftest.err
17337 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17338 ac_header_compiler=yes
17339else
17340 echo "$as_me: failed program was:" >&5
19650fd6
AS
17341sed 's/^/| /' conftest.$ac_ext >&5
17342
ca81d7a0 17343 ac_header_compiler=no
c0d27fcc 17344fi
ca81d7a0
JD
17345
17346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17347{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17348echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17349
17350# Is the header present?
ca81d7a0
JD
17351{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
17352echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 17353cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17354/* confdefs.h. */
17355_ACEOF
17356cat confdefs.h >>conftest.$ac_ext
17357cat >>conftest.$ac_ext <<_ACEOF
17358/* end confdefs.h. */
98418dba
CW
17359#include <sys/cpustats.h>
17360_ACEOF
ca81d7a0
JD
17361if { (ac_try="$ac_cpp conftest.$ac_ext"
17362case "(($ac_try" in
17363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17364 *) ac_try_echo=$ac_try;;
17365esac
17366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17367 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17368 ac_status=$?
6bae0ccf 17369 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17370 rm -f conftest.er1
17371 cat conftest.err >&5
c0d27fcc 17372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17373 (exit $ac_status); } >/dev/null && {
17374 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17375 test ! -s conftest.err
17376 }; then
c0d27fcc 17377 ac_header_preproc=yes
98418dba
CW
17378else
17379 echo "$as_me: failed program was:" >&5
19650fd6
AS
17380sed 's/^/| /' conftest.$ac_ext >&5
17381
c0d27fcc 17382 ac_header_preproc=no
98418dba 17383fi
ca81d7a0 17384
98418dba 17385rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17386{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17387echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17388
17389# So? What about this header?
edfaf76d
LK
17390case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17391 yes:no: )
c0d27fcc
MR
17392 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
17393echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17394 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
17395echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
17396 ac_header_preproc=yes
19650fd6 17397 ;;
edfaf76d 17398 no:yes:* )
c0d27fcc
MR
17399 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
17400echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17401 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
17402echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
17403 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
17404echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
17405 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
17406echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17407 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 17408echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17409 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
17410echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17411
19650fd6 17412 ;;
c0d27fcc 17413esac
ca81d7a0
JD
17414{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
17415echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
17416if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
17417 echo $ECHO_N "(cached) $ECHO_C" >&6
17418else
17419 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 17420fi
ca81d7a0
JD
17421{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
17422echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
17423
17424fi
98418dba 17425if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 17426 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 17427#define UMAX 1
c0d27fcc 17428_ACEOF
ba4481b5 17429
98418dba
CW
17430fi
17431
c0d27fcc 17432
98418dba
CW
17433fi
17434
17435if test $ac_have_func = no; then
17436
17437for ac_header in mach/mach.h
2c9dccc9
PJ
17438do
17439as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
17440if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17441 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17442echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17443if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 17444 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17445fi
ca81d7a0
JD
17446ac_res=`eval echo '${'$as_ac_Header'}'`
17447 { echo "$as_me:$LINENO: result: $ac_res" >&5
17448echo "${ECHO_T}$ac_res" >&6; }
98418dba 17449else
c0d27fcc 17450 # Is the header compilable?
ca81d7a0
JD
17451{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17452echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 17453cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17454/* confdefs.h. */
17455_ACEOF
17456cat confdefs.h >>conftest.$ac_ext
17457cat >>conftest.$ac_ext <<_ACEOF
17458/* end confdefs.h. */
c0d27fcc
MR
17459$ac_includes_default
17460#include <$ac_header>
17461_ACEOF
17462rm -f conftest.$ac_objext
ca81d7a0
JD
17463if { (ac_try="$ac_compile"
17464case "(($ac_try" in
17465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17466 *) ac_try_echo=$ac_try;;
17467esac
17468eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17469 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17470 ac_status=$?
edfaf76d
LK
17471 grep -v '^ *+' conftest.er1 >conftest.err
17472 rm -f conftest.er1
17473 cat conftest.err >&5
c0d27fcc 17474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17475 (exit $ac_status); } && {
17476 test -z "$ac_c_werror_flag" ||
17477 test ! -s conftest.err
17478 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17479 ac_header_compiler=yes
17480else
17481 echo "$as_me: failed program was:" >&5
19650fd6
AS
17482sed 's/^/| /' conftest.$ac_ext >&5
17483
ca81d7a0 17484 ac_header_compiler=no
c0d27fcc 17485fi
ca81d7a0
JD
17486
17487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17488{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17489echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17490
17491# Is the header present?
ca81d7a0
JD
17492{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
17493echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 17494cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17495/* confdefs.h. */
17496_ACEOF
17497cat confdefs.h >>conftest.$ac_ext
17498cat >>conftest.$ac_ext <<_ACEOF
17499/* end confdefs.h. */
2c9dccc9
PJ
17500#include <$ac_header>
17501_ACEOF
ca81d7a0
JD
17502if { (ac_try="$ac_cpp conftest.$ac_ext"
17503case "(($ac_try" in
17504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17505 *) ac_try_echo=$ac_try;;
17506esac
17507eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17508 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 17509 ac_status=$?
6bae0ccf 17510 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
17511 rm -f conftest.er1
17512 cat conftest.err >&5
c0d27fcc 17513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17514 (exit $ac_status); } >/dev/null && {
17515 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17516 test ! -s conftest.err
17517 }; then
c0d27fcc
MR
17518 ac_header_preproc=yes
17519else
17520 echo "$as_me: failed program was:" >&5
19650fd6
AS
17521sed 's/^/| /' conftest.$ac_ext >&5
17522
c0d27fcc
MR
17523 ac_header_preproc=no
17524fi
ca81d7a0 17525
c0d27fcc 17526rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17527{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17528echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17529
17530# So? What about this header?
edfaf76d
LK
17531case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17532 yes:no: )
c0d27fcc
MR
17533 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17534echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17535 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17536echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17537 ac_header_preproc=yes
19650fd6 17538 ;;
edfaf76d 17539 no:yes:* )
c0d27fcc
MR
17540 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17541echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
17542 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17543echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17544 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17545echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17546 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17547echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17548 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 17549echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17550 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17551echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17552
19650fd6 17553 ;;
c0d27fcc 17554esac
ca81d7a0
JD
17555{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17556echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17557if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17558 echo $ECHO_N "(cached) $ECHO_C" >&6
17559else
edfaf76d 17560 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 17561fi
ca81d7a0
JD
17562ac_res=`eval echo '${'$as_ac_Header'}'`
17563 { echo "$as_me:$LINENO: result: $ac_res" >&5
17564echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17565
17566fi
17567if test `eval echo '${'$as_ac_Header'}'` = yes; then
17568 cat >>confdefs.h <<_ACEOF
17569#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17570_ACEOF
17571
17572fi
17573
17574done
17575
17576fi
17577
17578
17579for ac_header in nlist.h
17580do
17581as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
17582if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
17583 { echo "$as_me:$LINENO: checking for $ac_header" >&5
17584echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17585if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17586 echo $ECHO_N "(cached) $ECHO_C" >&6
17587fi
ca81d7a0
JD
17588ac_res=`eval echo '${'$as_ac_Header'}'`
17589 { echo "$as_me:$LINENO: result: $ac_res" >&5
17590echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17591else
17592 # Is the header compilable?
ca81d7a0
JD
17593{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
17594echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 17595cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17596/* confdefs.h. */
17597_ACEOF
17598cat confdefs.h >>conftest.$ac_ext
17599cat >>conftest.$ac_ext <<_ACEOF
17600/* end confdefs.h. */
c0d27fcc
MR
17601$ac_includes_default
17602#include <$ac_header>
17603_ACEOF
17604rm -f conftest.$ac_objext
ca81d7a0
JD
17605if { (ac_try="$ac_compile"
17606case "(($ac_try" in
17607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17608 *) ac_try_echo=$ac_try;;
17609esac
17610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17611 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17612 ac_status=$?
edfaf76d
LK
17613 grep -v '^ *+' conftest.er1 >conftest.err
17614 rm -f conftest.er1
17615 cat conftest.err >&5
c0d27fcc 17616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17617 (exit $ac_status); } && {
17618 test -z "$ac_c_werror_flag" ||
17619 test ! -s conftest.err
17620 } && test -s conftest.$ac_objext; then
c0d27fcc 17621 ac_header_compiler=yes
2c9dccc9
PJ
17622else
17623 echo "$as_me: failed program was:" >&5
19650fd6
AS
17624sed 's/^/| /' conftest.$ac_ext >&5
17625
ca81d7a0 17626 ac_header_compiler=no
98418dba 17627fi
ca81d7a0
JD
17628
17629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17630{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17631echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 17632
c0d27fcc 17633# Is the header present?
ca81d7a0
JD
17634{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
17635echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 17636cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17637/* confdefs.h. */
17638_ACEOF
17639cat confdefs.h >>conftest.$ac_ext
17640cat >>conftest.$ac_ext <<_ACEOF
17641/* end confdefs.h. */
503d2be0
AS
17642#include <$ac_header>
17643_ACEOF
ca81d7a0
JD
17644if { (ac_try="$ac_cpp conftest.$ac_ext"
17645case "(($ac_try" in
17646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17647 *) ac_try_echo=$ac_try;;
17648esac
17649eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17650 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17651 ac_status=$?
6bae0ccf 17652 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17653 rm -f conftest.er1
17654 cat conftest.err >&5
c0d27fcc 17655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17656 (exit $ac_status); } >/dev/null && {
17657 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17658 test ! -s conftest.err
17659 }; then
c0d27fcc 17660 ac_header_preproc=yes
503d2be0
AS
17661else
17662 echo "$as_me: failed program was:" >&5
19650fd6
AS
17663sed 's/^/| /' conftest.$ac_ext >&5
17664
c0d27fcc 17665 ac_header_preproc=no
b5de8dc0 17666fi
ca81d7a0 17667
503d2be0 17668rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17669{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17670echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17671
17672# So? What about this header?
edfaf76d
LK
17673case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17674 yes:no: )
c0d27fcc
MR
17675 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
17676echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17677 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
17678echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
17679 ac_header_preproc=yes
19650fd6 17680 ;;
edfaf76d 17681 no:yes:* )
c0d27fcc
MR
17682 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
17683echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
17684 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
17685echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
17686 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
17687echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
17688 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
17689echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17690 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 17691echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17692 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
17693echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17694
19650fd6 17695 ;;
c0d27fcc 17696esac
ca81d7a0
JD
17697{ echo "$as_me:$LINENO: checking for $ac_header" >&5
17698echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
17699if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
17700 echo $ECHO_N "(cached) $ECHO_C" >&6
17701else
edfaf76d 17702 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 17703fi
ca81d7a0
JD
17704ac_res=`eval echo '${'$as_ac_Header'}'`
17705 { echo "$as_me:$LINENO: result: $ac_res" >&5
17706echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
17707
17708fi
98418dba 17709if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 17710 cat >>confdefs.h <<_ACEOF
98418dba 17711#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 17712_ACEOF
ca81d7a0
JD
17713 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
17714echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 17715if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 17716 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 17717else
503d2be0 17718 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17719/* confdefs.h. */
17720_ACEOF
17721cat confdefs.h >>conftest.$ac_ext
17722cat >>conftest.$ac_ext <<_ACEOF
17723/* end confdefs.h. */
98418dba 17724#include <nlist.h>
b5de8dc0 17725
503d2be0
AS
17726int
17727main ()
17728{
98418dba
CW
17729static struct nlist ac_aggr;
17730if (ac_aggr.n_un.n_name)
17731return 0;
503d2be0
AS
17732 ;
17733 return 0;
17734}
17735_ACEOF
98418dba 17736rm -f conftest.$ac_objext
ca81d7a0
JD
17737if { (ac_try="$ac_compile"
17738case "(($ac_try" in
17739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17740 *) ac_try_echo=$ac_try;;
17741esac
17742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17743 (eval "$ac_compile") 2>conftest.er1
503d2be0 17744 ac_status=$?
edfaf76d
LK
17745 grep -v '^ *+' conftest.er1 >conftest.err
17746 rm -f conftest.er1
17747 cat conftest.err >&5
c0d27fcc 17748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17749 (exit $ac_status); } && {
17750 test -z "$ac_c_werror_flag" ||
17751 test ! -s conftest.err
17752 } && test -s conftest.$ac_objext; then
edfaf76d 17753 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
17754else
17755 echo "$as_me: failed program was:" >&5
19650fd6
AS
17756sed 's/^/| /' conftest.$ac_ext >&5
17757
ca81d7a0 17758 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17759/* confdefs.h. */
17760_ACEOF
17761cat confdefs.h >>conftest.$ac_ext
17762cat >>conftest.$ac_ext <<_ACEOF
17763/* end confdefs.h. */
6bae0ccf
DL
17764#include <nlist.h>
17765
17766int
17767main ()
17768{
17769static struct nlist ac_aggr;
17770if (sizeof ac_aggr.n_un.n_name)
17771return 0;
17772 ;
17773 return 0;
17774}
17775_ACEOF
17776rm -f conftest.$ac_objext
ca81d7a0
JD
17777if { (ac_try="$ac_compile"
17778case "(($ac_try" in
17779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17780 *) ac_try_echo=$ac_try;;
17781esac
17782eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17783 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 17784 ac_status=$?
edfaf76d
LK
17785 grep -v '^ *+' conftest.er1 >conftest.err
17786 rm -f conftest.er1
17787 cat conftest.err >&5
6bae0ccf 17788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17789 (exit $ac_status); } && {
17790 test -z "$ac_c_werror_flag" ||
17791 test ! -s conftest.err
17792 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
17793 ac_cv_member_struct_nlist_n_un_n_name=yes
17794else
17795 echo "$as_me: failed program was:" >&5
19650fd6
AS
17796sed 's/^/| /' conftest.$ac_ext >&5
17797
ca81d7a0 17798 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 17799fi
ca81d7a0
JD
17800
17801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 17802fi
ca81d7a0
JD
17803
17804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 17805fi
ca81d7a0
JD
17806{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
17807echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 17808if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 17809
c0d27fcc 17810cat >>confdefs.h <<_ACEOF
98418dba 17811#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 17812_ACEOF
b5de8dc0 17813
c0d27fcc
MR
17814
17815cat >>confdefs.h <<\_ACEOF
98418dba 17816#define NLIST_NAME_UNION 1
c0d27fcc 17817_ACEOF
b5de8dc0 17818
98418dba 17819fi
b5de8dc0 17820
c0d27fcc 17821
98418dba 17822fi
c0d27fcc 17823
98418dba 17824done
b5de8dc0 17825
98418dba
CW
17826fi
17827done
b5de8dc0 17828
c0d27fcc 17829
98418dba 17830# Some definitions of getloadavg require that the program be installed setgid.
ca81d7a0
JD
17831{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
17832echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
17833if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
17834 echo $ECHO_N "(cached) $ECHO_C" >&6
17835else
17836 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17837/* confdefs.h. */
17838_ACEOF
17839cat confdefs.h >>conftest.$ac_ext
17840cat >>conftest.$ac_ext <<_ACEOF
17841/* end confdefs.h. */
6bae0ccf 17842#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
17843#ifdef LDAV_PRIVILEGED
17844Yowza Am I SETGID yet
17845#endif
17846_ACEOF
17847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 17848 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
17849 ac_cv_func_getloadavg_setgid=yes
17850else
17851 ac_cv_func_getloadavg_setgid=no
17852fi
17853rm -f conftest*
b5de8dc0 17854
98418dba 17855fi
ca81d7a0
JD
17856{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
17857echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
17858if test $ac_cv_func_getloadavg_setgid = yes; then
17859 NEED_SETGID=true
b5de8dc0 17860
c0d27fcc 17861cat >>confdefs.h <<\_ACEOF
98418dba 17862#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 17863_ACEOF
98418dba 17864
b5de8dc0 17865else
98418dba 17866 NEED_SETGID=false
b5de8dc0 17867fi
98418dba
CW
17868
17869if test $ac_cv_func_getloadavg_setgid = yes; then
ca81d7a0
JD
17870 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
17871echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
17872if test "${ac_cv_group_kmem+set}" = set; then
17873 echo $ECHO_N "(cached) $ECHO_C" >&6
17874else
17875 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
17876 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
17877 # If we got an error (system does not support symlinks), try without -L.
17878 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
17879 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 17880 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
17881 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
17882 / /s/.* //;p;'`
17883
b5de8dc0 17884fi
ca81d7a0
JD
17885{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
17886echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 17887 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 17888fi
98418dba
CW
17889if test "x$ac_save_LIBS" = x; then
17890 GETLOADAVG_LIBS=$LIBS
17891else
17892 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 17893fi
98418dba 17894LIBS=$ac_save_LIBS
b5de8dc0 17895
c0d27fcc
MR
17896
17897
ca81d7a0
JD
17898{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
17899echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 17900if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 17901 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 17902else
b936fae4 17903 while :; do
503d2be0 17904 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17905/* confdefs.h. */
17906_ACEOF
17907cat confdefs.h >>conftest.$ac_ext
17908cat >>conftest.$ac_ext <<_ACEOF
17909/* end confdefs.h. */
b936fae4 17910#include <stdio.h>
503d2be0
AS
17911int
17912main ()
17913{
f053c89f 17914return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
17915 ;
17916 return 0;
17917}
17918_ACEOF
f053c89f
CY
17919rm -f conftest.$ac_objext conftest$ac_exeext
17920if { (ac_try="$ac_link"
ca81d7a0
JD
17921case "(($ac_try" in
17922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17923 *) ac_try_echo=$ac_try;;
17924esac
17925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 17926 (eval "$ac_link") 2>conftest.er1
b936fae4 17927 ac_status=$?
edfaf76d
LK
17928 grep -v '^ *+' conftest.er1 >conftest.err
17929 rm -f conftest.er1
17930 cat conftest.err >&5
c0d27fcc 17931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17932 (exit $ac_status); } && {
17933 test -z "$ac_c_werror_flag" ||
17934 test ! -s conftest.err
17935 } && test -s conftest$ac_exeext &&
17936 $as_test_x conftest$ac_exeext; then
17937 ac_cv_sys_largefile_source=no; break
b936fae4
AS
17938else
17939 echo "$as_me: failed program was:" >&5
19650fd6
AS
17940sed 's/^/| /' conftest.$ac_ext >&5
17941
ca81d7a0 17942
b936fae4 17943fi
ca81d7a0 17944
f053c89f
CY
17945rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17946 conftest$ac_exeext conftest.$ac_ext
b936fae4 17947 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17948/* confdefs.h. */
17949_ACEOF
17950cat confdefs.h >>conftest.$ac_ext
17951cat >>conftest.$ac_ext <<_ACEOF
17952/* end confdefs.h. */
b936fae4
AS
17953#define _LARGEFILE_SOURCE 1
17954#include <stdio.h>
b936fae4
AS
17955int
17956main ()
17957{
f053c89f 17958return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
17959 ;
17960 return 0;
17961}
17962_ACEOF
f053c89f
CY
17963rm -f conftest.$ac_objext conftest$ac_exeext
17964if { (ac_try="$ac_link"
ca81d7a0
JD
17965case "(($ac_try" in
17966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17967 *) ac_try_echo=$ac_try;;
17968esac
17969eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 17970 (eval "$ac_link") 2>conftest.er1
b936fae4 17971 ac_status=$?
edfaf76d
LK
17972 grep -v '^ *+' conftest.er1 >conftest.err
17973 rm -f conftest.er1
17974 cat conftest.err >&5
c0d27fcc 17975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17976 (exit $ac_status); } && {
17977 test -z "$ac_c_werror_flag" ||
17978 test ! -s conftest.err
17979 } && test -s conftest$ac_exeext &&
17980 $as_test_x conftest$ac_exeext; then
b936fae4
AS
17981 ac_cv_sys_largefile_source=1; break
17982else
17983 echo "$as_me: failed program was:" >&5
19650fd6
AS
17984sed 's/^/| /' conftest.$ac_ext >&5
17985
ca81d7a0 17986
b936fae4 17987fi
ca81d7a0 17988
f053c89f
CY
17989rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17990 conftest$ac_exeext conftest.$ac_ext
17991 ac_cv_sys_largefile_source=unknown
b936fae4
AS
17992 break
17993done
17994fi
ca81d7a0
JD
17995{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
17996echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
17997case $ac_cv_sys_largefile_source in #(
17998 no | unknown) ;;
17999 *)
c0d27fcc 18000cat >>confdefs.h <<_ACEOF
b936fae4 18001#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 18002_ACEOF
f053c89f
CY
18003;;
18004esac
b936fae4 18005rm -f conftest*
4c343001 18006
b936fae4
AS
18007# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18008# in glibc 2.1.3, but that breaks too many other things.
18009# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
f053c89f 18010if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 18011
c0d27fcc 18012cat >>confdefs.h <<\_ACEOF
b936fae4 18013#define HAVE_FSEEKO 1
c0d27fcc 18014_ACEOF
b936fae4 18015
4c343001
DL
18016fi
18017
c0d27fcc 18018
52dbaac8
PE
18019# Configure getopt.
18020# getopt.m4 serial 10
18021
18022# The getopt module assume you want GNU getopt, with getopt_long etc,
18023# rather than vanilla POSIX getopt. This means your your code should
18024# always include <getopt.h> for the getopt prototypes.
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036# Prerequisites of lib/getopt*.
18037
18038
18039
10a3b1a1 18040
52dbaac8
PE
18041 GETOPT_H=
18042
18043for ac_header in getopt.h
18044do
18045as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18046if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18047 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18048echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18049if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18050 echo $ECHO_N "(cached) $ECHO_C" >&6
18051fi
ca81d7a0
JD
18052ac_res=`eval echo '${'$as_ac_Header'}'`
18053 { echo "$as_me:$LINENO: result: $ac_res" >&5
18054echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18055else
18056 # Is the header compilable?
ca81d7a0
JD
18057{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18058echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
18059cat >conftest.$ac_ext <<_ACEOF
18060/* confdefs.h. */
18061_ACEOF
18062cat confdefs.h >>conftest.$ac_ext
18063cat >>conftest.$ac_ext <<_ACEOF
18064/* end confdefs.h. */
18065$ac_includes_default
18066#include <$ac_header>
18067_ACEOF
18068rm -f conftest.$ac_objext
ca81d7a0
JD
18069if { (ac_try="$ac_compile"
18070case "(($ac_try" in
18071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18072 *) ac_try_echo=$ac_try;;
18073esac
18074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18075 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18076 ac_status=$?
18077 grep -v '^ *+' conftest.er1 >conftest.err
18078 rm -f conftest.er1
18079 cat conftest.err >&5
18080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18081 (exit $ac_status); } && {
18082 test -z "$ac_c_werror_flag" ||
18083 test ! -s conftest.err
18084 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18085 ac_header_compiler=yes
18086else
18087 echo "$as_me: failed program was:" >&5
18088sed 's/^/| /' conftest.$ac_ext >&5
18089
ca81d7a0 18090 ac_header_compiler=no
52dbaac8 18091fi
ca81d7a0
JD
18092
18093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18094{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18095echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
18096
18097# Is the header present?
ca81d7a0
JD
18098{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18099echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
18100cat >conftest.$ac_ext <<_ACEOF
18101/* confdefs.h. */
18102_ACEOF
18103cat confdefs.h >>conftest.$ac_ext
18104cat >>conftest.$ac_ext <<_ACEOF
18105/* end confdefs.h. */
18106#include <$ac_header>
18107_ACEOF
ca81d7a0
JD
18108if { (ac_try="$ac_cpp conftest.$ac_ext"
18109case "(($ac_try" in
18110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18111 *) ac_try_echo=$ac_try;;
18112esac
18113eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18114 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
18115 ac_status=$?
18116 grep -v '^ *+' conftest.er1 >conftest.err
18117 rm -f conftest.er1
18118 cat conftest.err >&5
18119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18120 (exit $ac_status); } >/dev/null && {
18121 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18122 test ! -s conftest.err
18123 }; then
52dbaac8
PE
18124 ac_header_preproc=yes
18125else
18126 echo "$as_me: failed program was:" >&5
18127sed 's/^/| /' conftest.$ac_ext >&5
18128
18129 ac_header_preproc=no
18130fi
ca81d7a0 18131
52dbaac8 18132rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18133{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18134echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
18135
18136# So? What about this header?
18137case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18138 yes:no: )
18139 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18140echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18141 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18142echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18143 ac_header_preproc=yes
18144 ;;
18145 no:yes:* )
18146 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18147echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18148 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18149echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18150 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18151echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18152 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18153echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
18154 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18155echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18156 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18157echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18158
52dbaac8
PE
18159 ;;
18160esac
ca81d7a0
JD
18161{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18162echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18163if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18164 echo $ECHO_N "(cached) $ECHO_C" >&6
18165else
18166 eval "$as_ac_Header=\$ac_header_preproc"
18167fi
ca81d7a0
JD
18168ac_res=`eval echo '${'$as_ac_Header'}'`
18169 { echo "$as_me:$LINENO: result: $ac_res" >&5
18170echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18171
18172fi
18173if test `eval echo '${'$as_ac_Header'}'` = yes; then
18174 cat >>confdefs.h <<_ACEOF
18175#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18176_ACEOF
18177
18178else
18179 GETOPT_H=getopt.h
18180fi
18181
18182done
18183
18184 if test -z "$GETOPT_H"; then
18185
18186for ac_func in getopt_long_only
18187do
18188as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18189{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18190echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18191if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18192 echo $ECHO_N "(cached) $ECHO_C" >&6
18193else
18194 cat >conftest.$ac_ext <<_ACEOF
18195/* confdefs.h. */
18196_ACEOF
18197cat confdefs.h >>conftest.$ac_ext
18198cat >>conftest.$ac_ext <<_ACEOF
18199/* end confdefs.h. */
18200/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18201 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18202#define $ac_func innocuous_$ac_func
18203
18204/* System header to define __stub macros and hopefully few prototypes,
18205 which can conflict with char $ac_func (); below.
18206 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18207 <limits.h> exists even on freestanding compilers. */
18208
18209#ifdef __STDC__
18210# include <limits.h>
18211#else
18212# include <assert.h>
18213#endif
18214
18215#undef $ac_func
18216
ca81d7a0
JD
18217/* Override any GCC internal prototype to avoid an error.
18218 Use char because int might match the return type of a GCC
18219 builtin and then its argument prototype would still apply. */
52dbaac8
PE
18220#ifdef __cplusplus
18221extern "C"
52dbaac8 18222#endif
52dbaac8
PE
18223char $ac_func ();
18224/* The GNU C library defines this for functions which it implements
18225 to always fail with ENOSYS. Some functions are actually named
18226 something starting with __ and the normal name is an alias. */
ca81d7a0 18227#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 18228choke me
52dbaac8
PE
18229#endif
18230
18231int
18232main ()
18233{
ca81d7a0 18234return $ac_func ();
52dbaac8
PE
18235 ;
18236 return 0;
18237}
18238_ACEOF
18239rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18240if { (ac_try="$ac_link"
18241case "(($ac_try" in
18242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18243 *) ac_try_echo=$ac_try;;
18244esac
18245eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18246 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
18247 ac_status=$?
18248 grep -v '^ *+' conftest.er1 >conftest.err
18249 rm -f conftest.er1
18250 cat conftest.err >&5
18251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18252 (exit $ac_status); } && {
18253 test -z "$ac_c_werror_flag" ||
18254 test ! -s conftest.err
18255 } && test -s conftest$ac_exeext &&
18256 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
18257 eval "$as_ac_var=yes"
18258else
18259 echo "$as_me: failed program was:" >&5
18260sed 's/^/| /' conftest.$ac_ext >&5
18261
ca81d7a0 18262 eval "$as_ac_var=no"
52dbaac8 18263fi
ca81d7a0 18264
f053c89f 18265rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
18266 conftest$ac_exeext conftest.$ac_ext
18267fi
ca81d7a0
JD
18268ac_res=`eval echo '${'$as_ac_var'}'`
18269 { echo "$as_me:$LINENO: result: $ac_res" >&5
18270echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18271if test `eval echo '${'$as_ac_var'}'` = yes; then
18272 cat >>confdefs.h <<_ACEOF
18273#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18274_ACEOF
18275
18276else
18277 GETOPT_H=getopt.h
18278fi
18279done
18280
18281 fi
18282
18283 if test -z "$GETOPT_H"; then
ca81d7a0
JD
18284 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
18285echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
18286if test "${ac_cv_have_decl_optreset+set}" = set; then
18287 echo $ECHO_N "(cached) $ECHO_C" >&6
18288else
18289 cat >conftest.$ac_ext <<_ACEOF
18290/* confdefs.h. */
18291_ACEOF
18292cat confdefs.h >>conftest.$ac_ext
18293cat >>conftest.$ac_ext <<_ACEOF
18294/* end confdefs.h. */
18295#include <getopt.h>
18296
18297int
18298main ()
18299{
18300#ifndef optreset
f053c89f 18301 (void) optreset;
52dbaac8
PE
18302#endif
18303
18304 ;
18305 return 0;
18306}
18307_ACEOF
18308rm -f conftest.$ac_objext
ca81d7a0
JD
18309if { (ac_try="$ac_compile"
18310case "(($ac_try" in
18311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18312 *) ac_try_echo=$ac_try;;
18313esac
18314eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18315 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18316 ac_status=$?
18317 grep -v '^ *+' conftest.er1 >conftest.err
18318 rm -f conftest.er1
18319 cat conftest.err >&5
18320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18321 (exit $ac_status); } && {
18322 test -z "$ac_c_werror_flag" ||
18323 test ! -s conftest.err
18324 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18325 ac_cv_have_decl_optreset=yes
18326else
18327 echo "$as_me: failed program was:" >&5
18328sed 's/^/| /' conftest.$ac_ext >&5
18329
ca81d7a0 18330 ac_cv_have_decl_optreset=no
52dbaac8 18331fi
ca81d7a0
JD
18332
18333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 18334fi
ca81d7a0
JD
18335{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
18336echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
18337if test $ac_cv_have_decl_optreset = yes; then
18338 GETOPT_H=getopt.h
18339fi
18340
18341 fi
18342
18343 if test -z "$GETOPT_H"; then
ca81d7a0
JD
18344 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
18345echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
18346if test "${gl_cv_func_gnu_getopt+set}" = set; then
18347 echo $ECHO_N "(cached) $ECHO_C" >&6
18348else
18349 if test "$cross_compiling" = yes; then
ca81d7a0
JD
18350 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
18351echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
18352if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
18353 echo $ECHO_N "(cached) $ECHO_C" >&6
18354else
18355 cat >conftest.$ac_ext <<_ACEOF
18356/* confdefs.h. */
18357_ACEOF
18358cat confdefs.h >>conftest.$ac_ext
18359cat >>conftest.$ac_ext <<_ACEOF
18360/* end confdefs.h. */
18361#include <getopt.h>
18362
18363int
18364main ()
18365{
18366#ifndef getopt_clip
f053c89f 18367 (void) getopt_clip;
52dbaac8
PE
18368#endif
18369
18370 ;
18371 return 0;
18372}
18373_ACEOF
18374rm -f conftest.$ac_objext
ca81d7a0
JD
18375if { (ac_try="$ac_compile"
18376case "(($ac_try" in
18377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18378 *) ac_try_echo=$ac_try;;
18379esac
18380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18381 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18382 ac_status=$?
18383 grep -v '^ *+' conftest.er1 >conftest.err
18384 rm -f conftest.er1
18385 cat conftest.err >&5
18386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18387 (exit $ac_status); } && {
18388 test -z "$ac_c_werror_flag" ||
18389 test ! -s conftest.err
18390 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18391 ac_cv_have_decl_getopt_clip=yes
18392else
18393 echo "$as_me: failed program was:" >&5
18394sed 's/^/| /' conftest.$ac_ext >&5
18395
ca81d7a0 18396 ac_cv_have_decl_getopt_clip=no
52dbaac8 18397fi
ca81d7a0
JD
18398
18399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 18400fi
ca81d7a0
JD
18401{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
18402echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
18403if test $ac_cv_have_decl_getopt_clip = yes; then
18404 gl_cv_func_gnu_getopt=no
18405else
18406 gl_cv_func_gnu_getopt=yes
18407fi
18408
18409else
18410 cat >conftest.$ac_ext <<_ACEOF
18411/* confdefs.h. */
18412_ACEOF
18413cat confdefs.h >>conftest.$ac_ext
18414cat >>conftest.$ac_ext <<_ACEOF
18415/* end confdefs.h. */
18416#include <getopt.h>
18417int
18418main ()
18419{
18420
18421 char *myargv[3];
18422 myargv[0] = "conftest";
18423 myargv[1] = "-+";
18424 myargv[2] = 0;
18425 return getopt (2, myargv, "+a") != '?';
18426
18427 ;
18428 return 0;
18429}
18430_ACEOF
18431rm -f conftest$ac_exeext
ca81d7a0
JD
18432if { (ac_try="$ac_link"
18433case "(($ac_try" in
18434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18435 *) ac_try_echo=$ac_try;;
18436esac
18437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18438 (eval "$ac_link") 2>&5
52dbaac8
PE
18439 ac_status=$?
18440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18441 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
18442 { (case "(($ac_try" in
18443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18444 *) ac_try_echo=$ac_try;;
18445esac
18446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18447 (eval "$ac_try") 2>&5
52dbaac8
PE
18448 ac_status=$?
18449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18450 (exit $ac_status); }; }; then
18451 gl_cv_func_gnu_getopt=yes
18452else
18453 echo "$as_me: program exited with status $ac_status" >&5
18454echo "$as_me: failed program was:" >&5
18455sed 's/^/| /' conftest.$ac_ext >&5
18456
18457( exit $ac_status )
18458gl_cv_func_gnu_getopt=no
18459fi
ca81d7a0 18460rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 18461fi
ca81d7a0
JD
18462
18463
52dbaac8 18464fi
ca81d7a0
JD
18465{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
18466echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
18467 if test "$gl_cv_func_gnu_getopt" = "no"; then
18468 GETOPT_H=getopt.h
18469 fi
18470 fi
18471
18472
18473
18474 if test -n "$GETOPT_H"; then
18475
18476
18477 GETOPT_H=getopt.h
18478
18479cat >>confdefs.h <<\_ACEOF
18480#define __GETOPT_PREFIX rpl_
18481_ACEOF
18482
18483
18484
18485 :
18486 GETOPTOBJS='getopt.o getopt1.o'
18487
18488fi
18489
18490
18491
18492
ca81d7a0
JD
18493{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
18494echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
18495if test "${ac_cv_func_getpgrp_void+set}" = set; then
18496 echo $ECHO_N "(cached) $ECHO_C" >&6
18497else
18498 # Use it with a single arg.
18499cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18500/* confdefs.h. */
18501_ACEOF
18502cat confdefs.h >>conftest.$ac_ext
18503cat >>conftest.$ac_ext <<_ACEOF
18504/* end confdefs.h. */
cd958eb3
MB
18505$ac_includes_default
18506int
18507main ()
18508{
18509getpgrp (0);
18510 ;
18511 return 0;
18512}
18513_ACEOF
18514rm -f conftest.$ac_objext
ca81d7a0
JD
18515if { (ac_try="$ac_compile"
18516case "(($ac_try" in
18517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18518 *) ac_try_echo=$ac_try;;
18519esac
18520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18521 (eval "$ac_compile") 2>conftest.er1
cd958eb3 18522 ac_status=$?
edfaf76d
LK
18523 grep -v '^ *+' conftest.er1 >conftest.err
18524 rm -f conftest.er1
18525 cat conftest.err >&5
cd958eb3 18526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18527 (exit $ac_status); } && {
18528 test -z "$ac_c_werror_flag" ||
18529 test ! -s conftest.err
18530 } && test -s conftest.$ac_objext; then
cd958eb3
MB
18531 ac_cv_func_getpgrp_void=no
18532else
18533 echo "$as_me: failed program was:" >&5
19650fd6
AS
18534sed 's/^/| /' conftest.$ac_ext >&5
18535
ca81d7a0 18536 ac_cv_func_getpgrp_void=yes
cd958eb3 18537fi
ca81d7a0
JD
18538
18539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
18540
18541fi
ca81d7a0
JD
18542{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
18543echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
18544if test $ac_cv_func_getpgrp_void = yes; then
18545
18546cat >>confdefs.h <<\_ACEOF
18547#define GETPGRP_VOID 1
18548_ACEOF
18549
18550fi
18551
18552
973a76b1
DL
18553
18554for ac_func in strftime
18555do
18556as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18557{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18558echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18559if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
18560 echo $ECHO_N "(cached) $ECHO_C" >&6
18561else
18562 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18563/* confdefs.h. */
18564_ACEOF
18565cat confdefs.h >>conftest.$ac_ext
18566cat >>conftest.$ac_ext <<_ACEOF
18567/* end confdefs.h. */
edfaf76d
LK
18568/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18569 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18570#define $ac_func innocuous_$ac_func
18571
973a76b1 18572/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18573 which can conflict with char $ac_func (); below.
18574 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18575 <limits.h> exists even on freestanding compilers. */
edfaf76d 18576
19650fd6
AS
18577#ifdef __STDC__
18578# include <limits.h>
18579#else
18580# include <assert.h>
18581#endif
edfaf76d
LK
18582
18583#undef $ac_func
18584
ca81d7a0
JD
18585/* Override any GCC internal prototype to avoid an error.
18586 Use char because int might match the return type of a GCC
18587 builtin and then its argument prototype would still apply. */
973a76b1
DL
18588#ifdef __cplusplus
18589extern "C"
973a76b1 18590#endif
973a76b1
DL
18591char $ac_func ();
18592/* The GNU C library defines this for functions which it implements
18593 to always fail with ENOSYS. Some functions are actually named
18594 something starting with __ and the normal name is an alias. */
ca81d7a0 18595#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 18596choke me
973a76b1
DL
18597#endif
18598
19650fd6
AS
18599int
18600main ()
18601{
ca81d7a0 18602return $ac_func ();
973a76b1
DL
18603 ;
18604 return 0;
18605}
18606_ACEOF
18607rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18608if { (ac_try="$ac_link"
18609case "(($ac_try" in
18610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18611 *) ac_try_echo=$ac_try;;
18612esac
18613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18614 (eval "$ac_link") 2>conftest.er1
973a76b1 18615 ac_status=$?
edfaf76d
LK
18616 grep -v '^ *+' conftest.er1 >conftest.err
18617 rm -f conftest.er1
18618 cat conftest.err >&5
973a76b1 18619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18620 (exit $ac_status); } && {
18621 test -z "$ac_c_werror_flag" ||
18622 test ! -s conftest.err
18623 } && test -s conftest$ac_exeext &&
18624 $as_test_x conftest$ac_exeext; then
973a76b1
DL
18625 eval "$as_ac_var=yes"
18626else
18627 echo "$as_me: failed program was:" >&5
19650fd6
AS
18628sed 's/^/| /' conftest.$ac_ext >&5
18629
ca81d7a0 18630 eval "$as_ac_var=no"
973a76b1 18631fi
ca81d7a0 18632
f053c89f 18633rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18634 conftest$ac_exeext conftest.$ac_ext
973a76b1 18635fi
ca81d7a0
JD
18636ac_res=`eval echo '${'$as_ac_var'}'`
18637 { echo "$as_me:$LINENO: result: $ac_res" >&5
18638echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
18639if test `eval echo '${'$as_ac_var'}'` = yes; then
18640 cat >>confdefs.h <<_ACEOF
18641#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18642_ACEOF
18643
18644else
18645 # strftime is in -lintl on SCO UNIX.
ca81d7a0
JD
18646{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
18647echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
18648if test "${ac_cv_lib_intl_strftime+set}" = set; then
18649 echo $ECHO_N "(cached) $ECHO_C" >&6
18650else
18651 ac_check_lib_save_LIBS=$LIBS
18652LIBS="-lintl $LIBS"
18653cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18654/* confdefs.h. */
18655_ACEOF
18656cat confdefs.h >>conftest.$ac_ext
18657cat >>conftest.$ac_ext <<_ACEOF
18658/* end confdefs.h. */
973a76b1 18659
ca81d7a0
JD
18660/* Override any GCC internal prototype to avoid an error.
18661 Use char because int might match the return type of a GCC
18662 builtin and then its argument prototype would still apply. */
973a76b1
DL
18663#ifdef __cplusplus
18664extern "C"
18665#endif
973a76b1
DL
18666char strftime ();
18667int
18668main ()
18669{
ca81d7a0 18670return strftime ();
973a76b1
DL
18671 ;
18672 return 0;
18673}
18674_ACEOF
18675rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18676if { (ac_try="$ac_link"
18677case "(($ac_try" in
18678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18679 *) ac_try_echo=$ac_try;;
18680esac
18681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18682 (eval "$ac_link") 2>conftest.er1
973a76b1 18683 ac_status=$?
edfaf76d
LK
18684 grep -v '^ *+' conftest.er1 >conftest.err
18685 rm -f conftest.er1
18686 cat conftest.err >&5
973a76b1 18687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18688 (exit $ac_status); } && {
18689 test -z "$ac_c_werror_flag" ||
18690 test ! -s conftest.err
18691 } && test -s conftest$ac_exeext &&
18692 $as_test_x conftest$ac_exeext; then
973a76b1
DL
18693 ac_cv_lib_intl_strftime=yes
18694else
18695 echo "$as_me: failed program was:" >&5
19650fd6
AS
18696sed 's/^/| /' conftest.$ac_ext >&5
18697
ca81d7a0 18698 ac_cv_lib_intl_strftime=no
973a76b1 18699fi
ca81d7a0 18700
f053c89f 18701rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18702 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
18703LIBS=$ac_check_lib_save_LIBS
18704fi
ca81d7a0
JD
18705{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
18706echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
18707if test $ac_cv_lib_intl_strftime = yes; then
18708 cat >>confdefs.h <<\_ACEOF
18709#define HAVE_STRFTIME 1
18710_ACEOF
18711
18712LIBS="-lintl $LIBS"
18713fi
18714
18715fi
18716done
18717
18718
b936fae4
AS
18719# UNIX98 PTYs.
18720
18721for ac_func in grantpt
503d2be0
AS
18722do
18723as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18724{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18725echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18726if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 18727 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18728else
503d2be0 18729 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18730/* confdefs.h. */
18731_ACEOF
18732cat confdefs.h >>conftest.$ac_ext
18733cat >>conftest.$ac_ext <<_ACEOF
18734/* end confdefs.h. */
edfaf76d
LK
18735/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18736 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18737#define $ac_func innocuous_$ac_func
18738
503d2be0 18739/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18740 which can conflict with char $ac_func (); below.
18741 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18742 <limits.h> exists even on freestanding compilers. */
edfaf76d 18743
19650fd6
AS
18744#ifdef __STDC__
18745# include <limits.h>
18746#else
18747# include <assert.h>
18748#endif
edfaf76d
LK
18749
18750#undef $ac_func
18751
ca81d7a0
JD
18752/* Override any GCC internal prototype to avoid an error.
18753 Use char because int might match the return type of a GCC
18754 builtin and then its argument prototype would still apply. */
503d2be0
AS
18755#ifdef __cplusplus
18756extern "C"
18757#endif
503d2be0 18758char $ac_func ();
503d2be0
AS
18759/* The GNU C library defines this for functions which it implements
18760 to always fail with ENOSYS. Some functions are actually named
18761 something starting with __ and the normal name is an alias. */
ca81d7a0 18762#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 18763choke me
503d2be0 18764#endif
4c343001 18765
19650fd6
AS
18766int
18767main ()
18768{
ca81d7a0 18769return $ac_func ();
503d2be0
AS
18770 ;
18771 return 0;
18772}
18773_ACEOF
18774rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18775if { (ac_try="$ac_link"
18776case "(($ac_try" in
18777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18778 *) ac_try_echo=$ac_try;;
18779esac
18780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18781 (eval "$ac_link") 2>conftest.er1
503d2be0 18782 ac_status=$?
edfaf76d
LK
18783 grep -v '^ *+' conftest.er1 >conftest.err
18784 rm -f conftest.er1
18785 cat conftest.err >&5
c0d27fcc 18786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18787 (exit $ac_status); } && {
18788 test -z "$ac_c_werror_flag" ||
18789 test ! -s conftest.err
18790 } && test -s conftest$ac_exeext &&
18791 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18792 eval "$as_ac_var=yes"
18793else
18794 echo "$as_me: failed program was:" >&5
19650fd6
AS
18795sed 's/^/| /' conftest.$ac_ext >&5
18796
ca81d7a0 18797 eval "$as_ac_var=no"
503d2be0 18798fi
ca81d7a0 18799
f053c89f 18800rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18801 conftest$ac_exeext conftest.$ac_ext
503d2be0 18802fi
ca81d7a0
JD
18803ac_res=`eval echo '${'$as_ac_var'}'`
18804 { echo "$as_me:$LINENO: result: $ac_res" >&5
18805echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18806if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18807 cat >>confdefs.h <<_ACEOF
503d2be0 18808#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18809_ACEOF
4c343001
DL
18810
18811fi
503d2be0
AS
18812done
18813
c0d27fcc 18814
b936fae4 18815# PTY-related GNU extensions.
4c343001 18816
b936fae4
AS
18817for ac_func in getpt
18818do
18819as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18820{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18821echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18822if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 18823 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18824else
b936fae4 18825 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18826/* confdefs.h. */
18827_ACEOF
18828cat confdefs.h >>conftest.$ac_ext
18829cat >>conftest.$ac_ext <<_ACEOF
18830/* end confdefs.h. */
edfaf76d
LK
18831/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18832 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18833#define $ac_func innocuous_$ac_func
18834
087121cc 18835/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
18836 which can conflict with char $ac_func (); below.
18837 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18838 <limits.h> exists even on freestanding compilers. */
edfaf76d 18839
19650fd6
AS
18840#ifdef __STDC__
18841# include <limits.h>
18842#else
18843# include <assert.h>
18844#endif
edfaf76d
LK
18845
18846#undef $ac_func
18847
ca81d7a0
JD
18848/* Override any GCC internal prototype to avoid an error.
18849 Use char because int might match the return type of a GCC
18850 builtin and then its argument prototype would still apply. */
503d2be0
AS
18851#ifdef __cplusplus
18852extern "C"
18853#endif
503d2be0 18854char $ac_func ();
087121cc
GM
18855/* The GNU C library defines this for functions which it implements
18856 to always fail with ENOSYS. Some functions are actually named
18857 something starting with __ and the normal name is an alias. */
ca81d7a0 18858#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 18859choke me
087121cc
GM
18860#endif
18861
19650fd6
AS
18862int
18863main ()
18864{
ca81d7a0 18865return $ac_func ();
503d2be0
AS
18866 ;
18867 return 0;
18868}
18869_ACEOF
18870rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18871if { (ac_try="$ac_link"
18872case "(($ac_try" in
18873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18874 *) ac_try_echo=$ac_try;;
18875esac
18876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18877 (eval "$ac_link") 2>conftest.er1
503d2be0 18878 ac_status=$?
f053c89f
CY
18879 grep -v '^ *+' conftest.er1 >conftest.err
18880 rm -f conftest.er1
18881 cat conftest.err >&5
c0d27fcc 18882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18883 (exit $ac_status); } && {
18884 test -z "$ac_c_werror_flag" ||
18885 test ! -s conftest.err
18886 } && test -s conftest$ac_exeext &&
18887 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18888 eval "$as_ac_var=yes"
18889else
18890 echo "$as_me: failed program was:" >&5
19650fd6
AS
18891sed 's/^/| /' conftest.$ac_ext >&5
18892
ca81d7a0 18893 eval "$as_ac_var=no"
503d2be0 18894fi
ca81d7a0 18895
f053c89f 18896rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18897 conftest$ac_exeext conftest.$ac_ext
503d2be0 18898fi
ca81d7a0
JD
18899ac_res=`eval echo '${'$as_ac_var'}'`
18900 { echo "$as_me:$LINENO: result: $ac_res" >&5
18901echo "${ECHO_T}$ac_res" >&6; }
503d2be0 18902if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 18903 cat >>confdefs.h <<_ACEOF
503d2be0 18904#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 18905_ACEOF
087121cc 18906
087121cc
GM
18907fi
18908done
18909
c0d27fcc 18910
ba4481b5
DL
18911# Check this now, so that we will NOT find the above functions in ncurses.
18912# That is because we have not set up to link ncurses in lib-src.
18913# It's better to believe a function is not available
18914# than to expect to find it in ncurses.
503d2be0 18915
ca81d7a0
JD
18916{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
18917echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
18918if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
18919 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 18920else
503d2be0 18921 ac_check_lib_save_LIBS=$LIBS
ba4481b5 18922LIBS="-lncurses $LIBS"
503d2be0 18923cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18924/* confdefs.h. */
18925_ACEOF
18926cat confdefs.h >>conftest.$ac_ext
18927cat >>conftest.$ac_ext <<_ACEOF
18928/* end confdefs.h. */
503d2be0 18929
ca81d7a0
JD
18930/* Override any GCC internal prototype to avoid an error.
18931 Use char because int might match the return type of a GCC
18932 builtin and then its argument prototype would still apply. */
503d2be0
AS
18933#ifdef __cplusplus
18934extern "C"
18935#endif
503d2be0
AS
18936char tparm ();
18937int
18938main ()
18939{
ca81d7a0 18940return tparm ();
503d2be0
AS
18941 ;
18942 return 0;
18943}
18944_ACEOF
18945rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18946if { (ac_try="$ac_link"
18947case "(($ac_try" in
18948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18949 *) ac_try_echo=$ac_try;;
18950esac
18951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18952 (eval "$ac_link") 2>conftest.er1
503d2be0 18953 ac_status=$?
edfaf76d
LK
18954 grep -v '^ *+' conftest.er1 >conftest.err
18955 rm -f conftest.er1
18956 cat conftest.err >&5
c0d27fcc 18957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18958 (exit $ac_status); } && {
18959 test -z "$ac_c_werror_flag" ||
18960 test ! -s conftest.err
18961 } && test -s conftest$ac_exeext &&
18962 $as_test_x conftest$ac_exeext; then
503d2be0
AS
18963 ac_cv_lib_ncurses_tparm=yes
18964else
18965 echo "$as_me: failed program was:" >&5
19650fd6
AS
18966sed 's/^/| /' conftest.$ac_ext >&5
18967
ca81d7a0 18968 ac_cv_lib_ncurses_tparm=no
503d2be0 18969fi
ca81d7a0 18970
f053c89f 18971rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 18972 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
18973LIBS=$ac_check_lib_save_LIBS
18974fi
ca81d7a0
JD
18975{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
18976echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 18977if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 18978 cat >>confdefs.h <<_ACEOF
503d2be0 18979#define HAVE_LIBNCURSES 1
c0d27fcc 18980_ACEOF
ba4481b5
DL
18981
18982 LIBS="-lncurses $LIBS"
18983
ba4481b5
DL
18984fi
18985
c0d27fcc 18986
84e70f78
KR
18987# Do we need the Hesiod library to provide the support routines?
18988if test "$with_hesiod" = yes ; then
18989 # Don't set $LIBS here -- see comments above.
18990 resolv=no
ca81d7a0
JD
18991 { echo "$as_me:$LINENO: checking for res_send" >&5
18992echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
18993if test "${ac_cv_func_res_send+set}" = set; then
18994 echo $ECHO_N "(cached) $ECHO_C" >&6
18995else
18996 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18997/* confdefs.h. */
18998_ACEOF
18999cat confdefs.h >>conftest.$ac_ext
19000cat >>conftest.$ac_ext <<_ACEOF
19001/* end confdefs.h. */
edfaf76d
LK
19002/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
19003 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19004#define res_send innocuous_res_send
19005
84e70f78 19006/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19007 which can conflict with char res_send (); below.
19008 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19009 <limits.h> exists even on freestanding compilers. */
edfaf76d 19010
19650fd6
AS
19011#ifdef __STDC__
19012# include <limits.h>
19013#else
19014# include <assert.h>
19015#endif
edfaf76d
LK
19016
19017#undef res_send
19018
ca81d7a0
JD
19019/* Override any GCC internal prototype to avoid an error.
19020 Use char because int might match the return type of a GCC
19021 builtin and then its argument prototype would still apply. */
84e70f78
KR
19022#ifdef __cplusplus
19023extern "C"
19024#endif
84e70f78 19025char res_send ();
84e70f78
KR
19026/* The GNU C library defines this for functions which it implements
19027 to always fail with ENOSYS. Some functions are actually named
19028 something starting with __ and the normal name is an alias. */
ca81d7a0 19029#if defined __stub_res_send || defined __stub___res_send
84e70f78 19030choke me
cd958eb3
MB
19031#endif
19032
19650fd6
AS
19033int
19034main ()
19035{
ca81d7a0 19036return res_send ();
84e70f78
KR
19037 ;
19038 return 0;
19039}
19040_ACEOF
19041rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19042if { (ac_try="$ac_link"
19043case "(($ac_try" in
19044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19045 *) ac_try_echo=$ac_try;;
19046esac
19047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19048 (eval "$ac_link") 2>conftest.er1
84e70f78 19049 ac_status=$?
edfaf76d
LK
19050 grep -v '^ *+' conftest.er1 >conftest.err
19051 rm -f conftest.er1
19052 cat conftest.err >&5
c0d27fcc 19053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19054 (exit $ac_status); } && {
19055 test -z "$ac_c_werror_flag" ||
19056 test ! -s conftest.err
19057 } && test -s conftest$ac_exeext &&
19058 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19059 ac_cv_func_res_send=yes
19060else
19061 echo "$as_me: failed program was:" >&5
19650fd6
AS
19062sed 's/^/| /' conftest.$ac_ext >&5
19063
ca81d7a0 19064 ac_cv_func_res_send=no
84e70f78 19065fi
ca81d7a0 19066
f053c89f 19067rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19068 conftest$ac_exeext conftest.$ac_ext
84e70f78 19069fi
ca81d7a0
JD
19070{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
19071echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
19072if test $ac_cv_func_res_send = yes; then
19073 :
19074else
ca81d7a0
JD
19075 { echo "$as_me:$LINENO: checking for __res_send" >&5
19076echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
19077if test "${ac_cv_func___res_send+set}" = set; then
19078 echo $ECHO_N "(cached) $ECHO_C" >&6
19079else
19080 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19081/* confdefs.h. */
19082_ACEOF
19083cat confdefs.h >>conftest.$ac_ext
19084cat >>conftest.$ac_ext <<_ACEOF
19085/* end confdefs.h. */
edfaf76d
LK
19086/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
19087 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19088#define __res_send innocuous___res_send
19089
84e70f78 19090/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19091 which can conflict with char __res_send (); below.
19092 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19093 <limits.h> exists even on freestanding compilers. */
edfaf76d 19094
19650fd6
AS
19095#ifdef __STDC__
19096# include <limits.h>
19097#else
19098# include <assert.h>
19099#endif
edfaf76d
LK
19100
19101#undef __res_send
19102
ca81d7a0
JD
19103/* Override any GCC internal prototype to avoid an error.
19104 Use char because int might match the return type of a GCC
19105 builtin and then its argument prototype would still apply. */
84e70f78
KR
19106#ifdef __cplusplus
19107extern "C"
19108#endif
84e70f78 19109char __res_send ();
84e70f78
KR
19110/* The GNU C library defines this for functions which it implements
19111 to always fail with ENOSYS. Some functions are actually named
19112 something starting with __ and the normal name is an alias. */
ca81d7a0 19113#if defined __stub___res_send || defined __stub_____res_send
84e70f78 19114choke me
84e70f78
KR
19115#endif
19116
19650fd6
AS
19117int
19118main ()
19119{
ca81d7a0 19120return __res_send ();
84e70f78
KR
19121 ;
19122 return 0;
19123}
19124_ACEOF
19125rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19126if { (ac_try="$ac_link"
19127case "(($ac_try" in
19128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19129 *) ac_try_echo=$ac_try;;
19130esac
19131eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19132 (eval "$ac_link") 2>conftest.er1
84e70f78 19133 ac_status=$?
edfaf76d
LK
19134 grep -v '^ *+' conftest.er1 >conftest.err
19135 rm -f conftest.er1
19136 cat conftest.err >&5
c0d27fcc 19137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19138 (exit $ac_status); } && {
19139 test -z "$ac_c_werror_flag" ||
19140 test ! -s conftest.err
19141 } && test -s conftest$ac_exeext &&
19142 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19143 ac_cv_func___res_send=yes
19144else
19145 echo "$as_me: failed program was:" >&5
19650fd6
AS
19146sed 's/^/| /' conftest.$ac_ext >&5
19147
ca81d7a0 19148 ac_cv_func___res_send=no
84e70f78 19149fi
ca81d7a0 19150
f053c89f 19151rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19152 conftest$ac_exeext conftest.$ac_ext
84e70f78 19153fi
ca81d7a0
JD
19154{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
19155echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
19156if test $ac_cv_func___res_send = yes; then
19157 :
19158else
ca81d7a0
JD
19159 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
19160echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19161if test "${ac_cv_lib_resolv_res_send+set}" = set; then
19162 echo $ECHO_N "(cached) $ECHO_C" >&6
19163else
19164 ac_check_lib_save_LIBS=$LIBS
19165LIBS="-lresolv $LIBS"
19166cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19167/* confdefs.h. */
19168_ACEOF
19169cat confdefs.h >>conftest.$ac_ext
19170cat >>conftest.$ac_ext <<_ACEOF
19171/* end confdefs.h. */
84e70f78 19172
ca81d7a0
JD
19173/* Override any GCC internal prototype to avoid an error.
19174 Use char because int might match the return type of a GCC
19175 builtin and then its argument prototype would still apply. */
84e70f78
KR
19176#ifdef __cplusplus
19177extern "C"
19178#endif
84e70f78
KR
19179char res_send ();
19180int
19181main ()
19182{
ca81d7a0 19183return res_send ();
84e70f78
KR
19184 ;
19185 return 0;
19186}
19187_ACEOF
19188rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19189if { (ac_try="$ac_link"
19190case "(($ac_try" in
19191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19192 *) ac_try_echo=$ac_try;;
19193esac
19194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19195 (eval "$ac_link") 2>conftest.er1
84e70f78 19196 ac_status=$?
edfaf76d
LK
19197 grep -v '^ *+' conftest.er1 >conftest.err
19198 rm -f conftest.er1
19199 cat conftest.err >&5
c0d27fcc 19200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19201 (exit $ac_status); } && {
19202 test -z "$ac_c_werror_flag" ||
19203 test ! -s conftest.err
19204 } && test -s conftest$ac_exeext &&
19205 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19206 ac_cv_lib_resolv_res_send=yes
19207else
19208 echo "$as_me: failed program was:" >&5
19650fd6
AS
19209sed 's/^/| /' conftest.$ac_ext >&5
19210
ca81d7a0 19211 ac_cv_lib_resolv_res_send=no
84e70f78 19212fi
ca81d7a0 19213
f053c89f 19214rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19215 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19216LIBS=$ac_check_lib_save_LIBS
19217fi
ca81d7a0
JD
19218{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
19219echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
19220if test $ac_cv_lib_resolv_res_send = yes; then
19221 resolv=yes
19222else
ca81d7a0
JD
19223 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
19224echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19225if test "${ac_cv_lib_resolv___res_send+set}" = set; then
19226 echo $ECHO_N "(cached) $ECHO_C" >&6
19227else
19228 ac_check_lib_save_LIBS=$LIBS
19229LIBS="-lresolv $LIBS"
19230cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19231/* confdefs.h. */
19232_ACEOF
19233cat confdefs.h >>conftest.$ac_ext
19234cat >>conftest.$ac_ext <<_ACEOF
19235/* end confdefs.h. */
84e70f78 19236
ca81d7a0
JD
19237/* Override any GCC internal prototype to avoid an error.
19238 Use char because int might match the return type of a GCC
19239 builtin and then its argument prototype would still apply. */
84e70f78
KR
19240#ifdef __cplusplus
19241extern "C"
19242#endif
84e70f78
KR
19243char __res_send ();
19244int
19245main ()
19246{
ca81d7a0 19247return __res_send ();
84e70f78
KR
19248 ;
19249 return 0;
19250}
19251_ACEOF
19252rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19253if { (ac_try="$ac_link"
19254case "(($ac_try" in
19255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19256 *) ac_try_echo=$ac_try;;
19257esac
19258eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19259 (eval "$ac_link") 2>conftest.er1
84e70f78 19260 ac_status=$?
edfaf76d
LK
19261 grep -v '^ *+' conftest.er1 >conftest.err
19262 rm -f conftest.er1
19263 cat conftest.err >&5
c0d27fcc 19264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19265 (exit $ac_status); } && {
19266 test -z "$ac_c_werror_flag" ||
19267 test ! -s conftest.err
19268 } && test -s conftest$ac_exeext &&
19269 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19270 ac_cv_lib_resolv___res_send=yes
19271else
19272 echo "$as_me: failed program was:" >&5
19650fd6
AS
19273sed 's/^/| /' conftest.$ac_ext >&5
19274
ca81d7a0 19275 ac_cv_lib_resolv___res_send=no
84e70f78 19276fi
ca81d7a0 19277
f053c89f 19278rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19279 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19280LIBS=$ac_check_lib_save_LIBS
19281fi
ca81d7a0
JD
19282{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
19283echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
19284if test $ac_cv_lib_resolv___res_send = yes; then
19285 resolv=yes
19286fi
19287
19288fi
19289
19290fi
19291
19292fi
19293
19294 if test "$resolv" = yes ; then
19295 RESOLVLIB=-lresolv
b936fae4 19296
c0d27fcc 19297cat >>confdefs.h <<\_ACEOF
84e70f78 19298#define HAVE_LIBRESOLV 1
c0d27fcc 19299_ACEOF
84e70f78
KR
19300
19301 else
19302 RESOLVLIB=
19303 fi
ca81d7a0
JD
19304 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
19305echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
19306if test "${ac_cv_func_hes_getmailhost+set}" = set; then
19307 echo $ECHO_N "(cached) $ECHO_C" >&6
19308else
19309 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19310/* confdefs.h. */
19311_ACEOF
19312cat confdefs.h >>conftest.$ac_ext
19313cat >>conftest.$ac_ext <<_ACEOF
19314/* end confdefs.h. */
edfaf76d
LK
19315/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
19316 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19317#define hes_getmailhost innocuous_hes_getmailhost
19318
84e70f78 19319/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19320 which can conflict with char hes_getmailhost (); below.
19321 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19322 <limits.h> exists even on freestanding compilers. */
edfaf76d 19323
19650fd6
AS
19324#ifdef __STDC__
19325# include <limits.h>
19326#else
19327# include <assert.h>
19328#endif
edfaf76d
LK
19329
19330#undef hes_getmailhost
19331
ca81d7a0
JD
19332/* Override any GCC internal prototype to avoid an error.
19333 Use char because int might match the return type of a GCC
19334 builtin and then its argument prototype would still apply. */
84e70f78
KR
19335#ifdef __cplusplus
19336extern "C"
19337#endif
84e70f78 19338char hes_getmailhost ();
84e70f78
KR
19339/* The GNU C library defines this for functions which it implements
19340 to always fail with ENOSYS. Some functions are actually named
19341 something starting with __ and the normal name is an alias. */
ca81d7a0 19342#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 19343choke me
cd958eb3
MB
19344#endif
19345
19650fd6
AS
19346int
19347main ()
19348{
ca81d7a0 19349return hes_getmailhost ();
84e70f78
KR
19350 ;
19351 return 0;
19352}
19353_ACEOF
19354rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19355if { (ac_try="$ac_link"
19356case "(($ac_try" in
19357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19358 *) ac_try_echo=$ac_try;;
19359esac
19360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19361 (eval "$ac_link") 2>conftest.er1
84e70f78 19362 ac_status=$?
edfaf76d
LK
19363 grep -v '^ *+' conftest.er1 >conftest.err
19364 rm -f conftest.er1
19365 cat conftest.err >&5
c0d27fcc 19366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19367 (exit $ac_status); } && {
19368 test -z "$ac_c_werror_flag" ||
19369 test ! -s conftest.err
19370 } && test -s conftest$ac_exeext &&
19371 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19372 ac_cv_func_hes_getmailhost=yes
19373else
19374 echo "$as_me: failed program was:" >&5
19650fd6
AS
19375sed 's/^/| /' conftest.$ac_ext >&5
19376
ca81d7a0 19377 ac_cv_func_hes_getmailhost=no
84e70f78 19378fi
ca81d7a0 19379
f053c89f 19380rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19381 conftest$ac_exeext conftest.$ac_ext
84e70f78 19382fi
ca81d7a0
JD
19383{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
19384echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
19385if test $ac_cv_func_hes_getmailhost = yes; then
19386 :
19387else
ca81d7a0
JD
19388 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
19389echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
19390if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
19391 echo $ECHO_N "(cached) $ECHO_C" >&6
19392else
19393 ac_check_lib_save_LIBS=$LIBS
19394LIBS="-lhesiod $RESOLVLIB $LIBS"
19395cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19396/* confdefs.h. */
19397_ACEOF
19398cat confdefs.h >>conftest.$ac_ext
19399cat >>conftest.$ac_ext <<_ACEOF
19400/* end confdefs.h. */
84e70f78 19401
ca81d7a0
JD
19402/* Override any GCC internal prototype to avoid an error.
19403 Use char because int might match the return type of a GCC
19404 builtin and then its argument prototype would still apply. */
84e70f78
KR
19405#ifdef __cplusplus
19406extern "C"
19407#endif
84e70f78
KR
19408char hes_getmailhost ();
19409int
19410main ()
19411{
ca81d7a0 19412return hes_getmailhost ();
84e70f78
KR
19413 ;
19414 return 0;
19415}
19416_ACEOF
19417rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19418if { (ac_try="$ac_link"
19419case "(($ac_try" in
19420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19421 *) ac_try_echo=$ac_try;;
19422esac
19423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19424 (eval "$ac_link") 2>conftest.er1
84e70f78 19425 ac_status=$?
edfaf76d
LK
19426 grep -v '^ *+' conftest.er1 >conftest.err
19427 rm -f conftest.er1
19428 cat conftest.err >&5
c0d27fcc 19429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19430 (exit $ac_status); } && {
19431 test -z "$ac_c_werror_flag" ||
19432 test ! -s conftest.err
19433 } && test -s conftest$ac_exeext &&
19434 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19435 ac_cv_lib_hesiod_hes_getmailhost=yes
19436else
19437 echo "$as_me: failed program was:" >&5
19650fd6
AS
19438sed 's/^/| /' conftest.$ac_ext >&5
19439
ca81d7a0 19440 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 19441fi
ca81d7a0 19442
f053c89f 19443rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19444 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
19445LIBS=$ac_check_lib_save_LIBS
19446fi
ca81d7a0
JD
19447{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
19448echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 19449if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 19450
c0d27fcc 19451cat >>confdefs.h <<\_ACEOF
84e70f78 19452#define HAVE_LIBHESIOD 1
c0d27fcc 19453_ACEOF
84e70f78
KR
19454
19455else
19456 :
19457fi
19458
19459fi
19460
19461fi
19462
a21616bd
KR
19463# These tell us which Kerberos-related libraries to use.
19464if test "${with_kerberos+set}" = set; then
503d2be0 19465
ca81d7a0
JD
19466{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
19467echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
19468if test "${ac_cv_lib_com_err_com_err+set}" = set; then
19469 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19470else
503d2be0 19471 ac_check_lib_save_LIBS=$LIBS
a21616bd 19472LIBS="-lcom_err $LIBS"
503d2be0 19473cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19474/* confdefs.h. */
19475_ACEOF
19476cat confdefs.h >>conftest.$ac_ext
19477cat >>conftest.$ac_ext <<_ACEOF
19478/* end confdefs.h. */
503d2be0 19479
ca81d7a0
JD
19480/* Override any GCC internal prototype to avoid an error.
19481 Use char because int might match the return type of a GCC
19482 builtin and then its argument prototype would still apply. */
503d2be0
AS
19483#ifdef __cplusplus
19484extern "C"
19485#endif
503d2be0
AS
19486char com_err ();
19487int
19488main ()
19489{
ca81d7a0 19490return com_err ();
503d2be0
AS
19491 ;
19492 return 0;
19493}
19494_ACEOF
19495rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19496if { (ac_try="$ac_link"
19497case "(($ac_try" in
19498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19499 *) ac_try_echo=$ac_try;;
19500esac
19501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19502 (eval "$ac_link") 2>conftest.er1
503d2be0 19503 ac_status=$?
edfaf76d
LK
19504 grep -v '^ *+' conftest.er1 >conftest.err
19505 rm -f conftest.er1
19506 cat conftest.err >&5
c0d27fcc 19507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19508 (exit $ac_status); } && {
19509 test -z "$ac_c_werror_flag" ||
19510 test ! -s conftest.err
19511 } && test -s conftest$ac_exeext &&
19512 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19513 ac_cv_lib_com_err_com_err=yes
19514else
19515 echo "$as_me: failed program was:" >&5
19650fd6
AS
19516sed 's/^/| /' conftest.$ac_ext >&5
19517
ca81d7a0 19518 ac_cv_lib_com_err_com_err=no
503d2be0 19519fi
ca81d7a0 19520
f053c89f 19521rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19522 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19523LIBS=$ac_check_lib_save_LIBS
19524fi
ca81d7a0
JD
19525{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
19526echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 19527if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 19528 cat >>confdefs.h <<_ACEOF
503d2be0 19529#define HAVE_LIBCOM_ERR 1
c0d27fcc 19530_ACEOF
a21616bd
KR
19531
19532 LIBS="-lcom_err $LIBS"
19533
a21616bd
KR
19534fi
19535
c0d27fcc 19536
ca81d7a0
JD
19537{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
19538echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
19539if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
19540 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19541else
503d2be0 19542 ac_check_lib_save_LIBS=$LIBS
a21616bd 19543LIBS="-lk5crypto $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 mit_des_cbc_encrypt ();
19558int
19559main ()
19560{
ca81d7a0 19561return mit_des_cbc_encrypt ();
503d2be0
AS
19562 ;
19563 return 0;
19564}
19565_ACEOF
19566rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19567if { (ac_try="$ac_link"
19568case "(($ac_try" in
19569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19570 *) ac_try_echo=$ac_try;;
19571esac
19572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19573 (eval "$ac_link") 2>conftest.er1
503d2be0 19574 ac_status=$?
edfaf76d
LK
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_k5crypto_mit_des_cbc_encrypt=yes
19585else
19586 echo "$as_me: failed program was:" >&5
19650fd6
AS
19587sed 's/^/| /' conftest.$ac_ext >&5
19588
ca81d7a0 19589 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=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_k5crypto_mit_des_cbc_encrypt" >&5
19597echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 19598if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 19599 cat >>confdefs.h <<_ACEOF
503d2be0 19600#define HAVE_LIBK5CRYPTO 1
c0d27fcc 19601_ACEOF
a21616bd
KR
19602
19603 LIBS="-lk5crypto $LIBS"
19604
a21616bd
KR
19605fi
19606
c0d27fcc 19607
ca81d7a0
JD
19608{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
19609echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
19610if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
19611 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19612else
503d2be0 19613 ac_check_lib_save_LIBS=$LIBS
a21616bd 19614LIBS="-lcrypto $LIBS"
503d2be0 19615cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19616/* confdefs.h. */
19617_ACEOF
19618cat confdefs.h >>conftest.$ac_ext
19619cat >>conftest.$ac_ext <<_ACEOF
19620/* end confdefs.h. */
503d2be0 19621
ca81d7a0
JD
19622/* Override any GCC internal prototype to avoid an error.
19623 Use char because int might match the return type of a GCC
19624 builtin and then its argument prototype would still apply. */
503d2be0
AS
19625#ifdef __cplusplus
19626extern "C"
19627#endif
503d2be0
AS
19628char mit_des_cbc_encrypt ();
19629int
19630main ()
19631{
ca81d7a0 19632return mit_des_cbc_encrypt ();
503d2be0
AS
19633 ;
19634 return 0;
19635}
19636_ACEOF
19637rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19638if { (ac_try="$ac_link"
19639case "(($ac_try" in
19640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19641 *) ac_try_echo=$ac_try;;
19642esac
19643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19644 (eval "$ac_link") 2>conftest.er1
503d2be0 19645 ac_status=$?
edfaf76d
LK
19646 grep -v '^ *+' conftest.er1 >conftest.err
19647 rm -f conftest.er1
19648 cat conftest.err >&5
c0d27fcc 19649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19650 (exit $ac_status); } && {
19651 test -z "$ac_c_werror_flag" ||
19652 test ! -s conftest.err
19653 } && test -s conftest$ac_exeext &&
19654 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19655 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
19656else
19657 echo "$as_me: failed program was:" >&5
19650fd6
AS
19658sed 's/^/| /' conftest.$ac_ext >&5
19659
ca81d7a0 19660 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 19661fi
ca81d7a0 19662
f053c89f 19663rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19664 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19665LIBS=$ac_check_lib_save_LIBS
19666fi
ca81d7a0
JD
19667{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
19668echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 19669if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 19670 cat >>confdefs.h <<_ACEOF
503d2be0 19671#define HAVE_LIBCRYPTO 1
c0d27fcc 19672_ACEOF
a21616bd
KR
19673
19674 LIBS="-lcrypto $LIBS"
19675
a21616bd
KR
19676fi
19677
c0d27fcc 19678
ca81d7a0
JD
19679{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
19680echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
19681if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
19682 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19683else
503d2be0 19684 ac_check_lib_save_LIBS=$LIBS
a21616bd 19685LIBS="-lkrb5 $LIBS"
503d2be0 19686cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19687/* confdefs.h. */
19688_ACEOF
19689cat confdefs.h >>conftest.$ac_ext
19690cat >>conftest.$ac_ext <<_ACEOF
19691/* end confdefs.h. */
a21616bd 19692
ca81d7a0
JD
19693/* Override any GCC internal prototype to avoid an error.
19694 Use char because int might match the return type of a GCC
19695 builtin and then its argument prototype would still apply. */
503d2be0
AS
19696#ifdef __cplusplus
19697extern "C"
19698#endif
503d2be0
AS
19699char krb5_init_context ();
19700int
19701main ()
19702{
ca81d7a0 19703return krb5_init_context ();
503d2be0
AS
19704 ;
19705 return 0;
19706}
19707_ACEOF
19708rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19709if { (ac_try="$ac_link"
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_link") 2>conftest.er1
503d2be0 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_exeext &&
19725 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19726 ac_cv_lib_krb5_krb5_init_context=yes
19727else
19728 echo "$as_me: failed program was:" >&5
19650fd6
AS
19729sed 's/^/| /' conftest.$ac_ext >&5
19730
ca81d7a0 19731 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 19732fi
ca81d7a0 19733
f053c89f 19734rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19735 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19736LIBS=$ac_check_lib_save_LIBS
19737fi
ca81d7a0
JD
19738{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
19739echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 19740if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 19741 cat >>confdefs.h <<_ACEOF
503d2be0 19742#define HAVE_LIBKRB5 1
c0d27fcc 19743_ACEOF
a21616bd
KR
19744
19745 LIBS="-lkrb5 $LIBS"
19746
a21616bd
KR
19747fi
19748
19749 if test "${with_kerberos5+set}" != set; then
503d2be0 19750
ca81d7a0
JD
19751{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
19752echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
19753if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
19754 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19755else
503d2be0 19756 ac_check_lib_save_LIBS=$LIBS
a21616bd 19757LIBS="-ldes425 $LIBS"
503d2be0 19758cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19759/* confdefs.h. */
19760_ACEOF
19761cat confdefs.h >>conftest.$ac_ext
19762cat >>conftest.$ac_ext <<_ACEOF
19763/* end confdefs.h. */
503d2be0 19764
ca81d7a0
JD
19765/* Override any GCC internal prototype to avoid an error.
19766 Use char because int might match the return type of a GCC
19767 builtin and then its argument prototype would still apply. */
503d2be0
AS
19768#ifdef __cplusplus
19769extern "C"
19770#endif
503d2be0
AS
19771char des_cbc_encrypt ();
19772int
19773main ()
19774{
ca81d7a0 19775return des_cbc_encrypt ();
503d2be0
AS
19776 ;
19777 return 0;
19778}
19779_ACEOF
19780rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19781if { (ac_try="$ac_link"
19782case "(($ac_try" in
19783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19784 *) ac_try_echo=$ac_try;;
19785esac
19786eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19787 (eval "$ac_link") 2>conftest.er1
503d2be0 19788 ac_status=$?
edfaf76d
LK
19789 grep -v '^ *+' conftest.er1 >conftest.err
19790 rm -f conftest.er1
19791 cat conftest.err >&5
c0d27fcc 19792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19793 (exit $ac_status); } && {
19794 test -z "$ac_c_werror_flag" ||
19795 test ! -s conftest.err
19796 } && test -s conftest$ac_exeext &&
19797 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19798 ac_cv_lib_des425_des_cbc_encrypt=yes
19799else
19800 echo "$as_me: failed program was:" >&5
19650fd6
AS
19801sed 's/^/| /' conftest.$ac_ext >&5
19802
ca81d7a0 19803 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 19804fi
ca81d7a0 19805
f053c89f 19806rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19807 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19808LIBS=$ac_check_lib_save_LIBS
19809fi
ca81d7a0
JD
19810{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
19811echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 19812if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 19813 cat >>confdefs.h <<_ACEOF
503d2be0 19814#define HAVE_LIBDES425 1
c0d27fcc 19815_ACEOF
a21616bd
KR
19816
19817 LIBS="-ldes425 $LIBS"
19818
19819else
503d2be0 19820
ca81d7a0
JD
19821{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
19822echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
19823if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
19824 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19825else
503d2be0 19826 ac_check_lib_save_LIBS=$LIBS
a21616bd 19827LIBS="-ldes $LIBS"
503d2be0 19828cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19829/* confdefs.h. */
19830_ACEOF
19831cat confdefs.h >>conftest.$ac_ext
19832cat >>conftest.$ac_ext <<_ACEOF
19833/* end confdefs.h. */
503d2be0 19834
ca81d7a0
JD
19835/* Override any GCC internal prototype to avoid an error.
19836 Use char because int might match the return type of a GCC
19837 builtin and then its argument prototype would still apply. */
503d2be0
AS
19838#ifdef __cplusplus
19839extern "C"
19840#endif
503d2be0
AS
19841char des_cbc_encrypt ();
19842int
19843main ()
19844{
ca81d7a0 19845return des_cbc_encrypt ();
503d2be0
AS
19846 ;
19847 return 0;
19848}
19849_ACEOF
19850rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19851if { (ac_try="$ac_link"
19852case "(($ac_try" in
19853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19854 *) ac_try_echo=$ac_try;;
19855esac
19856eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19857 (eval "$ac_link") 2>conftest.er1
503d2be0 19858 ac_status=$?
edfaf76d
LK
19859 grep -v '^ *+' conftest.er1 >conftest.err
19860 rm -f conftest.er1
19861 cat conftest.err >&5
c0d27fcc 19862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19863 (exit $ac_status); } && {
19864 test -z "$ac_c_werror_flag" ||
19865 test ! -s conftest.err
19866 } && test -s conftest$ac_exeext &&
19867 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19868 ac_cv_lib_des_des_cbc_encrypt=yes
19869else
19870 echo "$as_me: failed program was:" >&5
19650fd6
AS
19871sed 's/^/| /' conftest.$ac_ext >&5
19872
ca81d7a0 19873 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 19874fi
ca81d7a0 19875
f053c89f 19876rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19877 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19878LIBS=$ac_check_lib_save_LIBS
19879fi
ca81d7a0
JD
19880{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
19881echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 19882if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 19883 cat >>confdefs.h <<_ACEOF
503d2be0 19884#define HAVE_LIBDES 1
c0d27fcc 19885_ACEOF
a21616bd
KR
19886
19887 LIBS="-ldes $LIBS"
19888
a21616bd
KR
19889fi
19890
19891fi
19892
c0d27fcc 19893
ca81d7a0
JD
19894{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
19895echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
19896if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
19897 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19898else
503d2be0 19899 ac_check_lib_save_LIBS=$LIBS
a21616bd 19900LIBS="-lkrb4 $LIBS"
503d2be0 19901cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19902/* confdefs.h. */
19903_ACEOF
19904cat confdefs.h >>conftest.$ac_ext
19905cat >>conftest.$ac_ext <<_ACEOF
19906/* end confdefs.h. */
503d2be0 19907
ca81d7a0
JD
19908/* Override any GCC internal prototype to avoid an error.
19909 Use char because int might match the return type of a GCC
19910 builtin and then its argument prototype would still apply. */
503d2be0
AS
19911#ifdef __cplusplus
19912extern "C"
19913#endif
503d2be0
AS
19914char krb_get_cred ();
19915int
f053c89f
CY
19916main ()
19917{
19918return krb_get_cred ();
19919 ;
19920 return 0;
19921}
19922_ACEOF
19923rm -f conftest.$ac_objext conftest$ac_exeext
19924if { (ac_try="$ac_link"
19925case "(($ac_try" in
ca81d7a0
JD
19926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19927 *) ac_try_echo=$ac_try;;
19928esac
19929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19930 (eval "$ac_link") 2>conftest.er1
503d2be0 19931 ac_status=$?
f053c89f
CY
19932 grep -v '^ *+' conftest.er1 >conftest.err
19933 rm -f conftest.er1
19934 cat conftest.err >&5
c0d27fcc 19935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19936 (exit $ac_status); } && {
19937 test -z "$ac_c_werror_flag" ||
19938 test ! -s conftest.err
19939 } && test -s conftest$ac_exeext &&
19940 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19941 ac_cv_lib_krb4_krb_get_cred=yes
19942else
19943 echo "$as_me: failed program was:" >&5
19650fd6
AS
19944sed 's/^/| /' conftest.$ac_ext >&5
19945
ca81d7a0 19946 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 19947fi
ca81d7a0 19948
f053c89f 19949rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19950 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19951LIBS=$ac_check_lib_save_LIBS
19952fi
ca81d7a0
JD
19953{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
19954echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 19955if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 19956 cat >>confdefs.h <<_ACEOF
503d2be0 19957#define HAVE_LIBKRB4 1
c0d27fcc 19958_ACEOF
a21616bd
KR
19959
19960 LIBS="-lkrb4 $LIBS"
19961
19962else
503d2be0 19963
ca81d7a0
JD
19964{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
19965echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
19966if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
19967 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 19968else
503d2be0 19969 ac_check_lib_save_LIBS=$LIBS
a21616bd 19970LIBS="-lkrb $LIBS"
503d2be0 19971cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19972/* confdefs.h. */
19973_ACEOF
19974cat confdefs.h >>conftest.$ac_ext
19975cat >>conftest.$ac_ext <<_ACEOF
19976/* end confdefs.h. */
503d2be0 19977
ca81d7a0
JD
19978/* Override any GCC internal prototype to avoid an error.
19979 Use char because int might match the return type of a GCC
19980 builtin and then its argument prototype would still apply. */
503d2be0
AS
19981#ifdef __cplusplus
19982extern "C"
19983#endif
503d2be0
AS
19984char krb_get_cred ();
19985int
19986main ()
19987{
ca81d7a0 19988return krb_get_cred ();
503d2be0
AS
19989 ;
19990 return 0;
19991}
19992_ACEOF
19993rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19994if { (ac_try="$ac_link"
19995case "(($ac_try" in
19996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19997 *) ac_try_echo=$ac_try;;
19998esac
19999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20000 (eval "$ac_link") 2>conftest.er1
503d2be0 20001 ac_status=$?
edfaf76d
LK
20002 grep -v '^ *+' conftest.er1 >conftest.err
20003 rm -f conftest.er1
20004 cat conftest.err >&5
c0d27fcc 20005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20006 (exit $ac_status); } && {
20007 test -z "$ac_c_werror_flag" ||
20008 test ! -s conftest.err
20009 } && test -s conftest$ac_exeext &&
20010 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20011 ac_cv_lib_krb_krb_get_cred=yes
20012else
20013 echo "$as_me: failed program was:" >&5
19650fd6
AS
20014sed 's/^/| /' conftest.$ac_ext >&5
20015
ca81d7a0 20016 ac_cv_lib_krb_krb_get_cred=no
503d2be0 20017fi
ca81d7a0 20018
f053c89f 20019rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20020 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20021LIBS=$ac_check_lib_save_LIBS
20022fi
ca81d7a0
JD
20023{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
20024echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 20025if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 20026 cat >>confdefs.h <<_ACEOF
503d2be0 20027#define HAVE_LIBKRB 1
c0d27fcc 20028_ACEOF
a21616bd
KR
20029
20030 LIBS="-lkrb $LIBS"
20031
a21616bd
KR
20032fi
20033
20034fi
20035
20036 fi
20037
20038 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
20039
20040for ac_header in krb5.h
a21616bd 20041do
503d2be0 20042as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20043if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20044 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20045echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20046if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20047 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20048fi
ca81d7a0
JD
20049ac_res=`eval echo '${'$as_ac_Header'}'`
20050 { echo "$as_me:$LINENO: result: $ac_res" >&5
20051echo "${ECHO_T}$ac_res" >&6; }
98418dba 20052else
c0d27fcc 20053 # Is the header compilable?
ca81d7a0
JD
20054{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20055echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20056cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20057/* confdefs.h. */
20058_ACEOF
20059cat confdefs.h >>conftest.$ac_ext
20060cat >>conftest.$ac_ext <<_ACEOF
20061/* end confdefs.h. */
c0d27fcc
MR
20062$ac_includes_default
20063#include <$ac_header>
20064_ACEOF
20065rm -f conftest.$ac_objext
ca81d7a0
JD
20066if { (ac_try="$ac_compile"
20067case "(($ac_try" in
20068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20069 *) ac_try_echo=$ac_try;;
20070esac
20071eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20072 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20073 ac_status=$?
edfaf76d
LK
20074 grep -v '^ *+' conftest.er1 >conftest.err
20075 rm -f conftest.er1
20076 cat conftest.err >&5
c0d27fcc 20077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20078 (exit $ac_status); } && {
20079 test -z "$ac_c_werror_flag" ||
20080 test ! -s conftest.err
20081 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20082 ac_header_compiler=yes
20083else
20084 echo "$as_me: failed program was:" >&5
19650fd6
AS
20085sed 's/^/| /' conftest.$ac_ext >&5
20086
ca81d7a0 20087 ac_header_compiler=no
c0d27fcc 20088fi
ca81d7a0
JD
20089
20090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20091{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20092echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20093
20094# Is the header present?
ca81d7a0
JD
20095{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20096echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20097cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20098/* confdefs.h. */
20099_ACEOF
20100cat confdefs.h >>conftest.$ac_ext
20101cat >>conftest.$ac_ext <<_ACEOF
20102/* end confdefs.h. */
503d2be0
AS
20103#include <$ac_header>
20104_ACEOF
ca81d7a0
JD
20105if { (ac_try="$ac_cpp conftest.$ac_ext"
20106case "(($ac_try" in
20107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20108 *) ac_try_echo=$ac_try;;
20109esac
20110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20111 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20112 ac_status=$?
6bae0ccf 20113 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20114 rm -f conftest.er1
20115 cat conftest.err >&5
c0d27fcc 20116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20117 (exit $ac_status); } >/dev/null && {
20118 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20119 test ! -s conftest.err
20120 }; then
c0d27fcc 20121 ac_header_preproc=yes
503d2be0
AS
20122else
20123 echo "$as_me: failed program was:" >&5
19650fd6
AS
20124sed 's/^/| /' conftest.$ac_ext >&5
20125
c0d27fcc 20126 ac_header_preproc=no
a21616bd 20127fi
ca81d7a0 20128
503d2be0 20129rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20130{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20131echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20132
20133# So? What about this header?
edfaf76d
LK
20134case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20135 yes:no: )
c0d27fcc
MR
20136 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20137echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20138 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20139echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20140 ac_header_preproc=yes
19650fd6 20141 ;;
edfaf76d 20142 no:yes:* )
c0d27fcc
MR
20143 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20144echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20145 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20146echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20147 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20148echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20149 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20150echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20151 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20152echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20153 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20154echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20155
19650fd6 20156 ;;
c0d27fcc 20157esac
ca81d7a0
JD
20158{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20159echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20160if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20161 echo $ECHO_N "(cached) $ECHO_C" >&6
20162else
edfaf76d 20163 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20164fi
ca81d7a0
JD
20165ac_res=`eval echo '${'$as_ac_Header'}'`
20166 { echo "$as_me:$LINENO: result: $ac_res" >&5
20167echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20168
20169fi
503d2be0 20170if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20171 cat >>confdefs.h <<_ACEOF
503d2be0 20172#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20173_ACEOF
503d2be0 20174
a21616bd 20175fi
c0d27fcc 20176
a21616bd
KR
20177done
20178
20179 else
503d2be0
AS
20180
20181for ac_header in des.h
a21616bd 20182do
503d2be0 20183as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20184if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20185 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20186echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20187if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20188 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20189fi
ca81d7a0
JD
20190ac_res=`eval echo '${'$as_ac_Header'}'`
20191 { echo "$as_me:$LINENO: result: $ac_res" >&5
20192echo "${ECHO_T}$ac_res" >&6; }
98418dba 20193else
c0d27fcc 20194 # Is the header compilable?
ca81d7a0
JD
20195{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20196echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20197cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20198/* confdefs.h. */
20199_ACEOF
20200cat confdefs.h >>conftest.$ac_ext
20201cat >>conftest.$ac_ext <<_ACEOF
20202/* end confdefs.h. */
c0d27fcc
MR
20203$ac_includes_default
20204#include <$ac_header>
20205_ACEOF
20206rm -f conftest.$ac_objext
ca81d7a0
JD
20207if { (ac_try="$ac_compile"
20208case "(($ac_try" in
20209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20210 *) ac_try_echo=$ac_try;;
20211esac
20212eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20213 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20214 ac_status=$?
edfaf76d
LK
20215 grep -v '^ *+' conftest.er1 >conftest.err
20216 rm -f conftest.er1
20217 cat conftest.err >&5
c0d27fcc 20218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20219 (exit $ac_status); } && {
20220 test -z "$ac_c_werror_flag" ||
20221 test ! -s conftest.err
20222 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20223 ac_header_compiler=yes
20224else
20225 echo "$as_me: failed program was:" >&5
19650fd6
AS
20226sed 's/^/| /' conftest.$ac_ext >&5
20227
ca81d7a0 20228 ac_header_compiler=no
c0d27fcc 20229fi
ca81d7a0
JD
20230
20231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20232{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20233echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20234
20235# Is the header present?
ca81d7a0
JD
20236{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20237echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20238cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20239/* confdefs.h. */
20240_ACEOF
20241cat confdefs.h >>conftest.$ac_ext
20242cat >>conftest.$ac_ext <<_ACEOF
20243/* end confdefs.h. */
503d2be0
AS
20244#include <$ac_header>
20245_ACEOF
ca81d7a0
JD
20246if { (ac_try="$ac_cpp conftest.$ac_ext"
20247case "(($ac_try" in
20248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20249 *) ac_try_echo=$ac_try;;
20250esac
20251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20252 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20253 ac_status=$?
6bae0ccf 20254 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20255 rm -f conftest.er1
20256 cat conftest.err >&5
c0d27fcc 20257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20258 (exit $ac_status); } >/dev/null && {
20259 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20260 test ! -s conftest.err
20261 }; then
c0d27fcc 20262 ac_header_preproc=yes
503d2be0
AS
20263else
20264 echo "$as_me: failed program was:" >&5
19650fd6
AS
20265sed 's/^/| /' conftest.$ac_ext >&5
20266
c0d27fcc 20267 ac_header_preproc=no
a21616bd 20268fi
ca81d7a0 20269
503d2be0 20270rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20271{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20272echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20273
20274# So? What about this header?
edfaf76d
LK
20275case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20276 yes:no: )
c0d27fcc
MR
20277 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20278echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20279 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20280echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20281 ac_header_preproc=yes
19650fd6 20282 ;;
edfaf76d 20283 no:yes:* )
c0d27fcc
MR
20284 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20285echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20286 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20287echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20288 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20289echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20290 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20291echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20292 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20293echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20294 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20295echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20296
19650fd6 20297 ;;
c0d27fcc 20298esac
ca81d7a0
JD
20299{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20300echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20301if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20302 echo $ECHO_N "(cached) $ECHO_C" >&6
20303else
edfaf76d 20304 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20305fi
ca81d7a0
JD
20306ac_res=`eval echo '${'$as_ac_Header'}'`
20307 { echo "$as_me:$LINENO: result: $ac_res" >&5
20308echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20309
20310fi
503d2be0 20311if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20312 cat >>confdefs.h <<_ACEOF
503d2be0 20313#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20314_ACEOF
503d2be0 20315
a21616bd 20316else
503d2be0
AS
20317
20318for ac_header in kerberosIV/des.h
a21616bd 20319do
503d2be0 20320as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20321if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20322 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20323echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20324if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20325 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20326fi
ca81d7a0
JD
20327ac_res=`eval echo '${'$as_ac_Header'}'`
20328 { echo "$as_me:$LINENO: result: $ac_res" >&5
20329echo "${ECHO_T}$ac_res" >&6; }
98418dba 20330else
c0d27fcc 20331 # Is the header compilable?
ca81d7a0
JD
20332{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20333echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20334cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20335/* confdefs.h. */
20336_ACEOF
20337cat confdefs.h >>conftest.$ac_ext
20338cat >>conftest.$ac_ext <<_ACEOF
20339/* end confdefs.h. */
c0d27fcc
MR
20340$ac_includes_default
20341#include <$ac_header>
20342_ACEOF
20343rm -f conftest.$ac_objext
ca81d7a0
JD
20344if { (ac_try="$ac_compile"
20345case "(($ac_try" in
20346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20347 *) ac_try_echo=$ac_try;;
20348esac
20349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20350 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20351 ac_status=$?
edfaf76d
LK
20352 grep -v '^ *+' conftest.er1 >conftest.err
20353 rm -f conftest.er1
20354 cat conftest.err >&5
c0d27fcc 20355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20356 (exit $ac_status); } && {
20357 test -z "$ac_c_werror_flag" ||
20358 test ! -s conftest.err
20359 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20360 ac_header_compiler=yes
20361else
20362 echo "$as_me: failed program was:" >&5
19650fd6
AS
20363sed 's/^/| /' conftest.$ac_ext >&5
20364
ca81d7a0 20365 ac_header_compiler=no
c0d27fcc 20366fi
ca81d7a0
JD
20367
20368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20369{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20370echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20371
20372# Is the header present?
ca81d7a0
JD
20373{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20374echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20375cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20376/* confdefs.h. */
20377_ACEOF
20378cat confdefs.h >>conftest.$ac_ext
20379cat >>conftest.$ac_ext <<_ACEOF
20380/* end confdefs.h. */
503d2be0
AS
20381#include <$ac_header>
20382_ACEOF
ca81d7a0
JD
20383if { (ac_try="$ac_cpp conftest.$ac_ext"
20384case "(($ac_try" in
20385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20386 *) ac_try_echo=$ac_try;;
20387esac
20388eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20389 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20390 ac_status=$?
6bae0ccf 20391 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20392 rm -f conftest.er1
20393 cat conftest.err >&5
c0d27fcc 20394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20395 (exit $ac_status); } >/dev/null && {
20396 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20397 test ! -s conftest.err
20398 }; then
c0d27fcc 20399 ac_header_preproc=yes
503d2be0
AS
20400else
20401 echo "$as_me: failed program was:" >&5
19650fd6
AS
20402sed 's/^/| /' conftest.$ac_ext >&5
20403
c0d27fcc 20404 ac_header_preproc=no
a21616bd 20405fi
ca81d7a0 20406
503d2be0 20407rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20408{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20409echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20410
20411# So? What about this header?
edfaf76d
LK
20412case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20413 yes:no: )
c0d27fcc
MR
20414 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20415echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20416 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20417echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20418 ac_header_preproc=yes
19650fd6 20419 ;;
edfaf76d 20420 no:yes:* )
c0d27fcc
MR
20421 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20422echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20423 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20424echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20425 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20426echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20427 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20428echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20429 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20430echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20431 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20432echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20433
19650fd6 20434 ;;
c0d27fcc 20435esac
ca81d7a0
JD
20436{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20437echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20438if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20439 echo $ECHO_N "(cached) $ECHO_C" >&6
20440else
edfaf76d 20441 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20442fi
ca81d7a0
JD
20443ac_res=`eval echo '${'$as_ac_Header'}'`
20444 { echo "$as_me:$LINENO: result: $ac_res" >&5
20445echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20446
20447fi
503d2be0 20448if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20449 cat >>confdefs.h <<_ACEOF
503d2be0 20450#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20451_ACEOF
503d2be0 20452
a21616bd 20453else
503d2be0
AS
20454
20455for ac_header in kerberos/des.h
a21616bd 20456do
503d2be0 20457as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20458if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20459 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20460echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20461if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20462 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20463fi
ca81d7a0
JD
20464ac_res=`eval echo '${'$as_ac_Header'}'`
20465 { echo "$as_me:$LINENO: result: $ac_res" >&5
20466echo "${ECHO_T}$ac_res" >&6; }
98418dba 20467else
c0d27fcc 20468 # Is the header compilable?
ca81d7a0
JD
20469{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20470echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20471cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20472/* confdefs.h. */
20473_ACEOF
20474cat confdefs.h >>conftest.$ac_ext
20475cat >>conftest.$ac_ext <<_ACEOF
20476/* end confdefs.h. */
c0d27fcc
MR
20477$ac_includes_default
20478#include <$ac_header>
20479_ACEOF
20480rm -f conftest.$ac_objext
ca81d7a0
JD
20481if { (ac_try="$ac_compile"
20482case "(($ac_try" in
20483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20484 *) ac_try_echo=$ac_try;;
20485esac
20486eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20487 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20488 ac_status=$?
edfaf76d
LK
20489 grep -v '^ *+' conftest.er1 >conftest.err
20490 rm -f conftest.er1
20491 cat conftest.err >&5
c0d27fcc 20492 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20493 (exit $ac_status); } && {
20494 test -z "$ac_c_werror_flag" ||
20495 test ! -s conftest.err
20496 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20497 ac_header_compiler=yes
20498else
20499 echo "$as_me: failed program was:" >&5
19650fd6
AS
20500sed 's/^/| /' conftest.$ac_ext >&5
20501
ca81d7a0 20502 ac_header_compiler=no
c0d27fcc 20503fi
ca81d7a0
JD
20504
20505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20506{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20507echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20508
20509# Is the header present?
ca81d7a0
JD
20510{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20511echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20512cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20513/* confdefs.h. */
20514_ACEOF
20515cat confdefs.h >>conftest.$ac_ext
20516cat >>conftest.$ac_ext <<_ACEOF
20517/* end confdefs.h. */
503d2be0
AS
20518#include <$ac_header>
20519_ACEOF
ca81d7a0
JD
20520if { (ac_try="$ac_cpp conftest.$ac_ext"
20521case "(($ac_try" in
20522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20523 *) ac_try_echo=$ac_try;;
20524esac
20525eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20526 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20527 ac_status=$?
6bae0ccf 20528 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20529 rm -f conftest.er1
20530 cat conftest.err >&5
c0d27fcc 20531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20532 (exit $ac_status); } >/dev/null && {
20533 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20534 test ! -s conftest.err
20535 }; then
c0d27fcc 20536 ac_header_preproc=yes
503d2be0
AS
20537else
20538 echo "$as_me: failed program was:" >&5
19650fd6
AS
20539sed 's/^/| /' conftest.$ac_ext >&5
20540
c0d27fcc 20541 ac_header_preproc=no
a21616bd 20542fi
ca81d7a0 20543
503d2be0 20544rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20545{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20546echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20547
20548# So? What about this header?
edfaf76d
LK
20549case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20550 yes:no: )
c0d27fcc
MR
20551 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20552echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20553 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20554echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20555 ac_header_preproc=yes
19650fd6 20556 ;;
edfaf76d 20557 no:yes:* )
c0d27fcc
MR
20558 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20559echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20560 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20561echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20562 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20563echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20564 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20565echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20566 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20567echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20568 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20569echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20570
19650fd6 20571 ;;
c0d27fcc 20572esac
ca81d7a0
JD
20573{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20574echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20575if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20576 echo $ECHO_N "(cached) $ECHO_C" >&6
20577else
edfaf76d 20578 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20579fi
ca81d7a0
JD
20580ac_res=`eval echo '${'$as_ac_Header'}'`
20581 { echo "$as_me:$LINENO: result: $ac_res" >&5
20582echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20583
20584fi
503d2be0 20585if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20586 cat >>confdefs.h <<_ACEOF
503d2be0 20587#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20588_ACEOF
a21616bd
KR
20589
20590fi
c0d27fcc 20591
a21616bd
KR
20592done
20593
98418dba 20594fi
c0d27fcc 20595
925c2f3f
EZ
20596done
20597
98418dba 20598fi
c0d27fcc 20599
925c2f3f 20600done
98418dba 20601
c0d27fcc 20602
925c2f3f
EZ
20603for ac_header in krb.h
20604do
20605as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20606if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20607 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20608echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20609if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 20610 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20611fi
ca81d7a0
JD
20612ac_res=`eval echo '${'$as_ac_Header'}'`
20613 { echo "$as_me:$LINENO: result: $ac_res" >&5
20614echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20615else
20616 # Is the header compilable?
ca81d7a0
JD
20617{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20618echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20619cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20620/* confdefs.h. */
20621_ACEOF
20622cat confdefs.h >>conftest.$ac_ext
20623cat >>conftest.$ac_ext <<_ACEOF
20624/* end confdefs.h. */
c0d27fcc
MR
20625$ac_includes_default
20626#include <$ac_header>
20627_ACEOF
20628rm -f conftest.$ac_objext
ca81d7a0
JD
20629if { (ac_try="$ac_compile"
20630case "(($ac_try" in
20631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20632 *) ac_try_echo=$ac_try;;
20633esac
20634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20635 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20636 ac_status=$?
edfaf76d
LK
20637 grep -v '^ *+' conftest.er1 >conftest.err
20638 rm -f conftest.er1
20639 cat conftest.err >&5
c0d27fcc 20640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20641 (exit $ac_status); } && {
20642 test -z "$ac_c_werror_flag" ||
20643 test ! -s conftest.err
20644 } && test -s conftest.$ac_objext; then
c0d27fcc 20645 ac_header_compiler=yes
925c2f3f 20646else
c0d27fcc 20647 echo "$as_me: failed program was:" >&5
19650fd6
AS
20648sed 's/^/| /' conftest.$ac_ext >&5
20649
ca81d7a0 20650 ac_header_compiler=no
c0d27fcc 20651fi
ca81d7a0
JD
20652
20653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20654{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20655echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20656
20657# Is the header present?
ca81d7a0
JD
20658{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20659echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20660cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20661/* confdefs.h. */
20662_ACEOF
20663cat confdefs.h >>conftest.$ac_ext
20664cat >>conftest.$ac_ext <<_ACEOF
20665/* end confdefs.h. */
503d2be0
AS
20666#include <$ac_header>
20667_ACEOF
ca81d7a0
JD
20668if { (ac_try="$ac_cpp conftest.$ac_ext"
20669case "(($ac_try" in
20670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20671 *) ac_try_echo=$ac_try;;
20672esac
20673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20674 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20675 ac_status=$?
6bae0ccf 20676 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20677 rm -f conftest.er1
20678 cat conftest.err >&5
c0d27fcc 20679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20680 (exit $ac_status); } >/dev/null && {
20681 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20682 test ! -s conftest.err
20683 }; then
c0d27fcc 20684 ac_header_preproc=yes
503d2be0
AS
20685else
20686 echo "$as_me: failed program was:" >&5
19650fd6
AS
20687sed 's/^/| /' conftest.$ac_ext >&5
20688
c0d27fcc 20689 ac_header_preproc=no
a21616bd 20690fi
ca81d7a0 20691
503d2be0 20692rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20693{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20694echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20695
20696# So? What about this header?
edfaf76d
LK
20697case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20698 yes:no: )
c0d27fcc
MR
20699 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20700echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20701 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20702echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20703 ac_header_preproc=yes
19650fd6 20704 ;;
edfaf76d 20705 no:yes:* )
c0d27fcc
MR
20706 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20707echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20708 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20709echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20710 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20711echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20712 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20713echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20714 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20715echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20716 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20717echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20718
19650fd6 20719 ;;
c0d27fcc 20720esac
ca81d7a0
JD
20721{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20722echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20723if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20724 echo $ECHO_N "(cached) $ECHO_C" >&6
20725else
edfaf76d 20726 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20727fi
ca81d7a0
JD
20728ac_res=`eval echo '${'$as_ac_Header'}'`
20729 { echo "$as_me:$LINENO: result: $ac_res" >&5
20730echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20731
20732fi
503d2be0 20733if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20734 cat >>confdefs.h <<_ACEOF
503d2be0 20735#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20736_ACEOF
503d2be0 20737
a21616bd 20738else
503d2be0
AS
20739
20740for ac_header in kerberosIV/krb.h
a21616bd 20741do
503d2be0 20742as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20743if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20744 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20745echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20746if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20747 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20748fi
ca81d7a0
JD
20749ac_res=`eval echo '${'$as_ac_Header'}'`
20750 { echo "$as_me:$LINENO: result: $ac_res" >&5
20751echo "${ECHO_T}$ac_res" >&6; }
98418dba 20752else
c0d27fcc 20753 # Is the header compilable?
ca81d7a0
JD
20754{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20755echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20756cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20757/* confdefs.h. */
20758_ACEOF
20759cat confdefs.h >>conftest.$ac_ext
20760cat >>conftest.$ac_ext <<_ACEOF
20761/* end confdefs.h. */
c0d27fcc
MR
20762$ac_includes_default
20763#include <$ac_header>
20764_ACEOF
20765rm -f conftest.$ac_objext
ca81d7a0
JD
20766if { (ac_try="$ac_compile"
20767case "(($ac_try" in
20768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20769 *) ac_try_echo=$ac_try;;
20770esac
20771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20772 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20773 ac_status=$?
edfaf76d
LK
20774 grep -v '^ *+' conftest.er1 >conftest.err
20775 rm -f conftest.er1
20776 cat conftest.err >&5
c0d27fcc 20777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20778 (exit $ac_status); } && {
20779 test -z "$ac_c_werror_flag" ||
20780 test ! -s conftest.err
20781 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20782 ac_header_compiler=yes
20783else
20784 echo "$as_me: failed program was:" >&5
19650fd6
AS
20785sed 's/^/| /' conftest.$ac_ext >&5
20786
ca81d7a0 20787 ac_header_compiler=no
c0d27fcc 20788fi
ca81d7a0
JD
20789
20790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20791{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20792echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20793
20794# Is the header present?
ca81d7a0
JD
20795{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20796echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20797cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20798/* confdefs.h. */
20799_ACEOF
20800cat confdefs.h >>conftest.$ac_ext
20801cat >>conftest.$ac_ext <<_ACEOF
20802/* end confdefs.h. */
503d2be0
AS
20803#include <$ac_header>
20804_ACEOF
ca81d7a0
JD
20805if { (ac_try="$ac_cpp conftest.$ac_ext"
20806case "(($ac_try" in
20807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20808 *) ac_try_echo=$ac_try;;
20809esac
20810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20811 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20812 ac_status=$?
6bae0ccf 20813 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20814 rm -f conftest.er1
20815 cat conftest.err >&5
c0d27fcc 20816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20817 (exit $ac_status); } >/dev/null && {
20818 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20819 test ! -s conftest.err
20820 }; then
c0d27fcc 20821 ac_header_preproc=yes
503d2be0
AS
20822else
20823 echo "$as_me: failed program was:" >&5
19650fd6
AS
20824sed 's/^/| /' conftest.$ac_ext >&5
20825
c0d27fcc 20826 ac_header_preproc=no
a21616bd 20827fi
ca81d7a0 20828
503d2be0 20829rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20830{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20831echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20832
20833# So? What about this header?
edfaf76d
LK
20834case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20835 yes:no: )
c0d27fcc
MR
20836 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20837echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20838 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20839echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20840 ac_header_preproc=yes
19650fd6 20841 ;;
edfaf76d 20842 no:yes:* )
c0d27fcc
MR
20843 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20844echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20845 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20846echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20847 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20848echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20849 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20850echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20851 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20852echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20853 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20854echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20855
19650fd6 20856 ;;
c0d27fcc 20857esac
ca81d7a0
JD
20858{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20859echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20860if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20861 echo $ECHO_N "(cached) $ECHO_C" >&6
20862else
edfaf76d 20863 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20864fi
ca81d7a0
JD
20865ac_res=`eval echo '${'$as_ac_Header'}'`
20866 { echo "$as_me:$LINENO: result: $ac_res" >&5
20867echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20868
20869fi
503d2be0 20870if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20871 cat >>confdefs.h <<_ACEOF
503d2be0 20872#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20873_ACEOF
503d2be0 20874
a21616bd 20875else
503d2be0
AS
20876
20877for ac_header in kerberos/krb.h
a21616bd 20878do
503d2be0 20879as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20880if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20881 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20882echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20883if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20884 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20885fi
ca81d7a0
JD
20886ac_res=`eval echo '${'$as_ac_Header'}'`
20887 { echo "$as_me:$LINENO: result: $ac_res" >&5
20888echo "${ECHO_T}$ac_res" >&6; }
98418dba 20889else
c0d27fcc 20890 # Is the header compilable?
ca81d7a0
JD
20891{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20892echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20893cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20894/* confdefs.h. */
20895_ACEOF
20896cat confdefs.h >>conftest.$ac_ext
20897cat >>conftest.$ac_ext <<_ACEOF
20898/* end confdefs.h. */
c0d27fcc
MR
20899$ac_includes_default
20900#include <$ac_header>
20901_ACEOF
20902rm -f conftest.$ac_objext
ca81d7a0
JD
20903if { (ac_try="$ac_compile"
20904case "(($ac_try" in
20905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20906 *) ac_try_echo=$ac_try;;
20907esac
20908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20909 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20910 ac_status=$?
edfaf76d
LK
20911 grep -v '^ *+' conftest.er1 >conftest.err
20912 rm -f conftest.er1
20913 cat conftest.err >&5
c0d27fcc 20914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20915 (exit $ac_status); } && {
20916 test -z "$ac_c_werror_flag" ||
20917 test ! -s conftest.err
20918 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20919 ac_header_compiler=yes
20920else
20921 echo "$as_me: failed program was:" >&5
19650fd6
AS
20922sed 's/^/| /' conftest.$ac_ext >&5
20923
ca81d7a0 20924 ac_header_compiler=no
c0d27fcc 20925fi
ca81d7a0
JD
20926
20927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20928{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20929echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20930
20931# Is the header present?
ca81d7a0
JD
20932{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20933echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20934cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20935/* confdefs.h. */
20936_ACEOF
20937cat confdefs.h >>conftest.$ac_ext
20938cat >>conftest.$ac_ext <<_ACEOF
20939/* end confdefs.h. */
503d2be0
AS
20940#include <$ac_header>
20941_ACEOF
ca81d7a0
JD
20942if { (ac_try="$ac_cpp conftest.$ac_ext"
20943case "(($ac_try" in
20944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20945 *) ac_try_echo=$ac_try;;
20946esac
20947eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20948 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20949 ac_status=$?
6bae0ccf 20950 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20951 rm -f conftest.er1
20952 cat conftest.err >&5
c0d27fcc 20953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20954 (exit $ac_status); } >/dev/null && {
20955 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20956 test ! -s conftest.err
20957 }; then
c0d27fcc 20958 ac_header_preproc=yes
503d2be0
AS
20959else
20960 echo "$as_me: failed program was:" >&5
19650fd6
AS
20961sed 's/^/| /' conftest.$ac_ext >&5
20962
c0d27fcc 20963 ac_header_preproc=no
a21616bd 20964fi
ca81d7a0 20965
503d2be0 20966rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20967{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20968echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
20969
20970# So? What about this header?
edfaf76d
LK
20971case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20972 yes:no: )
35996d22
AS
20973 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20974echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20975 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20976echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20977 ac_header_preproc=yes
19650fd6 20978 ;;
edfaf76d 20979 no:yes:* )
c0d27fcc
MR
20980 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20981echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20982 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20983echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20984 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20985echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20986 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20987echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20988 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20989echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20990 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20991echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20992
19650fd6 20993 ;;
c0d27fcc 20994esac
ca81d7a0
JD
20995{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20996echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20997if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20998 echo $ECHO_N "(cached) $ECHO_C" >&6
20999else
edfaf76d 21000 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21001fi
ca81d7a0
JD
21002ac_res=`eval echo '${'$as_ac_Header'}'`
21003 { echo "$as_me:$LINENO: result: $ac_res" >&5
21004echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21005
21006fi
503d2be0 21007if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21008 cat >>confdefs.h <<_ACEOF
503d2be0 21009#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21010_ACEOF
503d2be0 21011
a21616bd 21012fi
c0d27fcc 21013
a21616bd
KR
21014done
21015
21016fi
c0d27fcc 21017
a21616bd
KR
21018done
21019
21020fi
c0d27fcc 21021
a21616bd
KR
21022done
21023
21024 fi
503d2be0
AS
21025
21026for ac_header in com_err.h
a21616bd 21027do
503d2be0 21028as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21029if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21030 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21031echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21032if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21033 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21034fi
ca81d7a0
JD
21035ac_res=`eval echo '${'$as_ac_Header'}'`
21036 { echo "$as_me:$LINENO: result: $ac_res" >&5
21037echo "${ECHO_T}$ac_res" >&6; }
98418dba 21038else
c0d27fcc 21039 # Is the header compilable?
ca81d7a0
JD
21040{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21041echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21042cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21043/* confdefs.h. */
21044_ACEOF
21045cat confdefs.h >>conftest.$ac_ext
21046cat >>conftest.$ac_ext <<_ACEOF
21047/* end confdefs.h. */
c0d27fcc
MR
21048$ac_includes_default
21049#include <$ac_header>
21050_ACEOF
21051rm -f conftest.$ac_objext
ca81d7a0
JD
21052if { (ac_try="$ac_compile"
21053case "(($ac_try" in
21054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21055 *) ac_try_echo=$ac_try;;
21056esac
21057eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21058 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
21059 ac_status=$?
21060 grep -v '^ *+' conftest.er1 >conftest.err
21061 rm -f conftest.er1
21062 cat conftest.err >&5
21063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21064 (exit $ac_status); } && {
21065 test -z "$ac_c_werror_flag" ||
21066 test ! -s conftest.err
21067 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21068 ac_header_compiler=yes
21069else
21070 echo "$as_me: failed program was:" >&5
19650fd6
AS
21071sed 's/^/| /' conftest.$ac_ext >&5
21072
ca81d7a0 21073 ac_header_compiler=no
c0d27fcc 21074fi
ca81d7a0
JD
21075
21076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21077{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21078echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21079
21080# Is the header present?
ca81d7a0
JD
21081{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21082echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21083cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21084/* confdefs.h. */
21085_ACEOF
21086cat confdefs.h >>conftest.$ac_ext
21087cat >>conftest.$ac_ext <<_ACEOF
21088/* end confdefs.h. */
503d2be0
AS
21089#include <$ac_header>
21090_ACEOF
ca81d7a0
JD
21091if { (ac_try="$ac_cpp conftest.$ac_ext"
21092case "(($ac_try" in
21093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21094 *) ac_try_echo=$ac_try;;
21095esac
21096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21097 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21098 ac_status=$?
6bae0ccf 21099 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21100 rm -f conftest.er1
21101 cat conftest.err >&5
c0d27fcc 21102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21103 (exit $ac_status); } >/dev/null && {
21104 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21105 test ! -s conftest.err
21106 }; then
c0d27fcc 21107 ac_header_preproc=yes
503d2be0
AS
21108else
21109 echo "$as_me: failed program was:" >&5
19650fd6
AS
21110sed 's/^/| /' conftest.$ac_ext >&5
21111
c0d27fcc 21112 ac_header_preproc=no
a21616bd 21113fi
ca81d7a0 21114
503d2be0 21115rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21116{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21117echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21118
21119# So? What about this header?
edfaf76d
LK
21120case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21121 yes:no: )
c0d27fcc
MR
21122 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21123echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21124 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21125echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21126 ac_header_preproc=yes
19650fd6 21127 ;;
edfaf76d 21128 no:yes:* )
c0d27fcc
MR
21129 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21130echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21131 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21132echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21133 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21134echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21135 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21136echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21137 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21138echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21139 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21140echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21141
19650fd6 21142 ;;
c0d27fcc 21143esac
ca81d7a0
JD
21144{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21145echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21146if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21147 echo $ECHO_N "(cached) $ECHO_C" >&6
21148else
edfaf76d 21149 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21150fi
ca81d7a0
JD
21151ac_res=`eval echo '${'$as_ac_Header'}'`
21152 { echo "$as_me:$LINENO: result: $ac_res" >&5
21153echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21154
21155fi
503d2be0 21156if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21157 cat >>confdefs.h <<_ACEOF
503d2be0 21158#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21159_ACEOF
503d2be0 21160
a21616bd 21161fi
c0d27fcc 21162
a21616bd
KR
21163done
21164
21165fi
21166
ba4481b5
DL
21167# Solaris requires -lintl if you want strerror (which calls dgettext)
21168# to return localized messages.
503d2be0 21169
ca81d7a0
JD
21170{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
21171echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
21172if test "${ac_cv_lib_intl_dgettext+set}" = set; then
21173 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21174else
503d2be0 21175 ac_check_lib_save_LIBS=$LIBS
ba4481b5 21176LIBS="-lintl $LIBS"
503d2be0 21177cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21178/* confdefs.h. */
21179_ACEOF
21180cat confdefs.h >>conftest.$ac_ext
21181cat >>conftest.$ac_ext <<_ACEOF
21182/* end confdefs.h. */
503d2be0 21183
ca81d7a0
JD
21184/* Override any GCC internal prototype to avoid an error.
21185 Use char because int might match the return type of a GCC
21186 builtin and then its argument prototype would still apply. */
503d2be0
AS
21187#ifdef __cplusplus
21188extern "C"
21189#endif
503d2be0
AS
21190char dgettext ();
21191int
21192main ()
21193{
ca81d7a0 21194return dgettext ();
503d2be0
AS
21195 ;
21196 return 0;
21197}
21198_ACEOF
21199rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21200if { (ac_try="$ac_link"
21201case "(($ac_try" in
21202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21203 *) ac_try_echo=$ac_try;;
21204esac
21205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21206 (eval "$ac_link") 2>conftest.er1
503d2be0 21207 ac_status=$?
edfaf76d
LK
21208 grep -v '^ *+' conftest.er1 >conftest.err
21209 rm -f conftest.er1
21210 cat conftest.err >&5
c0d27fcc 21211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21212 (exit $ac_status); } && {
21213 test -z "$ac_c_werror_flag" ||
21214 test ! -s conftest.err
21215 } && test -s conftest$ac_exeext &&
21216 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21217 ac_cv_lib_intl_dgettext=yes
21218else
21219 echo "$as_me: failed program was:" >&5
19650fd6
AS
21220sed 's/^/| /' conftest.$ac_ext >&5
21221
ca81d7a0 21222 ac_cv_lib_intl_dgettext=no
503d2be0 21223fi
ca81d7a0 21224
f053c89f 21225rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21226 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
21227LIBS=$ac_check_lib_save_LIBS
21228fi
ca81d7a0
JD
21229{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
21230echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 21231if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 21232 cat >>confdefs.h <<_ACEOF
503d2be0 21233#define HAVE_LIBINTL 1
c0d27fcc 21234_ACEOF
ba4481b5
DL
21235
21236 LIBS="-lintl $LIBS"
21237
ba4481b5
DL
21238fi
21239
c0d27fcc 21240
ca81d7a0
JD
21241{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
21242echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
21243if test "${emacs_cv_localtime_cache+set}" = set; then
21244 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
21245else
21246 if test x$ac_cv_func_tzset = xyes; then
21247if test "$cross_compiling" = yes; then
21248 # If we have tzset, assume the worst when cross-compiling.
21249emacs_cv_localtime_cache=yes
21250else
503d2be0 21251 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21252/* confdefs.h. */
21253_ACEOF
21254cat confdefs.h >>conftest.$ac_ext
21255cat >>conftest.$ac_ext <<_ACEOF
21256/* end confdefs.h. */
ba4481b5 21257#include <time.h>
ba4481b5
DL
21258extern char **environ;
21259unset_TZ ()
21260{
21261 char **from, **to;
21262 for (to = from = environ; (*to = *from); from++)
21263 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
21264 to++;
21265}
21266char TZ_GMT0[] = "TZ=GMT0";
21267char TZ_PST8[] = "TZ=PST8";
21268main()
21269{
21270 time_t now = time ((time_t *) 0);
21271 int hour_GMT0, hour_unset;
21272 if (putenv (TZ_GMT0) != 0)
21273 exit (1);
21274 hour_GMT0 = localtime (&now)->tm_hour;
21275 unset_TZ ();
21276 hour_unset = localtime (&now)->tm_hour;
21277 if (putenv (TZ_PST8) != 0)
21278 exit (1);
21279 if (localtime (&now)->tm_hour == hour_GMT0)
21280 exit (1);
21281 unset_TZ ();
21282 if (localtime (&now)->tm_hour != hour_unset)
21283 exit (1);
21284 exit (0);
21285}
503d2be0
AS
21286_ACEOF
21287rm -f conftest$ac_exeext
ca81d7a0
JD
21288if { (ac_try="$ac_link"
21289case "(($ac_try" in
21290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21291 *) ac_try_echo=$ac_try;;
21292esac
21293eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21294 (eval "$ac_link") 2>&5
503d2be0 21295 ac_status=$?
c0d27fcc 21296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21297 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
21298 { (case "(($ac_try" in
21299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21300 *) ac_try_echo=$ac_try;;
21301esac
21302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21303 (eval "$ac_try") 2>&5
503d2be0 21304 ac_status=$?
c0d27fcc 21305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 21306 (exit $ac_status); }; }; then
ba4481b5
DL
21307 emacs_cv_localtime_cache=no
21308else
503d2be0
AS
21309 echo "$as_me: program exited with status $ac_status" >&5
21310echo "$as_me: failed program was:" >&5
19650fd6
AS
21311sed 's/^/| /' conftest.$ac_ext >&5
21312
c0d27fcc 21313( exit $ac_status )
503d2be0 21314emacs_cv_localtime_cache=yes
ba4481b5 21315fi
ca81d7a0 21316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 21317fi
ca81d7a0
JD
21318
21319
ba4481b5
DL
21320else
21321 # If we lack tzset, report that localtime does not cache TZ,
21322 # since we can't invalidate the cache if we don't have tzset.
21323 emacs_cv_localtime_cache=no
21324fi
21325fi
ca81d7a0
JD
21326{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
21327echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 21328if test $emacs_cv_localtime_cache = yes; then
b936fae4 21329
c0d27fcc 21330cat >>confdefs.h <<\_ACEOF
ba4481b5 21331#define LOCALTIME_CACHE 1
c0d27fcc 21332_ACEOF
ba4481b5
DL
21333
21334fi
21335
21336if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
21337
21338for ac_func in gettimeofday
48d4b120 21339do
503d2be0 21340as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
21341{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21342echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
21343if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21344 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 21345else
503d2be0 21346 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21347/* confdefs.h. */
21348_ACEOF
21349cat confdefs.h >>conftest.$ac_ext
21350cat >>conftest.$ac_ext <<_ACEOF
21351/* end confdefs.h. */
edfaf76d
LK
21352/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21353 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21354#define $ac_func innocuous_$ac_func
21355
48d4b120 21356/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21357 which can conflict with char $ac_func (); below.
21358 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21359 <limits.h> exists even on freestanding compilers. */
edfaf76d 21360
19650fd6
AS
21361#ifdef __STDC__
21362# include <limits.h>
21363#else
21364# include <assert.h>
21365#endif
edfaf76d
LK
21366
21367#undef $ac_func
21368
ca81d7a0
JD
21369/* Override any GCC internal prototype to avoid an error.
21370 Use char because int might match the return type of a GCC
21371 builtin and then its argument prototype would still apply. */
503d2be0
AS
21372#ifdef __cplusplus
21373extern "C"
21374#endif
503d2be0 21375char $ac_func ();
48d4b120
DL
21376/* The GNU C library defines this for functions which it implements
21377 to always fail with ENOSYS. Some functions are actually named
21378 something starting with __ and the normal name is an alias. */
ca81d7a0 21379#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 21380choke me
cd958eb3
MB
21381#endif
21382
19650fd6
AS
21383int
21384main ()
21385{
ca81d7a0 21386return $ac_func ();
503d2be0
AS
21387 ;
21388 return 0;
21389}
21390_ACEOF
21391rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21392if { (ac_try="$ac_link"
21393case "(($ac_try" in
21394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21395 *) ac_try_echo=$ac_try;;
21396esac
21397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21398 (eval "$ac_link") 2>conftest.er1
503d2be0 21399 ac_status=$?
edfaf76d
LK
21400 grep -v '^ *+' conftest.er1 >conftest.err
21401 rm -f conftest.er1
21402 cat conftest.err >&5
c0d27fcc 21403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21404 (exit $ac_status); } && {
21405 test -z "$ac_c_werror_flag" ||
21406 test ! -s conftest.err
21407 } && test -s conftest$ac_exeext &&
21408 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21409 eval "$as_ac_var=yes"
21410else
21411 echo "$as_me: failed program was:" >&5
19650fd6
AS
21412sed 's/^/| /' conftest.$ac_ext >&5
21413
ca81d7a0 21414 eval "$as_ac_var=no"
503d2be0 21415fi
ca81d7a0 21416
f053c89f 21417rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21418 conftest$ac_exeext conftest.$ac_ext
503d2be0 21419fi
ca81d7a0
JD
21420ac_res=`eval echo '${'$as_ac_var'}'`
21421 { echo "$as_me:$LINENO: result: $ac_res" >&5
21422echo "${ECHO_T}$ac_res" >&6; }
503d2be0 21423if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 21424 cat >>confdefs.h <<_ACEOF
503d2be0 21425#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 21426_ACEOF
48d4b120 21427
48d4b120
DL
21428fi
21429done
21430
b936fae4 21431 if test $ac_cv_func_gettimeofday = yes; then
ca81d7a0
JD
21432 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
21433echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
21434if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
21435 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21436else
503d2be0 21437 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21438/* confdefs.h. */
21439_ACEOF
21440cat confdefs.h >>conftest.$ac_ext
21441cat >>conftest.$ac_ext <<_ACEOF
21442/* end confdefs.h. */
ba4481b5 21443
a3f08d9e
DL
21444#ifdef TIME_WITH_SYS_TIME
21445#include <sys/time.h>
21446#include <time.h>
21447#else
21448#ifdef HAVE_SYS_TIME_H
21449#include <sys/time.h>
21450#else
21451#include <time.h>
21452#endif
21453#endif
503d2be0
AS
21454int
21455main ()
21456{
a3f08d9e 21457struct timeval time;
b936fae4 21458 gettimeofday (&time, 0);
503d2be0
AS
21459 ;
21460 return 0;
21461}
21462_ACEOF
21463rm -f conftest.$ac_objext
f053c89f
CY
21464if { (ac_try="$ac_compile"
21465case "(($ac_try" in
ca81d7a0
JD
21466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21467 *) ac_try_echo=$ac_try;;
21468esac
21469eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 21470 (eval "$ac_compile") 2>conftest.er1
503d2be0 21471 ac_status=$?
f053c89f
CY
21472 grep -v '^ *+' conftest.er1 >conftest.err
21473 rm -f conftest.er1
21474 cat conftest.err >&5
c0d27fcc 21475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21476 (exit $ac_status); } && {
21477 test -z "$ac_c_werror_flag" ||
21478 test ! -s conftest.err
21479 } && test -s conftest.$ac_objext; then
ba4481b5
DL
21480 emacs_cv_gettimeofday_two_arguments=yes
21481else
503d2be0 21482 echo "$as_me: failed program was:" >&5
19650fd6
AS
21483sed 's/^/| /' conftest.$ac_ext >&5
21484
ca81d7a0 21485 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 21486fi
ca81d7a0
JD
21487
21488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 21489fi
ca81d7a0
JD
21490{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
21491echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
21492 if test $emacs_cv_gettimeofday_two_arguments = no; then
21493
c0d27fcc 21494cat >>confdefs.h <<\_ACEOF
ba4481b5 21495#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 21496_ACEOF
ba4481b5 21497
b936fae4 21498 fi
ba4481b5
DL
21499 fi
21500fi
21501
21502ok_so_far=yes
ca81d7a0
JD
21503{ echo "$as_me:$LINENO: checking for socket" >&5
21504echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
21505if test "${ac_cv_func_socket+set}" = set; then
21506 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21507else
503d2be0 21508 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21509/* confdefs.h. */
21510_ACEOF
21511cat confdefs.h >>conftest.$ac_ext
21512cat >>conftest.$ac_ext <<_ACEOF
21513/* end confdefs.h. */
edfaf76d
LK
21514/* Define socket to an innocuous variant, in case <limits.h> declares socket.
21515 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21516#define socket innocuous_socket
21517
ba4481b5 21518/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
21519 which can conflict with char socket (); below.
21520 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21521 <limits.h> exists even on freestanding compilers. */
edfaf76d 21522
19650fd6
AS
21523#ifdef __STDC__
21524# include <limits.h>
21525#else
21526# include <assert.h>
21527#endif
edfaf76d
LK
21528
21529#undef socket
21530
ca81d7a0
JD
21531/* Override any GCC internal prototype to avoid an error.
21532 Use char because int might match the return type of a GCC
21533 builtin and then its argument prototype would still apply. */
503d2be0
AS
21534#ifdef __cplusplus
21535extern "C"
21536#endif
503d2be0 21537char socket ();
ba4481b5
DL
21538/* The GNU C library defines this for functions which it implements
21539 to always fail with ENOSYS. Some functions are actually named
21540 something starting with __ and the normal name is an alias. */
ca81d7a0 21541#if defined __stub_socket || defined __stub___socket
ba4481b5 21542choke me
cd958eb3
MB
21543#endif
21544
19650fd6
AS
21545int
21546main ()
21547{
ca81d7a0 21548return socket ();
503d2be0
AS
21549 ;
21550 return 0;
21551}
21552_ACEOF
21553rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21554if { (ac_try="$ac_link"
21555case "(($ac_try" in
21556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21557 *) ac_try_echo=$ac_try;;
21558esac
21559eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21560 (eval "$ac_link") 2>conftest.er1
503d2be0 21561 ac_status=$?
edfaf76d
LK
21562 grep -v '^ *+' conftest.er1 >conftest.err
21563 rm -f conftest.er1
21564 cat conftest.err >&5
c0d27fcc 21565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21566 (exit $ac_status); } && {
21567 test -z "$ac_c_werror_flag" ||
21568 test ! -s conftest.err
21569 } && test -s conftest$ac_exeext &&
21570 $as_test_x conftest$ac_exeext; then
503d2be0
AS
21571 ac_cv_func_socket=yes
21572else
21573 echo "$as_me: failed program was:" >&5
19650fd6
AS
21574sed 's/^/| /' conftest.$ac_ext >&5
21575
ca81d7a0 21576 ac_cv_func_socket=no
503d2be0 21577fi
ca81d7a0 21578
f053c89f 21579rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 21580 conftest$ac_exeext conftest.$ac_ext
503d2be0 21581fi
ca81d7a0
JD
21582{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
21583echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 21584if test $ac_cv_func_socket = yes; then
ba4481b5
DL
21585 :
21586else
503d2be0 21587 ok_so_far=no
ba4481b5
DL
21588fi
21589
21590if test $ok_so_far = yes; then
c0d27fcc 21591 if test "${ac_cv_header_netinet_in_h+set}" = set; then
ca81d7a0
JD
21592 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
21593echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
21594if test "${ac_cv_header_netinet_in_h+set}" = set; then
21595 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21596fi
ca81d7a0
JD
21597{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
21598echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 21599else
c0d27fcc 21600 # Is the header compilable?
ca81d7a0
JD
21601{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
21602echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 21603cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21604/* confdefs.h. */
21605_ACEOF
21606cat confdefs.h >>conftest.$ac_ext
21607cat >>conftest.$ac_ext <<_ACEOF
21608/* end confdefs.h. */
c0d27fcc
MR
21609$ac_includes_default
21610#include <netinet/in.h>
21611_ACEOF
21612rm -f conftest.$ac_objext
ca81d7a0
JD
21613if { (ac_try="$ac_compile"
21614case "(($ac_try" in
21615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21616 *) ac_try_echo=$ac_try;;
21617esac
21618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21619 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21620 ac_status=$?
edfaf76d
LK
21621 grep -v '^ *+' conftest.er1 >conftest.err
21622 rm -f conftest.er1
21623 cat conftest.err >&5
c0d27fcc 21624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21625 (exit $ac_status); } && {
21626 test -z "$ac_c_werror_flag" ||
21627 test ! -s conftest.err
21628 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21629 ac_header_compiler=yes
21630else
21631 echo "$as_me: failed program was:" >&5
19650fd6
AS
21632sed 's/^/| /' conftest.$ac_ext >&5
21633
ca81d7a0 21634 ac_header_compiler=no
c0d27fcc 21635fi
ca81d7a0
JD
21636
21637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21638{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21639echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21640
21641# Is the header present?
ca81d7a0
JD
21642{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
21643echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 21644cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21645/* confdefs.h. */
21646_ACEOF
21647cat confdefs.h >>conftest.$ac_ext
21648cat >>conftest.$ac_ext <<_ACEOF
21649/* end confdefs.h. */
ba4481b5 21650#include <netinet/in.h>
503d2be0 21651_ACEOF
ca81d7a0
JD
21652if { (ac_try="$ac_cpp conftest.$ac_ext"
21653case "(($ac_try" in
21654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21655 *) ac_try_echo=$ac_try;;
21656esac
21657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21658 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21659 ac_status=$?
6bae0ccf 21660 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21661 rm -f conftest.er1
21662 cat conftest.err >&5
c0d27fcc 21663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21664 (exit $ac_status); } >/dev/null && {
21665 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21666 test ! -s conftest.err
21667 }; then
c0d27fcc 21668 ac_header_preproc=yes
ba4481b5 21669else
503d2be0 21670 echo "$as_me: failed program was:" >&5
19650fd6
AS
21671sed 's/^/| /' conftest.$ac_ext >&5
21672
c0d27fcc 21673 ac_header_preproc=no
ba4481b5 21674fi
ca81d7a0 21675
503d2be0 21676rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21677{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21678echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21679
21680# So? What about this header?
edfaf76d
LK
21681case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21682 yes:no: )
c0d27fcc
MR
21683 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
21684echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21685 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
21686echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
21687 ac_header_preproc=yes
19650fd6 21688 ;;
edfaf76d 21689 no:yes:* )
c0d27fcc
MR
21690 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
21691echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
21692 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
21693echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
21694 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
21695echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
21696 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
21697echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21698 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 21699echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21700 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
21701echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21702
19650fd6 21703 ;;
c0d27fcc 21704esac
ca81d7a0
JD
21705{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
21706echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
21707if test "${ac_cv_header_netinet_in_h+set}" = set; then
21708 echo $ECHO_N "(cached) $ECHO_C" >&6
21709else
21710 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 21711fi
ca81d7a0
JD
21712{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
21713echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
21714
21715fi
503d2be0 21716if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
21717 :
21718else
503d2be0 21719 ok_so_far=no
ba4481b5
DL
21720fi
21721
c0d27fcc 21722
ba4481b5
DL
21723fi
21724if test $ok_so_far = yes; then
c0d27fcc 21725 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
ca81d7a0
JD
21726 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
21727echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
21728if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21729 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21730fi
ca81d7a0
JD
21731{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
21732echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 21733else
c0d27fcc 21734 # Is the header compilable?
ca81d7a0
JD
21735{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
21736echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 21737cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21738/* confdefs.h. */
21739_ACEOF
21740cat confdefs.h >>conftest.$ac_ext
21741cat >>conftest.$ac_ext <<_ACEOF
21742/* end confdefs.h. */
c0d27fcc
MR
21743$ac_includes_default
21744#include <arpa/inet.h>
21745_ACEOF
21746rm -f conftest.$ac_objext
ca81d7a0
JD
21747if { (ac_try="$ac_compile"
21748case "(($ac_try" in
21749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21750 *) ac_try_echo=$ac_try;;
21751esac
21752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21753 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21754 ac_status=$?
edfaf76d
LK
21755 grep -v '^ *+' conftest.er1 >conftest.err
21756 rm -f conftest.er1
21757 cat conftest.err >&5
c0d27fcc 21758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21759 (exit $ac_status); } && {
21760 test -z "$ac_c_werror_flag" ||
21761 test ! -s conftest.err
21762 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21763 ac_header_compiler=yes
21764else
21765 echo "$as_me: failed program was:" >&5
19650fd6
AS
21766sed 's/^/| /' conftest.$ac_ext >&5
21767
ca81d7a0 21768 ac_header_compiler=no
c0d27fcc 21769fi
ca81d7a0
JD
21770
21771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21772{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21773echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21774
21775# Is the header present?
ca81d7a0
JD
21776{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
21777echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 21778cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21779/* confdefs.h. */
21780_ACEOF
21781cat confdefs.h >>conftest.$ac_ext
21782cat >>conftest.$ac_ext <<_ACEOF
21783/* end confdefs.h. */
ba4481b5 21784#include <arpa/inet.h>
503d2be0 21785_ACEOF
ca81d7a0
JD
21786if { (ac_try="$ac_cpp conftest.$ac_ext"
21787case "(($ac_try" in
21788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21789 *) ac_try_echo=$ac_try;;
21790esac
21791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21792 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21793 ac_status=$?
6bae0ccf 21794 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21795 rm -f conftest.er1
21796 cat conftest.err >&5
c0d27fcc 21797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21798 (exit $ac_status); } >/dev/null && {
21799 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21800 test ! -s conftest.err
21801 }; then
c0d27fcc 21802 ac_header_preproc=yes
ba4481b5 21803else
503d2be0 21804 echo "$as_me: failed program was:" >&5
19650fd6
AS
21805sed 's/^/| /' conftest.$ac_ext >&5
21806
c0d27fcc 21807 ac_header_preproc=no
ba4481b5 21808fi
ca81d7a0 21809
503d2be0 21810rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21811{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21812echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21813
21814# So? What about this header?
edfaf76d
LK
21815case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21816 yes:no: )
c0d27fcc
MR
21817 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
21818echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21819 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
21820echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
21821 ac_header_preproc=yes
19650fd6 21822 ;;
edfaf76d 21823 no:yes:* )
c0d27fcc
MR
21824 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
21825echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
21826 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
21827echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
21828 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
21829echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
21830 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
21831echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21832 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 21833echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21834 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
21835echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21836
19650fd6 21837 ;;
c0d27fcc 21838esac
ca81d7a0
JD
21839{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
21840echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
21841if test "${ac_cv_header_arpa_inet_h+set}" = set; then
21842 echo $ECHO_N "(cached) $ECHO_C" >&6
21843else
21844 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 21845fi
ca81d7a0
JD
21846{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
21847echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
21848
21849fi
503d2be0 21850if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
21851 :
21852else
503d2be0 21853 ok_so_far=no
ba4481b5
DL
21854fi
21855
c0d27fcc 21856
ba4481b5
DL
21857fi
21858if test $ok_so_far = yes; then
b936fae4 21859
c0d27fcc 21860cat >>confdefs.h <<\_ACEOF
ba4481b5 21861#define HAVE_INET_SOCKETS 1
c0d27fcc 21862_ACEOF
ba4481b5
DL
21863
21864fi
21865
2d2b6695 21866
7862d3a8 21867for ac_header in sys/ioctl.h
2d2b6695
KS
21868do
21869as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21870if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21871 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21872echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21873if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
21874 echo $ECHO_N "(cached) $ECHO_C" >&6
21875fi
ca81d7a0
JD
21876ac_res=`eval echo '${'$as_ac_Header'}'`
21877 { echo "$as_me:$LINENO: result: $ac_res" >&5
21878echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
21879else
21880 # Is the header compilable?
ca81d7a0
JD
21881{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21882echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 21883cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
21884/* confdefs.h. */
21885_ACEOF
21886cat confdefs.h >>conftest.$ac_ext
21887cat >>conftest.$ac_ext <<_ACEOF
21888/* end confdefs.h. */
21889$ac_includes_default
21890#include <$ac_header>
21891_ACEOF
21892rm -f conftest.$ac_objext
ca81d7a0
JD
21893if { (ac_try="$ac_compile"
21894case "(($ac_try" in
21895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21896 *) ac_try_echo=$ac_try;;
21897esac
21898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21899 (eval "$ac_compile") 2>conftest.er1
2d2b6695 21900 ac_status=$?
edfaf76d
LK
21901 grep -v '^ *+' conftest.er1 >conftest.err
21902 rm -f conftest.er1
21903 cat conftest.err >&5
2d2b6695 21904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21905 (exit $ac_status); } && {
21906 test -z "$ac_c_werror_flag" ||
21907 test ! -s conftest.err
21908 } && test -s conftest.$ac_objext; then
2d2b6695
KS
21909 ac_header_compiler=yes
21910else
21911 echo "$as_me: failed program was:" >&5
21912sed 's/^/| /' conftest.$ac_ext >&5
21913
ca81d7a0 21914 ac_header_compiler=no
2d2b6695 21915fi
ca81d7a0
JD
21916
21917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21918{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21919echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
21920
21921# Is the header present?
ca81d7a0
JD
21922{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21923echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 21924cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
21925/* confdefs.h. */
21926_ACEOF
21927cat confdefs.h >>conftest.$ac_ext
21928cat >>conftest.$ac_ext <<_ACEOF
21929/* end confdefs.h. */
21930#include <$ac_header>
21931_ACEOF
ca81d7a0
JD
21932if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
21939 ac_status=$?
21940 grep -v '^ *+' conftest.er1 >conftest.err
21941 rm -f conftest.er1
21942 cat conftest.err >&5
21943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21944 (exit $ac_status); } >/dev/null && {
21945 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21946 test ! -s conftest.err
21947 }; then
2d2b6695
KS
21948 ac_header_preproc=yes
21949else
21950 echo "$as_me: failed program was:" >&5
21951sed 's/^/| /' conftest.$ac_ext >&5
21952
21953 ac_header_preproc=no
21954fi
ca81d7a0 21955
2d2b6695 21956rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21957{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21958echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
21959
21960# So? What about this header?
edfaf76d
LK
21961case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21962 yes:no: )
2d2b6695
KS
21963 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21964echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21965 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21966echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21967 ac_header_preproc=yes
2d2b6695 21968 ;;
edfaf76d 21969 no:yes:* )
2d2b6695
KS
21970 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21971echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21972 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21973echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21974 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21975echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21976 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21977echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
21978 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
21979echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21980 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21981echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21982
2d2b6695
KS
21983 ;;
21984esac
ca81d7a0
JD
21985{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21986echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21987if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
21988 echo $ECHO_N "(cached) $ECHO_C" >&6
21989else
edfaf76d 21990 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 21991fi
ca81d7a0
JD
21992ac_res=`eval echo '${'$as_ac_Header'}'`
21993 { echo "$as_me:$LINENO: result: $ac_res" >&5
21994echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
21995
21996fi
21997if test `eval echo '${'$as_ac_Header'}'` = yes; then
21998 cat >>confdefs.h <<_ACEOF
21999#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22000_ACEOF
22001
22002fi
22003
22004done
22005
22006
ba4481b5 22007if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 22008
c0d27fcc 22009cat >>confdefs.h <<\_ACEOF
ba4481b5 22010#define HAVE_AIX_SMT_EXP 1
c0d27fcc 22011_ACEOF
ba4481b5
DL
22012
22013fi
22014
ca81d7a0
JD
22015{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
22016echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 22017if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ca81d7a0
JD
22018 { echo "$as_me:$LINENO: result: yes" >&5
22019echo "${ECHO_T}yes" >&6; }
b936fae4 22020
c0d27fcc 22021cat >>confdefs.h <<\_ACEOF
3d9fec71 22022#define HAVE_DEV_PTMX 1
c0d27fcc 22023_ACEOF
3d9fec71
DL
22024
22025else
ca81d7a0
JD
22026 { echo "$as_me:$LINENO: result: no" >&5
22027echo "${ECHO_T}no" >&6; }
3d9fec71
DL
22028fi
22029
ca81d7a0
JD
22030{ echo "$as_me:$LINENO: checking for pid_t" >&5
22031echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
22032if test "${ac_cv_type_pid_t+set}" = set; then
22033 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 22034else
503d2be0 22035 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22036/* confdefs.h. */
22037_ACEOF
22038cat confdefs.h >>conftest.$ac_ext
22039cat >>conftest.$ac_ext <<_ACEOF
22040/* end confdefs.h. */
503d2be0 22041$ac_includes_default
ca81d7a0 22042typedef pid_t ac__type_new_;
503d2be0
AS
22043int
22044main ()
22045{
ca81d7a0 22046if ((ac__type_new_ *) 0)
503d2be0 22047 return 0;
ca81d7a0 22048if (sizeof (ac__type_new_))
503d2be0
AS
22049 return 0;
22050 ;
22051 return 0;
22052}
22053_ACEOF
22054rm -f conftest.$ac_objext
ca81d7a0
JD
22055if { (ac_try="$ac_compile"
22056case "(($ac_try" in
22057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22058 *) ac_try_echo=$ac_try;;
22059esac
22060eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22061 (eval "$ac_compile") 2>conftest.er1
503d2be0 22062 ac_status=$?
edfaf76d
LK
22063 grep -v '^ *+' conftest.er1 >conftest.err
22064 rm -f conftest.er1
22065 cat conftest.err >&5
c0d27fcc 22066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22067 (exit $ac_status); } && {
22068 test -z "$ac_c_werror_flag" ||
22069 test ! -s conftest.err
22070 } && test -s conftest.$ac_objext; then
647847ea
DL
22071 ac_cv_type_pid_t=yes
22072else
503d2be0 22073 echo "$as_me: failed program was:" >&5
19650fd6
AS
22074sed 's/^/| /' conftest.$ac_ext >&5
22075
ca81d7a0 22076 ac_cv_type_pid_t=no
647847ea 22077fi
ca81d7a0
JD
22078
22079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 22080fi
ca81d7a0
JD
22081{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
22082echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
22083if test $ac_cv_type_pid_t = yes; then
22084 :
22085else
22086
c0d27fcc 22087cat >>confdefs.h <<_ACEOF
647847ea 22088#define pid_t int
c0d27fcc 22089_ACEOF
647847ea
DL
22090
22091fi
22092
c0d27fcc 22093
ca81d7a0 22094for ac_header in vfork.h
503d2be0
AS
22095do
22096as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22097if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22098 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22099echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22100if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22101 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22102fi
ca81d7a0
JD
22103ac_res=`eval echo '${'$as_ac_Header'}'`
22104 { echo "$as_me:$LINENO: result: $ac_res" >&5
22105echo "${ECHO_T}$ac_res" >&6; }
98418dba 22106else
c0d27fcc 22107 # Is the header compilable?
ca81d7a0
JD
22108{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22109echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22110cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22111/* confdefs.h. */
22112_ACEOF
22113cat confdefs.h >>conftest.$ac_ext
22114cat >>conftest.$ac_ext <<_ACEOF
22115/* end confdefs.h. */
c0d27fcc
MR
22116$ac_includes_default
22117#include <$ac_header>
22118_ACEOF
22119rm -f conftest.$ac_objext
ca81d7a0
JD
22120if { (ac_try="$ac_compile"
22121case "(($ac_try" in
22122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22123 *) ac_try_echo=$ac_try;;
22124esac
22125eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22126 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22127 ac_status=$?
edfaf76d
LK
22128 grep -v '^ *+' conftest.er1 >conftest.err
22129 rm -f conftest.er1
22130 cat conftest.err >&5
c0d27fcc 22131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22132 (exit $ac_status); } && {
22133 test -z "$ac_c_werror_flag" ||
22134 test ! -s conftest.err
22135 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22136 ac_header_compiler=yes
22137else
22138 echo "$as_me: failed program was:" >&5
19650fd6
AS
22139sed 's/^/| /' conftest.$ac_ext >&5
22140
ca81d7a0 22141 ac_header_compiler=no
c0d27fcc 22142fi
ca81d7a0
JD
22143
22144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22145{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22146echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22147
22148# Is the header present?
ca81d7a0
JD
22149{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22150echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22151cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22152/* confdefs.h. */
22153_ACEOF
22154cat confdefs.h >>conftest.$ac_ext
22155cat >>conftest.$ac_ext <<_ACEOF
22156/* end confdefs.h. */
503d2be0
AS
22157#include <$ac_header>
22158_ACEOF
ca81d7a0
JD
22159if { (ac_try="$ac_cpp conftest.$ac_ext"
22160case "(($ac_try" in
22161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22162 *) ac_try_echo=$ac_try;;
22163esac
22164eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22165 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22166 ac_status=$?
6bae0ccf 22167 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22168 rm -f conftest.er1
22169 cat conftest.err >&5
c0d27fcc 22170 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22171 (exit $ac_status); } >/dev/null && {
22172 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22173 test ! -s conftest.err
22174 }; then
c0d27fcc 22175 ac_header_preproc=yes
647847ea 22176else
503d2be0 22177 echo "$as_me: failed program was:" >&5
19650fd6
AS
22178sed 's/^/| /' conftest.$ac_ext >&5
22179
c0d27fcc 22180 ac_header_preproc=no
647847ea 22181fi
ca81d7a0 22182
503d2be0 22183rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22184{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22185echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22186
22187# So? What about this header?
edfaf76d
LK
22188case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22189 yes:no: )
c0d27fcc
MR
22190 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22191echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22192 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22193echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22194 ac_header_preproc=yes
19650fd6 22195 ;;
edfaf76d 22196 no:yes:* )
c0d27fcc
MR
22197 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22198echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22199 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22200echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22201 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22202echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22203 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22204echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22205 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22206echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22207 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22208echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22209
19650fd6 22210 ;;
c0d27fcc 22211esac
ca81d7a0
JD
22212{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22213echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22214if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
22215 echo $ECHO_N "(cached) $ECHO_C" >&6
22216else
edfaf76d 22217 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 22218fi
ca81d7a0
JD
22219ac_res=`eval echo '${'$as_ac_Header'}'`
22220 { echo "$as_me:$LINENO: result: $ac_res" >&5
22221echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
22222
22223fi
503d2be0 22224if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 22225 cat >>confdefs.h <<_ACEOF
503d2be0 22226#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 22227_ACEOF
647847ea 22228
73b77ee5 22229fi
c0d27fcc 22230
503d2be0 22231done
73b77ee5 22232
c0d27fcc
MR
22233
22234
503d2be0
AS
22235for ac_func in fork vfork
22236do
22237as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
22238{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22239echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22240if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22241 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22242else
503d2be0 22243 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22244/* confdefs.h. */
22245_ACEOF
22246cat confdefs.h >>conftest.$ac_ext
22247cat >>conftest.$ac_ext <<_ACEOF
22248/* end confdefs.h. */
edfaf76d
LK
22249/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22250 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22251#define $ac_func innocuous_$ac_func
22252
fa0b693c 22253/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22254 which can conflict with char $ac_func (); below.
22255 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22256 <limits.h> exists even on freestanding compilers. */
edfaf76d 22257
19650fd6
AS
22258#ifdef __STDC__
22259# include <limits.h>
22260#else
22261# include <assert.h>
22262#endif
edfaf76d
LK
22263
22264#undef $ac_func
22265
ca81d7a0
JD
22266/* Override any GCC internal prototype to avoid an error.
22267 Use char because int might match the return type of a GCC
22268 builtin and then its argument prototype would still apply. */
503d2be0
AS
22269#ifdef __cplusplus
22270extern "C"
22271#endif
503d2be0 22272char $ac_func ();
fa0b693c
GM
22273/* The GNU C library defines this for functions which it implements
22274 to always fail with ENOSYS. Some functions are actually named
22275 something starting with __ and the normal name is an alias. */
ca81d7a0 22276#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 22277choke me
fa0b693c
GM
22278#endif
22279
19650fd6
AS
22280int
22281main ()
22282{
ca81d7a0 22283return $ac_func ();
503d2be0
AS
22284 ;
22285 return 0;
22286}
22287_ACEOF
22288rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22289if { (ac_try="$ac_link"
22290case "(($ac_try" in
22291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22292 *) ac_try_echo=$ac_try;;
22293esac
22294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22295 (eval "$ac_link") 2>conftest.er1
503d2be0 22296 ac_status=$?
edfaf76d
LK
22297 grep -v '^ *+' conftest.er1 >conftest.err
22298 rm -f conftest.er1
22299 cat conftest.err >&5
c0d27fcc 22300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22301 (exit $ac_status); } && {
22302 test -z "$ac_c_werror_flag" ||
22303 test ! -s conftest.err
22304 } && test -s conftest$ac_exeext &&
22305 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22306 eval "$as_ac_var=yes"
22307else
22308 echo "$as_me: failed program was:" >&5
19650fd6
AS
22309sed 's/^/| /' conftest.$ac_ext >&5
22310
ca81d7a0 22311 eval "$as_ac_var=no"
503d2be0 22312fi
ca81d7a0 22313
f053c89f 22314rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22315 conftest$ac_exeext conftest.$ac_ext
503d2be0 22316fi
ca81d7a0
JD
22317ac_res=`eval echo '${'$as_ac_var'}'`
22318 { echo "$as_me:$LINENO: result: $ac_res" >&5
22319echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22320if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22321 cat >>confdefs.h <<_ACEOF
503d2be0 22322#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22323_ACEOF
503d2be0 22324
fa0b693c 22325fi
503d2be0 22326done
fa0b693c 22327
503d2be0 22328if test "x$ac_cv_func_fork" = xyes; then
ca81d7a0
JD
22329 { echo "$as_me:$LINENO: checking for working fork" >&5
22330echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
22331if test "${ac_cv_func_fork_works+set}" = set; then
22332 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 22333else
503d2be0
AS
22334 if test "$cross_compiling" = yes; then
22335 ac_cv_func_fork_works=cross
22336else
22337 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
22338/* confdefs.h. */
22339_ACEOF
22340cat confdefs.h >>conftest.$ac_ext
22341cat >>conftest.$ac_ext <<_ACEOF
22342/* end confdefs.h. */
22343$ac_includes_default
22344int
22345main ()
22346{
22347
22348 /* By Ruediger Kuhlmann. */
22349 return fork () < 0;
22350
22351 ;
22352 return 0;
22353}
503d2be0
AS
22354_ACEOF
22355rm -f conftest$ac_exeext
ca81d7a0
JD
22356if { (ac_try="$ac_link"
22357case "(($ac_try" in
22358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22359 *) ac_try_echo=$ac_try;;
22360esac
22361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22362 (eval "$ac_link") 2>&5
503d2be0 22363 ac_status=$?
c0d27fcc 22364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22365 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22366 { (case "(($ac_try" in
22367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22368 *) ac_try_echo=$ac_try;;
22369esac
22370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22371 (eval "$ac_try") 2>&5
503d2be0 22372 ac_status=$?
c0d27fcc 22373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
22374 (exit $ac_status); }; }; then
22375 ac_cv_func_fork_works=yes
22376else
22377 echo "$as_me: program exited with status $ac_status" >&5
22378echo "$as_me: failed program was:" >&5
19650fd6
AS
22379sed 's/^/| /' conftest.$ac_ext >&5
22380
c0d27fcc 22381( exit $ac_status )
503d2be0
AS
22382ac_cv_func_fork_works=no
22383fi
ca81d7a0 22384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 22385fi
ca81d7a0
JD
22386
22387
503d2be0 22388fi
ca81d7a0
JD
22389{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
22390echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 22391
6bae0ccf
DL
22392else
22393 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
22394fi
22395if test "x$ac_cv_func_fork_works" = xcross; then
22396 case $host in
22397 *-*-amigaos* | *-*-msdosdjgpp*)
22398 # Override, as these systems have only a dummy fork() stub
22399 ac_cv_func_fork_works=no
22400 ;;
22401 *)
22402 ac_cv_func_fork_works=yes
22403 ;;
22404 esac
c0d27fcc
MR
22405 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
22406echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 22407fi
73b77ee5 22408ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 22409if test "x$ac_cv_func_vfork" = xyes; then
ca81d7a0
JD
22410 { echo "$as_me:$LINENO: checking for working vfork" >&5
22411echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
22412if test "${ac_cv_func_vfork_works+set}" = set; then
22413 echo $ECHO_N "(cached) $ECHO_C" >&6
22414else
22415 if test "$cross_compiling" = yes; then
22416 ac_cv_func_vfork_works=cross
fa0b693c 22417else
503d2be0 22418 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22419/* confdefs.h. */
22420_ACEOF
22421cat confdefs.h >>conftest.$ac_ext
22422cat >>conftest.$ac_ext <<_ACEOF
22423/* end confdefs.h. */
73b77ee5 22424/* Thanks to Paul Eggert for this test. */
ca81d7a0 22425$ac_includes_default
19650fd6 22426#include <sys/wait.h>
f053c89f 22427#ifdef HAVE_VFORK_H
503d2be0 22428# include <vfork.h>
73b77ee5
GM
22429#endif
22430/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
22431 argument registers are propagated back to the parent. The compiler
22432 is told about this with #include <vfork.h>, but some compilers
22433 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
22434 static variable whose address is put into a register that is
22435 clobbered by the vfork. */
19650fd6 22436static void
fa0b693c 22437#ifdef __cplusplus
73b77ee5 22438sparc_address_test (int arg)
503d2be0 22439# else
73b77ee5 22440sparc_address_test (arg) int arg;
fa0b693c 22441#endif
fa0b693c 22442{
73b77ee5
GM
22443 static pid_t child;
22444 if (!child) {
22445 child = vfork ();
22446 if (child < 0) {
22447 perror ("vfork");
22448 _exit(2);
22449 }
22450 if (!child) {
22451 arg = getpid();
22452 write(-1, "", 0);
22453 _exit (arg);
22454 }
22455 }
22456}
503d2be0
AS
22457
22458int
22459main ()
22460{
73b77ee5
GM
22461 pid_t parent = getpid ();
22462 pid_t child;
fa0b693c 22463
19650fd6 22464 sparc_address_test (0);
fa0b693c 22465
73b77ee5 22466 child = vfork ();
fa0b693c 22467
73b77ee5 22468 if (child == 0) {
503d2be0
AS
22469 /* Here is another test for sparc vfork register problems. This
22470 test uses lots of local variables, at least as many local
22471 variables as main has allocated so far including compiler
22472 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
22473 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
22474 reuse the register of parent for one of the local variables,
22475 since it will think that parent can't possibly be used any more
22476 in this routine. Assigning to the local variable will thus
22477 munge parent in the parent process. */
73b77ee5
GM
22478 pid_t
22479 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22480 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22481 /* Convince the compiler that p..p7 are live; otherwise, it might
22482 use the same hardware register for all 8 local variables. */
22483 if (p != p1 || p != p2 || p != p3 || p != p4
22484 || p != p5 || p != p6 || p != p7)
22485 _exit(1);
fa0b693c 22486
503d2be0
AS
22487 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22488 from child file descriptors. If the child closes a descriptor
22489 before it execs or exits, this munges the parent's descriptor
22490 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
22491 _exit(close(fileno(stdout)) != 0);
22492 } else {
22493 int status;
22494 struct stat st;
22495
22496 while (wait(&status) != child)
22497 ;
ca81d7a0 22498 return (
73b77ee5
GM
22499 /* Was there some problem with vforking? */
22500 child < 0
22501
22502 /* Did the child fail? (This shouldn't happen.) */
22503 || status
22504
22505 /* Did the vfork/compiler bug occur? */
22506 || parent != getpid()
fa0b693c 22507
73b77ee5
GM
22508 /* Did the file descriptor bug occur? */
22509 || fstat(fileno(stdout), &st) != 0
22510 );
22511 }
22512}
503d2be0
AS
22513_ACEOF
22514rm -f conftest$ac_exeext
ca81d7a0
JD
22515if { (ac_try="$ac_link"
22516case "(($ac_try" in
22517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22518 *) ac_try_echo=$ac_try;;
22519esac
22520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22521 (eval "$ac_link") 2>&5
503d2be0 22522 ac_status=$?
c0d27fcc 22523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22524 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22525 { (case "(($ac_try" in
22526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22527 *) ac_try_echo=$ac_try;;
22528esac
22529eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22530 (eval "$ac_try") 2>&5
503d2be0 22531 ac_status=$?
c0d27fcc 22532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22533 (exit $ac_status); }; }; then
73b77ee5 22534 ac_cv_func_vfork_works=yes
fa0b693c 22535else
503d2be0
AS
22536 echo "$as_me: program exited with status $ac_status" >&5
22537echo "$as_me: failed program was:" >&5
19650fd6
AS
22538sed 's/^/| /' conftest.$ac_ext >&5
22539
c0d27fcc 22540( exit $ac_status )
503d2be0
AS
22541ac_cv_func_vfork_works=no
22542fi
ca81d7a0 22543rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 22544fi
ca81d7a0
JD
22545
22546
fa0b693c 22547fi
ca81d7a0
JD
22548{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
22549echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 22550
503d2be0
AS
22551fi;
22552if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 22553 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
22554 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
22555echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
22556fi
22557
503d2be0
AS
22558if test "x$ac_cv_func_vfork_works" = xyes; then
22559
c0d27fcc 22560cat >>confdefs.h <<\_ACEOF
503d2be0 22561#define HAVE_WORKING_VFORK 1
c0d27fcc 22562_ACEOF
503d2be0
AS
22563
22564else
22565
c0d27fcc 22566cat >>confdefs.h <<\_ACEOF
73b77ee5 22567#define vfork fork
c0d27fcc 22568_ACEOF
fa0b693c
GM
22569
22570fi
503d2be0
AS
22571if test "x$ac_cv_func_fork_works" = xyes; then
22572
c0d27fcc 22573cat >>confdefs.h <<\_ACEOF
503d2be0 22574#define HAVE_WORKING_FORK 1
c0d27fcc 22575_ACEOF
fa0b693c 22576
503d2be0 22577fi
647847ea 22578
c0d27fcc 22579
ca81d7a0
JD
22580{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
22581echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
22582if test "${emacs_cv_langinfo_codeset+set}" = set; then
22583 echo $ECHO_N "(cached) $ECHO_C" >&6
22584else
22585 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22586/* confdefs.h. */
22587_ACEOF
22588cat confdefs.h >>conftest.$ac_ext
22589cat >>conftest.$ac_ext <<_ACEOF
22590/* end confdefs.h. */
6a3a24fa
JD
22591#include <langinfo.h>
22592int
22593main ()
22594{
22595char* cs = nl_langinfo(CODESET);
22596 ;
22597 return 0;
22598}
22599_ACEOF
22600rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22601if { (ac_try="$ac_link"
22602case "(($ac_try" in
22603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22604 *) ac_try_echo=$ac_try;;
22605esac
22606eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22607 (eval "$ac_link") 2>conftest.er1
6a3a24fa 22608 ac_status=$?
edfaf76d
LK
22609 grep -v '^ *+' conftest.er1 >conftest.err
22610 rm -f conftest.er1
22611 cat conftest.err >&5
6a3a24fa 22612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22613 (exit $ac_status); } && {
22614 test -z "$ac_c_werror_flag" ||
22615 test ! -s conftest.err
22616 } && test -s conftest$ac_exeext &&
22617 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
22618 emacs_cv_langinfo_codeset=yes
22619else
22620 echo "$as_me: failed program was:" >&5
19650fd6
AS
22621sed 's/^/| /' conftest.$ac_ext >&5
22622
ca81d7a0 22623 emacs_cv_langinfo_codeset=no
6a3a24fa 22624fi
ca81d7a0 22625
f053c89f 22626rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22627 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
22628
22629fi
ca81d7a0
JD
22630{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
22631echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
22632if test $emacs_cv_langinfo_codeset = yes; then
22633
22634cat >>confdefs.h <<\_ACEOF
22635#define HAVE_LANGINFO_CODESET 1
22636_ACEOF
22637
22638fi
22639
ca81d7a0
JD
22640{ echo "$as_me:$LINENO: checking for size_t" >&5
22641echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
22642if test "${ac_cv_type_size_t+set}" = set; then
22643 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 22644else
503d2be0 22645 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22646/* confdefs.h. */
22647_ACEOF
22648cat confdefs.h >>conftest.$ac_ext
22649cat >>conftest.$ac_ext <<_ACEOF
22650/* end confdefs.h. */
503d2be0 22651$ac_includes_default
ca81d7a0 22652typedef size_t ac__type_new_;
503d2be0
AS
22653int
22654main ()
22655{
ca81d7a0 22656if ((ac__type_new_ *) 0)
503d2be0 22657 return 0;
ca81d7a0 22658if (sizeof (ac__type_new_))
503d2be0
AS
22659 return 0;
22660 ;
22661 return 0;
22662}
22663_ACEOF
22664rm -f conftest.$ac_objext
ca81d7a0
JD
22665if { (ac_try="$ac_compile"
22666case "(($ac_try" in
22667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22668 *) ac_try_echo=$ac_try;;
22669esac
22670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22671 (eval "$ac_compile") 2>conftest.er1
503d2be0 22672 ac_status=$?
edfaf76d
LK
22673 grep -v '^ *+' conftest.er1 >conftest.err
22674 rm -f conftest.er1
22675 cat conftest.err >&5
c0d27fcc 22676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22677 (exit $ac_status); } && {
22678 test -z "$ac_c_werror_flag" ||
22679 test ! -s conftest.err
22680 } && test -s conftest.$ac_objext; then
8730a8da
DL
22681 ac_cv_type_size_t=yes
22682else
503d2be0 22683 echo "$as_me: failed program was:" >&5
19650fd6
AS
22684sed 's/^/| /' conftest.$ac_ext >&5
22685
ca81d7a0 22686 ac_cv_type_size_t=no
8730a8da 22687fi
ca81d7a0
JD
22688
22689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 22690fi
ca81d7a0
JD
22691{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
22692echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 22693if test $ac_cv_type_size_t = yes; then
503d2be0 22694
c0d27fcc
MR
22695cat >>confdefs.h <<_ACEOF
22696#define HAVE_SIZE_T 1
22697_ACEOF
22698
8730a8da
DL
22699
22700fi
22701
c0d27fcc 22702
ca81d7a0
JD
22703{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
22704echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
22705if test "${ac_cv_type_mbstate_t+set}" = set; then
22706 echo $ECHO_N "(cached) $ECHO_C" >&6
22707else
22708 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22709/* confdefs.h. */
22710_ACEOF
22711cat confdefs.h >>conftest.$ac_ext
22712cat >>conftest.$ac_ext <<_ACEOF
22713/* end confdefs.h. */
973a76b1
DL
22714$ac_includes_default
22715# include <wchar.h>
22716int
22717main ()
22718{
22719mbstate_t x; return sizeof x;
22720 ;
22721 return 0;
22722}
22723_ACEOF
22724rm -f conftest.$ac_objext
ca81d7a0
JD
22725if { (ac_try="$ac_compile"
22726case "(($ac_try" in
22727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22728 *) ac_try_echo=$ac_try;;
22729esac
22730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22731 (eval "$ac_compile") 2>conftest.er1
973a76b1 22732 ac_status=$?
edfaf76d
LK
22733 grep -v '^ *+' conftest.er1 >conftest.err
22734 rm -f conftest.er1
22735 cat conftest.err >&5
973a76b1 22736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22737 (exit $ac_status); } && {
22738 test -z "$ac_c_werror_flag" ||
22739 test ! -s conftest.err
22740 } && test -s conftest.$ac_objext; then
973a76b1
DL
22741 ac_cv_type_mbstate_t=yes
22742else
22743 echo "$as_me: failed program was:" >&5
19650fd6
AS
22744sed 's/^/| /' conftest.$ac_ext >&5
22745
ca81d7a0 22746 ac_cv_type_mbstate_t=no
973a76b1 22747fi
ca81d7a0
JD
22748
22749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 22750fi
ca81d7a0
JD
22751{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
22752echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
22753 if test $ac_cv_type_mbstate_t = yes; then
22754
22755cat >>confdefs.h <<\_ACEOF
22756#define HAVE_MBSTATE_T 1
22757_ACEOF
22758
22759 else
22760
22761cat >>confdefs.h <<\_ACEOF
22762#define mbstate_t int
22763_ACEOF
22764
22765 fi
22766
ca81d7a0
JD
22767{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
22768echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
22769if test "${emacs_cv_c_restrict+set}" = set; then
22770 echo $ECHO_N "(cached) $ECHO_C" >&6
22771else
22772 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22773/* confdefs.h. */
22774_ACEOF
22775cat confdefs.h >>conftest.$ac_ext
22776cat >>conftest.$ac_ext <<_ACEOF
22777/* end confdefs.h. */
22044edf
DL
22778void fred (int *restrict x);
22779int
22780main ()
22781{
b936fae4 22782
22044edf
DL
22783 ;
22784 return 0;
22785}
c0d27fcc 22786_ACEOF
22044edf 22787rm -f conftest.$ac_objext
ca81d7a0
JD
22788if { (ac_try="$ac_compile"
22789case "(($ac_try" in
22790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22791 *) ac_try_echo=$ac_try;;
22792esac
22793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22794 (eval "$ac_compile") 2>conftest.er1
22044edf 22795 ac_status=$?
edfaf76d
LK
22796 grep -v '^ *+' conftest.er1 >conftest.err
22797 rm -f conftest.er1
22798 cat conftest.err >&5
22044edf 22799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22800 (exit $ac_status); } && {
22801 test -z "$ac_c_werror_flag" ||
22802 test ! -s conftest.err
22803 } && test -s conftest.$ac_objext; then
22044edf
DL
22804 emacs_cv_c_restrict=yes
22805else
22806 echo "$as_me: failed program was:" >&5
19650fd6
AS
22807sed 's/^/| /' conftest.$ac_ext >&5
22808
ca81d7a0 22809 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22810/* confdefs.h. */
22811_ACEOF
22812cat confdefs.h >>conftest.$ac_ext
22813cat >>conftest.$ac_ext <<_ACEOF
22814/* end confdefs.h. */
22044edf
DL
22815void fred (int *__restrict x);
22816int
22817main ()
22818{
c0d27fcc 22819
22044edf
DL
22820 ;
22821 return 0;
22822}
c0d27fcc 22823_ACEOF
22044edf 22824rm -f conftest.$ac_objext
ca81d7a0
JD
22825if { (ac_try="$ac_compile"
22826case "(($ac_try" in
22827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22828 *) ac_try_echo=$ac_try;;
22829esac
22830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22831 (eval "$ac_compile") 2>conftest.er1
22044edf 22832 ac_status=$?
edfaf76d
LK
22833 grep -v '^ *+' conftest.er1 >conftest.err
22834 rm -f conftest.er1
22835 cat conftest.err >&5
22044edf 22836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22837 (exit $ac_status); } && {
22838 test -z "$ac_c_werror_flag" ||
22839 test ! -s conftest.err
22840 } && test -s conftest.$ac_objext; then
22044edf
DL
22841 emacs_cv_c_restrict=__restrict
22842else
22843 echo "$as_me: failed program was:" >&5
19650fd6
AS
22844sed 's/^/| /' conftest.$ac_ext >&5
22845
ca81d7a0 22846 emacs_cv_c_restrict=no
ba4481b5 22847fi
ca81d7a0
JD
22848
22849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22850fi
ca81d7a0
JD
22851
22852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22853fi
ca81d7a0
JD
22854{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
22855echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
22856case "$emacs_cv_c_restrict" in
22857 yes) emacs_restrict=restrict;;
22858 no) emacs_restrict="";;
22859 *) emacs_restrict="$emacs_cv_c_restrict";;
22860esac
22861if test "$emacs_restrict" != __restrict; then
b936fae4 22862
22044edf
DL
22863cat >>confdefs.h <<_ACEOF
22864#define __restrict $emacs_restrict
c0d27fcc 22865_ACEOF
ba4481b5
DL
22866
22867fi
ba4481b5 22868
ca81d7a0
JD
22869{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
22870echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
22871if test "${emacs_cv_c_restrict_arr+set}" = set; then
22872 echo $ECHO_N "(cached) $ECHO_C" >&6
22873else
22874 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22875/* confdefs.h. */
22876_ACEOF
22877cat confdefs.h >>conftest.$ac_ext
22878cat >>conftest.$ac_ext <<_ACEOF
22879/* end confdefs.h. */
22044edf
DL
22880void fred (int x[__restrict]);
22881int
22882main ()
22883{
b936fae4 22884
22044edf
DL
22885 ;
22886 return 0;
22887}
c0d27fcc 22888_ACEOF
22044edf 22889rm -f conftest.$ac_objext
ca81d7a0
JD
22890if { (ac_try="$ac_compile"
22891case "(($ac_try" in
22892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22893 *) ac_try_echo=$ac_try;;
22894esac
22895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22896 (eval "$ac_compile") 2>conftest.er1
22044edf 22897 ac_status=$?
edfaf76d
LK
22898 grep -v '^ *+' conftest.er1 >conftest.err
22899 rm -f conftest.er1
22900 cat conftest.err >&5
22044edf 22901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22902 (exit $ac_status); } && {
22903 test -z "$ac_c_werror_flag" ||
22904 test ! -s conftest.err
22905 } && test -s conftest.$ac_objext; then
22044edf
DL
22906 emacs_cv_c_restrict_arr=yes
22907else
22908 echo "$as_me: failed program was:" >&5
19650fd6
AS
22909sed 's/^/| /' conftest.$ac_ext >&5
22910
ca81d7a0 22911 emacs_cv_c_restrict_arr=no
ba4481b5 22912fi
ca81d7a0
JD
22913
22914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 22915fi
ca81d7a0
JD
22916{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
22917echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 22918if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 22919
c0d27fcc 22920cat >>confdefs.h <<\_ACEOF
22044edf 22921#define __restrict_arr __restrict
c0d27fcc 22922_ACEOF
ba4481b5 22923
ba4481b5
DL
22924fi
22925
c0d27fcc 22926
c0d27fcc 22927
22044edf
DL
22928# Set up the CFLAGS for real compilation, so we can substitute it.
22929CFLAGS="$REAL_CFLAGS"
22930CPPFLAGS="$REAL_CPPFLAGS"
22931
22932#### Find out which version of Emacs this is.
22933version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
22934 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
22935if test x"${version}" = x; then
22936 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
22937echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
22938 { (exit 1); exit 1; }; }
22939fi
22940
22941### Specify what sort of things we'll be editing into Makefile and config.h.
22942### Use configuration here uncanonicalized to avoid exceeding size limits.
22943
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962
22963
22964
22965
22966
22967
22968
22969
22970
22971
22972
22973
22974
6a3a24fa 22975
22044edf
DL
22976
22977
22978cat >>confdefs.h <<_ACEOF
22979#define EMACS_CONFIGURATION "${canonical}"
22980_ACEOF
22981
22982
22983cat >>confdefs.h <<_ACEOF
22984#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
22985_ACEOF
22986
22987
22988cat >>confdefs.h <<_ACEOF
22989#define config_machfile "${machfile}"
22990_ACEOF
22991
22992
22993cat >>confdefs.h <<_ACEOF
22994#define config_opsysfile "${opsysfile}"
22995_ACEOF
22996
22997
22998cat >>confdefs.h <<_ACEOF
22999#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
23000_ACEOF
23001
23002
23003cat >>confdefs.h <<_ACEOF
23004#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
23005_ACEOF
23006
23007
23008cat >>confdefs.h <<_ACEOF
23009#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
23010_ACEOF
23011
23012
23013cat >>confdefs.h <<_ACEOF
23014#define UNEXEC_SRC ${UNEXEC_SRC}
23015_ACEOF
23016
23017
23018if test "${HAVE_X_WINDOWS}" = "yes" ; then
23019
23020cat >>confdefs.h <<\_ACEOF
23021#define HAVE_X_WINDOWS 1
23022_ACEOF
23023
23024fi
23025if test "${USE_X_TOOLKIT}" != "none" ; then
23026
23027cat >>confdefs.h <<\_ACEOF
23028#define USE_X_TOOLKIT 1
23029_ACEOF
23030
23031fi
23032if test "${HAVE_X11}" = "yes" ; then
23033
23034cat >>confdefs.h <<\_ACEOF
23035#define HAVE_X11 1
23036_ACEOF
23037
23038fi
23039if test "${HAVE_XFREE386}" = "yes" ; then
23040
23041cat >>confdefs.h <<\_ACEOF
23042#define HAVE_XFREE386 1
23043_ACEOF
23044
23045fi
23046if test "${HAVE_MENUS}" = "yes" ; then
23047
23048cat >>confdefs.h <<\_ACEOF
23049#define HAVE_MENUS 1
23050_ACEOF
23051
23052fi
23053if test "${GNU_MALLOC}" = "yes" ; then
23054
23055cat >>confdefs.h <<\_ACEOF
23056#define GNU_MALLOC 1
23057_ACEOF
23058
23059fi
23060if test "${REL_ALLOC}" = "yes" ; then
23061
23062cat >>confdefs.h <<\_ACEOF
23063#define REL_ALLOC 1
23064_ACEOF
23065
23066fi
23067
23068
23069
c0d27fcc
MR
23070
23071
ba4481b5 23072#### Report on what we decided to do.
488dd4c4
JD
23073#### Report GTK as a toolkit, even if it doesn't use Xt.
23074#### It makes printing result more understandable as using GTK sets
23075#### toolkit_scroll_bars to yes by default.
23076if test "${HAVE_GTK}" = "yes"; then
23077 USE_X_TOOLKIT=GTK
23078fi
23079
ba4481b5
DL
23080echo "
23081Configured for \`${canonical}'.
23082
23083 Where should the build process find the source code? ${srcdir}
23084 What operating system and machine description files should Emacs use?
23085 \`${opsysfile}' and \`${machfile}'
23086 What compiler should emacs be built with? ${CC} ${CFLAGS}
23087 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 23088 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 23089 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 23090 What window system should Emacs use? ${window_system}
8e967cf7 23091 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
23092
23093if test -n "${x_includes}"; then
23094echo " Where do we find X Windows header files? ${x_includes}"
23095else
23096echo " Where do we find X Windows header files? Standard dirs"
23097fi
23098if test -n "${x_libraries}"; then
23099echo " Where do we find X Windows libraries? ${x_libraries}"
23100else
23101echo " Where do we find X Windows libraries? Standard dirs"
23102fi
23103
23104echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
23105echo " Does Emacs use -lXpm? ${HAVE_XPM}"
23106echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
23107echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
23108echo " Does Emacs use -lungif? ${HAVE_GIF}"
23109echo " Does Emacs use -lpng? ${HAVE_PNG}"
23110echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
23111echo
23112
d0098f13
JD
23113if test $USE_XASSERTS = yes; then
23114 echo " Compiling with asserts turned on."
d0098f13
JD
23115 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
23116 echo
23117fi
05cf15c6 23118
a2d3b5bd
JD
23119if test "$USE_X_TOOLKIT" = GTK; then
23120 case "$canonical" in
23121 *cygwin*)
23122 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
23123 will probably get a crash on startup. If this happens, please use another
23124 toolkit for Emacs. See etc/PROBLEMS for more information."
23125 ;;
23126 esac
23127fi
23128
05cf15c6 23129
05cf15c6 23130
ba4481b5
DL
23131# Remove any trailing slashes in these variables.
23132test "${prefix}" != NONE &&
23133 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
23134test "${exec_prefix}" != NONE &&
23135 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
23136
d0e9bfd2
GM
23137## Check if the C preprocessor will convert `..' to `. .'. If so, set
23138## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
23139## from Makefile.c can correctly provide the arg `-traditional' to the
23140## C preprocessor.
23141
503d2be0 23142cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23143/* confdefs.h. */
23144_ACEOF
23145cat confdefs.h >>conftest.$ac_ext
23146cat >>conftest.$ac_ext <<_ACEOF
23147/* end confdefs.h. */
d0e9bfd2 23148yes..yes
503d2be0 23149_ACEOF
d0e9bfd2 23150if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 23151 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
23152 CPP_NEED_TRADITIONAL=no
23153else
d0e9bfd2
GM
23154 CPP_NEED_TRADITIONAL=yes
23155fi
23156rm -f conftest*
23157
c0d27fcc 23158
ca81d7a0
JD
23159ac_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"
23160
23161ac_config_commands="$ac_config_commands default"
23162
503d2be0 23163cat >confcache <<\_ACEOF
ba4481b5
DL
23164# This file is a shell script that caches the results of configure
23165# tests run on this system so they can be shared between configure
503d2be0
AS
23166# scripts and configure runs, see configure's option --config-cache.
23167# It is not useful on other systems. If it contains results you don't
23168# want to keep, you may remove or edit it.
ba4481b5 23169#
503d2be0
AS
23170# config.status only pays attention to the cache file if you give it
23171# the --recheck option to rerun configure.
ba4481b5 23172#
6bae0ccf 23173# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
23174# loading this file, other *unset* `ac_cv_foo' will be assigned the
23175# following values.
23176
23177_ACEOF
23178
ba4481b5
DL
23179# The following way of writing the cache mishandles newlines in values,
23180# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 23181# So, we kill variables containing newlines.
ba4481b5
DL
23182# Ultrix sh set writes to stderr and can't be redirected directly,
23183# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
23184(
23185 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23186 eval ac_val=\$$ac_var
23187 case $ac_val in #(
23188 *${as_nl}*)
23189 case $ac_var in #(
23190 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
23191echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
23192 esac
23193 case $ac_var in #(
23194 _ | IFS | as_nl) ;; #(
23195 *) $as_unset $ac_var ;;
23196 esac ;;
23197 esac
23198 done
23199
503d2be0 23200 (set) 2>&1 |
ca81d7a0
JD
23201 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23202 *${as_nl}ac_space=\ *)
503d2be0
AS
23203 # `set' does not quote correctly, so add quotes (double-quote
23204 # substitution turns \\\\ into \\, and sed turns \\ into \).
23205 sed -n \
edfaf76d
LK
23206 "s/'/'\\\\''/g;
23207 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 23208 ;; #(
503d2be0
AS
23209 *)
23210 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 23211 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 23212 ;;
ca81d7a0
JD
23213 esac |
23214 sort
23215) |
503d2be0 23216 sed '
ca81d7a0 23217 /^ac_cv_env_/b end
503d2be0 23218 t clear
ca81d7a0 23219 :clear
503d2be0
AS
23220 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23221 t end
ca81d7a0
JD
23222 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23223 :end' >>confcache
23224if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23225 if test -w "$cache_file"; then
23226 test "x$cache_file" != "x/dev/null" &&
23227 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
23228echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 23229 cat confcache >$cache_file
ba4481b5 23230 else
ca81d7a0
JD
23231 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
23232echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
23233 fi
23234fi
23235rm -f confcache
23236
ba4481b5
DL
23237test "x$prefix" = xNONE && prefix=$ac_default_prefix
23238# Let make expand exec_prefix.
23239test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23240
ba4481b5
DL
23241DEFS=-DHAVE_CONFIG_H
23242
6bae0ccf
DL
23243ac_libobjs=
23244ac_ltlibobjs=
23245for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23246 # 1. Remove the extension, and $U if already installed.
ca81d7a0
JD
23247 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
23248 ac_i=`echo "$ac_i" | sed "$ac_script"`
23249 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
23250 # will be set to the directory where LIBOBJS objects are built.
23251 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23252 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
23253done
23254LIBOBJS=$ac_libobjs
23255
23256LTLIBOBJS=$ac_ltlibobjs
23257
23258
c0d27fcc 23259
ba4481b5 23260: ${CONFIG_STATUS=./config.status}
503d2be0
AS
23261ac_clean_files_save=$ac_clean_files
23262ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 23263{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
23264echo "$as_me: creating $CONFIG_STATUS" >&6;}
23265cat >$CONFIG_STATUS <<_ACEOF
23266#! $SHELL
c0d27fcc 23267# Generated by $as_me.
ba4481b5 23268# Run this file to recreate the current configuration.
ba4481b5 23269# Compiler output produced by configure, useful for debugging
503d2be0 23270# configure, is in config.log if it exists.
ba4481b5 23271
503d2be0 23272debug=false
19650fd6
AS
23273ac_cs_recheck=false
23274ac_cs_silent=false
503d2be0 23275SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
23276_ACEOF
23277
23278cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
23279## --------------------- ##
23280## M4sh Initialization. ##
23281## --------------------- ##
23282
f053c89f
CY
23283# Be more Bourne compatible
23284DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
23285if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23286 emulate sh
23287 NULLCMD=:
6bae0ccf
DL
23288 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
23289 # is contrary to our usage. Disable this feature.
23290 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
23291 setopt NO_GLOB_SUBST
23292else
f053c89f
CY
23293 case `(set -o) 2>/dev/null` in
23294 *posix*) set -o posix ;;
23295esac
23296
503d2be0 23297fi
f053c89f
CY
23298
23299
503d2be0 23300
ca81d7a0
JD
23301
23302# PATH needs CR
23303# Avoid depending upon Character Ranges.
23304as_cr_letters='abcdefghijklmnopqrstuvwxyz'
23305as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
23306as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23307as_cr_digits='0123456789'
23308as_cr_alnum=$as_cr_Letters$as_cr_digits
23309
23310# The user is always right.
23311if test "${PATH_SEPARATOR+set}" != set; then
23312 echo "#! /bin/sh" >conf$$.sh
23313 echo "exit 0" >>conf$$.sh
23314 chmod +x conf$$.sh
23315 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
23316 PATH_SEPARATOR=';'
23317 else
23318 PATH_SEPARATOR=:
23319 fi
23320 rm -f conf$$.sh
23321fi
23322
c0d27fcc 23323# Support unset when possible.
edfaf76d 23324if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
23325 as_unset=unset
23326else
23327 as_unset=false
23328fi
23329
6bae0ccf 23330
ca81d7a0
JD
23331# IFS
23332# We need space, tab and new line, in precisely that order. Quoting is
23333# there to prevent editors from complaining about space-tab.
23334# (If _AS_PATH_WALK were called with IFS unset, it would disable word
23335# splitting by setting IFS to empty value.)
23336as_nl='
23337'
23338IFS=" "" $as_nl"
23339
23340# Find who we are. Look in the path if we contain no directory separator.
23341case $0 in
23342 *[\\/]* ) as_myself=$0 ;;
23343 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23344for as_dir in $PATH
23345do
23346 IFS=$as_save_IFS
23347 test -z "$as_dir" && as_dir=.
23348 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23349done
23350IFS=$as_save_IFS
23351
23352 ;;
23353esac
23354# We did not find ourselves, most probably we were run as `sh COMMAND'
23355# in which case we are not to be found in the path.
23356if test "x$as_myself" = x; then
23357 as_myself=$0
23358fi
23359if test ! -f "$as_myself"; then
23360 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
23361 { (exit 1); exit 1; }
23362fi
23363
6bae0ccf 23364# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
23365for as_var in ENV MAIL MAILPATH
23366do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
23367done
6bae0ccf
DL
23368PS1='$ '
23369PS2='> '
23370PS4='+ '
23371
23372# NLS nuisances.
19650fd6
AS
23373for as_var in \
23374 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
23375 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
23376 LC_TELEPHONE LC_TIME
6bae0ccf 23377do
edfaf76d 23378 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
23379 eval $as_var=C; export $as_var
23380 else
ca81d7a0 23381 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
23382 fi
23383done
23384
23385# Required to use basename.
ca81d7a0
JD
23386if expr a : '\(a\)' >/dev/null 2>&1 &&
23387 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
23388 as_expr=expr
23389else
23390 as_expr=false
23391fi
23392
ca81d7a0 23393if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
23394 as_basename=basename
23395else
23396 as_basename=false
23397fi
c0d27fcc
MR
23398
23399
503d2be0 23400# Name of the executable.
ca81d7a0 23401as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
23402$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
23403 X"$0" : 'X\(//\)$' \| \
ca81d7a0 23404 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 23405echo X/"$0" |
ca81d7a0
JD
23406 sed '/^.*\/\([^/][^/]*\)\/*$/{
23407 s//\1/
23408 q
23409 }
23410 /^X\/\(\/\/\)$/{
23411 s//\1/
23412 q
23413 }
23414 /^X\/\(\/\).*/{
23415 s//\1/
23416 q
23417 }
23418 s/.*/./; q'`
c0d27fcc 23419
ca81d7a0
JD
23420# CDPATH.
23421$as_unset CDPATH
4b411bfe
CY
23422
23423
c0d27fcc
MR
23424
23425 as_lineno_1=$LINENO
23426 as_lineno_2=$LINENO
c0d27fcc 23427 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 23428 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
23429
23430 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23431 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
23432 # line-number line after each line using $LINENO; the second 'sed'
23433 # does the real work. The second script uses 'N' to pair each
23434 # line-number line with the line containing $LINENO, and appends
23435 # trailing '-' during substitution so that $LINENO is not a special
23436 # case at line end.
c0d27fcc 23437 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
23438 # scripts with optimization help from Paolo Bonzini. Blame Lee
23439 # E. McMahon (1931-1989) for sed's syntax. :-)
23440 sed -n '
23441 p
23442 /[$]LINENO/=
23443 ' <$as_myself |
c0d27fcc 23444 sed '
ca81d7a0
JD
23445 s/[$]LINENO.*/&-/
23446 t lineno
23447 b
23448 :lineno
c0d27fcc 23449 N
ca81d7a0
JD
23450 :loop
23451 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 23452 t loop
ca81d7a0 23453 s/-\n.*//
c0d27fcc 23454 ' >$as_me.lineno &&
ca81d7a0
JD
23455 chmod +x "$as_me.lineno" ||
23456 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
23457 { (exit 1); exit 1; }; }
23458
23459 # Don't try to exec as it changes $[0], causing all sort of problems
23460 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
23461 # original and so on. Autoconf is especially sensitive to this).
23462 . "./$as_me.lineno"
c0d27fcc
MR
23463 # Exit status is that of the last command.
23464 exit
23465}
23466
23467
ca81d7a0
JD
23468if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
23469 as_dirname=dirname
23470else
23471 as_dirname=false
23472fi
23473
23474ECHO_C= ECHO_N= ECHO_T=
23475case `echo -n x` in
23476-n*)
23477 case `echo 'x\c'` in
23478 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
23479 *) ECHO_C='\c';;
23480 esac;;
23481*)
23482 ECHO_N='-n';;
c0d27fcc 23483esac
503d2be0 23484
ca81d7a0
JD
23485if expr a : '\(a\)' >/dev/null 2>&1 &&
23486 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
23487 as_expr=expr
23488else
23489 as_expr=false
23490fi
23491
23492rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
23493if test -d conf$$.dir; then
23494 rm -f conf$$.dir/conf$$.file
23495else
23496 rm -f conf$$.dir
23497 mkdir conf$$.dir
23498fi
503d2be0
AS
23499echo >conf$$.file
23500if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
23501 as_ln_s='ln -s'
23502 # ... but there are two gotchas:
23503 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
23504 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
23505 # In both cases, we have to default to `cp -p'.
23506 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 23507 as_ln_s='cp -p'
503d2be0
AS
23508elif ln conf$$.file conf$$ 2>/dev/null; then
23509 as_ln_s=ln
23510else
23511 as_ln_s='cp -p'
23512fi
ca81d7a0
JD
23513rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
23514rmdir conf$$.dir 2>/dev/null
503d2be0 23515
6bae0ccf
DL
23516if mkdir -p . 2>/dev/null; then
23517 as_mkdir_p=:
23518else
edfaf76d 23519 test -d ./-p && rmdir ./-p
6bae0ccf
DL
23520 as_mkdir_p=false
23521fi
23522
f053c89f
CY
23523if test -x / >/dev/null 2>&1; then
23524 as_test_x='test -x'
ca81d7a0 23525else
f053c89f
CY
23526 if ls -dL / >/dev/null 2>&1; then
23527 as_ls_L_option=L
23528 else
23529 as_ls_L_option=
23530 fi
23531 as_test_x='
23532 eval sh -c '\''
23533 if test -d "$1"; then
23534 test -d "$1/.";
23535 else
23536 case $1 in
23537 -*)set "./$1";;
23538 esac;
23539 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
23540 ???[sx]*):;;*)false;;esac;fi
23541 '\'' sh
23542 '
ca81d7a0 23543fi
f053c89f 23544as_executable_p=$as_test_x
503d2be0 23545
c0d27fcc 23546# Sed expression to map a string onto a valid CPP name.
edfaf76d 23547as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
23548
23549# Sed expression to map a string onto a valid variable name.
edfaf76d 23550as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 23551
503d2be0 23552
503d2be0
AS
23553exec 6>&1
23554
ca81d7a0 23555# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 23556# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
23557# values after options handling.
23558ac_log="
c0d27fcc 23559This file was extended by $as_me, which was
f053c89f 23560generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
23561
23562 CONFIG_FILES = $CONFIG_FILES
23563 CONFIG_HEADERS = $CONFIG_HEADERS
23564 CONFIG_LINKS = $CONFIG_LINKS
23565 CONFIG_COMMANDS = $CONFIG_COMMANDS
23566 $ $0 $@
23567
ca81d7a0
JD
23568on `(hostname || uname -n) 2>/dev/null | sed 1q`
23569"
23570
503d2be0
AS
23571_ACEOF
23572
ca81d7a0 23573cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 23574# Files that config.status was made for.
ca81d7a0
JD
23575config_files="$ac_config_files"
23576config_headers="$ac_config_headers"
23577config_commands="$ac_config_commands"
4b411bfe 23578
ca81d7a0 23579_ACEOF
503d2be0 23580
c0d27fcc 23581cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23582ac_cs_usage="\
23583\`$as_me' instantiates files from templates according to the
23584current configuration.
23585
23586Usage: $0 [OPTIONS] [FILE]...
23587
23588 -h, --help print this help, then exit
f053c89f 23589 -V, --version print version number and configuration settings, then exit
19650fd6 23590 -q, --quiet do not print progress messages
503d2be0
AS
23591 -d, --debug don't remove temporary files
23592 --recheck update $as_me by reconfiguring in the same conditions
23593 --file=FILE[:TEMPLATE]
edfaf76d 23594 instantiate the configuration file FILE
503d2be0 23595 --header=FILE[:TEMPLATE]
edfaf76d 23596 instantiate the configuration header FILE
503d2be0
AS
23597
23598Configuration files:
23599$config_files
23600
23601Configuration headers:
23602$config_headers
23603
23604Configuration commands:
23605$config_commands
23606
23607Report bugs to <bug-autoconf@gnu.org>."
4b411bfe 23608
ca81d7a0 23609_ACEOF
c0d27fcc 23610cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
23611ac_cs_version="\\
23612config.status
f053c89f 23613configured by $0, generated by GNU Autoconf 2.61,
ca81d7a0 23614 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 23615
040c474e 23616Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
23617This config.status script is free software; the Free Software Foundation
23618gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
23619
23620ac_pwd='$ac_pwd'
23621srcdir='$srcdir'
23622INSTALL='$INSTALL'
c0d27fcc 23623_ACEOF
503d2be0 23624
c0d27fcc 23625cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
23626# If no file are specified by the user, then we need to provide default
23627# value. By we need to know if files were specified by the user.
23628ac_need_defaults=:
23629while test $# != 0
ba4481b5 23630do
503d2be0
AS
23631 case $1 in
23632 --*=*)
ca81d7a0
JD
23633 ac_option=`expr "X$1" : 'X\([^=]*\)='`
23634 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
23635 ac_shift=:
23636 ;;
ca81d7a0 23637 *)
6bae0ccf
DL
23638 ac_option=$1
23639 ac_optarg=$2
23640 ac_shift=shift
503d2be0 23641 ;;
503d2be0
AS
23642 esac
23643
6bae0ccf 23644 case $ac_option in
503d2be0 23645 # Handling of the options.
19650fd6
AS
23646 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23647 ac_cs_recheck=: ;;
ca81d7a0
JD
23648 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
23649 echo "$ac_cs_version"; exit ;;
23650 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
23651 debug=: ;;
23652 --file | --fil | --fi | --f )
6bae0ccf
DL
23653 $ac_shift
23654 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
23655 ac_need_defaults=false;;
23656 --header | --heade | --head | --hea )
6bae0ccf
DL
23657 $ac_shift
23658 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 23659 ac_need_defaults=false;;
ca81d7a0
JD
23660 --he | --h)
23661 # Conflict between --help and --header
23662 { echo "$as_me: error: ambiguous option: $1
23663Try \`$0 --help' for more information." >&2
23664 { (exit 1); exit 1; }; };;
23665 --help | --hel | -h )
23666 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
23667 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23668 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23669 ac_cs_silent=: ;;
503d2be0
AS
23670
23671 # This is an error.
ca81d7a0
JD
23672 -*) { echo "$as_me: error: unrecognized option: $1
23673Try \`$0 --help' for more information." >&2
503d2be0
AS
23674 { (exit 1); exit 1; }; } ;;
23675
ca81d7a0
JD
23676 *) ac_config_targets="$ac_config_targets $1"
23677 ac_need_defaults=false ;;
503d2be0 23678
ba4481b5 23679 esac
503d2be0 23680 shift
ba4481b5
DL
23681done
23682
19650fd6
AS
23683ac_configure_extra_args=
23684
23685if $ac_cs_silent; then
23686 exec 6>/dev/null
23687 ac_configure_extra_args="$ac_configure_extra_args --silent"
23688fi
23689
23690_ACEOF
23691cat >>$CONFIG_STATUS <<_ACEOF
23692if \$ac_cs_recheck; then
ca81d7a0
JD
23693 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23694 CONFIG_SHELL=$SHELL
23695 export CONFIG_SHELL
23696 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
23697fi
23698
503d2be0 23699_ACEOF
ca81d7a0
JD
23700cat >>$CONFIG_STATUS <<\_ACEOF
23701exec 5>>config.log
23702{
23703 echo
23704 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23705## Running $as_me. ##
23706_ASBOX
23707 echo "$ac_log"
23708} >&5
ba4481b5 23709
ca81d7a0 23710_ACEOF
c0d27fcc 23711cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 23712#
ca81d7a0 23713# INIT-COMMANDS
503d2be0 23714#
503d2be0
AS
23715GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
23716
c0d27fcc
MR
23717_ACEOF
23718
4b411bfe 23719cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
23720
23721# Handling of arguments.
503d2be0
AS
23722for ac_config_target in $ac_config_targets
23723do
ca81d7a0
JD
23724 case $ac_config_target in
23725 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
23726 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
23727 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
23728 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
23729 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
23730 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
23731 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
23732 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
23733 "lispref/Makefile") CONFIG_FILES="$CONFIG_FILES lispref/Makefile" ;;
23734 "lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES lispintro/Makefile" ;;
23735 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
23736 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
23737
c0d27fcc 23738 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
23739echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23740 { (exit 1); exit 1; }; };;
23741 esac
ba4481b5 23742done
503d2be0 23743
ca81d7a0 23744
503d2be0
AS
23745# If the user did not use the arguments to specify the items to instantiate,
23746# then the envvar interface is used. Set only those that are not.
23747# We use the long form for the default assignment because of an extremely
23748# bizarre bug on SunOS 4.1.3.
23749if $ac_need_defaults; then
23750 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23751 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23752 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 23753fi
503d2be0 23754
19650fd6 23755# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 23756# simply because there is no reason against having it here, and in addition,
19650fd6 23757# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
23758# Hook for its removal unless debugging.
23759# Note that there is a small window in which the directory will not be cleaned:
23760# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
23761$debug ||
23762{
ca81d7a0
JD
23763 tmp=
23764 trap 'exit_status=$?
23765 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
23766' 0
503d2be0
AS
23767 trap '{ (exit 1); exit 1; }' 1 2 13 15
23768}
503d2be0 23769# Create a (secure) tmp directory for tmp files.
19650fd6 23770
503d2be0 23771{
ca81d7a0 23772 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
23773 test -n "$tmp" && test -d "$tmp"
23774} ||
23775{
ca81d7a0
JD
23776 tmp=./conf$$-$RANDOM
23777 (umask 077 && mkdir "$tmp")
503d2be0
AS
23778} ||
23779{
19650fd6 23780 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
23781 { (exit 1); exit 1; }
23782}
23783
503d2be0 23784#
ca81d7a0 23785# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
23786#
23787
23788# No need to generate the scripts if there are no CONFIG_FILES.
23789# This happens for instance when ./config.status config.h
ca81d7a0
JD
23790if test -n "$CONFIG_FILES"; then
23791
23792_ACEOF
23793
23794
23795
23796ac_delim='%!_!# '
23797for ac_last_try in false false false false false :; do
23798 cat >conf$$subs.sed <<_ACEOF
23799SHELL!$SHELL$ac_delim
23800PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
23801PACKAGE_NAME!$PACKAGE_NAME$ac_delim
23802PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
23803PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
23804PACKAGE_STRING!$PACKAGE_STRING$ac_delim
23805PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
23806exec_prefix!$exec_prefix$ac_delim
23807prefix!$prefix$ac_delim
23808program_transform_name!$program_transform_name$ac_delim
23809bindir!$bindir$ac_delim
23810sbindir!$sbindir$ac_delim
23811libexecdir!$libexecdir$ac_delim
23812datarootdir!$datarootdir$ac_delim
23813datadir!$datadir$ac_delim
23814sysconfdir!$sysconfdir$ac_delim
23815sharedstatedir!$sharedstatedir$ac_delim
23816localstatedir!$localstatedir$ac_delim
23817includedir!$includedir$ac_delim
23818oldincludedir!$oldincludedir$ac_delim
23819docdir!$docdir$ac_delim
23820infodir!$infodir$ac_delim
23821htmldir!$htmldir$ac_delim
23822dvidir!$dvidir$ac_delim
23823pdfdir!$pdfdir$ac_delim
23824psdir!$psdir$ac_delim
23825libdir!$libdir$ac_delim
23826localedir!$localedir$ac_delim
23827mandir!$mandir$ac_delim
23828DEFS!$DEFS$ac_delim
23829ECHO_C!$ECHO_C$ac_delim
23830ECHO_N!$ECHO_N$ac_delim
23831ECHO_T!$ECHO_T$ac_delim
23832LIBS!$LIBS$ac_delim
23833build_alias!$build_alias$ac_delim
23834host_alias!$host_alias$ac_delim
23835target_alias!$target_alias$ac_delim
23836MAINT!$MAINT$ac_delim
23837build!$build$ac_delim
23838build_cpu!$build_cpu$ac_delim
23839build_vendor!$build_vendor$ac_delim
23840build_os!$build_os$ac_delim
23841host!$host$ac_delim
23842host_cpu!$host_cpu$ac_delim
23843host_vendor!$host_vendor$ac_delim
23844host_os!$host_os$ac_delim
23845CC!$CC$ac_delim
23846CFLAGS!$CFLAGS$ac_delim
23847LDFLAGS!$LDFLAGS$ac_delim
23848CPPFLAGS!$CPPFLAGS$ac_delim
23849ac_ct_CC!$ac_ct_CC$ac_delim
23850EXEEXT!$EXEEXT$ac_delim
23851OBJEXT!$OBJEXT$ac_delim
23852CPP!$CPP$ac_delim
23853GREP!$GREP$ac_delim
23854EGREP!$EGREP$ac_delim
23855LN_S!$LN_S$ac_delim
23856INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
23857INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
23858INSTALL_DATA!$INSTALL_DATA$ac_delim
23859RANLIB!$RANLIB$ac_delim
23860INSTALL_INFO!$INSTALL_INFO$ac_delim
23861GZIP_PROG!$GZIP_PROG$ac_delim
23862LIBSOUND!$LIBSOUND$ac_delim
23863PKG_CONFIG!$PKG_CONFIG$ac_delim
23864ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
23865ALSA_LIBS!$ALSA_LIBS$ac_delim
23866CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
23867SET_MAKE!$SET_MAKE$ac_delim
23868XMKMF!$XMKMF$ac_delim
23869GTK_CFLAGS!$GTK_CFLAGS$ac_delim
23870GTK_LIBS!$GTK_LIBS$ac_delim
9d89ffd0
JD
23871XFT_CFLAGS!$XFT_CFLAGS$ac_delim
23872XFT_LIBS!$XFT_LIBS$ac_delim
ca81d7a0
JD
23873ALLOCA!$ALLOCA$ac_delim
23874liblockfile!$liblockfile$ac_delim
23875LIBOBJS!$LIBOBJS$ac_delim
23876NEED_SETGID!$NEED_SETGID$ac_delim
23877KMEM_GROUP!$KMEM_GROUP$ac_delim
23878GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
23879GETOPT_H!$GETOPT_H$ac_delim
23880GETOPTOBJS!$GETOPTOBJS$ac_delim
23881version!$version$ac_delim
23882configuration!$configuration$ac_delim
23883canonical!$canonical$ac_delim
23884srcdir!$srcdir$ac_delim
23885lispdir!$lispdir$ac_delim
23886locallisppath!$locallisppath$ac_delim
23887lisppath!$lisppath$ac_delim
23888x_default_search_path!$x_default_search_path$ac_delim
23889etcdir!$etcdir$ac_delim
23890archlibdir!$archlibdir$ac_delim
23891bitmapdir!$bitmapdir$ac_delim
23892gamedir!$gamedir$ac_delim
23893gameuser!$gameuser$ac_delim
23894c_switch_system!$c_switch_system$ac_delim
23895c_switch_machine!$c_switch_machine$ac_delim
ca81d7a0
JD
23896_ACEOF
23897
23898 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
23899 break
23900 elif $ac_last_try; then
23901 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
23902echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
23903 { (exit 1); exit 1; }; }
23904 else
23905 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8eeae1c9 23906 fi
ca81d7a0
JD
23907done
23908
23909ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
23910if test -n "$ac_eof"; then
23911 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
23912 ac_eof=`expr $ac_eof + 1`
23913fi
23914
23915cat >>$CONFIG_STATUS <<_ACEOF
23916cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
23917/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
23918_ACEOF
23919sed '
23920s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
23921s/^/s,@/; s/!/@,|#_!!_#|/
23922:n
23923t n
23924s/'"$ac_delim"'$/,g/; t
23925s/$/\\/; p
23926N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
23927' >>$CONFIG_STATUS <conf$$subs.sed
23928rm -f conf$$subs.sed
23929cat >>$CONFIG_STATUS <<_ACEOF
23930CEOF$ac_eof
23931_ACEOF
23932
23933
23934ac_delim='%!_!# '
23935for ac_last_try in false false false false false :; do
23936 cat >conf$$subs.sed <<_ACEOF
9d89ffd0
JD
23937LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
23938LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
ca81d7a0
JD
23939C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
23940X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
23941machfile!$machfile$ac_delim
23942opsysfile!$opsysfile$ac_delim
23943carbon_appdir!$carbon_appdir$ac_delim
23944LTLIBOBJS!$LTLIBOBJS$ac_delim
23945_ACEOF
23946
9d89ffd0 23947 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 8; then
ca81d7a0
JD
23948 break
23949 elif $ac_last_try; then
23950 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
23951echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
23952 { (exit 1); exit 1; }; }
23953 else
23954 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
23955 fi
23956done
23957
23958ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
23959if test -n "$ac_eof"; then
23960 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
23961 ac_eof=`expr $ac_eof + 1`
23962fi
8eeae1c9 23963
ca81d7a0
JD
23964cat >>$CONFIG_STATUS <<_ACEOF
23965cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
23966/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
23967_ACEOF
23968sed '
23969s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
23970s/^/s,@/; s/!/@,|#_!!_#|/
23971:n
23972t n
23973s/'"$ac_delim"'$/,g/; t
23974s/$/\\/; p
23975N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
23976' >>$CONFIG_STATUS <conf$$subs.sed
23977rm -f conf$$subs.sed
23978cat >>$CONFIG_STATUS <<_ACEOF
23979:end
23980s/|#_!!_#|//g
23981CEOF$ac_eof
c0d27fcc 23982_ACEOF
ca81d7a0
JD
23983
23984
23985# VPATH may cause trouble with some makes, so we remove $(srcdir),
23986# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23987# trailing colons and then remove the whole line if VPATH becomes empty
23988# (actually we leave an empty line to preserve line numbers).
23989if test "x$srcdir" = x.; then
23990 ac_vpsub='/^[ ]*VPATH[ ]*=/{
23991s/:*\$(srcdir):*/:/
23992s/:*\${srcdir}:*/:/
23993s/:*@srcdir@:*/:/
23994s/^\([^=]*=[ ]*\):*/\1/
23995s/:*$//
23996s/^[^=]*=[ ]*$//
23997}'
23998fi
23999
c0d27fcc 24000cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
24001fi # test -n "$CONFIG_FILES"
24002
24003
24004for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
24005do
24006 case $ac_tag in
24007 :[FHLC]) ac_mode=$ac_tag; continue;;
24008 esac
24009 case $ac_mode$ac_tag in
24010 :[FHL]*:*);;
24011 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24012echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24013 { (exit 1); exit 1; }; };;
24014 :[FH]-) ac_tag=-:-;;
24015 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24016 esac
24017 ac_save_IFS=$IFS
24018 IFS=:
24019 set x $ac_tag
24020 IFS=$ac_save_IFS
24021 shift
24022 ac_file=$1
24023 shift
24024
24025 case $ac_mode in
24026 :L) ac_source=$1;;
24027 :[FH])
24028 ac_file_inputs=
24029 for ac_f
24030 do
24031 case $ac_f in
24032 -) ac_f="$tmp/stdin";;
24033 *) # Look for the file first in the build tree, then in the source tree
24034 # (if the path is not absolute). The absolute path cannot be DOS-style,
24035 # because $ac_f cannot contain `:'.
24036 test -f "$ac_f" ||
24037 case $ac_f in
24038 [\\/$]*) false;;
24039 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24040 esac ||
24041 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24042echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24043 { (exit 1); exit 1; }; };;
24044 esac
24045 ac_file_inputs="$ac_file_inputs $ac_f"
24046 done
24047
24048 # Let's still pretend it is `configure' which instantiates (i.e., don't
24049 # use $as_me), people would be surprised to read:
24050 # /* config.h. Generated by config.status. */
24051 configure_input="Generated from "`IFS=:
24052 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24053 if test x"$ac_file" != x-; then
24054 configure_input="$ac_file. $configure_input"
24055 { echo "$as_me:$LINENO: creating $ac_file" >&5
24056echo "$as_me: creating $ac_file" >&6;}
24057 fi
24058
24059 case $ac_tag in
24060 *:-:* | *:-) cat >"$tmp/stdin";;
24061 esac
24062 ;;
ba4481b5
DL
24063 esac
24064
ca81d7a0 24065 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 24066$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24067 X"$ac_file" : 'X\(//\)[^/]' \| \
24068 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 24069 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 24070echo X"$ac_file" |
ca81d7a0
JD
24071 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24072 s//\1/
24073 q
24074 }
24075 /^X\(\/\/\)[^/].*/{
24076 s//\1/
24077 q
24078 }
24079 /^X\(\/\/\)$/{
24080 s//\1/
24081 q
24082 }
24083 /^X\(\/\).*/{
24084 s//\1/
24085 q
24086 }
24087 s/.*/./; q'`
24088 { as_dir="$ac_dir"
24089 case $as_dir in #(
24090 -*) as_dir=./$as_dir;;
24091 esac
24092 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 24093 as_dirs=
ca81d7a0
JD
24094 while :; do
24095 case $as_dir in #(
24096 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24097 *) as_qdir=$as_dir;;
24098 esac
24099 as_dirs="'$as_qdir' $as_dirs"
24100 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 24101$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24102 X"$as_dir" : 'X\(//\)[^/]' \| \
24103 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 24104 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 24105echo X"$as_dir" |
ca81d7a0
JD
24106 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24107 s//\1/
24108 q
24109 }
24110 /^X\(\/\/\)[^/].*/{
24111 s//\1/
24112 q
24113 }
24114 /^X\(\/\/\)$/{
24115 s//\1/
24116 q
24117 }
24118 /^X\(\/\).*/{
24119 s//\1/
24120 q
24121 }
24122 s/.*/./; q'`
24123 test -d "$as_dir" && break
6bae0ccf 24124 done
ca81d7a0
JD
24125 test -z "$as_dirs" || eval "mkdir $as_dirs"
24126 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24127echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 24128 { (exit 1); exit 1; }; }; }
c0d27fcc 24129 ac_builddir=.
98418dba 24130
ca81d7a0
JD
24131case "$ac_dir" in
24132.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24133*)
c0d27fcc 24134 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
24135 # A ".." for each directory in $ac_dir_suffix.
24136 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24137 case $ac_top_builddir_sub in
24138 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24139 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24140 esac ;;
24141esac
24142ac_abs_top_builddir=$ac_pwd
24143ac_abs_builddir=$ac_pwd$ac_dir_suffix
24144# for backward compatibility:
24145ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
24146
24147case $srcdir in
ca81d7a0 24148 .) # We are building in place.
c0d27fcc 24149 ac_srcdir=.
ca81d7a0
JD
24150 ac_top_srcdir=$ac_top_builddir_sub
24151 ac_abs_top_srcdir=$ac_pwd ;;
24152 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 24153 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
24154 ac_top_srcdir=$srcdir
24155 ac_abs_top_srcdir=$srcdir ;;
24156 *) # Relative name.
24157 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24158 ac_top_srcdir=$ac_top_build_prefix$srcdir
24159 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 24160esac
ca81d7a0 24161ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 24162
c0d27fcc 24163
ca81d7a0
JD
24164 case $ac_mode in
24165 :F)
24166 #
24167 # CONFIG_FILE
24168 #
ba4481b5 24169
503d2be0
AS
24170 case $INSTALL in
24171 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 24172 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 24173 esac
ca81d7a0 24174_ACEOF
ba4481b5 24175
ca81d7a0
JD
24176cat >>$CONFIG_STATUS <<\_ACEOF
24177# If the template does not know about datarootdir, expand it.
24178# FIXME: This hack should be removed a few years after 2.60.
24179ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 24180
ca81d7a0
JD
24181case `sed -n '/datarootdir/ {
24182 p
24183 q
24184}
24185/@datadir@/p
24186/@docdir@/p
24187/@infodir@/p
24188/@localedir@/p
24189/@mandir@/p
24190' $ac_file_inputs` in
24191*datarootdir*) ac_datarootdir_seen=yes;;
24192*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
24193 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
24194echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 24195_ACEOF
ca81d7a0
JD
24196cat >>$CONFIG_STATUS <<_ACEOF
24197 ac_datarootdir_hack='
24198 s&@datadir@&$datadir&g
24199 s&@docdir@&$docdir&g
24200 s&@infodir@&$infodir&g
24201 s&@localedir@&$localedir&g
24202 s&@mandir@&$mandir&g
24203 s&\\\${datarootdir}&$datarootdir&g' ;;
24204esac
24205_ACEOF
24206
24207# Neutralize VPATH when `$srcdir' = `.'.
24208# Shell code in configure.ac might set extrasub.
24209# FIXME: do we really want to maintain this feature?
c0d27fcc 24210cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
24211 sed "$ac_vpsub
24212$extrasub
c0d27fcc
MR
24213_ACEOF
24214cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24215:t
24216/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ca81d7a0
JD
24217s&@configure_input@&$configure_input&;t t
24218s&@top_builddir@&$ac_top_builddir_sub&;t t
24219s&@srcdir@&$ac_srcdir&;t t
24220s&@abs_srcdir@&$ac_abs_srcdir&;t t
24221s&@top_srcdir@&$ac_top_srcdir&;t t
24222s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
24223s&@builddir@&$ac_builddir&;t t
24224s&@abs_builddir@&$ac_abs_builddir&;t t
24225s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
24226s&@INSTALL@&$ac_INSTALL&;t t
24227$ac_datarootdir_hack
24228" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
24229
24230test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
24231 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
24232 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
24233 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24234which seems to be undefined. Please make sure it is defined." >&5
24235echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
24236which seems to be undefined. Please make sure it is defined." >&2;}
24237
24238 rm -f "$tmp/stdin"
503d2be0 24239 case $ac_file in
ca81d7a0
JD
24240 -) cat "$tmp/out"; rm -f "$tmp/out";;
24241 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 24242 esac
ca81d7a0
JD
24243 ;;
24244 :H)
24245 #
24246 # CONFIG_HEADER
24247 #
24248_ACEOF
24249
24250# Transform confdefs.h into a sed script `conftest.defines', that
24251# substitutes the proper values into config.h.in to produce config.h.
24252rm -f conftest.defines conftest.tail
24253# First, append a space to every undef/define line, to ease matching.
24254echo 's/$/ /' >conftest.defines
24255# Then, protect against being on the right side of a sed subst, or in
24256# an unquoted here document, in config.status. If some macros were
24257# called several times there might be several #defines for the same
24258# symbol, which is useless. But do not sort them, since the last
24259# AC_DEFINE must be honored.
24260ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
24261# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
24262# NAME is the cpp macro being defined, VALUE is the value it is being given.
24263# PARAMS is the parameter list in the macro definition--in most cases, it's
24264# just an empty string.
24265ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
24266ac_dB='\\)[ (].*,\\1define\\2'
24267ac_dC=' '
24268ac_dD=' ,'
24269
24270uniq confdefs.h |
24271 sed -n '
24272 t rset
24273 :rset
24274 s/^[ ]*#[ ]*define[ ][ ]*//
24275 t ok
24276 d
24277 :ok
24278 s/[\\&,]/\\&/g
24279 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
24280 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
24281 ' >>conftest.defines
24282
24283# Remove the space that was appended to ease matching.
24284# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
24285# example, in the case of _POSIX_SOURCE, which is predefined and required
24286# on some systems where configure will not decide to define it.
ca81d7a0
JD
24287# (The regexp can be short, since the line contains either #define or #undef.)
24288echo 's/ $//
24289s,^[ #]*u.*,/* & */,' >>conftest.defines
24290
24291# Break up conftest.defines:
24292ac_max_sed_lines=50
24293
24294# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
24295# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
24296# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
24297# et cetera.
24298ac_in='$ac_file_inputs'
24299ac_out='"$tmp/out1"'
24300ac_nxt='"$tmp/out2"'
24301
24302while :
503d2be0 24303do
ca81d7a0
JD
24304 # Write a here document:
24305 cat >>$CONFIG_STATUS <<_ACEOF
24306 # First, check the format of the line:
24307 cat >"\$tmp/defines.sed" <<\\CEOF
24308/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
24309/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
24310b
24311:def
24312_ACEOF
24313 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 24314 echo 'CEOF
ca81d7a0
JD
24315 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
24316 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
24317 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
24318 grep . conftest.tail >/dev/null || break
503d2be0
AS
24319 rm -f conftest.defines
24320 mv conftest.tail conftest.defines
24321done
ca81d7a0 24322rm -f conftest.defines conftest.tail
503d2be0 24323
ca81d7a0 24324echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 24325cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 24326 if test x"$ac_file" != x-; then
ca81d7a0
JD
24327 echo "/* $configure_input */" >"$tmp/config.h"
24328 cat "$ac_result" >>"$tmp/config.h"
24329 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 24330 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
24331echo "$as_me: $ac_file is unchanged" >&6;}
24332 else
503d2be0 24333 rm -f $ac_file
ca81d7a0 24334 mv "$tmp/config.h" $ac_file
ba4481b5 24335 fi
503d2be0 24336 else
ca81d7a0
JD
24337 echo "/* $configure_input */"
24338 cat "$ac_result"
ba4481b5 24339 fi
ca81d7a0
JD
24340 rm -f "$tmp/out12"
24341 ;;
4b411bfe 24342
ca81d7a0
JD
24343 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
24344echo "$as_me: executing $ac_file commands" >&6;}
24345 ;;
24346 esac
c0d27fcc 24347
4b411bfe 24348
ca81d7a0
JD
24349 case $ac_file$ac_mode in
24350 "default":C)
ba4481b5
DL
24351
24352### Make the necessary directories, if they don't exist.
24353for dir in etc lisp ; do
24354 test -d ${dir} || mkdir ${dir}
24355done
24356
24357# Build src/Makefile from ${srcdir}/src/Makefile.c
24358# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
24359# This must be done after src/config.h is built, since we rely on that file.
24360
24361# Now get this: Some word that is part of the ${srcdir} directory name
24362# or the ${configuration} value might, just might, happen to be an
24363# identifier like `sun4' or `i386' or something, and be predefined by
24364# the C preprocessor to some helpful value like 1, or maybe the empty
24365# string. Needless to say consequent macro substitutions are less
24366# than conducive to the makefile finding the correct directory.
24367undefs="`echo $top_srcdir $configuration $canonical |
24368sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
24369 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
24370`"
24371
24372echo creating src/epaths.h
4aa6b955 24373${MAKE-make} epaths-force
ba4481b5 24374
1c203d4c
DL
24375# As of 2000-11-19, newest development versions of GNU cpp preprocess
24376# `..' to `. .' unless invoked with -traditional
24377
d0e9bfd2 24378if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
24379 CPPFLAGS="$CPPFLAGS -traditional"
24380fi
24381
ba4481b5
DL
24382echo creating lib-src/Makefile
24383( cd lib-src
24384 rm -f junk.c junk1.c junk2.c
24385 sed -e '/start of cpp stuff/q' \
24386 < Makefile.c > junk1.c
24387 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24388 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24389 < Makefile.c > junk.c
503d2be0 24390 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24391 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24392 cat junk1.c junk2.c > Makefile.new
24393 rm -f junk.c junk1.c junk2.c
24394 chmod 444 Makefile.new
24395 mv -f Makefile.new Makefile
24396)
24397
24398echo creating src/Makefile
24399( cd src
24400 rm -f junk.c junk1.c junk2.c
24401 sed -e '/start of cpp stuff/q' \
24402 < Makefile.c > junk1.c
24403 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 24404 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 24405 < Makefile.c > junk.c
503d2be0 24406 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
24407 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
24408 cat junk1.c junk2.c > Makefile.new
24409 rm -f junk.c junk1.c junk2.c
24410 chmod 444 Makefile.new
24411 mv -f Makefile.new Makefile
24412)
24413
503d2be0 24414if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 24415 echo creating src/.gdbinit
503d2be0 24416 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
24417fi
24418
24419# This is how we know whether to re-run configure in certain cases.
24420touch src/config.stamp
24421
503d2be0 24422 ;;
ca81d7a0 24423
503d2be0 24424 esac
ca81d7a0 24425done # for ac_tag
503d2be0 24426
ba4481b5 24427
503d2be0 24428{ (exit 0); exit 0; }
c0d27fcc 24429_ACEOF
ba4481b5 24430chmod +x $CONFIG_STATUS
503d2be0
AS
24431ac_clean_files=$ac_clean_files_save
24432
c0d27fcc 24433
503d2be0
AS
24434# configure is writing to config.log, and then calls config.status.
24435# config.status does its own redirection, appending to config.log.
24436# Unfortunately, on DOS this fails, as config.log is still kept open
24437# by configure, so config.status won't be able to write to it; its
24438# output is simply discarded. So we exec the FD to /dev/null,
24439# effectively closing config.log, so it can be properly (re)opened and
24440# appended to by config.status. When coming back to configure, we
24441# need to make the FD available again.
24442if test "$no_create" != yes; then
24443 ac_cs_success=:
19650fd6
AS
24444 ac_config_status_args=
24445 test "$silent" = yes &&
24446 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 24447 exec 5>/dev/null
19650fd6 24448 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
24449 exec 5>>config.log
24450 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24451 # would make configure fail if this is the last instruction.
24452 $ac_cs_success || { (exit 1); exit 1; }
24453fi
f5f47add 24454
c0d27fcc 24455