(appt-disp-window-function): Doc fix.
[bpt/emacs.git] / configure
CommitLineData
ba4481b5 1#! /bin/sh
ba4481b5 2# Guess values for system-dependent variables and create Makefiles.
9cf8f393 3# Generated by GNU Autoconf 2.61 for emacs 23.0.50.
ba4481b5 4#
ca81d7a0
JD
5# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
6# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
ba4481b5
DL
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
c0d27fcc
MR
9## --------------------- ##
10## M4sh Initialization. ##
11## --------------------- ##
503d2be0 12
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
503d2be0
AS
51fi
52
c0d27fcc 53# Support unset when possible.
edfaf76d 54if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
55 as_unset=unset
56else
57 as_unset=false
58fi
59
6bae0ccf 60
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
6bae0ccf 152
c0d27fcc 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
c0d27fcc
MR
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}
c0d27fcc 177
ca81d7a0
JD
178exitcode=0
179if as_func_success; then
180 :
181else
182 exitcode=1
183 echo as_func_success failed.
184fi
c0d27fcc 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
MR
221 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
222for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
223do
224 IFS=$as_save_IFS
225 test -z "$as_dir" && as_dir=.
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(
c0d27fcc
MR
328 as_lineno_1=$LINENO
329 as_lineno_2=$LINENO
c0d27fcc 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") || {
554b610f
MB
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 572# Identity of this package.
9cf8f393
JD
573PACKAGE_NAME='emacs'
574PACKAGE_TARNAME='emacs'
575PACKAGE_VERSION='23.0.50'
576PACKAGE_STRING='emacs 23.0.50'
577PACKAGE_BUGREPORT=''
c0d27fcc 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>
503d2be0 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
c24fa7dc
MB
617ac_header_list=
618ac_func_list=
619ac_subst_vars='SHELL
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656MAINT
657build
658build_cpu
659build_vendor
660build_os
661host
662host_cpu
663host_vendor
664host_os
665CC
666CFLAGS
667LDFLAGS
668CPPFLAGS
669ac_ct_CC
670EXEEXT
671OBJEXT
672CPP
673GREP
674EGREP
675LN_S
676INSTALL_PROGRAM
677INSTALL_SCRIPT
678INSTALL_DATA
679RANLIB
680INSTALL_INFO
681GZIP_PROG
1bb9a689 682MAKEINFO
c24fa7dc
MB
683LIBSOUND
684PKG_CONFIG
685ALSA_CFLAGS
686ALSA_LIBS
c24fa7dc
MB
687CFLAGS_SOUND
688SET_MAKE
689XMKMF
cfe440b8 690HAVE_XSERVER
0cfc0546
GM
691RSVG_CFLAGS
692RSVG_LIBS
c24fa7dc
MB
693GTK_CFLAGS
694GTK_LIBS
131e4133
MA
695DBUS_CFLAGS
696DBUS_LIBS
c24fa7dc
MB
697XFT_CFLAGS
698XFT_LIBS
699FREETYPE_CFLAGS
700FREETYPE_LIBS
701FONTCONFIG_CFLAGS
702FONTCONFIG_LIBS
c24fa7dc
MB
703LIBOTF_CFLAGS
704LIBOTF_LIBS
7f0942ba
KH
705M17N_FLT_CFLAGS
706M17N_FLT_LIBS
c24fa7dc
MB
707ALLOCA
708liblockfile
709LIBOBJS
710NEED_SETGID
711KMEM_GROUP
712GETLOADAVG_LIBS
713GETOPT_H
714GETOPTOBJS
715version
716configuration
717canonical
718srcdir
719lispdir
720locallisppath
721lisppath
722x_default_search_path
723etcdir
724archlibdir
725bitmapdir
726gamedir
727gameuser
728c_switch_system
729c_switch_machine
730LD_SWITCH_X_SITE
731LD_SWITCH_X_SITE_AUX
732C_SWITCH_X_SITE
733X_TOOLKIT_TYPE
734machfile
735opsysfile
736carbon_appdir
737LTLIBOBJS'
6bae0ccf 738ac_subst_files=''
ca81d7a0
JD
739 ac_precious_vars='build_alias
740host_alias
741target_alias
742CC
743CFLAGS
744LDFLAGS
f053c89f 745LIBS
ca81d7a0
JD
746CPPFLAGS
747CPP
748XMKMF'
749
c0d27fcc 750
ba4481b5 751# Initialize some variables set by options.
503d2be0
AS
752ac_init_help=
753ac_init_version=false
ba4481b5
DL
754# The variables have the same names as the options, with
755# dashes changed to underlines.
503d2be0 756cache_file=/dev/null
ba4481b5 757exec_prefix=NONE
ba4481b5 758no_create=
ba4481b5
DL
759no_recursion=
760prefix=NONE
761program_prefix=NONE
762program_suffix=NONE
763program_transform_name=s,x,x,
764silent=
765site=
766srcdir=
ba4481b5
DL
767verbose=
768x_includes=NONE
769x_libraries=NONE
503d2be0
AS
770
771# Installation directory options.
772# These are left unexpanded so users can "make install exec_prefix=/foo"
773# and all the variables that are supposed to be based on exec_prefix
774# by default will actually change.
775# Use braces instead of parens because sh, perl, etc. also accept them.
ca81d7a0 776# (The list follows the same order as the GNU Coding Standards.)
ba4481b5
DL
777bindir='${exec_prefix}/bin'
778sbindir='${exec_prefix}/sbin'
779libexecdir='${exec_prefix}/libexec'
ca81d7a0
JD
780datarootdir='${prefix}/share'
781datadir='${datarootdir}'
ba4481b5
DL
782sysconfdir='${prefix}/etc'
783sharedstatedir='${prefix}/com'
784localstatedir='${prefix}/var'
ba4481b5
DL
785includedir='${prefix}/include'
786oldincludedir='/usr/include'
9cf8f393 787docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
ca81d7a0
JD
788infodir='${datarootdir}/info'
789htmldir='${docdir}'
790dvidir='${docdir}'
791pdfdir='${docdir}'
792psdir='${docdir}'
793libdir='${exec_prefix}/lib'
794localedir='${datarootdir}/locale'
795mandir='${datarootdir}/man'
ba4481b5 796
ba4481b5 797ac_prev=
ca81d7a0 798ac_dashdash=
ba4481b5
DL
799for ac_option
800do
ba4481b5
DL
801 # If the previous option needs an argument, assign it.
802 if test -n "$ac_prev"; then
ca81d7a0 803 eval $ac_prev=\$ac_option
ba4481b5
DL
804 ac_prev=
805 continue
806 fi
807
ca81d7a0
JD
808 case $ac_option in
809 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
810 *) ac_optarg=yes ;;
811 esac
ba4481b5
DL
812
813 # Accept the important Cygnus configure options, so we can diagnose typos.
814
ca81d7a0
JD
815 case $ac_dashdash$ac_option in
816 --)
817 ac_dashdash=yes ;;
ba4481b5
DL
818
819 -bindir | --bindir | --bindi | --bind | --bin | --bi)
820 ac_prev=bindir ;;
821 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
503d2be0 822 bindir=$ac_optarg ;;
ba4481b5
DL
823
824 -build | --build | --buil | --bui | --bu)
503d2be0 825 ac_prev=build_alias ;;
ba4481b5 826 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
503d2be0 827 build_alias=$ac_optarg ;;
ba4481b5
DL
828
829 -cache-file | --cache-file | --cache-fil | --cache-fi \
830 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
831 ac_prev=cache_file ;;
832 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
833 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
503d2be0
AS
834 cache_file=$ac_optarg ;;
835
836 --config-cache | -C)
837 cache_file=config.cache ;;
ba4481b5 838
ca81d7a0 839 -datadir | --datadir | --datadi | --datad)
ba4481b5 840 ac_prev=datadir ;;
ca81d7a0 841 -datadir=* | --datadir=* | --datadi=* | --datad=*)
503d2be0 842 datadir=$ac_optarg ;;
ba4481b5 843
ca81d7a0
JD
844 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
845 | --dataroo | --dataro | --datar)
846 ac_prev=datarootdir ;;
847 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
848 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
849 datarootdir=$ac_optarg ;;
850
ba4481b5 851 -disable-* | --disable-*)
503d2be0 852 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
ba4481b5 853 # Reject names that are not valid shell variable names.
f053c89f 854 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
855 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
856 { (exit 1); exit 1; }; }
f053c89f 857 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0
JD
858 eval enable_$ac_feature=no ;;
859
860 -docdir | --docdir | --docdi | --doc | --do)
861 ac_prev=docdir ;;
862 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
863 docdir=$ac_optarg ;;
864
865 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
866 ac_prev=dvidir ;;
867 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
868 dvidir=$ac_optarg ;;
ba4481b5
DL
869
870 -enable-* | --enable-*)
503d2be0 871 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
ba4481b5 872 # Reject names that are not valid shell variable names.
f053c89f 873 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
874 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
875 { (exit 1); exit 1; }; }
f053c89f 876 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
ca81d7a0 877 eval enable_$ac_feature=\$ac_optarg ;;
ba4481b5
DL
878
879 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
880 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
881 | --exec | --exe | --ex)
882 ac_prev=exec_prefix ;;
883 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
884 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
885 | --exec=* | --exe=* | --ex=*)
503d2be0 886 exec_prefix=$ac_optarg ;;
ba4481b5
DL
887
888 -gas | --gas | --ga | --g)
889 # Obsolete; use --with-gas.
890 with_gas=yes ;;
891
503d2be0
AS
892 -help | --help | --hel | --he | -h)
893 ac_init_help=long ;;
894 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
895 ac_init_help=recursive ;;
896 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
897 ac_init_help=short ;;
ba4481b5
DL
898
899 -host | --host | --hos | --ho)
503d2be0 900 ac_prev=host_alias ;;
ba4481b5 901 -host=* | --host=* | --hos=* | --ho=*)
503d2be0 902 host_alias=$ac_optarg ;;
ba4481b5 903
ca81d7a0
JD
904 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
905 ac_prev=htmldir ;;
906 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
907 | --ht=*)
908 htmldir=$ac_optarg ;;
909
ba4481b5
DL
910 -includedir | --includedir | --includedi | --included | --include \
911 | --includ | --inclu | --incl | --inc)
912 ac_prev=includedir ;;
913 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
914 | --includ=* | --inclu=* | --incl=* | --inc=*)
503d2be0 915 includedir=$ac_optarg ;;
ba4481b5
DL
916
917 -infodir | --infodir | --infodi | --infod | --info | --inf)
918 ac_prev=infodir ;;
919 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
503d2be0 920 infodir=$ac_optarg ;;
ba4481b5
DL
921
922 -libdir | --libdir | --libdi | --libd)
923 ac_prev=libdir ;;
924 -libdir=* | --libdir=* | --libdi=* | --libd=*)
503d2be0 925 libdir=$ac_optarg ;;
ba4481b5
DL
926
927 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
928 | --libexe | --libex | --libe)
929 ac_prev=libexecdir ;;
930 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
931 | --libexe=* | --libex=* | --libe=*)
503d2be0 932 libexecdir=$ac_optarg ;;
ba4481b5 933
ca81d7a0
JD
934 -localedir | --localedir | --localedi | --localed | --locale)
935 ac_prev=localedir ;;
936 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
937 localedir=$ac_optarg ;;
938
ba4481b5 939 -localstatedir | --localstatedir | --localstatedi | --localstated \
ca81d7a0 940 | --localstate | --localstat | --localsta | --localst | --locals)
ba4481b5
DL
941 ac_prev=localstatedir ;;
942 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
ca81d7a0 943 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
503d2be0 944 localstatedir=$ac_optarg ;;
ba4481b5
DL
945
946 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
947 ac_prev=mandir ;;
948 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
503d2be0 949 mandir=$ac_optarg ;;
ba4481b5
DL
950
951 -nfp | --nfp | --nf)
952 # Obsolete; use --without-fp.
953 with_fp=no ;;
954
955 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
c0d27fcc 956 | --no-cr | --no-c | -n)
ba4481b5
DL
957 no_create=yes ;;
958
959 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
960 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
961 no_recursion=yes ;;
962
963 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
964 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
965 | --oldin | --oldi | --old | --ol | --o)
966 ac_prev=oldincludedir ;;
967 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
968 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
969 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
503d2be0 970 oldincludedir=$ac_optarg ;;
ba4481b5
DL
971
972 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
973 ac_prev=prefix ;;
974 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
503d2be0 975 prefix=$ac_optarg ;;
ba4481b5
DL
976
977 -program-prefix | --program-prefix | --program-prefi | --program-pref \
978 | --program-pre | --program-pr | --program-p)
979 ac_prev=program_prefix ;;
980 -program-prefix=* | --program-prefix=* | --program-prefi=* \
981 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
503d2be0 982 program_prefix=$ac_optarg ;;
ba4481b5
DL
983
984 -program-suffix | --program-suffix | --program-suffi | --program-suff \
985 | --program-suf | --program-su | --program-s)
986 ac_prev=program_suffix ;;
987 -program-suffix=* | --program-suffix=* | --program-suffi=* \
988 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
503d2be0 989 program_suffix=$ac_optarg ;;
ba4481b5
DL
990
991 -program-transform-name | --program-transform-name \
992 | --program-transform-nam | --program-transform-na \
993 | --program-transform-n | --program-transform- \
994 | --program-transform | --program-transfor \
995 | --program-transfo | --program-transf \
996 | --program-trans | --program-tran \
997 | --progr-tra | --program-tr | --program-t)
998 ac_prev=program_transform_name ;;
999 -program-transform-name=* | --program-transform-name=* \
1000 | --program-transform-nam=* | --program-transform-na=* \
1001 | --program-transform-n=* | --program-transform-=* \
1002 | --program-transform=* | --program-transfor=* \
1003 | --program-transfo=* | --program-transf=* \
1004 | --program-trans=* | --program-tran=* \
1005 | --progr-tra=* | --program-tr=* | --program-t=*)
503d2be0 1006 program_transform_name=$ac_optarg ;;
ba4481b5 1007
ca81d7a0
JD
1008 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1009 ac_prev=pdfdir ;;
1010 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1011 pdfdir=$ac_optarg ;;
1012
1013 -psdir | --psdir | --psdi | --psd | --ps)
1014 ac_prev=psdir ;;
1015 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1016 psdir=$ac_optarg ;;
1017
ba4481b5
DL
1018 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1019 | -silent | --silent | --silen | --sile | --sil)
1020 silent=yes ;;
1021
1022 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1023 ac_prev=sbindir ;;
1024 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1025 | --sbi=* | --sb=*)
503d2be0 1026 sbindir=$ac_optarg ;;
ba4481b5
DL
1027
1028 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1029 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1030 | --sharedst | --shareds | --shared | --share | --shar \
1031 | --sha | --sh)
1032 ac_prev=sharedstatedir ;;
1033 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1034 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1035 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1036 | --sha=* | --sh=*)
503d2be0 1037 sharedstatedir=$ac_optarg ;;
ba4481b5
DL
1038
1039 -site | --site | --sit)
1040 ac_prev=site ;;
1041 -site=* | --site=* | --sit=*)
503d2be0 1042 site=$ac_optarg ;;
ba4481b5
DL
1043
1044 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1045 ac_prev=srcdir ;;
1046 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
503d2be0 1047 srcdir=$ac_optarg ;;
ba4481b5
DL
1048
1049 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1050 | --syscon | --sysco | --sysc | --sys | --sy)
1051 ac_prev=sysconfdir ;;
1052 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1053 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
503d2be0 1054 sysconfdir=$ac_optarg ;;
ba4481b5
DL
1055
1056 -target | --target | --targe | --targ | --tar | --ta | --t)
503d2be0 1057 ac_prev=target_alias ;;
ba4481b5 1058 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
503d2be0 1059 target_alias=$ac_optarg ;;
ba4481b5
DL
1060
1061 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1062 verbose=yes ;;
1063
503d2be0
AS
1064 -version | --version | --versio | --versi | --vers | -V)
1065 ac_init_version=: ;;
ba4481b5
DL
1066
1067 -with-* | --with-*)
503d2be0 1068 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
ba4481b5 1069 # Reject names that are not valid shell variable names.
f053c89f 1070 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1071 { echo "$as_me: error: invalid package name: $ac_package" >&2
1072 { (exit 1); exit 1; }; }
f053c89f 1073 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1074 eval with_$ac_package=\$ac_optarg ;;
ba4481b5
DL
1075
1076 -without-* | --without-*)
503d2be0 1077 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
ba4481b5 1078 # Reject names that are not valid shell variable names.
f053c89f 1079 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503d2be0
AS
1080 { echo "$as_me: error: invalid package name: $ac_package" >&2
1081 { (exit 1); exit 1; }; }
f053c89f 1082 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
ca81d7a0 1083 eval with_$ac_package=no ;;
ba4481b5
DL
1084
1085 --x)
1086 # Obsolete; use --with-x.
1087 with_x=yes ;;
1088
1089 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1090 | --x-incl | --x-inc | --x-in | --x-i)
1091 ac_prev=x_includes ;;
1092 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1093 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
503d2be0 1094 x_includes=$ac_optarg ;;
ba4481b5
DL
1095
1096 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1097 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1098 ac_prev=x_libraries ;;
1099 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1100 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
503d2be0 1101 x_libraries=$ac_optarg ;;
ba4481b5 1102
503d2be0
AS
1103 -*) { echo "$as_me: error: unrecognized option: $ac_option
1104Try \`$0 --help' for more information." >&2
1105 { (exit 1); exit 1; }; }
ba4481b5
DL
1106 ;;
1107
503d2be0
AS
1108 *=*)
1109 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1110 # Reject names that are not valid shell variable names.
1111 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1112 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1113 { (exit 1); exit 1; }; }
ca81d7a0 1114 eval $ac_envvar=\$ac_optarg
503d2be0
AS
1115 export $ac_envvar ;;
1116
ba4481b5 1117 *)
503d2be0
AS
1118 # FIXME: should be removed in autoconf 3.0.
1119 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1120 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1121 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1122 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
ba4481b5
DL
1123 ;;
1124
1125 esac
1126done
1127
1128if test -n "$ac_prev"; then
503d2be0
AS
1129 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1130 { echo "$as_me: error: missing argument to $ac_option" >&2
1131 { (exit 1); exit 1; }; }
ba4481b5 1132fi
ba4481b5 1133
ca81d7a0
JD
1134# Be sure to have absolute directory names.
1135for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1136 datadir sysconfdir sharedstatedir localstatedir includedir \
1137 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1138 libdir localedir mandir
ba4481b5 1139do
ca81d7a0 1140 eval ac_val=\$$ac_var
503d2be0 1141 case $ac_val in
ca81d7a0
JD
1142 [\\/$]* | ?:[\\/]* ) continue;;
1143 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
ba4481b5 1144 esac
ca81d7a0
JD
1145 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1146 { (exit 1); exit 1; }; }
ba4481b5
DL
1147done
1148
503d2be0
AS
1149# There might be people who depend on the old broken behavior: `$host'
1150# used to hold the argument of --host etc.
c0d27fcc 1151# FIXME: To remove some day.
503d2be0
AS
1152build=$build_alias
1153host=$host_alias
1154target=$target_alias
1155
c0d27fcc 1156# FIXME: To remove some day.
503d2be0
AS
1157if test "x$host_alias" != x; then
1158 if test "x$build_alias" = x; then
1159 cross_compiling=maybe
1160 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1161 If a cross compiler is detected then cross compile mode will be used." >&2
1162 elif test "x$build_alias" != "x$host_alias"; then
1163 cross_compiling=yes
1164 fi
1165fi
ba4481b5 1166
503d2be0
AS
1167ac_tool_prefix=
1168test -n "$host_alias" && ac_tool_prefix=$host_alias-
ba4481b5 1169
503d2be0 1170test "$silent" = yes && exec 6>/dev/null
ba4481b5 1171
c0d27fcc 1172
ca81d7a0
JD
1173ac_pwd=`pwd` && test -n "$ac_pwd" &&
1174ac_ls_di=`ls -di .` &&
1175ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1176 { echo "$as_me: error: Working directory cannot be determined" >&2
1177 { (exit 1); exit 1; }; }
1178test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1179 { echo "$as_me: error: pwd does not report name of working directory" >&2
1180 { (exit 1); exit 1; }; }
1181
1182
ba4481b5
DL
1183# Find the source files, if location was not specified.
1184if test -z "$srcdir"; then
1185 ac_srcdir_defaulted=yes
ca81d7a0
JD
1186 # Try the directory containing this script, then the parent directory.
1187 ac_confdir=`$as_dirname -- "$0" ||
c0d27fcc 1188$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
1189 X"$0" : 'X\(//\)[^/]' \| \
1190 X"$0" : 'X\(//\)$' \| \
ca81d7a0 1191 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 1192echo X"$0" |
ca81d7a0
JD
1193 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1194 s//\1/
1195 q
1196 }
1197 /^X\(\/\/\)[^/].*/{
1198 s//\1/
1199 q
1200 }
1201 /^X\(\/\/\)$/{
1202 s//\1/
1203 q
1204 }
1205 /^X\(\/\).*/{
1206 s//\1/
1207 q
1208 }
1209 s/.*/./; q'`
ba4481b5 1210 srcdir=$ac_confdir
ca81d7a0 1211 if test ! -r "$srcdir/$ac_unique_file"; then
ba4481b5
DL
1212 srcdir=..
1213 fi
1214else
1215 ac_srcdir_defaulted=no
1216fi
ca81d7a0
JD
1217if test ! -r "$srcdir/$ac_unique_file"; then
1218 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1219 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
503d2be0 1220 { (exit 1); exit 1; }; }
ba4481b5 1221fi
ca81d7a0
JD
1222ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1223ac_abs_confdir=`(
1224 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
6bae0ccf 1225 { (exit 1); exit 1; }; }
ca81d7a0
JD
1226 pwd)`
1227# When building in place, set srcdir=.
1228if test "$ac_abs_confdir" = "$ac_pwd"; then
1229 srcdir=.
1230fi
1231# Remove unnecessary trailing slashes from srcdir.
1232# Double slashes in file names in object file debugging info
1233# mess up M-x gdb in Emacs.
1234case $srcdir in
1235*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1236esac
1237for ac_var in $ac_precious_vars; do
1238 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1239 eval ac_env_${ac_var}_value=\$${ac_var}
1240 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1241 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1242done
503d2be0
AS
1243
1244#
1245# Report the --help message.
1246#
1247if test "$ac_init_help" = "long"; then
1248 # Omit some internal or obsolete options to make the list less imposing.
1249 # This message is too long to be a string in the A/UX 3.1 sh.
c0d27fcc 1250 cat <<_ACEOF
9cf8f393 1251\`configure' configures emacs 23.0.50 to adapt to many kinds of systems.
503d2be0
AS
1252
1253Usage: $0 [OPTION]... [VAR=VALUE]...
1254
1255To assign environment variables (e.g., CC, CFLAGS...), specify them as
1256VAR=VALUE. See below for descriptions of some of the useful variables.
1257
1258Defaults for the options are specified in brackets.
1259
1260Configuration:
1261 -h, --help display this help and exit
1262 --help=short display options specific to this package
1263 --help=recursive display the short help of all the included packages
1264 -V, --version display version information and exit
1265 -q, --quiet, --silent do not print \`checking...' messages
1266 --cache-file=FILE cache test results in FILE [disabled]
1267 -C, --config-cache alias for \`--cache-file=config.cache'
1268 -n, --no-create do not create output files
1269 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1270
503d2be0
AS
1271Installation directories:
1272 --prefix=PREFIX install architecture-independent files in PREFIX
edfaf76d 1273 [$ac_default_prefix]
503d2be0 1274 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
edfaf76d 1275 [PREFIX]
503d2be0
AS
1276
1277By default, \`make install' will install all the files in
1278\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1279an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1280for instance \`--prefix=\$HOME'.
1281
1282For better control, use the options below.
1283
1284Fine tuning of the installation directories:
1285 --bindir=DIR user executables [EPREFIX/bin]
1286 --sbindir=DIR system admin executables [EPREFIX/sbin]
1287 --libexecdir=DIR program executables [EPREFIX/libexec]
503d2be0
AS
1288 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1289 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1290 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1291 --libdir=DIR object code libraries [EPREFIX/lib]
1292 --includedir=DIR C header files [PREFIX/include]
1293 --oldincludedir=DIR C header files for non-gcc [/usr/include]
ca81d7a0
JD
1294 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1295 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1296 --infodir=DIR info documentation [DATAROOTDIR/info]
1297 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1298 --mandir=DIR man documentation [DATAROOTDIR/man]
9cf8f393 1299 --docdir=DIR documentation root [DATAROOTDIR/doc/emacs]
ca81d7a0
JD
1300 --htmldir=DIR html documentation [DOCDIR]
1301 --dvidir=DIR dvi documentation [DOCDIR]
1302 --pdfdir=DIR pdf documentation [DOCDIR]
1303 --psdir=DIR ps documentation [DOCDIR]
c0d27fcc 1304_ACEOF
503d2be0 1305
c0d27fcc 1306 cat <<\_ACEOF
503d2be0 1307
ba5da88a
PJ
1308Program names:
1309 --program-prefix=PREFIX prepend PREFIX to installed program names
1310 --program-suffix=SUFFIX append SUFFIX to installed program names
1311 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1312
503d2be0
AS
1313X features:
1314 --x-includes=DIR X include files are in DIR
1315 --x-libraries=DIR X library files are in DIR
1316
1317System types:
1318 --build=BUILD configure for building on BUILD [guessed]
c0d27fcc
MR
1319 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1320_ACEOF
503d2be0
AS
1321fi
1322
1323if test -n "$ac_init_help"; then
9cf8f393
JD
1324 case $ac_init_help in
1325 short | recursive ) echo "Configuration of emacs 23.0.50:";;
1326 esac
c0d27fcc 1327 cat <<\_ACEOF
503d2be0
AS
1328
1329Optional Features:
1330 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1331 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
709e90de 1332 --enable-carbon-app[=DIR]
6a3a24fa 1333 specify install directory for Emacs.app on Mac OS X
709e90de 1334 [DIR=/Application]
8d01ddb4 1335 --disable-font-backend don't compile font-backend support
ca34d75a 1336 --enable-sync-input compile code with sync-input
d0098f13 1337 --enable-asserts compile code with asserts enabled
709e90de
AS
1338 --enable-maintainer-mode
1339 enable make rules and dependencies not useful (and
1340 sometimes confusing) to the casual installer
9adfabc2
LK
1341 --enable-locallisppath=PATH
1342 directories Emacs should search for lisp files
1343 specific to this site
503d2be0
AS
1344 --disable-largefile omit support for large files
1345
1346Optional Packages:
1347 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1348 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
503d2be0
AS
1349 --without-pop don't support POP mail retrieval with movemail
1350 --with-kerberos support Kerberos-authenticated POP
1351 --with-kerberos5 support Kerberos version 5 authenticated POP
1352 --with-hesiod support Hesiod to get the POP server host
2c9dccc9 1353 --without-sound don't compile with sound support
49adb60f
TTN
1354 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes, lucid, athena,
1355 motif, gtk, no)
c8467c40
GM
1356 --without-xpm don't compile with XPM image support
1357 --without-jpeg don't compile with JPEG image support
1358 --without-tiff don't compile with TIFF image support
1359 --without-gif don't compile with GIF image support
1360 --without-png don't compile with PNG image support
1361 --without-rsvg don't compile with SVG image support
4efcc8d1
MB
1362 --without-freetype don't use Freetype for local font support
1363 --without-xft don't use XFT for anti aliased fonts
d235ca2f
MB
1364 --without-libotf don't use libotf for OpenType font support
1365 --without-m17n-flt don't use m17n-flt for text shaping
503d2be0 1366 --without-toolkit-scroll-bars
cc227489 1367 don't use Motif or Xaw3d scroll bars
c982cf7d 1368 --without-xaw3d don't use Xaw3d
cc227489 1369 --without-xim don't use X11 XIM
2aea825c 1370 --with-carbon use Carbon GUI on Mac OS X. This is unsupported!
c8467c40
GM
1371 --without-gpm don't use -lgpm for mouse support on a GNU/Linux
1372 console
b5a922de 1373 --without-dbus don't compile with D-Bus support
9d2818d6 1374
00b9c927
MO
1375 --with-pkg-config-prog=PATH
1376 Path to pkg-config for finding GTK and librsvg
503d2be0
AS
1377 --with-x use the X Window System
1378
1379Some influential environment variables:
1380 CC C compiler command
1381 CFLAGS C compiler flags
1382 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1383 nonstandard directory <lib dir>
f053c89f 1384 LIBS libraries to pass to the linker, e.g. -l<library>
ca81d7a0
JD
1385 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1386 you have headers in a nonstandard directory <include dir>
503d2be0 1387 CPP C preprocessor
ca81d7a0 1388 XMKMF Path to xmkmf, Makefile generator for X Window System
503d2be0
AS
1389
1390Use these variables to override the choices made by `configure' or to help
1391it to find libraries and programs with nonstandard names/locations.
1392
c0d27fcc 1393_ACEOF
ca81d7a0 1394ac_status=$?
503d2be0
AS
1395fi
1396
1397if test "$ac_init_help" = "recursive"; then
1398 # If there are subdirs, report their specific --help.
c0d27fcc 1399 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
ca81d7a0 1400 test -d "$ac_dir" || continue
c0d27fcc
MR
1401 ac_builddir=.
1402
ca81d7a0
JD
1403case "$ac_dir" in
1404.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1405*)
c0d27fcc 1406 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
1407 # A ".." for each directory in $ac_dir_suffix.
1408 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1409 case $ac_top_builddir_sub in
1410 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1411 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1412 esac ;;
1413esac
1414ac_abs_top_builddir=$ac_pwd
1415ac_abs_builddir=$ac_pwd$ac_dir_suffix
1416# for backward compatibility:
1417ac_top_builddir=$ac_top_build_prefix
503d2be0 1418
c0d27fcc 1419case $srcdir in
ca81d7a0 1420 .) # We are building in place.
c0d27fcc 1421 ac_srcdir=.
ca81d7a0
JD
1422 ac_top_srcdir=$ac_top_builddir_sub
1423 ac_abs_top_srcdir=$ac_pwd ;;
1424 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 1425 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
1426 ac_top_srcdir=$srcdir
1427 ac_abs_top_srcdir=$srcdir ;;
1428 *) # Relative name.
1429 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1430 ac_top_srcdir=$ac_top_build_prefix$srcdir
1431 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
edfaf76d 1432esac
ca81d7a0
JD
1433ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1434
1435 cd "$ac_dir" || { ac_status=$?; continue; }
1436 # Check for guested configure.
1437 if test -f "$ac_srcdir/configure.gnu"; then
1438 echo &&
1439 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1440 elif test -f "$ac_srcdir/configure"; then
1441 echo &&
1442 $SHELL "$ac_srcdir/configure" --help=recursive
503d2be0 1443 else
c0d27fcc 1444 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
ca81d7a0
JD
1445 fi || ac_status=$?
1446 cd "$ac_pwd" || { ac_status=$?; break; }
503d2be0
AS
1447 done
1448fi
1449
ca81d7a0 1450test -n "$ac_init_help" && exit $ac_status
503d2be0 1451if $ac_init_version; then
c0d27fcc 1452 cat <<\_ACEOF
9cf8f393 1453emacs configure 23.0.50
f053c89f 1454generated by GNU Autoconf 2.61
503d2be0 1455
ca81d7a0
JD
1456Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14572002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
503d2be0
AS
1458This configure script is free software; the Free Software Foundation
1459gives unlimited permission to copy, distribute and modify it.
c0d27fcc 1460_ACEOF
ca81d7a0 1461 exit
503d2be0 1462fi
ca81d7a0 1463cat >config.log <<_ACEOF
503d2be0
AS
1464This file contains any messages produced by compilers while
1465running configure, to aid debugging if configure makes a mistake.
1466
9cf8f393 1467It was created by emacs $as_me 23.0.50, which was
f053c89f 1468generated by GNU Autoconf 2.61. Invocation command line was
503d2be0
AS
1469
1470 $ $0 $@
1471
c0d27fcc 1472_ACEOF
ca81d7a0 1473exec 5>>config.log
503d2be0
AS
1474{
1475cat <<_ASUNAME
c0d27fcc
MR
1476## --------- ##
1477## Platform. ##
1478## --------- ##
503d2be0
AS
1479
1480hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1481uname -m = `(uname -m) 2>/dev/null || echo unknown`
1482uname -r = `(uname -r) 2>/dev/null || echo unknown`
1483uname -s = `(uname -s) 2>/dev/null || echo unknown`
1484uname -v = `(uname -v) 2>/dev/null || echo unknown`
1485
1486/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1487/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1488
1489/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1490/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1491/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
ca81d7a0 1492/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
503d2be0
AS
1493/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1494/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1495/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1496
925c2f3f 1497_ASUNAME
c0d27fcc
MR
1498
1499as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1500for as_dir in $PATH
1501do
1502 IFS=$as_save_IFS
1503 test -z "$as_dir" && as_dir=.
1504 echo "PATH: $as_dir"
1505done
ca81d7a0 1506IFS=$as_save_IFS
c0d27fcc 1507
503d2be0
AS
1508} >&5
1509
c0d27fcc
MR
1510cat >&5 <<_ACEOF
1511
1512
1513## ----------- ##
1514## Core tests. ##
1515## ----------- ##
1516
1517_ACEOF
503d2be0 1518
503d2be0
AS
1519
1520# Keep a trace of the command line.
1521# Strip out --no-create and --no-recursion so they do not pile up.
19650fd6 1522# Strip out --silent because we don't want to record it for future runs.
503d2be0 1523# Also quote any args containing shell meta-characters.
19650fd6 1524# Make two passes to allow for proper duplicate-argument suppression.
503d2be0 1525ac_configure_args=
19650fd6
AS
1526ac_configure_args0=
1527ac_configure_args1=
19650fd6
AS
1528ac_must_keep_next=false
1529for ac_pass in 1 2
503d2be0 1530do
19650fd6
AS
1531 for ac_arg
1532 do
1533 case $ac_arg in
1534 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1535 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1536 | -silent | --silent | --silen | --sile | --sil)
1537 continue ;;
ca81d7a0 1538 *\'*)
19650fd6
AS
1539 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1540 esac
1541 case $ac_pass in
1542 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1543 2)
1544 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1545 if test $ac_must_keep_next = true; then
edfaf76d 1546 ac_must_keep_next=false # Got value, back to normal.
19650fd6 1547 else
edfaf76d
LK
1548 case $ac_arg in
1549 *=* | --config-cache | -C | -disable-* | --disable-* \
1550 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1551 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1552 | -with-* | --with-* | -without-* | --without-* | --x)
1553 case "$ac_configure_args0 " in
1554 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1555 esac
1556 ;;
1557 -* ) ac_must_keep_next=true ;;
1558 esac
19650fd6 1559 fi
ca81d7a0 1560 ac_configure_args="$ac_configure_args '$ac_arg'"
19650fd6
AS
1561 ;;
1562 esac
1563 done
503d2be0 1564done
19650fd6
AS
1565$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1566$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
503d2be0
AS
1567
1568# When interrupted or exit'd, cleanup temporary files, and complete
1569# config.log. We remove comments because anyway the quotes in there
1570# would cause problems or look ugly.
ca81d7a0
JD
1571# WARNING: Use '\'' to represent an apostrophe within the trap.
1572# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
503d2be0
AS
1573trap 'exit_status=$?
1574 # Save into config.log some information that might help in debugging.
c0d27fcc
MR
1575 {
1576 echo
6bae0ccf 1577
c0d27fcc
MR
1578 cat <<\_ASBOX
1579## ---------------- ##
1580## Cache variables. ##
1581## ---------------- ##
1582_ASBOX
1583 echo
1584 # The following way of writing the cache mishandles newlines in values,
ca81d7a0
JD
1585(
1586 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1587 eval ac_val=\$$ac_var
1588 case $ac_val in #(
1589 *${as_nl}*)
1590 case $ac_var in #(
1591 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1592echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1593 esac
1594 case $ac_var in #(
1595 _ | IFS | as_nl) ;; #(
1596 *) $as_unset $ac_var ;;
1597 esac ;;
1598 esac
1599 done
503d2be0 1600 (set) 2>&1 |
ca81d7a0
JD
1601 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1602 *${as_nl}ac_space=\ *)
503d2be0 1603 sed -n \
ca81d7a0
JD
1604 "s/'\''/'\''\\\\'\'''\''/g;
1605 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1606 ;; #(
503d2be0 1607 *)
ca81d7a0 1608 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 1609 ;;
ca81d7a0
JD
1610 esac |
1611 sort
1612)
c0d27fcc 1613 echo
6bae0ccf
DL
1614
1615 cat <<\_ASBOX
1616## ----------------- ##
1617## Output variables. ##
1618## ----------------- ##
1619_ASBOX
1620 echo
1621 for ac_var in $ac_subst_vars
1622 do
ca81d7a0
JD
1623 eval ac_val=\$$ac_var
1624 case $ac_val in
1625 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1626 esac
1627 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1628 done | sort
1629 echo
1630
1631 if test -n "$ac_subst_files"; then
1632 cat <<\_ASBOX
ca81d7a0
JD
1633## ------------------- ##
1634## File substitutions. ##
1635## ------------------- ##
6bae0ccf
DL
1636_ASBOX
1637 echo
1638 for ac_var in $ac_subst_files
1639 do
ca81d7a0
JD
1640 eval ac_val=\$$ac_var
1641 case $ac_val in
1642 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1643 esac
1644 echo "$ac_var='\''$ac_val'\''"
6bae0ccf
DL
1645 done | sort
1646 echo
1647 fi
1648
c0d27fcc
MR
1649 if test -s confdefs.h; then
1650 cat <<\_ASBOX
1651## ----------- ##
1652## confdefs.h. ##
1653## ----------- ##
1654_ASBOX
1655 echo
ca81d7a0 1656 cat confdefs.h
c0d27fcc
MR
1657 echo
1658 fi
1659 test "$ac_signal" != 0 &&
1660 echo "$as_me: caught signal $ac_signal"
1661 echo "$as_me: exit $exit_status"
1662 } >&5
ca81d7a0
JD
1663 rm -f core *.core core.conftest.* &&
1664 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
503d2be0 1665 exit $exit_status
ca81d7a0 1666' 0
503d2be0
AS
1667for ac_signal in 1 2 13 15; do
1668 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1669done
1670ac_signal=0
1671
1672# confdefs.h avoids OS command line length limits that DEFS can exceed.
ca81d7a0 1673rm -f -r conftest* confdefs.h
ba4481b5 1674
c0d27fcc
MR
1675# Predefined preprocessor variables.
1676
1677cat >>confdefs.h <<_ACEOF
1678#define PACKAGE_NAME "$PACKAGE_NAME"
1679_ACEOF
1680
1681
1682cat >>confdefs.h <<_ACEOF
1683#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1684_ACEOF
1685
1686
1687cat >>confdefs.h <<_ACEOF
1688#define PACKAGE_VERSION "$PACKAGE_VERSION"
1689_ACEOF
1690
1691
1692cat >>confdefs.h <<_ACEOF
1693#define PACKAGE_STRING "$PACKAGE_STRING"
1694_ACEOF
1695
1696
1697cat >>confdefs.h <<_ACEOF
1698#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1699_ACEOF
1700
1701
503d2be0 1702# Let the site file select an alternate cache file if it wants to.
ba4481b5 1703# Prefer explicitly selected file to automatically selected ones.
ca81d7a0
JD
1704if test -n "$CONFIG_SITE"; then
1705 set x "$CONFIG_SITE"
1706elif test "x$prefix" != xNONE; then
1707 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1708else
1709 set x "$ac_default_prefix/share/config.site" \
1710 "$ac_default_prefix/etc/config.site"
ba4481b5 1711fi
ca81d7a0
JD
1712shift
1713for ac_site_file
1714do
ba4481b5 1715 if test -r "$ac_site_file"; then
c0d27fcc 1716 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
503d2be0 1717echo "$as_me: loading site script $ac_site_file" >&6;}
c0d27fcc 1718 sed 's/^/| /' "$ac_site_file" >&5
ba4481b5
DL
1719 . "$ac_site_file"
1720 fi
1721done
1722
1723if test -r "$cache_file"; then
503d2be0
AS
1724 # Some versions of bash will fail to source /dev/null (special
1725 # files actually), so we avoid doing that.
1726 if test -f "$cache_file"; then
c0d27fcc 1727 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
503d2be0
AS
1728echo "$as_me: loading cache $cache_file" >&6;}
1729 case $cache_file in
ca81d7a0
JD
1730 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1731 *) . "./$cache_file";;
503d2be0
AS
1732 esac
1733 fi
ba4481b5 1734else
c0d27fcc 1735 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
503d2be0
AS
1736echo "$as_me: creating cache $cache_file" >&6;}
1737 >$cache_file
1738fi
1739
f053c89f
CY
1740ac_header_list="$ac_header_list sys/time.h"
1741ac_header_list="$ac_header_list unistd.h"
1742ac_func_list="$ac_func_list alarm"
503d2be0
AS
1743# Check that the precious variables saved in the cache have kept the same
1744# value.
1745ac_cache_corrupted=false
ca81d7a0 1746for ac_var in $ac_precious_vars; do
503d2be0
AS
1747 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1748 eval ac_new_set=\$ac_env_${ac_var}_set
ca81d7a0
JD
1749 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1750 eval ac_new_val=\$ac_env_${ac_var}_value
503d2be0
AS
1751 case $ac_old_set,$ac_new_set in
1752 set,)
c0d27fcc 1753 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
503d2be0
AS
1754echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1755 ac_cache_corrupted=: ;;
1756 ,set)
c0d27fcc 1757 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
503d2be0
AS
1758echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1759 ac_cache_corrupted=: ;;
1760 ,);;
1761 *)
1762 if test "x$ac_old_val" != "x$ac_new_val"; then
edfaf76d 1763 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
503d2be0 1764echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
edfaf76d 1765 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
503d2be0 1766echo "$as_me: former value: $ac_old_val" >&2;}
edfaf76d 1767 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
503d2be0 1768echo "$as_me: current value: $ac_new_val" >&2;}
edfaf76d 1769 ac_cache_corrupted=:
503d2be0
AS
1770 fi;;
1771 esac
c0d27fcc 1772 # Pass precious variables to config.status.
503d2be0
AS
1773 if test "$ac_new_set" = set; then
1774 case $ac_new_val in
ca81d7a0 1775 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
c0d27fcc
MR
1776 *) ac_arg=$ac_var=$ac_new_val ;;
1777 esac
1778 case " $ac_configure_args " in
1779 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1780 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
503d2be0
AS
1781 esac
1782 fi
1783done
1784if $ac_cache_corrupted; then
c0d27fcc 1785 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
503d2be0 1786echo "$as_me: error: changes in the environment can compromise the build" >&2;}
c0d27fcc 1787 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
503d2be0
AS
1788echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1789 { (exit 1); exit 1; }; }
ba4481b5
DL
1790fi
1791
c0d27fcc
MR
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
9cf8f393
JD
1803
1804
1805
1806
1807
1808
1809
1810
c0d27fcc
MR
1811
1812
1813
1814
1815
ca81d7a0
JD
1816ac_ext=c
1817ac_cpp='$CPP $CPPFLAGS'
1818ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1819ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1820ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 1821
6bae0ccf 1822
ca81d7a0 1823ac_config_headers="$ac_config_headers src/config.h:src/config.in"
ba4481b5 1824
c0d27fcc 1825
9fb1ba80 1826
ba5da88a 1827test "$program_prefix" != NONE &&
ca81d7a0 1828 program_transform_name="s&^&$program_prefix&;$program_transform_name"
ba5da88a
PJ
1829# Use a double $ so make ignores it.
1830test "$program_suffix" != NONE &&
ca81d7a0 1831 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
ba5da88a
PJ
1832# Double any \ or $. echo might interpret backslashes.
1833# By default was `s,x,x', remove it if useless.
1834cat <<\_ACEOF >conftest.sed
1835s/[\\$]/&&/g;s/;s,x,x,$//
1836_ACEOF
1837program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
ca81d7a0 1838rm -f conftest.sed
ba5da88a 1839
c0d27fcc 1840
ba4481b5
DL
1841lispdir='${datadir}/emacs/${version}/lisp'
1842locallisppath='${datadir}/emacs/${version}/site-lisp:'\
e9291f09
EZ
1843'${datadir}/emacs/site-lisp'
1844lisppath='${locallisppath}:${lispdir}:${datadir}/emacs/${version}/leim'
ba4481b5
DL
1845etcdir='${datadir}/emacs/${version}/etc'
1846archlibdir='${libexecdir}/emacs/${version}/${configuration}'
1847docdir='${datadir}/emacs/${version}/etc'
24b01ec4 1848gamedir='${localstatedir}/games/emacs'
98418dba
CW
1849
1850gameuser=games
1851
c0d27fcc 1852
49adb60f 1853
00b9c927 1854
ca81d7a0 1855# Check whether --with-pop was given.
ba4481b5 1856if test "${with_pop+set}" = set; then
00b9c927 1857 withval=$with_pop;
3d9fec71 1858else
00b9c927
MO
1859 with_pop=yes
1860fi
1861
1862if test "$with_pop" = yes; then
1863 cat >>confdefs.h <<\_ACEOF
3d9fec71 1864#define MAIL_USE_POP 1
c0d27fcc 1865_ACEOF
3d9fec71 1866
ca81d7a0 1867fi
ba4481b5 1868
c0d27fcc 1869
c0d27fcc 1870
ca81d7a0 1871# Check whether --with-kerberos was given.
a21616bd 1872if test "${with_kerberos+set}" = set; then
00b9c927
MO
1873 withval=$with_kerberos;
1874else
1875 with_kerberos=no
1876fi
1877
1878if test "$with_kerberos" = yes; then
54e6585f 1879 cat >>confdefs.h <<\_ACEOF
a21616bd 1880#define KERBEROS 1
c0d27fcc 1881_ACEOF
a21616bd 1882
ca81d7a0 1883fi
c0d27fcc 1884
c0d27fcc 1885
49adb60f 1886
ca81d7a0 1887# Check whether --with-kerberos5 was given.
a21616bd 1888if test "${with_kerberos5+set}" = set; then
00b9c927
MO
1889 withval=$with_kerberos5;
1890else
1891 with_kerberos5=no
1892fi
1893
1894if test "${with_kerberos5}" = yes; then
1895 if test "${with_kerberos}" != yes; then
a21616bd 1896 with_kerberos=yes
c0d27fcc 1897 cat >>confdefs.h <<\_ACEOF
a21616bd 1898#define KERBEROS 1
c0d27fcc 1899_ACEOF
a21616bd
KR
1900
1901 fi
b936fae4 1902
c0d27fcc 1903cat >>confdefs.h <<\_ACEOF
a21616bd 1904#define KERBEROS5 1
c0d27fcc 1905_ACEOF
a21616bd 1906
ca81d7a0 1907fi
b936fae4 1908
49adb60f 1909
ca81d7a0
JD
1910# Check whether --with-hesiod was given.
1911if test "${with_hesiod+set}" = set; then
00b9c927
MO
1912 withval=$with_hesiod;
1913else
1914 with_hesiod=no
1915fi
1916
1917if test "$with_hesiod" = yes; then
54e6585f 1918
c0d27fcc 1919cat >>confdefs.h <<\_ACEOF
ba4481b5 1920#define HESIOD 1
c0d27fcc 1921_ACEOF
ba4481b5 1922
ca81d7a0 1923fi
c0d27fcc 1924
c0d27fcc 1925
ca81d7a0 1926# Check whether --with-sound was given.
2c9dccc9 1927if test "${with_sound+set}" = set; then
ca81d7a0 1928 withval=$with_sound;
00b9c927
MO
1929else
1930 with_sound=yes
ca81d7a0 1931fi
2c9dccc9 1932
2c9dccc9 1933
c0d27fcc 1934
ca81d7a0 1935# Check whether --with-x-toolkit was given.
ba4481b5 1936if test "${with_x_toolkit+set}" = set; then
ca81d7a0 1937 withval=$with_x_toolkit; case "${withval}" in
089a966d 1938 y | ye | yes ) val=gtk ;;
ba4481b5
DL
1939 n | no ) val=no ;;
1940 l | lu | luc | luci | lucid ) val=lucid ;;
1941 a | at | ath | athe | athen | athena ) val=athena ;;
1942 m | mo | mot | moti | motif ) val=motif ;;
488dd4c4 1943 g | gt | gtk ) val=gtk ;;
ba4481b5 1944 * )
29d69661 1945{ { echo "$as_me:$LINENO: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1946this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661
JD
1947\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&5
1948echo "$as_me: error: \`--with-x-toolkit=$withval' is invalid;
488dd4c4 1949this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'.
29d69661 1950\`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." >&2;}
503d2be0 1951 { (exit 1); exit 1; }; }
ba4481b5
DL
1952 ;;
1953 esac
1954 with_x_toolkit=$val
1955
ca81d7a0 1956fi
8eeae1c9 1957
ba4481b5 1958
49adb60f 1959
ca81d7a0 1960# Check whether --with-xpm was given.
ba4481b5 1961if test "${with_xpm+set}" = set; then
ca81d7a0 1962 withval=$with_xpm;
00b9c927 1963else
c8467c40 1964 with_xpm=yes
ca81d7a0 1965fi
503d2be0 1966
ba4481b5 1967
ca81d7a0 1968# Check whether --with-jpeg was given.
ba4481b5 1969if test "${with_jpeg+set}" = set; then
ca81d7a0 1970 withval=$with_jpeg;
00b9c927 1971else
c8467c40 1972 with_jpeg=yes
ca81d7a0 1973fi
503d2be0 1974
ba4481b5 1975
ca81d7a0 1976# Check whether --with-tiff was given.
ba4481b5 1977if test "${with_tiff+set}" = set; then
ca81d7a0 1978 withval=$with_tiff;
00b9c927 1979else
c8467c40 1980 with_tiff=yes
ca81d7a0 1981fi
503d2be0 1982
ba4481b5 1983
ca81d7a0 1984# Check whether --with-gif was given.
ba4481b5 1985if test "${with_gif+set}" = set; then
ca81d7a0 1986 withval=$with_gif;
00b9c927 1987else
c8467c40 1988 with_gif=yes
ca81d7a0 1989fi
503d2be0 1990
ba4481b5 1991
ca81d7a0 1992# Check whether --with-png was given.
ba4481b5 1993if test "${with_png+set}" = set; then
ca81d7a0 1994 withval=$with_png;
00b9c927 1995else
c8467c40 1996 with_png=yes
ca81d7a0 1997fi
503d2be0 1998
ba4481b5 1999
0cfc0546
GM
2000# Check whether --with-rsvg was given.
2001if test "${with_rsvg+set}" = set; then
2002 withval=$with_rsvg;
00b9c927 2003else
c8467c40 2004 with_rsvg=yes
0cfc0546
GM
2005fi
2006
2007
c8467c40 2008
c24fa7dc 2009# Check whether --with-freetype was given.
45a4b03e 2010if test "${with_freetype+set}" = set; then
c24fa7dc 2011 withval=$with_freetype;
d235ca2f 2012else
4efcc8d1 2013 with_freetype=yes
c24fa7dc 2014fi
45a4b03e 2015
45a4b03e 2016
c24fa7dc 2017# Check whether --with-xft was given.
45a4b03e 2018if test "${with_xft+set}" = set; then
c24fa7dc 2019 withval=$with_xft;
d235ca2f 2020else
4efcc8d1 2021 with_xft=yes
c24fa7dc 2022fi
45a4b03e 2023
45a4b03e 2024
d235ca2f
MB
2025# Check whether --with-libotf was given.
2026if test "${with_libotf+set}" = set; then
2027 withval=$with_libotf;
2028else
2029 with_libotf=yes
79011b82
NR
2030fi
2031
2032
d235ca2f
MB
2033# Check whether --with-m17n-flt was given.
2034if test "${with_m17n_flt+set}" = set; then
2035 withval=$with_m17n_flt;
2036else
2037 with_m17n_flt=yes
0cfc0546
GM
2038fi
2039
2040
d235ca2f 2041
ca81d7a0 2042# Check whether --with-toolkit-scroll-bars was given.
ba4481b5 2043if test "${with_toolkit_scroll_bars+set}" = set; then
ca81d7a0 2044 withval=$with_toolkit_scroll_bars;
00b9c927
MO
2045else
2046 with_toolkit_scroll_bars=yes
ca81d7a0 2047fi
503d2be0 2048
ba4481b5 2049
e35a28cd
TTN
2050# Check whether --with-xaw3d was given.
2051if test "${with_xaw3d+set}" = set; then
2052 withval=$with_xaw3d;
00b9c927
MO
2053else
2054 with_xaw3d=yes
c982cf7d
JD
2055fi
2056
2057
ca81d7a0 2058# Check whether --with-xim was given.
1d36487c 2059if test "${with_xim+set}" = set; then
ca81d7a0 2060 withval=$with_xim;
00b9c927
MO
2061else
2062 with_xim=yes
ca81d7a0 2063fi
1d36487c 2064
ba4481b5 2065
ca81d7a0 2066# Check whether --with-carbon was given.
e0f712ba 2067if test "${with_carbon+set}" = set; then
ca81d7a0 2068 withval=$with_carbon;
00b9c927 2069else
c8467c40
GM
2070 with_carbon=no
2071fi
2072
2073
2074
2075# Check whether --with-gpm was given.
2076if test "${with_gpm+set}" = set; then
2077 withval=$with_gpm;
2078else
2079 with_gpm=yes
ca81d7a0 2080fi
e0f712ba 2081
49adb60f 2082
131e4133
MA
2083# Check whether --with-dbus was given.
2084if test "${with_dbus+set}" = set; then
2085 withval=$with_dbus;
00b9c927 2086else
b5a922de 2087 with_dbus=yes
131e4133
MA
2088fi
2089
2090
e70b2110 2091
9d2818d6
DN
2092# Check whether --with-gtk was given.
2093if test "${with_gtk+set}" = set; then
2094 withval=$with_gtk; { { echo "$as_me:$LINENO: error: --with-gtk has been removed. Use --with-x-toolkit to
2095specify a toolkit." >&5
2096echo "$as_me: error: --with-gtk has been removed. Use --with-x-toolkit to
2097specify a toolkit." >&2;}
2098 { (exit 1); exit 1; }; }
2099fi
2100
2101
2102
2103# Check whether --with-gcc was given.
2104if test "${with_gcc+set}" = set; then
2105 withval=$with_gcc; { { echo "$as_me:$LINENO: error: --with-gcc has been removed. Set the \`CC' environment
2106 variable to specify a compiler." >&5
2107echo "$as_me: error: --with-gcc has been removed. Set the \`CC' environment
2108 variable to specify a compiler." >&2;}
2109 { (exit 1); exit 1; }; }
2110fi
2111
2112
2113
00b9c927
MO
2114# Check whether --with-pkg-config-prog was given.
2115if test "${with_pkg_config_prog+set}" = set; then
2116 withval=$with_pkg_config_prog;
e70b2110
KH
2117fi
2118
00b9c927
MO
2119if test "X${with_pkg_config_prog}" != X; then
2120 if test "${with_pkg_config_prog}" != yes; then
2121 PKG_CONFIG="${with_pkg_config_prog}"
2122 fi
2123fi
e70b2110 2124
ca81d7a0 2125# Check whether --enable-carbon-app was given.
6a3a24fa 2126if test "${enable_carbon_app+set}" = set; then
ca81d7a0
JD
2127 enableval=$enable_carbon_app; carbon_appdir_x=${enableval}
2128fi
2129
e0f712ba 2130
8d01ddb4 2131## Enabled by default.
c24fa7dc 2132# Check whether --enable-font-backend was given.
45a4b03e 2133if test "${enable_font_backend+set}" = set; then
c24fa7dc 2134 enableval=$enable_font_backend; USE_FONT_BACKEND=$enableval
45a4b03e 2135else
8d01ddb4 2136 USE_FONT_BACKEND=yes
c24fa7dc 2137fi
45a4b03e 2138
c24fa7dc 2139
ca34d75a
JD
2140# Check whether --enable-sync-input was given.
2141if test "${enable_sync_input+set}" = set; then
2142 enableval=$enable_sync_input; USE_SYNC_INPUT=$enableval
2143else
2144 USE_SYNC_INPUT=yes
2145fi
2146
2147
c24fa7dc 2148# Check whether --enable-asserts was given.
d0098f13 2149if test "${enable_asserts+set}" = set; then
ca81d7a0 2150 enableval=$enable_asserts; USE_XASSERTS=$enableval
d0098f13
JD
2151else
2152 USE_XASSERTS=no
ca81d7a0 2153fi
8eeae1c9 2154
d0098f13 2155
ca81d7a0 2156# Check whether --enable-maintainer-mode was given.
19650fd6 2157if test "${enable_maintainer_mode+set}" = set; then
ca81d7a0 2158 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
19650fd6
AS
2159else
2160 USE_MAINTAINER_MODE=no
ca81d7a0
JD
2161fi
2162
19650fd6
AS
2163if test $USE_MAINTAINER_MODE = yes; then
2164 MAINT=
2165else
2166 MAINT=#
2167fi
2168
2169
ca81d7a0 2170# Check whether --enable-locallisppath was given.
9adfabc2 2171if test "${enable_locallisppath+set}" = set; then
ca81d7a0 2172 enableval=$enable_locallisppath; if test "${enableval}" = "no"; then
9adfabc2
LK
2173 locallisppath=
2174elif test "${enableval}" != "yes"; then
2175 locallisppath=${enableval}
2176fi
ca81d7a0
JD
2177fi
2178
9adfabc2 2179
ba4481b5 2180#### Make srcdir absolute, if it isn't already. It's important to
17494071 2181#### avoid running the path through pwd unnecessarily, since pwd can
ba4481b5
DL
2182#### give you automounter prefixes, which can go away. We do all this
2183#### so Emacs can find its files when run uninstalled.
17494071
GM
2184## Make sure CDPATH doesn't affect cd (in case PWD is relative).
2185unset CDPATH
ba4481b5
DL
2186case "${srcdir}" in
2187 /* ) ;;
2188 . )
2189 ## We may be able to use the $PWD environment variable to make this
2190 ## absolute. But sometimes PWD is inaccurate.
df645f7c
AS
2191 ## Note: we used to use ${PWD} at the end instead of `pwd`,
2192 ## but that tested only for a well-formed and valid PWD,
2193 ## it did not object when PWD was well-formed and valid but just wrong.
2194 if test ".${PWD}" != "." && test ".`(cd ${PWD} ; sh -c pwd)`" = ".`pwd`" ;
ba4481b5
DL
2195 then
2196 srcdir="$PWD"
2197 else
2198 srcdir="`(cd ${srcdir}; pwd)`"
2199 fi
2200 ;;
2201 * ) srcdir="`(cd ${srcdir}; pwd)`" ;;
2202esac
2203
2204#### Check if the source directory already has a configured system in it.
2205if test `pwd` != `(cd ${srcdir} && pwd)` \
2206 && test -f "${srcdir}/src/config.h" ; then
c0d27fcc 2207 { echo "$as_me:$LINENO: WARNING: The directory tree \`${srcdir}' is being used
503d2be0
AS
2208 as a build directory right now; it has been configured in its own
2209 right. To configure in another directory as well, you MUST
2210 use GNU make. If you do not have GNU make, then you must
2211 now do \`make distclean' in ${srcdir},
2212 and then run $0 again." >&5
2213echo "$as_me: WARNING: The directory tree \`${srcdir}' is being used
ba4481b5
DL
2214 as a build directory right now; it has been configured in its own
2215 right. To configure in another directory as well, you MUST
2216 use GNU make. If you do not have GNU make, then you must
2217 now do \`make distclean' in ${srcdir},
503d2be0 2218 and then run $0 again." >&2;}
ba4481b5
DL
2219fi
2220
2221#### Given the configuration name, set machfile and opsysfile to the
2222#### names of the m/*.h and s/*.h files we should use.
2223
2224### Canonicalize the configuration name.
2225
2226ac_aux_dir=
ca81d7a0
JD
2227for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2228 if test -f "$ac_dir/install-sh"; then
ba4481b5
DL
2229 ac_aux_dir=$ac_dir
2230 ac_install_sh="$ac_aux_dir/install-sh -c"
2231 break
ca81d7a0 2232 elif test -f "$ac_dir/install.sh"; then
ba4481b5
DL
2233 ac_aux_dir=$ac_dir
2234 ac_install_sh="$ac_aux_dir/install.sh -c"
2235 break
ca81d7a0 2236 elif test -f "$ac_dir/shtool"; then
503d2be0
AS
2237 ac_aux_dir=$ac_dir
2238 ac_install_sh="$ac_aux_dir/shtool install -c"
2239 break
ba4481b5
DL
2240 fi
2241done
2242if test -z "$ac_aux_dir"; then
ca81d7a0
JD
2243 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
2244echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
503d2be0 2245 { (exit 1); exit 1; }; }
ba4481b5 2246fi
ca81d7a0
JD
2247
2248# These three variables are undocumented and unsupported,
2249# and are intended to be withdrawn in a future Autoconf release.
2250# They can cause serious problems if a builder's source tree is in a directory
2251# whose full name contains unusual characters.
2252ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2253ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2254ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2255
ba4481b5
DL
2256
2257# Make sure we can run config.sub.
ca81d7a0
JD
2258$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2259 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
2260echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
503d2be0
AS
2261 { (exit 1); exit 1; }; }
2262
ca81d7a0
JD
2263{ echo "$as_me:$LINENO: checking build system type" >&5
2264echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
503d2be0
AS
2265if test "${ac_cv_build+set}" = set; then
2266 echo $ECHO_N "(cached) $ECHO_C" >&6
2267else
ca81d7a0
JD
2268 ac_build_alias=$build_alias
2269test "x$ac_build_alias" = x &&
2270 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2271test "x$ac_build_alias" = x &&
c0d27fcc 2272 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
503d2be0
AS
2273echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2274 { (exit 1); exit 1; }; }
ca81d7a0
JD
2275ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2276 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
2277echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
503d2be0
AS
2278 { (exit 1); exit 1; }; }
2279
2280fi
ca81d7a0
JD
2281{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
2282echo "${ECHO_T}$ac_cv_build" >&6; }
2283case $ac_cv_build in
2284*-*-*) ;;
2285*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
2286echo "$as_me: error: invalid value of canonical build" >&2;}
2287 { (exit 1); exit 1; }; };;
2288esac
503d2be0 2289build=$ac_cv_build
ca81d7a0
JD
2290ac_save_IFS=$IFS; IFS='-'
2291set x $ac_cv_build
2292shift
2293build_cpu=$1
2294build_vendor=$2
2295shift; shift
2296# Remember, the first character of IFS is used to create $*,
2297# except with old shells:
2298build_os=$*
2299IFS=$ac_save_IFS
2300case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2301
2302
2303{ echo "$as_me:$LINENO: checking host system type" >&5
2304echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
503d2be0
AS
2305if test "${ac_cv_host+set}" = set; then
2306 echo $ECHO_N "(cached) $ECHO_C" >&6
2307else
ca81d7a0
JD
2308 if test "x$host_alias" = x; then
2309 ac_cv_host=$ac_cv_build
2310else
2311 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2312 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
2313echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
503d2be0 2314 { (exit 1); exit 1; }; }
ca81d7a0 2315fi
503d2be0
AS
2316
2317fi
ca81d7a0
JD
2318{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
2319echo "${ECHO_T}$ac_cv_host" >&6; }
2320case $ac_cv_host in
2321*-*-*) ;;
2322*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
2323echo "$as_me: error: invalid value of canonical host" >&2;}
2324 { (exit 1); exit 1; }; };;
2325esac
503d2be0 2326host=$ac_cv_host
ca81d7a0
JD
2327ac_save_IFS=$IFS; IFS='-'
2328set x $ac_cv_host
2329shift
2330host_cpu=$1
2331host_vendor=$2
2332shift; shift
2333# Remember, the first character of IFS is used to create $*,
2334# except with old shells:
2335host_os=$*
2336IFS=$ac_save_IFS
2337case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ba4481b5 2338
c0d27fcc 2339
ba4481b5 2340canonical=$host
1770dcdc 2341configuration=${host_alias-${build_alias-$host}}
ba4481b5 2342
c0d27fcc 2343
22044edf 2344
ba4481b5
DL
2345### If you add support for a new configuration, add code to this
2346### switch statement to recognize your configuration name and select
2347### the appropriate operating system and machine description files.
2348
2349### You would hope that you could choose an m/*.h file pretty much
2350### based on the machine portion of the configuration name, and an s-
2351### file based on the operating system portion. However, it turns out
2352### that each m/*.h file is pretty manufacturer-specific - for
55e6d9b2
AS
2353### example hp9000s300.h is a 68000 machine;
2354### mips.h, pmax.h are all MIPS
ba4481b5
DL
2355### machines. So we basically have to have a special case for each
2356### configuration name.
2357###
2358### As far as handling version numbers on operating systems is
2359### concerned, make sure things will fail in a fixable way. If
2360### /etc/MACHINES doesn't say anything about version numbers, be
2361### prepared to handle anything reasonably. If version numbers
2362### matter, be sure /etc/MACHINES says something about it.
2363###
2364### Eric Raymond says we should accept strings like "sysvr4" to mean
2365### "System V Release 4"; he writes, "The old convention encouraged
2366### confusion between `system' and `release' levels'."
2367
2368machine='' opsys='' unported=no
2369case "${canonical}" in
2370
1096bcc0
GM
2371 ## FreeBSD ports
2372 *-*-freebsd* )
2373 opsys=freebsd
2374 case "${canonical}" in
2375 alpha*-*-freebsd*) machine=alpha ;;
ece58427 2376 arm*-*-freebsd*) machine=arm ;;
ec8fcb10
YM
2377 ia64-*-freebsd*) machine=ia64 ;;
2378 sparc64-*-freebsd*) machine=sparc ;;
2379 powerpc-*-freebsd*) machine=macppc ;;
1096bcc0 2380 i[3456]86-*-freebsd*) machine=intel386 ;;
01abe918 2381 amd64-*-freebsd*|x86_64-*-freebsd*) machine=amdx86-64 ;;
1096bcc0
GM
2382 esac
2383 ;;
2384
1b275743
GM
2385 ## FreeBSD kernel + glibc based userland
2386 *-*-kfreebsd*gnu* )
2387 opsys=gnu-kfreebsd
2388 case "${canonical}" in
2389 alpha*-*-kfreebsd*) machine=alpha ;;
2390 ia64-*-kfreebsd*) machine=ia64 ;;
2391 sparc64-*-kfreebsd*) machine=sparc ;;
2392 powerpc-*-kfreebsd*) machine=macppc ;;
2393 i[3456]86-*-kfreebsd*) machine=intel386 ;;
2394 amd64-*-kfreebsd*|x86_64-*-kfreebsd*) machine=amdx86-64 ;;
2395 esac
2396 ;;
2397
ba4481b5
DL
2398 ## NetBSD ports
2399 *-*-netbsd* )
2400 opsys=netbsd
dd038e26 2401 if test -f /usr/lib/crti.o; then
f57bd967
DL
2402
2403cat >>confdefs.h <<\_ACEOF
2404#define HAVE_CRTIN
dd038e26
AS
2405_ACEOF
2406
2407 fi
2408
ba4481b5
DL
2409 case "${canonical}" in
2410 alpha*-*-netbsd*) machine=alpha ;;
2411 i[3456]86-*-netbsd*) machine=intel386 ;;
2412 m68k-*-netbsd*)
2413 # This is somewhat bogus.
2414 machine=hp9000s300 ;;
ba4481b5 2415 mips-*-netbsd*) machine=pmax ;;
2df636f4 2416 mipsel-*-netbsd*) machine=pmax ;;
97836269 2417 mipseb-*-netbsd*) machine=pmax ;;
3a64eef5 2418 powerpc-*-netbsd*) machine=macppc ;;
71c9ec51 2419 sparc*-*-netbsd*) machine=sparc ;;
ba4481b5 2420 vax-*-netbsd*) machine=vax ;;
2df636f4 2421 arm-*-netbsd*) machine=arm ;;
d54ee7b4
EZ
2422 x86_64-*-netbsd*) machine=amdx86-64 ;;
2423 hppa-*-netbsd*) machine=hp800 ;;
ba4481b5
DL
2424 esac
2425 ;;
2426
2427 ## OpenBSD ports
2428 *-*-openbsd* )
2429 opsys=openbsd
2430 case "${canonical}" in
2431 alpha*-*-openbsd*) machine=alpha ;;
85410b02
CY
2432 arm-*-openbsd*) machine=arm ;;
2433 hppa-*-openbsd*) machine=hp9000s300 ;;
2434 i386-*-openbsd*) machine=intel386 ;;
2435 m68k-*-openbsd*) machine=hp9000s300 ;;
85410b02 2436 powerpc-*-openbsd*) machine=macppc ;;
85410b02
CY
2437 sparc*-*-openbsd*) machine=sparc ;;
2438 vax-*-openbsd*) machine=vax ;;
2439 x86_64-*-openbsd*) machine=amdx86-64 ;;
ba4481b5
DL
2440 esac
2441 ;;
2442
10a3b1a1
EZ
2443 ## LynxOS ports
2444 *-*-lynxos* )
2445 opsys=lynxos
2446 case "${canonical}" in
2447 i[3456]86-*-lynxos*) machine=intel386 ;;
2448 powerpc-*-lynxos*) machine=powerpc ;;
2449 esac
2450 ;;
2451
ba4481b5
DL
2452 ## BSDI ports
2453 *-*-bsdi* )
2454 opsys=bsdi
2455 case "${canonical}" in
2456 i[345]86-*-bsdi*) machine=intel386 ;;
2457 sparc-*-bsdi*) machine=sparc ;;
3aeecf97 2458 powerpc-*-bsdi*) machine=macppc ;;
ba4481b5
DL
2459 esac
2460 case "${canonical}" in
2461 *-*-bsd386* | *-*-bsdi1* ) opsys=bsd386 ;;
2462 *-*-bsdi2.0* ) opsys=bsdos2 ;;
2463 *-*-bsdi2* ) opsys=bsdos2-1 ;;
2464 *-*-bsdi3* ) opsys=bsdos3 ;;
1d06fc82 2465 *-*-bsdi[45]* ) opsys=bsdos4 ;;
ba4481b5
DL
2466 esac
2467 ;;
2468
ba4481b5
DL
2469 alpha*-*-linux-gnu* )
2470 machine=alpha opsys=gnu-linux
2471 ;;
2472
c4bb2108
DL
2473 arm*-*-linux-gnu* )
2474 machine=arm opsys=gnu-linux
2475 ;;
2476
040c474e
CY
2477 ## Apple Darwin / Mac OS X
2478 *-apple-darwin* )
2479 case "${canonical}" in
2480 i[3456]86-* ) machine=intel386 ;;
2481 powerpc-* ) machine=powermac ;;
2482 * ) unported=yes ;;
2483 esac
2484 opsys=darwin
2485 # Define CPP as follows to make autoconf work correctly.
2486 CPP="${CC-cc} -E -no-cpp-precomp"
2487 # Use fink packages if available.
2488 if test -d /sw/include && test -d /sw/lib; then
2489 GCC_TEST_OPTIONS="-I/sw/include -L/sw/lib"
2490 CPP="${CPP} ${GCC_TEST_OPTIONS}"
2491 NON_GCC_TEST_OPTIONS=${GCC_TEST_OPTIONS}
2492 fi
2493 ;;
2494
ba4481b5
DL
2495 ## Cubix QBx/386
2496 i[3456]86-cubix-sysv* )
2497 machine=intel386 opsys=usg5-3
2498 ;;
2499
ba4481b5
DL
2500 mips-dec-ultrix[0-3].* | mips-dec-ultrix4.0* | mips-dec-bsd4.2* )
2501 machine=pmax opsys=bsd4-2
2502 ;;
2503 mips-dec-ultrix4.[12]* | mips-dec-bsd* )
2504 machine=pmax opsys=bsd4-3
2505 ;;
2506 mips-dec-ultrix* )
2507 machine=pmax opsys=ultrix4-3
2508 ;;
ba4481b5
DL
2509 ## HP 9000 series 200 or 300
2510 m68*-hp-bsd* )
2511 machine=hp9000s300 opsys=bsd4-3
2512 ;;
2513 ## HP/UX 7, 8, 9, and 10 are supported on these machines.
2514 m68*-hp-hpux* )
2515 case "`uname -r`" in
2516 ## Someone's system reports A.B8.05 for this.
2517 ## I wonder what other possibilities there are.
2518 *.B8.* ) machine=hp9000s300 opsys=hpux8 ;;
2519 *.08.* ) machine=hp9000s300 opsys=hpux8 ;;
2520 *.09.* ) machine=hp9000s300 opsys=hpux9 ;;
2521 *.1[0-9].* ) machine=hp9000s300 opsys=hpux9shr ;;
2522 *) machine=hp9000s300 opsys=hpux ;;
2523 esac
2524 ;;
2525
6fbb6db1
GM
2526 ## HP 9000 series 700 and 800, running HP/UX
2527 hppa*-hp-hpux7* )
2528 machine=hp800 opsys=hpux
2529 ;;
2530 hppa*-hp-hpux8* )
2531 machine=hp800 opsys=hpux8
2532 ;;
2533 hppa*-hp-hpux9shr* )
2534 machine=hp800 opsys=hpux9shr
2535 ;;
2536 hppa*-hp-hpux9* )
2537 machine=hp800 opsys=hpux9
2538 ;;
2539 hppa*-hp-hpux10.2* )
2540 machine=hp800 opsys=hpux10-20
2541 ;;
2542 hppa*-hp-hpux10* )
2543 machine=hp800 opsys=hpux10
2544 ;;
2545 hppa*-hp-hpux1[1-9]* )
2546 machine=hp800 opsys=hpux11
2547 CFLAGS="-D_INCLUDE__STDC_A1_SOURCE $CFLAGS"
2548 ;;
2549
409d9577
GM
2550 hppa*-*-linux-gnu* )
2551 machine=hp800 opsys=gnu-linux
2552 ;;
2553
6fbb6db1
GM
2554 ## HP 9000 series 700 and 800, running HP/UX
2555 hppa*-hp-hpux* )
2556 ## Cross-compilation? Nah!
2557 case "`uname -r`" in
2558 ## Someone's system reports A.B8.05 for this.
2559 ## I wonder what other possibilities there are.
2560 *.B8.* ) machine=hp800 opsys=hpux8 ;;
2561 *.08.* ) machine=hp800 opsys=hpux8 ;;
2562 *.09.* ) machine=hp800 opsys=hpux9 ;;
2563 *) machine=hp800 opsys=hpux10 ;;
2564 esac
2565 ;;
ba4481b5
DL
2566 hppa*-*-nextstep* )
2567 machine=hp800 opsys=nextstep
2568 ;;
2569
ba4481b5 2570 ## IBM machines
ba4481b5
DL
2571 i370-ibm-aix*)
2572 machine=ibm370aix opsys=usg5-3
2573 ;;
55597d70 2574 s390-*-linux-gnu* )
138f0859
GM
2575 machine=ibms390 opsys=gnu-linux
2576 ;;
bcdb1378
EZ
2577 s390x-*-linux-gnu* )
2578 machine=ibms390x opsys=gnu-linux
2579 ;;
ba4481b5
DL
2580 rs6000-ibm-aix3.1* | powerpc-ibm-aix3.1* )
2581 machine=ibmrs6000 opsys=aix3-1
2582 ;;
2583 rs6000-ibm-aix3.2.5 | powerpc-ibm-aix3.2.5 )
2584 machine=ibmrs6000 opsys=aix3-2-5
2585 ;;
2586 rs6000-ibm-aix4.1* | powerpc-ibm-aix4.1* )
2587 machine=ibmrs6000 opsys=aix4-1
2588 ;;
2589 rs6000-ibm-aix4.2* | powerpc-ibm-aix4.2* )
2590 machine=ibmrs6000 opsys=aix4-2
2591 ;;
67bf991b
CY
2592 rs6000-ibm-aix4.3* | powerpc-ibm-aix4.3* )
2593 machine=ibmrs6000 opsys=aix4-2
2594 ;;
55597d70 2595 rs6000-ibm-aix5* | powerpc-ibm-aix5* )
d6b82250
EZ
2596 machine=ibmrs6000 opsys=aix4-2
2597 ;;
26a42dac
DN
2598 rs6000-ibm-aix5* | powerpc-ibm-aix6* )
2599 machine=ibmrs6000 opsys=aix4-2
2600 ;;
ba4481b5
DL
2601 rs6000-ibm-aix4.0* | powerpc-ibm-aix4.0* )
2602 machine=ibmrs6000 opsys=aix4
2603 ;;
2604 rs6000-ibm-aix4* | powerpc-ibm-aix4* )
2605 machine=ibmrs6000 opsys=aix4-1
2606 ;;
2607 rs6000-ibm-aix* | powerpc-ibm-aix* )
2608 machine=ibmrs6000 opsys=aix3-2
2609 ;;
ba4481b5
DL
2610
2611 ## Prime EXL
2612 i[3456]86-prime-sysv* )
2613 machine=i386 opsys=usg5-3
2614 ;;
2615
ba4481b5
DL
2616 ## ncr machine running svr4.3.
2617 i[3456]86-ncr-sysv4.3 )
2618 machine=ncr386 opsys=usg5-4-3
2619 ;;
2620
2621 ## Unspecified sysv on an ncr machine defaults to svr4.2.
2622 ## (Plain usg5-4 doesn't turn on POSIX signals, which we need.)
2623 i[3456]86-ncr-sysv* )
2624 machine=ncr386 opsys=usg5-4-2
2625 ;;
2626
c76e04a8
GM
2627 ## Macintosh PowerPC
2628 powerpc*-*-linux-gnu* )
2629 machine=macppc opsys=gnu-linux
2630 ;;
2631
ba4481b5
DL
2632 ## Workstations sold by MIPS
2633 ## This is not necessarily all workstations using the MIPS processor -
2634 ## Irises are produced by SGI, and DECstations by DEC.
2635
ba4481b5
DL
2636 mips-mips-bsd* )
2637 machine=mips opsys=bsd4-3
2638 ;;
2639 mips-mips-* )
2640 machine=mips opsys=usg5-2-2
2641 ;;
2642
2643 ## NeXT
2644 m68*-next-* | m68k-*-nextstep* )
2645 machine=m68k opsys=nextstep
2646 ;;
2647
ba4481b5
DL
2648 ## NEC EWS4800
2649 mips-nec-sysv4*)
2650 machine=ews4800 opsys=ux4800
2651 ;;
2652
ba4481b5
DL
2653 ## Siemens Nixdorf
2654 mips-siemens-sysv* | mips-sni-sysv*)
2655 machine=mips-siemens opsys=usg5-4
2656 NON_GNU_CC=/usr/ccs/bin/cc
2657 NON_GNU_CPP=/usr/ccs/lib/cpp
2658 ;;
2659
2660 ## Silicon Graphics machines
ba4481b5 2661 ## Iris 4D
ba4481b5
DL
2662 mips-sgi-irix6.5 )
2663 machine=iris4d opsys=irix6-5
946173ad
DL
2664 # Without defining _LANGUAGE_C, things get masked out in the headers
2665 # so that, for instance, grepping for `free' in stdlib.h fails and
2666 # AC_HEADER_STD_C fails. (MIPSPro 7.2.1.2m compilers, Irix 6.5.3m).
2667 NON_GNU_CPP="/lib/cpp -D_LANGUAGE_C"
d42122a3 2668 NON_GCC_TEST_OPTIONS="-D_LANGUAGE_C"
ba4481b5 2669 ;;
ba4481b5 2670
ba4481b5
DL
2671 ## Suns
2672 sparc-*-linux-gnu* | sparc64-*-linux-gnu* )
2673 machine=sparc opsys=gnu-linux
2674 ;;
2675
d054101f 2676 *-auspex-sunos* | *-sun-sunos* | *-sun-bsd* | *-sun-solaris* \
ba4481b5
DL
2677 | i[3456]86-*-solaris2* | i[3456]86-*-sunos5* | powerpc*-*-solaris2* \
2678 | rs6000-*-solaris2*)
2679 case "${canonical}" in
ba4481b5 2680 i[3456]86-*-* ) machine=intel386 ;;
af46e133 2681 amd64-*-*|x86_64-*-*) machine=amdx86-64 ;;
ba4481b5
DL
2682 powerpcle* ) machine=powerpcle ;;
2683 powerpc* | rs6000* ) machine=ibmrs6000 ;;
2684 sparc* ) machine=sparc ;;
2685 * ) unported=yes ;;
2686 esac
2687 case "${canonical}" in
ba4481b5
DL
2688 *-sunos5.3* | *-solaris2.3* )
2689 opsys=sol2-3
2690 NON_GNU_CPP=/usr/ccs/lib/cpp
2691 ;;
2692 *-sunos5.4* | *-solaris2.4* )
2693 opsys=sol2-4
2694 NON_GNU_CPP=/usr/ccs/lib/cpp
2695 RANLIB="ar -ts"
2696 ;;
2697 *-sunos5.5* | *-solaris2.5* )
2698 opsys=sol2-5
2699 NON_GNU_CPP=/usr/ccs/lib/cpp
2700 RANLIB="ar -ts"
2701 ;;
8e967cf7
MR
2702 *-sunos5.6* | *-solaris2.6* )
2703 opsys=sol2-6
2704 NON_GNU_CPP=/usr/ccs/lib/cpp
2705 RANLIB="ar -ts"
2706 ;;
ba4481b5 2707 *-sunos5* | *-solaris* )
9e71690e 2708 opsys=sol2-6
089a966d
GM
2709 emacs_check_sunpro_c=yes
2710 NON_GNU_CPP=/usr/ccs/lib/cpp
ba4481b5
DL
2711 ;;
2712 * ) opsys=bsd4-2 ;;
2713 esac
2714 ## Watch out for a compiler that we know will not work.
2715 case "${canonical}" in
2716 *-solaris* | *-sunos5* )
2717 if [ "x$CC" = x/usr/ucb/cc ]; then
2718 ## /usr/ucb/cc doesn't work;
2719 ## we should find some other compiler that does work.
2720 unset CC
2721 fi
2722 ;;
2723 *) ;;
2724 esac
2725 ;;
2726 sparc-*-nextstep* )
2727 machine=sparc opsys=nextstep
2728 ;;
2729
ba4481b5
DL
2730 ## Tandem Integrity S2
2731 mips-tandem-sysv* )
2732 machine=tandem-s2 opsys=usg5-3
2733 ;;
2734
ba4481b5
DL
2735 ## Vaxen.
2736 vax-dec-* )
2737 machine=vax
2738 case "${canonical}" in
2739 *-bsd4.1* ) opsys=bsd4-1 ;;
2740 *-bsd4.2* | *-ultrix[0-3].* | *-ultrix4.0* ) opsys=bsd4-2 ;;
2741 *-bsd4.3* | *-ultrix* ) opsys=bsd4-3 ;;
2742 *-sysv[01]* | *-sysvr[01]* ) opsys=usg5-0 ;;
2743 *-sysv2* | *-sysvr2* ) opsys=usg5-2 ;;
2744 *-vms* ) opsys=vms ;;
2745 * ) unported=yes
2746 esac
2747 ;;
2748
f4988be7
GM
2749 ## IA-64
2750 ia64*-*-linux* )
2751 machine=ia64 opsys=gnu-linux
2752 ;;
2753
ba4481b5
DL
2754 ## Intel 386 machines where we don't care about the manufacturer
2755 i[3456]86-*-* )
2756 machine=intel386
2757 case "${canonical}" in
c60ee5e7 2758 *-cygwin ) opsys=cygwin ;;
eae54018 2759 *-darwin* ) opsys=darwin
23fd4483
ST
2760 CPP="${CC-cc} -E -no-cpp-precomp"
2761 ;;
ba4481b5 2762 *-linux-gnu* ) opsys=gnu-linux ;;
ba4481b5 2763 *-sysv4.2uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
55597d70
DL
2764 *-sysv5uw* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
2765 *-sysv5OpenUNIX* ) opsys=unixware; NON_GNU_CPP=/lib/cpp ;;
ba4481b5 2766 *-386bsd* ) opsys=386bsd ;;
ba4481b5
DL
2767 *-nextstep* ) opsys=nextstep ;;
2768 ## Otherwise, we'll fall through to the generic opsys code at the bottom.
2769 esac
2770 ;;
2771
2772 ## m68k Linux-based GNU system
2773 m68k-*-linux-gnu* )
2774 machine=m68k opsys=gnu-linux
2775 ;;
2776
2777 ## Mips Linux-based GNU system
cd958eb3 2778 mips-*-linux-gnu* | mipsel-*-linux-gnu* )
ba4481b5
DL
2779 machine=mips opsys=gnu-linux
2780 ;;
2781
2782 ## UXP/DS
2783 sparc-fujitsu-sysv4* )
2784 machine=sparc opsys=uxpds
2785 NON_GNU_CPP=/usr/ccs/lib/cpp
2786 RANLIB="ar -ts"
2787 ;;
2788
598a2813
AS
2789 ## AMD x86-64 Linux-based GNU system
2790 x86_64-*-linux-gnu* )
24b01ec4 2791 machine=amdx86-64 opsys=gnu-linux
598a2813
AS
2792 ;;
2793
94218e27 2794 ## Tensilica Xtensa Linux-based GNU system
8dd59f01 2795 xtensa*-*-linux-gnu* )
94218e27
DN
2796 machine=xtensa opsys=gnu-linux
2797 ;;
2798
ba4481b5
DL
2799 * )
2800 unported=yes
2801 ;;
2802esac
2803
2804### If the code above didn't choose an operating system, just choose
2805### an operating system based on the configuration name. You really
2806### only want to use this when you have no idea what the right
2807### operating system is; if you know what operating systems a machine
2808### runs, it's cleaner to make it explicit in the case statement
2809### above.
2810if test x"${opsys}" = x; then
2811 case "${canonical}" in
2812 *-gnu* ) opsys=gnu ;;
2813 *-bsd4.[01] ) opsys=bsd4-1 ;;
2814 *-bsd4.2 ) opsys=bsd4-2 ;;
2815 *-bsd4.3 ) opsys=bsd4-3 ;;
2816 *-sysv0 | *-sysvr0 ) opsys=usg5-0 ;;
2817 *-sysv2 | *-sysvr2 ) opsys=usg5-2 ;;
2818 *-sysv2.2 | *-sysvr2.2 ) opsys=usg5-2-2 ;;
2819 *-sysv3* | *-sysvr3* ) opsys=usg5-3 ;;
2820 *-sysv4.2uw* ) opsys=unixware ;;
55597d70
DL
2821 *-sysv5uw* ) opsys=unixware ;;
2822 *-sysv5OpenUNIX* ) opsys=unixware ;;
ba4481b5
DL
2823 *-sysv4.1* | *-sysvr4.1* )
2824 NON_GNU_CPP=/usr/lib/cpp
2825 opsys=usg5-4 ;;
2826 *-sysv4.[2-9]* | *-sysvr4.[2-9]* )
2827 if [ x$NON_GNU_CPP = x ]; then
2828 if [ -f /usr/ccs/lib/cpp ]; then
2829 NON_GNU_CPP=/usr/ccs/lib/cpp
2830 else
2831 NON_GNU_CPP=/lib/cpp
2832 fi
2833 fi
2834 opsys=usg5-4-2 ;;
2835 *-sysv4* | *-sysvr4* ) opsys=usg5-4 ;;
2836 * )
2837 unported=yes
2838 ;;
2839 esac
2840fi
2841
26a42dac
DN
2842### Tests for sytems that we beleive are obsolete and should be desupported.
2843
2844case "${machine}" in
2845 pmax | hp9000s300 | ibm370aix | ncr386 | ews4800 | mips-siemens | powerpcle | tandem-s2 )
2846 echo "The system that you are configuring on: ${canonical} is considered to be obsolete"
2847 echo "and it is planned to be desupported in the next version of Emacs"
2848 echo "Please email emacs-devel@gnu.org as soon as possible if this system is still in use."
2849 echo "The code is still functional, but you need to edit the 'configure' script and remove the"
2850 echo "exit 33 line. After that you can run configure again and 'complete' the build."
2851 exit 33
2852 ;;
2853esac
2854
2855case "${opsys}" in
2856 bsd386 | bsdos2-1 | bsdos2 | bsdos3 | bsdos4 | bsd4-1 | bsd4-2 | bsd4-3 | usg5-0 | usg5-2-2 | usg5-2 | usg5-3 | ultrix4-3 | 386bsd | hpux | hpux8 | hpux9 | hpux9shr | hpux10 | hpux10-20 | aix3-1 | aix3-2-5 | aix3-2 | aix4-1 | nextstep | ux4800 | uxpds | uxpv )
2857 echo "The system that you are configuring on: ${canonical} is considered to be obsolete"
2858 echo "and it is planned to be desupported in the next version of Emacs"
2859 echo "Please email emacs-devel@gnu.org as soon as possible if this system is still in use."
2860 echo "The code is still functional, but you need to edit the 'configure' script and remove the"
2861 echo "'exit 44' line. After that you can run 'configure' again and complete the build."
2862 exit 44
2863 ;;
2864esac
2865
c0d27fcc 2866
22044edf 2867
ba4481b5 2868if test $unported = yes; then
c0d27fcc 2869 { { echo "$as_me:$LINENO: error: Emacs hasn't been ported to \`${canonical}' systems.
503d2be0
AS
2870Check \`etc/MACHINES' for recognized configuration names." >&5
2871echo "$as_me: error: Emacs hasn't been ported to \`${canonical}' systems.
2872Check \`etc/MACHINES' for recognized configuration names." >&2;}
2873 { (exit 1); exit 1; }; }
ba4481b5
DL
2874fi
2875
2876machfile="m/${machine}.h"
2877opsysfile="s/${opsys}.h"
2878
c0d27fcc 2879
ba4481b5
DL
2880#### Choose a compiler.
2881test -n "$CC" && cc_specified=yes
2882
2883# Save the value of CFLAGS that the user specified.
2884SPECIFIED_CFLAGS="$CFLAGS"
2885
503d2be0
AS
2886ac_ext=c
2887ac_cpp='$CPP $CPPFLAGS'
2888ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2889ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2890ac_compiler_gnu=$ac_cv_c_compiler_gnu
2891if test -n "$ac_tool_prefix"; then
2892 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2893set dummy ${ac_tool_prefix}gcc; ac_word=$2
ca81d7a0
JD
2894{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2895echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2896if test "${ac_cv_prog_CC+set}" = set; then
2897 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2898else
2899 if test -n "$CC"; then
2900 ac_cv_prog_CC="$CC" # Let the user override the test.
2901else
c0d27fcc
MR
2902as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2903for as_dir in $PATH
2904do
2905 IFS=$as_save_IFS
2906 test -z "$as_dir" && as_dir=.
2907 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2908 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2909 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2910 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2911 break 2
2912 fi
2913done
503d2be0 2914done
ca81d7a0 2915IFS=$as_save_IFS
503d2be0 2916
ba4481b5
DL
2917fi
2918fi
503d2be0 2919CC=$ac_cv_prog_CC
ba4481b5 2920if test -n "$CC"; then
ca81d7a0
JD
2921 { echo "$as_me:$LINENO: result: $CC" >&5
2922echo "${ECHO_T}$CC" >&6; }
503d2be0 2923else
ca81d7a0
JD
2924 { echo "$as_me:$LINENO: result: no" >&5
2925echo "${ECHO_T}no" >&6; }
503d2be0
AS
2926fi
2927
ca81d7a0 2928
503d2be0
AS
2929fi
2930if test -z "$ac_cv_prog_CC"; then
2931 ac_ct_CC=$CC
2932 # Extract the first word of "gcc", so it can be a program name with args.
2933set dummy gcc; ac_word=$2
ca81d7a0
JD
2934{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2935echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2936if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2937 echo $ECHO_N "(cached) $ECHO_C" >&6
2938else
2939 if test -n "$ac_ct_CC"; then
2940 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2941else
c0d27fcc
MR
2942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2943for as_dir in $PATH
2944do
2945 IFS=$as_save_IFS
2946 test -z "$as_dir" && as_dir=.
2947 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 2948 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
2949 ac_cv_prog_ac_ct_CC="gcc"
2950 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2951 break 2
2952 fi
2953done
503d2be0 2954done
ca81d7a0 2955IFS=$as_save_IFS
503d2be0
AS
2956
2957fi
2958fi
2959ac_ct_CC=$ac_cv_prog_ac_ct_CC
2960if test -n "$ac_ct_CC"; then
ca81d7a0
JD
2961 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2962echo "${ECHO_T}$ac_ct_CC" >&6; }
ba4481b5 2963else
ca81d7a0
JD
2964 { echo "$as_me:$LINENO: result: no" >&5
2965echo "${ECHO_T}no" >&6; }
503d2be0
AS
2966fi
2967
ca81d7a0
JD
2968 if test "x$ac_ct_CC" = x; then
2969 CC=""
2970 else
2971 case $cross_compiling:$ac_tool_warned in
2972yes:)
2973{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2974whose name does not start with the host triplet. If you think this
2975configuration is useful to you, please write to autoconf@gnu.org." >&5
2976echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2977whose name does not start with the host triplet. If you think this
2978configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2979ac_tool_warned=yes ;;
2980esac
2981 CC=$ac_ct_CC
2982 fi
503d2be0
AS
2983else
2984 CC="$ac_cv_prog_CC"
ba4481b5
DL
2985fi
2986
2987if test -z "$CC"; then
ca81d7a0
JD
2988 if test -n "$ac_tool_prefix"; then
2989 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
503d2be0 2990set dummy ${ac_tool_prefix}cc; ac_word=$2
ca81d7a0
JD
2991{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2992echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
2993if test "${ac_cv_prog_CC+set}" = set; then
2994 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
2995else
2996 if test -n "$CC"; then
2997 ac_cv_prog_CC="$CC" # Let the user override the test.
2998else
c0d27fcc
MR
2999as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3000for as_dir in $PATH
3001do
3002 IFS=$as_save_IFS
3003 test -z "$as_dir" && as_dir=.
3004 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3005 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3006 ac_cv_prog_CC="${ac_tool_prefix}cc"
3007 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3008 break 2
3009 fi
3010done
503d2be0 3011done
ca81d7a0 3012IFS=$as_save_IFS
503d2be0
AS
3013
3014fi
3015fi
3016CC=$ac_cv_prog_CC
3017if test -n "$CC"; then
ca81d7a0
JD
3018 { echo "$as_me:$LINENO: result: $CC" >&5
3019echo "${ECHO_T}$CC" >&6; }
503d2be0 3020else
ca81d7a0
JD
3021 { echo "$as_me:$LINENO: result: no" >&5
3022echo "${ECHO_T}no" >&6; }
503d2be0
AS
3023fi
3024
503d2be0 3025
ca81d7a0 3026 fi
503d2be0
AS
3027fi
3028if test -z "$CC"; then
3029 # Extract the first word of "cc", so it can be a program name with args.
3030set dummy cc; ac_word=$2
ca81d7a0
JD
3031{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3032echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3033if test "${ac_cv_prog_CC+set}" = set; then
3034 echo $ECHO_N "(cached) $ECHO_C" >&6
3035else
3036 if test -n "$CC"; then
3037 ac_cv_prog_CC="$CC" # Let the user override the test.
3038else
3039 ac_prog_rejected=no
c0d27fcc
MR
3040as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3041for as_dir in $PATH
3042do
3043 IFS=$as_save_IFS
3044 test -z "$as_dir" && as_dir=.
3045 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3046 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3047 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3048 ac_prog_rejected=yes
3049 continue
3050 fi
3051 ac_cv_prog_CC="cc"
3052 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3053 break 2
3054 fi
3055done
503d2be0 3056done
ca81d7a0 3057IFS=$as_save_IFS
503d2be0 3058
ba4481b5
DL
3059if test $ac_prog_rejected = yes; then
3060 # We found a bogon in the path, so make sure we never use it.
3061 set dummy $ac_cv_prog_CC
3062 shift
503d2be0 3063 if test $# != 0; then
ba4481b5
DL
3064 # We chose a different compiler from the bogus one.
3065 # However, it has the same basename, so the bogon will be chosen
3066 # first if we set CC to just the basename; use the full file name.
3067 shift
6bae0ccf 3068 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
ba4481b5
DL
3069 fi
3070fi
3071fi
3072fi
503d2be0 3073CC=$ac_cv_prog_CC
ba4481b5 3074if test -n "$CC"; then
ca81d7a0
JD
3075 { echo "$as_me:$LINENO: result: $CC" >&5
3076echo "${ECHO_T}$CC" >&6; }
ba4481b5 3077else
ca81d7a0
JD
3078 { echo "$as_me:$LINENO: result: no" >&5
3079echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3080fi
3081
ca81d7a0 3082
503d2be0
AS
3083fi
3084if test -z "$CC"; then
3085 if test -n "$ac_tool_prefix"; then
ca81d7a0 3086 for ac_prog in cl.exe
503d2be0
AS
3087 do
3088 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3089set dummy $ac_tool_prefix$ac_prog; ac_word=$2
ca81d7a0
JD
3090{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3091echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3092if test "${ac_cv_prog_CC+set}" = set; then
3093 echo $ECHO_N "(cached) $ECHO_C" >&6
c4bb2108
DL
3094else
3095 if test -n "$CC"; then
3096 ac_cv_prog_CC="$CC" # Let the user override the test.
3097else
c0d27fcc
MR
3098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3099for as_dir in $PATH
3100do
3101 IFS=$as_save_IFS
3102 test -z "$as_dir" && as_dir=.
3103 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3104 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3105 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3106 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3107 break 2
3108 fi
3109done
503d2be0 3110done
ca81d7a0 3111IFS=$as_save_IFS
503d2be0 3112
c4bb2108
DL
3113fi
3114fi
503d2be0 3115CC=$ac_cv_prog_CC
c4bb2108 3116if test -n "$CC"; then
ca81d7a0
JD
3117 { echo "$as_me:$LINENO: result: $CC" >&5
3118echo "${ECHO_T}$CC" >&6; }
c4bb2108 3119else
ca81d7a0
JD
3120 { echo "$as_me:$LINENO: result: no" >&5
3121echo "${ECHO_T}no" >&6; }
503d2be0
AS
3122fi
3123
ca81d7a0 3124
503d2be0
AS
3125 test -n "$CC" && break
3126 done
3127fi
3128if test -z "$CC"; then
3129 ac_ct_CC=$CC
ca81d7a0 3130 for ac_prog in cl.exe
503d2be0
AS
3131do
3132 # Extract the first word of "$ac_prog", so it can be a program name with args.
3133set dummy $ac_prog; ac_word=$2
ca81d7a0
JD
3134{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3135echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
3136if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
3137 echo $ECHO_N "(cached) $ECHO_C" >&6
3138else
3139 if test -n "$ac_ct_CC"; then
3140 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3141else
c0d27fcc
MR
3142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3143for as_dir in $PATH
3144do
3145 IFS=$as_save_IFS
3146 test -z "$as_dir" && as_dir=.
3147 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 3148 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
3149 ac_cv_prog_ac_ct_CC="$ac_prog"
3150 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3151 break 2
3152 fi
3153done
503d2be0 3154done
ca81d7a0 3155IFS=$as_save_IFS
503d2be0 3156
c4bb2108 3157fi
503d2be0
AS
3158fi
3159ac_ct_CC=$ac_cv_prog_ac_ct_CC
3160if test -n "$ac_ct_CC"; then
ca81d7a0
JD
3161 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
3162echo "${ECHO_T}$ac_ct_CC" >&6; }
503d2be0 3163else
ca81d7a0
JD
3164 { echo "$as_me:$LINENO: result: no" >&5
3165echo "${ECHO_T}no" >&6; }
ba4481b5
DL
3166fi
3167
ca81d7a0 3168
503d2be0
AS
3169 test -n "$ac_ct_CC" && break
3170done
ba4481b5 3171
ca81d7a0
JD
3172 if test "x$ac_ct_CC" = x; then
3173 CC=""
3174 else
3175 case $cross_compiling:$ac_tool_warned in
3176yes:)
3177{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
3178whose name does not start with the host triplet. If you think this
3179configuration is useful to you, please write to autoconf@gnu.org." >&5
3180echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
3181whose name does not start with the host triplet. If you think this
3182configuration is useful to you, please write to autoconf@gnu.org." >&2;}
3183ac_tool_warned=yes ;;
3184esac
3185 CC=$ac_ct_CC
3186 fi
503d2be0
AS
3187fi
3188
3189fi
ba4481b5 3190
c0d27fcc 3191
19650fd6
AS
3192test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
3193See \`config.log' for more details." >&5
3194echo "$as_me: error: no acceptable C compiler found in \$PATH
3195See \`config.log' for more details." >&2;}
503d2be0 3196 { (exit 1); exit 1; }; }
c4bb2108 3197
503d2be0 3198# Provide some information about the compiler.
ca81d7a0 3199echo "$as_me:$LINENO: checking for C compiler version" >&5
503d2be0 3200ac_compiler=`set X $ac_compile; echo $2`
ca81d7a0
JD
3201{ (ac_try="$ac_compiler --version >&5"
3202case "(($ac_try" in
3203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3204 *) ac_try_echo=$ac_try;;
3205esac
3206eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3207 (eval "$ac_compiler --version >&5") 2>&5
503d2be0 3208 ac_status=$?
c0d27fcc 3209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3210 (exit $ac_status); }
ca81d7a0
JD
3211{ (ac_try="$ac_compiler -v >&5"
3212case "(($ac_try" in
3213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3214 *) ac_try_echo=$ac_try;;
3215esac
3216eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3217 (eval "$ac_compiler -v >&5") 2>&5
503d2be0 3218 ac_status=$?
c0d27fcc 3219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3220 (exit $ac_status); }
ca81d7a0
JD
3221{ (ac_try="$ac_compiler -V >&5"
3222case "(($ac_try" in
3223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3224 *) ac_try_echo=$ac_try;;
3225esac
3226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3227 (eval "$ac_compiler -V >&5") 2>&5
503d2be0 3228 ac_status=$?
c0d27fcc 3229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3230 (exit $ac_status); }
3231
3232cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3233/* confdefs.h. */
3234_ACEOF
3235cat confdefs.h >>conftest.$ac_ext
3236cat >>conftest.$ac_ext <<_ACEOF
3237/* end confdefs.h. */
c4bb2108 3238
503d2be0
AS
3239int
3240main ()
3241{
3242
3243 ;
3244 return 0;
3245}
3246_ACEOF
3247ac_clean_files_save=$ac_clean_files
19650fd6 3248ac_clean_files="$ac_clean_files a.out a.exe b.out"
503d2be0
AS
3249# Try to create an executable without -o first, disregard a.out.
3250# It will help us diagnose broken compilers, and finding out an intuition
3251# of exeext.
ca81d7a0
JD
3252{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
3253echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
503d2be0 3254ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
ca81d7a0
JD
3255#
3256# List of possible output files, starting from the most likely.
3257# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
3258# only as a last resort. b.out is created by i960 compilers.
3259ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
3260#
3261# The IRIX 6 linker writes into existing files which may not be
3262# executable, retaining their permissions. Remove them first so a
3263# subsequent execution test works.
3264ac_rmfiles=
3265for ac_file in $ac_files
3266do
3267 case $ac_file in
3268 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
3269 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3270 esac
3271done
3272rm -f $ac_rmfiles
3273
3274if { (ac_try="$ac_link_default"
3275case "(($ac_try" in
3276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3277 *) ac_try_echo=$ac_try;;
3278esac
3279eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3280 (eval "$ac_link_default") 2>&5
503d2be0 3281 ac_status=$?
c0d27fcc 3282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3283 (exit $ac_status); }; then
ca81d7a0
JD
3284 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3285# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3286# in a Makefile. We should not override ac_cv_exeext if it was cached,
3287# so that the user can short-circuit this test for compilers unknown to
3288# Autoconf.
f053c89f 3289for ac_file in $ac_files ''
19650fd6 3290do
6bae0ccf 3291 test -f "$ac_file" || continue
503d2be0 3292 case $ac_file in
ca81d7a0 3293 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
edfaf76d 3294 ;;
19650fd6 3295 [ab].out )
edfaf76d
LK
3296 # We found the default executable, but exeext='' is most
3297 # certainly right.
3298 break;;
19650fd6 3299 *.* )
ca81d7a0
JD
3300 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3301 then :; else
3302 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3303 fi
3304 # We set ac_cv_exeext here because the later test for it is not
3305 # safe: cross compilers may not add the suffix if given an `-o'
3306 # argument, so we may need to know it at that point already.
3307 # Even if this section looks crufty: it has the advantage of
3308 # actually working.
edfaf76d 3309 break;;
19650fd6 3310 * )
edfaf76d 3311 break;;
503d2be0
AS
3312 esac
3313done
ca81d7a0
JD
3314test "$ac_cv_exeext" = no && ac_cv_exeext=
3315
503d2be0 3316else
f053c89f
CY
3317 ac_file=''
3318fi
3319
3320{ echo "$as_me:$LINENO: result: $ac_file" >&5
3321echo "${ECHO_T}$ac_file" >&6; }
3322if test -z "$ac_file"; then
503d2be0 3323 echo "$as_me: failed program was:" >&5
19650fd6
AS
3324sed 's/^/| /' conftest.$ac_ext >&5
3325
6bae0ccf 3326{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
19650fd6 3327See \`config.log' for more details." >&5
6bae0ccf 3328echo "$as_me: error: C compiler cannot create executables
19650fd6 3329See \`config.log' for more details." >&2;}
503d2be0
AS
3330 { (exit 77); exit 77; }; }
3331fi
3332
3333ac_exeext=$ac_cv_exeext
503d2be0 3334
ca81d7a0 3335# Check that the compiler produces executables we can run. If not, either
503d2be0 3336# the compiler is broken, or we cross compile.
ca81d7a0
JD
3337{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
3338echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
503d2be0
AS
3339# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
3340# If not cross compiling, check that we can run a simple program.
3341if test "$cross_compiling" != yes; then
3342 if { ac_try='./$ac_file'
ca81d7a0
JD
3343 { (case "(($ac_try" in
3344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3345 *) ac_try_echo=$ac_try;;
3346esac
3347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3348 (eval "$ac_try") 2>&5
503d2be0 3349 ac_status=$?
c0d27fcc 3350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3351 (exit $ac_status); }; }; then
3352 cross_compiling=no
ba4481b5 3353 else
503d2be0
AS
3354 if test "$cross_compiling" = maybe; then
3355 cross_compiling=yes
3356 else
c0d27fcc 3357 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
19650fd6
AS
3358If you meant to cross compile, use \`--host'.
3359See \`config.log' for more details." >&5
503d2be0 3360echo "$as_me: error: cannot run C compiled programs.
19650fd6
AS
3361If you meant to cross compile, use \`--host'.
3362See \`config.log' for more details." >&2;}
503d2be0
AS
3363 { (exit 1); exit 1; }; }
3364 fi
ba4481b5 3365 fi
503d2be0 3366fi
ca81d7a0
JD
3367{ echo "$as_me:$LINENO: result: yes" >&5
3368echo "${ECHO_T}yes" >&6; }
503d2be0 3369
19650fd6 3370rm -f a.out a.exe conftest$ac_cv_exeext b.out
503d2be0 3371ac_clean_files=$ac_clean_files_save
ca81d7a0 3372# Check that the compiler produces executables we can run. If not, either
503d2be0 3373# the compiler is broken, or we cross compile.
ca81d7a0
JD
3374{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
3375echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
3376{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
3377echo "${ECHO_T}$cross_compiling" >&6; }
3378
3379{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
3380echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
3381if { (ac_try="$ac_link"
3382case "(($ac_try" in
3383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3384 *) ac_try_echo=$ac_try;;
3385esac
3386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3387 (eval "$ac_link") 2>&5
503d2be0 3388 ac_status=$?
c0d27fcc 3389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
3390 (exit $ac_status); }; then
3391 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3392# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3393# work properly (i.e., refer to `conftest.exe'), while it won't with
3394# `rm'.
6bae0ccf
DL
3395for ac_file in conftest.exe conftest conftest.*; do
3396 test -f "$ac_file" || continue
503d2be0 3397 case $ac_file in
ca81d7a0 3398 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
503d2be0 3399 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
edfaf76d 3400 break;;
503d2be0
AS
3401 * ) break;;
3402 esac
3403done
ba4481b5 3404else
19650fd6
AS
3405 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
3406See \`config.log' for more details." >&5
3407echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
3408See \`config.log' for more details." >&2;}
503d2be0 3409 { (exit 1); exit 1; }; }
ba4481b5 3410fi
ba4481b5 3411
503d2be0 3412rm -f conftest$ac_cv_exeext
ca81d7a0
JD
3413{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3414echo "${ECHO_T}$ac_cv_exeext" >&6; }
ba4481b5 3415
503d2be0
AS
3416rm -f conftest.$ac_ext
3417EXEEXT=$ac_cv_exeext
3418ac_exeext=$EXEEXT
ca81d7a0
JD
3419{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
3420echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
503d2be0
AS
3421if test "${ac_cv_objext+set}" = set; then
3422 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3423else
503d2be0 3424 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3425/* confdefs.h. */
3426_ACEOF
3427cat confdefs.h >>conftest.$ac_ext
3428cat >>conftest.$ac_ext <<_ACEOF
3429/* end confdefs.h. */
ba4481b5 3430
503d2be0
AS
3431int
3432main ()
3433{
ba4481b5 3434
503d2be0
AS
3435 ;
3436 return 0;
3437}
3438_ACEOF
3439rm -f conftest.o conftest.obj
ca81d7a0
JD
3440if { (ac_try="$ac_compile"
3441case "(($ac_try" in
3442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3443 *) ac_try_echo=$ac_try;;
3444esac
3445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3446 (eval "$ac_compile") 2>&5
503d2be0 3447 ac_status=$?
c0d27fcc 3448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 3449 (exit $ac_status); }; then
ca81d7a0
JD
3450 for ac_file in conftest.o conftest.obj conftest.*; do
3451 test -f "$ac_file" || continue;
503d2be0 3452 case $ac_file in
ca81d7a0 3453 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
503d2be0
AS
3454 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3455 break;;
3456 esac
3457done
c4bb2108 3458else
503d2be0 3459 echo "$as_me: failed program was:" >&5
19650fd6
AS
3460sed 's/^/| /' conftest.$ac_ext >&5
3461
3462{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
3463See \`config.log' for more details." >&5
3464echo "$as_me: error: cannot compute suffix of object files: cannot compile
3465See \`config.log' for more details." >&2;}
503d2be0 3466 { (exit 1); exit 1; }; }
c4bb2108
DL
3467fi
3468
503d2be0
AS
3469rm -f conftest.$ac_cv_objext conftest.$ac_ext
3470fi
ca81d7a0
JD
3471{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3472echo "${ECHO_T}$ac_cv_objext" >&6; }
503d2be0
AS
3473OBJEXT=$ac_cv_objext
3474ac_objext=$OBJEXT
ca81d7a0
JD
3475{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3476echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
503d2be0
AS
3477if test "${ac_cv_c_compiler_gnu+set}" = set; then
3478 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 3479else
503d2be0 3480 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3481/* confdefs.h. */
3482_ACEOF
3483cat confdefs.h >>conftest.$ac_ext
3484cat >>conftest.$ac_ext <<_ACEOF
3485/* end confdefs.h. */
503d2be0
AS
3486
3487int
3488main ()
3489{
3490#ifndef __GNUC__
3491 choke me
3492#endif
3493
3494 ;
3495 return 0;
3496}
3497_ACEOF
3498rm -f conftest.$ac_objext
ca81d7a0
JD
3499if { (ac_try="$ac_compile"
3500case "(($ac_try" in
3501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3502 *) ac_try_echo=$ac_try;;
3503esac
3504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3505 (eval "$ac_compile") 2>conftest.er1
503d2be0 3506 ac_status=$?
edfaf76d
LK
3507 grep -v '^ *+' conftest.er1 >conftest.err
3508 rm -f conftest.er1
3509 cat conftest.err >&5
c0d27fcc 3510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3511 (exit $ac_status); } && {
3512 test -z "$ac_c_werror_flag" ||
3513 test ! -s conftest.err
3514 } && test -s conftest.$ac_objext; then
503d2be0
AS
3515 ac_compiler_gnu=yes
3516else
3517 echo "$as_me: failed program was:" >&5
19650fd6
AS
3518sed 's/^/| /' conftest.$ac_ext >&5
3519
ca81d7a0 3520 ac_compiler_gnu=no
503d2be0 3521fi
ca81d7a0
JD
3522
3523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0
AS
3524ac_cv_c_compiler_gnu=$ac_compiler_gnu
3525
3526fi
ca81d7a0
JD
3527{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3528echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
503d2be0
AS
3529GCC=`test $ac_compiler_gnu = yes && echo yes`
3530ac_test_CFLAGS=${CFLAGS+set}
3531ac_save_CFLAGS=$CFLAGS
ca81d7a0
JD
3532{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3533echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
503d2be0
AS
3534if test "${ac_cv_prog_cc_g+set}" = set; then
3535 echo $ECHO_N "(cached) $ECHO_C" >&6
3536else
ca81d7a0
JD
3537 ac_save_c_werror_flag=$ac_c_werror_flag
3538 ac_c_werror_flag=yes
3539 ac_cv_prog_cc_g=no
3540 CFLAGS="-g"
3541 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3542/* confdefs.h. */
3543_ACEOF
3544cat confdefs.h >>conftest.$ac_ext
3545cat >>conftest.$ac_ext <<_ACEOF
3546/* end confdefs.h. */
503d2be0
AS
3547
3548int
3549main ()
3550{
3551
3552 ;
3553 return 0;
3554}
3555_ACEOF
3556rm -f conftest.$ac_objext
ca81d7a0
JD
3557if { (ac_try="$ac_compile"
3558case "(($ac_try" in
3559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3560 *) ac_try_echo=$ac_try;;
3561esac
3562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3563 (eval "$ac_compile") 2>conftest.er1
503d2be0 3564 ac_status=$?
edfaf76d
LK
3565 grep -v '^ *+' conftest.er1 >conftest.err
3566 rm -f conftest.er1
3567 cat conftest.err >&5
c0d27fcc 3568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3569 (exit $ac_status); } && {
3570 test -z "$ac_c_werror_flag" ||
3571 test ! -s conftest.err
3572 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3573 ac_cv_prog_cc_g=yes
3574else
503d2be0 3575 echo "$as_me: failed program was:" >&5
19650fd6
AS
3576sed 's/^/| /' conftest.$ac_ext >&5
3577
ca81d7a0
JD
3578 CFLAGS=""
3579 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3580/* confdefs.h. */
3581_ACEOF
3582cat confdefs.h >>conftest.$ac_ext
3583cat >>conftest.$ac_ext <<_ACEOF
3584/* end confdefs.h. */
edfaf76d 3585
6bae0ccf
DL
3586int
3587main ()
3588{
ca81d7a0 3589
6bae0ccf
DL
3590 ;
3591 return 0;
3592}
3593_ACEOF
ca81d7a0
JD
3594rm -f conftest.$ac_objext
3595if { (ac_try="$ac_compile"
3596case "(($ac_try" in
3597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3598 *) ac_try_echo=$ac_try;;
3599esac
3600eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3601 (eval "$ac_compile") 2>conftest.er1
edfaf76d 3602 ac_status=$?
edfaf76d
LK
3603 grep -v '^ *+' conftest.er1 >conftest.err
3604 rm -f conftest.er1
3605 cat conftest.err >&5
edfaf76d 3606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3607 (exit $ac_status); } && {
3608 test -z "$ac_c_werror_flag" ||
3609 test ! -s conftest.err
3610 } && test -s conftest.$ac_objext; then
ca81d7a0 3611 :
6bae0ccf
DL
3612else
3613 echo "$as_me: failed program was:" >&5
19650fd6
AS
3614sed 's/^/| /' conftest.$ac_ext >&5
3615
ca81d7a0
JD
3616 ac_c_werror_flag=$ac_save_c_werror_flag
3617 CFLAGS="-g"
3618 cat >conftest.$ac_ext <<_ACEOF
4b411bfe 3619/* confdefs.h. */
19650fd6
AS
3620_ACEOF
3621cat confdefs.h >>conftest.$ac_ext
3622cat >>conftest.$ac_ext <<_ACEOF
3623/* end confdefs.h. */
ca81d7a0 3624
503d2be0
AS
3625int
3626main ()
3627{
ca81d7a0 3628
503d2be0
AS
3629 ;
3630 return 0;
3631}
3632_ACEOF
3633rm -f conftest.$ac_objext
ca81d7a0
JD
3634if { (ac_try="$ac_compile"
3635case "(($ac_try" in
3636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3637 *) ac_try_echo=$ac_try;;
3638esac
3639eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3640 (eval "$ac_compile") 2>conftest.er1
503d2be0 3641 ac_status=$?
edfaf76d
LK
3642 grep -v '^ *+' conftest.er1 >conftest.err
3643 rm -f conftest.er1
3644 cat conftest.err >&5
c0d27fcc 3645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3646 (exit $ac_status); } && {
3647 test -z "$ac_c_werror_flag" ||
3648 test ! -s conftest.err
3649 } && test -s conftest.$ac_objext; then
ba4481b5
DL
3650 ac_cv_prog_cc_g=yes
3651else
503d2be0 3652 echo "$as_me: failed program was:" >&5
19650fd6
AS
3653sed 's/^/| /' conftest.$ac_ext >&5
3654
ca81d7a0 3655
ba4481b5 3656fi
ca81d7a0
JD
3657
3658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3659fi
3660
3661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3662fi
3663
3664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3665 ac_c_werror_flag=$ac_save_c_werror_flag
ba4481b5 3666fi
ca81d7a0
JD
3667{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3668echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
c4bb2108 3669if test "$ac_test_CFLAGS" = set; then
503d2be0 3670 CFLAGS=$ac_save_CFLAGS
c4bb2108
DL
3671elif test $ac_cv_prog_cc_g = yes; then
3672 if test "$GCC" = yes; then
ba4481b5
DL
3673 CFLAGS="-g -O2"
3674 else
c4bb2108 3675 CFLAGS="-g"
ba4481b5 3676 fi
22afa6e8 3677else
c4bb2108
DL
3678 if test "$GCC" = yes; then
3679 CFLAGS="-O2"
3680 else
3681 CFLAGS=
3682 fi
ba4481b5 3683fi
ca81d7a0
JD
3684{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3685echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3686if test "${ac_cv_prog_cc_c89+set}" = set; then
6bae0ccf
DL
3687 echo $ECHO_N "(cached) $ECHO_C" >&6
3688else
ca81d7a0 3689 ac_cv_prog_cc_c89=no
6bae0ccf
DL
3690ac_save_CC=$CC
3691cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
3692/* confdefs.h. */
3693_ACEOF
3694cat confdefs.h >>conftest.$ac_ext
3695cat >>conftest.$ac_ext <<_ACEOF
3696/* end confdefs.h. */
6bae0ccf
DL
3697#include <stdarg.h>
3698#include <stdio.h>
3699#include <sys/types.h>
3700#include <sys/stat.h>
3701/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3702struct buf { int x; };
3703FILE * (*rcsopen) (struct buf *, struct stat *, int);
3704static char *e (p, i)
3705 char **p;
3706 int i;
3707{
3708 return p[i];
3709}
3710static char *f (char * (*g) (char **, int), char **p, ...)
3711{
3712 char *s;
3713 va_list v;
3714 va_start (v,p);
3715 s = g (p, va_arg (v,int));
3716 va_end (v);
3717 return s;
3718}
edfaf76d
LK
3719
3720/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3721 function prototypes and stuff, but not '\xHH' hex character constants.
3722 These don't provoke an error unfortunately, instead are silently treated
ca81d7a0 3723 as 'x'. The following induces an error, until -std is added to get
edfaf76d
LK
3724 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3725 array size at least. It's necessary to write '\x00'==0 to get something
ca81d7a0 3726 that's true only with -std. */
edfaf76d
LK
3727int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3728
ca81d7a0
JD
3729/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3730 inside strings and character constants. */
3731#define FOO(x) 'x'
3732int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3733
6bae0ccf
DL
3734int test (int i, double x);
3735struct s1 {int (*f) (int a);};
3736struct s2 {int (*f) (double a);};
3737int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3738int argc;
3739char **argv;
3740int
3741main ()
3742{
3743return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3744 ;
3745 return 0;
3746}
3747_ACEOF
ca81d7a0
JD
3748for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3749 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6bae0ccf
DL
3750do
3751 CC="$ac_save_CC $ac_arg"
3752 rm -f conftest.$ac_objext
ca81d7a0
JD
3753if { (ac_try="$ac_compile"
3754case "(($ac_try" in
3755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3756 *) ac_try_echo=$ac_try;;
3757esac
3758eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3759 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 3760 ac_status=$?
edfaf76d
LK
3761 grep -v '^ *+' conftest.er1 >conftest.err
3762 rm -f conftest.er1
3763 cat conftest.err >&5
6bae0ccf 3764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3765 (exit $ac_status); } && {
3766 test -z "$ac_c_werror_flag" ||
3767 test ! -s conftest.err
3768 } && test -s conftest.$ac_objext; then
ca81d7a0 3769 ac_cv_prog_cc_c89=$ac_arg
6bae0ccf
DL
3770else
3771 echo "$as_me: failed program was:" >&5
19650fd6
AS
3772sed 's/^/| /' conftest.$ac_ext >&5
3773
ca81d7a0 3774
6bae0ccf 3775fi
ca81d7a0
JD
3776
3777rm -f core conftest.err conftest.$ac_objext
3778 test "x$ac_cv_prog_cc_c89" != "xno" && break
6bae0ccf 3779done
ca81d7a0 3780rm -f conftest.$ac_ext
6bae0ccf
DL
3781CC=$ac_save_CC
3782
3783fi
ca81d7a0
JD
3784# AC_CACHE_VAL
3785case "x$ac_cv_prog_cc_c89" in
3786 x)
3787 { echo "$as_me:$LINENO: result: none needed" >&5
3788echo "${ECHO_T}none needed" >&6; } ;;
3789 xno)
3790 { echo "$as_me:$LINENO: result: unsupported" >&5
3791echo "${ECHO_T}unsupported" >&6; } ;;
6bae0ccf 3792 *)
ca81d7a0
JD
3793 CC="$CC $ac_cv_prog_cc_c89"
3794 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3795echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
6bae0ccf
DL
3796esac
3797
19650fd6 3798
503d2be0
AS
3799ac_ext=c
3800ac_cpp='$CPP $CPPFLAGS'
3801ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3802ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3803ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5 3804
c0d27fcc 3805
ba4481b5
DL
3806# On Suns, sometimes $CPP names a directory.
3807if test -n "$CPP" && test -d "$CPP"; then
3808 CPP=
3809fi
3810
089a966d
GM
3811## If not using gcc, and on Solaris, and no CPP specified, see if
3812## using a Sun compiler, which needs -Xs to prevent whitespace.
3813if test x"$GCC" != xyes && test x"$emacs_check_sunpro_c" = xyes && \
3814 test x"$CPP" = x; then
3815 { echo "$as_me:$LINENO: checking whether we are using a Sun C compiler" >&5
3816echo $ECHO_N "checking whether we are using a Sun C compiler... $ECHO_C" >&6; }
3817
3818if test "${emacs_cv_sunpro_c+set}" = set; then
3819 echo $ECHO_N "(cached) $ECHO_C" >&6
3820else
3821 cat >conftest.$ac_ext <<_ACEOF
3822/* confdefs.h. */
3823_ACEOF
3824cat confdefs.h >>conftest.$ac_ext
3825cat >>conftest.$ac_ext <<_ACEOF
3826/* end confdefs.h. */
3827
3828int
3829main ()
3830{
3831#ifndef __SUNPRO_C
3832fail;
3833#endif
3834
3835 ;
3836 return 0;
3837}
3838_ACEOF
3839rm -f conftest.$ac_objext conftest$ac_exeext
3840if { (ac_try="$ac_link"
3841case "(($ac_try" in
3842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3843 *) ac_try_echo=$ac_try;;
3844esac
3845eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3846 (eval "$ac_link") 2>conftest.er1
3847 ac_status=$?
3848 grep -v '^ *+' conftest.er1 >conftest.err
3849 rm -f conftest.er1
3850 cat conftest.err >&5
3851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3852 (exit $ac_status); } && {
3853 test -z "$ac_c_werror_flag" ||
3854 test ! -s conftest.err
3855 } && test -s conftest$ac_exeext &&
3856 $as_test_x conftest$ac_exeext; then
3857 emacs_cv_sunpro_c=yes
3858else
3859 echo "$as_me: failed program was:" >&5
3860sed 's/^/| /' conftest.$ac_ext >&5
3861
3862 emacs_cv_sunpro_c=no
3863fi
3864
3865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3866 conftest$ac_exeext conftest.$ac_ext
3867fi
3868
3869 { echo "$as_me:$LINENO: result: $emacs_cv_sunpro_c" >&5
3870echo "${ECHO_T}$emacs_cv_sunpro_c" >&6; }
3871
3872 if test x"$emacs_cv_sunpro_c" = xyes; then
3873 NON_GNU_CPP="$CC -E -Xs"
3874 fi
3875fi
3876
ba4481b5
DL
3877#### Some systems specify a CPP to use unless we are using GCC.
3878#### Now that we know whether we are using GCC, we can decide whether
3879#### to use that one.
3880if test "x$NON_GNU_CPP" != x && test x$GCC != xyes && test "x$CPP" = x
3881then
3882 CPP="$NON_GNU_CPP"
3883fi
3884
3885#### Some systems specify a CC to use unless we are using GCC.
3886#### Now that we know whether we are using GCC, we can decide whether
3887#### to use that one.
3888if test "x$NON_GNU_CC" != x && test x$GCC != xyes &&
3889 test x$cc_specified != xyes
3890then
3891 CC="$NON_GNU_CC"
3892fi
3893
3894if test x$GCC = xyes && test "x$GCC_TEST_OPTIONS" != x
3895then
3896 CC="$CC $GCC_TEST_OPTIONS"
3897fi
3898
3899if test x$GCC = x && test "x$NON_GCC_TEST_OPTIONS" != x
3900then
3901 CC="$CC $NON_GCC_TEST_OPTIONS"
3902fi
3903
e143ad11
AS
3904ac_ext=c
3905ac_cpp='$CPP $CPPFLAGS'
3906ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3907ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3908ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
3909{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3910echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
e143ad11
AS
3911# On Suns, sometimes $CPP names a directory.
3912if test -n "$CPP" && test -d "$CPP"; then
3913 CPP=
3914fi
3915if test -z "$CPP"; then
3916 if test "${ac_cv_prog_CPP+set}" = set; then
3917 echo $ECHO_N "(cached) $ECHO_C" >&6
3918else
3919 # Double quotes because CPP needs to be expanded
3920 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3921 do
3922 ac_preproc_ok=false
3923for ac_c_preproc_warn_flag in '' yes
3924do
3925 # Use a header file that comes with gcc, so configuring glibc
3926 # with a fresh cross-compiler works.
3927 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3928 # <limits.h> exists even on freestanding compilers.
3929 # On the NeXT, cc -E runs the code through the compiler's parser,
3930 # not just through cpp. "Syntax error" is here to catch this case.
3931 cat >conftest.$ac_ext <<_ACEOF
3932/* confdefs.h. */
3933_ACEOF
3934cat confdefs.h >>conftest.$ac_ext
3935cat >>conftest.$ac_ext <<_ACEOF
3936/* end confdefs.h. */
3937#ifdef __STDC__
3938# include <limits.h>
3939#else
3940# include <assert.h>
3941#endif
3942 Syntax error
3943_ACEOF
ca81d7a0
JD
3944if { (ac_try="$ac_cpp conftest.$ac_ext"
3945case "(($ac_try" in
3946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3947 *) ac_try_echo=$ac_try;;
3948esac
3949eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3950 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3951 ac_status=$?
3952 grep -v '^ *+' conftest.er1 >conftest.err
3953 rm -f conftest.er1
3954 cat conftest.err >&5
3955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3956 (exit $ac_status); } >/dev/null && {
3957 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3958 test ! -s conftest.err
3959 }; then
e143ad11
AS
3960 :
3961else
3962 echo "$as_me: failed program was:" >&5
3963sed 's/^/| /' conftest.$ac_ext >&5
3964
3965 # Broken: fails on valid input.
3966continue
3967fi
ca81d7a0 3968
e143ad11
AS
3969rm -f conftest.err conftest.$ac_ext
3970
ca81d7a0 3971 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
3972 # can be detected and how.
3973 cat >conftest.$ac_ext <<_ACEOF
3974/* confdefs.h. */
3975_ACEOF
3976cat confdefs.h >>conftest.$ac_ext
3977cat >>conftest.$ac_ext <<_ACEOF
3978/* end confdefs.h. */
3979#include <ac_nonexistent.h>
3980_ACEOF
ca81d7a0
JD
3981if { (ac_try="$ac_cpp conftest.$ac_ext"
3982case "(($ac_try" in
3983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3984 *) ac_try_echo=$ac_try;;
3985esac
3986eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3987 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
3988 ac_status=$?
3989 grep -v '^ *+' conftest.er1 >conftest.err
3990 rm -f conftest.er1
3991 cat conftest.err >&5
3992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
3993 (exit $ac_status); } >/dev/null && {
3994 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3995 test ! -s conftest.err
3996 }; then
e143ad11
AS
3997 # Broken: success on invalid input.
3998continue
3999else
4000 echo "$as_me: failed program was:" >&5
4001sed 's/^/| /' conftest.$ac_ext >&5
4002
4003 # Passes both tests.
4004ac_preproc_ok=:
4005break
4006fi
ca81d7a0 4007
e143ad11
AS
4008rm -f conftest.err conftest.$ac_ext
4009
4010done
4011# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4012rm -f conftest.err conftest.$ac_ext
4013if $ac_preproc_ok; then
4014 break
4015fi
4016
4017 done
4018 ac_cv_prog_CPP=$CPP
4019
4020fi
4021 CPP=$ac_cv_prog_CPP
4022else
4023 ac_cv_prog_CPP=$CPP
4024fi
ca81d7a0
JD
4025{ echo "$as_me:$LINENO: result: $CPP" >&5
4026echo "${ECHO_T}$CPP" >&6; }
e143ad11
AS
4027ac_preproc_ok=false
4028for ac_c_preproc_warn_flag in '' yes
4029do
4030 # Use a header file that comes with gcc, so configuring glibc
4031 # with a fresh cross-compiler works.
4032 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4033 # <limits.h> exists even on freestanding compilers.
4034 # On the NeXT, cc -E runs the code through the compiler's parser,
4035 # not just through cpp. "Syntax error" is here to catch this case.
4036 cat >conftest.$ac_ext <<_ACEOF
4037/* confdefs.h. */
4038_ACEOF
4039cat confdefs.h >>conftest.$ac_ext
4040cat >>conftest.$ac_ext <<_ACEOF
4041/* end confdefs.h. */
4042#ifdef __STDC__
4043# include <limits.h>
4044#else
4045# include <assert.h>
4046#endif
4047 Syntax error
4048_ACEOF
ca81d7a0
JD
4049if { (ac_try="$ac_cpp conftest.$ac_ext"
4050case "(($ac_try" in
4051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4052 *) ac_try_echo=$ac_try;;
4053esac
4054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4055 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4056 ac_status=$?
4057 grep -v '^ *+' conftest.er1 >conftest.err
4058 rm -f conftest.er1
4059 cat conftest.err >&5
4060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4061 (exit $ac_status); } >/dev/null && {
4062 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4063 test ! -s conftest.err
4064 }; then
e143ad11
AS
4065 :
4066else
4067 echo "$as_me: failed program was:" >&5
4068sed 's/^/| /' conftest.$ac_ext >&5
4069
4070 # Broken: fails on valid input.
4071continue
4072fi
ca81d7a0 4073
e143ad11
AS
4074rm -f conftest.err conftest.$ac_ext
4075
ca81d7a0 4076 # OK, works on sane cases. Now check whether nonexistent headers
e143ad11
AS
4077 # can be detected and how.
4078 cat >conftest.$ac_ext <<_ACEOF
4079/* confdefs.h. */
4080_ACEOF
4081cat confdefs.h >>conftest.$ac_ext
4082cat >>conftest.$ac_ext <<_ACEOF
4083/* end confdefs.h. */
4084#include <ac_nonexistent.h>
4085_ACEOF
ca81d7a0
JD
4086if { (ac_try="$ac_cpp conftest.$ac_ext"
4087case "(($ac_try" in
4088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4089 *) ac_try_echo=$ac_try;;
4090esac
4091eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4092 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
e143ad11
AS
4093 ac_status=$?
4094 grep -v '^ *+' conftest.er1 >conftest.err
4095 rm -f conftest.er1
4096 cat conftest.err >&5
4097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4098 (exit $ac_status); } >/dev/null && {
4099 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4100 test ! -s conftest.err
4101 }; then
e143ad11
AS
4102 # Broken: success on invalid input.
4103continue
4104else
4105 echo "$as_me: failed program was:" >&5
4106sed 's/^/| /' conftest.$ac_ext >&5
4107
4108 # Passes both tests.
4109ac_preproc_ok=:
4110break
4111fi
ca81d7a0 4112
e143ad11
AS
4113rm -f conftest.err conftest.$ac_ext
4114
4115done
4116# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4117rm -f conftest.err conftest.$ac_ext
4118if $ac_preproc_ok; then
4119 :
4120else
4121 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4122See \`config.log' for more details." >&5
4123echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4124See \`config.log' for more details." >&2;}
4125 { (exit 1); exit 1; }; }
4126fi
4127
4128ac_ext=c
4129ac_cpp='$CPP $CPPFLAGS'
4130ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4131ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4132ac_compiler_gnu=$ac_cv_c_compiler_gnu
4133
4134
ca81d7a0
JD
4135{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
4136echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
4137if test "${ac_cv_path_GREP+set}" = set; then
4138 echo $ECHO_N "(cached) $ECHO_C" >&6
4139else
4140 # Extract the first word of "grep ggrep" to use in msg output
4141if test -z "$GREP"; then
4142set dummy grep ggrep; ac_prog_name=$2
4143if test "${ac_cv_path_GREP+set}" = set; then
4144 echo $ECHO_N "(cached) $ECHO_C" >&6
4145else
4146 ac_path_GREP_found=false
4147# Loop through the user's path and test for each of PROGNAME-LIST
4148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4149for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4150do
4151 IFS=$as_save_IFS
4152 test -z "$as_dir" && as_dir=.
4153 for ac_prog in grep ggrep; do
4154 for ac_exec_ext in '' $ac_executable_extensions; do
4155 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4156 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
ca81d7a0
JD
4157 # Check for GNU ac_path_GREP and select it if it is found.
4158 # Check for GNU $ac_path_GREP
4159case `"$ac_path_GREP" --version 2>&1` in
4160*GNU*)
4161 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4162*)
4163 ac_count=0
4164 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4165 while :
4166 do
4167 cat "conftest.in" "conftest.in" >"conftest.tmp"
4168 mv "conftest.tmp" "conftest.in"
4169 cp "conftest.in" "conftest.nl"
4170 echo 'GREP' >> "conftest.nl"
4171 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4172 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4173 ac_count=`expr $ac_count + 1`
4174 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4175 # Best one so far, save it but keep looking for a better one
4176 ac_cv_path_GREP="$ac_path_GREP"
4177 ac_path_GREP_max=$ac_count
4178 fi
4179 # 10*(2^10) chars as input seems more than enough
4180 test $ac_count -gt 10 && break
4181 done
4182 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4183esac
4184
4185
4186 $ac_path_GREP_found && break 3
4187 done
4188done
4189
4190done
4191IFS=$as_save_IFS
4192
4193
4194fi
4195
4196GREP="$ac_cv_path_GREP"
4197if test -z "$GREP"; then
4198 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4199echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4200 { (exit 1); exit 1; }; }
4201fi
4202
4203else
4204 ac_cv_path_GREP=$GREP
4205fi
4206
4207
4208fi
4209{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
4210echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
4211 GREP="$ac_cv_path_GREP"
4212
4213
4214{ echo "$as_me:$LINENO: checking for egrep" >&5
4215echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
4216if test "${ac_cv_path_EGREP+set}" = set; then
e143ad11
AS
4217 echo $ECHO_N "(cached) $ECHO_C" >&6
4218else
ca81d7a0
JD
4219 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4220 then ac_cv_path_EGREP="$GREP -E"
4221 else
4222 # Extract the first word of "egrep" to use in msg output
4223if test -z "$EGREP"; then
4224set dummy egrep; ac_prog_name=$2
4225if test "${ac_cv_path_EGREP+set}" = set; then
4226 echo $ECHO_N "(cached) $ECHO_C" >&6
4227else
4228 ac_path_EGREP_found=false
4229# Loop through the user's path and test for each of PROGNAME-LIST
4230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4231for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4232do
4233 IFS=$as_save_IFS
4234 test -z "$as_dir" && as_dir=.
4235 for ac_prog in egrep; do
4236 for ac_exec_ext in '' $ac_executable_extensions; do
4237 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
f053c89f 4238 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
ca81d7a0
JD
4239 # Check for GNU ac_path_EGREP and select it if it is found.
4240 # Check for GNU $ac_path_EGREP
4241case `"$ac_path_EGREP" --version 2>&1` in
4242*GNU*)
4243 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4244*)
4245 ac_count=0
4246 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
4247 while :
4248 do
4249 cat "conftest.in" "conftest.in" >"conftest.tmp"
4250 mv "conftest.tmp" "conftest.in"
4251 cp "conftest.in" "conftest.nl"
4252 echo 'EGREP' >> "conftest.nl"
4253 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4254 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4255 ac_count=`expr $ac_count + 1`
4256 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4257 # Best one so far, save it but keep looking for a better one
4258 ac_cv_path_EGREP="$ac_path_EGREP"
4259 ac_path_EGREP_max=$ac_count
e143ad11 4260 fi
ca81d7a0
JD
4261 # 10*(2^10) chars as input seems more than enough
4262 test $ac_count -gt 10 && break
4263 done
4264 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4265esac
4266
4267
4268 $ac_path_EGREP_found && break 3
4269 done
4270done
4271
4272done
4273IFS=$as_save_IFS
4274
4275
e143ad11 4276fi
e143ad11 4277
ca81d7a0
JD
4278EGREP="$ac_cv_path_EGREP"
4279if test -z "$EGREP"; then
4280 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4281echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4282 { (exit 1); exit 1; }; }
4283fi
e143ad11 4284
ca81d7a0
JD
4285else
4286 ac_cv_path_EGREP=$EGREP
4287fi
e143ad11 4288
ca81d7a0
JD
4289
4290 fi
8eeae1c9 4291fi
ca81d7a0
JD
4292{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
4293echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
4294 EGREP="$ac_cv_path_EGREP"
e143ad11
AS
4295
4296
4297
ca81d7a0
JD
4298{ echo "$as_me:$LINENO: checking for AIX" >&5
4299echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
e143ad11
AS
4300cat >conftest.$ac_ext <<_ACEOF
4301/* confdefs.h. */
4302_ACEOF
4303cat confdefs.h >>conftest.$ac_ext
4304cat >>conftest.$ac_ext <<_ACEOF
4305/* end confdefs.h. */
4306#ifdef _AIX
4307 yes
4308#endif
4309
4310_ACEOF
4311if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4312 $EGREP "yes" >/dev/null 2>&1; then
ca81d7a0
JD
4313 { echo "$as_me:$LINENO: result: yes" >&5
4314echo "${ECHO_T}yes" >&6; }
e143ad11
AS
4315cat >>confdefs.h <<\_ACEOF
4316#define _ALL_SOURCE 1
4317_ACEOF
4318
4319else
ca81d7a0
JD
4320 { echo "$as_me:$LINENO: result: no" >&5
4321echo "${ECHO_T}no" >&6; }
e143ad11
AS
4322fi
4323rm -f conftest*
4324
4325
4326
4327cat >>confdefs.h <<\_ACEOF
4328#define _GNU_SOURCE 1
4329_ACEOF
4330
4331
4332
01abe918 4333### Use -Wno-pointer-sign if the compiler supports it
ca81d7a0
JD
4334{ echo "$as_me:$LINENO: checking whether gcc understands -Wno-pointer-sign" >&5
4335echo $ECHO_N "checking whether gcc understands -Wno-pointer-sign... $ECHO_C" >&6; }
01abe918
CY
4336SAVE_CFLAGS="$CFLAGS"
4337CFLAGS="$CFLAGS -Wno-pointer-sign"
01abe918
CY
4338cat >conftest.$ac_ext <<_ACEOF
4339/* confdefs.h. */
4340_ACEOF
4341cat confdefs.h >>conftest.$ac_ext
4342cat >>conftest.$ac_ext <<_ACEOF
4343/* end confdefs.h. */
4344
4345int
4346main ()
4347{
4348
4349 ;
4350 return 0;
4351}
4352_ACEOF
4353rm -f conftest.$ac_objext
ca81d7a0
JD
4354if { (ac_try="$ac_compile"
4355case "(($ac_try" in
4356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4357 *) ac_try_echo=$ac_try;;
4358esac
4359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4360 (eval "$ac_compile") 2>conftest.er1
01abe918
CY
4361 ac_status=$?
4362 grep -v '^ *+' conftest.er1 >conftest.err
4363 rm -f conftest.er1
4364 cat conftest.err >&5
4365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4366 (exit $ac_status); } && {
4367 test -z "$ac_c_werror_flag" ||
4368 test ! -s conftest.err
4369 } && test -s conftest.$ac_objext; then
01abe918
CY
4370 has_option=yes
4371else
4372 echo "$as_me: failed program was:" >&5
4373sed 's/^/| /' conftest.$ac_ext >&5
4374
ca81d7a0 4375 has_option=no
01abe918 4376fi
ca81d7a0
JD
4377
4378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
01abe918
CY
4379if test $has_option = yes; then
4380 C_WARNINGS_SWITCH="-Wno-pointer-sign $C_WARNINGS_SWITCH"
4381fi
ca81d7a0
JD
4382{ echo "$as_me:$LINENO: result: $has_option" >&5
4383echo "${ECHO_T}$has_option" >&6; }
01abe918
CY
4384CFLAGS="$SAVE_CFLAGS"
4385unset has_option
4386unset SAVE_CFLAGS
4387
6a3a24fa 4388#### Some other nice autoconf tests.
ba4481b5 4389
ca81d7a0
JD
4390{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
4391echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
503d2be0
AS
4392LN_S=$as_ln_s
4393if test "$LN_S" = "ln -s"; then
ca81d7a0
JD
4394 { echo "$as_me:$LINENO: result: yes" >&5
4395echo "${ECHO_T}yes" >&6; }
ba4481b5 4396else
ca81d7a0
JD
4397 { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
4398echo "${ECHO_T}no, using $LN_S" >&6; }
ba4481b5
DL
4399fi
4400
503d2be0
AS
4401ac_ext=c
4402ac_cpp='$CPP $CPPFLAGS'
4403ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4404ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4405ac_compiler_gnu=$ac_cv_c_compiler_gnu
ca81d7a0
JD
4406{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
4407echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
ba4481b5
DL
4408# On Suns, sometimes $CPP names a directory.
4409if test -n "$CPP" && test -d "$CPP"; then
4410 CPP=
4411fi
4412if test -z "$CPP"; then
503d2be0
AS
4413 if test "${ac_cv_prog_CPP+set}" = set; then
4414 echo $ECHO_N "(cached) $ECHO_C" >&6
4415else
4416 # Double quotes because CPP needs to be expanded
4417 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4418 do
4419 ac_preproc_ok=false
4420for ac_c_preproc_warn_flag in '' yes
4421do
4422 # Use a header file that comes with gcc, so configuring glibc
4423 # with a fresh cross-compiler works.
19650fd6
AS
4424 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4425 # <limits.h> exists even on freestanding compilers.
ba4481b5 4426 # On the NeXT, cc -E runs the code through the compiler's parser,
503d2be0
AS
4427 # not just through cpp. "Syntax error" is here to catch this case.
4428 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4429/* confdefs.h. */
4430_ACEOF
4431cat confdefs.h >>conftest.$ac_ext
4432cat >>conftest.$ac_ext <<_ACEOF
4433/* end confdefs.h. */
4434#ifdef __STDC__
4435# include <limits.h>
4436#else
4437# include <assert.h>
4438#endif
edfaf76d 4439 Syntax error
503d2be0 4440_ACEOF
ca81d7a0
JD
4441if { (ac_try="$ac_cpp conftest.$ac_ext"
4442case "(($ac_try" in
4443 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4444 *) ac_try_echo=$ac_try;;
4445esac
4446eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4447 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4448 ac_status=$?
6bae0ccf 4449 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4450 rm -f conftest.er1
4451 cat conftest.err >&5
c0d27fcc 4452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4453 (exit $ac_status); } >/dev/null && {
4454 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4455 test ! -s conftest.err
4456 }; then
ba4481b5
DL
4457 :
4458else
503d2be0 4459 echo "$as_me: failed program was:" >&5
19650fd6
AS
4460sed 's/^/| /' conftest.$ac_ext >&5
4461
503d2be0
AS
4462 # Broken: fails on valid input.
4463continue
4464fi
ca81d7a0 4465
503d2be0
AS
4466rm -f conftest.err conftest.$ac_ext
4467
ca81d7a0 4468 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4469 # can be detected and how.
4470 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4471/* confdefs.h. */
4472_ACEOF
4473cat confdefs.h >>conftest.$ac_ext
4474cat >>conftest.$ac_ext <<_ACEOF
4475/* end confdefs.h. */
503d2be0
AS
4476#include <ac_nonexistent.h>
4477_ACEOF
ca81d7a0
JD
4478if { (ac_try="$ac_cpp conftest.$ac_ext"
4479case "(($ac_try" in
4480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4481 *) ac_try_echo=$ac_try;;
4482esac
4483eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4484 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4485 ac_status=$?
6bae0ccf 4486 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4487 rm -f conftest.er1
4488 cat conftest.err >&5
c0d27fcc 4489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4490 (exit $ac_status); } >/dev/null && {
4491 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4492 test ! -s conftest.err
4493 }; then
503d2be0
AS
4494 # Broken: success on invalid input.
4495continue
c4bb2108 4496else
503d2be0 4497 echo "$as_me: failed program was:" >&5
19650fd6
AS
4498sed 's/^/| /' conftest.$ac_ext >&5
4499
503d2be0
AS
4500 # Passes both tests.
4501ac_preproc_ok=:
4502break
4503fi
ca81d7a0 4504
503d2be0
AS
4505rm -f conftest.err conftest.$ac_ext
4506
4507done
4508# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4509rm -f conftest.err conftest.$ac_ext
4510if $ac_preproc_ok; then
4511 break
4512fi
4513
4514 done
4515 ac_cv_prog_CPP=$CPP
4516
4517fi
4518 CPP=$ac_cv_prog_CPP
4519else
4520 ac_cv_prog_CPP=$CPP
4521fi
ca81d7a0
JD
4522{ echo "$as_me:$LINENO: result: $CPP" >&5
4523echo "${ECHO_T}$CPP" >&6; }
503d2be0
AS
4524ac_preproc_ok=false
4525for ac_c_preproc_warn_flag in '' yes
4526do
4527 # Use a header file that comes with gcc, so configuring glibc
4528 # with a fresh cross-compiler works.
19650fd6
AS
4529 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4530 # <limits.h> exists even on freestanding compilers.
503d2be0
AS
4531 # On the NeXT, cc -E runs the code through the compiler's parser,
4532 # not just through cpp. "Syntax error" is here to catch this case.
4533 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4534/* confdefs.h. */
4535_ACEOF
4536cat confdefs.h >>conftest.$ac_ext
4537cat >>conftest.$ac_ext <<_ACEOF
4538/* end confdefs.h. */
4539#ifdef __STDC__
4540# include <limits.h>
4541#else
4542# include <assert.h>
4543#endif
edfaf76d 4544 Syntax error
503d2be0 4545_ACEOF
ca81d7a0
JD
4546if { (ac_try="$ac_cpp conftest.$ac_ext"
4547case "(($ac_try" in
4548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4549 *) ac_try_echo=$ac_try;;
4550esac
4551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4552 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4553 ac_status=$?
6bae0ccf 4554 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4555 rm -f conftest.er1
4556 cat conftest.err >&5
c0d27fcc 4557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4558 (exit $ac_status); } >/dev/null && {
4559 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4560 test ! -s conftest.err
4561 }; then
ba4481b5
DL
4562 :
4563else
503d2be0 4564 echo "$as_me: failed program was:" >&5
19650fd6
AS
4565sed 's/^/| /' conftest.$ac_ext >&5
4566
503d2be0
AS
4567 # Broken: fails on valid input.
4568continue
4569fi
ca81d7a0 4570
503d2be0
AS
4571rm -f conftest.err conftest.$ac_ext
4572
ca81d7a0 4573 # OK, works on sane cases. Now check whether nonexistent headers
503d2be0
AS
4574 # can be detected and how.
4575 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
4576/* confdefs.h. */
4577_ACEOF
4578cat confdefs.h >>conftest.$ac_ext
4579cat >>conftest.$ac_ext <<_ACEOF
4580/* end confdefs.h. */
503d2be0
AS
4581#include <ac_nonexistent.h>
4582_ACEOF
ca81d7a0
JD
4583if { (ac_try="$ac_cpp conftest.$ac_ext"
4584case "(($ac_try" in
4585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4586 *) ac_try_echo=$ac_try;;
4587esac
4588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4589 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 4590 ac_status=$?
6bae0ccf 4591 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
4592 rm -f conftest.er1
4593 cat conftest.err >&5
c0d27fcc 4594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
4595 (exit $ac_status); } >/dev/null && {
4596 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4597 test ! -s conftest.err
4598 }; then
503d2be0
AS
4599 # Broken: success on invalid input.
4600continue
4601else
4602 echo "$as_me: failed program was:" >&5
19650fd6
AS
4603sed 's/^/| /' conftest.$ac_ext >&5
4604
503d2be0
AS
4605 # Passes both tests.
4606ac_preproc_ok=:
4607break
ba4481b5 4608fi
ca81d7a0 4609
503d2be0
AS
4610rm -f conftest.err conftest.$ac_ext
4611
4612done
4613# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4614rm -f conftest.err conftest.$ac_ext
4615if $ac_preproc_ok; then
4616 :
ba4481b5 4617else
19650fd6
AS
4618 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
4619See \`config.log' for more details." >&5
4620echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
4621See \`config.log' for more details." >&2;}
503d2be0 4622 { (exit 1); exit 1; }; }
ba4481b5 4623fi
503d2be0
AS
4624
4625ac_ext=c
4626ac_cpp='$CPP $CPPFLAGS'
4627ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4628ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4629ac_compiler_gnu=$ac_cv_c_compiler_gnu
ba4481b5
DL
4630
4631# Find a good install program. We prefer a C program (faster),
4632# so one script is as good as another. But avoid the broken or
4633# incompatible versions:
4634# SysV /etc/install, /usr/sbin/install
4635# SunOS /usr/etc/install
4636# IRIX /sbin/install
4637# AIX /bin/install
503d2be0 4638# AmigaOS /C/install, which installs bootblocks on floppy discs
c4bb2108 4639# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
ba4481b5
DL
4640# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4641# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
edfaf76d 4642# OS/2's system install, which has a completely different semantic
ba4481b5 4643# ./install, which can be erroneously created by make from ./install.sh.
ca81d7a0
JD
4644{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4645echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
ba4481b5 4646if test -z "$INSTALL"; then
503d2be0
AS
4647if test "${ac_cv_path_install+set}" = set; then
4648 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 4649else
c0d27fcc
MR
4650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4651for as_dir in $PATH
4652do
4653 IFS=$as_save_IFS
4654 test -z "$as_dir" && as_dir=.
4655 # Account for people who put trailing slashes in PATH elements.
4656case $as_dir/ in
4657 ./ | .// | /cC/* | \
4658 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
edfaf76d 4659 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
c0d27fcc
MR
4660 /usr/ucb/* ) ;;
4661 *)
4662 # OSF1 and SCO ODT 3.0 have their own names for install.
4663 # Don't use installbsd from OSF since it installs stuff as root
4664 # by default.
4665 for ac_prog in ginstall scoinst install; do
4666 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4667 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
edfaf76d
LK
4668 if test $ac_prog = install &&
4669 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4670 # AIX install. It has an incompatible calling convention.
4671 :
4672 elif test $ac_prog = install &&
4673 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4674 # program-specific install script used by HP pwplus--don't use.
4675 :
4676 else
4677 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4678 break 3
4679 fi
4680 fi
ba4481b5 4681 done
c0d27fcc
MR
4682 done
4683 ;;
4684esac
4685done
ca81d7a0 4686IFS=$as_save_IFS
c0d27fcc 4687
ba4481b5
DL
4688
4689fi
4690 if test "${ac_cv_path_install+set}" = set; then
503d2be0 4691 INSTALL=$ac_cv_path_install
ba4481b5 4692 else
ca81d7a0
JD
4693 # As a last resort, use the slow shell script. Don't cache a
4694 # value for INSTALL within a source directory, because that will
ba4481b5 4695 # break other packages using the cache if that directory is
ca81d7a0 4696 # removed, or if the value is a relative name.
503d2be0 4697 INSTALL=$ac_install_sh
ba4481b5
DL
4698 fi
4699fi
ca81d7a0
JD
4700{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4701echo "${ECHO_T}$INSTALL" >&6; }
ba4481b5
DL
4702
4703# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4704# It thinks the first close brace ends the variable substitution.
4705test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4706
503d2be0 4707test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
c4bb2108 4708
ba4481b5
DL
4709test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4710
c0d27fcc
MR
4711if test "x$RANLIB" = x; then
4712 if test -n "$ac_tool_prefix"; then
4713 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4714set dummy ${ac_tool_prefix}ranlib; ac_word=$2
ca81d7a0
JD
4715{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4716echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
c0d27fcc 4717if test "${ac_cv_prog_RANLIB+set}" = set; then
503d2be0 4718 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4
DL
4719else
4720 if test -n "$RANLIB"; then
4721 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4722else
c0d27fcc
MR
4723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4724for as_dir in $PATH
4725do
4726 IFS=$as_save_IFS
4727 test -z "$as_dir" && as_dir=.
4728 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4729 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
4730 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4731 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4732 break 2
4733 fi
4734done
503d2be0 4735done
ca81d7a0 4736IFS=$as_save_IFS
503d2be0 4737
7397acc4
DL
4738fi
4739fi
503d2be0 4740RANLIB=$ac_cv_prog_RANLIB
7397acc4 4741if test -n "$RANLIB"; then
ca81d7a0
JD
4742 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4743echo "${ECHO_T}$RANLIB" >&6; }
503d2be0 4744else
ca81d7a0
JD
4745 { echo "$as_me:$LINENO: result: no" >&5
4746echo "${ECHO_T}no" >&6; }
503d2be0
AS
4747fi
4748
ca81d7a0 4749
503d2be0
AS
4750fi
4751if test -z "$ac_cv_prog_RANLIB"; then
4752 ac_ct_RANLIB=$RANLIB
4753 # Extract the first word of "ranlib", so it can be a program name with args.
4754set dummy ranlib; ac_word=$2
ca81d7a0
JD
4755{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4756echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
503d2be0
AS
4757if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4758 echo $ECHO_N "(cached) $ECHO_C" >&6
4759else
4760 if test -n "$ac_ct_RANLIB"; then
4761 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4762else
c0d27fcc
MR
4763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4764for as_dir in $PATH
4765do
4766 IFS=$as_save_IFS
4767 test -z "$as_dir" && as_dir=.
4768 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4769 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
4770 ac_cv_prog_ac_ct_RANLIB="ranlib"
4771 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4772 break 2
4773 fi
4774done
503d2be0 4775done
ca81d7a0 4776IFS=$as_save_IFS
503d2be0 4777
503d2be0
AS
4778fi
4779fi
4780ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4781if test -n "$ac_ct_RANLIB"; then
ca81d7a0
JD
4782 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4783echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
503d2be0 4784else
ca81d7a0
JD
4785 { echo "$as_me:$LINENO: result: no" >&5
4786echo "${ECHO_T}no" >&6; }
503d2be0
AS
4787fi
4788
ca81d7a0
JD
4789 if test "x$ac_ct_RANLIB" = x; then
4790 RANLIB=":"
4791 else
4792 case $cross_compiling:$ac_tool_warned in
4793yes:)
4794{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4795whose name does not start with the host triplet. If you think this
4796configuration is useful to you, please write to autoconf@gnu.org." >&5
4797echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4798whose name does not start with the host triplet. If you think this
4799configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4800ac_tool_warned=yes ;;
4801esac
4802 RANLIB=$ac_ct_RANLIB
4803 fi
7397acc4 4804else
503d2be0 4805 RANLIB="$ac_cv_prog_RANLIB"
7397acc4
DL
4806fi
4807
4808fi
9e71690e
DK
4809# Extract the first word of "install-info", so it can be a program name with args.
4810set dummy install-info; ac_word=$2
ca81d7a0
JD
4811{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4812echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
4813if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4814 echo $ECHO_N "(cached) $ECHO_C" >&6
4815else
4816 case $INSTALL_INFO in
4817 [\\/]* | ?:[\\/]*)
4818 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4819 ;;
4820 *)
4821 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4822for as_dir in $PATH
4823do
4824 IFS=$as_save_IFS
4825 test -z "$as_dir" && as_dir=.
4826 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4827 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
4828 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4829 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4830 break 2
4831 fi
4832done
4833done
ca81d7a0 4834IFS=$as_save_IFS
9e71690e
DK
4835
4836 ;;
4837esac
4838fi
4839INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 4840if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
4841 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4842echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 4843else
ca81d7a0
JD
4844 { echo "$as_me:$LINENO: result: no" >&5
4845echo "${ECHO_T}no" >&6; }
9e71690e
DK
4846fi
4847
ca81d7a0 4848
9e71690e
DK
4849# Extract the first word of "install-info", so it can be a program name with args.
4850set dummy install-info; ac_word=$2
ca81d7a0
JD
4851{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4852echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
4853if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4854 echo $ECHO_N "(cached) $ECHO_C" >&6
4855else
4856 case $INSTALL_INFO in
4857 [\\/]* | ?:[\\/]*)
4858 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4859 ;;
4860 *)
4861 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4862for as_dir in /usr/sbin
4863do
4864 IFS=$as_save_IFS
4865 test -z "$as_dir" && as_dir=.
4866 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4867 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
4868 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4869 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4870 break 2
4871 fi
4872done
4873done
ca81d7a0 4874IFS=$as_save_IFS
9e71690e
DK
4875
4876 ;;
4877esac
4878fi
4879INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 4880if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
4881 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4882echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 4883else
ca81d7a0
JD
4884 { echo "$as_me:$LINENO: result: no" >&5
4885echo "${ECHO_T}no" >&6; }
9e71690e
DK
4886fi
4887
ca81d7a0 4888
9e71690e
DK
4889# Extract the first word of "install-info", so it can be a program name with args.
4890set dummy install-info; ac_word=$2
ca81d7a0
JD
4891{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4892echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9e71690e
DK
4893if test "${ac_cv_path_INSTALL_INFO+set}" = set; then
4894 echo $ECHO_N "(cached) $ECHO_C" >&6
4895else
4896 case $INSTALL_INFO in
4897 [\\/]* | ?:[\\/]*)
4898 ac_cv_path_INSTALL_INFO="$INSTALL_INFO" # Let the user override the test with a path.
4899 ;;
4900 *)
4901 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4902for as_dir in /sbin
4903do
4904 IFS=$as_save_IFS
4905 test -z "$as_dir" && as_dir=.
4906 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4907 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9e71690e
DK
4908 ac_cv_path_INSTALL_INFO="$as_dir/$ac_word$ac_exec_ext"
4909 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4910 break 2
4911 fi
4912done
4913done
ca81d7a0 4914IFS=$as_save_IFS
9e71690e
DK
4915
4916 test -z "$ac_cv_path_INSTALL_INFO" && ac_cv_path_INSTALL_INFO=":"
4917 ;;
4918esac
4919fi
4920INSTALL_INFO=$ac_cv_path_INSTALL_INFO
9e71690e 4921if test -n "$INSTALL_INFO"; then
ca81d7a0
JD
4922 { echo "$as_me:$LINENO: result: $INSTALL_INFO" >&5
4923echo "${ECHO_T}$INSTALL_INFO" >&6; }
9e71690e 4924else
ca81d7a0
JD
4925 { echo "$as_me:$LINENO: result: no" >&5
4926echo "${ECHO_T}no" >&6; }
9e71690e
DK
4927fi
4928
ca81d7a0 4929
8ae52ca6
RF
4930# Extract the first word of "gzip", so it can be a program name with args.
4931set dummy gzip; ac_word=$2
ca81d7a0
JD
4932{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4933echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
46e35e9f 4934if test "${ac_cv_path_GZIP_PROG+set}" = set; then
8ae52ca6
RF
4935 echo $ECHO_N "(cached) $ECHO_C" >&6
4936else
46e35e9f 4937 case $GZIP_PROG in
8ae52ca6 4938 [\\/]* | ?:[\\/]*)
46e35e9f 4939 ac_cv_path_GZIP_PROG="$GZIP_PROG" # Let the user override the test with a path.
8ae52ca6
RF
4940 ;;
4941 *)
4942 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4943for as_dir in $PATH
4944do
4945 IFS=$as_save_IFS
4946 test -z "$as_dir" && as_dir=.
4947 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 4948 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
46e35e9f 4949 ac_cv_path_GZIP_PROG="$as_dir/$ac_word$ac_exec_ext"
8ae52ca6
RF
4950 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4951 break 2
4952 fi
4953done
4954done
ca81d7a0 4955IFS=$as_save_IFS
8ae52ca6
RF
4956
4957 ;;
4958esac
4959fi
46e35e9f 4960GZIP_PROG=$ac_cv_path_GZIP_PROG
46e35e9f 4961if test -n "$GZIP_PROG"; then
ca81d7a0
JD
4962 { echo "$as_me:$LINENO: result: $GZIP_PROG" >&5
4963echo "${ECHO_T}$GZIP_PROG" >&6; }
8ae52ca6 4964else
ca81d7a0
JD
4965 { echo "$as_me:$LINENO: result: no" >&5
4966echo "${ECHO_T}no" >&6; }
8ae52ca6
RF
4967fi
4968
ba4481b5 4969
c0d27fcc 4970
ca81d7a0 4971
1bb9a689
MB
4972## Need makeinfo >= 4.6 (?) to build the manuals.
4973# Extract the first word of "makeinfo", so it can be a program name with args.
4974set dummy makeinfo; ac_word=$2
4975{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4976echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
4977if test "${ac_cv_path_MAKEINFO+set}" = set; then
4978 echo $ECHO_N "(cached) $ECHO_C" >&6
4979else
4980 case $MAKEINFO in
4981 [\\/]* | ?:[\\/]*)
4982 ac_cv_path_MAKEINFO="$MAKEINFO" # Let the user override the test with a path.
4983 ;;
4984 *)
4985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4986for as_dir in $PATH
4987do
4988 IFS=$as_save_IFS
4989 test -z "$as_dir" && as_dir=.
4990 for ac_exec_ext in '' $ac_executable_extensions; do
4991 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4992 ac_cv_path_MAKEINFO="$as_dir/$ac_word$ac_exec_ext"
4993 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4994 break 2
4995 fi
4996done
4997done
4998IFS=$as_save_IFS
4999
5000 test -z "$ac_cv_path_MAKEINFO" && ac_cv_path_MAKEINFO="no"
5001 ;;
5002esac
5003fi
5004MAKEINFO=$ac_cv_path_MAKEINFO
5005if test -n "$MAKEINFO"; then
5006 { echo "$as_me:$LINENO: result: $MAKEINFO" >&5
5007echo "${ECHO_T}$MAKEINFO" >&6; }
5008else
5009 { echo "$as_me:$LINENO: result: no" >&5
5010echo "${ECHO_T}no" >&6; }
5011fi
5012
5013
5014if test "$MAKEINFO" != "no" && \
d4840f44 5015 test x"`$MAKEINFO --version 2> /dev/null | $EGREP 'texinfo[^0-9]*([1-4][0-9]+|[5-9]|4\.[6-9]|4\.[1-5][0-9]+)'`" = x; then
1bb9a689
MB
5016 MAKEINFO=no
5017fi
5018
5019if test "$MAKEINFO" = "no"; then
5020 { { echo "$as_me:$LINENO: error: makeinfo >= 4.6 is required " >&5
5021echo "$as_me: error: makeinfo >= 4.6 is required " >&2;}
5022 { (exit 1); exit 1; }; }
5023fi
5024
5025
5026
8e967cf7
MR
5027if test x$GCC = xyes && test "x$GCC_LINK_TEST_OPTIONS" != x
5028then
5029 ac_link="$ac_link $GCC_LINK_TEST_OPTIONS"
5030fi
5031
5032if test x$GCC = x && test "x$NON_GCC_LINK_TEST_OPTIONS" != x
5033then
5034 ac_link="$ac_link $NON_GCC_LINK_TEST_OPTIONS"
5035fi
5036
c0d27fcc 5037
fe239f0f 5038late_LDFLAGS=$LDFLAGS
4af002d6 5039if test "$GCC" = yes; then
fe239f0f
AS
5040 LDFLAGS="$LDFLAGS -Wl,-znocombreloc"
5041else
5042 LDFLAGS="$LDFLAGS -znocombreloc"
5043fi
5044
ca81d7a0
JD
5045{ echo "$as_me:$LINENO: checking for -znocombreloc" >&5
5046echo $ECHO_N "checking for -znocombreloc... $ECHO_C" >&6; }
fe239f0f
AS
5047cat >conftest.$ac_ext <<_ACEOF
5048main(){return 0;}
5049_ACEOF
5050rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
5051if { (ac_try="$ac_link"
5052case "(($ac_try" in
5053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5054 *) ac_try_echo=$ac_try;;
5055esac
5056eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5057 (eval "$ac_link") 2>conftest.er1
fe239f0f 5058 ac_status=$?
edfaf76d
LK
5059 grep -v '^ *+' conftest.er1 >conftest.err
5060 rm -f conftest.er1
5061 cat conftest.err >&5
fe239f0f 5062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5063 (exit $ac_status); } && {
5064 test -z "$ac_c_werror_flag" ||
5065 test ! -s conftest.err
5066 } && test -s conftest$ac_exeext &&
5067 $as_test_x conftest$ac_exeext; then
ca81d7a0
JD
5068 { echo "$as_me:$LINENO: result: yes" >&5
5069echo "${ECHO_T}yes" >&6; }
fe239f0f
AS
5070else
5071 echo "$as_me: failed program was:" >&5
5072sed 's/^/| /' conftest.$ac_ext >&5
5073
ca81d7a0
JD
5074 LDFLAGS=$late_LDFLAGS
5075 { echo "$as_me:$LINENO: result: no" >&5
5076echo "${ECHO_T}no" >&6; }
fe239f0f 5077fi
ca81d7a0 5078
f053c89f 5079rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 5080 conftest$ac_exeext conftest.$ac_ext
fe239f0f 5081
3b33a005
DL
5082#### Extract some information from the operating system and machine files.
5083
c0d27fcc 5084{ echo "$as_me:$LINENO: checking the machine- and system-dependent files to find out
3b33a005 5085 - which libraries the lib-src programs will want, and
503d2be0
AS
5086 - whether the GNU malloc routines are usable..." >&5
5087echo "$as_me: checking the machine- and system-dependent files to find out
3b33a005 5088 - which libraries the lib-src programs will want, and
503d2be0 5089 - whether the GNU malloc routines are usable..." >&6;}
3b33a005
DL
5090
5091### First figure out CFLAGS (which we use for running the compiler here)
5092### and REAL_CFLAGS (which we use for real compilation).
5093### The two are the same except on a few systems, where they are made
5094### different to work around various lossages. For example,
5095### GCC 2.5 on GNU/Linux needs them to be different because it treats -g
5096### as implying static linking.
5097
5098### If the CFLAGS env var is specified, we use that value
5099### instead of the default.
5100
5101### It's not important that this name contain the PID; you can't run
5102### two configures in the same directory and have anything work
5103### anyway.
5104tempcname="conftest.c"
5105
5106echo '
5107#include "'${srcdir}'/src/'${opsysfile}'"
5108#include "'${srcdir}'/src/'${machfile}'"
5109#ifndef LIBS_MACHINE
5110#define LIBS_MACHINE
5111#endif
5112#ifndef LIBS_SYSTEM
5113#define LIBS_SYSTEM
5114#endif
5115#ifndef C_SWITCH_SYSTEM
5116#define C_SWITCH_SYSTEM
5117#endif
5118#ifndef C_SWITCH_MACHINE
5119#define C_SWITCH_MACHINE
5120#endif
5121configure___ libsrc_libs=LIBS_MACHINE LIBS_SYSTEM
5122configure___ c_switch_system=C_SWITCH_SYSTEM
5123configure___ c_switch_machine=C_SWITCH_MACHINE
5124
5125#ifndef LIB_X11_LIB
5126#define LIB_X11_LIB -lX11
5127#endif
5128
3b33a005
DL
5129#ifndef LIBX11_SYSTEM
5130#define LIBX11_SYSTEM
5131#endif
9d2818d6 5132configure___ LIBX=LIB_X11_LIB LIBX11_SYSTEM
3b33a005
DL
5133
5134#ifdef UNEXEC
5135configure___ unexec=UNEXEC
5136#else
5137configure___ unexec=unexec.o
5138#endif
5139
5140#ifdef SYSTEM_MALLOC
5141configure___ system_malloc=yes
5142#else
5143configure___ system_malloc=no
5144#endif
5145
ef9e4345
GM
5146#ifdef USE_MMAP_FOR_BUFFERS
5147configure___ use_mmap_for_buffers=yes
73b77ee5 5148#else
ef9e4345 5149configure___ use_mmap_for_buffers=no
73b77ee5
GM
5150#endif
5151
3b33a005
DL
5152#ifndef C_DEBUG_SWITCH
5153#define C_DEBUG_SWITCH -g
5154#endif
5155
5156#ifndef C_OPTIMIZE_SWITCH
5157#ifdef __GNUC__
5158#define C_OPTIMIZE_SWITCH -O2
5159#else
5160#define C_OPTIMIZE_SWITCH -O
5161#endif
5162#endif
5163
01abe918
CY
5164#ifndef C_WARNINGS_SWITCH
5165#define C_WARNINGS_SWITCH ${C_WARNINGS_SWITCH}
5166#endif
5167
3b33a005
DL
5168#ifndef LD_SWITCH_MACHINE
5169#define LD_SWITCH_MACHINE
5170#endif
5171
5172#ifndef LD_SWITCH_SYSTEM
5173#define LD_SWITCH_SYSTEM
5174#endif
5175
5176#ifndef LD_SWITCH_X_SITE_AUX
5177#define LD_SWITCH_X_SITE_AUX
503d2be0 5178#endif
3b33a005
DL
5179
5180configure___ ld_switch_system=LD_SWITCH_SYSTEM
5181configure___ ld_switch_machine=LD_SWITCH_MACHINE
5182
5183#ifdef THIS_IS_CONFIGURE
5184
5185/* Get the CFLAGS for tests in configure. */
5186#ifdef __GNUC__
5187configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
5188#else
5189configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5190#endif
5191
5192#else /* not THIS_IS_CONFIGURE */
5193
5194/* Get the CFLAGS for real compilation. */
5195#ifdef __GNUC__
01abe918 5196configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH '${SPECIFIED_CFLAGS}'
3b33a005
DL
5197#else
5198configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
5199#endif
5200
5201#endif /* not THIS_IS_CONFIGURE */
5202' > ${tempcname}
5203
5204# The value of CPP is a quoted variable reference, so we need to do this
5205# to get its actual value...
5206CPP=`eval "echo $CPP"`
5207eval `${CPP} -Isrc ${tempcname} \
5208 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5209if test "x$SPECIFIED_CFLAGS" = x; then
5210 eval `${CPP} -Isrc -DTHIS_IS_CONFIGURE ${tempcname} \
5211 | sed -n -e 's/^configure___ \([^=]*=\)\(.*\)$/\1"\2"/p'`
5212else
5213 REAL_CFLAGS="$CFLAGS"
5214fi
5215rm ${tempcname}
5216
5217ac_link="$ac_link $ld_switch_machine $ld_switch_system"
5218
5219### Make sure subsequent tests use flags consistent with the build flags.
5220
5221if test x"${OVERRIDE_CPPFLAGS}" != x; then
5222 CPPFLAGS="${OVERRIDE_CPPFLAGS}"
5223else
5224 CPPFLAGS="$c_switch_system $c_switch_machine $CPPFLAGS"
5225fi
5226
6bae0ccf
DL
5227
5228
ca81d7a0 5229# Check whether --enable-largefile was given.
f4988be7 5230if test "${enable_largefile+set}" = set; then
ca81d7a0
JD
5231 enableval=$enable_largefile;
5232fi
f4988be7 5233
503d2be0 5234if test "$enable_largefile" != no; then
f4988be7 5235
ca81d7a0
JD
5236 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
5237echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5238if test "${ac_cv_sys_largefile_CC+set}" = set; then
5239 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5240else
f4988be7 5241 ac_cv_sys_largefile_CC=no
503d2be0
AS
5242 if test "$GCC" != yes; then
5243 ac_save_CC=$CC
5244 while :; do
ca81d7a0
JD
5245 # IRIX 6.2 and later do not support large files by default,
5246 # so use the C compiler's -n32 option if that helps.
edfaf76d 5247 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5248/* confdefs.h. */
5249_ACEOF
5250cat confdefs.h >>conftest.$ac_ext
5251cat >>conftest.$ac_ext <<_ACEOF
5252/* end confdefs.h. */
f4988be7 5253#include <sys/types.h>
503d2be0
AS
5254 /* Check that off_t can represent 2**63 - 1 correctly.
5255 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5256 since some C++ compilers masquerading as C compilers
5257 incorrectly reject 9223372036854775807. */
5258#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5259 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5260 && LARGE_OFF_T % 2147483647 == 1)
5261 ? 1 : -1];
5262int
5263main ()
5264{
f4988be7 5265
503d2be0
AS
5266 ;
5267 return 0;
5268}
5269_ACEOF
ca81d7a0
JD
5270 rm -f conftest.$ac_objext
5271if { (ac_try="$ac_compile"
5272case "(($ac_try" in
5273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5274 *) ac_try_echo=$ac_try;;
5275esac
5276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5277 (eval "$ac_compile") 2>conftest.er1
503d2be0 5278 ac_status=$?
edfaf76d
LK
5279 grep -v '^ *+' conftest.er1 >conftest.err
5280 rm -f conftest.er1
5281 cat conftest.err >&5
c0d27fcc 5282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5283 (exit $ac_status); } && {
5284 test -z "$ac_c_werror_flag" ||
5285 test ! -s conftest.err
5286 } && test -s conftest.$ac_objext; then
503d2be0 5287 break
b192d653 5288else
503d2be0 5289 echo "$as_me: failed program was:" >&5
19650fd6
AS
5290sed 's/^/| /' conftest.$ac_ext >&5
5291
ca81d7a0 5292
503d2be0 5293fi
ca81d7a0
JD
5294
5295rm -f core conftest.err conftest.$ac_objext
5296 CC="$CC -n32"
5297 rm -f conftest.$ac_objext
5298if { (ac_try="$ac_compile"
5299case "(($ac_try" in
5300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5301 *) ac_try_echo=$ac_try;;
5302esac
5303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5304 (eval "$ac_compile") 2>conftest.er1
503d2be0 5305 ac_status=$?
edfaf76d
LK
5306 grep -v '^ *+' conftest.er1 >conftest.err
5307 rm -f conftest.er1
5308 cat conftest.err >&5
c0d27fcc 5309 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5310 (exit $ac_status); } && {
5311 test -z "$ac_c_werror_flag" ||
5312 test ! -s conftest.err
5313 } && test -s conftest.$ac_objext; then
503d2be0
AS
5314 ac_cv_sys_largefile_CC=' -n32'; break
5315else
5316 echo "$as_me: failed program was:" >&5
19650fd6
AS
5317sed 's/^/| /' conftest.$ac_ext >&5
5318
ca81d7a0 5319
503d2be0 5320fi
ca81d7a0
JD
5321
5322rm -f core conftest.err conftest.$ac_objext
edfaf76d 5323 break
503d2be0
AS
5324 done
5325 CC=$ac_save_CC
5326 rm -f conftest.$ac_ext
5327 fi
b192d653 5328fi
ca81d7a0
JD
5329{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
5330echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
503d2be0
AS
5331 if test "$ac_cv_sys_largefile_CC" != no; then
5332 CC=$CC$ac_cv_sys_largefile_CC
5333 fi
b192d653 5334
ca81d7a0
JD
5335 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5336echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5337if test "${ac_cv_sys_file_offset_bits+set}" = set; then
5338 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5339else
503d2be0 5340 while :; do
503d2be0 5341 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5342/* confdefs.h. */
5343_ACEOF
5344cat confdefs.h >>conftest.$ac_ext
5345cat >>conftest.$ac_ext <<_ACEOF
5346/* end confdefs.h. */
f4988be7 5347#include <sys/types.h>
503d2be0
AS
5348 /* Check that off_t can represent 2**63 - 1 correctly.
5349 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5350 since some C++ compilers masquerading as C compilers
5351 incorrectly reject 9223372036854775807. */
5352#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5353 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5354 && LARGE_OFF_T % 2147483647 == 1)
5355 ? 1 : -1];
5356int
5357main ()
5358{
f4988be7 5359
503d2be0
AS
5360 ;
5361 return 0;
5362}
5363_ACEOF
5364rm -f conftest.$ac_objext
ca81d7a0
JD
5365if { (ac_try="$ac_compile"
5366case "(($ac_try" in
5367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5368 *) ac_try_echo=$ac_try;;
5369esac
5370eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5371 (eval "$ac_compile") 2>conftest.er1
503d2be0 5372 ac_status=$?
edfaf76d
LK
5373 grep -v '^ *+' conftest.er1 >conftest.err
5374 rm -f conftest.er1
5375 cat conftest.err >&5
c0d27fcc 5376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5377 (exit $ac_status); } && {
5378 test -z "$ac_c_werror_flag" ||
5379 test ! -s conftest.err
5380 } && test -s conftest.$ac_objext; then
5381 ac_cv_sys_file_offset_bits=no; break
f4988be7 5382else
503d2be0 5383 echo "$as_me: failed program was:" >&5
19650fd6
AS
5384sed 's/^/| /' conftest.$ac_ext >&5
5385
ca81d7a0 5386
503d2be0 5387fi
ca81d7a0
JD
5388
5389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5390 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5391/* confdefs.h. */
5392_ACEOF
5393cat confdefs.h >>conftest.$ac_ext
5394cat >>conftest.$ac_ext <<_ACEOF
5395/* end confdefs.h. */
f4988be7
GM
5396#define _FILE_OFFSET_BITS 64
5397#include <sys/types.h>
503d2be0
AS
5398 /* Check that off_t can represent 2**63 - 1 correctly.
5399 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5400 since some C++ compilers masquerading as C compilers
5401 incorrectly reject 9223372036854775807. */
5402#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5403 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5404 && LARGE_OFF_T % 2147483647 == 1)
5405 ? 1 : -1];
5406int
5407main ()
5408{
5409
5410 ;
5411 return 0;
5412}
5413_ACEOF
5414rm -f conftest.$ac_objext
ca81d7a0
JD
5415if { (ac_try="$ac_compile"
5416case "(($ac_try" in
5417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5418 *) ac_try_echo=$ac_try;;
5419esac
5420eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5421 (eval "$ac_compile") 2>conftest.er1
503d2be0 5422 ac_status=$?
edfaf76d
LK
5423 grep -v '^ *+' conftest.er1 >conftest.err
5424 rm -f conftest.er1
5425 cat conftest.err >&5
c0d27fcc 5426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5427 (exit $ac_status); } && {
5428 test -z "$ac_c_werror_flag" ||
5429 test ! -s conftest.err
5430 } && test -s conftest.$ac_objext; then
503d2be0
AS
5431 ac_cv_sys_file_offset_bits=64; break
5432else
5433 echo "$as_me: failed program was:" >&5
19650fd6
AS
5434sed 's/^/| /' conftest.$ac_ext >&5
5435
ca81d7a0 5436
503d2be0 5437fi
ca81d7a0
JD
5438
5439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5440 ac_cv_sys_file_offset_bits=unknown
503d2be0
AS
5441 break
5442done
ba4481b5 5443fi
ca81d7a0
JD
5444{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
5445echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
f053c89f
CY
5446case $ac_cv_sys_file_offset_bits in #(
5447 no | unknown) ;;
5448 *)
c0d27fcc 5449cat >>confdefs.h <<_ACEOF
f4988be7 5450#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
c0d27fcc 5451_ACEOF
f053c89f
CY
5452;;
5453esac
503d2be0 5454rm -f conftest*
f053c89f
CY
5455 if test $ac_cv_sys_file_offset_bits = unknown; then
5456 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
ca81d7a0 5457echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
503d2be0
AS
5458if test "${ac_cv_sys_large_files+set}" = set; then
5459 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 5460else
503d2be0 5461 while :; do
503d2be0 5462 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5463/* confdefs.h. */
5464_ACEOF
5465cat confdefs.h >>conftest.$ac_ext
5466cat >>conftest.$ac_ext <<_ACEOF
5467/* end confdefs.h. */
503d2be0
AS
5468#include <sys/types.h>
5469 /* Check that off_t can represent 2**63 - 1 correctly.
5470 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5471 since some C++ compilers masquerading as C compilers
5472 incorrectly reject 9223372036854775807. */
5473#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5474 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5475 && LARGE_OFF_T % 2147483647 == 1)
5476 ? 1 : -1];
5477int
5478main ()
5479{
ba4481b5 5480
503d2be0
AS
5481 ;
5482 return 0;
5483}
5484_ACEOF
5485rm -f conftest.$ac_objext
ca81d7a0
JD
5486if { (ac_try="$ac_compile"
5487case "(($ac_try" in
5488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5489 *) ac_try_echo=$ac_try;;
5490esac
5491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5492 (eval "$ac_compile") 2>conftest.er1
503d2be0 5493 ac_status=$?
edfaf76d
LK
5494 grep -v '^ *+' conftest.er1 >conftest.err
5495 rm -f conftest.er1
5496 cat conftest.err >&5
c0d27fcc 5497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5498 (exit $ac_status); } && {
5499 test -z "$ac_c_werror_flag" ||
5500 test ! -s conftest.err
5501 } && test -s conftest.$ac_objext; then
5502 ac_cv_sys_large_files=no; break
ba4481b5 5503else
503d2be0 5504 echo "$as_me: failed program was:" >&5
19650fd6
AS
5505sed 's/^/| /' conftest.$ac_ext >&5
5506
ca81d7a0 5507
503d2be0 5508fi
ca81d7a0
JD
5509
5510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 5511 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5512/* confdefs.h. */
5513_ACEOF
5514cat confdefs.h >>conftest.$ac_ext
5515cat >>conftest.$ac_ext <<_ACEOF
5516/* end confdefs.h. */
f4988be7 5517#define _LARGE_FILES 1
503d2be0
AS
5518#include <sys/types.h>
5519 /* Check that off_t can represent 2**63 - 1 correctly.
5520 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5521 since some C++ compilers masquerading as C compilers
5522 incorrectly reject 9223372036854775807. */
5523#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5524 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5525 && LARGE_OFF_T % 2147483647 == 1)
5526 ? 1 : -1];
5527int
5528main ()
5529{
f4988be7 5530
503d2be0
AS
5531 ;
5532 return 0;
5533}
5534_ACEOF
5535rm -f conftest.$ac_objext
ca81d7a0
JD
5536if { (ac_try="$ac_compile"
5537case "(($ac_try" in
5538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5539 *) ac_try_echo=$ac_try;;
5540esac
5541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5542 (eval "$ac_compile") 2>conftest.er1
503d2be0 5543 ac_status=$?
edfaf76d
LK
5544 grep -v '^ *+' conftest.er1 >conftest.err
5545 rm -f conftest.er1
5546 cat conftest.err >&5
c0d27fcc 5547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5548 (exit $ac_status); } && {
5549 test -z "$ac_c_werror_flag" ||
5550 test ! -s conftest.err
5551 } && test -s conftest.$ac_objext; then
503d2be0
AS
5552 ac_cv_sys_large_files=1; break
5553else
5554 echo "$as_me: failed program was:" >&5
19650fd6
AS
5555sed 's/^/| /' conftest.$ac_ext >&5
5556
ca81d7a0 5557
503d2be0 5558fi
ca81d7a0
JD
5559
5560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
f053c89f 5561 ac_cv_sys_large_files=unknown
503d2be0
AS
5562 break
5563done
ba4481b5 5564fi
ca81d7a0
JD
5565{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
5566echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
f053c89f
CY
5567case $ac_cv_sys_large_files in #(
5568 no | unknown) ;;
5569 *)
c0d27fcc 5570cat >>confdefs.h <<_ACEOF
f4988be7 5571#define _LARGE_FILES $ac_cv_sys_large_files
c0d27fcc 5572_ACEOF
f053c89f
CY
5573;;
5574esac
503d2be0 5575rm -f conftest*
f053c89f 5576 fi
503d2be0 5577fi
ba4481b5 5578
c0d27fcc 5579
439f58ee 5580
55e6d9b2 5581### The standard library on x86-64 and s390x GNU/Linux distributions can
bc5d9888
CY
5582### be located in either /usr/lib64 or /usr/lib.
5583case "${canonical}" in
55e6d9b2 5584 x86_64-*-linux-gnu* | s390x-*-linux-gnu* )
bc5d9888
CY
5585 if test -d /usr/lib64; then
5586
5587cat >>confdefs.h <<\_ACEOF
55e6d9b2 5588#define HAVE_LIB64_DIR 1
bc5d9888
CY
5589_ACEOF
5590
5591fi
5592esac
5593
439f58ee
JD
5594
5595
5596
2c9dccc9
PJ
5597if test "${with_sound}" != "no"; then
5598 # Sound support for GNU/Linux and the free BSDs.
ca81d7a0
JD
5599 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5600echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
c0d27fcc
MR
5601if test "${ac_cv_header_stdc+set}" = set; then
5602 echo $ECHO_N "(cached) $ECHO_C" >&6
5603else
5604 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5605/* confdefs.h. */
5606_ACEOF
5607cat confdefs.h >>conftest.$ac_ext
5608cat >>conftest.$ac_ext <<_ACEOF
5609/* end confdefs.h. */
c0d27fcc
MR
5610#include <stdlib.h>
5611#include <stdarg.h>
5612#include <string.h>
5613#include <float.h>
98418dba 5614
19650fd6
AS
5615int
5616main ()
5617{
5618
5619 ;
5620 return 0;
5621}
c0d27fcc 5622_ACEOF
19650fd6 5623rm -f conftest.$ac_objext
ca81d7a0
JD
5624if { (ac_try="$ac_compile"
5625case "(($ac_try" in
5626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5627 *) ac_try_echo=$ac_try;;
5628esac
5629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5630 (eval "$ac_compile") 2>conftest.er1
cd958eb3 5631 ac_status=$?
edfaf76d
LK
5632 grep -v '^ *+' conftest.er1 >conftest.err
5633 rm -f conftest.er1
5634 cat conftest.err >&5
cd958eb3 5635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5636 (exit $ac_status); } && {
5637 test -z "$ac_c_werror_flag" ||
5638 test ! -s conftest.err
5639 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5640 ac_cv_header_stdc=yes
5641else
5642 echo "$as_me: failed program was:" >&5
19650fd6
AS
5643sed 's/^/| /' conftest.$ac_ext >&5
5644
ca81d7a0 5645 ac_cv_header_stdc=no
c0d27fcc 5646fi
ca81d7a0
JD
5647
5648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc
MR
5649
5650if test $ac_cv_header_stdc = yes; then
5651 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5652 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5653/* confdefs.h. */
5654_ACEOF
5655cat confdefs.h >>conftest.$ac_ext
5656cat >>conftest.$ac_ext <<_ACEOF
5657/* end confdefs.h. */
c0d27fcc
MR
5658#include <string.h>
5659
5660_ACEOF
5661if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5662 $EGREP "memchr" >/dev/null 2>&1; then
c0d27fcc
MR
5663 :
5664else
5665 ac_cv_header_stdc=no
5666fi
5667rm -f conftest*
5668
5669fi
5670
5671if test $ac_cv_header_stdc = yes; then
5672 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5673 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5674/* confdefs.h. */
5675_ACEOF
5676cat confdefs.h >>conftest.$ac_ext
5677cat >>conftest.$ac_ext <<_ACEOF
5678/* end confdefs.h. */
c0d27fcc
MR
5679#include <stdlib.h>
5680
5681_ACEOF
5682if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 5683 $EGREP "free" >/dev/null 2>&1; then
c0d27fcc
MR
5684 :
5685else
5686 ac_cv_header_stdc=no
5687fi
5688rm -f conftest*
5689
5690fi
5691
5692if test $ac_cv_header_stdc = yes; then
5693 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5694 if test "$cross_compiling" = yes; then
5695 :
5696else
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. */
c0d27fcc 5703#include <ctype.h>
ca81d7a0 5704#include <stdlib.h>
c0d27fcc
MR
5705#if ((' ' & 0x0FF) == 0x020)
5706# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5707# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5708#else
19650fd6 5709# define ISLOWER(c) \
edfaf76d
LK
5710 (('a' <= (c) && (c) <= 'i') \
5711 || ('j' <= (c) && (c) <= 'r') \
5712 || ('s' <= (c) && (c) <= 'z'))
c0d27fcc
MR
5713# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5714#endif
5715
5716#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5717int
5718main ()
5719{
5720 int i;
5721 for (i = 0; i < 256; i++)
5722 if (XOR (islower (i), ISLOWER (i))
edfaf76d 5723 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
5724 return 2;
5725 return 0;
c0d27fcc
MR
5726}
5727_ACEOF
5728rm -f conftest$ac_exeext
ca81d7a0
JD
5729if { (ac_try="$ac_link"
5730case "(($ac_try" in
5731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5732 *) ac_try_echo=$ac_try;;
5733esac
5734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5735 (eval "$ac_link") 2>&5
c0d27fcc
MR
5736 ac_status=$?
5737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5738 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
5739 { (case "(($ac_try" in
5740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5741 *) ac_try_echo=$ac_try;;
5742esac
5743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5744 (eval "$ac_try") 2>&5
c0d27fcc
MR
5745 ac_status=$?
5746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5747 (exit $ac_status); }; }; then
5748 :
5749else
5750 echo "$as_me: program exited with status $ac_status" >&5
5751echo "$as_me: failed program was:" >&5
19650fd6
AS
5752sed 's/^/| /' conftest.$ac_ext >&5
5753
c0d27fcc
MR
5754( exit $ac_status )
5755ac_cv_header_stdc=no
5756fi
ca81d7a0 5757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
c0d27fcc 5758fi
ca81d7a0
JD
5759
5760
c0d27fcc
MR
5761fi
5762fi
ca81d7a0
JD
5763{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5764echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
c0d27fcc
MR
5765if test $ac_cv_header_stdc = yes; then
5766
5767cat >>confdefs.h <<\_ACEOF
5768#define STDC_HEADERS 1
5769_ACEOF
5770
5771fi
5772
5773# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
edfaf76d 5784 inttypes.h stdint.h unistd.h
98418dba
CW
5785do
5786as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
5787{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5788echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5789if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 5790 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5791else
925c2f3f 5792 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5793/* confdefs.h. */
5794_ACEOF
5795cat confdefs.h >>conftest.$ac_ext
5796cat >>conftest.$ac_ext <<_ACEOF
5797/* end confdefs.h. */
c0d27fcc
MR
5798$ac_includes_default
5799
5800#include <$ac_header>
5801_ACEOF
5802rm -f conftest.$ac_objext
ca81d7a0
JD
5803if { (ac_try="$ac_compile"
5804case "(($ac_try" in
5805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5806 *) ac_try_echo=$ac_try;;
5807esac
5808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5809 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 5810 ac_status=$?
edfaf76d
LK
5811 grep -v '^ *+' conftest.er1 >conftest.err
5812 rm -f conftest.er1
5813 cat conftest.err >&5
c0d27fcc 5814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5815 (exit $ac_status); } && {
5816 test -z "$ac_c_werror_flag" ||
5817 test ! -s conftest.err
5818 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5819 eval "$as_ac_Header=yes"
5820else
5821 echo "$as_me: failed program was:" >&5
19650fd6
AS
5822sed 's/^/| /' conftest.$ac_ext >&5
5823
ca81d7a0 5824 eval "$as_ac_Header=no"
c0d27fcc 5825fi
ca81d7a0
JD
5826
5827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
c0d27fcc 5828fi
ca81d7a0
JD
5829ac_res=`eval echo '${'$as_ac_Header'}'`
5830 { echo "$as_me:$LINENO: result: $ac_res" >&5
5831echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
5832if test `eval echo '${'$as_ac_Header'}'` = yes; then
5833 cat >>confdefs.h <<_ACEOF
5834#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5835_ACEOF
5836
5837fi
5838
5839done
5840
5841
5842
5843
5844
5845for ac_header in machine/soundcard.h sys/soundcard.h soundcard.h
5846do
5847as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
5848if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5849 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5850echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5851if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
5852 echo $ECHO_N "(cached) $ECHO_C" >&6
5853fi
ca81d7a0
JD
5854ac_res=`eval echo '${'$as_ac_Header'}'`
5855 { echo "$as_me:$LINENO: result: $ac_res" >&5
5856echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
5857else
5858 # Is the header compilable?
ca81d7a0
JD
5859{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5860echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 5861cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5862/* confdefs.h. */
5863_ACEOF
5864cat confdefs.h >>conftest.$ac_ext
5865cat >>conftest.$ac_ext <<_ACEOF
5866/* end confdefs.h. */
c0d27fcc 5867$ac_includes_default
98418dba 5868#include <$ac_header>
503d2be0 5869_ACEOF
c0d27fcc 5870rm -f conftest.$ac_objext
ca81d7a0
JD
5871if { (ac_try="$ac_compile"
5872case "(($ac_try" in
5873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5874 *) ac_try_echo=$ac_try;;
5875esac
5876eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5877 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 5878 ac_status=$?
edfaf76d
LK
5879 grep -v '^ *+' conftest.er1 >conftest.err
5880 rm -f conftest.er1
5881 cat conftest.err >&5
c0d27fcc 5882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5883 (exit $ac_status); } && {
5884 test -z "$ac_c_werror_flag" ||
5885 test ! -s conftest.err
5886 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
5887 ac_header_compiler=yes
5888else
5889 echo "$as_me: failed program was:" >&5
19650fd6
AS
5890sed 's/^/| /' conftest.$ac_ext >&5
5891
ca81d7a0 5892 ac_header_compiler=no
c0d27fcc 5893fi
ca81d7a0
JD
5894
5895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5896{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5897echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
5898
5899# Is the header present?
ca81d7a0
JD
5900{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5901echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 5902cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5903/* confdefs.h. */
5904_ACEOF
5905cat confdefs.h >>conftest.$ac_ext
5906cat >>conftest.$ac_ext <<_ACEOF
5907/* end confdefs.h. */
c0d27fcc
MR
5908#include <$ac_header>
5909_ACEOF
ca81d7a0
JD
5910if { (ac_try="$ac_cpp conftest.$ac_ext"
5911case "(($ac_try" in
5912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5913 *) ac_try_echo=$ac_try;;
5914esac
5915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5916 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 5917 ac_status=$?
6bae0ccf 5918 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
5919 rm -f conftest.er1
5920 cat conftest.err >&5
c0d27fcc 5921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
5922 (exit $ac_status); } >/dev/null && {
5923 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5924 test ! -s conftest.err
5925 }; then
c0d27fcc 5926 ac_header_preproc=yes
f4988be7 5927else
503d2be0 5928 echo "$as_me: failed program was:" >&5
19650fd6
AS
5929sed 's/^/| /' conftest.$ac_ext >&5
5930
c0d27fcc 5931 ac_header_preproc=no
f4988be7 5932fi
ca81d7a0 5933
98418dba 5934rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
5935{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5936echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
5937
5938# So? What about this header?
edfaf76d
LK
5939case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5940 yes:no: )
c0d27fcc
MR
5941 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5942echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
5943 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5944echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
5945 ac_header_preproc=yes
19650fd6 5946 ;;
edfaf76d 5947 no:yes:* )
c0d27fcc
MR
5948 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5949echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
5950 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5951echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5952 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5953echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5954 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5955echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 5956 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 5957echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
5958 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5959echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 5960
19650fd6 5961 ;;
c0d27fcc 5962esac
ca81d7a0
JD
5963{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5964echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5965if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
5966 echo $ECHO_N "(cached) $ECHO_C" >&6
5967else
edfaf76d 5968 eval "$as_ac_Header=\$ac_header_preproc"
f4988be7 5969fi
ca81d7a0
JD
5970ac_res=`eval echo '${'$as_ac_Header'}'`
5971 { echo "$as_me:$LINENO: result: $ac_res" >&5
5972echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
5973
5974fi
98418dba 5975if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 5976 cat >>confdefs.h <<_ACEOF
98418dba 5977#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 5978_ACEOF
f4988be7
GM
5979
5980fi
c0d27fcc 5981
98418dba
CW
5982done
5983
5984 # Emulation library used on NetBSD.
ca81d7a0
JD
5985 { echo "$as_me:$LINENO: checking for _oss_ioctl in -lossaudio" >&5
5986echo $ECHO_N "checking for _oss_ioctl in -lossaudio... $ECHO_C" >&6; }
98418dba 5987if test "${ac_cv_lib_ossaudio__oss_ioctl+set}" = set; then
503d2be0 5988 echo $ECHO_N "(cached) $ECHO_C" >&6
f4988be7 5989else
98418dba
CW
5990 ac_check_lib_save_LIBS=$LIBS
5991LIBS="-lossaudio $LIBS"
5992cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
5993/* confdefs.h. */
5994_ACEOF
5995cat confdefs.h >>conftest.$ac_ext
5996cat >>conftest.$ac_ext <<_ACEOF
5997/* end confdefs.h. */
98418dba 5998
ca81d7a0
JD
5999/* Override any GCC internal prototype to avoid an error.
6000 Use char because int might match the return type of a GCC
6001 builtin and then its argument prototype would still apply. */
98418dba
CW
6002#ifdef __cplusplus
6003extern "C"
f4988be7 6004#endif
98418dba 6005char _oss_ioctl ();
503d2be0
AS
6006int
6007main ()
6008{
ca81d7a0 6009return _oss_ioctl ();
503d2be0
AS
6010 ;
6011 return 0;
6012}
6013_ACEOF
98418dba 6014rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
6015if { (ac_try="$ac_link"
6016case "(($ac_try" in
6017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6018 *) ac_try_echo=$ac_try;;
6019esac
6020eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6021 (eval "$ac_link") 2>conftest.er1
503d2be0 6022 ac_status=$?
edfaf76d
LK
6023 grep -v '^ *+' conftest.er1 >conftest.err
6024 rm -f conftest.er1
6025 cat conftest.err >&5
c0d27fcc 6026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6027 (exit $ac_status); } && {
6028 test -z "$ac_c_werror_flag" ||
6029 test ! -s conftest.err
6030 } && test -s conftest$ac_exeext &&
6031 $as_test_x conftest$ac_exeext; then
98418dba 6032 ac_cv_lib_ossaudio__oss_ioctl=yes
f4988be7 6033else
503d2be0 6034 echo "$as_me: failed program was:" >&5
19650fd6
AS
6035sed 's/^/| /' conftest.$ac_ext >&5
6036
ca81d7a0 6037 ac_cv_lib_ossaudio__oss_ioctl=no
f4988be7 6038fi
ca81d7a0 6039
f053c89f 6040rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 6041 conftest$ac_exeext conftest.$ac_ext
98418dba 6042LIBS=$ac_check_lib_save_LIBS
f4988be7 6043fi
ca81d7a0
JD
6044{ echo "$as_me:$LINENO: result: $ac_cv_lib_ossaudio__oss_ioctl" >&5
6045echo "${ECHO_T}$ac_cv_lib_ossaudio__oss_ioctl" >&6; }
98418dba
CW
6046if test $ac_cv_lib_ossaudio__oss_ioctl = yes; then
6047 LIBSOUND=-lossaudio
6048else
6049 LIBSOUND=
6050fi
6051
c0d27fcc 6052
439f58ee
JD
6053
6054 ALSA_REQUIRED=1.0.0
6055 ALSA_MODULES="alsa >= $ALSA_REQUIRED"
439f58ee
JD
6056
6057 succeeded=no
6058
00b9c927 6059 # Extract the first word of "pkg-config", so it can be a program name with args.
439f58ee 6060set dummy pkg-config; ac_word=$2
ca81d7a0
JD
6061{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6062echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
439f58ee
JD
6063if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6064 echo $ECHO_N "(cached) $ECHO_C" >&6
6065else
6066 case $PKG_CONFIG in
6067 [\\/]* | ?:[\\/]*)
6068 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6069 ;;
6070 *)
6071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6072for as_dir in $PATH
6073do
6074 IFS=$as_save_IFS
6075 test -z "$as_dir" && as_dir=.
6076 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 6077 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
439f58ee
JD
6078 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6079 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6080 break 2
6081 fi
6082done
6083done
ca81d7a0 6084IFS=$as_save_IFS
439f58ee
JD
6085
6086 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
6087 ;;
6088esac
6089fi
6090PKG_CONFIG=$ac_cv_path_PKG_CONFIG
439f58ee 6091if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
6092 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
6093echo "${ECHO_T}$PKG_CONFIG" >&6; }
439f58ee 6094else
ca81d7a0
JD
6095 { echo "$as_me:$LINENO: result: no" >&5
6096echo "${ECHO_T}no" >&6; }
439f58ee
JD
6097fi
6098
ca81d7a0 6099
439f58ee
JD
6100
6101 if test "$PKG_CONFIG" = "no" ; then
6102 HAVE_ALSA=no
6103 else
6104 PKG_CONFIG_MIN_VERSION=0.9.0
6105 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
6106 { echo "$as_me:$LINENO: checking for $ALSA_MODULES" >&5
6107echo $ECHO_N "checking for $ALSA_MODULES... $ECHO_C" >&6; }
439f58ee 6108
67db6aa2 6109 if $PKG_CONFIG --exists "$ALSA_MODULES" 2>&5; then
ca81d7a0
JD
6110 { echo "$as_me:$LINENO: result: yes" >&5
6111echo "${ECHO_T}yes" >&6; }
439f58ee
JD
6112 succeeded=yes
6113
ca81d7a0
JD
6114 { echo "$as_me:$LINENO: checking ALSA_CFLAGS" >&5
6115echo $ECHO_N "checking ALSA_CFLAGS... $ECHO_C" >&6; }
94315858 6116 ALSA_CFLAGS=`$PKG_CONFIG --cflags "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6117 { echo "$as_me:$LINENO: result: $ALSA_CFLAGS" >&5
6118echo "${ECHO_T}$ALSA_CFLAGS" >&6; }
439f58ee 6119
ca81d7a0
JD
6120 { echo "$as_me:$LINENO: checking ALSA_LIBS" >&5
6121echo $ECHO_N "checking ALSA_LIBS... $ECHO_C" >&6; }
94315858 6122 ALSA_LIBS=`$PKG_CONFIG --libs "$ALSA_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
6123 { echo "$as_me:$LINENO: result: $ALSA_LIBS" >&5
6124echo "${ECHO_T}$ALSA_LIBS" >&6; }
439f58ee 6125 else
ca81d7a0
JD
6126 { echo "$as_me:$LINENO: result: no" >&5
6127echo "${ECHO_T}no" >&6; }
439f58ee
JD
6128 ALSA_CFLAGS=""
6129 ALSA_LIBS=""
6130 ## If we have a custom action on failure, don't print errors, but
6131 ## do set a variable so people can do so.
6132 ALSA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$ALSA_MODULES"`
6133
6134 fi
6135
6136
6137
6138 else
6139 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
6140 echo "*** See http://www.freedesktop.org/software/pkgconfig"
6141 fi
6142 fi
6143
6144 if test $succeeded = yes; then
6145 HAVE_ALSA=yes
6146 else
6147 HAVE_ALSA=no
6148 fi
6149
6150 if test $HAVE_ALSA = yes; then
ca81d7a0
JD
6151 SAVE_CFLAGS="$CFLAGS"
6152 SAVE_LDFLAGS="$LDFLAGS"
6153 CFLAGS="$ALSA_CFLAGS $CFLAGS"
6154 LDFLAGS="$ALSA_LIBS $LDFLAGS"
6155 cat >conftest.$ac_ext <<_ACEOF
6156/* confdefs.h. */
6157_ACEOF
6158cat confdefs.h >>conftest.$ac_ext
6159cat >>conftest.$ac_ext <<_ACEOF
6160/* end confdefs.h. */
6161#include <asoundlib.h>
6162int
6163main ()
6164{
6165snd_lib_error_set_handler (0);
6166 ;
6167 return 0;
6168}
6169_ACEOF
6170rm -f conftest.$ac_objext
6171if { (ac_try="$ac_compile"
6172case "(($ac_try" in
6173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6174 *) ac_try_echo=$ac_try;;
6175esac
6176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6177 (eval "$ac_compile") 2>conftest.er1
6178 ac_status=$?
6179 grep -v '^ *+' conftest.er1 >conftest.err
6180 rm -f conftest.er1
6181 cat conftest.err >&5
6182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6183 (exit $ac_status); } && {
6184 test -z "$ac_c_werror_flag" ||
6185 test ! -s conftest.err
6186 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6187 emacs_alsa_normal=yes
6188else
6189 echo "$as_me: failed program was:" >&5
6190sed 's/^/| /' conftest.$ac_ext >&5
6191
6192 emacs_alsa_normal=no
6193fi
6194
6195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6196 if test "$emacs_alsa_normal" != yes; then
6197 cat >conftest.$ac_ext <<_ACEOF
6198/* confdefs.h. */
6199_ACEOF
6200cat confdefs.h >>conftest.$ac_ext
6201cat >>conftest.$ac_ext <<_ACEOF
6202/* end confdefs.h. */
6203#include <alsa/asoundlib.h>
6204int
6205main ()
6206{
6207snd_lib_error_set_handler (0);
6208 ;
6209 return 0;
6210}
6211_ACEOF
6212rm -f conftest.$ac_objext
6213if { (ac_try="$ac_compile"
6214case "(($ac_try" in
6215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6216 *) ac_try_echo=$ac_try;;
6217esac
6218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6219 (eval "$ac_compile") 2>conftest.er1
6220 ac_status=$?
6221 grep -v '^ *+' conftest.er1 >conftest.err
6222 rm -f conftest.er1
6223 cat conftest.err >&5
6224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6225 (exit $ac_status); } && {
6226 test -z "$ac_c_werror_flag" ||
6227 test ! -s conftest.err
6228 } && test -s conftest.$ac_objext; then
ca81d7a0
JD
6229 emacs_alsa_subdir=yes
6230else
6231 echo "$as_me: failed program was:" >&5
6232sed 's/^/| /' conftest.$ac_ext >&5
6233
6234 emacs_alsa_subdir=no
6235fi
6236
6237rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6238 if test "$emacs_alsa_subdir" != yes; then
6239 { { echo "$as_me:$LINENO: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&5
6240echo "$as_me: error: pkg-config found alsa, but it does not compile. See config.log for error messages." >&2;}
6241 { (exit 1); exit 1; }; }
6242 fi
6243 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
6244 fi
6245
6246 CFLAGS="$SAVE_CFLAGS"
6247 LDFLAGS="$SAVE_LDFLAGS"
439f58ee
JD
6248 LIBSOUND="$LIBSOUND $ALSA_LIBS"
6249 CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
6250
6251cat >>confdefs.h <<\_ACEOF
6252#define HAVE_ALSA 1
6253_ACEOF
6254
6255 fi
6256
f4988be7 6257fi
c0d27fcc
MR
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
22044edf
DL
6276
6277
973a76b1 6278
cffcede7 6279
551ffc27 6280
226e2359 6281
c0d27fcc 6282
f4988be7 6283
98418dba
CW
6284for ac_header in sys/select.h sys/timeb.h sys/time.h unistd.h utime.h \
6285 linux/version.h sys/systeminfo.h termios.h limits.h string.h stdlib.h \
25ca0bca 6286 termcap.h stdio_ext.h fcntl.h strings.h coff.h pty.h sys/mman.h \
551ffc27 6287 sys/param.h sys/vlimit.h sys/resource.h locale.h sys/_mbstate_t.h \
226e2359 6288 sys/utsname.h pwd.h
98418dba
CW
6289do
6290as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6291if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6292 { echo "$as_me:$LINENO: checking for $ac_header" >&5
6293echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6294if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 6295 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 6296fi
ca81d7a0
JD
6297ac_res=`eval echo '${'$as_ac_Header'}'`
6298 { echo "$as_me:$LINENO: result: $ac_res" >&5
6299echo "${ECHO_T}$ac_res" >&6; }
f4988be7 6300else
c0d27fcc 6301 # Is the header compilable?
ca81d7a0
JD
6302{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6303echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 6304cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6305/* confdefs.h. */
6306_ACEOF
6307cat confdefs.h >>conftest.$ac_ext
6308cat >>conftest.$ac_ext <<_ACEOF
6309/* end confdefs.h. */
c0d27fcc
MR
6310$ac_includes_default
6311#include <$ac_header>
6312_ACEOF
6313rm -f conftest.$ac_objext
ca81d7a0
JD
6314if { (ac_try="$ac_compile"
6315case "(($ac_try" in
6316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6317 *) ac_try_echo=$ac_try;;
6318esac
6319eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6320 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 6321 ac_status=$?
edfaf76d
LK
6322 grep -v '^ *+' conftest.er1 >conftest.err
6323 rm -f conftest.er1
6324 cat conftest.err >&5
c0d27fcc 6325 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6326 (exit $ac_status); } && {
6327 test -z "$ac_c_werror_flag" ||
6328 test ! -s conftest.err
6329 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
6330 ac_header_compiler=yes
6331else
6332 echo "$as_me: failed program was:" >&5
19650fd6
AS
6333sed 's/^/| /' conftest.$ac_ext >&5
6334
ca81d7a0 6335 ac_header_compiler=no
c0d27fcc 6336fi
ca81d7a0
JD
6337
6338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6339{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6340echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
6341
6342# Is the header present?
ca81d7a0
JD
6343{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6344echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 6345cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6346/* confdefs.h. */
6347_ACEOF
6348cat confdefs.h >>conftest.$ac_ext
6349cat >>conftest.$ac_ext <<_ACEOF
6350/* end confdefs.h. */
98418dba 6351#include <$ac_header>
503d2be0 6352_ACEOF
ca81d7a0
JD
6353if { (ac_try="$ac_cpp conftest.$ac_ext"
6354case "(($ac_try" in
6355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6356 *) ac_try_echo=$ac_try;;
6357esac
6358eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6359 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 6360 ac_status=$?
6bae0ccf 6361 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
6362 rm -f conftest.er1
6363 cat conftest.err >&5
c0d27fcc 6364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6365 (exit $ac_status); } >/dev/null && {
6366 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6367 test ! -s conftest.err
6368 }; then
c0d27fcc 6369 ac_header_preproc=yes
34ec9ebe 6370else
503d2be0 6371 echo "$as_me: failed program was:" >&5
19650fd6
AS
6372sed 's/^/| /' conftest.$ac_ext >&5
6373
c0d27fcc 6374 ac_header_preproc=no
34ec9ebe 6375fi
ca81d7a0 6376
98418dba 6377rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
6378{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6379echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
6380
6381# So? What about this header?
edfaf76d
LK
6382case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6383 yes:no: )
c0d27fcc
MR
6384 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6385echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
6386 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6387echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6388 ac_header_preproc=yes
19650fd6 6389 ;;
edfaf76d 6390 no:yes:* )
c0d27fcc
MR
6391 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6392echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
6393 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6394echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6395 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6396echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6397 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6398echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 6399 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 6400echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
6401 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6402echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 6403
19650fd6 6404 ;;
c0d27fcc 6405esac
ca81d7a0
JD
6406{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6407echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6408if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
6409 echo $ECHO_N "(cached) $ECHO_C" >&6
6410else
edfaf76d 6411 eval "$as_ac_Header=\$ac_header_preproc"
34ec9ebe 6412fi
ca81d7a0
JD
6413ac_res=`eval echo '${'$as_ac_Header'}'`
6414 { echo "$as_me:$LINENO: result: $ac_res" >&5
6415echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
6416
6417fi
98418dba 6418if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 6419 cat >>confdefs.h <<_ACEOF
98418dba 6420#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 6421_ACEOF
34ec9ebe 6422
98418dba 6423fi
c0d27fcc 6424
98418dba
CW
6425done
6426
22044edf 6427
ca81d7a0
JD
6428{ echo "$as_me:$LINENO: checking if personality LINUX32 can be set" >&5
6429echo $ECHO_N "checking if personality LINUX32 can be set... $ECHO_C" >&6; }
f17e308a
JD
6430cat >conftest.$ac_ext <<_ACEOF
6431/* confdefs.h. */
6432_ACEOF
6433cat confdefs.h >>conftest.$ac_ext
6434cat >>conftest.$ac_ext <<_ACEOF
6435/* end confdefs.h. */
6436#include <sys/personality.h>
6437int
6438main ()
6439{
6440personality (PER_LINUX32)
6441 ;
6442 return 0;
6443}
6444_ACEOF
6445rm -f conftest.$ac_objext
ca81d7a0
JD
6446if { (ac_try="$ac_compile"
6447case "(($ac_try" in
6448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6449 *) ac_try_echo=$ac_try;;
6450esac
6451eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6452 (eval "$ac_compile") 2>conftest.er1
f17e308a 6453 ac_status=$?
edfaf76d
LK
6454 grep -v '^ *+' conftest.er1 >conftest.err
6455 rm -f conftest.er1
6456 cat conftest.err >&5
f17e308a 6457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6458 (exit $ac_status); } && {
6459 test -z "$ac_c_werror_flag" ||
6460 test ! -s conftest.err
6461 } && test -s conftest.$ac_objext; then
f17e308a
JD
6462 emacs_cv_personality_linux32=yes
6463else
6464 echo "$as_me: failed program was:" >&5
6465sed 's/^/| /' conftest.$ac_ext >&5
6466
ca81d7a0 6467 emacs_cv_personality_linux32=no
f17e308a 6468fi
ca81d7a0
JD
6469
6470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6471{ echo "$as_me:$LINENO: result: $emacs_cv_personality_linux32" >&5
6472echo "${ECHO_T}$emacs_cv_personality_linux32" >&6; }
f17e308a
JD
6473
6474if test $emacs_cv_personality_linux32 = yes; then
6475
6476cat >>confdefs.h <<\_ACEOF
6477#define HAVE_PERSONALITY_LINUX32 1
6478_ACEOF
6479
6480fi
6481
6482
22044edf
DL
6483for ac_header in term.h
6484do
6485as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
6486{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6487echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6488if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22044edf
DL
6489 echo $ECHO_N "(cached) $ECHO_C" >&6
6490else
6491 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6492/* confdefs.h. */
6493_ACEOF
6494cat confdefs.h >>conftest.$ac_ext
6495cat >>conftest.$ac_ext <<_ACEOF
6496/* end confdefs.h. */
22044edf
DL
6497#include <$ac_header>
6498_ACEOF
ca81d7a0
JD
6499if { (ac_try="$ac_cpp conftest.$ac_ext"
6500case "(($ac_try" in
6501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6502 *) ac_try_echo=$ac_try;;
6503esac
6504eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6505 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
22044edf
DL
6506 ac_status=$?
6507 grep -v '^ *+' conftest.er1 >conftest.err
6508 rm -f conftest.er1
6509 cat conftest.err >&5
6510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6511 (exit $ac_status); } >/dev/null && {
6512 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6513 test ! -s conftest.err
6514 }; then
22044edf
DL
6515 eval "$as_ac_Header=yes"
6516else
6517 echo "$as_me: failed program was:" >&5
19650fd6
AS
6518sed 's/^/| /' conftest.$ac_ext >&5
6519
22044edf
DL
6520 eval "$as_ac_Header=no"
6521fi
ca81d7a0 6522
22044edf
DL
6523rm -f conftest.err conftest.$ac_ext
6524fi
ca81d7a0
JD
6525ac_res=`eval echo '${'$as_ac_Header'}'`
6526 { echo "$as_me:$LINENO: result: $ac_res" >&5
6527echo "${ECHO_T}$ac_res" >&6; }
22044edf
DL
6528if test `eval echo '${'$as_ac_Header'}'` = yes; then
6529 cat >>confdefs.h <<_ACEOF
6530#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6531_ACEOF
6532
6533fi
6534
6535done
6536
ca81d7a0
JD
6537{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
6538echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
98418dba 6539if test "${ac_cv_header_stdc+set}" = set; then
503d2be0 6540 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6541else
503d2be0 6542 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6543/* confdefs.h. */
6544_ACEOF
6545cat confdefs.h >>conftest.$ac_ext
6546cat >>conftest.$ac_ext <<_ACEOF
6547/* end confdefs.h. */
98418dba
CW
6548#include <stdlib.h>
6549#include <stdarg.h>
6550#include <string.h>
6551#include <float.h>
6552
19650fd6
AS
6553int
6554main ()
6555{
6556
6557 ;
6558 return 0;
6559}
98418dba 6560_ACEOF
19650fd6 6561rm -f conftest.$ac_objext
ca81d7a0
JD
6562if { (ac_try="$ac_compile"
6563case "(($ac_try" in
6564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6565 *) ac_try_echo=$ac_try;;
6566esac
6567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6568 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6569 ac_status=$?
edfaf76d
LK
6570 grep -v '^ *+' conftest.er1 >conftest.err
6571 rm -f conftest.er1
6572 cat conftest.err >&5
cd958eb3 6573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6574 (exit $ac_status); } && {
6575 test -z "$ac_c_werror_flag" ||
6576 test ! -s conftest.err
6577 } && test -s conftest.$ac_objext; then
98418dba 6578 ac_cv_header_stdc=yes
ba4481b5 6579else
503d2be0 6580 echo "$as_me: failed program was:" >&5
19650fd6
AS
6581sed 's/^/| /' conftest.$ac_ext >&5
6582
ca81d7a0 6583 ac_cv_header_stdc=no
ba4481b5 6584fi
ca81d7a0
JD
6585
6586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba
CW
6587
6588if test $ac_cv_header_stdc = yes; then
6589 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6590 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6591/* confdefs.h. */
6592_ACEOF
6593cat confdefs.h >>conftest.$ac_ext
6594cat >>conftest.$ac_ext <<_ACEOF
6595/* end confdefs.h. */
98418dba
CW
6596#include <string.h>
6597
6598_ACEOF
6599if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6600 $EGREP "memchr" >/dev/null 2>&1; then
98418dba
CW
6601 :
6602else
6603 ac_cv_header_stdc=no
ba4481b5 6604fi
98418dba 6605rm -f conftest*
ba4481b5
DL
6606
6607fi
6608
98418dba
CW
6609if test $ac_cv_header_stdc = yes; then
6610 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6611 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6612/* confdefs.h. */
6613_ACEOF
6614cat confdefs.h >>conftest.$ac_ext
6615cat >>conftest.$ac_ext <<_ACEOF
6616/* end confdefs.h. */
98418dba
CW
6617#include <stdlib.h>
6618
6619_ACEOF
6620if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 6621 $EGREP "free" >/dev/null 2>&1; then
98418dba
CW
6622 :
6623else
6624 ac_cv_header_stdc=no
6625fi
6626rm -f conftest*
6627
6628fi
6629
6630if test $ac_cv_header_stdc = yes; then
6631 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6632 if test "$cross_compiling" = yes; then
6633 :
d42122a3 6634else
503d2be0 6635 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6636/* confdefs.h. */
6637_ACEOF
6638cat confdefs.h >>conftest.$ac_ext
6639cat >>conftest.$ac_ext <<_ACEOF
6640/* end confdefs.h. */
98418dba 6641#include <ctype.h>
ca81d7a0 6642#include <stdlib.h>
98418dba
CW
6643#if ((' ' & 0x0FF) == 0x020)
6644# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6645# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6646#else
19650fd6 6647# define ISLOWER(c) \
edfaf76d
LK
6648 (('a' <= (c) && (c) <= 'i') \
6649 || ('j' <= (c) && (c) <= 'r') \
6650 || ('s' <= (c) && (c) <= 'z'))
98418dba
CW
6651# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6652#endif
6653
6654#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
503d2be0
AS
6655int
6656main ()
6657{
98418dba
CW
6658 int i;
6659 for (i = 0; i < 256; i++)
6660 if (XOR (islower (i), ISLOWER (i))
edfaf76d 6661 || toupper (i) != TOUPPER (i))
ca81d7a0
JD
6662 return 2;
6663 return 0;
503d2be0
AS
6664}
6665_ACEOF
98418dba 6666rm -f conftest$ac_exeext
ca81d7a0
JD
6667if { (ac_try="$ac_link"
6668case "(($ac_try" in
6669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6670 *) ac_try_echo=$ac_try;;
6671esac
6672eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6673 (eval "$ac_link") 2>&5
503d2be0 6674 ac_status=$?
c0d27fcc 6675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 6676 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
6677 { (case "(($ac_try" in
6678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6679 *) ac_try_echo=$ac_try;;
6680esac
6681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6682 (eval "$ac_try") 2>&5
503d2be0 6683 ac_status=$?
c0d27fcc 6684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 6685 (exit $ac_status); }; }; then
98418dba 6686 :
d42122a3 6687else
98418dba
CW
6688 echo "$as_me: program exited with status $ac_status" >&5
6689echo "$as_me: failed program was:" >&5
19650fd6
AS
6690sed 's/^/| /' conftest.$ac_ext >&5
6691
c0d27fcc 6692( exit $ac_status )
98418dba 6693ac_cv_header_stdc=no
d42122a3 6694fi
ca81d7a0 6695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
d42122a3 6696fi
ca81d7a0
JD
6697
6698
98418dba
CW
6699fi
6700fi
ca81d7a0
JD
6701{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6702echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
98418dba
CW
6703if test $ac_cv_header_stdc = yes; then
6704
c0d27fcc 6705cat >>confdefs.h <<\_ACEOF
98418dba 6706#define STDC_HEADERS 1
c0d27fcc 6707_ACEOF
d42122a3
DL
6708
6709fi
6710
ca81d7a0
JD
6711{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
6712echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; }
98418dba 6713if test "${ac_cv_header_time+set}" = set; then
503d2be0 6714 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6715else
503d2be0 6716 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6717/* confdefs.h. */
6718_ACEOF
6719cat confdefs.h >>conftest.$ac_ext
6720cat >>conftest.$ac_ext <<_ACEOF
6721/* end confdefs.h. */
ba4481b5 6722#include <sys/types.h>
98418dba 6723#include <sys/time.h>
ba4481b5 6724#include <time.h>
503d2be0
AS
6725
6726int
6727main ()
6728{
98418dba
CW
6729if ((struct tm *) 0)
6730return 0;
503d2be0
AS
6731 ;
6732 return 0;
6733}
6734_ACEOF
6735rm -f conftest.$ac_objext
ca81d7a0
JD
6736if { (ac_try="$ac_compile"
6737case "(($ac_try" in
6738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6739 *) ac_try_echo=$ac_try;;
6740esac
6741eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6742 (eval "$ac_compile") 2>conftest.er1
503d2be0 6743 ac_status=$?
edfaf76d
LK
6744 grep -v '^ *+' conftest.er1 >conftest.err
6745 rm -f conftest.er1
6746 cat conftest.err >&5
c0d27fcc 6747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6748 (exit $ac_status); } && {
6749 test -z "$ac_c_werror_flag" ||
6750 test ! -s conftest.err
6751 } && test -s conftest.$ac_objext; then
98418dba 6752 ac_cv_header_time=yes
ba4481b5 6753else
503d2be0 6754 echo "$as_me: failed program was:" >&5
19650fd6
AS
6755sed 's/^/| /' conftest.$ac_ext >&5
6756
ca81d7a0 6757 ac_cv_header_time=no
ba4481b5 6758fi
ca81d7a0
JD
6759
6760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6761fi
ca81d7a0
JD
6762{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
6763echo "${ECHO_T}$ac_cv_header_time" >&6; }
98418dba 6764if test $ac_cv_header_time = yes; then
503d2be0 6765
c0d27fcc 6766cat >>confdefs.h <<\_ACEOF
98418dba 6767#define TIME_WITH_SYS_TIME 1
c0d27fcc 6768_ACEOF
ba4481b5
DL
6769
6770fi
6771
ca81d7a0
JD
6772{ echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
6773echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3 6774if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
503d2be0 6775 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6776else
503d2be0 6777 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6778/* confdefs.h. */
6779_ACEOF
6780cat confdefs.h >>conftest.$ac_ext
6781cat >>conftest.$ac_ext <<_ACEOF
6782/* end confdefs.h. */
cd958eb3
MB
6783$ac_includes_default
6784int
6785main ()
6786{
6787#ifndef sys_siglist
f053c89f 6788 (void) sys_siglist;
98418dba 6789#endif
503d2be0 6790
cd958eb3
MB
6791 ;
6792 return 0;
6793}
6794_ACEOF
6795rm -f conftest.$ac_objext
ca81d7a0
JD
6796if { (ac_try="$ac_compile"
6797case "(($ac_try" in
6798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6799 *) ac_try_echo=$ac_try;;
6800esac
6801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6802 (eval "$ac_compile") 2>conftest.er1
cd958eb3 6803 ac_status=$?
edfaf76d
LK
6804 grep -v '^ *+' conftest.er1 >conftest.err
6805 rm -f conftest.er1
6806 cat conftest.err >&5
cd958eb3 6807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6808 (exit $ac_status); } && {
6809 test -z "$ac_c_werror_flag" ||
6810 test ! -s conftest.err
6811 } && test -s conftest.$ac_objext; then
cd958eb3
MB
6812 ac_cv_have_decl_sys_siglist=yes
6813else
6814 echo "$as_me: failed program was:" >&5
19650fd6
AS
6815sed 's/^/| /' conftest.$ac_ext >&5
6816
ca81d7a0 6817 ac_cv_have_decl_sys_siglist=no
cd958eb3 6818fi
ca81d7a0
JD
6819
6820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3 6821fi
ca81d7a0
JD
6822{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
6823echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6; }
cd958eb3
MB
6824if test $ac_cv_have_decl_sys_siglist = yes; then
6825
6826cat >>confdefs.h <<_ACEOF
6827#define HAVE_DECL_SYS_SIGLIST 1
6828_ACEOF
6829
6830
6831else
6832 cat >>confdefs.h <<_ACEOF
6833#define HAVE_DECL_SYS_SIGLIST 0
6834_ACEOF
6835
6836
6837fi
6838
6839
6840if test $ac_cv_have_decl_sys_siglist != yes; then
6841 # For Tru64, at least:
ca81d7a0
JD
6842 { echo "$as_me:$LINENO: checking whether __sys_siglist is declared" >&5
6843echo $ECHO_N "checking whether __sys_siglist is declared... $ECHO_C" >&6; }
cd958eb3
MB
6844if test "${ac_cv_have_decl___sys_siglist+set}" = set; then
6845 echo $ECHO_N "(cached) $ECHO_C" >&6
6846else
6847 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6848/* confdefs.h. */
6849_ACEOF
6850cat confdefs.h >>conftest.$ac_ext
6851cat >>conftest.$ac_ext <<_ACEOF
6852/* end confdefs.h. */
cd958eb3 6853$ac_includes_default
503d2be0
AS
6854int
6855main ()
6856{
cd958eb3 6857#ifndef __sys_siglist
f053c89f 6858 (void) __sys_siglist;
cd958eb3
MB
6859#endif
6860
503d2be0
AS
6861 ;
6862 return 0;
6863}
6864_ACEOF
6865rm -f conftest.$ac_objext
ca81d7a0
JD
6866if { (ac_try="$ac_compile"
6867case "(($ac_try" in
6868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6869 *) ac_try_echo=$ac_try;;
6870esac
6871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6872 (eval "$ac_compile") 2>conftest.er1
503d2be0 6873 ac_status=$?
edfaf76d
LK
6874 grep -v '^ *+' conftest.er1 >conftest.err
6875 rm -f conftest.er1
6876 cat conftest.err >&5
c0d27fcc 6877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6878 (exit $ac_status); } && {
6879 test -z "$ac_c_werror_flag" ||
6880 test ! -s conftest.err
6881 } && test -s conftest.$ac_objext; then
cd958eb3 6882 ac_cv_have_decl___sys_siglist=yes
ba4481b5 6883else
503d2be0 6884 echo "$as_me: failed program was:" >&5
19650fd6
AS
6885sed 's/^/| /' conftest.$ac_ext >&5
6886
ca81d7a0 6887 ac_cv_have_decl___sys_siglist=no
ba4481b5 6888fi
ca81d7a0
JD
6889
6890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
503d2be0 6891fi
ca81d7a0
JD
6892{ echo "$as_me:$LINENO: result: $ac_cv_have_decl___sys_siglist" >&5
6893echo "${ECHO_T}$ac_cv_have_decl___sys_siglist" >&6; }
cd958eb3 6894if test $ac_cv_have_decl___sys_siglist = yes; then
503d2be0 6895
cd958eb3
MB
6896cat >>confdefs.h <<_ACEOF
6897#define HAVE_DECL___SYS_SIGLIST 1
6898_ACEOF
6899
6900
6901else
6902 cat >>confdefs.h <<_ACEOF
6903#define HAVE_DECL___SYS_SIGLIST 0
c0d27fcc 6904_ACEOF
503d2be0 6905
cd958eb3 6906
ba4481b5
DL
6907fi
6908
cd958eb3
MB
6909
6910 if test $ac_cv_have_decl___sys_siglist = yes; then
6911
6912cat >>confdefs.h <<\_ACEOF
6913#define sys_siglist __sys_siglist
6914_ACEOF
6915
6916 fi
6917fi
ca81d7a0
JD
6918{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
6919echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; }
98418dba 6920if test "${ac_cv_header_sys_wait_h+set}" = set; then
503d2be0 6921 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 6922else
503d2be0 6923 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6924/* confdefs.h. */
6925_ACEOF
6926cat confdefs.h >>conftest.$ac_ext
6927cat >>conftest.$ac_ext <<_ACEOF
6928/* end confdefs.h. */
98418dba
CW
6929#include <sys/types.h>
6930#include <sys/wait.h>
6931#ifndef WEXITSTATUS
ca81d7a0 6932# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
98418dba
CW
6933#endif
6934#ifndef WIFEXITED
6935# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
ba4481b5 6936#endif
503d2be0
AS
6937
6938int
6939main ()
6940{
98418dba
CW
6941 int s;
6942 wait (&s);
6943 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
503d2be0
AS
6944 ;
6945 return 0;
6946}
6947_ACEOF
98418dba 6948rm -f conftest.$ac_objext
ca81d7a0
JD
6949if { (ac_try="$ac_compile"
6950case "(($ac_try" in
6951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6952 *) ac_try_echo=$ac_try;;
6953esac
6954eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6955 (eval "$ac_compile") 2>conftest.er1
503d2be0 6956 ac_status=$?
edfaf76d
LK
6957 grep -v '^ *+' conftest.er1 >conftest.err
6958 rm -f conftest.er1
6959 cat conftest.err >&5
c0d27fcc 6960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
6961 (exit $ac_status); } && {
6962 test -z "$ac_c_werror_flag" ||
6963 test ! -s conftest.err
6964 } && test -s conftest.$ac_objext; then
98418dba 6965 ac_cv_header_sys_wait_h=yes
ba4481b5 6966else
503d2be0 6967 echo "$as_me: failed program was:" >&5
19650fd6
AS
6968sed 's/^/| /' conftest.$ac_ext >&5
6969
ca81d7a0 6970 ac_cv_header_sys_wait_h=no
ba4481b5 6971fi
ca81d7a0
JD
6972
6973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 6974fi
ca81d7a0
JD
6975{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
6976echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; }
98418dba 6977if test $ac_cv_header_sys_wait_h = yes; then
503d2be0 6978
c0d27fcc 6979cat >>confdefs.h <<\_ACEOF
98418dba 6980#define HAVE_SYS_WAIT_H 1
c0d27fcc 6981_ACEOF
ba4481b5 6982
ba4481b5
DL
6983fi
6984
c0d27fcc 6985
ca81d7a0
JD
6986{ echo "$as_me:$LINENO: checking for struct utimbuf" >&5
6987echo $ECHO_N "checking for struct utimbuf... $ECHO_C" >&6; }
98418dba 6988if test "${emacs_cv_struct_utimbuf+set}" = set; then
503d2be0 6989 echo $ECHO_N "(cached) $ECHO_C" >&6
1113b624 6990else
503d2be0 6991 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
6992/* confdefs.h. */
6993_ACEOF
6994cat confdefs.h >>conftest.$ac_ext
6995cat >>conftest.$ac_ext <<_ACEOF
6996/* end confdefs.h. */
98418dba
CW
6997#ifdef TIME_WITH_SYS_TIME
6998#include <sys/time.h>
6999#include <time.h>
7000#else
7001#ifdef HAVE_SYS_TIME_H
7002#include <sys/time.h>
7003#else
1113b624 7004#include <time.h>
98418dba
CW
7005#endif
7006#endif
7007#ifdef HAVE_UTIME_H
7008#include <utime.h>
7009#endif
503d2be0
AS
7010int
7011main ()
7012{
98418dba 7013static struct utimbuf x; x.actime = x.modtime;
503d2be0
AS
7014 ;
7015 return 0;
7016}
7017_ACEOF
98418dba 7018rm -f conftest.$ac_objext
ca81d7a0
JD
7019if { (ac_try="$ac_compile"
7020case "(($ac_try" in
7021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7022 *) ac_try_echo=$ac_try;;
7023esac
7024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7025 (eval "$ac_compile") 2>conftest.er1
503d2be0 7026 ac_status=$?
edfaf76d
LK
7027 grep -v '^ *+' conftest.er1 >conftest.err
7028 rm -f conftest.er1
7029 cat conftest.err >&5
c0d27fcc 7030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7031 (exit $ac_status); } && {
7032 test -z "$ac_c_werror_flag" ||
7033 test ! -s conftest.err
7034 } && test -s conftest.$ac_objext; then
98418dba 7035 emacs_cv_struct_utimbuf=yes
1113b624 7036else
503d2be0 7037 echo "$as_me: failed program was:" >&5
19650fd6
AS
7038sed 's/^/| /' conftest.$ac_ext >&5
7039
ca81d7a0 7040 emacs_cv_struct_utimbuf=no
1113b624 7041fi
ca81d7a0
JD
7042
7043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1113b624 7044fi
ca81d7a0
JD
7045{ echo "$as_me:$LINENO: result: $emacs_cv_struct_utimbuf" >&5
7046echo "${ECHO_T}$emacs_cv_struct_utimbuf" >&6; }
98418dba 7047if test $emacs_cv_struct_utimbuf = yes; then
b936fae4 7048
c0d27fcc 7049cat >>confdefs.h <<\_ACEOF
98418dba 7050#define HAVE_STRUCT_UTIMBUF 1
c0d27fcc 7051_ACEOF
1113b624
PE
7052
7053fi
ba4481b5 7054
ca81d7a0
JD
7055{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7056echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
98418dba 7057if test "${ac_cv_type_signal+set}" = set; then
503d2be0 7058 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7059else
98418dba 7060 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7061/* confdefs.h. */
7062_ACEOF
7063cat confdefs.h >>conftest.$ac_ext
7064cat >>conftest.$ac_ext <<_ACEOF
7065/* end confdefs.h. */
7397acc4 7066#include <sys/types.h>
98418dba 7067#include <signal.h>
98418dba 7068
503d2be0
AS
7069int
7070main ()
7071{
ca81d7a0 7072return *(signal (0, 0)) (0) == 1;
503d2be0
AS
7073 ;
7074 return 0;
7075}
7076_ACEOF
98418dba 7077rm -f conftest.$ac_objext
ca81d7a0
JD
7078if { (ac_try="$ac_compile"
7079case "(($ac_try" in
7080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7081 *) ac_try_echo=$ac_try;;
7082esac
7083eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7084 (eval "$ac_compile") 2>conftest.er1
503d2be0 7085 ac_status=$?
edfaf76d
LK
7086 grep -v '^ *+' conftest.er1 >conftest.err
7087 rm -f conftest.er1
7088 cat conftest.err >&5
c0d27fcc 7089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7090 (exit $ac_status); } && {
7091 test -z "$ac_c_werror_flag" ||
7092 test ! -s conftest.err
7093 } && test -s conftest.$ac_objext; then
ca81d7a0 7094 ac_cv_type_signal=int
503d2be0
AS
7095else
7096 echo "$as_me: failed program was:" >&5
19650fd6
AS
7097sed 's/^/| /' conftest.$ac_ext >&5
7098
ca81d7a0 7099 ac_cv_type_signal=void
503d2be0 7100fi
ca81d7a0
JD
7101
7102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7103fi
ca81d7a0
JD
7104{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7105echo "${ECHO_T}$ac_cv_type_signal" >&6; }
7397acc4 7106
c0d27fcc 7107cat >>confdefs.h <<_ACEOF
98418dba 7108#define RETSIGTYPE $ac_cv_type_signal
c0d27fcc
MR
7109_ACEOF
7110
503d2be0 7111
c0d27fcc 7112
ca81d7a0
JD
7113{ echo "$as_me:$LINENO: checking for speed_t" >&5
7114echo $ECHO_N "checking for speed_t... $ECHO_C" >&6; }
98418dba
CW
7115if test "${emacs_cv_speed_t+set}" = set; then
7116 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7117else
98418dba 7118 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7119/* confdefs.h. */
7120_ACEOF
7121cat confdefs.h >>conftest.$ac_ext
7122cat >>conftest.$ac_ext <<_ACEOF
7123/* end confdefs.h. */
98418dba 7124#include <termios.h>
98418dba
CW
7125int
7126main ()
7127{
7128speed_t x = 1;
7129 ;
7130 return 0;
7131}
7132_ACEOF
7133rm -f conftest.$ac_objext
ca81d7a0
JD
7134if { (ac_try="$ac_compile"
7135case "(($ac_try" in
7136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7137 *) ac_try_echo=$ac_try;;
7138esac
7139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7140 (eval "$ac_compile") 2>conftest.er1
98418dba 7141 ac_status=$?
edfaf76d
LK
7142 grep -v '^ *+' conftest.er1 >conftest.err
7143 rm -f conftest.er1
7144 cat conftest.err >&5
c0d27fcc 7145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7146 (exit $ac_status); } && {
7147 test -z "$ac_c_werror_flag" ||
7148 test ! -s conftest.err
7149 } && test -s conftest.$ac_objext; then
98418dba
CW
7150 emacs_cv_speed_t=yes
7151else
7152 echo "$as_me: failed program was:" >&5
19650fd6
AS
7153sed 's/^/| /' conftest.$ac_ext >&5
7154
ca81d7a0 7155 emacs_cv_speed_t=no
98418dba 7156fi
ca81d7a0
JD
7157
7158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 7159fi
ca81d7a0
JD
7160{ echo "$as_me:$LINENO: result: $emacs_cv_speed_t" >&5
7161echo "${ECHO_T}$emacs_cv_speed_t" >&6; }
98418dba 7162if test $emacs_cv_speed_t = yes; then
b936fae4 7163
c0d27fcc 7164cat >>confdefs.h <<\_ACEOF
98418dba 7165#define HAVE_SPEED_T 1
c0d27fcc 7166_ACEOF
98418dba 7167
7397acc4
DL
7168fi
7169
ca81d7a0
JD
7170{ echo "$as_me:$LINENO: checking for struct timeval" >&5
7171echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
98418dba 7172if test "${emacs_cv_struct_timeval+set}" = set; then
503d2be0 7173 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7174else
503d2be0 7175 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7176/* confdefs.h. */
7177_ACEOF
7178cat confdefs.h >>conftest.$ac_ext
7179cat >>conftest.$ac_ext <<_ACEOF
7180/* end confdefs.h. */
98418dba
CW
7181#ifdef TIME_WITH_SYS_TIME
7182#include <sys/time.h>
7183#include <time.h>
7184#else
7185#ifdef HAVE_SYS_TIME_H
7186#include <sys/time.h>
7187#else
7188#include <time.h>
7189#endif
7190#endif
503d2be0
AS
7191int
7192main ()
7193{
98418dba 7194static struct timeval x; x.tv_sec = x.tv_usec;
503d2be0
AS
7195 ;
7196 return 0;
7197}
7198_ACEOF
7199rm -f conftest.$ac_objext
ca81d7a0
JD
7200if { (ac_try="$ac_compile"
7201case "(($ac_try" in
7202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7203 *) ac_try_echo=$ac_try;;
7204esac
7205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7206 (eval "$ac_compile") 2>conftest.er1
503d2be0 7207 ac_status=$?
edfaf76d
LK
7208 grep -v '^ *+' conftest.er1 >conftest.err
7209 rm -f conftest.er1
7210 cat conftest.err >&5
c0d27fcc 7211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7212 (exit $ac_status); } && {
7213 test -z "$ac_c_werror_flag" ||
7214 test ! -s conftest.err
7215 } && test -s conftest.$ac_objext; then
edfaf76d
LK
7216 emacs_cv_struct_timeval=yes
7217else
503d2be0 7218 echo "$as_me: failed program was:" >&5
19650fd6
AS
7219sed 's/^/| /' conftest.$ac_ext >&5
7220
ca81d7a0 7221 emacs_cv_struct_timeval=no
7397acc4 7222fi
ca81d7a0
JD
7223
7224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7225fi
ca81d7a0
JD
7226{ echo "$as_me:$LINENO: result: $emacs_cv_struct_timeval" >&5
7227echo "${ECHO_T}$emacs_cv_struct_timeval" >&6; }
98418dba
CW
7228HAVE_TIMEVAL=$emacs_cv_struct_timeval
7229if test $emacs_cv_struct_timeval = yes; then
b936fae4 7230
c0d27fcc 7231cat >>confdefs.h <<\_ACEOF
98418dba 7232#define HAVE_TIMEVAL 1
c0d27fcc 7233_ACEOF
7397acc4
DL
7234
7235fi
7236
ca81d7a0
JD
7237{ echo "$as_me:$LINENO: checking for struct exception" >&5
7238echo $ECHO_N "checking for struct exception... $ECHO_C" >&6; }
98418dba 7239if test "${emacs_cv_struct_exception+set}" = set; then
503d2be0 7240 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7241else
503d2be0 7242 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7243/* confdefs.h. */
7244_ACEOF
7245cat confdefs.h >>conftest.$ac_ext
7246cat >>conftest.$ac_ext <<_ACEOF
7247/* end confdefs.h. */
98418dba 7248#include <math.h>
503d2be0
AS
7249int
7250main ()
7251{
98418dba 7252static struct exception x; x.arg1 = x.arg2 = x.retval; x.name = ""; x.type = 1;
503d2be0
AS
7253 ;
7254 return 0;
ba4481b5 7255}
503d2be0
AS
7256_ACEOF
7257rm -f conftest.$ac_objext
ca81d7a0
JD
7258if { (ac_try="$ac_compile"
7259case "(($ac_try" in
7260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7261 *) ac_try_echo=$ac_try;;
7262esac
7263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7264 (eval "$ac_compile") 2>conftest.er1
503d2be0 7265 ac_status=$?
edfaf76d
LK
7266 grep -v '^ *+' conftest.er1 >conftest.err
7267 rm -f conftest.er1
7268 cat conftest.err >&5
c0d27fcc 7269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7270 (exit $ac_status); } && {
7271 test -z "$ac_c_werror_flag" ||
7272 test ! -s conftest.err
7273 } && test -s conftest.$ac_objext; then
98418dba 7274 emacs_cv_struct_exception=yes
ba4481b5 7275else
503d2be0 7276 echo "$as_me: failed program was:" >&5
19650fd6
AS
7277sed 's/^/| /' conftest.$ac_ext >&5
7278
ca81d7a0 7279 emacs_cv_struct_exception=no
ba4481b5 7280fi
ca81d7a0
JD
7281
7282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7283fi
ca81d7a0
JD
7284{ echo "$as_me:$LINENO: result: $emacs_cv_struct_exception" >&5
7285echo "${ECHO_T}$emacs_cv_struct_exception" >&6; }
98418dba
CW
7286HAVE_EXCEPTION=$emacs_cv_struct_exception
7287if test $emacs_cv_struct_exception != yes; then
b936fae4 7288
c0d27fcc 7289cat >>confdefs.h <<\_ACEOF
98418dba 7290#define NO_MATHERR 1
c0d27fcc 7291_ACEOF
ba4481b5
DL
7292
7293fi
7294
7862d3a8
AS
7295
7296for ac_header in sys/socket.h
7297do
7298as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7299if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7300 { echo "$as_me:$LINENO: checking for $ac_header" >&5
7301echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7302if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7303 echo $ECHO_N "(cached) $ECHO_C" >&6
7304fi
ca81d7a0
JD
7305ac_res=`eval echo '${'$as_ac_Header'}'`
7306 { echo "$as_me:$LINENO: result: $ac_res" >&5
7307echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7308else
7309 # Is the header compilable?
ca81d7a0
JD
7310{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
7311echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
7862d3a8
AS
7312cat >conftest.$ac_ext <<_ACEOF
7313/* confdefs.h. */
7314_ACEOF
7315cat confdefs.h >>conftest.$ac_ext
7316cat >>conftest.$ac_ext <<_ACEOF
7317/* end confdefs.h. */
7318$ac_includes_default
7319#include <$ac_header>
7320_ACEOF
7321rm -f conftest.$ac_objext
ca81d7a0
JD
7322if { (ac_try="$ac_compile"
7323case "(($ac_try" in
7324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7325 *) ac_try_echo=$ac_try;;
7326esac
7327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7328 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7329 ac_status=$?
edfaf76d
LK
7330 grep -v '^ *+' conftest.er1 >conftest.err
7331 rm -f conftest.er1
7332 cat conftest.err >&5
7862d3a8 7333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7334 (exit $ac_status); } && {
7335 test -z "$ac_c_werror_flag" ||
7336 test ! -s conftest.err
7337 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7338 ac_header_compiler=yes
7339else
7340 echo "$as_me: failed program was:" >&5
7341sed 's/^/| /' conftest.$ac_ext >&5
7342
ca81d7a0 7343 ac_header_compiler=no
7862d3a8 7344fi
ca81d7a0
JD
7345
7346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7347{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
7348echo "${ECHO_T}$ac_header_compiler" >&6; }
7862d3a8
AS
7349
7350# Is the header present?
ca81d7a0
JD
7351{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
7352echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
7862d3a8
AS
7353cat >conftest.$ac_ext <<_ACEOF
7354/* confdefs.h. */
7355_ACEOF
7356cat confdefs.h >>conftest.$ac_ext
7357cat >>conftest.$ac_ext <<_ACEOF
7358/* end confdefs.h. */
7359#include <$ac_header>
7360_ACEOF
ca81d7a0
JD
7361if { (ac_try="$ac_cpp conftest.$ac_ext"
7362case "(($ac_try" in
7363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7364 *) ac_try_echo=$ac_try;;
7365esac
7366eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7367 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
7862d3a8
AS
7368 ac_status=$?
7369 grep -v '^ *+' conftest.er1 >conftest.err
7370 rm -f conftest.er1
7371 cat conftest.err >&5
7372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7373 (exit $ac_status); } >/dev/null && {
7374 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
7375 test ! -s conftest.err
7376 }; then
7862d3a8
AS
7377 ac_header_preproc=yes
7378else
7379 echo "$as_me: failed program was:" >&5
7380sed 's/^/| /' conftest.$ac_ext >&5
7381
7382 ac_header_preproc=no
7383fi
ca81d7a0 7384
7862d3a8 7385rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
7386{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
7387echo "${ECHO_T}$ac_header_preproc" >&6; }
7862d3a8
AS
7388
7389# So? What about this header?
edfaf76d
LK
7390case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
7391 yes:no: )
7862d3a8
AS
7392 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
7393echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
7394 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
7395echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
7396 ac_header_preproc=yes
7862d3a8 7397 ;;
edfaf76d 7398 no:yes:* )
7862d3a8
AS
7399 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
7400echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
7401 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
7402echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
7403 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
7404echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
7405 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
7406echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7862d3a8
AS
7407 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
7408echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
7409 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
7410echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 7411
7862d3a8
AS
7412 ;;
7413esac
ca81d7a0
JD
7414{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7415echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7416if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7417 echo $ECHO_N "(cached) $ECHO_C" >&6
7418else
edfaf76d 7419 eval "$as_ac_Header=\$ac_header_preproc"
7862d3a8 7420fi
ca81d7a0
JD
7421ac_res=`eval echo '${'$as_ac_Header'}'`
7422 { echo "$as_me:$LINENO: result: $ac_res" >&5
7423echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7424
7425fi
7426if test `eval echo '${'$as_ac_Header'}'` = yes; then
7427 cat >>confdefs.h <<_ACEOF
7428#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7429_ACEOF
7430
7431fi
7432
7433done
7434
7435
7436for ac_header in net/if.h
7437do
7438as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
7439{ echo "$as_me:$LINENO: checking for $ac_header" >&5
7440echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
7441if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
7862d3a8
AS
7442 echo $ECHO_N "(cached) $ECHO_C" >&6
7443else
7444 cat >conftest.$ac_ext <<_ACEOF
7445/* confdefs.h. */
7446_ACEOF
7447cat confdefs.h >>conftest.$ac_ext
7448cat >>conftest.$ac_ext <<_ACEOF
7449/* end confdefs.h. */
7450$ac_includes_default
7451#if HAVE_SYS_SOCKET_H
7452#include <sys/socket.h>
7453#endif
7454
7455#include <$ac_header>
7456_ACEOF
7457rm -f conftest.$ac_objext
ca81d7a0
JD
7458if { (ac_try="$ac_compile"
7459case "(($ac_try" in
7460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7461 *) ac_try_echo=$ac_try;;
7462esac
7463eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7464 (eval "$ac_compile") 2>conftest.er1
7862d3a8 7465 ac_status=$?
edfaf76d
LK
7466 grep -v '^ *+' conftest.er1 >conftest.err
7467 rm -f conftest.er1
7468 cat conftest.err >&5
7862d3a8 7469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7470 (exit $ac_status); } && {
7471 test -z "$ac_c_werror_flag" ||
7472 test ! -s conftest.err
7473 } && test -s conftest.$ac_objext; then
7862d3a8
AS
7474 eval "$as_ac_Header=yes"
7475else
7476 echo "$as_me: failed program was:" >&5
7477sed 's/^/| /' conftest.$ac_ext >&5
7478
ca81d7a0 7479 eval "$as_ac_Header=no"
7862d3a8 7480fi
ca81d7a0
JD
7481
7482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7862d3a8 7483fi
ca81d7a0
JD
7484ac_res=`eval echo '${'$as_ac_Header'}'`
7485 { echo "$as_me:$LINENO: result: $ac_res" >&5
7486echo "${ECHO_T}$ac_res" >&6; }
7862d3a8
AS
7487if test `eval echo '${'$as_ac_Header'}'` = yes; then
7488 cat >>confdefs.h <<_ACEOF
7489#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7490_ACEOF
7491
7492fi
7493
7494done
7495
7496
ca81d7a0
JD
7497{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
7498echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
98418dba 7499if test "${ac_cv_struct_tm+set}" = set; then
503d2be0 7500 echo $ECHO_N "(cached) $ECHO_C" >&6
7397acc4 7501else
503d2be0 7502 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7503/* confdefs.h. */
7504_ACEOF
7505cat confdefs.h >>conftest.$ac_ext
7506cat >>conftest.$ac_ext <<_ACEOF
7507/* end confdefs.h. */
98418dba
CW
7508#include <sys/types.h>
7509#include <time.h>
7397acc4 7510
503d2be0
AS
7511int
7512main ()
7513{
f053c89f
CY
7514struct tm tm;
7515 int *p = &tm.tm_sec;
7516 return !p;
503d2be0
AS
7517 ;
7518 return 0;
7519}
7520_ACEOF
7521rm -f conftest.$ac_objext
ca81d7a0
JD
7522if { (ac_try="$ac_compile"
7523case "(($ac_try" in
7524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7525 *) ac_try_echo=$ac_try;;
7526esac
7527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7528 (eval "$ac_compile") 2>conftest.er1
503d2be0 7529 ac_status=$?
edfaf76d
LK
7530 grep -v '^ *+' conftest.er1 >conftest.err
7531 rm -f conftest.er1
7532 cat conftest.err >&5
c0d27fcc 7533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7534 (exit $ac_status); } && {
7535 test -z "$ac_c_werror_flag" ||
7536 test ! -s conftest.err
7537 } && test -s conftest.$ac_objext; then
35996d22
AS
7538 ac_cv_struct_tm=time.h
7539else
503d2be0 7540 echo "$as_me: failed program was:" >&5
19650fd6
AS
7541sed 's/^/| /' conftest.$ac_ext >&5
7542
ca81d7a0 7543 ac_cv_struct_tm=sys/time.h
7397acc4 7544fi
ca81d7a0
JD
7545
7546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7397acc4 7547fi
ca81d7a0
JD
7548{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
7549echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
98418dba 7550if test $ac_cv_struct_tm = sys/time.h; then
7397acc4 7551
c0d27fcc 7552cat >>confdefs.h <<\_ACEOF
98418dba 7553#define TM_IN_SYS_TIME 1
c0d27fcc 7554_ACEOF
7397acc4
DL
7555
7556fi
ba4481b5 7557
ca81d7a0
JD
7558{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
7559echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
98418dba 7560if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
503d2be0 7561 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7562else
98418dba 7563 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7564/* confdefs.h. */
7565_ACEOF
7566cat confdefs.h >>conftest.$ac_ext
7567cat >>conftest.$ac_ext <<_ACEOF
7568/* end confdefs.h. */
98418dba
CW
7569#include <sys/types.h>
7570#include <$ac_cv_struct_tm>
ba4481b5 7571
c0d27fcc 7572
98418dba
CW
7573int
7574main ()
7575{
7576static struct tm ac_aggr;
7577if (ac_aggr.tm_zone)
7578return 0;
7579 ;
7580 return 0;
7581}
7582_ACEOF
7583rm -f conftest.$ac_objext
ca81d7a0
JD
7584if { (ac_try="$ac_compile"
7585case "(($ac_try" in
7586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7587 *) ac_try_echo=$ac_try;;
7588esac
7589eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7590 (eval "$ac_compile") 2>conftest.er1
98418dba 7591 ac_status=$?
edfaf76d
LK
7592 grep -v '^ *+' conftest.er1 >conftest.err
7593 rm -f conftest.er1
7594 cat conftest.err >&5
c0d27fcc 7595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7596 (exit $ac_status); } && {
7597 test -z "$ac_c_werror_flag" ||
7598 test ! -s conftest.err
7599 } && test -s conftest.$ac_objext; then
98418dba 7600 ac_cv_member_struct_tm_tm_zone=yes
ba4481b5 7601else
98418dba 7602 echo "$as_me: failed program was:" >&5
19650fd6
AS
7603sed 's/^/| /' conftest.$ac_ext >&5
7604
ca81d7a0 7605 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7606/* confdefs.h. */
7607_ACEOF
7608cat confdefs.h >>conftest.$ac_ext
7609cat >>conftest.$ac_ext <<_ACEOF
7610/* end confdefs.h. */
6bae0ccf
DL
7611#include <sys/types.h>
7612#include <$ac_cv_struct_tm>
7613
7614
7615int
7616main ()
7617{
7618static struct tm ac_aggr;
7619if (sizeof ac_aggr.tm_zone)
7620return 0;
7621 ;
7622 return 0;
7623}
7624_ACEOF
7625rm -f conftest.$ac_objext
ca81d7a0
JD
7626if { (ac_try="$ac_compile"
7627case "(($ac_try" in
7628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7629 *) ac_try_echo=$ac_try;;
7630esac
7631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7632 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7633 ac_status=$?
edfaf76d
LK
7634 grep -v '^ *+' conftest.er1 >conftest.err
7635 rm -f conftest.er1
7636 cat conftest.err >&5
6bae0ccf 7637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7638 (exit $ac_status); } && {
7639 test -z "$ac_c_werror_flag" ||
7640 test ! -s conftest.err
7641 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
7642 ac_cv_member_struct_tm_tm_zone=yes
7643else
7644 echo "$as_me: failed program was:" >&5
19650fd6
AS
7645sed 's/^/| /' conftest.$ac_ext >&5
7646
ca81d7a0 7647 ac_cv_member_struct_tm_tm_zone=no
ba4481b5 7648fi
ca81d7a0
JD
7649
7650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 7651fi
ca81d7a0
JD
7652
7653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7654fi
ca81d7a0
JD
7655{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
7656echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
98418dba 7657if test $ac_cv_member_struct_tm_tm_zone = yes; then
503d2be0 7658
c0d27fcc 7659cat >>confdefs.h <<_ACEOF
98418dba 7660#define HAVE_STRUCT_TM_TM_ZONE 1
c0d27fcc
MR
7661_ACEOF
7662
ba4481b5 7663
98418dba 7664fi
ba4481b5 7665
98418dba 7666if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
ba4481b5 7667
c0d27fcc 7668cat >>confdefs.h <<\_ACEOF
98418dba 7669#define HAVE_TM_ZONE 1
c0d27fcc 7670_ACEOF
ba4481b5 7671
ba4481b5 7672else
ca81d7a0
JD
7673 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
7674echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
7675if test "${ac_cv_have_decl_tzname+set}" = set; then
503d2be0 7676 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7677else
98418dba 7678 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7679/* confdefs.h. */
7680_ACEOF
7681cat confdefs.h >>conftest.$ac_ext
7682cat >>conftest.$ac_ext <<_ACEOF
7683/* end confdefs.h. */
98418dba 7684#include <time.h>
98418dba 7685
98418dba
CW
7686int
7687main ()
7688{
ca81d7a0 7689#ifndef tzname
f053c89f 7690 (void) tzname;
ca81d7a0
JD
7691#endif
7692
6bae0ccf
DL
7693 ;
7694 return 0;
7695}
7696_ACEOF
7697rm -f conftest.$ac_objext
ca81d7a0
JD
7698if { (ac_try="$ac_compile"
7699case "(($ac_try" in
7700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7701 *) ac_try_echo=$ac_try;;
7702esac
7703eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7704 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 7705 ac_status=$?
edfaf76d
LK
7706 grep -v '^ *+' conftest.er1 >conftest.err
7707 rm -f conftest.er1
7708 cat conftest.err >&5
6bae0ccf 7709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7710 (exit $ac_status); } && {
7711 test -z "$ac_c_werror_flag" ||
7712 test ! -s conftest.err
7713 } && test -s conftest.$ac_objext; then
ca81d7a0 7714 ac_cv_have_decl_tzname=yes
6bae0ccf
DL
7715else
7716 echo "$as_me: failed program was:" >&5
19650fd6
AS
7717sed 's/^/| /' conftest.$ac_ext >&5
7718
ca81d7a0 7719 ac_cv_have_decl_tzname=no
ba4481b5 7720fi
ca81d7a0
JD
7721
7722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7723fi
ca81d7a0
JD
7724{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
7725echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
7726if test $ac_cv_have_decl_tzname = yes; then
503d2be0 7727
c0d27fcc 7728cat >>confdefs.h <<_ACEOF
ca81d7a0 7729#define HAVE_DECL_TZNAME 1
c0d27fcc
MR
7730_ACEOF
7731
ba4481b5 7732
ca81d7a0
JD
7733else
7734 cat >>confdefs.h <<_ACEOF
7735#define HAVE_DECL_TZNAME 0
7736_ACEOF
ba4481b5 7737
ba4481b5 7738
98418dba 7739fi
ba4481b5 7740
ca81d7a0
JD
7741
7742 { echo "$as_me:$LINENO: checking for tzname" >&5
7743echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
98418dba 7744if test "${ac_cv_var_tzname+set}" = set; then
503d2be0 7745 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 7746else
98418dba 7747 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7748/* confdefs.h. */
7749_ACEOF
7750cat confdefs.h >>conftest.$ac_ext
7751cat >>conftest.$ac_ext <<_ACEOF
7752/* end confdefs.h. */
98418dba 7753#include <time.h>
ca81d7a0
JD
7754#if !HAVE_DECL_TZNAME
7755extern char *tzname[];
98418dba
CW
7756#endif
7757
98418dba
CW
7758int
7759main ()
7760{
ca81d7a0 7761return tzname[0][0];
98418dba
CW
7762 ;
7763 return 0;
7764}
7765_ACEOF
7766rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
7767if { (ac_try="$ac_link"
7768case "(($ac_try" in
7769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7770 *) ac_try_echo=$ac_try;;
7771esac
7772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7773 (eval "$ac_link") 2>conftest.er1
98418dba 7774 ac_status=$?
edfaf76d
LK
7775 grep -v '^ *+' conftest.er1 >conftest.err
7776 rm -f conftest.er1
7777 cat conftest.err >&5
c0d27fcc 7778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7779 (exit $ac_status); } && {
7780 test -z "$ac_c_werror_flag" ||
7781 test ! -s conftest.err
7782 } && test -s conftest$ac_exeext &&
7783 $as_test_x conftest$ac_exeext; then
98418dba
CW
7784 ac_cv_var_tzname=yes
7785else
7786 echo "$as_me: failed program was:" >&5
19650fd6
AS
7787sed 's/^/| /' conftest.$ac_ext >&5
7788
ca81d7a0 7789 ac_cv_var_tzname=no
ba4481b5 7790fi
6bae0ccf 7791
f053c89f 7792rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 7793 conftest$ac_exeext conftest.$ac_ext
98418dba 7794fi
ca81d7a0
JD
7795{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
7796echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
98418dba 7797 if test $ac_cv_var_tzname = yes; then
ba4481b5 7798
c0d27fcc 7799cat >>confdefs.h <<\_ACEOF
98418dba 7800#define HAVE_TZNAME 1
c0d27fcc 7801_ACEOF
503d2be0 7802
98418dba
CW
7803 fi
7804fi
503d2be0 7805
ca81d7a0
JD
7806{ echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5
7807echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6; }
b936fae4 7808if test "${ac_cv_member_struct_tm_tm_gmtoff+set}" = set; then
98418dba
CW
7809 echo $ECHO_N "(cached) $ECHO_C" >&6
7810else
7811 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7812/* confdefs.h. */
7813_ACEOF
7814cat confdefs.h >>conftest.$ac_ext
7815cat >>conftest.$ac_ext <<_ACEOF
7816/* end confdefs.h. */
98418dba 7817#include <time.h>
b936fae4 7818
98418dba
CW
7819int
7820main ()
7821{
b936fae4
AS
7822static struct tm ac_aggr;
7823if (ac_aggr.tm_gmtoff)
7824return 0;
98418dba
CW
7825 ;
7826 return 0;
7827}
7828_ACEOF
b936fae4 7829rm -f conftest.$ac_objext
ca81d7a0
JD
7830if { (ac_try="$ac_compile"
7831case "(($ac_try" in
7832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7833 *) ac_try_echo=$ac_try;;
7834esac
7835eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7836 (eval "$ac_compile") 2>conftest.er1
98418dba 7837 ac_status=$?
edfaf76d
LK
7838 grep -v '^ *+' conftest.er1 >conftest.err
7839 rm -f conftest.er1
7840 cat conftest.err >&5
c0d27fcc 7841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7842 (exit $ac_status); } && {
7843 test -z "$ac_c_werror_flag" ||
7844 test ! -s conftest.err
7845 } && test -s conftest.$ac_objext; then
b936fae4 7846 ac_cv_member_struct_tm_tm_gmtoff=yes
98418dba
CW
7847else
7848 echo "$as_me: failed program was:" >&5
19650fd6
AS
7849sed 's/^/| /' conftest.$ac_ext >&5
7850
ca81d7a0 7851 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
7852/* confdefs.h. */
7853_ACEOF
7854cat confdefs.h >>conftest.$ac_ext
7855cat >>conftest.$ac_ext <<_ACEOF
7856/* end confdefs.h. */
6bae0ccf
DL
7857#include <time.h>
7858
8799b3e4
CW
7859int
7860main ()
7861{
6bae0ccf
DL
7862static struct tm ac_aggr;
7863if (sizeof ac_aggr.tm_gmtoff)
7864return 0;
8799b3e4
CW
7865 ;
7866 return 0;
7867}
7868_ACEOF
6bae0ccf 7869rm -f conftest.$ac_objext
ca81d7a0
JD
7870if { (ac_try="$ac_compile"
7871case "(($ac_try" in
7872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7873 *) ac_try_echo=$ac_try;;
7874esac
7875eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7876 (eval "$ac_compile") 2>conftest.er1
8799b3e4 7877 ac_status=$?
edfaf76d
LK
7878 grep -v '^ *+' conftest.er1 >conftest.err
7879 rm -f conftest.er1
7880 cat conftest.err >&5
c0d27fcc 7881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7882 (exit $ac_status); } && {
7883 test -z "$ac_c_werror_flag" ||
7884 test ! -s conftest.err
7885 } && test -s conftest.$ac_objext; then
6bae0ccf 7886 ac_cv_member_struct_tm_tm_gmtoff=yes
8799b3e4
CW
7887else
7888 echo "$as_me: failed program was:" >&5
19650fd6
AS
7889sed 's/^/| /' conftest.$ac_ext >&5
7890
ca81d7a0 7891 ac_cv_member_struct_tm_tm_gmtoff=no
8799b3e4 7892fi
ca81d7a0
JD
7893
7894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 7895fi
ca81d7a0
JD
7896
7897rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8799b3e4 7898fi
ca81d7a0
JD
7899{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5
7900echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6; }
6bae0ccf
DL
7901if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then
7902
7903cat >>confdefs.h <<\_ACEOF
7904#define HAVE_TM_GMTOFF 1
7905_ACEOF
7906
7907fi
7908
ca81d7a0
JD
7909{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_flags" >&5
7910echo $ECHO_N "checking for struct ifreq.ifr_flags... $ECHO_C" >&6; }
96f3a036
DL
7911if test "${ac_cv_member_struct_ifreq_ifr_flags+set}" = set; then
7912 echo $ECHO_N "(cached) $ECHO_C" >&6
7913else
7914 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7915/* confdefs.h. */
7916_ACEOF
7917cat confdefs.h >>conftest.$ac_ext
7918cat >>conftest.$ac_ext <<_ACEOF
7919/* end confdefs.h. */
7862d3a8
AS
7920$ac_includes_default
7921#if HAVE_SYS_SOCKET_H
7922#include <sys/socket.h>
7923#endif
7924#if HAVE_NET_IF_H
96f3a036 7925#include <net/if.h>
7862d3a8 7926#endif
96f3a036
DL
7927
7928int
7929main ()
7930{
7931static struct ifreq ac_aggr;
7932if (ac_aggr.ifr_flags)
7933return 0;
7934 ;
7935 return 0;
7936}
7937_ACEOF
7938rm -f conftest.$ac_objext
ca81d7a0
JD
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
96f3a036 7946 ac_status=$?
edfaf76d
LK
7947 grep -v '^ *+' conftest.er1 >conftest.err
7948 rm -f conftest.er1
7949 cat conftest.err >&5
96f3a036 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
96f3a036
DL
7955 ac_cv_member_struct_ifreq_ifr_flags=yes
7956else
7957 echo "$as_me: failed program was:" >&5
7958sed 's/^/| /' conftest.$ac_ext >&5
7959
ca81d7a0 7960 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
7961/* confdefs.h. */
7962_ACEOF
7963cat confdefs.h >>conftest.$ac_ext
7964cat >>conftest.$ac_ext <<_ACEOF
7965/* end confdefs.h. */
7862d3a8
AS
7966$ac_includes_default
7967#if HAVE_SYS_SOCKET_H
7968#include <sys/socket.h>
7969#endif
7970#if HAVE_NET_IF_H
96f3a036 7971#include <net/if.h>
7862d3a8 7972#endif
96f3a036
DL
7973
7974int
7975main ()
7976{
7977static struct ifreq ac_aggr;
7978if (sizeof ac_aggr.ifr_flags)
7979return 0;
7980 ;
7981 return 0;
7982}
7983_ACEOF
7984rm -f conftest.$ac_objext
ca81d7a0
JD
7985if { (ac_try="$ac_compile"
7986case "(($ac_try" in
7987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7988 *) ac_try_echo=$ac_try;;
7989esac
7990eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7991 (eval "$ac_compile") 2>conftest.er1
96f3a036 7992 ac_status=$?
edfaf76d
LK
7993 grep -v '^ *+' conftest.er1 >conftest.err
7994 rm -f conftest.er1
7995 cat conftest.err >&5
96f3a036 7996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
7997 (exit $ac_status); } && {
7998 test -z "$ac_c_werror_flag" ||
7999 test ! -s conftest.err
8000 } && test -s conftest.$ac_objext; then
96f3a036
DL
8001 ac_cv_member_struct_ifreq_ifr_flags=yes
8002else
8003 echo "$as_me: failed program was:" >&5
8004sed 's/^/| /' conftest.$ac_ext >&5
8005
ca81d7a0 8006 ac_cv_member_struct_ifreq_ifr_flags=no
96f3a036 8007fi
ca81d7a0
JD
8008
8009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8010fi
ca81d7a0
JD
8011
8012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8013fi
ca81d7a0
JD
8014{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_flags" >&5
8015echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_flags" >&6; }
96f3a036
DL
8016if test $ac_cv_member_struct_ifreq_ifr_flags = yes; then
8017
8018cat >>confdefs.h <<_ACEOF
8019#define HAVE_STRUCT_IFREQ_IFR_FLAGS 1
8020_ACEOF
8021
8022
8023fi
ca81d7a0
JD
8024{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_hwaddr" >&5
8025echo $ECHO_N "checking for struct ifreq.ifr_hwaddr... $ECHO_C" >&6; }
96f3a036
DL
8026if test "${ac_cv_member_struct_ifreq_ifr_hwaddr+set}" = set; then
8027 echo $ECHO_N "(cached) $ECHO_C" >&6
8028else
8029 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8030/* confdefs.h. */
8031_ACEOF
8032cat confdefs.h >>conftest.$ac_ext
8033cat >>conftest.$ac_ext <<_ACEOF
8034/* end confdefs.h. */
7862d3a8
AS
8035$ac_includes_default
8036#if HAVE_SYS_SOCKET_H
8037#include <sys/socket.h>
8038#endif
8039#if HAVE_NET_IF_H
96f3a036 8040#include <net/if.h>
7862d3a8 8041#endif
96f3a036
DL
8042
8043int
8044main ()
8045{
8046static struct ifreq ac_aggr;
8047if (ac_aggr.ifr_hwaddr)
8048return 0;
8049 ;
8050 return 0;
8051}
8052_ACEOF
8053rm -f conftest.$ac_objext
ca81d7a0
JD
8054if { (ac_try="$ac_compile"
8055case "(($ac_try" in
8056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8057 *) ac_try_echo=$ac_try;;
8058esac
8059eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8060 (eval "$ac_compile") 2>conftest.er1
96f3a036 8061 ac_status=$?
edfaf76d
LK
8062 grep -v '^ *+' conftest.er1 >conftest.err
8063 rm -f conftest.er1
8064 cat conftest.err >&5
96f3a036 8065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8066 (exit $ac_status); } && {
8067 test -z "$ac_c_werror_flag" ||
8068 test ! -s conftest.err
8069 } && test -s conftest.$ac_objext; then
96f3a036
DL
8070 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8071else
8072 echo "$as_me: failed program was:" >&5
8073sed 's/^/| /' conftest.$ac_ext >&5
8074
ca81d7a0 8075 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8076/* confdefs.h. */
8077_ACEOF
8078cat confdefs.h >>conftest.$ac_ext
8079cat >>conftest.$ac_ext <<_ACEOF
8080/* end confdefs.h. */
7862d3a8
AS
8081$ac_includes_default
8082#if HAVE_SYS_SOCKET_H
8083#include <sys/socket.h>
8084#endif
8085#if HAVE_NET_IF_H
96f3a036 8086#include <net/if.h>
7862d3a8 8087#endif
96f3a036
DL
8088
8089int
8090main ()
8091{
8092static struct ifreq ac_aggr;
8093if (sizeof ac_aggr.ifr_hwaddr)
8094return 0;
8095 ;
8096 return 0;
8097}
8098_ACEOF
8099rm -f conftest.$ac_objext
ca81d7a0
JD
8100if { (ac_try="$ac_compile"
8101case "(($ac_try" in
8102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8103 *) ac_try_echo=$ac_try;;
8104esac
8105eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8106 (eval "$ac_compile") 2>conftest.er1
96f3a036 8107 ac_status=$?
edfaf76d
LK
8108 grep -v '^ *+' conftest.er1 >conftest.err
8109 rm -f conftest.er1
8110 cat conftest.err >&5
96f3a036 8111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8112 (exit $ac_status); } && {
8113 test -z "$ac_c_werror_flag" ||
8114 test ! -s conftest.err
8115 } && test -s conftest.$ac_objext; then
96f3a036
DL
8116 ac_cv_member_struct_ifreq_ifr_hwaddr=yes
8117else
8118 echo "$as_me: failed program was:" >&5
8119sed 's/^/| /' conftest.$ac_ext >&5
8120
ca81d7a0 8121 ac_cv_member_struct_ifreq_ifr_hwaddr=no
96f3a036 8122fi
ca81d7a0
JD
8123
8124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8125fi
ca81d7a0
JD
8126
8127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8128fi
ca81d7a0
JD
8129{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_hwaddr" >&5
8130echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_hwaddr" >&6; }
96f3a036
DL
8131if test $ac_cv_member_struct_ifreq_ifr_hwaddr = yes; then
8132
8133cat >>confdefs.h <<_ACEOF
8134#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1
8135_ACEOF
8136
8137
8138fi
ca81d7a0
JD
8139{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_netmask" >&5
8140echo $ECHO_N "checking for struct ifreq.ifr_netmask... $ECHO_C" >&6; }
96f3a036
DL
8141if test "${ac_cv_member_struct_ifreq_ifr_netmask+set}" = set; then
8142 echo $ECHO_N "(cached) $ECHO_C" >&6
8143else
8144 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8145/* confdefs.h. */
8146_ACEOF
8147cat confdefs.h >>conftest.$ac_ext
8148cat >>conftest.$ac_ext <<_ACEOF
8149/* end confdefs.h. */
7862d3a8
AS
8150$ac_includes_default
8151#if HAVE_SYS_SOCKET_H
8152#include <sys/socket.h>
8153#endif
8154#if HAVE_NET_IF_H
96f3a036 8155#include <net/if.h>
7862d3a8 8156#endif
96f3a036
DL
8157
8158int
8159main ()
8160{
8161static struct ifreq ac_aggr;
8162if (ac_aggr.ifr_netmask)
8163return 0;
8164 ;
8165 return 0;
8166}
8167_ACEOF
8168rm -f conftest.$ac_objext
ca81d7a0
JD
8169if { (ac_try="$ac_compile"
8170case "(($ac_try" in
8171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8172 *) ac_try_echo=$ac_try;;
8173esac
8174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8175 (eval "$ac_compile") 2>conftest.er1
96f3a036 8176 ac_status=$?
edfaf76d
LK
8177 grep -v '^ *+' conftest.er1 >conftest.err
8178 rm -f conftest.er1
8179 cat conftest.err >&5
96f3a036 8180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8181 (exit $ac_status); } && {
8182 test -z "$ac_c_werror_flag" ||
8183 test ! -s conftest.err
8184 } && test -s conftest.$ac_objext; then
96f3a036
DL
8185 ac_cv_member_struct_ifreq_ifr_netmask=yes
8186else
8187 echo "$as_me: failed program was:" >&5
8188sed 's/^/| /' conftest.$ac_ext >&5
8189
ca81d7a0 8190 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8191/* confdefs.h. */
8192_ACEOF
8193cat confdefs.h >>conftest.$ac_ext
8194cat >>conftest.$ac_ext <<_ACEOF
8195/* end confdefs.h. */
7862d3a8
AS
8196$ac_includes_default
8197#if HAVE_SYS_SOCKET_H
8198#include <sys/socket.h>
8199#endif
8200#if HAVE_NET_IF_H
96f3a036 8201#include <net/if.h>
7862d3a8 8202#endif
96f3a036
DL
8203
8204int
8205main ()
8206{
8207static struct ifreq ac_aggr;
8208if (sizeof ac_aggr.ifr_netmask)
8209return 0;
8210 ;
8211 return 0;
8212}
8213_ACEOF
8214rm -f conftest.$ac_objext
ca81d7a0
JD
8215if { (ac_try="$ac_compile"
8216case "(($ac_try" in
8217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8218 *) ac_try_echo=$ac_try;;
8219esac
8220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8221 (eval "$ac_compile") 2>conftest.er1
96f3a036 8222 ac_status=$?
edfaf76d
LK
8223 grep -v '^ *+' conftest.er1 >conftest.err
8224 rm -f conftest.er1
8225 cat conftest.err >&5
96f3a036 8226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8227 (exit $ac_status); } && {
8228 test -z "$ac_c_werror_flag" ||
8229 test ! -s conftest.err
8230 } && test -s conftest.$ac_objext; then
96f3a036
DL
8231 ac_cv_member_struct_ifreq_ifr_netmask=yes
8232else
8233 echo "$as_me: failed program was:" >&5
8234sed 's/^/| /' conftest.$ac_ext >&5
8235
ca81d7a0 8236 ac_cv_member_struct_ifreq_ifr_netmask=no
96f3a036 8237fi
ca81d7a0
JD
8238
8239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8240fi
ca81d7a0
JD
8241
8242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8243fi
ca81d7a0
JD
8244{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_netmask" >&5
8245echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_netmask" >&6; }
96f3a036
DL
8246if test $ac_cv_member_struct_ifreq_ifr_netmask = yes; then
8247
8248cat >>confdefs.h <<_ACEOF
8249#define HAVE_STRUCT_IFREQ_IFR_NETMASK 1
8250_ACEOF
8251
8252
8253fi
ca81d7a0
JD
8254{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_broadaddr" >&5
8255echo $ECHO_N "checking for struct ifreq.ifr_broadaddr... $ECHO_C" >&6; }
96f3a036
DL
8256if test "${ac_cv_member_struct_ifreq_ifr_broadaddr+set}" = set; then
8257 echo $ECHO_N "(cached) $ECHO_C" >&6
8258else
8259 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8260/* confdefs.h. */
8261_ACEOF
8262cat confdefs.h >>conftest.$ac_ext
8263cat >>conftest.$ac_ext <<_ACEOF
8264/* end confdefs.h. */
7862d3a8
AS
8265$ac_includes_default
8266#if HAVE_SYS_SOCKET_H
8267#include <sys/socket.h>
8268#endif
8269#if HAVE_NET_IF_H
96f3a036 8270#include <net/if.h>
7862d3a8 8271#endif
96f3a036
DL
8272
8273int
8274main ()
8275{
8276static struct ifreq ac_aggr;
8277if (ac_aggr.ifr_broadaddr)
8278return 0;
8279 ;
8280 return 0;
8281}
8282_ACEOF
8283rm -f conftest.$ac_objext
ca81d7a0
JD
8284if { (ac_try="$ac_compile"
8285case "(($ac_try" in
8286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8287 *) ac_try_echo=$ac_try;;
8288esac
8289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8290 (eval "$ac_compile") 2>conftest.er1
96f3a036 8291 ac_status=$?
edfaf76d
LK
8292 grep -v '^ *+' conftest.er1 >conftest.err
8293 rm -f conftest.er1
8294 cat conftest.err >&5
96f3a036 8295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8296 (exit $ac_status); } && {
8297 test -z "$ac_c_werror_flag" ||
8298 test ! -s conftest.err
8299 } && test -s conftest.$ac_objext; then
96f3a036
DL
8300 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8301else
8302 echo "$as_me: failed program was:" >&5
8303sed 's/^/| /' conftest.$ac_ext >&5
8304
ca81d7a0 8305 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8306/* confdefs.h. */
8307_ACEOF
8308cat confdefs.h >>conftest.$ac_ext
8309cat >>conftest.$ac_ext <<_ACEOF
8310/* end confdefs.h. */
7862d3a8
AS
8311$ac_includes_default
8312#if HAVE_SYS_SOCKET_H
8313#include <sys/socket.h>
8314#endif
8315#if HAVE_NET_IF_H
96f3a036 8316#include <net/if.h>
7862d3a8 8317#endif
96f3a036
DL
8318
8319int
8320main ()
8321{
8322static struct ifreq ac_aggr;
8323if (sizeof ac_aggr.ifr_broadaddr)
8324return 0;
8325 ;
8326 return 0;
8327}
8328_ACEOF
8329rm -f conftest.$ac_objext
ca81d7a0
JD
8330if { (ac_try="$ac_compile"
8331case "(($ac_try" in
8332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8333 *) ac_try_echo=$ac_try;;
8334esac
8335eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8336 (eval "$ac_compile") 2>conftest.er1
96f3a036 8337 ac_status=$?
edfaf76d
LK
8338 grep -v '^ *+' conftest.er1 >conftest.err
8339 rm -f conftest.er1
8340 cat conftest.err >&5
96f3a036 8341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8342 (exit $ac_status); } && {
8343 test -z "$ac_c_werror_flag" ||
8344 test ! -s conftest.err
8345 } && test -s conftest.$ac_objext; then
96f3a036
DL
8346 ac_cv_member_struct_ifreq_ifr_broadaddr=yes
8347else
8348 echo "$as_me: failed program was:" >&5
8349sed 's/^/| /' conftest.$ac_ext >&5
8350
ca81d7a0 8351 ac_cv_member_struct_ifreq_ifr_broadaddr=no
96f3a036 8352fi
ca81d7a0
JD
8353
8354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8355fi
ca81d7a0
JD
8356
8357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8358fi
ca81d7a0
JD
8359{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_broadaddr" >&5
8360echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_broadaddr" >&6; }
96f3a036
DL
8361if test $ac_cv_member_struct_ifreq_ifr_broadaddr = yes; then
8362
8363cat >>confdefs.h <<_ACEOF
8364#define HAVE_STRUCT_IFREQ_IFR_BROADADDR 1
8365_ACEOF
8366
8367
8368fi
ca81d7a0
JD
8369{ echo "$as_me:$LINENO: checking for struct ifreq.ifr_addr" >&5
8370echo $ECHO_N "checking for struct ifreq.ifr_addr... $ECHO_C" >&6; }
96f3a036
DL
8371if test "${ac_cv_member_struct_ifreq_ifr_addr+set}" = set; then
8372 echo $ECHO_N "(cached) $ECHO_C" >&6
8373else
8374 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8375/* confdefs.h. */
8376_ACEOF
8377cat confdefs.h >>conftest.$ac_ext
8378cat >>conftest.$ac_ext <<_ACEOF
8379/* end confdefs.h. */
7862d3a8
AS
8380$ac_includes_default
8381#if HAVE_SYS_SOCKET_H
8382#include <sys/socket.h>
8383#endif
8384#if HAVE_NET_IF_H
96f3a036 8385#include <net/if.h>
7862d3a8 8386#endif
96f3a036
DL
8387
8388int
8389main ()
8390{
8391static struct ifreq ac_aggr;
8392if (ac_aggr.ifr_addr)
8393return 0;
8394 ;
8395 return 0;
8396}
8397_ACEOF
8398rm -f conftest.$ac_objext
ca81d7a0
JD
8399if { (ac_try="$ac_compile"
8400case "(($ac_try" in
8401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8402 *) ac_try_echo=$ac_try;;
8403esac
8404eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8405 (eval "$ac_compile") 2>conftest.er1
96f3a036 8406 ac_status=$?
edfaf76d
LK
8407 grep -v '^ *+' conftest.er1 >conftest.err
8408 rm -f conftest.er1
8409 cat conftest.err >&5
96f3a036 8410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8411 (exit $ac_status); } && {
8412 test -z "$ac_c_werror_flag" ||
8413 test ! -s conftest.err
8414 } && test -s conftest.$ac_objext; then
96f3a036
DL
8415 ac_cv_member_struct_ifreq_ifr_addr=yes
8416else
8417 echo "$as_me: failed program was:" >&5
8418sed 's/^/| /' conftest.$ac_ext >&5
8419
ca81d7a0 8420 cat >conftest.$ac_ext <<_ACEOF
96f3a036
DL
8421/* confdefs.h. */
8422_ACEOF
8423cat confdefs.h >>conftest.$ac_ext
8424cat >>conftest.$ac_ext <<_ACEOF
8425/* end confdefs.h. */
7862d3a8
AS
8426$ac_includes_default
8427#if HAVE_SYS_SOCKET_H
8428#include <sys/socket.h>
8429#endif
8430#if HAVE_NET_IF_H
96f3a036 8431#include <net/if.h>
7862d3a8 8432#endif
96f3a036
DL
8433
8434int
8435main ()
8436{
8437static struct ifreq ac_aggr;
8438if (sizeof ac_aggr.ifr_addr)
8439return 0;
8440 ;
8441 return 0;
8442}
8443_ACEOF
8444rm -f conftest.$ac_objext
ca81d7a0
JD
8445if { (ac_try="$ac_compile"
8446case "(($ac_try" in
8447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8448 *) ac_try_echo=$ac_try;;
8449esac
8450eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8451 (eval "$ac_compile") 2>conftest.er1
96f3a036 8452 ac_status=$?
edfaf76d
LK
8453 grep -v '^ *+' conftest.er1 >conftest.err
8454 rm -f conftest.er1
8455 cat conftest.err >&5
96f3a036 8456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8457 (exit $ac_status); } && {
8458 test -z "$ac_c_werror_flag" ||
8459 test ! -s conftest.err
8460 } && test -s conftest.$ac_objext; then
96f3a036
DL
8461 ac_cv_member_struct_ifreq_ifr_addr=yes
8462else
8463 echo "$as_me: failed program was:" >&5
8464sed 's/^/| /' conftest.$ac_ext >&5
8465
ca81d7a0 8466 ac_cv_member_struct_ifreq_ifr_addr=no
96f3a036 8467fi
ca81d7a0
JD
8468
8469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8470fi
ca81d7a0
JD
8471
8472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
96f3a036 8473fi
ca81d7a0
JD
8474{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_ifreq_ifr_addr" >&5
8475echo "${ECHO_T}$ac_cv_member_struct_ifreq_ifr_addr" >&6; }
96f3a036
DL
8476if test $ac_cv_member_struct_ifreq_ifr_addr = yes; then
8477
8478cat >>confdefs.h <<_ACEOF
8479#define HAVE_STRUCT_IFREQ_IFR_ADDR 1
8480_ACEOF
8481
8482
8483fi
8484
8799b3e4 8485
8799b3e4 8486
ca81d7a0
JD
8487{ echo "$as_me:$LINENO: checking for function prototypes" >&5
8488echo $ECHO_N "checking for function prototypes... $ECHO_C" >&6; }
8489if test "$ac_cv_prog_cc_c89" != no; then
8490 { echo "$as_me:$LINENO: result: yes" >&5
8491echo "${ECHO_T}yes" >&6; }
98418dba 8492
c0d27fcc 8493cat >>confdefs.h <<\_ACEOF
98418dba 8494#define PROTOTYPES 1
c0d27fcc
MR
8495_ACEOF
8496
8497
8498cat >>confdefs.h <<\_ACEOF
8499#define __PROTOTYPES 1
8500_ACEOF
98418dba
CW
8501
8502else
ca81d7a0
JD
8503 { echo "$as_me:$LINENO: result: no" >&5
8504echo "${ECHO_T}no" >&6; }
98418dba
CW
8505fi
8506
ca81d7a0
JD
8507{ echo "$as_me:$LINENO: checking for working volatile" >&5
8508echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
98418dba
CW
8509if test "${ac_cv_c_volatile+set}" = set; then
8510 echo $ECHO_N "(cached) $ECHO_C" >&6
8511else
8512 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8513/* confdefs.h. */
8514_ACEOF
8515cat confdefs.h >>conftest.$ac_ext
8516cat >>conftest.$ac_ext <<_ACEOF
8517/* end confdefs.h. */
98418dba 8518
98418dba
CW
8519int
8520main ()
8521{
8522
8523volatile int x;
ca81d7a0
JD
8524int * volatile y = (int *) 0;
8525return !x && !y;
98418dba
CW
8526 ;
8527 return 0;
8528}
8529_ACEOF
8530rm -f conftest.$ac_objext
ca81d7a0
JD
8531if { (ac_try="$ac_compile"
8532case "(($ac_try" in
8533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8534 *) ac_try_echo=$ac_try;;
8535esac
8536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8537 (eval "$ac_compile") 2>conftest.er1
98418dba 8538 ac_status=$?
edfaf76d
LK
8539 grep -v '^ *+' conftest.er1 >conftest.err
8540 rm -f conftest.er1
8541 cat conftest.err >&5
c0d27fcc 8542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8543 (exit $ac_status); } && {
8544 test -z "$ac_c_werror_flag" ||
8545 test ! -s conftest.err
8546 } && test -s conftest.$ac_objext; then
98418dba
CW
8547 ac_cv_c_volatile=yes
8548else
8549 echo "$as_me: failed program was:" >&5
19650fd6
AS
8550sed 's/^/| /' conftest.$ac_ext >&5
8551
ca81d7a0 8552 ac_cv_c_volatile=no
98418dba 8553fi
ca81d7a0
JD
8554
8555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8556fi
ca81d7a0
JD
8557{ echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
8558echo "${ECHO_T}$ac_cv_c_volatile" >&6; }
98418dba
CW
8559if test $ac_cv_c_volatile = no; then
8560
c0d27fcc 8561cat >>confdefs.h <<\_ACEOF
98418dba 8562#define volatile
c0d27fcc 8563_ACEOF
98418dba
CW
8564
8565fi
8566
ca81d7a0
JD
8567{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
8568echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
98418dba
CW
8569if test "${ac_cv_c_const+set}" = set; then
8570 echo $ECHO_N "(cached) $ECHO_C" >&6
8571else
8572 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8573/* confdefs.h. */
8574_ACEOF
8575cat confdefs.h >>conftest.$ac_ext
8576cat >>conftest.$ac_ext <<_ACEOF
8577/* end confdefs.h. */
98418dba 8578
98418dba
CW
8579int
8580main ()
8581{
8582/* FIXME: Include the comments suggested by Paul. */
8583#ifndef __cplusplus
8584 /* Ultrix mips cc rejects this. */
8585 typedef int charset[2];
f053c89f 8586 const charset cs;
98418dba 8587 /* SunOS 4.1.1 cc rejects this. */
f053c89f
CY
8588 char const *const *pcpcc;
8589 char **ppc;
98418dba
CW
8590 /* NEC SVR4.0.2 mips cc rejects this. */
8591 struct point {int x, y;};
8592 static struct point const zero = {0,0};
8593 /* AIX XL C 1.02.0.0 rejects this.
8594 It does not let you subtract one const X* pointer from another in
8595 an arm of an if-expression whose if-part is not a constant
8596 expression */
8597 const char *g = "string";
f053c89f 8598 pcpcc = &g + (g ? g-g : 0);
98418dba 8599 /* HPUX 7.0 cc rejects these. */
f053c89f
CY
8600 ++pcpcc;
8601 ppc = (char**) pcpcc;
8602 pcpcc = (char const *const *) ppc;
98418dba
CW
8603 { /* SCO 3.2v4 cc rejects this. */
8604 char *t;
8605 char const *s = 0 ? (char *) 0 : (char const *) 0;
8606
8607 *t++ = 0;
ca81d7a0 8608 if (s) return 0;
98418dba
CW
8609 }
8610 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
8611 int x[] = {25, 17};
8612 const int *foo = &x[0];
8613 ++foo;
8614 }
8615 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
8616 typedef const int *iptr;
8617 iptr p = 0;
8618 ++p;
8619 }
8620 { /* AIX XL C 1.02.0.0 rejects this saying
8621 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
8622 struct s { int j; const int *ap[3]; };
8623 struct s *b; b->j = 5;
8624 }
8625 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
8626 const int foo = 10;
ca81d7a0 8627 if (!foo) return 0;
98418dba 8628 }
f053c89f 8629 return !cs[0] && !zero.x;
98418dba
CW
8630#endif
8631
8632 ;
8633 return 0;
8634}
8635_ACEOF
8636rm -f conftest.$ac_objext
ca81d7a0
JD
8637if { (ac_try="$ac_compile"
8638case "(($ac_try" in
8639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8640 *) ac_try_echo=$ac_try;;
8641esac
8642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8643 (eval "$ac_compile") 2>conftest.er1
98418dba 8644 ac_status=$?
edfaf76d
LK
8645 grep -v '^ *+' conftest.er1 >conftest.err
8646 rm -f conftest.er1
8647 cat conftest.err >&5
c0d27fcc 8648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8649 (exit $ac_status); } && {
8650 test -z "$ac_c_werror_flag" ||
8651 test ! -s conftest.err
8652 } && test -s conftest.$ac_objext; then
98418dba
CW
8653 ac_cv_c_const=yes
8654else
8655 echo "$as_me: failed program was:" >&5
19650fd6
AS
8656sed 's/^/| /' conftest.$ac_ext >&5
8657
ca81d7a0 8658 ac_cv_c_const=no
98418dba 8659fi
ca81d7a0
JD
8660
8661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8662fi
ca81d7a0
JD
8663{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
8664echo "${ECHO_T}$ac_cv_c_const" >&6; }
98418dba
CW
8665if test $ac_cv_c_const = no; then
8666
c0d27fcc 8667cat >>confdefs.h <<\_ACEOF
98418dba 8668#define const
c0d27fcc 8669_ACEOF
98418dba
CW
8670
8671fi
8672
ca81d7a0
JD
8673{ echo "$as_me:$LINENO: checking for void * support" >&5
8674echo $ECHO_N "checking for void * support... $ECHO_C" >&6; }
98418dba
CW
8675if test "${emacs_cv_void_star+set}" = set; then
8676 echo $ECHO_N "(cached) $ECHO_C" >&6
8677else
8678 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8679/* confdefs.h. */
8680_ACEOF
8681cat confdefs.h >>conftest.$ac_ext
8682cat >>conftest.$ac_ext <<_ACEOF
8683/* end confdefs.h. */
98418dba 8684
98418dba
CW
8685int
8686main ()
8687{
8688void * foo;
8689 ;
8690 return 0;
8691}
8692_ACEOF
8693rm -f conftest.$ac_objext
ca81d7a0
JD
8694if { (ac_try="$ac_compile"
8695case "(($ac_try" in
8696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8697 *) ac_try_echo=$ac_try;;
8698esac
8699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8700 (eval "$ac_compile") 2>conftest.er1
98418dba 8701 ac_status=$?
edfaf76d
LK
8702 grep -v '^ *+' conftest.er1 >conftest.err
8703 rm -f conftest.er1
8704 cat conftest.err >&5
c0d27fcc 8705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8706 (exit $ac_status); } && {
8707 test -z "$ac_c_werror_flag" ||
8708 test ! -s conftest.err
8709 } && test -s conftest.$ac_objext; then
98418dba
CW
8710 emacs_cv_void_star=yes
8711else
8712 echo "$as_me: failed program was:" >&5
19650fd6
AS
8713sed 's/^/| /' conftest.$ac_ext >&5
8714
ca81d7a0 8715 emacs_cv_void_star=no
98418dba 8716fi
ca81d7a0
JD
8717
8718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 8719fi
ca81d7a0
JD
8720{ echo "$as_me:$LINENO: result: $emacs_cv_void_star" >&5
8721echo "${ECHO_T}$emacs_cv_void_star" >&6; }
98418dba 8722if test $emacs_cv_void_star = yes; then
c0d27fcc 8723 cat >>confdefs.h <<\_ACEOF
98418dba 8724#define POINTER_TYPE void
c0d27fcc 8725_ACEOF
98418dba
CW
8726
8727else
c0d27fcc 8728 cat >>confdefs.h <<\_ACEOF
98418dba 8729#define POINTER_TYPE char
c0d27fcc 8730_ACEOF
98418dba
CW
8731
8732fi
8733
c0d27fcc 8734
4494a266
JD
8735
8736
cd958eb3 8737
ca81d7a0
JD
8738{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
8739echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
8740set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
8741if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
8742 echo $ECHO_N "(cached) $ECHO_C" >&6
8743else
c0d27fcc 8744 cat >conftest.make <<\_ACEOF
ca81d7a0 8745SHELL = /bin/sh
98418dba 8746all:
ca81d7a0 8747 @echo '@@@%%%=$(MAKE)=@@@%%%'
c0d27fcc 8748_ACEOF
98418dba 8749# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8750case `${MAKE-make} -f conftest.make 2>/dev/null` in
8751 *@@@%%%=?*=@@@%%%*)
8752 eval ac_cv_prog_make_${ac_make}_set=yes;;
8753 *)
8754 eval ac_cv_prog_make_${ac_make}_set=no;;
8755esac
98418dba
CW
8756rm -f conftest.make
8757fi
ca81d7a0
JD
8758if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
8759 { echo "$as_me:$LINENO: result: yes" >&5
8760echo "${ECHO_T}yes" >&6; }
98418dba
CW
8761 SET_MAKE=
8762else
ca81d7a0
JD
8763 { echo "$as_me:$LINENO: result: no" >&5
8764echo "${ECHO_T}no" >&6; }
98418dba
CW
8765 SET_MAKE="MAKE=${MAKE-make}"
8766fi
8767
c0d27fcc 8768
ca81d7a0
JD
8769{ echo "$as_me:$LINENO: checking for long file names" >&5
8770echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
98418dba
CW
8771if test "${ac_cv_sys_long_file_names+set}" = set; then
8772 echo $ECHO_N "(cached) $ECHO_C" >&6
8773else
8774 ac_cv_sys_long_file_names=yes
8775# Test for long file names in all the places we know might matter:
8776# . the current directory, where building will happen
8777# $prefix/lib where we will be installing things
8778# $exec_prefix/lib likewise
98418dba 8779# $TMPDIR if set, where it might want to write temporary files
98418dba
CW
8780# /tmp where it might want to write temporary files
8781# /var/tmp likewise
8782# /usr/tmp likewise
ca81d7a0
JD
8783for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8784 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8785 # in the usual case where exec_prefix is '${prefix}'.
8786 case $ac_dir in #(
8787 . | /* | ?:[\\/]*) ;; #(
8788 *) continue;;
8789 esac
8790 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
98418dba 8791 ac_xdir=$ac_dir/cf$$
ca81d7a0 8792 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
98418dba
CW
8793 ac_tf1=$ac_xdir/conftest9012345
8794 ac_tf2=$ac_xdir/conftest9012346
ca81d7a0 8795 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
98418dba 8796 ac_cv_sys_long_file_names=no
ca81d7a0
JD
8797 rm -f -r "$ac_xdir" 2>/dev/null
8798 test $ac_cv_sys_long_file_names = no && break
98418dba
CW
8799done
8800fi
ca81d7a0
JD
8801{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
8802echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
98418dba
CW
8803if test $ac_cv_sys_long_file_names = yes; then
8804
c0d27fcc 8805cat >>confdefs.h <<\_ACEOF
98418dba 8806#define HAVE_LONG_FILE_NAMES 1
c0d27fcc 8807_ACEOF
98418dba
CW
8808
8809fi
8810
c0d27fcc 8811
98418dba
CW
8812#### Choose a window system.
8813
ca81d7a0
JD
8814{ echo "$as_me:$LINENO: checking for X" >&5
8815echo $ECHO_N "checking for X... $ECHO_C" >&6; }
98418dba 8816
c0d27fcc 8817
ca81d7a0 8818# Check whether --with-x was given.
98418dba 8819if test "${with_x+set}" = set; then
ca81d7a0
JD
8820 withval=$with_x;
8821fi
98418dba 8822
98418dba
CW
8823# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8824if test "x$with_x" = xno; then
8825 # The user explicitly disabled X.
8826 have_x=disabled
8827else
ca81d7a0
JD
8828 case $x_includes,$x_libraries in #(
8829 *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5
8830echo "$as_me: error: Cannot use X directory names containing '" >&2;}
8831 { (exit 1); exit 1; }; };; #(
8832 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
98418dba
CW
8833 echo $ECHO_N "(cached) $ECHO_C" >&6
8834else
8835 # One or both of the vars are not set, and there is no cached value.
8836ac_x_includes=no ac_x_libraries=no
ca81d7a0 8837rm -f -r conftest.dir
98418dba
CW
8838if mkdir conftest.dir; then
8839 cd conftest.dir
c0d27fcc 8840 cat >Imakefile <<'_ACEOF'
ca81d7a0
JD
8841incroot:
8842 @echo incroot='${INCROOT}'
8843usrlibdir:
8844 @echo usrlibdir='${USRLIBDIR}'
8845libdir:
8846 @echo libdir='${LIBDIR}'
8847_ACEOF
8848 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
98418dba 8849 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
ca81d7a0
JD
8850 for ac_var in incroot usrlibdir libdir; do
8851 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8852 done
98418dba
CW
8853 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8854 for ac_extension in a so sl; do
ca81d7a0
JD
8855 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8856 test -f "$ac_im_libdir/libX11.$ac_extension"; then
edfaf76d 8857 ac_im_usrlibdir=$ac_im_libdir; break
98418dba
CW
8858 fi
8859 done
8860 # Screen out bogus values from the imake configuration. They are
8861 # bogus both because they are the default anyway, and because
8862 # using them would break gcc on systems where it needs fixed includes.
8863 case $ac_im_incroot in
ca81d7a0 8864 /usr/include) ac_x_includes= ;;
98418dba
CW
8865 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8866 esac
8867 case $ac_im_usrlibdir in
8868 /usr/lib | /lib) ;;
8869 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8870 esac
8871 fi
8872 cd ..
ca81d7a0 8873 rm -f -r conftest.dir
98418dba
CW
8874fi
8875
8876# Standard set of common directories for X headers.
8877# Check X11 before X11Rn because it is often a symlink to the current release.
8878ac_x_header_dirs='
8879/usr/X11/include
8880/usr/X11R6/include
8881/usr/X11R5/include
8882/usr/X11R4/include
8883
8884/usr/include/X11
8885/usr/include/X11R6
8886/usr/include/X11R5
8887/usr/include/X11R4
8888
8889/usr/local/X11/include
8890/usr/local/X11R6/include
8891/usr/local/X11R5/include
8892/usr/local/X11R4/include
8893
8894/usr/local/include/X11
8895/usr/local/include/X11R6
8896/usr/local/include/X11R5
8897/usr/local/include/X11R4
8898
8899/usr/X386/include
8900/usr/x386/include
8901/usr/XFree86/include/X11
8902
8903/usr/include
8904/usr/local/include
8905/usr/unsupported/include
8906/usr/athena/include
8907/usr/local/x11r5/include
8908/usr/lpp/Xamples/include
8909
8910/usr/openwin/include
8911/usr/openwin/share/include'
8912
8913if test "$ac_x_includes" = no; then
ca81d7a0 8914 # Guess where to find include files, by looking for Xlib.h.
98418dba
CW
8915 # First, try using that file with no special directory specified.
8916 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8917/* confdefs.h. */
8918_ACEOF
8919cat confdefs.h >>conftest.$ac_ext
8920cat >>conftest.$ac_ext <<_ACEOF
8921/* end confdefs.h. */
ca81d7a0 8922#include <X11/Xlib.h>
98418dba 8923_ACEOF
ca81d7a0
JD
8924if { (ac_try="$ac_cpp conftest.$ac_ext"
8925case "(($ac_try" in
8926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8927 *) ac_try_echo=$ac_try;;
8928esac
8929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8930 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 8931 ac_status=$?
6bae0ccf 8932 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
8933 rm -f conftest.er1
8934 cat conftest.err >&5
c0d27fcc 8935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8936 (exit $ac_status); } >/dev/null && {
8937 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8938 test ! -s conftest.err
8939 }; then
98418dba
CW
8940 # We can compile using X headers with no special include directory.
8941ac_x_includes=
8942else
8943 echo "$as_me: failed program was:" >&5
19650fd6
AS
8944sed 's/^/| /' conftest.$ac_ext >&5
8945
98418dba 8946 for ac_dir in $ac_x_header_dirs; do
ca81d7a0 8947 if test -r "$ac_dir/X11/Xlib.h"; then
98418dba
CW
8948 ac_x_includes=$ac_dir
8949 break
8950 fi
8951done
8952fi
ca81d7a0 8953
98418dba
CW
8954rm -f conftest.err conftest.$ac_ext
8955fi # $ac_x_includes = no
8956
8957if test "$ac_x_libraries" = no; then
8958 # Check for the libraries.
8959 # See if we find them without any special options.
8960 # Don't add to $LIBS permanently.
8961 ac_save_LIBS=$LIBS
f053c89f 8962 LIBS="-lX11 $LIBS"
98418dba 8963 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
8964/* confdefs.h. */
8965_ACEOF
8966cat confdefs.h >>conftest.$ac_ext
8967cat >>conftest.$ac_ext <<_ACEOF
8968/* end confdefs.h. */
ca81d7a0 8969#include <X11/Xlib.h>
98418dba
CW
8970int
8971main ()
8972{
ca81d7a0 8973XrmInitialize ()
98418dba
CW
8974 ;
8975 return 0;
8976}
8977_ACEOF
8978rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
8979if { (ac_try="$ac_link"
8980case "(($ac_try" in
8981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8982 *) ac_try_echo=$ac_try;;
8983esac
8984eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8985 (eval "$ac_link") 2>conftest.er1
98418dba 8986 ac_status=$?
edfaf76d
LK
8987 grep -v '^ *+' conftest.er1 >conftest.err
8988 rm -f conftest.er1
8989 cat conftest.err >&5
c0d27fcc 8990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
8991 (exit $ac_status); } && {
8992 test -z "$ac_c_werror_flag" ||
8993 test ! -s conftest.err
8994 } && test -s conftest$ac_exeext &&
8995 $as_test_x conftest$ac_exeext; then
98418dba
CW
8996 LIBS=$ac_save_LIBS
8997# We can link X programs with no special library path.
8998ac_x_libraries=
8999else
9000 echo "$as_me: failed program was:" >&5
19650fd6
AS
9001sed 's/^/| /' conftest.$ac_ext >&5
9002
ca81d7a0 9003 LIBS=$ac_save_LIBS
98418dba
CW
9004for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9005do
9006 # Don't even attempt the hair of trying to link an X program!
9007 for ac_extension in a so sl; do
f053c89f 9008 if test -r "$ac_dir/libX11.$ac_extension"; then
98418dba
CW
9009 ac_x_libraries=$ac_dir
9010 break 2
9011 fi
9012 done
9013done
9014fi
ca81d7a0 9015
f053c89f 9016rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9017 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
9018fi # $ac_x_libraries = no
9019
ca81d7a0
JD
9020case $ac_x_includes,$ac_x_libraries in #(
9021 no,* | *,no | *\'*)
9022 # Didn't find X, or a directory has "'" in its name.
9023 ac_cv_have_x="have_x=no";; #(
9024 *)
9025 # Record where we found X for the cache.
9026 ac_cv_have_x="have_x=yes\
9027 ac_x_includes='$ac_x_includes'\
9028 ac_x_libraries='$ac_x_libraries'"
9029esac
98418dba 9030fi
ca81d7a0
JD
9031;; #(
9032 *) have_x=yes;;
9033 esac
98418dba
CW
9034 eval "$ac_cv_have_x"
9035fi # $with_x != no
9036
9037if test "$have_x" != yes; then
ca81d7a0
JD
9038 { echo "$as_me:$LINENO: result: $have_x" >&5
9039echo "${ECHO_T}$have_x" >&6; }
98418dba
CW
9040 no_x=yes
9041else
9042 # If each of the values was on the command line, it overrides each guess.
9043 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9044 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9045 # Update the cache value to reflect the command line values.
ca81d7a0
JD
9046 ac_cv_have_x="have_x=yes\
9047 ac_x_includes='$x_includes'\
9048 ac_x_libraries='$x_libraries'"
9049 { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
9050echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; }
98418dba
CW
9051fi
9052
9053if test "$no_x" = yes; then
9054 window_system=none
9055else
9056 window_system=x11
9057fi
9058
92d1ccf4
AS
9059if test "${x_libraries}" != NONE; then
9060 if test -n "${x_libraries}"; then
9061 LD_SWITCH_X_SITE=-L`echo ${x_libraries} | sed -e "s/:/ -L/g"`
9062 LD_SWITCH_X_SITE_AUX=-R`echo ${x_libraries} | sed -e "s/:/ -R/g"`
9063 fi
98418dba 9064 x_default_search_path=""
92d1ccf4
AS
9065 x_search_path=${x_libraries}
9066 if test -z "${x_search_path}"; then
9067 x_search_path=/usr/lib
9068 fi
9069 for x_library in `echo ${x_search_path}: | \
9070 sed -e "s/:/ /g" -e p -e "s:/lib[^ /]* :/share :g"`; do
98418dba
CW
9071 x_search_path="\
9072${x_library}/X11/%L/%T/%N%C%S:\
9073${x_library}/X11/%l/%T/%N%C%S:\
9074${x_library}/X11/%T/%N%C%S:\
9075${x_library}/X11/%L/%T/%N%S:\
9076${x_library}/X11/%l/%T/%N%S:\
9077${x_library}/X11/%T/%N%S"
9078 if test x"${x_default_search_path}" = x; then
9079 x_default_search_path=${x_search_path}
9080 else
9081 x_default_search_path="${x_search_path}:${x_default_search_path}"
9082 fi
9083 done
9084fi
9085if test "${x_includes}" != NONE && test -n "${x_includes}"; then
9086 C_SWITCH_X_SITE=-I`echo ${x_includes} | sed -e "s/:/ -I/g"`
9087fi
9088
9089if test x"${x_includes}" = x; then
9090 bitmapdir=/usr/include/X11/bitmaps
9091else
9092 # accumulate include directories that have X11 bitmap subdirectories
9093 bmd_acc="dummyval"
9094 for bmd in `echo ${x_includes} | sed -e "s/:/ /g"`; do
9095 if test -d "${bmd}/X11/bitmaps"; then
9096 bmd_acc="${bmd_acc}:${bmd}/X11/bitmaps"
9097 fi
9098 if test -d "${bmd}/bitmaps"; then
9099 bmd_acc="${bmd_acc}:${bmd}/bitmaps"
9100 fi
9101 done
9102 if test ${bmd_acc} != "dummyval"; then
9103 bitmapdir=`echo ${bmd_acc} | sed -e "s/^dummyval://"`
9104 fi
9105fi
9106
5d6da11e 9107HAVE_CARBON=no
1d4d5604
YM
9108if test "${with_carbon}" != no; then
9109 if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
ca81d7a0
JD
9110 { echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9111echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9112if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9113 echo $ECHO_N "(cached) $ECHO_C" >&6
9114fi
ca81d7a0
JD
9115{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9116echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9117else
9118 # Is the header compilable?
ca81d7a0
JD
9119{ echo "$as_me:$LINENO: checking Carbon/Carbon.h usability" >&5
9120echo $ECHO_N "checking Carbon/Carbon.h usability... $ECHO_C" >&6; }
5d6da11e
YM
9121cat >conftest.$ac_ext <<_ACEOF
9122/* confdefs.h. */
9123_ACEOF
9124cat confdefs.h >>conftest.$ac_ext
9125cat >>conftest.$ac_ext <<_ACEOF
9126/* end confdefs.h. */
9127$ac_includes_default
9128#include <Carbon/Carbon.h>
9129_ACEOF
9130rm -f conftest.$ac_objext
ca81d7a0
JD
9131if { (ac_try="$ac_compile"
9132case "(($ac_try" in
9133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9134 *) ac_try_echo=$ac_try;;
9135esac
9136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9137 (eval "$ac_compile") 2>conftest.er1
5d6da11e 9138 ac_status=$?
edfaf76d
LK
9139 grep -v '^ *+' conftest.er1 >conftest.err
9140 rm -f conftest.er1
9141 cat conftest.err >&5
5d6da11e 9142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9143 (exit $ac_status); } && {
9144 test -z "$ac_c_werror_flag" ||
9145 test ! -s conftest.err
9146 } && test -s conftest.$ac_objext; then
5d6da11e
YM
9147 ac_header_compiler=yes
9148else
9149 echo "$as_me: failed program was:" >&5
9150sed 's/^/| /' conftest.$ac_ext >&5
9151
ca81d7a0 9152 ac_header_compiler=no
5d6da11e 9153fi
ca81d7a0
JD
9154
9155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9156{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9157echo "${ECHO_T}$ac_header_compiler" >&6; }
5d6da11e
YM
9158
9159# Is the header present?
ca81d7a0
JD
9160{ echo "$as_me:$LINENO: checking Carbon/Carbon.h presence" >&5
9161echo $ECHO_N "checking Carbon/Carbon.h presence... $ECHO_C" >&6; }
5d6da11e
YM
9162cat >conftest.$ac_ext <<_ACEOF
9163/* confdefs.h. */
9164_ACEOF
9165cat confdefs.h >>conftest.$ac_ext
9166cat >>conftest.$ac_ext <<_ACEOF
9167/* end confdefs.h. */
9168#include <Carbon/Carbon.h>
9169_ACEOF
ca81d7a0
JD
9170if { (ac_try="$ac_cpp conftest.$ac_ext"
9171case "(($ac_try" in
9172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9173 *) ac_try_echo=$ac_try;;
9174esac
9175eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9176 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
5d6da11e
YM
9177 ac_status=$?
9178 grep -v '^ *+' conftest.er1 >conftest.err
9179 rm -f conftest.er1
9180 cat conftest.err >&5
9181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9182 (exit $ac_status); } >/dev/null && {
9183 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9184 test ! -s conftest.err
9185 }; then
5d6da11e
YM
9186 ac_header_preproc=yes
9187else
9188 echo "$as_me: failed program was:" >&5
9189sed 's/^/| /' conftest.$ac_ext >&5
9190
9191 ac_header_preproc=no
9192fi
ca81d7a0 9193
5d6da11e 9194rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9195{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9196echo "${ECHO_T}$ac_header_preproc" >&6; }
5d6da11e
YM
9197
9198# So? What about this header?
edfaf76d
LK
9199case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9200 yes:no: )
5d6da11e
YM
9201 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&5
9202echo "$as_me: WARNING: Carbon/Carbon.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9203 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&5
9204echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the compiler's result" >&2;}
9205 ac_header_preproc=yes
5d6da11e 9206 ;;
edfaf76d 9207 no:yes:* )
5d6da11e
YM
9208 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&5
9209echo "$as_me: WARNING: Carbon/Carbon.h: present but cannot be compiled" >&2;}
edfaf76d
LK
9210 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&5
9211echo "$as_me: WARNING: Carbon/Carbon.h: check for missing prerequisite headers?" >&2;}
9212 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&5
9213echo "$as_me: WARNING: Carbon/Carbon.h: see the Autoconf documentation" >&2;}
9214 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&5
9215echo "$as_me: WARNING: Carbon/Carbon.h: section \"Present But Cannot Be Compiled\"" >&2;}
5d6da11e
YM
9216 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&5
9217echo "$as_me: WARNING: Carbon/Carbon.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9218 { echo "$as_me:$LINENO: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&5
9219echo "$as_me: WARNING: Carbon/Carbon.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9220
5d6da11e
YM
9221 ;;
9222esac
ca81d7a0
JD
9223{ echo "$as_me:$LINENO: checking for Carbon/Carbon.h" >&5
9224echo $ECHO_N "checking for Carbon/Carbon.h... $ECHO_C" >&6; }
5d6da11e
YM
9225if test "${ac_cv_header_Carbon_Carbon_h+set}" = set; then
9226 echo $ECHO_N "(cached) $ECHO_C" >&6
9227else
9228 ac_cv_header_Carbon_Carbon_h=$ac_header_preproc
9229fi
ca81d7a0
JD
9230{ echo "$as_me:$LINENO: result: $ac_cv_header_Carbon_Carbon_h" >&5
9231echo "${ECHO_T}$ac_cv_header_Carbon_Carbon_h" >&6; }
5d6da11e
YM
9232
9233fi
9234if test $ac_cv_header_Carbon_Carbon_h = yes; then
9235 HAVE_CARBON=yes
9236fi
9237
9238
1d4d5604
YM
9239fi
9240if test "${window_system}" = x11 && test "${HAVE_CARBON}" = yes; then
9241 if test "${with_carbon+set}" != set \
9242 && test "${carbon_appdir_x+set}" != set; then
9d2818d6 9243 for var in with_x with_x_toolkit with_xim \
ec8fcb10
YM
9244 with_xpm with_jpeg with_tiff with_gif with_png; do
9245 if eval test \"\${$var+set}\" = set; then
9246 HAVE_CARBON=no
9247 break
9248 fi
9249 done
5d6da11e
YM
9250 fi
9251fi
1d4d5604
YM
9252if test "${HAVE_CARBON}" = yes; then
9253 window_system=mac
9254fi
9255
9256case "${window_system}" in
9257 x11 )
9258 HAVE_X_WINDOWS=yes
9259 HAVE_X11=yes
9260 case "${with_x_toolkit}" in
9261 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
9262 motif ) USE_X_TOOLKIT=MOTIF ;;
9263 gtk ) with_gtk=yes
9264 USE_X_TOOLKIT=none ;;
9265 no ) USE_X_TOOLKIT=none ;;
9d2818d6 9266 * ) USE_X_TOOLKIT=maybe ;;
1d4d5604
YM
9267 esac
9268 ;;
9269 mac | none )
9270 HAVE_X_WINDOWS=no
9271 HAVE_X11=no
9272 USE_X_TOOLKIT=none
9273 ;;
9274esac
9275
cfe440b8
JD
9276if test "$window_system" = none && test "X$with_x" != "Xno"; then
9277 # Extract the first word of "X", so it can be a program name with args.
9278set dummy X; ac_word=$2
9279{ echo "$as_me:$LINENO: checking for $ac_word" >&5
9280echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
9281if test "${ac_cv_prog_HAVE_XSERVER+set}" = set; then
9282 echo $ECHO_N "(cached) $ECHO_C" >&6
9283else
9284 if test -n "$HAVE_XSERVER"; then
9285 ac_cv_prog_HAVE_XSERVER="$HAVE_XSERVER" # Let the user override the test.
9286else
9287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9288for as_dir in $PATH
9289do
9290 IFS=$as_save_IFS
9291 test -z "$as_dir" && as_dir=.
9292 for ac_exec_ext in '' $ac_executable_extensions; do
9293 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9294 ac_cv_prog_HAVE_XSERVER="true"
9295 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
9296 break 2
9297 fi
9298done
9299done
9300IFS=$as_save_IFS
9301
9302 test -z "$ac_cv_prog_HAVE_XSERVER" && ac_cv_prog_HAVE_XSERVER="false"
9303fi
9304fi
9305HAVE_XSERVER=$ac_cv_prog_HAVE_XSERVER
9306if test -n "$HAVE_XSERVER"; then
9307 { echo "$as_me:$LINENO: result: $HAVE_XSERVER" >&5
9308echo "${ECHO_T}$HAVE_XSERVER" >&6; }
9309else
9310 { echo "$as_me:$LINENO: result: no" >&5
9311echo "${ECHO_T}no" >&6; }
9312fi
9313
9314
9315 if test "$HAVE_XSERVER" = true ||
9316 test -n "$DISPLAY" ||
9317 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9318 { { echo "$as_me:$LINENO: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9319were found. You should install the relevant development files for X
9320and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9321sure you have development files for image handling, i.e.
9322tiff, gif, jpeg, png and xpm.
9323If you are sure you want Emacs compiled without X window support, pass
9324 --without-x
9325to configure." >&5
9326echo "$as_me: error: You seem to be running X, but no X development libraries
9bdeb5e9
MB
9327were found. You should install the relevant development files for X
9328and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
cfe440b8
JD
9329sure you have development files for image handling, i.e.
9330tiff, gif, jpeg, png and xpm.
9331If you are sure you want Emacs compiled without X window support, pass
9332 --without-x
9333to configure." >&2;}
9334 { (exit 1); exit 1; }; }
9335 fi
9336fi
9337
1d4d5604
YM
9338### If we're using X11, we should use the X menu package.
9339HAVE_MENUS=no
9340case ${HAVE_X11} in
9341 yes ) HAVE_MENUS=yes ;;
9342esac
9343
98418dba
CW
9344### Compute the unexec source name from the object name.
9345UNEXEC_SRC="`echo ${unexec} | sed 's/\.o/.c/'`"
9346
9347# Do the opsystem or machine files prohibit the use of the GNU malloc?
9348# Assume not, until told otherwise.
9349GNU_MALLOC=yes
9350doug_lea_malloc=yes
ca81d7a0
JD
9351{ echo "$as_me:$LINENO: checking for malloc_get_state" >&5
9352echo $ECHO_N "checking for malloc_get_state... $ECHO_C" >&6; }
98418dba
CW
9353if test "${ac_cv_func_malloc_get_state+set}" = set; then
9354 echo $ECHO_N "(cached) $ECHO_C" >&6
9355else
9356 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9357/* confdefs.h. */
9358_ACEOF
9359cat confdefs.h >>conftest.$ac_ext
9360cat >>conftest.$ac_ext <<_ACEOF
9361/* end confdefs.h. */
edfaf76d
LK
9362/* Define malloc_get_state to an innocuous variant, in case <limits.h> declares malloc_get_state.
9363 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9364#define malloc_get_state innocuous_malloc_get_state
9365
98418dba 9366/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9367 which can conflict with char malloc_get_state (); below.
9368 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9369 <limits.h> exists even on freestanding compilers. */
edfaf76d 9370
19650fd6
AS
9371#ifdef __STDC__
9372# include <limits.h>
9373#else
9374# include <assert.h>
9375#endif
edfaf76d
LK
9376
9377#undef malloc_get_state
9378
ca81d7a0
JD
9379/* Override any GCC internal prototype to avoid an error.
9380 Use char because int might match the return type of a GCC
9381 builtin and then its argument prototype would still apply. */
98418dba
CW
9382#ifdef __cplusplus
9383extern "C"
9384#endif
98418dba 9385char malloc_get_state ();
98418dba
CW
9386/* The GNU C library defines this for functions which it implements
9387 to always fail with ENOSYS. Some functions are actually named
9388 something starting with __ and the normal name is an alias. */
ca81d7a0 9389#if defined __stub_malloc_get_state || defined __stub___malloc_get_state
98418dba 9390choke me
98418dba
CW
9391#endif
9392
19650fd6
AS
9393int
9394main ()
9395{
ca81d7a0 9396return malloc_get_state ();
98418dba
CW
9397 ;
9398 return 0;
9399}
9400_ACEOF
9401rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9402if { (ac_try="$ac_link"
9403case "(($ac_try" in
9404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9405 *) ac_try_echo=$ac_try;;
9406esac
9407eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9408 (eval "$ac_link") 2>conftest.er1
98418dba 9409 ac_status=$?
edfaf76d
LK
9410 grep -v '^ *+' conftest.er1 >conftest.err
9411 rm -f conftest.er1
9412 cat conftest.err >&5
c0d27fcc 9413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9414 (exit $ac_status); } && {
9415 test -z "$ac_c_werror_flag" ||
9416 test ! -s conftest.err
9417 } && test -s conftest$ac_exeext &&
9418 $as_test_x conftest$ac_exeext; then
98418dba
CW
9419 ac_cv_func_malloc_get_state=yes
9420else
9421 echo "$as_me: failed program was:" >&5
19650fd6
AS
9422sed 's/^/| /' conftest.$ac_ext >&5
9423
ca81d7a0 9424 ac_cv_func_malloc_get_state=no
98418dba 9425fi
ca81d7a0 9426
f053c89f 9427rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9428 conftest$ac_exeext conftest.$ac_ext
98418dba 9429fi
ca81d7a0
JD
9430{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_get_state" >&5
9431echo "${ECHO_T}$ac_cv_func_malloc_get_state" >&6; }
98418dba
CW
9432if test $ac_cv_func_malloc_get_state = yes; then
9433 :
9434else
9435 doug_lea_malloc=no
9436fi
9437
ca81d7a0
JD
9438{ echo "$as_me:$LINENO: checking for malloc_set_state" >&5
9439echo $ECHO_N "checking for malloc_set_state... $ECHO_C" >&6; }
98418dba
CW
9440if test "${ac_cv_func_malloc_set_state+set}" = set; then
9441 echo $ECHO_N "(cached) $ECHO_C" >&6
9442else
9443 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9444/* confdefs.h. */
9445_ACEOF
9446cat confdefs.h >>conftest.$ac_ext
9447cat >>conftest.$ac_ext <<_ACEOF
9448/* end confdefs.h. */
edfaf76d
LK
9449/* Define malloc_set_state to an innocuous variant, in case <limits.h> declares malloc_set_state.
9450 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9451#define malloc_set_state innocuous_malloc_set_state
9452
98418dba 9453/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9454 which can conflict with char malloc_set_state (); below.
9455 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9456 <limits.h> exists even on freestanding compilers. */
edfaf76d 9457
19650fd6
AS
9458#ifdef __STDC__
9459# include <limits.h>
9460#else
9461# include <assert.h>
9462#endif
edfaf76d
LK
9463
9464#undef malloc_set_state
9465
ca81d7a0
JD
9466/* Override any GCC internal prototype to avoid an error.
9467 Use char because int might match the return type of a GCC
9468 builtin and then its argument prototype would still apply. */
98418dba
CW
9469#ifdef __cplusplus
9470extern "C"
9471#endif
98418dba 9472char malloc_set_state ();
98418dba
CW
9473/* The GNU C library defines this for functions which it implements
9474 to always fail with ENOSYS. Some functions are actually named
9475 something starting with __ and the normal name is an alias. */
ca81d7a0 9476#if defined __stub_malloc_set_state || defined __stub___malloc_set_state
98418dba 9477choke me
98418dba
CW
9478#endif
9479
19650fd6
AS
9480int
9481main ()
9482{
ca81d7a0 9483return malloc_set_state ();
98418dba
CW
9484 ;
9485 return 0;
9486}
9487_ACEOF
9488rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9489if { (ac_try="$ac_link"
9490case "(($ac_try" in
9491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9492 *) ac_try_echo=$ac_try;;
9493esac
9494eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9495 (eval "$ac_link") 2>conftest.er1
98418dba 9496 ac_status=$?
edfaf76d
LK
9497 grep -v '^ *+' conftest.er1 >conftest.err
9498 rm -f conftest.er1
9499 cat conftest.err >&5
c0d27fcc 9500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9501 (exit $ac_status); } && {
9502 test -z "$ac_c_werror_flag" ||
9503 test ! -s conftest.err
9504 } && test -s conftest$ac_exeext &&
9505 $as_test_x conftest$ac_exeext; then
98418dba
CW
9506 ac_cv_func_malloc_set_state=yes
9507else
9508 echo "$as_me: failed program was:" >&5
19650fd6
AS
9509sed 's/^/| /' conftest.$ac_ext >&5
9510
ca81d7a0 9511 ac_cv_func_malloc_set_state=no
98418dba 9512fi
ca81d7a0 9513
f053c89f 9514rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9515 conftest$ac_exeext conftest.$ac_ext
98418dba 9516fi
ca81d7a0
JD
9517{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_set_state" >&5
9518echo "${ECHO_T}$ac_cv_func_malloc_set_state" >&6; }
98418dba
CW
9519if test $ac_cv_func_malloc_set_state = yes; then
9520 :
9521else
9522 doug_lea_malloc=no
9523fi
9524
ca81d7a0
JD
9525{ echo "$as_me:$LINENO: checking whether __after_morecore_hook exists" >&5
9526echo $ECHO_N "checking whether __after_morecore_hook exists... $ECHO_C" >&6; }
98418dba
CW
9527if test "${emacs_cv_var___after_morecore_hook+set}" = set; then
9528 echo $ECHO_N "(cached) $ECHO_C" >&6
9529else
9530 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9531/* confdefs.h. */
9532_ACEOF
9533cat confdefs.h >>conftest.$ac_ext
9534cat >>conftest.$ac_ext <<_ACEOF
9535/* end confdefs.h. */
98418dba 9536extern void (* __after_morecore_hook)();
98418dba
CW
9537int
9538main ()
9539{
9540__after_morecore_hook = 0
9541 ;
9542 return 0;
9543}
9544_ACEOF
9545rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9546if { (ac_try="$ac_link"
9547case "(($ac_try" in
9548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9549 *) ac_try_echo=$ac_try;;
9550esac
9551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9552 (eval "$ac_link") 2>conftest.er1
98418dba 9553 ac_status=$?
edfaf76d
LK
9554 grep -v '^ *+' conftest.er1 >conftest.err
9555 rm -f conftest.er1
9556 cat conftest.err >&5
c0d27fcc 9557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9558 (exit $ac_status); } && {
9559 test -z "$ac_c_werror_flag" ||
9560 test ! -s conftest.err
9561 } && test -s conftest$ac_exeext &&
9562 $as_test_x conftest$ac_exeext; then
98418dba
CW
9563 emacs_cv_var___after_morecore_hook=yes
9564else
9565 echo "$as_me: failed program was:" >&5
19650fd6
AS
9566sed 's/^/| /' conftest.$ac_ext >&5
9567
ca81d7a0 9568 emacs_cv_var___after_morecore_hook=no
98418dba 9569fi
ca81d7a0 9570
f053c89f 9571rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9572 conftest$ac_exeext conftest.$ac_ext
98418dba 9573fi
ca81d7a0
JD
9574{ echo "$as_me:$LINENO: result: $emacs_cv_var___after_morecore_hook" >&5
9575echo "${ECHO_T}$emacs_cv_var___after_morecore_hook" >&6; }
98418dba
CW
9576if test $emacs_cv_var___after_morecore_hook = no; then
9577 doug_lea_malloc=no
9578fi
9579if test "${system_malloc}" = "yes"; then
9580 GNU_MALLOC=no
9581 GNU_MALLOC_reason="
9582 (The GNU allocators don't work with this system configuration.)"
9583fi
9584if test "$doug_lea_malloc" = "yes" ; then
9585 if test "$GNU_MALLOC" = yes ; then
9586 GNU_MALLOC_reason="
9587 (Using Doug Lea's new malloc from the GNU C Library.)"
9588 fi
b936fae4 9589
c0d27fcc 9590cat >>confdefs.h <<\_ACEOF
98418dba 9591#define DOUG_LEA_MALLOC 1
c0d27fcc 9592_ACEOF
98418dba
CW
9593
9594fi
9595
9596if test x"${REL_ALLOC}" = x; then
9597 REL_ALLOC=${GNU_MALLOC}
9598fi
9599
9600
c0d27fcc
MR
9601
9602
9603for ac_header in stdlib.h unistd.h
98418dba
CW
9604do
9605as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
9606if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
9607 { echo "$as_me:$LINENO: checking for $ac_header" >&5
9608echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9609if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 9610 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 9611fi
ca81d7a0
JD
9612ac_res=`eval echo '${'$as_ac_Header'}'`
9613 { echo "$as_me:$LINENO: result: $ac_res" >&5
9614echo "${ECHO_T}$ac_res" >&6; }
98418dba 9615else
c0d27fcc 9616 # Is the header compilable?
ca81d7a0
JD
9617{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
9618echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 9619cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9620/* confdefs.h. */
9621_ACEOF
9622cat confdefs.h >>conftest.$ac_ext
9623cat >>conftest.$ac_ext <<_ACEOF
9624/* end confdefs.h. */
98418dba
CW
9625$ac_includes_default
9626#include <$ac_header>
9627_ACEOF
9628rm -f conftest.$ac_objext
ca81d7a0
JD
9629if { (ac_try="$ac_compile"
9630case "(($ac_try" in
9631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9632 *) ac_try_echo=$ac_try;;
9633esac
9634eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9635 (eval "$ac_compile") 2>conftest.er1
98418dba 9636 ac_status=$?
edfaf76d
LK
9637 grep -v '^ *+' conftest.er1 >conftest.err
9638 rm -f conftest.er1
9639 cat conftest.err >&5
c0d27fcc 9640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9641 (exit $ac_status); } && {
9642 test -z "$ac_c_werror_flag" ||
9643 test ! -s conftest.err
9644 } && test -s conftest.$ac_objext; then
c0d27fcc 9645 ac_header_compiler=yes
98418dba
CW
9646else
9647 echo "$as_me: failed program was:" >&5
19650fd6
AS
9648sed 's/^/| /' conftest.$ac_ext >&5
9649
ca81d7a0 9650 ac_header_compiler=no
98418dba 9651fi
ca81d7a0
JD
9652
9653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9654{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
9655echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 9656
c0d27fcc 9657# Is the header present?
ca81d7a0
JD
9658{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
9659echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 9660cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9661/* confdefs.h. */
9662_ACEOF
9663cat confdefs.h >>conftest.$ac_ext
9664cat >>conftest.$ac_ext <<_ACEOF
9665/* end confdefs.h. */
98418dba
CW
9666#include <$ac_header>
9667_ACEOF
ca81d7a0
JD
9668if { (ac_try="$ac_cpp conftest.$ac_ext"
9669case "(($ac_try" in
9670 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9671 *) ac_try_echo=$ac_try;;
9672esac
9673eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9674 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 9675 ac_status=$?
6bae0ccf 9676 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
9677 rm -f conftest.er1
9678 cat conftest.err >&5
c0d27fcc 9679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9680 (exit $ac_status); } >/dev/null && {
9681 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
9682 test ! -s conftest.err
9683 }; then
c0d27fcc 9684 ac_header_preproc=yes
98418dba
CW
9685else
9686 echo "$as_me: failed program was:" >&5
19650fd6
AS
9687sed 's/^/| /' conftest.$ac_ext >&5
9688
c0d27fcc 9689 ac_header_preproc=no
98418dba 9690fi
ca81d7a0 9691
98418dba 9692rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
9693{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
9694echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
9695
9696# So? What about this header?
edfaf76d
LK
9697case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
9698 yes:no: )
c0d27fcc
MR
9699 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
9700echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
9701 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
9702echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
9703 ac_header_preproc=yes
9704 ;;
9705 no:yes:* )
9706 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
9707echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
9708 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
9709echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
9710 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
9711echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
9712 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
9713echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
9714 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
9715echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
9716 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
9717echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 9718
19650fd6 9719 ;;
c0d27fcc 9720esac
ca81d7a0
JD
9721{ echo "$as_me:$LINENO: checking for $ac_header" >&5
9722echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
9723if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
9724 echo $ECHO_N "(cached) $ECHO_C" >&6
9725else
edfaf76d 9726 eval "$as_ac_Header=\$ac_header_preproc"
98418dba 9727fi
ca81d7a0
JD
9728ac_res=`eval echo '${'$as_ac_Header'}'`
9729 { echo "$as_me:$LINENO: result: $ac_res" >&5
9730echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
9731
9732fi
98418dba 9733if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 9734 cat >>confdefs.h <<_ACEOF
98418dba 9735#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 9736_ACEOF
98418dba
CW
9737
9738fi
c0d27fcc 9739
98418dba
CW
9740done
9741
c0d27fcc 9742
98418dba
CW
9743for ac_func in getpagesize
9744do
9745as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
9746{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9747echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9748if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
9749 echo $ECHO_N "(cached) $ECHO_C" >&6
9750else
9751 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9752/* confdefs.h. */
9753_ACEOF
9754cat confdefs.h >>conftest.$ac_ext
9755cat >>conftest.$ac_ext <<_ACEOF
9756/* end confdefs.h. */
edfaf76d
LK
9757/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9758 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9759#define $ac_func innocuous_$ac_func
9760
98418dba 9761/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
9762 which can conflict with char $ac_func (); below.
9763 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9764 <limits.h> exists even on freestanding compilers. */
edfaf76d 9765
19650fd6
AS
9766#ifdef __STDC__
9767# include <limits.h>
9768#else
9769# include <assert.h>
9770#endif
edfaf76d
LK
9771
9772#undef $ac_func
9773
ca81d7a0
JD
9774/* Override any GCC internal prototype to avoid an error.
9775 Use char because int might match the return type of a GCC
9776 builtin and then its argument prototype would still apply. */
98418dba
CW
9777#ifdef __cplusplus
9778extern "C"
9779#endif
98418dba 9780char $ac_func ();
98418dba
CW
9781/* The GNU C library defines this for functions which it implements
9782 to always fail with ENOSYS. Some functions are actually named
9783 something starting with __ and the normal name is an alias. */
ca81d7a0 9784#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 9785choke me
98418dba
CW
9786#endif
9787
19650fd6
AS
9788int
9789main ()
9790{
ca81d7a0 9791return $ac_func ();
98418dba
CW
9792 ;
9793 return 0;
9794}
9795_ACEOF
9796rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
9797if { (ac_try="$ac_link"
9798case "(($ac_try" in
9799 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9800 *) ac_try_echo=$ac_try;;
9801esac
9802eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9803 (eval "$ac_link") 2>conftest.er1
98418dba 9804 ac_status=$?
edfaf76d
LK
9805 grep -v '^ *+' conftest.er1 >conftest.err
9806 rm -f conftest.er1
9807 cat conftest.err >&5
c0d27fcc 9808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
9809 (exit $ac_status); } && {
9810 test -z "$ac_c_werror_flag" ||
9811 test ! -s conftest.err
9812 } && test -s conftest$ac_exeext &&
9813 $as_test_x conftest$ac_exeext; then
98418dba
CW
9814 eval "$as_ac_var=yes"
9815else
9816 echo "$as_me: failed program was:" >&5
19650fd6
AS
9817sed 's/^/| /' conftest.$ac_ext >&5
9818
ca81d7a0 9819 eval "$as_ac_var=no"
98418dba 9820fi
ca81d7a0 9821
f053c89f 9822rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 9823 conftest$ac_exeext conftest.$ac_ext
98418dba 9824fi
ca81d7a0
JD
9825ac_res=`eval echo '${'$as_ac_var'}'`
9826 { echo "$as_me:$LINENO: result: $ac_res" >&5
9827echo "${ECHO_T}$ac_res" >&6; }
98418dba 9828if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 9829 cat >>confdefs.h <<_ACEOF
98418dba 9830#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 9831_ACEOF
98418dba
CW
9832
9833fi
9834done
9835
ca81d7a0
JD
9836{ echo "$as_me:$LINENO: checking for working mmap" >&5
9837echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; }
98418dba
CW
9838if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
9839 echo $ECHO_N "(cached) $ECHO_C" >&6
9840else
9841 if test "$cross_compiling" = yes; then
9842 ac_cv_func_mmap_fixed_mapped=no
9843else
9844 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
9845/* confdefs.h. */
9846_ACEOF
9847cat confdefs.h >>conftest.$ac_ext
9848cat >>conftest.$ac_ext <<_ACEOF
9849/* end confdefs.h. */
98418dba 9850$ac_includes_default
c0d27fcc
MR
9851/* malloc might have been renamed as rpl_malloc. */
9852#undef malloc
9853
98418dba
CW
9854/* Thanks to Mike Haertel and Jim Avera for this test.
9855 Here is a matrix of mmap possibilities:
9856 mmap private not fixed
9857 mmap private fixed at somewhere currently unmapped
9858 mmap private fixed at somewhere already mapped
9859 mmap shared not fixed
9860 mmap shared fixed at somewhere currently unmapped
9861 mmap shared fixed at somewhere already mapped
9862 For private mappings, we should verify that changes cannot be read()
9863 back from the file, nor mmap's back from the file at a different
9864 address. (There have been systems where private was not correctly
9865 implemented like the infamous i386 svr4.0, and systems where the
9866 VM page cache was not coherent with the file system buffer cache
9867 like early versions of FreeBSD and possibly contemporary NetBSD.)
9868 For shared mappings, we should conversely verify that changes get
c0d27fcc 9869 propagated back to all the places they're supposed to be.
98418dba
CW
9870
9871 Grep wants private fixed already mapped.
9872 The main things grep needs to know about mmap are:
9873 * does it exist and is it safe to write into the mmap'd area
9874 * how to use it (BSD variants) */
9875
9876#include <fcntl.h>
9877#include <sys/mman.h>
9878
f053c89f 9879#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
98418dba
CW
9880char *malloc ();
9881#endif
9882
9883/* This mess was copied from the GNU getpagesize.h. */
f053c89f 9884#ifndef HAVE_GETPAGESIZE
98418dba 9885/* Assume that all systems that can run configure have sys/param.h. */
f053c89f 9886# ifndef HAVE_SYS_PARAM_H
98418dba
CW
9887# define HAVE_SYS_PARAM_H 1
9888# endif
9889
9890# ifdef _SC_PAGESIZE
9891# define getpagesize() sysconf(_SC_PAGESIZE)
9892# else /* no _SC_PAGESIZE */
f053c89f 9893# ifdef HAVE_SYS_PARAM_H
98418dba
CW
9894# include <sys/param.h>
9895# ifdef EXEC_PAGESIZE
9896# define getpagesize() EXEC_PAGESIZE
9897# else /* no EXEC_PAGESIZE */
9898# ifdef NBPG
9899# define getpagesize() NBPG * CLSIZE
9900# ifndef CLSIZE
9901# define CLSIZE 1
9902# endif /* no CLSIZE */
9903# else /* no NBPG */
9904# ifdef NBPC
9905# define getpagesize() NBPC
9906# else /* no NBPC */
9907# ifdef PAGESIZE
9908# define getpagesize() PAGESIZE
9909# endif /* PAGESIZE */
9910# endif /* no NBPC */
9911# endif /* no NBPG */
9912# endif /* no EXEC_PAGESIZE */
9913# else /* no HAVE_SYS_PARAM_H */
9914# define getpagesize() 8192 /* punt totally */
9915# endif /* no HAVE_SYS_PARAM_H */
9916# endif /* no _SC_PAGESIZE */
9917
9918#endif /* no HAVE_GETPAGESIZE */
9919
9920int
9921main ()
9922{
9923 char *data, *data2, *data3;
9924 int i, pagesize;
9925 int fd;
9926
9927 pagesize = getpagesize ();
9928
9929 /* First, make a file with some known garbage in it. */
9930 data = (char *) malloc (pagesize);
9931 if (!data)
ca81d7a0 9932 return 1;
98418dba
CW
9933 for (i = 0; i < pagesize; ++i)
9934 *(data + i) = rand ();
9935 umask (0);
9936 fd = creat ("conftest.mmap", 0600);
9937 if (fd < 0)
ca81d7a0 9938 return 1;
98418dba 9939 if (write (fd, data, pagesize) != pagesize)
ca81d7a0 9940 return 1;
98418dba
CW
9941 close (fd);
9942
9943 /* Next, try to mmap the file at a fixed address which already has
9944 something else allocated at it. If we can, also make sure that
9945 we see the same garbage. */
9946 fd = open ("conftest.mmap", O_RDWR);
9947 if (fd < 0)
ca81d7a0 9948 return 1;
98418dba
CW
9949 data2 = (char *) malloc (2 * pagesize);
9950 if (!data2)
ca81d7a0
JD
9951 return 1;
9952 data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
98418dba 9953 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
edfaf76d 9954 MAP_PRIVATE | MAP_FIXED, fd, 0L))
ca81d7a0 9955 return 1;
98418dba
CW
9956 for (i = 0; i < pagesize; ++i)
9957 if (*(data + i) != *(data2 + i))
ca81d7a0 9958 return 1;
98418dba
CW
9959
9960 /* Finally, make sure that changes to the mapped area do not
9961 percolate back to the file as seen by read(). (This is a bug on
9962 some variants of i386 svr4.0.) */
9963 for (i = 0; i < pagesize; ++i)
9964 *(data2 + i) = *(data2 + i) + 1;
9965 data3 = (char *) malloc (pagesize);
9966 if (!data3)
ca81d7a0 9967 return 1;
98418dba 9968 if (read (fd, data3, pagesize) != pagesize)
ca81d7a0 9969 return 1;
98418dba
CW
9970 for (i = 0; i < pagesize; ++i)
9971 if (*(data + i) != *(data3 + i))
ca81d7a0 9972 return 1;
98418dba 9973 close (fd);
ca81d7a0 9974 return 0;
98418dba
CW
9975}
9976_ACEOF
9977rm -f conftest$ac_exeext
ca81d7a0
JD
9978if { (ac_try="$ac_link"
9979case "(($ac_try" in
9980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9981 *) ac_try_echo=$ac_try;;
9982esac
9983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9984 (eval "$ac_link") 2>&5
98418dba 9985 ac_status=$?
c0d27fcc 9986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 9987 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
9988 { (case "(($ac_try" in
9989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9990 *) ac_try_echo=$ac_try;;
9991esac
9992eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9993 (eval "$ac_try") 2>&5
98418dba 9994 ac_status=$?
c0d27fcc 9995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba
CW
9996 (exit $ac_status); }; }; then
9997 ac_cv_func_mmap_fixed_mapped=yes
9998else
9999 echo "$as_me: program exited with status $ac_status" >&5
10000echo "$as_me: failed program was:" >&5
19650fd6
AS
10001sed 's/^/| /' conftest.$ac_ext >&5
10002
c0d27fcc 10003( exit $ac_status )
98418dba
CW
10004ac_cv_func_mmap_fixed_mapped=no
10005fi
ca81d7a0 10006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
98418dba 10007fi
ca81d7a0
JD
10008
10009
98418dba 10010fi
ca81d7a0
JD
10011{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
10012echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; }
98418dba
CW
10013if test $ac_cv_func_mmap_fixed_mapped = yes; then
10014
c0d27fcc 10015cat >>confdefs.h <<\_ACEOF
98418dba 10016#define HAVE_MMAP 1
c0d27fcc 10017_ACEOF
98418dba
CW
10018
10019fi
10020rm -f conftest.mmap
10021
10022if test $use_mmap_for_buffers = yes; then
10023 REL_ALLOC=no
10024fi
10025
10026LIBS="$libsrc_libs $LIBS"
10027
c0d27fcc 10028
ca81d7a0
JD
10029{ echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
10030echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6; }
98418dba
CW
10031if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10032 echo $ECHO_N "(cached) $ECHO_C" >&6
10033else
10034 ac_check_lib_save_LIBS=$LIBS
10035LIBS="-ldnet $LIBS"
10036cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10037/* confdefs.h. */
10038_ACEOF
10039cat confdefs.h >>conftest.$ac_ext
10040cat >>conftest.$ac_ext <<_ACEOF
10041/* end confdefs.h. */
98418dba 10042
ca81d7a0
JD
10043/* Override any GCC internal prototype to avoid an error.
10044 Use char because int might match the return type of a GCC
10045 builtin and then its argument prototype would still apply. */
98418dba
CW
10046#ifdef __cplusplus
10047extern "C"
10048#endif
98418dba 10049char dnet_ntoa ();
98418dba
CW
10050int
10051main ()
10052{
ca81d7a0 10053return dnet_ntoa ();
98418dba
CW
10054 ;
10055 return 0;
10056}
10057_ACEOF
10058rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10059if { (ac_try="$ac_link"
10060case "(($ac_try" in
10061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10062 *) ac_try_echo=$ac_try;;
10063esac
10064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10065 (eval "$ac_link") 2>conftest.er1
98418dba 10066 ac_status=$?
edfaf76d
LK
10067 grep -v '^ *+' conftest.er1 >conftest.err
10068 rm -f conftest.er1
10069 cat conftest.err >&5
c0d27fcc 10070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10071 (exit $ac_status); } && {
10072 test -z "$ac_c_werror_flag" ||
10073 test ! -s conftest.err
10074 } && test -s conftest$ac_exeext &&
10075 $as_test_x conftest$ac_exeext; then
98418dba
CW
10076 ac_cv_lib_dnet_dnet_ntoa=yes
10077else
10078 echo "$as_me: failed program was:" >&5
19650fd6
AS
10079sed 's/^/| /' conftest.$ac_ext >&5
10080
ca81d7a0 10081 ac_cv_lib_dnet_dnet_ntoa=no
98418dba 10082fi
ca81d7a0 10083
f053c89f 10084rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10085 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10086LIBS=$ac_check_lib_save_LIBS
10087fi
ca81d7a0
JD
10088{ echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10089echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6; }
98418dba 10090if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
c0d27fcc 10091 cat >>confdefs.h <<_ACEOF
98418dba 10092#define HAVE_LIBDNET 1
c0d27fcc 10093_ACEOF
98418dba
CW
10094
10095 LIBS="-ldnet $LIBS"
10096
10097fi
10098
c0d27fcc 10099
ca81d7a0
JD
10100{ echo "$as_me:$LINENO: checking for main in -lXbsd" >&5
10101echo $ECHO_N "checking for main in -lXbsd... $ECHO_C" >&6; }
98418dba
CW
10102if test "${ac_cv_lib_Xbsd_main+set}" = set; then
10103 echo $ECHO_N "(cached) $ECHO_C" >&6
10104else
10105 ac_check_lib_save_LIBS=$LIBS
10106LIBS="-lXbsd $LIBS"
10107cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10108/* confdefs.h. */
10109_ACEOF
10110cat confdefs.h >>conftest.$ac_ext
10111cat >>conftest.$ac_ext <<_ACEOF
10112/* end confdefs.h. */
98418dba 10113
c0d27fcc 10114
98418dba
CW
10115int
10116main ()
10117{
ca81d7a0 10118return main ();
98418dba
CW
10119 ;
10120 return 0;
10121}
10122_ACEOF
10123rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10124if { (ac_try="$ac_link"
10125case "(($ac_try" in
10126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10127 *) ac_try_echo=$ac_try;;
10128esac
10129eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10130 (eval "$ac_link") 2>conftest.er1
98418dba 10131 ac_status=$?
edfaf76d
LK
10132 grep -v '^ *+' conftest.er1 >conftest.err
10133 rm -f conftest.er1
10134 cat conftest.err >&5
c0d27fcc 10135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10136 (exit $ac_status); } && {
10137 test -z "$ac_c_werror_flag" ||
10138 test ! -s conftest.err
10139 } && test -s conftest$ac_exeext &&
10140 $as_test_x conftest$ac_exeext; then
98418dba
CW
10141 ac_cv_lib_Xbsd_main=yes
10142else
10143 echo "$as_me: failed program was:" >&5
19650fd6
AS
10144sed 's/^/| /' conftest.$ac_ext >&5
10145
ca81d7a0 10146 ac_cv_lib_Xbsd_main=no
98418dba 10147fi
ca81d7a0 10148
f053c89f 10149rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10150 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10151LIBS=$ac_check_lib_save_LIBS
10152fi
ca81d7a0
JD
10153{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xbsd_main" >&5
10154echo "${ECHO_T}$ac_cv_lib_Xbsd_main" >&6; }
98418dba
CW
10155if test $ac_cv_lib_Xbsd_main = yes; then
10156 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -lXbsd"
10157fi
10158
c0d27fcc
MR
10159
10160
ca81d7a0
JD
10161{ echo "$as_me:$LINENO: checking for cma_open in -lpthreads" >&5
10162echo $ECHO_N "checking for cma_open in -lpthreads... $ECHO_C" >&6; }
98418dba
CW
10163if test "${ac_cv_lib_pthreads_cma_open+set}" = set; then
10164 echo $ECHO_N "(cached) $ECHO_C" >&6
10165else
10166 ac_check_lib_save_LIBS=$LIBS
10167LIBS="-lpthreads $LIBS"
10168cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10169/* confdefs.h. */
10170_ACEOF
10171cat confdefs.h >>conftest.$ac_ext
10172cat >>conftest.$ac_ext <<_ACEOF
10173/* end confdefs.h. */
98418dba 10174
ca81d7a0
JD
10175/* Override any GCC internal prototype to avoid an error.
10176 Use char because int might match the return type of a GCC
10177 builtin and then its argument prototype would still apply. */
98418dba
CW
10178#ifdef __cplusplus
10179extern "C"
10180#endif
98418dba 10181char cma_open ();
98418dba
CW
10182int
10183main ()
10184{
ca81d7a0 10185return cma_open ();
98418dba
CW
10186 ;
10187 return 0;
10188}
10189_ACEOF
10190rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10191if { (ac_try="$ac_link"
10192case "(($ac_try" in
10193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10194 *) ac_try_echo=$ac_try;;
10195esac
10196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10197 (eval "$ac_link") 2>conftest.er1
98418dba 10198 ac_status=$?
edfaf76d
LK
10199 grep -v '^ *+' conftest.er1 >conftest.err
10200 rm -f conftest.er1
10201 cat conftest.err >&5
c0d27fcc 10202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10203 (exit $ac_status); } && {
10204 test -z "$ac_c_werror_flag" ||
10205 test ! -s conftest.err
10206 } && test -s conftest$ac_exeext &&
10207 $as_test_x conftest$ac_exeext; then
98418dba
CW
10208 ac_cv_lib_pthreads_cma_open=yes
10209else
10210 echo "$as_me: failed program was:" >&5
19650fd6
AS
10211sed 's/^/| /' conftest.$ac_ext >&5
10212
ca81d7a0 10213 ac_cv_lib_pthreads_cma_open=no
98418dba 10214fi
ca81d7a0 10215
f053c89f 10216rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10217 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10218LIBS=$ac_check_lib_save_LIBS
10219fi
ca81d7a0
JD
10220{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_cma_open" >&5
10221echo "${ECHO_T}$ac_cv_lib_pthreads_cma_open" >&6; }
98418dba 10222if test $ac_cv_lib_pthreads_cma_open = yes; then
c0d27fcc 10223 cat >>confdefs.h <<_ACEOF
98418dba 10224#define HAVE_LIBPTHREADS 1
c0d27fcc 10225_ACEOF
98418dba
CW
10226
10227 LIBS="-lpthreads $LIBS"
10228
10229fi
10230
c0d27fcc 10231
55597d70
DL
10232
10233case ${host_os} in
10234aix*)
ca81d7a0
JD
10235 { echo "$as_me:$LINENO: checking for -bbigtoc option" >&5
10236echo $ECHO_N "checking for -bbigtoc option... $ECHO_C" >&6; }
55597d70
DL
10237if test "${gdb_cv_bigtoc+set}" = set; then
10238 echo $ECHO_N "(cached) $ECHO_C" >&6
10239else
10240
10241 case $GCC in
10242 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
10243 *) gdb_cv_bigtoc=-bbigtoc ;;
10244 esac
10245
10246 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
10247 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10248/* confdefs.h. */
10249_ACEOF
10250cat confdefs.h >>conftest.$ac_ext
10251cat >>conftest.$ac_ext <<_ACEOF
10252/* end confdefs.h. */
55597d70
DL
10253
10254int
10255main ()
10256{
10257int i;
10258 ;
10259 return 0;
10260}
10261_ACEOF
10262rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10263if { (ac_try="$ac_link"
10264case "(($ac_try" in
10265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10266 *) ac_try_echo=$ac_try;;
10267esac
10268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10269 (eval "$ac_link") 2>conftest.er1
55597d70 10270 ac_status=$?
edfaf76d
LK
10271 grep -v '^ *+' conftest.er1 >conftest.err
10272 rm -f conftest.er1
10273 cat conftest.err >&5
55597d70 10274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10275 (exit $ac_status); } && {
10276 test -z "$ac_c_werror_flag" ||
10277 test ! -s conftest.err
10278 } && test -s conftest$ac_exeext &&
10279 $as_test_x conftest$ac_exeext; then
55597d70
DL
10280 :
10281else
10282 echo "$as_me: failed program was:" >&5
19650fd6
AS
10283sed 's/^/| /' conftest.$ac_ext >&5
10284
ca81d7a0 10285 gdb_cv_bigtoc=
55597d70 10286fi
ca81d7a0 10287
f053c89f 10288rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10289 conftest$ac_exeext conftest.$ac_ext
55597d70
DL
10290
10291fi
ca81d7a0
JD
10292{ echo "$as_me:$LINENO: result: $gdb_cv_bigtoc" >&5
10293echo "${ECHO_T}$gdb_cv_bigtoc" >&6; }
55597d70
DL
10294 ;;
10295esac
10296
ae1a998c
RS
10297# Change CFLAGS and CPPFLAGS temporarily so that C_SWITCH_X_SITE gets
10298# used for the tests that follow. We set them back to REAL_CFLAGS and
10299# REAL_CPPFLAGS later on.
98418dba
CW
10300
10301REAL_CPPFLAGS="$CPPFLAGS"
10302
10303if test "${HAVE_X11}" = "yes"; then
10304 DEFS="$C_SWITCH_X_SITE $DEFS"
10305 LDFLAGS="$LDFLAGS $LD_SWITCH_X_SITE"
10306 LIBS="$LIBX $LIBS"
10307 CFLAGS="$C_SWITCH_X_SITE $CFLAGS"
10308 CPPFLAGS="$C_SWITCH_X_SITE $CPPFLAGS"
10309
10310 # On Solaris, arrange for LD_RUN_PATH to point to the X libraries for tests.
10311 # This is handled by LD_SWITCH_X_SITE_AUX during the real build,
10312 # but it's more convenient here to set LD_RUN_PATH
10313 # since this also works on hosts that don't understand LD_SWITCH_X_SITE_AUX.
10314 if test "${x_libraries}" != NONE && test -n "${x_libraries}"; then
10315 LD_RUN_PATH=$x_libraries${LD_RUN_PATH+:}$LD_RUN_PATH
10316 export LD_RUN_PATH
10317 fi
10318
10319 if test "${opsys}" = "gnu-linux"; then
ca81d7a0
JD
10320 { echo "$as_me:$LINENO: checking whether X on GNU/Linux needs -b to link" >&5
10321echo $ECHO_N "checking whether X on GNU/Linux needs -b to link... $ECHO_C" >&6; }
98418dba 10322 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10323/* confdefs.h. */
10324_ACEOF
10325cat confdefs.h >>conftest.$ac_ext
10326cat >>conftest.$ac_ext <<_ACEOF
10327/* end confdefs.h. */
98418dba 10328
98418dba
CW
10329int
10330main ()
10331{
10332XOpenDisplay ("foo");
10333 ;
10334 return 0;
10335}
10336_ACEOF
10337rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10338if { (ac_try="$ac_link"
10339case "(($ac_try" in
10340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10341 *) ac_try_echo=$ac_try;;
10342esac
10343eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10344 (eval "$ac_link") 2>conftest.er1
98418dba 10345 ac_status=$?
edfaf76d
LK
10346 grep -v '^ *+' conftest.er1 >conftest.err
10347 rm -f conftest.er1
10348 cat conftest.err >&5
c0d27fcc 10349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10350 (exit $ac_status); } && {
10351 test -z "$ac_c_werror_flag" ||
10352 test ! -s conftest.err
10353 } && test -s conftest$ac_exeext &&
10354 $as_test_x conftest$ac_exeext; then
35996d22 10355 xlinux_first_failure=no
98418dba
CW
10356else
10357 echo "$as_me: failed program was:" >&5
19650fd6
AS
10358sed 's/^/| /' conftest.$ac_ext >&5
10359
ca81d7a0 10360 xlinux_first_failure=yes
98418dba 10361fi
ca81d7a0 10362
f053c89f 10363rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10364 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10365 if test "${xlinux_first_failure}" = "yes"; then
10366 OLD_LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE"
10367 OLD_C_SWITCH_X_SITE="$C_SWITCH_X_SITE"
10368 OLD_CPPFLAGS="$CPPFLAGS"
10369 OLD_LIBS="$LIBS"
10370 LD_SWITCH_X_SITE="$LD_SWITCH_X_SITE -b i486-linuxaout"
10371 C_SWITCH_X_SITE="$C_SWITCH_X_SITE -b i486-linuxaout"
10372 CPPFLAGS="$CPPFLAGS -b i486-linuxaout"
10373 LIBS="$LIBS -b i486-linuxaout"
10374 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10375/* confdefs.h. */
10376_ACEOF
10377cat confdefs.h >>conftest.$ac_ext
10378cat >>conftest.$ac_ext <<_ACEOF
10379/* end confdefs.h. */
98418dba 10380
98418dba
CW
10381int
10382main ()
10383{
10384XOpenDisplay ("foo");
10385 ;
10386 return 0;
10387}
10388_ACEOF
10389rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10390if { (ac_try="$ac_link"
10391case "(($ac_try" in
10392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10393 *) ac_try_echo=$ac_try;;
10394esac
10395eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10396 (eval "$ac_link") 2>conftest.er1
98418dba 10397 ac_status=$?
edfaf76d
LK
10398 grep -v '^ *+' conftest.er1 >conftest.err
10399 rm -f conftest.er1
10400 cat conftest.err >&5
c0d27fcc 10401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10402 (exit $ac_status); } && {
10403 test -z "$ac_c_werror_flag" ||
10404 test ! -s conftest.err
10405 } && test -s conftest$ac_exeext &&
10406 $as_test_x conftest$ac_exeext; then
98418dba
CW
10407 xlinux_second_failure=no
10408else
10409 echo "$as_me: failed program was:" >&5
19650fd6
AS
10410sed 's/^/| /' conftest.$ac_ext >&5
10411
ca81d7a0 10412 xlinux_second_failure=yes
98418dba 10413fi
ca81d7a0 10414
f053c89f 10415rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10416 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10417 if test "${xlinux_second_failure}" = "yes"; then
10418 # If we get the same failure with -b, there is no use adding -b.
10419 # So take it out. This plays safe.
10420 LD_SWITCH_X_SITE="$OLD_LD_SWITCH_X_SITE"
10421 C_SWITCH_X_SITE="$OLD_C_SWITCH_X_SITE"
10422 CPPFLAGS="$OLD_CPPFLAGS"
10423 LIBS="$OLD_LIBS"
ca81d7a0
JD
10424 { echo "$as_me:$LINENO: result: no" >&5
10425echo "${ECHO_T}no" >&6; }
98418dba 10426 else
ca81d7a0
JD
10427 { echo "$as_me:$LINENO: result: yes" >&5
10428echo "${ECHO_T}yes" >&6; }
98418dba
CW
10429 fi
10430 else
ca81d7a0
JD
10431 { echo "$as_me:$LINENO: result: no" >&5
10432echo "${ECHO_T}no" >&6; }
98418dba
CW
10433 fi
10434 fi
10435
10436 # Reportedly, some broken Solaris systems have XKBlib.h but are missing
10437 # header files included from there.
ca81d7a0
JD
10438 { echo "$as_me:$LINENO: checking for Xkb" >&5
10439echo $ECHO_N "checking for Xkb... $ECHO_C" >&6; }
98418dba 10440 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10441/* confdefs.h. */
10442_ACEOF
10443cat confdefs.h >>conftest.$ac_ext
10444cat >>conftest.$ac_ext <<_ACEOF
10445/* end confdefs.h. */
98418dba
CW
10446#include <X11/Xlib.h>
10447#include <X11/XKBlib.h>
98418dba
CW
10448int
10449main ()
10450{
10451XkbDescPtr kb = XkbGetKeyboard (0, XkbAllComponentsMask, XkbUseCoreKbd);
10452 ;
10453 return 0;
10454}
10455_ACEOF
10456rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10457if { (ac_try="$ac_link"
10458case "(($ac_try" in
10459 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10460 *) ac_try_echo=$ac_try;;
10461esac
10462eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10463 (eval "$ac_link") 2>conftest.er1
98418dba 10464 ac_status=$?
edfaf76d
LK
10465 grep -v '^ *+' conftest.er1 >conftest.err
10466 rm -f conftest.er1
10467 cat conftest.err >&5
c0d27fcc 10468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10469 (exit $ac_status); } && {
10470 test -z "$ac_c_werror_flag" ||
10471 test ! -s conftest.err
10472 } && test -s conftest$ac_exeext &&
10473 $as_test_x conftest$ac_exeext; then
98418dba
CW
10474 emacs_xkb=yes
10475else
10476 echo "$as_me: failed program was:" >&5
19650fd6
AS
10477sed 's/^/| /' conftest.$ac_ext >&5
10478
ca81d7a0 10479 emacs_xkb=no
98418dba 10480fi
ca81d7a0 10481
f053c89f 10482rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10483 conftest$ac_exeext conftest.$ac_ext
ca81d7a0
JD
10484 { echo "$as_me:$LINENO: result: $emacs_xkb" >&5
10485echo "${ECHO_T}$emacs_xkb" >&6; }
98418dba 10486 if test $emacs_xkb = yes; then
b936fae4 10487
c0d27fcc 10488cat >>confdefs.h <<\_ACEOF
98418dba 10489#define HAVE_XKBGETKEYBOARD 1
c0d27fcc 10490_ACEOF
98418dba
CW
10491
10492 fi
10493
c0d27fcc
MR
10494
10495
10496
10497
98418dba
CW
10498for ac_func in XrmSetDatabase XScreenResourceString \
10499XScreenNumberOfScreen XSetWMProtocols
10500do
10501as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10502{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10503echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10504if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba
CW
10505 echo $ECHO_N "(cached) $ECHO_C" >&6
10506else
10507 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10508/* confdefs.h. */
10509_ACEOF
10510cat confdefs.h >>conftest.$ac_ext
10511cat >>conftest.$ac_ext <<_ACEOF
10512/* end confdefs.h. */
edfaf76d
LK
10513/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10514 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10515#define $ac_func innocuous_$ac_func
10516
98418dba 10517/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
10518 which can conflict with char $ac_func (); below.
10519 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10520 <limits.h> exists even on freestanding compilers. */
edfaf76d 10521
19650fd6
AS
10522#ifdef __STDC__
10523# include <limits.h>
10524#else
10525# include <assert.h>
10526#endif
edfaf76d
LK
10527
10528#undef $ac_func
10529
ca81d7a0
JD
10530/* Override any GCC internal prototype to avoid an error.
10531 Use char because int might match the return type of a GCC
10532 builtin and then its argument prototype would still apply. */
98418dba
CW
10533#ifdef __cplusplus
10534extern "C"
10535#endif
98418dba 10536char $ac_func ();
98418dba
CW
10537/* The GNU C library defines this for functions which it implements
10538 to always fail with ENOSYS. Some functions are actually named
10539 something starting with __ and the normal name is an alias. */
ca81d7a0 10540#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 10541choke me
98418dba
CW
10542#endif
10543
19650fd6
AS
10544int
10545main ()
10546{
ca81d7a0 10547return $ac_func ();
98418dba
CW
10548 ;
10549 return 0;
10550}
10551_ACEOF
10552rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10553if { (ac_try="$ac_link"
10554case "(($ac_try" in
10555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10556 *) ac_try_echo=$ac_try;;
10557esac
10558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10559 (eval "$ac_link") 2>conftest.er1
98418dba 10560 ac_status=$?
edfaf76d
LK
10561 grep -v '^ *+' conftest.er1 >conftest.err
10562 rm -f conftest.er1
10563 cat conftest.err >&5
c0d27fcc 10564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10565 (exit $ac_status); } && {
10566 test -z "$ac_c_werror_flag" ||
10567 test ! -s conftest.err
10568 } && test -s conftest$ac_exeext &&
10569 $as_test_x conftest$ac_exeext; then
98418dba
CW
10570 eval "$as_ac_var=yes"
10571else
10572 echo "$as_me: failed program was:" >&5
19650fd6
AS
10573sed 's/^/| /' conftest.$ac_ext >&5
10574
ca81d7a0 10575 eval "$as_ac_var=no"
98418dba 10576fi
ca81d7a0 10577
f053c89f 10578rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10579 conftest$ac_exeext conftest.$ac_ext
98418dba 10580fi
ca81d7a0
JD
10581ac_res=`eval echo '${'$as_ac_var'}'`
10582 { echo "$as_me:$LINENO: result: $ac_res" >&5
10583echo "${ECHO_T}$ac_res" >&6; }
98418dba 10584if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 10585 cat >>confdefs.h <<_ACEOF
98418dba 10586#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 10587_ACEOF
98418dba
CW
10588
10589fi
10590done
10591
10592fi
10593
10594if test "${window_system}" = "x11"; then
ca81d7a0
JD
10595 { echo "$as_me:$LINENO: checking X11 version 6" >&5
10596echo $ECHO_N "checking X11 version 6... $ECHO_C" >&6; }
98418dba
CW
10597 if test "${emacs_cv_x11_version_6+set}" = set; then
10598 echo $ECHO_N "(cached) $ECHO_C" >&6
10599else
10600 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
10601/* confdefs.h. */
10602_ACEOF
10603cat confdefs.h >>conftest.$ac_ext
10604cat >>conftest.$ac_ext <<_ACEOF
10605/* end confdefs.h. */
98418dba 10606#include <X11/Xlib.h>
98418dba
CW
10607int
10608main ()
10609{
10610#if XlibSpecificationRelease < 6
10611fail;
10612#endif
10613
10614 ;
10615 return 0;
10616}
10617_ACEOF
10618rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10619if { (ac_try="$ac_link"
10620case "(($ac_try" in
10621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10622 *) ac_try_echo=$ac_try;;
10623esac
10624eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10625 (eval "$ac_link") 2>conftest.er1
98418dba 10626 ac_status=$?
edfaf76d
LK
10627 grep -v '^ *+' conftest.er1 >conftest.err
10628 rm -f conftest.er1
10629 cat conftest.err >&5
c0d27fcc 10630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10631 (exit $ac_status); } && {
10632 test -z "$ac_c_werror_flag" ||
10633 test ! -s conftest.err
10634 } && test -s conftest$ac_exeext &&
10635 $as_test_x conftest$ac_exeext; then
98418dba
CW
10636 emacs_cv_x11_version_6=yes
10637else
10638 echo "$as_me: failed program was:" >&5
19650fd6
AS
10639sed 's/^/| /' conftest.$ac_ext >&5
10640
ca81d7a0 10641 emacs_cv_x11_version_6=no
98418dba 10642fi
ca81d7a0 10643
f053c89f 10644rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10645 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
10646fi
10647
10648 if test $emacs_cv_x11_version_6 = yes; then
ca81d7a0
JD
10649 { echo "$as_me:$LINENO: result: 6 or newer" >&5
10650echo "${ECHO_T}6 or newer" >&6; }
b936fae4 10651
c0d27fcc 10652cat >>confdefs.h <<\_ACEOF
98418dba 10653#define HAVE_X11R6 1
c0d27fcc 10654_ACEOF
98418dba
CW
10655
10656 else
ca81d7a0
JD
10657 { echo "$as_me:$LINENO: result: before 6" >&5
10658echo "${ECHO_T}before 6" >&6; }
98418dba
CW
10659 fi
10660fi
10661
98418dba 10662
0cfc0546
GM
10663### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified.
10664HAVE_RSVG=no
ae0476ed 10665if test "${HAVE_X11}" = "yes" || test "${HAVE_CARBON}" = "yes"; then
0cfc0546 10666 if test "${with_rsvg}" != "no"; then
0cfc0546
GM
10667 RSVG_REQUIRED=2.0.0
10668 RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
10669
10670
10671 succeeded=no
10672
00b9c927 10673 # Extract the first word of "pkg-config", so it can be a program name with args.
0cfc0546
GM
10674set dummy pkg-config; ac_word=$2
10675{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10676echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
10677if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10678 echo $ECHO_N "(cached) $ECHO_C" >&6
10679else
10680 case $PKG_CONFIG in
10681 [\\/]* | ?:[\\/]*)
10682 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10683 ;;
10684 *)
10685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10686for as_dir in $PATH
10687do
10688 IFS=$as_save_IFS
10689 test -z "$as_dir" && as_dir=.
10690 for ac_exec_ext in '' $ac_executable_extensions; do
10691 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
10692 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10693 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10694 break 2
10695 fi
10696done
10697done
10698IFS=$as_save_IFS
10699
10700 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10701 ;;
10702esac
10703fi
10704PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10705if test -n "$PKG_CONFIG"; then
10706 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10707echo "${ECHO_T}$PKG_CONFIG" >&6; }
10708else
10709 { echo "$as_me:$LINENO: result: no" >&5
10710echo "${ECHO_T}no" >&6; }
10711fi
10712
10713
0cfc0546
GM
10714
10715 if test "$PKG_CONFIG" = "no" ; then
10716 :
10717 else
10718 PKG_CONFIG_MIN_VERSION=0.9.0
10719 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
10720 { echo "$as_me:$LINENO: checking for $RSVG_MODULE" >&5
10721echo $ECHO_N "checking for $RSVG_MODULE... $ECHO_C" >&6; }
10722
10723 if $PKG_CONFIG --exists "$RSVG_MODULE" 2>&5; then
10724 { echo "$as_me:$LINENO: result: yes" >&5
10725echo "${ECHO_T}yes" >&6; }
10726 succeeded=yes
10727
10728 { echo "$as_me:$LINENO: checking RSVG_CFLAGS" >&5
10729echo $ECHO_N "checking RSVG_CFLAGS... $ECHO_C" >&6; }
10730 RSVG_CFLAGS=`$PKG_CONFIG --cflags "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10731 { echo "$as_me:$LINENO: result: $RSVG_CFLAGS" >&5
10732echo "${ECHO_T}$RSVG_CFLAGS" >&6; }
10733
10734 { echo "$as_me:$LINENO: checking RSVG_LIBS" >&5
10735echo $ECHO_N "checking RSVG_LIBS... $ECHO_C" >&6; }
10736 RSVG_LIBS=`$PKG_CONFIG --libs "$RSVG_MODULE"|sed -e 's,///*,/,g'`
10737 { echo "$as_me:$LINENO: result: $RSVG_LIBS" >&5
10738echo "${ECHO_T}$RSVG_LIBS" >&6; }
10739 else
10740 { echo "$as_me:$LINENO: result: no" >&5
10741echo "${ECHO_T}no" >&6; }
10742 RSVG_CFLAGS=""
10743 RSVG_LIBS=""
10744 ## If we have a custom action on failure, don't print errors, but
10745 ## do set a variable so people can do so.
10746 RSVG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$RSVG_MODULE"`
10747
10748 fi
10749
10750
10751
10752 else
10753 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10754 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10755 fi
10756 fi
10757
10758 if test $succeeded = yes; then
10759 :
10760 else
10761 :
10762 fi
10763
10764
10765
10766
10767 if test ".${RSVG_CFLAGS}" != "."; then
10768 HAVE_RSVG=yes
10769
10770cat >>confdefs.h <<\_ACEOF
10771#define HAVE_RSVG 1
10772_ACEOF
10773
10774 CFLAGS="$CFLAGS $RSVG_CFLAGS"
10775 LIBS="$RSVG_LIBS $LIBS"
10776 fi
10777 fi
10778fi
10779
10780
488dd4c4 10781HAVE_GTK=no
9d2818d6 10782if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
787eb67d
JD
10783 GLIB_REQUIRED=2.6
10784 GTK_REQUIRED=2.6
488dd4c4
JD
10785 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10786
488dd4c4
JD
10787
10788 succeeded=no
10789
00b9c927 10790 # Extract the first word of "pkg-config", so it can be a program name with args.
488dd4c4 10791set dummy pkg-config; ac_word=$2
ca81d7a0
JD
10792{ echo "$as_me:$LINENO: checking for $ac_word" >&5
10793echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
488dd4c4
JD
10794if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10795 echo $ECHO_N "(cached) $ECHO_C" >&6
10796else
10797 case $PKG_CONFIG in
10798 [\\/]* | ?:[\\/]*)
10799 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10800 ;;
10801 *)
10802 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10803for as_dir in $PATH
10804do
10805 IFS=$as_save_IFS
10806 test -z "$as_dir" && as_dir=.
10807 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 10808 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
488dd4c4
JD
10809 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
10810 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
10811 break 2
10812 fi
10813done
10814done
ca81d7a0 10815IFS=$as_save_IFS
488dd4c4
JD
10816
10817 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
10818 ;;
10819esac
10820fi
10821PKG_CONFIG=$ac_cv_path_PKG_CONFIG
488dd4c4 10822if test -n "$PKG_CONFIG"; then
ca81d7a0
JD
10823 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
10824echo "${ECHO_T}$PKG_CONFIG" >&6; }
488dd4c4 10825else
ca81d7a0
JD
10826 { echo "$as_me:$LINENO: result: no" >&5
10827echo "${ECHO_T}no" >&6; }
488dd4c4
JD
10828fi
10829
ca81d7a0 10830
488dd4c4
JD
10831
10832 if test "$PKG_CONFIG" = "no" ; then
089a966d 10833 pkg_check_gtk=no
488dd4c4
JD
10834 else
10835 PKG_CONFIG_MIN_VERSION=0.9.0
10836 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
ca81d7a0
JD
10837 { echo "$as_me:$LINENO: checking for $GTK_MODULES" >&5
10838echo $ECHO_N "checking for $GTK_MODULES... $ECHO_C" >&6; }
488dd4c4 10839
67db6aa2 10840 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
ca81d7a0
JD
10841 { echo "$as_me:$LINENO: result: yes" >&5
10842echo "${ECHO_T}yes" >&6; }
488dd4c4
JD
10843 succeeded=yes
10844
ca81d7a0
JD
10845 { echo "$as_me:$LINENO: checking GTK_CFLAGS" >&5
10846echo $ECHO_N "checking GTK_CFLAGS... $ECHO_C" >&6; }
94315858 10847 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
10848 { echo "$as_me:$LINENO: result: $GTK_CFLAGS" >&5
10849echo "${ECHO_T}$GTK_CFLAGS" >&6; }
488dd4c4 10850
ca81d7a0
JD
10851 { echo "$as_me:$LINENO: checking GTK_LIBS" >&5
10852echo $ECHO_N "checking GTK_LIBS... $ECHO_C" >&6; }
94315858 10853 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
ca81d7a0
JD
10854 { echo "$as_me:$LINENO: result: $GTK_LIBS" >&5
10855echo "${ECHO_T}$GTK_LIBS" >&6; }
488dd4c4 10856 else
ca81d7a0
JD
10857 { echo "$as_me:$LINENO: result: no" >&5
10858echo "${ECHO_T}no" >&6; }
488dd4c4
JD
10859 GTK_CFLAGS=""
10860 GTK_LIBS=""
10861 ## If we have a custom action on failure, don't print errors, but
10862 ## do set a variable so people can do so.
10863 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
089a966d 10864
488dd4c4
JD
10865 fi
10866
10867
10868
10869 else
10870 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
10871 echo "*** See http://www.freedesktop.org/software/pkgconfig"
10872 fi
10873 fi
10874
10875 if test $succeeded = yes; then
089a966d 10876 pkg_check_gtk=yes
488dd4c4 10877 else
089a966d
GM
10878 pkg_check_gtk=no
10879 fi
10880
10881 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
10882 { { echo "$as_me:$LINENO: error: $GTK_PKG_ERRORS" >&5
10883echo "$as_me: error: $GTK_PKG_ERRORS" >&2;}
488dd4c4
JD
10884 { (exit 1); exit 1; }; }
10885 fi
089a966d
GM
10886fi
10887
10888
10889if test x"$pkg_check_gtk" = xyes; then
488dd4c4
JD
10890
10891
10892
10893 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $GTK_CFLAGS"
57669b57
JD
10894 CFLAGS="$CFLAGS $GTK_CFLAGS"
10895 LIBS="$GTK_LIBS $LIBS"
8eeae1c9 10896 GTK_COMPILES=no
57669b57 10897
8eeae1c9 10898for ac_func in gtk_main
57669b57
JD
10899do
10900as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
10901{ echo "$as_me:$LINENO: checking for $ac_func" >&5
10902echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10903if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
10904 echo $ECHO_N "(cached) $ECHO_C" >&6
10905else
10906 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
10907/* confdefs.h. */
10908_ACEOF
10909cat confdefs.h >>conftest.$ac_ext
10910cat >>conftest.$ac_ext <<_ACEOF
10911/* end confdefs.h. */
edfaf76d
LK
10912/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10913 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10914#define $ac_func innocuous_$ac_func
10915
57669b57
JD
10916/* System header to define __stub macros and hopefully few prototypes,
10917 which can conflict with char $ac_func (); below.
10918 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10919 <limits.h> exists even on freestanding compilers. */
edfaf76d 10920
57669b57
JD
10921#ifdef __STDC__
10922# include <limits.h>
10923#else
10924# include <assert.h>
10925#endif
edfaf76d
LK
10926
10927#undef $ac_func
10928
ca81d7a0
JD
10929/* Override any GCC internal prototype to avoid an error.
10930 Use char because int might match the return type of a GCC
10931 builtin and then its argument prototype would still apply. */
57669b57
JD
10932#ifdef __cplusplus
10933extern "C"
57669b57 10934#endif
57669b57
JD
10935char $ac_func ();
10936/* The GNU C library defines this for functions which it implements
10937 to always fail with ENOSYS. Some functions are actually named
10938 something starting with __ and the normal name is an alias. */
ca81d7a0 10939#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 10940choke me
57669b57
JD
10941#endif
10942
10943int
10944main ()
10945{
ca81d7a0 10946return $ac_func ();
57669b57
JD
10947 ;
10948 return 0;
10949}
10950_ACEOF
10951rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
10952if { (ac_try="$ac_link"
10953case "(($ac_try" in
10954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10955 *) ac_try_echo=$ac_try;;
10956esac
10957eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10958 (eval "$ac_link") 2>conftest.er1
57669b57 10959 ac_status=$?
edfaf76d
LK
10960 grep -v '^ *+' conftest.er1 >conftest.err
10961 rm -f conftest.er1
10962 cat conftest.err >&5
57669b57 10963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
10964 (exit $ac_status); } && {
10965 test -z "$ac_c_werror_flag" ||
10966 test ! -s conftest.err
10967 } && test -s conftest$ac_exeext &&
10968 $as_test_x conftest$ac_exeext; then
57669b57
JD
10969 eval "$as_ac_var=yes"
10970else
10971 echo "$as_me: failed program was:" >&5
10972sed 's/^/| /' conftest.$ac_ext >&5
10973
ca81d7a0 10974 eval "$as_ac_var=no"
57669b57 10975fi
ca81d7a0 10976
f053c89f 10977rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 10978 conftest$ac_exeext conftest.$ac_ext
57669b57 10979fi
ca81d7a0
JD
10980ac_res=`eval echo '${'$as_ac_var'}'`
10981 { echo "$as_me:$LINENO: result: $ac_res" >&5
10982echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
10983if test `eval echo '${'$as_ac_var'}'` = yes; then
10984 cat >>confdefs.h <<_ACEOF
10985#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10986_ACEOF
8eeae1c9 10987 GTK_COMPILES=yes
57669b57
JD
10988fi
10989done
10990
8eeae1c9 10991 if test "${GTK_COMPILES}" != "yes"; then
089a966d
GM
10992 if test "$USE_X_TOOLKIT" != "maybe"; then
10993 { { echo "$as_me:$LINENO: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&5
8eeae1c9
JD
10994echo "$as_me: error: Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" >&2;}
10995 { (exit 1); exit 1; }; };
089a966d
GM
10996 fi
10997 else
10998 HAVE_GTK=yes
488dd4c4
JD
10999
11000cat >>confdefs.h <<\_ACEOF
11001#define HAVE_GTK 1
11002_ACEOF
11003
089a966d 11004 USE_X_TOOLKIT=none
f60c93db
JD
11005 if $PKG_CONFIG --atleast-version=2.10 gtk+-2.0; then
11006 :
11007 else
11008 { echo "$as_me:$LINENO: WARNING: Your version of Gtk+ will have problems with
11009 closing open displays. This is no problem if you just use
11010 one display, but if you use more than one and close one of them
11011 Emacs may crash." >&5
11012echo "$as_me: WARNING: Your version of Gtk+ will have problems with
11013 closing open displays. This is no problem if you just use
11014 one display, but if you use more than one and close one of them
11015 Emacs may crash." >&2;}
11016 sleep 3
11017 fi
089a966d
GM
11018 fi
11019
11020fi
11021
11022
11023if test "${HAVE_GTK}" = "yes"; then
488dd4c4 11024
d0a80c21
JD
11025 if test "$with_toolkit_scroll_bars" != no; then
11026 with_toolkit_scroll_bars=yes
11027 fi
57669b57
JD
11028
11029 HAVE_GTK_MULTIDISPLAY=no
11030
11031for ac_func in gdk_display_open
11032do
11033as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11034{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11035echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11036if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
57669b57
JD
11037 echo $ECHO_N "(cached) $ECHO_C" >&6
11038else
11039 cat >conftest.$ac_ext <<_ACEOF
57669b57
JD
11040/* confdefs.h. */
11041_ACEOF
11042cat confdefs.h >>conftest.$ac_ext
11043cat >>conftest.$ac_ext <<_ACEOF
11044/* end confdefs.h. */
edfaf76d
LK
11045/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11046 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11047#define $ac_func innocuous_$ac_func
11048
57669b57
JD
11049/* System header to define __stub macros and hopefully few prototypes,
11050 which can conflict with char $ac_func (); below.
11051 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11052 <limits.h> exists even on freestanding compilers. */
edfaf76d 11053
57669b57
JD
11054#ifdef __STDC__
11055# include <limits.h>
11056#else
11057# include <assert.h>
11058#endif
edfaf76d
LK
11059
11060#undef $ac_func
11061
ca81d7a0
JD
11062/* Override any GCC internal prototype to avoid an error.
11063 Use char because int might match the return type of a GCC
11064 builtin and then its argument prototype would still apply. */
57669b57
JD
11065#ifdef __cplusplus
11066extern "C"
57669b57 11067#endif
57669b57
JD
11068char $ac_func ();
11069/* The GNU C library defines this for functions which it implements
11070 to always fail with ENOSYS. Some functions are actually named
11071 something starting with __ and the normal name is an alias. */
ca81d7a0 11072#if defined __stub_$ac_func || defined __stub___$ac_func
57669b57 11073choke me
57669b57
JD
11074#endif
11075
11076int
11077main ()
11078{
ca81d7a0 11079return $ac_func ();
57669b57
JD
11080 ;
11081 return 0;
11082}
11083_ACEOF
11084rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11085if { (ac_try="$ac_link"
11086case "(($ac_try" in
11087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11088 *) ac_try_echo=$ac_try;;
11089esac
11090eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11091 (eval "$ac_link") 2>conftest.er1
57669b57 11092 ac_status=$?
edfaf76d
LK
11093 grep -v '^ *+' conftest.er1 >conftest.err
11094 rm -f conftest.er1
11095 cat conftest.err >&5
57669b57 11096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11097 (exit $ac_status); } && {
11098 test -z "$ac_c_werror_flag" ||
11099 test ! -s conftest.err
11100 } && test -s conftest$ac_exeext &&
11101 $as_test_x conftest$ac_exeext; then
57669b57
JD
11102 eval "$as_ac_var=yes"
11103else
11104 echo "$as_me: failed program was:" >&5
11105sed 's/^/| /' conftest.$ac_ext >&5
11106
ca81d7a0 11107 eval "$as_ac_var=no"
57669b57 11108fi
ca81d7a0 11109
f053c89f 11110rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11111 conftest$ac_exeext conftest.$ac_ext
57669b57 11112fi
ca81d7a0
JD
11113ac_res=`eval echo '${'$as_ac_var'}'`
11114 { echo "$as_me:$LINENO: result: $ac_res" >&5
11115echo "${ECHO_T}$ac_res" >&6; }
57669b57
JD
11116if test `eval echo '${'$as_ac_var'}'` = yes; then
11117 cat >>confdefs.h <<_ACEOF
11118#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11119_ACEOF
11120 HAVE_GTK_MULTIDISPLAY=yes
11121fi
11122done
11123
11124 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11125
11126cat >>confdefs.h <<\_ACEOF
11127#define HAVE_GTK_MULTIDISPLAY 1
572a3cc2
JD
11128_ACEOF
11129
11130 fi
57669b57 11131
572a3cc2
JD
11132 HAVE_GTK_FILE_SELECTION=no
11133
11134for ac_func in gtk_file_selection_new
11135do
11136as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11137{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11138echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11139if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11140 echo $ECHO_N "(cached) $ECHO_C" >&6
11141else
11142 cat >conftest.$ac_ext <<_ACEOF
11143/* confdefs.h. */
11144_ACEOF
11145cat confdefs.h >>conftest.$ac_ext
11146cat >>conftest.$ac_ext <<_ACEOF
11147/* end confdefs.h. */
edfaf76d
LK
11148/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11149 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11150#define $ac_func innocuous_$ac_func
11151
572a3cc2
JD
11152/* System header to define __stub macros and hopefully few prototypes,
11153 which can conflict with char $ac_func (); below.
11154 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11155 <limits.h> exists even on freestanding compilers. */
edfaf76d 11156
572a3cc2
JD
11157#ifdef __STDC__
11158# include <limits.h>
11159#else
11160# include <assert.h>
11161#endif
edfaf76d
LK
11162
11163#undef $ac_func
11164
ca81d7a0
JD
11165/* Override any GCC internal prototype to avoid an error.
11166 Use char because int might match the return type of a GCC
11167 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11168#ifdef __cplusplus
11169extern "C"
572a3cc2 11170#endif
572a3cc2
JD
11171char $ac_func ();
11172/* The GNU C library defines this for functions which it implements
11173 to always fail with ENOSYS. Some functions are actually named
11174 something starting with __ and the normal name is an alias. */
ca81d7a0 11175#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11176choke me
572a3cc2
JD
11177#endif
11178
11179int
11180main ()
11181{
ca81d7a0 11182return $ac_func ();
572a3cc2
JD
11183 ;
11184 return 0;
11185}
11186_ACEOF
11187rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11188if { (ac_try="$ac_link"
11189case "(($ac_try" in
11190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11191 *) ac_try_echo=$ac_try;;
11192esac
11193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11194 (eval "$ac_link") 2>conftest.er1
572a3cc2 11195 ac_status=$?
edfaf76d
LK
11196 grep -v '^ *+' conftest.er1 >conftest.err
11197 rm -f conftest.er1
11198 cat conftest.err >&5
572a3cc2 11199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11200 (exit $ac_status); } && {
11201 test -z "$ac_c_werror_flag" ||
11202 test ! -s conftest.err
11203 } && test -s conftest$ac_exeext &&
11204 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11205 eval "$as_ac_var=yes"
11206else
11207 echo "$as_me: failed program was:" >&5
11208sed 's/^/| /' conftest.$ac_ext >&5
11209
ca81d7a0 11210 eval "$as_ac_var=no"
572a3cc2 11211fi
ca81d7a0 11212
f053c89f 11213rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11214 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11215fi
ca81d7a0
JD
11216ac_res=`eval echo '${'$as_ac_var'}'`
11217 { echo "$as_me:$LINENO: result: $ac_res" >&5
11218echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11219if test `eval echo '${'$as_ac_var'}'` = yes; then
11220 cat >>confdefs.h <<_ACEOF
11221#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11222_ACEOF
11223 HAVE_GTK_FILE_SELECTION=yes
11224fi
11225done
11226
11227
11228 HAVE_GTK_FILE_CHOOSER=no
11229
11230for ac_func in gtk_file_chooser_dialog_new
11231do
11232as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
11233{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11234echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11235if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
572a3cc2
JD
11236 echo $ECHO_N "(cached) $ECHO_C" >&6
11237else
11238 cat >conftest.$ac_ext <<_ACEOF
11239/* confdefs.h. */
11240_ACEOF
11241cat confdefs.h >>conftest.$ac_ext
11242cat >>conftest.$ac_ext <<_ACEOF
11243/* end confdefs.h. */
edfaf76d
LK
11244/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11245 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11246#define $ac_func innocuous_$ac_func
11247
572a3cc2
JD
11248/* System header to define __stub macros and hopefully few prototypes,
11249 which can conflict with char $ac_func (); below.
11250 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11251 <limits.h> exists even on freestanding compilers. */
edfaf76d 11252
572a3cc2
JD
11253#ifdef __STDC__
11254# include <limits.h>
11255#else
11256# include <assert.h>
11257#endif
edfaf76d
LK
11258
11259#undef $ac_func
11260
ca81d7a0
JD
11261/* Override any GCC internal prototype to avoid an error.
11262 Use char because int might match the return type of a GCC
11263 builtin and then its argument prototype would still apply. */
572a3cc2
JD
11264#ifdef __cplusplus
11265extern "C"
572a3cc2 11266#endif
572a3cc2
JD
11267char $ac_func ();
11268/* The GNU C library defines this for functions which it implements
11269 to always fail with ENOSYS. Some functions are actually named
11270 something starting with __ and the normal name is an alias. */
ca81d7a0 11271#if defined __stub_$ac_func || defined __stub___$ac_func
572a3cc2 11272choke me
572a3cc2
JD
11273#endif
11274
11275int
11276main ()
11277{
ca81d7a0 11278return $ac_func ();
572a3cc2
JD
11279 ;
11280 return 0;
11281}
11282_ACEOF
11283rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11284if { (ac_try="$ac_link"
11285case "(($ac_try" in
11286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11287 *) ac_try_echo=$ac_try;;
11288esac
11289eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11290 (eval "$ac_link") 2>conftest.er1
572a3cc2 11291 ac_status=$?
edfaf76d
LK
11292 grep -v '^ *+' conftest.er1 >conftest.err
11293 rm -f conftest.er1
11294 cat conftest.err >&5
572a3cc2 11295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11296 (exit $ac_status); } && {
11297 test -z "$ac_c_werror_flag" ||
11298 test ! -s conftest.err
11299 } && test -s conftest$ac_exeext &&
11300 $as_test_x conftest$ac_exeext; then
572a3cc2
JD
11301 eval "$as_ac_var=yes"
11302else
11303 echo "$as_me: failed program was:" >&5
11304sed 's/^/| /' conftest.$ac_ext >&5
11305
ca81d7a0 11306 eval "$as_ac_var=no"
572a3cc2 11307fi
ca81d7a0 11308
f053c89f 11309rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11310 conftest$ac_exeext conftest.$ac_ext
572a3cc2 11311fi
ca81d7a0
JD
11312ac_res=`eval echo '${'$as_ac_var'}'`
11313 { echo "$as_me:$LINENO: result: $ac_res" >&5
11314echo "${ECHO_T}$ac_res" >&6; }
572a3cc2
JD
11315if test `eval echo '${'$as_ac_var'}'` = yes; then
11316 cat >>confdefs.h <<_ACEOF
11317#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11318_ACEOF
11319 HAVE_GTK_FILE_CHOOSER=yes
11320fi
11321done
11322
11323
11324 if test "$HAVE_GTK_FILE_SELECTION" = yes \
11325 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11326
11327cat >>confdefs.h <<\_ACEOF
11328#define HAVE_GTK_FILE_BOTH 1
57669b57
JD
11329_ACEOF
11330
b8bdffbe
JD
11331 fi
11332
11333 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
11334 HAVE_GTK_AND_PTHREAD=no
11335
11336for ac_header in pthread.h
11337do
11338as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
11339if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11340 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11341echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11342if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11343 echo $ECHO_N "(cached) $ECHO_C" >&6
11344fi
ca81d7a0
JD
11345ac_res=`eval echo '${'$as_ac_Header'}'`
11346 { echo "$as_me:$LINENO: result: $ac_res" >&5
11347echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11348else
11349 # Is the header compilable?
ca81d7a0
JD
11350{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11351echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
b8bdffbe
JD
11352cat >conftest.$ac_ext <<_ACEOF
11353/* confdefs.h. */
11354_ACEOF
11355cat confdefs.h >>conftest.$ac_ext
11356cat >>conftest.$ac_ext <<_ACEOF
11357/* end confdefs.h. */
11358$ac_includes_default
11359#include <$ac_header>
11360_ACEOF
11361rm -f conftest.$ac_objext
ca81d7a0
JD
11362if { (ac_try="$ac_compile"
11363case "(($ac_try" in
11364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11365 *) ac_try_echo=$ac_try;;
11366esac
11367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11368 (eval "$ac_compile") 2>conftest.er1
b8bdffbe 11369 ac_status=$?
edfaf76d
LK
11370 grep -v '^ *+' conftest.er1 >conftest.err
11371 rm -f conftest.er1
11372 cat conftest.err >&5
b8bdffbe 11373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11374 (exit $ac_status); } && {
11375 test -z "$ac_c_werror_flag" ||
11376 test ! -s conftest.err
11377 } && test -s conftest.$ac_objext; then
b8bdffbe
JD
11378 ac_header_compiler=yes
11379else
11380 echo "$as_me: failed program was:" >&5
11381sed 's/^/| /' conftest.$ac_ext >&5
11382
ca81d7a0 11383 ac_header_compiler=no
b8bdffbe 11384fi
ca81d7a0
JD
11385
11386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11387{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11388echo "${ECHO_T}$ac_header_compiler" >&6; }
b8bdffbe
JD
11389
11390# Is the header present?
ca81d7a0
JD
11391{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
11392echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
b8bdffbe
JD
11393cat >conftest.$ac_ext <<_ACEOF
11394/* confdefs.h. */
11395_ACEOF
11396cat confdefs.h >>conftest.$ac_ext
11397cat >>conftest.$ac_ext <<_ACEOF
11398/* end confdefs.h. */
11399#include <$ac_header>
11400_ACEOF
ca81d7a0
JD
11401if { (ac_try="$ac_cpp conftest.$ac_ext"
11402case "(($ac_try" in
11403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11404 *) ac_try_echo=$ac_try;;
11405esac
11406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11407 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
b8bdffbe
JD
11408 ac_status=$?
11409 grep -v '^ *+' conftest.er1 >conftest.err
11410 rm -f conftest.er1
11411 cat conftest.err >&5
11412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11413 (exit $ac_status); } >/dev/null && {
11414 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11415 test ! -s conftest.err
11416 }; then
b8bdffbe
JD
11417 ac_header_preproc=yes
11418else
11419 echo "$as_me: failed program was:" >&5
11420sed 's/^/| /' conftest.$ac_ext >&5
11421
11422 ac_header_preproc=no
11423fi
ca81d7a0 11424
b8bdffbe 11425rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
11426{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11427echo "${ECHO_T}$ac_header_preproc" >&6; }
b8bdffbe
JD
11428
11429# So? What about this header?
edfaf76d
LK
11430case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11431 yes:no: )
b8bdffbe
JD
11432 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
11433echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
11434 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
11435echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
11436 ac_header_preproc=yes
b8bdffbe 11437 ;;
edfaf76d 11438 no:yes:* )
b8bdffbe
JD
11439 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
11440echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
11441 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
11442echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
11443 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
11444echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
11445 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
11446echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
b8bdffbe
JD
11447 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
11448echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
11449 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
11450echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 11451
b8bdffbe
JD
11452 ;;
11453esac
ca81d7a0
JD
11454{ echo "$as_me:$LINENO: checking for $ac_header" >&5
11455echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11456if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
b8bdffbe
JD
11457 echo $ECHO_N "(cached) $ECHO_C" >&6
11458else
edfaf76d 11459 eval "$as_ac_Header=\$ac_header_preproc"
b8bdffbe 11460fi
ca81d7a0
JD
11461ac_res=`eval echo '${'$as_ac_Header'}'`
11462 { echo "$as_me:$LINENO: result: $ac_res" >&5
11463echo "${ECHO_T}$ac_res" >&6; }
b8bdffbe
JD
11464
11465fi
11466if test `eval echo '${'$as_ac_Header'}'` = yes; then
11467 cat >>confdefs.h <<_ACEOF
11468#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11469_ACEOF
11470
11471fi
11472
11473done
11474
11475 if test "$ac_cv_header_pthread_h"; then
ca81d7a0
JD
11476 { echo "$as_me:$LINENO: checking for pthread_self in -lpthread" >&5
11477echo $ECHO_N "checking for pthread_self in -lpthread... $ECHO_C" >&6; }
b8bdffbe
JD
11478if test "${ac_cv_lib_pthread_pthread_self+set}" = set; then
11479 echo $ECHO_N "(cached) $ECHO_C" >&6
11480else
11481 ac_check_lib_save_LIBS=$LIBS
11482LIBS="-lpthread $LIBS"
11483cat >conftest.$ac_ext <<_ACEOF
11484/* confdefs.h. */
11485_ACEOF
11486cat confdefs.h >>conftest.$ac_ext
11487cat >>conftest.$ac_ext <<_ACEOF
11488/* end confdefs.h. */
11489
ca81d7a0
JD
11490/* Override any GCC internal prototype to avoid an error.
11491 Use char because int might match the return type of a GCC
11492 builtin and then its argument prototype would still apply. */
b8bdffbe
JD
11493#ifdef __cplusplus
11494extern "C"
11495#endif
b8bdffbe
JD
11496char pthread_self ();
11497int
11498main ()
11499{
ca81d7a0 11500return pthread_self ();
b8bdffbe
JD
11501 ;
11502 return 0;
11503}
11504_ACEOF
11505rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11506if { (ac_try="$ac_link"
11507case "(($ac_try" in
11508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11509 *) ac_try_echo=$ac_try;;
11510esac
11511eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11512 (eval "$ac_link") 2>conftest.er1
b8bdffbe 11513 ac_status=$?
edfaf76d
LK
11514 grep -v '^ *+' conftest.er1 >conftest.err
11515 rm -f conftest.er1
11516 cat conftest.err >&5
b8bdffbe 11517 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11518 (exit $ac_status); } && {
11519 test -z "$ac_c_werror_flag" ||
11520 test ! -s conftest.err
11521 } && test -s conftest$ac_exeext &&
11522 $as_test_x conftest$ac_exeext; then
b8bdffbe
JD
11523 ac_cv_lib_pthread_pthread_self=yes
11524else
11525 echo "$as_me: failed program was:" >&5
11526sed 's/^/| /' conftest.$ac_ext >&5
11527
ca81d7a0 11528 ac_cv_lib_pthread_pthread_self=no
b8bdffbe 11529fi
ca81d7a0 11530
f053c89f 11531rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11532 conftest$ac_exeext conftest.$ac_ext
b8bdffbe
JD
11533LIBS=$ac_check_lib_save_LIBS
11534fi
ca81d7a0
JD
11535{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_self" >&5
11536echo "${ECHO_T}$ac_cv_lib_pthread_pthread_self" >&6; }
b8bdffbe
JD
11537if test $ac_cv_lib_pthread_pthread_self = yes; then
11538 HAVE_GTK_AND_PTHREAD=yes
11539fi
11540
11541 fi
11542 if test "$HAVE_GTK_AND_PTHREAD" = yes; then
846d1b3e
JD
11543 case "${canonical}" in
11544 *-hpux*) ;;
11545 *) GTK_LIBS="$GTK_LIBS -lpthread" ;;
11546 esac
b8bdffbe
JD
11547
11548cat >>confdefs.h <<\_ACEOF
11549#define HAVE_GTK_AND_PTHREAD 1
11550_ACEOF
11551
11552 fi
57669b57 11553 fi
488dd4c4
JD
11554fi
11555
131e4133
MA
11556HAVE_DBUS=no
11557if test "${with_dbus}" = "yes"; then
cffe4909
MH
11558
11559 succeeded=no
11560
00b9c927 11561 # Extract the first word of "pkg-config", so it can be a program name with args.
cffe4909
MH
11562set dummy pkg-config; ac_word=$2
11563{ echo "$as_me:$LINENO: checking for $ac_word" >&5
11564echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
11565if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
131e4133
MA
11566 echo $ECHO_N "(cached) $ECHO_C" >&6
11567else
cffe4909
MH
11568 case $PKG_CONFIG in
11569 [\\/]* | ?:[\\/]*)
11570 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
11571 ;;
11572 *)
11573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11574for as_dir in $PATH
11575do
11576 IFS=$as_save_IFS
11577 test -z "$as_dir" && as_dir=.
11578 for ac_exec_ext in '' $ac_executable_extensions; do
11579 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
11580 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
11581 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
11582 break 2
11583 fi
11584done
11585done
11586IFS=$as_save_IFS
131e4133 11587
cffe4909
MH
11588 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
11589 ;;
131e4133 11590esac
cffe4909
MH
11591fi
11592PKG_CONFIG=$ac_cv_path_PKG_CONFIG
11593if test -n "$PKG_CONFIG"; then
11594 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
11595echo "${ECHO_T}$PKG_CONFIG" >&6; }
131e4133 11596else
cffe4909
MH
11597 { echo "$as_me:$LINENO: result: no" >&5
11598echo "${ECHO_T}no" >&6; }
131e4133
MA
11599fi
11600
cffe4909 11601
cffe4909
MH
11602
11603 if test "$PKG_CONFIG" = "no" ; then
11604 HAVE_DBUS=no
11605 else
11606 PKG_CONFIG_MIN_VERSION=0.9.0
11607 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
11608 { echo "$as_me:$LINENO: checking for dbus-1 >= 1.0" >&5
11609echo $ECHO_N "checking for dbus-1 >= 1.0... $ECHO_C" >&6; }
11610
11611 if $PKG_CONFIG --exists "dbus-1 >= 1.0" 2>&5; then
11612 { echo "$as_me:$LINENO: result: yes" >&5
11613echo "${ECHO_T}yes" >&6; }
11614 succeeded=yes
11615
11616 { echo "$as_me:$LINENO: checking DBUS_CFLAGS" >&5
11617echo $ECHO_N "checking DBUS_CFLAGS... $ECHO_C" >&6; }
11618 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11619 { echo "$as_me:$LINENO: result: $DBUS_CFLAGS" >&5
11620echo "${ECHO_T}$DBUS_CFLAGS" >&6; }
11621
11622 { echo "$as_me:$LINENO: checking DBUS_LIBS" >&5
11623echo $ECHO_N "checking DBUS_LIBS... $ECHO_C" >&6; }
11624 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1 >= 1.0"|sed -e 's,///*,/,g'`
11625 { echo "$as_me:$LINENO: result: $DBUS_LIBS" >&5
11626echo "${ECHO_T}$DBUS_LIBS" >&6; }
11627 else
11628 { echo "$as_me:$LINENO: result: no" >&5
11629echo "${ECHO_T}no" >&6; }
11630 DBUS_CFLAGS=""
11631 DBUS_LIBS=""
11632 ## If we have a custom action on failure, don't print errors, but
11633 ## do set a variable so people can do so.
11634 DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1 >= 1.0"`
11635
11636 fi
11637
11638
11639
11640 else
11641 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
11642 echo "*** See http://www.freedesktop.org/software/pkgconfig"
11643 fi
11644 fi
11645
11646 if test $succeeded = yes; then
11647 HAVE_DBUS=yes
11648 else
11649 HAVE_DBUS=no
11650 fi
131e4133
MA
11651
11652 if test "$HAVE_DBUS" = yes; then
11653
11654cat >>confdefs.h <<\_ACEOF
11655#define HAVE_DBUS 1
11656_ACEOF
11657
131e4133
MA
11658 fi
11659fi
11660
b3615392 11661HAVE_XAW3D=no
991a7602 11662if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
f23d76bd
MB
11663 if test "$with_xaw3d" != no; then
11664 { echo "$as_me:$LINENO: checking for xaw3d" >&5
b3615392 11665echo $ECHO_N "checking for xaw3d... $ECHO_C" >&6; }
f23d76bd 11666 if test "${emacs_cv_xaw3d+set}" = set; then
98418dba
CW
11667 echo $ECHO_N "(cached) $ECHO_C" >&6
11668else
11669 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11670/* confdefs.h. */
11671_ACEOF
11672cat confdefs.h >>conftest.$ac_ext
11673cat >>conftest.$ac_ext <<_ACEOF
11674/* end confdefs.h. */
98418dba
CW
11675
11676#include <X11/Intrinsic.h>
b3615392 11677#include <X11/Xaw3d/Simple.h>
98418dba
CW
11678int
11679main ()
11680{
11681
11682 ;
11683 return 0;
11684}
11685_ACEOF
11686rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11687if { (ac_try="$ac_link"
11688case "(($ac_try" in
11689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11690 *) ac_try_echo=$ac_try;;
11691esac
11692eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11693 (eval "$ac_link") 2>conftest.er1
98418dba 11694 ac_status=$?
edfaf76d
LK
11695 grep -v '^ *+' conftest.er1 >conftest.err
11696 rm -f conftest.er1
11697 cat conftest.err >&5
c0d27fcc 11698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11699 (exit $ac_status); } && {
11700 test -z "$ac_c_werror_flag" ||
11701 test ! -s conftest.err
11702 } && test -s conftest$ac_exeext &&
11703 $as_test_x conftest$ac_exeext; then
b3615392 11704 emacs_cv_xaw3d=yes
98418dba
CW
11705else
11706 echo "$as_me: failed program was:" >&5
19650fd6
AS
11707sed 's/^/| /' conftest.$ac_ext >&5
11708
b3615392 11709 emacs_cv_xaw3d=no
98418dba 11710fi
ca81d7a0 11711
f053c89f 11712rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11713 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11714fi
11715
9d89ffd0 11716 else
f23d76bd 11717 emacs_cv_xaw3d=no
9d89ffd0 11718 fi
f23d76bd
MB
11719 if test $emacs_cv_xaw3d = yes; then
11720 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 11721echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11722 USE_X_TOOLKIT=LUCID
11723 HAVE_XAW3D=yes
9d89ffd0 11724
b3615392
MB
11725cat >>confdefs.h <<\_ACEOF
11726#define HAVE_XAW3D 1
11727_ACEOF
9d89ffd0 11728
f23d76bd
MB
11729 else
11730 { echo "$as_me:$LINENO: result: no" >&5
9d89ffd0 11731echo "${ECHO_T}no" >&6; }
f23d76bd 11732 { echo "$as_me:$LINENO: checking for libXaw" >&5
b3615392 11733echo $ECHO_N "checking for libXaw... $ECHO_C" >&6; }
f23d76bd 11734 if test "${emacs_cv_xaw+set}" = set; then
9d89ffd0 11735 echo $ECHO_N "(cached) $ECHO_C" >&6
9d89ffd0 11736else
b3615392 11737 cat >conftest.$ac_ext <<_ACEOF
9d89ffd0
JD
11738/* confdefs.h. */
11739_ACEOF
11740cat confdefs.h >>conftest.$ac_ext
11741cat >>conftest.$ac_ext <<_ACEOF
11742/* end confdefs.h. */
b3615392
MB
11743
11744#include <X11/Intrinsic.h>
11745#include <X11/Xaw/Simple.h>
11746int
11747main ()
11748{
11749
11750 ;
11751 return 0;
11752}
9d89ffd0 11753_ACEOF
b3615392
MB
11754rm -f conftest.$ac_objext conftest$ac_exeext
11755if { (ac_try="$ac_link"
9d89ffd0
JD
11756case "(($ac_try" in
11757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11758 *) ac_try_echo=$ac_try;;
11759esac
11760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
b3615392 11761 (eval "$ac_link") 2>conftest.er1
9d89ffd0
JD
11762 ac_status=$?
11763 grep -v '^ *+' conftest.er1 >conftest.err
11764 rm -f conftest.er1
11765 cat conftest.err >&5
11766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11767 (exit $ac_status); } && {
11768 test -z "$ac_c_werror_flag" ||
11769 test ! -s conftest.err
b3615392
MB
11770 } && test -s conftest$ac_exeext &&
11771 $as_test_x conftest$ac_exeext; then
11772 emacs_cv_xaw=yes
9d89ffd0
JD
11773else
11774 echo "$as_me: failed program was:" >&5
11775sed 's/^/| /' conftest.$ac_ext >&5
11776
b3615392 11777 emacs_cv_xaw=no
9d89ffd0
JD
11778fi
11779
b3615392
MB
11780rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11781 conftest$ac_exeext conftest.$ac_ext
11782fi
9d89ffd0 11783
f23d76bd
MB
11784 if test $emacs_cv_xaw = yes; then
11785 { echo "$as_me:$LINENO: result: yes; using Lucid toolkit" >&5
b3615392 11786echo "${ECHO_T}yes; using Lucid toolkit" >&6; }
f23d76bd
MB
11787 USE_X_TOOLKIT=LUCID
11788 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
11789 { { echo "$as_me:$LINENO: error: Lucid toolkit requires X11/Xaw include files" >&5
991a7602
MB
11790echo "$as_me: error: Lucid toolkit requires X11/Xaw include files" >&2;}
11791 { (exit 1); exit 1; }; }
f23d76bd
MB
11792 else
11793 { echo "$as_me:$LINENO: result: no; do not use toolkit by default" >&5
b3615392 11794echo "${ECHO_T}no; do not use toolkit by default" >&6; }
f23d76bd 11795 USE_X_TOOLKIT=none
98418dba 11796 fi
98418dba
CW
11797 fi
11798fi
11799
11800X_TOOLKIT_TYPE=$USE_X_TOOLKIT
11801
11802if test "${USE_X_TOOLKIT}" != "none"; then
ca81d7a0
JD
11803 { echo "$as_me:$LINENO: checking X11 toolkit version" >&5
11804echo $ECHO_N "checking X11 toolkit version... $ECHO_C" >&6; }
98418dba
CW
11805 if test "${emacs_cv_x11_toolkit_version_6+set}" = set; then
11806 echo $ECHO_N "(cached) $ECHO_C" >&6
11807else
11808 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11809/* confdefs.h. */
11810_ACEOF
11811cat confdefs.h >>conftest.$ac_ext
11812cat >>conftest.$ac_ext <<_ACEOF
11813/* end confdefs.h. */
98418dba 11814#include <X11/Intrinsic.h>
98418dba
CW
11815int
11816main ()
11817{
11818#if XtSpecificationRelease < 6
11819fail;
11820#endif
11821
11822 ;
11823 return 0;
11824}
11825_ACEOF
11826rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11827if { (ac_try="$ac_link"
11828case "(($ac_try" in
11829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11830 *) ac_try_echo=$ac_try;;
11831esac
11832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11833 (eval "$ac_link") 2>conftest.er1
98418dba 11834 ac_status=$?
edfaf76d
LK
11835 grep -v '^ *+' conftest.er1 >conftest.err
11836 rm -f conftest.er1
11837 cat conftest.err >&5
c0d27fcc 11838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11839 (exit $ac_status); } && {
11840 test -z "$ac_c_werror_flag" ||
11841 test ! -s conftest.err
11842 } && test -s conftest$ac_exeext &&
11843 $as_test_x conftest$ac_exeext; then
98418dba
CW
11844 emacs_cv_x11_toolkit_version_6=yes
11845else
11846 echo "$as_me: failed program was:" >&5
19650fd6
AS
11847sed 's/^/| /' conftest.$ac_ext >&5
11848
ca81d7a0 11849 emacs_cv_x11_toolkit_version_6=no
98418dba 11850fi
ca81d7a0 11851
f053c89f 11852rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11853 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11854fi
11855
11856 HAVE_X11XTR6=$emacs_cv_x11_toolkit_version_6
11857 if test $emacs_cv_x11_toolkit_version_6 = yes; then
ca81d7a0
JD
11858 { echo "$as_me:$LINENO: result: 6 or newer" >&5
11859echo "${ECHO_T}6 or newer" >&6; }
b936fae4 11860
c0d27fcc 11861cat >>confdefs.h <<\_ACEOF
98418dba 11862#define HAVE_X11XTR6 1
c0d27fcc 11863_ACEOF
98418dba
CW
11864
11865 else
ca81d7a0
JD
11866 { echo "$as_me:$LINENO: result: before 6" >&5
11867echo "${ECHO_T}before 6" >&6; }
98418dba
CW
11868 fi
11869
11870 OLDLIBS="$LIBS"
11871 if test x$HAVE_X11XTR6 = xyes; then
11872 LIBS="-lXt -lSM -lICE $LIBS"
11873 else
11874 LIBS="-lXt $LIBS"
11875 fi
11876
ca81d7a0
JD
11877{ echo "$as_me:$LINENO: checking for XmuConvertStandardSelection in -lXmu" >&5
11878echo $ECHO_N "checking for XmuConvertStandardSelection in -lXmu... $ECHO_C" >&6; }
98418dba
CW
11879if test "${ac_cv_lib_Xmu_XmuConvertStandardSelection+set}" = set; then
11880 echo $ECHO_N "(cached) $ECHO_C" >&6
11881else
11882 ac_check_lib_save_LIBS=$LIBS
11883LIBS="-lXmu $LIBS"
11884cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11885/* confdefs.h. */
11886_ACEOF
11887cat confdefs.h >>conftest.$ac_ext
11888cat >>conftest.$ac_ext <<_ACEOF
11889/* end confdefs.h. */
98418dba 11890
ca81d7a0
JD
11891/* Override any GCC internal prototype to avoid an error.
11892 Use char because int might match the return type of a GCC
11893 builtin and then its argument prototype would still apply. */
98418dba
CW
11894#ifdef __cplusplus
11895extern "C"
11896#endif
98418dba 11897char XmuConvertStandardSelection ();
98418dba
CW
11898int
11899main ()
11900{
ca81d7a0 11901return XmuConvertStandardSelection ();
98418dba
CW
11902 ;
11903 return 0;
11904}
11905_ACEOF
11906rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11907if { (ac_try="$ac_link"
11908case "(($ac_try" in
11909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11910 *) ac_try_echo=$ac_try;;
11911esac
11912eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11913 (eval "$ac_link") 2>conftest.er1
98418dba 11914 ac_status=$?
edfaf76d
LK
11915 grep -v '^ *+' conftest.er1 >conftest.err
11916 rm -f conftest.er1
11917 cat conftest.err >&5
c0d27fcc 11918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11919 (exit $ac_status); } && {
11920 test -z "$ac_c_werror_flag" ||
11921 test ! -s conftest.err
11922 } && test -s conftest$ac_exeext &&
11923 $as_test_x conftest$ac_exeext; then
98418dba
CW
11924 ac_cv_lib_Xmu_XmuConvertStandardSelection=yes
11925else
11926 echo "$as_me: failed program was:" >&5
19650fd6
AS
11927sed 's/^/| /' conftest.$ac_ext >&5
11928
ca81d7a0 11929 ac_cv_lib_Xmu_XmuConvertStandardSelection=no
98418dba 11930fi
ca81d7a0 11931
f053c89f 11932rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 11933 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
11934LIBS=$ac_check_lib_save_LIBS
11935fi
ca81d7a0
JD
11936{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xmu_XmuConvertStandardSelection" >&5
11937echo "${ECHO_T}$ac_cv_lib_Xmu_XmuConvertStandardSelection" >&6; }
98418dba 11938if test $ac_cv_lib_Xmu_XmuConvertStandardSelection = yes; then
c0d27fcc 11939 cat >>confdefs.h <<_ACEOF
98418dba 11940#define HAVE_LIBXMU 1
c0d27fcc 11941_ACEOF
98418dba
CW
11942
11943 LIBS="-lXmu $LIBS"
11944
11945fi
11946
11947 test $ac_cv_lib_Xmu_XmuConvertStandardSelection = no && LIBS="$OLDLIBS"
11948fi
11949
11950# On Irix 6.5, at least, we need XShapeQueryExtension from -lXext for Xaw3D.
11951if test "${HAVE_X11}" = "yes"; then
11952 if test "${USE_X_TOOLKIT}" != "none"; then
11953
ca81d7a0
JD
11954{ echo "$as_me:$LINENO: checking for XShapeQueryExtension in -lXext" >&5
11955echo $ECHO_N "checking for XShapeQueryExtension in -lXext... $ECHO_C" >&6; }
98418dba
CW
11956if test "${ac_cv_lib_Xext_XShapeQueryExtension+set}" = set; then
11957 echo $ECHO_N "(cached) $ECHO_C" >&6
11958else
11959 ac_check_lib_save_LIBS=$LIBS
11960LIBS="-lXext $LIBS"
11961cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
11962/* confdefs.h. */
11963_ACEOF
11964cat confdefs.h >>conftest.$ac_ext
11965cat >>conftest.$ac_ext <<_ACEOF
11966/* end confdefs.h. */
98418dba 11967
ca81d7a0
JD
11968/* Override any GCC internal prototype to avoid an error.
11969 Use char because int might match the return type of a GCC
11970 builtin and then its argument prototype would still apply. */
98418dba
CW
11971#ifdef __cplusplus
11972extern "C"
11973#endif
98418dba 11974char XShapeQueryExtension ();
98418dba
CW
11975int
11976main ()
11977{
ca81d7a0 11978return XShapeQueryExtension ();
98418dba
CW
11979 ;
11980 return 0;
11981}
11982_ACEOF
11983rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
11984if { (ac_try="$ac_link"
11985case "(($ac_try" in
11986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11987 *) ac_try_echo=$ac_try;;
11988esac
11989eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11990 (eval "$ac_link") 2>conftest.er1
98418dba 11991 ac_status=$?
edfaf76d
LK
11992 grep -v '^ *+' conftest.er1 >conftest.err
11993 rm -f conftest.er1
11994 cat conftest.err >&5
c0d27fcc 11995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
11996 (exit $ac_status); } && {
11997 test -z "$ac_c_werror_flag" ||
11998 test ! -s conftest.err
11999 } && test -s conftest$ac_exeext &&
12000 $as_test_x conftest$ac_exeext; then
98418dba
CW
12001 ac_cv_lib_Xext_XShapeQueryExtension=yes
12002else
12003 echo "$as_me: failed program was:" >&5
19650fd6
AS
12004sed 's/^/| /' conftest.$ac_ext >&5
12005
ca81d7a0 12006 ac_cv_lib_Xext_XShapeQueryExtension=no
98418dba 12007fi
ca81d7a0 12008
f053c89f 12009rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12010 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12011LIBS=$ac_check_lib_save_LIBS
12012fi
ca81d7a0
JD
12013{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShapeQueryExtension" >&5
12014echo "${ECHO_T}$ac_cv_lib_Xext_XShapeQueryExtension" >&6; }
98418dba 12015if test $ac_cv_lib_Xext_XShapeQueryExtension = yes; then
c0d27fcc 12016 cat >>confdefs.h <<_ACEOF
98418dba 12017#define HAVE_LIBXEXT 1
c0d27fcc 12018_ACEOF
98418dba
CW
12019
12020 LIBS="-lXext $LIBS"
12021
12022fi
12023
12024 fi
12025fi
12026
12027if test "${USE_X_TOOLKIT}" = "MOTIF"; then
ca81d7a0
JD
12028 { echo "$as_me:$LINENO: checking for Motif version 2.1" >&5
12029echo $ECHO_N "checking for Motif version 2.1... $ECHO_C" >&6; }
98418dba
CW
12030if test "${emacs_cv_motif_version_2_1+set}" = set; then
12031 echo $ECHO_N "(cached) $ECHO_C" >&6
12032else
12033 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12034/* confdefs.h. */
12035_ACEOF
12036cat confdefs.h >>conftest.$ac_ext
12037cat >>conftest.$ac_ext <<_ACEOF
12038/* end confdefs.h. */
98418dba 12039#include <Xm/Xm.h>
98418dba
CW
12040int
12041main ()
12042{
12043#if XmVERSION > 2 || (XmVERSION == 2 && XmREVISION >= 1)
12044int x = 5;
12045#else
12046Motif version prior to 2.1.
12047#endif
12048 ;
12049 return 0;
12050}
12051_ACEOF
12052rm -f conftest.$ac_objext
ca81d7a0
JD
12053if { (ac_try="$ac_compile"
12054case "(($ac_try" in
12055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12056 *) ac_try_echo=$ac_try;;
12057esac
12058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12059 (eval "$ac_compile") 2>conftest.er1
98418dba 12060 ac_status=$?
edfaf76d
LK
12061 grep -v '^ *+' conftest.er1 >conftest.err
12062 rm -f conftest.er1
12063 cat conftest.err >&5
c0d27fcc 12064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12065 (exit $ac_status); } && {
12066 test -z "$ac_c_werror_flag" ||
12067 test ! -s conftest.err
12068 } && test -s conftest.$ac_objext; then
98418dba
CW
12069 emacs_cv_motif_version_2_1=yes
12070else
12071 echo "$as_me: failed program was:" >&5
19650fd6
AS
12072sed 's/^/| /' conftest.$ac_ext >&5
12073
ca81d7a0 12074 emacs_cv_motif_version_2_1=no
98418dba 12075fi
ca81d7a0
JD
12076
12077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
98418dba 12078fi
ca81d7a0
JD
12079{ echo "$as_me:$LINENO: result: $emacs_cv_motif_version_2_1" >&5
12080echo "${ECHO_T}$emacs_cv_motif_version_2_1" >&6; }
98418dba
CW
12081 HAVE_MOTIF_2_1=$emacs_cv_motif_version_2_1
12082 if test $emacs_cv_motif_version_2_1 = yes; then
12083 HAVE_LIBXP=no
b936fae4 12084
c0d27fcc 12085cat >>confdefs.h <<\_ACEOF
98418dba 12086#define HAVE_MOTIF_2_1 1
c0d27fcc 12087_ACEOF
98418dba 12088
ca81d7a0
JD
12089 { echo "$as_me:$LINENO: checking for XpCreateContext in -lXp" >&5
12090echo $ECHO_N "checking for XpCreateContext in -lXp... $ECHO_C" >&6; }
98418dba
CW
12091if test "${ac_cv_lib_Xp_XpCreateContext+set}" = set; then
12092 echo $ECHO_N "(cached) $ECHO_C" >&6
12093else
12094 ac_check_lib_save_LIBS=$LIBS
12095LIBS="-lXp $LIBS"
12096cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12097/* confdefs.h. */
12098_ACEOF
12099cat confdefs.h >>conftest.$ac_ext
12100cat >>conftest.$ac_ext <<_ACEOF
12101/* end confdefs.h. */
98418dba 12102
ca81d7a0
JD
12103/* Override any GCC internal prototype to avoid an error.
12104 Use char because int might match the return type of a GCC
12105 builtin and then its argument prototype would still apply. */
98418dba
CW
12106#ifdef __cplusplus
12107extern "C"
12108#endif
98418dba 12109char XpCreateContext ();
98418dba
CW
12110int
12111main ()
12112{
ca81d7a0 12113return XpCreateContext ();
98418dba
CW
12114 ;
12115 return 0;
12116}
12117_ACEOF
12118rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
12119if { (ac_try="$ac_link"
12120case "(($ac_try" in
12121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12122 *) ac_try_echo=$ac_try;;
12123esac
12124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12125 (eval "$ac_link") 2>conftest.er1
98418dba 12126 ac_status=$?
edfaf76d
LK
12127 grep -v '^ *+' conftest.er1 >conftest.err
12128 rm -f conftest.er1
12129 cat conftest.err >&5
c0d27fcc 12130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12131 (exit $ac_status); } && {
12132 test -z "$ac_c_werror_flag" ||
12133 test ! -s conftest.err
12134 } && test -s conftest$ac_exeext &&
12135 $as_test_x conftest$ac_exeext; then
98418dba
CW
12136 ac_cv_lib_Xp_XpCreateContext=yes
12137else
12138 echo "$as_me: failed program was:" >&5
19650fd6
AS
12139sed 's/^/| /' conftest.$ac_ext >&5
12140
ca81d7a0 12141 ac_cv_lib_Xp_XpCreateContext=no
98418dba 12142fi
ca81d7a0 12143
f053c89f 12144rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 12145 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
12146LIBS=$ac_check_lib_save_LIBS
12147fi
ca81d7a0
JD
12148{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xp_XpCreateContext" >&5
12149echo "${ECHO_T}$ac_cv_lib_Xp_XpCreateContext" >&6; }
98418dba
CW
12150if test $ac_cv_lib_Xp_XpCreateContext = yes; then
12151 HAVE_LIBXP=yes
12152fi
503d2be0 12153
98418dba 12154 if test ${HAVE_LIBXP} = yes; then
b936fae4 12155
c0d27fcc 12156cat >>confdefs.h <<\_ACEOF
98418dba 12157#define HAVE_LIBXP 1
c0d27fcc 12158_ACEOF
503d2be0 12159
98418dba 12160 fi
4693dbc9 12161 else
ca81d7a0
JD
12162 { echo "$as_me:$LINENO: checking for LessTif where some systems put it" >&5
12163echo $ECHO_N "checking for LessTif where some systems put it... $ECHO_C" >&6; }
4693dbc9
SM
12164if test "${emacs_cv_lesstif+set}" = set; then
12165 echo $ECHO_N "(cached) $ECHO_C" >&6
12166else
12167 # We put this in CFLAGS temporarily to precede other -I options
12168 # that might be in CFLAGS temporarily.
12169 # We put this in CPPFLAGS where it precedes the other -I options.
12170 OLD_CPPFLAGS=$CPPFLAGS
12171 OLD_CFLAGS=$CFLAGS
12172 CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CPPFLAGS"
12173 CFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $CFLAGS"
12174 cat >conftest.$ac_ext <<_ACEOF
12175/* confdefs.h. */
12176_ACEOF
12177cat confdefs.h >>conftest.$ac_ext
12178cat >>conftest.$ac_ext <<_ACEOF
12179/* end confdefs.h. */
12180#include </usr/X11R6/LessTif/Motif1.2/include/Xm/Xm.h>
12181int
12182main ()
12183{
12184int x = 5;
12185 ;
12186 return 0;
12187}
12188_ACEOF
12189rm -f conftest.$ac_objext
ca81d7a0
JD
12190if { (ac_try="$ac_compile"
12191case "(($ac_try" in
12192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12193 *) ac_try_echo=$ac_try;;
12194esac
12195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12196 (eval "$ac_compile") 2>conftest.er1
4693dbc9 12197 ac_status=$?
edfaf76d
LK
12198 grep -v '^ *+' conftest.er1 >conftest.err
12199 rm -f conftest.er1
12200 cat conftest.err >&5
4693dbc9 12201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12202 (exit $ac_status); } && {
12203 test -z "$ac_c_werror_flag" ||
12204 test ! -s conftest.err
12205 } && test -s conftest.$ac_objext; then
4693dbc9
SM
12206 emacs_cv_lesstif=yes
12207else
12208 echo "$as_me: failed program was:" >&5
12209sed 's/^/| /' conftest.$ac_ext >&5
12210
ca81d7a0 12211 emacs_cv_lesstif=no
4693dbc9 12212fi
ca81d7a0
JD
12213
12214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4693dbc9 12215fi
ca81d7a0
JD
12216{ echo "$as_me:$LINENO: result: $emacs_cv_lesstif" >&5
12217echo "${ECHO_T}$emacs_cv_lesstif" >&6; }
4693dbc9
SM
12218 if test $emacs_cv_lesstif = yes; then
12219 # Make sure this -I option remains in CPPFLAGS after it is set
12220 # back to REAL_CPPFLAGS.
12221 # There is no need to change REAL_CFLAGS, because REAL_CFLAGS does not
12222 # have those other -I options anyway. Ultimately, having this
12223 # directory ultimately in CPPFLAGS will be enough.
12224 REAL_CPPFLAGS="-I/usr/X11R6/LessTif/Motif1.2/include $REAL_CPPFLAGS"
12225 LDFLAGS="-L/usr/X11R6/LessTif/Motif1.2/lib $LDFLAGS"
12226 else
12227 CFLAGS=$OLD_CFLAGS
12228 CPPFLAGS=$OLD_CPPFLAGS
12229 fi
98418dba
CW
12230 fi
12231fi
12232
c0d27fcc
MR
12233
12234
98418dba
CW
12235USE_TOOLKIT_SCROLL_BARS=no
12236if test "${with_toolkit_scroll_bars}" != "no"; then
12237 if test "${USE_X_TOOLKIT}" != "none"; then
12238 if test "${USE_X_TOOLKIT}" = "MOTIF"; then
c0d27fcc 12239 cat >>confdefs.h <<\_ACEOF
98418dba 12240#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12241_ACEOF
98418dba
CW
12242
12243 HAVE_XAW3D=no
12244 USE_TOOLKIT_SCROLL_BARS=yes
12245 elif test "${HAVE_XAW3D}" = "yes"; then
c0d27fcc 12246 cat >>confdefs.h <<\_ACEOF
98418dba 12247#define USE_TOOLKIT_SCROLL_BARS 1
c0d27fcc 12248_ACEOF
98418dba
CW
12249
12250 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5 12251 fi
488dd4c4
JD
12252 elif test "${HAVE_GTK}" = "yes"; then
12253 cat >>confdefs.h <<\_ACEOF
12254#define USE_TOOLKIT_SCROLL_BARS 1
5d6da11e
YM
12255_ACEOF
12256
12257 USE_TOOLKIT_SCROLL_BARS=yes
12258 elif test "${HAVE_CARBON}" = "yes"; then
12259 cat >>confdefs.h <<\_ACEOF
12260#define USE_TOOLKIT_SCROLL_BARS 1
488dd4c4
JD
12261_ACEOF
12262
12263 USE_TOOLKIT_SCROLL_BARS=yes
ba4481b5
DL
12264 fi
12265fi
12266
abd39b57 12267cat >conftest.$ac_ext <<_ACEOF
abd39b57
AC
12268/* confdefs.h. */
12269_ACEOF
12270cat confdefs.h >>conftest.$ac_ext
12271cat >>conftest.$ac_ext <<_ACEOF
12272/* end confdefs.h. */
12273
12274 #include <X11/Xlib.h>
12275 #include <X11/Xresource.h>
12276int
12277main ()
12278{
12279XIMProc callback;
12280 ;
12281 return 0;
12282}
12283_ACEOF
12284rm -f conftest.$ac_objext
ca81d7a0
JD
12285if { (ac_try="$ac_compile"
12286case "(($ac_try" in
12287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12288 *) ac_try_echo=$ac_try;;
12289esac
12290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12291 (eval "$ac_compile") 2>conftest.er1
abd39b57 12292 ac_status=$?
edfaf76d
LK
12293 grep -v '^ *+' conftest.er1 >conftest.err
12294 rm -f conftest.er1
12295 cat conftest.err >&5
abd39b57 12296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12297 (exit $ac_status); } && {
12298 test -z "$ac_c_werror_flag" ||
12299 test ! -s conftest.err
12300 } && test -s conftest.$ac_objext; then
abd39b57
AC
12301 HAVE_XIM=yes
12302
12303cat >>confdefs.h <<\_ACEOF
12304#define HAVE_XIM 1
12305_ACEOF
12306
12307else
12308 echo "$as_me: failed program was:" >&5
12309sed 's/^/| /' conftest.$ac_ext >&5
12310
ca81d7a0 12311 HAVE_XIM=no
abd39b57 12312fi
ca81d7a0
JD
12313
12314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
abd39b57 12315
c0d27fcc 12316
98418dba 12317if test "${with_xim}" != "no"; then
b936fae4 12318
c0d27fcc 12319cat >>confdefs.h <<\_ACEOF
98418dba 12320#define USE_XIM 1
c0d27fcc 12321_ACEOF
98418dba 12322
793fa0d7 12323fi
abd39b57
AC
12324
12325
12326if test "${HAVE_XIM}" != "no"; then
849d80cf
DL
12327 late_CFLAGS=$CFLAGS
12328 if test "$GCC" = yes; then
12329 CFLAGS="$CFLAGS --pedantic-errors"
12330 fi
cffcede7 12331 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
12332/* confdefs.h. */
12333_ACEOF
12334cat confdefs.h >>conftest.$ac_ext
12335cat >>conftest.$ac_ext <<_ACEOF
12336/* end confdefs.h. */
cffcede7
JD
12337
12338#include <X11/Xlib.h>
12339#include <X11/Xresource.h>
12340int
12341main ()
12342{
12343Display *display;
12344XrmDatabase db;
12345char *res_name;
12346char *res_class;
12347XIMProc callback;
12348XPointer *client_data;
849d80cf
DL
12349#ifndef __GNUC__
12350/* If we're not using GCC, it's probably not XFree86, and this is
12351 probably right, but we can't use something like --pedantic-errors. */
12352extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*,
12353 char*, XIMProc, XPointer*);
12354#endif
cffcede7
JD
12355(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback,
12356 client_data);
12357 ;
12358 return 0;
12359}
12360_ACEOF
12361rm -f conftest.$ac_objext
ca81d7a0
JD
12362if { (ac_try="$ac_compile"
12363case "(($ac_try" in
12364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12365 *) ac_try_echo=$ac_try;;
12366esac
12367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12368 (eval "$ac_compile") 2>conftest.er1
cffcede7 12369 ac_status=$?
edfaf76d
LK
12370 grep -v '^ *+' conftest.er1 >conftest.err
12371 rm -f conftest.er1
12372 cat conftest.err >&5
cffcede7 12373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
12374 (exit $ac_status); } && {
12375 test -z "$ac_c_werror_flag" ||
12376 test ! -s conftest.err
12377 } && test -s conftest.$ac_objext; then
cffcede7
JD
12378 emacs_cv_arg6_star=yes
12379else
12380 echo "$as_me: failed program was:" >&5
19650fd6
AS
12381sed 's/^/| /' conftest.$ac_ext >&5
12382
ca81d7a0 12383
cffcede7 12384fi
ca81d7a0
JD
12385
12386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cffcede7
JD
12387
12388 if test "$emacs_cv_arg6_star" = yes; then
f57bd967 12389 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12390#define XRegisterIMInstantiateCallback_arg6 XPointer*
12391_ACEOF
12392
12393 else
f57bd967 12394 cat >>confdefs.h <<\_ACEOF
cffcede7
JD
12395#define XRegisterIMInstantiateCallback_arg6 XPointer
12396_ACEOF
12397
12398 fi
849d80cf 12399 CFLAGS=$late_CFLAGS
45a4b03e
KH
12400fi
12401
77dfeef5
GM
12402### Start of font-backend section.
12403if test "${HAVE_X11}" != "yes"; then
12404 USE_FONT_BACKEND=no
12405fi
45a4b03e 12406
77dfeef5 12407if test "${USE_FONT_BACKEND}" = "yes"; then
45a4b03e
KH
12408
12409cat >>confdefs.h <<\_ACEOF
12410#define USE_FONT_BACKEND 1
12411_ACEOF
12412
12413
77dfeef5
GM
12414 ## Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'.
12415 HAVE_XFT=maybe
45a4b03e
KH
12416 if test "x${with_freetype}" = "xno"; then
12417 with_xft="no";
12418 fi
12419 if test "x${with_xft}" != "xno"; then
12420
45a4b03e
KH
12421
12422 succeeded=no
12423
d235ca2f 12424 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12425set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12426{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12427echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12428if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12429 echo $ECHO_N "(cached) $ECHO_C" >&6
12430else
12431 case $PKG_CONFIG in
12432 [\\/]* | ?:[\\/]*)
12433 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12434 ;;
12435 *)
12436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12437for as_dir in $PATH
12438do
12439 IFS=$as_save_IFS
12440 test -z "$as_dir" && as_dir=.
12441 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12442 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12443 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12444 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12445 break 2
12446 fi
12447done
12448done
c24fa7dc 12449IFS=$as_save_IFS
45a4b03e
KH
12450
12451 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12452 ;;
12453esac
12454fi
12455PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12456if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
12457 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12458echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12459else
c24fa7dc
MB
12460 { echo "$as_me:$LINENO: result: no" >&5
12461echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12462fi
12463
c24fa7dc 12464
45a4b03e
KH
12465
12466 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12467 HAVE_XFT=no
45a4b03e
KH
12468 else
12469 PKG_CONFIG_MIN_VERSION=0.9.0
12470 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
12471 { echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5
12472echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6; }
45a4b03e 12473
c24fa7dc
MB
12474 if $PKG_CONFIG --exists "xft >= 0.13.0" 2>&5; then
12475 { echo "$as_me:$LINENO: result: yes" >&5
12476echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12477 succeeded=yes
12478
c24fa7dc
MB
12479 { echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5
12480echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6; }
18c36727 12481 XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12482 { echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5
12483echo "${ECHO_T}$XFT_CFLAGS" >&6; }
45a4b03e 12484
c24fa7dc
MB
12485 { echo "$as_me:$LINENO: checking XFT_LIBS" >&5
12486echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6; }
18c36727 12487 XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12488 { echo "$as_me:$LINENO: result: $XFT_LIBS" >&5
12489echo "${ECHO_T}$XFT_LIBS" >&6; }
45a4b03e 12490 else
c24fa7dc
MB
12491 { echo "$as_me:$LINENO: result: no" >&5
12492echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12493 XFT_CFLAGS=""
12494 XFT_LIBS=""
12495 ## If we have a custom action on failure, don't print errors, but
12496 ## do set a variable so people can do so.
12497 XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"`
12498
12499 fi
12500
12501
12502
12503 else
12504 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12505 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12506 fi
12507 fi
12508
12509 if test $succeeded = yes; then
12510 :
12511 else
12512 HAVE_XFT=no
12513 fi
12514
12515 if test "$HAVE_XFT" != no; then
12516 OLD_CPPFLAGS="$CPPFLAGS"
12517 OLD_CFLAGS="$CFLAGS"
12518 OLD_LIBS="$LIBS"
12519 CPPFLAGS="$CPPFLAGS $XFT_CFLAGS"
12520 CFLAGS="$CFLAGS $XFT_CFLAGS"
12521 LIBS="$XFT_LIBS $LIBS"
12522 if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
c24fa7dc
MB
12523 { echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12524echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12525if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12526 echo $ECHO_N "(cached) $ECHO_C" >&6
12527fi
c24fa7dc
MB
12528{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12529echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12530else
12531 # Is the header compilable?
c24fa7dc
MB
12532{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5
12533echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6; }
45a4b03e
KH
12534cat >conftest.$ac_ext <<_ACEOF
12535/* confdefs.h. */
12536_ACEOF
12537cat confdefs.h >>conftest.$ac_ext
12538cat >>conftest.$ac_ext <<_ACEOF
12539/* end confdefs.h. */
12540$ac_includes_default
12541#include <X11/Xft/Xft.h>
12542_ACEOF
12543rm -f conftest.$ac_objext
c24fa7dc
MB
12544if { (ac_try="$ac_compile"
12545case "(($ac_try" in
12546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12547 *) ac_try_echo=$ac_try;;
12548esac
12549eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12550 (eval "$ac_compile") 2>conftest.er1
45a4b03e
KH
12551 ac_status=$?
12552 grep -v '^ *+' conftest.er1 >conftest.err
12553 rm -f conftest.er1
12554 cat conftest.err >&5
12555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12556 (exit $ac_status); } && {
12557 test -z "$ac_c_werror_flag" ||
12558 test ! -s conftest.err
12559 } && test -s conftest.$ac_objext; then
45a4b03e
KH
12560 ac_header_compiler=yes
12561else
12562 echo "$as_me: failed program was:" >&5
12563sed 's/^/| /' conftest.$ac_ext >&5
12564
c24fa7dc 12565 ac_header_compiler=no
45a4b03e 12566fi
c24fa7dc
MB
12567
12568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12569{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12570echo "${ECHO_T}$ac_header_compiler" >&6; }
45a4b03e
KH
12571
12572# Is the header present?
c24fa7dc
MB
12573{ echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5
12574echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6; }
45a4b03e
KH
12575cat >conftest.$ac_ext <<_ACEOF
12576/* confdefs.h. */
12577_ACEOF
12578cat confdefs.h >>conftest.$ac_ext
12579cat >>conftest.$ac_ext <<_ACEOF
12580/* end confdefs.h. */
12581#include <X11/Xft/Xft.h>
12582_ACEOF
c24fa7dc
MB
12583if { (ac_try="$ac_cpp conftest.$ac_ext"
12584case "(($ac_try" in
12585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12586 *) ac_try_echo=$ac_try;;
12587esac
12588eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12589 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
45a4b03e
KH
12590 ac_status=$?
12591 grep -v '^ *+' conftest.er1 >conftest.err
12592 rm -f conftest.er1
12593 cat conftest.err >&5
12594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12595 (exit $ac_status); } >/dev/null && {
12596 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12597 test ! -s conftest.err
12598 }; then
45a4b03e
KH
12599 ac_header_preproc=yes
12600else
12601 echo "$as_me: failed program was:" >&5
12602sed 's/^/| /' conftest.$ac_ext >&5
12603
12604 ac_header_preproc=no
12605fi
c24fa7dc 12606
45a4b03e 12607rm -f conftest.err conftest.$ac_ext
c24fa7dc
MB
12608{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12609echo "${ECHO_T}$ac_header_preproc" >&6; }
45a4b03e
KH
12610
12611# So? What about this header?
12612case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12613 yes:no: )
12614 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5
12615echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
12616 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5
12617echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;}
12618 ac_header_preproc=yes
12619 ;;
12620 no:yes:* )
12621 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5
12622echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;}
12623 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5
12624echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;}
12625 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5
12626echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;}
12627 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5
12628echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;}
12629 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5
12630echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;}
12631 { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5
12632echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;}
c24fa7dc 12633
45a4b03e
KH
12634 ;;
12635esac
c24fa7dc
MB
12636{ echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5
12637echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6; }
45a4b03e
KH
12638if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then
12639 echo $ECHO_N "(cached) $ECHO_C" >&6
12640else
12641 ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc
12642fi
c24fa7dc
MB
12643{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5
12644echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6; }
45a4b03e
KH
12645
12646fi
12647if test $ac_cv_header_X11_Xft_Xft_h = yes; then
c24fa7dc
MB
12648 { echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5
12649echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6; }
45a4b03e
KH
12650if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then
12651 echo $ECHO_N "(cached) $ECHO_C" >&6
12652else
12653 ac_check_lib_save_LIBS=$LIBS
12654LIBS="-lXft $XFT_LIBS $LIBS"
12655cat >conftest.$ac_ext <<_ACEOF
12656/* confdefs.h. */
12657_ACEOF
12658cat confdefs.h >>conftest.$ac_ext
12659cat >>conftest.$ac_ext <<_ACEOF
12660/* end confdefs.h. */
12661
c24fa7dc
MB
12662/* Override any GCC internal prototype to avoid an error.
12663 Use char because int might match the return type of a GCC
12664 builtin and then its argument prototype would still apply. */
45a4b03e
KH
12665#ifdef __cplusplus
12666extern "C"
12667#endif
45a4b03e
KH
12668char XftFontOpen ();
12669int
12670main ()
12671{
c24fa7dc 12672return XftFontOpen ();
45a4b03e
KH
12673 ;
12674 return 0;
12675}
12676_ACEOF
12677rm -f conftest.$ac_objext conftest$ac_exeext
c24fa7dc
MB
12678if { (ac_try="$ac_link"
12679case "(($ac_try" in
12680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12681 *) ac_try_echo=$ac_try;;
12682esac
12683eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12684 (eval "$ac_link") 2>conftest.er1
45a4b03e
KH
12685 ac_status=$?
12686 grep -v '^ *+' conftest.er1 >conftest.err
12687 rm -f conftest.er1
12688 cat conftest.err >&5
12689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
12690 (exit $ac_status); } && {
12691 test -z "$ac_c_werror_flag" ||
12692 test ! -s conftest.err
12693 } && test -s conftest$ac_exeext &&
12694 $as_test_x conftest$ac_exeext; then
45a4b03e
KH
12695 ac_cv_lib_Xft_XftFontOpen=yes
12696else
12697 echo "$as_me: failed program was:" >&5
12698sed 's/^/| /' conftest.$ac_ext >&5
12699
c24fa7dc 12700 ac_cv_lib_Xft_XftFontOpen=no
45a4b03e 12701fi
c24fa7dc
MB
12702
12703rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
45a4b03e
KH
12704 conftest$ac_exeext conftest.$ac_ext
12705LIBS=$ac_check_lib_save_LIBS
12706fi
c24fa7dc
MB
12707{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5
12708echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6; }
45a4b03e
KH
12709if test $ac_cv_lib_Xft_XftFontOpen = yes; then
12710 HAVE_XFT=yes
12711fi
12712
12713fi
12714
12715
12716
12717 if test "${HAVE_XFT}" = "yes"; then
12718
12719cat >>confdefs.h <<\_ACEOF
12720#define HAVE_XFT 1
12721_ACEOF
12722
12723
12724 C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS"
12725 else
e70b2110 12726 CPPFLAGS="$OLD_CPPFLAGS"
45a4b03e
KH
12727 CFLAGS="$OLD_CFLAGS"
12728 LIBS="$OLD_LIBS"
77dfeef5
GM
12729 fi # "${HAVE_XFT}" = "yes"
12730 fi # "$HAVE_XFT" != no
12731 fi # "x${with_xft}" != "xno"
12732
12733 if test "$HAVE_XFT" != "yes"; then
12734 HAVE_XFT=no
45a4b03e 12735 fi
2ee27f27 12736
45a4b03e 12737
77dfeef5
GM
12738 HAVE_FREETYPE=no
12739 ### Use -lfreetype if available, unless `--with-freetype=no'.
12740 if test "${HAVE_XFT}" = "yes"; then
12741 HAVE_FREETYPE=yes
12742 elif test "x${with_freetype}" != "xno"; then
45a4b03e 12743
d235ca2f 12744
45a4b03e
KH
12745 succeeded=no
12746
d235ca2f 12747 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12748set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12749{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12750echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12751if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12752 echo $ECHO_N "(cached) $ECHO_C" >&6
12753else
12754 case $PKG_CONFIG in
12755 [\\/]* | ?:[\\/]*)
12756 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12757 ;;
12758 *)
12759 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12760for as_dir in $PATH
12761do
12762 IFS=$as_save_IFS
12763 test -z "$as_dir" && as_dir=.
12764 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12765 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12766 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12767 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12768 break 2
12769 fi
12770done
12771done
c24fa7dc 12772IFS=$as_save_IFS
45a4b03e
KH
12773
12774 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12775 ;;
12776esac
12777fi
12778PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12779if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
12780 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12781echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12782else
c24fa7dc
MB
12783 { echo "$as_me:$LINENO: result: no" >&5
12784echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12785fi
12786
c24fa7dc 12787
45a4b03e
KH
12788
12789 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12790 HAVE_FREETYPE=no
45a4b03e
KH
12791 else
12792 PKG_CONFIG_MIN_VERSION=0.9.0
12793 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
12794 { echo "$as_me:$LINENO: checking for freetype2" >&5
12795echo $ECHO_N "checking for freetype2... $ECHO_C" >&6; }
45a4b03e 12796
c24fa7dc
MB
12797 if $PKG_CONFIG --exists "freetype2" 2>&5; then
12798 { echo "$as_me:$LINENO: result: yes" >&5
12799echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12800 succeeded=yes
12801
c24fa7dc
MB
12802 { echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5
12803echo $ECHO_N "checking FREETYPE_CFLAGS... $ECHO_C" >&6; }
991a7602 12804 FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12805 { echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5
12806echo "${ECHO_T}$FREETYPE_CFLAGS" >&6; }
45a4b03e 12807
c24fa7dc
MB
12808 { echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5
12809echo $ECHO_N "checking FREETYPE_LIBS... $ECHO_C" >&6; }
991a7602 12810 FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12811 { echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5
12812echo "${ECHO_T}$FREETYPE_LIBS" >&6; }
45a4b03e 12813 else
c24fa7dc
MB
12814 { echo "$as_me:$LINENO: result: no" >&5
12815echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12816 FREETYPE_CFLAGS=""
12817 FREETYPE_LIBS=""
12818 ## If we have a custom action on failure, don't print errors, but
12819 ## do set a variable so people can do so.
12820 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"`
12821
12822 fi
12823
12824
12825
12826 else
12827 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12828 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12829 fi
12830 fi
12831
12832 if test $succeeded = yes; then
12833 HAVE_FREETYPE=yes
12834 else
12835 HAVE_FREETYPE=no
12836 fi
12837
77dfeef5 12838 if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
12839
12840 succeeded=no
12841
d235ca2f 12842 # Extract the first word of "pkg-config", so it can be a program name with args.
45a4b03e 12843set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12844{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12845echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
45a4b03e
KH
12846if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
12847 echo $ECHO_N "(cached) $ECHO_C" >&6
12848else
12849 case $PKG_CONFIG in
12850 [\\/]* | ?:[\\/]*)
12851 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12852 ;;
12853 *)
12854 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12855for as_dir in $PATH
12856do
12857 IFS=$as_save_IFS
12858 test -z "$as_dir" && as_dir=.
12859 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12860 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
45a4b03e
KH
12861 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
12862 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12863 break 2
12864 fi
12865done
12866done
c24fa7dc 12867IFS=$as_save_IFS
45a4b03e
KH
12868
12869 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12870 ;;
12871esac
12872fi
12873PKG_CONFIG=$ac_cv_path_PKG_CONFIG
45a4b03e 12874if test -n "$PKG_CONFIG"; then
c24fa7dc
MB
12875 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12876echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12877else
c24fa7dc
MB
12878 { echo "$as_me:$LINENO: result: no" >&5
12879echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12880fi
12881
c24fa7dc 12882
45a4b03e
KH
12883
12884 if test "$PKG_CONFIG" = "no" ; then
c24fa7dc 12885 HAVE_FC=no
45a4b03e
KH
12886 else
12887 PKG_CONFIG_MIN_VERSION=0.9.0
12888 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
c24fa7dc
MB
12889 { echo "$as_me:$LINENO: checking for fontconfig" >&5
12890echo $ECHO_N "checking for fontconfig... $ECHO_C" >&6; }
45a4b03e 12891
c24fa7dc
MB
12892 if $PKG_CONFIG --exists "fontconfig" 2>&5; then
12893 { echo "$as_me:$LINENO: result: yes" >&5
12894echo "${ECHO_T}yes" >&6; }
45a4b03e
KH
12895 succeeded=yes
12896
c24fa7dc
MB
12897 { echo "$as_me:$LINENO: checking FONTCONFIG_CFLAGS" >&5
12898echo $ECHO_N "checking FONTCONFIG_CFLAGS... $ECHO_C" >&6; }
991a7602 12899 FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12900 { echo "$as_me:$LINENO: result: $FONTCONFIG_CFLAGS" >&5
12901echo "${ECHO_T}$FONTCONFIG_CFLAGS" >&6; }
45a4b03e 12902
c24fa7dc
MB
12903 { echo "$as_me:$LINENO: checking FONTCONFIG_LIBS" >&5
12904echo $ECHO_N "checking FONTCONFIG_LIBS... $ECHO_C" >&6; }
991a7602 12905 FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig"|sed -e 's,///*,/,g'`
c24fa7dc
MB
12906 { echo "$as_me:$LINENO: result: $FONTCONFIG_LIBS" >&5
12907echo "${ECHO_T}$FONTCONFIG_LIBS" >&6; }
45a4b03e 12908 else
c24fa7dc
MB
12909 { echo "$as_me:$LINENO: result: no" >&5
12910echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12911 FONTCONFIG_CFLAGS=""
12912 FONTCONFIG_LIBS=""
12913 ## If we have a custom action on failure, don't print errors, but
12914 ## do set a variable so people can do so.
12915 FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig"`
12916
12917 fi
12918
12919
12920
12921 else
12922 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
12923 echo "*** See http://www.freedesktop.org/software/pkgconfig"
12924 fi
12925 fi
12926
12927 if test $succeeded = yes; then
12928 HAVE_FC=yes
12929 else
12930 HAVE_FC=no
12931 fi
12932
77dfeef5
GM
12933 if test "${HAVE_FC}" = "no"; then
12934 HAVE_FREETYPE=no
12935 fi
45a4b03e
KH
12936 fi
12937 fi
e70b2110 12938
77dfeef5
GM
12939 HAVE_LIBOTF=no
12940 if test "${HAVE_FREETYPE}" = "yes"; then
45a4b03e
KH
12941
12942cat >>confdefs.h <<\_ACEOF
12943#define HAVE_FREETYPE 1
12944_ACEOF
12945
77dfeef5 12946 if test "${with_libotf}" != "no"; then
e70b2110
KH
12947
12948 succeeded=no
12949
d235ca2f 12950 # Extract the first word of "pkg-config", so it can be a program name with args.
e70b2110 12951set dummy pkg-config; ac_word=$2
c24fa7dc
MB
12952{ echo "$as_me:$LINENO: checking for $ac_word" >&5
12953echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
e70b2110 12954if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
45a4b03e
KH
12955 echo $ECHO_N "(cached) $ECHO_C" >&6
12956else
e70b2110
KH
12957 case $PKG_CONFIG in
12958 [\\/]* | ?:[\\/]*)
12959 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
12960 ;;
12961 *)
12962 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45a4b03e
KH
12963for as_dir in $PATH
12964do
12965 IFS=$as_save_IFS
12966 test -z "$as_dir" && as_dir=.
12967 for ac_exec_ext in '' $ac_executable_extensions; do
c24fa7dc 12968 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
e70b2110 12969 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
45a4b03e
KH
12970 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12971 break 2
12972 fi
12973done
12974done
c24fa7dc 12975IFS=$as_save_IFS
45a4b03e 12976
e70b2110
KH
12977 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
12978 ;;
12979esac
45a4b03e 12980fi
e70b2110
KH
12981PKG_CONFIG=$ac_cv_path_PKG_CONFIG
12982if test -n "$PKG_CONFIG"; then
12983 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
12984echo "${ECHO_T}$PKG_CONFIG" >&6; }
45a4b03e 12985else
c24fa7dc
MB
12986 { echo "$as_me:$LINENO: result: no" >&5
12987echo "${ECHO_T}no" >&6; }
45a4b03e
KH
12988fi
12989
c24fa7dc 12990
45a4b03e 12991
e70b2110 12992 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 12993 HAVE_LIBOTF=no
e70b2110
KH
12994 else
12995 PKG_CONFIG_MIN_VERSION=0.9.0
12996 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
12997 { echo "$as_me:$LINENO: checking for libotf" >&5
12998echo $ECHO_N "checking for libotf... $ECHO_C" >&6; }
6ed29d7b 12999
e70b2110
KH
13000 if $PKG_CONFIG --exists "libotf" 2>&5; then
13001 { echo "$as_me:$LINENO: result: yes" >&5
13002echo "${ECHO_T}yes" >&6; }
13003 succeeded=yes
6ed29d7b 13004
e70b2110
KH
13005 { echo "$as_me:$LINENO: checking LIBOTF_CFLAGS" >&5
13006echo $ECHO_N "checking LIBOTF_CFLAGS... $ECHO_C" >&6; }
13007 LIBOTF_CFLAGS=`$PKG_CONFIG --cflags "libotf"|sed -e 's,///*,/,g'`
13008 { echo "$as_me:$LINENO: result: $LIBOTF_CFLAGS" >&5
13009echo "${ECHO_T}$LIBOTF_CFLAGS" >&6; }
13010
13011 { echo "$as_me:$LINENO: checking LIBOTF_LIBS" >&5
13012echo $ECHO_N "checking LIBOTF_LIBS... $ECHO_C" >&6; }
13013 LIBOTF_LIBS=`$PKG_CONFIG --libs "libotf"|sed -e 's,///*,/,g'`
13014 { echo "$as_me:$LINENO: result: $LIBOTF_LIBS" >&5
13015echo "${ECHO_T}$LIBOTF_LIBS" >&6; }
13016 else
13017 { echo "$as_me:$LINENO: result: no" >&5
13018echo "${ECHO_T}no" >&6; }
13019 LIBOTF_CFLAGS=""
13020 LIBOTF_LIBS=""
13021 ## If we have a custom action on failure, don't print errors, but
13022 ## do set a variable so people can do so.
13023 LIBOTF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libotf"`
6ed29d7b 13024
e70b2110 13025 fi
6ed29d7b 13026
6ed29d7b 13027
6ed29d7b 13028
e70b2110
KH
13029 else
13030 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13031 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13032 fi
13033 fi
13034
13035 if test $succeeded = yes; then
435f8bc5 13036 HAVE_LIBOTF=yes
e70b2110 13037 else
435f8bc5 13038 HAVE_LIBOTF=no
e70b2110
KH
13039 fi
13040
77dfeef5 13041 if test "$HAVE_LIBOTF" = "yes"; then
6ed29d7b 13042
45a4b03e
KH
13043cat >>confdefs.h <<\_ACEOF
13044#define HAVE_LIBOTF 1
13045_ACEOF
13046
77dfeef5 13047 fi
6ed29d7b 13048 fi
45a4b03e 13049 fi
45a4b03e 13050
77dfeef5
GM
13051 HAVE_M17N_FLT=no
13052 if test "${with_m17n_flt}" != "no"; then
7f0942ba
KH
13053
13054 succeeded=no
13055
d235ca2f 13056 # Extract the first word of "pkg-config", so it can be a program name with args.
7f0942ba
KH
13057set dummy pkg-config; ac_word=$2
13058{ echo "$as_me:$LINENO: checking for $ac_word" >&5
13059echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
13060if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
13061 echo $ECHO_N "(cached) $ECHO_C" >&6
13062else
13063 case $PKG_CONFIG in
13064 [\\/]* | ?:[\\/]*)
13065 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
13066 ;;
13067 *)
13068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13069for as_dir in $PATH
13070do
13071 IFS=$as_save_IFS
13072 test -z "$as_dir" && as_dir=.
13073 for ac_exec_ext in '' $ac_executable_extensions; do
13074 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13075 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
13076 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
13077 break 2
13078 fi
13079done
13080done
13081IFS=$as_save_IFS
13082
13083 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
13084 ;;
13085esac
13086fi
13087PKG_CONFIG=$ac_cv_path_PKG_CONFIG
13088if test -n "$PKG_CONFIG"; then
13089 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
13090echo "${ECHO_T}$PKG_CONFIG" >&6; }
13091else
13092 { echo "$as_me:$LINENO: result: no" >&5
13093echo "${ECHO_T}no" >&6; }
13094fi
13095
13096
7f0942ba
KH
13097
13098 if test "$PKG_CONFIG" = "no" ; then
435f8bc5 13099 HAVE_M17N_FLT=no
7f0942ba
KH
13100 else
13101 PKG_CONFIG_MIN_VERSION=0.9.0
13102 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
13103 { echo "$as_me:$LINENO: checking for m17n-flt" >&5
13104echo $ECHO_N "checking for m17n-flt... $ECHO_C" >&6; }
13105
13106 if $PKG_CONFIG --exists "m17n-flt" 2>&5; then
13107 { echo "$as_me:$LINENO: result: yes" >&5
13108echo "${ECHO_T}yes" >&6; }
13109 succeeded=yes
13110
13111 { echo "$as_me:$LINENO: checking M17N_FLT_CFLAGS" >&5
13112echo $ECHO_N "checking M17N_FLT_CFLAGS... $ECHO_C" >&6; }
13113 M17N_FLT_CFLAGS=`$PKG_CONFIG --cflags "m17n-flt"|sed -e 's,///*,/,g'`
13114 { echo "$as_me:$LINENO: result: $M17N_FLT_CFLAGS" >&5
13115echo "${ECHO_T}$M17N_FLT_CFLAGS" >&6; }
13116
13117 { echo "$as_me:$LINENO: checking M17N_FLT_LIBS" >&5
13118echo $ECHO_N "checking M17N_FLT_LIBS... $ECHO_C" >&6; }
13119 M17N_FLT_LIBS=`$PKG_CONFIG --libs "m17n-flt"|sed -e 's,///*,/,g'`
13120 { echo "$as_me:$LINENO: result: $M17N_FLT_LIBS" >&5
13121echo "${ECHO_T}$M17N_FLT_LIBS" >&6; }
13122 else
13123 { echo "$as_me:$LINENO: result: no" >&5
13124echo "${ECHO_T}no" >&6; }
13125 M17N_FLT_CFLAGS=""
13126 M17N_FLT_LIBS=""
13127 ## If we have a custom action on failure, don't print errors, but
13128 ## do set a variable so people can do so.
13129 M17N_FLT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "m17n-flt"`
13130
13131 fi
13132
13133
13134
13135 else
13136 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
13137 echo "*** See http://www.freedesktop.org/software/pkgconfig"
13138 fi
13139 fi
13140
13141 if test $succeeded = yes; then
435f8bc5 13142 HAVE_M17N_FLT=yes
7f0942ba 13143 else
435f8bc5 13144 HAVE_M17N_FLT=no
7f0942ba
KH
13145 fi
13146
77dfeef5 13147 if test "$HAVE_M17N_FLT" = "yes"; then
7f0942ba
KH
13148
13149cat >>confdefs.h <<\_ACEOF
13150#define HAVE_M17N_FLT 1
13151_ACEOF
13152
77dfeef5 13153 fi
e70b2110 13154 fi
e70b2110
KH
13155
13156
13157
13158
13159
13160
13161
7f0942ba
KH
13162
13163
7f0942ba 13164
77dfeef5
GM
13165fi # "${USE_FONT_BACKEND}" = "yes"
13166### End of font-backend section.
98418dba
CW
13167
13168### Use -lXpm if available, unless `--with-xpm=no'.
13169HAVE_XPM=no
13170if test "${HAVE_X11}" = "yes"; then
13171 if test "${with_xpm}" != "no"; then
c0d27fcc 13172 if test "${ac_cv_header_X11_xpm_h+set}" = set; then
4c34eeee
MB
13173 { echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13174echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
98418dba
CW
13175if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13176 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13177fi
4c34eeee
MB
13178{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13179echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
98418dba 13180else
c0d27fcc 13181 # Is the header compilable?
4c34eeee
MB
13182{ echo "$as_me:$LINENO: checking X11/xpm.h usability" >&5
13183echo $ECHO_N "checking X11/xpm.h usability... $ECHO_C" >&6; }
c0d27fcc 13184cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13185/* confdefs.h. */
13186_ACEOF
13187cat confdefs.h >>conftest.$ac_ext
13188cat >>conftest.$ac_ext <<_ACEOF
13189/* end confdefs.h. */
c0d27fcc
MR
13190$ac_includes_default
13191#include <X11/xpm.h>
13192_ACEOF
13193rm -f conftest.$ac_objext
4c34eeee
MB
13194if { (ac_try="$ac_compile"
13195case "(($ac_try" in
13196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13197 *) ac_try_echo=$ac_try;;
13198esac
13199eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13200 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13201 ac_status=$?
edfaf76d
LK
13202 grep -v '^ *+' conftest.er1 >conftest.err
13203 rm -f conftest.er1
13204 cat conftest.err >&5
c0d27fcc 13205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13206 (exit $ac_status); } && {
13207 test -z "$ac_c_werror_flag" ||
13208 test ! -s conftest.err
13209 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13210 ac_header_compiler=yes
13211else
13212 echo "$as_me: failed program was:" >&5
19650fd6
AS
13213sed 's/^/| /' conftest.$ac_ext >&5
13214
4c34eeee 13215 ac_header_compiler=no
c0d27fcc 13216fi
4c34eeee
MB
13217
13218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13219{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13220echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13221
13222# Is the header present?
4c34eeee
MB
13223{ echo "$as_me:$LINENO: checking X11/xpm.h presence" >&5
13224echo $ECHO_N "checking X11/xpm.h presence... $ECHO_C" >&6; }
c0d27fcc 13225cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13226/* confdefs.h. */
13227_ACEOF
13228cat confdefs.h >>conftest.$ac_ext
13229cat >>conftest.$ac_ext <<_ACEOF
13230/* end confdefs.h. */
98418dba
CW
13231#include <X11/xpm.h>
13232_ACEOF
4c34eeee
MB
13233if { (ac_try="$ac_cpp conftest.$ac_ext"
13234case "(($ac_try" in
13235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13236 *) ac_try_echo=$ac_try;;
13237esac
13238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13239 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13240 ac_status=$?
6bae0ccf 13241 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13242 rm -f conftest.er1
13243 cat conftest.err >&5
c0d27fcc 13244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13245 (exit $ac_status); } >/dev/null && {
13246 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13247 test ! -s conftest.err
13248 }; then
c0d27fcc 13249 ac_header_preproc=yes
98418dba
CW
13250else
13251 echo "$as_me: failed program was:" >&5
19650fd6
AS
13252sed 's/^/| /' conftest.$ac_ext >&5
13253
c0d27fcc 13254 ac_header_preproc=no
98418dba 13255fi
4c34eeee 13256
98418dba 13257rm -f conftest.err conftest.$ac_ext
4c34eeee
MB
13258{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13259echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13260
13261# So? What about this header?
edfaf76d
LK
13262case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13263 yes:no: )
c0d27fcc
MR
13264 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
13265echo "$as_me: WARNING: X11/xpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13266 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the compiler's result" >&5
13267echo "$as_me: WARNING: X11/xpm.h: proceeding with the compiler's result" >&2;}
13268 ac_header_preproc=yes
13269 ;;
13270 no:yes:* )
13271 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: present but cannot be compiled" >&5
13272echo "$as_me: WARNING: X11/xpm.h: present but cannot be compiled" >&2;}
13273 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&5
13274echo "$as_me: WARNING: X11/xpm.h: check for missing prerequisite headers?" >&2;}
13275 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: see the Autoconf documentation" >&5
13276echo "$as_me: WARNING: X11/xpm.h: see the Autoconf documentation" >&2;}
13277 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&5
13278echo "$as_me: WARNING: X11/xpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
7c9e5167
JD
13279 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&5
13280echo "$as_me: WARNING: X11/xpm.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13281 { echo "$as_me:$LINENO: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&5
13282echo "$as_me: WARNING: X11/xpm.h: in the future, the compiler will take precedence" >&2;}
4c34eeee 13283
19650fd6 13284 ;;
c0d27fcc 13285esac
4c34eeee
MB
13286{ echo "$as_me:$LINENO: checking for X11/xpm.h" >&5
13287echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6; }
c0d27fcc
MR
13288if test "${ac_cv_header_X11_xpm_h+set}" = set; then
13289 echo $ECHO_N "(cached) $ECHO_C" >&6
13290else
13291 ac_cv_header_X11_xpm_h=$ac_header_preproc
ba4481b5 13292fi
4c34eeee
MB
13293{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_xpm_h" >&5
13294echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6; }
c0d27fcc
MR
13295
13296fi
98418dba 13297if test $ac_cv_header_X11_xpm_h = yes; then
4c34eeee
MB
13298 { echo "$as_me:$LINENO: checking for XpmReadFileToPixmap in -lXpm" >&5
13299echo $ECHO_N "checking for XpmReadFileToPixmap in -lXpm... $ECHO_C" >&6; }
98418dba 13300if test "${ac_cv_lib_Xpm_XpmReadFileToPixmap+set}" = set; then
503d2be0 13301 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13302else
98418dba
CW
13303 ac_check_lib_save_LIBS=$LIBS
13304LIBS="-lXpm -lX11 $LIBS"
13305cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13306/* confdefs.h. */
13307_ACEOF
13308cat confdefs.h >>conftest.$ac_ext
13309cat >>conftest.$ac_ext <<_ACEOF
13310/* end confdefs.h. */
98418dba 13311
4c34eeee
MB
13312/* Override any GCC internal prototype to avoid an error.
13313 Use char because int might match the return type of a GCC
13314 builtin and then its argument prototype would still apply. */
503d2be0
AS
13315#ifdef __cplusplus
13316extern "C"
13317#endif
98418dba 13318char XpmReadFileToPixmap ();
503d2be0
AS
13319int
13320main ()
13321{
4c34eeee 13322return XpmReadFileToPixmap ();
503d2be0
AS
13323 ;
13324 return 0;
13325}
13326_ACEOF
13327rm -f conftest.$ac_objext conftest$ac_exeext
4c34eeee
MB
13328if { (ac_try="$ac_link"
13329case "(($ac_try" in
13330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13331 *) ac_try_echo=$ac_try;;
13332esac
13333eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13334 (eval "$ac_link") 2>conftest.er1
503d2be0 13335 ac_status=$?
edfaf76d
LK
13336 grep -v '^ *+' conftest.er1 >conftest.err
13337 rm -f conftest.er1
13338 cat conftest.err >&5
c0d27fcc 13339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4c34eeee
MB
13340 (exit $ac_status); } && {
13341 test -z "$ac_c_werror_flag" ||
13342 test ! -s conftest.err
13343 } && test -s conftest$ac_exeext &&
13344 $as_test_x conftest$ac_exeext; then
98418dba 13345 ac_cv_lib_Xpm_XpmReadFileToPixmap=yes
503d2be0
AS
13346else
13347 echo "$as_me: failed program was:" >&5
19650fd6
AS
13348sed 's/^/| /' conftest.$ac_ext >&5
13349
4c34eeee 13350 ac_cv_lib_Xpm_XpmReadFileToPixmap=no
503d2be0 13351fi
4c34eeee
MB
13352
13353rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13354 conftest$ac_exeext conftest.$ac_ext
98418dba 13355LIBS=$ac_check_lib_save_LIBS
503d2be0 13356fi
4c34eeee
MB
13357{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xpm_XpmReadFileToPixmap" >&5
13358echo "${ECHO_T}$ac_cv_lib_Xpm_XpmReadFileToPixmap" >&6; }
98418dba
CW
13359if test $ac_cv_lib_Xpm_XpmReadFileToPixmap = yes; then
13360 HAVE_XPM=yes
ba4481b5
DL
13361fi
13362
98418dba
CW
13363fi
13364
c0d27fcc 13365
98418dba 13366 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13367 { echo "$as_me:$LINENO: checking for XpmReturnAllocPixels preprocessor define" >&5
13368echo $ECHO_N "checking for XpmReturnAllocPixels preprocessor define... $ECHO_C" >&6; }
98418dba 13369 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13370/* confdefs.h. */
13371_ACEOF
13372cat confdefs.h >>conftest.$ac_ext
13373cat >>conftest.$ac_ext <<_ACEOF
13374/* end confdefs.h. */
98418dba
CW
13375#include "X11/xpm.h"
13376#ifndef XpmReturnAllocPixels
13377no_return_alloc_pixels
503d2be0 13378#endif
ba4481b5 13379
98418dba
CW
13380_ACEOF
13381if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13382 $EGREP "no_return_alloc_pixels" >/dev/null 2>&1; then
98418dba
CW
13383 HAVE_XPM=no
13384else
13385 HAVE_XPM=yes
13386fi
13387rm -f conftest*
ba4481b5 13388
c0d27fcc 13389
98418dba 13390 if test "${HAVE_XPM}" = "yes"; then
4c34eeee
MB
13391 { echo "$as_me:$LINENO: result: yes" >&5
13392echo "${ECHO_T}yes" >&6; }
98418dba 13393 else
4c34eeee
MB
13394 { echo "$as_me:$LINENO: result: no" >&5
13395echo "${ECHO_T}no" >&6; }
98418dba
CW
13396 fi
13397 fi
13398 fi
13399
13400 if test "${HAVE_XPM}" = "yes"; then
b936fae4 13401
c0d27fcc 13402cat >>confdefs.h <<\_ACEOF
98418dba 13403#define HAVE_XPM 1
c0d27fcc 13404_ACEOF
98418dba
CW
13405
13406 fi
13407fi
13408
13409### Use -ljpeg if available, unless `--with-jpeg=no'.
13410HAVE_JPEG=no
13411if test "${HAVE_X11}" = "yes"; then
13412 if test "${with_jpeg}" != "no"; then
c0d27fcc 13413 if test "${ac_cv_header_jerror_h+set}" = set; then
4c34eeee
MB
13414 { echo "$as_me:$LINENO: checking for jerror.h" >&5
13415echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
98418dba
CW
13416if test "${ac_cv_header_jerror_h+set}" = set; then
13417 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13418fi
ca81d7a0
JD
13419{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13420echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
503d2be0 13421else
c0d27fcc 13422 # Is the header compilable?
ca81d7a0
JD
13423{ echo "$as_me:$LINENO: checking jerror.h usability" >&5
13424echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6; }
c0d27fcc 13425cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13426/* confdefs.h. */
13427_ACEOF
13428cat confdefs.h >>conftest.$ac_ext
13429cat >>conftest.$ac_ext <<_ACEOF
13430/* end confdefs.h. */
c0d27fcc
MR
13431$ac_includes_default
13432#include <jerror.h>
13433_ACEOF
13434rm -f conftest.$ac_objext
ca81d7a0
JD
13435if { (ac_try="$ac_compile"
13436case "(($ac_try" in
13437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13438 *) ac_try_echo=$ac_try;;
13439esac
13440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13441 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13442 ac_status=$?
edfaf76d
LK
13443 grep -v '^ *+' conftest.er1 >conftest.err
13444 rm -f conftest.er1
13445 cat conftest.err >&5
c0d27fcc 13446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13447 (exit $ac_status); } && {
13448 test -z "$ac_c_werror_flag" ||
13449 test ! -s conftest.err
13450 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13451 ac_header_compiler=yes
13452else
13453 echo "$as_me: failed program was:" >&5
19650fd6
AS
13454sed 's/^/| /' conftest.$ac_ext >&5
13455
ca81d7a0 13456 ac_header_compiler=no
c0d27fcc 13457fi
ca81d7a0
JD
13458
13459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13460{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13461echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13462
13463# Is the header present?
ca81d7a0
JD
13464{ echo "$as_me:$LINENO: checking jerror.h presence" >&5
13465echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6; }
c0d27fcc 13466cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13467/* confdefs.h. */
13468_ACEOF
13469cat confdefs.h >>conftest.$ac_ext
13470cat >>conftest.$ac_ext <<_ACEOF
13471/* end confdefs.h. */
98418dba
CW
13472#include <jerror.h>
13473_ACEOF
ca81d7a0
JD
13474if { (ac_try="$ac_cpp conftest.$ac_ext"
13475case "(($ac_try" in
13476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13477 *) ac_try_echo=$ac_try;;
13478esac
13479eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13480 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13481 ac_status=$?
6bae0ccf 13482 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13483 rm -f conftest.er1
13484 cat conftest.err >&5
c0d27fcc 13485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13486 (exit $ac_status); } >/dev/null && {
13487 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13488 test ! -s conftest.err
13489 }; then
c0d27fcc 13490 ac_header_preproc=yes
ba4481b5 13491else
98418dba 13492 echo "$as_me: failed program was:" >&5
19650fd6
AS
13493sed 's/^/| /' conftest.$ac_ext >&5
13494
c0d27fcc 13495 ac_header_preproc=no
98418dba 13496fi
ca81d7a0 13497
98418dba 13498rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13499{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13500echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13501
13502# So? What about this header?
edfaf76d
LK
13503case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13504 yes:no: )
c0d27fcc
MR
13505 { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5
13506echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13507 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5
13508echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;}
13509 ac_header_preproc=yes
19650fd6 13510 ;;
edfaf76d 13511 no:yes:* )
c0d27fcc
MR
13512 { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5
13513echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13514 { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5
13515echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;}
13516 { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5
13517echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;}
13518 { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5
13519echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13520 { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5
19650fd6 13521echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13522 { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5
13523echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13524
19650fd6 13525 ;;
c0d27fcc 13526esac
ca81d7a0
JD
13527{ echo "$as_me:$LINENO: checking for jerror.h" >&5
13528echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6; }
c0d27fcc
MR
13529if test "${ac_cv_header_jerror_h+set}" = set; then
13530 echo $ECHO_N "(cached) $ECHO_C" >&6
13531else
13532 ac_cv_header_jerror_h=$ac_header_preproc
ba4481b5 13533fi
ca81d7a0
JD
13534{ echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5
13535echo "${ECHO_T}$ac_cv_header_jerror_h" >&6; }
c0d27fcc
MR
13536
13537fi
98418dba 13538if test $ac_cv_header_jerror_h = yes; then
ca81d7a0
JD
13539 { echo "$as_me:$LINENO: checking for jpeg_destroy_compress in -ljpeg" >&5
13540echo $ECHO_N "checking for jpeg_destroy_compress in -ljpeg... $ECHO_C" >&6; }
98418dba 13541if test "${ac_cv_lib_jpeg_jpeg_destroy_compress+set}" = set; then
503d2be0 13542 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13543else
98418dba
CW
13544 ac_check_lib_save_LIBS=$LIBS
13545LIBS="-ljpeg $LIBS"
13546cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13547/* confdefs.h. */
13548_ACEOF
13549cat confdefs.h >>conftest.$ac_ext
13550cat >>conftest.$ac_ext <<_ACEOF
13551/* end confdefs.h. */
98418dba 13552
ca81d7a0
JD
13553/* Override any GCC internal prototype to avoid an error.
13554 Use char because int might match the return type of a GCC
13555 builtin and then its argument prototype would still apply. */
98418dba
CW
13556#ifdef __cplusplus
13557extern "C"
13558#endif
98418dba 13559char jpeg_destroy_compress ();
503d2be0
AS
13560int
13561main ()
13562{
ca81d7a0 13563return jpeg_destroy_compress ();
503d2be0
AS
13564 ;
13565 return 0;
13566}
13567_ACEOF
13568rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13569if { (ac_try="$ac_link"
13570case "(($ac_try" in
13571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13572 *) ac_try_echo=$ac_try;;
13573esac
13574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13575 (eval "$ac_link") 2>conftest.er1
503d2be0 13576 ac_status=$?
edfaf76d
LK
13577 grep -v '^ *+' conftest.er1 >conftest.err
13578 rm -f conftest.er1
13579 cat conftest.err >&5
c0d27fcc 13580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13581 (exit $ac_status); } && {
13582 test -z "$ac_c_werror_flag" ||
13583 test ! -s conftest.err
13584 } && test -s conftest$ac_exeext &&
13585 $as_test_x conftest$ac_exeext; then
98418dba 13586 ac_cv_lib_jpeg_jpeg_destroy_compress=yes
ba4481b5 13587else
503d2be0 13588 echo "$as_me: failed program was:" >&5
19650fd6
AS
13589sed 's/^/| /' conftest.$ac_ext >&5
13590
ca81d7a0 13591 ac_cv_lib_jpeg_jpeg_destroy_compress=no
ba4481b5 13592fi
ca81d7a0 13593
f053c89f 13594rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13595 conftest$ac_exeext conftest.$ac_ext
98418dba 13596LIBS=$ac_check_lib_save_LIBS
ba4481b5 13597fi
ca81d7a0
JD
13598{ echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_destroy_compress" >&5
13599echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_destroy_compress" >&6; }
98418dba
CW
13600if test $ac_cv_lib_jpeg_jpeg_destroy_compress = yes; then
13601 HAVE_JPEG=yes
ba4481b5 13602fi
98418dba 13603
ba4481b5 13604fi
98418dba 13605
c0d27fcc 13606
ba4481b5 13607 fi
ba4481b5 13608
c0d27fcc 13609
98418dba 13610 if test "${HAVE_JPEG}" = "yes"; then
c0d27fcc 13611 cat >>confdefs.h <<\_ACEOF
98418dba 13612#define HAVE_JPEG 1
c0d27fcc 13613_ACEOF
98418dba
CW
13614
13615 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13616/* confdefs.h. */
13617_ACEOF
13618cat confdefs.h >>conftest.$ac_ext
13619cat >>conftest.$ac_ext <<_ACEOF
13620/* end confdefs.h. */
22044edf 13621#include <jpeglib.h>
98418dba
CW
13622 version=JPEG_LIB_VERSION
13623
13624_ACEOF
13625if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 13626 $EGREP "version= *(6[2-9]|[7-9][0-9])" >/dev/null 2>&1; then
c0d27fcc 13627 cat >>confdefs.h <<\_ACEOF
98418dba 13628#define HAVE_JPEG 1
c0d27fcc 13629_ACEOF
ba4481b5 13630
98418dba 13631else
c0d27fcc 13632 { echo "$as_me:$LINENO: WARNING: libjpeg found, but not version 6b or later" >&5
98418dba
CW
13633echo "$as_me: WARNING: libjpeg found, but not version 6b or later" >&2;}
13634 HAVE_JPEG=no
ba4481b5 13635fi
98418dba 13636rm -f conftest*
ba4481b5 13637
98418dba
CW
13638 fi
13639fi
503d2be0 13640
98418dba
CW
13641### Use -lpng if available, unless `--with-png=no'.
13642HAVE_PNG=no
13643if test "${HAVE_X11}" = "yes"; then
13644 if test "${with_png}" != "no"; then
f57bd967
DL
13645 # Debian unstable as of July 2003 has multiple libpngs, and puts png.h
13646 # in /usr/include/libpng.
13647
13648
13649for ac_header in png.h libpng/png.h
13650do
13651as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
13652if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13653 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13654echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13655if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 13656 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13657fi
ca81d7a0
JD
13658ac_res=`eval echo '${'$as_ac_Header'}'`
13659 { echo "$as_me:$LINENO: result: $ac_res" >&5
13660echo "${ECHO_T}$ac_res" >&6; }
503d2be0 13661else
c0d27fcc 13662 # Is the header compilable?
ca81d7a0
JD
13663{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13664echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 13665cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13666/* confdefs.h. */
13667_ACEOF
13668cat confdefs.h >>conftest.$ac_ext
13669cat >>conftest.$ac_ext <<_ACEOF
13670/* end confdefs.h. */
c0d27fcc 13671$ac_includes_default
f57bd967 13672#include <$ac_header>
c0d27fcc
MR
13673_ACEOF
13674rm -f conftest.$ac_objext
ca81d7a0
JD
13675if { (ac_try="$ac_compile"
13676case "(($ac_try" in
13677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13678 *) ac_try_echo=$ac_try;;
13679esac
13680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13681 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13682 ac_status=$?
edfaf76d
LK
13683 grep -v '^ *+' conftest.er1 >conftest.err
13684 rm -f conftest.er1
13685 cat conftest.err >&5
c0d27fcc 13686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13687 (exit $ac_status); } && {
13688 test -z "$ac_c_werror_flag" ||
13689 test ! -s conftest.err
13690 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13691 ac_header_compiler=yes
13692else
13693 echo "$as_me: failed program was:" >&5
19650fd6
AS
13694sed 's/^/| /' conftest.$ac_ext >&5
13695
ca81d7a0 13696 ac_header_compiler=no
c0d27fcc 13697fi
ca81d7a0
JD
13698
13699rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13700{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13701echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13702
13703# Is the header present?
ca81d7a0
JD
13704{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13705echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 13706cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13707/* confdefs.h. */
13708_ACEOF
13709cat confdefs.h >>conftest.$ac_ext
13710cat >>conftest.$ac_ext <<_ACEOF
13711/* end confdefs.h. */
f57bd967 13712#include <$ac_header>
503d2be0 13713_ACEOF
ca81d7a0
JD
13714if { (ac_try="$ac_cpp conftest.$ac_ext"
13715case "(($ac_try" in
13716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13717 *) ac_try_echo=$ac_try;;
13718esac
13719eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13720 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 13721 ac_status=$?
6bae0ccf 13722 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
13723 rm -f conftest.er1
13724 cat conftest.err >&5
c0d27fcc 13725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13726 (exit $ac_status); } >/dev/null && {
13727 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13728 test ! -s conftest.err
13729 }; then
c0d27fcc 13730 ac_header_preproc=yes
503d2be0
AS
13731else
13732 echo "$as_me: failed program was:" >&5
19650fd6
AS
13733sed 's/^/| /' conftest.$ac_ext >&5
13734
c0d27fcc 13735 ac_header_preproc=no
ba4481b5 13736fi
ca81d7a0 13737
503d2be0 13738rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13739{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13740echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13741
13742# So? What about this header?
edfaf76d
LK
13743case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13744 yes:no: )
f57bd967
DL
13745 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13746echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13747 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13748echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13749 ac_header_preproc=yes
19650fd6 13750 ;;
edfaf76d 13751 no:yes:* )
f57bd967
DL
13752 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13753echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
13754 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13755echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13756 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13757echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13758 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13759echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
f57bd967 13760 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 13761echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13762 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13763echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13764
19650fd6 13765 ;;
c0d27fcc 13766esac
ca81d7a0
JD
13767{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13768echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13769if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
13770 echo $ECHO_N "(cached) $ECHO_C" >&6
13771else
edfaf76d 13772 eval "$as_ac_Header=\$ac_header_preproc"
f57bd967 13773fi
ca81d7a0
JD
13774ac_res=`eval echo '${'$as_ac_Header'}'`
13775 { echo "$as_me:$LINENO: result: $ac_res" >&5
13776echo "${ECHO_T}$ac_res" >&6; }
f57bd967 13777
ba4481b5 13778fi
f57bd967
DL
13779if test `eval echo '${'$as_ac_Header'}'` = yes; then
13780 cat >>confdefs.h <<_ACEOF
13781#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13782_ACEOF
c0d27fcc
MR
13783
13784fi
f57bd967
DL
13785
13786done
13787
13788 if test "$ac_cv_header_png_h" = yes || test "$ac_cv_header_libpng_png_h" = yes ; then
ca81d7a0
JD
13789 { echo "$as_me:$LINENO: checking for png_get_channels in -lpng" >&5
13790echo $ECHO_N "checking for png_get_channels in -lpng... $ECHO_C" >&6; }
98418dba 13791if test "${ac_cv_lib_png_png_get_channels+set}" = set; then
503d2be0 13792 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 13793else
98418dba
CW
13794 ac_check_lib_save_LIBS=$LIBS
13795LIBS="-lpng -lz -lm $LIBS"
13796cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13797/* confdefs.h. */
13798_ACEOF
13799cat confdefs.h >>conftest.$ac_ext
13800cat >>conftest.$ac_ext <<_ACEOF
13801/* end confdefs.h. */
98418dba 13802
ca81d7a0
JD
13803/* Override any GCC internal prototype to avoid an error.
13804 Use char because int might match the return type of a GCC
13805 builtin and then its argument prototype would still apply. */
503d2be0
AS
13806#ifdef __cplusplus
13807extern "C"
13808#endif
98418dba 13809char png_get_channels ();
503d2be0
AS
13810int
13811main ()
13812{
ca81d7a0 13813return png_get_channels ();
503d2be0
AS
13814 ;
13815 return 0;
13816}
13817_ACEOF
13818rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
13819if { (ac_try="$ac_link"
13820case "(($ac_try" in
13821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13822 *) ac_try_echo=$ac_try;;
13823esac
13824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13825 (eval "$ac_link") 2>conftest.er1
503d2be0 13826 ac_status=$?
edfaf76d
LK
13827 grep -v '^ *+' conftest.er1 >conftest.err
13828 rm -f conftest.er1
13829 cat conftest.err >&5
c0d27fcc 13830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13831 (exit $ac_status); } && {
13832 test -z "$ac_c_werror_flag" ||
13833 test ! -s conftest.err
13834 } && test -s conftest$ac_exeext &&
13835 $as_test_x conftest$ac_exeext; then
98418dba 13836 ac_cv_lib_png_png_get_channels=yes
73b77ee5 13837else
98418dba 13838 echo "$as_me: failed program was:" >&5
19650fd6
AS
13839sed 's/^/| /' conftest.$ac_ext >&5
13840
ca81d7a0 13841 ac_cv_lib_png_png_get_channels=no
73b77ee5 13842fi
ca81d7a0 13843
f053c89f 13844rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 13845 conftest$ac_exeext conftest.$ac_ext
98418dba 13846LIBS=$ac_check_lib_save_LIBS
73b77ee5 13847fi
ca81d7a0
JD
13848{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_get_channels" >&5
13849echo "${ECHO_T}$ac_cv_lib_png_png_get_channels" >&6; }
98418dba
CW
13850if test $ac_cv_lib_png_png_get_channels = yes; then
13851 HAVE_PNG=yes
73b77ee5 13852fi
503d2be0 13853
f57bd967 13854 fi
98418dba
CW
13855 fi
13856
13857 if test "${HAVE_PNG}" = "yes"; then
b936fae4 13858
c0d27fcc 13859cat >>confdefs.h <<\_ACEOF
98418dba 13860#define HAVE_PNG 1
c0d27fcc 13861_ACEOF
73b77ee5 13862
98418dba 13863 fi
73b77ee5
GM
13864fi
13865
98418dba
CW
13866### Use -ltiff if available, unless `--with-tiff=no'.
13867HAVE_TIFF=no
13868if test "${HAVE_X11}" = "yes"; then
13869 if test "${with_tiff}" != "no"; then
c0d27fcc 13870 if test "${ac_cv_header_tiffio_h+set}" = set; then
ca81d7a0
JD
13871 { echo "$as_me:$LINENO: checking for tiffio.h" >&5
13872echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
98418dba
CW
13873if test "${ac_cv_header_tiffio_h+set}" = set; then
13874 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 13875fi
ca81d7a0
JD
13876{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13877echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
98418dba 13878else
c0d27fcc 13879 # Is the header compilable?
ca81d7a0
JD
13880{ echo "$as_me:$LINENO: checking tiffio.h usability" >&5
13881echo $ECHO_N "checking tiffio.h usability... $ECHO_C" >&6; }
c0d27fcc 13882cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13883/* confdefs.h. */
13884_ACEOF
13885cat confdefs.h >>conftest.$ac_ext
13886cat >>conftest.$ac_ext <<_ACEOF
13887/* end confdefs.h. */
c0d27fcc
MR
13888$ac_includes_default
13889#include <tiffio.h>
13890_ACEOF
13891rm -f conftest.$ac_objext
ca81d7a0
JD
13892if { (ac_try="$ac_compile"
13893case "(($ac_try" in
13894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13895 *) ac_try_echo=$ac_try;;
13896esac
13897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13898 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 13899 ac_status=$?
edfaf76d
LK
13900 grep -v '^ *+' conftest.er1 >conftest.err
13901 rm -f conftest.er1
13902 cat conftest.err >&5
c0d27fcc 13903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13904 (exit $ac_status); } && {
13905 test -z "$ac_c_werror_flag" ||
13906 test ! -s conftest.err
13907 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
13908 ac_header_compiler=yes
13909else
13910 echo "$as_me: failed program was:" >&5
19650fd6
AS
13911sed 's/^/| /' conftest.$ac_ext >&5
13912
ca81d7a0 13913 ac_header_compiler=no
c0d27fcc 13914fi
ca81d7a0
JD
13915
13916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13917{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13918echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
13919
13920# Is the header present?
ca81d7a0
JD
13921{ echo "$as_me:$LINENO: checking tiffio.h presence" >&5
13922echo $ECHO_N "checking tiffio.h presence... $ECHO_C" >&6; }
c0d27fcc 13923cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
13924/* confdefs.h. */
13925_ACEOF
13926cat confdefs.h >>conftest.$ac_ext
13927cat >>conftest.$ac_ext <<_ACEOF
13928/* end confdefs.h. */
98418dba
CW
13929#include <tiffio.h>
13930_ACEOF
ca81d7a0
JD
13931if { (ac_try="$ac_cpp conftest.$ac_ext"
13932case "(($ac_try" in
13933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13934 *) ac_try_echo=$ac_try;;
13935esac
13936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13937 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 13938 ac_status=$?
6bae0ccf 13939 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
13940 rm -f conftest.er1
13941 cat conftest.err >&5
c0d27fcc 13942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
13943 (exit $ac_status); } >/dev/null && {
13944 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13945 test ! -s conftest.err
13946 }; then
c0d27fcc 13947 ac_header_preproc=yes
98418dba
CW
13948else
13949 echo "$as_me: failed program was:" >&5
19650fd6
AS
13950sed 's/^/| /' conftest.$ac_ext >&5
13951
c0d27fcc 13952 ac_header_preproc=no
98418dba 13953fi
ca81d7a0 13954
98418dba 13955rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
13956{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13957echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
13958
13959# So? What about this header?
edfaf76d
LK
13960case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13961 yes:no: )
c0d27fcc
MR
13962 { echo "$as_me:$LINENO: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&5
13963echo "$as_me: WARNING: tiffio.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
13964 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the compiler's result" >&5
13965echo "$as_me: WARNING: tiffio.h: proceeding with the compiler's result" >&2;}
13966 ac_header_preproc=yes
19650fd6 13967 ;;
edfaf76d 13968 no:yes:* )
c0d27fcc
MR
13969 { echo "$as_me:$LINENO: WARNING: tiffio.h: present but cannot be compiled" >&5
13970echo "$as_me: WARNING: tiffio.h: present but cannot be compiled" >&2;}
edfaf76d
LK
13971 { echo "$as_me:$LINENO: WARNING: tiffio.h: check for missing prerequisite headers?" >&5
13972echo "$as_me: WARNING: tiffio.h: check for missing prerequisite headers?" >&2;}
13973 { echo "$as_me:$LINENO: WARNING: tiffio.h: see the Autoconf documentation" >&5
13974echo "$as_me: WARNING: tiffio.h: see the Autoconf documentation" >&2;}
13975 { echo "$as_me:$LINENO: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&5
13976echo "$as_me: WARNING: tiffio.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 13977 { echo "$as_me:$LINENO: WARNING: tiffio.h: proceeding with the preprocessor's result" >&5
19650fd6 13978echo "$as_me: WARNING: tiffio.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
13979 { echo "$as_me:$LINENO: WARNING: tiffio.h: in the future, the compiler will take precedence" >&5
13980echo "$as_me: WARNING: tiffio.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 13981
19650fd6 13982 ;;
c0d27fcc 13983esac
ca81d7a0
JD
13984{ echo "$as_me:$LINENO: checking for tiffio.h" >&5
13985echo $ECHO_N "checking for tiffio.h... $ECHO_C" >&6; }
c0d27fcc
MR
13986if test "${ac_cv_header_tiffio_h+set}" = set; then
13987 echo $ECHO_N "(cached) $ECHO_C" >&6
13988else
13989 ac_cv_header_tiffio_h=$ac_header_preproc
98418dba 13990fi
ca81d7a0
JD
13991{ echo "$as_me:$LINENO: result: $ac_cv_header_tiffio_h" >&5
13992echo "${ECHO_T}$ac_cv_header_tiffio_h" >&6; }
c0d27fcc
MR
13993
13994fi
98418dba
CW
13995if test $ac_cv_header_tiffio_h = yes; then
13996 tifflibs="-lz -lm"
13997 # At least one tiff package requires the jpeg library.
13998 if test "${HAVE_JPEG}" = yes; then tifflibs="-ljpeg $tifflibs"; fi
ca81d7a0
JD
13999 { echo "$as_me:$LINENO: checking for TIFFGetVersion in -ltiff" >&5
14000echo $ECHO_N "checking for TIFFGetVersion in -ltiff... $ECHO_C" >&6; }
98418dba 14001if test "${ac_cv_lib_tiff_TIFFGetVersion+set}" = set; then
503d2be0 14002 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14003else
503d2be0 14004 ac_check_lib_save_LIBS=$LIBS
98418dba 14005LIBS="-ltiff $tifflibs $LIBS"
503d2be0 14006cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14007/* confdefs.h. */
14008_ACEOF
14009cat confdefs.h >>conftest.$ac_ext
14010cat >>conftest.$ac_ext <<_ACEOF
14011/* end confdefs.h. */
503d2be0 14012
ca81d7a0
JD
14013/* Override any GCC internal prototype to avoid an error.
14014 Use char because int might match the return type of a GCC
14015 builtin and then its argument prototype would still apply. */
503d2be0
AS
14016#ifdef __cplusplus
14017extern "C"
14018#endif
98418dba 14019char TIFFGetVersion ();
503d2be0
AS
14020int
14021main ()
14022{
ca81d7a0 14023return TIFFGetVersion ();
503d2be0
AS
14024 ;
14025 return 0;
14026}
14027_ACEOF
14028rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14029if { (ac_try="$ac_link"
14030case "(($ac_try" in
14031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14032 *) ac_try_echo=$ac_try;;
14033esac
14034eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14035 (eval "$ac_link") 2>conftest.er1
503d2be0 14036 ac_status=$?
edfaf76d
LK
14037 grep -v '^ *+' conftest.er1 >conftest.err
14038 rm -f conftest.er1
14039 cat conftest.err >&5
c0d27fcc 14040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14041 (exit $ac_status); } && {
14042 test -z "$ac_c_werror_flag" ||
14043 test ! -s conftest.err
14044 } && test -s conftest$ac_exeext &&
14045 $as_test_x conftest$ac_exeext; then
98418dba 14046 ac_cv_lib_tiff_TIFFGetVersion=yes
503d2be0
AS
14047else
14048 echo "$as_me: failed program was:" >&5
19650fd6
AS
14049sed 's/^/| /' conftest.$ac_ext >&5
14050
ca81d7a0 14051 ac_cv_lib_tiff_TIFFGetVersion=no
503d2be0 14052fi
ca81d7a0 14053
f053c89f 14054rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14055 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14056LIBS=$ac_check_lib_save_LIBS
14057fi
ca81d7a0
JD
14058{ echo "$as_me:$LINENO: result: $ac_cv_lib_tiff_TIFFGetVersion" >&5
14059echo "${ECHO_T}$ac_cv_lib_tiff_TIFFGetVersion" >&6; }
98418dba
CW
14060if test $ac_cv_lib_tiff_TIFFGetVersion = yes; then
14061 HAVE_TIFF=yes
14062fi
14063
14064fi
73b77ee5 14065
c0d27fcc 14066
98418dba
CW
14067 fi
14068
14069 if test "${HAVE_TIFF}" = "yes"; then
b936fae4 14070
c0d27fcc 14071cat >>confdefs.h <<\_ACEOF
98418dba 14072#define HAVE_TIFF 1
c0d27fcc 14073_ACEOF
98418dba
CW
14074
14075 fi
73b77ee5
GM
14076fi
14077
9aeb8aaa 14078### Use -lgif or -lungif if available, unless `--with-gif=no'.
98418dba 14079HAVE_GIF=no
9aeb8aaa
GM
14080if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no"; then
14081 if test "${ac_cv_header_gif_lib_h+set}" = set; then
ca81d7a0
JD
14082 { echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14083echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
98418dba
CW
14084if test "${ac_cv_header_gif_lib_h+set}" = set; then
14085 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14086fi
ca81d7a0
JD
14087{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14088echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
98418dba 14089else
c0d27fcc 14090 # Is the header compilable?
ca81d7a0
JD
14091{ echo "$as_me:$LINENO: checking gif_lib.h usability" >&5
14092echo $ECHO_N "checking gif_lib.h usability... $ECHO_C" >&6; }
c0d27fcc 14093cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14094/* confdefs.h. */
14095_ACEOF
14096cat confdefs.h >>conftest.$ac_ext
14097cat >>conftest.$ac_ext <<_ACEOF
14098/* end confdefs.h. */
c0d27fcc
MR
14099$ac_includes_default
14100#include <gif_lib.h>
14101_ACEOF
14102rm -f conftest.$ac_objext
ca81d7a0
JD
14103if { (ac_try="$ac_compile"
14104case "(($ac_try" in
14105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14106 *) ac_try_echo=$ac_try;;
14107esac
14108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14109 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14110 ac_status=$?
edfaf76d
LK
14111 grep -v '^ *+' conftest.er1 >conftest.err
14112 rm -f conftest.er1
14113 cat conftest.err >&5
c0d27fcc 14114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14115 (exit $ac_status); } && {
14116 test -z "$ac_c_werror_flag" ||
14117 test ! -s conftest.err
14118 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14119 ac_header_compiler=yes
14120else
14121 echo "$as_me: failed program was:" >&5
19650fd6
AS
14122sed 's/^/| /' conftest.$ac_ext >&5
14123
ca81d7a0 14124 ac_header_compiler=no
c0d27fcc 14125fi
ca81d7a0
JD
14126
14127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14128{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14129echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14130
14131# Is the header present?
ca81d7a0
JD
14132{ echo "$as_me:$LINENO: checking gif_lib.h presence" >&5
14133echo $ECHO_N "checking gif_lib.h presence... $ECHO_C" >&6; }
c0d27fcc 14134cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14135/* confdefs.h. */
14136_ACEOF
14137cat confdefs.h >>conftest.$ac_ext
14138cat >>conftest.$ac_ext <<_ACEOF
14139/* end confdefs.h. */
98418dba
CW
14140#include <gif_lib.h>
14141_ACEOF
ca81d7a0
JD
14142if { (ac_try="$ac_cpp conftest.$ac_ext"
14143case "(($ac_try" in
14144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14145 *) ac_try_echo=$ac_try;;
14146esac
14147eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14148 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14149 ac_status=$?
6bae0ccf 14150 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14151 rm -f conftest.er1
14152 cat conftest.err >&5
c0d27fcc 14153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14154 (exit $ac_status); } >/dev/null && {
14155 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14156 test ! -s conftest.err
14157 }; then
c0d27fcc 14158 ac_header_preproc=yes
98418dba
CW
14159else
14160 echo "$as_me: failed program was:" >&5
19650fd6
AS
14161sed 's/^/| /' conftest.$ac_ext >&5
14162
c0d27fcc 14163 ac_header_preproc=no
98418dba 14164fi
ca81d7a0 14165
98418dba 14166rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14167{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14168echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14169
14170# So? What about this header?
edfaf76d
LK
14171case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14172 yes:no: )
c0d27fcc
MR
14173 { echo "$as_me:$LINENO: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14174echo "$as_me: WARNING: gif_lib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14175 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the compiler's result" >&5
14176echo "$as_me: WARNING: gif_lib.h: proceeding with the compiler's result" >&2;}
14177 ac_header_preproc=yes
19650fd6 14178 ;;
edfaf76d 14179 no:yes:* )
c0d27fcc
MR
14180 { echo "$as_me:$LINENO: WARNING: gif_lib.h: present but cannot be compiled" >&5
14181echo "$as_me: WARNING: gif_lib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14182 { echo "$as_me:$LINENO: WARNING: gif_lib.h: check for missing prerequisite headers?" >&5
14183echo "$as_me: WARNING: gif_lib.h: check for missing prerequisite headers?" >&2;}
14184 { echo "$as_me:$LINENO: WARNING: gif_lib.h: see the Autoconf documentation" >&5
14185echo "$as_me: WARNING: gif_lib.h: see the Autoconf documentation" >&2;}
14186 { echo "$as_me:$LINENO: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&5
14187echo "$as_me: WARNING: gif_lib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14188 { echo "$as_me:$LINENO: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&5
19650fd6 14189echo "$as_me: WARNING: gif_lib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14190 { echo "$as_me:$LINENO: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&5
14191echo "$as_me: WARNING: gif_lib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14192
19650fd6 14193 ;;
c0d27fcc 14194esac
ca81d7a0
JD
14195{ echo "$as_me:$LINENO: checking for gif_lib.h" >&5
14196echo $ECHO_N "checking for gif_lib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14197if test "${ac_cv_header_gif_lib_h+set}" = set; then
14198 echo $ECHO_N "(cached) $ECHO_C" >&6
14199else
14200 ac_cv_header_gif_lib_h=$ac_header_preproc
98418dba 14201fi
ca81d7a0
JD
14202{ echo "$as_me:$LINENO: result: $ac_cv_header_gif_lib_h" >&5
14203echo "${ECHO_T}$ac_cv_header_gif_lib_h" >&6; }
c0d27fcc
MR
14204
14205fi
98418dba
CW
14206if test $ac_cv_header_gif_lib_h = yes; then
14207 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
14208# Earlier versions can crash Emacs.
63175cd2
GM
14209 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lgif" >&5
14210echo $ECHO_N "checking for EGifPutExtensionLast in -lgif... $ECHO_C" >&6; }
14211if test "${ac_cv_lib_gif_EGifPutExtensionLast+set}" = set; then
503d2be0 14212 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14213else
503d2be0 14214 ac_check_lib_save_LIBS=$LIBS
63175cd2 14215LIBS="-lgif $LIBS"
503d2be0 14216cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14217/* confdefs.h. */
14218_ACEOF
14219cat confdefs.h >>conftest.$ac_ext
14220cat >>conftest.$ac_ext <<_ACEOF
14221/* end confdefs.h. */
73b77ee5 14222
ca81d7a0
JD
14223/* Override any GCC internal prototype to avoid an error.
14224 Use char because int might match the return type of a GCC
14225 builtin and then its argument prototype would still apply. */
98418dba
CW
14226#ifdef __cplusplus
14227extern "C"
14228#endif
98418dba 14229char EGifPutExtensionLast ();
503d2be0
AS
14230int
14231main ()
14232{
ca81d7a0 14233return EGifPutExtensionLast ();
503d2be0
AS
14234 ;
14235 return 0;
14236}
14237_ACEOF
14238rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14239if { (ac_try="$ac_link"
14240case "(($ac_try" in
14241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14242 *) ac_try_echo=$ac_try;;
14243esac
14244eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14245 (eval "$ac_link") 2>conftest.er1
503d2be0 14246 ac_status=$?
edfaf76d
LK
14247 grep -v '^ *+' conftest.er1 >conftest.err
14248 rm -f conftest.er1
14249 cat conftest.err >&5
c0d27fcc 14250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14251 (exit $ac_status); } && {
14252 test -z "$ac_c_werror_flag" ||
14253 test ! -s conftest.err
14254 } && test -s conftest$ac_exeext &&
14255 $as_test_x conftest$ac_exeext; then
63175cd2 14256 ac_cv_lib_gif_EGifPutExtensionLast=yes
35996d22 14257else
98418dba 14258 echo "$as_me: failed program was:" >&5
19650fd6
AS
14259sed 's/^/| /' conftest.$ac_ext >&5
14260
63175cd2 14261 ac_cv_lib_gif_EGifPutExtensionLast=no
98418dba 14262fi
ca81d7a0 14263
f053c89f 14264rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14265 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
14266LIBS=$ac_check_lib_save_LIBS
14267fi
63175cd2
GM
14268{ echo "$as_me:$LINENO: result: $ac_cv_lib_gif_EGifPutExtensionLast" >&5
14269echo "${ECHO_T}$ac_cv_lib_gif_EGifPutExtensionLast" >&6; }
14270if test $ac_cv_lib_gif_EGifPutExtensionLast = yes; then
98418dba 14271 HAVE_GIF=yes
9aeb8aaa 14272else
63175cd2 14273 try_libungif=yes
98418dba
CW
14274fi
14275
14276fi
14277
c0d27fcc 14278
9aeb8aaa
GM
14279
14280 if test "$HAVE_GIF" = yes; then
63175cd2 14281 ac_gif_lib_name="-lgif"
9aeb8aaa
GM
14282 fi
14283
63175cd2
GM
14284# If gif_lib.h but no libgif, try libungif.
14285 if test x"$try_libungif" = xyes; then
14286 { echo "$as_me:$LINENO: checking for EGifPutExtensionLast in -lungif" >&5
14287echo $ECHO_N "checking for EGifPutExtensionLast in -lungif... $ECHO_C" >&6; }
14288if test "${ac_cv_lib_ungif_EGifPutExtensionLast+set}" = set; then
9aeb8aaa
GM
14289 echo $ECHO_N "(cached) $ECHO_C" >&6
14290else
14291 ac_check_lib_save_LIBS=$LIBS
63175cd2 14292LIBS="-lungif $LIBS"
9aeb8aaa
GM
14293cat >conftest.$ac_ext <<_ACEOF
14294/* confdefs.h. */
14295_ACEOF
14296cat confdefs.h >>conftest.$ac_ext
14297cat >>conftest.$ac_ext <<_ACEOF
14298/* end confdefs.h. */
14299
14300/* Override any GCC internal prototype to avoid an error.
14301 Use char because int might match the return type of a GCC
14302 builtin and then its argument prototype would still apply. */
14303#ifdef __cplusplus
14304extern "C"
14305#endif
14306char EGifPutExtensionLast ();
14307int
14308main ()
14309{
14310return EGifPutExtensionLast ();
14311 ;
14312 return 0;
14313}
14314_ACEOF
14315rm -f conftest.$ac_objext conftest$ac_exeext
14316if { (ac_try="$ac_link"
14317case "(($ac_try" in
14318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14319 *) ac_try_echo=$ac_try;;
14320esac
14321eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14322 (eval "$ac_link") 2>conftest.er1
14323 ac_status=$?
14324 grep -v '^ *+' conftest.er1 >conftest.err
14325 rm -f conftest.er1
14326 cat conftest.err >&5
14327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14328 (exit $ac_status); } && {
14329 test -z "$ac_c_werror_flag" ||
14330 test ! -s conftest.err
14331 } && test -s conftest$ac_exeext &&
14332 $as_test_x conftest$ac_exeext; then
63175cd2 14333 ac_cv_lib_ungif_EGifPutExtensionLast=yes
9aeb8aaa
GM
14334else
14335 echo "$as_me: failed program was:" >&5
14336sed 's/^/| /' conftest.$ac_ext >&5
14337
63175cd2 14338 ac_cv_lib_ungif_EGifPutExtensionLast=no
98418dba
CW
14339fi
14340
9aeb8aaa
GM
14341rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14342 conftest$ac_exeext conftest.$ac_ext
14343LIBS=$ac_check_lib_save_LIBS
14344fi
63175cd2
GM
14345{ echo "$as_me:$LINENO: result: $ac_cv_lib_ungif_EGifPutExtensionLast" >&5
14346echo "${ECHO_T}$ac_cv_lib_ungif_EGifPutExtensionLast" >&6; }
14347if test $ac_cv_lib_ungif_EGifPutExtensionLast = yes; then
9aeb8aaa 14348 HAVE_GIF=yes
98418dba
CW
14349fi
14350
c0d27fcc 14351
9aeb8aaa
GM
14352 if test "$HAVE_GIF" = yes; then
14353
14354cat >>confdefs.h <<\_ACEOF
63175cd2 14355#define LIBGIF -lungif
9aeb8aaa
GM
14356_ACEOF
14357
63175cd2 14358 ac_gif_lib_name="-lungif"
9aeb8aaa 14359 fi
98418dba
CW
14360 fi
14361
14362 if test "${HAVE_GIF}" = "yes"; then
b936fae4 14363
c0d27fcc 14364cat >>confdefs.h <<\_ACEOF
98418dba 14365#define HAVE_GIF 1
c0d27fcc 14366_ACEOF
98418dba
CW
14367
14368 fi
14369fi
14370
5afbeb22
JD
14371if test "${HAVE_X11}" = "yes"; then
14372 MISSING=""
14373 WITH_NO=""
14374 test "${with_xpm}" != "no" && test "${HAVE_XPM}" != "yes" &&
14375 MISSING="libXpm" && WITH_NO="--with-xpm=no"
14376 test "${with_jpeg}" != "no" && test "${HAVE_JPEG}" != "yes" &&
14377 MISSING="$MISSING libjpeg" && WITH_NO="$WITH_NO --with-jpeg=no"
14378 test "${with_png}" != "no" && test "${HAVE_PNG}" != "yes" &&
14379 MISSING="$MISSING libpng" && WITH_NO="$WITH_NO --with-png=no"
14380 test "${with_gif}" != "no" && test "${HAVE_GIF}" != "yes" &&
14381 MISSING="$MISSING libgif/libungif" && WITH_NO="$WITH_NO --with-gif=no"
14382 test "${with_tiff}" != "no" && test "${HAVE_TIFF}" != "yes" &&
14383 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
14384
14385 if test "X${MISSING}" != X; then
1bb9a689 14386 { { echo "$as_me:$LINENO: error: The following required libraries were not found:
5afbeb22 14387 $MISSING
86e73516 14388Maybe some development libraries/packages are missing?
5afbeb22
JD
14389If you don't want to link with them give
14390 $WITH_NO
14391as options to configure" >&5
1bb9a689 14392echo "$as_me: error: The following required libraries were not found:
5afbeb22 14393 $MISSING
86e73516 14394Maybe some development libraries/packages are missing?
5afbeb22
JD
14395If you don't want to link with them give
14396 $WITH_NO
14397as options to configure" >&2;}
86e73516 14398 { (exit 1); exit 1; }; }
98418dba
CW
14399 fi
14400fi
14401
79011b82
NR
14402### Use -lgpm if available, unless `--with-gpm=no'.
14403HAVE_GPM=no
14404if test "${with_gpm}" != "no"; then
14405 if test "${ac_cv_header_gpm_h+set}" = set; then
14406 { echo "$as_me:$LINENO: checking for gpm.h" >&5
14407echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14408if test "${ac_cv_header_gpm_h+set}" = set; then
14409 echo $ECHO_N "(cached) $ECHO_C" >&6
14410fi
14411{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14412echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14413else
14414 # Is the header compilable?
14415{ echo "$as_me:$LINENO: checking gpm.h usability" >&5
14416echo $ECHO_N "checking gpm.h usability... $ECHO_C" >&6; }
14417cat >conftest.$ac_ext <<_ACEOF
14418/* confdefs.h. */
14419_ACEOF
14420cat confdefs.h >>conftest.$ac_ext
14421cat >>conftest.$ac_ext <<_ACEOF
14422/* end confdefs.h. */
14423$ac_includes_default
14424#include <gpm.h>
14425_ACEOF
14426rm -f conftest.$ac_objext
14427if { (ac_try="$ac_compile"
14428case "(($ac_try" in
14429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14430 *) ac_try_echo=$ac_try;;
14431esac
14432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14433 (eval "$ac_compile") 2>conftest.er1
14434 ac_status=$?
14435 grep -v '^ *+' conftest.er1 >conftest.err
14436 rm -f conftest.er1
14437 cat conftest.err >&5
14438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14439 (exit $ac_status); } && {
14440 test -z "$ac_c_werror_flag" ||
14441 test ! -s conftest.err
14442 } && test -s conftest.$ac_objext; then
14443 ac_header_compiler=yes
14444else
14445 echo "$as_me: failed program was:" >&5
14446sed 's/^/| /' conftest.$ac_ext >&5
14447
14448 ac_header_compiler=no
14449fi
14450
14451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14452{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14453echo "${ECHO_T}$ac_header_compiler" >&6; }
14454
14455# Is the header present?
14456{ echo "$as_me:$LINENO: checking gpm.h presence" >&5
14457echo $ECHO_N "checking gpm.h presence... $ECHO_C" >&6; }
14458cat >conftest.$ac_ext <<_ACEOF
14459/* confdefs.h. */
14460_ACEOF
14461cat confdefs.h >>conftest.$ac_ext
14462cat >>conftest.$ac_ext <<_ACEOF
14463/* end confdefs.h. */
14464#include <gpm.h>
14465_ACEOF
14466if { (ac_try="$ac_cpp conftest.$ac_ext"
14467case "(($ac_try" in
14468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14469 *) ac_try_echo=$ac_try;;
14470esac
14471eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14472 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
14473 ac_status=$?
14474 grep -v '^ *+' conftest.er1 >conftest.err
14475 rm -f conftest.er1
14476 cat conftest.err >&5
14477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14478 (exit $ac_status); } >/dev/null && {
14479 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14480 test ! -s conftest.err
14481 }; then
14482 ac_header_preproc=yes
14483else
14484 echo "$as_me: failed program was:" >&5
14485sed 's/^/| /' conftest.$ac_ext >&5
14486
14487 ac_header_preproc=no
14488fi
14489
14490rm -f conftest.err conftest.$ac_ext
14491{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14492echo "${ECHO_T}$ac_header_preproc" >&6; }
14493
14494# So? What about this header?
14495case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14496 yes:no: )
14497 { echo "$as_me:$LINENO: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&5
14498echo "$as_me: WARNING: gpm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14499 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the compiler's result" >&5
14500echo "$as_me: WARNING: gpm.h: proceeding with the compiler's result" >&2;}
14501 ac_header_preproc=yes
14502 ;;
14503 no:yes:* )
14504 { echo "$as_me:$LINENO: WARNING: gpm.h: present but cannot be compiled" >&5
14505echo "$as_me: WARNING: gpm.h: present but cannot be compiled" >&2;}
14506 { echo "$as_me:$LINENO: WARNING: gpm.h: check for missing prerequisite headers?" >&5
14507echo "$as_me: WARNING: gpm.h: check for missing prerequisite headers?" >&2;}
14508 { echo "$as_me:$LINENO: WARNING: gpm.h: see the Autoconf documentation" >&5
14509echo "$as_me: WARNING: gpm.h: see the Autoconf documentation" >&2;}
14510 { echo "$as_me:$LINENO: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&5
14511echo "$as_me: WARNING: gpm.h: section \"Present But Cannot Be Compiled\"" >&2;}
14512 { echo "$as_me:$LINENO: WARNING: gpm.h: proceeding with the preprocessor's result" >&5
14513echo "$as_me: WARNING: gpm.h: proceeding with the preprocessor's result" >&2;}
14514 { echo "$as_me:$LINENO: WARNING: gpm.h: in the future, the compiler will take precedence" >&5
14515echo "$as_me: WARNING: gpm.h: in the future, the compiler will take precedence" >&2;}
14516
14517 ;;
14518esac
14519{ echo "$as_me:$LINENO: checking for gpm.h" >&5
14520echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6; }
14521if test "${ac_cv_header_gpm_h+set}" = set; then
14522 echo $ECHO_N "(cached) $ECHO_C" >&6
14523else
14524 ac_cv_header_gpm_h=$ac_header_preproc
14525fi
14526{ echo "$as_me:$LINENO: result: $ac_cv_header_gpm_h" >&5
14527echo "${ECHO_T}$ac_cv_header_gpm_h" >&6; }
14528
14529fi
14530if test $ac_cv_header_gpm_h = yes; then
14531 { echo "$as_me:$LINENO: checking for Gpm_Open in -lgpm" >&5
14532echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6; }
14533if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
14534 echo $ECHO_N "(cached) $ECHO_C" >&6
14535else
14536 ac_check_lib_save_LIBS=$LIBS
14537LIBS="-lgpm $LIBS"
14538cat >conftest.$ac_ext <<_ACEOF
14539/* confdefs.h. */
14540_ACEOF
14541cat confdefs.h >>conftest.$ac_ext
14542cat >>conftest.$ac_ext <<_ACEOF
14543/* end confdefs.h. */
14544
14545/* Override any GCC internal prototype to avoid an error.
14546 Use char because int might match the return type of a GCC
14547 builtin and then its argument prototype would still apply. */
14548#ifdef __cplusplus
14549extern "C"
14550#endif
14551char Gpm_Open ();
14552int
14553main ()
14554{
14555return Gpm_Open ();
14556 ;
14557 return 0;
14558}
14559_ACEOF
14560rm -f conftest.$ac_objext conftest$ac_exeext
14561if { (ac_try="$ac_link"
14562case "(($ac_try" in
14563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14564 *) ac_try_echo=$ac_try;;
14565esac
14566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14567 (eval "$ac_link") 2>conftest.er1
14568 ac_status=$?
14569 grep -v '^ *+' conftest.er1 >conftest.err
14570 rm -f conftest.er1
14571 cat conftest.err >&5
14572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14573 (exit $ac_status); } && {
14574 test -z "$ac_c_werror_flag" ||
14575 test ! -s conftest.err
14576 } && test -s conftest$ac_exeext &&
14577 $as_test_x conftest$ac_exeext; then
14578 ac_cv_lib_gpm_Gpm_Open=yes
14579else
14580 echo "$as_me: failed program was:" >&5
14581sed 's/^/| /' conftest.$ac_ext >&5
14582
14583 ac_cv_lib_gpm_Gpm_Open=no
14584fi
14585
14586rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14587 conftest$ac_exeext conftest.$ac_ext
14588LIBS=$ac_check_lib_save_LIBS
14589fi
14590{ echo "$as_me:$LINENO: result: $ac_cv_lib_gpm_Gpm_Open" >&5
14591echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6; }
14592if test $ac_cv_lib_gpm_Gpm_Open = yes; then
14593 HAVE_GPM=yes
14594fi
14595
14596fi
14597
14598
14599fi
14600
14601if test "${HAVE_GPM}" = "yes"; then
14602
14603cat >>confdefs.h <<\_ACEOF
14604#define HAVE_GPM 1
14605_ACEOF
14606
14607fi
14608
cef11da2 14609if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
ca81d7a0
JD
14610 { echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14611echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14612if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14613 echo $ECHO_N "(cached) $ECHO_C" >&6
14614fi
ca81d7a0
JD
14615{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14616echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2
ST
14617else
14618 # Is the header compilable?
ca81d7a0
JD
14619{ echo "$as_me:$LINENO: checking malloc/malloc.h usability" >&5
14620echo $ECHO_N "checking malloc/malloc.h usability... $ECHO_C" >&6; }
cef11da2
ST
14621cat >conftest.$ac_ext <<_ACEOF
14622/* confdefs.h. */
14623_ACEOF
14624cat confdefs.h >>conftest.$ac_ext
14625cat >>conftest.$ac_ext <<_ACEOF
14626/* end confdefs.h. */
14627$ac_includes_default
14628#include <malloc/malloc.h>
14629_ACEOF
14630rm -f conftest.$ac_objext
ca81d7a0
JD
14631if { (ac_try="$ac_compile"
14632case "(($ac_try" in
14633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14634 *) ac_try_echo=$ac_try;;
14635esac
14636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14637 (eval "$ac_compile") 2>conftest.er1
cef11da2 14638 ac_status=$?
edfaf76d
LK
14639 grep -v '^ *+' conftest.er1 >conftest.err
14640 rm -f conftest.er1
14641 cat conftest.err >&5
cef11da2 14642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
14643 (exit $ac_status); } && {
14644 test -z "$ac_c_werror_flag" ||
14645 test ! -s conftest.err
14646 } && test -s conftest.$ac_objext; then
cef11da2
ST
14647 ac_header_compiler=yes
14648else
14649 echo "$as_me: failed program was:" >&5
14650sed 's/^/| /' conftest.$ac_ext >&5
14651
ca81d7a0 14652 ac_header_compiler=no
cef11da2 14653fi
ca81d7a0
JD
14654
14655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14656{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14657echo "${ECHO_T}$ac_header_compiler" >&6; }
cef11da2
ST
14658
14659# Is the header present?
ca81d7a0
JD
14660{ echo "$as_me:$LINENO: checking malloc/malloc.h presence" >&5
14661echo $ECHO_N "checking malloc/malloc.h presence... $ECHO_C" >&6; }
cef11da2
ST
14662cat >conftest.$ac_ext <<_ACEOF
14663/* confdefs.h. */
14664_ACEOF
14665cat confdefs.h >>conftest.$ac_ext
14666cat >>conftest.$ac_ext <<_ACEOF
14667/* end confdefs.h. */
14668#include <malloc/malloc.h>
14669_ACEOF
ca81d7a0
JD
14670if { (ac_try="$ac_cpp conftest.$ac_ext"
14671case "(($ac_try" in
14672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14673 *) ac_try_echo=$ac_try;;
14674esac
14675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14676 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
cef11da2
ST
14677 ac_status=$?
14678 grep -v '^ *+' conftest.er1 >conftest.err
14679 rm -f conftest.er1
14680 cat conftest.err >&5
14681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14682 (exit $ac_status); } >/dev/null && {
14683 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14684 test ! -s conftest.err
14685 }; then
cef11da2
ST
14686 ac_header_preproc=yes
14687else
14688 echo "$as_me: failed program was:" >&5
14689sed 's/^/| /' conftest.$ac_ext >&5
14690
14691 ac_header_preproc=no
14692fi
ca81d7a0 14693
cef11da2 14694rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14695{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14696echo "${ECHO_T}$ac_header_preproc" >&6; }
cef11da2
ST
14697
14698# So? What about this header?
edfaf76d
LK
14699case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14700 yes:no: )
cef11da2
ST
14701 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5
14702echo "$as_me: WARNING: malloc/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14703 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&5
14704echo "$as_me: WARNING: malloc/malloc.h: proceeding with the compiler's result" >&2;}
14705 ac_header_preproc=yes
cef11da2 14706 ;;
edfaf76d 14707 no:yes:* )
cef11da2
ST
14708 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: present but cannot be compiled" >&5
14709echo "$as_me: WARNING: malloc/malloc.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14710 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&5
14711echo "$as_me: WARNING: malloc/malloc.h: check for missing prerequisite headers?" >&2;}
14712 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: see the Autoconf documentation" >&5
14713echo "$as_me: WARNING: malloc/malloc.h: see the Autoconf documentation" >&2;}
14714 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&5
14715echo "$as_me: WARNING: malloc/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;}
cef11da2
ST
14716 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&5
14717echo "$as_me: WARNING: malloc/malloc.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14718 { echo "$as_me:$LINENO: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&5
14719echo "$as_me: WARNING: malloc/malloc.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14720
cef11da2
ST
14721 ;;
14722esac
ca81d7a0
JD
14723{ echo "$as_me:$LINENO: checking for malloc/malloc.h" >&5
14724echo $ECHO_N "checking for malloc/malloc.h... $ECHO_C" >&6; }
cef11da2
ST
14725if test "${ac_cv_header_malloc_malloc_h+set}" = set; then
14726 echo $ECHO_N "(cached) $ECHO_C" >&6
14727else
14728 ac_cv_header_malloc_malloc_h=$ac_header_preproc
7c9e5167 14729fi
ca81d7a0
JD
14730{ echo "$as_me:$LINENO: result: $ac_cv_header_malloc_malloc_h" >&5
14731echo "${ECHO_T}$ac_cv_header_malloc_malloc_h" >&6; }
cef11da2 14732
7c9e5167 14733fi
cef11da2
ST
14734if test $ac_cv_header_malloc_malloc_h = yes; then
14735
14736cat >>confdefs.h <<\_ACEOF
14737#define HAVE_MALLOC_MALLOC_H 1
14738_ACEOF
14739
7c9e5167
JD
14740fi
14741
cef11da2
ST
14742
14743
5d6da11e 14744### Use Mac OS X Carbon API to implement GUI.
e0f712ba 14745if test "${HAVE_CARBON}" = "yes"; then
7c9e5167
JD
14746
14747cat >>confdefs.h <<\_ACEOF
e0f712ba 14748#define HAVE_CARBON 1
7c9e5167
JD
14749_ACEOF
14750
6a3a24fa
JD
14751 ## Specify the install directory
14752 carbon_appdir=
14753 if test "${carbon_appdir_x}" != ""; then
14754 case ${carbon_appdir_x} in
14755 y | ye | yes) carbon_appdir=/Applications ;;
14756 * ) carbon_appdir=${carbon_appdir_x} ;;
14757 esac
7c9e5167 14758 fi
8f417b3b
AS
14759 # We also have mouse menus.
14760 HAVE_MENUS=yes
e0f712ba
AC
14761fi
14762
98418dba
CW
14763### Use session management (-lSM -lICE) if available
14764HAVE_X_SM=no
14765if test "${HAVE_X11}" = "yes"; then
c0d27fcc 14766 if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
ca81d7a0
JD
14767 { echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14768echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
98418dba
CW
14769if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14770 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 14771fi
ca81d7a0
JD
14772{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14773echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
503d2be0 14774else
c0d27fcc 14775 # Is the header compilable?
ca81d7a0
JD
14776{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h usability" >&5
14777echo $ECHO_N "checking X11/SM/SMlib.h usability... $ECHO_C" >&6; }
c0d27fcc 14778cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14779/* confdefs.h. */
14780_ACEOF
14781cat confdefs.h >>conftest.$ac_ext
14782cat >>conftest.$ac_ext <<_ACEOF
14783/* end confdefs.h. */
c0d27fcc
MR
14784$ac_includes_default
14785#include <X11/SM/SMlib.h>
14786_ACEOF
14787rm -f conftest.$ac_objext
ca81d7a0
JD
14788if { (ac_try="$ac_compile"
14789case "(($ac_try" in
14790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14791 *) ac_try_echo=$ac_try;;
14792esac
14793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14794 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 14795 ac_status=$?
edfaf76d
LK
14796 grep -v '^ *+' conftest.er1 >conftest.err
14797 rm -f conftest.er1
14798 cat conftest.err >&5
c0d27fcc 14799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14800 (exit $ac_status); } && {
14801 test -z "$ac_c_werror_flag" ||
14802 test ! -s conftest.err
14803 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
14804 ac_header_compiler=yes
14805else
14806 echo "$as_me: failed program was:" >&5
19650fd6
AS
14807sed 's/^/| /' conftest.$ac_ext >&5
14808
ca81d7a0 14809 ac_header_compiler=no
c0d27fcc 14810fi
ca81d7a0
JD
14811
14812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14813{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14814echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
14815
14816# Is the header present?
ca81d7a0
JD
14817{ echo "$as_me:$LINENO: checking X11/SM/SMlib.h presence" >&5
14818echo $ECHO_N "checking X11/SM/SMlib.h presence... $ECHO_C" >&6; }
c0d27fcc 14819cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14820/* confdefs.h. */
14821_ACEOF
14822cat confdefs.h >>conftest.$ac_ext
14823cat >>conftest.$ac_ext <<_ACEOF
14824/* end confdefs.h. */
98418dba
CW
14825#include <X11/SM/SMlib.h>
14826_ACEOF
ca81d7a0
JD
14827if { (ac_try="$ac_cpp conftest.$ac_ext"
14828case "(($ac_try" in
14829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14830 *) ac_try_echo=$ac_try;;
14831esac
14832eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14833 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 14834 ac_status=$?
6bae0ccf 14835 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
14836 rm -f conftest.er1
14837 cat conftest.err >&5
c0d27fcc 14838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14839 (exit $ac_status); } >/dev/null && {
14840 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14841 test ! -s conftest.err
14842 }; then
c0d27fcc 14843 ac_header_preproc=yes
98418dba
CW
14844else
14845 echo "$as_me: failed program was:" >&5
19650fd6
AS
14846sed 's/^/| /' conftest.$ac_ext >&5
14847
c0d27fcc 14848 ac_header_preproc=no
98418dba 14849fi
ca81d7a0 14850
98418dba 14851rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
14852{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14853echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
14854
14855# So? What about this header?
edfaf76d
LK
14856case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14857 yes:no: )
c0d27fcc
MR
14858 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
14859echo "$as_me: WARNING: X11/SM/SMlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
14860 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&5
14861echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the compiler's result" >&2;}
14862 ac_header_preproc=yes
19650fd6 14863 ;;
edfaf76d 14864 no:yes:* )
c0d27fcc
MR
14865 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&5
14866echo "$as_me: WARNING: X11/SM/SMlib.h: present but cannot be compiled" >&2;}
edfaf76d
LK
14867 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&5
14868echo "$as_me: WARNING: X11/SM/SMlib.h: check for missing prerequisite headers?" >&2;}
14869 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&5
14870echo "$as_me: WARNING: X11/SM/SMlib.h: see the Autoconf documentation" >&2;}
14871 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&5
14872echo "$as_me: WARNING: X11/SM/SMlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 14873 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&5
19650fd6 14874echo "$as_me: WARNING: X11/SM/SMlib.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
14875 { echo "$as_me:$LINENO: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&5
14876echo "$as_me: WARNING: X11/SM/SMlib.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 14877
19650fd6 14878 ;;
c0d27fcc 14879esac
ca81d7a0
JD
14880{ echo "$as_me:$LINENO: checking for X11/SM/SMlib.h" >&5
14881echo $ECHO_N "checking for X11/SM/SMlib.h... $ECHO_C" >&6; }
c0d27fcc
MR
14882if test "${ac_cv_header_X11_SM_SMlib_h+set}" = set; then
14883 echo $ECHO_N "(cached) $ECHO_C" >&6
14884else
14885 ac_cv_header_X11_SM_SMlib_h=$ac_header_preproc
73b77ee5 14886fi
ca81d7a0
JD
14887{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_SM_SMlib_h" >&5
14888echo "${ECHO_T}$ac_cv_header_X11_SM_SMlib_h" >&6; }
c0d27fcc
MR
14889
14890fi
98418dba 14891if test $ac_cv_header_X11_SM_SMlib_h = yes; then
ca81d7a0
JD
14892 { echo "$as_me:$LINENO: checking for SmcOpenConnection in -lSM" >&5
14893echo $ECHO_N "checking for SmcOpenConnection in -lSM... $ECHO_C" >&6; }
98418dba 14894if test "${ac_cv_lib_SM_SmcOpenConnection+set}" = set; then
503d2be0 14895 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 14896else
503d2be0 14897 ac_check_lib_save_LIBS=$LIBS
1660500f 14898LIBS="-lSM -lICE $LIBS"
503d2be0 14899cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14900/* confdefs.h. */
14901_ACEOF
14902cat confdefs.h >>conftest.$ac_ext
14903cat >>conftest.$ac_ext <<_ACEOF
14904/* end confdefs.h. */
503d2be0 14905
ca81d7a0
JD
14906/* Override any GCC internal prototype to avoid an error.
14907 Use char because int might match the return type of a GCC
14908 builtin and then its argument prototype would still apply. */
503d2be0
AS
14909#ifdef __cplusplus
14910extern "C"
14911#endif
98418dba 14912char SmcOpenConnection ();
503d2be0
AS
14913int
14914main ()
14915{
ca81d7a0 14916return SmcOpenConnection ();
503d2be0
AS
14917 ;
14918 return 0;
14919}
14920_ACEOF
14921rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14922if { (ac_try="$ac_link"
14923case "(($ac_try" in
14924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14925 *) ac_try_echo=$ac_try;;
14926esac
14927eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14928 (eval "$ac_link") 2>conftest.er1
503d2be0 14929 ac_status=$?
edfaf76d
LK
14930 grep -v '^ *+' conftest.er1 >conftest.err
14931 rm -f conftest.er1
14932 cat conftest.err >&5
c0d27fcc 14933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
14934 (exit $ac_status); } && {
14935 test -z "$ac_c_werror_flag" ||
14936 test ! -s conftest.err
14937 } && test -s conftest$ac_exeext &&
14938 $as_test_x conftest$ac_exeext; then
98418dba 14939 ac_cv_lib_SM_SmcOpenConnection=yes
503d2be0
AS
14940else
14941 echo "$as_me: failed program was:" >&5
19650fd6
AS
14942sed 's/^/| /' conftest.$ac_ext >&5
14943
ca81d7a0 14944 ac_cv_lib_SM_SmcOpenConnection=no
503d2be0 14945fi
ca81d7a0 14946
f053c89f 14947rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 14948 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
14949LIBS=$ac_check_lib_save_LIBS
14950fi
ca81d7a0
JD
14951{ echo "$as_me:$LINENO: result: $ac_cv_lib_SM_SmcOpenConnection" >&5
14952echo "${ECHO_T}$ac_cv_lib_SM_SmcOpenConnection" >&6; }
98418dba
CW
14953if test $ac_cv_lib_SM_SmcOpenConnection = yes; then
14954 HAVE_X_SM=yes
73b77ee5
GM
14955fi
14956
73b77ee5 14957fi
73b77ee5 14958
c0d27fcc
MR
14959
14960
98418dba 14961 if test "${HAVE_X_SM}" = "yes"; then
b936fae4 14962
c0d27fcc 14963cat >>confdefs.h <<\_ACEOF
98418dba 14964#define HAVE_X_SM 1
c0d27fcc 14965_ACEOF
73b77ee5 14966
98418dba
CW
14967 case "$LIBS" in
14968 *-lSM*) ;;
14969 *) LIBS="-lSM -lICE $LIBS" ;;
14970 esac
73b77ee5 14971 fi
98418dba 14972fi
73b77ee5 14973
98418dba 14974# If netdb.h doesn't declare h_errno, we must declare it by hand.
ca81d7a0
JD
14975{ echo "$as_me:$LINENO: checking whether netdb declares h_errno" >&5
14976echo $ECHO_N "checking whether netdb declares h_errno... $ECHO_C" >&6; }
98418dba
CW
14977if test "${emacs_cv_netdb_declares_h_errno+set}" = set; then
14978 echo $ECHO_N "(cached) $ECHO_C" >&6
14979else
14980 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
14981/* confdefs.h. */
14982_ACEOF
14983cat confdefs.h >>conftest.$ac_ext
14984cat >>conftest.$ac_ext <<_ACEOF
14985/* end confdefs.h. */
98418dba 14986#include <netdb.h>
503d2be0
AS
14987int
14988main ()
14989{
98418dba 14990return h_errno;
503d2be0
AS
14991 ;
14992 return 0;
14993}
14994_ACEOF
14995rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
14996if { (ac_try="$ac_link"
14997case "(($ac_try" in
14998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14999 *) ac_try_echo=$ac_try;;
15000esac
15001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15002 (eval "$ac_link") 2>conftest.er1
503d2be0 15003 ac_status=$?
edfaf76d
LK
15004 grep -v '^ *+' conftest.er1 >conftest.err
15005 rm -f conftest.er1
15006 cat conftest.err >&5
c0d27fcc 15007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15008 (exit $ac_status); } && {
15009 test -z "$ac_c_werror_flag" ||
15010 test ! -s conftest.err
15011 } && test -s conftest$ac_exeext &&
15012 $as_test_x conftest$ac_exeext; then
98418dba 15013 emacs_cv_netdb_declares_h_errno=yes
73b77ee5 15014else
503d2be0 15015 echo "$as_me: failed program was:" >&5
19650fd6
AS
15016sed 's/^/| /' conftest.$ac_ext >&5
15017
ca81d7a0 15018 emacs_cv_netdb_declares_h_errno=no
73b77ee5 15019fi
ca81d7a0 15020
f053c89f 15021rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15022 conftest$ac_exeext conftest.$ac_ext
98418dba 15023fi
ca81d7a0
JD
15024{ echo "$as_me:$LINENO: result: $emacs_cv_netdb_declares_h_errno" >&5
15025echo "${ECHO_T}$emacs_cv_netdb_declares_h_errno" >&6; }
98418dba 15026if test $emacs_cv_netdb_declares_h_errno = yes; then
b936fae4 15027
c0d27fcc 15028cat >>confdefs.h <<\_ACEOF
98418dba 15029#define HAVE_H_ERRNO 1
c0d27fcc 15030_ACEOF
73b77ee5 15031
98418dba
CW
15032fi
15033
15034# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
15035# for constant arguments. Useless!
ca81d7a0
JD
15036{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
15037echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
98418dba
CW
15038if test "${ac_cv_working_alloca_h+set}" = set; then
15039 echo $ECHO_N "(cached) $ECHO_C" >&6
15040else
15041 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15042/* confdefs.h. */
15043_ACEOF
15044cat confdefs.h >>conftest.$ac_ext
15045cat >>conftest.$ac_ext <<_ACEOF
15046/* end confdefs.h. */
98418dba 15047#include <alloca.h>
503d2be0
AS
15048int
15049main ()
15050{
98418dba 15051char *p = (char *) alloca (2 * sizeof (int));
ca81d7a0 15052 if (p) return 0;
503d2be0
AS
15053 ;
15054 return 0;
15055}
15056_ACEOF
15057rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15058if { (ac_try="$ac_link"
15059case "(($ac_try" in
15060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15061 *) ac_try_echo=$ac_try;;
15062esac
15063eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15064 (eval "$ac_link") 2>conftest.er1
503d2be0 15065 ac_status=$?
edfaf76d
LK
15066 grep -v '^ *+' conftest.er1 >conftest.err
15067 rm -f conftest.er1
15068 cat conftest.err >&5
c0d27fcc 15069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15070 (exit $ac_status); } && {
15071 test -z "$ac_c_werror_flag" ||
15072 test ! -s conftest.err
15073 } && test -s conftest$ac_exeext &&
15074 $as_test_x conftest$ac_exeext; then
98418dba 15075 ac_cv_working_alloca_h=yes
73b77ee5 15076else
503d2be0 15077 echo "$as_me: failed program was:" >&5
19650fd6
AS
15078sed 's/^/| /' conftest.$ac_ext >&5
15079
ca81d7a0 15080 ac_cv_working_alloca_h=no
73b77ee5 15081fi
ca81d7a0 15082
f053c89f 15083rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15084 conftest$ac_exeext conftest.$ac_ext
98418dba 15085fi
ca81d7a0
JD
15086{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
15087echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
98418dba 15088if test $ac_cv_working_alloca_h = yes; then
73b77ee5 15089
c0d27fcc 15090cat >>confdefs.h <<\_ACEOF
98418dba 15091#define HAVE_ALLOCA_H 1
c0d27fcc 15092_ACEOF
98418dba
CW
15093
15094fi
15095
ca81d7a0
JD
15096{ echo "$as_me:$LINENO: checking for alloca" >&5
15097echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
98418dba
CW
15098if test "${ac_cv_func_alloca_works+set}" = set; then
15099 echo $ECHO_N "(cached) $ECHO_C" >&6
15100else
503d2be0 15101 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15102/* confdefs.h. */
15103_ACEOF
15104cat confdefs.h >>conftest.$ac_ext
15105cat >>conftest.$ac_ext <<_ACEOF
15106/* end confdefs.h. */
98418dba
CW
15107#ifdef __GNUC__
15108# define alloca __builtin_alloca
15109#else
15110# ifdef _MSC_VER
15111# include <malloc.h>
15112# define alloca _alloca
15113# else
f053c89f 15114# ifdef HAVE_ALLOCA_H
98418dba
CW
15115# include <alloca.h>
15116# else
15117# ifdef _AIX
15118 #pragma alloca
15119# else
15120# ifndef alloca /* predefined by HP cc +Olibcalls */
15121char *alloca ();
15122# endif
15123# endif
15124# endif
15125# endif
15126#endif
15127
503d2be0
AS
15128int
15129main ()
15130{
98418dba 15131char *p = (char *) alloca (1);
ca81d7a0 15132 if (p) return 0;
503d2be0
AS
15133 ;
15134 return 0;
15135}
15136_ACEOF
15137rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15138if { (ac_try="$ac_link"
15139case "(($ac_try" in
15140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15141 *) ac_try_echo=$ac_try;;
15142esac
15143eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15144 (eval "$ac_link") 2>conftest.er1
503d2be0 15145 ac_status=$?
edfaf76d
LK
15146 grep -v '^ *+' conftest.er1 >conftest.err
15147 rm -f conftest.er1
15148 cat conftest.err >&5
c0d27fcc 15149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15150 (exit $ac_status); } && {
15151 test -z "$ac_c_werror_flag" ||
15152 test ! -s conftest.err
15153 } && test -s conftest$ac_exeext &&
15154 $as_test_x conftest$ac_exeext; then
98418dba 15155 ac_cv_func_alloca_works=yes
ac95a621 15156else
503d2be0 15157 echo "$as_me: failed program was:" >&5
19650fd6
AS
15158sed 's/^/| /' conftest.$ac_ext >&5
15159
ca81d7a0 15160 ac_cv_func_alloca_works=no
ac95a621 15161fi
ca81d7a0 15162
f053c89f 15163rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15164 conftest$ac_exeext conftest.$ac_ext
98418dba 15165fi
ca81d7a0
JD
15166{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
15167echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
ac95a621 15168
98418dba
CW
15169if test $ac_cv_func_alloca_works = yes; then
15170
c0d27fcc 15171cat >>confdefs.h <<\_ACEOF
98418dba 15172#define HAVE_ALLOCA 1
c0d27fcc 15173_ACEOF
98418dba
CW
15174
15175else
15176 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
15177# that cause trouble. Some versions do not even contain alloca or
15178# contain a buggy version. If you still want to use their alloca,
15179# use ar to extract alloca.o from them instead of compiling alloca.c.
15180
ca81d7a0 15181ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
98418dba 15182
c0d27fcc 15183cat >>confdefs.h <<\_ACEOF
98418dba 15184#define C_ALLOCA 1
c0d27fcc 15185_ACEOF
98418dba 15186
c0d27fcc 15187
ca81d7a0
JD
15188{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
15189echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
98418dba
CW
15190if test "${ac_cv_os_cray+set}" = set; then
15191 echo $ECHO_N "(cached) $ECHO_C" >&6
15192else
15193 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15194/* confdefs.h. */
15195_ACEOF
15196cat confdefs.h >>conftest.$ac_ext
15197cat >>conftest.$ac_ext <<_ACEOF
15198/* end confdefs.h. */
ca81d7a0 15199#if defined CRAY && ! defined CRAY2
98418dba
CW
15200webecray
15201#else
15202wenotbecray
15203#endif
15204
15205_ACEOF
15206if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 15207 $EGREP "webecray" >/dev/null 2>&1; then
98418dba
CW
15208 ac_cv_os_cray=yes
15209else
15210 ac_cv_os_cray=no
15211fi
15212rm -f conftest*
ac95a621 15213
98418dba 15214fi
ca81d7a0
JD
15215{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
15216echo "${ECHO_T}$ac_cv_os_cray" >&6; }
98418dba
CW
15217if test $ac_cv_os_cray = yes; then
15218 for ac_func in _getb67 GETB67 getb67; do
15219 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15220{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15221echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15222if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15223 echo $ECHO_N "(cached) $ECHO_C" >&6
73b77ee5 15224else
503d2be0 15225 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15226/* confdefs.h. */
15227_ACEOF
15228cat confdefs.h >>conftest.$ac_ext
15229cat >>conftest.$ac_ext <<_ACEOF
15230/* end confdefs.h. */
edfaf76d
LK
15231/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15232 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15233#define $ac_func innocuous_$ac_func
15234
73b77ee5 15235/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15236 which can conflict with char $ac_func (); below.
15237 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15238 <limits.h> exists even on freestanding compilers. */
edfaf76d 15239
19650fd6
AS
15240#ifdef __STDC__
15241# include <limits.h>
15242#else
15243# include <assert.h>
15244#endif
edfaf76d
LK
15245
15246#undef $ac_func
15247
ca81d7a0
JD
15248/* Override any GCC internal prototype to avoid an error.
15249 Use char because int might match the return type of a GCC
15250 builtin and then its argument prototype would still apply. */
503d2be0
AS
15251#ifdef __cplusplus
15252extern "C"
15253#endif
503d2be0 15254char $ac_func ();
73b77ee5
GM
15255/* The GNU C library defines this for functions which it implements
15256 to always fail with ENOSYS. Some functions are actually named
15257 something starting with __ and the normal name is an alias. */
ca81d7a0 15258#if defined __stub_$ac_func || defined __stub___$ac_func
73b77ee5 15259choke me
73b77ee5
GM
15260#endif
15261
19650fd6
AS
15262int
15263main ()
15264{
ca81d7a0 15265return $ac_func ();
503d2be0
AS
15266 ;
15267 return 0;
15268}
15269_ACEOF
15270rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15271if { (ac_try="$ac_link"
15272case "(($ac_try" in
15273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15274 *) ac_try_echo=$ac_try;;
15275esac
15276eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15277 (eval "$ac_link") 2>conftest.er1
503d2be0 15278 ac_status=$?
edfaf76d
LK
15279 grep -v '^ *+' conftest.er1 >conftest.err
15280 rm -f conftest.er1
15281 cat conftest.err >&5
c0d27fcc 15282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15283 (exit $ac_status); } && {
15284 test -z "$ac_c_werror_flag" ||
15285 test ! -s conftest.err
15286 } && test -s conftest$ac_exeext &&
15287 $as_test_x conftest$ac_exeext; then
503d2be0
AS
15288 eval "$as_ac_var=yes"
15289else
15290 echo "$as_me: failed program was:" >&5
19650fd6
AS
15291sed 's/^/| /' conftest.$ac_ext >&5
15292
ca81d7a0 15293 eval "$as_ac_var=no"
503d2be0 15294fi
ca81d7a0 15295
f053c89f 15296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15297 conftest$ac_exeext conftest.$ac_ext
503d2be0 15298fi
ca81d7a0
JD
15299ac_res=`eval echo '${'$as_ac_var'}'`
15300 { echo "$as_me:$LINENO: result: $ac_res" >&5
15301echo "${ECHO_T}$ac_res" >&6; }
503d2be0 15302if test `eval echo '${'$as_ac_var'}'` = yes; then
73b77ee5 15303
c0d27fcc 15304cat >>confdefs.h <<_ACEOF
98418dba 15305#define CRAY_STACKSEG_END $ac_func
c0d27fcc 15306_ACEOF
98418dba
CW
15307
15308 break
73b77ee5 15309fi
73b77ee5 15310
98418dba 15311 done
73b77ee5
GM
15312fi
15313
ca81d7a0
JD
15314{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
15315echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
98418dba 15316if test "${ac_cv_c_stack_direction+set}" = set; then
503d2be0 15317 echo $ECHO_N "(cached) $ECHO_C" >&6
98418dba
CW
15318else
15319 if test "$cross_compiling" = yes; then
15320 ac_cv_c_stack_direction=0
73b77ee5 15321else
503d2be0 15322 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15323/* confdefs.h. */
15324_ACEOF
15325cat confdefs.h >>conftest.$ac_ext
15326cat >>conftest.$ac_ext <<_ACEOF
15327/* end confdefs.h. */
ca81d7a0 15328$ac_includes_default
503d2be0 15329int
98418dba 15330find_stack_direction ()
503d2be0 15331{
98418dba
CW
15332 static char *addr = 0;
15333 auto char dummy;
15334 if (addr == 0)
15335 {
15336 addr = &dummy;
15337 return find_stack_direction ();
15338 }
73b77ee5 15339 else
98418dba
CW
15340 return (&dummy > addr) ? 1 : -1;
15341}
ba4481b5 15342
503d2be0
AS
15343int
15344main ()
15345{
ca81d7a0 15346 return find_stack_direction () < 0;
503d2be0
AS
15347}
15348_ACEOF
98418dba 15349rm -f conftest$ac_exeext
ca81d7a0
JD
15350if { (ac_try="$ac_link"
15351case "(($ac_try" in
15352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15353 *) ac_try_echo=$ac_try;;
15354esac
15355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15356 (eval "$ac_link") 2>&5
503d2be0 15357 ac_status=$?
c0d27fcc 15358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 15359 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
15360 { (case "(($ac_try" in
15361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15362 *) ac_try_echo=$ac_try;;
15363esac
15364eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15365 (eval "$ac_try") 2>&5
503d2be0 15366 ac_status=$?
c0d27fcc 15367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 15368 (exit $ac_status); }; }; then
98418dba 15369 ac_cv_c_stack_direction=1
ba4481b5 15370else
98418dba
CW
15371 echo "$as_me: program exited with status $ac_status" >&5
15372echo "$as_me: failed program was:" >&5
19650fd6
AS
15373sed 's/^/| /' conftest.$ac_ext >&5
15374
c0d27fcc 15375( exit $ac_status )
98418dba 15376ac_cv_c_stack_direction=-1
ba4481b5 15377fi
ca81d7a0 15378rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 15379fi
ca81d7a0
JD
15380
15381
98418dba 15382fi
ca81d7a0
JD
15383{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
15384echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
98418dba 15385
c0d27fcc 15386cat >>confdefs.h <<_ACEOF
98418dba 15387#define STACK_DIRECTION $ac_cv_c_stack_direction
c0d27fcc
MR
15388_ACEOF
15389
ba4481b5 15390
ba4481b5
DL
15391fi
15392
c0d27fcc 15393
611adb3e
GM
15394if test x"$ac_cv_func_alloca_works" != xyes; then
15395 { { echo "$as_me:$LINENO: error: a system implementation of alloca is required " >&5
15396echo "$as_me: error: a system implementation of alloca is required " >&2;}
15397 { (exit 1); exit 1; }; }
15398fi
15399
98418dba
CW
15400# fmod, logb, and frexp are found in -lm on most systems.
15401# On HPUX 9.01, -lm does not contain logb, so check for sqrt.
15402
ca81d7a0
JD
15403{ echo "$as_me:$LINENO: checking for sqrt in -lm" >&5
15404echo $ECHO_N "checking for sqrt in -lm... $ECHO_C" >&6; }
98418dba 15405if test "${ac_cv_lib_m_sqrt+set}" = set; then
503d2be0 15406 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15407else
98418dba
CW
15408 ac_check_lib_save_LIBS=$LIBS
15409LIBS="-lm $LIBS"
15410cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15411/* confdefs.h. */
15412_ACEOF
15413cat confdefs.h >>conftest.$ac_ext
15414cat >>conftest.$ac_ext <<_ACEOF
15415/* end confdefs.h. */
ba4481b5 15416
ca81d7a0
JD
15417/* Override any GCC internal prototype to avoid an error.
15418 Use char because int might match the return type of a GCC
15419 builtin and then its argument prototype would still apply. */
98418dba
CW
15420#ifdef __cplusplus
15421extern "C"
15422#endif
98418dba 15423char sqrt ();
503d2be0
AS
15424int
15425main ()
15426{
ca81d7a0 15427return sqrt ();
503d2be0
AS
15428 ;
15429 return 0;
15430}
15431_ACEOF
15432rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15433if { (ac_try="$ac_link"
15434case "(($ac_try" in
15435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15436 *) ac_try_echo=$ac_try;;
15437esac
15438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15439 (eval "$ac_link") 2>conftest.er1
503d2be0 15440 ac_status=$?
edfaf76d
LK
15441 grep -v '^ *+' conftest.er1 >conftest.err
15442 rm -f conftest.er1
15443 cat conftest.err >&5
c0d27fcc 15444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15445 (exit $ac_status); } && {
15446 test -z "$ac_c_werror_flag" ||
15447 test ! -s conftest.err
15448 } && test -s conftest$ac_exeext &&
15449 $as_test_x conftest$ac_exeext; then
98418dba 15450 ac_cv_lib_m_sqrt=yes
ba4481b5 15451else
503d2be0 15452 echo "$as_me: failed program was:" >&5
19650fd6
AS
15453sed 's/^/| /' conftest.$ac_ext >&5
15454
ca81d7a0 15455 ac_cv_lib_m_sqrt=no
ba4481b5 15456fi
ca81d7a0 15457
f053c89f 15458rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15459 conftest$ac_exeext conftest.$ac_ext
98418dba 15460LIBS=$ac_check_lib_save_LIBS
ba4481b5 15461fi
ca81d7a0
JD
15462{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_sqrt" >&5
15463echo "${ECHO_T}$ac_cv_lib_m_sqrt" >&6; }
98418dba 15464if test $ac_cv_lib_m_sqrt = yes; then
c0d27fcc 15465 cat >>confdefs.h <<_ACEOF
98418dba 15466#define HAVE_LIBM 1
c0d27fcc 15467_ACEOF
98418dba
CW
15468
15469 LIBS="-lm $LIBS"
ba4481b5 15470
ba4481b5
DL
15471fi
15472
c0d27fcc 15473
55597d70
DL
15474# Check for mail-locking functions in a "mail" library. Probably this should
15475# have the same check as for liblockfile below.
98418dba 15476
ca81d7a0
JD
15477{ echo "$as_me:$LINENO: checking for maillock in -lmail" >&5
15478echo $ECHO_N "checking for maillock in -lmail... $ECHO_C" >&6; }
98418dba 15479if test "${ac_cv_lib_mail_maillock+set}" = set; then
503d2be0 15480 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15481else
98418dba
CW
15482 ac_check_lib_save_LIBS=$LIBS
15483LIBS="-lmail $LIBS"
15484cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15485/* confdefs.h. */
15486_ACEOF
15487cat confdefs.h >>conftest.$ac_ext
15488cat >>conftest.$ac_ext <<_ACEOF
15489/* end confdefs.h. */
98418dba 15490
ca81d7a0
JD
15491/* Override any GCC internal prototype to avoid an error.
15492 Use char because int might match the return type of a GCC
15493 builtin and then its argument prototype would still apply. */
98418dba
CW
15494#ifdef __cplusplus
15495extern "C"
15496#endif
98418dba 15497char maillock ();
503d2be0
AS
15498int
15499main ()
15500{
ca81d7a0 15501return maillock ();
503d2be0
AS
15502 ;
15503 return 0;
15504}
15505_ACEOF
15506rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15507if { (ac_try="$ac_link"
15508case "(($ac_try" in
15509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15510 *) ac_try_echo=$ac_try;;
15511esac
15512eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15513 (eval "$ac_link") 2>conftest.er1
503d2be0 15514 ac_status=$?
edfaf76d
LK
15515 grep -v '^ *+' conftest.er1 >conftest.err
15516 rm -f conftest.er1
15517 cat conftest.err >&5
c0d27fcc 15518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15519 (exit $ac_status); } && {
15520 test -z "$ac_c_werror_flag" ||
15521 test ! -s conftest.err
15522 } && test -s conftest$ac_exeext &&
15523 $as_test_x conftest$ac_exeext; then
98418dba 15524 ac_cv_lib_mail_maillock=yes
ba4481b5 15525else
503d2be0 15526 echo "$as_me: failed program was:" >&5
19650fd6
AS
15527sed 's/^/| /' conftest.$ac_ext >&5
15528
ca81d7a0 15529 ac_cv_lib_mail_maillock=no
ba4481b5 15530fi
ca81d7a0 15531
f053c89f 15532rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15533 conftest$ac_exeext conftest.$ac_ext
98418dba 15534LIBS=$ac_check_lib_save_LIBS
ba4481b5 15535fi
ca81d7a0
JD
15536{ echo "$as_me:$LINENO: result: $ac_cv_lib_mail_maillock" >&5
15537echo "${ECHO_T}$ac_cv_lib_mail_maillock" >&6; }
98418dba 15538if test $ac_cv_lib_mail_maillock = yes; then
c0d27fcc 15539 cat >>confdefs.h <<_ACEOF
98418dba 15540#define HAVE_LIBMAIL 1
c0d27fcc 15541_ACEOF
ba4481b5 15542
98418dba 15543 LIBS="-lmail $LIBS"
ba4481b5 15544
98418dba 15545fi
ba4481b5 15546
c0d27fcc 15547
ca81d7a0
JD
15548{ echo "$as_me:$LINENO: checking for maillock in -llockfile" >&5
15549echo $ECHO_N "checking for maillock in -llockfile... $ECHO_C" >&6; }
98418dba 15550if test "${ac_cv_lib_lockfile_maillock+set}" = set; then
503d2be0 15551 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15552else
503d2be0 15553 ac_check_lib_save_LIBS=$LIBS
98418dba 15554LIBS="-llockfile $LIBS"
503d2be0 15555cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15556/* confdefs.h. */
15557_ACEOF
15558cat confdefs.h >>conftest.$ac_ext
15559cat >>conftest.$ac_ext <<_ACEOF
15560/* end confdefs.h. */
503d2be0 15561
ca81d7a0
JD
15562/* Override any GCC internal prototype to avoid an error.
15563 Use char because int might match the return type of a GCC
15564 builtin and then its argument prototype would still apply. */
503d2be0
AS
15565#ifdef __cplusplus
15566extern "C"
15567#endif
98418dba 15568char maillock ();
503d2be0
AS
15569int
15570main ()
15571{
ca81d7a0 15572return maillock ();
503d2be0
AS
15573 ;
15574 return 0;
15575}
15576_ACEOF
15577rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15578if { (ac_try="$ac_link"
15579case "(($ac_try" in
15580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15581 *) ac_try_echo=$ac_try;;
15582esac
15583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15584 (eval "$ac_link") 2>conftest.er1
503d2be0 15585 ac_status=$?
edfaf76d
LK
15586 grep -v '^ *+' conftest.er1 >conftest.err
15587 rm -f conftest.er1
15588 cat conftest.err >&5
c0d27fcc 15589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15590 (exit $ac_status); } && {
15591 test -z "$ac_c_werror_flag" ||
15592 test ! -s conftest.err
15593 } && test -s conftest$ac_exeext &&
15594 $as_test_x conftest$ac_exeext; then
98418dba 15595 ac_cv_lib_lockfile_maillock=yes
503d2be0
AS
15596else
15597 echo "$as_me: failed program was:" >&5
19650fd6
AS
15598sed 's/^/| /' conftest.$ac_ext >&5
15599
ca81d7a0 15600 ac_cv_lib_lockfile_maillock=no
98418dba 15601fi
ca81d7a0 15602
f053c89f 15603rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15604 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
15605LIBS=$ac_check_lib_save_LIBS
15606fi
ca81d7a0
JD
15607{ echo "$as_me:$LINENO: result: $ac_cv_lib_lockfile_maillock" >&5
15608echo "${ECHO_T}$ac_cv_lib_lockfile_maillock" >&6; }
98418dba 15609if test $ac_cv_lib_lockfile_maillock = yes; then
c0d27fcc 15610 cat >>confdefs.h <<_ACEOF
98418dba 15611#define HAVE_LIBLOCKFILE 1
c0d27fcc 15612_ACEOF
98418dba
CW
15613
15614 LIBS="-llockfile $LIBS"
15615
15616fi
15617
15618# If we have the shared liblockfile, assume we must use it for mail
15619# locking (e.g. Debian). If we couldn't link against liblockfile
15620# (no liblockfile.a installed), ensure that we don't need to.
15621if test "$ac_cv_lib_lockfile_maillock" = no; then
15622 # Extract the first word of "liblockfile.so", so it can be a program name with args.
15623set dummy liblockfile.so; ac_word=$2
ca81d7a0
JD
15624{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15625echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
98418dba
CW
15626if test "${ac_cv_prog_liblockfile+set}" = set; then
15627 echo $ECHO_N "(cached) $ECHO_C" >&6
15628else
15629 if test -n "$liblockfile"; then
15630 ac_cv_prog_liblockfile="$liblockfile" # Let the user override the test.
15631else
c0d27fcc 15632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6bae0ccf
DL
15633as_dummy="/usr/lib:/lib:/usr/local/lib:$LD_LIBRARY_PATH"
15634for as_dir in $as_dummy
c0d27fcc
MR
15635do
15636 IFS=$as_save_IFS
15637 test -z "$as_dir" && as_dir=.
15638 for ac_exec_ext in '' $ac_executable_extensions; do
f053c89f 15639 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
c0d27fcc
MR
15640 ac_cv_prog_liblockfile="yes"
15641 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15642 break 2
15643 fi
15644done
98418dba 15645done
ca81d7a0 15646IFS=$as_save_IFS
98418dba
CW
15647
15648 test -z "$ac_cv_prog_liblockfile" && ac_cv_prog_liblockfile="no"
503d2be0 15649fi
503d2be0 15650fi
98418dba
CW
15651liblockfile=$ac_cv_prog_liblockfile
15652if test -n "$liblockfile"; then
ca81d7a0
JD
15653 { echo "$as_me:$LINENO: result: $liblockfile" >&5
15654echo "${ECHO_T}$liblockfile" >&6; }
98418dba 15655else
ca81d7a0
JD
15656 { echo "$as_me:$LINENO: result: no" >&5
15657echo "${ECHO_T}no" >&6; }
ba4481b5
DL
15658fi
15659
ca81d7a0 15660
98418dba 15661 if test $ac_cv_prog_liblockfile = yes; then
c0d27fcc 15662 { { echo "$as_me:$LINENO: error: Shared liblockfile found but can't link against it.
98418dba
CW
15663This probably means that movemail could lose mail.
15664There may be a \`development' package to install containing liblockfile." >&5
15665echo "$as_me: error: Shared liblockfile found but can't link against it.
15666This probably means that movemail could lose mail.
15667There may be a \`development' package to install containing liblockfile." >&2;}
15668 { (exit 1); exit 1; }; }
98418dba 15669 else :
55597d70 15670 fi
98418dba 15671fi
503d2be0 15672
98418dba
CW
15673for ac_func in touchlock
15674do
15675as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15676{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15677echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15678if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15679 echo $ECHO_N "(cached) $ECHO_C" >&6
457b792c 15680else
98418dba 15681 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15682/* confdefs.h. */
15683_ACEOF
15684cat confdefs.h >>conftest.$ac_ext
15685cat >>conftest.$ac_ext <<_ACEOF
15686/* end confdefs.h. */
edfaf76d
LK
15687/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15688 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15689#define $ac_func innocuous_$ac_func
15690
98418dba 15691/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
15692 which can conflict with char $ac_func (); below.
15693 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15694 <limits.h> exists even on freestanding compilers. */
edfaf76d 15695
19650fd6
AS
15696#ifdef __STDC__
15697# include <limits.h>
15698#else
15699# include <assert.h>
15700#endif
edfaf76d
LK
15701
15702#undef $ac_func
15703
ca81d7a0
JD
15704/* Override any GCC internal prototype to avoid an error.
15705 Use char because int might match the return type of a GCC
15706 builtin and then its argument prototype would still apply. */
503d2be0
AS
15707#ifdef __cplusplus
15708extern "C"
15709#endif
98418dba 15710char $ac_func ();
98418dba
CW
15711/* The GNU C library defines this for functions which it implements
15712 to always fail with ENOSYS. Some functions are actually named
15713 something starting with __ and the normal name is an alias. */
ca81d7a0 15714#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 15715choke me
cd958eb3
MB
15716#endif
15717
19650fd6
AS
15718int
15719main ()
15720{
ca81d7a0 15721return $ac_func ();
503d2be0
AS
15722 ;
15723 return 0;
15724}
15725_ACEOF
15726rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
15727if { (ac_try="$ac_link"
15728case "(($ac_try" in
15729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15730 *) ac_try_echo=$ac_try;;
15731esac
15732eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15733 (eval "$ac_link") 2>conftest.er1
503d2be0 15734 ac_status=$?
edfaf76d
LK
15735 grep -v '^ *+' conftest.er1 >conftest.err
15736 rm -f conftest.er1
15737 cat conftest.err >&5
c0d27fcc 15738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15739 (exit $ac_status); } && {
15740 test -z "$ac_c_werror_flag" ||
15741 test ! -s conftest.err
15742 } && test -s conftest$ac_exeext &&
15743 $as_test_x conftest$ac_exeext; then
98418dba 15744 eval "$as_ac_var=yes"
503d2be0
AS
15745else
15746 echo "$as_me: failed program was:" >&5
19650fd6
AS
15747sed 's/^/| /' conftest.$ac_ext >&5
15748
ca81d7a0 15749 eval "$as_ac_var=no"
503d2be0 15750fi
ca81d7a0 15751
f053c89f 15752rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 15753 conftest$ac_exeext conftest.$ac_ext
503d2be0 15754fi
ca81d7a0
JD
15755ac_res=`eval echo '${'$as_ac_var'}'`
15756 { echo "$as_me:$LINENO: result: $ac_res" >&5
15757echo "${ECHO_T}$ac_res" >&6; }
98418dba 15758if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 15759 cat >>confdefs.h <<_ACEOF
98418dba 15760#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 15761_ACEOF
457b792c 15762
457b792c 15763fi
98418dba 15764done
457b792c 15765
c0d27fcc 15766
98418dba
CW
15767for ac_header in maillock.h
15768do
15769as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
15770if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
15771 { echo "$as_me:$LINENO: checking for $ac_header" >&5
15772echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15773if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15774 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 15775fi
ca81d7a0
JD
15776ac_res=`eval echo '${'$as_ac_Header'}'`
15777 { echo "$as_me:$LINENO: result: $ac_res" >&5
15778echo "${ECHO_T}$ac_res" >&6; }
ba4481b5 15779else
c0d27fcc 15780 # Is the header compilable?
ca81d7a0
JD
15781{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
15782echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 15783cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15784/* confdefs.h. */
15785_ACEOF
15786cat confdefs.h >>conftest.$ac_ext
15787cat >>conftest.$ac_ext <<_ACEOF
15788/* end confdefs.h. */
c0d27fcc
MR
15789$ac_includes_default
15790#include <$ac_header>
15791_ACEOF
15792rm -f conftest.$ac_objext
ca81d7a0
JD
15793if { (ac_try="$ac_compile"
15794case "(($ac_try" in
15795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15796 *) ac_try_echo=$ac_try;;
15797esac
15798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15799 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 15800 ac_status=$?
edfaf76d
LK
15801 grep -v '^ *+' conftest.er1 >conftest.err
15802 rm -f conftest.er1
15803 cat conftest.err >&5
c0d27fcc 15804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15805 (exit $ac_status); } && {
15806 test -z "$ac_c_werror_flag" ||
15807 test ! -s conftest.err
15808 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
15809 ac_header_compiler=yes
15810else
15811 echo "$as_me: failed program was:" >&5
19650fd6
AS
15812sed 's/^/| /' conftest.$ac_ext >&5
15813
ca81d7a0 15814 ac_header_compiler=no
c0d27fcc 15815fi
ca81d7a0
JD
15816
15817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15818{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15819echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
15820
15821# Is the header present?
ca81d7a0
JD
15822{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
15823echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 15824cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15825/* confdefs.h. */
15826_ACEOF
15827cat confdefs.h >>conftest.$ac_ext
15828cat >>conftest.$ac_ext <<_ACEOF
15829/* end confdefs.h. */
98418dba 15830#include <$ac_header>
503d2be0 15831_ACEOF
ca81d7a0
JD
15832if { (ac_try="$ac_cpp conftest.$ac_ext"
15833case "(($ac_try" in
15834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15835 *) ac_try_echo=$ac_try;;
15836esac
15837eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15838 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 15839 ac_status=$?
6bae0ccf 15840 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
15841 rm -f conftest.er1
15842 cat conftest.err >&5
c0d27fcc 15843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
15844 (exit $ac_status); } >/dev/null && {
15845 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15846 test ! -s conftest.err
15847 }; then
c0d27fcc 15848 ac_header_preproc=yes
98418dba
CW
15849else
15850 echo "$as_me: failed program was:" >&5
19650fd6
AS
15851sed 's/^/| /' conftest.$ac_ext >&5
15852
c0d27fcc 15853 ac_header_preproc=no
503d2be0 15854fi
ca81d7a0 15855
98418dba 15856rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
15857{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15858echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
15859
15860# So? What about this header?
edfaf76d
LK
15861case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15862 yes:no: )
c0d27fcc
MR
15863 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
15864echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
15865 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
15866echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
15867 ac_header_preproc=yes
19650fd6 15868 ;;
edfaf76d 15869 no:yes:* )
c0d27fcc
MR
15870 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
15871echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
15872 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
15873echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
15874 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
15875echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
15876 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
15877echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 15878 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 15879echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
15880 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
15881echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 15882
19650fd6 15883 ;;
c0d27fcc 15884esac
ca81d7a0
JD
15885{ echo "$as_me:$LINENO: checking for $ac_header" >&5
15886echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
15887if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
15888 echo $ECHO_N "(cached) $ECHO_C" >&6
15889else
edfaf76d 15890 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 15891fi
ca81d7a0
JD
15892ac_res=`eval echo '${'$as_ac_Header'}'`
15893 { echo "$as_me:$LINENO: result: $ac_res" >&5
15894echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
15895
15896fi
98418dba 15897if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 15898 cat >>confdefs.h <<_ACEOF
98418dba 15899#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 15900_ACEOF
48d4b120 15901
ba4481b5 15902fi
c0d27fcc 15903
98418dba
CW
15904done
15905
c0d27fcc
MR
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
22044edf
DL
15961
15962
c0d27fcc 15963
b0e44248
RB
15964
15965
973a76b1
DL
15966
15967
15968
cd958eb3 15969
25ca0bca 15970
ea92fc9f 15971
e2fcf543 15972
c0d27fcc
MR
15973
15974
98418dba 15975for ac_func in gethostname getdomainname dup2 \
e2fcf543 15976rename closedir mkdir rmdir sysinfo getrusage get_current_dir_name \
bc3512d0 15977random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime setsid \
98418dba 15978strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
973a76b1 15979utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
98418dba
CW
15980__fpending mblen mbrlen mbsinit strsignal setitimer ualarm index rindex \
15981sendto recvfrom getsockopt setsockopt getsockname getpeername \
190956b3 15982gai_strerror mkstemp getline getdelim mremap memmove fsync sync bzero \
4489ece2 15983memset memcmp difftime memcpy mempcpy mblen mbrlen posix_memalign
98418dba
CW
15984do
15985as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
15986{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15987echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15988if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 15989 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 15990else
503d2be0 15991 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
15992/* confdefs.h. */
15993_ACEOF
15994cat confdefs.h >>conftest.$ac_ext
15995cat >>conftest.$ac_ext <<_ACEOF
15996/* end confdefs.h. */
edfaf76d
LK
15997/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15998 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15999#define $ac_func innocuous_$ac_func
16000
98418dba 16001/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16002 which can conflict with char $ac_func (); below.
16003 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16004 <limits.h> exists even on freestanding compilers. */
edfaf76d 16005
19650fd6
AS
16006#ifdef __STDC__
16007# include <limits.h>
16008#else
16009# include <assert.h>
16010#endif
edfaf76d
LK
16011
16012#undef $ac_func
16013
ca81d7a0
JD
16014/* Override any GCC internal prototype to avoid an error.
16015 Use char because int might match the return type of a GCC
16016 builtin and then its argument prototype would still apply. */
503d2be0
AS
16017#ifdef __cplusplus
16018extern "C"
16019#endif
98418dba 16020char $ac_func ();
98418dba
CW
16021/* The GNU C library defines this for functions which it implements
16022 to always fail with ENOSYS. Some functions are actually named
16023 something starting with __ and the normal name is an alias. */
ca81d7a0 16024#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16025choke me
98418dba
CW
16026#endif
16027
19650fd6
AS
16028int
16029main ()
16030{
ca81d7a0 16031return $ac_func ();
503d2be0
AS
16032 ;
16033 return 0;
16034}
16035_ACEOF
16036rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16037if { (ac_try="$ac_link"
16038case "(($ac_try" in
16039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16040 *) ac_try_echo=$ac_try;;
16041esac
16042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16043 (eval "$ac_link") 2>conftest.er1
503d2be0 16044 ac_status=$?
edfaf76d
LK
16045 grep -v '^ *+' conftest.er1 >conftest.err
16046 rm -f conftest.er1
16047 cat conftest.err >&5
c0d27fcc 16048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16049 (exit $ac_status); } && {
16050 test -z "$ac_c_werror_flag" ||
16051 test ! -s conftest.err
16052 } && test -s conftest$ac_exeext &&
16053 $as_test_x conftest$ac_exeext; then
98418dba 16054 eval "$as_ac_var=yes"
503d2be0
AS
16055else
16056 echo "$as_me: failed program was:" >&5
19650fd6
AS
16057sed 's/^/| /' conftest.$ac_ext >&5
16058
ca81d7a0 16059 eval "$as_ac_var=no"
503d2be0 16060fi
ca81d7a0 16061
f053c89f 16062rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16063 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16064fi
ca81d7a0
JD
16065ac_res=`eval echo '${'$as_ac_var'}'`
16066 { echo "$as_me:$LINENO: result: $ac_res" >&5
16067echo "${ECHO_T}$ac_res" >&6; }
98418dba 16068if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16069 cat >>confdefs.h <<_ACEOF
98418dba 16070#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16071_ACEOF
ba4481b5 16072
ba4481b5 16073fi
98418dba 16074done
ba4481b5 16075
c0d27fcc
MR
16076
16077
98418dba
CW
16078for ac_header in sys/un.h
16079do
16080as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16081if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16082 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16083echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16084if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
98418dba 16085 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16086fi
ca81d7a0
JD
16087ac_res=`eval echo '${'$as_ac_Header'}'`
16088 { echo "$as_me:$LINENO: result: $ac_res" >&5
16089echo "${ECHO_T}$ac_res" >&6; }
98418dba 16090else
c0d27fcc 16091 # Is the header compilable?
ca81d7a0
JD
16092{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16093echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16094cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16095/* confdefs.h. */
16096_ACEOF
16097cat confdefs.h >>conftest.$ac_ext
16098cat >>conftest.$ac_ext <<_ACEOF
16099/* end confdefs.h. */
c0d27fcc
MR
16100$ac_includes_default
16101#include <$ac_header>
16102_ACEOF
16103rm -f conftest.$ac_objext
ca81d7a0
JD
16104if { (ac_try="$ac_compile"
16105case "(($ac_try" in
16106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16107 *) ac_try_echo=$ac_try;;
16108esac
16109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16110 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16111 ac_status=$?
edfaf76d
LK
16112 grep -v '^ *+' conftest.er1 >conftest.err
16113 rm -f conftest.er1
16114 cat conftest.err >&5
c0d27fcc 16115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
16116 (exit $ac_status); } && {
16117 test -z "$ac_c_werror_flag" ||
16118 test ! -s conftest.err
16119 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16120 ac_header_compiler=yes
16121else
16122 echo "$as_me: failed program was:" >&5
19650fd6
AS
16123sed 's/^/| /' conftest.$ac_ext >&5
16124
ca81d7a0 16125 ac_header_compiler=no
c0d27fcc 16126fi
ca81d7a0
JD
16127
16128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16129{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16130echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16131
16132# Is the header present?
ca81d7a0
JD
16133{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16134echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16135cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16136/* confdefs.h. */
16137_ACEOF
16138cat confdefs.h >>conftest.$ac_ext
16139cat >>conftest.$ac_ext <<_ACEOF
16140/* end confdefs.h. */
98418dba 16141#include <$ac_header>
503d2be0 16142_ACEOF
ca81d7a0
JD
16143if { (ac_try="$ac_cpp conftest.$ac_ext"
16144case "(($ac_try" in
16145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16146 *) ac_try_echo=$ac_try;;
16147esac
16148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16149 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16150 ac_status=$?
6bae0ccf 16151 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
16152 rm -f conftest.er1
16153 cat conftest.err >&5
c0d27fcc 16154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16155 (exit $ac_status); } >/dev/null && {
16156 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16157 test ! -s conftest.err
16158 }; then
c0d27fcc 16159 ac_header_preproc=yes
ba4481b5 16160else
503d2be0 16161 echo "$as_me: failed program was:" >&5
19650fd6
AS
16162sed 's/^/| /' conftest.$ac_ext >&5
16163
c0d27fcc 16164 ac_header_preproc=no
ba4481b5 16165fi
ca81d7a0 16166
503d2be0 16167rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16168{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16169echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16170
16171# So? What about this header?
edfaf76d
LK
16172case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16173 yes:no: )
c0d27fcc
MR
16174 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16175echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16176 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16177echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16178 ac_header_preproc=yes
19650fd6 16179 ;;
edfaf76d 16180 no:yes:* )
c0d27fcc
MR
16181 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16182echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16183 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16184echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16185 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16186echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16187 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16188echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16189 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16190echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16191 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16192echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16193
19650fd6 16194 ;;
c0d27fcc 16195esac
ca81d7a0
JD
16196{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16197echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16198if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16199 echo $ECHO_N "(cached) $ECHO_C" >&6
16200else
edfaf76d 16201 eval "$as_ac_Header=\$ac_header_preproc"
ba4481b5 16202fi
ca81d7a0
JD
16203ac_res=`eval echo '${'$as_ac_Header'}'`
16204 { echo "$as_me:$LINENO: result: $ac_res" >&5
16205echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16206
16207fi
925c2f3f 16208if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16209 cat >>confdefs.h <<_ACEOF
925c2f3f 16210#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16211_ACEOF
503d2be0 16212
925c2f3f 16213fi
c0d27fcc 16214
925c2f3f
EZ
16215done
16216
c0d27fcc
MR
16217
16218
16219
edfaf76d 16220
f053c89f
CY
16221
16222for ac_header in $ac_header_list
925c2f3f
EZ
16223do
16224as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
16225if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
16226 { echo "$as_me:$LINENO: checking for $ac_header" >&5
16227echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16228if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 16229 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 16230fi
ca81d7a0
JD
16231ac_res=`eval echo '${'$as_ac_Header'}'`
16232 { echo "$as_me:$LINENO: result: $ac_res" >&5
16233echo "${ECHO_T}$ac_res" >&6; }
925c2f3f 16234else
c0d27fcc 16235 # Is the header compilable?
ca81d7a0
JD
16236{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
16237echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 16238cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16239/* confdefs.h. */
16240_ACEOF
16241cat confdefs.h >>conftest.$ac_ext
16242cat >>conftest.$ac_ext <<_ACEOF
16243/* end confdefs.h. */
c0d27fcc
MR
16244$ac_includes_default
16245#include <$ac_header>
16246_ACEOF
16247rm -f conftest.$ac_objext
ca81d7a0
JD
16248if { (ac_try="$ac_compile"
16249case "(($ac_try" in
16250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16251 *) ac_try_echo=$ac_try;;
16252esac
16253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16254 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 16255 ac_status=$?
edfaf76d
LK
16256 grep -v '^ *+' conftest.er1 >conftest.err
16257 rm -f conftest.er1
16258 cat conftest.err >&5
c0d27fcc 16259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16260 (exit $ac_status); } && {
16261 test -z "$ac_c_werror_flag" ||
16262 test ! -s conftest.err
16263 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
16264 ac_header_compiler=yes
16265else
16266 echo "$as_me: failed program was:" >&5
19650fd6
AS
16267sed 's/^/| /' conftest.$ac_ext >&5
16268
ca81d7a0 16269 ac_header_compiler=no
c0d27fcc 16270fi
ca81d7a0
JD
16271
16272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16273{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16274echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
16275
16276# Is the header present?
ca81d7a0
JD
16277{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
16278echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 16279cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16280/* confdefs.h. */
16281_ACEOF
16282cat confdefs.h >>conftest.$ac_ext
16283cat >>conftest.$ac_ext <<_ACEOF
16284/* end confdefs.h. */
98418dba 16285#include <$ac_header>
503d2be0 16286_ACEOF
ca81d7a0
JD
16287if { (ac_try="$ac_cpp conftest.$ac_ext"
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_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 16294 ac_status=$?
6bae0ccf 16295 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
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); } >/dev/null && {
16300 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16301 test ! -s conftest.err
16302 }; then
c0d27fcc 16303 ac_header_preproc=yes
98418dba
CW
16304else
16305 echo "$as_me: failed program was:" >&5
19650fd6
AS
16306sed 's/^/| /' conftest.$ac_ext >&5
16307
c0d27fcc 16308 ac_header_preproc=no
98418dba 16309fi
ca81d7a0 16310
98418dba 16311rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
16312{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16313echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
16314
16315# So? What about this header?
edfaf76d
LK
16316case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16317 yes:no: )
c0d27fcc
MR
16318 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
16319echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
16320 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
16321echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
16322 ac_header_preproc=yes
19650fd6 16323 ;;
edfaf76d 16324 no:yes:* )
c0d27fcc
MR
16325 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
16326echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
16327 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
16328echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
16329 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
16330echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
16331 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
16332echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 16333 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 16334echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
16335 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
16336echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 16337
19650fd6 16338 ;;
c0d27fcc 16339esac
ca81d7a0
JD
16340{ echo "$as_me:$LINENO: checking for $ac_header" >&5
16341echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
16342if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
16343 echo $ECHO_N "(cached) $ECHO_C" >&6
16344else
edfaf76d 16345 eval "$as_ac_Header=\$ac_header_preproc"
ffe36136 16346fi
ca81d7a0
JD
16347ac_res=`eval echo '${'$as_ac_Header'}'`
16348 { echo "$as_me:$LINENO: result: $ac_res" >&5
16349echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
16350
16351fi
98418dba 16352if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 16353 cat >>confdefs.h <<_ACEOF
98418dba 16354#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 16355_ACEOF
98418dba
CW
16356
16357fi
c0d27fcc 16358
98418dba
CW
16359done
16360
c0d27fcc 16361
f053c89f
CY
16362
16363
16364
16365
16366
16367
16368
16369for ac_func in $ac_func_list
98418dba
CW
16370do
16371as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16372{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16373echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16374if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16375 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16376else
98418dba 16377 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16378/* confdefs.h. */
16379_ACEOF
16380cat confdefs.h >>conftest.$ac_ext
16381cat >>conftest.$ac_ext <<_ACEOF
16382/* end confdefs.h. */
edfaf76d
LK
16383/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16384 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16385#define $ac_func innocuous_$ac_func
16386
98418dba 16387/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16388 which can conflict with char $ac_func (); below.
16389 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16390 <limits.h> exists even on freestanding compilers. */
edfaf76d 16391
19650fd6
AS
16392#ifdef __STDC__
16393# include <limits.h>
16394#else
16395# include <assert.h>
16396#endif
edfaf76d
LK
16397
16398#undef $ac_func
16399
ca81d7a0
JD
16400/* Override any GCC internal prototype to avoid an error.
16401 Use char because int might match the return type of a GCC
16402 builtin and then its argument prototype would still apply. */
503d2be0
AS
16403#ifdef __cplusplus
16404extern "C"
16405#endif
98418dba 16406char $ac_func ();
98418dba
CW
16407/* The GNU C library defines this for functions which it implements
16408 to always fail with ENOSYS. Some functions are actually named
16409 something starting with __ and the normal name is an alias. */
ca81d7a0 16410#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16411choke me
98418dba
CW
16412#endif
16413
19650fd6
AS
16414int
16415main ()
16416{
ca81d7a0 16417return $ac_func ();
503d2be0
AS
16418 ;
16419 return 0;
16420}
16421_ACEOF
16422rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16423if { (ac_try="$ac_link"
16424case "(($ac_try" in
16425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16426 *) ac_try_echo=$ac_try;;
16427esac
16428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16429 (eval "$ac_link") 2>conftest.er1
503d2be0 16430 ac_status=$?
edfaf76d
LK
16431 grep -v '^ *+' conftest.er1 >conftest.err
16432 rm -f conftest.er1
16433 cat conftest.err >&5
c0d27fcc 16434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16435 (exit $ac_status); } && {
16436 test -z "$ac_c_werror_flag" ||
16437 test ! -s conftest.err
16438 } && test -s conftest$ac_exeext &&
16439 $as_test_x conftest$ac_exeext; then
98418dba 16440 eval "$as_ac_var=yes"
503d2be0
AS
16441else
16442 echo "$as_me: failed program was:" >&5
19650fd6
AS
16443sed 's/^/| /' conftest.$ac_ext >&5
16444
ca81d7a0 16445 eval "$as_ac_var=no"
503d2be0 16446fi
ca81d7a0 16447
f053c89f 16448rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16449 conftest$ac_exeext conftest.$ac_ext
ffe36136 16450fi
ca81d7a0
JD
16451ac_res=`eval echo '${'$as_ac_var'}'`
16452 { echo "$as_me:$LINENO: result: $ac_res" >&5
16453echo "${ECHO_T}$ac_res" >&6; }
98418dba 16454if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16455 cat >>confdefs.h <<_ACEOF
98418dba 16456#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16457_ACEOF
ffe36136 16458
ba4481b5 16459fi
98418dba 16460done
ba4481b5 16461
f053c89f
CY
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
ca81d7a0
JD
16478{ echo "$as_me:$LINENO: checking for working mktime" >&5
16479echo $ECHO_N "checking for working mktime... $ECHO_C" >&6; }
98418dba
CW
16480if test "${ac_cv_func_working_mktime+set}" = set; then
16481 echo $ECHO_N "(cached) $ECHO_C" >&6
16482else
16483 if test "$cross_compiling" = yes; then
16484 ac_cv_func_working_mktime=no
16485else
16486 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16487/* confdefs.h. */
16488_ACEOF
16489cat confdefs.h >>conftest.$ac_ext
16490cat >>conftest.$ac_ext <<_ACEOF
16491/* end confdefs.h. */
98418dba 16492/* Test program from Paul Eggert and Tony Leneis. */
f053c89f 16493#ifdef TIME_WITH_SYS_TIME
98418dba
CW
16494# include <sys/time.h>
16495# include <time.h>
16496#else
f053c89f 16497# ifdef HAVE_SYS_TIME_H
98418dba
CW
16498# include <sys/time.h>
16499# else
16500# include <time.h>
16501# endif
16502#endif
ba4481b5 16503
f053c89f 16504#include <stdlib.h>
edfaf76d 16505
f053c89f 16506#ifdef HAVE_UNISTD_H
98418dba
CW
16507# include <unistd.h>
16508#endif
ba4481b5 16509
f053c89f 16510#ifndef HAVE_ALARM
98418dba
CW
16511# define alarm(X) /* empty */
16512#endif
df645f7c 16513
98418dba
CW
16514/* Work around redefinition to rpl_putenv by other config tests. */
16515#undef putenv
df645f7c 16516
98418dba 16517static time_t time_t_max;
edfaf76d 16518static time_t time_t_min;
df645f7c 16519
98418dba 16520/* Values we'll use to set the TZ environment variable. */
edfaf76d
LK
16521static char *tz_strings[] = {
16522 (char *) 0, "TZ=GMT0", "TZ=JST-9",
98418dba
CW
16523 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
16524};
16525#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
503d2be0 16526
ca81d7a0 16527/* Return 0 if mktime fails to convert a date in the spring-forward gap.
98418dba 16528 Based on a problem report from Andreas Jaeger. */
ca81d7a0 16529static int
98418dba
CW
16530spring_forward_gap ()
16531{
16532 /* glibc (up to about 1998-10-07) failed this test. */
16533 struct tm tm;
16534
16535 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16536 instead of "TZ=America/Vancouver" in order to detect the bug even
16537 on systems that don't support the Olson extension, or don't have the
16538 full zoneinfo tables installed. */
16539 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16540
16541 tm.tm_year = 98;
16542 tm.tm_mon = 3;
16543 tm.tm_mday = 5;
16544 tm.tm_hour = 2;
16545 tm.tm_min = 0;
16546 tm.tm_sec = 0;
16547 tm.tm_isdst = -1;
ca81d7a0 16548 return mktime (&tm) != (time_t) -1;
98418dba
CW
16549}
16550
ca81d7a0 16551static int
edfaf76d 16552mktime_test1 (now)
98418dba
CW
16553 time_t now;
16554{
16555 struct tm *lt;
ca81d7a0 16556 return ! (lt = localtime (&now)) || mktime (lt) == now;
edfaf76d
LK
16557}
16558
ca81d7a0 16559static int
edfaf76d
LK
16560mktime_test (now)
16561 time_t now;
16562{
ca81d7a0
JD
16563 return (mktime_test1 (now)
16564 && mktime_test1 ((time_t) (time_t_max - now))
16565 && mktime_test1 ((time_t) (time_t_min + now)));
98418dba
CW
16566}
16567
ca81d7a0 16568static int
98418dba
CW
16569irix_6_4_bug ()
16570{
16571 /* Based on code from Ariel Faigon. */
16572 struct tm tm;
16573 tm.tm_year = 96;
16574 tm.tm_mon = 3;
16575 tm.tm_mday = 0;
16576 tm.tm_hour = 0;
16577 tm.tm_min = 0;
16578 tm.tm_sec = 0;
16579 tm.tm_isdst = -1;
16580 mktime (&tm);
ca81d7a0 16581 return tm.tm_mon == 2 && tm.tm_mday == 31;
98418dba
CW
16582}
16583
ca81d7a0 16584static int
98418dba
CW
16585bigtime_test (j)
16586 int j;
16587{
16588 struct tm tm;
16589 time_t now;
16590 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
16591 now = mktime (&tm);
16592 if (now != (time_t) -1)
16593 {
16594 struct tm *lt = localtime (&now);
16595 if (! (lt
16596 && lt->tm_year == tm.tm_year
16597 && lt->tm_mon == tm.tm_mon
16598 && lt->tm_mday == tm.tm_mday
16599 && lt->tm_hour == tm.tm_hour
16600 && lt->tm_min == tm.tm_min
16601 && lt->tm_sec == tm.tm_sec
16602 && lt->tm_yday == tm.tm_yday
16603 && lt->tm_wday == tm.tm_wday
16604 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
16605 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
ca81d7a0 16606 return 0;
98418dba 16607 }
ca81d7a0 16608 return 1;
98418dba
CW
16609}
16610
f053c89f
CY
16611static int
16612year_2050_test ()
16613{
16614 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
16615 ignoring leap seconds. */
16616 unsigned long int answer = 2527315200UL;
16617
16618 struct tm tm;
16619 time_t t;
16620 tm.tm_year = 2050 - 1900;
16621 tm.tm_mon = 2 - 1;
16622 tm.tm_mday = 1;
16623 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
16624 tm.tm_isdst = -1;
16625
16626 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
16627 instead of "TZ=America/Vancouver" in order to detect the bug even
16628 on systems that don't support the Olson extension, or don't have the
16629 full zoneinfo tables installed. */
16630 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
16631
16632 t = mktime (&tm);
16633
16634 /* Check that the result is either a failure, or close enough
16635 to the correct answer that we can assume the discrepancy is
16636 due to leap seconds. */
16637 return (t == (time_t) -1
16638 || (0 < t && answer - 120 <= t && t <= answer + 120));
98418dba
CW
16639}
16640
16641int
16642main ()
16643{
16644 time_t t, delta;
16645 int i, j;
16646
16647 /* This test makes some buggy mktime implementations loop.
16648 Give up after 60 seconds; a mktime slower than that
16649 isn't worth using anyway. */
16650 alarm (60);
16651
16652 for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2)
16653 continue;
16654 time_t_max--;
edfaf76d
LK
16655 if ((time_t) -1 < 0)
16656 for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2)
16657 continue;
98418dba
CW
16658 delta = time_t_max / 997; /* a suitable prime number */
16659 for (i = 0; i < N_STRINGS; i++)
16660 {
16661 if (tz_strings[i])
16662 putenv (tz_strings[i]);
503d2be0 16663
98418dba 16664 for (t = 0; t <= time_t_max - delta; t += delta)
ca81d7a0
JD
16665 if (! mktime_test (t))
16666 return 1;
16667 if (! (mktime_test ((time_t) 1)
16668 && mktime_test ((time_t) (60 * 60))
16669 && mktime_test ((time_t) (60 * 60 * 24))))
16670 return 1;
98418dba
CW
16671
16672 for (j = 1; 0 < j; j *= 2)
ca81d7a0
JD
16673 if (! bigtime_test (j))
16674 return 1;
16675 if (! bigtime_test (j - 1))
16676 return 1;
98418dba 16677 }
f053c89f 16678 return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
503d2be0
AS
16679}
16680_ACEOF
98418dba 16681rm -f conftest$ac_exeext
ca81d7a0
JD
16682if { (ac_try="$ac_link"
16683case "(($ac_try" in
16684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16685 *) ac_try_echo=$ac_try;;
16686esac
16687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16688 (eval "$ac_link") 2>&5
503d2be0 16689 ac_status=$?
c0d27fcc 16690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
98418dba 16691 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
16692 { (case "(($ac_try" in
16693 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16694 *) ac_try_echo=$ac_try;;
16695esac
16696eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16697 (eval "$ac_try") 2>&5
503d2be0 16698 ac_status=$?
c0d27fcc 16699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 16700 (exit $ac_status); }; }; then
98418dba 16701 ac_cv_func_working_mktime=yes
503d2be0 16702else
98418dba
CW
16703 echo "$as_me: program exited with status $ac_status" >&5
16704echo "$as_me: failed program was:" >&5
19650fd6
AS
16705sed 's/^/| /' conftest.$ac_ext >&5
16706
c0d27fcc 16707( exit $ac_status )
98418dba 16708ac_cv_func_working_mktime=no
503d2be0 16709fi
ca81d7a0 16710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 16711fi
ca81d7a0
JD
16712
16713
ba4481b5 16714fi
ca81d7a0
JD
16715{ echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
16716echo "${ECHO_T}$ac_cv_func_working_mktime" >&6; }
98418dba 16717if test $ac_cv_func_working_mktime = no; then
ca81d7a0 16718 case " $LIBOBJS " in
edfaf76d 16719 *" mktime.$ac_objext "* ) ;;
ca81d7a0
JD
16720 *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
16721 ;;
edfaf76d
LK
16722esac
16723
ba4481b5
DL
16724fi
16725
98418dba 16726if test "$ac_cv_func_working_mktime" = no; then
b936fae4 16727
c0d27fcc 16728cat >>confdefs.h <<\_ACEOF
98418dba 16729#define BROKEN_MKTIME 1
c0d27fcc 16730_ACEOF
ba4481b5 16731
ba4481b5 16732fi
503d2be0 16733
98418dba
CW
16734ac_have_func=no # yes means we've found a way to get the load average.
16735
6bae0ccf
DL
16736# Make sure getloadavg.c is where it belongs, at configure-time.
16737test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" ||
16738 { { echo "$as_me:$LINENO: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&5
16739echo "$as_me: error: $srcdir/$ac_config_libobj_dir/getloadavg.c is missing" >&2;}
16740 { (exit 1); exit 1; }; }
16741
98418dba
CW
16742ac_save_LIBS=$LIBS
16743
16744# Check for getloadavg, but be sure not to touch the cache variable.
ca81d7a0
JD
16745({ echo "$as_me:$LINENO: checking for getloadavg" >&5
16746echo $ECHO_N "checking for getloadavg... $ECHO_C" >&6; }
98418dba 16747if test "${ac_cv_func_getloadavg+set}" = set; then
503d2be0 16748 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16749else
503d2be0 16750 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16751/* confdefs.h. */
16752_ACEOF
16753cat confdefs.h >>conftest.$ac_ext
16754cat >>conftest.$ac_ext <<_ACEOF
16755/* end confdefs.h. */
edfaf76d
LK
16756/* Define getloadavg to an innocuous variant, in case <limits.h> declares getloadavg.
16757 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16758#define getloadavg innocuous_getloadavg
16759
98418dba 16760/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16761 which can conflict with char getloadavg (); below.
16762 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16763 <limits.h> exists even on freestanding compilers. */
edfaf76d 16764
19650fd6
AS
16765#ifdef __STDC__
16766# include <limits.h>
16767#else
16768# include <assert.h>
16769#endif
edfaf76d
LK
16770
16771#undef getloadavg
16772
ca81d7a0
JD
16773/* Override any GCC internal prototype to avoid an error.
16774 Use char because int might match the return type of a GCC
16775 builtin and then its argument prototype would still apply. */
503d2be0
AS
16776#ifdef __cplusplus
16777extern "C"
16778#endif
98418dba 16779char getloadavg ();
98418dba
CW
16780/* The GNU C library defines this for functions which it implements
16781 to always fail with ENOSYS. Some functions are actually named
16782 something starting with __ and the normal name is an alias. */
ca81d7a0 16783#if defined __stub_getloadavg || defined __stub___getloadavg
98418dba 16784choke me
cd958eb3
MB
16785#endif
16786
19650fd6
AS
16787int
16788main ()
16789{
ca81d7a0 16790return getloadavg ();
503d2be0
AS
16791 ;
16792 return 0;
16793}
16794_ACEOF
16795rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16796if { (ac_try="$ac_link"
16797case "(($ac_try" in
16798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16799 *) ac_try_echo=$ac_try;;
16800esac
16801eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16802 (eval "$ac_link") 2>conftest.er1
503d2be0 16803 ac_status=$?
edfaf76d
LK
16804 grep -v '^ *+' conftest.er1 >conftest.err
16805 rm -f conftest.er1
16806 cat conftest.err >&5
c0d27fcc 16807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16808 (exit $ac_status); } && {
16809 test -z "$ac_c_werror_flag" ||
16810 test ! -s conftest.err
16811 } && test -s conftest$ac_exeext &&
16812 $as_test_x conftest$ac_exeext; then
98418dba 16813 ac_cv_func_getloadavg=yes
503d2be0
AS
16814else
16815 echo "$as_me: failed program was:" >&5
19650fd6
AS
16816sed 's/^/| /' conftest.$ac_ext >&5
16817
ca81d7a0 16818 ac_cv_func_getloadavg=no
503d2be0 16819fi
ca81d7a0 16820
f053c89f 16821rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16822 conftest$ac_exeext conftest.$ac_ext
ba4481b5 16823fi
ca81d7a0
JD
16824{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg" >&5
16825echo "${ECHO_T}$ac_cv_func_getloadavg" >&6; }
98418dba
CW
16826if test $ac_cv_func_getloadavg = yes; then
16827 exit 0
16828else
16829 exit 1
ba4481b5 16830fi
98418dba 16831) && ac_have_func=yes
ba4481b5 16832
98418dba 16833# On HPUX9, an unprivileged user can get load averages through this function.
503d2be0 16834
98418dba
CW
16835for ac_func in pstat_getdynamic
16836do
16837as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
16838{ echo "$as_me:$LINENO: checking for $ac_func" >&5
16839echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16840if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 16841 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 16842else
503d2be0 16843 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16844/* confdefs.h. */
16845_ACEOF
16846cat confdefs.h >>conftest.$ac_ext
16847cat >>conftest.$ac_ext <<_ACEOF
16848/* end confdefs.h. */
edfaf76d
LK
16849/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16850 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16851#define $ac_func innocuous_$ac_func
16852
98418dba 16853/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
16854 which can conflict with char $ac_func (); below.
16855 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16856 <limits.h> exists even on freestanding compilers. */
edfaf76d 16857
19650fd6
AS
16858#ifdef __STDC__
16859# include <limits.h>
16860#else
16861# include <assert.h>
16862#endif
edfaf76d
LK
16863
16864#undef $ac_func
16865
ca81d7a0
JD
16866/* Override any GCC internal prototype to avoid an error.
16867 Use char because int might match the return type of a GCC
16868 builtin and then its argument prototype would still apply. */
503d2be0
AS
16869#ifdef __cplusplus
16870extern "C"
16871#endif
98418dba 16872char $ac_func ();
98418dba
CW
16873/* The GNU C library defines this for functions which it implements
16874 to always fail with ENOSYS. Some functions are actually named
16875 something starting with __ and the normal name is an alias. */
ca81d7a0 16876#if defined __stub_$ac_func || defined __stub___$ac_func
98418dba 16877choke me
98418dba
CW
16878#endif
16879
19650fd6
AS
16880int
16881main ()
16882{
ca81d7a0 16883return $ac_func ();
98418dba
CW
16884 ;
16885 return 0;
16886}
f21fadcc 16887_ACEOF
98418dba 16888rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16889if { (ac_try="$ac_link"
16890case "(($ac_try" in
16891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16892 *) ac_try_echo=$ac_try;;
16893esac
16894eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16895 (eval "$ac_link") 2>conftest.er1
f21fadcc 16896 ac_status=$?
edfaf76d
LK
16897 grep -v '^ *+' conftest.er1 >conftest.err
16898 rm -f conftest.er1
16899 cat conftest.err >&5
c0d27fcc 16900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
16901 (exit $ac_status); } && {
16902 test -z "$ac_c_werror_flag" ||
16903 test ! -s conftest.err
16904 } && test -s conftest$ac_exeext &&
16905 $as_test_x conftest$ac_exeext; then
98418dba 16906 eval "$as_ac_var=yes"
f21fadcc
JD
16907else
16908 echo "$as_me: failed program was:" >&5
19650fd6
AS
16909sed 's/^/| /' conftest.$ac_ext >&5
16910
ca81d7a0 16911 eval "$as_ac_var=no"
f21fadcc 16912fi
ca81d7a0 16913
f053c89f 16914rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16915 conftest$ac_exeext conftest.$ac_ext
f21fadcc 16916fi
ca81d7a0
JD
16917ac_res=`eval echo '${'$as_ac_var'}'`
16918 { echo "$as_me:$LINENO: result: $ac_res" >&5
16919echo "${ECHO_T}$ac_res" >&6; }
98418dba 16920if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 16921 cat >>confdefs.h <<_ACEOF
98418dba 16922#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 16923_ACEOF
98418dba
CW
16924
16925fi
16926done
16927
c0d27fcc 16928
98418dba
CW
16929# Solaris has libkstat which does not require root.
16930
ca81d7a0
JD
16931{ echo "$as_me:$LINENO: checking for kstat_open in -lkstat" >&5
16932echo $ECHO_N "checking for kstat_open in -lkstat... $ECHO_C" >&6; }
98418dba 16933if test "${ac_cv_lib_kstat_kstat_open+set}" = set; then
f21fadcc
JD
16934 echo $ECHO_N "(cached) $ECHO_C" >&6
16935else
16936 ac_check_lib_save_LIBS=$LIBS
98418dba 16937LIBS="-lkstat $LIBS"
f21fadcc 16938cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
16939/* confdefs.h. */
16940_ACEOF
16941cat confdefs.h >>conftest.$ac_ext
16942cat >>conftest.$ac_ext <<_ACEOF
16943/* end confdefs.h. */
f21fadcc 16944
ca81d7a0
JD
16945/* Override any GCC internal prototype to avoid an error.
16946 Use char because int might match the return type of a GCC
16947 builtin and then its argument prototype would still apply. */
f21fadcc
JD
16948#ifdef __cplusplus
16949extern "C"
16950#endif
98418dba 16951char kstat_open ();
f21fadcc
JD
16952int
16953main ()
16954{
ca81d7a0 16955return kstat_open ();
f21fadcc
JD
16956 ;
16957 return 0;
16958}
16959_ACEOF
16960rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
16961if { (ac_try="$ac_link"
16962case "(($ac_try" in
16963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16964 *) ac_try_echo=$ac_try;;
16965esac
16966eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16967 (eval "$ac_link") 2>conftest.er1
f21fadcc 16968 ac_status=$?
edfaf76d
LK
16969 grep -v '^ *+' conftest.er1 >conftest.err
16970 rm -f conftest.er1
16971 cat conftest.err >&5
c0d27fcc 16972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
16973 (exit $ac_status); } && {
16974 test -z "$ac_c_werror_flag" ||
16975 test ! -s conftest.err
16976 } && test -s conftest$ac_exeext &&
16977 $as_test_x conftest$ac_exeext; then
98418dba 16978 ac_cv_lib_kstat_kstat_open=yes
f21fadcc
JD
16979else
16980 echo "$as_me: failed program was:" >&5
19650fd6
AS
16981sed 's/^/| /' conftest.$ac_ext >&5
16982
ca81d7a0 16983 ac_cv_lib_kstat_kstat_open=no
f21fadcc 16984fi
ca81d7a0 16985
f053c89f 16986rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 16987 conftest$ac_exeext conftest.$ac_ext
f21fadcc
JD
16988LIBS=$ac_check_lib_save_LIBS
16989fi
ca81d7a0
JD
16990{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_kstat_open" >&5
16991echo "${ECHO_T}$ac_cv_lib_kstat_kstat_open" >&6; }
98418dba 16992if test $ac_cv_lib_kstat_kstat_open = yes; then
c0d27fcc 16993 cat >>confdefs.h <<_ACEOF
98418dba 16994#define HAVE_LIBKSTAT 1
c0d27fcc 16995_ACEOF
f21fadcc 16996
98418dba 16997 LIBS="-lkstat $LIBS"
f21fadcc 16998
f21fadcc
JD
16999fi
17000
98418dba
CW
17001test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
17002
17003# Some systems with -lutil have (and need) -lkvm as well, some do not.
17004# On Solaris, -lkvm requires nlist from -lelf, so check that first
17005# to get the right answer into the cache.
17006# For kstat on solaris, we need libelf to force the definition of SVR4 below.
17007if test $ac_have_func = no; then
ca81d7a0
JD
17008 { echo "$as_me:$LINENO: checking for elf_begin in -lelf" >&5
17009echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6; }
98418dba 17010if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
503d2be0 17011 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17012else
98418dba
CW
17013 ac_check_lib_save_LIBS=$LIBS
17014LIBS="-lelf $LIBS"
17015cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17016/* confdefs.h. */
17017_ACEOF
17018cat confdefs.h >>conftest.$ac_ext
17019cat >>conftest.$ac_ext <<_ACEOF
17020/* end confdefs.h. */
98418dba 17021
ca81d7a0
JD
17022/* Override any GCC internal prototype to avoid an error.
17023 Use char because int might match the return type of a GCC
17024 builtin and then its argument prototype would still apply. */
98418dba
CW
17025#ifdef __cplusplus
17026extern "C"
17027#endif
98418dba 17028char elf_begin ();
503d2be0
AS
17029int
17030main ()
17031{
ca81d7a0 17032return elf_begin ();
503d2be0
AS
17033 ;
17034 return 0;
17035}
17036_ACEOF
17037rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17038if { (ac_try="$ac_link"
17039case "(($ac_try" in
17040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17041 *) ac_try_echo=$ac_try;;
17042esac
17043eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17044 (eval "$ac_link") 2>conftest.er1
503d2be0 17045 ac_status=$?
edfaf76d
LK
17046 grep -v '^ *+' conftest.er1 >conftest.err
17047 rm -f conftest.er1
17048 cat conftest.err >&5
c0d27fcc 17049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17050 (exit $ac_status); } && {
17051 test -z "$ac_c_werror_flag" ||
17052 test ! -s conftest.err
17053 } && test -s conftest$ac_exeext &&
17054 $as_test_x conftest$ac_exeext; then
98418dba 17055 ac_cv_lib_elf_elf_begin=yes
ba4481b5 17056else
503d2be0 17057 echo "$as_me: failed program was:" >&5
19650fd6
AS
17058sed 's/^/| /' conftest.$ac_ext >&5
17059
ca81d7a0 17060 ac_cv_lib_elf_elf_begin=no
ba4481b5 17061fi
ca81d7a0 17062
f053c89f 17063rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17064 conftest$ac_exeext conftest.$ac_ext
98418dba 17065LIBS=$ac_check_lib_save_LIBS
ba4481b5 17066fi
ca81d7a0
JD
17067{ echo "$as_me:$LINENO: result: $ac_cv_lib_elf_elf_begin" >&5
17068echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6; }
98418dba
CW
17069if test $ac_cv_lib_elf_elf_begin = yes; then
17070 LIBS="-lelf $LIBS"
ba4481b5
DL
17071fi
17072
98418dba
CW
17073fi
17074if test $ac_have_func = no; then
ca81d7a0
JD
17075 { echo "$as_me:$LINENO: checking for kvm_open in -lkvm" >&5
17076echo $ECHO_N "checking for kvm_open in -lkvm... $ECHO_C" >&6; }
98418dba 17077if test "${ac_cv_lib_kvm_kvm_open+set}" = set; then
503d2be0 17078 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17079else
98418dba
CW
17080 ac_check_lib_save_LIBS=$LIBS
17081LIBS="-lkvm $LIBS"
17082cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17083/* confdefs.h. */
17084_ACEOF
17085cat confdefs.h >>conftest.$ac_ext
17086cat >>conftest.$ac_ext <<_ACEOF
17087/* end confdefs.h. */
98418dba 17088
ca81d7a0
JD
17089/* Override any GCC internal prototype to avoid an error.
17090 Use char because int might match the return type of a GCC
17091 builtin and then its argument prototype would still apply. */
98418dba
CW
17092#ifdef __cplusplus
17093extern "C"
17094#endif
98418dba 17095char kvm_open ();
503d2be0
AS
17096int
17097main ()
17098{
ca81d7a0 17099return kvm_open ();
503d2be0
AS
17100 ;
17101 return 0;
17102}
17103_ACEOF
17104rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17105if { (ac_try="$ac_link"
17106case "(($ac_try" in
17107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17108 *) ac_try_echo=$ac_try;;
17109esac
17110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17111 (eval "$ac_link") 2>conftest.er1
503d2be0 17112 ac_status=$?
edfaf76d
LK
17113 grep -v '^ *+' conftest.er1 >conftest.err
17114 rm -f conftest.er1
17115 cat conftest.err >&5
c0d27fcc 17116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17117 (exit $ac_status); } && {
17118 test -z "$ac_c_werror_flag" ||
17119 test ! -s conftest.err
17120 } && test -s conftest$ac_exeext &&
17121 $as_test_x conftest$ac_exeext; then
98418dba 17122 ac_cv_lib_kvm_kvm_open=yes
503d2be0
AS
17123else
17124 echo "$as_me: failed program was:" >&5
19650fd6
AS
17125sed 's/^/| /' conftest.$ac_ext >&5
17126
ca81d7a0 17127 ac_cv_lib_kvm_kvm_open=no
503d2be0 17128fi
ca81d7a0 17129
f053c89f 17130rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17131 conftest$ac_exeext conftest.$ac_ext
98418dba 17132LIBS=$ac_check_lib_save_LIBS
503d2be0 17133fi
ca81d7a0
JD
17134{ echo "$as_me:$LINENO: result: $ac_cv_lib_kvm_kvm_open" >&5
17135echo "${ECHO_T}$ac_cv_lib_kvm_kvm_open" >&6; }
98418dba
CW
17136if test $ac_cv_lib_kvm_kvm_open = yes; then
17137 LIBS="-lkvm $LIBS"
ba4481b5
DL
17138fi
17139
98418dba 17140 # Check for the 4.4BSD definition of getloadavg.
ca81d7a0
JD
17141 { echo "$as_me:$LINENO: checking for getloadavg in -lutil" >&5
17142echo $ECHO_N "checking for getloadavg in -lutil... $ECHO_C" >&6; }
98418dba 17143if test "${ac_cv_lib_util_getloadavg+set}" = set; then
503d2be0 17144 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17145else
98418dba
CW
17146 ac_check_lib_save_LIBS=$LIBS
17147LIBS="-lutil $LIBS"
17148cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17149/* confdefs.h. */
17150_ACEOF
17151cat confdefs.h >>conftest.$ac_ext
17152cat >>conftest.$ac_ext <<_ACEOF
17153/* end confdefs.h. */
98418dba 17154
ca81d7a0
JD
17155/* Override any GCC internal prototype to avoid an error.
17156 Use char because int might match the return type of a GCC
17157 builtin and then its argument prototype would still apply. */
98418dba
CW
17158#ifdef __cplusplus
17159extern "C"
17160#endif
98418dba 17161char getloadavg ();
503d2be0
AS
17162int
17163main ()
17164{
ca81d7a0 17165return getloadavg ();
503d2be0
AS
17166 ;
17167 return 0;
17168}
17169_ACEOF
17170rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17171if { (ac_try="$ac_link"
17172case "(($ac_try" in
17173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17174 *) ac_try_echo=$ac_try;;
17175esac
17176eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17177 (eval "$ac_link") 2>conftest.er1
503d2be0 17178 ac_status=$?
edfaf76d
LK
17179 grep -v '^ *+' conftest.er1 >conftest.err
17180 rm -f conftest.er1
17181 cat conftest.err >&5
c0d27fcc 17182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
17183 (exit $ac_status); } && {
17184 test -z "$ac_c_werror_flag" ||
17185 test ! -s conftest.err
17186 } && test -s conftest$ac_exeext &&
17187 $as_test_x conftest$ac_exeext; then
35996d22
AS
17188 ac_cv_lib_util_getloadavg=yes
17189else
503d2be0 17190 echo "$as_me: failed program was:" >&5
19650fd6
AS
17191sed 's/^/| /' conftest.$ac_ext >&5
17192
ca81d7a0 17193 ac_cv_lib_util_getloadavg=no
ba4481b5 17194fi
ca81d7a0 17195
f053c89f 17196rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17197 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17198LIBS=$ac_check_lib_save_LIBS
17199fi
ca81d7a0
JD
17200{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_getloadavg" >&5
17201echo "${ECHO_T}$ac_cv_lib_util_getloadavg" >&6; }
98418dba
CW
17202if test $ac_cv_lib_util_getloadavg = yes; then
17203 LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes
ba4481b5 17204fi
503d2be0 17205
98418dba 17206fi
ba4481b5 17207
98418dba
CW
17208if test $ac_have_func = no; then
17209 # There is a commonly available library for RS/6000 AIX.
17210 # Since it is not a standard part of AIX, it might be installed locally.
17211 ac_getloadavg_LIBS=$LIBS
17212 LIBS="-L/usr/local/lib $LIBS"
ca81d7a0
JD
17213 { echo "$as_me:$LINENO: checking for getloadavg in -lgetloadavg" >&5
17214echo $ECHO_N "checking for getloadavg in -lgetloadavg... $ECHO_C" >&6; }
98418dba 17215if test "${ac_cv_lib_getloadavg_getloadavg+set}" = set; then
503d2be0 17216 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17217else
98418dba
CW
17218 ac_check_lib_save_LIBS=$LIBS
17219LIBS="-lgetloadavg $LIBS"
17220cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17221/* confdefs.h. */
17222_ACEOF
17223cat confdefs.h >>conftest.$ac_ext
17224cat >>conftest.$ac_ext <<_ACEOF
17225/* end confdefs.h. */
ba4481b5 17226
ca81d7a0
JD
17227/* Override any GCC internal prototype to avoid an error.
17228 Use char because int might match the return type of a GCC
17229 builtin and then its argument prototype would still apply. */
98418dba
CW
17230#ifdef __cplusplus
17231extern "C"
17232#endif
98418dba 17233char getloadavg ();
98418dba
CW
17234int
17235main ()
17236{
ca81d7a0 17237return getloadavg ();
98418dba
CW
17238 ;
17239 return 0;
17240}
503d2be0 17241_ACEOF
98418dba 17242rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17243if { (ac_try="$ac_link"
17244case "(($ac_try" in
17245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17246 *) ac_try_echo=$ac_try;;
17247esac
17248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17249 (eval "$ac_link") 2>conftest.er1
98418dba 17250 ac_status=$?
edfaf76d
LK
17251 grep -v '^ *+' conftest.er1 >conftest.err
17252 rm -f conftest.er1
17253 cat conftest.err >&5
c0d27fcc 17254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17255 (exit $ac_status); } && {
17256 test -z "$ac_c_werror_flag" ||
17257 test ! -s conftest.err
17258 } && test -s conftest$ac_exeext &&
17259 $as_test_x conftest$ac_exeext; then
98418dba 17260 ac_cv_lib_getloadavg_getloadavg=yes
ba4481b5 17261else
98418dba 17262 echo "$as_me: failed program was:" >&5
19650fd6
AS
17263sed 's/^/| /' conftest.$ac_ext >&5
17264
ca81d7a0 17265 ac_cv_lib_getloadavg_getloadavg=no
98418dba 17266fi
ca81d7a0 17267
f053c89f 17268rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17269 conftest$ac_exeext conftest.$ac_ext
98418dba
CW
17270LIBS=$ac_check_lib_save_LIBS
17271fi
ca81d7a0
JD
17272{ echo "$as_me:$LINENO: result: $ac_cv_lib_getloadavg_getloadavg" >&5
17273echo "${ECHO_T}$ac_cv_lib_getloadavg_getloadavg" >&6; }
98418dba
CW
17274if test $ac_cv_lib_getloadavg_getloadavg = yes; then
17275 LIBS="-lgetloadavg $LIBS"
17276else
17277 LIBS=$ac_getloadavg_LIBS
ba4481b5 17278fi
ba4481b5
DL
17279
17280fi
98418dba
CW
17281
17282# Make sure it is really in the library, if we think we found it,
17283# otherwise set up the replacement function.
17284
17285for ac_func in getloadavg
17286do
17287as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17288{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17289echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17290if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17291 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17292else
503d2be0 17293 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17294/* confdefs.h. */
17295_ACEOF
17296cat confdefs.h >>conftest.$ac_ext
17297cat >>conftest.$ac_ext <<_ACEOF
17298/* end confdefs.h. */
edfaf76d
LK
17299/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17300 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17301#define $ac_func innocuous_$ac_func
17302
ba4481b5 17303/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17304 which can conflict with char $ac_func (); below.
17305 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17306 <limits.h> exists even on freestanding compilers. */
edfaf76d 17307
19650fd6
AS
17308#ifdef __STDC__
17309# include <limits.h>
17310#else
17311# include <assert.h>
17312#endif
edfaf76d
LK
17313
17314#undef $ac_func
17315
ca81d7a0
JD
17316/* Override any GCC internal prototype to avoid an error.
17317 Use char because int might match the return type of a GCC
17318 builtin and then its argument prototype would still apply. */
503d2be0
AS
17319#ifdef __cplusplus
17320extern "C"
17321#endif
503d2be0 17322char $ac_func ();
ba4481b5
DL
17323/* The GNU C library defines this for functions which it implements
17324 to always fail with ENOSYS. Some functions are actually named
17325 something starting with __ and the normal name is an alias. */
ca81d7a0 17326#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17327choke me
cd958eb3
MB
17328#endif
17329
19650fd6
AS
17330int
17331main ()
17332{
ca81d7a0 17333return $ac_func ();
503d2be0
AS
17334 ;
17335 return 0;
17336}
17337_ACEOF
17338rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17339if { (ac_try="$ac_link"
17340case "(($ac_try" in
17341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17342 *) ac_try_echo=$ac_try;;
17343esac
17344eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17345 (eval "$ac_link") 2>conftest.er1
503d2be0 17346 ac_status=$?
edfaf76d
LK
17347 grep -v '^ *+' conftest.er1 >conftest.err
17348 rm -f conftest.er1
17349 cat conftest.err >&5
c0d27fcc 17350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17351 (exit $ac_status); } && {
17352 test -z "$ac_c_werror_flag" ||
17353 test ! -s conftest.err
17354 } && test -s conftest$ac_exeext &&
17355 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17356 eval "$as_ac_var=yes"
17357else
17358 echo "$as_me: failed program was:" >&5
19650fd6
AS
17359sed 's/^/| /' conftest.$ac_ext >&5
17360
ca81d7a0 17361 eval "$as_ac_var=no"
503d2be0 17362fi
ca81d7a0 17363
f053c89f 17364rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17365 conftest$ac_exeext conftest.$ac_ext
503d2be0 17366fi
ca81d7a0
JD
17367ac_res=`eval echo '${'$as_ac_var'}'`
17368 { echo "$as_me:$LINENO: result: $ac_res" >&5
17369echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17370if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17371 cat >>confdefs.h <<_ACEOF
98418dba 17372#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17373_ACEOF
503d2be0 17374
98418dba 17375else
ca81d7a0 17376 case " $LIBOBJS " in
edfaf76d 17377 *" getloadavg.$ac_objext "* ) ;;
ca81d7a0
JD
17378 *) LIBOBJS="$LIBOBJS getloadavg.$ac_objext"
17379 ;;
edfaf76d
LK
17380esac
17381
ba4481b5 17382
c0d27fcc 17383cat >>confdefs.h <<\_ACEOF
98418dba 17384#define C_GETLOADAVG 1
c0d27fcc 17385_ACEOF
ba4481b5 17386
98418dba
CW
17387# Figure out what our getloadavg.c needs.
17388ac_have_func=no
c0d27fcc 17389if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
ca81d7a0
JD
17390 { echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17391echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
98418dba 17392if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
503d2be0 17393 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17394fi
ca81d7a0
JD
17395{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17396echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
ba4481b5 17397else
c0d27fcc 17398 # Is the header compilable?
ca81d7a0
JD
17399{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h usability" >&5
17400echo $ECHO_N "checking sys/dg_sys_info.h usability... $ECHO_C" >&6; }
c0d27fcc 17401cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17402/* confdefs.h. */
17403_ACEOF
17404cat confdefs.h >>conftest.$ac_ext
17405cat >>conftest.$ac_ext <<_ACEOF
17406/* end confdefs.h. */
c0d27fcc
MR
17407$ac_includes_default
17408#include <sys/dg_sys_info.h>
17409_ACEOF
17410rm -f conftest.$ac_objext
ca81d7a0
JD
17411if { (ac_try="$ac_compile"
17412case "(($ac_try" in
17413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17414 *) ac_try_echo=$ac_try;;
17415esac
17416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17417 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17418 ac_status=$?
edfaf76d
LK
17419 grep -v '^ *+' conftest.er1 >conftest.err
17420 rm -f conftest.er1
17421 cat conftest.err >&5
c0d27fcc 17422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17423 (exit $ac_status); } && {
17424 test -z "$ac_c_werror_flag" ||
17425 test ! -s conftest.err
17426 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17427 ac_header_compiler=yes
17428else
17429 echo "$as_me: failed program was:" >&5
19650fd6
AS
17430sed 's/^/| /' conftest.$ac_ext >&5
17431
ca81d7a0 17432 ac_header_compiler=no
c0d27fcc 17433fi
ca81d7a0
JD
17434
17435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17436{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17437echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17438
17439# Is the header present?
ca81d7a0
JD
17440{ echo "$as_me:$LINENO: checking sys/dg_sys_info.h presence" >&5
17441echo $ECHO_N "checking sys/dg_sys_info.h presence... $ECHO_C" >&6; }
c0d27fcc 17442cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17443/* confdefs.h. */
17444_ACEOF
17445cat confdefs.h >>conftest.$ac_ext
17446cat >>conftest.$ac_ext <<_ACEOF
17447/* end confdefs.h. */
98418dba
CW
17448#include <sys/dg_sys_info.h>
17449_ACEOF
ca81d7a0
JD
17450if { (ac_try="$ac_cpp conftest.$ac_ext"
17451case "(($ac_try" in
17452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17453 *) ac_try_echo=$ac_try;;
17454esac
17455eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17456 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 17457 ac_status=$?
6bae0ccf 17458 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17459 rm -f conftest.er1
17460 cat conftest.err >&5
c0d27fcc 17461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17462 (exit $ac_status); } >/dev/null && {
17463 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17464 test ! -s conftest.err
17465 }; then
c0d27fcc 17466 ac_header_preproc=yes
98418dba
CW
17467else
17468 echo "$as_me: failed program was:" >&5
19650fd6
AS
17469sed 's/^/| /' conftest.$ac_ext >&5
17470
c0d27fcc 17471 ac_header_preproc=no
ba4481b5 17472fi
ca81d7a0 17473
98418dba 17474rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17475{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17476echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17477
17478# So? What about this header?
edfaf76d
LK
17479case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17480 yes:no: )
c0d27fcc
MR
17481 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&5
17482echo "$as_me: WARNING: sys/dg_sys_info.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17483 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&5
17484echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the compiler's result" >&2;}
17485 ac_header_preproc=yes
19650fd6 17486 ;;
edfaf76d 17487 no:yes:* )
c0d27fcc
MR
17488 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&5
17489echo "$as_me: WARNING: sys/dg_sys_info.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17490 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&5
17491echo "$as_me: WARNING: sys/dg_sys_info.h: check for missing prerequisite headers?" >&2;}
17492 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&5
17493echo "$as_me: WARNING: sys/dg_sys_info.h: see the Autoconf documentation" >&2;}
17494 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&5
17495echo "$as_me: WARNING: sys/dg_sys_info.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17496 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&5
19650fd6 17497echo "$as_me: WARNING: sys/dg_sys_info.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17498 { echo "$as_me:$LINENO: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&5
17499echo "$as_me: WARNING: sys/dg_sys_info.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17500
19650fd6 17501 ;;
c0d27fcc 17502esac
ca81d7a0
JD
17503{ echo "$as_me:$LINENO: checking for sys/dg_sys_info.h" >&5
17504echo $ECHO_N "checking for sys/dg_sys_info.h... $ECHO_C" >&6; }
c0d27fcc
MR
17505if test "${ac_cv_header_sys_dg_sys_info_h+set}" = set; then
17506 echo $ECHO_N "(cached) $ECHO_C" >&6
17507else
17508 ac_cv_header_sys_dg_sys_info_h=$ac_header_preproc
98418dba 17509fi
ca81d7a0
JD
17510{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_dg_sys_info_h" >&5
17511echo "${ECHO_T}$ac_cv_header_sys_dg_sys_info_h" >&6; }
c0d27fcc
MR
17512
17513fi
98418dba
CW
17514if test $ac_cv_header_sys_dg_sys_info_h = yes; then
17515 ac_have_func=yes
ba4481b5 17516
c0d27fcc 17517cat >>confdefs.h <<\_ACEOF
98418dba 17518#define DGUX 1
c0d27fcc
MR
17519_ACEOF
17520
503d2be0 17521
ca81d7a0
JD
17522{ echo "$as_me:$LINENO: checking for dg_sys_info in -ldgc" >&5
17523echo $ECHO_N "checking for dg_sys_info in -ldgc... $ECHO_C" >&6; }
98418dba 17524if test "${ac_cv_lib_dgc_dg_sys_info+set}" = set; then
503d2be0 17525 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17526else
503d2be0 17527 ac_check_lib_save_LIBS=$LIBS
98418dba 17528LIBS="-ldgc $LIBS"
503d2be0 17529cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17530/* confdefs.h. */
17531_ACEOF
17532cat confdefs.h >>conftest.$ac_ext
17533cat >>conftest.$ac_ext <<_ACEOF
17534/* end confdefs.h. */
503d2be0 17535
ca81d7a0
JD
17536/* Override any GCC internal prototype to avoid an error.
17537 Use char because int might match the return type of a GCC
17538 builtin and then its argument prototype would still apply. */
503d2be0
AS
17539#ifdef __cplusplus
17540extern "C"
17541#endif
98418dba 17542char dg_sys_info ();
503d2be0
AS
17543int
17544main ()
17545{
ca81d7a0 17546return dg_sys_info ();
503d2be0
AS
17547 ;
17548 return 0;
17549}
17550_ACEOF
17551rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17552if { (ac_try="$ac_link"
17553case "(($ac_try" in
17554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17555 *) ac_try_echo=$ac_try;;
17556esac
17557eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17558 (eval "$ac_link") 2>conftest.er1
503d2be0 17559 ac_status=$?
edfaf76d
LK
17560 grep -v '^ *+' conftest.er1 >conftest.err
17561 rm -f conftest.er1
17562 cat conftest.err >&5
c0d27fcc 17563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17564 (exit $ac_status); } && {
17565 test -z "$ac_c_werror_flag" ||
17566 test ! -s conftest.err
17567 } && test -s conftest$ac_exeext &&
17568 $as_test_x conftest$ac_exeext; then
98418dba 17569 ac_cv_lib_dgc_dg_sys_info=yes
503d2be0
AS
17570else
17571 echo "$as_me: failed program was:" >&5
19650fd6
AS
17572sed 's/^/| /' conftest.$ac_ext >&5
17573
ca81d7a0 17574 ac_cv_lib_dgc_dg_sys_info=no
503d2be0 17575fi
ca81d7a0 17576
f053c89f 17577rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17578 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
17579LIBS=$ac_check_lib_save_LIBS
17580fi
ca81d7a0
JD
17581{ echo "$as_me:$LINENO: result: $ac_cv_lib_dgc_dg_sys_info" >&5
17582echo "${ECHO_T}$ac_cv_lib_dgc_dg_sys_info" >&6; }
98418dba 17583if test $ac_cv_lib_dgc_dg_sys_info = yes; then
c0d27fcc 17584 cat >>confdefs.h <<_ACEOF
98418dba 17585#define HAVE_LIBDGC 1
c0d27fcc 17586_ACEOF
ba4481b5 17587
98418dba 17588 LIBS="-ldgc $LIBS"
ba4481b5 17589
ba4481b5
DL
17590fi
17591
98418dba 17592fi
503d2be0 17593
c0d27fcc
MR
17594
17595
17596if test "${ac_cv_header_locale_h+set}" = set; then
ca81d7a0
JD
17597 { echo "$as_me:$LINENO: checking for locale.h" >&5
17598echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
98418dba 17599if test "${ac_cv_header_locale_h+set}" = set; then
503d2be0 17600 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17601fi
ca81d7a0
JD
17602{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17603echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
503d2be0 17604else
c0d27fcc 17605 # Is the header compilable?
ca81d7a0
JD
17606{ echo "$as_me:$LINENO: checking locale.h usability" >&5
17607echo $ECHO_N "checking locale.h usability... $ECHO_C" >&6; }
c0d27fcc 17608cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17609/* confdefs.h. */
17610_ACEOF
17611cat confdefs.h >>conftest.$ac_ext
17612cat >>conftest.$ac_ext <<_ACEOF
17613/* end confdefs.h. */
c0d27fcc
MR
17614$ac_includes_default
17615#include <locale.h>
17616_ACEOF
17617rm -f conftest.$ac_objext
ca81d7a0
JD
17618if { (ac_try="$ac_compile"
17619case "(($ac_try" in
17620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17621 *) ac_try_echo=$ac_try;;
17622esac
17623eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17624 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17625 ac_status=$?
edfaf76d
LK
17626 grep -v '^ *+' conftest.er1 >conftest.err
17627 rm -f conftest.er1
17628 cat conftest.err >&5
c0d27fcc 17629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17630 (exit $ac_status); } && {
17631 test -z "$ac_c_werror_flag" ||
17632 test ! -s conftest.err
17633 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17634 ac_header_compiler=yes
17635else
17636 echo "$as_me: failed program was:" >&5
19650fd6
AS
17637sed 's/^/| /' conftest.$ac_ext >&5
17638
ca81d7a0 17639 ac_header_compiler=no
c0d27fcc 17640fi
ca81d7a0
JD
17641
17642rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17643{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17644echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17645
17646# Is the header present?
ca81d7a0
JD
17647{ echo "$as_me:$LINENO: checking locale.h presence" >&5
17648echo $ECHO_N "checking locale.h presence... $ECHO_C" >&6; }
c0d27fcc 17649cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17650/* confdefs.h. */
17651_ACEOF
17652cat confdefs.h >>conftest.$ac_ext
17653cat >>conftest.$ac_ext <<_ACEOF
17654/* end confdefs.h. */
98418dba 17655#include <locale.h>
503d2be0 17656_ACEOF
ca81d7a0
JD
17657if { (ac_try="$ac_cpp conftest.$ac_ext"
17658case "(($ac_try" in
17659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17660 *) ac_try_echo=$ac_try;;
17661esac
17662eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17663 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17664 ac_status=$?
6bae0ccf 17665 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
17666 rm -f conftest.er1
17667 cat conftest.err >&5
c0d27fcc 17668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17669 (exit $ac_status); } >/dev/null && {
17670 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17671 test ! -s conftest.err
17672 }; then
c0d27fcc 17673 ac_header_preproc=yes
98418dba
CW
17674else
17675 echo "$as_me: failed program was:" >&5
19650fd6
AS
17676sed 's/^/| /' conftest.$ac_ext >&5
17677
c0d27fcc 17678 ac_header_preproc=no
ba4481b5 17679fi
ca81d7a0 17680
98418dba 17681rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17682{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17683echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17684
17685# So? What about this header?
edfaf76d
LK
17686case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17687 yes:no: )
c0d27fcc
MR
17688 { echo "$as_me:$LINENO: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&5
17689echo "$as_me: WARNING: locale.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17690 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the compiler's result" >&5
17691echo "$as_me: WARNING: locale.h: proceeding with the compiler's result" >&2;}
17692 ac_header_preproc=yes
19650fd6 17693 ;;
edfaf76d 17694 no:yes:* )
c0d27fcc
MR
17695 { echo "$as_me:$LINENO: WARNING: locale.h: present but cannot be compiled" >&5
17696echo "$as_me: WARNING: locale.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17697 { echo "$as_me:$LINENO: WARNING: locale.h: check for missing prerequisite headers?" >&5
17698echo "$as_me: WARNING: locale.h: check for missing prerequisite headers?" >&2;}
17699 { echo "$as_me:$LINENO: WARNING: locale.h: see the Autoconf documentation" >&5
17700echo "$as_me: WARNING: locale.h: see the Autoconf documentation" >&2;}
17701 { echo "$as_me:$LINENO: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&5
17702echo "$as_me: WARNING: locale.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17703 { echo "$as_me:$LINENO: WARNING: locale.h: proceeding with the preprocessor's result" >&5
19650fd6 17704echo "$as_me: WARNING: locale.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17705 { echo "$as_me:$LINENO: WARNING: locale.h: in the future, the compiler will take precedence" >&5
17706echo "$as_me: WARNING: locale.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17707
19650fd6 17708 ;;
c0d27fcc 17709esac
ca81d7a0
JD
17710{ echo "$as_me:$LINENO: checking for locale.h" >&5
17711echo $ECHO_N "checking for locale.h... $ECHO_C" >&6; }
c0d27fcc
MR
17712if test "${ac_cv_header_locale_h+set}" = set; then
17713 echo $ECHO_N "(cached) $ECHO_C" >&6
17714else
17715 ac_cv_header_locale_h=$ac_header_preproc
ba4481b5 17716fi
ca81d7a0
JD
17717{ echo "$as_me:$LINENO: result: $ac_cv_header_locale_h" >&5
17718echo "${ECHO_T}$ac_cv_header_locale_h" >&6; }
98418dba 17719
c0d27fcc
MR
17720fi
17721
17722
17723
98418dba 17724for ac_func in setlocale
ba4481b5 17725do
503d2be0 17726as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
17727{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17728echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
17729if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 17730 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 17731else
503d2be0 17732 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17733/* confdefs.h. */
17734_ACEOF
17735cat confdefs.h >>conftest.$ac_ext
17736cat >>conftest.$ac_ext <<_ACEOF
17737/* end confdefs.h. */
edfaf76d
LK
17738/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17739 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17740#define $ac_func innocuous_$ac_func
17741
ba4481b5 17742/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
17743 which can conflict with char $ac_func (); below.
17744 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17745 <limits.h> exists even on freestanding compilers. */
edfaf76d 17746
19650fd6
AS
17747#ifdef __STDC__
17748# include <limits.h>
17749#else
17750# include <assert.h>
17751#endif
edfaf76d
LK
17752
17753#undef $ac_func
17754
ca81d7a0
JD
17755/* Override any GCC internal prototype to avoid an error.
17756 Use char because int might match the return type of a GCC
17757 builtin and then its argument prototype would still apply. */
503d2be0
AS
17758#ifdef __cplusplus
17759extern "C"
17760#endif
503d2be0 17761char $ac_func ();
ba4481b5
DL
17762/* The GNU C library defines this for functions which it implements
17763 to always fail with ENOSYS. Some functions are actually named
17764 something starting with __ and the normal name is an alias. */
ca81d7a0 17765#if defined __stub_$ac_func || defined __stub___$ac_func
ba4481b5 17766choke me
ba4481b5
DL
17767#endif
17768
19650fd6
AS
17769int
17770main ()
17771{
ca81d7a0 17772return $ac_func ();
503d2be0
AS
17773 ;
17774 return 0;
17775}
17776_ACEOF
17777rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
17778if { (ac_try="$ac_link"
17779case "(($ac_try" in
17780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17781 *) ac_try_echo=$ac_try;;
17782esac
17783eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17784 (eval "$ac_link") 2>conftest.er1
503d2be0 17785 ac_status=$?
edfaf76d
LK
17786 grep -v '^ *+' conftest.er1 >conftest.err
17787 rm -f conftest.er1
17788 cat conftest.err >&5
c0d27fcc 17789 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17790 (exit $ac_status); } && {
17791 test -z "$ac_c_werror_flag" ||
17792 test ! -s conftest.err
17793 } && test -s conftest$ac_exeext &&
17794 $as_test_x conftest$ac_exeext; then
503d2be0
AS
17795 eval "$as_ac_var=yes"
17796else
17797 echo "$as_me: failed program was:" >&5
19650fd6
AS
17798sed 's/^/| /' conftest.$ac_ext >&5
17799
ca81d7a0 17800 eval "$as_ac_var=no"
503d2be0 17801fi
ca81d7a0 17802
f053c89f 17803rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 17804 conftest$ac_exeext conftest.$ac_ext
503d2be0 17805fi
ca81d7a0
JD
17806ac_res=`eval echo '${'$as_ac_var'}'`
17807 { echo "$as_me:$LINENO: result: $ac_res" >&5
17808echo "${ECHO_T}$ac_res" >&6; }
503d2be0 17809if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 17810 cat >>confdefs.h <<_ACEOF
503d2be0 17811#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 17812_ACEOF
ba4481b5 17813
ba4481b5
DL
17814fi
17815done
17816
c0d27fcc 17817
98418dba
CW
17818# We cannot check for <dwarf.h>, because Solaris 2 does not use dwarf (it
17819# uses stabs), but it is still SVR4. We cannot check for <elf.h> because
17820# Irix 4.0.5F has the header but not the library.
17821if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then
17822 ac_have_func=yes
17823
c0d27fcc 17824cat >>confdefs.h <<\_ACEOF
98418dba 17825#define SVR4 1
c0d27fcc 17826_ACEOF
98418dba
CW
17827
17828fi
17829
17830if test $ac_have_func = no; then
c0d27fcc 17831 if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
ca81d7a0
JD
17832 { echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17833echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
98418dba 17834if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
503d2be0 17835 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17836fi
ca81d7a0
JD
17837{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17838echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
98418dba 17839else
c0d27fcc 17840 # Is the header compilable?
ca81d7a0
JD
17841{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h usability" >&5
17842echo $ECHO_N "checking inq_stats/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17843cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17844/* confdefs.h. */
17845_ACEOF
17846cat confdefs.h >>conftest.$ac_ext
17847cat >>conftest.$ac_ext <<_ACEOF
17848/* end confdefs.h. */
c0d27fcc
MR
17849$ac_includes_default
17850#include <inq_stats/cpustats.h>
17851_ACEOF
17852rm -f conftest.$ac_objext
ca81d7a0
JD
17853if { (ac_try="$ac_compile"
17854case "(($ac_try" in
17855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17856 *) ac_try_echo=$ac_try;;
17857esac
17858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17859 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 17860 ac_status=$?
edfaf76d
LK
17861 grep -v '^ *+' conftest.er1 >conftest.err
17862 rm -f conftest.er1
17863 cat conftest.err >&5
c0d27fcc 17864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17865 (exit $ac_status); } && {
17866 test -z "$ac_c_werror_flag" ||
17867 test ! -s conftest.err
17868 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
17869 ac_header_compiler=yes
17870else
17871 echo "$as_me: failed program was:" >&5
19650fd6
AS
17872sed 's/^/| /' conftest.$ac_ext >&5
17873
ca81d7a0 17874 ac_header_compiler=no
c0d27fcc 17875fi
ca81d7a0
JD
17876
17877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17878{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17879echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
17880
17881# Is the header present?
ca81d7a0
JD
17882{ echo "$as_me:$LINENO: checking inq_stats/cpustats.h presence" >&5
17883echo $ECHO_N "checking inq_stats/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 17884cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17885/* confdefs.h. */
17886_ACEOF
17887cat confdefs.h >>conftest.$ac_ext
17888cat >>conftest.$ac_ext <<_ACEOF
17889/* end confdefs.h. */
98418dba 17890#include <inq_stats/cpustats.h>
503d2be0 17891_ACEOF
ca81d7a0
JD
17892if { (ac_try="$ac_cpp conftest.$ac_ext"
17893case "(($ac_try" in
17894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17895 *) ac_try_echo=$ac_try;;
17896esac
17897eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17898 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 17899 ac_status=$?
6bae0ccf 17900 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
17901 rm -f conftest.er1
17902 cat conftest.err >&5
c0d27fcc 17903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
17904 (exit $ac_status); } >/dev/null && {
17905 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17906 test ! -s conftest.err
17907 }; then
c0d27fcc 17908 ac_header_preproc=yes
503d2be0
AS
17909else
17910 echo "$as_me: failed program was:" >&5
19650fd6
AS
17911sed 's/^/| /' conftest.$ac_ext >&5
17912
c0d27fcc 17913 ac_header_preproc=no
ba4481b5 17914fi
ca81d7a0 17915
503d2be0 17916rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
17917{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17918echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
17919
17920# So? What about this header?
edfaf76d
LK
17921case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17922 yes:no: )
c0d27fcc
MR
17923 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
17924echo "$as_me: WARNING: inq_stats/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
17925 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&5
17926echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the compiler's result" >&2;}
17927 ac_header_preproc=yes
19650fd6 17928 ;;
edfaf76d 17929 no:yes:* )
c0d27fcc
MR
17930 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&5
17931echo "$as_me: WARNING: inq_stats/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
17932 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&5
17933echo "$as_me: WARNING: inq_stats/cpustats.h: check for missing prerequisite headers?" >&2;}
17934 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&5
17935echo "$as_me: WARNING: inq_stats/cpustats.h: see the Autoconf documentation" >&2;}
17936 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
17937echo "$as_me: WARNING: inq_stats/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 17938 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 17939echo "$as_me: WARNING: inq_stats/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
17940 { echo "$as_me:$LINENO: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&5
17941echo "$as_me: WARNING: inq_stats/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 17942
19650fd6 17943 ;;
c0d27fcc 17944esac
ca81d7a0
JD
17945{ echo "$as_me:$LINENO: checking for inq_stats/cpustats.h" >&5
17946echo $ECHO_N "checking for inq_stats/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
17947if test "${ac_cv_header_inq_stats_cpustats_h+set}" = set; then
17948 echo $ECHO_N "(cached) $ECHO_C" >&6
17949else
17950 ac_cv_header_inq_stats_cpustats_h=$ac_header_preproc
ba4481b5 17951fi
ca81d7a0
JD
17952{ echo "$as_me:$LINENO: result: $ac_cv_header_inq_stats_cpustats_h" >&5
17953echo "${ECHO_T}$ac_cv_header_inq_stats_cpustats_h" >&6; }
c0d27fcc
MR
17954
17955fi
98418dba
CW
17956if test $ac_cv_header_inq_stats_cpustats_h = yes; then
17957 ac_have_func=yes
ba4481b5 17958
c0d27fcc 17959cat >>confdefs.h <<\_ACEOF
98418dba 17960#define UMAX 1
c0d27fcc 17961_ACEOF
98418dba 17962
c0d27fcc
MR
17963
17964cat >>confdefs.h <<\_ACEOF
98418dba 17965#define UMAX4_3 1
c0d27fcc 17966_ACEOF
98418dba
CW
17967
17968fi
17969
c0d27fcc 17970
98418dba
CW
17971fi
17972
17973if test $ac_have_func = no; then
c0d27fcc 17974 if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
ca81d7a0
JD
17975 { echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
17976echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
98418dba 17977if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
503d2be0 17978 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 17979fi
ca81d7a0
JD
17980{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
17981echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
503d2be0 17982else
c0d27fcc 17983 # Is the header compilable?
ca81d7a0
JD
17984{ echo "$as_me:$LINENO: checking sys/cpustats.h usability" >&5
17985echo $ECHO_N "checking sys/cpustats.h usability... $ECHO_C" >&6; }
c0d27fcc 17986cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
17987/* confdefs.h. */
17988_ACEOF
17989cat confdefs.h >>conftest.$ac_ext
17990cat >>conftest.$ac_ext <<_ACEOF
17991/* end confdefs.h. */
c0d27fcc
MR
17992$ac_includes_default
17993#include <sys/cpustats.h>
17994_ACEOF
17995rm -f conftest.$ac_objext
ca81d7a0
JD
17996if { (ac_try="$ac_compile"
17997case "(($ac_try" in
17998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17999 *) ac_try_echo=$ac_try;;
18000esac
18001eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18002 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18003 ac_status=$?
edfaf76d
LK
18004 grep -v '^ *+' conftest.er1 >conftest.err
18005 rm -f conftest.er1
18006 cat conftest.err >&5
c0d27fcc 18007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18008 (exit $ac_status); } && {
18009 test -z "$ac_c_werror_flag" ||
18010 test ! -s conftest.err
18011 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18012 ac_header_compiler=yes
18013else
18014 echo "$as_me: failed program was:" >&5
19650fd6
AS
18015sed 's/^/| /' conftest.$ac_ext >&5
18016
ca81d7a0 18017 ac_header_compiler=no
c0d27fcc 18018fi
ca81d7a0
JD
18019
18020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18021{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18022echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18023
18024# Is the header present?
ca81d7a0
JD
18025{ echo "$as_me:$LINENO: checking sys/cpustats.h presence" >&5
18026echo $ECHO_N "checking sys/cpustats.h presence... $ECHO_C" >&6; }
c0d27fcc 18027cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18028/* confdefs.h. */
18029_ACEOF
18030cat confdefs.h >>conftest.$ac_ext
18031cat >>conftest.$ac_ext <<_ACEOF
18032/* end confdefs.h. */
98418dba
CW
18033#include <sys/cpustats.h>
18034_ACEOF
ca81d7a0
JD
18035if { (ac_try="$ac_cpp conftest.$ac_ext"
18036case "(($ac_try" in
18037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18038 *) ac_try_echo=$ac_try;;
18039esac
18040eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18041 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
98418dba 18042 ac_status=$?
6bae0ccf 18043 grep -v '^ *+' conftest.er1 >conftest.err
98418dba
CW
18044 rm -f conftest.er1
18045 cat conftest.err >&5
c0d27fcc 18046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18047 (exit $ac_status); } >/dev/null && {
18048 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18049 test ! -s conftest.err
18050 }; then
c0d27fcc 18051 ac_header_preproc=yes
98418dba
CW
18052else
18053 echo "$as_me: failed program was:" >&5
19650fd6
AS
18054sed 's/^/| /' conftest.$ac_ext >&5
18055
c0d27fcc 18056 ac_header_preproc=no
98418dba 18057fi
ca81d7a0 18058
98418dba 18059rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18060{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18061echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18062
18063# So? What about this header?
edfaf76d
LK
18064case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18065 yes:no: )
c0d27fcc
MR
18066 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&5
18067echo "$as_me: WARNING: sys/cpustats.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18068 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&5
18069echo "$as_me: WARNING: sys/cpustats.h: proceeding with the compiler's result" >&2;}
18070 ac_header_preproc=yes
19650fd6 18071 ;;
edfaf76d 18072 no:yes:* )
c0d27fcc
MR
18073 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: present but cannot be compiled" >&5
18074echo "$as_me: WARNING: sys/cpustats.h: present but cannot be compiled" >&2;}
edfaf76d
LK
18075 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&5
18076echo "$as_me: WARNING: sys/cpustats.h: check for missing prerequisite headers?" >&2;}
18077 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: see the Autoconf documentation" >&5
18078echo "$as_me: WARNING: sys/cpustats.h: see the Autoconf documentation" >&2;}
18079 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&5
18080echo "$as_me: WARNING: sys/cpustats.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18081 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&5
19650fd6 18082echo "$as_me: WARNING: sys/cpustats.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18083 { echo "$as_me:$LINENO: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&5
18084echo "$as_me: WARNING: sys/cpustats.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18085
19650fd6 18086 ;;
c0d27fcc 18087esac
ca81d7a0
JD
18088{ echo "$as_me:$LINENO: checking for sys/cpustats.h" >&5
18089echo $ECHO_N "checking for sys/cpustats.h... $ECHO_C" >&6; }
c0d27fcc
MR
18090if test "${ac_cv_header_sys_cpustats_h+set}" = set; then
18091 echo $ECHO_N "(cached) $ECHO_C" >&6
18092else
18093 ac_cv_header_sys_cpustats_h=$ac_header_preproc
98418dba 18094fi
ca81d7a0
JD
18095{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_cpustats_h" >&5
18096echo "${ECHO_T}$ac_cv_header_sys_cpustats_h" >&6; }
c0d27fcc
MR
18097
18098fi
98418dba 18099if test $ac_cv_header_sys_cpustats_h = yes; then
c0d27fcc 18100 ac_have_func=yes; cat >>confdefs.h <<\_ACEOF
98418dba 18101#define UMAX 1
c0d27fcc 18102_ACEOF
ba4481b5 18103
98418dba
CW
18104fi
18105
c0d27fcc 18106
98418dba
CW
18107fi
18108
18109if test $ac_have_func = no; then
18110
18111for ac_header in mach/mach.h
2c9dccc9
PJ
18112do
18113as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18114if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18115 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18116echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18117if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2c9dccc9 18118 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 18119fi
ca81d7a0
JD
18120ac_res=`eval echo '${'$as_ac_Header'}'`
18121 { echo "$as_me:$LINENO: result: $ac_res" >&5
18122echo "${ECHO_T}$ac_res" >&6; }
98418dba 18123else
c0d27fcc 18124 # Is the header compilable?
ca81d7a0
JD
18125{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18126echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18127cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18128/* confdefs.h. */
18129_ACEOF
18130cat confdefs.h >>conftest.$ac_ext
18131cat >>conftest.$ac_ext <<_ACEOF
18132/* end confdefs.h. */
c0d27fcc
MR
18133$ac_includes_default
18134#include <$ac_header>
18135_ACEOF
18136rm -f conftest.$ac_objext
ca81d7a0
JD
18137if { (ac_try="$ac_compile"
18138case "(($ac_try" in
18139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18140 *) ac_try_echo=$ac_try;;
18141esac
18142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18143 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18144 ac_status=$?
edfaf76d
LK
18145 grep -v '^ *+' conftest.er1 >conftest.err
18146 rm -f conftest.er1
18147 cat conftest.err >&5
c0d27fcc 18148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18149 (exit $ac_status); } && {
18150 test -z "$ac_c_werror_flag" ||
18151 test ! -s conftest.err
18152 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
18153 ac_header_compiler=yes
18154else
18155 echo "$as_me: failed program was:" >&5
19650fd6
AS
18156sed 's/^/| /' conftest.$ac_ext >&5
18157
ca81d7a0 18158 ac_header_compiler=no
c0d27fcc 18159fi
ca81d7a0
JD
18160
18161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18162{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18163echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
18164
18165# Is the header present?
ca81d7a0
JD
18166{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18167echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18168cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18169/* confdefs.h. */
18170_ACEOF
18171cat confdefs.h >>conftest.$ac_ext
18172cat >>conftest.$ac_ext <<_ACEOF
18173/* end confdefs.h. */
2c9dccc9
PJ
18174#include <$ac_header>
18175_ACEOF
ca81d7a0
JD
18176if { (ac_try="$ac_cpp conftest.$ac_ext"
18177case "(($ac_try" in
18178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18179 *) ac_try_echo=$ac_try;;
18180esac
18181eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18182 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2c9dccc9 18183 ac_status=$?
6bae0ccf 18184 grep -v '^ *+' conftest.er1 >conftest.err
2c9dccc9
PJ
18185 rm -f conftest.er1
18186 cat conftest.err >&5
c0d27fcc 18187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18188 (exit $ac_status); } >/dev/null && {
18189 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18190 test ! -s conftest.err
18191 }; then
c0d27fcc
MR
18192 ac_header_preproc=yes
18193else
18194 echo "$as_me: failed program was:" >&5
19650fd6
AS
18195sed 's/^/| /' conftest.$ac_ext >&5
18196
c0d27fcc
MR
18197 ac_header_preproc=no
18198fi
ca81d7a0 18199
c0d27fcc 18200rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18201{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18202echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18203
18204# So? What about this header?
edfaf76d
LK
18205case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18206 yes:no: )
c0d27fcc
MR
18207 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18208echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18209 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18210echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18211 ac_header_preproc=yes
19650fd6 18212 ;;
edfaf76d 18213 no:yes:* )
c0d27fcc
MR
18214 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18215echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18216 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18217echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18218 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18219echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18220 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18221echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18222 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18223echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18224 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18225echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18226
19650fd6 18227 ;;
c0d27fcc 18228esac
ca81d7a0
JD
18229{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18230echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18231if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18232 echo $ECHO_N "(cached) $ECHO_C" >&6
18233else
edfaf76d 18234 eval "$as_ac_Header=\$ac_header_preproc"
c0d27fcc 18235fi
ca81d7a0
JD
18236ac_res=`eval echo '${'$as_ac_Header'}'`
18237 { echo "$as_me:$LINENO: result: $ac_res" >&5
18238echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18239
18240fi
18241if test `eval echo '${'$as_ac_Header'}'` = yes; then
18242 cat >>confdefs.h <<_ACEOF
18243#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18244_ACEOF
18245
18246fi
18247
18248done
18249
18250fi
18251
18252
18253for ac_header in nlist.h
18254do
18255as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18256if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18257 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18258echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18259if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18260 echo $ECHO_N "(cached) $ECHO_C" >&6
18261fi
ca81d7a0
JD
18262ac_res=`eval echo '${'$as_ac_Header'}'`
18263 { echo "$as_me:$LINENO: result: $ac_res" >&5
18264echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18265else
18266 # Is the header compilable?
ca81d7a0
JD
18267{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18268echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 18269cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18270/* confdefs.h. */
18271_ACEOF
18272cat confdefs.h >>conftest.$ac_ext
18273cat >>conftest.$ac_ext <<_ACEOF
18274/* end confdefs.h. */
c0d27fcc
MR
18275$ac_includes_default
18276#include <$ac_header>
18277_ACEOF
18278rm -f conftest.$ac_objext
ca81d7a0
JD
18279if { (ac_try="$ac_compile"
18280case "(($ac_try" in
18281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18282 *) ac_try_echo=$ac_try;;
18283esac
18284eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18285 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 18286 ac_status=$?
edfaf76d
LK
18287 grep -v '^ *+' conftest.er1 >conftest.err
18288 rm -f conftest.er1
18289 cat conftest.err >&5
c0d27fcc 18290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18291 (exit $ac_status); } && {
18292 test -z "$ac_c_werror_flag" ||
18293 test ! -s conftest.err
18294 } && test -s conftest.$ac_objext; then
c0d27fcc 18295 ac_header_compiler=yes
2c9dccc9
PJ
18296else
18297 echo "$as_me: failed program was:" >&5
19650fd6
AS
18298sed 's/^/| /' conftest.$ac_ext >&5
18299
ca81d7a0 18300 ac_header_compiler=no
98418dba 18301fi
ca81d7a0
JD
18302
18303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18304{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18305echo "${ECHO_T}$ac_header_compiler" >&6; }
98418dba 18306
c0d27fcc 18307# Is the header present?
ca81d7a0
JD
18308{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18309echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 18310cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18311/* confdefs.h. */
18312_ACEOF
18313cat confdefs.h >>conftest.$ac_ext
18314cat >>conftest.$ac_ext <<_ACEOF
18315/* end confdefs.h. */
503d2be0
AS
18316#include <$ac_header>
18317_ACEOF
ca81d7a0
JD
18318if { (ac_try="$ac_cpp conftest.$ac_ext"
18319case "(($ac_try" in
18320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18321 *) ac_try_echo=$ac_try;;
18322esac
18323eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18324 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 18325 ac_status=$?
6bae0ccf 18326 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
18327 rm -f conftest.er1
18328 cat conftest.err >&5
c0d27fcc 18329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18330 (exit $ac_status); } >/dev/null && {
18331 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18332 test ! -s conftest.err
18333 }; then
c0d27fcc 18334 ac_header_preproc=yes
503d2be0
AS
18335else
18336 echo "$as_me: failed program was:" >&5
19650fd6
AS
18337sed 's/^/| /' conftest.$ac_ext >&5
18338
c0d27fcc 18339 ac_header_preproc=no
b5de8dc0 18340fi
ca81d7a0 18341
503d2be0 18342rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18343{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18344echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
18345
18346# So? What about this header?
edfaf76d
LK
18347case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18348 yes:no: )
c0d27fcc
MR
18349 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18350echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
18351 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18352echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18353 ac_header_preproc=yes
19650fd6 18354 ;;
edfaf76d 18355 no:yes:* )
c0d27fcc
MR
18356 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18357echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
18358 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18359echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18360 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18361echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18362 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18363echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 18364 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 18365echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
18366 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18367echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18368
19650fd6 18369 ;;
c0d27fcc 18370esac
ca81d7a0
JD
18371{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18372echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18373if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
18374 echo $ECHO_N "(cached) $ECHO_C" >&6
18375else
edfaf76d 18376 eval "$as_ac_Header=\$ac_header_preproc"
b5de8dc0 18377fi
ca81d7a0
JD
18378ac_res=`eval echo '${'$as_ac_Header'}'`
18379 { echo "$as_me:$LINENO: result: $ac_res" >&5
18380echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
18381
18382fi
98418dba 18383if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 18384 cat >>confdefs.h <<_ACEOF
98418dba 18385#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 18386_ACEOF
ca81d7a0
JD
18387 { echo "$as_me:$LINENO: checking for struct nlist.n_un.n_name" >&5
18388echo $ECHO_N "checking for struct nlist.n_un.n_name... $ECHO_C" >&6; }
98418dba 18389if test "${ac_cv_member_struct_nlist_n_un_n_name+set}" = set; then
503d2be0 18390 echo $ECHO_N "(cached) $ECHO_C" >&6
b5de8dc0 18391else
503d2be0 18392 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18393/* confdefs.h. */
18394_ACEOF
18395cat confdefs.h >>conftest.$ac_ext
18396cat >>conftest.$ac_ext <<_ACEOF
18397/* end confdefs.h. */
98418dba 18398#include <nlist.h>
b5de8dc0 18399
503d2be0
AS
18400int
18401main ()
18402{
98418dba
CW
18403static struct nlist ac_aggr;
18404if (ac_aggr.n_un.n_name)
18405return 0;
503d2be0
AS
18406 ;
18407 return 0;
18408}
18409_ACEOF
98418dba 18410rm -f conftest.$ac_objext
ca81d7a0
JD
18411if { (ac_try="$ac_compile"
18412case "(($ac_try" in
18413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18414 *) ac_try_echo=$ac_try;;
18415esac
18416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18417 (eval "$ac_compile") 2>conftest.er1
503d2be0 18418 ac_status=$?
edfaf76d
LK
18419 grep -v '^ *+' conftest.er1 >conftest.err
18420 rm -f conftest.er1
18421 cat conftest.err >&5
c0d27fcc 18422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18423 (exit $ac_status); } && {
18424 test -z "$ac_c_werror_flag" ||
18425 test ! -s conftest.err
18426 } && test -s conftest.$ac_objext; then
edfaf76d 18427 ac_cv_member_struct_nlist_n_un_n_name=yes
503d2be0
AS
18428else
18429 echo "$as_me: failed program was:" >&5
19650fd6
AS
18430sed 's/^/| /' conftest.$ac_ext >&5
18431
ca81d7a0 18432 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18433/* confdefs.h. */
18434_ACEOF
18435cat confdefs.h >>conftest.$ac_ext
18436cat >>conftest.$ac_ext <<_ACEOF
18437/* end confdefs.h. */
6bae0ccf
DL
18438#include <nlist.h>
18439
18440int
18441main ()
18442{
18443static struct nlist ac_aggr;
18444if (sizeof ac_aggr.n_un.n_name)
18445return 0;
18446 ;
18447 return 0;
18448}
18449_ACEOF
18450rm -f conftest.$ac_objext
ca81d7a0
JD
18451if { (ac_try="$ac_compile"
18452case "(($ac_try" in
18453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18454 *) ac_try_echo=$ac_try;;
18455esac
18456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18457 (eval "$ac_compile") 2>conftest.er1
6bae0ccf 18458 ac_status=$?
edfaf76d
LK
18459 grep -v '^ *+' conftest.er1 >conftest.err
18460 rm -f conftest.er1
18461 cat conftest.err >&5
6bae0ccf 18462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
18463 (exit $ac_status); } && {
18464 test -z "$ac_c_werror_flag" ||
18465 test ! -s conftest.err
18466 } && test -s conftest.$ac_objext; then
6bae0ccf
DL
18467 ac_cv_member_struct_nlist_n_un_n_name=yes
18468else
18469 echo "$as_me: failed program was:" >&5
19650fd6
AS
18470sed 's/^/| /' conftest.$ac_ext >&5
18471
ca81d7a0 18472 ac_cv_member_struct_nlist_n_un_n_name=no
503d2be0 18473fi
ca81d7a0
JD
18474
18475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
b5de8dc0 18476fi
ca81d7a0
JD
18477
18478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6bae0ccf 18479fi
ca81d7a0
JD
18480{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_nlist_n_un_n_name" >&5
18481echo "${ECHO_T}$ac_cv_member_struct_nlist_n_un_n_name" >&6; }
98418dba 18482if test $ac_cv_member_struct_nlist_n_un_n_name = yes; then
b5de8dc0 18483
c0d27fcc 18484cat >>confdefs.h <<_ACEOF
98418dba 18485#define HAVE_STRUCT_NLIST_N_UN_N_NAME 1
c0d27fcc 18486_ACEOF
b5de8dc0 18487
c0d27fcc
MR
18488
18489cat >>confdefs.h <<\_ACEOF
98418dba 18490#define NLIST_NAME_UNION 1
c0d27fcc 18491_ACEOF
b5de8dc0 18492
98418dba 18493fi
b5de8dc0 18494
c0d27fcc 18495
98418dba 18496fi
c0d27fcc 18497
98418dba 18498done
b5de8dc0 18499
98418dba
CW
18500fi
18501done
b5de8dc0 18502
c0d27fcc 18503
98418dba 18504# Some definitions of getloadavg require that the program be installed setgid.
ca81d7a0
JD
18505{ echo "$as_me:$LINENO: checking whether getloadavg requires setgid" >&5
18506echo $ECHO_N "checking whether getloadavg requires setgid... $ECHO_C" >&6; }
98418dba
CW
18507if test "${ac_cv_func_getloadavg_setgid+set}" = set; then
18508 echo $ECHO_N "(cached) $ECHO_C" >&6
18509else
18510 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18511/* confdefs.h. */
18512_ACEOF
18513cat confdefs.h >>conftest.$ac_ext
18514cat >>conftest.$ac_ext <<_ACEOF
18515/* end confdefs.h. */
6bae0ccf 18516#include "$srcdir/$ac_config_libobj_dir/getloadavg.c"
98418dba
CW
18517#ifdef LDAV_PRIVILEGED
18518Yowza Am I SETGID yet
18519#endif
18520_ACEOF
18521if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 18522 $EGREP "Yowza Am I SETGID yet" >/dev/null 2>&1; then
98418dba
CW
18523 ac_cv_func_getloadavg_setgid=yes
18524else
18525 ac_cv_func_getloadavg_setgid=no
18526fi
18527rm -f conftest*
b5de8dc0 18528
98418dba 18529fi
ca81d7a0
JD
18530{ echo "$as_me:$LINENO: result: $ac_cv_func_getloadavg_setgid" >&5
18531echo "${ECHO_T}$ac_cv_func_getloadavg_setgid" >&6; }
98418dba
CW
18532if test $ac_cv_func_getloadavg_setgid = yes; then
18533 NEED_SETGID=true
b5de8dc0 18534
c0d27fcc 18535cat >>confdefs.h <<\_ACEOF
98418dba 18536#define GETLOADAVG_PRIVILEGED 1
c0d27fcc 18537_ACEOF
98418dba 18538
b5de8dc0 18539else
98418dba 18540 NEED_SETGID=false
b5de8dc0 18541fi
98418dba
CW
18542
18543if test $ac_cv_func_getloadavg_setgid = yes; then
ca81d7a0
JD
18544 { echo "$as_me:$LINENO: checking group of /dev/kmem" >&5
18545echo $ECHO_N "checking group of /dev/kmem... $ECHO_C" >&6; }
98418dba
CW
18546if test "${ac_cv_group_kmem+set}" = set; then
18547 echo $ECHO_N "(cached) $ECHO_C" >&6
18548else
18549 # On Solaris, /dev/kmem is a symlink. Get info on the real file.
18550 ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
18551 # If we got an error (system does not support symlinks), try without -L.
18552 test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
18553 ac_cv_group_kmem=`echo $ac_ls_output \
edfaf76d 18554 | sed -ne 's/[ ][ ]*/ /g;
98418dba
CW
18555 s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
18556 / /s/.* //;p;'`
18557
b5de8dc0 18558fi
ca81d7a0
JD
18559{ echo "$as_me:$LINENO: result: $ac_cv_group_kmem" >&5
18560echo "${ECHO_T}$ac_cv_group_kmem" >&6; }
98418dba 18561 KMEM_GROUP=$ac_cv_group_kmem
b5de8dc0 18562fi
98418dba
CW
18563if test "x$ac_save_LIBS" = x; then
18564 GETLOADAVG_LIBS=$LIBS
18565else
18566 GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
b5de8dc0 18567fi
98418dba 18568LIBS=$ac_save_LIBS
b5de8dc0 18569
c0d27fcc
MR
18570
18571
ca81d7a0
JD
18572{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
18573echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
b936fae4 18574if test "${ac_cv_sys_largefile_source+set}" = set; then
503d2be0 18575 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 18576else
b936fae4 18577 while :; do
503d2be0 18578 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18579/* confdefs.h. */
18580_ACEOF
18581cat confdefs.h >>conftest.$ac_ext
18582cat >>conftest.$ac_ext <<_ACEOF
18583/* end confdefs.h. */
9d2818d6 18584#include <stdio.h>
503d2be0
AS
18585int
18586main ()
18587{
9d2818d6 18588return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18589 ;
18590 return 0;
18591}
18592_ACEOF
f053c89f
CY
18593rm -f conftest.$ac_objext conftest$ac_exeext
18594if { (ac_try="$ac_link"
ca81d7a0
JD
18595case "(($ac_try" in
18596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18597 *) ac_try_echo=$ac_try;;
18598esac
18599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18600 (eval "$ac_link") 2>conftest.er1
b936fae4 18601 ac_status=$?
edfaf76d
LK
18602 grep -v '^ *+' conftest.er1 >conftest.err
18603 rm -f conftest.er1
18604 cat conftest.err >&5
c0d27fcc 18605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18606 (exit $ac_status); } && {
18607 test -z "$ac_c_werror_flag" ||
18608 test ! -s conftest.err
18609 } && test -s conftest$ac_exeext &&
18610 $as_test_x conftest$ac_exeext; then
18611 ac_cv_sys_largefile_source=no; break
b936fae4
AS
18612else
18613 echo "$as_me: failed program was:" >&5
19650fd6
AS
18614sed 's/^/| /' conftest.$ac_ext >&5
18615
ca81d7a0 18616
b936fae4 18617fi
ca81d7a0 18618
f053c89f
CY
18619rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18620 conftest$ac_exeext conftest.$ac_ext
b936fae4 18621 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
18622/* confdefs.h. */
18623_ACEOF
18624cat confdefs.h >>conftest.$ac_ext
18625cat >>conftest.$ac_ext <<_ACEOF
18626/* end confdefs.h. */
b936fae4 18627#define _LARGEFILE_SOURCE 1
9d2818d6 18628#include <stdio.h>
b936fae4
AS
18629int
18630main ()
18631{
9d2818d6 18632return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
b936fae4
AS
18633 ;
18634 return 0;
18635}
18636_ACEOF
f053c89f
CY
18637rm -f conftest.$ac_objext conftest$ac_exeext
18638if { (ac_try="$ac_link"
ca81d7a0
JD
18639case "(($ac_try" in
18640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18641 *) ac_try_echo=$ac_try;;
18642esac
18643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 18644 (eval "$ac_link") 2>conftest.er1
b936fae4 18645 ac_status=$?
edfaf76d
LK
18646 grep -v '^ *+' conftest.er1 >conftest.err
18647 rm -f conftest.er1
18648 cat conftest.err >&5
c0d27fcc 18649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18650 (exit $ac_status); } && {
18651 test -z "$ac_c_werror_flag" ||
18652 test ! -s conftest.err
18653 } && test -s conftest$ac_exeext &&
18654 $as_test_x conftest$ac_exeext; then
b936fae4
AS
18655 ac_cv_sys_largefile_source=1; break
18656else
18657 echo "$as_me: failed program was:" >&5
19650fd6
AS
18658sed 's/^/| /' conftest.$ac_ext >&5
18659
ca81d7a0 18660
b936fae4 18661fi
ca81d7a0 18662
f053c89f
CY
18663rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18664 conftest$ac_exeext conftest.$ac_ext
18665 ac_cv_sys_largefile_source=unknown
b936fae4
AS
18666 break
18667done
18668fi
ca81d7a0
JD
18669{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
18670echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
f053c89f
CY
18671case $ac_cv_sys_largefile_source in #(
18672 no | unknown) ;;
18673 *)
c0d27fcc 18674cat >>confdefs.h <<_ACEOF
b936fae4 18675#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
c0d27fcc 18676_ACEOF
f053c89f
CY
18677;;
18678esac
b936fae4 18679rm -f conftest*
4c343001 18680
b936fae4
AS
18681# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
18682# in glibc 2.1.3, but that breaks too many other things.
18683# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
c24fa7dc 18684if test $ac_cv_sys_largefile_source != unknown; then
b936fae4 18685
c0d27fcc 18686cat >>confdefs.h <<\_ACEOF
b936fae4 18687#define HAVE_FSEEKO 1
c0d27fcc 18688_ACEOF
b936fae4 18689
4c343001
DL
18690fi
18691
c0d27fcc 18692
52dbaac8
PE
18693# Configure getopt.
18694# getopt.m4 serial 10
18695
18696# The getopt module assume you want GNU getopt, with getopt_long etc,
18697# rather than vanilla POSIX getopt. This means your your code should
18698# always include <getopt.h> for the getopt prototypes.
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710# Prerequisites of lib/getopt*.
18711
18712
18713
10a3b1a1 18714
52dbaac8
PE
18715 GETOPT_H=
18716
18717for ac_header in getopt.h
18718do
18719as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
18720if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
18721 { echo "$as_me:$LINENO: checking for $ac_header" >&5
18722echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18723if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18724 echo $ECHO_N "(cached) $ECHO_C" >&6
18725fi
ca81d7a0
JD
18726ac_res=`eval echo '${'$as_ac_Header'}'`
18727 { echo "$as_me:$LINENO: result: $ac_res" >&5
18728echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18729else
18730 # Is the header compilable?
ca81d7a0
JD
18731{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
18732echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
52dbaac8
PE
18733cat >conftest.$ac_ext <<_ACEOF
18734/* confdefs.h. */
18735_ACEOF
18736cat confdefs.h >>conftest.$ac_ext
18737cat >>conftest.$ac_ext <<_ACEOF
18738/* end confdefs.h. */
18739$ac_includes_default
18740#include <$ac_header>
18741_ACEOF
18742rm -f conftest.$ac_objext
ca81d7a0
JD
18743if { (ac_try="$ac_compile"
18744case "(($ac_try" in
18745 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18746 *) ac_try_echo=$ac_try;;
18747esac
18748eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18749 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18750 ac_status=$?
18751 grep -v '^ *+' conftest.er1 >conftest.err
18752 rm -f conftest.er1
18753 cat conftest.err >&5
18754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18755 (exit $ac_status); } && {
18756 test -z "$ac_c_werror_flag" ||
18757 test ! -s conftest.err
18758 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18759 ac_header_compiler=yes
18760else
18761 echo "$as_me: failed program was:" >&5
18762sed 's/^/| /' conftest.$ac_ext >&5
18763
ca81d7a0 18764 ac_header_compiler=no
52dbaac8 18765fi
ca81d7a0
JD
18766
18767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18768{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18769echo "${ECHO_T}$ac_header_compiler" >&6; }
52dbaac8
PE
18770
18771# Is the header present?
ca81d7a0
JD
18772{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
18773echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
52dbaac8
PE
18774cat >conftest.$ac_ext <<_ACEOF
18775/* confdefs.h. */
18776_ACEOF
18777cat confdefs.h >>conftest.$ac_ext
18778cat >>conftest.$ac_ext <<_ACEOF
18779/* end confdefs.h. */
18780#include <$ac_header>
18781_ACEOF
ca81d7a0
JD
18782if { (ac_try="$ac_cpp conftest.$ac_ext"
18783case "(($ac_try" in
18784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18785 *) ac_try_echo=$ac_try;;
18786esac
18787eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18788 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
52dbaac8
PE
18789 ac_status=$?
18790 grep -v '^ *+' conftest.er1 >conftest.err
18791 rm -f conftest.er1
18792 cat conftest.err >&5
18793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18794 (exit $ac_status); } >/dev/null && {
18795 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
18796 test ! -s conftest.err
18797 }; then
52dbaac8
PE
18798 ac_header_preproc=yes
18799else
18800 echo "$as_me: failed program was:" >&5
18801sed 's/^/| /' conftest.$ac_ext >&5
18802
18803 ac_header_preproc=no
18804fi
ca81d7a0 18805
52dbaac8 18806rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
18807{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18808echo "${ECHO_T}$ac_header_preproc" >&6; }
52dbaac8
PE
18809
18810# So? What about this header?
18811case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18812 yes:no: )
18813 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
18814echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
18815 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
18816echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
18817 ac_header_preproc=yes
18818 ;;
18819 no:yes:* )
18820 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
18821echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
18822 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
18823echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
18824 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
18825echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
18826 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
18827echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
18828 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
18829echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
18830 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
18831echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 18832
52dbaac8
PE
18833 ;;
18834esac
ca81d7a0
JD
18835{ echo "$as_me:$LINENO: checking for $ac_header" >&5
18836echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
18837if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18838 echo $ECHO_N "(cached) $ECHO_C" >&6
18839else
18840 eval "$as_ac_Header=\$ac_header_preproc"
18841fi
ca81d7a0
JD
18842ac_res=`eval echo '${'$as_ac_Header'}'`
18843 { echo "$as_me:$LINENO: result: $ac_res" >&5
18844echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18845
18846fi
18847if test `eval echo '${'$as_ac_Header'}'` = yes; then
18848 cat >>confdefs.h <<_ACEOF
18849#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18850_ACEOF
18851
18852else
18853 GETOPT_H=getopt.h
18854fi
18855
18856done
18857
18858 if test -z "$GETOPT_H"; then
18859
18860for ac_func in getopt_long_only
18861do
18862as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
18863{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18864echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18865if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
52dbaac8
PE
18866 echo $ECHO_N "(cached) $ECHO_C" >&6
18867else
18868 cat >conftest.$ac_ext <<_ACEOF
18869/* confdefs.h. */
18870_ACEOF
18871cat confdefs.h >>conftest.$ac_ext
18872cat >>conftest.$ac_ext <<_ACEOF
18873/* end confdefs.h. */
18874/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18875 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18876#define $ac_func innocuous_$ac_func
18877
18878/* System header to define __stub macros and hopefully few prototypes,
18879 which can conflict with char $ac_func (); below.
18880 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18881 <limits.h> exists even on freestanding compilers. */
18882
18883#ifdef __STDC__
18884# include <limits.h>
18885#else
18886# include <assert.h>
18887#endif
18888
18889#undef $ac_func
18890
ca81d7a0
JD
18891/* Override any GCC internal prototype to avoid an error.
18892 Use char because int might match the return type of a GCC
18893 builtin and then its argument prototype would still apply. */
52dbaac8
PE
18894#ifdef __cplusplus
18895extern "C"
52dbaac8 18896#endif
52dbaac8
PE
18897char $ac_func ();
18898/* The GNU C library defines this for functions which it implements
18899 to always fail with ENOSYS. Some functions are actually named
18900 something starting with __ and the normal name is an alias. */
ca81d7a0 18901#if defined __stub_$ac_func || defined __stub___$ac_func
52dbaac8 18902choke me
52dbaac8
PE
18903#endif
18904
18905int
18906main ()
18907{
ca81d7a0 18908return $ac_func ();
52dbaac8
PE
18909 ;
18910 return 0;
18911}
18912_ACEOF
18913rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
18914if { (ac_try="$ac_link"
18915case "(($ac_try" in
18916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18917 *) ac_try_echo=$ac_try;;
18918esac
18919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18920 (eval "$ac_link") 2>conftest.er1
52dbaac8
PE
18921 ac_status=$?
18922 grep -v '^ *+' conftest.er1 >conftest.err
18923 rm -f conftest.er1
18924 cat conftest.err >&5
18925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
18926 (exit $ac_status); } && {
18927 test -z "$ac_c_werror_flag" ||
18928 test ! -s conftest.err
18929 } && test -s conftest$ac_exeext &&
18930 $as_test_x conftest$ac_exeext; then
52dbaac8
PE
18931 eval "$as_ac_var=yes"
18932else
18933 echo "$as_me: failed program was:" >&5
18934sed 's/^/| /' conftest.$ac_ext >&5
18935
ca81d7a0 18936 eval "$as_ac_var=no"
52dbaac8 18937fi
ca81d7a0 18938
f053c89f 18939rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
52dbaac8
PE
18940 conftest$ac_exeext conftest.$ac_ext
18941fi
ca81d7a0
JD
18942ac_res=`eval echo '${'$as_ac_var'}'`
18943 { echo "$as_me:$LINENO: result: $ac_res" >&5
18944echo "${ECHO_T}$ac_res" >&6; }
52dbaac8
PE
18945if test `eval echo '${'$as_ac_var'}'` = yes; then
18946 cat >>confdefs.h <<_ACEOF
18947#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18948_ACEOF
18949
18950else
18951 GETOPT_H=getopt.h
18952fi
18953done
18954
18955 fi
18956
18957 if test -z "$GETOPT_H"; then
ca81d7a0
JD
18958 { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
18959echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
52dbaac8
PE
18960if test "${ac_cv_have_decl_optreset+set}" = set; then
18961 echo $ECHO_N "(cached) $ECHO_C" >&6
18962else
18963 cat >conftest.$ac_ext <<_ACEOF
18964/* confdefs.h. */
18965_ACEOF
18966cat confdefs.h >>conftest.$ac_ext
18967cat >>conftest.$ac_ext <<_ACEOF
18968/* end confdefs.h. */
18969#include <getopt.h>
18970
18971int
18972main ()
18973{
18974#ifndef optreset
f053c89f 18975 (void) optreset;
52dbaac8
PE
18976#endif
18977
18978 ;
18979 return 0;
18980}
18981_ACEOF
18982rm -f conftest.$ac_objext
ca81d7a0
JD
18983if { (ac_try="$ac_compile"
18984case "(($ac_try" in
18985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18986 *) ac_try_echo=$ac_try;;
18987esac
18988eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18989 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
18990 ac_status=$?
18991 grep -v '^ *+' conftest.er1 >conftest.err
18992 rm -f conftest.er1
18993 cat conftest.err >&5
18994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
18995 (exit $ac_status); } && {
18996 test -z "$ac_c_werror_flag" ||
18997 test ! -s conftest.err
18998 } && test -s conftest.$ac_objext; then
52dbaac8
PE
18999 ac_cv_have_decl_optreset=yes
19000else
19001 echo "$as_me: failed program was:" >&5
19002sed 's/^/| /' conftest.$ac_ext >&5
19003
ca81d7a0 19004 ac_cv_have_decl_optreset=no
52dbaac8 19005fi
ca81d7a0
JD
19006
19007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19008fi
ca81d7a0
JD
19009{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
19010echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
52dbaac8
PE
19011if test $ac_cv_have_decl_optreset = yes; then
19012 GETOPT_H=getopt.h
19013fi
19014
19015 fi
19016
19017 if test -z "$GETOPT_H"; then
ca81d7a0
JD
19018 { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
19019echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
52dbaac8
PE
19020if test "${gl_cv_func_gnu_getopt+set}" = set; then
19021 echo $ECHO_N "(cached) $ECHO_C" >&6
19022else
19023 if test "$cross_compiling" = yes; then
ca81d7a0
JD
19024 { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
19025echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
52dbaac8
PE
19026if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
19027 echo $ECHO_N "(cached) $ECHO_C" >&6
19028else
19029 cat >conftest.$ac_ext <<_ACEOF
19030/* confdefs.h. */
19031_ACEOF
19032cat confdefs.h >>conftest.$ac_ext
19033cat >>conftest.$ac_ext <<_ACEOF
19034/* end confdefs.h. */
19035#include <getopt.h>
19036
19037int
19038main ()
19039{
19040#ifndef getopt_clip
f053c89f 19041 (void) getopt_clip;
52dbaac8
PE
19042#endif
19043
19044 ;
19045 return 0;
19046}
19047_ACEOF
19048rm -f conftest.$ac_objext
ca81d7a0
JD
19049if { (ac_try="$ac_compile"
19050case "(($ac_try" in
19051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19052 *) ac_try_echo=$ac_try;;
19053esac
19054eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19055 (eval "$ac_compile") 2>conftest.er1
52dbaac8
PE
19056 ac_status=$?
19057 grep -v '^ *+' conftest.er1 >conftest.err
19058 rm -f conftest.er1
19059 cat conftest.err >&5
19060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19061 (exit $ac_status); } && {
19062 test -z "$ac_c_werror_flag" ||
19063 test ! -s conftest.err
19064 } && test -s conftest.$ac_objext; then
52dbaac8
PE
19065 ac_cv_have_decl_getopt_clip=yes
19066else
19067 echo "$as_me: failed program was:" >&5
19068sed 's/^/| /' conftest.$ac_ext >&5
19069
ca81d7a0 19070 ac_cv_have_decl_getopt_clip=no
52dbaac8 19071fi
ca81d7a0
JD
19072
19073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52dbaac8 19074fi
ca81d7a0
JD
19075{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
19076echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
52dbaac8
PE
19077if test $ac_cv_have_decl_getopt_clip = yes; then
19078 gl_cv_func_gnu_getopt=no
19079else
19080 gl_cv_func_gnu_getopt=yes
19081fi
19082
19083else
19084 cat >conftest.$ac_ext <<_ACEOF
19085/* confdefs.h. */
19086_ACEOF
19087cat confdefs.h >>conftest.$ac_ext
19088cat >>conftest.$ac_ext <<_ACEOF
19089/* end confdefs.h. */
19090#include <getopt.h>
19091int
19092main ()
19093{
19094
19095 char *myargv[3];
19096 myargv[0] = "conftest";
19097 myargv[1] = "-+";
19098 myargv[2] = 0;
19099 return getopt (2, myargv, "+a") != '?';
19100
19101 ;
19102 return 0;
19103}
19104_ACEOF
19105rm -f conftest$ac_exeext
ca81d7a0
JD
19106if { (ac_try="$ac_link"
19107case "(($ac_try" in
19108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19109 *) ac_try_echo=$ac_try;;
19110esac
19111eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19112 (eval "$ac_link") 2>&5
52dbaac8
PE
19113 ac_status=$?
19114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19115 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
19116 { (case "(($ac_try" in
19117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19118 *) ac_try_echo=$ac_try;;
19119esac
19120eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19121 (eval "$ac_try") 2>&5
52dbaac8
PE
19122 ac_status=$?
19123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19124 (exit $ac_status); }; }; then
19125 gl_cv_func_gnu_getopt=yes
19126else
19127 echo "$as_me: program exited with status $ac_status" >&5
19128echo "$as_me: failed program was:" >&5
19129sed 's/^/| /' conftest.$ac_ext >&5
19130
19131( exit $ac_status )
19132gl_cv_func_gnu_getopt=no
19133fi
ca81d7a0 19134rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
52dbaac8 19135fi
ca81d7a0
JD
19136
19137
52dbaac8 19138fi
ca81d7a0
JD
19139{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
19140echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
52dbaac8
PE
19141 if test "$gl_cv_func_gnu_getopt" = "no"; then
19142 GETOPT_H=getopt.h
19143 fi
19144 fi
19145
19146
19147
19148 if test -n "$GETOPT_H"; then
19149
19150
19151 GETOPT_H=getopt.h
19152
19153cat >>confdefs.h <<\_ACEOF
19154#define __GETOPT_PREFIX rpl_
19155_ACEOF
19156
19157
19158
19159 :
19160 GETOPTOBJS='getopt.o getopt1.o'
19161
19162fi
19163
19164
19165
19166
ca81d7a0
JD
19167{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
19168echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; }
cd958eb3
MB
19169if test "${ac_cv_func_getpgrp_void+set}" = set; then
19170 echo $ECHO_N "(cached) $ECHO_C" >&6
19171else
19172 # Use it with a single arg.
19173cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19174/* confdefs.h. */
19175_ACEOF
19176cat confdefs.h >>conftest.$ac_ext
19177cat >>conftest.$ac_ext <<_ACEOF
19178/* end confdefs.h. */
cd958eb3
MB
19179$ac_includes_default
19180int
19181main ()
19182{
19183getpgrp (0);
19184 ;
19185 return 0;
19186}
19187_ACEOF
19188rm -f conftest.$ac_objext
ca81d7a0
JD
19189if { (ac_try="$ac_compile"
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_compile") 2>conftest.er1
cd958eb3 19196 ac_status=$?
edfaf76d
LK
19197 grep -v '^ *+' conftest.er1 >conftest.err
19198 rm -f conftest.er1
19199 cat conftest.err >&5
cd958eb3 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_objext; then
cd958eb3
MB
19205 ac_cv_func_getpgrp_void=no
19206else
19207 echo "$as_me: failed program was:" >&5
19650fd6
AS
19208sed 's/^/| /' conftest.$ac_ext >&5
19209
ca81d7a0 19210 ac_cv_func_getpgrp_void=yes
cd958eb3 19211fi
ca81d7a0
JD
19212
19213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cd958eb3
MB
19214
19215fi
ca81d7a0
JD
19216{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
19217echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; }
cd958eb3
MB
19218if test $ac_cv_func_getpgrp_void = yes; then
19219
19220cat >>confdefs.h <<\_ACEOF
19221#define GETPGRP_VOID 1
19222_ACEOF
19223
19224fi
19225
19226
973a76b1
DL
19227
19228for ac_func in strftime
19229do
19230as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19231{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19232echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19233if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
973a76b1
DL
19234 echo $ECHO_N "(cached) $ECHO_C" >&6
19235else
19236 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19237/* confdefs.h. */
19238_ACEOF
19239cat confdefs.h >>conftest.$ac_ext
19240cat >>conftest.$ac_ext <<_ACEOF
19241/* end confdefs.h. */
edfaf76d
LK
19242/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19243 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19244#define $ac_func innocuous_$ac_func
19245
973a76b1 19246/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19247 which can conflict with char $ac_func (); below.
19248 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19249 <limits.h> exists even on freestanding compilers. */
edfaf76d 19250
19650fd6
AS
19251#ifdef __STDC__
19252# include <limits.h>
19253#else
19254# include <assert.h>
19255#endif
edfaf76d
LK
19256
19257#undef $ac_func
19258
ca81d7a0
JD
19259/* Override any GCC internal prototype to avoid an error.
19260 Use char because int might match the return type of a GCC
19261 builtin and then its argument prototype would still apply. */
973a76b1
DL
19262#ifdef __cplusplus
19263extern "C"
973a76b1 19264#endif
973a76b1
DL
19265char $ac_func ();
19266/* The GNU C library defines this for functions which it implements
19267 to always fail with ENOSYS. Some functions are actually named
19268 something starting with __ and the normal name is an alias. */
ca81d7a0 19269#if defined __stub_$ac_func || defined __stub___$ac_func
973a76b1 19270choke me
973a76b1
DL
19271#endif
19272
19650fd6
AS
19273int
19274main ()
19275{
ca81d7a0 19276return $ac_func ();
973a76b1
DL
19277 ;
19278 return 0;
19279}
19280_ACEOF
19281rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19282if { (ac_try="$ac_link"
19283case "(($ac_try" in
19284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19285 *) ac_try_echo=$ac_try;;
19286esac
19287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19288 (eval "$ac_link") 2>conftest.er1
973a76b1 19289 ac_status=$?
edfaf76d
LK
19290 grep -v '^ *+' conftest.er1 >conftest.err
19291 rm -f conftest.er1
19292 cat conftest.err >&5
973a76b1 19293 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19294 (exit $ac_status); } && {
19295 test -z "$ac_c_werror_flag" ||
19296 test ! -s conftest.err
19297 } && test -s conftest$ac_exeext &&
19298 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19299 eval "$as_ac_var=yes"
19300else
19301 echo "$as_me: failed program was:" >&5
19650fd6
AS
19302sed 's/^/| /' conftest.$ac_ext >&5
19303
ca81d7a0 19304 eval "$as_ac_var=no"
973a76b1 19305fi
ca81d7a0 19306
f053c89f 19307rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19308 conftest$ac_exeext conftest.$ac_ext
973a76b1 19309fi
ca81d7a0
JD
19310ac_res=`eval echo '${'$as_ac_var'}'`
19311 { echo "$as_me:$LINENO: result: $ac_res" >&5
19312echo "${ECHO_T}$ac_res" >&6; }
973a76b1
DL
19313if test `eval echo '${'$as_ac_var'}'` = yes; then
19314 cat >>confdefs.h <<_ACEOF
19315#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19316_ACEOF
19317
19318else
19319 # strftime is in -lintl on SCO UNIX.
ca81d7a0
JD
19320{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
19321echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; }
973a76b1
DL
19322if test "${ac_cv_lib_intl_strftime+set}" = set; then
19323 echo $ECHO_N "(cached) $ECHO_C" >&6
19324else
19325 ac_check_lib_save_LIBS=$LIBS
19326LIBS="-lintl $LIBS"
19327cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19328/* confdefs.h. */
19329_ACEOF
19330cat confdefs.h >>conftest.$ac_ext
19331cat >>conftest.$ac_ext <<_ACEOF
19332/* end confdefs.h. */
973a76b1 19333
ca81d7a0
JD
19334/* Override any GCC internal prototype to avoid an error.
19335 Use char because int might match the return type of a GCC
19336 builtin and then its argument prototype would still apply. */
973a76b1
DL
19337#ifdef __cplusplus
19338extern "C"
19339#endif
973a76b1
DL
19340char strftime ();
19341int
19342main ()
19343{
ca81d7a0 19344return strftime ();
973a76b1
DL
19345 ;
19346 return 0;
19347}
19348_ACEOF
19349rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19350if { (ac_try="$ac_link"
19351case "(($ac_try" in
19352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19353 *) ac_try_echo=$ac_try;;
19354esac
19355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19356 (eval "$ac_link") 2>conftest.er1
973a76b1 19357 ac_status=$?
edfaf76d
LK
19358 grep -v '^ *+' conftest.er1 >conftest.err
19359 rm -f conftest.er1
19360 cat conftest.err >&5
973a76b1 19361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19362 (exit $ac_status); } && {
19363 test -z "$ac_c_werror_flag" ||
19364 test ! -s conftest.err
19365 } && test -s conftest$ac_exeext &&
19366 $as_test_x conftest$ac_exeext; then
973a76b1
DL
19367 ac_cv_lib_intl_strftime=yes
19368else
19369 echo "$as_me: failed program was:" >&5
19650fd6
AS
19370sed 's/^/| /' conftest.$ac_ext >&5
19371
ca81d7a0 19372 ac_cv_lib_intl_strftime=no
973a76b1 19373fi
ca81d7a0 19374
f053c89f 19375rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19376 conftest$ac_exeext conftest.$ac_ext
973a76b1
DL
19377LIBS=$ac_check_lib_save_LIBS
19378fi
ca81d7a0
JD
19379{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
19380echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; }
973a76b1
DL
19381if test $ac_cv_lib_intl_strftime = yes; then
19382 cat >>confdefs.h <<\_ACEOF
19383#define HAVE_STRFTIME 1
19384_ACEOF
19385
19386LIBS="-lintl $LIBS"
19387fi
19388
19389fi
19390done
19391
19392
b936fae4
AS
19393# UNIX98 PTYs.
19394
19395for ac_func in grantpt
503d2be0
AS
19396do
19397as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19398{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19399echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19400if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19401 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19402else
503d2be0 19403 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19404/* confdefs.h. */
19405_ACEOF
19406cat confdefs.h >>conftest.$ac_ext
19407cat >>conftest.$ac_ext <<_ACEOF
19408/* end confdefs.h. */
edfaf76d
LK
19409/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19410 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19411#define $ac_func innocuous_$ac_func
19412
503d2be0 19413/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19414 which can conflict with char $ac_func (); below.
19415 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19416 <limits.h> exists even on freestanding compilers. */
edfaf76d 19417
19650fd6
AS
19418#ifdef __STDC__
19419# include <limits.h>
19420#else
19421# include <assert.h>
19422#endif
edfaf76d
LK
19423
19424#undef $ac_func
19425
ca81d7a0
JD
19426/* Override any GCC internal prototype to avoid an error.
19427 Use char because int might match the return type of a GCC
19428 builtin and then its argument prototype would still apply. */
503d2be0
AS
19429#ifdef __cplusplus
19430extern "C"
19431#endif
503d2be0 19432char $ac_func ();
503d2be0
AS
19433/* The GNU C library defines this for functions which it implements
19434 to always fail with ENOSYS. Some functions are actually named
19435 something starting with __ and the normal name is an alias. */
ca81d7a0 19436#if defined __stub_$ac_func || defined __stub___$ac_func
503d2be0 19437choke me
503d2be0 19438#endif
4c343001 19439
19650fd6
AS
19440int
19441main ()
19442{
ca81d7a0 19443return $ac_func ();
503d2be0
AS
19444 ;
19445 return 0;
19446}
19447_ACEOF
19448rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19449if { (ac_try="$ac_link"
19450case "(($ac_try" in
19451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19452 *) ac_try_echo=$ac_try;;
19453esac
19454eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19455 (eval "$ac_link") 2>conftest.er1
503d2be0 19456 ac_status=$?
edfaf76d
LK
19457 grep -v '^ *+' conftest.er1 >conftest.err
19458 rm -f conftest.er1
19459 cat conftest.err >&5
c0d27fcc 19460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19461 (exit $ac_status); } && {
19462 test -z "$ac_c_werror_flag" ||
19463 test ! -s conftest.err
19464 } && test -s conftest$ac_exeext &&
19465 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19466 eval "$as_ac_var=yes"
19467else
19468 echo "$as_me: failed program was:" >&5
19650fd6
AS
19469sed 's/^/| /' conftest.$ac_ext >&5
19470
ca81d7a0 19471 eval "$as_ac_var=no"
503d2be0 19472fi
ca81d7a0 19473
f053c89f 19474rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19475 conftest$ac_exeext conftest.$ac_ext
503d2be0 19476fi
ca81d7a0
JD
19477ac_res=`eval echo '${'$as_ac_var'}'`
19478 { echo "$as_me:$LINENO: result: $ac_res" >&5
19479echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19480if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19481 cat >>confdefs.h <<_ACEOF
503d2be0 19482#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19483_ACEOF
4c343001
DL
19484
19485fi
503d2be0
AS
19486done
19487
c0d27fcc 19488
b936fae4 19489# PTY-related GNU extensions.
4c343001 19490
b936fae4
AS
19491for ac_func in getpt
19492do
19493as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
19494{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19495echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19496if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 19497 echo $ECHO_N "(cached) $ECHO_C" >&6
4c343001 19498else
b936fae4 19499 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19500/* confdefs.h. */
19501_ACEOF
19502cat confdefs.h >>conftest.$ac_ext
19503cat >>conftest.$ac_ext <<_ACEOF
19504/* end confdefs.h. */
edfaf76d
LK
19505/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19506 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19507#define $ac_func innocuous_$ac_func
19508
087121cc 19509/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19510 which can conflict with char $ac_func (); below.
19511 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19512 <limits.h> exists even on freestanding compilers. */
edfaf76d 19513
19650fd6
AS
19514#ifdef __STDC__
19515# include <limits.h>
19516#else
19517# include <assert.h>
19518#endif
edfaf76d
LK
19519
19520#undef $ac_func
19521
ca81d7a0
JD
19522/* Override any GCC internal prototype to avoid an error.
19523 Use char because int might match the return type of a GCC
19524 builtin and then its argument prototype would still apply. */
503d2be0
AS
19525#ifdef __cplusplus
19526extern "C"
19527#endif
503d2be0 19528char $ac_func ();
087121cc
GM
19529/* The GNU C library defines this for functions which it implements
19530 to always fail with ENOSYS. Some functions are actually named
19531 something starting with __ and the normal name is an alias. */
ca81d7a0 19532#if defined __stub_$ac_func || defined __stub___$ac_func
087121cc 19533choke me
087121cc
GM
19534#endif
19535
19650fd6
AS
19536int
19537main ()
19538{
ca81d7a0 19539return $ac_func ();
503d2be0
AS
19540 ;
19541 return 0;
19542}
19543_ACEOF
19544rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19545if { (ac_try="$ac_link"
19546case "(($ac_try" in
19547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19548 *) ac_try_echo=$ac_try;;
19549esac
19550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 19551 (eval "$ac_link") 2>conftest.er1
503d2be0 19552 ac_status=$?
edfaf76d
LK
19553 grep -v '^ *+' conftest.er1 >conftest.err
19554 rm -f conftest.er1
19555 cat conftest.err >&5
c0d27fcc 19556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19557 (exit $ac_status); } && {
19558 test -z "$ac_c_werror_flag" ||
19559 test ! -s conftest.err
19560 } && test -s conftest$ac_exeext &&
19561 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19562 eval "$as_ac_var=yes"
19563else
19564 echo "$as_me: failed program was:" >&5
19650fd6
AS
19565sed 's/^/| /' conftest.$ac_ext >&5
19566
ca81d7a0 19567 eval "$as_ac_var=no"
503d2be0 19568fi
ca81d7a0 19569
f053c89f 19570rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19571 conftest$ac_exeext conftest.$ac_ext
503d2be0 19572fi
ca81d7a0
JD
19573ac_res=`eval echo '${'$as_ac_var'}'`
19574 { echo "$as_me:$LINENO: result: $ac_res" >&5
19575echo "${ECHO_T}$ac_res" >&6; }
503d2be0 19576if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 19577 cat >>confdefs.h <<_ACEOF
503d2be0 19578#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 19579_ACEOF
087121cc 19580
087121cc
GM
19581fi
19582done
19583
c0d27fcc 19584
ba4481b5
DL
19585# Check this now, so that we will NOT find the above functions in ncurses.
19586# That is because we have not set up to link ncurses in lib-src.
19587# It's better to believe a function is not available
19588# than to expect to find it in ncurses.
503d2be0 19589
ca81d7a0
JD
19590{ echo "$as_me:$LINENO: checking for tparm in -lncurses" >&5
19591echo $ECHO_N "checking for tparm in -lncurses... $ECHO_C" >&6; }
503d2be0
AS
19592if test "${ac_cv_lib_ncurses_tparm+set}" = set; then
19593 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 19594else
503d2be0 19595 ac_check_lib_save_LIBS=$LIBS
ba4481b5 19596LIBS="-lncurses $LIBS"
503d2be0 19597cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19598/* confdefs.h. */
19599_ACEOF
19600cat confdefs.h >>conftest.$ac_ext
19601cat >>conftest.$ac_ext <<_ACEOF
19602/* end confdefs.h. */
503d2be0 19603
ca81d7a0
JD
19604/* Override any GCC internal prototype to avoid an error.
19605 Use char because int might match the return type of a GCC
19606 builtin and then its argument prototype would still apply. */
503d2be0
AS
19607#ifdef __cplusplus
19608extern "C"
19609#endif
503d2be0
AS
19610char tparm ();
19611int
19612main ()
19613{
ca81d7a0 19614return tparm ();
503d2be0
AS
19615 ;
19616 return 0;
19617}
19618_ACEOF
19619rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19620if { (ac_try="$ac_link"
19621case "(($ac_try" in
19622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19623 *) ac_try_echo=$ac_try;;
19624esac
19625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19626 (eval "$ac_link") 2>conftest.er1
503d2be0 19627 ac_status=$?
edfaf76d
LK
19628 grep -v '^ *+' conftest.er1 >conftest.err
19629 rm -f conftest.er1
19630 cat conftest.err >&5
c0d27fcc 19631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19632 (exit $ac_status); } && {
19633 test -z "$ac_c_werror_flag" ||
19634 test ! -s conftest.err
19635 } && test -s conftest$ac_exeext &&
19636 $as_test_x conftest$ac_exeext; then
503d2be0
AS
19637 ac_cv_lib_ncurses_tparm=yes
19638else
19639 echo "$as_me: failed program was:" >&5
19650fd6
AS
19640sed 's/^/| /' conftest.$ac_ext >&5
19641
ca81d7a0 19642 ac_cv_lib_ncurses_tparm=no
503d2be0 19643fi
ca81d7a0 19644
f053c89f 19645rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19646 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
19647LIBS=$ac_check_lib_save_LIBS
19648fi
ca81d7a0
JD
19649{ echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tparm" >&5
19650echo "${ECHO_T}$ac_cv_lib_ncurses_tparm" >&6; }
503d2be0 19651if test $ac_cv_lib_ncurses_tparm = yes; then
c0d27fcc 19652 cat >>confdefs.h <<_ACEOF
503d2be0 19653#define HAVE_LIBNCURSES 1
c0d27fcc 19654_ACEOF
ba4481b5
DL
19655
19656 LIBS="-lncurses $LIBS"
19657
ba4481b5
DL
19658fi
19659
c0d27fcc 19660
bc3512d0
CY
19661# Do we have res_init, for detecting changes in /etc/resolv.conf?
19662
19663resolv=no
074767f2 19664cat >conftest.$ac_ext <<_ACEOF
bc3512d0
CY
19665/* confdefs.h. */
19666_ACEOF
19667cat confdefs.h >>conftest.$ac_ext
19668cat >>conftest.$ac_ext <<_ACEOF
19669/* end confdefs.h. */
074767f2
AS
19670#include <netinet/in.h>
19671#include <arpa/nameser.h>
19672#include <resolv.h>
bc3512d0
CY
19673int
19674main ()
19675{
074767f2 19676return res_init();
bc3512d0
CY
19677 ;
19678 return 0;
19679}
19680_ACEOF
19681rm -f conftest.$ac_objext conftest$ac_exeext
19682if { (ac_try="$ac_link"
19683case "(($ac_try" in
19684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19685 *) ac_try_echo=$ac_try;;
19686esac
19687eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19688 (eval "$ac_link") 2>conftest.er1
19689 ac_status=$?
19690 grep -v '^ *+' conftest.er1 >conftest.err
19691 rm -f conftest.er1
19692 cat conftest.err >&5
19693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19694 (exit $ac_status); } && {
19695 test -z "$ac_c_werror_flag" ||
19696 test ! -s conftest.err
19697 } && test -s conftest$ac_exeext &&
19698 $as_test_x conftest$ac_exeext; then
074767f2 19699 have_res_init=yes
bc3512d0
CY
19700else
19701 echo "$as_me: failed program was:" >&5
19702sed 's/^/| /' conftest.$ac_ext >&5
19703
074767f2 19704 have_res_init=no
bc3512d0
CY
19705fi
19706
19707rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19708 conftest$ac_exeext conftest.$ac_ext
bc3512d0
CY
19709if test "$have_res_init" = no; then
19710 OLIBS="$LIBS"
19711 LIBS="$LIBS -lresolv"
19712 { echo "$as_me:$LINENO: checking for res_init with -lresolv" >&5
19713echo $ECHO_N "checking for res_init with -lresolv... $ECHO_C" >&6; }
19714 cat >conftest.$ac_ext <<_ACEOF
19715/* confdefs.h. */
19716_ACEOF
19717cat confdefs.h >>conftest.$ac_ext
19718cat >>conftest.$ac_ext <<_ACEOF
19719/* end confdefs.h. */
19720#include <netinet/in.h>
19721#include <arpa/nameser.h>
19722#include <resolv.h>
19723int
19724main ()
19725{
074767f2 19726return res_init();
bc3512d0
CY
19727 ;
19728 return 0;
19729}
19730_ACEOF
19731rm -f conftest.$ac_objext conftest$ac_exeext
19732if { (ac_try="$ac_link"
19733case "(($ac_try" in
19734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19735 *) ac_try_echo=$ac_try;;
19736esac
19737eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19738 (eval "$ac_link") 2>conftest.er1
19739 ac_status=$?
19740 grep -v '^ *+' conftest.er1 >conftest.err
19741 rm -f conftest.er1
19742 cat conftest.err >&5
19743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19744 (exit $ac_status); } && {
19745 test -z "$ac_c_werror_flag" ||
19746 test ! -s conftest.err
19747 } && test -s conftest$ac_exeext &&
19748 $as_test_x conftest$ac_exeext; then
19749 have_res_init=yes
19750else
19751 echo "$as_me: failed program was:" >&5
19752sed 's/^/| /' conftest.$ac_ext >&5
19753
19754 have_res_init=no
19755fi
19756
19757rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19758 conftest$ac_exeext conftest.$ac_ext
19759 { echo "$as_me:$LINENO: result: $have_res_init" >&5
19760echo "${ECHO_T}$have_res_init" >&6; }
19761 if test "$have_res_init" = yes ; then
19762 resolv=yes
19763 fi
19764 LIBS="$OLIBS"
19765fi
19766
19767if test "$have_res_init" = yes; then
19768
19769cat >>confdefs.h <<\_ACEOF
19770#define HAVE_RES_INIT 1
19771_ACEOF
19772
19773fi
19774
84e70f78
KR
19775# Do we need the Hesiod library to provide the support routines?
19776if test "$with_hesiod" = yes ; then
19777 # Don't set $LIBS here -- see comments above.
ca81d7a0
JD
19778 { echo "$as_me:$LINENO: checking for res_send" >&5
19779echo $ECHO_N "checking for res_send... $ECHO_C" >&6; }
84e70f78
KR
19780if test "${ac_cv_func_res_send+set}" = set; then
19781 echo $ECHO_N "(cached) $ECHO_C" >&6
19782else
19783 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19784/* confdefs.h. */
19785_ACEOF
19786cat confdefs.h >>conftest.$ac_ext
19787cat >>conftest.$ac_ext <<_ACEOF
19788/* end confdefs.h. */
edfaf76d
LK
19789/* Define res_send to an innocuous variant, in case <limits.h> declares res_send.
19790 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19791#define res_send innocuous_res_send
19792
84e70f78 19793/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19794 which can conflict with char res_send (); below.
19795 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19796 <limits.h> exists even on freestanding compilers. */
edfaf76d 19797
19650fd6
AS
19798#ifdef __STDC__
19799# include <limits.h>
19800#else
19801# include <assert.h>
19802#endif
edfaf76d
LK
19803
19804#undef res_send
19805
ca81d7a0
JD
19806/* Override any GCC internal prototype to avoid an error.
19807 Use char because int might match the return type of a GCC
19808 builtin and then its argument prototype would still apply. */
84e70f78
KR
19809#ifdef __cplusplus
19810extern "C"
19811#endif
84e70f78 19812char res_send ();
84e70f78
KR
19813/* The GNU C library defines this for functions which it implements
19814 to always fail with ENOSYS. Some functions are actually named
19815 something starting with __ and the normal name is an alias. */
ca81d7a0 19816#if defined __stub_res_send || defined __stub___res_send
84e70f78 19817choke me
cd958eb3
MB
19818#endif
19819
19650fd6
AS
19820int
19821main ()
19822{
ca81d7a0 19823return res_send ();
84e70f78
KR
19824 ;
19825 return 0;
19826}
19827_ACEOF
19828rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19829if { (ac_try="$ac_link"
19830case "(($ac_try" in
19831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19832 *) ac_try_echo=$ac_try;;
19833esac
19834eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19835 (eval "$ac_link") 2>conftest.er1
84e70f78 19836 ac_status=$?
edfaf76d
LK
19837 grep -v '^ *+' conftest.er1 >conftest.err
19838 rm -f conftest.er1
19839 cat conftest.err >&5
c0d27fcc 19840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19841 (exit $ac_status); } && {
19842 test -z "$ac_c_werror_flag" ||
19843 test ! -s conftest.err
19844 } && test -s conftest$ac_exeext &&
19845 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19846 ac_cv_func_res_send=yes
19847else
19848 echo "$as_me: failed program was:" >&5
19650fd6
AS
19849sed 's/^/| /' conftest.$ac_ext >&5
19850
ca81d7a0 19851 ac_cv_func_res_send=no
84e70f78 19852fi
ca81d7a0 19853
f053c89f 19854rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19855 conftest$ac_exeext conftest.$ac_ext
84e70f78 19856fi
ca81d7a0
JD
19857{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5
19858echo "${ECHO_T}$ac_cv_func_res_send" >&6; }
84e70f78
KR
19859if test $ac_cv_func_res_send = yes; then
19860 :
19861else
ca81d7a0
JD
19862 { echo "$as_me:$LINENO: checking for __res_send" >&5
19863echo $ECHO_N "checking for __res_send... $ECHO_C" >&6; }
84e70f78
KR
19864if test "${ac_cv_func___res_send+set}" = set; then
19865 echo $ECHO_N "(cached) $ECHO_C" >&6
19866else
19867 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19868/* confdefs.h. */
19869_ACEOF
19870cat confdefs.h >>conftest.$ac_ext
19871cat >>conftest.$ac_ext <<_ACEOF
19872/* end confdefs.h. */
edfaf76d
LK
19873/* Define __res_send to an innocuous variant, in case <limits.h> declares __res_send.
19874 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19875#define __res_send innocuous___res_send
19876
84e70f78 19877/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
19878 which can conflict with char __res_send (); below.
19879 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19880 <limits.h> exists even on freestanding compilers. */
edfaf76d 19881
19650fd6
AS
19882#ifdef __STDC__
19883# include <limits.h>
19884#else
19885# include <assert.h>
19886#endif
edfaf76d
LK
19887
19888#undef __res_send
19889
ca81d7a0
JD
19890/* Override any GCC internal prototype to avoid an error.
19891 Use char because int might match the return type of a GCC
19892 builtin and then its argument prototype would still apply. */
84e70f78
KR
19893#ifdef __cplusplus
19894extern "C"
19895#endif
84e70f78 19896char __res_send ();
84e70f78
KR
19897/* The GNU C library defines this for functions which it implements
19898 to always fail with ENOSYS. Some functions are actually named
19899 something starting with __ and the normal name is an alias. */
ca81d7a0 19900#if defined __stub___res_send || defined __stub_____res_send
84e70f78 19901choke me
84e70f78
KR
19902#endif
19903
19650fd6
AS
19904int
19905main ()
19906{
ca81d7a0 19907return __res_send ();
84e70f78
KR
19908 ;
19909 return 0;
19910}
19911_ACEOF
19912rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19913if { (ac_try="$ac_link"
19914case "(($ac_try" in
19915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19916 *) ac_try_echo=$ac_try;;
19917esac
19918eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19919 (eval "$ac_link") 2>conftest.er1
84e70f78 19920 ac_status=$?
edfaf76d
LK
19921 grep -v '^ *+' conftest.er1 >conftest.err
19922 rm -f conftest.er1
19923 cat conftest.err >&5
c0d27fcc 19924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
19925 (exit $ac_status); } && {
19926 test -z "$ac_c_werror_flag" ||
19927 test ! -s conftest.err
19928 } && test -s conftest$ac_exeext &&
19929 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19930 ac_cv_func___res_send=yes
19931else
19932 echo "$as_me: failed program was:" >&5
19650fd6
AS
19933sed 's/^/| /' conftest.$ac_ext >&5
19934
ca81d7a0 19935 ac_cv_func___res_send=no
84e70f78 19936fi
ca81d7a0 19937
f053c89f 19938rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 19939 conftest$ac_exeext conftest.$ac_ext
84e70f78 19940fi
ca81d7a0
JD
19941{ echo "$as_me:$LINENO: result: $ac_cv_func___res_send" >&5
19942echo "${ECHO_T}$ac_cv_func___res_send" >&6; }
84e70f78
KR
19943if test $ac_cv_func___res_send = yes; then
19944 :
19945else
ca81d7a0
JD
19946 { echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5
19947echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
19948if test "${ac_cv_lib_resolv_res_send+set}" = set; then
19949 echo $ECHO_N "(cached) $ECHO_C" >&6
19950else
19951 ac_check_lib_save_LIBS=$LIBS
19952LIBS="-lresolv $LIBS"
19953cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
19954/* confdefs.h. */
19955_ACEOF
19956cat confdefs.h >>conftest.$ac_ext
19957cat >>conftest.$ac_ext <<_ACEOF
19958/* end confdefs.h. */
84e70f78 19959
ca81d7a0
JD
19960/* Override any GCC internal prototype to avoid an error.
19961 Use char because int might match the return type of a GCC
19962 builtin and then its argument prototype would still apply. */
84e70f78
KR
19963#ifdef __cplusplus
19964extern "C"
19965#endif
84e70f78
KR
19966char res_send ();
19967int
19968main ()
19969{
ca81d7a0 19970return res_send ();
84e70f78
KR
19971 ;
19972 return 0;
19973}
19974_ACEOF
19975rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
19976if { (ac_try="$ac_link"
19977case "(($ac_try" in
19978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19979 *) ac_try_echo=$ac_try;;
19980esac
19981eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19982 (eval "$ac_link") 2>conftest.er1
84e70f78 19983 ac_status=$?
edfaf76d
LK
19984 grep -v '^ *+' conftest.er1 >conftest.err
19985 rm -f conftest.er1
19986 cat conftest.err >&5
c0d27fcc 19987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
19988 (exit $ac_status); } && {
19989 test -z "$ac_c_werror_flag" ||
19990 test ! -s conftest.err
19991 } && test -s conftest$ac_exeext &&
19992 $as_test_x conftest$ac_exeext; then
84e70f78
KR
19993 ac_cv_lib_resolv_res_send=yes
19994else
19995 echo "$as_me: failed program was:" >&5
19650fd6
AS
19996sed 's/^/| /' conftest.$ac_ext >&5
19997
ca81d7a0 19998 ac_cv_lib_resolv_res_send=no
84e70f78 19999fi
ca81d7a0 20000
f053c89f 20001rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20002 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20003LIBS=$ac_check_lib_save_LIBS
20004fi
ca81d7a0
JD
20005{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5
20006echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; }
84e70f78
KR
20007if test $ac_cv_lib_resolv_res_send = yes; then
20008 resolv=yes
20009else
ca81d7a0
JD
20010 { echo "$as_me:$LINENO: checking for __res_send in -lresolv" >&5
20011echo $ECHO_N "checking for __res_send in -lresolv... $ECHO_C" >&6; }
84e70f78
KR
20012if test "${ac_cv_lib_resolv___res_send+set}" = set; then
20013 echo $ECHO_N "(cached) $ECHO_C" >&6
20014else
20015 ac_check_lib_save_LIBS=$LIBS
20016LIBS="-lresolv $LIBS"
20017cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20018/* confdefs.h. */
20019_ACEOF
20020cat confdefs.h >>conftest.$ac_ext
20021cat >>conftest.$ac_ext <<_ACEOF
20022/* end confdefs.h. */
84e70f78 20023
ca81d7a0
JD
20024/* Override any GCC internal prototype to avoid an error.
20025 Use char because int might match the return type of a GCC
20026 builtin and then its argument prototype would still apply. */
84e70f78
KR
20027#ifdef __cplusplus
20028extern "C"
20029#endif
84e70f78
KR
20030char __res_send ();
20031int
20032main ()
20033{
ca81d7a0 20034return __res_send ();
84e70f78
KR
20035 ;
20036 return 0;
20037}
20038_ACEOF
20039rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20040if { (ac_try="$ac_link"
20041case "(($ac_try" in
20042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20043 *) ac_try_echo=$ac_try;;
20044esac
20045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20046 (eval "$ac_link") 2>conftest.er1
84e70f78 20047 ac_status=$?
edfaf76d
LK
20048 grep -v '^ *+' conftest.er1 >conftest.err
20049 rm -f conftest.er1
20050 cat conftest.err >&5
c0d27fcc 20051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20052 (exit $ac_status); } && {
20053 test -z "$ac_c_werror_flag" ||
20054 test ! -s conftest.err
20055 } && test -s conftest$ac_exeext &&
20056 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20057 ac_cv_lib_resolv___res_send=yes
20058else
20059 echo "$as_me: failed program was:" >&5
19650fd6
AS
20060sed 's/^/| /' conftest.$ac_ext >&5
20061
ca81d7a0 20062 ac_cv_lib_resolv___res_send=no
84e70f78 20063fi
ca81d7a0 20064
f053c89f 20065rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20066 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20067LIBS=$ac_check_lib_save_LIBS
20068fi
ca81d7a0
JD
20069{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv___res_send" >&5
20070echo "${ECHO_T}$ac_cv_lib_resolv___res_send" >&6; }
84e70f78
KR
20071if test $ac_cv_lib_resolv___res_send = yes; then
20072 resolv=yes
20073fi
20074
20075fi
20076
20077fi
20078
20079fi
20080
20081 if test "$resolv" = yes ; then
20082 RESOLVLIB=-lresolv
84e70f78
KR
20083 else
20084 RESOLVLIB=
20085 fi
ca81d7a0
JD
20086 { echo "$as_me:$LINENO: checking for hes_getmailhost" >&5
20087echo $ECHO_N "checking for hes_getmailhost... $ECHO_C" >&6; }
84e70f78
KR
20088if test "${ac_cv_func_hes_getmailhost+set}" = set; then
20089 echo $ECHO_N "(cached) $ECHO_C" >&6
20090else
20091 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20092/* confdefs.h. */
20093_ACEOF
20094cat confdefs.h >>conftest.$ac_ext
20095cat >>conftest.$ac_ext <<_ACEOF
20096/* end confdefs.h. */
edfaf76d
LK
20097/* Define hes_getmailhost to an innocuous variant, in case <limits.h> declares hes_getmailhost.
20098 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20099#define hes_getmailhost innocuous_hes_getmailhost
20100
84e70f78 20101/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
20102 which can conflict with char hes_getmailhost (); below.
20103 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20104 <limits.h> exists even on freestanding compilers. */
edfaf76d 20105
19650fd6
AS
20106#ifdef __STDC__
20107# include <limits.h>
20108#else
20109# include <assert.h>
20110#endif
edfaf76d
LK
20111
20112#undef hes_getmailhost
20113
ca81d7a0
JD
20114/* Override any GCC internal prototype to avoid an error.
20115 Use char because int might match the return type of a GCC
20116 builtin and then its argument prototype would still apply. */
84e70f78
KR
20117#ifdef __cplusplus
20118extern "C"
20119#endif
84e70f78 20120char hes_getmailhost ();
84e70f78
KR
20121/* The GNU C library defines this for functions which it implements
20122 to always fail with ENOSYS. Some functions are actually named
20123 something starting with __ and the normal name is an alias. */
ca81d7a0 20124#if defined __stub_hes_getmailhost || defined __stub___hes_getmailhost
84e70f78 20125choke me
cd958eb3
MB
20126#endif
20127
19650fd6
AS
20128int
20129main ()
20130{
ca81d7a0 20131return hes_getmailhost ();
84e70f78
KR
20132 ;
20133 return 0;
20134}
20135_ACEOF
20136rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20137if { (ac_try="$ac_link"
20138case "(($ac_try" in
20139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20140 *) ac_try_echo=$ac_try;;
20141esac
20142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20143 (eval "$ac_link") 2>conftest.er1
84e70f78 20144 ac_status=$?
edfaf76d
LK
20145 grep -v '^ *+' conftest.er1 >conftest.err
20146 rm -f conftest.er1
20147 cat conftest.err >&5
c0d27fcc 20148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20149 (exit $ac_status); } && {
20150 test -z "$ac_c_werror_flag" ||
20151 test ! -s conftest.err
20152 } && test -s conftest$ac_exeext &&
20153 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20154 ac_cv_func_hes_getmailhost=yes
20155else
20156 echo "$as_me: failed program was:" >&5
19650fd6
AS
20157sed 's/^/| /' conftest.$ac_ext >&5
20158
ca81d7a0 20159 ac_cv_func_hes_getmailhost=no
84e70f78 20160fi
ca81d7a0 20161
f053c89f 20162rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20163 conftest$ac_exeext conftest.$ac_ext
84e70f78 20164fi
ca81d7a0
JD
20165{ echo "$as_me:$LINENO: result: $ac_cv_func_hes_getmailhost" >&5
20166echo "${ECHO_T}$ac_cv_func_hes_getmailhost" >&6; }
84e70f78
KR
20167if test $ac_cv_func_hes_getmailhost = yes; then
20168 :
20169else
ca81d7a0
JD
20170 { echo "$as_me:$LINENO: checking for hes_getmailhost in -lhesiod" >&5
20171echo $ECHO_N "checking for hes_getmailhost in -lhesiod... $ECHO_C" >&6; }
84e70f78
KR
20172if test "${ac_cv_lib_hesiod_hes_getmailhost+set}" = set; then
20173 echo $ECHO_N "(cached) $ECHO_C" >&6
20174else
20175 ac_check_lib_save_LIBS=$LIBS
20176LIBS="-lhesiod $RESOLVLIB $LIBS"
20177cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20178/* confdefs.h. */
20179_ACEOF
20180cat confdefs.h >>conftest.$ac_ext
20181cat >>conftest.$ac_ext <<_ACEOF
20182/* end confdefs.h. */
84e70f78 20183
ca81d7a0
JD
20184/* Override any GCC internal prototype to avoid an error.
20185 Use char because int might match the return type of a GCC
20186 builtin and then its argument prototype would still apply. */
84e70f78
KR
20187#ifdef __cplusplus
20188extern "C"
20189#endif
84e70f78
KR
20190char hes_getmailhost ();
20191int
20192main ()
20193{
ca81d7a0 20194return hes_getmailhost ();
84e70f78
KR
20195 ;
20196 return 0;
20197}
20198_ACEOF
20199rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20200if { (ac_try="$ac_link"
20201case "(($ac_try" in
20202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20203 *) ac_try_echo=$ac_try;;
20204esac
20205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20206 (eval "$ac_link") 2>conftest.er1
84e70f78 20207 ac_status=$?
edfaf76d
LK
20208 grep -v '^ *+' conftest.er1 >conftest.err
20209 rm -f conftest.er1
20210 cat conftest.err >&5
c0d27fcc 20211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
20212 (exit $ac_status); } && {
20213 test -z "$ac_c_werror_flag" ||
20214 test ! -s conftest.err
20215 } && test -s conftest$ac_exeext &&
20216 $as_test_x conftest$ac_exeext; then
84e70f78
KR
20217 ac_cv_lib_hesiod_hes_getmailhost=yes
20218else
20219 echo "$as_me: failed program was:" >&5
19650fd6
AS
20220sed 's/^/| /' conftest.$ac_ext >&5
20221
ca81d7a0 20222 ac_cv_lib_hesiod_hes_getmailhost=no
84e70f78 20223fi
ca81d7a0 20224
f053c89f 20225rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20226 conftest$ac_exeext conftest.$ac_ext
84e70f78
KR
20227LIBS=$ac_check_lib_save_LIBS
20228fi
ca81d7a0
JD
20229{ echo "$as_me:$LINENO: result: $ac_cv_lib_hesiod_hes_getmailhost" >&5
20230echo "${ECHO_T}$ac_cv_lib_hesiod_hes_getmailhost" >&6; }
84e70f78 20231if test $ac_cv_lib_hesiod_hes_getmailhost = yes; then
b936fae4 20232
c0d27fcc 20233cat >>confdefs.h <<\_ACEOF
84e70f78 20234#define HAVE_LIBHESIOD 1
c0d27fcc 20235_ACEOF
84e70f78
KR
20236
20237else
20238 :
20239fi
20240
20241fi
20242
20243fi
20244
bc3512d0
CY
20245# Do we need libresolv (due to res_init or Hesiod)?
20246if test "$resolv" = yes ; then
20247
20248cat >>confdefs.h <<\_ACEOF
20249#define HAVE_LIBRESOLV 1
20250_ACEOF
20251
20252fi
20253
a21616bd
KR
20254# These tell us which Kerberos-related libraries to use.
20255if test "${with_kerberos+set}" = set; then
503d2be0 20256
ca81d7a0
JD
20257{ echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5
20258echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; }
503d2be0
AS
20259if test "${ac_cv_lib_com_err_com_err+set}" = set; then
20260 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20261else
503d2be0 20262 ac_check_lib_save_LIBS=$LIBS
a21616bd 20263LIBS="-lcom_err $LIBS"
503d2be0 20264cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20265/* confdefs.h. */
20266_ACEOF
20267cat confdefs.h >>conftest.$ac_ext
20268cat >>conftest.$ac_ext <<_ACEOF
20269/* end confdefs.h. */
503d2be0 20270
ca81d7a0
JD
20271/* Override any GCC internal prototype to avoid an error.
20272 Use char because int might match the return type of a GCC
20273 builtin and then its argument prototype would still apply. */
503d2be0
AS
20274#ifdef __cplusplus
20275extern "C"
20276#endif
503d2be0
AS
20277char com_err ();
20278int
20279main ()
20280{
ca81d7a0 20281return com_err ();
503d2be0
AS
20282 ;
20283 return 0;
20284}
20285_ACEOF
20286rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20287if { (ac_try="$ac_link"
20288case "(($ac_try" in
20289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20290 *) ac_try_echo=$ac_try;;
20291esac
20292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20293 (eval "$ac_link") 2>conftest.er1
503d2be0 20294 ac_status=$?
edfaf76d
LK
20295 grep -v '^ *+' conftest.er1 >conftest.err
20296 rm -f conftest.er1
20297 cat conftest.err >&5
c0d27fcc 20298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20299 (exit $ac_status); } && {
20300 test -z "$ac_c_werror_flag" ||
20301 test ! -s conftest.err
20302 } && test -s conftest$ac_exeext &&
20303 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20304 ac_cv_lib_com_err_com_err=yes
20305else
20306 echo "$as_me: failed program was:" >&5
19650fd6
AS
20307sed 's/^/| /' conftest.$ac_ext >&5
20308
ca81d7a0 20309 ac_cv_lib_com_err_com_err=no
503d2be0 20310fi
ca81d7a0 20311
f053c89f 20312rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20313 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20314LIBS=$ac_check_lib_save_LIBS
20315fi
ca81d7a0
JD
20316{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5
20317echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; }
503d2be0 20318if test $ac_cv_lib_com_err_com_err = yes; then
c0d27fcc 20319 cat >>confdefs.h <<_ACEOF
503d2be0 20320#define HAVE_LIBCOM_ERR 1
c0d27fcc 20321_ACEOF
a21616bd
KR
20322
20323 LIBS="-lcom_err $LIBS"
20324
a21616bd
KR
20325fi
20326
c0d27fcc 20327
ca81d7a0
JD
20328{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lk5crypto" >&5
20329echo $ECHO_N "checking for mit_des_cbc_encrypt in -lk5crypto... $ECHO_C" >&6; }
503d2be0
AS
20330if test "${ac_cv_lib_k5crypto_mit_des_cbc_encrypt+set}" = set; then
20331 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20332else
503d2be0 20333 ac_check_lib_save_LIBS=$LIBS
a21616bd 20334LIBS="-lk5crypto $LIBS"
503d2be0 20335cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20336/* confdefs.h. */
20337_ACEOF
20338cat confdefs.h >>conftest.$ac_ext
20339cat >>conftest.$ac_ext <<_ACEOF
20340/* end confdefs.h. */
503d2be0 20341
ca81d7a0
JD
20342/* Override any GCC internal prototype to avoid an error.
20343 Use char because int might match the return type of a GCC
20344 builtin and then its argument prototype would still apply. */
503d2be0
AS
20345#ifdef __cplusplus
20346extern "C"
20347#endif
503d2be0
AS
20348char mit_des_cbc_encrypt ();
20349int
20350main ()
20351{
ca81d7a0 20352return mit_des_cbc_encrypt ();
503d2be0
AS
20353 ;
20354 return 0;
20355}
20356_ACEOF
20357rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20358if { (ac_try="$ac_link"
20359case "(($ac_try" in
20360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20361 *) ac_try_echo=$ac_try;;
20362esac
20363eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20364 (eval "$ac_link") 2>conftest.er1
503d2be0 20365 ac_status=$?
edfaf76d
LK
20366 grep -v '^ *+' conftest.er1 >conftest.err
20367 rm -f conftest.er1
20368 cat conftest.err >&5
c0d27fcc 20369 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20370 (exit $ac_status); } && {
20371 test -z "$ac_c_werror_flag" ||
20372 test ! -s conftest.err
20373 } && test -s conftest$ac_exeext &&
20374 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20375 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=yes
20376else
20377 echo "$as_me: failed program was:" >&5
19650fd6
AS
20378sed 's/^/| /' conftest.$ac_ext >&5
20379
ca81d7a0 20380 ac_cv_lib_k5crypto_mit_des_cbc_encrypt=no
503d2be0 20381fi
ca81d7a0 20382
f053c89f 20383rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20384 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20385LIBS=$ac_check_lib_save_LIBS
20386fi
ca81d7a0
JD
20387{ echo "$as_me:$LINENO: result: $ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&5
20388echo "${ECHO_T}$ac_cv_lib_k5crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20389if test $ac_cv_lib_k5crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20390 cat >>confdefs.h <<_ACEOF
503d2be0 20391#define HAVE_LIBK5CRYPTO 1
c0d27fcc 20392_ACEOF
a21616bd
KR
20393
20394 LIBS="-lk5crypto $LIBS"
20395
a21616bd
KR
20396fi
20397
c0d27fcc 20398
ca81d7a0
JD
20399{ echo "$as_me:$LINENO: checking for mit_des_cbc_encrypt in -lcrypto" >&5
20400echo $ECHO_N "checking for mit_des_cbc_encrypt in -lcrypto... $ECHO_C" >&6; }
503d2be0
AS
20401if test "${ac_cv_lib_crypto_mit_des_cbc_encrypt+set}" = set; then
20402 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20403else
503d2be0 20404 ac_check_lib_save_LIBS=$LIBS
a21616bd 20405LIBS="-lcrypto $LIBS"
503d2be0 20406cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20407/* confdefs.h. */
20408_ACEOF
20409cat confdefs.h >>conftest.$ac_ext
20410cat >>conftest.$ac_ext <<_ACEOF
20411/* end confdefs.h. */
503d2be0 20412
ca81d7a0
JD
20413/* Override any GCC internal prototype to avoid an error.
20414 Use char because int might match the return type of a GCC
20415 builtin and then its argument prototype would still apply. */
503d2be0
AS
20416#ifdef __cplusplus
20417extern "C"
20418#endif
503d2be0
AS
20419char mit_des_cbc_encrypt ();
20420int
20421main ()
20422{
ca81d7a0 20423return mit_des_cbc_encrypt ();
503d2be0
AS
20424 ;
20425 return 0;
20426}
20427_ACEOF
20428rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20429if { (ac_try="$ac_link"
20430case "(($ac_try" in
20431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20432 *) ac_try_echo=$ac_try;;
20433esac
20434eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20435 (eval "$ac_link") 2>conftest.er1
503d2be0 20436 ac_status=$?
edfaf76d
LK
20437 grep -v '^ *+' conftest.er1 >conftest.err
20438 rm -f conftest.er1
20439 cat conftest.err >&5
c0d27fcc 20440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20441 (exit $ac_status); } && {
20442 test -z "$ac_c_werror_flag" ||
20443 test ! -s conftest.err
20444 } && test -s conftest$ac_exeext &&
20445 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20446 ac_cv_lib_crypto_mit_des_cbc_encrypt=yes
20447else
20448 echo "$as_me: failed program was:" >&5
19650fd6
AS
20449sed 's/^/| /' conftest.$ac_ext >&5
20450
ca81d7a0 20451 ac_cv_lib_crypto_mit_des_cbc_encrypt=no
503d2be0 20452fi
ca81d7a0 20453
f053c89f 20454rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20455 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20456LIBS=$ac_check_lib_save_LIBS
20457fi
ca81d7a0
JD
20458{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_mit_des_cbc_encrypt" >&5
20459echo "${ECHO_T}$ac_cv_lib_crypto_mit_des_cbc_encrypt" >&6; }
503d2be0 20460if test $ac_cv_lib_crypto_mit_des_cbc_encrypt = yes; then
c0d27fcc 20461 cat >>confdefs.h <<_ACEOF
503d2be0 20462#define HAVE_LIBCRYPTO 1
c0d27fcc 20463_ACEOF
a21616bd
KR
20464
20465 LIBS="-lcrypto $LIBS"
20466
a21616bd
KR
20467fi
20468
c0d27fcc 20469
ca81d7a0
JD
20470{ echo "$as_me:$LINENO: checking for krb5_init_context in -lkrb5" >&5
20471echo $ECHO_N "checking for krb5_init_context in -lkrb5... $ECHO_C" >&6; }
503d2be0
AS
20472if test "${ac_cv_lib_krb5_krb5_init_context+set}" = set; then
20473 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20474else
503d2be0 20475 ac_check_lib_save_LIBS=$LIBS
a21616bd 20476LIBS="-lkrb5 $LIBS"
503d2be0 20477cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20478/* confdefs.h. */
20479_ACEOF
20480cat confdefs.h >>conftest.$ac_ext
20481cat >>conftest.$ac_ext <<_ACEOF
20482/* end confdefs.h. */
a21616bd 20483
ca81d7a0
JD
20484/* Override any GCC internal prototype to avoid an error.
20485 Use char because int might match the return type of a GCC
20486 builtin and then its argument prototype would still apply. */
503d2be0
AS
20487#ifdef __cplusplus
20488extern "C"
20489#endif
503d2be0
AS
20490char krb5_init_context ();
20491int
20492main ()
20493{
ca81d7a0 20494return krb5_init_context ();
503d2be0
AS
20495 ;
20496 return 0;
20497}
20498_ACEOF
20499rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20500if { (ac_try="$ac_link"
20501case "(($ac_try" in
20502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20503 *) ac_try_echo=$ac_try;;
20504esac
20505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20506 (eval "$ac_link") 2>conftest.er1
503d2be0 20507 ac_status=$?
edfaf76d
LK
20508 grep -v '^ *+' conftest.er1 >conftest.err
20509 rm -f conftest.er1
20510 cat conftest.err >&5
c0d27fcc 20511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20512 (exit $ac_status); } && {
20513 test -z "$ac_c_werror_flag" ||
20514 test ! -s conftest.err
20515 } && test -s conftest$ac_exeext &&
20516 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20517 ac_cv_lib_krb5_krb5_init_context=yes
20518else
20519 echo "$as_me: failed program was:" >&5
19650fd6
AS
20520sed 's/^/| /' conftest.$ac_ext >&5
20521
ca81d7a0 20522 ac_cv_lib_krb5_krb5_init_context=no
503d2be0 20523fi
ca81d7a0 20524
f053c89f 20525rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20526 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20527LIBS=$ac_check_lib_save_LIBS
20528fi
ca81d7a0
JD
20529{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb5_krb5_init_context" >&5
20530echo "${ECHO_T}$ac_cv_lib_krb5_krb5_init_context" >&6; }
503d2be0 20531if test $ac_cv_lib_krb5_krb5_init_context = yes; then
c0d27fcc 20532 cat >>confdefs.h <<_ACEOF
503d2be0 20533#define HAVE_LIBKRB5 1
c0d27fcc 20534_ACEOF
a21616bd
KR
20535
20536 LIBS="-lkrb5 $LIBS"
20537
a21616bd
KR
20538fi
20539
20540 if test "${with_kerberos5+set}" != set; then
503d2be0 20541
ca81d7a0
JD
20542{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes425" >&5
20543echo $ECHO_N "checking for des_cbc_encrypt in -ldes425... $ECHO_C" >&6; }
503d2be0
AS
20544if test "${ac_cv_lib_des425_des_cbc_encrypt+set}" = set; then
20545 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20546else
503d2be0 20547 ac_check_lib_save_LIBS=$LIBS
a21616bd 20548LIBS="-ldes425 $LIBS"
503d2be0 20549cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20550/* confdefs.h. */
20551_ACEOF
20552cat confdefs.h >>conftest.$ac_ext
20553cat >>conftest.$ac_ext <<_ACEOF
20554/* end confdefs.h. */
503d2be0 20555
ca81d7a0
JD
20556/* Override any GCC internal prototype to avoid an error.
20557 Use char because int might match the return type of a GCC
20558 builtin and then its argument prototype would still apply. */
503d2be0
AS
20559#ifdef __cplusplus
20560extern "C"
20561#endif
503d2be0
AS
20562char des_cbc_encrypt ();
20563int
20564main ()
20565{
ca81d7a0 20566return des_cbc_encrypt ();
503d2be0
AS
20567 ;
20568 return 0;
20569}
20570_ACEOF
20571rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20572if { (ac_try="$ac_link"
20573case "(($ac_try" in
20574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20575 *) ac_try_echo=$ac_try;;
20576esac
20577eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20578 (eval "$ac_link") 2>conftest.er1
503d2be0 20579 ac_status=$?
edfaf76d
LK
20580 grep -v '^ *+' conftest.er1 >conftest.err
20581 rm -f conftest.er1
20582 cat conftest.err >&5
c0d27fcc 20583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20584 (exit $ac_status); } && {
20585 test -z "$ac_c_werror_flag" ||
20586 test ! -s conftest.err
20587 } && test -s conftest$ac_exeext &&
20588 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20589 ac_cv_lib_des425_des_cbc_encrypt=yes
20590else
20591 echo "$as_me: failed program was:" >&5
19650fd6
AS
20592sed 's/^/| /' conftest.$ac_ext >&5
20593
ca81d7a0 20594 ac_cv_lib_des425_des_cbc_encrypt=no
503d2be0 20595fi
ca81d7a0 20596
f053c89f 20597rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20598 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20599LIBS=$ac_check_lib_save_LIBS
20600fi
ca81d7a0
JD
20601{ echo "$as_me:$LINENO: result: $ac_cv_lib_des425_des_cbc_encrypt" >&5
20602echo "${ECHO_T}$ac_cv_lib_des425_des_cbc_encrypt" >&6; }
503d2be0 20603if test $ac_cv_lib_des425_des_cbc_encrypt = yes; then
c0d27fcc 20604 cat >>confdefs.h <<_ACEOF
503d2be0 20605#define HAVE_LIBDES425 1
c0d27fcc 20606_ACEOF
a21616bd
KR
20607
20608 LIBS="-ldes425 $LIBS"
20609
20610else
503d2be0 20611
ca81d7a0
JD
20612{ echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5
20613echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; }
503d2be0
AS
20614if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then
20615 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20616else
503d2be0 20617 ac_check_lib_save_LIBS=$LIBS
a21616bd 20618LIBS="-ldes $LIBS"
503d2be0 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. */
503d2be0 20625
ca81d7a0
JD
20626/* Override any GCC internal prototype to avoid an error.
20627 Use char because int might match the return type of a GCC
20628 builtin and then its argument prototype would still apply. */
503d2be0
AS
20629#ifdef __cplusplus
20630extern "C"
20631#endif
503d2be0
AS
20632char des_cbc_encrypt ();
20633int
20634main ()
20635{
ca81d7a0 20636return des_cbc_encrypt ();
503d2be0
AS
20637 ;
20638 return 0;
20639}
20640_ACEOF
20641rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20642if { (ac_try="$ac_link"
20643case "(($ac_try" in
20644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20645 *) ac_try_echo=$ac_try;;
20646esac
20647eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20648 (eval "$ac_link") 2>conftest.er1
503d2be0 20649 ac_status=$?
edfaf76d
LK
20650 grep -v '^ *+' conftest.er1 >conftest.err
20651 rm -f conftest.er1
20652 cat conftest.err >&5
c0d27fcc 20653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20654 (exit $ac_status); } && {
20655 test -z "$ac_c_werror_flag" ||
20656 test ! -s conftest.err
20657 } && test -s conftest$ac_exeext &&
20658 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20659 ac_cv_lib_des_des_cbc_encrypt=yes
20660else
20661 echo "$as_me: failed program was:" >&5
19650fd6
AS
20662sed 's/^/| /' conftest.$ac_ext >&5
20663
ca81d7a0 20664 ac_cv_lib_des_des_cbc_encrypt=no
503d2be0 20665fi
ca81d7a0 20666
f053c89f 20667rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20668 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20669LIBS=$ac_check_lib_save_LIBS
20670fi
ca81d7a0
JD
20671{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
20672echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; }
503d2be0 20673if test $ac_cv_lib_des_des_cbc_encrypt = yes; then
c0d27fcc 20674 cat >>confdefs.h <<_ACEOF
503d2be0 20675#define HAVE_LIBDES 1
c0d27fcc 20676_ACEOF
a21616bd
KR
20677
20678 LIBS="-ldes $LIBS"
20679
a21616bd
KR
20680fi
20681
20682fi
20683
c0d27fcc 20684
ca81d7a0
JD
20685{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb4" >&5
20686echo $ECHO_N "checking for krb_get_cred in -lkrb4... $ECHO_C" >&6; }
503d2be0
AS
20687if test "${ac_cv_lib_krb4_krb_get_cred+set}" = set; then
20688 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20689else
503d2be0 20690 ac_check_lib_save_LIBS=$LIBS
a21616bd 20691LIBS="-lkrb4 $LIBS"
503d2be0 20692cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20693/* confdefs.h. */
20694_ACEOF
20695cat confdefs.h >>conftest.$ac_ext
20696cat >>conftest.$ac_ext <<_ACEOF
20697/* end confdefs.h. */
503d2be0 20698
ca81d7a0
JD
20699/* Override any GCC internal prototype to avoid an error.
20700 Use char because int might match the return type of a GCC
20701 builtin and then its argument prototype would still apply. */
503d2be0
AS
20702#ifdef __cplusplus
20703extern "C"
20704#endif
503d2be0
AS
20705char krb_get_cred ();
20706int
20707main ()
20708{
f053c89f 20709return krb_get_cred ();
503d2be0
AS
20710 ;
20711 return 0;
20712}
20713_ACEOF
20714rm -f conftest.$ac_objext conftest$ac_exeext
f053c89f
CY
20715if { (ac_try="$ac_link"
20716case "(($ac_try" in
ca81d7a0
JD
20717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20718 *) ac_try_echo=$ac_try;;
20719esac
20720eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 20721 (eval "$ac_link") 2>conftest.er1
503d2be0 20722 ac_status=$?
edfaf76d
LK
20723 grep -v '^ *+' conftest.er1 >conftest.err
20724 rm -f conftest.er1
20725 cat conftest.err >&5
c0d27fcc 20726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20727 (exit $ac_status); } && {
20728 test -z "$ac_c_werror_flag" ||
20729 test ! -s conftest.err
20730 } && test -s conftest$ac_exeext &&
20731 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20732 ac_cv_lib_krb4_krb_get_cred=yes
20733else
20734 echo "$as_me: failed program was:" >&5
19650fd6
AS
20735sed 's/^/| /' conftest.$ac_ext >&5
20736
ca81d7a0 20737 ac_cv_lib_krb4_krb_get_cred=no
503d2be0 20738fi
ca81d7a0 20739
f053c89f 20740rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20741 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20742LIBS=$ac_check_lib_save_LIBS
20743fi
ca81d7a0
JD
20744{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb4_krb_get_cred" >&5
20745echo "${ECHO_T}$ac_cv_lib_krb4_krb_get_cred" >&6; }
503d2be0 20746if test $ac_cv_lib_krb4_krb_get_cred = yes; then
c0d27fcc 20747 cat >>confdefs.h <<_ACEOF
503d2be0 20748#define HAVE_LIBKRB4 1
c0d27fcc 20749_ACEOF
a21616bd
KR
20750
20751 LIBS="-lkrb4 $LIBS"
20752
20753else
503d2be0 20754
ca81d7a0
JD
20755{ echo "$as_me:$LINENO: checking for krb_get_cred in -lkrb" >&5
20756echo $ECHO_N "checking for krb_get_cred in -lkrb... $ECHO_C" >&6; }
503d2be0
AS
20757if test "${ac_cv_lib_krb_krb_get_cred+set}" = set; then
20758 echo $ECHO_N "(cached) $ECHO_C" >&6
a21616bd 20759else
503d2be0 20760 ac_check_lib_save_LIBS=$LIBS
a21616bd 20761LIBS="-lkrb $LIBS"
503d2be0 20762cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20763/* confdefs.h. */
20764_ACEOF
20765cat confdefs.h >>conftest.$ac_ext
20766cat >>conftest.$ac_ext <<_ACEOF
20767/* end confdefs.h. */
503d2be0 20768
ca81d7a0
JD
20769/* Override any GCC internal prototype to avoid an error.
20770 Use char because int might match the return type of a GCC
20771 builtin and then its argument prototype would still apply. */
503d2be0
AS
20772#ifdef __cplusplus
20773extern "C"
20774#endif
503d2be0
AS
20775char krb_get_cred ();
20776int
20777main ()
20778{
ca81d7a0 20779return krb_get_cred ();
503d2be0
AS
20780 ;
20781 return 0;
20782}
20783_ACEOF
20784rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
20785if { (ac_try="$ac_link"
20786case "(($ac_try" in
20787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20788 *) ac_try_echo=$ac_try;;
20789esac
20790eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20791 (eval "$ac_link") 2>conftest.er1
503d2be0 20792 ac_status=$?
edfaf76d
LK
20793 grep -v '^ *+' conftest.er1 >conftest.err
20794 rm -f conftest.er1
20795 cat conftest.err >&5
c0d27fcc 20796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20797 (exit $ac_status); } && {
20798 test -z "$ac_c_werror_flag" ||
20799 test ! -s conftest.err
20800 } && test -s conftest$ac_exeext &&
20801 $as_test_x conftest$ac_exeext; then
503d2be0
AS
20802 ac_cv_lib_krb_krb_get_cred=yes
20803else
20804 echo "$as_me: failed program was:" >&5
19650fd6
AS
20805sed 's/^/| /' conftest.$ac_ext >&5
20806
ca81d7a0 20807 ac_cv_lib_krb_krb_get_cred=no
503d2be0 20808fi
ca81d7a0 20809
f053c89f 20810rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 20811 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
20812LIBS=$ac_check_lib_save_LIBS
20813fi
ca81d7a0
JD
20814{ echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_get_cred" >&5
20815echo "${ECHO_T}$ac_cv_lib_krb_krb_get_cred" >&6; }
503d2be0 20816if test $ac_cv_lib_krb_krb_get_cred = yes; then
c0d27fcc 20817 cat >>confdefs.h <<_ACEOF
503d2be0 20818#define HAVE_LIBKRB 1
c0d27fcc 20819_ACEOF
a21616bd
KR
20820
20821 LIBS="-lkrb $LIBS"
20822
a21616bd
KR
20823fi
20824
20825fi
20826
20827 fi
20828
20829 if test "${with_kerberos5+set}" = set; then
503d2be0
AS
20830
20831for ac_header in krb5.h
a21616bd 20832do
503d2be0 20833as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20834if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20835 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20836echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20837if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20838 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20839fi
ca81d7a0
JD
20840ac_res=`eval echo '${'$as_ac_Header'}'`
20841 { echo "$as_me:$LINENO: result: $ac_res" >&5
20842echo "${ECHO_T}$ac_res" >&6; }
98418dba 20843else
c0d27fcc 20844 # Is the header compilable?
ca81d7a0
JD
20845{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20846echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20847cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20848/* confdefs.h. */
20849_ACEOF
20850cat confdefs.h >>conftest.$ac_ext
20851cat >>conftest.$ac_ext <<_ACEOF
20852/* end confdefs.h. */
c0d27fcc
MR
20853$ac_includes_default
20854#include <$ac_header>
20855_ACEOF
20856rm -f conftest.$ac_objext
ca81d7a0
JD
20857if { (ac_try="$ac_compile"
20858case "(($ac_try" in
20859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20860 *) ac_try_echo=$ac_try;;
20861esac
20862eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20863 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 20864 ac_status=$?
edfaf76d
LK
20865 grep -v '^ *+' conftest.er1 >conftest.err
20866 rm -f conftest.er1
20867 cat conftest.err >&5
c0d27fcc 20868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20869 (exit $ac_status); } && {
20870 test -z "$ac_c_werror_flag" ||
20871 test ! -s conftest.err
20872 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
20873 ac_header_compiler=yes
20874else
20875 echo "$as_me: failed program was:" >&5
19650fd6
AS
20876sed 's/^/| /' conftest.$ac_ext >&5
20877
ca81d7a0 20878 ac_header_compiler=no
c0d27fcc 20879fi
ca81d7a0
JD
20880
20881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20882{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20883echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
20884
20885# Is the header present?
ca81d7a0
JD
20886{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
20887echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 20888cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20889/* confdefs.h. */
20890_ACEOF
20891cat confdefs.h >>conftest.$ac_ext
20892cat >>conftest.$ac_ext <<_ACEOF
20893/* end confdefs.h. */
503d2be0
AS
20894#include <$ac_header>
20895_ACEOF
ca81d7a0
JD
20896if { (ac_try="$ac_cpp conftest.$ac_ext"
20897case "(($ac_try" in
20898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20899 *) ac_try_echo=$ac_try;;
20900esac
20901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20902 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 20903 ac_status=$?
6bae0ccf 20904 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
20905 rm -f conftest.er1
20906 cat conftest.err >&5
c0d27fcc 20907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
20908 (exit $ac_status); } >/dev/null && {
20909 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
20910 test ! -s conftest.err
20911 }; then
c0d27fcc 20912 ac_header_preproc=yes
503d2be0
AS
20913else
20914 echo "$as_me: failed program was:" >&5
19650fd6
AS
20915sed 's/^/| /' conftest.$ac_ext >&5
20916
c0d27fcc 20917 ac_header_preproc=no
a21616bd 20918fi
ca81d7a0 20919
503d2be0 20920rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
20921{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20922echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
20923
20924# So? What about this header?
edfaf76d
LK
20925case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20926 yes:no: )
c0d27fcc
MR
20927 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
20928echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
20929 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
20930echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
20931 ac_header_preproc=yes
19650fd6 20932 ;;
edfaf76d 20933 no:yes:* )
c0d27fcc
MR
20934 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
20935echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
20936 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
20937echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
20938 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
20939echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
20940 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
20941echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 20942 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 20943echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
20944 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
20945echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 20946
19650fd6 20947 ;;
c0d27fcc 20948esac
ca81d7a0
JD
20949{ echo "$as_me:$LINENO: checking for $ac_header" >&5
20950echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20951if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
20952 echo $ECHO_N "(cached) $ECHO_C" >&6
20953else
edfaf76d 20954 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 20955fi
ca81d7a0
JD
20956ac_res=`eval echo '${'$as_ac_Header'}'`
20957 { echo "$as_me:$LINENO: result: $ac_res" >&5
20958echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
20959
20960fi
503d2be0 20961if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 20962 cat >>confdefs.h <<_ACEOF
503d2be0 20963#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 20964_ACEOF
503d2be0 20965
a21616bd 20966fi
c0d27fcc 20967
a21616bd
KR
20968done
20969
20970 else
503d2be0
AS
20971
20972for ac_header in des.h
a21616bd 20973do
503d2be0 20974as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
20975if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
20976 { echo "$as_me:$LINENO: checking for $ac_header" >&5
20977echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
20978if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 20979 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 20980fi
ca81d7a0
JD
20981ac_res=`eval echo '${'$as_ac_Header'}'`
20982 { echo "$as_me:$LINENO: result: $ac_res" >&5
20983echo "${ECHO_T}$ac_res" >&6; }
98418dba 20984else
c0d27fcc 20985 # Is the header compilable?
ca81d7a0
JD
20986{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
20987echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 20988cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
20989/* confdefs.h. */
20990_ACEOF
20991cat confdefs.h >>conftest.$ac_ext
20992cat >>conftest.$ac_ext <<_ACEOF
20993/* end confdefs.h. */
c0d27fcc
MR
20994$ac_includes_default
20995#include <$ac_header>
20996_ACEOF
20997rm -f conftest.$ac_objext
ca81d7a0
JD
20998if { (ac_try="$ac_compile"
20999case "(($ac_try" in
21000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21001 *) ac_try_echo=$ac_try;;
21002esac
21003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21004 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21005 ac_status=$?
edfaf76d
LK
21006 grep -v '^ *+' conftest.er1 >conftest.err
21007 rm -f conftest.er1
21008 cat conftest.err >&5
c0d27fcc 21009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21010 (exit $ac_status); } && {
21011 test -z "$ac_c_werror_flag" ||
21012 test ! -s conftest.err
21013 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21014 ac_header_compiler=yes
21015else
21016 echo "$as_me: failed program was:" >&5
19650fd6
AS
21017sed 's/^/| /' conftest.$ac_ext >&5
21018
ca81d7a0 21019 ac_header_compiler=no
c0d27fcc 21020fi
ca81d7a0
JD
21021
21022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21023{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21024echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21025
21026# Is the header present?
ca81d7a0
JD
21027{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21028echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21029cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21030/* confdefs.h. */
21031_ACEOF
21032cat confdefs.h >>conftest.$ac_ext
21033cat >>conftest.$ac_ext <<_ACEOF
21034/* end confdefs.h. */
503d2be0
AS
21035#include <$ac_header>
21036_ACEOF
ca81d7a0
JD
21037if { (ac_try="$ac_cpp conftest.$ac_ext"
21038case "(($ac_try" in
21039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21040 *) ac_try_echo=$ac_try;;
21041esac
21042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21043 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21044 ac_status=$?
6bae0ccf 21045 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21046 rm -f conftest.er1
21047 cat conftest.err >&5
c0d27fcc 21048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21049 (exit $ac_status); } >/dev/null && {
21050 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21051 test ! -s conftest.err
21052 }; then
c0d27fcc 21053 ac_header_preproc=yes
503d2be0
AS
21054else
21055 echo "$as_me: failed program was:" >&5
19650fd6
AS
21056sed 's/^/| /' conftest.$ac_ext >&5
21057
c0d27fcc 21058 ac_header_preproc=no
a21616bd 21059fi
ca81d7a0 21060
503d2be0 21061rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21062{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21063echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21064
21065# So? What about this header?
edfaf76d
LK
21066case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21067 yes:no: )
c0d27fcc
MR
21068 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21069echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21070 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21071echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21072 ac_header_preproc=yes
19650fd6 21073 ;;
edfaf76d 21074 no:yes:* )
c0d27fcc
MR
21075 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21076echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21077 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21078echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21079 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21080echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21081 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21082echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21083 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21084echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21085 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21086echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21087
19650fd6 21088 ;;
c0d27fcc 21089esac
ca81d7a0
JD
21090{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21091echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21092if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21093 echo $ECHO_N "(cached) $ECHO_C" >&6
21094else
edfaf76d 21095 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21096fi
ca81d7a0
JD
21097ac_res=`eval echo '${'$as_ac_Header'}'`
21098 { echo "$as_me:$LINENO: result: $ac_res" >&5
21099echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21100
21101fi
503d2be0 21102if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21103 cat >>confdefs.h <<_ACEOF
503d2be0 21104#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21105_ACEOF
503d2be0 21106
a21616bd 21107else
503d2be0
AS
21108
21109for ac_header in kerberosIV/des.h
a21616bd 21110do
503d2be0 21111as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21112if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21113 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21114echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21115if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21116 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21117fi
ca81d7a0
JD
21118ac_res=`eval echo '${'$as_ac_Header'}'`
21119 { echo "$as_me:$LINENO: result: $ac_res" >&5
21120echo "${ECHO_T}$ac_res" >&6; }
98418dba 21121else
c0d27fcc 21122 # Is the header compilable?
ca81d7a0
JD
21123{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21124echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21125cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21126/* confdefs.h. */
21127_ACEOF
21128cat confdefs.h >>conftest.$ac_ext
21129cat >>conftest.$ac_ext <<_ACEOF
21130/* end confdefs.h. */
c0d27fcc
MR
21131$ac_includes_default
21132#include <$ac_header>
21133_ACEOF
21134rm -f conftest.$ac_objext
ca81d7a0
JD
21135if { (ac_try="$ac_compile"
21136case "(($ac_try" in
21137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21138 *) ac_try_echo=$ac_try;;
21139esac
21140eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21141 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21142 ac_status=$?
edfaf76d
LK
21143 grep -v '^ *+' conftest.er1 >conftest.err
21144 rm -f conftest.er1
21145 cat conftest.err >&5
c0d27fcc 21146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21147 (exit $ac_status); } && {
21148 test -z "$ac_c_werror_flag" ||
21149 test ! -s conftest.err
21150 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21151 ac_header_compiler=yes
21152else
21153 echo "$as_me: failed program was:" >&5
19650fd6
AS
21154sed 's/^/| /' conftest.$ac_ext >&5
21155
ca81d7a0 21156 ac_header_compiler=no
c0d27fcc 21157fi
ca81d7a0
JD
21158
21159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21160{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21161echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21162
21163# Is the header present?
ca81d7a0
JD
21164{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21165echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21166cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21167/* confdefs.h. */
21168_ACEOF
21169cat confdefs.h >>conftest.$ac_ext
21170cat >>conftest.$ac_ext <<_ACEOF
21171/* end confdefs.h. */
503d2be0
AS
21172#include <$ac_header>
21173_ACEOF
ca81d7a0
JD
21174if { (ac_try="$ac_cpp conftest.$ac_ext"
21175case "(($ac_try" in
21176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21177 *) ac_try_echo=$ac_try;;
21178esac
21179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21180 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21181 ac_status=$?
6bae0ccf 21182 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21183 rm -f conftest.er1
21184 cat conftest.err >&5
c0d27fcc 21185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21186 (exit $ac_status); } >/dev/null && {
21187 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21188 test ! -s conftest.err
21189 }; then
c0d27fcc 21190 ac_header_preproc=yes
503d2be0
AS
21191else
21192 echo "$as_me: failed program was:" >&5
19650fd6
AS
21193sed 's/^/| /' conftest.$ac_ext >&5
21194
c0d27fcc 21195 ac_header_preproc=no
a21616bd 21196fi
ca81d7a0 21197
503d2be0 21198rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21199{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21200echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21201
21202# So? What about this header?
edfaf76d
LK
21203case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21204 yes:no: )
c0d27fcc
MR
21205 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21206echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21207 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21208echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21209 ac_header_preproc=yes
19650fd6 21210 ;;
edfaf76d 21211 no:yes:* )
c0d27fcc
MR
21212 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21213echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21214 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21215echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21216 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21217echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21218 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21219echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21220 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21221echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21222 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21223echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21224
19650fd6 21225 ;;
c0d27fcc 21226esac
ca81d7a0
JD
21227{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21228echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21229if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21230 echo $ECHO_N "(cached) $ECHO_C" >&6
21231else
edfaf76d 21232 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21233fi
ca81d7a0
JD
21234ac_res=`eval echo '${'$as_ac_Header'}'`
21235 { echo "$as_me:$LINENO: result: $ac_res" >&5
21236echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21237
21238fi
503d2be0 21239if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21240 cat >>confdefs.h <<_ACEOF
503d2be0 21241#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21242_ACEOF
503d2be0 21243
a21616bd 21244else
503d2be0
AS
21245
21246for ac_header in kerberos/des.h
a21616bd 21247do
503d2be0 21248as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21249if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21250 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21251echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21252if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21253 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21254fi
ca81d7a0
JD
21255ac_res=`eval echo '${'$as_ac_Header'}'`
21256 { echo "$as_me:$LINENO: result: $ac_res" >&5
21257echo "${ECHO_T}$ac_res" >&6; }
98418dba 21258else
c0d27fcc 21259 # Is the header compilable?
ca81d7a0
JD
21260{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21261echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21262cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21263/* confdefs.h. */
21264_ACEOF
21265cat confdefs.h >>conftest.$ac_ext
21266cat >>conftest.$ac_ext <<_ACEOF
21267/* end confdefs.h. */
c0d27fcc
MR
21268$ac_includes_default
21269#include <$ac_header>
21270_ACEOF
21271rm -f conftest.$ac_objext
ca81d7a0
JD
21272if { (ac_try="$ac_compile"
21273case "(($ac_try" in
21274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21275 *) ac_try_echo=$ac_try;;
21276esac
21277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21278 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21279 ac_status=$?
edfaf76d
LK
21280 grep -v '^ *+' conftest.er1 >conftest.err
21281 rm -f conftest.er1
21282 cat conftest.err >&5
c0d27fcc 21283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21284 (exit $ac_status); } && {
21285 test -z "$ac_c_werror_flag" ||
21286 test ! -s conftest.err
21287 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21288 ac_header_compiler=yes
21289else
21290 echo "$as_me: failed program was:" >&5
19650fd6
AS
21291sed 's/^/| /' conftest.$ac_ext >&5
21292
ca81d7a0 21293 ac_header_compiler=no
c0d27fcc 21294fi
ca81d7a0
JD
21295
21296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21297{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21298echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21299
21300# Is the header present?
ca81d7a0
JD
21301{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21302echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21303cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21304/* confdefs.h. */
21305_ACEOF
21306cat confdefs.h >>conftest.$ac_ext
21307cat >>conftest.$ac_ext <<_ACEOF
21308/* end confdefs.h. */
503d2be0
AS
21309#include <$ac_header>
21310_ACEOF
ca81d7a0
JD
21311if { (ac_try="$ac_cpp conftest.$ac_ext"
21312case "(($ac_try" in
21313 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21314 *) ac_try_echo=$ac_try;;
21315esac
21316eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21317 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21318 ac_status=$?
6bae0ccf 21319 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21320 rm -f conftest.er1
21321 cat conftest.err >&5
c0d27fcc 21322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21323 (exit $ac_status); } >/dev/null && {
21324 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21325 test ! -s conftest.err
21326 }; then
c0d27fcc 21327 ac_header_preproc=yes
503d2be0
AS
21328else
21329 echo "$as_me: failed program was:" >&5
19650fd6
AS
21330sed 's/^/| /' conftest.$ac_ext >&5
21331
c0d27fcc 21332 ac_header_preproc=no
a21616bd 21333fi
ca81d7a0 21334
503d2be0 21335rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21336{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21337echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21338
21339# So? What about this header?
edfaf76d
LK
21340case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21341 yes:no: )
c0d27fcc
MR
21342 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21343echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21344 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21345echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21346 ac_header_preproc=yes
19650fd6 21347 ;;
edfaf76d 21348 no:yes:* )
c0d27fcc
MR
21349 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21350echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21351 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21352echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21353 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21354echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21355 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21356echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21357 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21358echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21359 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21360echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21361
19650fd6 21362 ;;
c0d27fcc 21363esac
ca81d7a0
JD
21364{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21365echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21366if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21367 echo $ECHO_N "(cached) $ECHO_C" >&6
21368else
edfaf76d 21369 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21370fi
ca81d7a0
JD
21371ac_res=`eval echo '${'$as_ac_Header'}'`
21372 { echo "$as_me:$LINENO: result: $ac_res" >&5
21373echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21374
21375fi
503d2be0 21376if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21377 cat >>confdefs.h <<_ACEOF
503d2be0 21378#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21379_ACEOF
a21616bd
KR
21380
21381fi
c0d27fcc 21382
a21616bd
KR
21383done
21384
98418dba 21385fi
c0d27fcc 21386
925c2f3f
EZ
21387done
21388
98418dba 21389fi
c0d27fcc 21390
925c2f3f 21391done
98418dba 21392
c0d27fcc 21393
925c2f3f
EZ
21394for ac_header in krb.h
21395do
21396as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21397if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21398 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21399echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21400if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
925c2f3f 21401 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21402fi
ca81d7a0
JD
21403ac_res=`eval echo '${'$as_ac_Header'}'`
21404 { echo "$as_me:$LINENO: result: $ac_res" >&5
21405echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21406else
21407 # Is the header compilable?
ca81d7a0
JD
21408{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21409echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21410cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21411/* confdefs.h. */
21412_ACEOF
21413cat confdefs.h >>conftest.$ac_ext
21414cat >>conftest.$ac_ext <<_ACEOF
21415/* end confdefs.h. */
c0d27fcc
MR
21416$ac_includes_default
21417#include <$ac_header>
21418_ACEOF
21419rm -f conftest.$ac_objext
ca81d7a0
JD
21420if { (ac_try="$ac_compile"
21421case "(($ac_try" in
21422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21423 *) ac_try_echo=$ac_try;;
21424esac
21425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21426 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21427 ac_status=$?
edfaf76d
LK
21428 grep -v '^ *+' conftest.er1 >conftest.err
21429 rm -f conftest.er1
21430 cat conftest.err >&5
c0d27fcc 21431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21432 (exit $ac_status); } && {
21433 test -z "$ac_c_werror_flag" ||
21434 test ! -s conftest.err
21435 } && test -s conftest.$ac_objext; then
c0d27fcc 21436 ac_header_compiler=yes
925c2f3f 21437else
c0d27fcc 21438 echo "$as_me: failed program was:" >&5
19650fd6
AS
21439sed 's/^/| /' conftest.$ac_ext >&5
21440
ca81d7a0 21441 ac_header_compiler=no
c0d27fcc 21442fi
ca81d7a0
JD
21443
21444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21445{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21446echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21447
21448# Is the header present?
ca81d7a0
JD
21449{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21450echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21451cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21452/* confdefs.h. */
21453_ACEOF
21454cat confdefs.h >>conftest.$ac_ext
21455cat >>conftest.$ac_ext <<_ACEOF
21456/* end confdefs.h. */
503d2be0
AS
21457#include <$ac_header>
21458_ACEOF
ca81d7a0
JD
21459if { (ac_try="$ac_cpp conftest.$ac_ext"
21460case "(($ac_try" in
21461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21462 *) ac_try_echo=$ac_try;;
21463esac
21464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21465 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21466 ac_status=$?
6bae0ccf 21467 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21468 rm -f conftest.er1
21469 cat conftest.err >&5
c0d27fcc 21470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21471 (exit $ac_status); } >/dev/null && {
21472 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21473 test ! -s conftest.err
21474 }; then
c0d27fcc 21475 ac_header_preproc=yes
503d2be0
AS
21476else
21477 echo "$as_me: failed program was:" >&5
19650fd6
AS
21478sed 's/^/| /' conftest.$ac_ext >&5
21479
c0d27fcc 21480 ac_header_preproc=no
a21616bd 21481fi
ca81d7a0 21482
503d2be0 21483rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21484{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21485echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21486
21487# So? What about this header?
edfaf76d
LK
21488case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21489 yes:no: )
c0d27fcc
MR
21490 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21491echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21492 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21493echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21494 ac_header_preproc=yes
19650fd6 21495 ;;
edfaf76d 21496 no:yes:* )
c0d27fcc
MR
21497 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21498echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21499 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21500echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21501 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21502echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21503 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21504echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21505 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21506echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21507 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21508echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21509
19650fd6 21510 ;;
c0d27fcc 21511esac
ca81d7a0
JD
21512{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21513echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21514if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21515 echo $ECHO_N "(cached) $ECHO_C" >&6
21516else
edfaf76d 21517 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21518fi
ca81d7a0
JD
21519ac_res=`eval echo '${'$as_ac_Header'}'`
21520 { echo "$as_me:$LINENO: result: $ac_res" >&5
21521echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21522
21523fi
503d2be0 21524if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21525 cat >>confdefs.h <<_ACEOF
503d2be0 21526#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21527_ACEOF
503d2be0 21528
a21616bd 21529else
503d2be0
AS
21530
21531for ac_header in kerberosIV/krb.h
a21616bd 21532do
503d2be0 21533as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21534if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21535 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21536echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21537if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21538 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21539fi
ca81d7a0
JD
21540ac_res=`eval echo '${'$as_ac_Header'}'`
21541 { echo "$as_me:$LINENO: result: $ac_res" >&5
21542echo "${ECHO_T}$ac_res" >&6; }
98418dba 21543else
c0d27fcc 21544 # Is the header compilable?
ca81d7a0
JD
21545{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21546echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21547cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21548/* confdefs.h. */
21549_ACEOF
21550cat confdefs.h >>conftest.$ac_ext
21551cat >>conftest.$ac_ext <<_ACEOF
21552/* end confdefs.h. */
c0d27fcc
MR
21553$ac_includes_default
21554#include <$ac_header>
21555_ACEOF
21556rm -f conftest.$ac_objext
ca81d7a0
JD
21557if { (ac_try="$ac_compile"
21558case "(($ac_try" in
21559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21560 *) ac_try_echo=$ac_try;;
21561esac
21562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21563 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21564 ac_status=$?
edfaf76d
LK
21565 grep -v '^ *+' conftest.er1 >conftest.err
21566 rm -f conftest.er1
21567 cat conftest.err >&5
c0d27fcc 21568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21569 (exit $ac_status); } && {
21570 test -z "$ac_c_werror_flag" ||
21571 test ! -s conftest.err
21572 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21573 ac_header_compiler=yes
21574else
21575 echo "$as_me: failed program was:" >&5
19650fd6
AS
21576sed 's/^/| /' conftest.$ac_ext >&5
21577
ca81d7a0 21578 ac_header_compiler=no
c0d27fcc 21579fi
ca81d7a0
JD
21580
21581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21582{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21583echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21584
21585# Is the header present?
ca81d7a0
JD
21586{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21587echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21588cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21589/* confdefs.h. */
21590_ACEOF
21591cat confdefs.h >>conftest.$ac_ext
21592cat >>conftest.$ac_ext <<_ACEOF
21593/* end confdefs.h. */
503d2be0
AS
21594#include <$ac_header>
21595_ACEOF
ca81d7a0
JD
21596if { (ac_try="$ac_cpp conftest.$ac_ext"
21597case "(($ac_try" in
21598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21599 *) ac_try_echo=$ac_try;;
21600esac
21601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21602 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21603 ac_status=$?
6bae0ccf 21604 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21605 rm -f conftest.er1
21606 cat conftest.err >&5
c0d27fcc 21607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21608 (exit $ac_status); } >/dev/null && {
21609 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21610 test ! -s conftest.err
21611 }; then
c0d27fcc 21612 ac_header_preproc=yes
503d2be0
AS
21613else
21614 echo "$as_me: failed program was:" >&5
19650fd6
AS
21615sed 's/^/| /' conftest.$ac_ext >&5
21616
c0d27fcc 21617 ac_header_preproc=no
a21616bd 21618fi
ca81d7a0 21619
503d2be0 21620rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21621{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21622echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21623
21624# So? What about this header?
edfaf76d
LK
21625case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21626 yes:no: )
c0d27fcc
MR
21627 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21628echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21629 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21630echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21631 ac_header_preproc=yes
19650fd6 21632 ;;
edfaf76d 21633 no:yes:* )
c0d27fcc
MR
21634 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21635echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21636 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21637echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21638 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21639echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21640 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21641echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21642 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21643echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21644 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21645echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21646
19650fd6 21647 ;;
c0d27fcc 21648esac
ca81d7a0
JD
21649{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21650echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21651if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21652 echo $ECHO_N "(cached) $ECHO_C" >&6
21653else
edfaf76d 21654 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21655fi
ca81d7a0
JD
21656ac_res=`eval echo '${'$as_ac_Header'}'`
21657 { echo "$as_me:$LINENO: result: $ac_res" >&5
21658echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21659
21660fi
503d2be0 21661if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21662 cat >>confdefs.h <<_ACEOF
503d2be0 21663#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21664_ACEOF
503d2be0 21665
a21616bd 21666else
503d2be0
AS
21667
21668for ac_header in kerberos/krb.h
a21616bd 21669do
503d2be0 21670as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21671if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21672 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21673echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21674if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21675 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21676fi
ca81d7a0
JD
21677ac_res=`eval echo '${'$as_ac_Header'}'`
21678 { echo "$as_me:$LINENO: result: $ac_res" >&5
21679echo "${ECHO_T}$ac_res" >&6; }
98418dba 21680else
c0d27fcc 21681 # Is the header compilable?
ca81d7a0
JD
21682{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21683echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21684cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21685/* confdefs.h. */
21686_ACEOF
21687cat confdefs.h >>conftest.$ac_ext
21688cat >>conftest.$ac_ext <<_ACEOF
21689/* end confdefs.h. */
c0d27fcc
MR
21690$ac_includes_default
21691#include <$ac_header>
21692_ACEOF
21693rm -f conftest.$ac_objext
ca81d7a0
JD
21694if { (ac_try="$ac_compile"
21695case "(($ac_try" in
21696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21697 *) ac_try_echo=$ac_try;;
21698esac
21699eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21700 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 21701 ac_status=$?
edfaf76d
LK
21702 grep -v '^ *+' conftest.er1 >conftest.err
21703 rm -f conftest.er1
21704 cat conftest.err >&5
c0d27fcc 21705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21706 (exit $ac_status); } && {
21707 test -z "$ac_c_werror_flag" ||
21708 test ! -s conftest.err
21709 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21710 ac_header_compiler=yes
21711else
21712 echo "$as_me: failed program was:" >&5
19650fd6
AS
21713sed 's/^/| /' conftest.$ac_ext >&5
21714
ca81d7a0 21715 ac_header_compiler=no
c0d27fcc 21716fi
ca81d7a0
JD
21717
21718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21719{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21720echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21721
21722# Is the header present?
ca81d7a0
JD
21723{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21724echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21725cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21726/* confdefs.h. */
21727_ACEOF
21728cat confdefs.h >>conftest.$ac_ext
21729cat >>conftest.$ac_ext <<_ACEOF
21730/* end confdefs.h. */
503d2be0
AS
21731#include <$ac_header>
21732_ACEOF
ca81d7a0
JD
21733if { (ac_try="$ac_cpp conftest.$ac_ext"
21734case "(($ac_try" in
21735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21736 *) ac_try_echo=$ac_try;;
21737esac
21738eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21739 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21740 ac_status=$?
6bae0ccf 21741 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21742 rm -f conftest.er1
21743 cat conftest.err >&5
c0d27fcc 21744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21745 (exit $ac_status); } >/dev/null && {
21746 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21747 test ! -s conftest.err
21748 }; then
c0d27fcc 21749 ac_header_preproc=yes
503d2be0
AS
21750else
21751 echo "$as_me: failed program was:" >&5
19650fd6
AS
21752sed 's/^/| /' conftest.$ac_ext >&5
21753
c0d27fcc 21754 ac_header_preproc=no
a21616bd 21755fi
ca81d7a0 21756
503d2be0 21757rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21758{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21759echo "${ECHO_T}$ac_header_preproc" >&6; }
35996d22
AS
21760
21761# So? What about this header?
edfaf76d
LK
21762case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21763 yes:no: )
35996d22
AS
21764 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21765echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21766 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21767echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21768 ac_header_preproc=yes
19650fd6 21769 ;;
edfaf76d 21770 no:yes:* )
c0d27fcc
MR
21771 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21772echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21773 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21774echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21775 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21776echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21777 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21778echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21779 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21780echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21781 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21782echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21783
19650fd6 21784 ;;
c0d27fcc 21785esac
ca81d7a0
JD
21786{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21787echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21788if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21789 echo $ECHO_N "(cached) $ECHO_C" >&6
21790else
edfaf76d 21791 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21792fi
ca81d7a0
JD
21793ac_res=`eval echo '${'$as_ac_Header'}'`
21794 { echo "$as_me:$LINENO: result: $ac_res" >&5
21795echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21796
21797fi
503d2be0 21798if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21799 cat >>confdefs.h <<_ACEOF
503d2be0 21800#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21801_ACEOF
503d2be0 21802
a21616bd 21803fi
c0d27fcc 21804
a21616bd
KR
21805done
21806
21807fi
c0d27fcc 21808
a21616bd
KR
21809done
21810
21811fi
c0d27fcc 21812
a21616bd
KR
21813done
21814
21815 fi
503d2be0
AS
21816
21817for ac_header in com_err.h
a21616bd 21818do
503d2be0 21819as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
21820if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
21821 { echo "$as_me:$LINENO: checking for $ac_header" >&5
21822echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21823if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 21824 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 21825fi
ca81d7a0
JD
21826ac_res=`eval echo '${'$as_ac_Header'}'`
21827 { echo "$as_me:$LINENO: result: $ac_res" >&5
21828echo "${ECHO_T}$ac_res" >&6; }
98418dba 21829else
c0d27fcc 21830 # Is the header compilable?
ca81d7a0
JD
21831{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
21832echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 21833cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21834/* confdefs.h. */
21835_ACEOF
21836cat confdefs.h >>conftest.$ac_ext
21837cat >>conftest.$ac_ext <<_ACEOF
21838/* end confdefs.h. */
c0d27fcc
MR
21839$ac_includes_default
21840#include <$ac_header>
21841_ACEOF
21842rm -f conftest.$ac_objext
ca81d7a0
JD
21843if { (ac_try="$ac_compile"
21844case "(($ac_try" in
21845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21846 *) ac_try_echo=$ac_try;;
21847esac
21848eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21849 (eval "$ac_compile") 2>conftest.er1
edfaf76d
LK
21850 ac_status=$?
21851 grep -v '^ *+' conftest.er1 >conftest.err
21852 rm -f conftest.er1
21853 cat conftest.err >&5
21854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21855 (exit $ac_status); } && {
21856 test -z "$ac_c_werror_flag" ||
21857 test ! -s conftest.err
21858 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
21859 ac_header_compiler=yes
21860else
21861 echo "$as_me: failed program was:" >&5
19650fd6
AS
21862sed 's/^/| /' conftest.$ac_ext >&5
21863
ca81d7a0 21864 ac_header_compiler=no
c0d27fcc 21865fi
ca81d7a0
JD
21866
21867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21868{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
21869echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
21870
21871# Is the header present?
ca81d7a0
JD
21872{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
21873echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 21874cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21875/* confdefs.h. */
21876_ACEOF
21877cat confdefs.h >>conftest.$ac_ext
21878cat >>conftest.$ac_ext <<_ACEOF
21879/* end confdefs.h. */
503d2be0
AS
21880#include <$ac_header>
21881_ACEOF
ca81d7a0
JD
21882if { (ac_try="$ac_cpp conftest.$ac_ext"
21883case "(($ac_try" in
21884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21885 *) ac_try_echo=$ac_try;;
21886esac
21887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21888 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 21889 ac_status=$?
6bae0ccf 21890 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
21891 rm -f conftest.er1
21892 cat conftest.err >&5
c0d27fcc 21893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
21894 (exit $ac_status); } >/dev/null && {
21895 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
21896 test ! -s conftest.err
21897 }; then
c0d27fcc 21898 ac_header_preproc=yes
503d2be0
AS
21899else
21900 echo "$as_me: failed program was:" >&5
19650fd6
AS
21901sed 's/^/| /' conftest.$ac_ext >&5
21902
c0d27fcc 21903 ac_header_preproc=no
a21616bd 21904fi
ca81d7a0 21905
503d2be0 21906rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
21907{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
21908echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
21909
21910# So? What about this header?
edfaf76d
LK
21911case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
21912 yes:no: )
c0d27fcc
MR
21913 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
21914echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
21915 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
21916echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
21917 ac_header_preproc=yes
19650fd6 21918 ;;
edfaf76d 21919 no:yes:* )
c0d27fcc
MR
21920 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
21921echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
21922 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
21923echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
21924 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
21925echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
21926 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
21927echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 21928 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 21929echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
21930 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
21931echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 21932
19650fd6 21933 ;;
c0d27fcc 21934esac
ca81d7a0
JD
21935{ echo "$as_me:$LINENO: checking for $ac_header" >&5
21936echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
21937if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
21938 echo $ECHO_N "(cached) $ECHO_C" >&6
21939else
edfaf76d 21940 eval "$as_ac_Header=\$ac_header_preproc"
a21616bd 21941fi
ca81d7a0
JD
21942ac_res=`eval echo '${'$as_ac_Header'}'`
21943 { echo "$as_me:$LINENO: result: $ac_res" >&5
21944echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
21945
21946fi
503d2be0 21947if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 21948 cat >>confdefs.h <<_ACEOF
503d2be0 21949#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 21950_ACEOF
503d2be0 21951
a21616bd 21952fi
c0d27fcc 21953
a21616bd
KR
21954done
21955
21956fi
21957
ba4481b5
DL
21958# Solaris requires -lintl if you want strerror (which calls dgettext)
21959# to return localized messages.
503d2be0 21960
ca81d7a0
JD
21961{ echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5
21962echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; }
503d2be0
AS
21963if test "${ac_cv_lib_intl_dgettext+set}" = set; then
21964 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 21965else
503d2be0 21966 ac_check_lib_save_LIBS=$LIBS
ba4481b5 21967LIBS="-lintl $LIBS"
503d2be0 21968cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
21969/* confdefs.h. */
21970_ACEOF
21971cat confdefs.h >>conftest.$ac_ext
21972cat >>conftest.$ac_ext <<_ACEOF
21973/* end confdefs.h. */
503d2be0 21974
ca81d7a0
JD
21975/* Override any GCC internal prototype to avoid an error.
21976 Use char because int might match the return type of a GCC
21977 builtin and then its argument prototype would still apply. */
503d2be0
AS
21978#ifdef __cplusplus
21979extern "C"
21980#endif
503d2be0
AS
21981char dgettext ();
21982int
21983main ()
21984{
ca81d7a0 21985return dgettext ();
503d2be0
AS
21986 ;
21987 return 0;
21988}
21989_ACEOF
21990rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
21991if { (ac_try="$ac_link"
21992case "(($ac_try" in
21993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21994 *) ac_try_echo=$ac_try;;
21995esac
21996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21997 (eval "$ac_link") 2>conftest.er1
503d2be0 21998 ac_status=$?
edfaf76d
LK
21999 grep -v '^ *+' conftest.er1 >conftest.err
22000 rm -f conftest.er1
22001 cat conftest.err >&5
c0d27fcc 22002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22003 (exit $ac_status); } && {
22004 test -z "$ac_c_werror_flag" ||
22005 test ! -s conftest.err
22006 } && test -s conftest$ac_exeext &&
22007 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22008 ac_cv_lib_intl_dgettext=yes
22009else
22010 echo "$as_me: failed program was:" >&5
19650fd6
AS
22011sed 's/^/| /' conftest.$ac_ext >&5
22012
ca81d7a0 22013 ac_cv_lib_intl_dgettext=no
503d2be0 22014fi
ca81d7a0 22015
f053c89f 22016rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22017 conftest$ac_exeext conftest.$ac_ext
503d2be0
AS
22018LIBS=$ac_check_lib_save_LIBS
22019fi
ca81d7a0
JD
22020{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5
22021echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; }
503d2be0 22022if test $ac_cv_lib_intl_dgettext = yes; then
c0d27fcc 22023 cat >>confdefs.h <<_ACEOF
503d2be0 22024#define HAVE_LIBINTL 1
c0d27fcc 22025_ACEOF
ba4481b5
DL
22026
22027 LIBS="-lintl $LIBS"
22028
ba4481b5
DL
22029fi
22030
c0d27fcc 22031
ca81d7a0
JD
22032{ echo "$as_me:$LINENO: checking whether localtime caches TZ" >&5
22033echo $ECHO_N "checking whether localtime caches TZ... $ECHO_C" >&6; }
503d2be0
AS
22034if test "${emacs_cv_localtime_cache+set}" = set; then
22035 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5
DL
22036else
22037 if test x$ac_cv_func_tzset = xyes; then
22038if test "$cross_compiling" = yes; then
22039 # If we have tzset, assume the worst when cross-compiling.
22040emacs_cv_localtime_cache=yes
22041else
503d2be0 22042 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22043/* confdefs.h. */
22044_ACEOF
22045cat confdefs.h >>conftest.$ac_ext
22046cat >>conftest.$ac_ext <<_ACEOF
22047/* end confdefs.h. */
ba4481b5 22048#include <time.h>
ba4481b5
DL
22049extern char **environ;
22050unset_TZ ()
22051{
22052 char **from, **to;
22053 for (to = from = environ; (*to = *from); from++)
22054 if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
22055 to++;
22056}
22057char TZ_GMT0[] = "TZ=GMT0";
22058char TZ_PST8[] = "TZ=PST8";
22059main()
22060{
22061 time_t now = time ((time_t *) 0);
22062 int hour_GMT0, hour_unset;
22063 if (putenv (TZ_GMT0) != 0)
22064 exit (1);
22065 hour_GMT0 = localtime (&now)->tm_hour;
22066 unset_TZ ();
22067 hour_unset = localtime (&now)->tm_hour;
22068 if (putenv (TZ_PST8) != 0)
22069 exit (1);
22070 if (localtime (&now)->tm_hour == hour_GMT0)
22071 exit (1);
22072 unset_TZ ();
22073 if (localtime (&now)->tm_hour != hour_unset)
22074 exit (1);
22075 exit (0);
22076}
503d2be0
AS
22077_ACEOF
22078rm -f conftest$ac_exeext
ca81d7a0
JD
22079if { (ac_try="$ac_link"
22080case "(($ac_try" in
22081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22082 *) ac_try_echo=$ac_try;;
22083esac
22084eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22085 (eval "$ac_link") 2>&5
503d2be0 22086 ac_status=$?
c0d27fcc 22087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22088 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
22089 { (case "(($ac_try" in
22090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22091 *) ac_try_echo=$ac_try;;
22092esac
22093eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22094 (eval "$ac_try") 2>&5
503d2be0 22095 ac_status=$?
c0d27fcc 22096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 22097 (exit $ac_status); }; }; then
ba4481b5
DL
22098 emacs_cv_localtime_cache=no
22099else
503d2be0
AS
22100 echo "$as_me: program exited with status $ac_status" >&5
22101echo "$as_me: failed program was:" >&5
19650fd6
AS
22102sed 's/^/| /' conftest.$ac_ext >&5
22103
c0d27fcc 22104( exit $ac_status )
503d2be0 22105emacs_cv_localtime_cache=yes
ba4481b5 22106fi
ca81d7a0 22107rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ba4481b5 22108fi
ca81d7a0
JD
22109
22110
ba4481b5
DL
22111else
22112 # If we lack tzset, report that localtime does not cache TZ,
22113 # since we can't invalidate the cache if we don't have tzset.
22114 emacs_cv_localtime_cache=no
22115fi
22116fi
ca81d7a0
JD
22117{ echo "$as_me:$LINENO: result: $emacs_cv_localtime_cache" >&5
22118echo "${ECHO_T}$emacs_cv_localtime_cache" >&6; }
ba4481b5 22119if test $emacs_cv_localtime_cache = yes; then
b936fae4 22120
c0d27fcc 22121cat >>confdefs.h <<\_ACEOF
ba4481b5 22122#define LOCALTIME_CACHE 1
c0d27fcc 22123_ACEOF
ba4481b5
DL
22124
22125fi
22126
22127if test "x$HAVE_TIMEVAL" = xyes; then
503d2be0
AS
22128
22129for ac_func in gettimeofday
48d4b120 22130do
503d2be0 22131as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
22132{ echo "$as_me:$LINENO: checking for $ac_func" >&5
22133echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
22134if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22135 echo $ECHO_N "(cached) $ECHO_C" >&6
48d4b120 22136else
503d2be0 22137 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22138/* confdefs.h. */
22139_ACEOF
22140cat confdefs.h >>conftest.$ac_ext
22141cat >>conftest.$ac_ext <<_ACEOF
22142/* end confdefs.h. */
edfaf76d
LK
22143/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22144 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22145#define $ac_func innocuous_$ac_func
22146
48d4b120 22147/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22148 which can conflict with char $ac_func (); below.
22149 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22150 <limits.h> exists even on freestanding compilers. */
edfaf76d 22151
19650fd6
AS
22152#ifdef __STDC__
22153# include <limits.h>
22154#else
22155# include <assert.h>
22156#endif
edfaf76d
LK
22157
22158#undef $ac_func
22159
ca81d7a0
JD
22160/* Override any GCC internal prototype to avoid an error.
22161 Use char because int might match the return type of a GCC
22162 builtin and then its argument prototype would still apply. */
503d2be0
AS
22163#ifdef __cplusplus
22164extern "C"
22165#endif
503d2be0 22166char $ac_func ();
48d4b120
DL
22167/* The GNU C library defines this for functions which it implements
22168 to always fail with ENOSYS. Some functions are actually named
22169 something starting with __ and the normal name is an alias. */
ca81d7a0 22170#if defined __stub_$ac_func || defined __stub___$ac_func
48d4b120 22171choke me
cd958eb3
MB
22172#endif
22173
19650fd6
AS
22174int
22175main ()
22176{
ca81d7a0 22177return $ac_func ();
503d2be0
AS
22178 ;
22179 return 0;
22180}
22181_ACEOF
22182rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22183if { (ac_try="$ac_link"
22184case "(($ac_try" in
22185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22186 *) ac_try_echo=$ac_try;;
22187esac
22188eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22189 (eval "$ac_link") 2>conftest.er1
503d2be0 22190 ac_status=$?
edfaf76d
LK
22191 grep -v '^ *+' conftest.er1 >conftest.err
22192 rm -f conftest.er1
22193 cat conftest.err >&5
c0d27fcc 22194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22195 (exit $ac_status); } && {
22196 test -z "$ac_c_werror_flag" ||
22197 test ! -s conftest.err
22198 } && test -s conftest$ac_exeext &&
22199 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22200 eval "$as_ac_var=yes"
22201else
22202 echo "$as_me: failed program was:" >&5
19650fd6
AS
22203sed 's/^/| /' conftest.$ac_ext >&5
22204
ca81d7a0 22205 eval "$as_ac_var=no"
503d2be0 22206fi
ca81d7a0 22207
f053c89f 22208rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22209 conftest$ac_exeext conftest.$ac_ext
503d2be0 22210fi
ca81d7a0
JD
22211ac_res=`eval echo '${'$as_ac_var'}'`
22212 { echo "$as_me:$LINENO: result: $ac_res" >&5
22213echo "${ECHO_T}$ac_res" >&6; }
503d2be0 22214if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 22215 cat >>confdefs.h <<_ACEOF
503d2be0 22216#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 22217_ACEOF
48d4b120 22218
48d4b120
DL
22219fi
22220done
22221
b936fae4 22222 if test $ac_cv_func_gettimeofday = yes; then
ca81d7a0
JD
22223 { echo "$as_me:$LINENO: checking whether gettimeofday can accept two arguments" >&5
22224echo $ECHO_N "checking whether gettimeofday can accept two arguments... $ECHO_C" >&6; }
503d2be0
AS
22225if test "${emacs_cv_gettimeofday_two_arguments+set}" = set; then
22226 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22227else
503d2be0 22228 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22229/* confdefs.h. */
22230_ACEOF
22231cat confdefs.h >>conftest.$ac_ext
22232cat >>conftest.$ac_ext <<_ACEOF
22233/* end confdefs.h. */
ba4481b5 22234
a3f08d9e
DL
22235#ifdef TIME_WITH_SYS_TIME
22236#include <sys/time.h>
22237#include <time.h>
22238#else
22239#ifdef HAVE_SYS_TIME_H
22240#include <sys/time.h>
22241#else
22242#include <time.h>
22243#endif
22244#endif
503d2be0
AS
22245int
22246main ()
22247{
a3f08d9e 22248struct timeval time;
b936fae4 22249 gettimeofday (&time, 0);
503d2be0
AS
22250 ;
22251 return 0;
22252}
22253_ACEOF
22254rm -f conftest.$ac_objext
f053c89f
CY
22255if { (ac_try="$ac_compile"
22256case "(($ac_try" in
ca81d7a0
JD
22257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22258 *) ac_try_echo=$ac_try;;
22259esac
22260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
f053c89f 22261 (eval "$ac_compile") 2>conftest.er1
503d2be0 22262 ac_status=$?
edfaf76d
LK
22263 grep -v '^ *+' conftest.er1 >conftest.err
22264 rm -f conftest.er1
22265 cat conftest.err >&5
c0d27fcc 22266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22267 (exit $ac_status); } && {
22268 test -z "$ac_c_werror_flag" ||
22269 test ! -s conftest.err
22270 } && test -s conftest.$ac_objext; then
ba4481b5
DL
22271 emacs_cv_gettimeofday_two_arguments=yes
22272else
503d2be0 22273 echo "$as_me: failed program was:" >&5
19650fd6
AS
22274sed 's/^/| /' conftest.$ac_ext >&5
22275
ca81d7a0 22276 emacs_cv_gettimeofday_two_arguments=no
ba4481b5 22277fi
ca81d7a0
JD
22278
22279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 22280fi
ca81d7a0
JD
22281{ echo "$as_me:$LINENO: result: $emacs_cv_gettimeofday_two_arguments" >&5
22282echo "${ECHO_T}$emacs_cv_gettimeofday_two_arguments" >&6; }
b936fae4
AS
22283 if test $emacs_cv_gettimeofday_two_arguments = no; then
22284
c0d27fcc 22285cat >>confdefs.h <<\_ACEOF
ba4481b5 22286#define GETTIMEOFDAY_ONE_ARGUMENT 1
c0d27fcc 22287_ACEOF
ba4481b5 22288
b936fae4 22289 fi
ba4481b5
DL
22290 fi
22291fi
22292
22293ok_so_far=yes
ca81d7a0
JD
22294{ echo "$as_me:$LINENO: checking for socket" >&5
22295echo $ECHO_N "checking for socket... $ECHO_C" >&6; }
503d2be0
AS
22296if test "${ac_cv_func_socket+set}" = set; then
22297 echo $ECHO_N "(cached) $ECHO_C" >&6
ba4481b5 22298else
503d2be0 22299 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22300/* confdefs.h. */
22301_ACEOF
22302cat confdefs.h >>conftest.$ac_ext
22303cat >>conftest.$ac_ext <<_ACEOF
22304/* end confdefs.h. */
edfaf76d
LK
22305/* Define socket to an innocuous variant, in case <limits.h> declares socket.
22306 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22307#define socket innocuous_socket
22308
ba4481b5 22309/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
22310 which can conflict with char socket (); below.
22311 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22312 <limits.h> exists even on freestanding compilers. */
edfaf76d 22313
19650fd6
AS
22314#ifdef __STDC__
22315# include <limits.h>
22316#else
22317# include <assert.h>
22318#endif
edfaf76d
LK
22319
22320#undef socket
22321
ca81d7a0
JD
22322/* Override any GCC internal prototype to avoid an error.
22323 Use char because int might match the return type of a GCC
22324 builtin and then its argument prototype would still apply. */
503d2be0
AS
22325#ifdef __cplusplus
22326extern "C"
22327#endif
503d2be0 22328char socket ();
ba4481b5
DL
22329/* The GNU C library defines this for functions which it implements
22330 to always fail with ENOSYS. Some functions are actually named
22331 something starting with __ and the normal name is an alias. */
ca81d7a0 22332#if defined __stub_socket || defined __stub___socket
ba4481b5 22333choke me
cd958eb3
MB
22334#endif
22335
19650fd6
AS
22336int
22337main ()
22338{
ca81d7a0 22339return socket ();
503d2be0
AS
22340 ;
22341 return 0;
22342}
22343_ACEOF
22344rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
22345if { (ac_try="$ac_link"
22346case "(($ac_try" in
22347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22348 *) ac_try_echo=$ac_try;;
22349esac
22350eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22351 (eval "$ac_link") 2>conftest.er1
503d2be0 22352 ac_status=$?
edfaf76d
LK
22353 grep -v '^ *+' conftest.er1 >conftest.err
22354 rm -f conftest.er1
22355 cat conftest.err >&5
c0d27fcc 22356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22357 (exit $ac_status); } && {
22358 test -z "$ac_c_werror_flag" ||
22359 test ! -s conftest.err
22360 } && test -s conftest$ac_exeext &&
22361 $as_test_x conftest$ac_exeext; then
503d2be0
AS
22362 ac_cv_func_socket=yes
22363else
22364 echo "$as_me: failed program was:" >&5
19650fd6
AS
22365sed 's/^/| /' conftest.$ac_ext >&5
22366
ca81d7a0 22367 ac_cv_func_socket=no
503d2be0 22368fi
ca81d7a0 22369
f053c89f 22370rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 22371 conftest$ac_exeext conftest.$ac_ext
503d2be0 22372fi
ca81d7a0
JD
22373{ echo "$as_me:$LINENO: result: $ac_cv_func_socket" >&5
22374echo "${ECHO_T}$ac_cv_func_socket" >&6; }
503d2be0 22375if test $ac_cv_func_socket = yes; then
ba4481b5
DL
22376 :
22377else
503d2be0 22378 ok_so_far=no
ba4481b5
DL
22379fi
22380
22381if test $ok_so_far = yes; then
c0d27fcc 22382 if test "${ac_cv_header_netinet_in_h+set}" = set; then
ca81d7a0
JD
22383 { echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22384echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
503d2be0
AS
22385if test "${ac_cv_header_netinet_in_h+set}" = set; then
22386 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22387fi
ca81d7a0
JD
22388{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22389echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
98418dba 22390else
c0d27fcc 22391 # Is the header compilable?
ca81d7a0
JD
22392{ echo "$as_me:$LINENO: checking netinet/in.h usability" >&5
22393echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6; }
c0d27fcc 22394cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22395/* confdefs.h. */
22396_ACEOF
22397cat confdefs.h >>conftest.$ac_ext
22398cat >>conftest.$ac_ext <<_ACEOF
22399/* end confdefs.h. */
c0d27fcc
MR
22400$ac_includes_default
22401#include <netinet/in.h>
22402_ACEOF
22403rm -f conftest.$ac_objext
ca81d7a0
JD
22404if { (ac_try="$ac_compile"
22405case "(($ac_try" in
22406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22407 *) ac_try_echo=$ac_try;;
22408esac
22409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22410 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22411 ac_status=$?
edfaf76d
LK
22412 grep -v '^ *+' conftest.er1 >conftest.err
22413 rm -f conftest.er1
22414 cat conftest.err >&5
c0d27fcc 22415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
22416 (exit $ac_status); } && {
22417 test -z "$ac_c_werror_flag" ||
22418 test ! -s conftest.err
22419 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22420 ac_header_compiler=yes
22421else
22422 echo "$as_me: failed program was:" >&5
19650fd6
AS
22423sed 's/^/| /' conftest.$ac_ext >&5
22424
ca81d7a0 22425 ac_header_compiler=no
c0d27fcc 22426fi
ca81d7a0
JD
22427
22428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22429{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22430echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22431
22432# Is the header present?
ca81d7a0
JD
22433{ echo "$as_me:$LINENO: checking netinet/in.h presence" >&5
22434echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6; }
c0d27fcc 22435cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22436/* confdefs.h. */
22437_ACEOF
22438cat confdefs.h >>conftest.$ac_ext
22439cat >>conftest.$ac_ext <<_ACEOF
22440/* end confdefs.h. */
ba4481b5 22441#include <netinet/in.h>
503d2be0 22442_ACEOF
ca81d7a0
JD
22443if { (ac_try="$ac_cpp conftest.$ac_ext"
22444case "(($ac_try" in
22445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22446 *) ac_try_echo=$ac_try;;
22447esac
22448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22449 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22450 ac_status=$?
6bae0ccf 22451 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22452 rm -f conftest.er1
22453 cat conftest.err >&5
c0d27fcc 22454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22455 (exit $ac_status); } >/dev/null && {
22456 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22457 test ! -s conftest.err
22458 }; then
c0d27fcc 22459 ac_header_preproc=yes
ba4481b5 22460else
503d2be0 22461 echo "$as_me: failed program was:" >&5
19650fd6
AS
22462sed 's/^/| /' conftest.$ac_ext >&5
22463
c0d27fcc 22464 ac_header_preproc=no
ba4481b5 22465fi
ca81d7a0 22466
503d2be0 22467rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22468{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22469echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22470
22471# So? What about this header?
edfaf76d
LK
22472case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22473 yes:no: )
c0d27fcc
MR
22474 { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5
22475echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22476 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5
22477echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;}
22478 ac_header_preproc=yes
19650fd6 22479 ;;
edfaf76d 22480 no:yes:* )
c0d27fcc
MR
22481 { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5
22482echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22483 { echo "$as_me:$LINENO: WARNING: netinet/in.h: check for missing prerequisite headers?" >&5
22484echo "$as_me: WARNING: netinet/in.h: check for missing prerequisite headers?" >&2;}
22485 { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5
22486echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;}
22487 { echo "$as_me:$LINENO: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&5
22488echo "$as_me: WARNING: netinet/in.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22489 { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5
19650fd6 22490echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22491 { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5
22492echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22493
19650fd6 22494 ;;
c0d27fcc 22495esac
ca81d7a0
JD
22496{ echo "$as_me:$LINENO: checking for netinet/in.h" >&5
22497echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6; }
c0d27fcc
MR
22498if test "${ac_cv_header_netinet_in_h+set}" = set; then
22499 echo $ECHO_N "(cached) $ECHO_C" >&6
22500else
22501 ac_cv_header_netinet_in_h=$ac_header_preproc
ba4481b5 22502fi
ca81d7a0
JD
22503{ echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5
22504echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6; }
c0d27fcc
MR
22505
22506fi
503d2be0 22507if test $ac_cv_header_netinet_in_h = yes; then
ba4481b5
DL
22508 :
22509else
503d2be0 22510 ok_so_far=no
ba4481b5
DL
22511fi
22512
c0d27fcc 22513
ba4481b5
DL
22514fi
22515if test $ok_so_far = yes; then
c0d27fcc 22516 if test "${ac_cv_header_arpa_inet_h+set}" = set; then
ca81d7a0
JD
22517 { echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22518echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
503d2be0
AS
22519if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22520 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22521fi
ca81d7a0
JD
22522{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22523echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
98418dba 22524else
c0d27fcc 22525 # Is the header compilable?
ca81d7a0
JD
22526{ echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5
22527echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6; }
c0d27fcc 22528cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22529/* confdefs.h. */
22530_ACEOF
22531cat confdefs.h >>conftest.$ac_ext
22532cat >>conftest.$ac_ext <<_ACEOF
22533/* end confdefs.h. */
c0d27fcc
MR
22534$ac_includes_default
22535#include <arpa/inet.h>
22536_ACEOF
22537rm -f conftest.$ac_objext
ca81d7a0
JD
22538if { (ac_try="$ac_compile"
22539case "(($ac_try" in
22540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22541 *) ac_try_echo=$ac_try;;
22542esac
22543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22544 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22545 ac_status=$?
edfaf76d
LK
22546 grep -v '^ *+' conftest.er1 >conftest.err
22547 rm -f conftest.er1
22548 cat conftest.err >&5
c0d27fcc 22549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22550 (exit $ac_status); } && {
22551 test -z "$ac_c_werror_flag" ||
22552 test ! -s conftest.err
22553 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22554 ac_header_compiler=yes
22555else
22556 echo "$as_me: failed program was:" >&5
19650fd6
AS
22557sed 's/^/| /' conftest.$ac_ext >&5
22558
ca81d7a0 22559 ac_header_compiler=no
c0d27fcc 22560fi
ca81d7a0
JD
22561
22562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22563{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22564echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22565
22566# Is the header present?
ca81d7a0
JD
22567{ echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5
22568echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6; }
c0d27fcc 22569cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22570/* confdefs.h. */
22571_ACEOF
22572cat confdefs.h >>conftest.$ac_ext
22573cat >>conftest.$ac_ext <<_ACEOF
22574/* end confdefs.h. */
ba4481b5 22575#include <arpa/inet.h>
503d2be0 22576_ACEOF
ca81d7a0
JD
22577if { (ac_try="$ac_cpp conftest.$ac_ext"
22578case "(($ac_try" in
22579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22580 *) ac_try_echo=$ac_try;;
22581esac
22582eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22583 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22584 ac_status=$?
6bae0ccf 22585 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22586 rm -f conftest.er1
22587 cat conftest.err >&5
c0d27fcc 22588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22589 (exit $ac_status); } >/dev/null && {
22590 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22591 test ! -s conftest.err
22592 }; then
c0d27fcc 22593 ac_header_preproc=yes
ba4481b5 22594else
503d2be0 22595 echo "$as_me: failed program was:" >&5
19650fd6
AS
22596sed 's/^/| /' conftest.$ac_ext >&5
22597
c0d27fcc 22598 ac_header_preproc=no
ba4481b5 22599fi
ca81d7a0 22600
503d2be0 22601rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22602{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22603echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22604
22605# So? What about this header?
edfaf76d
LK
22606case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22607 yes:no: )
c0d27fcc
MR
22608 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5
22609echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22610 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5
22611echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;}
22612 ac_header_preproc=yes
19650fd6 22613 ;;
edfaf76d 22614 no:yes:* )
c0d27fcc
MR
22615 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5
22616echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;}
edfaf76d
LK
22617 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5
22618echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;}
22619 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5
22620echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;}
22621 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5
22622echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22623 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5
19650fd6 22624echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22625 { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5
22626echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22627
19650fd6 22628 ;;
c0d27fcc 22629esac
ca81d7a0
JD
22630{ echo "$as_me:$LINENO: checking for arpa/inet.h" >&5
22631echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6; }
c0d27fcc
MR
22632if test "${ac_cv_header_arpa_inet_h+set}" = set; then
22633 echo $ECHO_N "(cached) $ECHO_C" >&6
22634else
22635 ac_cv_header_arpa_inet_h=$ac_header_preproc
ba4481b5 22636fi
ca81d7a0
JD
22637{ echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5
22638echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6; }
c0d27fcc
MR
22639
22640fi
503d2be0 22641if test $ac_cv_header_arpa_inet_h = yes; then
ba4481b5
DL
22642 :
22643else
503d2be0 22644 ok_so_far=no
ba4481b5
DL
22645fi
22646
c0d27fcc 22647
ba4481b5
DL
22648fi
22649if test $ok_so_far = yes; then
b936fae4 22650
c0d27fcc 22651cat >>confdefs.h <<\_ACEOF
ba4481b5 22652#define HAVE_INET_SOCKETS 1
c0d27fcc 22653_ACEOF
ba4481b5
DL
22654
22655fi
22656
2d2b6695 22657
7862d3a8 22658for ac_header in sys/ioctl.h
2d2b6695
KS
22659do
22660as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22661if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22662 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22663echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22664if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
22665 echo $ECHO_N "(cached) $ECHO_C" >&6
22666fi
ca81d7a0
JD
22667ac_res=`eval echo '${'$as_ac_Header'}'`
22668 { echo "$as_me:$LINENO: result: $ac_res" >&5
22669echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
22670else
22671 # Is the header compilable?
ca81d7a0
JD
22672{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22673echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
2d2b6695 22674cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
22675/* confdefs.h. */
22676_ACEOF
22677cat confdefs.h >>conftest.$ac_ext
22678cat >>conftest.$ac_ext <<_ACEOF
22679/* end confdefs.h. */
22680$ac_includes_default
22681#include <$ac_header>
22682_ACEOF
22683rm -f conftest.$ac_objext
ca81d7a0
JD
22684if { (ac_try="$ac_compile"
22685case "(($ac_try" in
22686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22687 *) ac_try_echo=$ac_try;;
22688esac
22689eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22690 (eval "$ac_compile") 2>conftest.er1
2d2b6695 22691 ac_status=$?
edfaf76d
LK
22692 grep -v '^ *+' conftest.er1 >conftest.err
22693 rm -f conftest.er1
22694 cat conftest.err >&5
2d2b6695 22695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22696 (exit $ac_status); } && {
22697 test -z "$ac_c_werror_flag" ||
22698 test ! -s conftest.err
22699 } && test -s conftest.$ac_objext; then
2d2b6695
KS
22700 ac_header_compiler=yes
22701else
22702 echo "$as_me: failed program was:" >&5
22703sed 's/^/| /' conftest.$ac_ext >&5
22704
ca81d7a0 22705 ac_header_compiler=no
2d2b6695 22706fi
ca81d7a0
JD
22707
22708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22709{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22710echo "${ECHO_T}$ac_header_compiler" >&6; }
2d2b6695
KS
22711
22712# Is the header present?
ca81d7a0
JD
22713{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22714echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
2d2b6695 22715cat >conftest.$ac_ext <<_ACEOF
2d2b6695
KS
22716/* confdefs.h. */
22717_ACEOF
22718cat confdefs.h >>conftest.$ac_ext
22719cat >>conftest.$ac_ext <<_ACEOF
22720/* end confdefs.h. */
22721#include <$ac_header>
22722_ACEOF
ca81d7a0
JD
22723if { (ac_try="$ac_cpp conftest.$ac_ext"
22724case "(($ac_try" in
22725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22726 *) ac_try_echo=$ac_try;;
22727esac
22728eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22729 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2d2b6695
KS
22730 ac_status=$?
22731 grep -v '^ *+' conftest.er1 >conftest.err
22732 rm -f conftest.er1
22733 cat conftest.err >&5
22734 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22735 (exit $ac_status); } >/dev/null && {
22736 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22737 test ! -s conftest.err
22738 }; then
2d2b6695
KS
22739 ac_header_preproc=yes
22740else
22741 echo "$as_me: failed program was:" >&5
22742sed 's/^/| /' conftest.$ac_ext >&5
22743
22744 ac_header_preproc=no
22745fi
ca81d7a0 22746
2d2b6695 22747rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22748{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22749echo "${ECHO_T}$ac_header_preproc" >&6; }
2d2b6695
KS
22750
22751# So? What about this header?
edfaf76d
LK
22752case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22753 yes:no: )
2d2b6695
KS
22754 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22755echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22756 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22757echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22758 ac_header_preproc=yes
2d2b6695 22759 ;;
edfaf76d 22760 no:yes:* )
2d2b6695
KS
22761 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22762echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22763 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22764echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22765 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22766echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22767 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22768echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
2d2b6695
KS
22769 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
22770echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22771 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22772echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 22773
2d2b6695
KS
22774 ;;
22775esac
ca81d7a0
JD
22776{ echo "$as_me:$LINENO: checking for $ac_header" >&5
22777echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22778if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
2d2b6695
KS
22779 echo $ECHO_N "(cached) $ECHO_C" >&6
22780else
edfaf76d 22781 eval "$as_ac_Header=\$ac_header_preproc"
2d2b6695 22782fi
ca81d7a0
JD
22783ac_res=`eval echo '${'$as_ac_Header'}'`
22784 { echo "$as_me:$LINENO: result: $ac_res" >&5
22785echo "${ECHO_T}$ac_res" >&6; }
2d2b6695
KS
22786
22787fi
22788if test `eval echo '${'$as_ac_Header'}'` = yes; then
22789 cat >>confdefs.h <<_ACEOF
22790#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22791_ACEOF
22792
22793fi
22794
22795done
22796
22797
ba4481b5 22798if test -f /usr/lpp/X11/bin/smt.exp; then
b936fae4 22799
c0d27fcc 22800cat >>confdefs.h <<\_ACEOF
ba4481b5 22801#define HAVE_AIX_SMT_EXP 1
c0d27fcc 22802_ACEOF
ba4481b5
DL
22803
22804fi
22805
ca81d7a0
JD
22806{ echo "$as_me:$LINENO: checking whether system supports dynamic ptys" >&5
22807echo $ECHO_N "checking whether system supports dynamic ptys... $ECHO_C" >&6; }
3d9fec71 22808if test -d /dev/pts && ls -d /dev/ptmx > /dev/null 2>&1 ; then
ca81d7a0
JD
22809 { echo "$as_me:$LINENO: result: yes" >&5
22810echo "${ECHO_T}yes" >&6; }
b936fae4 22811
c0d27fcc 22812cat >>confdefs.h <<\_ACEOF
3d9fec71 22813#define HAVE_DEV_PTMX 1
c0d27fcc 22814_ACEOF
3d9fec71
DL
22815
22816else
ca81d7a0
JD
22817 { echo "$as_me:$LINENO: result: no" >&5
22818echo "${ECHO_T}no" >&6; }
3d9fec71
DL
22819fi
22820
ca81d7a0
JD
22821{ echo "$as_me:$LINENO: checking for pid_t" >&5
22822echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
503d2be0
AS
22823if test "${ac_cv_type_pid_t+set}" = set; then
22824 echo $ECHO_N "(cached) $ECHO_C" >&6
647847ea 22825else
503d2be0 22826 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22827/* confdefs.h. */
22828_ACEOF
22829cat confdefs.h >>conftest.$ac_ext
22830cat >>conftest.$ac_ext <<_ACEOF
22831/* end confdefs.h. */
503d2be0 22832$ac_includes_default
ca81d7a0 22833typedef pid_t ac__type_new_;
503d2be0
AS
22834int
22835main ()
22836{
ca81d7a0 22837if ((ac__type_new_ *) 0)
503d2be0 22838 return 0;
ca81d7a0 22839if (sizeof (ac__type_new_))
503d2be0
AS
22840 return 0;
22841 ;
22842 return 0;
22843}
22844_ACEOF
22845rm -f conftest.$ac_objext
ca81d7a0
JD
22846if { (ac_try="$ac_compile"
22847case "(($ac_try" in
22848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22849 *) ac_try_echo=$ac_try;;
22850esac
22851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22852 (eval "$ac_compile") 2>conftest.er1
503d2be0 22853 ac_status=$?
edfaf76d
LK
22854 grep -v '^ *+' conftest.er1 >conftest.err
22855 rm -f conftest.er1
22856 cat conftest.err >&5
c0d27fcc 22857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22858 (exit $ac_status); } && {
22859 test -z "$ac_c_werror_flag" ||
22860 test ! -s conftest.err
22861 } && test -s conftest.$ac_objext; then
647847ea
DL
22862 ac_cv_type_pid_t=yes
22863else
503d2be0 22864 echo "$as_me: failed program was:" >&5
19650fd6
AS
22865sed 's/^/| /' conftest.$ac_ext >&5
22866
ca81d7a0 22867 ac_cv_type_pid_t=no
647847ea 22868fi
ca81d7a0
JD
22869
22870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
647847ea 22871fi
ca81d7a0
JD
22872{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
22873echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
503d2be0
AS
22874if test $ac_cv_type_pid_t = yes; then
22875 :
22876else
22877
c0d27fcc 22878cat >>confdefs.h <<_ACEOF
647847ea 22879#define pid_t int
c0d27fcc 22880_ACEOF
647847ea
DL
22881
22882fi
22883
c0d27fcc 22884
ca81d7a0 22885for ac_header in vfork.h
503d2be0
AS
22886do
22887as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
ca81d7a0
JD
22888if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
22889 { echo "$as_me:$LINENO: checking for $ac_header" >&5
22890echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
22891if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 22892 echo $ECHO_N "(cached) $ECHO_C" >&6
c0d27fcc 22893fi
ca81d7a0
JD
22894ac_res=`eval echo '${'$as_ac_Header'}'`
22895 { echo "$as_me:$LINENO: result: $ac_res" >&5
22896echo "${ECHO_T}$ac_res" >&6; }
98418dba 22897else
c0d27fcc 22898 # Is the header compilable?
ca81d7a0
JD
22899{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
22900echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
c0d27fcc 22901cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22902/* confdefs.h. */
22903_ACEOF
22904cat confdefs.h >>conftest.$ac_ext
22905cat >>conftest.$ac_ext <<_ACEOF
22906/* end confdefs.h. */
c0d27fcc
MR
22907$ac_includes_default
22908#include <$ac_header>
22909_ACEOF
22910rm -f conftest.$ac_objext
ca81d7a0
JD
22911if { (ac_try="$ac_compile"
22912case "(($ac_try" in
22913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22914 *) ac_try_echo=$ac_try;;
22915esac
22916eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22917 (eval "$ac_compile") 2>conftest.er1
c0d27fcc 22918 ac_status=$?
edfaf76d
LK
22919 grep -v '^ *+' conftest.er1 >conftest.err
22920 rm -f conftest.er1
22921 cat conftest.err >&5
c0d27fcc 22922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22923 (exit $ac_status); } && {
22924 test -z "$ac_c_werror_flag" ||
22925 test ! -s conftest.err
22926 } && test -s conftest.$ac_objext; then
c0d27fcc
MR
22927 ac_header_compiler=yes
22928else
22929 echo "$as_me: failed program was:" >&5
19650fd6
AS
22930sed 's/^/| /' conftest.$ac_ext >&5
22931
ca81d7a0 22932 ac_header_compiler=no
c0d27fcc 22933fi
ca81d7a0
JD
22934
22935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22936{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22937echo "${ECHO_T}$ac_header_compiler" >&6; }
c0d27fcc
MR
22938
22939# Is the header present?
ca81d7a0
JD
22940{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
22941echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
c0d27fcc 22942cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
22943/* confdefs.h. */
22944_ACEOF
22945cat confdefs.h >>conftest.$ac_ext
22946cat >>conftest.$ac_ext <<_ACEOF
22947/* end confdefs.h. */
503d2be0
AS
22948#include <$ac_header>
22949_ACEOF
ca81d7a0
JD
22950if { (ac_try="$ac_cpp conftest.$ac_ext"
22951case "(($ac_try" in
22952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22953 *) ac_try_echo=$ac_try;;
22954esac
22955eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22956 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
503d2be0 22957 ac_status=$?
6bae0ccf 22958 grep -v '^ *+' conftest.er1 >conftest.err
503d2be0
AS
22959 rm -f conftest.er1
22960 cat conftest.err >&5
c0d27fcc 22961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
22962 (exit $ac_status); } >/dev/null && {
22963 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22964 test ! -s conftest.err
22965 }; then
c0d27fcc 22966 ac_header_preproc=yes
647847ea 22967else
503d2be0 22968 echo "$as_me: failed program was:" >&5
19650fd6
AS
22969sed 's/^/| /' conftest.$ac_ext >&5
22970
c0d27fcc 22971 ac_header_preproc=no
647847ea 22972fi
ca81d7a0 22973
503d2be0 22974rm -f conftest.err conftest.$ac_ext
ca81d7a0
JD
22975{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22976echo "${ECHO_T}$ac_header_preproc" >&6; }
c0d27fcc
MR
22977
22978# So? What about this header?
edfaf76d
LK
22979case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22980 yes:no: )
c0d27fcc
MR
22981 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
22982echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
edfaf76d
LK
22983 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
22984echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
22985 ac_header_preproc=yes
19650fd6 22986 ;;
edfaf76d 22987 no:yes:* )
c0d27fcc
MR
22988 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
22989echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
edfaf76d
LK
22990 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
22991echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
22992 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
22993echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
22994 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
22995echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
c0d27fcc 22996 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
19650fd6 22997echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
edfaf76d
LK
22998 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
22999echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
ca81d7a0 23000
19650fd6 23001 ;;
c0d27fcc 23002esac
ca81d7a0
JD
23003{ echo "$as_me:$LINENO: checking for $ac_header" >&5
23004echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
23005if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
c0d27fcc
MR
23006 echo $ECHO_N "(cached) $ECHO_C" >&6
23007else
edfaf76d 23008 eval "$as_ac_Header=\$ac_header_preproc"
647847ea 23009fi
ca81d7a0
JD
23010ac_res=`eval echo '${'$as_ac_Header'}'`
23011 { echo "$as_me:$LINENO: result: $ac_res" >&5
23012echo "${ECHO_T}$ac_res" >&6; }
c0d27fcc
MR
23013
23014fi
503d2be0 23015if test `eval echo '${'$as_ac_Header'}'` = yes; then
c0d27fcc 23016 cat >>confdefs.h <<_ACEOF
503d2be0 23017#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
c0d27fcc 23018_ACEOF
647847ea 23019
73b77ee5 23020fi
c0d27fcc 23021
503d2be0 23022done
73b77ee5 23023
c0d27fcc
MR
23024
23025
503d2be0
AS
23026for ac_func in fork vfork
23027do
23028as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
ca81d7a0
JD
23029{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23030echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
23031if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
503d2be0 23032 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23033else
503d2be0 23034 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23035/* confdefs.h. */
23036_ACEOF
23037cat confdefs.h >>conftest.$ac_ext
23038cat >>conftest.$ac_ext <<_ACEOF
23039/* end confdefs.h. */
edfaf76d
LK
23040/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23041 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23042#define $ac_func innocuous_$ac_func
23043
fa0b693c 23044/* System header to define __stub macros and hopefully few prototypes,
19650fd6
AS
23045 which can conflict with char $ac_func (); below.
23046 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23047 <limits.h> exists even on freestanding compilers. */
edfaf76d 23048
19650fd6
AS
23049#ifdef __STDC__
23050# include <limits.h>
23051#else
23052# include <assert.h>
23053#endif
edfaf76d
LK
23054
23055#undef $ac_func
23056
ca81d7a0
JD
23057/* Override any GCC internal prototype to avoid an error.
23058 Use char because int might match the return type of a GCC
23059 builtin and then its argument prototype would still apply. */
503d2be0
AS
23060#ifdef __cplusplus
23061extern "C"
23062#endif
503d2be0 23063char $ac_func ();
fa0b693c
GM
23064/* The GNU C library defines this for functions which it implements
23065 to always fail with ENOSYS. Some functions are actually named
23066 something starting with __ and the normal name is an alias. */
ca81d7a0 23067#if defined __stub_$ac_func || defined __stub___$ac_func
fa0b693c 23068choke me
fa0b693c
GM
23069#endif
23070
19650fd6
AS
23071int
23072main ()
23073{
ca81d7a0 23074return $ac_func ();
503d2be0
AS
23075 ;
23076 return 0;
23077}
23078_ACEOF
23079rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23080if { (ac_try="$ac_link"
23081case "(($ac_try" in
23082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23083 *) ac_try_echo=$ac_try;;
23084esac
23085eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23086 (eval "$ac_link") 2>conftest.er1
503d2be0 23087 ac_status=$?
edfaf76d
LK
23088 grep -v '^ *+' conftest.er1 >conftest.err
23089 rm -f conftest.er1
23090 cat conftest.err >&5
c0d27fcc 23091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23092 (exit $ac_status); } && {
23093 test -z "$ac_c_werror_flag" ||
23094 test ! -s conftest.err
23095 } && test -s conftest$ac_exeext &&
23096 $as_test_x conftest$ac_exeext; then
503d2be0
AS
23097 eval "$as_ac_var=yes"
23098else
23099 echo "$as_me: failed program was:" >&5
19650fd6
AS
23100sed 's/^/| /' conftest.$ac_ext >&5
23101
ca81d7a0 23102 eval "$as_ac_var=no"
503d2be0 23103fi
ca81d7a0 23104
f053c89f 23105rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23106 conftest$ac_exeext conftest.$ac_ext
503d2be0 23107fi
ca81d7a0
JD
23108ac_res=`eval echo '${'$as_ac_var'}'`
23109 { echo "$as_me:$LINENO: result: $ac_res" >&5
23110echo "${ECHO_T}$ac_res" >&6; }
503d2be0 23111if test `eval echo '${'$as_ac_var'}'` = yes; then
c0d27fcc 23112 cat >>confdefs.h <<_ACEOF
503d2be0 23113#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
c0d27fcc 23114_ACEOF
503d2be0 23115
fa0b693c 23116fi
503d2be0 23117done
fa0b693c 23118
503d2be0 23119if test "x$ac_cv_func_fork" = xyes; then
ca81d7a0
JD
23120 { echo "$as_me:$LINENO: checking for working fork" >&5
23121echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
503d2be0
AS
23122if test "${ac_cv_func_fork_works+set}" = set; then
23123 echo $ECHO_N "(cached) $ECHO_C" >&6
fa0b693c 23124else
503d2be0
AS
23125 if test "$cross_compiling" = yes; then
23126 ac_cv_func_fork_works=cross
23127else
23128 cat >conftest.$ac_ext <<_ACEOF
ca81d7a0
JD
23129/* confdefs.h. */
23130_ACEOF
23131cat confdefs.h >>conftest.$ac_ext
23132cat >>conftest.$ac_ext <<_ACEOF
23133/* end confdefs.h. */
23134$ac_includes_default
23135int
23136main ()
23137{
23138
23139 /* By Ruediger Kuhlmann. */
23140 return fork () < 0;
23141
23142 ;
23143 return 0;
23144}
503d2be0
AS
23145_ACEOF
23146rm -f conftest$ac_exeext
ca81d7a0
JD
23147if { (ac_try="$ac_link"
23148case "(($ac_try" in
23149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23150 *) ac_try_echo=$ac_try;;
23151esac
23152eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23153 (eval "$ac_link") 2>&5
503d2be0 23154 ac_status=$?
c0d27fcc 23155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23156 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23157 { (case "(($ac_try" in
23158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23159 *) ac_try_echo=$ac_try;;
23160esac
23161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23162 (eval "$ac_try") 2>&5
503d2be0 23163 ac_status=$?
c0d27fcc 23164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0
AS
23165 (exit $ac_status); }; }; then
23166 ac_cv_func_fork_works=yes
23167else
23168 echo "$as_me: program exited with status $ac_status" >&5
23169echo "$as_me: failed program was:" >&5
19650fd6
AS
23170sed 's/^/| /' conftest.$ac_ext >&5
23171
c0d27fcc 23172( exit $ac_status )
503d2be0
AS
23173ac_cv_func_fork_works=no
23174fi
ca81d7a0 23175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
503d2be0 23176fi
ca81d7a0
JD
23177
23178
503d2be0 23179fi
ca81d7a0
JD
23180{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
23181echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
503d2be0 23182
6bae0ccf
DL
23183else
23184 ac_cv_func_fork_works=$ac_cv_func_fork
503d2be0
AS
23185fi
23186if test "x$ac_cv_func_fork_works" = xcross; then
23187 case $host in
23188 *-*-amigaos* | *-*-msdosdjgpp*)
23189 # Override, as these systems have only a dummy fork() stub
23190 ac_cv_func_fork_works=no
23191 ;;
23192 *)
23193 ac_cv_func_fork_works=yes
23194 ;;
23195 esac
c0d27fcc
MR
23196 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
23197echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
fa0b693c 23198fi
73b77ee5 23199ac_cv_func_vfork_works=$ac_cv_func_vfork
503d2be0 23200if test "x$ac_cv_func_vfork" = xyes; then
ca81d7a0
JD
23201 { echo "$as_me:$LINENO: checking for working vfork" >&5
23202echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
503d2be0
AS
23203if test "${ac_cv_func_vfork_works+set}" = set; then
23204 echo $ECHO_N "(cached) $ECHO_C" >&6
23205else
23206 if test "$cross_compiling" = yes; then
23207 ac_cv_func_vfork_works=cross
fa0b693c 23208else
503d2be0 23209 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23210/* confdefs.h. */
23211_ACEOF
23212cat confdefs.h >>conftest.$ac_ext
23213cat >>conftest.$ac_ext <<_ACEOF
23214/* end confdefs.h. */
73b77ee5 23215/* Thanks to Paul Eggert for this test. */
ca81d7a0 23216$ac_includes_default
19650fd6 23217#include <sys/wait.h>
f053c89f 23218#ifdef HAVE_VFORK_H
503d2be0 23219# include <vfork.h>
73b77ee5
GM
23220#endif
23221/* On some sparc systems, changes by the child to local and incoming
503d2be0
AS
23222 argument registers are propagated back to the parent. The compiler
23223 is told about this with #include <vfork.h>, but some compilers
23224 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
23225 static variable whose address is put into a register that is
23226 clobbered by the vfork. */
19650fd6 23227static void
fa0b693c 23228#ifdef __cplusplus
73b77ee5 23229sparc_address_test (int arg)
503d2be0 23230# else
73b77ee5 23231sparc_address_test (arg) int arg;
fa0b693c 23232#endif
fa0b693c 23233{
73b77ee5
GM
23234 static pid_t child;
23235 if (!child) {
23236 child = vfork ();
23237 if (child < 0) {
23238 perror ("vfork");
23239 _exit(2);
23240 }
23241 if (!child) {
23242 arg = getpid();
23243 write(-1, "", 0);
23244 _exit (arg);
23245 }
23246 }
23247}
503d2be0
AS
23248
23249int
23250main ()
23251{
73b77ee5
GM
23252 pid_t parent = getpid ();
23253 pid_t child;
fa0b693c 23254
19650fd6 23255 sparc_address_test (0);
fa0b693c 23256
73b77ee5 23257 child = vfork ();
fa0b693c 23258
73b77ee5 23259 if (child == 0) {
503d2be0
AS
23260 /* Here is another test for sparc vfork register problems. This
23261 test uses lots of local variables, at least as many local
23262 variables as main has allocated so far including compiler
23263 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
23264 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
23265 reuse the register of parent for one of the local variables,
23266 since it will think that parent can't possibly be used any more
23267 in this routine. Assigning to the local variable will thus
23268 munge parent in the parent process. */
73b77ee5
GM
23269 pid_t
23270 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23271 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23272 /* Convince the compiler that p..p7 are live; otherwise, it might
23273 use the same hardware register for all 8 local variables. */
23274 if (p != p1 || p != p2 || p != p3 || p != p4
23275 || p != p5 || p != p6 || p != p7)
23276 _exit(1);
fa0b693c 23277
503d2be0
AS
23278 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23279 from child file descriptors. If the child closes a descriptor
23280 before it execs or exits, this munges the parent's descriptor
23281 as well. Test for this by closing stdout in the child. */
73b77ee5
GM
23282 _exit(close(fileno(stdout)) != 0);
23283 } else {
23284 int status;
23285 struct stat st;
23286
23287 while (wait(&status) != child)
23288 ;
ca81d7a0 23289 return (
73b77ee5
GM
23290 /* Was there some problem with vforking? */
23291 child < 0
23292
23293 /* Did the child fail? (This shouldn't happen.) */
23294 || status
23295
23296 /* Did the vfork/compiler bug occur? */
23297 || parent != getpid()
fa0b693c 23298
73b77ee5
GM
23299 /* Did the file descriptor bug occur? */
23300 || fstat(fileno(stdout), &st) != 0
23301 );
23302 }
23303}
503d2be0
AS
23304_ACEOF
23305rm -f conftest$ac_exeext
ca81d7a0
JD
23306if { (ac_try="$ac_link"
23307case "(($ac_try" in
23308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23309 *) ac_try_echo=$ac_try;;
23310esac
23311eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23312 (eval "$ac_link") 2>&5
503d2be0 23313 ac_status=$?
c0d27fcc 23314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23315 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
ca81d7a0
JD
23316 { (case "(($ac_try" in
23317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23318 *) ac_try_echo=$ac_try;;
23319esac
23320eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23321 (eval "$ac_try") 2>&5
503d2be0 23322 ac_status=$?
c0d27fcc 23323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
503d2be0 23324 (exit $ac_status); }; }; then
73b77ee5 23325 ac_cv_func_vfork_works=yes
fa0b693c 23326else
503d2be0
AS
23327 echo "$as_me: program exited with status $ac_status" >&5
23328echo "$as_me: failed program was:" >&5
19650fd6
AS
23329sed 's/^/| /' conftest.$ac_ext >&5
23330
c0d27fcc 23331( exit $ac_status )
503d2be0
AS
23332ac_cv_func_vfork_works=no
23333fi
ca81d7a0 23334rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fa0b693c 23335fi
ca81d7a0
JD
23336
23337
fa0b693c 23338fi
ca81d7a0
JD
23339{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
23340echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
fa0b693c 23341
503d2be0
AS
23342fi;
23343if test "x$ac_cv_func_fork_works" = xcross; then
edfaf76d 23344 ac_cv_func_vfork_works=$ac_cv_func_vfork
c0d27fcc
MR
23345 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
23346echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
fa0b693c
GM
23347fi
23348
503d2be0
AS
23349if test "x$ac_cv_func_vfork_works" = xyes; then
23350
c0d27fcc 23351cat >>confdefs.h <<\_ACEOF
503d2be0 23352#define HAVE_WORKING_VFORK 1
c0d27fcc 23353_ACEOF
503d2be0
AS
23354
23355else
23356
c0d27fcc 23357cat >>confdefs.h <<\_ACEOF
73b77ee5 23358#define vfork fork
c0d27fcc 23359_ACEOF
fa0b693c
GM
23360
23361fi
503d2be0
AS
23362if test "x$ac_cv_func_fork_works" = xyes; then
23363
c0d27fcc 23364cat >>confdefs.h <<\_ACEOF
503d2be0 23365#define HAVE_WORKING_FORK 1
c0d27fcc 23366_ACEOF
fa0b693c 23367
503d2be0 23368fi
647847ea 23369
c0d27fcc 23370
ca81d7a0
JD
23371{ echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
23372echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
6a3a24fa
JD
23373if test "${emacs_cv_langinfo_codeset+set}" = set; then
23374 echo $ECHO_N "(cached) $ECHO_C" >&6
23375else
23376 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23377/* confdefs.h. */
23378_ACEOF
23379cat confdefs.h >>conftest.$ac_ext
23380cat >>conftest.$ac_ext <<_ACEOF
23381/* end confdefs.h. */
6a3a24fa
JD
23382#include <langinfo.h>
23383int
23384main ()
23385{
23386char* cs = nl_langinfo(CODESET);
23387 ;
23388 return 0;
23389}
23390_ACEOF
23391rm -f conftest.$ac_objext conftest$ac_exeext
ca81d7a0
JD
23392if { (ac_try="$ac_link"
23393case "(($ac_try" in
23394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23395 *) ac_try_echo=$ac_try;;
23396esac
23397eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23398 (eval "$ac_link") 2>conftest.er1
6a3a24fa 23399 ac_status=$?
edfaf76d
LK
23400 grep -v '^ *+' conftest.er1 >conftest.err
23401 rm -f conftest.er1
23402 cat conftest.err >&5
6a3a24fa 23403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23404 (exit $ac_status); } && {
23405 test -z "$ac_c_werror_flag" ||
23406 test ! -s conftest.err
23407 } && test -s conftest$ac_exeext &&
23408 $as_test_x conftest$ac_exeext; then
6a3a24fa
JD
23409 emacs_cv_langinfo_codeset=yes
23410else
23411 echo "$as_me: failed program was:" >&5
19650fd6
AS
23412sed 's/^/| /' conftest.$ac_ext >&5
23413
ca81d7a0 23414 emacs_cv_langinfo_codeset=no
6a3a24fa 23415fi
ca81d7a0 23416
f053c89f 23417rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
edfaf76d 23418 conftest$ac_exeext conftest.$ac_ext
6a3a24fa
JD
23419
23420fi
ca81d7a0
JD
23421{ echo "$as_me:$LINENO: result: $emacs_cv_langinfo_codeset" >&5
23422echo "${ECHO_T}$emacs_cv_langinfo_codeset" >&6; }
6a3a24fa
JD
23423if test $emacs_cv_langinfo_codeset = yes; then
23424
23425cat >>confdefs.h <<\_ACEOF
23426#define HAVE_LANGINFO_CODESET 1
23427_ACEOF
23428
23429fi
23430
ca81d7a0
JD
23431{ echo "$as_me:$LINENO: checking for size_t" >&5
23432echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
503d2be0
AS
23433if test "${ac_cv_type_size_t+set}" = set; then
23434 echo $ECHO_N "(cached) $ECHO_C" >&6
8730a8da 23435else
503d2be0 23436 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23437/* confdefs.h. */
23438_ACEOF
23439cat confdefs.h >>conftest.$ac_ext
23440cat >>conftest.$ac_ext <<_ACEOF
23441/* end confdefs.h. */
503d2be0 23442$ac_includes_default
ca81d7a0 23443typedef size_t ac__type_new_;
503d2be0
AS
23444int
23445main ()
23446{
ca81d7a0 23447if ((ac__type_new_ *) 0)
503d2be0 23448 return 0;
ca81d7a0 23449if (sizeof (ac__type_new_))
503d2be0
AS
23450 return 0;
23451 ;
23452 return 0;
23453}
23454_ACEOF
23455rm -f conftest.$ac_objext
ca81d7a0
JD
23456if { (ac_try="$ac_compile"
23457case "(($ac_try" in
23458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23459 *) ac_try_echo=$ac_try;;
23460esac
23461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23462 (eval "$ac_compile") 2>conftest.er1
503d2be0 23463 ac_status=$?
edfaf76d
LK
23464 grep -v '^ *+' conftest.er1 >conftest.err
23465 rm -f conftest.er1
23466 cat conftest.err >&5
c0d27fcc 23467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23468 (exit $ac_status); } && {
23469 test -z "$ac_c_werror_flag" ||
23470 test ! -s conftest.err
23471 } && test -s conftest.$ac_objext; then
8730a8da
DL
23472 ac_cv_type_size_t=yes
23473else
503d2be0 23474 echo "$as_me: failed program was:" >&5
19650fd6
AS
23475sed 's/^/| /' conftest.$ac_ext >&5
23476
ca81d7a0 23477 ac_cv_type_size_t=no
8730a8da 23478fi
ca81d7a0
JD
23479
23480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8730a8da 23481fi
ca81d7a0
JD
23482{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
23483echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
503d2be0 23484if test $ac_cv_type_size_t = yes; then
503d2be0 23485
c0d27fcc
MR
23486cat >>confdefs.h <<_ACEOF
23487#define HAVE_SIZE_T 1
23488_ACEOF
23489
8730a8da
DL
23490
23491fi
23492
c0d27fcc 23493
ca81d7a0
JD
23494{ echo "$as_me:$LINENO: checking for mbstate_t" >&5
23495echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
973a76b1
DL
23496if test "${ac_cv_type_mbstate_t+set}" = set; then
23497 echo $ECHO_N "(cached) $ECHO_C" >&6
23498else
23499 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23500/* confdefs.h. */
23501_ACEOF
23502cat confdefs.h >>conftest.$ac_ext
23503cat >>conftest.$ac_ext <<_ACEOF
23504/* end confdefs.h. */
973a76b1
DL
23505$ac_includes_default
23506# include <wchar.h>
23507int
23508main ()
23509{
23510mbstate_t x; return sizeof x;
23511 ;
23512 return 0;
23513}
23514_ACEOF
23515rm -f conftest.$ac_objext
ca81d7a0
JD
23516if { (ac_try="$ac_compile"
23517case "(($ac_try" in
23518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23519 *) ac_try_echo=$ac_try;;
23520esac
23521eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23522 (eval "$ac_compile") 2>conftest.er1
973a76b1 23523 ac_status=$?
edfaf76d
LK
23524 grep -v '^ *+' conftest.er1 >conftest.err
23525 rm -f conftest.er1
23526 cat conftest.err >&5
973a76b1 23527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
c24fa7dc
MB
23528 (exit $ac_status); } && {
23529 test -z "$ac_c_werror_flag" ||
23530 test ! -s conftest.err
23531 } && test -s conftest.$ac_objext; then
973a76b1
DL
23532 ac_cv_type_mbstate_t=yes
23533else
23534 echo "$as_me: failed program was:" >&5
19650fd6
AS
23535sed 's/^/| /' conftest.$ac_ext >&5
23536
ca81d7a0 23537 ac_cv_type_mbstate_t=no
973a76b1 23538fi
ca81d7a0
JD
23539
23540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
973a76b1 23541fi
ca81d7a0
JD
23542{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
23543echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
973a76b1
DL
23544 if test $ac_cv_type_mbstate_t = yes; then
23545
23546cat >>confdefs.h <<\_ACEOF
23547#define HAVE_MBSTATE_T 1
23548_ACEOF
23549
23550 else
23551
23552cat >>confdefs.h <<\_ACEOF
23553#define mbstate_t int
23554_ACEOF
23555
23556 fi
23557
ca81d7a0
JD
23558{ echo "$as_me:$LINENO: checking for C restrict keyword" >&5
23559echo $ECHO_N "checking for C restrict keyword... $ECHO_C" >&6; }
22044edf
DL
23560if test "${emacs_cv_c_restrict+set}" = set; then
23561 echo $ECHO_N "(cached) $ECHO_C" >&6
23562else
23563 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23564/* confdefs.h. */
23565_ACEOF
23566cat confdefs.h >>conftest.$ac_ext
23567cat >>conftest.$ac_ext <<_ACEOF
23568/* end confdefs.h. */
22044edf
DL
23569void fred (int *restrict x);
23570int
23571main ()
23572{
b936fae4 23573
22044edf
DL
23574 ;
23575 return 0;
23576}
c0d27fcc 23577_ACEOF
22044edf 23578rm -f conftest.$ac_objext
ca81d7a0
JD
23579if { (ac_try="$ac_compile"
23580case "(($ac_try" in
23581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23582 *) ac_try_echo=$ac_try;;
23583esac
23584eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23585 (eval "$ac_compile") 2>conftest.er1
22044edf 23586 ac_status=$?
edfaf76d
LK
23587 grep -v '^ *+' conftest.er1 >conftest.err
23588 rm -f conftest.er1
23589 cat conftest.err >&5
22044edf 23590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23591 (exit $ac_status); } && {
23592 test -z "$ac_c_werror_flag" ||
23593 test ! -s conftest.err
23594 } && test -s conftest.$ac_objext; then
22044edf
DL
23595 emacs_cv_c_restrict=yes
23596else
23597 echo "$as_me: failed program was:" >&5
19650fd6
AS
23598sed 's/^/| /' conftest.$ac_ext >&5
23599
ca81d7a0 23600 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23601/* confdefs.h. */
23602_ACEOF
23603cat confdefs.h >>conftest.$ac_ext
23604cat >>conftest.$ac_ext <<_ACEOF
23605/* end confdefs.h. */
22044edf
DL
23606void fred (int *__restrict x);
23607int
23608main ()
23609{
c0d27fcc 23610
22044edf
DL
23611 ;
23612 return 0;
23613}
c0d27fcc 23614_ACEOF
22044edf 23615rm -f conftest.$ac_objext
ca81d7a0
JD
23616if { (ac_try="$ac_compile"
23617case "(($ac_try" in
23618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23619 *) ac_try_echo=$ac_try;;
23620esac
23621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23622 (eval "$ac_compile") 2>conftest.er1
22044edf 23623 ac_status=$?
edfaf76d
LK
23624 grep -v '^ *+' conftest.er1 >conftest.err
23625 rm -f conftest.er1
23626 cat conftest.err >&5
22044edf 23627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23628 (exit $ac_status); } && {
23629 test -z "$ac_c_werror_flag" ||
23630 test ! -s conftest.err
23631 } && test -s conftest.$ac_objext; then
22044edf
DL
23632 emacs_cv_c_restrict=__restrict
23633else
23634 echo "$as_me: failed program was:" >&5
19650fd6
AS
23635sed 's/^/| /' conftest.$ac_ext >&5
23636
ca81d7a0 23637 emacs_cv_c_restrict=no
ba4481b5 23638fi
ca81d7a0
JD
23639
23640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23641fi
ca81d7a0
JD
23642
23643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ba4481b5 23644fi
ca81d7a0
JD
23645{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict" >&5
23646echo "${ECHO_T}$emacs_cv_c_restrict" >&6; }
22044edf
DL
23647case "$emacs_cv_c_restrict" in
23648 yes) emacs_restrict=restrict;;
23649 no) emacs_restrict="";;
23650 *) emacs_restrict="$emacs_cv_c_restrict";;
23651esac
23652if test "$emacs_restrict" != __restrict; then
b936fae4 23653
22044edf
DL
23654cat >>confdefs.h <<_ACEOF
23655#define __restrict $emacs_restrict
c0d27fcc 23656_ACEOF
ba4481b5
DL
23657
23658fi
ba4481b5 23659
ca81d7a0
JD
23660{ echo "$as_me:$LINENO: checking for C restricted array declarations" >&5
23661echo $ECHO_N "checking for C restricted array declarations... $ECHO_C" >&6; }
22044edf
DL
23662if test "${emacs_cv_c_restrict_arr+set}" = set; then
23663 echo $ECHO_N "(cached) $ECHO_C" >&6
23664else
23665 cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23666/* confdefs.h. */
23667_ACEOF
23668cat confdefs.h >>conftest.$ac_ext
23669cat >>conftest.$ac_ext <<_ACEOF
23670/* end confdefs.h. */
22044edf
DL
23671void fred (int x[__restrict]);
23672int
23673main ()
23674{
b936fae4 23675
22044edf
DL
23676 ;
23677 return 0;
23678}
c0d27fcc 23679_ACEOF
22044edf 23680rm -f conftest.$ac_objext
ca81d7a0
JD
23681if { (ac_try="$ac_compile"
23682case "(($ac_try" in
23683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23684 *) ac_try_echo=$ac_try;;
23685esac
23686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23687 (eval "$ac_compile") 2>conftest.er1
22044edf 23688 ac_status=$?
edfaf76d
LK
23689 grep -v '^ *+' conftest.er1 >conftest.err
23690 rm -f conftest.er1
23691 cat conftest.err >&5
22044edf 23692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
f053c89f
CY
23693 (exit $ac_status); } && {
23694 test -z "$ac_c_werror_flag" ||
23695 test ! -s conftest.err
23696 } && test -s conftest.$ac_objext; then
22044edf
DL
23697 emacs_cv_c_restrict_arr=yes
23698else
23699 echo "$as_me: failed program was:" >&5
19650fd6
AS
23700sed 's/^/| /' conftest.$ac_ext >&5
23701
ca81d7a0 23702 emacs_cv_c_restrict_arr=no
ba4481b5 23703fi
ca81d7a0
JD
23704
23705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22044edf 23706fi
ca81d7a0
JD
23707{ echo "$as_me:$LINENO: result: $emacs_cv_c_restrict_arr" >&5
23708echo "${ECHO_T}$emacs_cv_c_restrict_arr" >&6; }
22044edf 23709if test "$emacs_cv_c_restrict_arr" = yes; then
b936fae4 23710
c0d27fcc 23711cat >>confdefs.h <<\_ACEOF
22044edf 23712#define __restrict_arr __restrict
c0d27fcc 23713_ACEOF
ba4481b5 23714
ba4481b5
DL
23715fi
23716
c0d27fcc 23717
c0d27fcc 23718
22044edf
DL
23719# Set up the CFLAGS for real compilation, so we can substitute it.
23720CFLAGS="$REAL_CFLAGS"
23721CPPFLAGS="$REAL_CPPFLAGS"
23722
23723#### Find out which version of Emacs this is.
23724version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
23725 | sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
23726if test x"${version}" = x; then
23727 { { echo "$as_me:$LINENO: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&5
23728echo "$as_me: error: can't find current emacs version in \`${srcdir}/lisp/version.el'." >&2;}
23729 { (exit 1); exit 1; }; }
23730fi
23731
23732### Specify what sort of things we'll be editing into Makefile and config.h.
23733### Use configuration here uncanonicalized to avoid exceeding size limits.
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
6a3a24fa 23766
22044edf
DL
23767
23768
23769cat >>confdefs.h <<_ACEOF
23770#define EMACS_CONFIGURATION "${canonical}"
23771_ACEOF
23772
23773
23774cat >>confdefs.h <<_ACEOF
23775#define EMACS_CONFIG_OPTIONS "${ac_configure_args}"
23776_ACEOF
23777
23778
23779cat >>confdefs.h <<_ACEOF
23780#define config_machfile "${machfile}"
23781_ACEOF
23782
23783
23784cat >>confdefs.h <<_ACEOF
23785#define config_opsysfile "${opsysfile}"
23786_ACEOF
23787
23788
23789cat >>confdefs.h <<_ACEOF
23790#define LD_SWITCH_X_SITE ${LD_SWITCH_X_SITE}
23791_ACEOF
23792
23793
23794cat >>confdefs.h <<_ACEOF
23795#define LD_SWITCH_X_SITE_AUX ${LD_SWITCH_X_SITE_AUX}
23796_ACEOF
23797
23798
23799cat >>confdefs.h <<_ACEOF
23800#define C_SWITCH_X_SITE ${C_SWITCH_X_SITE}
23801_ACEOF
23802
23803
23804cat >>confdefs.h <<_ACEOF
23805#define UNEXEC_SRC ${UNEXEC_SRC}
23806_ACEOF
23807
23808
23809if test "${HAVE_X_WINDOWS}" = "yes" ; then
23810
23811cat >>confdefs.h <<\_ACEOF
23812#define HAVE_X_WINDOWS 1
23813_ACEOF
23814
23815fi
23816if test "${USE_X_TOOLKIT}" != "none" ; then
23817
23818cat >>confdefs.h <<\_ACEOF
23819#define USE_X_TOOLKIT 1
23820_ACEOF
23821
23822fi
23823if test "${HAVE_X11}" = "yes" ; then
23824
23825cat >>confdefs.h <<\_ACEOF
23826#define HAVE_X11 1
23827_ACEOF
23828
22044edf
DL
23829fi
23830if test "${HAVE_MENUS}" = "yes" ; then
23831
23832cat >>confdefs.h <<\_ACEOF
23833#define HAVE_MENUS 1
23834_ACEOF
23835
23836fi
23837if test "${GNU_MALLOC}" = "yes" ; then
23838
23839cat >>confdefs.h <<\_ACEOF
23840#define GNU_MALLOC 1
23841_ACEOF
23842
23843fi
23844if test "${REL_ALLOC}" = "yes" ; then
23845
23846cat >>confdefs.h <<\_ACEOF
23847#define REL_ALLOC 1
23848_ACEOF
23849
23850fi
23851
23852
23853
c0d27fcc
MR
23854
23855
5afbeb22 23856
ba4481b5 23857#### Report on what we decided to do.
488dd4c4
JD
23858#### Report GTK as a toolkit, even if it doesn't use Xt.
23859#### It makes printing result more understandable as using GTK sets
23860#### toolkit_scroll_bars to yes by default.
23861if test "${HAVE_GTK}" = "yes"; then
23862 USE_X_TOOLKIT=GTK
23863fi
23864
ba4481b5
DL
23865echo "
23866Configured for \`${canonical}'.
23867
23868 Where should the build process find the source code? ${srcdir}
23869 What operating system and machine description files should Emacs use?
23870 \`${opsysfile}' and \`${machfile}'
23871 What compiler should emacs be built with? ${CC} ${CFLAGS}
23872 Should Emacs use the GNU version of malloc? ${GNU_MALLOC}${GNU_MALLOC_reason}
73b77ee5 23873 Should Emacs use a relocating allocator for buffers? ${REL_ALLOC}
ef9e4345 23874 Should Emacs use mmap(2) for buffer allocation? $use_mmap_for_buffers
ba4481b5 23875 What window system should Emacs use? ${window_system}
8e967cf7 23876 What toolkit should Emacs use? ${USE_X_TOOLKIT}"
ba4481b5
DL
23877
23878if test -n "${x_includes}"; then
23879echo " Where do we find X Windows header files? ${x_includes}"
23880else
23881echo " Where do we find X Windows header files? Standard dirs"
23882fi
23883if test -n "${x_libraries}"; then
23884echo " Where do we find X Windows libraries? ${x_libraries}"
23885else
23886echo " Where do we find X Windows libraries? Standard dirs"
23887fi
23888
23889echo " Does Emacs use -lXaw3d? ${HAVE_XAW3D}"
23890echo " Does Emacs use -lXpm? ${HAVE_XPM}"
23891echo " Does Emacs use -ljpeg? ${HAVE_JPEG}"
23892echo " Does Emacs use -ltiff? ${HAVE_TIFF}"
9aeb8aaa 23893echo " Does Emacs use a gif library? ${HAVE_GIF} $ac_gif_lib_name"
ba4481b5 23894echo " Does Emacs use -lpng? ${HAVE_PNG}"
0cfc0546 23895echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
79011b82 23896echo " Does Emacs use -lgpm? ${HAVE_GPM}"
409dd120 23897echo " Does Emacs use -ldbus? ${HAVE_DBUS}"
2ee27f27
EZ
23898echo " Does Emacs use a font backend? ${USE_FONT_BACKEND}"
23899
23900if test "${USE_FONT_BACKEND}" = "yes"; then
23901 echo " Does Emacs use -lfreetype? ${HAVE_FREETYPE}"
23902 echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"
23903 echo " Does Emacs use -lotf? ${HAVE_LIBOTF}"
23904 echo " Does Emacs use -lxft? ${HAVE_XFT}"
23905fi
ba4481b5
DL
23906echo " Does Emacs use X toolkit scroll bars? ${USE_TOOLKIT_SCROLL_BARS}"
23907echo
23908
d0098f13
JD
23909if test $USE_XASSERTS = yes; then
23910 echo " Compiling with asserts turned on."
d0098f13 23911 CPPFLAGS="$CPPFLAGS -DXASSERTS=1"
d0098f13 23912fi
05cf15c6 23913
ca34d75a
JD
23914if test $USE_SYNC_INPUT = yes; then
23915 echo " Compiling with sync input."
23916 CPPFLAGS="$CPPFLAGS -DSYNC_INPUT=1"
23917fi
23918
23919echo
23920
a2d3b5bd
JD
23921if test "$USE_X_TOOLKIT" = GTK; then
23922 case "$canonical" in
23923 *cygwin*)
23924 echo "There are known problems with Emacs and Gtk+ on cygwin, so you
23925 will probably get a crash on startup. If this happens, please use another
23926 toolkit for Emacs. See etc/PROBLEMS for more information."
23927 ;;
23928 esac
23929fi
23930
05cf15c6 23931
f0e04acc
GM
23932if test "$HAVE_CARBON" = "yes"; then
23933 echo
23934 echo "Warning: The Mac Carbon port is currently unsupported and has
23935known problems. It is not recommended for use by non-developers.
23936Read the emacs-devel archives for more information."
23937 echo
23938fi
23939
131e4133
MA
23940if test "$HAVE_DBUS" = yes && test "${opsys}" != "gnu-linux"; then
23941 echo "D-Bus integration has been tested for GNU/Linux only."
23942 echo
23943fi
23944
05cf15c6 23945
ba4481b5
DL
23946# Remove any trailing slashes in these variables.
23947test "${prefix}" != NONE &&
23948 prefix=`echo "${prefix}" | sed 's,\([^/]\)/*$,\1,'`
23949test "${exec_prefix}" != NONE &&
23950 exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`
23951
d0e9bfd2
GM
23952## Check if the C preprocessor will convert `..' to `. .'. If so, set
23953## CPP_NEED_TRADITIONAL to `yes' so that the code to generate Makefile
23954## from Makefile.c can correctly provide the arg `-traditional' to the
23955## C preprocessor.
23956
503d2be0 23957cat >conftest.$ac_ext <<_ACEOF
19650fd6
AS
23958/* confdefs.h. */
23959_ACEOF
23960cat confdefs.h >>conftest.$ac_ext
23961cat >>conftest.$ac_ext <<_ACEOF
23962/* end confdefs.h. */
d0e9bfd2 23963yes..yes
503d2be0 23964_ACEOF
d0e9bfd2 23965if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6bae0ccf 23966 $EGREP "yes..yes" >/dev/null 2>&1; then
d0e9bfd2
GM
23967 CPP_NEED_TRADITIONAL=no
23968else
d0e9bfd2
GM
23969 CPP_NEED_TRADITIONAL=yes
23970fi
23971rm -f conftest*
23972
c0d27fcc 23973
f657c21b 23974ac_config_files="$ac_config_files Makefile lib-src/Makefile.c:lib-src/Makefile.in oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile.c:src/Makefile.in lwlib/Makefile lisp/Makefile leim/Makefile"
ca81d7a0
JD
23975
23976ac_config_commands="$ac_config_commands default"
23977
503d2be0 23978cat >confcache <<\_ACEOF
ba4481b5
DL
23979# This file is a shell script that caches the results of configure
23980# tests run on this system so they can be shared between configure
503d2be0
AS
23981# scripts and configure runs, see configure's option --config-cache.
23982# It is not useful on other systems. If it contains results you don't
23983# want to keep, you may remove or edit it.
ba4481b5 23984#
503d2be0
AS
23985# config.status only pays attention to the cache file if you give it
23986# the --recheck option to rerun configure.
ba4481b5 23987#
6bae0ccf 23988# `ac_cv_env_foo' variables (set or unset) will be overridden when
503d2be0
AS
23989# loading this file, other *unset* `ac_cv_foo' will be assigned the
23990# following values.
23991
23992_ACEOF
23993
ba4481b5
DL
23994# The following way of writing the cache mishandles newlines in values,
23995# but we know of no workaround that is simple, portable, and efficient.
ca81d7a0 23996# So, we kill variables containing newlines.
ba4481b5
DL
23997# Ultrix sh set writes to stderr and can't be redirected directly,
23998# and sets the high bit in the cache file unless we assign to the vars.
ca81d7a0
JD
23999(
24000 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
24001 eval ac_val=\$$ac_var
24002 case $ac_val in #(
24003 *${as_nl}*)
24004 case $ac_var in #(
24005 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
24006echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
24007 esac
24008 case $ac_var in #(
24009 _ | IFS | as_nl) ;; #(
24010 *) $as_unset $ac_var ;;
24011 esac ;;
24012 esac
24013 done
24014
503d2be0 24015 (set) 2>&1 |
ca81d7a0
JD
24016 case $as_nl`(ac_space=' '; set) 2>&1` in #(
24017 *${as_nl}ac_space=\ *)
503d2be0
AS
24018 # `set' does not quote correctly, so add quotes (double-quote
24019 # substitution turns \\\\ into \\, and sed turns \\ into \).
24020 sed -n \
edfaf76d
LK
24021 "s/'/'\\\\''/g;
24022 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
ca81d7a0 24023 ;; #(
503d2be0
AS
24024 *)
24025 # `set' quotes correctly as required by POSIX, so do not add quotes.
ca81d7a0 24026 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
503d2be0 24027 ;;
ca81d7a0
JD
24028 esac |
24029 sort
24030) |
503d2be0 24031 sed '
ca81d7a0 24032 /^ac_cv_env_/b end
503d2be0 24033 t clear
ca81d7a0 24034 :clear
503d2be0
AS
24035 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24036 t end
ca81d7a0
JD
24037 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24038 :end' >>confcache
24039if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
24040 if test -w "$cache_file"; then
24041 test "x$cache_file" != "x/dev/null" &&
24042 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
24043echo "$as_me: updating cache $cache_file" >&6;}
503d2be0 24044 cat confcache >$cache_file
ba4481b5 24045 else
ca81d7a0
JD
24046 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
24047echo "$as_me: not updating unwritable cache $cache_file" >&6;}
ba4481b5
DL
24048 fi
24049fi
24050rm -f confcache
24051
ba4481b5
DL
24052test "x$prefix" = xNONE && prefix=$ac_default_prefix
24053# Let make expand exec_prefix.
24054test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24055
ba4481b5
DL
24056DEFS=-DHAVE_CONFIG_H
24057
6bae0ccf
DL
24058ac_libobjs=
24059ac_ltlibobjs=
24060for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
24061 # 1. Remove the extension, and $U if already installed.
ca81d7a0
JD
24062 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
24063 ac_i=`echo "$ac_i" | sed "$ac_script"`
24064 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
24065 # will be set to the directory where LIBOBJS objects are built.
24066 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
24067 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
6bae0ccf
DL
24068done
24069LIBOBJS=$ac_libobjs
24070
24071LTLIBOBJS=$ac_ltlibobjs
24072
24073
c0d27fcc 24074
ba4481b5 24075: ${CONFIG_STATUS=./config.status}
503d2be0
AS
24076ac_clean_files_save=$ac_clean_files
24077ac_clean_files="$ac_clean_files $CONFIG_STATUS"
c0d27fcc 24078{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
503d2be0
AS
24079echo "$as_me: creating $CONFIG_STATUS" >&6;}
24080cat >$CONFIG_STATUS <<_ACEOF
24081#! $SHELL
c0d27fcc 24082# Generated by $as_me.
ba4481b5 24083# Run this file to recreate the current configuration.
ba4481b5 24084# Compiler output produced by configure, useful for debugging
503d2be0 24085# configure, is in config.log if it exists.
ba4481b5 24086
503d2be0 24087debug=false
19650fd6
AS
24088ac_cs_recheck=false
24089ac_cs_silent=false
503d2be0 24090SHELL=\${CONFIG_SHELL-$SHELL}
503d2be0
AS
24091_ACEOF
24092
24093cat >>$CONFIG_STATUS <<\_ACEOF
c0d27fcc
MR
24094## --------------------- ##
24095## M4sh Initialization. ##
24096## --------------------- ##
24097
f053c89f
CY
24098# Be more Bourne compatible
24099DUALCASE=1; export DUALCASE # for MKS sh
503d2be0
AS
24100if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24101 emulate sh
24102 NULLCMD=:
6bae0ccf
DL
24103 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
24104 # is contrary to our usage. Disable this feature.
24105 alias -g '${1+"$@"}'='"$@"'
ca81d7a0
JD
24106 setopt NO_GLOB_SUBST
24107else
f053c89f
CY
24108 case `(set -o) 2>/dev/null` in
24109 *posix*) set -o posix ;;
24110esac
24111
503d2be0 24112fi
f053c89f
CY
24113
24114
503d2be0 24115
ca81d7a0
JD
24116
24117# PATH needs CR
24118# Avoid depending upon Character Ranges.
24119as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24120as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24121as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24122as_cr_digits='0123456789'
24123as_cr_alnum=$as_cr_Letters$as_cr_digits
24124
24125# The user is always right.
24126if test "${PATH_SEPARATOR+set}" != set; then
24127 echo "#! /bin/sh" >conf$$.sh
24128 echo "exit 0" >>conf$$.sh
24129 chmod +x conf$$.sh
24130 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
24131 PATH_SEPARATOR=';'
24132 else
24133 PATH_SEPARATOR=:
24134 fi
24135 rm -f conf$$.sh
503d2be0
AS
24136fi
24137
c0d27fcc 24138# Support unset when possible.
edfaf76d 24139if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
c0d27fcc
MR
24140 as_unset=unset
24141else
24142 as_unset=false
24143fi
24144
6bae0ccf 24145
ca81d7a0
JD
24146# IFS
24147# We need space, tab and new line, in precisely that order. Quoting is
24148# there to prevent editors from complaining about space-tab.
24149# (If _AS_PATH_WALK were called with IFS unset, it would disable word
24150# splitting by setting IFS to empty value.)
24151as_nl='
24152'
24153IFS=" "" $as_nl"
24154
24155# Find who we are. Look in the path if we contain no directory separator.
24156case $0 in
24157 *[\\/]* ) as_myself=$0 ;;
24158 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24159for as_dir in $PATH
24160do
24161 IFS=$as_save_IFS
24162 test -z "$as_dir" && as_dir=.
24163 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
24164done
24165IFS=$as_save_IFS
24166
24167 ;;
24168esac
24169# We did not find ourselves, most probably we were run as `sh COMMAND'
24170# in which case we are not to be found in the path.
24171if test "x$as_myself" = x; then
24172 as_myself=$0
24173fi
24174if test ! -f "$as_myself"; then
24175 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24176 { (exit 1); exit 1; }
24177fi
24178
6bae0ccf 24179# Work around bugs in pre-3.0 UWIN ksh.
ca81d7a0
JD
24180for as_var in ENV MAIL MAILPATH
24181do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
24182done
6bae0ccf
DL
24183PS1='$ '
24184PS2='> '
24185PS4='+ '
24186
24187# NLS nuisances.
19650fd6
AS
24188for as_var in \
24189 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
24190 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
24191 LC_TELEPHONE LC_TIME
6bae0ccf 24192do
edfaf76d 24193 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
6bae0ccf
DL
24194 eval $as_var=C; export $as_var
24195 else
ca81d7a0 24196 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
6bae0ccf
DL
24197 fi
24198done
24199
24200# Required to use basename.
ca81d7a0
JD
24201if expr a : '\(a\)' >/dev/null 2>&1 &&
24202 test "X`expr 00001 : '.*\(...\)'`" = X001; then
6bae0ccf
DL
24203 as_expr=expr
24204else
24205 as_expr=false
24206fi
24207
ca81d7a0 24208if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
6bae0ccf
DL
24209 as_basename=basename
24210else
24211 as_basename=false
24212fi
c0d27fcc
MR
24213
24214
503d2be0 24215# Name of the executable.
ca81d7a0 24216as_me=`$as_basename -- "$0" ||
c0d27fcc
MR
24217$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24218 X"$0" : 'X\(//\)$' \| \
ca81d7a0 24219 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
c0d27fcc 24220echo X/"$0" |
ca81d7a0
JD
24221 sed '/^.*\/\([^/][^/]*\)\/*$/{
24222 s//\1/
24223 q
24224 }
24225 /^X\/\(\/\/\)$/{
24226 s//\1/
24227 q
24228 }
24229 /^X\/\(\/\).*/{
24230 s//\1/
24231 q
24232 }
24233 s/.*/./; q'`
c0d27fcc 24234
ca81d7a0
JD
24235# CDPATH.
24236$as_unset CDPATH
c0d27fcc
MR
24237
24238
c0d27fcc 24239
c0d27fcc 24240 as_lineno_1=$LINENO
c0d27fcc 24241 as_lineno_2=$LINENO
c0d27fcc 24242 test "x$as_lineno_1" != "x$as_lineno_2" &&
ca81d7a0 24243 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
c0d27fcc
MR
24244
24245 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
24246 # uniformly replaced by the line number. The first 'sed' inserts a
ca81d7a0
JD
24247 # line-number line after each line using $LINENO; the second 'sed'
24248 # does the real work. The second script uses 'N' to pair each
24249 # line-number line with the line containing $LINENO, and appends
24250 # trailing '-' during substitution so that $LINENO is not a special
24251 # case at line end.
c0d27fcc 24252 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
ca81d7a0
JD
24253 # scripts with optimization help from Paolo Bonzini. Blame Lee
24254 # E. McMahon (1931-1989) for sed's syntax. :-)
24255 sed -n '
24256 p
24257 /[$]LINENO/=
24258 ' <$as_myself |
c0d27fcc 24259 sed '
ca81d7a0
JD
24260 s/[$]LINENO.*/&-/
24261 t lineno
24262 b
24263 :lineno
c0d27fcc 24264 N
ca81d7a0
JD
24265 :loop
24266 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
c0d27fcc 24267 t loop
ca81d7a0 24268 s/-\n.*//
c0d27fcc 24269 ' >$as_me.lineno &&
ca81d7a0
JD
24270 chmod +x "$as_me.lineno" ||
24271 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
c0d27fcc
MR
24272 { (exit 1); exit 1; }; }
24273
24274 # Don't try to exec as it changes $[0], causing all sort of problems
24275 # (the dirname of $[0] is not the place where we might find the
ca81d7a0
JD
24276 # original and so on. Autoconf is especially sensitive to this).
24277 . "./$as_me.lineno"
c0d27fcc
MR
24278 # Exit status is that of the last command.
24279 exit
24280}
24281
24282
ca81d7a0
JD
24283if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24284 as_dirname=dirname
24285else
24286 as_dirname=false
24287fi
24288
24289ECHO_C= ECHO_N= ECHO_T=
24290case `echo -n x` in
24291-n*)
24292 case `echo 'x\c'` in
24293 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24294 *) ECHO_C='\c';;
24295 esac;;
24296*)
24297 ECHO_N='-n';;
c0d27fcc 24298esac
503d2be0 24299
ca81d7a0
JD
24300if expr a : '\(a\)' >/dev/null 2>&1 &&
24301 test "X`expr 00001 : '.*\(...\)'`" = X001; then
503d2be0
AS
24302 as_expr=expr
24303else
24304 as_expr=false
24305fi
24306
24307rm -f conf$$ conf$$.exe conf$$.file
ca81d7a0
JD
24308if test -d conf$$.dir; then
24309 rm -f conf$$.dir/conf$$.file
24310else
24311 rm -f conf$$.dir
24312 mkdir conf$$.dir
24313fi
503d2be0
AS
24314echo >conf$$.file
24315if ln -s conf$$.file conf$$ 2>/dev/null; then
ca81d7a0
JD
24316 as_ln_s='ln -s'
24317 # ... but there are two gotchas:
24318 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24319 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24320 # In both cases, we have to default to `cp -p'.
24321 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
503d2be0 24322 as_ln_s='cp -p'
503d2be0
AS
24323elif ln conf$$.file conf$$ 2>/dev/null; then
24324 as_ln_s=ln
24325else
24326 as_ln_s='cp -p'
24327fi
ca81d7a0
JD
24328rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24329rmdir conf$$.dir 2>/dev/null
503d2be0 24330
6bae0ccf
DL
24331if mkdir -p . 2>/dev/null; then
24332 as_mkdir_p=:
24333else
edfaf76d 24334 test -d ./-p && rmdir ./-p
6bae0ccf
DL
24335 as_mkdir_p=false
24336fi
24337
f053c89f
CY
24338if test -x / >/dev/null 2>&1; then
24339 as_test_x='test -x'
ca81d7a0 24340else
f053c89f
CY
24341 if ls -dL / >/dev/null 2>&1; then
24342 as_ls_L_option=L
24343 else
24344 as_ls_L_option=
24345 fi
24346 as_test_x='
24347 eval sh -c '\''
24348 if test -d "$1"; then
24349 test -d "$1/.";
24350 else
24351 case $1 in
24352 -*)set "./$1";;
24353 esac;
24354 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
24355 ???[sx]*):;;*)false;;esac;fi
24356 '\'' sh
24357 '
ca81d7a0 24358fi
f053c89f 24359as_executable_p=$as_test_x
503d2be0 24360
c0d27fcc 24361# Sed expression to map a string onto a valid CPP name.
edfaf76d 24362as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
c0d27fcc
MR
24363
24364# Sed expression to map a string onto a valid variable name.
edfaf76d 24365as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
503d2be0 24366
503d2be0 24367
503d2be0
AS
24368exec 6>&1
24369
ca81d7a0 24370# Save the log message, to keep $[0] and so on meaningful, and to
c0d27fcc 24371# report actual input values of CONFIG_FILES etc. instead of their
ca81d7a0
JD
24372# values after options handling.
24373ac_log="
9cf8f393 24374This file was extended by emacs $as_me 23.0.50, which was
f053c89f 24375generated by GNU Autoconf 2.61. Invocation command line was
c0d27fcc
MR
24376
24377 CONFIG_FILES = $CONFIG_FILES
24378 CONFIG_HEADERS = $CONFIG_HEADERS
24379 CONFIG_LINKS = $CONFIG_LINKS
24380 CONFIG_COMMANDS = $CONFIG_COMMANDS
24381 $ $0 $@
24382
ca81d7a0
JD
24383on `(hostname || uname -n) 2>/dev/null | sed 1q`
24384"
24385
503d2be0
AS
24386_ACEOF
24387
ca81d7a0 24388cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24389# Files that config.status was made for.
ca81d7a0
JD
24390config_files="$ac_config_files"
24391config_headers="$ac_config_headers"
24392config_commands="$ac_config_commands"
503d2be0 24393
ca81d7a0 24394_ACEOF
503d2be0 24395
c0d27fcc 24396cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24397ac_cs_usage="\
24398\`$as_me' instantiates files from templates according to the
24399current configuration.
24400
24401Usage: $0 [OPTIONS] [FILE]...
24402
24403 -h, --help print this help, then exit
f053c89f 24404 -V, --version print version number and configuration settings, then exit
19650fd6 24405 -q, --quiet do not print progress messages
503d2be0
AS
24406 -d, --debug don't remove temporary files
24407 --recheck update $as_me by reconfiguring in the same conditions
24408 --file=FILE[:TEMPLATE]
edfaf76d 24409 instantiate the configuration file FILE
503d2be0 24410 --header=FILE[:TEMPLATE]
edfaf76d 24411 instantiate the configuration header FILE
503d2be0
AS
24412
24413Configuration files:
24414$config_files
24415
24416Configuration headers:
24417$config_headers
24418
24419Configuration commands:
24420$config_commands
24421
24422Report bugs to <bug-autoconf@gnu.org>."
503d2be0 24423
ca81d7a0 24424_ACEOF
c0d27fcc 24425cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24426ac_cs_version="\\
9cf8f393 24427emacs config.status 23.0.50
f053c89f 24428configured by $0, generated by GNU Autoconf 2.61,
ca81d7a0 24429 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
503d2be0 24430
ca81d7a0 24431Copyright (C) 2006 Free Software Foundation, Inc.
503d2be0
AS
24432This config.status script is free software; the Free Software Foundation
24433gives unlimited permission to copy, distribute and modify it."
ca81d7a0
JD
24434
24435ac_pwd='$ac_pwd'
24436srcdir='$srcdir'
24437INSTALL='$INSTALL'
c0d27fcc 24438_ACEOF
503d2be0 24439
c0d27fcc 24440cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
24441# If no file are specified by the user, then we need to provide default
24442# value. By we need to know if files were specified by the user.
24443ac_need_defaults=:
24444while test $# != 0
ba4481b5 24445do
503d2be0
AS
24446 case $1 in
24447 --*=*)
ca81d7a0
JD
24448 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24449 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
6bae0ccf
DL
24450 ac_shift=:
24451 ;;
ca81d7a0 24452 *)
6bae0ccf
DL
24453 ac_option=$1
24454 ac_optarg=$2
24455 ac_shift=shift
503d2be0 24456 ;;
503d2be0
AS
24457 esac
24458
6bae0ccf 24459 case $ac_option in
503d2be0 24460 # Handling of the options.
19650fd6
AS
24461 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24462 ac_cs_recheck=: ;;
ca81d7a0
JD
24463 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24464 echo "$ac_cs_version"; exit ;;
24465 --debug | --debu | --deb | --de | --d | -d )
503d2be0
AS
24466 debug=: ;;
24467 --file | --fil | --fi | --f )
6bae0ccf
DL
24468 $ac_shift
24469 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
503d2be0
AS
24470 ac_need_defaults=false;;
24471 --header | --heade | --head | --hea )
6bae0ccf
DL
24472 $ac_shift
24473 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
503d2be0 24474 ac_need_defaults=false;;
ca81d7a0
JD
24475 --he | --h)
24476 # Conflict between --help and --header
24477 { echo "$as_me: error: ambiguous option: $1
24478Try \`$0 --help' for more information." >&2
24479 { (exit 1); exit 1; }; };;
24480 --help | --hel | -h )
24481 echo "$ac_cs_usage"; exit ;;
19650fd6
AS
24482 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24483 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24484 ac_cs_silent=: ;;
503d2be0
AS
24485
24486 # This is an error.
ca81d7a0
JD
24487 -*) { echo "$as_me: error: unrecognized option: $1
24488Try \`$0 --help' for more information." >&2
503d2be0
AS
24489 { (exit 1); exit 1; }; } ;;
24490
ca81d7a0
JD
24491 *) ac_config_targets="$ac_config_targets $1"
24492 ac_need_defaults=false ;;
503d2be0 24493
ba4481b5 24494 esac
503d2be0 24495 shift
ba4481b5
DL
24496done
24497
19650fd6
AS
24498ac_configure_extra_args=
24499
24500if $ac_cs_silent; then
24501 exec 6>/dev/null
24502 ac_configure_extra_args="$ac_configure_extra_args --silent"
24503fi
24504
24505_ACEOF
24506cat >>$CONFIG_STATUS <<_ACEOF
24507if \$ac_cs_recheck; then
ca81d7a0
JD
24508 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
24509 CONFIG_SHELL=$SHELL
24510 export CONFIG_SHELL
24511 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19650fd6
AS
24512fi
24513
503d2be0 24514_ACEOF
ca81d7a0
JD
24515cat >>$CONFIG_STATUS <<\_ACEOF
24516exec 5>>config.log
24517{
24518 echo
24519 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24520## Running $as_me. ##
24521_ASBOX
24522 echo "$ac_log"
24523} >&5
ba4481b5 24524
ca81d7a0 24525_ACEOF
c0d27fcc 24526cat >>$CONFIG_STATUS <<_ACEOF
503d2be0 24527#
ca81d7a0 24528# INIT-COMMANDS
503d2be0 24529#
503d2be0
AS
24530GCC="$GCC" NON_GNU_CPP="$NON_GNU_CPP" CPP="$CPP" CPP_NEED_TRADITIONAL="$CPP_NEED_TRADITIONAL" CPPFLAGS="$CPPFLAGS"
24531
c0d27fcc
MR
24532_ACEOF
24533
c0d27fcc 24534cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
24535
24536# Handling of arguments.
503d2be0
AS
24537for ac_config_target in $ac_config_targets
24538do
ca81d7a0
JD
24539 case $ac_config_target in
24540 "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h:src/config.in" ;;
24541 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24542 "lib-src/Makefile.c") CONFIG_FILES="$CONFIG_FILES lib-src/Makefile.c:lib-src/Makefile.in" ;;
24543 "oldXMenu/Makefile") CONFIG_FILES="$CONFIG_FILES oldXMenu/Makefile" ;;
f657c21b
GM
24544 "doc/emacs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/emacs/Makefile" ;;
24545 "doc/misc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/misc/Makefile" ;;
24546 "doc/lispintro/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispintro/Makefile" ;;
24547 "doc/lispref/Makefile") CONFIG_FILES="$CONFIG_FILES doc/lispref/Makefile" ;;
ca81d7a0 24548 "src/Makefile.c") CONFIG_FILES="$CONFIG_FILES src/Makefile.c:src/Makefile.in" ;;
f657c21b 24549 "lwlib/Makefile") CONFIG_FILES="$CONFIG_FILES lwlib/Makefile" ;;
ca81d7a0 24550 "lisp/Makefile") CONFIG_FILES="$CONFIG_FILES lisp/Makefile" ;;
ca81d7a0
JD
24551 "leim/Makefile") CONFIG_FILES="$CONFIG_FILES leim/Makefile" ;;
24552 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24553
c0d27fcc 24554 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
503d2be0
AS
24555echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24556 { (exit 1); exit 1; }; };;
24557 esac
ba4481b5 24558done
503d2be0 24559
ca81d7a0 24560
503d2be0
AS
24561# If the user did not use the arguments to specify the items to instantiate,
24562# then the envvar interface is used. Set only those that are not.
24563# We use the long form for the default assignment because of an extremely
24564# bizarre bug on SunOS 4.1.3.
24565if $ac_need_defaults; then
24566 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24567 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24568 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
ba4481b5 24569fi
503d2be0 24570
19650fd6 24571# Have a temporary directory for convenience. Make it in the build tree
ca81d7a0 24572# simply because there is no reason against having it here, and in addition,
19650fd6 24573# creating and moving files from /tmp can sometimes cause problems.
ca81d7a0
JD
24574# Hook for its removal unless debugging.
24575# Note that there is a small window in which the directory will not be cleaned:
24576# after its creation but before its name has been assigned to `$tmp'.
503d2be0
AS
24577$debug ||
24578{
ca81d7a0
JD
24579 tmp=
24580 trap 'exit_status=$?
24581 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
24582' 0
503d2be0
AS
24583 trap '{ (exit 1); exit 1; }' 1 2 13 15
24584}
503d2be0 24585# Create a (secure) tmp directory for tmp files.
19650fd6 24586
503d2be0 24587{
ca81d7a0 24588 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
503d2be0
AS
24589 test -n "$tmp" && test -d "$tmp"
24590} ||
24591{
ca81d7a0
JD
24592 tmp=./conf$$-$RANDOM
24593 (umask 077 && mkdir "$tmp")
503d2be0
AS
24594} ||
24595{
19650fd6 24596 echo "$me: cannot create a temporary directory in ." >&2
503d2be0
AS
24597 { (exit 1); exit 1; }
24598}
24599
503d2be0 24600#
ca81d7a0 24601# Set up the sed scripts for CONFIG_FILES section.
503d2be0
AS
24602#
24603
24604# No need to generate the scripts if there are no CONFIG_FILES.
24605# This happens for instance when ./config.status config.h
ca81d7a0
JD
24606if test -n "$CONFIG_FILES"; then
24607
24608_ACEOF
24609
24610
24611
24612ac_delim='%!_!# '
24613for ac_last_try in false false false false false :; do
24614 cat >conf$$subs.sed <<_ACEOF
24615SHELL!$SHELL$ac_delim
24616PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
24617PACKAGE_NAME!$PACKAGE_NAME$ac_delim
24618PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
24619PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
24620PACKAGE_STRING!$PACKAGE_STRING$ac_delim
24621PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
24622exec_prefix!$exec_prefix$ac_delim
24623prefix!$prefix$ac_delim
24624program_transform_name!$program_transform_name$ac_delim
24625bindir!$bindir$ac_delim
24626sbindir!$sbindir$ac_delim
24627libexecdir!$libexecdir$ac_delim
24628datarootdir!$datarootdir$ac_delim
24629datadir!$datadir$ac_delim
24630sysconfdir!$sysconfdir$ac_delim
24631sharedstatedir!$sharedstatedir$ac_delim
24632localstatedir!$localstatedir$ac_delim
24633includedir!$includedir$ac_delim
24634oldincludedir!$oldincludedir$ac_delim
24635docdir!$docdir$ac_delim
24636infodir!$infodir$ac_delim
24637htmldir!$htmldir$ac_delim
24638dvidir!$dvidir$ac_delim
24639pdfdir!$pdfdir$ac_delim
24640psdir!$psdir$ac_delim
24641libdir!$libdir$ac_delim
24642localedir!$localedir$ac_delim
24643mandir!$mandir$ac_delim
24644DEFS!$DEFS$ac_delim
24645ECHO_C!$ECHO_C$ac_delim
24646ECHO_N!$ECHO_N$ac_delim
24647ECHO_T!$ECHO_T$ac_delim
24648LIBS!$LIBS$ac_delim
24649build_alias!$build_alias$ac_delim
24650host_alias!$host_alias$ac_delim
24651target_alias!$target_alias$ac_delim
24652MAINT!$MAINT$ac_delim
24653build!$build$ac_delim
24654build_cpu!$build_cpu$ac_delim
24655build_vendor!$build_vendor$ac_delim
24656build_os!$build_os$ac_delim
24657host!$host$ac_delim
24658host_cpu!$host_cpu$ac_delim
24659host_vendor!$host_vendor$ac_delim
24660host_os!$host_os$ac_delim
24661CC!$CC$ac_delim
24662CFLAGS!$CFLAGS$ac_delim
24663LDFLAGS!$LDFLAGS$ac_delim
24664CPPFLAGS!$CPPFLAGS$ac_delim
24665ac_ct_CC!$ac_ct_CC$ac_delim
24666EXEEXT!$EXEEXT$ac_delim
24667OBJEXT!$OBJEXT$ac_delim
24668CPP!$CPP$ac_delim
24669GREP!$GREP$ac_delim
24670EGREP!$EGREP$ac_delim
24671LN_S!$LN_S$ac_delim
24672INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
24673INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
24674INSTALL_DATA!$INSTALL_DATA$ac_delim
24675RANLIB!$RANLIB$ac_delim
24676INSTALL_INFO!$INSTALL_INFO$ac_delim
24677GZIP_PROG!$GZIP_PROG$ac_delim
1bb9a689 24678MAKEINFO!$MAKEINFO$ac_delim
ca81d7a0
JD
24679LIBSOUND!$LIBSOUND$ac_delim
24680PKG_CONFIG!$PKG_CONFIG$ac_delim
24681ALSA_CFLAGS!$ALSA_CFLAGS$ac_delim
24682ALSA_LIBS!$ALSA_LIBS$ac_delim
24683CFLAGS_SOUND!$CFLAGS_SOUND$ac_delim
24684SET_MAKE!$SET_MAKE$ac_delim
24685XMKMF!$XMKMF$ac_delim
cfe440b8 24686HAVE_XSERVER!$HAVE_XSERVER$ac_delim
0cfc0546
GM
24687RSVG_CFLAGS!$RSVG_CFLAGS$ac_delim
24688RSVG_LIBS!$RSVG_LIBS$ac_delim
ca81d7a0
JD
24689GTK_CFLAGS!$GTK_CFLAGS$ac_delim
24690GTK_LIBS!$GTK_LIBS$ac_delim
131e4133
MA
24691DBUS_CFLAGS!$DBUS_CFLAGS$ac_delim
24692DBUS_LIBS!$DBUS_LIBS$ac_delim
c24fa7dc
MB
24693XFT_CFLAGS!$XFT_CFLAGS$ac_delim
24694XFT_LIBS!$XFT_LIBS$ac_delim
24695FREETYPE_CFLAGS!$FREETYPE_CFLAGS$ac_delim
24696FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim
24697FONTCONFIG_CFLAGS!$FONTCONFIG_CFLAGS$ac_delim
24698FONTCONFIG_LIBS!$FONTCONFIG_LIBS$ac_delim
c24fa7dc
MB
24699LIBOTF_CFLAGS!$LIBOTF_CFLAGS$ac_delim
24700LIBOTF_LIBS!$LIBOTF_LIBS$ac_delim
7f0942ba
KH
24701M17N_FLT_CFLAGS!$M17N_FLT_CFLAGS$ac_delim
24702M17N_FLT_LIBS!$M17N_FLT_LIBS$ac_delim
ca81d7a0
JD
24703ALLOCA!$ALLOCA$ac_delim
24704liblockfile!$liblockfile$ac_delim
24705LIBOBJS!$LIBOBJS$ac_delim
24706NEED_SETGID!$NEED_SETGID$ac_delim
24707KMEM_GROUP!$KMEM_GROUP$ac_delim
24708GETLOADAVG_LIBS!$GETLOADAVG_LIBS$ac_delim
24709GETOPT_H!$GETOPT_H$ac_delim
24710GETOPTOBJS!$GETOPTOBJS$ac_delim
e70b2110 24711version!$version$ac_delim
ca81d7a0
JD
24712_ACEOF
24713
24714 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
24715 break
24716 elif $ac_last_try; then
24717 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24718echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24719 { (exit 1); exit 1; }; }
24720 else
24721 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8eeae1c9 24722 fi
ca81d7a0
JD
24723done
24724
24725ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24726if test -n "$ac_eof"; then
24727 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24728 ac_eof=`expr $ac_eof + 1`
24729fi
503d2be0 24730
c0d27fcc 24731cat >>$CONFIG_STATUS <<_ACEOF
ca81d7a0
JD
24732cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
24733/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24734_ACEOF
24735sed '
24736s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24737s/^/s,@/; s/!/@,|#_!!_#|/
24738:n
24739t n
24740s/'"$ac_delim"'$/,g/; t
24741s/$/\\/; p
24742N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24743' >>$CONFIG_STATUS <conf$$subs.sed
24744rm -f conf$$subs.sed
24745cat >>$CONFIG_STATUS <<_ACEOF
24746CEOF$ac_eof
24747_ACEOF
503d2be0 24748
ca81d7a0
JD
24749
24750ac_delim='%!_!# '
24751for ac_last_try in false false false false false :; do
24752 cat >conf$$subs.sed <<_ACEOF
0bd50841 24753configuration!$configuration$ac_delim
7f0942ba
KH
24754canonical!$canonical$ac_delim
24755srcdir!$srcdir$ac_delim
1bb9a689
MB
24756lispdir!$lispdir$ac_delim
24757locallisppath!$locallisppath$ac_delim
24758lisppath!$lisppath$ac_delim
9bdeb5e9
MB
24759x_default_search_path!$x_default_search_path$ac_delim
24760etcdir!$etcdir$ac_delim
24761archlibdir!$archlibdir$ac_delim
24762bitmapdir!$bitmapdir$ac_delim
24763gamedir!$gamedir$ac_delim
24764gameuser!$gameuser$ac_delim
24765c_switch_system!$c_switch_system$ac_delim
c24fa7dc
MB
24766c_switch_machine!$c_switch_machine$ac_delim
24767LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
24768LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
ca81d7a0
JD
24769C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
24770X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
24771machfile!$machfile$ac_delim
24772opsysfile!$opsysfile$ac_delim
24773carbon_appdir!$carbon_appdir$ac_delim
24774LTLIBOBJS!$LTLIBOBJS$ac_delim
24775_ACEOF
503d2be0 24776
e70b2110 24777 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
c24fa7dc
MB
24778 break
24779 elif $ac_last_try; then
24780 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
24781echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
24782 { (exit 1); exit 1; }; }
24783 else
24784 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
503d2be0 24785 fi
ca81d7a0
JD
24786done
24787
24788ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
24789if test -n "$ac_eof"; then
24790 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
24791 ac_eof=`expr $ac_eof + 1`
24792fi
ba4481b5 24793
ca81d7a0
JD
24794cat >>$CONFIG_STATUS <<_ACEOF
24795cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
24796/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
24797_ACEOF
24798sed '
24799s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
24800s/^/s,@/; s/!/@,|#_!!_#|/
24801:n
24802t n
24803s/'"$ac_delim"'$/,g/; t
24804s/$/\\/; p
24805N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
24806' >>$CONFIG_STATUS <conf$$subs.sed
24807rm -f conf$$subs.sed
24808cat >>$CONFIG_STATUS <<_ACEOF
24809:end
24810s/|#_!!_#|//g
24811CEOF$ac_eof
c0d27fcc 24812_ACEOF
ca81d7a0
JD
24813
24814
24815# VPATH may cause trouble with some makes, so we remove $(srcdir),
24816# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24817# trailing colons and then remove the whole line if VPATH becomes empty
24818# (actually we leave an empty line to preserve line numbers).
24819if test "x$srcdir" = x.; then
24820 ac_vpsub='/^[ ]*VPATH[ ]*=/{
24821s/:*\$(srcdir):*/:/
24822s/:*\${srcdir}:*/:/
24823s/:*@srcdir@:*/:/
24824s/^\([^=]*=[ ]*\):*/\1/
24825s/:*$//
24826s/^[^=]*=[ ]*$//
24827}'
24828fi
24829
c0d27fcc 24830cat >>$CONFIG_STATUS <<\_ACEOF
ca81d7a0
JD
24831fi # test -n "$CONFIG_FILES"
24832
24833
24834for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
24835do
24836 case $ac_tag in
24837 :[FHLC]) ac_mode=$ac_tag; continue;;
24838 esac
24839 case $ac_mode$ac_tag in
24840 :[FHL]*:*);;
24841 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
24842echo "$as_me: error: Invalid tag $ac_tag." >&2;}
24843 { (exit 1); exit 1; }; };;
24844 :[FH]-) ac_tag=-:-;;
24845 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
24846 esac
24847 ac_save_IFS=$IFS
24848 IFS=:
24849 set x $ac_tag
24850 IFS=$ac_save_IFS
24851 shift
24852 ac_file=$1
24853 shift
24854
24855 case $ac_mode in
24856 :L) ac_source=$1;;
24857 :[FH])
24858 ac_file_inputs=
24859 for ac_f
24860 do
24861 case $ac_f in
24862 -) ac_f="$tmp/stdin";;
24863 *) # Look for the file first in the build tree, then in the source tree
24864 # (if the path is not absolute). The absolute path cannot be DOS-style,
24865 # because $ac_f cannot contain `:'.
24866 test -f "$ac_f" ||
24867 case $ac_f in
24868 [\\/$]*) false;;
24869 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
24870 esac ||
24871 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
24872echo "$as_me: error: cannot find input file: $ac_f" >&2;}
24873 { (exit 1); exit 1; }; };;
24874 esac
24875 ac_file_inputs="$ac_file_inputs $ac_f"
24876 done
24877
24878 # Let's still pretend it is `configure' which instantiates (i.e., don't
24879 # use $as_me), people would be surprised to read:
24880 # /* config.h. Generated by config.status. */
24881 configure_input="Generated from "`IFS=:
24882 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
24883 if test x"$ac_file" != x-; then
24884 configure_input="$ac_file. $configure_input"
24885 { echo "$as_me:$LINENO: creating $ac_file" >&5
24886echo "$as_me: creating $ac_file" >&6;}
24887 fi
24888
24889 case $ac_tag in
24890 *:-:* | *:-) cat >"$tmp/stdin";;
24891 esac
24892 ;;
ba4481b5
DL
24893 esac
24894
ca81d7a0 24895 ac_dir=`$as_dirname -- "$ac_file" ||
c0d27fcc 24896$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24897 X"$ac_file" : 'X\(//\)[^/]' \| \
24898 X"$ac_file" : 'X\(//\)$' \| \
ca81d7a0 24899 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
503d2be0 24900echo X"$ac_file" |
ca81d7a0
JD
24901 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24902 s//\1/
24903 q
24904 }
24905 /^X\(\/\/\)[^/].*/{
24906 s//\1/
24907 q
24908 }
24909 /^X\(\/\/\)$/{
24910 s//\1/
24911 q
24912 }
24913 /^X\(\/\).*/{
24914 s//\1/
24915 q
24916 }
24917 s/.*/./; q'`
24918 { as_dir="$ac_dir"
24919 case $as_dir in #(
24920 -*) as_dir=./$as_dir;;
24921 esac
24922 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6bae0ccf 24923 as_dirs=
ca81d7a0
JD
24924 while :; do
24925 case $as_dir in #(
24926 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
24927 *) as_qdir=$as_dir;;
24928 esac
24929 as_dirs="'$as_qdir' $as_dirs"
24930 as_dir=`$as_dirname -- "$as_dir" ||
6bae0ccf 24931$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
edfaf76d
LK
24932 X"$as_dir" : 'X\(//\)[^/]' \| \
24933 X"$as_dir" : 'X\(//\)$' \| \
ca81d7a0 24934 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6bae0ccf 24935echo X"$as_dir" |
ca81d7a0
JD
24936 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24937 s//\1/
24938 q
24939 }
24940 /^X\(\/\/\)[^/].*/{
24941 s//\1/
24942 q
24943 }
24944 /^X\(\/\/\)$/{
24945 s//\1/
24946 q
24947 }
24948 /^X\(\/\).*/{
24949 s//\1/
24950 q
24951 }
24952 s/.*/./; q'`
24953 test -d "$as_dir" && break
6bae0ccf 24954 done
ca81d7a0
JD
24955 test -z "$as_dirs" || eval "mkdir $as_dirs"
24956 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
24957echo "$as_me: error: cannot create directory $as_dir" >&2;}
6bae0ccf 24958 { (exit 1); exit 1; }; }; }
c0d27fcc 24959 ac_builddir=.
98418dba 24960
ca81d7a0
JD
24961case "$ac_dir" in
24962.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
24963*)
c0d27fcc 24964 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
ca81d7a0
JD
24965 # A ".." for each directory in $ac_dir_suffix.
24966 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
24967 case $ac_top_builddir_sub in
24968 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
24969 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
24970 esac ;;
24971esac
24972ac_abs_top_builddir=$ac_pwd
24973ac_abs_builddir=$ac_pwd$ac_dir_suffix
24974# for backward compatibility:
24975ac_top_builddir=$ac_top_build_prefix
c0d27fcc
MR
24976
24977case $srcdir in
ca81d7a0 24978 .) # We are building in place.
c0d27fcc 24979 ac_srcdir=.
ca81d7a0
JD
24980 ac_top_srcdir=$ac_top_builddir_sub
24981 ac_abs_top_srcdir=$ac_pwd ;;
24982 [\\/]* | ?:[\\/]* ) # Absolute name.
c0d27fcc 24983 ac_srcdir=$srcdir$ac_dir_suffix;
ca81d7a0
JD
24984 ac_top_srcdir=$srcdir
24985 ac_abs_top_srcdir=$srcdir ;;
24986 *) # Relative name.
24987 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
24988 ac_top_srcdir=$ac_top_build_prefix$srcdir
24989 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
c0d27fcc 24990esac
ca81d7a0 24991ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
edfaf76d 24992
c0d27fcc 24993
ca81d7a0
JD
24994 case $ac_mode in
24995 :F)
24996 #
24997 # CONFIG_FILE
24998 #
ba4481b5 24999
503d2be0
AS
25000 case $INSTALL in
25001 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
ca81d7a0 25002 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
ba4481b5 25003 esac
ca81d7a0 25004_ACEOF
ba4481b5 25005
ca81d7a0
JD
25006cat >>$CONFIG_STATUS <<\_ACEOF
25007# If the template does not know about datarootdir, expand it.
25008# FIXME: This hack should be removed a few years after 2.60.
25009ac_datarootdir_hack=; ac_datarootdir_seen=
8eeae1c9 25010
ca81d7a0
JD
25011case `sed -n '/datarootdir/ {
25012 p
25013 q
25014}
25015/@datadir@/p
25016/@docdir@/p
25017/@infodir@/p
25018/@localedir@/p
25019/@mandir@/p
25020' $ac_file_inputs` in
25021*datarootdir*) ac_datarootdir_seen=yes;;
25022*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25023 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25024echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
8eeae1c9 25025_ACEOF
ca81d7a0
JD
25026cat >>$CONFIG_STATUS <<_ACEOF
25027 ac_datarootdir_hack='
25028 s&@datadir@&$datadir&g
25029 s&@docdir@&$docdir&g
25030 s&@infodir@&$infodir&g
25031 s&@localedir@&$localedir&g
25032 s&@mandir@&$mandir&g
25033 s&\\\${datarootdir}&$datarootdir&g' ;;
25034esac
c0d27fcc 25035_ACEOF
ca81d7a0
JD
25036
25037# Neutralize VPATH when `$srcdir' = `.'.
25038# Shell code in configure.ac might set extrasub.
25039# FIXME: do we really want to maintain this feature?
c0d27fcc 25040cat >>$CONFIG_STATUS <<_ACEOF
503d2be0
AS
25041 sed "$ac_vpsub
25042$extrasub
c0d27fcc
MR
25043_ACEOF
25044cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0
AS
25045:t
25046/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
ca81d7a0
JD
25047s&@configure_input@&$configure_input&;t t
25048s&@top_builddir@&$ac_top_builddir_sub&;t t
25049s&@srcdir@&$ac_srcdir&;t t
25050s&@abs_srcdir@&$ac_abs_srcdir&;t t
25051s&@top_srcdir@&$ac_top_srcdir&;t t
25052s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25053s&@builddir@&$ac_builddir&;t t
25054s&@abs_builddir@&$ac_abs_builddir&;t t
25055s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25056s&@INSTALL@&$ac_INSTALL&;t t
25057$ac_datarootdir_hack
25058" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
25059
25060test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25061 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
25062 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
25063 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25064which seems to be undefined. Please make sure it is defined." >&5
25065echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25066which seems to be undefined. Please make sure it is defined." >&2;}
25067
25068 rm -f "$tmp/stdin"
503d2be0 25069 case $ac_file in
ca81d7a0
JD
25070 -) cat "$tmp/out"; rm -f "$tmp/out";;
25071 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
ba4481b5 25072 esac
ca81d7a0
JD
25073 ;;
25074 :H)
25075 #
25076 # CONFIG_HEADER
25077 #
25078_ACEOF
25079
25080# Transform confdefs.h into a sed script `conftest.defines', that
25081# substitutes the proper values into config.h.in to produce config.h.
25082rm -f conftest.defines conftest.tail
25083# First, append a space to every undef/define line, to ease matching.
25084echo 's/$/ /' >conftest.defines
25085# Then, protect against being on the right side of a sed subst, or in
25086# an unquoted here document, in config.status. If some macros were
25087# called several times there might be several #defines for the same
25088# symbol, which is useless. But do not sort them, since the last
25089# AC_DEFINE must be honored.
25090ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25091# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
25092# NAME is the cpp macro being defined, VALUE is the value it is being given.
25093# PARAMS is the parameter list in the macro definition--in most cases, it's
25094# just an empty string.
25095ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
25096ac_dB='\\)[ (].*,\\1define\\2'
25097ac_dC=' '
25098ac_dD=' ,'
25099
25100uniq confdefs.h |
25101 sed -n '
25102 t rset
25103 :rset
25104 s/^[ ]*#[ ]*define[ ][ ]*//
25105 t ok
25106 d
25107 :ok
25108 s/[\\&,]/\\&/g
25109 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
25110 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
25111 ' >>conftest.defines
25112
25113# Remove the space that was appended to ease matching.
25114# Then replace #undef with comments. This is necessary, for
ba4481b5
DL
25115# example, in the case of _POSIX_SOURCE, which is predefined and required
25116# on some systems where configure will not decide to define it.
ca81d7a0
JD
25117# (The regexp can be short, since the line contains either #define or #undef.)
25118echo 's/ $//
25119s,^[ #]*u.*,/* & */,' >>conftest.defines
25120
25121# Break up conftest.defines:
25122ac_max_sed_lines=50
25123
25124# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
25125# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
25126# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
25127# et cetera.
25128ac_in='$ac_file_inputs'
25129ac_out='"$tmp/out1"'
25130ac_nxt='"$tmp/out2"'
25131
25132while :
503d2be0 25133do
ca81d7a0
JD
25134 # Write a here document:
25135 cat >>$CONFIG_STATUS <<_ACEOF
25136 # First, check the format of the line:
25137 cat >"\$tmp/defines.sed" <<\\CEOF
25138/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
25139/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
25140b
25141:def
25142_ACEOF
25143 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
503d2be0 25144 echo 'CEOF
ca81d7a0
JD
25145 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
25146 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
25147 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
25148 grep . conftest.tail >/dev/null || break
503d2be0
AS
25149 rm -f conftest.defines
25150 mv conftest.tail conftest.defines
25151done
ca81d7a0 25152rm -f conftest.defines conftest.tail
503d2be0 25153
ca81d7a0 25154echo "ac_result=$ac_in" >>$CONFIG_STATUS
c0d27fcc 25155cat >>$CONFIG_STATUS <<\_ACEOF
503d2be0 25156 if test x"$ac_file" != x-; then
ca81d7a0
JD
25157 echo "/* $configure_input */" >"$tmp/config.h"
25158 cat "$ac_result" >>"$tmp/config.h"
25159 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
c0d27fcc 25160 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
503d2be0
AS
25161echo "$as_me: $ac_file is unchanged" >&6;}
25162 else
503d2be0 25163 rm -f $ac_file
ca81d7a0 25164 mv "$tmp/config.h" $ac_file
ba4481b5 25165 fi
503d2be0 25166 else
ca81d7a0
JD
25167 echo "/* $configure_input */"
25168 cat "$ac_result"
ba4481b5 25169 fi
ca81d7a0
JD
25170 rm -f "$tmp/out12"
25171 ;;
edfaf76d 25172
ca81d7a0
JD
25173 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
25174echo "$as_me: executing $ac_file commands" >&6;}
25175 ;;
25176 esac
ba4481b5 25177
c0d27fcc 25178
ca81d7a0
JD
25179 case $ac_file$ac_mode in
25180 "default":C)
ba4481b5
DL
25181
25182### Make the necessary directories, if they don't exist.
25183for dir in etc lisp ; do
25184 test -d ${dir} || mkdir ${dir}
25185done
25186
25187# Build src/Makefile from ${srcdir}/src/Makefile.c
25188# and lib-src/Makefile from ${srcdir}/lib-src/Makefile.c
25189# This must be done after src/config.h is built, since we rely on that file.
25190
25191# Now get this: Some word that is part of the ${srcdir} directory name
25192# or the ${configuration} value might, just might, happen to be an
25193# identifier like `sun4' or `i386' or something, and be predefined by
25194# the C preprocessor to some helpful value like 1, or maybe the empty
25195# string. Needless to say consequent macro substitutions are less
25196# than conducive to the makefile finding the correct directory.
25197undefs="`echo $top_srcdir $configuration $canonical |
25198sed -e 's/[^a-zA-Z0-9_]/ /g' -e 's/^/ /' -e 's/ *$//' \
25199 -e 's/ */ -U/g' -e 's/-U[0-9][^ ]*//g' \
25200`"
25201
25202echo creating src/epaths.h
4aa6b955 25203${MAKE-make} epaths-force
ba4481b5 25204
1c203d4c
DL
25205# As of 2000-11-19, newest development versions of GNU cpp preprocess
25206# `..' to `. .' unless invoked with -traditional
25207
d0e9bfd2 25208if test "x$GCC" = xyes && test "x$CPP_NEED_TRADITIONAL" = xyes; then
1c203d4c
DL
25209 CPPFLAGS="$CPPFLAGS -traditional"
25210fi
25211
ba4481b5
DL
25212echo creating lib-src/Makefile
25213( cd lib-src
25214 rm -f junk.c junk1.c junk2.c
25215 sed -e '/start of cpp stuff/q' \
25216 < Makefile.c > junk1.c
25217 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25218 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25219 < Makefile.c > junk.c
503d2be0 25220 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25221 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25222 cat junk1.c junk2.c > Makefile.new
25223 rm -f junk.c junk1.c junk2.c
25224 chmod 444 Makefile.new
25225 mv -f Makefile.new Makefile
25226)
25227
25228echo creating src/Makefile
25229( cd src
25230 rm -f junk.c junk1.c junk2.c
25231 sed -e '/start of cpp stuff/q' \
25232 < Makefile.c > junk1.c
25233 sed -e '1,/start of cpp stuff/d'\
9a72e4c1 25234 -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
ba4481b5 25235 < Makefile.c > junk.c
f36014a2 25236 if test -f ${srcdir}/admin/unidata/UnicodeData.txt; then
2ee27f27
EZ
25237 echo creating ${srcdir}/admin/unidata/Makefile
25238 cp ${srcdir}/admin/unidata/Makefile.in ${srcdir}/admin/unidata/Makefile
f36014a2
KH
25239 CPPFLAGS="$CPPFLAGS -DHAVE_UNIDATA"
25240 fi
503d2be0 25241 $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
ba4481b5
DL
25242 sed -e 's/^ / /' -e '/^#/d' -e '/^[ \f]*$/d' > junk2.c
25243 cat junk1.c junk2.c > Makefile.new
25244 rm -f junk.c junk1.c junk2.c
25245 chmod 444 Makefile.new
25246 mv -f Makefile.new Makefile
25247)
25248
503d2be0 25249if test ! -f src/.gdbinit && test -f $srcdir/src/.gdbinit; then
ba4481b5 25250 echo creating src/.gdbinit
503d2be0 25251 echo source $srcdir/src/.gdbinit > src/.gdbinit
ba4481b5
DL
25252fi
25253
25254# This is how we know whether to re-run configure in certain cases.
25255touch src/config.stamp
25256
503d2be0 25257 ;;
ca81d7a0 25258
503d2be0 25259 esac
ca81d7a0 25260done # for ac_tag
503d2be0 25261
ba4481b5 25262
503d2be0 25263{ (exit 0); exit 0; }
c0d27fcc 25264_ACEOF
ba4481b5 25265chmod +x $CONFIG_STATUS
503d2be0
AS
25266ac_clean_files=$ac_clean_files_save
25267
c0d27fcc 25268
503d2be0
AS
25269# configure is writing to config.log, and then calls config.status.
25270# config.status does its own redirection, appending to config.log.
25271# Unfortunately, on DOS this fails, as config.log is still kept open
25272# by configure, so config.status won't be able to write to it; its
25273# output is simply discarded. So we exec the FD to /dev/null,
25274# effectively closing config.log, so it can be properly (re)opened and
25275# appended to by config.status. When coming back to configure, we
25276# need to make the FD available again.
25277if test "$no_create" != yes; then
25278 ac_cs_success=:
19650fd6
AS
25279 ac_config_status_args=
25280 test "$silent" = yes &&
25281 ac_config_status_args="$ac_config_status_args --quiet"
503d2be0 25282 exec 5>/dev/null
19650fd6 25283 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
503d2be0
AS
25284 exec 5>>config.log
25285 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25286 # would make configure fail if this is the last instruction.
25287 $ac_cs_success || { (exit 1); exit 1; }
25288fi
f5f47add 25289
c0d27fcc 25290